sistema.conectalaudos.com.br Open in urlscan Pro
104.19.240.93  Public Scan

Submitted URL: http://sistema.conectalaudos.com.br/package/run_js/7ccc7776675df7159d92549cf81666afd6c871b47857d2643603824c69d156ff/xfalse/x21/run.js
Effective URL: https://sistema.conectalaudos.com.br/package/run_js/7ccc7776675df7159d92549cf81666afd6c871b47857d2643603824c69d156ff/xfalse/x21/run.js
Submission: On November 08 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

  /*
  * Copyright Bubble Group, Inc.
  */

  window.bubble_bundle_name = 'run';

  if (!window._bubble_page_load_data) {
      window._bubble_page_load_data = {};
  }
  if (!window._bubble_page_load_data.js_execution_timings) {
    window._bubble_page_load_data.js_execution_timings = {};
  }
  if (!window._bubble_page_load_data.js_execution_timings.module_execution_timings) {
    window._bubble_page_load_data.js_execution_timings.module_execution_timings = [];
  }
  window._bubble_page_load_data.js_execution_timings.module_start_execution = Date.now();
  if (!window._bubble_page_load_data.js_execution_timings.module_first_execution) {
    window._bubble_page_load_data.js_execution_timings.module_first_execution = window._bubble_page_load_data.js_execution_timings.module_start_execution;
  }
(()=>{var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});var __esm=(fn,res)=>function(){return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all4)=>{for(var name in all4)__defProp(target,name,{get:all4[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var define_process_env_default,init_define_process_env=__esm({"<define:process.env>"(){define_process_env_default={}}});var require_base64_js=__commonJS({"node_modules/base64-js/index.js"(exports3){"use strict";init_define_process_env();init_shim();exports3.byteLength=byteLength;exports3.toByteArray=toByteArray;exports3.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;var i,len;revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function getLens(b64){var len2=b64.length;if(len2%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");validLen===-1&&(validLen=len2);var placeHoldersLen=validLen===len2?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray(b64){var tmp,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(_byteLength(b64,validLen,placeHoldersLen)),curByte=0,len2=placeHoldersLen>0?validLen-4:validLen,i2;for(i2=0;i2<len2;i2+=4)tmp=revLookup[b64.charCodeAt(i2)]<<18|revLookup[b64.charCodeAt(i2+1)]<<12|revLookup[b64.charCodeAt(i2+2)]<<6|revLookup[b64.charCodeAt(i2+3)],arr[curByte++]=tmp>>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255;return placeHoldersLen===2&&(tmp=revLookup[b64.charCodeAt(i2)]<<2|revLookup[b64.charCodeAt(i2+1)]>>4,arr[curByte++]=tmp&255),placeHoldersLen===1&&(tmp=revLookup[b64.charCodeAt(i2)]<<10|revLookup[b64.charCodeAt(i2+1)]<<4|revLookup[b64.charCodeAt(i2+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start3,end2){for(var tmp,output3=[],i2=start3;i2<end2;i2+=3)tmp=(uint8[i2]<<16&16711680)+(uint8[i2+1]<<8&65280)+(uint8[i2+2]&255),output3.push(tripletToBase64(tmp));return output3.join("")}function fromByteArray(uint8){for(var tmp,len2=uint8.length,extraBytes=len2%3,parts=[],maxChunkLength=16383,i2=0,len22=len2-extraBytes;i2<len22;i2+=maxChunkLength)parts.push(encodeChunk(uint8,i2,i2+maxChunkLength>len22?len22:i2+maxChunkLength));return extraBytes===1?(tmp=uint8[len2-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):extraBytes===2&&(tmp=(uint8[len2-2]<<8)+uint8[len2-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"=")),parts.join("")}}});var require_ieee754=__commonJS({"node_modules/ieee754/index.js"(exports3){init_define_process_env();init_shim();exports3.read=function(buffer2,offset,isLE3,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE3?nBytes-1:0,d=isLE3?-1:1,s=buffer2[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=e*256+buffer2[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=m*256+buffer2[offset+i],i+=d,nBits-=8);if(e===0)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m=m+Math.pow(2,mLen),e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports3.write=function(buffer2,value,offset,isLE3,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE3?0:nBytes-1,d=isLE3?1:-1,s=value<0||value===0&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),e+eBias>=1?value+=rt/c:value+=rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e=e+eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer2[offset+i]=m&255,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer2[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer2[offset+i-d]|=s*128}}});var require_buffer=__commonJS({"node_modules/node-stdlib-browser/node_modules/buffer/index.js"(exports3){"use strict";init_define_process_env();init_shim();var base643=require_base64_js(),ieee754=require_ieee754(),customInspectSymbol=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;exports3.Buffer=Buffer4;exports3.SlowBuffer=SlowBuffer;exports3.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports3.kMaxLength=K_MAX_LENGTH;Buffer4.TYPED_ARRAY_SUPPORT=typedArraySupport();!Buffer4.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 typedArraySupport(){try{var arr=new Uint8Array(1),proto={foo:function(){return 42}};return Object.setPrototypeOf(proto,Uint8Array.prototype),Object.setPrototypeOf(arr,proto),arr.foo()===42}catch{return!1}}Object.defineProperty(Buffer4.prototype,"parent",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.buffer}});Object.defineProperty(Buffer4.prototype,"offset",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.byteOffset}});function createBuffer(length){if(length>K_MAX_LENGTH)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer4.prototype),buf}function Buffer4(arg,encodingOrOffset,length){if(typeof arg=="number"){if(typeof encodingOrOffset=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}Buffer4.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value=="string")return fromString(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayView(value);if(value==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(isInstance(value,SharedArrayBuffer)||value&&isInstance(value.buffer,SharedArrayBuffer)))return fromArrayBuffer(value,encodingOrOffset,length);if(typeof value=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value)return Buffer4.from(valueOf,encodingOrOffset,length);var b=fromObject(value);if(b)return b;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]=="function")return Buffer4.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}Buffer4.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Object.setPrototypeOf(Buffer4.prototype,Uint8Array.prototype);Object.setPrototypeOf(Buffer4,Uint8Array);function assertSize(size){if(typeof size!="number")throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function alloc(size,fill,encoding){return assertSize(size),size<=0?createBuffer(size):fill!==void 0?typeof encoding=="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}Buffer4.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:checked(size)|0)}Buffer4.allocUnsafe=function(size){return allocUnsafe(size)};Buffer4.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if((typeof encoding!="string"||encoding==="")&&(encoding="utf8"),!Buffer4.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=byteLength(string,encoding)|0,buf=createBuffer(length),actual=buf.write(string,encoding);return actual!==length&&(buf=buf.slice(0,actual)),buf}function fromArrayLike(array){for(var length=array.length<0?0:checked(array.length)|0,buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=array[i]&255;return buf}function fromArrayView(arrayView){if(isInstance(arrayView,Uint8Array)){var copy=new Uint8Array(arrayView);return fromArrayBuffer(copy.buffer,copy.byteOffset,copy.byteLength)}return fromArrayLike(arrayView)}function fromArrayBuffer(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset)throw new RangeError('"offset" is outside of buffer bounds');if(array.byteLength<byteOffset+(length||0))throw new RangeError('"length" is outside of buffer bounds');var buf;return byteOffset===void 0&&length===void 0?buf=new Uint8Array(array):length===void 0?buf=new Uint8Array(array,byteOffset):buf=new Uint8Array(array,byteOffset,length),Object.setPrototypeOf(buf,Buffer4.prototype),buf}function fromObject(obj){if(Buffer4.isBuffer(obj)){var len=checked(obj.length)|0,buf=createBuffer(len);return buf.length===0||obj.copy(buf,0,0,len),buf}if(obj.length!==void 0)return typeof obj.length!="number"||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj);if(obj.type==="Buffer"&&Array.isArray(obj.data))return fromArrayLike(obj.data)}function checked(length){if(length>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return length|0}function SlowBuffer(length){return+length!=length&&(length=0),Buffer4.alloc(+length)}Buffer4.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==Buffer4.prototype};Buffer4.compare=function(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer4.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer4.from(b,b.offset,b.byteLength)),!Buffer4.isBuffer(a)||!Buffer4.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0};Buffer4.isEncoding=function(encoding){switch(String(encoding).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}};Buffer4.concat=function(list4,length){if(!Array.isArray(list4))throw new TypeError('"list" argument must be an Array of Buffers');if(list4.length===0)return Buffer4.alloc(0);var i;if(length===void 0)for(length=0,i=0;i<list4.length;++i)length+=list4[i].length;var buffer2=Buffer4.allocUnsafe(length),pos=0;for(i=0;i<list4.length;++i){var buf=list4[i];if(isInstance(buf,Uint8Array))pos+buf.length>buffer2.length?Buffer4.from(buf).copy(buffer2,pos):Uint8Array.prototype.set.call(buffer2,buf,pos);else if(Buffer4.isBuffer(buf))buf.copy(buffer2,pos);else throw new TypeError('"list" argument must be an Array of Buffers');pos+=buf.length}return buffer2};function byteLength(string,encoding){if(Buffer4.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if(typeof string!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&arguments[2]===!0;if(!mustMatch&&len===0)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes3(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes3(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}Buffer4.byteLength=byteLength;function slowToString(encoding,start3,end2){var loweredCase=!1;if((start3===void 0||start3<0)&&(start3=0),start3>this.length||((end2===void 0||end2>this.length)&&(end2=this.length),end2<=0)||(end2>>>=0,start3>>>=0,end2<=start3))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start3,end2);case"utf8":case"utf-8":return utf8Slice(this,start3,end2);case"ascii":return asciiSlice(this,start3,end2);case"latin1":case"binary":return latin1Slice(this,start3,end2);case"base64":return base64Slice(this,start3,end2);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start3,end2);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}Buffer4.prototype._isBuffer=!0;function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}Buffer4.prototype.swap16=function(){var len=this.length;if(len%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this};Buffer4.prototype.swap32=function(){var len=this.length;if(len%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this};Buffer4.prototype.swap64=function(){var len=this.length;if(len%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this};Buffer4.prototype.toString=function(){var length=this.length;return length===0?"":arguments.length===0?utf8Slice(this,0,length):slowToString.apply(this,arguments)};Buffer4.prototype.toLocaleString=Buffer4.prototype.toString;Buffer4.prototype.equals=function(b){if(!Buffer4.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:Buffer4.compare(this,b)===0};Buffer4.prototype.inspect=function(){var str="",max=exports3.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"};customInspectSymbol&&(Buffer4.prototype[customInspectSymbol]=Buffer4.prototype.inspect);Buffer4.prototype.compare=function(target,start3,end2,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer4.from(target,target.offset,target.byteLength)),!Buffer4.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(start3===void 0&&(start3=0),end2===void 0&&(end2=target?target.length:0),thisStart===void 0&&(thisStart=0),thisEnd===void 0&&(thisEnd=this.length),start3<0||end2>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start3>=end2)return 0;if(thisStart>=thisEnd)return-1;if(start3>=end2)return 1;if(start3>>>=0,end2>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end2-start3,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start3,end2),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0};function bidirectionalIndexOf(buffer2,val,byteOffset,encoding,dir){if(buffer2.length===0)return-1;if(typeof byteOffset=="string"?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,numberIsNaN(byteOffset)&&(byteOffset=dir?0:buffer2.length-1),byteOffset<0&&(byteOffset=buffer2.length+byteOffset),byteOffset>=buffer2.length){if(dir)return-1;byteOffset=buffer2.length-1}else if(byteOffset<0)if(dir)byteOffset=0;else return-1;if(typeof val=="string"&&(val=Buffer4.from(val,encoding)),Buffer4.isBuffer(val))return val.length===0?-1:arrayIndexOf(buffer2,val,byteOffset,encoding,dir);if(typeof val=="number")return val=val&255,typeof Uint8Array.prototype.indexOf=="function"?dir?Uint8Array.prototype.indexOf.call(buffer2,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer2,val,byteOffset):arrayIndexOf(buffer2,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1,arrLength=arr.length,valLength=val.length;if(encoding!==void 0&&(encoding=String(encoding).toLowerCase(),encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le")){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i2){return indexSize===1?buf[i2]:buf.readUInt16BE(i2*indexSize)}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else foundIndex!==-1&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j2=0;j2<valLength;j2++)if(read(arr,i+j2)!==read(val,j2)){found=!1;break}if(found)return i}return-1}Buffer4.prototype.includes=function(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer4.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)};Buffer4.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes3(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer4.prototype.write=function(string,offset,length,encoding){if(offset===void 0)encoding="utf8",length=this.length,offset=0;else if(length===void 0&&typeof offset=="string")encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset=offset>>>0,isFinite(length)?(length=length>>>0,encoding===void 0&&(encoding="utf8")):(encoding=length,length=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var remaining=this.length-offset;if((length===void 0||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":case"latin1":case"binary":return asciiWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}};Buffer4.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start3,end2){return start3===0&&end2===buf.length?base643.fromByteArray(buf):base643.fromByteArray(buf.slice(start3,end2))}function utf8Slice(buf,start3,end2){end2=Math.min(buf.length,end2);for(var res=[],i=start3;i<end2;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end2){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],(secondByte&192)===128&&(tempCodePoint=(firstByte&31)<<6|secondByte&63,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],(secondByte&192)===128&&(thirdByte&192)===128&&(tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],(secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128&&(tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}codePoint===null?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|codePoint&1023),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start3,end2){var ret="";end2=Math.min(buf.length,end2);for(var i=start3;i<end2;++i)ret+=String.fromCharCode(buf[i]&127);return ret}function latin1Slice(buf,start3,end2){var ret="";end2=Math.min(buf.length,end2);for(var i=start3;i<end2;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start3,end2){var len=buf.length;(!start3||start3<0)&&(start3=0),(!end2||end2<0||end2>len)&&(end2=len);for(var out="",i=start3;i<end2;++i)out+=hexSliceLookupTable[buf[i]];return out}function utf16leSlice(buf,start3,end2){for(var bytes3=buf.slice(start3,end2),res="",i=0;i<bytes3.length-1;i+=2)res+=String.fromCharCode(bytes3[i]+bytes3[i+1]*256);return res}Buffer4.prototype.slice=function(start3,end2){var len=this.length;start3=~~start3,end2=end2===void 0?len:~~end2,start3<0?(start3+=len,start3<0&&(start3=0)):start3>len&&(start3=len),end2<0?(end2+=len,end2<0&&(end2=0)):end2>len&&(end2=len),end2<start3&&(end2=start3);var newBuf=this.subarray(start3,end2);return Object.setPrototypeOf(newBuf,Buffer4.prototype),newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer4.prototype.readUintLE=Buffer4.prototype.readUIntLE=function(offset,byteLength2,noAssert){offset=offset>>>0,byteLength2=byteLength2>>>0,noAssert||checkOffset(offset,byteLength2,this.length);for(var val=this[offset],mul3=1,i=0;++i<byteLength2&&(mul3*=256);)val+=this[offset+i]*mul3;return val};Buffer4.prototype.readUintBE=Buffer4.prototype.readUIntBE=function(offset,byteLength2,noAssert){offset=offset>>>0,byteLength2=byteLength2>>>0,noAssert||checkOffset(offset,byteLength2,this.length);for(var val=this[offset+--byteLength2],mul3=1;byteLength2>0&&(mul3*=256);)val+=this[offset+--byteLength2]*mul3;return val};Buffer4.prototype.readUint8=Buffer4.prototype.readUInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,1,this.length),this[offset]};Buffer4.prototype.readUint16LE=Buffer4.prototype.readUInt16LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8};Buffer4.prototype.readUint16BE=Buffer4.prototype.readUInt16BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]};Buffer4.prototype.readUint32LE=Buffer4.prototype.readUInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer4.prototype.readUint32BE=Buffer4.prototype.readUInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer4.prototype.readIntLE=function(offset,byteLength2,noAssert){offset=offset>>>0,byteLength2=byteLength2>>>0,noAssert||checkOffset(offset,byteLength2,this.length);for(var val=this[offset],mul3=1,i=0;++i<byteLength2&&(mul3*=256);)val+=this[offset+i]*mul3;return mul3*=128,val>=mul3&&(val-=Math.pow(2,8*byteLength2)),val};Buffer4.prototype.readIntBE=function(offset,byteLength2,noAssert){offset=offset>>>0,byteLength2=byteLength2>>>0,noAssert||checkOffset(offset,byteLength2,this.length);for(var i=byteLength2,mul3=1,val=this[offset+--i];i>0&&(mul3*=256);)val+=this[offset+--i]*mul3;return mul3*=128,val>=mul3&&(val-=Math.pow(2,8*byteLength2)),val};Buffer4.prototype.readInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,1,this.length),this[offset]&128?(255-this[offset]+1)*-1:this[offset]};Buffer4.prototype.readInt16LE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt16BE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer4.prototype.readInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer4.prototype.readFloatLE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)};Buffer4.prototype.readFloatBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)};Buffer4.prototype.readDoubleLE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)};Buffer4.prototype.readDoubleBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer4.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}Buffer4.prototype.writeUintLE=Buffer4.prototype.writeUIntLE=function(value,offset,byteLength2,noAssert){if(value=+value,offset=offset>>>0,byteLength2=byteLength2>>>0,!noAssert){var maxBytes=Math.pow(2,8*byteLength2)-1;checkInt(this,value,offset,byteLength2,maxBytes,0)}var mul3=1,i=0;for(this[offset]=value&255;++i<byteLength2&&(mul3*=256);)this[offset+i]=value/mul3&255;return offset+byteLength2};Buffer4.prototype.writeUintBE=Buffer4.prototype.writeUIntBE=function(value,offset,byteLength2,noAssert){if(value=+value,offset=offset>>>0,byteLength2=byteLength2>>>0,!noAssert){var maxBytes=Math.pow(2,8*byteLength2)-1;checkInt(this,value,offset,byteLength2,maxBytes,0)}var i=byteLength2-1,mul3=1;for(this[offset+i]=value&255;--i>=0&&(mul3*=256);)this[offset+i]=value/mul3&255;return offset+byteLength2};Buffer4.prototype.writeUint8=Buffer4.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=value&255,offset+1};Buffer4.prototype.writeUint16LE=Buffer4.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value&255,this[offset+1]=value>>>8,offset+2};Buffer4.prototype.writeUint16BE=Buffer4.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=value&255,offset+2};Buffer4.prototype.writeUint32LE=Buffer4.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=value&255,offset+4};Buffer4.prototype.writeUint32BE=Buffer4.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=value&255,offset+4};Buffer4.prototype.writeIntLE=function(value,offset,byteLength2,noAssert){if(value=+value,offset=offset>>>0,!noAssert){var limit2=Math.pow(2,8*byteLength2-1);checkInt(this,value,offset,byteLength2,limit2-1,-limit2)}var i=0,mul3=1,sub=0;for(this[offset]=value&255;++i<byteLength2&&(mul3*=256);)value<0&&sub===0&&this[offset+i-1]!==0&&(sub=1),this[offset+i]=(value/mul3>>0)-sub&255;return offset+byteLength2};Buffer4.prototype.writeIntBE=function(value,offset,byteLength2,noAssert){if(value=+value,offset=offset>>>0,!noAssert){var limit2=Math.pow(2,8*byteLength2-1);checkInt(this,value,offset,byteLength2,limit2-1,-limit2)}var i=byteLength2-1,mul3=1,sub=0;for(this[offset+i]=value&255;--i>=0&&(mul3*=256);)value<0&&sub===0&&this[offset+i+1]!==0&&(sub=1),this[offset+i]=(value/mul3>>0)-sub&255;return offset+byteLength2};Buffer4.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=value&255,offset+1};Buffer4.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value&255,this[offset+1]=value>>>8,offset+2};Buffer4.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=value&255,offset+2};Buffer4.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=value&255,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4};Buffer4.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=offset>>>0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=value&255,offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset=offset>>>0,noAssert||checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}Buffer4.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)};Buffer4.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset=offset>>>0,noAssert||checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer4.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)};Buffer4.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)};Buffer4.prototype.copy=function(target,targetStart,start3,end2){if(!Buffer4.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start3||(start3=0),!end2&&end2!==0&&(end2=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end2>0&&end2<start3&&(end2=start3),end2===start3||target.length===0||this.length===0)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start3<0||start3>=this.length)throw new RangeError("Index out of range");if(end2<0)throw new RangeError("sourceEnd out of bounds");end2>this.length&&(end2=this.length),target.length-targetStart<end2-start3&&(end2=target.length-targetStart+start3);var len=end2-start3;return this===target&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(targetStart,start3,end2):Uint8Array.prototype.set.call(target,this.subarray(start3,end2),targetStart),len};Buffer4.prototype.fill=function(val,start3,end2,encoding){if(typeof val=="string"){if(typeof start3=="string"?(encoding=start3,start3=0,end2=this.length):typeof end2=="string"&&(encoding=end2,end2=this.length),encoding!==void 0&&typeof encoding!="string")throw new TypeError("encoding must be a string");if(typeof encoding=="string"&&!Buffer4.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(val.length===1){var code=val.charCodeAt(0);(encoding==="utf8"&&code<128||encoding==="latin1")&&(val=code)}}else typeof val=="number"?val=val&255:typeof val=="boolean"&&(val=Number(val));if(start3<0||this.length<start3||this.length<end2)throw new RangeError("Out of range index");if(end2<=start3)return this;start3=start3>>>0,end2=end2===void 0?this.length:end2>>>0,val||(val=0);var i;if(typeof val=="number")for(i=start3;i<end2;++i)this[i]=val;else{var bytes3=Buffer4.isBuffer(val)?val:Buffer4.from(val,encoding),len=bytes3.length;if(len===0)throw new TypeError('The value "'+val+'" is invalid for argument "value"');for(i=0;i<end2-start3;++i)this[i+start3]=bytes3[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function base64clean(str){if(str=str.split("=")[0],str=str.trim().replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str=str+"=";return str}function utf8ToBytes3(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes3=[],i=0;i<length;++i){if(codePoint=string.charCodeAt(i),codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes3.push(239,191,189);continue}else if(i+1===length){(units-=3)>-1&&bytes3.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes3.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes3.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes3.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes3.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes3.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes3.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else throw new Error("Invalid code point")}return bytes3}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(str.charCodeAt(i)&255);return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base643.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}var hexSliceLookupTable=function(){for(var alphabet="0123456789abcdef",table=new Array(256),i=0;i<16;++i)for(var i16=i*16,j2=0;j2<16;++j2)table[i16+j2]=alphabet[i]+alphabet[j2];return table}()}});var require_browser=__commonJS({"node_modules/process/browser.js"(exports3,module2){init_define_process_env();init_shim();var process2=module2.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(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch{try{return cachedSetTimeout.call(null,fun,0)}catch{return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch{try{return cachedClearTimeout.call(null,marker)}catch{return cachedClearTimeout.call(this,marker)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}process2.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(fun,array){this.fun=fun,this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process2.title="browser";process2.browser=!0;process2.env={};process2.argv=[];process2.version="";process2.versions={};function noop(){}process2.on=noop;process2.addListener=noop;process2.once=noop;process2.off=noop;process2.removeListener=noop;process2.removeAllListeners=noop;process2.emit=noop;process2.prependListener=noop;process2.prependOnceListener=noop;process2.listeners=function(name){return[]};process2.binding=function(name){throw new Error("process.binding is not supported")};process2.cwd=function(){return"/"};process2.chdir=function(dir){throw new Error("process.chdir is not supported")};process2.umask=function(){return 0}}});var import_buffer,import_process,_globalThis,init_shim=__esm({"node_modules/node-stdlib-browser/helpers/esbuild/shim.js"(){import_buffer=__toESM(require_buffer()),import_process=__toESM(require_browser()),_globalThis=function(Object2){function get10(){var _global4=this||self;return delete Object2.prototype.__magic__,_global4}if(typeof globalThis=="object")return globalThis;if(this)return get10();Object2.defineProperty(Object2.prototype,"__magic__",{configurable:!0,get:get10});var _global3=__magic__;return _global3}(Object)}});var require_global=__commonJS({"node_modules/core-js/internals/global.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var check=function(it){return it&&it.Math===Math&&it};module2.exports=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof window=="object"&&window)||check(typeof exports3=="object"&&exports3)||function(){return this}()||Function("return this")()}});var require_dom_iterables=__commonJS({"node_modules/core-js/internals/dom-iterables.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}});var require_is_callable=__commonJS({"node_modules/core-js/internals/is-callable.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var documentAll=typeof document=="object"&&document.all;module2.exports=typeof documentAll>"u"&&documentAll!==void 0?function(argument){return typeof argument=="function"||argument===documentAll}:function(argument){return typeof argument=="function"}}});var require_is_object=__commonJS({"node_modules/core-js/internals/is-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isCallable=require_is_callable();module2.exports=function(it){return typeof it=="object"?it!==null:isCallable(it)}}});var require_document_create_element=__commonJS({"node_modules/core-js/internals/document-create-element.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),isObject3=require_is_object(),document2=global.document,EXISTS=isObject3(document2)&&isObject3(document2.createElement);module2.exports=function(it){return EXISTS?document2.createElement(it):{}}}});var require_dom_token_list_prototype=__commonJS({"node_modules/core-js/internals/dom-token-list-prototype.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var documentCreateElement=require_document_create_element(),classList2=documentCreateElement("span").classList,DOMTokenListPrototype=classList2&&classList2.constructor&&classList2.constructor.prototype;module2.exports=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype}});var require_fails=__commonJS({"node_modules/core-js/internals/fails.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function(exec){try{return!!exec()}catch{return!0}}}});var require_function_bind_native=__commonJS({"node_modules/core-js/internals/function-bind-native.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails();module2.exports=!fails(function(){var test=(function(){}).bind();return typeof test!="function"||test.hasOwnProperty("prototype")})}});var require_function_uncurry_this=__commonJS({"node_modules/core-js/internals/function-uncurry-this.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_BIND=require_function_bind_native(),FunctionPrototype=Function.prototype,call=FunctionPrototype.call,uncurryThisWithBind=NATIVE_BIND&&FunctionPrototype.bind.bind(call,call);module2.exports=NATIVE_BIND?uncurryThisWithBind:function(fn){return function(){return call.apply(fn,arguments)}}}});var require_classof_raw=__commonJS({"node_modules/core-js/internals/classof-raw.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),toString2=uncurryThis({}.toString),stringSlice=uncurryThis("".slice);module2.exports=function(it){return stringSlice(toString2(it),8,-1)}}});var require_indexed_object=__commonJS({"node_modules/core-js/internals/indexed-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),fails=require_fails(),classof=require_classof_raw(),$Object=Object,split=uncurryThis("".split);module2.exports=fails(function(){return!$Object("z").propertyIsEnumerable(0)})?function(it){return classof(it)==="String"?split(it,""):$Object(it)}:$Object}});var require_is_null_or_undefined=__commonJS({"node_modules/core-js/internals/is-null-or-undefined.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function(it){return it==null}}});var require_require_object_coercible=__commonJS({"node_modules/core-js/internals/require-object-coercible.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isNullOrUndefined=require_is_null_or_undefined(),$TypeError=TypeError;module2.exports=function(it){if(isNullOrUndefined(it))throw new $TypeError("Can't call method on "+it);return it}}});var require_to_indexed_object=__commonJS({"node_modules/core-js/internals/to-indexed-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var IndexedObject=require_indexed_object(),requireObjectCoercible=require_require_object_coercible();module2.exports=function(it){return IndexedObject(requireObjectCoercible(it))}}});var require_is_pure=__commonJS({"node_modules/core-js/internals/is-pure.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=!1}});var require_define_global_property=__commonJS({"node_modules/core-js/internals/define-global-property.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),defineProperty2=Object.defineProperty;module2.exports=function(key,value){try{defineProperty2(global,key,{value,configurable:!0,writable:!0})}catch{global[key]=value}return value}}});var require_shared_store=__commonJS({"node_modules/core-js/internals/shared-store.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),defineGlobalProperty=require_define_global_property(),SHARED="__core-js_shared__",store=global[SHARED]||defineGlobalProperty(SHARED,{});module2.exports=store}});var require_shared=__commonJS({"node_modules/core-js/internals/shared.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var IS_PURE=require_is_pure(),store=require_shared_store();(module2.exports=function(key,value){return store[key]||(store[key]=value!==void 0?value:{})})("versions",[]).push({version:"3.35.1",mode:IS_PURE?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})}});var require_to_object=__commonJS({"node_modules/core-js/internals/to-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var requireObjectCoercible=require_require_object_coercible(),$Object=Object;module2.exports=function(argument){return $Object(requireObjectCoercible(argument))}}});var require_has_own_property=__commonJS({"node_modules/core-js/internals/has-own-property.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),toObject=require_to_object(),hasOwnProperty10=uncurryThis({}.hasOwnProperty);module2.exports=Object.hasOwn||function(it,key){return hasOwnProperty10(toObject(it),key)}}});var require_uid=__commonJS({"node_modules/core-js/internals/uid.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),id=0,postfix=Math.random(),toString2=uncurryThis(1 .toString);module2.exports=function(key){return"Symbol("+(key===void 0?"":key)+")_"+toString2(++id+postfix,36)}}});var require_engine_user_agent=__commonJS({"node_modules/core-js/internals/engine-user-agent.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=typeof navigator<"u"&&String(navigator.userAgent)||""}});var require_engine_v8_version=__commonJS({"node_modules/core-js/internals/engine-v8-version.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),userAgent=require_engine_user_agent(),process2=global.process,Deno=global.Deno,versions=process2&&process2.versions||Deno&&Deno.version,v8=versions&&versions.v8,match,version2;v8&&(match=v8.split("."),version2=match[0]>0&&match[0]<4?1:+(match[0]+match[1]));!version2&&userAgent&&(match=userAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent.match(/Chrome\/(\d+)/),match&&(version2=+match[1])));module2.exports=version2}});var require_symbol_constructor_detection=__commonJS({"node_modules/core-js/internals/symbol-constructor-detection.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var V8_VERSION=require_engine_v8_version(),fails=require_fails(),global=require_global(),$String=global.String;module2.exports=!!Object.getOwnPropertySymbols&&!fails(function(){var symbol=Symbol("symbol detection");return!$String(symbol)||!(Object(symbol)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41})}});var require_use_symbol_as_uid=__commonJS({"node_modules/core-js/internals/use-symbol-as-uid.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_SYMBOL=require_symbol_constructor_detection();module2.exports=NATIVE_SYMBOL&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}});var require_well_known_symbol=__commonJS({"node_modules/core-js/internals/well-known-symbol.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),shared=require_shared(),hasOwn=require_has_own_property(),uid=require_uid(),NATIVE_SYMBOL=require_symbol_constructor_detection(),USE_SYMBOL_AS_UID=require_use_symbol_as_uid(),Symbol3=global.Symbol,WellKnownSymbolsStore=shared("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol3.for||Symbol3:Symbol3&&Symbol3.withoutSetter||uid;module2.exports=function(name){return hasOwn(WellKnownSymbolsStore,name)||(WellKnownSymbolsStore[name]=NATIVE_SYMBOL&&hasOwn(Symbol3,name)?Symbol3[name]:createWellKnownSymbol("Symbol."+name)),WellKnownSymbolsStore[name]}}});var require_an_object=__commonJS({"node_modules/core-js/internals/an-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isObject3=require_is_object(),$String=String,$TypeError=TypeError;module2.exports=function(argument){if(isObject3(argument))return argument;throw new $TypeError($String(argument)+" is not an object")}}});var require_descriptors=__commonJS({"node_modules/core-js/internals/descriptors.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails();module2.exports=!fails(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}});var require_v8_prototype_define_bug=__commonJS({"node_modules/core-js/internals/v8-prototype-define-bug.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),fails=require_fails();module2.exports=DESCRIPTORS&&fails(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}});var require_ie8_dom_define=__commonJS({"node_modules/core-js/internals/ie8-dom-define.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),fails=require_fails(),createElement3=require_document_create_element();module2.exports=!DESCRIPTORS&&!fails(function(){return Object.defineProperty(createElement3("div"),"a",{get:function(){return 7}}).a!==7})}});var require_function_call=__commonJS({"node_modules/core-js/internals/function-call.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_BIND=require_function_bind_native(),call=Function.prototype.call;module2.exports=NATIVE_BIND?call.bind(call):function(){return call.apply(call,arguments)}}});var require_get_built_in=__commonJS({"node_modules/core-js/internals/get-built-in.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),isCallable=require_is_callable(),aFunction=function(argument){return isCallable(argument)?argument:void 0};module2.exports=function(namespace,method){return arguments.length<2?aFunction(global[namespace]):global[namespace]&&global[namespace][method]}}});var require_object_is_prototype_of=__commonJS({"node_modules/core-js/internals/object-is-prototype-of.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this();module2.exports=uncurryThis({}.isPrototypeOf)}});var require_is_symbol=__commonJS({"node_modules/core-js/internals/is-symbol.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var getBuiltIn=require_get_built_in(),isCallable=require_is_callable(),isPrototypeOf=require_object_is_prototype_of(),USE_SYMBOL_AS_UID=require_use_symbol_as_uid(),$Object=Object;module2.exports=USE_SYMBOL_AS_UID?function(it){return typeof it=="symbol"}:function(it){var $Symbol=getBuiltIn("Symbol");return isCallable($Symbol)&&isPrototypeOf($Symbol.prototype,$Object(it))}}});var require_try_to_string=__commonJS({"node_modules/core-js/internals/try-to-string.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $String=String;module2.exports=function(argument){try{return $String(argument)}catch{return"Object"}}}});var require_a_callable=__commonJS({"node_modules/core-js/internals/a-callable.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isCallable=require_is_callable(),tryToString=require_try_to_string(),$TypeError=TypeError;module2.exports=function(argument){if(isCallable(argument))return argument;throw new $TypeError(tryToString(argument)+" is not a function")}}});var require_get_method=__commonJS({"node_modules/core-js/internals/get-method.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var aCallable=require_a_callable(),isNullOrUndefined=require_is_null_or_undefined();module2.exports=function(V,P){var func=V[P];return isNullOrUndefined(func)?void 0:aCallable(func)}}});var require_ordinary_to_primitive=__commonJS({"node_modules/core-js/internals/ordinary-to-primitive.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),isCallable=require_is_callable(),isObject3=require_is_object(),$TypeError=TypeError;module2.exports=function(input2,pref){var fn,val;if(pref==="string"&&isCallable(fn=input2.toString)&&!isObject3(val=call(fn,input2))||isCallable(fn=input2.valueOf)&&!isObject3(val=call(fn,input2))||pref!=="string"&&isCallable(fn=input2.toString)&&!isObject3(val=call(fn,input2)))return val;throw new $TypeError("Can't convert object to primitive value")}}});var require_to_primitive=__commonJS({"node_modules/core-js/internals/to-primitive.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),isObject3=require_is_object(),isSymbol2=require_is_symbol(),getMethod=require_get_method(),ordinaryToPrimitive=require_ordinary_to_primitive(),wellKnownSymbol=require_well_known_symbol(),$TypeError=TypeError,TO_PRIMITIVE=wellKnownSymbol("toPrimitive");module2.exports=function(input2,pref){if(!isObject3(input2)||isSymbol2(input2))return input2;var exoticToPrim=getMethod(input2,TO_PRIMITIVE),result;if(exoticToPrim){if(pref===void 0&&(pref="default"),result=call(exoticToPrim,input2,pref),!isObject3(result)||isSymbol2(result))return result;throw new $TypeError("Can't convert object to primitive value")}return pref===void 0&&(pref="number"),ordinaryToPrimitive(input2,pref)}}});var require_to_property_key=__commonJS({"node_modules/core-js/internals/to-property-key.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toPrimitive=require_to_primitive(),isSymbol2=require_is_symbol();module2.exports=function(argument){var key=toPrimitive(argument,"string");return isSymbol2(key)?key:key+""}}});var require_object_define_property=__commonJS({"node_modules/core-js/internals/object-define-property.js"(exports3){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),IE8_DOM_DEFINE=require_ie8_dom_define(),V8_PROTOTYPE_DEFINE_BUG=require_v8_prototype_define_bug(),anObject=require_an_object(),toPropertyKey=require_to_property_key(),$TypeError=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE="configurable",WRITABLE="writable";exports3.f=DESCRIPTORS?V8_PROTOTYPE_DEFINE_BUG?function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),typeof O=="function"&&P==="prototype"&&"value"in Attributes&&WRITABLE in Attributes&&!Attributes[WRITABLE]){var current=$getOwnPropertyDescriptor(O,P);current&&current[WRITABLE]&&(O[P]=Attributes.value,Attributes={configurable:CONFIGURABLE in Attributes?Attributes[CONFIGURABLE]:current[CONFIGURABLE],enumerable:ENUMERABLE in Attributes?Attributes[ENUMERABLE]:current[ENUMERABLE],writable:!1})}return $defineProperty(O,P,Attributes)}:$defineProperty:function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),IE8_DOM_DEFINE)try{return $defineProperty(O,P,Attributes)}catch{}if("get"in Attributes||"set"in Attributes)throw new $TypeError("Accessors not supported");return"value"in Attributes&&(O[P]=Attributes.value),O}}});var require_math_trunc=__commonJS({"node_modules/core-js/internals/math-trunc.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var ceil=Math.ceil,floor=Math.floor;module2.exports=Math.trunc||function(x){var n=+x;return(n>0?floor:ceil)(n)}}});var require_to_integer_or_infinity=__commonJS({"node_modules/core-js/internals/to-integer-or-infinity.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var trunc=require_math_trunc();module2.exports=function(argument){var number2=+argument;return number2!==number2||number2===0?0:trunc(number2)}}});var require_to_absolute_index=__commonJS({"node_modules/core-js/internals/to-absolute-index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIntegerOrInfinity=require_to_integer_or_infinity(),max=Math.max,min=Math.min;module2.exports=function(index,length){var integer=toIntegerOrInfinity(index);return integer<0?max(integer+length,0):min(integer,length)}}});var require_to_length=__commonJS({"node_modules/core-js/internals/to-length.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIntegerOrInfinity=require_to_integer_or_infinity(),min=Math.min;module2.exports=function(argument){var len=toIntegerOrInfinity(argument);return len>0?min(len,9007199254740991):0}}});var require_length_of_array_like=__commonJS({"node_modules/core-js/internals/length-of-array-like.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toLength=require_to_length();module2.exports=function(obj){return toLength(obj.length)}}});var require_array_includes=__commonJS({"node_modules/core-js/internals/array-includes.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIndexedObject=require_to_indexed_object(),toAbsoluteIndex=require_to_absolute_index(),lengthOfArrayLike=require_length_of_array_like(),createMethod=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject($this),length=lengthOfArrayLike(O),index=toAbsoluteIndex(fromIndex,length),value;if(IS_INCLUDES&&el!==el){for(;length>index;)if(value=O[index++],value!==value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}};module2.exports={includes:createMethod(!0),indexOf:createMethod(!1)}}});var require_hidden_keys=__commonJS({"node_modules/core-js/internals/hidden-keys.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports={}}});var require_object_keys_internal=__commonJS({"node_modules/core-js/internals/object-keys-internal.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),hasOwn=require_has_own_property(),toIndexedObject=require_to_indexed_object(),indexOf=require_array_includes().indexOf,hiddenKeys=require_hidden_keys(),push=uncurryThis([].push);module2.exports=function(object2,names){var O=toIndexedObject(object2),i=0,result=[],key;for(key in O)!hasOwn(hiddenKeys,key)&&hasOwn(O,key)&&push(result,key);for(;names.length>i;)hasOwn(O,key=names[i++])&&(~indexOf(result,key)||push(result,key));return result}}});var require_enum_bug_keys=__commonJS({"node_modules/core-js/internals/enum-bug-keys.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}});var require_object_keys=__commonJS({"node_modules/core-js/internals/object-keys.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var internalObjectKeys=require_object_keys_internal(),enumBugKeys=require_enum_bug_keys();module2.exports=Object.keys||function(O){return internalObjectKeys(O,enumBugKeys)}}});var require_object_define_properties=__commonJS({"node_modules/core-js/internals/object-define-properties.js"(exports3){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),V8_PROTOTYPE_DEFINE_BUG=require_v8_prototype_define_bug(),definePropertyModule=require_object_define_property(),anObject=require_an_object(),toIndexedObject=require_to_indexed_object(),objectKeys=require_object_keys();exports3.f=DESCRIPTORS&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(O,Properties2){anObject(O);for(var props=toIndexedObject(Properties2),keys2=objectKeys(Properties2),length=keys2.length,index=0,key;length>index;)definePropertyModule.f(O,key=keys2[index++],props[key]);return O}}});var require_html=__commonJS({"node_modules/core-js/internals/html.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var getBuiltIn=require_get_built_in();module2.exports=getBuiltIn("document","documentElement")}});var require_shared_key=__commonJS({"node_modules/core-js/internals/shared-key.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var shared=require_shared(),uid=require_uid(),keys2=shared("keys");module2.exports=function(key){return keys2[key]||(keys2[key]=uid(key))}}});var require_object_create=__commonJS({"node_modules/core-js/internals/object-create.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var anObject=require_an_object(),definePropertiesModule=require_object_define_properties(),enumBugKeys=require_enum_bug_keys(),hiddenKeys=require_hidden_keys(),html=require_html(),documentCreateElement=require_document_create_element(),sharedKey=require_shared_key(),GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return LT+SCRIPT+GT+content+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(activeXDocument2){activeXDocument2.write(scriptTag("")),activeXDocument2.close();var temp=activeXDocument2.parentWindow.Object;return activeXDocument2=null,temp},NullProtoObjectViaIFrame=function(){var iframe=documentCreateElement("iframe"),JS="java"+SCRIPT+":",iframeDocument;return iframe.style.display="none",html.appendChild(iframe),iframe.src=String(JS),iframeDocument=iframe.contentWindow.document,iframeDocument.open(),iframeDocument.write(scriptTag("document.F=Object")),iframeDocument.close(),iframeDocument.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch{}NullProtoObject=typeof document<"u"?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var length=enumBugKeys.length;length--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];return NullProtoObject()};hiddenKeys[IE_PROTO]=!0;module2.exports=Object.create||function(O,Properties2){var result;return O!==null?(EmptyConstructor[PROTOTYPE]=anObject(O),result=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,result[IE_PROTO]=O):result=NullProtoObject(),Properties2===void 0?result:definePropertiesModule.f(result,Properties2)}}});var require_add_to_unscopables=__commonJS({"node_modules/core-js/internals/add-to-unscopables.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var wellKnownSymbol=require_well_known_symbol(),create3=require_object_create(),defineProperty2=require_object_define_property().f,UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;ArrayPrototype[UNSCOPABLES]===void 0&&defineProperty2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create3(null)});module2.exports=function(key){ArrayPrototype[UNSCOPABLES][key]=!0}}});var require_iterators=__commonJS({"node_modules/core-js/internals/iterators.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports={}}});var require_weak_map_basic_detection=__commonJS({"node_modules/core-js/internals/weak-map-basic-detection.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),isCallable=require_is_callable(),WeakMap3=global.WeakMap;module2.exports=isCallable(WeakMap3)&&/native code/.test(String(WeakMap3))}});var require_create_property_descriptor=__commonJS({"node_modules/core-js/internals/create-property-descriptor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value}}}});var require_create_non_enumerable_property=__commonJS({"node_modules/core-js/internals/create-non-enumerable-property.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),definePropertyModule=require_object_define_property(),createPropertyDescriptor=require_create_property_descriptor();module2.exports=DESCRIPTORS?function(object2,key,value){return definePropertyModule.f(object2,key,createPropertyDescriptor(1,value))}:function(object2,key,value){return object2[key]=value,object2}}});var require_internal_state=__commonJS({"node_modules/core-js/internals/internal-state.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_WEAK_MAP=require_weak_map_basic_detection(),global=require_global(),isObject3=require_is_object(),createNonEnumerableProperty=require_create_non_enumerable_property(),hasOwn=require_has_own_property(),shared=require_shared_store(),sharedKey=require_shared_key(),hiddenKeys=require_hidden_keys(),OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError2=global.TypeError,WeakMap3=global.WeakMap,set2,get10,has3,enforce=function(it){return has3(it)?get10(it):set2(it,{})},getterFor=function(TYPE){return function(it){var state4;if(!isObject3(it)||(state4=get10(it)).type!==TYPE)throw new TypeError2("Incompatible receiver, "+TYPE+" required");return state4}};NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap3),store.get=store.get,store.has=store.has,store.set=store.set,set2=function(it,metadata){if(store.has(it))throw new TypeError2(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,store.set(it,metadata),metadata},get10=function(it){return store.get(it)||{}},has3=function(it){return store.has(it)}):(STATE=sharedKey("state"),hiddenKeys[STATE]=!0,set2=function(it,metadata){if(hasOwn(it,STATE))throw new TypeError2(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get10=function(it){return hasOwn(it,STATE)?it[STATE]:{}},has3=function(it){return hasOwn(it,STATE)});var store,STATE;module2.exports={set:set2,get:get10,has:has3,enforce,getterFor}}});var require_object_property_is_enumerable=__commonJS({"node_modules/core-js/internals/object-property-is-enumerable.js"(exports3){"use strict";init_define_process_env();init_shim();var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!$propertyIsEnumerable.call({1:2},1);exports3.f=NASHORN_BUG?function(V){var descriptor=getOwnPropertyDescriptor(this,V);return!!descriptor&&descriptor.enumerable}:$propertyIsEnumerable}});var require_object_get_own_property_descriptor=__commonJS({"node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports3){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),call=require_function_call(),propertyIsEnumerableModule=require_object_property_is_enumerable(),createPropertyDescriptor=require_create_property_descriptor(),toIndexedObject=require_to_indexed_object(),toPropertyKey=require_to_property_key(),hasOwn=require_has_own_property(),IE8_DOM_DEFINE=require_ie8_dom_define(),$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;exports3.f=DESCRIPTORS?$getOwnPropertyDescriptor:function(O,P){if(O=toIndexedObject(O),P=toPropertyKey(P),IE8_DOM_DEFINE)try{return $getOwnPropertyDescriptor(O,P)}catch{}if(hasOwn(O,P))return createPropertyDescriptor(!call(propertyIsEnumerableModule.f,O,P),O[P])}}});var require_function_name=__commonJS({"node_modules/core-js/internals/function-name.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),hasOwn=require_has_own_property(),FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn(FunctionPrototype,"name"),PROPER=EXISTS&&(function(){}).name==="something",CONFIGURABLE=EXISTS&&(!DESCRIPTORS||DESCRIPTORS&&getDescriptor(FunctionPrototype,"name").configurable);module2.exports={EXISTS,PROPER,CONFIGURABLE}}});var require_inspect_source=__commonJS({"node_modules/core-js/internals/inspect-source.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),isCallable=require_is_callable(),store=require_shared_store(),functionToString=uncurryThis(Function.toString);isCallable(store.inspectSource)||(store.inspectSource=function(it){return functionToString(it)});module2.exports=store.inspectSource}});var require_make_built_in=__commonJS({"node_modules/core-js/internals/make-built-in.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),fails=require_fails(),isCallable=require_is_callable(),hasOwn=require_has_own_property(),DESCRIPTORS=require_descriptors(),CONFIGURABLE_FUNCTION_NAME=require_function_name().CONFIGURABLE,inspectSource=require_inspect_source(),InternalStateModule=require_internal_state(),enforceInternalState=InternalStateModule.enforce,getInternalState=InternalStateModule.get,$String=String,defineProperty2=Object.defineProperty,stringSlice=uncurryThis("".slice),replace=uncurryThis("".replace),join=uncurryThis([].join),CONFIGURABLE_LENGTH=DESCRIPTORS&&!fails(function(){return defineProperty2(function(){},"length",{value:8}).length!==8}),TEMPLATE=String(String).split("String"),makeBuiltIn=module2.exports=function(value,name,options){stringSlice($String(name),0,7)==="Symbol("&&(name="["+replace($String(name),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),options&&options.getter&&(name="get "+name),options&&options.setter&&(name="set "+name),(!hasOwn(value,"name")||CONFIGURABLE_FUNCTION_NAME&&value.name!==name)&&(DESCRIPTORS?defineProperty2(value,"name",{value:name,configurable:!0}):value.name=name),CONFIGURABLE_LENGTH&&options&&hasOwn(options,"arity")&&value.length!==options.arity&&defineProperty2(value,"length",{value:options.arity});try{options&&hasOwn(options,"constructor")&&options.constructor?DESCRIPTORS&&defineProperty2(value,"prototype",{writable:!1}):value.prototype&&(value.prototype=void 0)}catch{}var state4=enforceInternalState(value);return hasOwn(state4,"source")||(state4.source=join(TEMPLATE,typeof name=="string"?name:"")),value};Function.prototype.toString=makeBuiltIn(function(){return isCallable(this)&&getInternalState(this).source||inspectSource(this)},"toString")}});var require_define_built_in=__commonJS({"node_modules/core-js/internals/define-built-in.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isCallable=require_is_callable(),definePropertyModule=require_object_define_property(),makeBuiltIn=require_make_built_in(),defineGlobalProperty=require_define_global_property();module2.exports=function(O,key,value,options){options||(options={});var simple=options.enumerable,name=options.name!==void 0?options.name:key;if(isCallable(value)&&makeBuiltIn(value,name,options),options.global)simple?O[key]=value:defineGlobalProperty(key,value);else{try{options.unsafe?O[key]&&(simple=!0):delete O[key]}catch{}simple?O[key]=value:definePropertyModule.f(O,key,{value,enumerable:!1,configurable:!options.nonConfigurable,writable:!options.nonWritable})}return O}}});var require_object_get_own_property_names=__commonJS({"node_modules/core-js/internals/object-get-own-property-names.js"(exports3){"use strict";init_define_process_env();init_shim();var internalObjectKeys=require_object_keys_internal(),enumBugKeys=require_enum_bug_keys(),hiddenKeys=enumBugKeys.concat("length","prototype");exports3.f=Object.getOwnPropertyNames||function(O){return internalObjectKeys(O,hiddenKeys)}}});var require_object_get_own_property_symbols=__commonJS({"node_modules/core-js/internals/object-get-own-property-symbols.js"(exports3){"use strict";init_define_process_env();init_shim();exports3.f=Object.getOwnPropertySymbols}});var require_own_keys=__commonJS({"node_modules/core-js/internals/own-keys.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var getBuiltIn=require_get_built_in(),uncurryThis=require_function_uncurry_this(),getOwnPropertyNamesModule=require_object_get_own_property_names(),getOwnPropertySymbolsModule=require_object_get_own_property_symbols(),anObject=require_an_object(),concat=uncurryThis([].concat);module2.exports=getBuiltIn("Reflect","ownKeys")||function(it){var keys2=getOwnPropertyNamesModule.f(anObject(it)),getOwnPropertySymbols=getOwnPropertySymbolsModule.f;return getOwnPropertySymbols?concat(keys2,getOwnPropertySymbols(it)):keys2}}});var require_copy_constructor_properties=__commonJS({"node_modules/core-js/internals/copy-constructor-properties.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var hasOwn=require_has_own_property(),ownKeys2=require_own_keys(),getOwnPropertyDescriptorModule=require_object_get_own_property_descriptor(),definePropertyModule=require_object_define_property();module2.exports=function(target,source,exceptions){for(var keys2=ownKeys2(source),defineProperty2=definePropertyModule.f,getOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,i=0;i<keys2.length;i++){var key=keys2[i];!hasOwn(target,key)&&!(exceptions&&hasOwn(exceptions,key))&&defineProperty2(target,key,getOwnPropertyDescriptor(source,key))}}}});var require_is_forced=__commonJS({"node_modules/core-js/internals/is-forced.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),isCallable=require_is_callable(),replacement=/#|\.prototype\./,isForced=function(feature,detection){var value=data[normalize(feature)];return value===POLYFILL?!0:value===NATIVE?!1:isCallable(detection)?fails(detection):!!detection},normalize=isForced.normalize=function(string){return String(string).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P";module2.exports=isForced}});var require_export=__commonJS({"node_modules/core-js/internals/export.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),getOwnPropertyDescriptor=require_object_get_own_property_descriptor().f,createNonEnumerableProperty=require_create_non_enumerable_property(),defineBuiltIn=require_define_built_in(),defineGlobalProperty=require_define_global_property(),copyConstructorProperties=require_copy_constructor_properties(),isForced=require_is_forced();module2.exports=function(options,source){var TARGET=options.target,GLOBAL=options.global,STATIC=options.stat,FORCED,target,key,targetProperty,sourceProperty,descriptor;if(GLOBAL?target=global:STATIC?target=global[TARGET]||defineGlobalProperty(TARGET,{}):target=global[TARGET]&&global[TARGET].prototype,target)for(key in source){if(sourceProperty=source[key],options.dontCallGetSet?(descriptor=getOwnPropertyDescriptor(target,key),targetProperty=descriptor&&descriptor.value):targetProperty=target[key],FORCED=isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced),!FORCED&&targetProperty!==void 0){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty)}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",!0),defineBuiltIn(target,key,sourceProperty,options)}}}});var require_correct_prototype_getter=__commonJS({"node_modules/core-js/internals/correct-prototype-getter.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails();module2.exports=!fails(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})}});var require_object_get_prototype_of=__commonJS({"node_modules/core-js/internals/object-get-prototype-of.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var hasOwn=require_has_own_property(),isCallable=require_is_callable(),toObject=require_to_object(),sharedKey=require_shared_key(),CORRECT_PROTOTYPE_GETTER=require_correct_prototype_getter(),IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype;module2.exports=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(O){var object2=toObject(O);if(hasOwn(object2,IE_PROTO))return object2[IE_PROTO];var constructor=object2.constructor;return isCallable(constructor)&&object2 instanceof constructor?constructor.prototype:object2 instanceof $Object?ObjectPrototype:null}}});var require_iterators_core=__commonJS({"node_modules/core-js/internals/iterators-core.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),isCallable=require_is_callable(),isObject3=require_is_object(),create3=require_object_create(),getPrototypeOf=require_object_get_prototype_of(),defineBuiltIn=require_define_built_in(),wellKnownSymbol=require_well_known_symbol(),IS_PURE=require_is_pure(),ITERATOR=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf(getPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS=!0);var NEW_ITERATOR_PROTOTYPE=!isObject3(IteratorPrototype)||fails(function(){var test={};return IteratorPrototype[ITERATOR].call(test)!==test});NEW_ITERATOR_PROTOTYPE?IteratorPrototype={}:IS_PURE&&(IteratorPrototype=create3(IteratorPrototype));isCallable(IteratorPrototype[ITERATOR])||defineBuiltIn(IteratorPrototype,ITERATOR,function(){return this});module2.exports={IteratorPrototype,BUGGY_SAFARI_ITERATORS}}});var require_set_to_string_tag=__commonJS({"node_modules/core-js/internals/set-to-string-tag.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var defineProperty2=require_object_define_property().f,hasOwn=require_has_own_property(),wellKnownSymbol=require_well_known_symbol(),TO_STRING_TAG=wellKnownSymbol("toStringTag");module2.exports=function(target,TAG,STATIC){target&&!STATIC&&(target=target.prototype),target&&!hasOwn(target,TO_STRING_TAG)&&defineProperty2(target,TO_STRING_TAG,{configurable:!0,value:TAG})}}});var require_iterator_create_constructor=__commonJS({"node_modules/core-js/internals/iterator-create-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var IteratorPrototype=require_iterators_core().IteratorPrototype,create3=require_object_create(),createPropertyDescriptor=require_create_property_descriptor(),setToStringTag=require_set_to_string_tag(),Iterators=require_iterators(),returnThis=function(){return this};module2.exports=function(IteratorConstructor,NAME,next,ENUMERABLE_NEXT){var TO_STRING_TAG=NAME+" Iterator";return IteratorConstructor.prototype=create3(IteratorPrototype,{next:createPropertyDescriptor(+!ENUMERABLE_NEXT,next)}),setToStringTag(IteratorConstructor,TO_STRING_TAG,!1,!0),Iterators[TO_STRING_TAG]=returnThis,IteratorConstructor}}});var require_function_uncurry_this_accessor=__commonJS({"node_modules/core-js/internals/function-uncurry-this-accessor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),aCallable=require_a_callable();module2.exports=function(object2,key,method){try{return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object2,key)[method]))}catch{}}}});var require_is_possible_prototype=__commonJS({"node_modules/core-js/internals/is-possible-prototype.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isObject3=require_is_object();module2.exports=function(argument){return isObject3(argument)||argument===null}}});var require_a_possible_prototype=__commonJS({"node_modules/core-js/internals/a-possible-prototype.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isPossiblePrototype=require_is_possible_prototype(),$String=String,$TypeError=TypeError;module2.exports=function(argument){if(isPossiblePrototype(argument))return argument;throw new $TypeError("Can't set "+$String(argument)+" as a prototype")}}});var require_object_set_prototype_of=__commonJS({"node_modules/core-js/internals/object-set-prototype-of.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThisAccessor=require_function_uncurry_this_accessor(),anObject=require_an_object(),aPossiblePrototype=require_a_possible_prototype();module2.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var CORRECT_SETTER=!1,test={},setter;try{setter=uncurryThisAccessor(Object.prototype,"__proto__","set"),setter(test,[]),CORRECT_SETTER=test instanceof Array}catch{}return function(O,proto){return anObject(O),aPossiblePrototype(proto),CORRECT_SETTER?setter(O,proto):O.__proto__=proto,O}}():void 0)}});var require_iterator_define=__commonJS({"node_modules/core-js/internals/iterator-define.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $2=require_export(),call=require_function_call(),IS_PURE=require_is_pure(),FunctionName=require_function_name(),isCallable=require_is_callable(),createIteratorConstructor=require_iterator_create_constructor(),getPrototypeOf=require_object_get_prototype_of(),setPrototypeOf=require_object_set_prototype_of(),setToStringTag=require_set_to_string_tag(),createNonEnumerableProperty=require_create_non_enumerable_property(),defineBuiltIn=require_define_built_in(),wellKnownSymbol=require_well_known_symbol(),Iterators=require_iterators(),IteratorsCore=require_iterators_core(),PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this};module2.exports=function(Iterable,NAME,IteratorConstructor,next,DEFAULT,IS_SET,FORCED){createIteratorConstructor(IteratorConstructor,NAME,next);var getIterationMethod=function(KIND){if(KIND===DEFAULT&&defaultIterator)return defaultIterator;if(!BUGGY_SAFARI_ITERATORS&&KIND&&KIND in IterablePrototype)return IterablePrototype[KIND];switch(KIND){case KEYS:return function(){return new IteratorConstructor(this,KIND)};case VALUES:return function(){return new IteratorConstructor(this,KIND)};case ENTRIES:return function(){return new IteratorConstructor(this,KIND)}}return function(){return new IteratorConstructor(this)}},TO_STRING_TAG=NAME+" Iterator",INCORRECT_VALUES_NAME=!1,IterablePrototype=Iterable.prototype,nativeIterator=IterablePrototype[ITERATOR]||IterablePrototype["@@iterator"]||DEFAULT&&IterablePrototype[DEFAULT],defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT),anyNativeIterator=NAME==="Array"&&IterablePrototype.entries||nativeIterator,CurrentIteratorPrototype,methods3,KEY;if(anyNativeIterator&&(CurrentIteratorPrototype=getPrototypeOf(anyNativeIterator.call(new Iterable)),CurrentIteratorPrototype!==Object.prototype&&CurrentIteratorPrototype.next&&(!IS_PURE&&getPrototypeOf(CurrentIteratorPrototype)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(CurrentIteratorPrototype,IteratorPrototype):isCallable(CurrentIteratorPrototype[ITERATOR])||defineBuiltIn(CurrentIteratorPrototype,ITERATOR,returnThis)),setToStringTag(CurrentIteratorPrototype,TO_STRING_TAG,!0,!0),IS_PURE&&(Iterators[TO_STRING_TAG]=returnThis))),PROPER_FUNCTION_NAME&&DEFAULT===VALUES&&nativeIterator&&nativeIterator.name!==VALUES&&(!IS_PURE&&CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty(IterablePrototype,"name",VALUES):(INCORRECT_VALUES_NAME=!0,defaultIterator=function(){return call(nativeIterator,this)})),DEFAULT)if(methods3={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)},FORCED)for(KEY in methods3)(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype))&&defineBuiltIn(IterablePrototype,KEY,methods3[KEY]);else $2({target:NAME,proto:!0,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods3);return(!IS_PURE||FORCED)&&IterablePrototype[ITERATOR]!==defaultIterator&&defineBuiltIn(IterablePrototype,ITERATOR,defaultIterator,{name:DEFAULT}),Iterators[NAME]=defaultIterator,methods3}}});var require_create_iter_result_object=__commonJS({"node_modules/core-js/internals/create-iter-result-object.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function(value,done){return{value,done}}}});var require_es_array_iterator=__commonJS({"node_modules/core-js/modules/es.array.iterator.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIndexedObject=require_to_indexed_object(),addToUnscopables=require_add_to_unscopables(),Iterators=require_iterators(),InternalStateModule=require_internal_state(),defineProperty2=require_object_define_property().f,defineIterator=require_iterator_define(),createIterResultObject=require_create_iter_result_object(),IS_PURE=require_is_pure(),DESCRIPTORS=require_descriptors(),ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR);module2.exports=defineIterator(Array,"Array",function(iterated,kind){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(iterated),index:0,kind})},function(){var state4=getInternalState(this),target=state4.target,index=state4.index++;if(!target||index>=target.length)return state4.target=void 0,createIterResultObject(void 0,!0);switch(state4.kind){case"keys":return createIterResultObject(index,!1);case"values":return createIterResultObject(target[index],!1)}return createIterResultObject([index,target[index]],!1)},"values");var values=Iterators.Arguments=Iterators.Array;addToUnscopables("keys");addToUnscopables("values");addToUnscopables("entries");if(!IS_PURE&&DESCRIPTORS&&values.name!=="values")try{defineProperty2(values,"name",{value:"values"})}catch{}}});var require_web_dom_collections_iterator=__commonJS({"node_modules/core-js/modules/web.dom-collections.iterator.js"(){"use strict";init_define_process_env();init_shim();var global=require_global(),DOMIterables=require_dom_iterables(),DOMTokenListPrototype=require_dom_token_list_prototype(),ArrayIteratorMethods=require_es_array_iterator(),createNonEnumerableProperty=require_create_non_enumerable_property(),setToStringTag=require_set_to_string_tag(),wellKnownSymbol=require_well_known_symbol(),ITERATOR=wellKnownSymbol("iterator"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(CollectionPrototype,COLLECTION_NAME2){if(CollectionPrototype){if(CollectionPrototype[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch{CollectionPrototype[ITERATOR]=ArrayValues}if(setToStringTag(CollectionPrototype,COLLECTION_NAME2,!0),DOMIterables[COLLECTION_NAME2]){for(var METHOD_NAME in ArrayIteratorMethods)if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME])}catch{CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME]}}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global[COLLECTION_NAME]&&global[COLLECTION_NAME].prototype,COLLECTION_NAME);var COLLECTION_NAME;handlePrototype(DOMTokenListPrototype,"DOMTokenList")}});var require_function_apply=__commonJS({"node_modules/core-js/internals/function-apply.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_BIND=require_function_bind_native(),FunctionPrototype=Function.prototype,apply=FunctionPrototype.apply,call=FunctionPrototype.call;module2.exports=typeof Reflect=="object"&&Reflect.apply||(NATIVE_BIND?call.bind(apply):function(){return call.apply(apply,arguments)})}});var require_function_uncurry_this_clause=__commonJS({"node_modules/core-js/internals/function-uncurry-this-clause.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var classofRaw=require_classof_raw(),uncurryThis=require_function_uncurry_this();module2.exports=function(fn){if(classofRaw(fn)==="Function")return uncurryThis(fn)}}});var require_function_bind_context=__commonJS({"node_modules/core-js/internals/function-bind-context.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this_clause(),aCallable=require_a_callable(),NATIVE_BIND=require_function_bind_native(),bind=uncurryThis(uncurryThis.bind);module2.exports=function(fn,that){return aCallable(fn),that===void 0?fn:NATIVE_BIND?bind(fn,that):function(){return fn.apply(that,arguments)}}}});var require_array_slice=__commonJS({"node_modules/core-js/internals/array-slice.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this();module2.exports=uncurryThis([].slice)}});var require_validate_arguments_length=__commonJS({"node_modules/core-js/internals/validate-arguments-length.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $TypeError=TypeError;module2.exports=function(passed,required){if(passed<required)throw new $TypeError("Not enough arguments");return passed}}});var require_engine_is_ios=__commonJS({"node_modules/core-js/internals/engine-is-ios.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var userAgent=require_engine_user_agent();module2.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent)}});var require_engine_is_node=__commonJS({"node_modules/core-js/internals/engine-is-node.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),classof=require_classof_raw();module2.exports=classof(global.process)==="process"}});var require_task=__commonJS({"node_modules/core-js/internals/task.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),apply=require_function_apply(),bind=require_function_bind_context(),isCallable=require_is_callable(),hasOwn=require_has_own_property(),fails=require_fails(),html=require_html(),arraySlice=require_array_slice(),createElement3=require_document_create_element(),validateArgumentsLength=require_validate_arguments_length(),IS_IOS=require_engine_is_ios(),IS_NODE=require_engine_is_node(),set2=global.setImmediate,clear=global.clearImmediate,process2=global.process,Dispatch=global.Dispatch,Function2=global.Function,MessageChannel2=global.MessageChannel,String2=global.String,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",$location,defer,channel,port;fails(function(){$location=global.location});var run=function(id){if(hasOwn(queue,id)){var fn=queue[id];delete queue[id],fn()}},runner=function(id){return function(){run(id)}},eventListener=function(event){run(event.data)},globalPostMessageDefer=function(id){global.postMessage(String2(id),$location.protocol+"//"+$location.host)};(!set2||!clear)&&(set2=function(handler){validateArgumentsLength(arguments.length,1);var fn=isCallable(handler)?handler:Function2(handler),args=arraySlice(arguments,1);return queue[++counter]=function(){apply(fn,void 0,args)},defer(counter),counter},clear=function(id){delete queue[id]},IS_NODE?defer=function(id){process2.nextTick(runner(id))}:Dispatch&&Dispatch.now?defer=function(id){Dispatch.now(runner(id))}:MessageChannel2&&!IS_IOS?(channel=new MessageChannel2,port=channel.port2,channel.port1.onmessage=eventListener,defer=bind(port.postMessage,port)):global.addEventListener&&isCallable(global.postMessage)&&!global.importScripts&&$location&&$location.protocol!=="file:"&&!fails(globalPostMessageDefer)?(defer=globalPostMessageDefer,global.addEventListener("message",eventListener,!1)):ONREADYSTATECHANGE in createElement3("script")?defer=function(id){html.appendChild(createElement3("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(id)}}:defer=function(id){setTimeout(runner(id),0)});module2.exports={set:set2,clear}}});var require_web_clear_immediate=__commonJS({"node_modules/core-js/modules/web.clear-immediate.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),global=require_global(),clearImmediate=require_task().clear;$2({global:!0,bind:!0,enumerable:!0,forced:global.clearImmediate!==clearImmediate},{clearImmediate})}});var require_engine_is_bun=__commonJS({"node_modules/core-js/internals/engine-is-bun.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"}});var require_schedulers_fix=__commonJS({"node_modules/core-js/internals/schedulers-fix.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),apply=require_function_apply(),isCallable=require_is_callable(),ENGINE_IS_BUN=require_engine_is_bun(),USER_AGENT=require_engine_user_agent(),arraySlice=require_array_slice(),validateArgumentsLength=require_validate_arguments_length(),Function2=global.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var version2=global.Bun.version.split(".");return version2.length<3||version2[0]==="0"&&(version2[1]<3||version2[1]==="3"&&version2[2]==="0")}();module2.exports=function(scheduler,hasTimeArg){var firstParamIndex=hasTimeArg?2:1;return WRAP?function(handler,timeout){var boundArgs=validateArgumentsLength(arguments.length,1)>firstParamIndex,fn=isCallable(handler)?handler:Function2(handler),params=boundArgs?arraySlice(arguments,firstParamIndex):[],callback=boundArgs?function(){apply(fn,this,params)}:fn;return hasTimeArg?scheduler(callback,timeout):scheduler(callback)}:scheduler}}});var require_web_set_immediate=__commonJS({"node_modules/core-js/modules/web.set-immediate.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),global=require_global(),setTask=require_task().set,schedulersFix=require_schedulers_fix(),setImmediate2=global.setImmediate?schedulersFix(setTask,!1):setTask;$2({global:!0,bind:!0,enumerable:!0,forced:global.setImmediate!==setImmediate2},{setImmediate:setImmediate2})}});var require_web_immediate=__commonJS({"node_modules/core-js/modules/web.immediate.js"(){"use strict";init_define_process_env();init_shim();require_web_clear_immediate();require_web_set_immediate()}});var require_proxy_accessor=__commonJS({"node_modules/core-js/internals/proxy-accessor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var defineProperty2=require_object_define_property().f;module2.exports=function(Target,Source,key){key in Target||defineProperty2(Target,key,{configurable:!0,get:function(){return Source[key]},set:function(it){Source[key]=it}})}}});var require_inherit_if_required=__commonJS({"node_modules/core-js/internals/inherit-if-required.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isCallable=require_is_callable(),isObject3=require_is_object(),setPrototypeOf=require_object_set_prototype_of();module2.exports=function($this,dummy,Wrapper){var NewTarget,NewTargetPrototype;return setPrototypeOf&&isCallable(NewTarget=dummy.constructor)&&NewTarget!==Wrapper&&isObject3(NewTargetPrototype=NewTarget.prototype)&&NewTargetPrototype!==Wrapper.prototype&&setPrototypeOf($this,NewTargetPrototype),$this}}});var require_to_string_tag_support=__commonJS({"node_modules/core-js/internals/to-string-tag-support.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var wellKnownSymbol=require_well_known_symbol(),TO_STRING_TAG=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG]="z";module2.exports=String(test)==="[object z]"}});var require_classof=__commonJS({"node_modules/core-js/internals/classof.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var TO_STRING_TAG_SUPPORT=require_to_string_tag_support(),isCallable=require_is_callable(),classofRaw=require_classof_raw(),wellKnownSymbol=require_well_known_symbol(),TO_STRING_TAG=wellKnownSymbol("toStringTag"),$Object=Object,CORRECT_ARGUMENTS=classofRaw(function(){return arguments}())==="Arguments",tryGet=function(it,key){try{return it[key]}catch{}};module2.exports=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return it===void 0?"Undefined":it===null?"Null":typeof(tag=tryGet(O=$Object(it),TO_STRING_TAG))=="string"?tag:CORRECT_ARGUMENTS?classofRaw(O):(result=classofRaw(O))==="Object"&&isCallable(O.callee)?"Arguments":result}}});var require_to_string=__commonJS({"node_modules/core-js/internals/to-string.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var classof=require_classof(),$String=String;module2.exports=function(argument){if(classof(argument)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return $String(argument)}}});var require_normalize_string_argument=__commonJS({"node_modules/core-js/internals/normalize-string-argument.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toString2=require_to_string();module2.exports=function(argument,$default){return argument===void 0?arguments.length<2?"":$default:toString2(argument)}}});var require_install_error_cause=__commonJS({"node_modules/core-js/internals/install-error-cause.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isObject3=require_is_object(),createNonEnumerableProperty=require_create_non_enumerable_property();module2.exports=function(O,options){isObject3(options)&&"cause"in options&&createNonEnumerableProperty(O,"cause",options.cause)}}});var require_error_stack_clear=__commonJS({"node_modules/core-js/internals/error-stack-clear.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),$Error=Error,replace=uncurryThis("".replace),TEST=function(arg){return String(new $Error(arg).stack)}("zxcasd"),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST);module2.exports=function(stack,dropEntries){if(IS_V8_OR_CHAKRA_STACK&&typeof stack=="string"&&!$Error.prepareStackTrace)for(;dropEntries--;)stack=replace(stack,V8_OR_CHAKRA_STACK_ENTRY,"");return stack}}});var require_error_stack_installable=__commonJS({"node_modules/core-js/internals/error-stack-installable.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),createPropertyDescriptor=require_create_property_descriptor();module2.exports=!fails(function(){var error2=new Error("a");return"stack"in error2?(Object.defineProperty(error2,"stack",createPropertyDescriptor(1,7)),error2.stack!==7):!0})}});var require_error_stack_install=__commonJS({"node_modules/core-js/internals/error-stack-install.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var createNonEnumerableProperty=require_create_non_enumerable_property(),clearErrorStack=require_error_stack_clear(),ERROR_STACK_INSTALLABLE=require_error_stack_installable(),captureStackTrace=Error.captureStackTrace;module2.exports=function(error2,C,stack,dropEntries){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(error2,C):createNonEnumerableProperty(error2,"stack",clearErrorStack(stack,dropEntries)))}}});var require_wrap_error_constructor_with_cause=__commonJS({"node_modules/core-js/internals/wrap-error-constructor-with-cause.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var getBuiltIn=require_get_built_in(),hasOwn=require_has_own_property(),createNonEnumerableProperty=require_create_non_enumerable_property(),isPrototypeOf=require_object_is_prototype_of(),setPrototypeOf=require_object_set_prototype_of(),copyConstructorProperties=require_copy_constructor_properties(),proxyAccessor=require_proxy_accessor(),inheritIfRequired=require_inherit_if_required(),normalizeStringArgument=require_normalize_string_argument(),installErrorCause=require_install_error_cause(),installErrorStack=require_error_stack_install(),DESCRIPTORS=require_descriptors(),IS_PURE=require_is_pure();module2.exports=function(FULL_NAME,wrapper,FORCED,IS_AGGREGATE_ERROR){var STACK_TRACE_LIMIT="stackTraceLimit",OPTIONS_POSITION=IS_AGGREGATE_ERROR?2:1,path=FULL_NAME.split("."),ERROR_NAME=path[path.length-1],OriginalError=getBuiltIn.apply(null,path);if(OriginalError){var OriginalErrorPrototype=OriginalError.prototype;if(!IS_PURE&&hasOwn(OriginalErrorPrototype,"cause")&&delete OriginalErrorPrototype.cause,!FORCED)return OriginalError;var BaseError=getBuiltIn("Error"),WrappedError=wrapper(function(a,b){var message=normalizeStringArgument(IS_AGGREGATE_ERROR?b:a,void 0),result=IS_AGGREGATE_ERROR?new OriginalError(a):new OriginalError;return message!==void 0&&createNonEnumerableProperty(result,"message",message),installErrorStack(result,WrappedError,result.stack,2),this&&isPrototypeOf(OriginalErrorPrototype,this)&&inheritIfRequired(result,this,WrappedError),arguments.length>OPTIONS_POSITION&&installErrorCause(result,arguments[OPTIONS_POSITION]),result});if(WrappedError.prototype=OriginalErrorPrototype,ERROR_NAME!=="Error"?setPrototypeOf?setPrototypeOf(WrappedError,BaseError):copyConstructorProperties(WrappedError,BaseError,{name:!0}):DESCRIPTORS&&STACK_TRACE_LIMIT in OriginalError&&(proxyAccessor(WrappedError,OriginalError,STACK_TRACE_LIMIT),proxyAccessor(WrappedError,OriginalError,"prepareStackTrace")),copyConstructorProperties(WrappedError,OriginalError),!IS_PURE)try{OriginalErrorPrototype.name!==ERROR_NAME&&createNonEnumerableProperty(OriginalErrorPrototype,"name",ERROR_NAME),OriginalErrorPrototype.constructor=WrappedError}catch{}return WrappedError}}}});var require_es_error_cause=__commonJS({"node_modules/core-js/modules/es.error.cause.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),global=require_global(),apply=require_function_apply(),wrapErrorConstructorWithCause=require_wrap_error_constructor_with_cause(),WEB_ASSEMBLY="WebAssembly",WebAssembly=global[WEB_ASSEMBLY],FORCED=new Error("e",{cause:7}).cause!==7,exportGlobalErrorCauseWrapper=function(ERROR_NAME,wrapper){var O={};O[ERROR_NAME]=wrapErrorConstructorWithCause(ERROR_NAME,wrapper,FORCED),$2({global:!0,constructor:!0,arity:1,forced:FORCED},O)},exportWebAssemblyErrorCauseWrapper=function(ERROR_NAME,wrapper){if(WebAssembly&&WebAssembly[ERROR_NAME]){var O={};O[ERROR_NAME]=wrapErrorConstructorWithCause(WEB_ASSEMBLY+"."+ERROR_NAME,wrapper,FORCED),$2({target:WEB_ASSEMBLY,stat:!0,constructor:!0,arity:1,forced:FORCED},O)}};exportGlobalErrorCauseWrapper("Error",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("EvalError",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("RangeError",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("ReferenceError",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("SyntaxError",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("TypeError",function(init5){return function(message){return apply(init5,this,arguments)}});exportGlobalErrorCauseWrapper("URIError",function(init5){return function(message){return apply(init5,this,arguments)}});exportWebAssemblyErrorCauseWrapper("CompileError",function(init5){return function(message){return apply(init5,this,arguments)}});exportWebAssemblyErrorCauseWrapper("LinkError",function(init5){return function(message){return apply(init5,this,arguments)}});exportWebAssemblyErrorCauseWrapper("RuntimeError",function(init5){return function(message){return apply(init5,this,arguments)}})}});var require_es_errors=__commonJS({"node_modules/es-errors/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=Error}});var require_eval=__commonJS({"node_modules/es-errors/eval.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=EvalError}});var require_range=__commonJS({"node_modules/es-errors/range.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=RangeError}});var require_ref=__commonJS({"node_modules/es-errors/ref.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=ReferenceError}});var require_syntax=__commonJS({"node_modules/es-errors/syntax.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=SyntaxError}});var require_type=__commonJS({"node_modules/es-errors/type.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=TypeError}});var require_uri=__commonJS({"node_modules/es-errors/uri.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=URIError}});var require_shams=__commonJS({"node_modules/has-symbols/shams.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if(typeof sym=="string"||Object.prototype.toString.call(sym)!=="[object Symbol]"||Object.prototype.toString.call(symObj)!=="[object Symbol]")return!1;var symVal=42;obj[sym]=symVal;for(sym in obj)return!1;if(typeof Object.keys=="function"&&Object.keys(obj).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(obj).length!==0)return!1;var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym||!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==!0)return!1}return!0}}});var require_has_symbols=__commonJS({"node_modules/has-symbols/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=require_shams();module2.exports=function(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()}}});var require_has_proto=__commonJS({"node_modules/has-proto/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var test={foo:{}},$Object=Object;module2.exports=function(){return{__proto__:test}.foo===test.foo&&!({__proto__:null}instanceof $Object)}}});var require_implementation=__commonJS({"node_modules/function-bind/implementation.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr2=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function(a,b){for(var arr=[],i=0;i<a.length;i+=1)arr[i]=a[i];for(var j2=0;j2<b.length;j2+=1)arr[j2+a.length]=b[j2];return arr},slicy=function(arrLike,offset){for(var arr=[],i=offset||0,j2=0;i<arrLike.length;i+=1,j2+=1)arr[j2]=arrLike[i];return arr},joiny=function(arr,joiner){for(var str="",i=0;i<arr.length;i+=1)str+=arr[i],i+1<arr.length&&(str+=joiner);return str};module2.exports=function(that){var target=this;if(typeof target!="function"||toStr2.apply(target)!==funcType)throw new TypeError(ERROR_MESSAGE+target);for(var args=slicy(arguments,1),bound,binder=function(){if(this instanceof bound){var result=target.apply(this,concatty(args,arguments));return Object(result)===result?result:this}return target.apply(that,concatty(args,arguments))},boundLength=max(0,target.length-args.length),boundArgs=[],i=0;i<boundLength;i++)boundArgs[i]="$"+i;if(bound=Function("binder","return function ("+joiny(boundArgs,",")+"){ return binder.apply(this,arguments); }")(binder),target.prototype){var Empty2=function(){};Empty2.prototype=target.prototype,bound.prototype=new Empty2,Empty2.prototype=null}return bound}}});var require_function_bind=__commonJS({"node_modules/function-bind/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var implementation=require_implementation();module2.exports=Function.prototype.bind||implementation}});var require_hasown=__commonJS({"node_modules/hasown/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require_function_bind();module2.exports=bind.call(call,$hasOwn)}});var require_get_intrinsic=__commonJS({"node_modules/get-intrinsic/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var undefined2,$Error=require_es_errors(),$EvalError=require_eval(),$RangeError=require_range(),$ReferenceError=require_ref(),$SyntaxError=require_syntax(),$TypeError=require_type(),$URIError=require_uri(),$Function=Function,getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch{}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch{$gOPD=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=require_has_symbols()(),hasProto=require_has_proto()(),getProto=Object.getPrototypeOf||(hasProto?function(x){return x.__proto__}:null),needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto?undefined2:getProto(Uint8Array),INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?undefined2:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined2:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined2,"%AsyncFromSyncIteratorPrototype%":undefined2,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined2:Atomics,"%BigInt%":typeof BigInt>"u"?undefined2:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined2:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined2:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined2:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined2:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined2:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined2:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined2:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined2:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined2:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined2,"%JSON%":typeof JSON=="object"?JSON:undefined2,"%Map%":typeof Map>"u"?undefined2:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto?undefined2:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined2:Promise,"%Proxy%":typeof Proxy>"u"?undefined2:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined2:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined2:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto?undefined2:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined2:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined2,"%Symbol%":hasSymbols?Symbol:undefined2,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array>"u"?undefined2:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined2:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined2:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined2:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap>"u"?undefined2:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined2:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined2:WeakSet};if(getProto)try{null.error}catch(e){errorProto=getProto(getProto(e)),INTRINSICS["%Error.prototype%"]=errorProto}var errorProto,doEval=function doEval2(name){var value;if(name==="%AsyncFunction%")value=getEvalledConstructor("async function () {}");else if(name==="%GeneratorFunction%")value=getEvalledConstructor("function* () {}");else if(name==="%AsyncGeneratorFunction%")value=getEvalledConstructor("async function* () {}");else if(name==="%AsyncGenerator%"){var fn=doEval2("%AsyncGeneratorFunction%");fn&&(value=fn.prototype)}else if(name==="%AsyncIteratorPrototype%"){var gen=doEval2("%AsyncGenerator%");gen&&getProto&&(value=getProto(gen.prototype))}return INTRINSICS[name]=value,value},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require_function_bind(),hasOwn=require_hasown(),$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),rePropName2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar2=/\\(\\)?/g,stringToPath2=function(string){var first=$strSlice(string,0,1),last2=$strSlice(string,-1);if(first==="%"&&last2!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(last2==="%"&&first!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var result=[];return $replace(string,rePropName2,function(match,number2,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar2,"$1"):number2||match}),result},getBaseIntrinsic=function(name,allowMissing){var intrinsicName=name,alias;if(hasOwn(LEGACY_ALIASES,intrinsicName)&&(alias=LEGACY_ALIASES[intrinsicName],intrinsicName="%"+alias[0]+"%"),hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval&&(value=doEval(intrinsicName)),typeof value>"u"&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return{alias,name:intrinsicName,value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module2.exports=function(name,allowMissing){if(typeof name!="string"||name.length===0)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof allowMissing!="boolean")throw new $TypeError('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,name)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var parts=stringToPath2(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i<parts.length;i+=1){var part=parts[i],first=$strSlice(part,0,1),last2=$strSlice(part,-1);if((first==='"'||first==="'"||first==="`"||last2==='"'||last2==="'"||last2==="`")&&first!==last2)throw new $SyntaxError("property names with quotes must have matching quotes");if((part==="constructor"||!isOwn)&&(skipFurtherCaching=!0),intrinsicBaseName+="."+part,intrinsicRealName="%"+intrinsicBaseName+"%",hasOwn(INTRINSICS,intrinsicRealName))value=INTRINSICS[intrinsicRealName];else if(value!=null){if(!(part in value)){if(!allowMissing)throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.");return}if($gOPD&&i+1>=parts.length){var desc=$gOPD(value,part);isOwn=!!desc,isOwn&&"get"in desc&&!("originalValue"in desc.get)?value=desc.get:value=value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}}});var require_es_define_property=__commonJS({"node_modules/es-define-property/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var GetIntrinsic=require_get_intrinsic(),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0)||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch{$defineProperty=!1}module2.exports=$defineProperty}});var require_gopd=__commonJS({"node_modules/gopd/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var GetIntrinsic=require_get_intrinsic(),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0);if($gOPD)try{$gOPD([],"length")}catch{$gOPD=null}module2.exports=$gOPD}});var require_define_data_property=__commonJS({"node_modules/define-data-property/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $defineProperty=require_es_define_property(),$SyntaxError=require_syntax(),$TypeError=require_type(),gopd=require_gopd();module2.exports=function(obj,property2,value){if(!obj||typeof obj!="object"&&typeof obj!="function")throw new $TypeError("`obj` must be an object or a function`");if(typeof property2!="string"&&typeof property2!="symbol")throw new $TypeError("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $TypeError("`loose`, if provided, must be a boolean");var nonEnumerable=arguments.length>3?arguments[3]:null,nonWritable=arguments.length>4?arguments[4]:null,nonConfigurable=arguments.length>5?arguments[5]:null,loose=arguments.length>6?arguments[6]:!1,desc=!!gopd&&gopd(obj,property2);if($defineProperty)$defineProperty(obj,property2,{configurable:nonConfigurable===null&&desc?desc.configurable:!nonConfigurable,enumerable:nonEnumerable===null&&desc?desc.enumerable:!nonEnumerable,value,writable:nonWritable===null&&desc?desc.writable:!nonWritable});else if(loose||!nonEnumerable&&!nonWritable&&!nonConfigurable)obj[property2]=value;else throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}});var require_has_property_descriptors=__commonJS({"node_modules/has-property-descriptors/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $defineProperty=require_es_define_property(),hasPropertyDescriptors=function(){return!!$defineProperty};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty)return null;try{return $defineProperty([],"length",{value:1}).length!==1}catch{return!0}};module2.exports=hasPropertyDescriptors}});var require_set_function_length=__commonJS({"node_modules/set-function-length/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var GetIntrinsic=require_get_intrinsic(),define2=require_define_data_property(),hasDescriptors=require_has_property_descriptors()(),gOPD=require_gopd(),$TypeError=require_type(),$floor=GetIntrinsic("%Math.floor%");module2.exports=function(fn,length){if(typeof fn!="function")throw new $TypeError("`fn` is not a function");if(typeof length!="number"||length<0||length>4294967295||$floor(length)!==length)throw new $TypeError("`length` must be a positive 32-bit integer");var loose=arguments.length>2&&!!arguments[2],functionLengthIsConfigurable=!0,functionLengthIsWritable=!0;if("length"in fn&&gOPD){var desc=gOPD(fn,"length");desc&&!desc.configurable&&(functionLengthIsConfigurable=!1),desc&&!desc.writable&&(functionLengthIsWritable=!1)}return(functionLengthIsConfigurable||functionLengthIsWritable||!loose)&&(hasDescriptors?define2(fn,"length",length,!0,!0):define2(fn,"length",length)),fn}}});var require_call_bind=__commonJS({"node_modules/call-bind/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var bind=require_function_bind(),GetIntrinsic=require_get_intrinsic(),setFunctionLength=require_set_function_length(),$TypeError=require_type(),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$defineProperty=require_es_define_property(),$max=GetIntrinsic("%Math.max%");module2.exports=function(originalFunction){if(typeof originalFunction!="function")throw new $TypeError("a function is required");var func=$reflectApply(bind,$call,arguments);return setFunctionLength(func,1+$max(0,originalFunction.length-(arguments.length-1)),!0)};var applyBind=function(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module2.exports,"apply",{value:applyBind}):module2.exports.apply=applyBind}});var require_callBound=__commonJS({"node_modules/call-bind/callBound.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var GetIntrinsic=require_get_intrinsic(),callBind=require_call_bind(),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module2.exports=function(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return typeof intrinsic=="function"&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic}}});var require_is_arguments=__commonJS({"node_modules/is-arguments/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var hasToStringTag=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",callBound=require_callBound(),$toString=callBound("Object.prototype.toString"),isStandardArguments=function(value){return hasToStringTag&&value&&typeof value=="object"&&Symbol.toStringTag in value?!1:$toString(value)==="[object Arguments]"},isLegacyArguments=function(value){return isStandardArguments(value)?!0:value!==null&&typeof value=="object"&&typeof value.length=="number"&&value.length>=0&&$toString(value)!=="[object Array]"&&$toString(value.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;module2.exports=supportsStandardArguments?isStandardArguments:isLegacyArguments}});var require_shams2=__commonJS({"node_modules/has-tostringtag/shams.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var hasSymbols=require_shams();module2.exports=function(){return hasSymbols()&&!!Symbol.toStringTag}}});var require_is_generator_function=__commonJS({"node_modules/is-generator-function/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toStr2=Object.prototype.toString,fnToStr=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag=require_shams2()(),getProto=Object.getPrototypeOf,getGeneratorFunc=function(){if(!hasToStringTag)return!1;try{return Function("return function*() {}")()}catch{}},GeneratorFunction;module2.exports=function(fn){if(typeof fn!="function")return!1;if(isFnRegex.test(fnToStr.call(fn)))return!0;if(!hasToStringTag){var str=toStr2.call(fn);return str==="[object GeneratorFunction]"}if(!getProto)return!1;if(typeof GeneratorFunction>"u"){var generatorFunc=getGeneratorFunc();GeneratorFunction=generatorFunc?getProto(generatorFunc):!1}return getProto(fn)===GeneratorFunction}}});var require_is_callable2=__commonJS({"node_modules/is-callable/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var 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(_){_!==isCallableMarker&&(reflectApply=null)}else reflectApply=null;var constructorRegex=/^\s*class\b/,isES6ClassFn=function(value){try{var fnStr=fnToStr.call(value);return constructorRegex.test(fnStr)}catch{return!1}},tryFunctionObject=function(value){try{return isES6ClassFn(value)?!1:(fnToStr.call(value),!0)}catch{return!1}},toStr2=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=typeof Symbol=="function"&&!!Symbol.toStringTag,isIE68=!(0 in[,]),isDDA=function(){return!1};typeof document=="object"&&(all4=document.all,toStr2.call(all4)===toStr2.call(document.all)&&(isDDA=function(value){if((isIE68||!value)&&(typeof value>"u"||typeof value=="object"))try{var str=toStr2.call(value);return(str===ddaClass||str===ddaClass2||str===ddaClass3||str===objectClass)&&value("")==null}catch{}return!1}));var all4;module2.exports=reflectApply?function(value){if(isDDA(value))return!0;if(!value||typeof value!="function"&&typeof value!="object")return!1;try{reflectApply(value,null,badArrayLike)}catch(e){if(e!==isCallableMarker)return!1}return!isES6ClassFn(value)&&tryFunctionObject(value)}:function(value){if(isDDA(value))return!0;if(!value||typeof value!="function"&&typeof value!="object")return!1;if(hasToStringTag)return tryFunctionObject(value);if(isES6ClassFn(value))return!1;var strClass=toStr2.call(value);return strClass!==fnClass&&strClass!==genClass&&!/^\[object HTML/.test(strClass)?!1:tryFunctionObject(value)}}});var require_for_each=__commonJS({"node_modules/for-each/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isCallable=require_is_callable2(),toStr2=Object.prototype.toString,hasOwnProperty10=Object.prototype.hasOwnProperty,forEachArray=function(array,iterator,receiver){for(var i=0,len=array.length;i<len;i++)hasOwnProperty10.call(array,i)&&(receiver==null?iterator(array[i],i,array):iterator.call(receiver,array[i],i,array))},forEachString=function(string,iterator,receiver){for(var i=0,len=string.length;i<len;i++)receiver==null?iterator(string.charAt(i),i,string):iterator.call(receiver,string.charAt(i),i,string)},forEachObject=function(object2,iterator,receiver){for(var k in object2)hasOwnProperty10.call(object2,k)&&(receiver==null?iterator(object2[k],k,object2):iterator.call(receiver,object2[k],k,object2))},forEach=function(list4,iterator,thisArg){if(!isCallable(iterator))throw new TypeError("iterator must be a function");var receiver;arguments.length>=3&&(receiver=thisArg),toStr2.call(list4)==="[object Array]"?forEachArray(list4,iterator,receiver):typeof list4=="string"?forEachString(list4,iterator,receiver):forEachObject(list4,iterator,receiver)};module2.exports=forEach}});var require_available_typed_arrays=__commonJS({"node_modules/available-typed-arrays/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var possibleNames=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;module2.exports=function(){for(var out=[],i=0;i<possibleNames.length;i++)typeof g[possibleNames[i]]=="function"&&(out[out.length]=possibleNames[i]);return out}}});var require_which_typed_array=__commonJS({"node_modules/which-typed-array/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var forEach=require_for_each(),availableTypedArrays=require_available_typed_arrays(),callBind=require_call_bind(),callBound=require_callBound(),gOPD=require_gopd(),$toString=callBound("Object.prototype.toString"),hasToStringTag=require_shams2()(),g=typeof globalThis>"u"?window:globalThis,typedArrays=availableTypedArrays(),$slice=callBound("String.prototype.slice"),getPrototypeOf=Object.getPrototypeOf,$indexOf=callBound("Array.prototype.indexOf",!0)||function(array,value){for(var i=0;i<array.length;i+=1)if(array[i]===value)return i;return-1},cache2={__proto__:null};hasToStringTag&&gOPD&&getPrototypeOf?forEach(typedArrays,function(typedArray){var arr=new g[typedArray];if(Symbol.toStringTag in arr){var proto=getPrototypeOf(arr),descriptor=gOPD(proto,Symbol.toStringTag);if(!descriptor){var superProto=getPrototypeOf(proto);descriptor=gOPD(superProto,Symbol.toStringTag)}cache2["$"+typedArray]=callBind(descriptor.get)}}):forEach(typedArrays,function(typedArray){var arr=new g[typedArray],fn=arr.slice||arr.set;fn&&(cache2["$"+typedArray]=callBind(fn))});var tryTypedArrays=function(value){var found=!1;return forEach(cache2,function(getter,typedArray){if(!found)try{"$"+getter(value)===typedArray&&(found=$slice(typedArray,1))}catch{}}),found},trySlices=function(value){var found=!1;return forEach(cache2,function(getter,name){if(!found)try{getter(value),found=$slice(name,1)}catch{}}),found};module2.exports=function(value){if(!value||typeof value!="object")return!1;if(!hasToStringTag){var tag=$slice($toString(value),8,-1);return $indexOf(typedArrays,tag)>-1?tag:tag!=="Object"?!1:trySlices(value)}return gOPD?tryTypedArrays(value):null}}});var require_is_typed_array=__commonJS({"node_modules/is-typed-array/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var whichTypedArray=require_which_typed_array();module2.exports=function(value){return!!whichTypedArray(value)}}});var require_types=__commonJS({"node_modules/util/support/types.js"(exports3){"use strict";init_define_process_env();init_shim();var isArgumentsObject=require_is_arguments(),isGeneratorFunction=require_is_generator_function(),whichTypedArray=require_which_typed_array(),isTypedArray2=require_is_typed_array();function uncurryThis(f){return f.call.bind(f)}var BigIntSupported=typeof BigInt<"u",SymbolSupported=typeof Symbol<"u",ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);BigIntSupported&&(bigIntValue=uncurryThis(BigInt.prototype.valueOf));var bigIntValue;SymbolSupported&&(symbolValue=uncurryThis(Symbol.prototype.valueOf));var symbolValue;function checkBoxedPrimitive(value,prototypeValueOf){if(typeof value!="object")return!1;try{return prototypeValueOf(value),!0}catch{return!1}}exports3.isArgumentsObject=isArgumentsObject;exports3.isGeneratorFunction=isGeneratorFunction;exports3.isTypedArray=isTypedArray2;function isPromise2(input2){return typeof Promise<"u"&&input2 instanceof Promise||input2!==null&&typeof input2=="object"&&typeof input2.then=="function"&&typeof input2.catch=="function"}exports3.isPromise=isPromise2;function isArrayBufferView(value){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(value):isTypedArray2(value)||isDataView(value)}exports3.isArrayBufferView=isArrayBufferView;function isUint8Array(value){return whichTypedArray(value)==="Uint8Array"}exports3.isUint8Array=isUint8Array;function isUint8ClampedArray(value){return whichTypedArray(value)==="Uint8ClampedArray"}exports3.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(value){return whichTypedArray(value)==="Uint16Array"}exports3.isUint16Array=isUint16Array;function isUint32Array(value){return whichTypedArray(value)==="Uint32Array"}exports3.isUint32Array=isUint32Array;function isInt8Array(value){return whichTypedArray(value)==="Int8Array"}exports3.isInt8Array=isInt8Array;function isInt16Array(value){return whichTypedArray(value)==="Int16Array"}exports3.isInt16Array=isInt16Array;function isInt32Array(value){return whichTypedArray(value)==="Int32Array"}exports3.isInt32Array=isInt32Array;function isFloat32Array(value){return whichTypedArray(value)==="Float32Array"}exports3.isFloat32Array=isFloat32Array;function isFloat64Array(value){return whichTypedArray(value)==="Float64Array"}exports3.isFloat64Array=isFloat64Array;function isBigInt64Array(value){return whichTypedArray(value)==="BigInt64Array"}exports3.isBigInt64Array=isBigInt64Array;function isBigUint64Array(value){return whichTypedArray(value)==="BigUint64Array"}exports3.isBigUint64Array=isBigUint64Array;function isMapToString(value){return ObjectToString(value)==="[object Map]"}isMapToString.working=typeof Map<"u"&&isMapToString(new Map);function isMap(value){return typeof Map>"u"?!1:isMapToString.working?isMapToString(value):value instanceof Map}exports3.isMap=isMap;function isSetToString(value){return ObjectToString(value)==="[object Set]"}isSetToString.working=typeof Set<"u"&&isSetToString(new Set);function isSet(value){return typeof Set>"u"?!1:isSetToString.working?isSetToString(value):value instanceof Set}exports3.isSet=isSet;function isWeakMapToString(value){return ObjectToString(value)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap<"u"&&isWeakMapToString(new WeakMap);function isWeakMap(value){return typeof WeakMap>"u"?!1:isWeakMapToString.working?isWeakMapToString(value):value instanceof WeakMap}exports3.isWeakMap=isWeakMap;function isWeakSetToString(value){return ObjectToString(value)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet<"u"&&isWeakSetToString(new WeakSet);function isWeakSet(value){return isWeakSetToString(value)}exports3.isWeakSet=isWeakSet;function isArrayBufferToString(value){return ObjectToString(value)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer<"u"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(value){return typeof ArrayBuffer>"u"?!1:isArrayBufferToString.working?isArrayBufferToString(value):value instanceof ArrayBuffer}exports3.isArrayBuffer=isArrayBuffer;function isDataViewToString(value){return ObjectToString(value)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(value){return typeof DataView>"u"?!1:isDataViewToString.working?isDataViewToString(value):value instanceof DataView}exports3.isDataView=isDataView;var SharedArrayBufferCopy=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function isSharedArrayBufferToString(value){return ObjectToString(value)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(value){return typeof SharedArrayBufferCopy>"u"?!1:(typeof isSharedArrayBufferToString.working>"u"&&(isSharedArrayBufferToString.working=isSharedArrayBufferToString(new SharedArrayBufferCopy)),isSharedArrayBufferToString.working?isSharedArrayBufferToString(value):value instanceof SharedArrayBufferCopy)}exports3.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(value){return ObjectToString(value)==="[object AsyncFunction]"}exports3.isAsyncFunction=isAsyncFunction;function isMapIterator(value){return ObjectToString(value)==="[object Map Iterator]"}exports3.isMapIterator=isMapIterator;function isSetIterator(value){return ObjectToString(value)==="[object Set Iterator]"}exports3.isSetIterator=isSetIterator;function isGeneratorObject(value){return ObjectToString(value)==="[object Generator]"}exports3.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(value){return ObjectToString(value)==="[object WebAssembly.Module]"}exports3.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(value){return checkBoxedPrimitive(value,numberValue)}exports3.isNumberObject=isNumberObject;function isStringObject(value){return checkBoxedPrimitive(value,stringValue)}exports3.isStringObject=isStringObject;function isBooleanObject(value){return checkBoxedPrimitive(value,booleanValue)}exports3.isBooleanObject=isBooleanObject;function isBigIntObject(value){return BigIntSupported&&checkBoxedPrimitive(value,bigIntValue)}exports3.isBigIntObject=isBigIntObject;function isSymbolObject(value){return SymbolSupported&&checkBoxedPrimitive(value,symbolValue)}exports3.isSymbolObject=isSymbolObject;function isBoxedPrimitive(value){return isNumberObject(value)||isStringObject(value)||isBooleanObject(value)||isBigIntObject(value)||isSymbolObject(value)}exports3.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(value){return typeof Uint8Array<"u"&&(isArrayBuffer(value)||isSharedArrayBuffer(value))}exports3.isAnyArrayBuffer=isAnyArrayBuffer;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(method){Object.defineProperty(exports3,method,{enumerable:!1,value:function(){throw new Error(method+" is not supported in userland")}})})}});var require_isBufferBrowser=__commonJS({"node_modules/util/support/isBufferBrowser.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(arg){return arg&&typeof arg=="object"&&typeof arg.copy=="function"&&typeof arg.fill=="function"&&typeof arg.readUInt8=="function"}}});var require_inherits_browser=__commonJS({"node_modules/inherits/inherits_browser.js"(exports3,module2){init_define_process_env();init_shim();typeof Object.create=="function"?module2.exports=function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module2.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}}});var require_util=__commonJS({"node_modules/util/util.js"(exports3){init_define_process_env();init_shim();var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(obj){for(var keys2=Object.keys(obj),descriptors={},i=0;i<keys2.length;i++)descriptors[keys2[i]]=Object.getOwnPropertyDescriptor(obj,keys2[i]);return descriptors},formatRegExp=/%[sdj%]/g;exports3.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect5(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x2){if(x2==="%%")return"%";if(i>=len)return x2;switch(x2){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch{return"[Circular]"}default:return x2}}),x=args[i];i<len;x=args[++i])isNull(x)||!isObject3(x)?str+=" "+x:str+=" "+inspect5(x);return str};exports3.deprecate=function(fn,msg){if(typeof import_process.default<"u"&&import_process.default.noDeprecation===!0)return fn;if(typeof import_process.default>"u")return function(){return exports3.deprecate(fn,msg).apply(this,arguments)};var warned=!1;function deprecated(){if(!warned){if(import_process.default.throwDeprecation)throw new Error(msg);import_process.default.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}return deprecated};var debugs={},debugEnvRegex=/^$/;define_process_env_default.NODE_DEBUG&&(debugEnv=define_process_env_default.NODE_DEBUG,debugEnv=debugEnv.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),debugEnvRegex=new RegExp("^"+debugEnv+"$","i"));var debugEnv;exports3.debuglog=function(set2){if(set2=set2.toUpperCase(),!debugs[set2])if(debugEnvRegex.test(set2)){var pid=import_process.default.pid;debugs[set2]=function(){var msg=exports3.format.apply(exports3,arguments);console.error("%s %d: %s",set2,pid,msg)}}else debugs[set2]=function(){};return debugs[set2]};function inspect5(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports3._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}exports3.inspect=inspect5;inspect5.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]};inspect5.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style2=inspect5.styles[styleType];return style2?"\x1B["+inspect5.colors[style2][0]+"m"+str+"\x1B["+inspect5.colors[style2][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash2={};return array.forEach(function(val,idx){hash2[val]=!0}),hash2}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction2(value.inspect)&&value.inspect!==exports3.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys2=Object.keys(value),visibleKeys=arrayToHash(keys2);if(ctx.showHidden&&(keys2=Object.getOwnPropertyNames(value)),isError(value)&&(keys2.indexOf("message")>=0||keys2.indexOf("description")>=0))return formatError(value);if(keys2.length===0){if(isFunction2(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray3(value)&&(array=!0,braces=["[","]"]),isFunction2(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),keys2.length===0&&(!array||value.length==0))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output3;return array?output3=formatArray(ctx,value,recurseTimes,visibleKeys,keys2):output3=keys2.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output3,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys2){for(var output3=[],i=0,l=value.length;i<l;++i)hasOwnProperty10(value,String(i))?output3.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output3.push("");return keys2.forEach(function(key){key.match(/^\d+$/)||output3.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output3}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?desc.set?str=ctx.stylize("[Getter/Setter]","special"):str=ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty10(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(isNull(recurseTimes)?str=formatValue(ctx,desc.value,null):str=formatValue(ctx,desc.value,recurseTimes-1),str.indexOf(`
`)>-1&&(array?str=str.split(`
`).map(function(line){return"  "+line}).join(`
`).slice(2):str=`
`+str.split(`
`).map(function(line){return"   "+line}).join(`
`))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.slice(1,-1),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output3,base,braces){var numLinesEst=0,length=output3.reduce(function(prev,cur){return numLinesEst++,cur.indexOf(`
`)>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(base===""?"":base+`
 `)+" "+output3.join(`,
  `)+" "+braces[1]:braces[0]+base+" "+output3.join(", ")+" "+braces[1]}exports3.types=require_types();function isArray3(ar){return Array.isArray(ar)}exports3.isArray=isArray3;function isBoolean(arg){return typeof arg=="boolean"}exports3.isBoolean=isBoolean;function isNull(arg){return arg===null}exports3.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports3.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg=="number"}exports3.isNumber=isNumber;function isString(arg){return typeof arg=="string"}exports3.isString=isString;function isSymbol2(arg){return typeof arg=="symbol"}exports3.isSymbol=isSymbol2;function isUndefined(arg){return arg===void 0}exports3.isUndefined=isUndefined;function isRegExp(re2){return isObject3(re2)&&objectToString2(re2)==="[object RegExp]"}exports3.isRegExp=isRegExp;exports3.types.isRegExp=isRegExp;function isObject3(arg){return typeof arg=="object"&&arg!==null}exports3.isObject=isObject3;function isDate(d){return isObject3(d)&&objectToString2(d)==="[object Date]"}exports3.isDate=isDate;exports3.types.isDate=isDate;function isError(e){return isObject3(e)&&(objectToString2(e)==="[object Error]"||e instanceof Error)}exports3.isError=isError;exports3.types.isNativeError=isError;function isFunction2(arg){return typeof arg=="function"}exports3.isFunction=isFunction2;function isPrimitive(arg){return arg===null||typeof arg=="boolean"||typeof arg=="number"||typeof arg=="string"||typeof arg=="symbol"||typeof arg>"u"}exports3.isPrimitive=isPrimitive;exports3.isBuffer=require_isBufferBrowser();function objectToString2(o){return Object.prototype.toString.call(o)}function pad2(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp2(){var d=new Date,time=[pad2(d.getHours()),pad2(d.getMinutes()),pad2(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports3.log=function(){console.log("%s - %s",timestamp2(),exports3.format.apply(exports3,arguments))};exports3.inherits=require_inherits_browser();exports3._extend=function(origin,add4){if(!add4||!isObject3(add4))return origin;for(var keys2=Object.keys(add4),i=keys2.length;i--;)origin[keys2[i]]=add4[keys2[i]];return origin};function hasOwnProperty10(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var kCustomPromisifiedSymbol=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;exports3.promisify=function(original){if(typeof original!="function")throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&original[kCustomPromisifiedSymbol]){var fn=original[kCustomPromisifiedSymbol];if(typeof fn!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),fn}function fn(){for(var promiseResolve,promiseReject,promise=new Promise(function(resolve,reject){promiseResolve=resolve,promiseReject=reject}),args=[],i=0;i<arguments.length;i++)args.push(arguments[i]);args.push(function(err,value){err?promiseReject(err):promiseResolve(value)});try{original.apply(this,args)}catch(err){promiseReject(err)}return promise}return Object.setPrototypeOf(fn,Object.getPrototypeOf(original)),kCustomPromisifiedSymbol&&Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(fn,getOwnPropertyDescriptors(original))};exports3.promisify.custom=kCustomPromisifiedSymbol;function callbackifyOnRejected(reason,cb){if(!reason){var newReason=new Error("Promise was rejected with a falsy value");newReason.reason=reason,reason=newReason}return cb(reason)}function callbackify(original){if(typeof original!="function")throw new TypeError('The "original" argument must be of type Function');function callbackified(){for(var args=[],i=0;i<arguments.length;i++)args.push(arguments[i]);var maybeCb=args.pop();if(typeof maybeCb!="function")throw new TypeError("The last argument must be of type Function");var self2=this,cb=function(){return maybeCb.apply(self2,arguments)};original.apply(this,args).then(function(ret){queueMicrotask(cb.bind(null,null,ret))},function(rej){queueMicrotask(callbackifyOnRejected.bind(null,rej,cb))})}return Object.setPrototypeOf(callbackified,Object.getPrototypeOf(original)),Object.defineProperties(callbackified,getOwnPropertyDescriptors(original)),callbackified}exports3.callbackify=callbackify}});var mapping_error_regex,init_postgres_pool=__esm({"lib-browser/constants/postgres_pool.js"(){"use strict";init_define_process_env();init_shim();mapping_error_regex=/MAPPING:([^\n]+)/}});var init_loggable=__esm({"lib-browser/u/shared/loggable.js"(){"use strict";init_define_process_env();init_shim()}});var errors_exports={};__export(errors_exports,{BubbleError:()=>BubbleError,DeprecatedVersionError:()=>DeprecatedVersionError,ERROR_LEVELS:()=>ERROR_LEVELS,ExpectedError:()=>ExpectedError,MAX_OBJECT_KEYS:()=>MAX_OBJECT_KEYS,MobileDeployError:()=>MobileDeployError,NotReadyError:()=>NotReadyError,OfflineError:()=>OfflineError,OwnerError:()=>OwnerError,StripePaymentRequiresAction:()=>StripePaymentRequiresAction,UnarchivingMessage:()=>UnarchivingMessage,Unauthorized:()=>Unauthorized,UnauthorizedEmployee:()=>UnauthorizedEmployee,UnexpectedError:()=>UnexpectedError,UnexpectedPostgresError:()=>UnexpectedPostgresError,UsageLimitAction:()=>UsageLimitAction,UsageLimitError:()=>UsageLimitError,UserError:()=>UserError,assertNever:()=>assertNever,capture_stack:()=>capture_stack,clean_args:()=>clean_args,ensure_bubble_error:()=>ensure_bubble_error,error_append:()=>error_append,error_append_args:()=>error_append_args,format_data_for_logging:()=>format_data_for_logging,format_for_logging:()=>format_for_logging,from_json_client:()=>from_json_client,get_status_code:()=>get_status_code,isErrorLike:()=>isErrorLike,is_mapping_error:()=>is_mapping_error,set_error_hook:()=>set_error_hook,throw_test_error:()=>throw_test_error,to_owner_display:()=>to_owner_display});function isErrorLike(err){return typeof err=="object"&&err!=null&&(err instanceof Error||"stack"in err&&"message"in err)}function set_error_hook(name,fn){if(name in hooks)hooks[name]=fn;else throw new UnexpectedError("attempt to set invalid error hook",{name})}function default_display(){var _hooks$default_displa;return(_hooks$default_displa=hooks.default_display())!=null?_hooks$default_displa:LAST_RESORT_ERROR_MESSAGE}function localize_message(plugin2,name){var _hooks$localize_messa;return(_hooks$localize_messa=hooks.localize_message(plugin2,name))!=null?_hooks$localize_messa:`${plugin2}: ${name}`}function get_client_args(args){var _hooks$get_client_arg,_args$code;return(_hooks$get_client_arg=hooks.get_client_args(args))!=null?_hooks$get_client_arg:{code:(_args$code=args.code)!=null?_args$code:"no code found"}}function ensure_bubble_error(err){if(err instanceof BubbleError)return err;if(err instanceof NotReadyError)return new UnexpectedError("not ready",{not_ready_key_id:err.not_ready_key._id,not_ready_key_turned:err.not_ready_key.is_turned(),not_ready_key_listener_count:err.not_ready_key._listener_count});if(isErrorLike(err)){let args={origin:"native error",...err},ret=new UnexpectedError(err.message,args);return err.stack!=null&&(ret.stack=err.stack),ret}return typeof err=="string"?new UnexpectedError(err):new UnexpectedError("object thrown as error",{original:err})}function capture_stack(message){let cut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,num_frames=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.POSITIVE_INFINITY,e=new Error,{stack}=e;typeof stack!="string"&&(stack="(no stack)");let first_frame=3+cut,last_frame=first_frame+num_frames;return stack=stack.split(`
`).slice(first_frame,last_frame).join(`
`),message+`
`+stack}function clean_args(to_clean){let{args,path=[],to_client=!1,visited_objects=new Map}=to_clean;if(typeof args=="function")return args.toString().slice(0,FN_SOURCE_CHARS_TO_RETAIN);if(typeof args!="object"||args==null)return args;let seen_path=visited_objects.get(args);if(seen_path)return`recursion or repeated property: ${["root",...seen_path].join(".")}`;if(visited_objects.set(args,path),path.length>10)return"hit recursion depth > 10 when processing args";if(visited_objects.size>MAX_OBJECT_NODES)return"hit max object nodes when processing args";if(args instanceof Error)return ensure_bubble_error(args).to_json({to_client,path,visited_objects});if(typeof args.id=="function")try{return args.id()}catch{return"hit error trying to get args.id"}if(typeof args.toUniqueString=="function")try{return args.toUniqueString()}catch{return"hit error trying to get args.toUniqueString"}if(Array.isArray(args)){let new_obj=args.slice(0,MAX_OBJECT_KEYS).map((v,i)=>clean_args({args:v,path:path.concat(String(i)),visited_objects}));return new_obj.length<args.length&&new_obj.push(`hit max keys when processing ${args.length} args`),new_obj}else{let new_obj={},key_count=0;for(let k in args){if(key_count+=1,key_count>MAX_OBJECT_KEYS){new_obj[k]="hit max keys when processing args";break}let v=args[k];new_obj[k]=clean_args({args:v,path:path.concat(k),visited_objects})}return new_obj}}function from_json_client(json){var _json$args;switch((_json$args=json.args)!=null||(json.args={}),json.args.server_generated=!0,json.error_class){case"OwnerError":case"UsageLimitError":return new OwnerError(json.message,json.args);case"StripePaymentRequiresAction":return new StripePaymentRequiresAction(json.message,json.translation,json.args);case"MobileDeployError":return new MobileDeployError(json.message,json.args);case"UserError":return new UserError(json.message,json.translation,json.args);case"DeprecatedVersionError":return new DeprecatedVersionError(json.message,json.translation,json.args);case"Unauthorized":return new Unauthorized(json.message,json.translation,json.args);case"UnauthorizedEmployee":return new UnauthorizedEmployee(json.message,json.translation,json.args);case"ClientError":return new UnexpectedError("bad request from client",json.args);case"UnarchivingMessage":return new UnarchivingMessage("App is being unarchived. Please wait a few moments.",json.args);default:return new UnexpectedError("Unexpected server error: please report the code parameter to the team",json.args)}}function format_for_logging(error2){var _err$stack;let indent=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",err=ensure_bubble_error(error2),ret=indent_string((_err$stack=err.stack)!=null?_err$stack:"",indent);return err.args!=null&&Object.keys(err.args).length>0&&(ret+=format_data_for_logging(err.args,indent+"    ")+`
`),ret}function format_data_for_logging(data){let indent=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"    ";function format_value(v){return v instanceof Error?`
`+format_for_logging(v,indent+"    "):typeof v=="string"&&v.includes(`
`)?`
`+indent_string(v,indent):" "+util.inspect(v,{depth:4})}let ret="";for(let k in data){let v=data[k];["stack"].includes(k)||(ret+=`
`+indent+k+":"+format_value(v))}return ret}function indent_string(v,indent){return v.split(`
`).map(line=>indent+line).join(`
`)}function get_status_code(err){return err.statusCode}function error_append(context,fn){try{return fn()}catch(e){throw e instanceof Error&&(typeof e.message=="string"?e.message+=`
	${context}`:e.message=context),e}}function error_append_args(args,fn){try{return fn()}catch(e){throw e instanceof BubbleError&&(e.args=Object.assign({},e.args,args)),e}}function throw_test_error(){throw new UnexpectedError("This is a test error")}function is_mapping_error(err){return"message"in err&&typeof err.message=="string"?mapping_error_regex.test(err.message):!1}function to_owner_display(err,fallback_display){let bubble_error=ensure_bubble_error(err);return bubble_error instanceof OwnerError||bubble_error instanceof UserError?bubble_error.display():fallback_display}function assertNever(value){throw new UnexpectedError("Switch statement reached default case",{value})}var import_es_error_cause,import_web_dom_collections_iterator,util,_class,_class3,_class4,_class5,_class6,_class7,_class8,_class9,_class10,_class11,_class12,_class13,_class14,_class15,LAST_RESORT_ERROR_MESSAGE,ERROR_LEVELS,hooks,MAX_OBJECT_NODES,MAX_OBJECT_KEYS,FN_SOURCE_CHARS_TO_RETAIN,BubbleError,NotReadyError,UnexpectedError,ExpectedError,OfflineError,OwnerError,UsageLimitAction,UsageLimitError,UserError,DeprecatedVersionError,Unauthorized,StripePaymentRequiresAction,UnauthorizedEmployee,UnexpectedPostgresError,UnarchivingMessage,MobileDeployError,init_errors=__esm({"lib-browser/u/shared/errors.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause=__toESM(require_es_error_cause()),import_web_dom_collections_iterator=__toESM(require_web_dom_collections_iterator()),util=__toESM(require_util());init_postgres_pool();init_loggable();LAST_RESORT_ERROR_MESSAGE="Sorry, we ran into a temporary bug and can't complete your request.  We'll fix it as soon as we can; please try again in a bit!",ERROR_LEVELS=["error","owner_error","user_error"];hooks={default_display(){},localize_message(plugin2,name){},get_client_args(all_args){}};MAX_OBJECT_NODES=1e4,MAX_OBJECT_KEYS=1e3,FN_SOURCE_CHARS_TO_RETAIN=50;BubbleError=class extends Error{constructor(message,args){var _this$stack;super(message),this.args=void 0,this.statusCode=void 0,this.message=message,(_this$stack=this.stack)!=null||(this.stack=capture_stack(this.error_class+" "+this.message,1)),args!=null&&typeof args=="object"?this.args=args:this.args={}}static from(message,args){return new this(message,args)}display(){return default_display()}toString(){return this.error_class+" "+this.message}to_json(){let options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{to_client=!1,path=[],visited_objects=new Map}=options,cleaned=clean_args({args:this.args,path,to_client,visited_objects}),data={error_class:this.error_class,args:cleaned!=null?cleaned:{}};return to_client?{...data,args:get_client_args(data.args),message:this.display()}:{...data,stack:this.stack,message:this.message}}extend(data){return Object.assign(this.args,data),this}};_class=BubbleError;_class.prototype.error_class="BubbleError",_class.prototype.suggested_level="error";NotReadyError=class{constructor(not_ready_key){this.not_ready_key=void 0,this.suppress_dependency_error=void 0,this.not_ready_key=not_ready_key}},UnexpectedError=class extends BubbleError{};_class3=UnexpectedError;_class3.prototype.error_class="UnexpectedError";ExpectedError=class extends BubbleError{constructor(){super(...arguments),this.body=void 0}};_class4=ExpectedError;_class4.prototype.error_class="ExpectedError";OfflineError=class extends BubbleError{};_class5=OfflineError;_class5.prototype.error_class="OfflineError";OwnerError=class extends ExpectedError{display(){var _this$args$display;return(_this$args$display=this.args.display)!=null?_this$args$display:this.message}};_class6=OwnerError;_class6.prototype.error_class="OwnerError",_class6.prototype.suggested_level="owner_error";UsageLimitAction=function(UsageLimitAction2){return UsageLimitAction2.UsingDataAPI="using Data API",UsageLimitAction2.UsingWorkflowAPI="using Workflow API",UsageLimitAction2.SavingData="saving data",UsageLimitAction2}({}),UsageLimitError=class extends OwnerError{constructor(action){super(`This application is at its usage limit. Please upgrade your application to continue ${action}`)}};_class7=UsageLimitError;_class7.prototype.error_class="UsageLimitError";UserError=class extends ExpectedError{constructor(app_message,translation,data){let message=app_message!=null?app_message:translation;if(message)super(message,data),this.translation=void 0;else throw new UnexpectedError("must have message or translation");translation&&(this.translation=translation),app_message||(this.message=null)}display(){if(!this.translation){let[plugin2,name]=this.message.split(".");name||(name=plugin2,plugin2="CORE"),this.translation=localize_message(plugin2,name)}return this.translation}to_json(){let options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{to_client=!1}=options,data=super.to_json(options);return to_client&&(data.message=this.message,data.translation=this.display()),data}};_class8=UserError;_class8.prototype.error_class="UserError",_class8.prototype.suggested_level="user_error";DeprecatedVersionError=class extends UserError{to_json(){var _data$args;let options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},data=super.to_json(options);return(_data$args=data.args)!=null||(data.args={}),data.args.can_update_via_refresh=this.args.can_update_via_refresh,data}};_class9=DeprecatedVersionError;_class9.prototype.error_class="DeprecatedVersionError";Unauthorized=class extends UserError{};_class10=Unauthorized;_class10.prototype.error_class="Unauthorized";StripePaymentRequiresAction=class extends UserError{};_class11=StripePaymentRequiresAction;_class11.prototype.error_class="StripePaymentRequiresAction";UnauthorizedEmployee=class extends Unauthorized{};_class12=UnauthorizedEmployee;_class12.prototype.error_class="UnauthorizedEmployee";UnexpectedPostgresError=class extends UnexpectedError{};_class13=UnexpectedPostgresError;_class13.prototype.error_class="UnexpectedPostgresError";UnarchivingMessage=class extends ExpectedError{};_class14=UnarchivingMessage;_class14.prototype.error_class="UnarchivingMessage";MobileDeployError=class extends OwnerError{};_class15=MobileDeployError;_class15.prototype.error_class="MobileDeployError"}});var BASE_BUNDLES,META_APPNAME_FOR_OWN_CDN,init_bundle=__esm({"lib-browser/constants/bundle.js"(){"use strict";init_define_process_env();init_shim();BASE_BUNDLES={edit:{is_edit_mode:!0},run:{is_run:!0,uses_modules:!1},run_debug:{is_run:!0,is_debug_mode:!0,uses_modules:!1},run_lean:{is_run:!0,uses_modules:!0},run_lean_debug:{is_run:!0,is_debug_mode:!0,uses_modules:!0},plugin:{is_edit_mode:!0,is_plugin_edit_mode:!0},web_preview:{is_run:!0,uses_modules:!0}},META_APPNAME_FOR_OWN_CDN="meta-q"}});var mode_check_exports={};__export(mode_check_exports,{edit_mode_only:()=>edit_mode_only,is_debug_mode:()=>is_debug_mode,is_edit_mode:()=>is_edit_mode,is_maison:()=>is_maison,is_plugin_edit_mode:()=>is_plugin_edit_mode,no_runmode:()=>no_runmode,on_client:()=>on_client,on_phonegap:()=>on_phonegap,on_react_native:()=>on_react_native,on_server:()=>on_server,on_worker:()=>on_worker,running_server:()=>running_server,running_test:()=>running_test,set_running_server:()=>set_running_server,set_running_tests:()=>set_running_tests});function on_client(){return _is_on_client&&!_is_on_worker}function on_server(){return!_is_on_client&&!_is_on_worker}function on_react_native(){return!!window.isReactNative}function on_phonegap(){return _is_on_phonegap}function set_running_tests(running){_is_running_tests=running}function running_test(){return _is_running_tests}function set_running_server(running){_is_running_server=running}function running_server(){return _is_running_server}function on_worker(){return _is_on_worker}function is_edit_mode(){var _active_bundle$is_edi;return(_active_bundle$is_edi=_active_bundle==null?void 0:_active_bundle.is_edit_mode)!=null?_active_bundle$is_edi:!1}function is_plugin_edit_mode(){var _active_bundle$is_plu;return(_active_bundle$is_plu=_active_bundle==null?void 0:_active_bundle.is_plugin_edit_mode)!=null?_active_bundle$is_plu:!1}function is_debug_mode(){var _active_bundle$is_deb;return(_active_bundle$is_deb=_active_bundle==null?void 0:_active_bundle.is_debug_mode)!=null?_active_bundle$is_deb:!1}function is_maison(){var _active_bundle$is_mai;return(_active_bundle$is_mai=_active_bundle==null?void 0:_active_bundle.is_maison_editor)!=null?_active_bundle$is_mai:!1}function edit_mode_only(){let allow_server=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!running_test()&&!is_edit_mode()&&!is_debug_mode()&&(!allow_server||on_client()))throw new UnexpectedError("Oops, looks like we are in run-mode or server-mode, but have required edit-mode code.  Look at the stack trace to see who is requiring this...")}function no_runmode(){if(!is_edit_mode()&&!is_debug_mode()&&on_client())throw new UnexpectedError("Oops, looks like we are in run-mode or server-mode, but have required edit-mode code.  Look at the stack trace to see who is requiring this...")}var _window,_document,_is_on_client,_is_on_worker,_bundle_name,_active_bundle,_is_on_phonegap,_is_running_tests,_is_running_server,init_mode_check=__esm({"lib-browser/u/shared/mode_check.js"(){"use strict";init_define_process_env();init_shim();init_errors();init_bundle();_is_on_client=typeof window<"u",_is_on_worker=typeof window>"u"&&typeof postMessage<"u",_bundle_name=(_window=window)==null?void 0:_window.bubble_bundle_name,_active_bundle=BASE_BUNDLES[_bundle_name];_is_on_phonegap=((_document=document)==null?void 0:_document.URL)!=null&&document.URL.includes("file://");_is_running_tests=!1;_is_running_server=!1}});var noBounceTransitions,stockTransitionNames,injectTransitions,allTransitionNames,init_customVelocityAnimations=__esm({"lib-browser/u/client/customVelocityAnimations.js"(){"use strict";init_define_process_env();init_shim();noBounceTransitions={"transition.noBounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[0,1e3]},.6,{easing:"easeOutCirc"}]]},"transition.noBounceUpOut":{defaultDuration:1e3,calls:[[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.noBounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[0,-1e3]},.6,{easing:"easeOutCirc"}]]},"transition.noBounceDownOut":{defaultDuration:1e3,calls:[[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.noBounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[0,-1250]},.6,{easing:"easeOutCirc"}]]},"transition.noBounceLeftOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.noBounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[0,1250]},.6,{easing:"easeOutCirc"}]]},"transition.noBounceRightOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}}},stockTransitionNames=["callout.bounce","callout.shake","callout.flash","callout.pulse","callout.swing","callout.tada","transition.fadeIn","transition.fadeOut","transition.flipXIn","transition.flipXOut","transition.flipYIn","transition.flipYOut","transition.flipBounceXIn","transition.flipBounceXOut","transition.flipBounceYIn","transition.flipBounceYOut","transition.swoopIn","transition.swoopOut","transition.whirlIn","transition.whirlOut","transition.shrinkIn","transition.shrinkOut","transition.expandIn","transition.expandOut","transition.bounceIn","transition.bounceOut","transition.bounceUpIn","transition.bounceUpOut","transition.bounceDownIn","transition.bounceDownOut","transition.bounceLeftIn","transition.bounceLeftOut","transition.bounceRightIn","transition.bounceRightOut","transition.slideUpIn","transition.slideUpOut","transition.slideDownIn","transition.slideDownOut","transition.slideLeftIn","transition.slideLeftOut","transition.slideRightIn","transition.slideRightOut","transition.slideUpBigIn","transition.slideUpBigOut","transition.slideDownBigIn","transition.slideDownBigOut","transition.slideLeftBigIn","transition.slideLeftBigOut","transition.slideRightBigIn","transition.slideRightBigOut","transition.perspectiveUpIn","transition.perspectiveUpOut","transition.perspectiveDownIn","transition.perspectiveDownOut","transition.perspectiveLeftIn","transition.perspectiveLeftOut","transition.perspectiveRightIn","transition.perspectiveRightOut"],injectTransitions=function(){if(typeof window>"u"||typeof window.$>"u"||typeof window.$.Velocity>"u"||typeof window.$.Velocity.RegisterEffect>"u"){console.log("Cannot load extra transitions before window, jQuery, Velocity or VelocityUI");return}Object.keys(noBounceTransitions).forEach(function(transitionName){window.$.Velocity.RegisterEffect(transitionName,noBounceTransitions[transitionName])})},allTransitionNames=stockTransitionNames.concat(Object.keys(noBounceTransitions))}});var version,VERSION,_hasBuffer,_TD,_TE,b64ch,b64chs,b64tab,b64re,_fromCC,_U8Afrom,_mkUriSafe,_tidyB64,btoaPolyfill,_btoa,_fromUint8Array,fromUint8Array,cb_utob,re_utob,utob,_encode,encode,encodeURI2,re_btou,cb_btou,btou,atobPolyfill,_atob,_toUint8Array,toUint8Array,_decode,_unURI,decode,isValid,_noEnum,extendString,extendUint8Array,extendBuiltins,gBase64,init_base64=__esm({"node_modules/js-base64/base64.mjs"(){init_define_process_env();init_shim();version="3.7.7",VERSION=version,_hasBuffer=typeof import_buffer.Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(a=>{let tab={};return a.forEach((c,i)=>tab[c]=i),tab})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):it=>new Uint8Array(Array.prototype.slice.call(it,0)),_mkUriSafe=src=>src.replace(/=/g,"").replace(/[+\/]/g,m0=>m0=="+"?"-":"_"),_tidyB64=s=>s.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=bin=>{let u322,c0,c1,c2,asc="",pad2=bin.length%3;for(let i=0;i<bin.length;){if((c0=bin.charCodeAt(i++))>255||(c1=bin.charCodeAt(i++))>255||(c2=bin.charCodeAt(i++))>255)throw new TypeError("invalid character found");u322=c0<<16|c1<<8|c2,asc+=b64chs[u322>>18&63]+b64chs[u322>>12&63]+b64chs[u322>>6&63]+b64chs[u322&63]}return pad2?asc.slice(0,pad2-3)+"===".substring(pad2):asc},_btoa=typeof btoa=="function"?bin=>btoa(bin):_hasBuffer?bin=>import_buffer.Buffer.from(bin,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?u8a=>import_buffer.Buffer.from(u8a).toString("base64"):u8a=>{let strs=[];for(let i=0,l=u8a.length;i<l;i+=4096)strs.push(_fromCC.apply(null,u8a.subarray(i,i+4096)));return _btoa(strs.join(""))},fromUint8Array=(u8a,urlsafe=!1)=>urlsafe?_mkUriSafe(_fromUint8Array(u8a)):_fromUint8Array(u8a),cb_utob=c=>{if(c.length<2){var cc=c.charCodeAt(0);return cc<128?c:cc<2048?_fromCC(192|cc>>>6)+_fromCC(128|cc&63):_fromCC(224|cc>>>12&15)+_fromCC(128|cc>>>6&63)+_fromCC(128|cc&63)}else{var cc=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return _fromCC(240|cc>>>18&7)+_fromCC(128|cc>>>12&63)+_fromCC(128|cc>>>6&63)+_fromCC(128|cc&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=u22=>u22.replace(re_utob,cb_utob),_encode=_hasBuffer?s=>import_buffer.Buffer.from(s,"utf8").toString("base64"):_TE?s=>_fromUint8Array(_TE.encode(s)):s=>_btoa(utob(s)),encode=(src,urlsafe=!1)=>urlsafe?_mkUriSafe(_encode(src)):_encode(src),encodeURI2=src=>encode(src,!0),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=cccc=>{switch(cccc.length){case 4:var cp=(7&cccc.charCodeAt(0))<<18|(63&cccc.charCodeAt(1))<<12|(63&cccc.charCodeAt(2))<<6|63&cccc.charCodeAt(3),offset=cp-65536;return _fromCC((offset>>>10)+55296)+_fromCC((offset&1023)+56320);case 3:return _fromCC((15&cccc.charCodeAt(0))<<12|(63&cccc.charCodeAt(1))<<6|63&cccc.charCodeAt(2));default:return _fromCC((31&cccc.charCodeAt(0))<<6|63&cccc.charCodeAt(1))}},btou=b=>b.replace(re_btou,cb_btou),atobPolyfill=asc=>{if(asc=asc.replace(/\s+/g,""),!b64re.test(asc))throw new TypeError("malformed base64.");asc+="==".slice(2-(asc.length&3));let u24,bin="",r1,r2;for(let i=0;i<asc.length;)u24=b64tab[asc.charAt(i++)]<<18|b64tab[asc.charAt(i++)]<<12|(r1=b64tab[asc.charAt(i++)])<<6|(r2=b64tab[asc.charAt(i++)]),bin+=r1===64?_fromCC(u24>>16&255):r2===64?_fromCC(u24>>16&255,u24>>8&255):_fromCC(u24>>16&255,u24>>8&255,u24&255);return bin},_atob=typeof atob=="function"?asc=>atob(_tidyB64(asc)):_hasBuffer?asc=>import_buffer.Buffer.from(asc,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?a=>_U8Afrom(import_buffer.Buffer.from(a,"base64")):a=>_U8Afrom(_atob(a).split("").map(c=>c.charCodeAt(0))),toUint8Array=a=>_toUint8Array(_unURI(a)),_decode=_hasBuffer?a=>import_buffer.Buffer.from(a,"base64").toString("utf8"):_TD?a=>_TD.decode(_toUint8Array(a)):a=>btou(_atob(a)),_unURI=a=>_tidyB64(a.replace(/[-_]/g,m0=>m0=="-"?"+":"/")),decode=src=>_decode(_unURI(src)),isValid=src=>{if(typeof src!="string")return!1;let s=src.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(s)||!/[^\s0-9a-zA-Z\-_]/.test(s)},_noEnum=v=>({value:v,enumerable:!1,writable:!0,configurable:!0}),extendString=function(){let _add=(name,body)=>Object.defineProperty(String.prototype,name,_noEnum(body));_add("fromBase64",function(){return decode(this)}),_add("toBase64",function(urlsafe){return encode(this,urlsafe)}),_add("toBase64URI",function(){return encode(this,!0)}),_add("toBase64URL",function(){return encode(this,!0)}),_add("toUint8Array",function(){return toUint8Array(this)})},extendUint8Array=function(){let _add=(name,body)=>Object.defineProperty(Uint8Array.prototype,name,_noEnum(body));_add("toBase64",function(urlsafe){return fromUint8Array(this,urlsafe)}),_add("toBase64URI",function(){return fromUint8Array(this,!0)}),_add("toBase64URL",function(){return fromUint8Array(this,!0)})},extendBuiltins=()=>{extendString(),extendUint8Array()},gBase64={version,VERSION,atob:_atob,atobPolyfill,btoa:_btoa,btoaPolyfill,fromBase64:decode,toBase64:encode,encode,encodeURI:encodeURI2,encodeURL:encodeURI2,utob,btou,decode,isValid,fromUint8Array,toUint8Array,extendString,extendUint8Array,extendBuiltins}}});var require_jquery_dotdotdot_1_5_6=__commonJS({"vendor/jquery_plugins/jquery.dotdotdot-1.5.6.js"(){"use strict";init_define_process_env();init_shim();(function($2){if($2.fn.dotdotdot)return;$2.fn.dotdotdot=function(o){if(this.length==0)return debug2(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$2(this).dotdotdot(o)});var $dot=this;$dot.data("dotdotdot")&&$dot.trigger("destroy.dot"),$dot.bind_events=function(){return $dot.bind("update.dot",function(e,c){e.preventDefault(),e.stopPropagation(),opts.maxHeight=typeof opts.height=="number"?opts.height:getTrueInnerHeight($dot),opts.maxHeight+=opts.tolerance,typeof c<"u"&&((typeof c=="string"||c instanceof HTMLElement)&&(c=$2("<div />").append(c).contents()),c instanceof $2&&(orgContent=c)),$inr=$dot.wrapInner('<div class="dotdotdot" />').children(),$inr.empty().append(orgContent.clone(!0)).css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var after=!1,trunc=!1;return conf.afterElement&&(after=conf.afterElement.clone(!0),conf.afterElement.remove()),test($inr,opts)&&(opts.wrap=="children"?trunc=children2($inr,opts,after):trunc=ellipsis($inr,$dot,$inr,opts,after)),$inr.replaceWith($inr.contents()),$inr=null,$2.isFunction(opts.callback)&&opts.callback.call($dot[0],trunc,orgContent),conf.isTruncated=trunc,trunc}).bind("isTruncated.dot",function(e,fn){return e.preventDefault(),e.stopPropagation(),typeof fn=="function"&&fn.call($dot[0],conf.isTruncated),conf.isTruncated}).bind("originalContent.dot",function(e,fn){return e.preventDefault(),e.stopPropagation(),typeof fn=="function"&&fn.call($dot[0],orgContent),orgContent}).bind("destroy.dot",function(e){e.preventDefault(),e.stopPropagation(),$dot.unwatch().unbind_events().empty().append(orgContent).data("dotdotdot",!1)}),$dot},$dot.unbind_events=function(){return $dot.unbind(".dot"),$dot},$dot.watch=function(){if($dot.unwatch(),opts.watch=="window"){var $window=$2(window),_wWidth=$window.width(),_wHeight=$window.height();$window.bind("resize.dot"+conf.dotId,function(){(_wWidth!=$window.width()||_wHeight!=$window.height()||!opts.windowResizeFix)&&(_wWidth=$window.width(),_wHeight=$window.height(),watchInt&&clearInterval(watchInt),watchInt=setTimeout(function(){$dot.trigger("update.dot")},10))})}else watchOrg=getSizes($dot),watchInt=setInterval(function(){var watchNew=getSizes($dot);(watchOrg.width!=watchNew.width||watchOrg.height!=watchNew.height)&&($dot.trigger("update.dot"),watchOrg=getSizes($dot))},100);return $dot},$dot.unwatch=function(){return $2(window).unbind("resize.dot"+conf.dotId),watchInt&&clearInterval(watchInt),$dot};var orgContent=$dot.contents(),opts=$2.extend(!0,{},$2.fn.dotdotdot.defaults,o),conf={},watchOrg={},watchInt=null,$inr=null;return conf.afterElement=getElement(opts.after,$dot),conf.isTruncated=!1,conf.dotId=dotId++,$dot.data("dotdotdot",!0).bind_events().trigger("update.dot"),opts.watch&&$dot.watch(),$dot},$2.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0,debug:!1};var dotId=1;function children2($elem,o,after){var $elements=$elem.children(),isTruncated=!1;$elem.empty();for(var a=0,l=$elements.length;a<l;a++){var $e=$elements.eq(a);if($elem.append($e),after&&$elem.append(after),test($elem,o)){$e.remove(),isTruncated=!0;break}else after&&after.remove()}return isTruncated}function ellipsis($elem,$d,$i,o,after){var $elements=$elem.contents(),isTruncated=!1;if($elem.empty(),test($i,o)){for(var $w=$elem.prev().contents(),$contents=$w.contents();$contents.size()!=0;)$w=$contents.eq(-1),$contents=$w.contents();var e=$w[0];if(typeof e<"u"){var txt=addEllipsis(getTextContent(e),o);setTextContent(e,txt)}return $elem.remove(),!0}for(var notx="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, select, optgroup, option, textarea, script, style",a=0,l=$elements.length;a<l&&!isTruncated;a++){var e=$elements[a],$e=$2(e);typeof e>"u"||($elem.append($e),after&&$elem[$elem.is(notx)?"after":"append"](after),e.nodeType==3?test($i,o)&&(isTruncated=ellipsisElement($e,$d,$i,o,after)):isTruncated=ellipsis($e,$d,$i,o,after),isTruncated||after&&after.remove())}return isTruncated}function ellipsisElement($e,$d,$i,o,after){var isTruncated=!1,e=$e[0];if(typeof e>"u")return!1;for(var seporator=o.wrap=="letter"?"":" ",textArr=getTextContent(e).split(seporator),position=-1,midPos=-1,startPos=0,endPos=textArr.length-1;startPos<=endPos;){var m=Math.floor((startPos+endPos)/2);if(m==midPos)break;midPos=m,setTextContent(e,textArr.slice(0,midPos+1).join(seporator)+o.ellipsis),test($i,o)?endPos=midPos:(position=midPos,startPos=midPos)}if(position!=-1&&!(textArr.length==1&&textArr[0].length==0)){var txt=addEllipsis(textArr.slice(0,position+1).join(seporator),o);isTruncated=!0,setTextContent(e,txt)}else{var $w=$e.parent();$e.remove();var afterLength=after?after.length:0;if($w.contents().size()>afterLength){var $n=$w.contents().eq(-1-afterLength);isTruncated=ellipsisElement($n,$d,$i,o,after)}else{var e=$w.prev().contents().eq(-1)[0];if(typeof e<"u"){var txt=addEllipsis(getTextContent(e),o);setTextContent(e,txt),$w.remove(),isTruncated=!0}}}return isTruncated}function test($i,o){return $i.innerHeight()>o.maxHeight}function addEllipsis(txt,o){for(;$2.inArray(txt.slice(-1),o.lastCharacter.remove)>-1;)txt=txt.slice(0,-1);return $2.inArray(txt.slice(-1),o.lastCharacter.noEllipsis)<0&&(txt+=o.ellipsis),txt}function getSizes($d){return{width:$d.innerWidth(),height:$d.innerHeight()}}function setTextContent(e,content){e.innerText?e.innerText=content:e.nodeValue?e.nodeValue=content:e.textContent&&(e.textContent=content)}function getTextContent(e){return e.innerText?e.innerText:e.nodeValue?e.nodeValue:e.textContent?e.textContent:""}function getElement(e,$i){return typeof e>"u"||!e?!1:typeof e=="string"?(e=$2(e,$i),e.length?e:!1):typeof e=="object"?typeof e.jquery>"u"?!1:e:!1}function getTrueInnerHeight($el){for(var h=$el.innerHeight(),a=["paddingTop","paddingBottom"],z=0,l=a.length;z<l;z++){var m=parseInt($el.css(a[z]),10);isNaN(m)&&(m=0),h-=m}return h}function debug2(d,m){return d&&(typeof m=="string"?m="dotdotdot: "+m:m=["dotdotdot:",m],typeof window.console<"u"&&typeof window.console.log<"u"&&window.console.log(m)),!1}var _orgHtml=$2.fn.html;$2.fn.html=function(str){return typeof str<"u"?this.data("dotdotdot")&&typeof str!="function"?(_orgHtml.call(this,str),this.trigger("update",[str])):_orgHtml.call(this,str):_orgHtml.call(this)};var _orgText=$2.fn.text;$2.fn.text=function(str){if(typeof str<"u"){if(this.data("dotdotdot")){_orgText.call(this,str);var temp=$2("<div />");return temp.text(str),str=temp.html(),temp.remove(),this.trigger("update",[str])}return _orgText.call(this,str)}return _orgText.call(this)}})(jQuery)}});var require_jquery_velocity_min=__commonJS({"vendor/jquery_plugins/jquery.velocity.min.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(function(a){"use strict";function b(a2){var b2=a2.length,d2=c.type(a2);return d2!=="function"&&!c.isWindow(a2)&&(!(a2.nodeType!==1||!b2)||d2==="array"||b2===0||typeof b2=="number"&&b2>0&&b2-1 in a2)}if(!a.jQuery){var c=function(a2,b2){return new c.fn.init(a2,b2)};c.isWindow=function(a2){return a2&&a2===a2.window},c.type=function(a2){return a2?typeof a2=="object"||typeof a2=="function"?e[g.call(a2)]||"object":typeof a2:a2+""},c.isArray=Array.isArray||function(a2){return c.type(a2)==="array"},c.isPlainObject=function(a2){var b2;if(!a2||c.type(a2)!=="object"||a2.nodeType||c.isWindow(a2))return!1;try{if(a2.constructor&&!f.call(a2,"constructor")&&!f.call(a2.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}for(b2 in a2);return b2===void 0||f.call(a2,b2)},c.each=function(a2,c2,d2){var e2,f2=0,g2=a2.length,h2=b(a2);if(d2){if(h2)for(;f2<g2&&(e2=c2.apply(a2[f2],d2),e2!==!1);f2++);else for(f2 in a2)if(a2.hasOwnProperty(f2)&&(e2=c2.apply(a2[f2],d2),e2===!1))break}else if(h2)for(;f2<g2&&(e2=c2.call(a2[f2],f2,a2[f2]),e2!==!1);f2++);else for(f2 in a2)if(a2.hasOwnProperty(f2)&&(e2=c2.call(a2[f2],f2,a2[f2]),e2===!1))break;return a2},c.data=function(a2,b2,e2){if(e2===void 0){var f2=a2[c.expando],g2=f2&&d[f2];if(b2===void 0)return g2;if(g2&&b2 in g2)return g2[b2]}else if(b2!==void 0){var h2=a2[c.expando]||(a2[c.expando]=++c.uuid);return d[h2]=d[h2]||{},d[h2][b2]=e2,e2}},c.removeData=function(a2,b2){var e2=a2[c.expando],f2=e2&&d[e2];f2&&(b2?c.each(b2,function(a3,b3){delete f2[b3]}):delete d[e2])},c.extend=function(){var a2,b2,d2,e2,f2,g2,h2=arguments[0]||{},i2=1,j2=arguments.length,k=!1;for(typeof h2=="boolean"&&(k=h2,h2=arguments[i2]||{},i2++),typeof h2!="object"&&c.type(h2)!=="function"&&(h2={}),i2===j2&&(h2=this,i2--);i2<j2;i2++)if(f2=arguments[i2])for(e2 in f2)f2.hasOwnProperty(e2)&&(a2=h2[e2],d2=f2[e2],h2!==d2&&(k&&d2&&(c.isPlainObject(d2)||(b2=c.isArray(d2)))?(b2?(b2=!1,g2=a2&&c.isArray(a2)?a2:[]):g2=a2&&c.isPlainObject(a2)?a2:{},h2[e2]=c.extend(k,g2,d2)):d2!==void 0&&(h2[e2]=d2)));return h2},c.queue=function(a2,d2,e2){function f2(a3,c2){var d3=c2||[];return a3&&(b(Object(a3))?function(a4,b2){for(var c3=+b2.length,d4=0,e3=a4.length;d4<c3;)a4[e3++]=b2[d4++];if(c3!==c3)for(;b2[d4]!==void 0;)a4[e3++]=b2[d4++];return a4.length=e3,a4}(d3,typeof a3=="string"?[a3]:a3):[].push.call(d3,a3)),d3}if(a2){d2=(d2||"fx")+"queue";var g2=c.data(a2,d2);return e2?(!g2||c.isArray(e2)?g2=c.data(a2,d2,f2(e2)):g2.push(e2),g2):g2||[]}},c.dequeue=function(a2,b2){c.each(a2.nodeType?[a2]:a2,function(a3,d2){b2=b2||"fx";var e2=c.queue(d2,b2),f2=e2.shift();f2==="inprogress"&&(f2=e2.shift()),f2&&(b2==="fx"&&e2.unshift("inprogress"),f2.call(d2,function(){c.dequeue(d2,b2)}))})},c.fn=c.prototype={init:function(a2){if(a2.nodeType)return this[0]=a2,this;throw new Error("Not a DOM node.")},offset:function(){var b2=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:b2.top+(a.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:b2.left+(a.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function a2(a3){for(var b3=a3.offsetParent;b3&&b3.nodeName.toLowerCase()!=="html"&&b3.style&&b3.style.position==="static";)b3=b3.offsetParent;return b3||document}var b2=this[0],d2=a2(b2),e2=this.offset(),f2=/^(?:body|html)$/i.test(d2.nodeName)?{top:0,left:0}:c(d2).offset();return e2.top-=parseFloat(b2.style.marginTop)||0,e2.left-=parseFloat(b2.style.marginLeft)||0,d2.style&&(f2.top+=parseFloat(d2.style.borderTopWidth)||0,f2.left+=parseFloat(d2.style.borderLeftWidth)||0),{top:e2.top-f2.top,left:e2.left-f2.left}}};var d={};c.expando="velocity"+new Date().getTime(),c.uuid=0;for(var e={},f=e.hasOwnProperty,g=e.toString,h="Boolean Number String Function Array Date RegExp Object Error".split(" "),i=0;i<h.length;i++)e["[object "+h[i]+"]"]=h[i].toLowerCase();c.fn.init.prototype=c.fn,a.Velocity={Utilities:c}}})(window),function(a){"use strict";typeof module2=="object"&&typeof module2.exports=="object"?module2.exports=a():typeof define=="function"&&define.amd?define(a):a()}(function(){"use strict";return function(a,b,c,d){function e(a2){for(var b2=-1,c2=a2?a2.length:0,d2=[];++b2<c2;){var e2=a2[b2];e2&&d2.push(e2)}return d2}function f(a2){return s.isWrapped(a2)?a2=[].slice.call(a2):s.isNode(a2)&&(a2=[a2]),a2}function g(a2){var b2=o.data(a2,"velocity");return b2===null?d:b2}function h(a2,b2){var c2=g(a2);c2&&c2.delayTimer&&!c2.delayPaused&&(c2.delayRemaining=c2.delay-b2+c2.delayBegin,c2.delayPaused=!0,clearTimeout(c2.delayTimer.setTimeout))}function i(a2,b2){var c2=g(a2);c2&&c2.delayTimer&&c2.delayPaused&&(c2.delayPaused=!1,c2.delayTimer.setTimeout=setTimeout(c2.delayTimer.next,c2.delayRemaining))}function j2(a2){return function(b2){return Math.round(b2*a2)*(1/a2)}}function k(a2,c2,d2,e2){function f2(a3,b2){return 1-3*b2+3*a3}function g2(a3,b2){return 3*b2-6*a3}function h2(a3){return 3*a3}function i2(a3,b2,c3){return((f2(b2,c3)*a3+g2(b2,c3))*a3+h2(b2))*a3}function j3(a3,b2,c3){return 3*f2(b2,c3)*a3*a3+2*g2(b2,c3)*a3+h2(b2)}function k2(b2,c3){for(var e3=0;e3<p2;++e3){var f3=j3(c3,a2,d2);if(f3===0)return c3;var g3=i2(c3,a2,d2)-b2;c3-=g3/f3}return c3}function l2(){for(var b2=0;b2<t2;++b2)x2[b2]=i2(b2*u23,a2,d2)}function m2(b2,c3,e3){var f3,g3,h3=0;do g3=c3+(e3-c3)/2,f3=i2(g3,a2,d2)-b2,f3>0?e3=g3:c3=g3;while(Math.abs(f3)>r3&&++h3<s2);return g3}function n2(b2){for(var c3=0,e3=1,f3=t2-1;e3!==f3&&x2[e3]<=b2;++e3)c3+=u23;--e3;var g3=(b2-x2[e3])/(x2[e3+1]-x2[e3]),h3=c3+g3*u23,i3=j3(h3,a2,d2);return i3>=q2?k2(b2,h3):i3===0?h3:m2(b2,c3,c3+u23)}function o2(){y2=!0,a2===c2&&d2===e2||l2()}var p2=4,q2=.001,r3=1e-7,s2=10,t2=11,u23=1/(t2-1),v2="Float32Array"in b;if(arguments.length!==4)return!1;for(var w2=0;w2<4;++w2)if(typeof arguments[w2]!="number"||isNaN(arguments[w2])||!isFinite(arguments[w2]))return!1;a2=Math.min(a2,1),d2=Math.min(d2,1),a2=Math.max(a2,0),d2=Math.max(d2,0);var x2=v2?new Float32Array(t2):new Array(t2),y2=!1,z2=function(b2){return y2||o2(),a2===c2&&d2===e2?b2:b2===0?0:b2===1?1:i2(n2(b2),c2,e2)};z2.getControlPoints=function(){return[{x:a2,y:c2},{x:d2,y:e2}]};var A2="generateBezier("+[a2,c2,d2,e2]+")";return z2.toString=function(){return A2},z2}function l(a2,b2){var c2=a2;return s.isString(a2)?w.Easings[a2]||(c2=!1):c2=s.isArray(a2)&&a2.length===1?j2.apply(null,a2):s.isArray(a2)&&a2.length===2?x.apply(null,a2.concat([b2])):!(!s.isArray(a2)||a2.length!==4)&&k.apply(null,a2),c2===!1&&(c2=w.Easings[w.defaults.easing]?w.defaults.easing:v),c2}function m(a2){if(a2){var b2=w.timestamp&&a2!==!0?a2:r2.now(),c2=w.State.calls.length;c2>1e4&&(w.State.calls=e(w.State.calls),c2=w.State.calls.length);for(var f2=0;f2<c2;f2++)if(w.State.calls[f2]){var h2=w.State.calls[f2],i2=h2[0],j3=h2[2],k2=h2[3],l2=!!k2,q2=null,t2=h2[5],u23=h2[6];if(k2||(k2=w.State.calls[f2][3]=b2-16),t2){if(t2.resume!==!0)continue;k2=h2[3]=Math.round(b2-u23-16),h2[5]=null}u23=h2[6]=b2-k2;for(var v2=Math.min(u23/j3.duration,1),x2=0,z2=i2.length;x2<z2;x2++){var B2=i2[x2],C=B2.element;if(g(C)){var D=!1;if(j3.display!==d&&j3.display!==null&&j3.display!=="none"){if(j3.display==="flex"){var E=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];o.each(E,function(a3,b3){y.setPropertyValue(C,"display",b3)})}y.setPropertyValue(C,"display",j3.display)}j3.visibility!==d&&j3.visibility!=="hidden"&&y.setPropertyValue(C,"visibility",j3.visibility);for(var F in B2)if(B2.hasOwnProperty(F)&&F!=="element"){var G,H=B2[F],I=s.isString(H.easing)?w.Easings[H.easing]:H.easing;if(s.isString(H.pattern)){var J=v2===1?function(a3,b3,c3){var d2=H.endValue[b3];return c3?Math.round(d2):d2}:function(a3,b3,c3){var d2=H.startValue[b3],e2=H.endValue[b3]-d2,f3=d2+e2*I(v2,j3,e2);return c3?Math.round(f3):f3};G=H.pattern.replace(/{(\d+)(!)?}/g,J)}else if(v2===1)G=H.endValue;else{var K2=H.endValue-H.startValue;G=H.startValue+K2*I(v2,j3,K2)}if(!l2&&G===H.currentValue)continue;if(H.currentValue=G,F==="tween")q2=G;else{var L;if(y.Hooks.registered[F]){L=y.Hooks.getRoot(F);var M=g(C).rootPropertyValueCache[L];M&&(H.rootPropertyValue=M)}var N=y.setPropertyValue(C,F,H.currentValue+(p<9&&parseFloat(G)===0?"":H.unitType),H.rootPropertyValue,H.scrollData);y.Hooks.registered[F]&&(y.Normalizations.registered[L]?g(C).rootPropertyValueCache[L]=y.Normalizations.registered[L]("extract",null,N[1]):g(C).rootPropertyValueCache[L]=N[1]),N[0]==="transform"&&(D=!0)}}j3.mobileHA&&g(C).transformCache.translate3d===d&&(g(C).transformCache.translate3d="(0px, 0px, 0px)",D=!0),D&&y.flushTransformCache(C)}}j3.display!==d&&j3.display!=="none"&&(w.State.calls[f2][2].display=!1),j3.visibility!==d&&j3.visibility!=="hidden"&&(w.State.calls[f2][2].visibility=!1),j3.progress&&j3.progress.call(h2[1],h2[1],v2,Math.max(0,k2+j3.duration-b2),k2,q2),v2===1&&n(f2)}}w.State.isTicking&&A(m)}function n(a2,b2){if(!w.State.calls[a2])return!1;for(var c2=w.State.calls[a2][0],e2=w.State.calls[a2][1],f2=w.State.calls[a2][2],h2=w.State.calls[a2][4],i2=!1,j3=0,k2=c2.length;j3<k2;j3++){var l2=c2[j3].element;b2||f2.loop||(f2.display==="none"&&y.setPropertyValue(l2,"display",f2.display),f2.visibility==="hidden"&&y.setPropertyValue(l2,"visibility",f2.visibility));var m2=g(l2);if(f2.loop!==!0&&(o.queue(l2)[1]===d||!/\.velocityQueueEntryFlag/i.test(o.queue(l2)[1]))&&m2){m2.isAnimating=!1,m2.rootPropertyValueCache={};var n2=!1;o.each(y.Lists.transforms3D,function(a3,b3){var c3=/^scale/.test(b3)?1:0,e3=m2.transformCache[b3];m2.transformCache[b3]!==d&&new RegExp("^\\("+c3+"[^.]").test(e3)&&(n2=!0,delete m2.transformCache[b3])}),f2.mobileHA&&(n2=!0,delete m2.transformCache.translate3d),n2&&y.flushTransformCache(l2),y.Values.removeClass(l2,"velocity-animating")}if(!b2&&f2.complete&&!f2.loop&&j3===k2-1)try{f2.complete.call(e2,e2)}catch(p2){setTimeout(function(){throw p2},1)}h2&&f2.loop!==!0&&h2(e2),m2&&f2.loop===!0&&!b2&&(o.each(m2.tweensContainer,function(a3,b3){if(/^rotate/.test(a3)&&(parseFloat(b3.startValue)-parseFloat(b3.endValue))%360===0){var c3=b3.startValue;b3.startValue=b3.endValue,b3.endValue=c3}/^backgroundPosition/.test(a3)&&parseFloat(b3.endValue)===100&&b3.unitType==="%"&&(b3.endValue=0,b3.startValue=100)}),w(l2,"reverse",{loop:!0,delay:f2.delay})),f2.queue!==!1&&o.dequeue(l2,f2.queue)}w.State.calls[a2]=!1;for(var q2=0,r3=w.State.calls.length;q2<r3;q2++)if(w.State.calls[q2]!==!1){i2=!0;break}i2===!1&&(w.State.isTicking=!1,delete w.State.calls,w.State.calls=[])}var o,p=function(){if(c.documentMode)return c.documentMode;for(var a2=7;a2>4;a2--){var b2=c.createElement("div");if(b2.innerHTML="<!--[if IE "+a2+"]><span></span><![endif]-->",b2.getElementsByTagName("span").length)return b2=null,a2}return d}(),q=function(){var a2=0;return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||function(b2){var c2,d2=new Date().getTime();return c2=Math.max(0,16-(d2-a2)),a2=d2+c2,setTimeout(function(){b2(d2+c2)},c2)}}(),r2=function(){var a2=b.performance||{};if(!a2.hasOwnProperty("now")){var c2=a2.timing&&a2.timing.domComplete?a2.timing.domComplete:new Date().getTime();a2.now=function(){return new Date().getTime()-c2}}return a2}(),s={isNumber:function(a2){return typeof a2=="number"},isString:function(a2){return typeof a2=="string"},isArray:Array.isArray||function(a2){return Object.prototype.toString.call(a2)==="[object Array]"},isFunction:function(a2){return Object.prototype.toString.call(a2)==="[object Function]"},isNode:function(a2){return a2&&a2.nodeType},isNodeList:function(a2){return typeof a2=="object"&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(a2))&&a2.length!==d&&(a2.length===0||typeof a2[0]=="object"&&a2[0].nodeType>0)},isWrapped:function(a2){return a2&&(s.isArray(a2)||s.isNumber(a2.length)&&!s.isString(a2)&&!s.isFunction(a2))},isSVG:function(a2){return b.SVGElement&&a2 instanceof b.SVGElement},isEmptyObject:function(a2){for(var b2 in a2)if(a2.hasOwnProperty(b2))return!1;return!0}},t=!1;if(a.fn&&a.fn.jquery?(o=a,t=!0):o=b.Velocity.Utilities,p<=8&&!t)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(p<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var u22=400,v="swing",w={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:b.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:c.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:o,Redirects:{},Easings:{},Promise:b.Promise,defaults:{queue:"",duration:u22,easing:v,begin:d,complete:d,progress:d,display:d,visibility:d,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(a2){o.data(a2,"velocity",{isSVG:s.isSVG(a2),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:4,patch:0},debug:!1,timestamp:!0,pauseAll:function(a2){var b2=new Date().getTime();o.each(w.State.calls,function(b3,c2){if(c2){if(a2!==d&&(c2[2].queue!==a2||c2[2].queue===!1))return!0;c2[5]={resume:!1}}}),o.each(w.State.delayedElements,function(a3,c2){c2&&h(c2,b2)})},resumeAll:function(a2){var b2=new Date().getTime();o.each(w.State.calls,function(b3,c2){if(c2){if(a2!==d&&(c2[2].queue!==a2||c2[2].queue===!1))return!0;c2[5]&&(c2[5].resume=!0)}}),o.each(w.State.delayedElements,function(a3,c2){c2&&i(c2,b2)})}};b.pageYOffset!==d?(w.State.scrollAnchor=b,w.State.scrollPropertyLeft="pageXOffset",w.State.scrollPropertyTop="pageYOffset"):(w.State.scrollAnchor=c.documentElement||c.body.parentNode||c.body,w.State.scrollPropertyLeft="scrollLeft",w.State.scrollPropertyTop="scrollTop");var x=function(){function a2(a3){return-a3.tension*a3.x-a3.friction*a3.v}function b2(b3,c3,d2){var e2={x:b3.x+d2.dx*c3,v:b3.v+d2.dv*c3,tension:b3.tension,friction:b3.friction};return{dx:e2.v,dv:a2(e2)}}function c2(c3,d2){var e2={dx:c3.v,dv:a2(c3)},f2=b2(c3,.5*d2,e2),g2=b2(c3,.5*d2,f2),h2=b2(c3,d2,g2),i2=1/6*(e2.dx+2*(f2.dx+g2.dx)+h2.dx),j3=1/6*(e2.dv+2*(f2.dv+g2.dv)+h2.dv);return c3.x=c3.x+i2*d2,c3.v=c3.v+j3*d2,c3}return function d2(a3,b3,e2){var f2,g2,h2,i2={x:-1,v:0,tension:null,friction:null},j3=[0],k2=0,l2=1e-4,m2=.016;for(a3=parseFloat(a3)||500,b3=parseFloat(b3)||20,e2=e2||null,i2.tension=a3,i2.friction=b3,f2=e2!==null,f2?(k2=d2(a3,b3),g2=k2/e2*m2):g2=m2;h2=c2(h2||i2,g2),j3.push(1+h2.x),k2+=16,Math.abs(h2.x)>l2&&Math.abs(h2.v)>l2;);return f2?function(a4){return j3[a4*(j3.length-1)|0]}:k2}}();w.Easings={linear:function(a2){return a2},swing:function(a2){return .5-Math.cos(a2*Math.PI)/2},spring:function(a2){return 1-Math.cos(4.5*a2*Math.PI)*Math.exp(6*-a2)}},o.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(a2,b2){w.Easings[b2[0]]=k.apply(null,b2[1])});var y=w.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var a2=0;a2<y.Lists.colors.length;a2++){var b2=y.Lists.colors[a2]==="color"?"0 0 0 1":"255 255 255 1";y.Hooks.templates[y.Lists.colors[a2]]=["Red Green Blue Alpha",b2]}var c2,d2,e2;if(p){for(c2 in y.Hooks.templates)if(y.Hooks.templates.hasOwnProperty(c2)){d2=y.Hooks.templates[c2],e2=d2[0].split(" ");var f2=d2[1].match(y.RegEx.valueSplit);e2[0]==="Color"&&(e2.push(e2.shift()),f2.push(f2.shift()),y.Hooks.templates[c2]=[e2.join(" "),f2.join(" ")])}}for(c2 in y.Hooks.templates)if(y.Hooks.templates.hasOwnProperty(c2)){d2=y.Hooks.templates[c2],e2=d2[0].split(" ");for(var g2 in e2)if(e2.hasOwnProperty(g2)){var h2=c2+e2[g2],i2=g2;y.Hooks.registered[h2]=[c2,i2]}}},getRoot:function(a2){var b2=y.Hooks.registered[a2];return b2?b2[0]:a2},getUnit:function(a2,b2){var c2=(a2.substr(b2||0,5).match(/^[a-z%]+/)||[])[0]||"";return c2&&y.Lists.units.indexOf(c2)>=0?c2:""},fixColors:function(a2){return a2.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,function(a3,b2,c2){return y.Lists.colorNames.hasOwnProperty(c2)?(b2||"rgba(")+y.Lists.colorNames[c2]+(b2?"":",1)"):b2+c2})},cleanRootPropertyValue:function(a2,b2){return y.RegEx.valueUnwrap.test(b2)&&(b2=b2.match(y.RegEx.valueUnwrap)[1]),y.Values.isCSSNullValue(b2)&&(b2=y.Hooks.templates[a2][1]),b2},extractValue:function(a2,b2){var c2=y.Hooks.registered[a2];if(c2){var d2=c2[0],e2=c2[1];return b2=y.Hooks.cleanRootPropertyValue(d2,b2),b2.toString().match(y.RegEx.valueSplit)[e2]}return b2},injectValue:function(a2,b2,c2){var d2=y.Hooks.registered[a2];if(d2){var e2,f2,g2=d2[0],h2=d2[1];return c2=y.Hooks.cleanRootPropertyValue(g2,c2),e2=c2.toString().match(y.RegEx.valueSplit),e2[h2]=b2,f2=e2.join(" ")}return c2}},Normalizations:{registered:{clip:function(a2,b2,c2){switch(a2){case"name":return"clip";case"extract":var d2;return y.RegEx.wrappedValueAlreadyExtracted.test(c2)?d2=c2:(d2=c2.toString().match(y.RegEx.valueUnwrap),d2=d2?d2[1].replace(/,(\s+)?/g," "):c2),d2;case"inject":return"rect("+c2+")"}},blur:function(a2,b2,c2){switch(a2){case"name":return w.State.isFirefox?"filter":"-webkit-filter";case"extract":var d2=parseFloat(c2);if(!d2&&d2!==0){var e2=c2.toString().match(/blur\(([0-9]+[A-z]+)\)/i);d2=e2?e2[1]:0}return d2;case"inject":return parseFloat(c2)?"blur("+c2+")":"none"}},opacity:function(a2,b2,c2){if(p<=8)switch(a2){case"name":return"filter";case"extract":var d2=c2.toString().match(/alpha\(opacity=(.*)\)/i);return c2=d2?d2[1]/100:1;case"inject":return b2.style.zoom=1,parseFloat(c2)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(c2),10)+")"}else switch(a2){case"name":return"opacity";case"extract":return c2;case"inject":return c2}}},register:function(){function a2(a3,b3,c3){var d2=y.getPropertyValue(b3,"boxSizing").toString().toLowerCase()==="border-box";if(d2===(c3||!1)){var e3,f2,g2=0,h2=a3==="width"?["Left","Right"]:["Top","Bottom"],i2=["padding"+h2[0],"padding"+h2[1],"border"+h2[0]+"Width","border"+h2[1]+"Width"];for(e3=0;e3<i2.length;e3++)f2=parseFloat(y.getPropertyValue(b3,i2[e3])),isNaN(f2)||(g2+=f2);return c3?-g2:g2}return 0}function b2(b3,c3){return function(d2,e3,f2){switch(d2){case"name":return b3;case"extract":return parseFloat(f2)+a2(b3,e3,c3);case"inject":return parseFloat(f2)-a2(b3,e3,c3)+"px"}}}p&&!(p>9)||w.State.isGingerbread||(y.Lists.transformsBase=y.Lists.transformsBase.concat(y.Lists.transforms3D));for(var c2=0;c2<y.Lists.transformsBase.length;c2++)(function(){var a3=y.Lists.transformsBase[c2];y.Normalizations.registered[a3]=function(b3,c3,e3){switch(b3){case"name":return"transform";case"extract":return g(c3)===d||g(c3).transformCache[a3]===d?/^scale/i.test(a3)?1:0:g(c3).transformCache[a3].replace(/[()]/g,"");case"inject":var f2=!1;switch(a3.substr(0,a3.length-1)){case"translate":f2=!/(%|px|em|rem|vw|vh|\d)$/i.test(e3);break;case"scal":case"scale":w.State.isAndroid&&g(c3).transformCache[a3]===d&&e3<1&&(e3=1),f2=!/(\d)$/i.test(e3);break;case"skew":f2=!/(deg|\d)$/i.test(e3);break;case"rotate":f2=!/(deg|\d)$/i.test(e3)}return f2||(g(c3).transformCache[a3]="("+e3+")"),g(c3).transformCache[a3]}}})();for(var e2=0;e2<y.Lists.colors.length;e2++)(function(){var a3=y.Lists.colors[e2];y.Normalizations.registered[a3]=function(b3,c3,e3){switch(b3){case"name":return a3;case"extract":var f2;if(y.RegEx.wrappedValueAlreadyExtracted.test(e3))f2=e3;else{var g2,h2={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(e3)?g2=h2[e3]!==d?h2[e3]:h2.black:y.RegEx.isHex.test(e3)?g2="rgb("+y.Values.hexToRgb(e3).join(" ")+")":/^rgba?\(/i.test(e3)||(g2=h2.black),f2=(g2||e3).toString().match(y.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!p||p>8)&&f2.split(" ").length===3&&(f2+=" 1"),f2;case"inject":return/^rgb/.test(e3)?e3:(p<=8?e3.split(" ").length===4&&(e3=e3.split(/\s+/).slice(0,3).join(" ")):e3.split(" ").length===3&&(e3+=" 1"),(p<=8?"rgb":"rgba")+"("+e3.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}})();y.Normalizations.registered.innerWidth=b2("width",!0),y.Normalizations.registered.innerHeight=b2("height",!0),y.Normalizations.registered.outerWidth=b2("width"),y.Normalizations.registered.outerHeight=b2("height")}},Names:{camelCase:function(a2){return a2.replace(/-(\w)/g,function(a3,b2){return b2.toUpperCase()})},SVGAttribute:function(a2){var b2="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(p||w.State.isAndroid&&!w.State.isChrome)&&(b2+="|transform"),new RegExp("^("+b2+")$","i").test(a2)},prefixCheck:function(a2){if(w.State.prefixMatches[a2])return[w.State.prefixMatches[a2],!0];for(var b2=["","Webkit","Moz","ms","O"],c2=0,d2=b2.length;c2<d2;c2++){var e2;if(e2=c2===0?a2:b2[c2]+a2.replace(/^\w/,function(a3){return a3.toUpperCase()}),s.isString(w.State.prefixElement.style[e2]))return w.State.prefixMatches[a2]=e2,[e2,!0]}return[a2,!1]}},Values:{hexToRgb:function(a2){var b2,c2=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d2=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a2=a2.replace(c2,function(a3,b3,c3,d3){return b3+b3+c3+c3+d3+d3}),b2=d2.exec(a2),b2?[parseInt(b2[1],16),parseInt(b2[2],16),parseInt(b2[3],16)]:[0,0,0]},isCSSNullValue:function(a2){return!a2||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a2)},getUnitType:function(a2){return/^(rotate|skew)/i.test(a2)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a2)?"":"px"},getDisplayType:function(a2){var b2=a2&&a2.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b2)?"inline":/^(li)$/i.test(b2)?"list-item":/^(tr)$/i.test(b2)?"table-row":/^(table)$/i.test(b2)?"table":/^(tbody)$/i.test(b2)?"table-row-group":"block"},addClass:function(a2,b2){if(a2)if(a2.classList)a2.classList.add(b2);else if(s.isString(a2.className))a2.className+=(a2.className.length?" ":"")+b2;else{var c2=a2.getAttribute(p<=7?"className":"class")||"";a2.setAttribute("class",c2+(c2?" ":"")+b2)}},removeClass:function(a2,b2){if(a2)if(a2.classList)a2.classList.remove(b2);else if(s.isString(a2.className))a2.className=a2.className.toString().replace(new RegExp("(^|\\s)"+b2.split(" ").join("|")+"(\\s|$)","gi")," ");else{var c2=a2.getAttribute(p<=7?"className":"class")||"";a2.setAttribute("class",c2.replace(new RegExp("(^|s)"+b2.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(a2,c2,e2,f2){function h2(a3,c3){var e3=0;if(p<=8)e3=o.css(a3,c3);else{var i3=!1;/^(width|height)$/.test(c3)&&y.getPropertyValue(a3,"display")===0&&(i3=!0,y.setPropertyValue(a3,"display",y.Values.getDisplayType(a3)));var j4=function(){i3&&y.setPropertyValue(a3,"display","none")};if(!f2){if(c3==="height"&&y.getPropertyValue(a3,"boxSizing").toString().toLowerCase()!=="border-box"){var k3=a3.offsetHeight-(parseFloat(y.getPropertyValue(a3,"borderTopWidth"))||0)-(parseFloat(y.getPropertyValue(a3,"borderBottomWidth"))||0)-(parseFloat(y.getPropertyValue(a3,"paddingTop"))||0)-(parseFloat(y.getPropertyValue(a3,"paddingBottom"))||0);return j4(),k3}if(c3==="width"&&y.getPropertyValue(a3,"boxSizing").toString().toLowerCase()!=="border-box"){var l3=a3.offsetWidth-(parseFloat(y.getPropertyValue(a3,"borderLeftWidth"))||0)-(parseFloat(y.getPropertyValue(a3,"borderRightWidth"))||0)-(parseFloat(y.getPropertyValue(a3,"paddingLeft"))||0)-(parseFloat(y.getPropertyValue(a3,"paddingRight"))||0);return j4(),l3}}var m3;m3=g(a3)===d?b.getComputedStyle(a3,null):g(a3).computedStyle?g(a3).computedStyle:g(a3).computedStyle=b.getComputedStyle(a3,null),c3==="borderColor"&&(c3="borderTopColor"),e3=p===9&&c3==="filter"?m3.getPropertyValue(c3):m3[c3],e3!==""&&e3!==null||(e3=a3.style[c3]),j4()}if(e3==="auto"&&/^(top|right|bottom|left)$/i.test(c3)){var n3=h2(a3,"position");(n3==="fixed"||n3==="absolute"&&/top|left/i.test(c3))&&(e3=o(a3).position()[c3]+"px")}return e3}var i2;if(y.Hooks.registered[c2]){var j3=c2,k2=y.Hooks.getRoot(j3);e2===d&&(e2=y.getPropertyValue(a2,y.Names.prefixCheck(k2)[0])),y.Normalizations.registered[k2]&&(e2=y.Normalizations.registered[k2]("extract",a2,e2)),i2=y.Hooks.extractValue(j3,e2)}else if(y.Normalizations.registered[c2]){var l2,m2;l2=y.Normalizations.registered[c2]("name",a2),l2!=="transform"&&(m2=h2(a2,y.Names.prefixCheck(l2)[0]),y.Values.isCSSNullValue(m2)&&y.Hooks.templates[c2]&&(m2=y.Hooks.templates[c2][1])),i2=y.Normalizations.registered[c2]("extract",a2,m2)}if(!/^[\d-]/.test(i2)){var n2=g(a2);if(n2&&n2.isSVG&&y.Names.SVGAttribute(c2))if(/^(height|width)$/i.test(c2))try{i2=a2.getBBox()[c2]}catch{i2=0}else i2=a2.getAttribute(c2);else i2=h2(a2,y.Names.prefixCheck(c2)[0])}return y.Values.isCSSNullValue(i2)&&(i2=0),w.debug>=2&&console.log("Get "+c2+": "+i2),i2},setPropertyValue:function(a2,c2,d2,e2,f2){var h2=c2;if(c2==="scroll")f2.container?f2.container["scroll"+f2.direction]=d2:f2.direction==="Left"?b.scrollTo(d2,f2.alternateValue):b.scrollTo(f2.alternateValue,d2);else if(y.Normalizations.registered[c2]&&y.Normalizations.registered[c2]("name",a2)==="transform")y.Normalizations.registered[c2]("inject",a2,d2),h2="transform",d2=g(a2).transformCache[c2];else{if(y.Hooks.registered[c2]){var i2=c2,j3=y.Hooks.getRoot(c2);e2=e2||y.getPropertyValue(a2,j3),d2=y.Hooks.injectValue(i2,d2,e2),c2=j3}if(y.Normalizations.registered[c2]&&(d2=y.Normalizations.registered[c2]("inject",a2,d2),c2=y.Normalizations.registered[c2]("name",a2)),h2=y.Names.prefixCheck(c2)[0],p<=8)try{a2.style[h2]=d2}catch{w.debug&&console.log("Browser does not support ["+d2+"] for ["+h2+"]")}else{var l2=g(a2);l2&&l2.isSVG&&y.Names.SVGAttribute(c2)?a2.setAttribute(c2,d2):a2.style[h2]=d2}w.debug>=2&&console.log("Set "+c2+" ("+h2+"): "+d2)}return[h2,d2]},flushTransformCache:function(a2){var b2="",c2=g(a2);if((p||w.State.isAndroid&&!w.State.isChrome)&&c2&&c2.isSVG){var d2=function(b3){return parseFloat(y.getPropertyValue(a2,b3))},e2={translate:[d2("translateX"),d2("translateY")],skewX:[d2("skewX")],skewY:[d2("skewY")],scale:d2("scale")!==1?[d2("scale"),d2("scale")]:[d2("scaleX"),d2("scaleY")],rotate:[d2("rotateZ"),0,0]};o.each(g(a2).transformCache,function(a3){/^translate/i.test(a3)?a3="translate":/^scale/i.test(a3)?a3="scale":/^rotate/i.test(a3)&&(a3="rotate"),e2[a3]&&(b2+=a3+"("+e2[a3].join(" ")+") ",delete e2[a3])})}else{var f2,h2;o.each(g(a2).transformCache,function(c3){return f2=g(a2).transformCache[c3],c3==="transformPerspective"?(h2=f2,!0):(p===9&&c3==="rotateZ"&&(c3="rotate"),void(b2+=c3+f2+" "))}),h2&&(b2="perspective"+h2+" "+b2)}y.setPropertyValue(a2,"transform",b2)}};y.Hooks.register(),y.Normalizations.register(),w.hook=function(a2,b2,c2){var e2;return a2=f(a2),o.each(a2,function(a3,f2){if(g(f2)===d&&w.init(f2),c2===d)e2===d&&(e2=y.getPropertyValue(f2,b2));else{var h2=y.setPropertyValue(f2,b2,c2);h2[0]==="transform"&&w.CSS.flushTransformCache(f2),e2=h2}}),e2};var z=function(){function a2(){return k2?A2.promise||null:p2}function e2(a3,e3){function f2(f3){var k4,n3;if(i2.begin&&C===0)try{i2.begin.call(r3,r3)}catch(p3){setTimeout(function(){throw p3},1)}if(F==="scroll"){var q3,u23,x3,z2=/^x$/i.test(i2.axis)?"Left":"Top",D2=parseFloat(i2.offset)||0;i2.container?s.isWrapped(i2.container)||s.isNode(i2.container)?(i2.container=i2.container[0]||i2.container,q3=i2.container["scroll"+z2],x3=q3+o(a3).position()[z2.toLowerCase()]+D2):i2.container=null:(q3=w.State.scrollAnchor[w.State["scrollProperty"+z2]],u23=w.State.scrollAnchor[w.State["scrollProperty"+(z2==="Left"?"Top":"Left")]],x3=o(a3).offset()[z2.toLowerCase()]+D2),j4={scroll:{rootPropertyValue:!1,startValue:q3,currentValue:q3,endValue:x3,unitType:"",easing:i2.easing,scrollData:{container:i2.container,direction:z2,alternateValue:u23}},element:a3},w.debug&&console.log("tweensContainer (scroll): ",j4.scroll,a3)}else if(F==="reverse"){if(k4=g(a3),!k4)return;if(!k4.tweensContainer)return void o.dequeue(a3,i2.queue);k4.opts.display==="none"&&(k4.opts.display="auto"),k4.opts.visibility==="hidden"&&(k4.opts.visibility="visible"),k4.opts.loop=!1,k4.opts.begin=null,k4.opts.complete=null,v2.easing||delete i2.easing,v2.duration||delete i2.duration,i2=o.extend({},k4.opts,i2),n3=o.extend(!0,{},k4?k4.tweensContainer:null);for(var E2 in n3)if(n3.hasOwnProperty(E2)&&E2!=="element"){var G2=n3[E2].startValue;n3[E2].startValue=n3[E2].currentValue=n3[E2].endValue,n3[E2].endValue=G2,s.isEmptyObject(v2)||(n3[E2].easing=i2.easing),w.debug&&console.log("reverse tweensContainer ("+E2+"): "+JSON.stringify(n3[E2]),a3)}j4=n3}else if(F==="start"){k4=g(a3),k4&&k4.tweensContainer&&k4.isAnimating===!0&&(n3=k4.tweensContainer);var H2=function(b2,c2){var d2,f4,g2;return s.isFunction(b2)&&(b2=b2.call(a3,e3,B2)),s.isArray(b2)?(d2=b2[0],!s.isArray(b2[1])&&/^[\d-]/.test(b2[1])||s.isFunction(b2[1])||y.RegEx.isHex.test(b2[1])?g2=b2[1]:s.isString(b2[1])&&!y.RegEx.isHex.test(b2[1])&&w.Easings[b2[1]]||s.isArray(b2[1])?(f4=c2?b2[1]:l(b2[1],i2.duration),g2=b2[2]):g2=b2[1]||b2[2]):d2=b2,c2||(f4=f4||i2.easing),s.isFunction(d2)&&(d2=d2.call(a3,e3,B2)),s.isFunction(g2)&&(g2=g2.call(a3,e3,B2)),[d2||0,f4,g2]},I2=function(e4,f4){var g2,l2=y.Hooks.getRoot(e4),m2=!1,p3=f4[0],q4=f4[1],r4=f4[2];if(!(k4&&k4.isSVG||l2==="tween"||y.Names.prefixCheck(l2)[1]!==!1||y.Normalizations.registered[l2]!==d))return void(w.debug&&console.log("Skipping ["+l2+"] due to a lack of browser support."));(i2.display!==d&&i2.display!==null&&i2.display!=="none"||i2.visibility!==d&&i2.visibility!=="hidden")&&/opacity|filter/.test(e4)&&!r4&&p3!==0&&(r4=0),i2._cacheValues&&n3&&n3[e4]?(r4===d&&(r4=n3[e4].endValue+n3[e4].unitType),m2=k4.rootPropertyValueCache[l2]):y.Hooks.registered[e4]?r4===d?(m2=y.getPropertyValue(a3,l2),r4=y.getPropertyValue(a3,e4,m2)):m2=y.Hooks.templates[l2][1]:r4===d&&(r4=y.getPropertyValue(a3,e4));var t3,u24,v3,x4=!1,z3=function(a4,b2){var c2,d2;return d2=(b2||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(a5){return c2=a5,""}),c2||(c2=y.Values.getUnitType(a4)),[d2,c2]};if(r4!==p3&&s.isString(r4)&&s.isString(p3)){g2="";var A3=0,B3=0,C2=[],D3=[],E3=0,F2=0,G3=0;for(r4=y.Hooks.fixColors(r4),p3=y.Hooks.fixColors(p3);A3<r4.length&&B3<p3.length;){var H3=r4[A3],I3=p3[B3];if(/[\d\.]/.test(H3)&&/[\d\.]/.test(I3)){for(var J3=H3,K4=I3,M2=".",N3=".";++A3<r4.length;){if(H3=r4[A3],H3===M2)M2="..";else if(!/\d/.test(H3))break;J3+=H3}for(;++B3<p3.length;){if(I3=p3[B3],I3===N3)N3="..";else if(!/\d/.test(I3))break;K4+=I3}var O3=y.Hooks.getUnit(r4,A3),P3=y.Hooks.getUnit(p3,B3);if(A3+=O3.length,B3+=P3.length,O3===P3)J3===K4?g2+=J3+O3:(g2+="{"+C2.length+(F2?"!":"")+"}"+O3,C2.push(parseFloat(J3)),D3.push(parseFloat(K4)));else{var Q2=parseFloat(J3),R2=parseFloat(K4);g2+=(E3<5?"calc":"")+"("+(Q2?"{"+C2.length+(F2?"!":"")+"}":"0")+O3+" + "+(R2?"{"+(C2.length+1)+(F2?"!":"")+"}":"0")+P3+")",Q2&&(C2.push(parseFloat(J3)),C2.push(parseFloat(0))),R2&&(D3.push(parseFloat(0)),D3.push(parseFloat(K4)))}}else{if(H3!==I3){E3=0;break}g2+=H3,A3++,B3++,E3===0&&H3==="c"||E3===1&&H3==="a"||E3===2&&H3==="l"||E3===3&&H3==="c"||E3>=4&&H3==="("?E3++:(E3&&E3<5||E3>=4&&H3===")"&&--E3<5)&&(E3=0),F2===0&&H3==="r"||F2===1&&H3==="g"||F2===2&&H3==="b"||F2===3&&H3==="a"||F2>=3&&H3==="("?(F2===3&&H3==="a"&&(G3=1),F2++):G3&&H3===","?++G3>3&&(F2=G3=0):(G3&&F2<(G3?5:4)||F2>=(G3?4:3)&&H3===")"&&--F2<(G3?5:4))&&(F2=G3=0)}}A3===r4.length&&B3===p3.length||(w.debug&&console.error('Trying to pattern match mis-matched strings ["'+p3+'", "'+r4+'"]'),g2=d),g2&&(C2.length?(w.debug&&console.log('Pattern found "'+g2+'" -> ',C2,D3,"["+r4+","+p3+"]"),r4=C2,p3=D3,u24=v3=""):g2=d)}g2||(t3=z3(e4,r4),r4=t3[0],v3=t3[1],t3=z3(e4,p3),p3=t3[0].replace(/^([+-\/*])=/,function(a4,b2){return x4=b2,""}),u24=t3[1],r4=parseFloat(r4)||0,p3=parseFloat(p3)||0,u24==="%"&&(/^(fontSize|lineHeight)$/.test(e4)?(p3/=100,u24="em"):/^scale/.test(e4)?(p3/=100,u24=""):/(Red|Green|Blue)$/i.test(e4)&&(p3=p3/100*255,u24="")));var S19=function(){var d2={myParent:a3.parentNode||c.body,position:y.getPropertyValue(a3,"position"),fontSize:y.getPropertyValue(a3,"fontSize")},e5=d2.position===L.lastPosition&&d2.myParent===L.lastParent,f5=d2.fontSize===L.lastFontSize;L.lastParent=d2.myParent,L.lastPosition=d2.position,L.lastFontSize=d2.fontSize;var g3=100,h3={};if(f5&&e5)h3.emToPx=L.lastEmToPx,h3.percentToPxWidth=L.lastPercentToPxWidth,h3.percentToPxHeight=L.lastPercentToPxHeight;else{var i3=k4&&k4.isSVG?c.createElementNS("http://www.w3.org/2000/svg","rect"):c.createElement("div");w.init(i3),d2.myParent.appendChild(i3),o.each(["overflow","overflowX","overflowY"],function(a4,b2){w.CSS.setPropertyValue(i3,b2,"hidden")}),w.CSS.setPropertyValue(i3,"position",d2.position),w.CSS.setPropertyValue(i3,"fontSize",d2.fontSize),w.CSS.setPropertyValue(i3,"boxSizing","content-box"),o.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(a4,b2){w.CSS.setPropertyValue(i3,b2,g3+"%")}),w.CSS.setPropertyValue(i3,"paddingLeft",g3+"em"),h3.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(y.getPropertyValue(i3,"width",null,!0))||1)/g3,h3.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(y.getPropertyValue(i3,"height",null,!0))||1)/g3,h3.emToPx=L.lastEmToPx=(parseFloat(y.getPropertyValue(i3,"paddingLeft"))||1)/g3,d2.myParent.removeChild(i3)}return L.remToPx===null&&(L.remToPx=parseFloat(y.getPropertyValue(c.body,"fontSize"))||16),L.vwToPx===null&&(L.vwToPx=parseFloat(b.innerWidth)/100,L.vhToPx=parseFloat(b.innerHeight)/100),h3.remToPx=L.remToPx,h3.vwToPx=L.vwToPx,h3.vhToPx=L.vhToPx,w.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h3),a3),h3};if(/[\/*]/.test(x4))u24=v3;else if(v3!==u24&&r4!==0)if(p3===0)u24=v3;else{h2=h2||S19();var T2=/margin|padding|left|right|width|text|word|letter/i.test(e4)||/X$/.test(e4)||e4==="x"?"x":"y";switch(v3){case"%":r4*=T2==="x"?h2.percentToPxWidth:h2.percentToPxHeight;break;case"px":break;default:r4*=h2[v3+"ToPx"]}switch(u24){case"%":r4*=1/(T2==="x"?h2.percentToPxWidth:h2.percentToPxHeight);break;case"px":break;default:r4*=1/h2[u24+"ToPx"]}}switch(x4){case"+":p3=r4+p3;break;case"-":p3=r4-p3;break;case"*":p3=r4*p3;break;case"/":p3=r4/p3}j4[e4]={rootPropertyValue:m2,startValue:r4,currentValue:r4,endValue:p3,unitType:u24,easing:q4},g2&&(j4[e4].pattern=g2),w.debug&&console.log("tweensContainer ("+e4+"): "+JSON.stringify(j4[e4]),a3)};for(var J2 in t2)if(t2.hasOwnProperty(J2)){var K3=y.Names.camelCase(J2),N2=H2(t2[J2]);if(y.Lists.colors.indexOf(K3)>=0){var O2=N2[0],P2=N2[1],Q=N2[2];if(y.RegEx.isHex.test(O2)){for(var R=["Red","Green","Blue"],S18=y.Values.hexToRgb(O2),T=Q?y.Values.hexToRgb(Q):d,U=0;U<R.length;U++){var V=[S18[U]];P2&&V.push(P2),T!==d&&V.push(T[U]),I2(K3+R[U],V)}continue}}I2(K3,N2)}j4.element=a3}j4.element&&(y.Values.addClass(a3,"velocity-animating"),M.push(j4),k4=g(a3),k4&&(i2.queue===""&&(k4.tweensContainer=j4,k4.opts=i2),k4.isAnimating=!0),C===B2-1?(w.State.calls.push([M,r3,i2,null,A2.resolver,null,0]),w.State.isTicking===!1&&(w.State.isTicking=!0,m())):C++)}var h2,i2=o.extend({},w.defaults,v2),j4={};switch(g(a3)===d&&w.init(a3),parseFloat(i2.delay)&&i2.queue!==!1&&o.queue(a3,i2.queue,function(b2){w.velocityQueueEntryFlag=!0;var c2=w.State.delayedElements.count++;w.State.delayedElements[c2]=a3;var d2=function(a4){return function(){w.State.delayedElements[a4]=!1,b2()}}(c2);g(a3).delayBegin=new Date().getTime(),g(a3).delay=parseFloat(i2.delay),g(a3).delayTimer={setTimeout:setTimeout(b2,parseFloat(i2.delay)),next:d2}}),i2.duration.toString().toLowerCase()){case"fast":i2.duration=200;break;case"normal":i2.duration=u22;break;case"slow":i2.duration=600;break;default:i2.duration=parseFloat(i2.duration)||1}if(w.mock!==!1&&(w.mock===!0?i2.duration=i2.delay=1:(i2.duration*=parseFloat(w.mock)||1,i2.delay*=parseFloat(w.mock)||1)),i2.easing=l(i2.easing,i2.duration),i2.begin&&!s.isFunction(i2.begin)&&(i2.begin=null),i2.progress&&!s.isFunction(i2.progress)&&(i2.progress=null),i2.complete&&!s.isFunction(i2.complete)&&(i2.complete=null),i2.display!==d&&i2.display!==null&&(i2.display=i2.display.toString().toLowerCase(),i2.display==="auto"&&(i2.display=w.CSS.Values.getDisplayType(a3))),i2.visibility!==d&&i2.visibility!==null&&(i2.visibility=i2.visibility.toString().toLowerCase()),i2.mobileHA=i2.mobileHA&&w.State.isMobile&&!w.State.isGingerbread,i2.queue===!1)if(i2.delay){var k3=w.State.delayedElements.count++;w.State.delayedElements[k3]=a3;var n2=function(a4){return function(){w.State.delayedElements[a4]=!1,f2()}}(k3);g(a3).delayBegin=new Date().getTime(),g(a3).delay=parseFloat(i2.delay),g(a3).delayTimer={setTimeout:setTimeout(f2,parseFloat(i2.delay)),next:n2}}else f2();else o.queue(a3,i2.queue,function(a4,b2){return b2===!0?(A2.promise&&A2.resolver(r3),!0):(w.velocityQueueEntryFlag=!0,void f2(a4))});i2.queue!==""&&i2.queue!=="fx"||o.queue(a3)[0]==="inprogress"||o.dequeue(a3)}var j3,k2,p2,q2,r3,t2,v2,x2=arguments[0]&&(arguments[0].p||o.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||s.isString(arguments[0].properties));s.isWrapped(this)?(k2=!1,q2=0,r3=this,p2=this):(k2=!0,q2=1,r3=x2?arguments[0].elements||arguments[0].e:arguments[0]);var A2={promise:null,resolver:null,rejecter:null};if(k2&&w.Promise&&(A2.promise=new w.Promise(function(a3,b2){A2.resolver=a3,A2.rejecter=b2})),x2?(t2=arguments[0].properties||arguments[0].p,v2=arguments[0].options||arguments[0].o):(t2=arguments[q2],v2=arguments[q2+1]),r3=f(r3),!r3)return void(A2.promise&&(t2&&v2&&v2.promiseRejectEmpty===!1?A2.resolver():A2.rejecter()));var B2=r3.length,C=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(t2)&&!o.isPlainObject(v2)){var D=q2+1;v2={};for(var E=D;E<arguments.length;E++)s.isArray(arguments[E])||!/^(fast|normal|slow)$/i.test(arguments[E])&&!/^\d/.test(arguments[E])?s.isString(arguments[E])||s.isArray(arguments[E])?v2.easing=arguments[E]:s.isFunction(arguments[E])&&(v2.complete=arguments[E]):v2.duration=arguments[E]}var F;switch(t2){case"scroll":F="scroll";break;case"reverse":F="reverse";break;case"pause":var G=new Date().getTime();return o.each(r3,function(a3,b2){h(b2,G)}),o.each(w.State.calls,function(a3,b2){var c2=!1;b2&&o.each(b2[1],function(a4,e3){var f2=v2===d?"":v2;return f2!==!0&&b2[2].queue!==f2&&(v2!==d||b2[2].queue!==!1)||(o.each(r3,function(a5,d2){if(d2===e3)return b2[5]={resume:!1},c2=!0,!1}),!c2&&void 0)})}),a2();case"resume":return o.each(r3,function(a3,b2){i(b2,G)}),o.each(w.State.calls,function(a3,b2){var c2=!1;b2&&o.each(b2[1],function(a4,e3){var f2=v2===d?"":v2;return f2!==!0&&b2[2].queue!==f2&&(v2!==d||b2[2].queue!==!1)||!b2[5]||(o.each(r3,function(a5,d2){if(d2===e3)return b2[5].resume=!0,c2=!0,!1}),!c2&&void 0)})}),a2();case"finish":case"finishAll":case"stop":o.each(r3,function(a3,b2){g(b2)&&g(b2).delayTimer&&(clearTimeout(g(b2).delayTimer.setTimeout),g(b2).delayTimer.next&&g(b2).delayTimer.next(),delete g(b2).delayTimer),t2!=="finishAll"||v2!==!0&&!s.isString(v2)||(o.each(o.queue(b2,s.isString(v2)?v2:""),function(a4,b3){s.isFunction(b3)&&b3()}),o.queue(b2,s.isString(v2)?v2:"",[]))});var H=[];return o.each(w.State.calls,function(a3,b2){b2&&o.each(b2[1],function(c2,e3){var f2=v2===d?"":v2;return f2!==!0&&b2[2].queue!==f2&&(v2!==d||b2[2].queue!==!1)||void o.each(r3,function(c3,d2){if(d2===e3)if((v2===!0||s.isString(v2))&&(o.each(o.queue(d2,s.isString(v2)?v2:""),function(a4,b3){s.isFunction(b3)&&b3(null,!0)}),o.queue(d2,s.isString(v2)?v2:"",[])),t2==="stop"){var h2=g(d2);h2&&h2.tweensContainer&&f2!==!1&&o.each(h2.tweensContainer,function(a4,b3){b3.endValue=b3.currentValue}),H.push(a3)}else t2!=="finish"&&t2!=="finishAll"||(b2[2].duration=1)})})}),t2==="stop"&&(o.each(H,function(a3,b2){n(b2,!0)}),A2.promise&&A2.resolver(r3)),a2();default:if(!o.isPlainObject(t2)||s.isEmptyObject(t2)){if(s.isString(t2)&&w.Redirects[t2]){j3=o.extend({},v2);var I=j3.duration,J=j3.delay||0;return j3.backwards===!0&&(r3=o.extend(!0,[],r3).reverse()),o.each(r3,function(a3,b2){parseFloat(j3.stagger)?j3.delay=J+parseFloat(j3.stagger)*a3:s.isFunction(j3.stagger)&&(j3.delay=J+j3.stagger.call(b2,a3,B2)),j3.drag&&(j3.duration=parseFloat(I)||(/^(callout|transition)/.test(t2)?1e3:u22),j3.duration=Math.max(j3.duration*(j3.backwards?1-a3/B2:(a3+1)/B2),.75*j3.duration,200)),w.Redirects[t2].call(b2,b2,j3||{},a3,B2,r3,A2.promise?A2:d)}),a2()}var K2="Velocity: First argument ("+t2+") was not a property map, a known action, or a registered redirect. Aborting.";return A2.promise?A2.rejecter(new Error(K2)):console.log(K2),a2()}F="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},M=[];o.each(r3,function(a3,b2){s.isNode(b2)&&e2(b2,a3)}),j3=o.extend({},w.defaults,v2),j3.loop=parseInt(j3.loop,10);var N=2*j3.loop-1;if(j3.loop)for(var O=0;O<N;O++){var P={delay:j3.delay,progress:j3.progress};O===N-1&&(P.display=j3.display,P.visibility=j3.visibility,P.complete=j3.complete),z(r3,"reverse",P)}return a2()};w=o.extend(z,w),w.animate=z;var A=b.requestAnimationFrame||q;if(!w.State.isMobile&&c.hidden!==d){var B=function(){c.hidden?(A=function(a2){return setTimeout(function(){a2(!0)},16)},m()):A=b.requestAnimationFrame||q};B(),c.addEventListener("visibilitychange",B)}return a.Velocity=w,a!==b&&(a.fn.velocity=z,a.fn.velocity.defaults=w.defaults),o.each(["Down","Up"],function(a2,b2){w.Redirects["slide"+b2]=function(a3,c2,e2,f2,g2,h2){var i2=o.extend({},c2),j3=i2.begin,k2=i2.complete,l2={},m2={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};i2.display===d&&(i2.display=b2==="Down"?w.CSS.Values.getDisplayType(a3)==="inline"?"inline-block":"block":"none"),i2.begin=function(){e2===0&&j3&&j3.call(g2,g2);for(var c3 in m2)if(m2.hasOwnProperty(c3)){l2[c3]=a3.style[c3];var d2=y.getPropertyValue(a3,c3);m2[c3]=b2==="Down"?[d2,0]:[0,d2]}l2.overflow=a3.style.overflow,a3.style.overflow="hidden"},i2.complete=function(){for(var b3 in l2)l2.hasOwnProperty(b3)&&(a3.style[b3]=l2[b3]);e2===f2-1&&(k2&&k2.call(g2,g2),h2&&h2.resolver(g2))},w(a3,m2,i2)}}),o.each(["In","Out"],function(a2,b2){w.Redirects["fade"+b2]=function(a3,c2,e2,f2,g2,h2){var i2=o.extend({},c2),j3=i2.complete,k2={opacity:b2==="In"?1:0};e2!==0&&(i2.begin=null),e2!==f2-1?i2.complete=null:i2.complete=function(){j3&&j3.call(g2,g2),h2&&h2.resolver(g2)},i2.display===d&&(i2.display=b2==="In"?"auto":"none"),w(this,k2,i2)}}),w}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)})}});var require_jquery_velocity_ui_min=__commonJS({"vendor/jquery_plugins/jquery.velocity.ui.min.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(function(a){"use strict";typeof __require=="function"&&typeof exports3=="object"?module2.exports=a():typeof define=="function"&&define.amd?define(["velocity"],a):a()})(function(){"use strict";return function(a,b,c,d){function e(a2,b2){var c2=[];return!(!a2||!b2)&&(g.each([a2,b2],function(a3,b3){var d2=[];g.each(b3,function(a4,b4){for(;b4.toString().length<5;)b4="0"+b4;d2.push(b4)}),c2.push(d2.join(""))}),parseFloat(c2[0])>parseFloat(c2[1]))}var f=a.Velocity;if(!f||!f.Utilities)return void(b.console&&console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."));var g=f.Utilities,h=f.version,i={major:1,minor:1,patch:0};if(e(i,h)){var j2="Velocity UI Pack: You need to update Velocity (velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";throw alert(j2),new Error(j2)}f.RegisterEffect=f.RegisterUI=function(a2,b2){function c2(a3,b3,c3,d2){var e2,h2=0;g.each(a3.nodeType?[a3]:a3,function(a4,b4){d2&&(c3+=a4*d2),e2=b4.parentNode;var i2=["height","paddingTop","paddingBottom","marginTop","marginBottom"];f.CSS.getPropertyValue(b4,"boxSizing").toString().toLowerCase()==="border-box"&&(i2=["height"]),g.each(i2,function(a5,c4){h2+=parseFloat(f.CSS.getPropertyValue(b4,c4))})}),f.animate(e2,{height:(b3==="In"?"+":"-")+"="+h2},{queue:!1,easing:"ease-in-out",duration:c3*(b3==="In"?.6:1)})}return f.Redirects[a2]=function(e2,h2,i2,j3,k2,l,m){var n=i2===j3-1;m=m||b2.loop,typeof b2.defaultDuration=="function"?b2.defaultDuration=b2.defaultDuration.call(k2,k2):b2.defaultDuration=parseFloat(b2.defaultDuration);for(var o=0;o<b2.calls.length;o++){var p=b2.calls[o],q=p[0],r2=1e3,s=p[1],t=p[2]||{},u22={};if(h2.duration!==d?r2=h2.duration:b2.defaultDuration!==d&&(r2=b2.defaultDuration),u22.duration=r2*(s||1),u22.queue=h2.queue||"",u22.easing=t.easing||"ease",u22.delay=parseFloat(t.delay)||0,u22.loop=!b2.loop&&t.loop,u22._cacheValues=t._cacheValues||!0,o===0){if(u22.delay+=parseFloat(h2.delay)||0,i2===0&&(u22.begin=function(){h2.begin&&h2.begin.call(k2,k2);var b3=a2.match(/(In|Out)$/);b3&&b3[0]==="In"&&q.opacity!==d&&g.each(k2.nodeType?[k2]:k2,function(a3,b4){f.CSS.setPropertyValue(b4,"opacity",0)}),h2.animateParentHeight&&b3&&c2(k2,b3[0],r2+u22.delay,h2.stagger)}),h2.display!==null){if(h2.display!==d&&h2.display!=="none")u22.display=h2.display;else if(/In$/.test(a2)){var v=f.CSS.Values.getDisplayType(e2);u22.display=v==="inline"?"inline-block":v}}h2.visibility&&h2.visibility!=="hidden"&&(u22.visibility=h2.visibility)}if(o===b2.calls.length-1){var w=function(){h2.display!==d&&h2.display!=="none"||!/Out$/.test(a2)||g.each(k2.nodeType?[k2]:k2,function(a3,b3){f.CSS.setPropertyValue(b3,"display","none")}),h2.complete&&h2.complete.call(k2,k2),l&&l.resolver(k2||e2)};u22.complete=function(){if(m&&f.Redirects[a2](e2,h2,i2,j3,k2,l,m===!0||Math.max(0,m-1)),b2.reset){for(var c3 in b2.reset)if(b2.reset.hasOwnProperty(c3)){var g2=b2.reset[c3];f.CSS.Hooks.registered[c3]!==d||typeof g2!="string"&&typeof g2!="number"||(b2.reset[c3]=[b2.reset[c3],b2.reset[c3]])}var o2={duration:0,queue:!1};n&&(o2.complete=w),f.animate(e2,b2.reset,o2)}else n&&w()},h2.visibility==="hidden"&&(u22.visibility=h2.visibility)}f.animate(e2,q,u22)}},f},f.RegisterEffect.packagedEffects={"callout.bounce":{defaultDuration:550,calls:[[{translateY:-30},.25],[{translateY:0},.125],[{translateY:-15},.125],[{translateY:0},.25]]},"callout.shake":{defaultDuration:800,calls:[[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:0},.125]]},"callout.flash":{defaultDuration:1100,calls:[[{opacity:[0,"easeInOutQuad",1]},.25],[{opacity:[1,"easeInOutQuad"]},.25],[{opacity:[0,"easeInOutQuad"]},.25],[{opacity:[1,"easeInOutQuad"]},.25]]},"callout.pulse":{defaultDuration:825,calls:[[{scaleX:1.1,scaleY:1.1},.5,{easing:"easeInExpo"}],[{scaleX:1,scaleY:1},.5]]},"callout.swing":{defaultDuration:950,calls:[[{rotateZ:15},.2],[{rotateZ:-10},.2],[{rotateZ:5},.2],[{rotateZ:-5},.2],[{rotateZ:0},.2]]},"callout.tada":{defaultDuration:1e3,calls:[[{scaleX:.9,scaleY:.9,rotateZ:-3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:-3},.1],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],[{scaleX:1,scaleY:1,rotateZ:0},.2]]},"transition.fadeIn":{defaultDuration:500,calls:[[{opacity:[1,0]}]]},"transition.fadeOut":{defaultDuration:500,calls:[[{opacity:[0,1]}]]},"transition.flipXIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateY:[0,-55]}]],reset:{transformPerspective:0}},"transition.flipXOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateY:55}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipYIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateX:[0,-45]}]],reset:{transformPerspective:0}},"transition.flipYOut":{defaultDuration:800,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateX:25}]],reset:{transformPerspective:0,rotateX:0}},"transition.flipBounceXIn":{defaultDuration:900,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateY:[-10,90]},.5],[{opacity:.8,rotateY:10},.25],[{opacity:1,rotateY:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceXOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateY:-10},.5],[{opacity:0,rotateY:90},.5]],reset:{transformPerspective:0,rotateY:0}},"transition.flipBounceYIn":{defaultDuration:850,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateX:[-10,90]},.5],[{opacity:.8,rotateX:10},.25],[{opacity:1,rotateX:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceYOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateX:-15},.5],[{opacity:0,rotateX:90},.5]],reset:{transformPerspective:0,rotateX:0}},"transition.swoopIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["100%","50%"],transformOriginY:["100%","100%"],scaleX:[1,0],scaleY:[1,0],translateX:[0,-700],translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%"}},"transition.swoopOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformOriginX:["50%","100%"],transformOriginY:["100%","100%"],scaleX:0,scaleY:0,translateX:-700,translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%",scaleX:1,scaleY:1,translateX:0}},"transition.whirlIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,0],scaleY:[1,0],rotateY:[0,160]},1,{easing:"easeInOutSine"}]]},"transition.whirlOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInOutQuint",1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:0,scaleY:0,rotateY:160},1,{easing:"swing"}]],reset:{scaleX:1,scaleY:1,rotateY:0}},"transition.shrinkIn":{defaultDuration:750,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,1.5],scaleY:[1,1.5],translateZ:0}]]},"transition.shrinkOut":{defaultDuration:600,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:1.3,scaleY:1.3,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.expandIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,.625],scaleY:[1,.625],translateZ:0}]]},"transition.expandOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:.5,scaleY:.5,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.bounceIn":{defaultDuration:800,calls:[[{opacity:[1,0],scaleX:[1.05,.3],scaleY:[1.05,.3]},.4],[{scaleX:.9,scaleY:.9,translateZ:0},.2],[{scaleX:1,scaleY:1},.5]]},"transition.bounceOut":{defaultDuration:800,calls:[[{scaleX:.95,scaleY:.95},.35],[{scaleX:1.1,scaleY:1.1,translateZ:0},.35],[{opacity:[0,1],scaleX:.3,scaleY:.3},.3]],reset:{scaleX:1,scaleY:1}},"transition.bounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[-30,1e3]},.6,{easing:"easeOutCirc"}],[{translateY:10},.2],[{translateY:0},.2]]},"transition.bounceUpOut":{defaultDuration:1e3,calls:[[{translateY:20},.2],[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.bounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[30,-1e3]},.6,{easing:"easeOutCirc"}],[{translateY:-10},.2],[{translateY:0},.2]]},"transition.bounceDownOut":{defaultDuration:1e3,calls:[[{translateY:-20},.2],[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.bounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[30,-1250]},.6,{easing:"easeOutCirc"}],[{translateX:-10},.2],[{translateX:0},.2]]},"transition.bounceLeftOut":{defaultDuration:750,calls:[[{translateX:30},.2],[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.bounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[-30,1250]},.6,{easing:"easeOutCirc"}],[{translateX:10},.2],[{translateX:0},.2]]},"transition.bounceRightOut":{defaultDuration:750,calls:[[{translateX:-30},.2],[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}},"transition.slideUpIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,20],translateZ:0}]]},"transition.slideUpOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:-20,translateZ:0}]],reset:{translateY:0}},"transition.slideDownIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,-20],translateZ:0}]]},"transition.slideDownOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:20,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,-20],translateZ:0}]]},"transition.slideLeftOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:-20,translateZ:0}]],reset:{translateX:0}},"transition.slideRightIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,20],translateZ:0}]]},"transition.slideRightOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:20,translateZ:0}]],reset:{translateX:0}},"transition.slideUpBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,75],translateZ:0}]]},"transition.slideUpBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:-75,translateZ:0}]],reset:{translateY:0}},"transition.slideDownBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,-75],translateZ:0}]]},"transition.slideDownBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:75,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,-75],translateZ:0}]]},"transition.slideLeftBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:-75,translateZ:0}]],reset:{translateX:0}},"transition.slideRightBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,75],translateZ:0}]]},"transition.slideRightBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:75,translateZ:0}]],reset:{translateX:0}},"transition.perspectiveUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveUpOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveDownOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveLeftIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveLeftOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}},"transition.perspectiveRightIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveRightOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}}};for(var k in f.RegisterEffect.packagedEffects)f.RegisterEffect.packagedEffects.hasOwnProperty(k)&&f.RegisterEffect(k,f.RegisterEffect.packagedEffects[k]);f.RunSequence=function(a2){var b2=g.extend(!0,[],a2);b2.length>1&&(g.each(b2.reverse(),function(a3,c2){var d2=b2[a3+1];if(d2){var e2=c2.o||c2.options,h2=d2.o||d2.options,i2=e2&&e2.sequenceQueue===!1?"begin":"complete",j3=h2&&h2[i2],k2={};k2[i2]=function(){var a4=d2.e||d2.elements,b3=a4.nodeType?[a4]:a4;j3&&j3.call(b3,b3),f(c2)},d2.o?d2.o=g.extend({},h2,k2):d2.options=g.extend({},h2,k2)}}),b2.reverse()),f(b2[0])}}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)})}});function initialize_navigator_checks(){if(typeof window<"u"&&typeof navigator<"u"&&!window.isReactNative){let tabletcheck2=function(){let a=navigator.userAgent||navigator.vendor;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ipad|playbook|silk|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0,4))||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)};var tabletcheck=tabletcheck2;mobile_or_tablet=tabletcheck2();let ua=navigator.userAgent,iemobile=/iemobile/i.test(ua);android=/android/i.test(ua)&&!iemobile}}function is_android(){return android}function is_on_mobile_or_tablet(){return mobile_or_tablet}function is_fullscreen(){return!!(typeof document<"u"&&(document.fullscreenElement!=null||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement))}function doBrowserDetect(){window.BrowserDetect={browser:"",version:0,OS:"",versionSearchString:"",init(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString(data){for(let i=0;i<data.length;i++){let dataString=data[i].string,dataProp=data[i].prop;if(this.versionSearchString=data[i].versionSearch||data[i].identity,dataString){if(dataString.includes(data[i].subString))return data[i].identity}else if(dataProp)return data[i].identity}},searchVersion(dataString){let index=dataString.indexOf(this.versionSearchString);if(index!==-1)return parseFloat(dataString.substring(index+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]},window.BrowserDetect.init()}var _Number$isNaN,android,mobile_or_tablet,base64,base64decode,add_source_appname_tracker,maybe_add_source_appname_to_object,get_source_appname_from_data,add_source_appname_tracker_to_change_args,init_b_window=__esm({"lib-browser/u/client/b_window.js"(){"use strict";init_define_process_env();init_shim();init_customVelocityAnimations();init_base64();typeof window<"u"&&!window.isReactNative&&(require_jquery_dotdotdot_1_5_6(),require_jquery_velocity_min(),require_jquery_velocity_ui_min(),injectTransitions());(_Number$isNaN=Number.isNaN)!=null||(Number.isNaN=val=>typeof val=="number"&&isNaN(val));android=!1,mobile_or_tablet=!1;initialize_navigator_checks();typeof window<"u"&&!window.isReactNative&&doBrowserDetect();if(typeof window<"u"){base64=data=>gBase64.encode(data),base64decode=data=>gBase64.decode(data),add_source_appname_tracker=(data,appname)=>{data&&(data.said=base64(appname))},maybe_add_source_appname_to_object=(data,current_appname,source_appname)=>{!data||!source_appname||source_appname!==current_appname&&(data.source_appname=source_appname)};let remove_source_appname=data=>{data&&delete data.said};get_source_appname_from_data=data=>data!=null&&data.said?base64decode(data.said):void 0,add_source_appname_tracker_to_change_args=(data,change_args,current_appname)=>{let source_appname=get_source_appname_from_data(data);maybe_add_source_appname_to_object(change_args,current_appname,source_appname),remove_source_appname(data)}}}});var import_web_dom_collections_iterator2,EMAIL,SOCIAL,SECURABLE_PREFIX,BUILTIN_CUSTOM_FIELDS,BUILTIN_FIELDS,init_security=__esm({"lib-browser/constants/security.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator2=__toESM(require_web_dom_collections_iterator()),EMAIL="email",SOCIAL="_social_networks",SECURABLE_PREFIX="securable_",BUILTIN_CUSTOM_FIELDS=["Created Date","Modified Date","Created By","Slug"],BUILTIN_FIELDS=[...BUILTIN_CUSTOM_FIELDS,EMAIL,SOCIAL]}});var require_alea=__commonJS({"node_modules/seedrandom/lib/alea.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function Alea(seed){var me=this,mash=Mash();me.next=function(){var t=2091639*me.s0+me.c*23283064365386963e-26;return me.s0=me.s1,me.s1=me.s2,me.s2=t-(me.c=t|0)},me.c=1,me.s0=mash(" "),me.s1=mash(" "),me.s2=mash(" "),me.s0-=mash(seed),me.s0<0&&(me.s0+=1),me.s1-=mash(seed),me.s1<0&&(me.s1+=1),me.s2-=mash(seed),me.s2<0&&(me.s2+=1),mash=null}function copy(f,t){return t.c=f.c,t.s0=f.s0,t.s1=f.s1,t.s2=f.s2,t}function impl(seed,opts){var xg=new Alea(seed),state4=opts&&opts.state,prng=xg.next;return prng.int32=function(){return xg.next()*4294967296|0},prng.double=function(){return prng()+(prng()*2097152|0)*11102230246251565e-32},prng.quick=prng,state4&&(typeof state4=="object"&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}function Mash(){var n=4022871197,mash=function(data){data=String(data);for(var i=0;i<data.length;i++){n+=data.charCodeAt(i);var h=.02519603282416938*n;n=h>>>0,h-=n,h*=n,n=h>>>0,h-=n,n+=h*4294967296}return(n>>>0)*23283064365386963e-26};return mash}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.alea=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_xor128=__commonJS({"node_modules/seedrandom/lib/xor128.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function XorGen(seed){var me=this,strseed="";me.x=0,me.y=0,me.z=0,me.w=0,me.next=function(){var t=me.x^me.x<<11;return me.x=me.y,me.y=me.z,me.z=me.w,me.w^=me.w>>>19^t^t>>>8},seed===(seed|0)?me.x=seed:strseed+=seed;for(var k=0;k<strseed.length+64;k++)me.x^=strseed.charCodeAt(k)|0,me.next()}function copy(f,t){return t.x=f.x,t.y=f.y,t.z=f.z,t.w=f.w,t}function impl(seed,opts){var xg=new XorGen(seed),state4=opts&&opts.state,prng=function(){return(xg.next()>>>0)/4294967296};return prng.double=function(){do var top2=xg.next()>>>11,bot=(xg.next()>>>0)/4294967296,result=(top2+bot)/(1<<21);while(result===0);return result},prng.int32=xg.next,prng.quick=prng,state4&&(typeof state4=="object"&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.xor128=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_xorwow=__commonJS({"node_modules/seedrandom/lib/xorwow.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function XorGen(seed){var me=this,strseed="";me.next=function(){var t=me.x^me.x>>>2;return me.x=me.y,me.y=me.z,me.z=me.w,me.w=me.v,(me.d=me.d+362437|0)+(me.v=me.v^me.v<<4^(t^t<<1))|0},me.x=0,me.y=0,me.z=0,me.w=0,me.v=0,seed===(seed|0)?me.x=seed:strseed+=seed;for(var k=0;k<strseed.length+64;k++)me.x^=strseed.charCodeAt(k)|0,k==strseed.length&&(me.d=me.x<<10^me.x>>>4),me.next()}function copy(f,t){return t.x=f.x,t.y=f.y,t.z=f.z,t.w=f.w,t.v=f.v,t.d=f.d,t}function impl(seed,opts){var xg=new XorGen(seed),state4=opts&&opts.state,prng=function(){return(xg.next()>>>0)/4294967296};return prng.double=function(){do var top2=xg.next()>>>11,bot=(xg.next()>>>0)/4294967296,result=(top2+bot)/(1<<21);while(result===0);return result},prng.int32=xg.next,prng.quick=prng,state4&&(typeof state4=="object"&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.xorwow=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_xorshift7=__commonJS({"node_modules/seedrandom/lib/xorshift7.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function XorGen(seed){var me=this;me.next=function(){var X=me.x,i=me.i,t,v,w;return t=X[i],t^=t>>>7,v=t^t<<24,t=X[i+1&7],v^=t^t>>>10,t=X[i+3&7],v^=t^t>>>3,t=X[i+4&7],v^=t^t<<7,t=X[i+7&7],t=t^t<<13,v^=t^t<<9,X[i]=v,me.i=i+1&7,v};function init5(me2,seed2){var j2,w,X=[];if(seed2===(seed2|0))w=X[0]=seed2;else for(seed2=""+seed2,j2=0;j2<seed2.length;++j2)X[j2&7]=X[j2&7]<<15^seed2.charCodeAt(j2)+X[j2+1&7]<<13;for(;X.length<8;)X.push(0);for(j2=0;j2<8&&X[j2]===0;++j2);for(j2==8?w=X[7]=-1:w=X[j2],me2.x=X,me2.i=0,j2=256;j2>0;--j2)me2.next()}init5(me,seed)}function copy(f,t){return t.x=f.x.slice(),t.i=f.i,t}function impl(seed,opts){seed==null&&(seed=+new Date);var xg=new XorGen(seed),state4=opts&&opts.state,prng=function(){return(xg.next()>>>0)/4294967296};return prng.double=function(){do var top2=xg.next()>>>11,bot=(xg.next()>>>0)/4294967296,result=(top2+bot)/(1<<21);while(result===0);return result},prng.int32=xg.next,prng.quick=prng,state4&&(state4.x&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.xorshift7=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_xor4096=__commonJS({"node_modules/seedrandom/lib/xor4096.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function XorGen(seed){var me=this;me.next=function(){var w=me.w,X=me.X,i=me.i,t,v;return me.w=w=w+1640531527|0,v=X[i+34&127],t=X[i=i+1&127],v^=v<<13,t^=t<<17,v^=v>>>15,t^=t>>>12,v=X[i]=v^t,me.i=i,v+(w^w>>>16)|0};function init5(me2,seed2){var t,v,i,j2,w,X=[],limit2=128;for(seed2===(seed2|0)?(v=seed2,seed2=null):(seed2=seed2+"\0",v=0,limit2=Math.max(limit2,seed2.length)),i=0,j2=-32;j2<limit2;++j2)seed2&&(v^=seed2.charCodeAt((j2+32)%seed2.length)),j2===0&&(w=v),v^=v<<10,v^=v>>>15,v^=v<<4,v^=v>>>13,j2>=0&&(w=w+1640531527|0,t=X[j2&127]^=v+w,i=t==0?i+1:0);for(i>=128&&(X[(seed2&&seed2.length||0)&127]=-1),i=127,j2=4*128;j2>0;--j2)v=X[i+34&127],t=X[i=i+1&127],v^=v<<13,t^=t<<17,v^=v>>>15,t^=t>>>12,X[i]=v^t;me2.w=w,me2.X=X,me2.i=i}init5(me,seed)}function copy(f,t){return t.i=f.i,t.w=f.w,t.X=f.X.slice(),t}function impl(seed,opts){seed==null&&(seed=+new Date);var xg=new XorGen(seed),state4=opts&&opts.state,prng=function(){return(xg.next()>>>0)/4294967296};return prng.double=function(){do var top2=xg.next()>>>11,bot=(xg.next()>>>0)/4294967296,result=(top2+bot)/(1<<21);while(result===0);return result},prng.int32=xg.next,prng.quick=prng,state4&&(state4.X&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.xor4096=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_tychei=__commonJS({"node_modules/seedrandom/lib/tychei.js"(exports3,module2){init_define_process_env();init_shim();(function(global,module3,define2){function XorGen(seed){var me=this,strseed="";me.next=function(){var b=me.b,c=me.c,d=me.d,a=me.a;return b=b<<25^b>>>7^c,c=c-d|0,d=d<<24^d>>>8^a,a=a-b|0,me.b=b=b<<20^b>>>12^c,me.c=c=c-d|0,me.d=d<<16^c>>>16^a,me.a=a-b|0},me.a=0,me.b=0,me.c=-1640531527,me.d=1367130551,seed===Math.floor(seed)?(me.a=seed/4294967296|0,me.b=seed|0):strseed+=seed;for(var k=0;k<strseed.length+20;k++)me.b^=strseed.charCodeAt(k)|0,me.next()}function copy(f,t){return t.a=f.a,t.b=f.b,t.c=f.c,t.d=f.d,t}function impl(seed,opts){var xg=new XorGen(seed),state4=opts&&opts.state,prng=function(){return(xg.next()>>>0)/4294967296};return prng.double=function(){do var top2=xg.next()>>>11,bot=(xg.next()>>>0)/4294967296,result=(top2+bot)/(1<<21);while(result===0);return result},prng.int32=xg.next,prng.quick=prng,state4&&(typeof state4=="object"&&copy(state4,xg),prng.state=function(){return copy(xg,{})}),prng}module3&&module3.exports?module3.exports=impl:define2&&define2.amd?define2(function(){return impl}):this.tychei=impl})(exports3,typeof module2=="object"&&module2,typeof define=="function"&&define)}});var require_crypto=__commonJS({"(disabled):crypto"(){init_define_process_env();init_shim()}});var require_seedrandom=__commonJS({"node_modules/seedrandom/seedrandom.js"(exports3,module2){init_define_process_env();init_shim();(function(global,pool,math){var width2=256,chunks=6,digits=52,rngname="random",startdenom=math.pow(width2,chunks),significance=math.pow(2,digits),overflow=significance*2,mask=width2-1,nodecrypto;function seedrandom3(seed,options,callback){var key=[];options=options==!0?{entropy:!0}:options||{};var shortseed=mixkey(flatten2(options.entropy?[seed,tostring(pool)]:seed==null?autoseed():seed,3),key),arc4=new ARC4(key),prng=function(){for(var n=arc4.g(chunks),d=startdenom,x=0;n<significance;)n=(n+x)*width2,d*=width2,x=arc4.g(1);for(;n>=overflow;)n/=2,d/=2,x>>>=1;return(n+x)/d};return prng.int32=function(){return arc4.g(4)|0},prng.quick=function(){return arc4.g(4)/4294967296},prng.double=prng,mixkey(tostring(arc4.S),pool),(options.pass||callback||function(prng2,seed2,is_math_call,state4){return state4&&(state4.S&&copy(state4,arc4),prng2.state=function(){return copy(arc4,{})}),is_math_call?(math[rngname]=prng2,seed2):prng2})(prng,shortseed,"global"in options?options.global:this==math,options.state)}function ARC4(key){var t,keylen=key.length,me=this,i=0,j2=me.i=me.j=0,s=me.S=[];for(keylen||(key=[keylen++]);i<width2;)s[i]=i++;for(i=0;i<width2;i++)s[i]=s[j2=mask&j2+key[i%keylen]+(t=s[i])],s[j2]=t;(me.g=function(count2){for(var t2,r2=0,i2=me.i,j3=me.j,s2=me.S;count2--;)t2=s2[i2=mask&i2+1],r2=r2*width2+s2[mask&(s2[i2]=s2[j3=mask&j3+t2])+(s2[j3]=t2)];return me.i=i2,me.j=j3,r2})(width2)}function copy(f,t){return t.i=f.i,t.j=f.j,t.S=f.S.slice(),t}function flatten2(obj,depth2){var result=[],typ=typeof obj,prop;if(depth2&&typ=="object")for(prop in obj)try{result.push(flatten2(obj[prop],depth2-1))}catch{}return result.length?result:typ=="string"?obj:obj+"\0"}function mixkey(seed,key){for(var stringseed=seed+"",smear,j2=0;j2<stringseed.length;)key[mask&j2]=mask&(smear^=key[mask&j2]*19)+stringseed.charCodeAt(j2++);return tostring(key)}function autoseed(){try{var out;return nodecrypto&&(out=nodecrypto.randomBytes)?out=out(width2):(out=new Uint8Array(width2),(global.crypto||global.msCrypto).getRandomValues(out)),tostring(out)}catch{var browser=global.navigator,plugins7=browser&&browser.plugins;return[+new Date,global,plugins7,global.screen,tostring(pool)]}}function tostring(a){return String.fromCharCode.apply(0,a)}if(mixkey(math.random(),pool),typeof module2=="object"&&module2.exports){module2.exports=seedrandom3;try{nodecrypto=require_crypto()}catch{}}else typeof define=="function"&&define.amd?define(function(){return seedrandom3}):math["seed"+rngname]=seedrandom3})(typeof self<"u"?self:exports3,[],Math)}});var require_seedrandom2=__commonJS({"node_modules/seedrandom/index.js"(exports3,module2){init_define_process_env();init_shim();var alea=require_alea(),xor128=require_xor128(),xorwow=require_xorwow(),xorshift7=require_xorshift7(),xor4096=require_xor4096(),tychei=require_tychei(),sr=require_seedrandom();sr.alea=alea;sr.xor128=xor128;sr.xorwow=xorwow;sr.xorshift7=xorshift7;sr.xor4096=xor4096;sr.tychei=tychei;module2.exports=sr}});var ALL_LEVELS,LEVEL_SEVERITY,AREAS,PLUGIN_MAIN_HEADER_PREFIX,PLUGIN_PAGE_HEADER_PREFIX,CUSTOM_PAGE_HEADER_TAG,CUSTOM_APP_HEADER_TAG,STACK_OMITTED,init_logging=__esm({"lib-browser/constants/logging.js"(){"use strict";init_define_process_env();init_shim();ALL_LEVELS=["debug","verbose","info","warn","error","fatal"],LEVEL_SEVERITY={debug:0,verbose:1,info:2,warn:3,error:4,fatal:5},AREAS=function(AREAS3){return AREAS3.certificates="certificates",AREAS3.cloudflare="cloudflare",AREAS3.cron="cron",AREAS3.fibers="fibers",AREAS3.logging="logging",AREAS3.metrics="metrics",AREAS3.notifier="notifier",AREAS3.percolator="percolator",AREAS3.postgres="postgres",AREAS3.pregenerate="pregenerate",AREAS3.redis="redis",AREAS3.scheduler="scheduler",AREAS3.server="server",AREAS3.threads="threads",AREAS3.workflow="workflow",AREAS3}({}),PLUGIN_MAIN_HEADER_PREFIX="plugin_main_headers_",PLUGIN_PAGE_HEADER_PREFIX="plugin_page_headers_",CUSTOM_PAGE_HEADER_TAG="custom_page_header",CUSTOM_APP_HEADER_TAG="custom_app_header",STACK_OMITTED="stack omitted"}});var STORAGE_UNITS,init_byte=__esm({"lib-browser/constants/byte.js"(){"use strict";init_define_process_env();init_shim();STORAGE_UNITS=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]}});var plugin_exports={};__export(plugin_exports,{ALLOWED_DEPENDENCIES:()=>ALLOWED_DEPENDENCIES,BREADCRUMB_HEXID:()=>BREADCRUMB_HEXID,BUBBLE_TEAM_MEMBER_IDS:()=>BUBBLE_TEAM_MEMBER_IDS,BUILT_BY_TAG_TYPE:()=>BUILT_BY_TAG_TYPE,CATEGORIES:()=>CATEGORIES,CATEGORIES_TAG_TYPE:()=>CATEGORIES_TAG_TYPE,FREE_TAG_NAME:()=>FREE_TAG_NAME,HARDCODED_VERSIONS:()=>HARDCODED_VERSIONS,JS_OBFUSCATOR_SEED:()=>JS_OBFUSCATOR_SEED,KEYS_THAT_CONTAIN_IDS:()=>KEYS_THAT_CONTAIN_IDS,LEGACY_NO_CREATOR_NAME:()=>LEGACY_NO_CREATOR_NAME,LEGAL_NODE_VERSIONS:()=>LEGAL_NODE_VERSIONS,LICENSE_COMMERCIAL:()=>LICENSE_COMMERCIAL,LICENSE_OPEN_SOURCE:()=>LICENSE_OPEN_SOURCE,LICENSE_PRIVATE:()=>LICENSE_PRIVATE,MAX_FUNCTION_PAYLOAD_LENGTH:()=>MAX_FUNCTION_PAYLOAD_LENGTH,MAX_SIZE_FOR_PROCESSING:()=>MAX_SIZE_FOR_PROCESSING,NO_CREATOR_NAME:()=>NO_CREATOR_NAME,OBFUSCATION_SCHEMA:()=>OBFUSCATION_SCHEMA,OFFICIAL_TAG_NAME:()=>OFFICIAL_TAG_NAME,PLUGIN_CODE_SRC_PREFIX:()=>PLUGIN_CODE_SRC_PREFIX,PLUGIN_DOCUMENTATION_TEMPLATE_LINK:()=>PLUGIN_DOCUMENTATION_TEMPLATE_LINK,PLUGIN_FUNCTION_REGEX:()=>PLUGIN_FUNCTION_REGEX,PLUGIN_SEPARATOR:()=>PLUGIN_SEPARATOR,PLUGIN_TAGS:()=>PLUGIN_TAGS,PREMIUM_TAG_NAME:()=>PREMIUM_TAG_NAME,PREMIUM_TAG_TYPE:()=>PREMIUM_TAG_TYPE,PRICE_NUMBER_PROPERTY:()=>PRICE_NUMBER_PROPERTY,PluginVersionTag:()=>PluginVersionTag,TAG_TYPE_TO_NAMES:()=>TAG_TYPE_TO_NAMES,THIRD_PARTY_TAG_NAME:()=>THIRD_PARTY_TAG_NAME,TYPES:()=>TYPES,TYPES_TAG_TYPE:()=>TYPES_TAG_TYPE});var PluginVersionTag,BUILT_BY_TAG_TYPE,PREMIUM_TAG_TYPE,TYPES_TAG_TYPE,CATEGORIES_TAG_TYPE,PLUGIN_DOCUMENTATION_TEMPLATE_LINK,OFFICIAL_TAG_NAME,THIRD_PARTY_TAG_NAME,FREE_TAG_NAME,PREMIUM_TAG_NAME,CATEGORIES,TYPES,TAG_TYPE_TO_NAMES,PLUGIN_TAGS,PLUGIN_SEPARATOR,BUBBLE_TEAM_MEMBER_IDS,KEYS_THAT_CONTAIN_IDS,ALLOWED_DEPENDENCIES,MAX_FUNCTION_PAYLOAD_LENGTH,NO_CREATOR_NAME,LEGACY_NO_CREATOR_NAME,PLUGIN_CODE_SRC_PREFIX,LICENSE_COMMERCIAL,LICENSE_PRIVATE,LICENSE_OPEN_SOURCE,LEGAL_NODE_VERSIONS,PRICE_NUMBER_PROPERTY,MAX_SIZE_FOR_PROCESSING,BREADCRUMB_HEXID,PLUGIN_FUNCTION_REGEX,JS_OBFUSCATOR_SEED,OBFUSCATION_SCHEMA,HARDCODED_VERSIONS,init_plugin=__esm({"lib-browser/constants/plugin.js"(){"use strict";init_define_process_env();init_shim();init_byte();PluginVersionTag=function(PluginVersionTag2){return PluginVersionTag2[PluginVersionTag2.UpToDate=0]="UpToDate",PluginVersionTag2[PluginVersionTag2.Outdated=1]="Outdated",PluginVersionTag2[PluginVersionTag2.NeedsUpdate=2]="NeedsUpdate",PluginVersionTag2[PluginVersionTag2.Deprecated=3]="Deprecated",PluginVersionTag2[PluginVersionTag2.Broken=4]="Broken",PluginVersionTag2}({}),BUILT_BY_TAG_TYPE="built_by",PREMIUM_TAG_TYPE="premium",TYPES_TAG_TYPE="types",CATEGORIES_TAG_TYPE="categories",PLUGIN_DOCUMENTATION_TEMPLATE_LINK="https://future-polyanthus-10e.notion.site/Bubble-Plugin-Documentation-Template-replace-with-plugin-name-b919a7428cbb4b5f9a37885d32cf9225?pvs=25",OFFICIAL_TAG_NAME="Official",THIRD_PARTY_TAG_NAME="Third-party developers",FREE_TAG_NAME="free",PREMIUM_TAG_NAME="premium",CATEGORIES={Analytics:"analytics",ArtificialIntelligence:"artificial intelligence (AI)",Blog:"blog",Calendar:"calendar",Chart:"chart",Chat:"chat",Compliance:"compliance",Containers:"containers",CustomerSupport:"customer support",DataThings:"data (things)",Ecommerce:"ecommerce",Email:"email",HealthAndFitness:"health & fitness",Image:"image",InputForms:"input forms",Internationalization:"internationalization",Location:"location",Media:"media",Mobile:"mobile",News:"news",Payment:"payment",Pdf:"PDF",Productivity:"productivity",SmallBusiness:"small business",SocialNetwork:"social network",Technical:"technical",Testing:"testing",Video:"video",VisualElements:"visual elements",WebScraping:"web scraping"},TYPES={Action:"action",Api:"api",BackgroundServices:"background services",Element:"element",Event:"event",LoginService:"login service",Storage:"storage"},TAG_TYPE_TO_NAMES={[BUILT_BY_TAG_TYPE]:[OFFICIAL_TAG_NAME,THIRD_PARTY_TAG_NAME],[PREMIUM_TAG_TYPE]:[FREE_TAG_NAME,PREMIUM_TAG_NAME]},PLUGIN_TAGS={[TYPES_TAG_TYPE]:TYPES,[CATEGORIES_TAG_TYPE]:CATEGORIES,[BUILT_BY_TAG_TYPE]:TAG_TYPE_TO_NAMES[BUILT_BY_TAG_TYPE],[PREMIUM_TAG_TYPE]:TAG_TYPE_TO_NAMES[PREMIUM_TAG_TYPE]},PLUGIN_SEPARATOR="-",BUBBLE_TEAM_MEMBER_IDS=["1339510945575x284965680912137020","bubble-1571682061136x385876099972947800"],KEYS_THAT_CONTAIN_IDS=["actions","actions.fields","events","fields","states"],ALLOWED_DEPENDENCIES=["use_jquery","plugin_api_version"],MAX_FUNCTION_PAYLOAD_LENGTH=6*1048576,NO_CREATOR_NAME="(no name provided)",LEGACY_NO_CREATOR_NAME="Bubble user",PLUGIN_CODE_SRC_PREFIX="PLUGIN_",LICENSE_COMMERCIAL="commercial",LICENSE_PRIVATE="private",LICENSE_OPEN_SOURCE="open_source",LEGAL_NODE_VERSIONS=[14,18],PRICE_NUMBER_PROPERTY="price_number",MAX_SIZE_FOR_PROCESSING=1048576,BREADCRUMB_HEXID="_0x474242",PLUGIN_FUNCTION_REGEX=/function\(([\w,\s?]*)\)/,JS_OBFUSCATOR_SEED=0,OBFUSCATION_SCHEMA={plugin_actions:{any:{type:"client_side",code:{client:{fn:!0}}}},plugin_elements:{any:{actions:{any:{code:{fn:!0}}},code:{initialize:{fn:!0},reset:{fn:!0},update:{fn:!0}},states:{any:{initialization_code:{fn:!0}}}}}},HARDCODED_VERSIONS={ionic:1,materialicons:1,progressbar:1,chartjs:1,handsontable:1,fullcalendar:1,slickcarousel:1,draggableui:1,multifileupload:1,disqus:1,recorderjs:1,addtoany:1,jtinder:1,selectpdf:1,ziggeo:1}}});var PROD,LOCAL,QA,DEV,init_environment=__esm({"lib-browser/constants/environment.js"(){"use strict";init_define_process_env();init_shim();PROD="prod",LOCAL="local",QA="qa",DEV="dev"}});var client_config_default,init_client_config=__esm({"client_config.json"(){client_config_default={ADMIN_EMAIL:"admin@bubble.io",ADMIN_NO_REPLY:"admin-no-reply@bubbleapps.io",MAX_ALLOWED_REQUEST:5e4,MAX_LIST_LENGTH:1e4,MAX_TASKS_TO_SCHEDULE_NON_DEDICATED:1e5,PROD_DOMAINS:{main:"bubble.io",old:"bubble.is"},REQUEST_TTL:36e5,SUPPORT_EMAIL:"support@bubble.io",SUPPORT_NAME:"Bubble Support",a_record_ip:"54.203.28.28",amplitude_experiment_key:"client-mzmGCQlKvIat72aRwurU9POklOVWqQYc",amplitude_experiments_enabled:!0,apps_domain:"bubbleapps.io",braintree_partner_code:"Bubble_SP",breaking_revision:5,browser_console_log_level:"error",cdn_host:"d3dqmih97rcqmh.cloudfront.net",commit_sha:"c7357376d42475546621f11d27e4e8596617c6e9",commit_timestamp:1730934295e3,database_query_limit:200,dimension:"prod",env:"prod",environment_name:"main",firebase_app_config:{apiKey:"AIzaSyDVlyff9gf_eG2kq_OTfhUytinKJ619FrM",appId:"1:380032246750:web:50d6f5f804d7ce281e334f",authDomain:"bubble-workflow.firebaseapp.com",databaseURL:"https://bubble-workflow.firebaseio.com",messagingSenderId:"380032246750",projectId:"bubble-workflow",storageBucket:"bubble-workflow.appspot.com"},hide_export_bulk_operation:!0,image_optimization_service:"d1muf25xaso8hp.cloudfront.net",intercom_app_id:"cz703g22",is_clustered:!0,max_api_bulk_post:1e3,max_new_list_length:100,meta_billing_api_endpoint:"https://bubble.io/api/1.1/",meta_upload_tracking_api_endpoint:"https://bubble.io/api/1.1/",mobile_access_emails:["abdul@brokerloop.com","bruno.j.masson@seagate.com","henderson.molly4@gmail.com","jaren.peckham@seagate.com","michael.ong@seagate.com","mike@minimum.studio","ongmichael@me.com","quinn.croom@truefootage.tech","sam.dejean@truefootage.tech","zachary.bracken@seagate.com"],notifier_domain:"main",notifier_host:"notify.bubble.io",otel_client_tracing_flag:!0,otel_log_events_flag:!0,page_speed_metrics_on:!0,paid_features:!0,plugin_commission:.75,plugins_live_here:!0,private_version_prefix:"p_",search_update_metrics_sample_rate:1e4,use_analytics:!0,use_cloudflare:!0,user_file_bucket:"appforest_uf",user_file_cdn:"a3f482aa37473c68f97b76bd2e4a3782.cdn.bubble.io/",user_file_url:"s3.amazonaws.com/appforest_uf/"}}});var client_config,client_config_default2,init_client_config2=__esm({"lib-browser/client_config.js"(){"use strict";init_define_process_env();init_shim();init_client_config();client_config=client_config_default,client_config_default2=client_config}});var environment_utilities_exports={};__export(environment_utilities_exports,{is_development:()=>is_development,is_local:()=>is_local,is_production:()=>is_production,is_production_not_dedicated:()=>is_production_not_dedicated,is_test:()=>is_test});function is_production(){return client_config_default2.env===PROD}function is_test(){return client_config_default2.env===QA}function is_development(){return client_config_default2.env===DEV||client_config_default2.env===LOCAL}function is_local(){return client_config_default2.env===LOCAL}function is_production_not_dedicated(){return is_production()&&!client_config_default2.is_dedicated}var init_environment_utilities=__esm({"lib-browser/shared/environment_utilities.js"(){"use strict";init_define_process_env();init_shim();init_environment();init_client_config2()}});var logger_exports={};__export(logger_exports,{AREAS:()=>AREAS2,LOG_MESSAGE:()=>LOG_MESSAGE,STACK_OMITTED:()=>STACK_OMITTED2,debug:()=>debug,error:()=>error,fatal:()=>fatal,get_log_tags:()=>get_log_tags,human_friendly:()=>human_friendly,info:()=>info,install_browser_error_handler:()=>install_browser_error_handler,is_log_level:()=>is_log_level,log:()=>log,owner_error:()=>owner_error,owner_only_error:()=>owner_only_error,owner_warn:()=>owner_warn,propagated_error:()=>propagated_error,register_logger:()=>register_logger,set_human_friendly:()=>set_human_friendly,user_error:()=>user_error,verbose:()=>verbose,warn:()=>warn,with_user_level:()=>with_user_level});function register_logger(logger_instance){logging_medium=logger_instance}function is_not_ready_error(level){return level instanceof NotReadyError}function has_suggested_level(obj){return obj!=null&&typeof obj=="object"&&typeof obj.suggested_level=="string"}function is_log_level(level){return ALL_LEVELS.includes(level)}function is_user_level(level){return[...ERROR_LEVELS,"owner_warn"].includes(level)}function get_suggested_level_logger(level){if(logging_medium.is_ignorable_error(level))return warn;if(has_suggested_level(level)){let new_level=level.suggested_level;if(is_log_level(new_level))return LOG_LEVELS[new_level];if(is_user_level(new_level))return USER_LEVELS[new_level]}return error}function get_custom_code_section(line_no){if(!window.headers_source_maps)return null;for(let[tag_name,start_line,end_line]of window.headers_source_maps)if(line_no>Number(start_line)&&line_no<=Number(end_line))return tag_name;return null}function get_browser_error_handler(Lib32){return event=>{var _caught_err$stack,_error_url$startsWith,_Lib$location$get_ser,_Lib2;let caught_err_any=event.error,error_url=event.filename,col=event.colno,line=event.lineno;if(!caught_err_any)return;let caught_err=ensure_bubble_error(caught_err_any),root_stack=`
    at root (${error_url!=null?error_url:""}:${line!=null?line:-1}:${col!=null?col:-1})`;caught_err.stack=((_caught_err$stack=caught_err.stack)!=null?_caught_err$stack:"")+root_stack;let is_html_error=(_error_url$startsWith=error_url==null?void 0:error_url.startsWith((_Lib$location$get_ser=(_Lib2=Lib32())==null?void 0:_Lib2.location.get_server_base())!=null?_Lib$location$get_ser:""))!=null?_error_url$startsWith:!1,html_section=line?get_custom_code_section(line):null,is_custom_header_code=!1,is_plugin_header_code=!1;is_html_error&&html_section&&(is_custom_header_code=[CUSTOM_PAGE_HEADER_TAG,CUSTOM_APP_HEADER_TAG].includes(html_section),is_plugin_header_code=html_section.startsWith(PLUGIN_MAIN_HEADER_PREFIX)||html_section.startsWith(PLUGIN_PAGE_HEADER_PREFIX),caught_err instanceof BubbleError&&caught_err.extend({html_section}));let is_plugin_code=is_plugin_header_code||caught_err.stack.includes(PLUGIN_CODE_SRC_PREFIX),JQUERY_MIN_LINE_COUNT=10,is_outside_package=!is_edit_mode()&&!is_plugin_edit_mode()&&!is_local()&&!caught_err.stack.split(`
`).filter(line2=>{var _line$match$,_line$match;return line2=(_line$match$=(_line$match=line2.match(/\/package\/.+(?:run|run_debug)\.js:(\d+):/))==null?void 0:_line$match[1])!=null?_line$match$:"",parseInt(line2)>JQUERY_MIN_LINE_COUNT}).join(`
`).includes("/package/"),jquery_error=is_outside_package&&caught_err.stack.includes("/package/"),is_custom_html_error=is_custom_header_code||caught_err.stack.includes("UNMANGLED_html_wrap"),is_extension=caught_err.stack.includes("chrome-extension://");if(caught_err instanceof BubbleError&&caught_err.extend({UNCAUGHT:"caught by window.onerror",is_plugin_code,is_3rd_party_code:is_plugin_code||is_custom_html_error,is_outside_package}),is_custom_html_error)owner_only_error("html bug",{display:`Bug in custom html:
`+caught_err.stack});else{if(!error_url||is_extension)return;is_plugin_code||is_outside_package?jquery_error?owner_error("Error in jQuery code -- likely a plugin",{display:"Bug in custom code "+caught_err.stack,original:caught_err}):owner_error("Error in custom code",{display:"Bug in custom code "+caught_err.stack,original:caught_err}):error(caught_err)}return!1}}function install_browser_error_handler(_ref){var _window$disableLoadEr,_window5,_window$captured_test;let{Lib:Lib32}=_ref;(_window$disableLoadEr=(_window5=window).disableLoadErrorFunction)==null||_window$disableLoadEr.call(_window5);let browser_error_handler=get_browser_error_handler(Lib32);(_window$captured_test=window.captured_test_errors)!=null&&_window$captured_test.length&&(window.captured_test_errors.forEach(error2=>{let{msg,url:url9,line,col}=error2;browser_error_handler(new ErrorEvent("error",{message:msg,filename:url9,lineno:line,colno:col}))}),window.gapListener!=null&&(window.removeEventListener("error",window.gapListener),window.gapListener=void 0)),window.addEventListener("error",browser_error_handler)}function debug(message,data){log("debug",message,data)}function verbose(message,data){log("verbose",message,data)}function info(message,data){log("info",message,data)}function warn(message,data){log("warn",message,data)}function error(message,data){log("error",message,data)}function fatal(message,data){log("debug",message,data)}function owner_error(message,data){var _data5;(_data5=data)!=null||(data={}),data=with_user_level(data,"owner_error"),info(message,data)}function owner_warn(message,data){var _data6;(_data6=data)!=null||(data={}),data=with_user_level(data,"owner_warn"),info(message,data)}function owner_only_error(message,data){var _data7;(_data7=data)!=null||(data={}),data=with_user_level(data,"owner_error"),verbose(message,data)}function user_error(message,data){var _data8;(_data8=data)!=null||(data={}),data=with_user_level(data,"user_error"),info(message,data)}function propagated_error(message,inner_error){let extra_data=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};get_suggested_level_logger(inner_error)(message,{inner_error,...extra_data})}function with_user_level(data,user_level){return data={...data},typeof data.tags=="object"?data.tags={...data.tags}:data.tags={},data.tags.user_level=user_level,data}function set_human_friendly(fn){_human_friendly=fn}function human_friendly(err){return _human_friendly(err)}function human_friendly_default(err){return err==null?"":(log(err),ensure_bubble_error(err).display())}function get_log_tags(){var _logging_medium$get_l,_logging_medium$get_l2,_logging_medium;return(_logging_medium$get_l=(_logging_medium$get_l2=(_logging_medium=logging_medium).get_log_tags)==null?void 0:_logging_medium$get_l2.call(_logging_medium))!=null?_logging_medium$get_l:{}}var import_web_dom_collections_iterator3,import_es_error_cause2,util2,reported_errors,_early_logger,default_logging_medium,logging_medium,LOG_MESSAGE,AREAS2,STACK_OMITTED2,NO_MESSAGE,log,LOG_LEVELS,USER_LEVELS,_human_friendly,init_logger=__esm({"lib-browser/logger.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator3=__toESM(require_web_dom_collections_iterator()),import_es_error_cause2=__toESM(require_es_error_cause()),util2=__toESM(require_util());init_logging();init_plugin();init_mode_check();init_errors();init_errors();init_loggable();init_environment_utilities();reported_errors=new WeakSet,_early_logger=(level,message,data)=>{var _data;(_data=data)!=null||(data={}),data.level=level,data.message=message!=null?message:"",console.log(JSON.stringify(data))},default_logging_medium={fiber_wrapper(fn){return fn},log(level,message,data){_early_logger("error","Logging Error: must call logger.register_logger before logging",{}),_early_logger(level,message,data)},is_ignorable_error(){return!1},is_test_failure(){return!1}},logging_medium=default_logging_medium;LOG_MESSAGE="log message",AREAS2=AREAS,STACK_OMITTED2=STACK_OMITTED,NO_MESSAGE="NO_MESSAGE";log=logging_medium.fiber_wrapper((level,message,data)=>{if(level instanceof Error||is_not_ready_error(level))return get_suggested_level_logger(level)(ensure_bubble_error(level));if(level==null&&message==null)return debug(NO_MESSAGE);if(typeof level!="string")throw new UnexpectedError("Expected logger.log(err) or logger.log(level, message, data), but got a non-string level",{level});if(data==null?data={}:typeof data=="string"&&(data={data}),!is_log_level(level))throw new UnexpectedError("unknown level",{level});let original_message=message;if(message instanceof NotReadyError&&(message=ensure_bubble_error(message)),message instanceof Error){var _message$args,_data2,_data2$tags;if(reported_errors.has(message))return;reported_errors.add(message);let object2=(_message$args=message.args)!=null?_message$args:{};for(let k in object2){let v=object2[k];typeof v=="function"?data[k]=v():data[k]=v}data.stack=message.stack,(_data2$tags=(_data2=data).tags)!=null||(_data2.tags={}),data.tags.error_class=message.error_class,data.tags.user_level&&!data.display&&(data.display=message.display()),data.display&&typeof data.display!="string"&&(data.display=String(data.display)),message=message.message}else if(typeof message=="string"){var _data3,_data3$stack,_data4,_data4$tags;(_data3$stack=(_data3=data).stack)!=null||(_data3.stack=capture_stack(message,1)),(_data4$tags=(_data4=data).tags)!=null||(_data4.tags={}),data.tags.error_class=LOG_MESSAGE}else if(message==null)message=NO_MESSAGE;else throw new UnexpectedError("invalid message format, must be error or string",{message:util2.inspect(message)});if(data!=null&&typeof data!="object")throw new UnexpectedError("invalid data format, object, error, or undefined",{data:util2.inspect(data)});if(logging_medium.log(level,message,data),running_test()&&original_message!==void 0&&logging_medium.is_test_failure(original_message,level))throw console.log(message,data),new UnexpectedError("log with level >= error while running test",{level,original:message,data:data})});LOG_LEVELS={debug,verbose,info,warn,error,fatal};USER_LEVELS={owner_error,owner_warn,user_error,error};_human_friendly=human_friendly_default}});var core_exports={};__export(core_exports,{DROPDOWN_DESCRIPTION_CONTEXT:()=>DROPDOWN_DESCRIPTION_CONTEXT,LEGACY_PARAM_ID:()=>LEGACY_PARAM_ID,SLOW_RANDOM_LENGTH:()=>SLOW_RANDOM_LENGTH});var DROPDOWN_DESCRIPTION_CONTEXT,LEGACY_PARAM_ID,SLOW_RANDOM_LENGTH,init_core=__esm({"lib-browser/constants/core.js"(){"use strict";init_define_process_env();init_shim();DROPDOWN_DESCRIPTION_CONTEXT="DROPDOWN_OPTIONS",LEGACY_PARAM_ID="_LEGACY_",SLOW_RANDOM_LENGTH=1e5}});var require_regexp_flags=__commonJS({"node_modules/core-js/internals/regexp-flags.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var anObject=require_an_object();module2.exports=function(){var that=anObject(this),result="";return that.hasIndices&&(result+="d"),that.global&&(result+="g"),that.ignoreCase&&(result+="i"),that.multiline&&(result+="m"),that.dotAll&&(result+="s"),that.unicode&&(result+="u"),that.unicodeSets&&(result+="v"),that.sticky&&(result+="y"),result}}});var require_regexp_sticky_helpers=__commonJS({"node_modules/core-js/internals/regexp-sticky-helpers.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),global=require_global(),$RegExp=global.RegExp,UNSUPPORTED_Y=fails(function(){var re2=$RegExp("a","y");return re2.lastIndex=2,re2.exec("abcd")!==null}),MISSED_STICKY=UNSUPPORTED_Y||fails(function(){return!$RegExp("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y||fails(function(){var re2=$RegExp("^r","gy");return re2.lastIndex=2,re2.exec("str")!==null});module2.exports={BROKEN_CARET,MISSED_STICKY,UNSUPPORTED_Y}}});var require_regexp_unsupported_dot_all=__commonJS({"node_modules/core-js/internals/regexp-unsupported-dot-all.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),global=require_global(),$RegExp=global.RegExp;module2.exports=fails(function(){var re2=$RegExp(".","s");return!(re2.dotAll&&re2.test(`
`)&&re2.flags==="s")})}});var require_regexp_unsupported_ncg=__commonJS({"node_modules/core-js/internals/regexp-unsupported-ncg.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),global=require_global(),$RegExp=global.RegExp;module2.exports=fails(function(){var re2=$RegExp("(?<a>b)","g");return re2.exec("b").groups.a!=="b"||"b".replace(re2,"$<a>c")!=="bc"})}});var require_regexp_exec=__commonJS({"node_modules/core-js/internals/regexp-exec.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),uncurryThis=require_function_uncurry_this(),toString2=require_to_string(),regexpFlags=require_regexp_flags(),stickyHelpers=require_regexp_sticky_helpers(),shared=require_shared(),create3=require_object_create(),getInternalState=require_internal_state().get,UNSUPPORTED_DOT_ALL=require_regexp_unsupported_dot_all(),UNSUPPORTED_NCG=require_regexp_unsupported_ncg(),nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=uncurryThis("".charAt),indexOf=uncurryThis("".indexOf),replace=uncurryThis("".replace),stringSlice=uncurryThis("".slice),UPDATES_LAST_INDEX_WRONG=function(){var re1=/a/,re2=/b*/g;return call(nativeExec,re1,"a"),call(nativeExec,re2,"a"),re1.lastIndex!==0||re2.lastIndex!==0}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(string){var re2=this,state4=getInternalState(re2),str=toString2(string),raw=state4.raw,result,reCopy,lastIndex,match,i,object2,group;if(raw)return raw.lastIndex=re2.lastIndex,result=call(patchedExec,raw,str),re2.lastIndex=raw.lastIndex,result;var groups=state4.groups,sticky=UNSUPPORTED_Y&&re2.sticky,flags=call(regexpFlags,re2),source=re2.source,charsAdded=0,strCopy=str;if(sticky&&(flags=replace(flags,"y",""),indexOf(flags,"g")===-1&&(flags+="g"),strCopy=stringSlice(str,re2.lastIndex),re2.lastIndex>0&&(!re2.multiline||re2.multiline&&charAt(str,re2.lastIndex-1)!==`
`)&&(source="(?: "+source+")",strCopy=" "+strCopy,charsAdded++),reCopy=new RegExp("^(?:"+source+")",flags)),NPCG_INCLUDED&&(reCopy=new RegExp("^"+source+"$(?!\\s)",flags)),UPDATES_LAST_INDEX_WRONG&&(lastIndex=re2.lastIndex),match=call(nativeExec,sticky?reCopy:re2,strCopy),sticky?match?(match.input=stringSlice(match.input,charsAdded),match[0]=stringSlice(match[0],charsAdded),match.index=re2.lastIndex,re2.lastIndex+=match[0].length):re2.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&match&&(re2.lastIndex=re2.global?match.index+match[0].length:lastIndex),NPCG_INCLUDED&&match&&match.length>1&&call(nativeReplace,match[0],reCopy,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(match[i]=void 0)}),match&&groups)for(match.groups=object2=create3(null),i=0;i<groups.length;i++)group=groups[i],object2[group[0]]=match[group[1]];return match});module2.exports=patchedExec}});var require_es_regexp_exec=__commonJS({"node_modules/core-js/modules/es.regexp.exec.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),exec=require_regexp_exec();$2({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec})}});var require_fix_regexp_well_known_symbol_logic=__commonJS({"node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"(exports3,module2){"use strict";init_define_process_env();init_shim();require_es_regexp_exec();var call=require_function_call(),defineBuiltIn=require_define_built_in(),regexpExec=require_regexp_exec(),fails=require_fails(),wellKnownSymbol=require_well_known_symbol(),createNonEnumerableProperty=require_create_non_enumerable_property(),SPECIES=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype;module2.exports=function(KEY,exec,FORCED,SHAM){var SYMBOL=wellKnownSymbol(KEY),DELEGATES_TO_SYMBOL=!fails(function(){var O={};return O[SYMBOL]=function(){return 7},""[KEY](O)!==7}),DELEGATES_TO_EXEC=DELEGATES_TO_SYMBOL&&!fails(function(){var execCalled=!1,re2=/a/;return KEY==="split"&&(re2={},re2.constructor={},re2.constructor[SPECIES]=function(){return re2},re2.flags="",re2[SYMBOL]=/./[SYMBOL]),re2.exec=function(){return execCalled=!0,null},re2[SYMBOL](""),!execCalled});if(!DELEGATES_TO_SYMBOL||!DELEGATES_TO_EXEC||FORCED){var nativeRegExpMethod=/./[SYMBOL],methods3=exec(SYMBOL,""[KEY],function(nativeMethod,regexp,str,arg2,forceStringMethod){var $exec=regexp.exec;return $exec===regexpExec||$exec===RegExpPrototype.exec?DELEGATES_TO_SYMBOL&&!forceStringMethod?{done:!0,value:call(nativeRegExpMethod,regexp,str,arg2)}:{done:!0,value:call(nativeMethod,str,regexp,arg2)}:{done:!1}});defineBuiltIn(String.prototype,KEY,methods3[0]),defineBuiltIn(RegExpPrototype,SYMBOL,methods3[1])}SHAM&&createNonEnumerableProperty(RegExpPrototype[SYMBOL],"sham",!0)}}});var require_string_multibyte=__commonJS({"node_modules/core-js/internals/string-multibyte.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),toIntegerOrInfinity=require_to_integer_or_infinity(),toString2=require_to_string(),requireObjectCoercible=require_require_object_coercible(),charAt=uncurryThis("".charAt),charCodeAt=uncurryThis("".charCodeAt),stringSlice=uncurryThis("".slice),createMethod=function(CONVERT_TO_STRING){return function($this,pos){var S18=toString2(requireObjectCoercible($this)),position=toIntegerOrInfinity(pos),size=S18.length,first,second;return position<0||position>=size?CONVERT_TO_STRING?"":void 0:(first=charCodeAt(S18,position),first<55296||first>56319||position+1===size||(second=charCodeAt(S18,position+1))<56320||second>57343?CONVERT_TO_STRING?charAt(S18,position):first:CONVERT_TO_STRING?stringSlice(S18,position,position+2):(first-55296<<10)+(second-56320)+65536)}};module2.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}}});var require_advance_string_index=__commonJS({"node_modules/core-js/internals/advance-string-index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var charAt=require_string_multibyte().charAt;module2.exports=function(S18,index,unicode){return index+(unicode?charAt(S18,index).length:1)}}});var require_get_substitution=__commonJS({"node_modules/core-js/internals/get-substitution.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),toObject=require_to_object(),floor=Math.floor,charAt=uncurryThis("".charAt),replace=uncurryThis("".replace),stringSlice=uncurryThis("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g;module2.exports=function(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length,m=captures.length,symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;return namedCaptures!==void 0&&(namedCaptures=toObject(namedCaptures),symbols=SUBSTITUTION_SYMBOLS),replace(replacement,symbols,function(match,ch){var capture2;switch(charAt(ch,0)){case"$":return"$";case"&":return matched;case"`":return stringSlice(str,0,position);case"'":return stringSlice(str,tailPos);case"<":capture2=namedCaptures[stringSlice(ch,1,-1)];break;default:var n=+ch;if(n===0)return match;if(n>m){var f=floor(n/10);return f===0?match:f<=m?captures[f-1]===void 0?charAt(ch,1):captures[f-1]+charAt(ch,1):match}capture2=captures[n-1]}return capture2===void 0?"":capture2})}}});var require_regexp_exec_abstract=__commonJS({"node_modules/core-js/internals/regexp-exec-abstract.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),anObject=require_an_object(),isCallable=require_is_callable(),classof=require_classof_raw(),regexpExec=require_regexp_exec(),$TypeError=TypeError;module2.exports=function(R,S18){var exec=R.exec;if(isCallable(exec)){var result=call(exec,R,S18);return result!==null&&anObject(result),result}if(classof(R)==="RegExp")return call(regexpExec,R,S18);throw new $TypeError("RegExp#exec called on incompatible receiver")}}});var require_es_string_replace=__commonJS({"node_modules/core-js/modules/es.string.replace.js"(){"use strict";init_define_process_env();init_shim();var apply=require_function_apply(),call=require_function_call(),uncurryThis=require_function_uncurry_this(),fixRegExpWellKnownSymbolLogic=require_fix_regexp_well_known_symbol_logic(),fails=require_fails(),anObject=require_an_object(),isCallable=require_is_callable(),isNullOrUndefined=require_is_null_or_undefined(),toIntegerOrInfinity=require_to_integer_or_infinity(),toLength=require_to_length(),toString2=require_to_string(),requireObjectCoercible=require_require_object_coercible(),advanceStringIndex=require_advance_string_index(),getMethod=require_get_method(),getSubstitution=require_get_substitution(),regExpExec=require_regexp_exec_abstract(),wellKnownSymbol=require_well_known_symbol(),REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(it){return it===void 0?it:String(it)},REPLACE_KEEPS_$0=function(){return"a".replace(/./,"$0")==="$0"}(),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=function(){return/./[REPLACE]?/./[REPLACE]("a","$0")==="":!1}(),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var re2=/./;return re2.exec=function(){var result=[];return result.groups={a:"7"},result},"".replace(re2,"$<a>")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(_,nativeReplace,maybeCallNative){var UNSAFE_SUBSTITUTE=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(searchValue,replaceValue){var O=requireObjectCoercible(this),replacer=isNullOrUndefined(searchValue)?void 0:getMethod(searchValue,REPLACE);return replacer?call(replacer,searchValue,O,replaceValue):call(nativeReplace,toString2(O),searchValue,replaceValue)},function(string,replaceValue){var rx=anObject(this),S18=toString2(string);if(typeof replaceValue=="string"&&stringIndexOf(replaceValue,UNSAFE_SUBSTITUTE)===-1&&stringIndexOf(replaceValue,"$<")===-1){var res=maybeCallNative(nativeReplace,rx,S18,replaceValue);if(res.done)return res.value}var functionalReplace=isCallable(replaceValue);functionalReplace||(replaceValue=toString2(replaceValue));var global=rx.global,fullUnicode;global&&(fullUnicode=rx.unicode,rx.lastIndex=0);for(var results=[],result;result=regExpExec(rx,S18),!(result===null||(push(results,result),!global));){var matchStr=toString2(result[0]);matchStr===""&&(rx.lastIndex=advanceStringIndex(S18,toLength(rx.lastIndex),fullUnicode))}for(var accumulatedResult="",nextSourcePosition=0,i=0;i<results.length;i++){result=results[i];for(var matched=toString2(result[0]),position=max(min(toIntegerOrInfinity(result.index),S18.length),0),captures=[],replacement,j2=1;j2<result.length;j2++)push(captures,maybeToString(result[j2]));var namedCaptures=result.groups;if(functionalReplace){var replacerArgs=concat([matched],captures,position,S18);namedCaptures!==void 0&&push(replacerArgs,namedCaptures),replacement=toString2(apply(replaceValue,void 0,replacerArgs))}else replacement=getSubstitution(matched,S18,position,captures,namedCaptures,replaceValue);position>=nextSourcePosition&&(accumulatedResult+=stringSlice(S18,nextSourcePosition,position)+replacement,nextSourcePosition=position+matched.length)}return accumulatedResult+stringSlice(S18,nextSourcePosition)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE)}});function re(flagsOrLiterals){if(typeof flagsOrLiterals=="string")return function(){return new RegExp(regexTemplate(...arguments),flagsOrLiterals)};for(var _len=arguments.length,rest=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)rest[_key-1]=arguments[_key];return regexTemplate(flagsOrLiterals,...rest)}function oneOf(){for(var _len2=arguments.length,parts=new Array(_len2),_key2=0;_key2<_len2;_key2++)parts[_key2]=arguments[_key2];return parts.length===0?/^\b$/:new RegExp(parts.map(asRegexSource).join("|"))}function capture(name,part){return new RegExp(`(?<${name}>${asRegexSource(part)})`)}function withFlags(flags,rx){return new RegExp(rx,flags)}function regexTemplate(literalParts){let source=unescapeLiteral(literalParts.raw[0]);for(var _len4=arguments.length,injectedParts=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++)injectedParts[_key4-1]=arguments[_key4];for(let[i,part]of injectedParts.entries())source+=asRegexSource(part),source+=unescapeLiteral(literalParts.raw[i+1]);return new RegExp(source)}function asRegexSource(part){if(part instanceof RegExp)return atomic(part.source);if(typeof part=="string")return atomic(escapeString(part));throw new Error("Illegal value used as regex part")}function atomic(str){return`(?:${str})`}function unescapeLiteral(str){return str.replace(/\\`/g,"`")}function escapeString(str){return str.replace(regexSpecials,"\\$&")}var import_web_dom_collections_iterator4,import_es_error_cause3,import_es_string_replace,specials,escapedSpecials,regexSpecials,init_regexUtilities=__esm({"lib-browser/u/shared/regexUtilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator4=__toESM(require_web_dom_collections_iterator()),import_es_error_cause3=__toESM(require_es_error_cause()),import_es_string_replace=__toESM(require_es_string_replace());specials=Array.from(["\\",".[]^-{}","()<>?!=:","^$","{}*+?|"].join("")),escapedSpecials=specials.map(c=>`\\${c}`),regexSpecials=new RegExp(`[${escapedSpecials.join("")}]`,"g")}});function UUID(){let rand=Math.round(Math.random()*UUID_LENGTH);return`${Date.now()}x${pad(rand,18)}`}function is_UUID(val){return typeof val=="string"&&is_uuid_regexp.test(val)}function pad(base,num){let str_base=String(base);return str_base+new Array(num+1-str_base.length).join("0")}function get_uuid_seed(_ref){let{seed,timestamp:timestamp2,iterations}=_ref;return new UUID_SEED(seed,timestamp2,iterations)}function get_random_seed(){return Math.round(Math.random()*UUID_LENGTH)%MODULO}function short_uid(counter,editor_id){let digits;if(counter<70304)digits=3;else if(counter<175478784)digits=5,counter+=190102016;else if(counter<1e14)digits=10,counter+=0x1edcf7bcf280000;else return UUID();let result=new Array(digits);for(let i=digits-1;i>=0;i--)result[i]=ALPHABET.charAt(counter%52),counter=Math.floor(counter/52);return result.join("")+(String(editor_id)==="-1"?"":String(editor_id))}function start_count(){_cur_count={}}function count(name){if(_cur_count){var _cur_count2,_cur_count2$name;(_cur_count2$name=(_cur_count2=_cur_count)[name])!=null||(_cur_count2[name]=0),_cur_count[name]++}}function stop_count(){if(_cur_count){let counts2=Object.entries(_cur_count);counts2.sort((a,b)=>b[1]-a[1]);for(let[k,v]of counts2)console.log(`${k}: ${v}`)}}var import_web_dom_collections_iterator5,import_seedrandom,UUID_LENGTH,contains_uuid_regexp,is_uuid_regexp,LUID,MODULO,MULTIPLIER,OFFSET,UUID_SEED,Random,ALPHABET,_cur_count,init_uuid=__esm({"lib-browser/u/shared/uuid.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator5=__toESM(require_web_dom_collections_iterator()),import_seedrandom=__toESM(require_seedrandom2());init_logger();init_core();init_regexUtilities();UUID_LENGTH=1e18;contains_uuid_regexp=/\d{13}x\d{18}/,is_uuid_regexp=re`^${contains_uuid_regexp}$`;LUID=function(){let counter=1;return()=>(counter++,`${Date.now()}x${counter}`)}();MODULO=UUID_LENGTH,MULTIPLIER=1664525,OFFSET=1013904223;UUID_SEED=class{constructor(seed,timestamp2,iterations){var _iterations;this.seed=void 0,this.timestamp=void 0,this.iterations=void 0,this.seed=seed,this.timestamp=timestamp2,(_iterations=iterations)!=null||(iterations=0),this.iterations=iterations;for(let i=0;i<iterations;i++)this.randn()}randn(){return this.seed=(MULTIPLIER*this.seed+OFFSET)%MODULO,this.iterations++,this.seed}UUID(){return`${this.timestamp}x${pad(this.randn(),18)}`}},Random=class{constructor(seed){let iterations=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.seed=void 0,this.iterations=void 0,iterations>1e5&&warn("dangerously high random initialization iterations",{iterations}),this.seed=seed,this.iterations=0;for(let i=0;i<iterations;i++)this.next()}next(){return this.seed=(0,import_seedrandom.default)(`${this.seed}`)(),this.iterations++,this.seed}random(x,y){return this.next(),Math.floor(this.seed*(y-x)+x)}},ALPHABET="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";_cur_count=null}});var freeGlobal,freeGlobal_default,init_freeGlobal=__esm({"node_modules/lodash-es/_freeGlobal.js"(){init_define_process_env();init_shim();freeGlobal=typeof window=="object"&&window&&window.Object===Object&&window,freeGlobal_default=freeGlobal}});var freeSelf,root,root_default,init_root=__esm({"node_modules/lodash-es/_root.js"(){init_define_process_env();init_shim();init_freeGlobal();freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal_default||freeSelf||Function("return this")(),root_default=root}});var Symbol2,Symbol_default,init_Symbol=__esm({"node_modules/lodash-es/_Symbol.js"(){init_define_process_env();init_shim();init_root();Symbol2=root_default.Symbol,Symbol_default=Symbol2}});function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}var objectProto,hasOwnProperty,nativeObjectToString,symToStringTag,getRawTag_default,init_getRawTag=__esm({"node_modules/lodash-es/_getRawTag.js"(){init_define_process_env();init_shim();init_Symbol();objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol_default?Symbol_default.toStringTag:void 0;getRawTag_default=getRawTag}});function objectToString(value){return nativeObjectToString2.call(value)}var objectProto2,nativeObjectToString2,objectToString_default,init_objectToString=__esm({"node_modules/lodash-es/_objectToString.js"(){init_define_process_env();init_shim();objectProto2=Object.prototype,nativeObjectToString2=objectProto2.toString;objectToString_default=objectToString}});function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag2&&symToStringTag2 in Object(value)?getRawTag_default(value):objectToString_default(value)}var nullTag,undefinedTag,symToStringTag2,baseGetTag_default,init_baseGetTag=__esm({"node_modules/lodash-es/_baseGetTag.js"(){init_define_process_env();init_shim();init_Symbol();init_getRawTag();init_objectToString();nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag2=Symbol_default?Symbol_default.toStringTag:void 0;baseGetTag_default=baseGetTag}});function isObjectLike(value){return value!=null&&typeof value=="object"}var isObjectLike_default,init_isObjectLike=__esm({"node_modules/lodash-es/isObjectLike.js"(){init_define_process_env();init_shim();isObjectLike_default=isObjectLike}});function isSymbol(value){return typeof value=="symbol"||isObjectLike_default(value)&&baseGetTag_default(value)==symbolTag}var symbolTag,isSymbol_default,init_isSymbol=__esm({"node_modules/lodash-es/isSymbol.js"(){init_define_process_env();init_shim();init_baseGetTag();init_isObjectLike();symbolTag="[object Symbol]";isSymbol_default=isSymbol}});function arrayMap(array,iteratee){for(var index=-1,length=array==null?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}var arrayMap_default,init_arrayMap=__esm({"node_modules/lodash-es/_arrayMap.js"(){init_define_process_env();init_shim();arrayMap_default=arrayMap}});var isArray,isArray_default,init_isArray=__esm({"node_modules/lodash-es/isArray.js"(){init_define_process_env();init_shim();isArray=Array.isArray,isArray_default=isArray}});function baseToString(value){if(typeof value=="string")return value;if(isArray_default(value))return arrayMap_default(value,baseToString)+"";if(isSymbol_default(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}var INFINITY,symbolProto,symbolToString,baseToString_default,init_baseToString=__esm({"node_modules/lodash-es/_baseToString.js"(){init_define_process_env();init_shim();init_Symbol();init_arrayMap();init_isArray();init_isSymbol();INFINITY=1/0,symbolProto=Symbol_default?Symbol_default.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;baseToString_default=baseToString}});function trimmedEndIndex(string){for(var index=string.length;index--&&reWhitespace.test(string.charAt(index)););return index}var reWhitespace,trimmedEndIndex_default,init_trimmedEndIndex=__esm({"node_modules/lodash-es/_trimmedEndIndex.js"(){init_define_process_env();init_shim();reWhitespace=/\s/;trimmedEndIndex_default=trimmedEndIndex}});function baseTrim(string){return string&&string.slice(0,trimmedEndIndex_default(string)+1).replace(reTrimStart,"")}var reTrimStart,baseTrim_default,init_baseTrim=__esm({"node_modules/lodash-es/_baseTrim.js"(){init_define_process_env();init_shim();init_trimmedEndIndex();reTrimStart=/^\s+/;baseTrim_default=baseTrim}});function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}var isObject_default,init_isObject=__esm({"node_modules/lodash-es/isObject.js"(){init_define_process_env();init_shim();isObject_default=isObject}});function toNumber(value){if(typeof value=="number")return value;if(isSymbol_default(value))return NAN;if(isObject_default(value)){var other=typeof value.valueOf=="function"?value.valueOf():value;value=isObject_default(other)?other+"":other}if(typeof value!="string")return value===0?value:+value;value=baseTrim_default(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}var NAN,reIsBadHex,reIsBinary,reIsOctal,freeParseInt,toNumber_default,init_toNumber=__esm({"node_modules/lodash-es/toNumber.js"(){init_define_process_env();init_shim();init_baseTrim();init_isObject();init_isSymbol();NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;toNumber_default=toNumber}});function identity(value){return value}var identity_default,init_identity=__esm({"node_modules/lodash-es/identity.js"(){init_define_process_env();init_shim();identity_default=identity}});function isFunction(value){if(!isObject_default(value))return!1;var tag=baseGetTag_default(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}var asyncTag,funcTag,genTag,proxyTag,isFunction_default,init_isFunction=__esm({"node_modules/lodash-es/isFunction.js"(){init_define_process_env();init_shim();init_baseGetTag();init_isObject();asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";isFunction_default=isFunction}});var coreJsData,coreJsData_default,init_coreJsData=__esm({"node_modules/lodash-es/_coreJsData.js"(){init_define_process_env();init_shim();init_root();coreJsData=root_default["__core-js_shared__"],coreJsData_default=coreJsData}});function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var maskSrcKey,isMasked_default,init_isMasked=__esm({"node_modules/lodash-es/_isMasked.js"(){init_define_process_env();init_shim();init_coreJsData();maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData_default&&coreJsData_default.keys&&coreJsData_default.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();isMasked_default=isMasked}});function toSource(func){if(func!=null){try{return funcToString.call(func)}catch{}try{return func+""}catch{}}return""}var funcProto,funcToString,toSource_default,init_toSource=__esm({"node_modules/lodash-es/_toSource.js"(){init_define_process_env();init_shim();funcProto=Function.prototype,funcToString=funcProto.toString;toSource_default=toSource}});function baseIsNative(value){if(!isObject_default(value)||isMasked_default(value))return!1;var pattern=isFunction_default(value)?reIsNative:reIsHostCtor;return pattern.test(toSource_default(value))}var reRegExpChar,reIsHostCtor,funcProto2,objectProto3,funcToString2,hasOwnProperty2,reIsNative,baseIsNative_default,init_baseIsNative=__esm({"node_modules/lodash-es/_baseIsNative.js"(){init_define_process_env();init_shim();init_isFunction();init_isMasked();init_isObject();init_toSource();reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto2=Function.prototype,objectProto3=Object.prototype,funcToString2=funcProto2.toString,hasOwnProperty2=objectProto3.hasOwnProperty,reIsNative=RegExp("^"+funcToString2.call(hasOwnProperty2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");baseIsNative_default=baseIsNative}});function getValue(object2,key){return object2==null?void 0:object2[key]}var getValue_default,init_getValue=__esm({"node_modules/lodash-es/_getValue.js"(){init_define_process_env();init_shim();getValue_default=getValue}});function getNative(object2,key){var value=getValue_default(object2,key);return baseIsNative_default(value)?value:void 0}var getNative_default,init_getNative=__esm({"node_modules/lodash-es/_getNative.js"(){init_define_process_env();init_shim();init_baseIsNative();init_getValue();getNative_default=getNative}});var WeakMap2,WeakMap_default,init_WeakMap=__esm({"node_modules/lodash-es/_WeakMap.js"(){init_define_process_env();init_shim();init_getNative();init_root();WeakMap2=getNative_default(root_default,"WeakMap"),WeakMap_default=WeakMap2}});var defineProperty,defineProperty_default,init_defineProperty=__esm({"node_modules/lodash-es/_defineProperty.js"(){init_define_process_env();init_shim();init_getNative();defineProperty=function(){try{var func=getNative_default(Object,"defineProperty");return func({},"",{}),func}catch{}}(),defineProperty_default=defineProperty}});function isIndex(value,length){var type=typeof value;return length=length==null?MAX_SAFE_INTEGER:length,!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length}var MAX_SAFE_INTEGER,reIsUint,isIndex_default,init_isIndex=__esm({"node_modules/lodash-es/_isIndex.js"(){init_define_process_env();init_shim();MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;isIndex_default=isIndex}});function baseAssignValue(object2,key,value){key=="__proto__"&&defineProperty_default?defineProperty_default(object2,key,{configurable:!0,enumerable:!0,value,writable:!0}):object2[key]=value}var baseAssignValue_default,init_baseAssignValue=__esm({"node_modules/lodash-es/_baseAssignValue.js"(){init_define_process_env();init_shim();init_defineProperty();baseAssignValue_default=baseAssignValue}});function eq(value,other){return value===other||value!==value&&other!==other}var eq_default,init_eq=__esm({"node_modules/lodash-es/eq.js"(){init_define_process_env();init_shim();eq_default=eq}});function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER2}var MAX_SAFE_INTEGER2,isLength_default,init_isLength=__esm({"node_modules/lodash-es/isLength.js"(){init_define_process_env();init_shim();MAX_SAFE_INTEGER2=9007199254740991;isLength_default=isLength}});function isArrayLike(value){return value!=null&&isLength_default(value.length)&&!isFunction_default(value)}var isArrayLike_default,init_isArrayLike=__esm({"node_modules/lodash-es/isArrayLike.js"(){init_define_process_env();init_shim();init_isFunction();init_isLength();isArrayLike_default=isArrayLike}});function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto4;return value===proto}var objectProto4,isPrototype_default,init_isPrototype=__esm({"node_modules/lodash-es/_isPrototype.js"(){init_define_process_env();init_shim();objectProto4=Object.prototype;isPrototype_default=isPrototype}});function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}var baseTimes_default,init_baseTimes=__esm({"node_modules/lodash-es/_baseTimes.js"(){init_define_process_env();init_shim();baseTimes_default=baseTimes}});function baseIsArguments(value){return isObjectLike_default(value)&&baseGetTag_default(value)==argsTag}var argsTag,baseIsArguments_default,init_baseIsArguments=__esm({"node_modules/lodash-es/_baseIsArguments.js"(){init_define_process_env();init_shim();init_baseGetTag();init_isObjectLike();argsTag="[object Arguments]";baseIsArguments_default=baseIsArguments}});var objectProto5,hasOwnProperty3,propertyIsEnumerable,isArguments,isArguments_default,init_isArguments=__esm({"node_modules/lodash-es/isArguments.js"(){init_define_process_env();init_shim();init_baseIsArguments();init_isObjectLike();objectProto5=Object.prototype,hasOwnProperty3=objectProto5.hasOwnProperty,propertyIsEnumerable=objectProto5.propertyIsEnumerable,isArguments=baseIsArguments_default(function(){return arguments}())?baseIsArguments_default:function(value){return isObjectLike_default(value)&&hasOwnProperty3.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArguments_default=isArguments}});function stubFalse(){return!1}var stubFalse_default,init_stubFalse=__esm({"node_modules/lodash-es/stubFalse.js"(){init_define_process_env();init_shim();stubFalse_default=stubFalse}});var freeExports,freeModule,moduleExports,Buffer3,nativeIsBuffer,isBuffer,isBuffer_default,init_isBuffer=__esm({"node_modules/lodash-es/isBuffer.js"(){init_define_process_env();init_shim();init_root();init_stubFalse();freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer3=moduleExports?root_default.Buffer:void 0,nativeIsBuffer=Buffer3?Buffer3.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse_default,isBuffer_default=isBuffer}});function baseIsTypedArray(value){return isObjectLike_default(value)&&isLength_default(value.length)&&!!typedArrayTags[baseGetTag_default(value)]}var argsTag2,arrayTag,boolTag,dateTag,errorTag,funcTag2,mapTag,numberTag,objectTag,regexpTag,setTag,stringTag,weakMapTag,arrayBufferTag,dataViewTag,float32Tag,float64Tag,int8Tag,int16Tag,int32Tag,uint8Tag,uint8ClampedTag,uint16Tag,uint32Tag,typedArrayTags,baseIsTypedArray_default,init_baseIsTypedArray=__esm({"node_modules/lodash-es/_baseIsTypedArray.js"(){init_define_process_env();init_shim();init_baseGetTag();init_isLength();init_isObjectLike();argsTag2="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag2="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[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]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag2]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag2]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;baseIsTypedArray_default=baseIsTypedArray}});function baseUnary(func){return function(value){return func(value)}}var baseUnary_default,init_baseUnary=__esm({"node_modules/lodash-es/_baseUnary.js"(){init_define_process_env();init_shim();baseUnary_default=baseUnary}});var freeExports2,freeModule2,moduleExports2,freeProcess,nodeUtil,nodeUtil_default,init_nodeUtil=__esm({"node_modules/lodash-es/_nodeUtil.js"(){init_define_process_env();init_shim();init_freeGlobal();freeExports2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule2=freeExports2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports2=freeModule2&&freeModule2.exports===freeExports2,freeProcess=moduleExports2&&freeGlobal_default.process,nodeUtil=function(){try{var types=freeModule2&&freeModule2.require&&freeModule2.require("util").types;return types||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeUtil_default=nodeUtil}});var nodeIsTypedArray,isTypedArray,isTypedArray_default,init_isTypedArray=__esm({"node_modules/lodash-es/isTypedArray.js"(){init_define_process_env();init_shim();init_baseIsTypedArray();init_baseUnary();init_nodeUtil();nodeIsTypedArray=nodeUtil_default&&nodeUtil_default.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary_default(nodeIsTypedArray):baseIsTypedArray_default,isTypedArray_default=isTypedArray}});function arrayLikeKeys(value,inherited){var isArr=isArray_default(value),isArg=!isArr&&isArguments_default(value),isBuff=!isArr&&!isArg&&isBuffer_default(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray_default(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes_default(value.length,String):[],length=result.length;for(var key in value)(inherited||hasOwnProperty4.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex_default(key,length)))&&result.push(key);return result}var objectProto6,hasOwnProperty4,arrayLikeKeys_default,init_arrayLikeKeys=__esm({"node_modules/lodash-es/_arrayLikeKeys.js"(){init_define_process_env();init_shim();init_baseTimes();init_isArguments();init_isArray();init_isBuffer();init_isIndex();init_isTypedArray();objectProto6=Object.prototype,hasOwnProperty4=objectProto6.hasOwnProperty;arrayLikeKeys_default=arrayLikeKeys}});function overArg(func,transform){return function(arg){return func(transform(arg))}}var overArg_default,init_overArg=__esm({"node_modules/lodash-es/_overArg.js"(){init_define_process_env();init_shim();overArg_default=overArg}});var nativeKeys,nativeKeys_default,init_nativeKeys=__esm({"node_modules/lodash-es/_nativeKeys.js"(){init_define_process_env();init_shim();init_overArg();nativeKeys=overArg_default(Object.keys,Object),nativeKeys_default=nativeKeys}});function baseKeys(object2){if(!isPrototype_default(object2))return nativeKeys_default(object2);var result=[];for(var key in Object(object2))hasOwnProperty5.call(object2,key)&&key!="constructor"&&result.push(key);return result}var objectProto7,hasOwnProperty5,baseKeys_default,init_baseKeys=__esm({"node_modules/lodash-es/_baseKeys.js"(){init_define_process_env();init_shim();init_isPrototype();init_nativeKeys();objectProto7=Object.prototype,hasOwnProperty5=objectProto7.hasOwnProperty;baseKeys_default=baseKeys}});function keys(object2){return isArrayLike_default(object2)?arrayLikeKeys_default(object2):baseKeys_default(object2)}var keys_default,init_keys=__esm({"node_modules/lodash-es/keys.js"(){init_define_process_env();init_shim();init_arrayLikeKeys();init_baseKeys();init_isArrayLike();keys_default=keys}});function isKey(value,object2){if(isArray_default(value))return!1;var type=typeof value;return type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol_default(value)?!0:reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object2!=null&&value in Object(object2)}var reIsDeepProp,reIsPlainProp,isKey_default,init_isKey=__esm({"node_modules/lodash-es/_isKey.js"(){init_define_process_env();init_shim();init_isArray();init_isSymbol();reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;isKey_default=isKey}});var nativeCreate,nativeCreate_default,init_nativeCreate=__esm({"node_modules/lodash-es/_nativeCreate.js"(){init_define_process_env();init_shim();init_getNative();nativeCreate=getNative_default(Object,"create"),nativeCreate_default=nativeCreate}});function hashClear(){this.__data__=nativeCreate_default?nativeCreate_default(null):{},this.size=0}var hashClear_default,init_hashClear=__esm({"node_modules/lodash-es/_hashClear.js"(){init_define_process_env();init_shim();init_nativeCreate();hashClear_default=hashClear}});function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result}var hashDelete_default,init_hashDelete=__esm({"node_modules/lodash-es/_hashDelete.js"(){init_define_process_env();init_shim();hashDelete_default=hashDelete}});function hashGet(key){var data=this.__data__;if(nativeCreate_default){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty6.call(data,key)?data[key]:void 0}var HASH_UNDEFINED,objectProto8,hasOwnProperty6,hashGet_default,init_hashGet=__esm({"node_modules/lodash-es/_hashGet.js"(){init_define_process_env();init_shim();init_nativeCreate();HASH_UNDEFINED="__lodash_hash_undefined__",objectProto8=Object.prototype,hasOwnProperty6=objectProto8.hasOwnProperty;hashGet_default=hashGet}});function hashHas(key){var data=this.__data__;return nativeCreate_default?data[key]!==void 0:hasOwnProperty7.call(data,key)}var objectProto9,hasOwnProperty7,hashHas_default,init_hashHas=__esm({"node_modules/lodash-es/_hashHas.js"(){init_define_process_env();init_shim();init_nativeCreate();objectProto9=Object.prototype,hasOwnProperty7=objectProto9.hasOwnProperty;hashHas_default=hashHas}});function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate_default&&value===void 0?HASH_UNDEFINED2:value,this}var HASH_UNDEFINED2,hashSet_default,init_hashSet=__esm({"node_modules/lodash-es/_hashSet.js"(){init_define_process_env();init_shim();init_nativeCreate();HASH_UNDEFINED2="__lodash_hash_undefined__";hashSet_default=hashSet}});function Hash(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}var Hash_default,init_Hash=__esm({"node_modules/lodash-es/_Hash.js"(){init_define_process_env();init_shim();init_hashClear();init_hashDelete();init_hashGet();init_hashHas();init_hashSet();Hash.prototype.clear=hashClear_default;Hash.prototype.delete=hashDelete_default;Hash.prototype.get=hashGet_default;Hash.prototype.has=hashHas_default;Hash.prototype.set=hashSet_default;Hash_default=Hash}});function listCacheClear(){this.__data__=[],this.size=0}var listCacheClear_default,init_listCacheClear=__esm({"node_modules/lodash-es/_listCacheClear.js"(){init_define_process_env();init_shim();listCacheClear_default=listCacheClear}});function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq_default(array[length][0],key))return length;return-1}var assocIndexOf_default,init_assocIndexOf=__esm({"node_modules/lodash-es/_assocIndexOf.js"(){init_define_process_env();init_shim();init_eq();assocIndexOf_default=assocIndexOf}});function listCacheDelete(key){var data=this.__data__,index=assocIndexOf_default(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),--this.size,!0}var arrayProto,splice,listCacheDelete_default,init_listCacheDelete=__esm({"node_modules/lodash-es/_listCacheDelete.js"(){init_define_process_env();init_shim();init_assocIndexOf();arrayProto=Array.prototype,splice=arrayProto.splice;listCacheDelete_default=listCacheDelete}});function listCacheGet(key){var data=this.__data__,index=assocIndexOf_default(data,key);return index<0?void 0:data[index][1]}var listCacheGet_default,init_listCacheGet=__esm({"node_modules/lodash-es/_listCacheGet.js"(){init_define_process_env();init_shim();init_assocIndexOf();listCacheGet_default=listCacheGet}});function listCacheHas(key){return assocIndexOf_default(this.__data__,key)>-1}var listCacheHas_default,init_listCacheHas=__esm({"node_modules/lodash-es/_listCacheHas.js"(){init_define_process_env();init_shim();init_assocIndexOf();listCacheHas_default=listCacheHas}});function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf_default(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this}var listCacheSet_default,init_listCacheSet=__esm({"node_modules/lodash-es/_listCacheSet.js"(){init_define_process_env();init_shim();init_assocIndexOf();listCacheSet_default=listCacheSet}});function ListCache(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}var ListCache_default,init_ListCache=__esm({"node_modules/lodash-es/_ListCache.js"(){init_define_process_env();init_shim();init_listCacheClear();init_listCacheDelete();init_listCacheGet();init_listCacheHas();init_listCacheSet();ListCache.prototype.clear=listCacheClear_default;ListCache.prototype.delete=listCacheDelete_default;ListCache.prototype.get=listCacheGet_default;ListCache.prototype.has=listCacheHas_default;ListCache.prototype.set=listCacheSet_default;ListCache_default=ListCache}});var Map2,Map_default,init_Map=__esm({"node_modules/lodash-es/_Map.js"(){init_define_process_env();init_shim();init_getNative();init_root();Map2=getNative_default(root_default,"Map"),Map_default=Map2}});function mapCacheClear(){this.size=0,this.__data__={hash:new Hash_default,map:new(Map_default||ListCache_default),string:new Hash_default}}var mapCacheClear_default,init_mapCacheClear=__esm({"node_modules/lodash-es/_mapCacheClear.js"(){init_define_process_env();init_shim();init_Hash();init_ListCache();init_Map();mapCacheClear_default=mapCacheClear}});function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}var isKeyable_default,init_isKeyable=__esm({"node_modules/lodash-es/_isKeyable.js"(){init_define_process_env();init_shim();isKeyable_default=isKeyable}});function getMapData(map2,key){var data=map2.__data__;return isKeyable_default(key)?data[typeof key=="string"?"string":"hash"]:data.map}var getMapData_default,init_getMapData=__esm({"node_modules/lodash-es/_getMapData.js"(){init_define_process_env();init_shim();init_isKeyable();getMapData_default=getMapData}});function mapCacheDelete(key){var result=getMapData_default(this,key).delete(key);return this.size-=result?1:0,result}var mapCacheDelete_default,init_mapCacheDelete=__esm({"node_modules/lodash-es/_mapCacheDelete.js"(){init_define_process_env();init_shim();init_getMapData();mapCacheDelete_default=mapCacheDelete}});function mapCacheGet(key){return getMapData_default(this,key).get(key)}var mapCacheGet_default,init_mapCacheGet=__esm({"node_modules/lodash-es/_mapCacheGet.js"(){init_define_process_env();init_shim();init_getMapData();mapCacheGet_default=mapCacheGet}});function mapCacheHas(key){return getMapData_default(this,key).has(key)}var mapCacheHas_default,init_mapCacheHas=__esm({"node_modules/lodash-es/_mapCacheHas.js"(){init_define_process_env();init_shim();init_getMapData();mapCacheHas_default=mapCacheHas}});function mapCacheSet(key,value){var data=getMapData_default(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this}var mapCacheSet_default,init_mapCacheSet=__esm({"node_modules/lodash-es/_mapCacheSet.js"(){init_define_process_env();init_shim();init_getMapData();mapCacheSet_default=mapCacheSet}});function MapCache(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}var MapCache_default,init_MapCache=__esm({"node_modules/lodash-es/_MapCache.js"(){init_define_process_env();init_shim();init_mapCacheClear();init_mapCacheDelete();init_mapCacheGet();init_mapCacheHas();init_mapCacheSet();MapCache.prototype.clear=mapCacheClear_default;MapCache.prototype.delete=mapCacheDelete_default;MapCache.prototype.get=mapCacheGet_default;MapCache.prototype.has=mapCacheHas_default;MapCache.prototype.set=mapCacheSet_default;MapCache_default=MapCache}});function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function")throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache2=memoized.cache;if(cache2.has(key))return cache2.get(key);var result=func.apply(this,args);return memoized.cache=cache2.set(key,result)||cache2,result};return memoized.cache=new(memoize.Cache||MapCache_default),memoized}var FUNC_ERROR_TEXT,memoize_default,init_memoize=__esm({"node_modules/lodash-es/memoize.js"(){init_define_process_env();init_shim();init_MapCache();FUNC_ERROR_TEXT="Expected a function";memoize.Cache=MapCache_default;memoize_default=memoize}});function memoizeCapped(func){var result=memoize_default(func,function(key){return cache2.size===MAX_MEMOIZE_SIZE&&cache2.clear(),key}),cache2=result.cache;return result}var MAX_MEMOIZE_SIZE,memoizeCapped_default,init_memoizeCapped=__esm({"node_modules/lodash-es/_memoizeCapped.js"(){init_define_process_env();init_shim();init_memoize();MAX_MEMOIZE_SIZE=500;memoizeCapped_default=memoizeCapped}});var rePropName,reEscapeChar,stringToPath,stringToPath_default,init_stringToPath=__esm({"node_modules/lodash-es/_stringToPath.js"(){init_define_process_env();init_shim();init_memoizeCapped();rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped_default(function(string){var result=[];return string.charCodeAt(0)===46&&result.push(""),string.replace(rePropName,function(match,number2,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number2||match)}),result}),stringToPath_default=stringToPath}});function toString(value){return value==null?"":baseToString_default(value)}var toString_default,init_toString=__esm({"node_modules/lodash-es/toString.js"(){init_define_process_env();init_shim();init_baseToString();toString_default=toString}});function castPath(value,object2){return isArray_default(value)?value:isKey_default(value,object2)?[value]:stringToPath_default(toString_default(value))}var castPath_default,init_castPath=__esm({"node_modules/lodash-es/_castPath.js"(){init_define_process_env();init_shim();init_isArray();init_isKey();init_stringToPath();init_toString();castPath_default=castPath}});function toKey(value){if(typeof value=="string"||isSymbol_default(value))return value;var result=value+"";return result=="0"&&1/value==-INFINITY2?"-0":result}var INFINITY2,toKey_default,init_toKey=__esm({"node_modules/lodash-es/_toKey.js"(){init_define_process_env();init_shim();init_isSymbol();INFINITY2=1/0;toKey_default=toKey}});function baseGet(object2,path){path=castPath_default(path,object2);for(var index=0,length=path.length;object2!=null&&index<length;)object2=object2[toKey_default(path[index++])];return index&&index==length?object2:void 0}var baseGet_default,init_baseGet=__esm({"node_modules/lodash-es/_baseGet.js"(){init_define_process_env();init_shim();init_castPath();init_toKey();baseGet_default=baseGet}});function get(object2,path,defaultValue){var result=object2==null?void 0:baseGet_default(object2,path);return result===void 0?defaultValue:result}var get_default,init_get=__esm({"node_modules/lodash-es/get.js"(){init_define_process_env();init_shim();init_baseGet();get_default=get}});function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}var arrayPush_default,init_arrayPush=__esm({"node_modules/lodash-es/_arrayPush.js"(){init_define_process_env();init_shim();arrayPush_default=arrayPush}});function basePropertyOf(object2){return function(key){return object2==null?void 0:object2[key]}}var basePropertyOf_default,init_basePropertyOf=__esm({"node_modules/lodash-es/_basePropertyOf.js"(){init_define_process_env();init_shim();basePropertyOf_default=basePropertyOf}});function stackClear(){this.__data__=new ListCache_default,this.size=0}var stackClear_default,init_stackClear=__esm({"node_modules/lodash-es/_stackClear.js"(){init_define_process_env();init_shim();init_ListCache();stackClear_default=stackClear}});function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result}var stackDelete_default,init_stackDelete=__esm({"node_modules/lodash-es/_stackDelete.js"(){init_define_process_env();init_shim();stackDelete_default=stackDelete}});function stackGet(key){return this.__data__.get(key)}var stackGet_default,init_stackGet=__esm({"node_modules/lodash-es/_stackGet.js"(){init_define_process_env();init_shim();stackGet_default=stackGet}});function stackHas(key){return this.__data__.has(key)}var stackHas_default,init_stackHas=__esm({"node_modules/lodash-es/_stackHas.js"(){init_define_process_env();init_shim();stackHas_default=stackHas}});function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache_default){var pairs=data.__data__;if(!Map_default||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache_default(pairs)}return data.set(key,value),this.size=data.size,this}var LARGE_ARRAY_SIZE,stackSet_default,init_stackSet=__esm({"node_modules/lodash-es/_stackSet.js"(){init_define_process_env();init_shim();init_ListCache();init_Map();init_MapCache();LARGE_ARRAY_SIZE=200;stackSet_default=stackSet}});function Stack(entries){var data=this.__data__=new ListCache_default(entries);this.size=data.size}var Stack_default,init_Stack=__esm({"node_modules/lodash-es/_Stack.js"(){init_define_process_env();init_shim();init_ListCache();init_stackClear();init_stackDelete();init_stackGet();init_stackHas();init_stackSet();Stack.prototype.clear=stackClear_default;Stack.prototype.delete=stackDelete_default;Stack.prototype.get=stackGet_default;Stack.prototype.has=stackHas_default;Stack.prototype.set=stackSet_default;Stack_default=Stack}});function arrayFilter(array,predicate){for(var index=-1,length=array==null?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}var arrayFilter_default,init_arrayFilter=__esm({"node_modules/lodash-es/_arrayFilter.js"(){init_define_process_env();init_shim();arrayFilter_default=arrayFilter}});function stubArray(){return[]}var stubArray_default,init_stubArray=__esm({"node_modules/lodash-es/stubArray.js"(){init_define_process_env();init_shim();stubArray_default=stubArray}});var objectProto10,propertyIsEnumerable2,nativeGetSymbols,getSymbols,getSymbols_default,init_getSymbols=__esm({"node_modules/lodash-es/_getSymbols.js"(){init_define_process_env();init_shim();init_arrayFilter();init_stubArray();objectProto10=Object.prototype,propertyIsEnumerable2=objectProto10.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(object2){return object2==null?[]:(object2=Object(object2),arrayFilter_default(nativeGetSymbols(object2),function(symbol){return propertyIsEnumerable2.call(object2,symbol)}))}:stubArray_default,getSymbols_default=getSymbols}});function baseGetAllKeys(object2,keysFunc,symbolsFunc){var result=keysFunc(object2);return isArray_default(object2)?result:arrayPush_default(result,symbolsFunc(object2))}var baseGetAllKeys_default,init_baseGetAllKeys=__esm({"node_modules/lodash-es/_baseGetAllKeys.js"(){init_define_process_env();init_shim();init_arrayPush();init_isArray();baseGetAllKeys_default=baseGetAllKeys}});function getAllKeys(object2){return baseGetAllKeys_default(object2,keys_default,getSymbols_default)}var getAllKeys_default,init_getAllKeys=__esm({"node_modules/lodash-es/_getAllKeys.js"(){init_define_process_env();init_shim();init_baseGetAllKeys();init_getSymbols();init_keys();getAllKeys_default=getAllKeys}});var DataView2,DataView_default,init_DataView=__esm({"node_modules/lodash-es/_DataView.js"(){init_define_process_env();init_shim();init_getNative();init_root();DataView2=getNative_default(root_default,"DataView"),DataView_default=DataView2}});var Promise2,Promise_default,init_Promise=__esm({"node_modules/lodash-es/_Promise.js"(){init_define_process_env();init_shim();init_getNative();init_root();Promise2=getNative_default(root_default,"Promise"),Promise_default=Promise2}});var Set2,Set_default,init_Set=__esm({"node_modules/lodash-es/_Set.js"(){init_define_process_env();init_shim();init_getNative();init_root();Set2=getNative_default(root_default,"Set"),Set_default=Set2}});var mapTag2,objectTag2,promiseTag,setTag2,weakMapTag2,dataViewTag2,dataViewCtorString,mapCtorString,promiseCtorString,setCtorString,weakMapCtorString,getTag,getTag_default,init_getTag=__esm({"node_modules/lodash-es/_getTag.js"(){init_define_process_env();init_shim();init_DataView();init_Map();init_Promise();init_Set();init_WeakMap();init_baseGetTag();init_toSource();mapTag2="[object Map]",objectTag2="[object Object]",promiseTag="[object Promise]",setTag2="[object Set]",weakMapTag2="[object WeakMap]",dataViewTag2="[object DataView]",dataViewCtorString=toSource_default(DataView_default),mapCtorString=toSource_default(Map_default),promiseCtorString=toSource_default(Promise_default),setCtorString=toSource_default(Set_default),weakMapCtorString=toSource_default(WeakMap_default),getTag=baseGetTag_default;(DataView_default&&getTag(new DataView_default(new ArrayBuffer(1)))!=dataViewTag2||Map_default&&getTag(new Map_default)!=mapTag2||Promise_default&&getTag(Promise_default.resolve())!=promiseTag||Set_default&&getTag(new Set_default)!=setTag2||WeakMap_default&&getTag(new WeakMap_default)!=weakMapTag2)&&(getTag=function(value){var result=baseGetTag_default(value),Ctor=result==objectTag2?value.constructor:void 0,ctorString=Ctor?toSource_default(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag2;case mapCtorString:return mapTag2;case promiseCtorString:return promiseTag;case setCtorString:return setTag2;case weakMapCtorString:return weakMapTag2}return result});getTag_default=getTag}});var Uint8Array2,Uint8Array_default,init_Uint8Array=__esm({"node_modules/lodash-es/_Uint8Array.js"(){init_define_process_env();init_shim();init_root();Uint8Array2=root_default.Uint8Array,Uint8Array_default=Uint8Array2}});function compact(array){for(var index=-1,length=array==null?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}var compact_default,init_compact=__esm({"node_modules/lodash-es/compact.js"(){init_define_process_env();init_shim();compact_default=compact}});function setCacheAdd(value){return this.__data__.set(value,HASH_UNDEFINED3),this}var HASH_UNDEFINED3,setCacheAdd_default,init_setCacheAdd=__esm({"node_modules/lodash-es/_setCacheAdd.js"(){init_define_process_env();init_shim();HASH_UNDEFINED3="__lodash_hash_undefined__";setCacheAdd_default=setCacheAdd}});function setCacheHas(value){return this.__data__.has(value)}var setCacheHas_default,init_setCacheHas=__esm({"node_modules/lodash-es/_setCacheHas.js"(){init_define_process_env();init_shim();setCacheHas_default=setCacheHas}});function SetCache(values){var index=-1,length=values==null?0:values.length;for(this.__data__=new MapCache_default;++index<length;)this.add(values[index])}var SetCache_default,init_SetCache=__esm({"node_modules/lodash-es/_SetCache.js"(){init_define_process_env();init_shim();init_MapCache();init_setCacheAdd();init_setCacheHas();SetCache.prototype.add=SetCache.prototype.push=setCacheAdd_default;SetCache.prototype.has=setCacheHas_default;SetCache_default=SetCache}});function arraySome(array,predicate){for(var index=-1,length=array==null?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}var arraySome_default,init_arraySome=__esm({"node_modules/lodash-es/_arraySome.js"(){init_define_process_env();init_shim();arraySome_default=arraySome}});function cacheHas(cache2,key){return cache2.has(key)}var cacheHas_default,init_cacheHas=__esm({"node_modules/lodash-es/_cacheHas.js"(){init_define_process_env();init_shim();cacheHas_default=cacheHas}});function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var arrStacked=stack.get(array),othStacked=stack.get(other);if(arrStacked&&othStacked)return arrStacked==other&&othStacked==array;var index=-1,result=!0,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache_default:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(compared!==void 0){if(compared)continue;result=!1;break}if(seen){if(!arraySome_default(other,function(othValue2,othIndex){if(!cacheHas_default(seen,othIndex)&&(arrValue===othValue2||equalFunc(arrValue,othValue2,bitmask,customizer,stack)))return seen.push(othIndex)})){result=!1;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=!1;break}}return stack.delete(array),stack.delete(other),result}var COMPARE_PARTIAL_FLAG,COMPARE_UNORDERED_FLAG,equalArrays_default,init_equalArrays=__esm({"node_modules/lodash-es/_equalArrays.js"(){init_define_process_env();init_shim();init_SetCache();init_arraySome();init_cacheHas();COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;equalArrays_default=equalArrays}});function mapToArray(map2){var index=-1,result=Array(map2.size);return map2.forEach(function(value,key){result[++index]=[key,value]}),result}var mapToArray_default,init_mapToArray=__esm({"node_modules/lodash-es/_mapToArray.js"(){init_define_process_env();init_shim();mapToArray_default=mapToArray}});function setToArray(set2){var index=-1,result=Array(set2.size);return set2.forEach(function(value){result[++index]=value}),result}var setToArray_default,init_setToArray=__esm({"node_modules/lodash-es/_setToArray.js"(){init_define_process_env();init_shim();setToArray_default=setToArray}});function equalByTag(object2,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag3:if(object2.byteLength!=other.byteLength||object2.byteOffset!=other.byteOffset)return!1;object2=object2.buffer,other=other.buffer;case arrayBufferTag2:return!(object2.byteLength!=other.byteLength||!equalFunc(new Uint8Array_default(object2),new Uint8Array_default(other)));case boolTag2:case dateTag2:case numberTag2:return eq_default(+object2,+other);case errorTag2:return object2.name==other.name&&object2.message==other.message;case regexpTag2:case stringTag2:return object2==other+"";case mapTag3:var convert=mapToArray_default;case setTag3:var isPartial=bitmask&COMPARE_PARTIAL_FLAG2;if(convert||(convert=setToArray_default),object2.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object2);if(stacked)return stacked==other;bitmask|=COMPARE_UNORDERED_FLAG2,stack.set(object2,other);var result=equalArrays_default(convert(object2),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object2),result;case symbolTag2:if(symbolValueOf)return symbolValueOf.call(object2)==symbolValueOf.call(other)}return!1}var COMPARE_PARTIAL_FLAG2,COMPARE_UNORDERED_FLAG2,boolTag2,dateTag2,errorTag2,mapTag3,numberTag2,regexpTag2,setTag3,stringTag2,symbolTag2,arrayBufferTag2,dataViewTag3,symbolProto2,symbolValueOf,equalByTag_default,init_equalByTag=__esm({"node_modules/lodash-es/_equalByTag.js"(){init_define_process_env();init_shim();init_Symbol();init_Uint8Array();init_eq();init_equalArrays();init_mapToArray();init_setToArray();COMPARE_PARTIAL_FLAG2=1,COMPARE_UNORDERED_FLAG2=2,boolTag2="[object Boolean]",dateTag2="[object Date]",errorTag2="[object Error]",mapTag3="[object Map]",numberTag2="[object Number]",regexpTag2="[object RegExp]",setTag3="[object Set]",stringTag2="[object String]",symbolTag2="[object Symbol]",arrayBufferTag2="[object ArrayBuffer]",dataViewTag3="[object DataView]",symbolProto2=Symbol_default?Symbol_default.prototype:void 0,symbolValueOf=symbolProto2?symbolProto2.valueOf:void 0;equalByTag_default=equalByTag}});function equalObjects(object2,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG3,objProps=getAllKeys_default(object2),objLength=objProps.length,othProps=getAllKeys_default(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty8.call(other,key)))return!1}var objStacked=stack.get(object2),othStacked=stack.get(other);if(objStacked&&othStacked)return objStacked==other&&othStacked==object2;var result=!0;stack.set(object2,other),stack.set(other,object2);for(var skipCtor=isPartial;++index<objLength;){key=objProps[index];var objValue=object2[key],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object2,stack):customizer(objValue,othValue,key,object2,other,stack);if(!(compared===void 0?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor=key=="constructor")}if(result&&!skipCtor){var objCtor=object2.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object2&&"constructor"in other&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object2),stack.delete(other),result}var COMPARE_PARTIAL_FLAG3,objectProto11,hasOwnProperty8,equalObjects_default,init_equalObjects=__esm({"node_modules/lodash-es/_equalObjects.js"(){init_define_process_env();init_shim();init_getAllKeys();COMPARE_PARTIAL_FLAG3=1,objectProto11=Object.prototype,hasOwnProperty8=objectProto11.hasOwnProperty;equalObjects_default=equalObjects}});function baseIsEqualDeep(object2,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray_default(object2),othIsArr=isArray_default(other),objTag=objIsArr?arrayTag2:getTag_default(object2),othTag=othIsArr?arrayTag2:getTag_default(other);objTag=objTag==argsTag3?objectTag3:objTag,othTag=othTag==argsTag3?objectTag3:othTag;var objIsObj=objTag==objectTag3,othIsObj=othTag==objectTag3,isSameTag=objTag==othTag;if(isSameTag&&isBuffer_default(object2)){if(!isBuffer_default(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new Stack_default),objIsArr||isTypedArray_default(object2)?equalArrays_default(object2,other,bitmask,customizer,equalFunc,stack):equalByTag_default(object2,other,objTag,bitmask,customizer,equalFunc,stack);if(!(bitmask&COMPARE_PARTIAL_FLAG4)){var objIsWrapped=objIsObj&&hasOwnProperty9.call(object2,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty9.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object2.value():object2,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack_default),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}return isSameTag?(stack||(stack=new Stack_default),equalObjects_default(object2,other,bitmask,customizer,equalFunc,stack)):!1}var COMPARE_PARTIAL_FLAG4,argsTag3,arrayTag2,objectTag3,objectProto12,hasOwnProperty9,baseIsEqualDeep_default,init_baseIsEqualDeep=__esm({"node_modules/lodash-es/_baseIsEqualDeep.js"(){init_define_process_env();init_shim();init_Stack();init_equalArrays();init_equalByTag();init_equalObjects();init_getTag();init_isArray();init_isBuffer();init_isTypedArray();COMPARE_PARTIAL_FLAG4=1,argsTag3="[object Arguments]",arrayTag2="[object Array]",objectTag3="[object Object]",objectProto12=Object.prototype,hasOwnProperty9=objectProto12.hasOwnProperty;baseIsEqualDeep_default=baseIsEqualDeep}});function baseIsEqual(value,other,bitmask,customizer,stack){return value===other?!0:value==null||other==null||!isObjectLike_default(value)&&!isObjectLike_default(other)?value!==value&&other!==other:baseIsEqualDeep_default(value,other,bitmask,customizer,baseIsEqual,stack)}var baseIsEqual_default,init_baseIsEqual=__esm({"node_modules/lodash-es/_baseIsEqual.js"(){init_define_process_env();init_shim();init_baseIsEqualDeep();init_isObjectLike();baseIsEqual_default=baseIsEqual}});function baseIsMatch(object2,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object2==null)return!length;for(object2=Object(object2);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object2[data[0]]:!(data[0]in object2))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object2[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===void 0&&!(key in object2))return!1}else{var stack=new Stack_default;if(customizer)var result=customizer(objValue,srcValue,key,object2,source,stack);if(!(result===void 0?baseIsEqual_default(srcValue,objValue,COMPARE_PARTIAL_FLAG5|COMPARE_UNORDERED_FLAG3,customizer,stack):result))return!1}}return!0}var COMPARE_PARTIAL_FLAG5,COMPARE_UNORDERED_FLAG3,baseIsMatch_default,init_baseIsMatch=__esm({"node_modules/lodash-es/_baseIsMatch.js"(){init_define_process_env();init_shim();init_Stack();init_baseIsEqual();COMPARE_PARTIAL_FLAG5=1,COMPARE_UNORDERED_FLAG3=2;baseIsMatch_default=baseIsMatch}});function isStrictComparable(value){return value===value&&!isObject_default(value)}var isStrictComparable_default,init_isStrictComparable=__esm({"node_modules/lodash-es/_isStrictComparable.js"(){init_define_process_env();init_shim();init_isObject();isStrictComparable_default=isStrictComparable}});function getMatchData(object2){for(var result=keys_default(object2),length=result.length;length--;){var key=result[length],value=object2[key];result[length]=[key,value,isStrictComparable_default(value)]}return result}var getMatchData_default,init_getMatchData=__esm({"node_modules/lodash-es/_getMatchData.js"(){init_define_process_env();init_shim();init_isStrictComparable();init_keys();getMatchData_default=getMatchData}});function matchesStrictComparable(key,srcValue){return function(object2){return object2==null?!1:object2[key]===srcValue&&(srcValue!==void 0||key in Object(object2))}}var matchesStrictComparable_default,init_matchesStrictComparable=__esm({"node_modules/lodash-es/_matchesStrictComparable.js"(){init_define_process_env();init_shim();matchesStrictComparable_default=matchesStrictComparable}});function baseMatches(source){var matchData=getMatchData_default(source);return matchData.length==1&&matchData[0][2]?matchesStrictComparable_default(matchData[0][0],matchData[0][1]):function(object2){return object2===source||baseIsMatch_default(object2,source,matchData)}}var baseMatches_default,init_baseMatches=__esm({"node_modules/lodash-es/_baseMatches.js"(){init_define_process_env();init_shim();init_baseIsMatch();init_getMatchData();init_matchesStrictComparable();baseMatches_default=baseMatches}});function baseHasIn(object2,key){return object2!=null&&key in Object(object2)}var baseHasIn_default,init_baseHasIn=__esm({"node_modules/lodash-es/_baseHasIn.js"(){init_define_process_env();init_shim();baseHasIn_default=baseHasIn}});function hasPath(object2,path,hasFunc){path=castPath_default(path,object2);for(var index=-1,length=path.length,result=!1;++index<length;){var key=toKey_default(path[index]);if(!(result=object2!=null&&hasFunc(object2,key)))break;object2=object2[key]}return result||++index!=length?result:(length=object2==null?0:object2.length,!!length&&isLength_default(length)&&isIndex_default(key,length)&&(isArray_default(object2)||isArguments_default(object2)))}var hasPath_default,init_hasPath=__esm({"node_modules/lodash-es/_hasPath.js"(){init_define_process_env();init_shim();init_castPath();init_isArguments();init_isArray();init_isIndex();init_isLength();init_toKey();hasPath_default=hasPath}});function hasIn(object2,path){return object2!=null&&hasPath_default(object2,path,baseHasIn_default)}var hasIn_default,init_hasIn=__esm({"node_modules/lodash-es/hasIn.js"(){init_define_process_env();init_shim();init_baseHasIn();init_hasPath();hasIn_default=hasIn}});function baseMatchesProperty(path,srcValue){return isKey_default(path)&&isStrictComparable_default(srcValue)?matchesStrictComparable_default(toKey_default(path),srcValue):function(object2){var objValue=get_default(object2,path);return objValue===void 0&&objValue===srcValue?hasIn_default(object2,path):baseIsEqual_default(srcValue,objValue,COMPARE_PARTIAL_FLAG6|COMPARE_UNORDERED_FLAG4)}}var COMPARE_PARTIAL_FLAG6,COMPARE_UNORDERED_FLAG4,baseMatchesProperty_default,init_baseMatchesProperty=__esm({"node_modules/lodash-es/_baseMatchesProperty.js"(){init_define_process_env();init_shim();init_baseIsEqual();init_get();init_hasIn();init_isKey();init_isStrictComparable();init_matchesStrictComparable();init_toKey();COMPARE_PARTIAL_FLAG6=1,COMPARE_UNORDERED_FLAG4=2;baseMatchesProperty_default=baseMatchesProperty}});function baseProperty(key){return function(object2){return object2==null?void 0:object2[key]}}var baseProperty_default,init_baseProperty=__esm({"node_modules/lodash-es/_baseProperty.js"(){init_define_process_env();init_shim();baseProperty_default=baseProperty}});function basePropertyDeep(path){return function(object2){return baseGet_default(object2,path)}}var basePropertyDeep_default,init_basePropertyDeep=__esm({"node_modules/lodash-es/_basePropertyDeep.js"(){init_define_process_env();init_shim();init_baseGet();basePropertyDeep_default=basePropertyDeep}});function property(path){return isKey_default(path)?baseProperty_default(toKey_default(path)):basePropertyDeep_default(path)}var property_default,init_property=__esm({"node_modules/lodash-es/property.js"(){init_define_process_env();init_shim();init_baseProperty();init_basePropertyDeep();init_isKey();init_toKey();property_default=property}});function baseIteratee(value){return typeof value=="function"?value:value==null?identity_default:typeof value=="object"?isArray_default(value)?baseMatchesProperty_default(value[0],value[1]):baseMatches_default(value):property_default(value)}var baseIteratee_default,init_baseIteratee=__esm({"node_modules/lodash-es/_baseIteratee.js"(){init_define_process_env();init_shim();init_baseMatches();init_baseMatchesProperty();init_identity();init_isArray();init_property();baseIteratee_default=baseIteratee}});function arrayAggregator(array,setter,iteratee,accumulator){for(var index=-1,length=array==null?0:array.length;++index<length;){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}var arrayAggregator_default,init_arrayAggregator=__esm({"node_modules/lodash-es/_arrayAggregator.js"(){init_define_process_env();init_shim();arrayAggregator_default=arrayAggregator}});function createBaseFor(fromRight){return function(object2,iteratee,keysFunc){for(var index=-1,iterable=Object(object2),props=keysFunc(object2),length=props.length;length--;){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object2}}var createBaseFor_default,init_createBaseFor=__esm({"node_modules/lodash-es/_createBaseFor.js"(){init_define_process_env();init_shim();createBaseFor_default=createBaseFor}});var baseFor,baseFor_default,init_baseFor=__esm({"node_modules/lodash-es/_baseFor.js"(){init_define_process_env();init_shim();init_createBaseFor();baseFor=createBaseFor_default(),baseFor_default=baseFor}});function baseForOwn(object2,iteratee){return object2&&baseFor_default(object2,iteratee,keys_default)}var baseForOwn_default,init_baseForOwn=__esm({"node_modules/lodash-es/_baseForOwn.js"(){init_define_process_env();init_shim();init_baseFor();init_keys();baseForOwn_default=baseForOwn}});function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null)return collection;if(!isArrayLike_default(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}var createBaseEach_default,init_createBaseEach=__esm({"node_modules/lodash-es/_createBaseEach.js"(){init_define_process_env();init_shim();init_isArrayLike();createBaseEach_default=createBaseEach}});var baseEach,baseEach_default,init_baseEach=__esm({"node_modules/lodash-es/_baseEach.js"(){init_define_process_env();init_shim();init_baseForOwn();init_createBaseEach();baseEach=createBaseEach_default(baseForOwn_default),baseEach_default=baseEach}});function baseAggregator(collection,setter,iteratee,accumulator){return baseEach_default(collection,function(value,key,collection2){setter(accumulator,value,iteratee(value),collection2)}),accumulator}var baseAggregator_default,init_baseAggregator=__esm({"node_modules/lodash-es/_baseAggregator.js"(){init_define_process_env();init_shim();init_baseEach();baseAggregator_default=baseAggregator}});function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray_default(collection)?arrayAggregator_default:baseAggregator_default,accumulator=initializer?initializer():{};return func(collection,setter,baseIteratee_default(iteratee,2),accumulator)}}var createAggregator_default,init_createAggregator=__esm({"node_modules/lodash-es/_createAggregator.js"(){init_define_process_env();init_shim();init_arrayAggregator();init_baseAggregator();init_baseIteratee();init_isArray();createAggregator_default=createAggregator}});var now,now_default,init_now=__esm({"node_modules/lodash-es/now.js"(){init_define_process_env();init_shim();init_root();now=function(){return root_default.Date.now()},now_default=now}});function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if(typeof func!="function")throw new TypeError(FUNC_ERROR_TEXT2);wait=toNumber_default(wait)||0,isObject_default(options)&&(leading=!!options.leading,maxing="maxWait"in options,maxWait=maxing?nativeMax(toNumber_default(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing);function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=void 0,lastInvokeTime=time,result=func.apply(thisArg,args),result}function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===void 0||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now_default();if(shouldInvoke(time))return trailingEdge(time);timerId=setTimeout(timerExpired,remainingWait(time))}function trailingEdge(time){return timerId=void 0,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=void 0,result)}function cancel(){timerId!==void 0&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=void 0}function flush(){return timerId===void 0?result:trailingEdge(now_default())}function debounced(){var time=now_default(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===void 0)return leadingEdge(lastCallTime);if(maxing)return clearTimeout(timerId),timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===void 0&&(timerId=setTimeout(timerExpired,wait)),result}return debounced.cancel=cancel,debounced.flush=flush,debounced}var FUNC_ERROR_TEXT2,nativeMax,nativeMin,debounce_default,init_debounce=__esm({"node_modules/lodash-es/debounce.js"(){init_define_process_env();init_shim();init_isObject();init_now();init_toNumber();FUNC_ERROR_TEXT2="Expected a function",nativeMax=Math.max,nativeMin=Math.min;debounce_default=debounce}});var htmlEscapes,escapeHtmlChar,escapeHtmlChar_default,init_escapeHtmlChar=__esm({"node_modules/lodash-es/_escapeHtmlChar.js"(){init_define_process_env();init_shim();init_basePropertyOf();htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},escapeHtmlChar=basePropertyOf_default(htmlEscapes),escapeHtmlChar_default=escapeHtmlChar}});function escape2(string){return string=toString_default(string),string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar_default):string}var reUnescapedHtml,reHasUnescapedHtml,escape_default,init_escape=__esm({"node_modules/lodash-es/escape.js"(){init_define_process_env();init_shim();init_escapeHtmlChar();init_toString();reUnescapedHtml=/[&<>"']/g,reHasUnescapedHtml=RegExp(reUnescapedHtml.source);escape_default=escape2}});function baseMap(collection,iteratee){var index=-1,result=isArrayLike_default(collection)?Array(collection.length):[];return baseEach_default(collection,function(value,key,collection2){result[++index]=iteratee(value,key,collection2)}),result}var baseMap_default,init_baseMap=__esm({"node_modules/lodash-es/_baseMap.js"(){init_define_process_env();init_shim();init_baseEach();init_isArrayLike();baseMap_default=baseMap}});function map(collection,iteratee){var func=isArray_default(collection)?arrayMap_default:baseMap_default;return func(collection,baseIteratee_default(iteratee,3))}var map_default,init_map=__esm({"node_modules/lodash-es/map.js"(){init_define_process_env();init_shim();init_arrayMap();init_baseIteratee();init_baseMap();init_isArray();map_default=map}});function isEqual(value,other){return baseIsEqual_default(value,other)}var isEqual_default,init_isEqual=__esm({"node_modules/lodash-es/isEqual.js"(){init_define_process_env();init_shim();init_baseIsEqual();isEqual_default=isEqual}});var keyBy,keyBy_default,init_keyBy=__esm({"node_modules/lodash-es/keyBy.js"(){init_define_process_env();init_shim();init_baseAssignValue();init_createAggregator();keyBy=createAggregator_default(function(result,value,key){baseAssignValue_default(result,key,value)}),keyBy_default=keyBy}});function mapValues(object2,iteratee){var result={};return iteratee=baseIteratee_default(iteratee,3),baseForOwn_default(object2,function(value,key,object3){baseAssignValue_default(result,key,iteratee(value,key,object3))}),result}var mapValues_default,init_mapValues=__esm({"node_modules/lodash-es/mapValues.js"(){init_define_process_env();init_shim();init_baseAssignValue();init_baseForOwn();init_baseIteratee();mapValues_default=mapValues}});var htmlUnescapes,unescapeHtmlChar,unescapeHtmlChar_default,init_unescapeHtmlChar=__esm({"node_modules/lodash-es/_unescapeHtmlChar.js"(){init_define_process_env();init_shim();init_basePropertyOf();htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},unescapeHtmlChar=basePropertyOf_default(htmlUnescapes),unescapeHtmlChar_default=unescapeHtmlChar}});function unescape2(string){return string=toString_default(string),string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar_default):string}var reEscapedHtml,reHasEscapedHtml,unescape_default,init_unescape=__esm({"node_modules/lodash-es/unescape.js"(){init_define_process_env();init_shim();init_toString();init_unescapeHtmlChar();reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reHasEscapedHtml=RegExp(reEscapedHtml.source);unescape_default=unescape2}});var init_lodash=__esm({"node_modules/lodash-es/lodash.js"(){init_define_process_env();init_shim();init_compact();init_debounce();init_escape();init_isEqual();init_keyBy();init_map();init_mapValues();init_memoize();init_unescape();}});var b_object_exports={};__export(b_object_exports,{all_keys:()=>all_keys,compare:()=>compare,deep_copy:()=>deep_copy,deep_freeze:()=>deep_freeze,extend:()=>extend,extract_from_object:()=>extract_from_object,flatten:()=>flatten,get_sorted_object_by_values:()=>get_sorted_object_by_values,has_a_key:()=>has_a_key,has_unique_string:()=>has_unique_string,is_empty:()=>is_empty,is_json:()=>is_json,is_record:()=>is_record,json_deep_copy:()=>json_deep_copy,json_parse:()=>json_parse,json_stringify:()=>json_stringify,make_new:()=>make_new,map_values:()=>map_values,not_empty:()=>not_empty,remove_circular_references:()=>remove_circular_references,smush:()=>smush,sort_data_fields:()=>sort_data_fields,sort_obj:()=>sort_obj,stableSort:()=>stableSort,stableSortLanguages:()=>stableSortLanguages,stripFalsy:()=>stripFalsy,to_object:()=>to_object,walk:()=>walk});function to_object(arr){let ret={};for(let x of arr)ret[x[0]]=x[1];return ret}function is_record(obj){return obj!=null&&typeof obj=="object"}function extend(dest,arg1,arg2,arg3,arg4,arg5){if(arg5!=null)throw console.log(arg5),new UnexpectedError("b_object.extend using more than 4 args!!!!");if(arg1!=null)for(let key in arg1){let value=arg1[key];value!==void 0&&(dest[key]=value)}if(arg2!=null)for(let key in arg2){let value=arg2[key];value!==void 0&&(dest[key]=value)}if(arg3!=null)for(let key in arg3){let value=arg3[key];value!==void 0&&(dest[key]=value)}if(arg4!=null)for(let key in arg4){let value=arg4[key];value!==void 0&&(dest[key]=value)}return dest}function flatten(lists){return[].concat(...lists!=null?lists:[])}function deep_copy(dest){for(var _len=arguments.length,srcs=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)srcs[_key-1]=arguments[_key];return dc(null,dest,...srcs)}function is_json(obj){try{return JSON.stringify(obj),!0}catch{return!1}}function deep_freeze(data){Object.freeze(data);for(let val of Object.values(data))typeof val=="object"&&val!=null&&deep_freeze(val)}function json_deep_copy(data){return typeof data=="object"&&data!=null?JSON.parse(JSON.stringify(data)):data}function json_stringify(data,indent,fail_okay){var _fail_okay;(_fail_okay=fail_okay)!=null||(fail_okay=!1);try{return JSON.stringify(data,null,indent)}catch(err){if(fail_okay)return util3.inspect(data);let msg;throw typeof err=="object"&&err&&"message"in err?msg=String(err.message):msg=String(err),msg+=".  Data was "+data.constructor.name+", with fields: "+Object.keys(data).join(", "),new UnexpectedError(msg)}}function json_parse(string,fail_okay){try{return JSON.parse(string)}catch(err){if(fail_okay)return string;let msg="json_parse failure: ";throw typeof err=="object"&&err&&"message"in err?msg+=String(err.message):msg+=String(err),new UnexpectedError(msg,{string})}}function _deep_copy(new_ids,dest,key,value){if(dest==null)throw new UnexpectedError("Trying to _deep_copy onto mising value",{dest,key:key,value:value});if(typeof value=="object"&&value!==null)dest[key]==null&&(Array.isArray(value)?dest[key]=[]:dest[key]={}),dc(new_ids,dest[key],value);else if(value!==void 0)if(new_ids&&(key==="id"||key==="_id")){let old=dest[key],new_id=LUID();dest[key]=new_id,new_ids[old]=new_id}else dest[key]=value}function dc(new_ids,dest){if(dest==null)throw new UnexpectedError("Trying to dc onto mising value",{dest:dest});for(var _len2=arguments.length,srcs=new Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)srcs[_key2-2]=arguments[_key2];if(Array.isArray(dest))for(let src of srcs){if(!Array.isArray(src))throw new UnexpectedError("can only extend an array with another array");for(let i=0;i<src.length;i++)_deep_copy(new_ids,dest,i,src[i])}else for(let src of srcs)for(let key in src){let value=src[key];_deep_copy(new_ids,dest,key,value)}return dest}function walk(obj,fn,path){var _path;if((_path=path)!=null||(path=""),fn(obj,path),obj!=null&&typeof obj=="object")for(let k in obj){let v=obj[k];walk(v,fn,path+"."+k)}}function smush(){for(var _len3=arguments.length,things=new Array(_len3),_key3=0;_key3<_len3;_key3++)things[_key3]=arguments[_key3];return _smush(things)}function has_unique_string(thing){return!["object","function"].includes(typeof thing)||!thing?!1:typeof thing.toUniqueString=="function"}function _smush(things){return things=things.map(thing=>{if(thing==null||["string","number"].includes(typeof thing)||thing instanceof Date)return thing;if(Array.isArray(thing))return _smush(thing);if(has_unique_string(thing)&&thing.toUniqueString()!=="")return thing.toUniqueString();throw new UnexpectedError("bad smush: "+String(thing))}),JSON.stringify(things)}function is_empty(obj){return!(obj==null||typeof obj!="object"||Object.keys(obj).length>0)}function not_empty(obj){return typeof obj=="object"&&obj!=null&&!is_empty(obj)}function has_a_key(obj){if(obj==null||typeof obj!="object")return!1;for(let key in obj)return!0;return!1}function make_new(Cls){return function(){for(var _len4=arguments.length,args=new Array(_len4),_key4=0;_key4<_len4;_key4++)args[_key4]=arguments[_key4];return new Cls(...args)}}function has_is_equal_to(thing){return typeof thing!="object"||!thing?!1:typeof thing.is_equal_to=="function"}function compare(a,b){if(a===b)return!0;if(has_is_equal_to(a))return a.is_equal_to(b);if(has_unique_string(a)&&has_unique_string(b))return a.toUniqueString()===b.toUniqueString();if(Array.isArray(a)&&Array.isArray(b)){if(a.length!==b.length)return!1;for(let i=0;i<a.length;i++){let e=a[i];if(!compare(e,b[i]))return!1}return!0}return a instanceof Date&&b instanceof Date?a.getTime()===b.getTime():!1}function extract_from_object(object2,path){let temp=object2;for(let path_element of path)if(is_record(temp)&&temp[path_element]!=null)temp=temp[path_element];else return null;return temp}function sort_obj(obj){let mapping3={},lowercase_keys=[];for(let k in obj){let lowercase_key=k.toLowerCase();mapping3[lowercase_key]=k,lowercase_keys.push(lowercase_key)}lowercase_keys.sort();let sorted_obj={};for(let lowercase_key of lowercase_keys){let key=mapping3[lowercase_key];sorted_obj[key]=obj[key]}return sorted_obj}function remove_circular_references(object2){try{let cache2=new Set,safe_stringified=JSON.stringify(object2,function(_,value){if(value!=null&&typeof value=="object"){if(cache2.has(value))return null;cache2.add(value)}return value});return JSON.parse(safe_stringified)}catch{return"failed to remove circular references"}}function sort_data_fields(fields){let built_in_fields=[],custom_fields=[],all_builtins=BUILTIN_FIELDS;for(let field of fields)all_builtins.includes(field.value)||field.value==="_id"?built_in_fields.push(field):custom_fields.push(field);return custom_fields=custom_fields.sort((a,b)=>a.display.toLowerCase()>=b.display.toLowerCase()?1:-1),custom_fields.concat(built_in_fields)}function all_keys(object2){let stop_at_prototype=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object.prototype,keys2=[],current=object2;for(;current!=null&&current!==stop_at_prototype;)keys2.push(...Object.getOwnPropertyNames(current)),current=Object.getPrototypeOf(current);return keys2}function get_sorted_object_by_values(obj){let key_value_list=[];for(let k in obj){let v=obj[k];key_value_list.push({id:k,value:v})}key_value_list.sort((a,b)=>a.value!=null||b.value!=null?a.value==null?1:b.value==null?-1:typeof a.value=="string"&&typeof b.value=="string"?a.value.toLowerCase()<b.value.toLowerCase()?-1:1:typeof b.value=="string"?1:-1:1);let sorted_set={};for(let item of key_value_list)sorted_set[item.id]=item.value;return sorted_set}function stripFalsy(obj,deep){return Object.fromEntries(Object.entries(obj).filter(_ref=>{let[_,v]=_ref;return!!v}).map(_ref2=>{let[k,v]=_ref2;return[k,v===Object(v)&&deep?stripFalsy(v,deep):v]}))}function stableSort(target){if(Array.isArray(target))return target.map(stableSort);if(target!=null&&typeof target=="object"){let result={};return Object.keys(target).sort().forEach(key=>result[key]=stableSort(target[key])),result}return target}function stableSortLanguages(target){if(Array.isArray(target))return target;if(target!=null&&typeof target=="object"){let result={};return Object.keys(target).sort().forEach(key=>result[key]=stableSortLanguages(target[key])),result}return target}function map_values(obj,mapFn){let result={};for(let key in obj)result[key]=mapFn(obj[key],key);return result}var import_web_dom_collections_iterator6,util3,init_b_object=__esm({"lib-browser/u/shared/b_object.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator6=__toESM(require_web_dom_collections_iterator());init_errors();init_security();init_uuid();init_loggable();util3=__toESM(require_util());init_lodash()}});var require_fast_deep_equal=__commonJS({"node_modules/fast-deep-equal/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=function equal(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys2;if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys2=Object.keys(a),length=keys2.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys2[i]))return!1;for(i=length;i--!==0;){var key=keys2[i];if(!equal(a[key],b[key]))return!1}return!0}return a!==a&&b!==b}}});function array_remove(array,val){let idx;if(array)for(;(idx=array.indexOf(val))!==-1;)array.splice(idx,1)}function array_replace(array,old_val,new_val){return array.map(a=>a===old_val?new_val:a)}function unique(array){let output3={};for(let key=0;key<array.length;key++)output3[array[key]]=array[key];return Object.values(output3)}function shuffle_array(a){let i=a.length;for(;--i>0;){let j2=~~(Math.random()*(i+1)),t=a[j2];a[j2]=a[i],a[i]=t}return a}function zip(left_array,right_array,combine){if(left_array.length!==right_array.length)throw new Error(`zip: left array size ${left_array.length}; right array size ${right_array.length}`);return[...Array(left_array.length)].map((_,i)=>combine(left_array[i],right_array[i]))}function sort_array(array,order){let sorted_array=[];for(let entry of order)array.includes(entry)&&sorted_array.push(entry);for(let entry of array)!sorted_array.includes(entry)&&!order.includes(entry)&&sorted_array.push(entry);return sorted_array}function partition(arr){let half_idx=Math.ceil(arr.length/2),left_half=arr.slice(0,half_idx),right_half=arr.slice(half_idx);return[left_half,right_half]}function join_into_human_readable_list(values){if(values.length<2)return values[0]||"";{let comma_separated_heads=values.slice(0,-1).join(", "),tail=values.slice(-1)[0];return[comma_separated_heads,tail].join(" and ")}}function range(start3,end2){end2===void 0&&(end2=start3,start3=0);let range2=[];for(let i=start3;i<end2;i++)range2.push(i);return range2}function range_right(start3,end2){end2===void 0&&(end2=start3,start3=0);let range2=[];for(let i=1;i<=end2-start3;i++)range2.push(end2-i);return range2}function isArrayLike2(value){return(0,import_fast_deep_equal.default)(Object.fromEntries(Object.entries(Object.values(value))),value)}function groupBy(array,fn){let groups={};for(let item of array){var _groups$key;let key=fn(item);((_groups$key=groups[key])!=null?_groups$key:groups[key]=[]).push(item)}return groups}var import_es_error_cause4,import_web_dom_collections_iterator7,import_fast_deep_equal,LinkedList,TimeoutLinkedList,init_b_array=__esm({"lib-browser/u/shared/b_array.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause4=__toESM(require_es_error_cause()),import_web_dom_collections_iterator7=__toESM(require_web_dom_collections_iterator()),import_fast_deep_equal=__toESM(require_fast_deep_equal());LinkedList=class{constructor(){this.length=void 0,this.links=void 0,this.length=0,this.links=null}push(item){if(this.links)this.links.tail.next={item},this.links.tail=this.links.tail.next;else{let head_link={item};this.links={head:head_link,tail:head_link}}return this.length++,this.length}shift(){if(this.links===null)return;let{item}=this.links.head;return this.links.head.next?this.links.head=this.links.head.next:this.links=null,this.length--,item}shift_while(predicate,body){for(;this.links!==null&&predicate(this.links.head.item);){let elem=this.links.head.item;this.shift(),body(elem)}}peek(){var _this$links;return(_this$links=this.links)==null?void 0:_this$links.head.item}peek_each(fn){var _this$links2;let item=(_this$links2=this.links)==null?void 0:_this$links2.head;for(;item!=null;)fn(item.item),item=item.next}},TimeoutLinkedList=class{constructor(timeout,timeout_cb){this.timeout=void 0,this.timeout_cb=void 0,this._timeout_started=!1,this.list=void 0,this.list=new LinkedList,this.timeout=timeout,this.timeout_cb=timeout_cb}get length(){return this.list.length}push(item){let start_time=Date.now();return this._timeout_started||this.start_timeout(start_time),this.list.push({item,start_time})}shift(){var _this$list$shift;return(_this$list$shift=this.list.shift())==null?void 0:_this$list$shift.item}start_timeout(start_time){this._timeout_started=!0,setTimeout(()=>{this._timeout_started=!1,this.list.shift_while(item2=>item2.start_time+this.timeout<=Date.now(),item2=>{this.timeout_cb(item2.item)});let item=this.list.peek();item&&this.start_timeout(item.start_time)},start_time+this.timeout-Date.now())}}}});var require_moment=__commonJS({"node_modules/moment/moment.js"(exports3,module2){init_define_process_env();init_shim();(function(global,factory){typeof exports3=="object"&&typeof module2<"u"?module2.exports=factory():typeof define=="function"&&define.amd?define(factory):global.moment=factory()})(exports3,function(){"use strict";var hookCallback;function hooks2(){return hookCallback.apply(null,arguments)}function setHookCallback(callback){hookCallback=callback}function isArray3(input2){return input2 instanceof Array||Object.prototype.toString.call(input2)==="[object Array]"}function isObject3(input2){return input2!=null&&Object.prototype.toString.call(input2)==="[object Object]"}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function isObjectEmpty(obj){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(obj).length===0;var k;for(k in obj)if(hasOwnProp(obj,k))return!1;return!0}function isUndefined(input2){return input2===void 0}function isNumber(input2){return typeof input2=="number"||Object.prototype.toString.call(input2)==="[object Number]"}function isDate(input2){return input2 instanceof Date||Object.prototype.toString.call(input2)==="[object Date]"}function map2(arr,fn){var res=[],i,arrLen=arr.length;for(i=0;i<arrLen;++i)res.push(fn(arr[i],i));return res}function extend2(a,b){for(var i in b)hasOwnProp(b,i)&&(a[i]=b[i]);return hasOwnProp(b,"toString")&&(a.toString=b.toString),hasOwnProp(b,"valueOf")&&(a.valueOf=b.valueOf),a}function createUTC(input2,format9,locale2,strict){return createLocalOrUTC(input2,format9,locale2,strict,!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(m){return m._pf==null&&(m._pf=defaultParsingFlags()),m._pf}var some;Array.prototype.some?some=Array.prototype.some:some=function(fun){var t=Object(this),len=t.length>>>0,i;for(i=0;i<len;i++)if(i in t&&fun.call(this,t[i],i,t))return!0;return!1};function isValid2(m){var flags=null,parsedParts=!1,isNowValid=m._d&&!isNaN(m._d.getTime());if(isNowValid&&(flags=getParsingFlags(m),parsedParts=some.call(flags.parsedDateParts,function(i){return i!=null}),isNowValid=flags.overflow<0&&!flags.empty&&!flags.invalidEra&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.weekdayMismatch&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||flags.meridiem&&parsedParts),m._strict&&(isNowValid=isNowValid&&flags.charsLeftOver===0&&flags.unusedTokens.length===0&&flags.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(m))m._isValid=isNowValid;else return isNowValid;return m._isValid}function createInvalid(flags){var m=createUTC(NaN);return flags!=null?extend2(getParsingFlags(m),flags):getParsingFlags(m).userInvalidated=!0,m}var momentProperties=hooks2.momentProperties=[],updateInProgress=!1;function copyConfig(to2,from2){var i,prop,val,momentPropertiesLen=momentProperties.length;if(isUndefined(from2._isAMomentObject)||(to2._isAMomentObject=from2._isAMomentObject),isUndefined(from2._i)||(to2._i=from2._i),isUndefined(from2._f)||(to2._f=from2._f),isUndefined(from2._l)||(to2._l=from2._l),isUndefined(from2._strict)||(to2._strict=from2._strict),isUndefined(from2._tzm)||(to2._tzm=from2._tzm),isUndefined(from2._isUTC)||(to2._isUTC=from2._isUTC),isUndefined(from2._offset)||(to2._offset=from2._offset),isUndefined(from2._pf)||(to2._pf=getParsingFlags(from2)),isUndefined(from2._locale)||(to2._locale=from2._locale),momentPropertiesLen>0)for(i=0;i<momentPropertiesLen;i++)prop=momentProperties[i],val=from2[prop],isUndefined(val)||(to2[prop]=val);return to2}function Moment(config){copyConfig(this,config),this._d=new Date(config._d!=null?config._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress===!1&&(updateInProgress=!0,hooks2.updateOffset(this),updateInProgress=!1)}function isMoment(obj){return obj instanceof Moment||obj!=null&&obj._isAMomentObject!=null}function warn2(msg){hooks2.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+msg)}function deprecate(msg,fn){var firstTime=!0;return extend2(function(){if(hooks2.deprecationHandler!=null&&hooks2.deprecationHandler(null,msg),firstTime){var args=[],arg,i,key,argLen=arguments.length;for(i=0;i<argLen;i++){if(arg="",typeof arguments[i]=="object"){arg+=`
[`+i+"] ";for(key in arguments[0])hasOwnProp(arguments[0],key)&&(arg+=key+": "+arguments[0][key]+", ");arg=arg.slice(0,-2)}else arg=arguments[i];args.push(arg)}warn2(msg+`
Arguments: `+Array.prototype.slice.call(args).join("")+`
`+new Error().stack),firstTime=!1}return fn.apply(this,arguments)},fn)}var deprecations={};function deprecateSimple(name,msg){hooks2.deprecationHandler!=null&&hooks2.deprecationHandler(name,msg),deprecations[name]||(warn2(msg),deprecations[name]=!0)}hooks2.suppressDeprecationWarnings=!1,hooks2.deprecationHandler=null;function isFunction2(input2){return typeof Function<"u"&&input2 instanceof Function||Object.prototype.toString.call(input2)==="[object Function]"}function set2(config){var prop,i;for(i in config)hasOwnProp(config,i)&&(prop=config[i],isFunction2(prop)?this[i]=prop:this["_"+i]=prop);this._config=config,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(parentConfig,childConfig){var res=extend2({},parentConfig),prop;for(prop in childConfig)hasOwnProp(childConfig,prop)&&(isObject3(parentConfig[prop])&&isObject3(childConfig[prop])?(res[prop]={},extend2(res[prop],parentConfig[prop]),extend2(res[prop],childConfig[prop])):childConfig[prop]!=null?res[prop]=childConfig[prop]:delete res[prop]);for(prop in parentConfig)hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject3(parentConfig[prop])&&(res[prop]=extend2({},res[prop]));return res}function Locale2(config){config!=null&&this.set(config)}var keys2;Object.keys?keys2=Object.keys:keys2=function(obj){var i,res=[];for(i in obj)hasOwnProp(obj,i)&&res.push(i);return res};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(key,mom,now3){var output3=this._calendar[key]||this._calendar.sameElse;return isFunction2(output3)?output3.call(mom,now3):output3}function zeroFill(number2,targetLength,forceSign){var absNumber=""+Math.abs(number2),zerosToFill=targetLength-absNumber.length,sign2=number2>=0;return(sign2?forceSign?"+":"":"-")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}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(token2,padded,ordinal2,callback){var func=callback;typeof callback=="string"&&(func=function(){return this[callback]()}),token2&&(formatTokenFunctions[token2]=func),padded&&(formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}),ordinal2&&(formatTokenFunctions[ordinal2]=function(){return this.localeData().ordinal(func.apply(this,arguments),token2)})}function removeFormattingTokens(input2){return input2.match(/\[[\s\S]/)?input2.replace(/^\[|\]$/g,""):input2.replace(/\\/g,"")}function makeFormatFunction(format9){var array=format9.match(formattingTokens),i,length;for(i=0,length=array.length;i<length;i++)formatTokenFunctions[array[i]]?array[i]=formatTokenFunctions[array[i]]:array[i]=removeFormattingTokens(array[i]);return function(mom){var output3="",i2;for(i2=0;i2<length;i2++)output3+=isFunction2(array[i2])?array[i2].call(mom,format9):array[i2];return output3}}function formatMoment(m,format9){return m.isValid()?(format9=expandFormat(format9,m.localeData()),formatFunctions[format9]=formatFunctions[format9]||makeFormatFunction(format9),formatFunctions[format9](m)):m.localeData().invalidDate()}function expandFormat(format9,locale2){var i=5;function replaceLongDateFormatTokens(input2){return locale2.longDateFormat(input2)||input2}for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format9);)format9=format9.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format9}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(key){var format9=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];return format9||!formatUpper?format9:(this._longDateFormat[key]=formatUpper.match(formattingTokens).map(function(tok){return tok==="MMMM"||tok==="MM"||tok==="DD"||tok==="dddd"?tok.slice(1):tok}).join(""),this._longDateFormat[key])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(number2){return this._ordinal.replace("%d",number2)}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(number2,withoutSuffix,string,isFuture){var output3=this._relativeTime[string];return isFunction2(output3)?output3(number2,withoutSuffix,string,isFuture):output3.replace(/%d/i,number2)}function pastFuture(diff2,output3){var format9=this._relativeTime[diff2>0?"future":"past"];return isFunction2(format9)?format9(output3):format9.replace(/%s/i,output3)}var aliases={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(units){return typeof units=="string"?aliases[units]||aliases[units.toLowerCase()]:void 0}function normalizeObjectUnits(inputObject){var normalizedInput={},normalizedProp,prop;for(prop in inputObject)hasOwnProp(inputObject,prop)&&(normalizedProp=normalizeUnits(prop),normalizedProp&&(normalizedInput[normalizedProp]=inputObject[prop]));return normalizedInput}var priorities={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(unitsObj){var units=[],u22;for(u22 in unitsObj)hasOwnProp(unitsObj,u22)&&units.push({unit:u22,priority:priorities[u22]});return units.sort(function(a,b){return a.priority-b.priority}),units}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,match1to2NoLeadingZero=/^[1-9]\d?/,match1to2HasZero=/^([1-9]\d|\d)/,regexes;regexes={};function addRegexToken(token2,regex,strictRegex){regexes[token2]=isFunction2(regex)?regex:function(isStrict,localeData2){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token2,config){return hasOwnProp(regexes,token2)?regexes[token2](config._strict,config._locale):new RegExp(unescapeFormat(token2))}function unescapeFormat(s){return regexEscape(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}))}function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(number2){return number2<0?Math.ceil(number2)||0:Math.floor(number2)}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return coercedNumber!==0&&isFinite(coercedNumber)&&(value=absFloor(coercedNumber)),value}var tokens={};function addParseToken(token2,callback){var i,func=callback,tokenLen;for(typeof token2=="string"&&(token2=[token2]),isNumber(callback)&&(func=function(input2,array){array[callback]=toInt(input2)}),tokenLen=token2.length,i=0;i<tokenLen;i++)tokens[token2[i]]=func}function addWeekParseToken(token2,callback){addParseToken(token2,function(input2,array,config,token3){config._w=config._w||{},callback(input2,config._w,config,token3)})}function addTimeToArrayFromToken(token2,input2,config){input2!=null&&hasOwnProp(tokens,token2)&&tokens[token2](input2,config._a,config,token2)}function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}var YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var y=this.year();return y<=9999?zeroFill(y,4):"+"+y}),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"),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(input2,array){array[YEAR]=input2.length===2?hooks2.parseTwoDigitYear(input2):toInt(input2)}),addParseToken("YY",function(input2,array){array[YEAR]=hooks2.parseTwoDigitYear(input2)}),addParseToken("Y",function(input2,array){array[YEAR]=parseInt(input2,10)});function daysInYear(year){return isLeapYear(year)?366:365}hooks2.parseTwoDigitYear=function(input2){return toInt(input2)+(toInt(input2)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(unit,keepTime){return function(value){return value!=null?(set$1(this,unit,value),hooks2.updateOffset(this,keepTime),this):get10(this,unit)}}function get10(mom,unit){if(!mom.isValid())return NaN;var d=mom._d,isUTC=mom._isUTC;switch(unit){case"Milliseconds":return isUTC?d.getUTCMilliseconds():d.getMilliseconds();case"Seconds":return isUTC?d.getUTCSeconds():d.getSeconds();case"Minutes":return isUTC?d.getUTCMinutes():d.getMinutes();case"Hours":return isUTC?d.getUTCHours():d.getHours();case"Date":return isUTC?d.getUTCDate():d.getDate();case"Day":return isUTC?d.getUTCDay():d.getDay();case"Month":return isUTC?d.getUTCMonth():d.getMonth();case"FullYear":return isUTC?d.getUTCFullYear():d.getFullYear();default:return NaN}}function set$1(mom,unit,value){var d,isUTC,year,month,date;if(!(!mom.isValid()||isNaN(value))){switch(d=mom._d,isUTC=mom._isUTC,unit){case"Milliseconds":return void(isUTC?d.setUTCMilliseconds(value):d.setMilliseconds(value));case"Seconds":return void(isUTC?d.setUTCSeconds(value):d.setSeconds(value));case"Minutes":return void(isUTC?d.setUTCMinutes(value):d.setMinutes(value));case"Hours":return void(isUTC?d.setUTCHours(value):d.setHours(value));case"Date":return void(isUTC?d.setUTCDate(value):d.setDate(value));case"FullYear":break;default:return}year=value,month=mom.month(),date=mom.date(),date=date===29&&month===1&&!isLeapYear(year)?28:date,isUTC?d.setUTCFullYear(year,month,date):d.setFullYear(year,month,date)}}function stringGet(units){return units=normalizeUnits(units),isFunction2(this[units])?this[units]():this}function stringSet(units,value){if(typeof units=="object"){units=normalizeObjectUnits(units);var prioritized=getPrioritizedUnits(units),i,prioritizedLen=prioritized.length;for(i=0;i<prioritizedLen;i++)this[prioritized[i].unit](units[prioritized[i].unit])}else if(units=normalizeUnits(units),isFunction2(this[units]))return this[units](value);return this}function mod(n,x){return(n%x+x)%x}var indexOf;Array.prototype.indexOf?indexOf=Array.prototype.indexOf:indexOf=function(o){var i;for(i=0;i<this.length;++i)if(this[i]===o)return i;return-1};function daysInMonth(year,month){if(isNaN(year)||isNaN(month))return NaN;var modMonth=mod(month,12);return year+=(month-modMonth)/12,modMonth===1?isLeapYear(year)?29:28:31-modMonth%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(format9){return this.localeData().monthsShort(this,format9)}),addFormatToken("MMMM",0,0,function(format9){return this.localeData().months(this,format9)}),addRegexToken("M",match1to2,match1to2NoLeadingZero),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",function(isStrict,locale2){return locale2.monthsShortRegex(isStrict)}),addRegexToken("MMMM",function(isStrict,locale2){return locale2.monthsRegex(isStrict)}),addParseToken(["M","MM"],function(input2,array){array[MONTH]=toInt(input2)-1}),addParseToken(["MMM","MMMM"],function(input2,array,config,token2){var month=config._locale.monthsParse(input2,token2,config._strict);month!=null?array[MONTH]=month:getParsingFlags(config).invalidMonth=input2});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(m,format9){return m?isArray3(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format9)?"format":"standalone"][m.month()]:isArray3(this._months)?this._months:this._months.standalone}function localeMonthsShort(m,format9){return m?isArray3(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format9)?"format":"standalone"][m.month()]:isArray3(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(monthName,format9,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)mom=createUTC([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(mom,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(mom,"").toLocaleLowerCase();return strict?format9==="MMM"?(ii=indexOf.call(this._shortMonthsParse,llc),ii!==-1?ii:null):(ii=indexOf.call(this._longMonthsParse,llc),ii!==-1?ii:null):format9==="MMM"?(ii=indexOf.call(this._shortMonthsParse,llc),ii!==-1?ii:(ii=indexOf.call(this._longMonthsParse,llc),ii!==-1?ii:null)):(ii=indexOf.call(this._longMonthsParse,llc),ii!==-1?ii:(ii=indexOf.call(this._shortMonthsParse,llc),ii!==-1?ii:null))}function localeMonthsParse(monthName,format9,strict){var i,mom,regex;if(this._monthsParseExact)return handleStrictParse.call(this,monthName,format9,strict);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(mom=createUTC([2e3,i]),strict&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(mom,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(mom,"").replace(".","")+"$","i")),!strict&&!this._monthsParse[i]&&(regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&format9==="MMMM"&&this._longMonthsParse[i].test(monthName))return i;if(strict&&format9==="MMM"&&this._shortMonthsParse[i].test(monthName))return i;if(!strict&&this._monthsParse[i].test(monthName))return i}}function setMonth(mom,value){if(!mom.isValid())return mom;if(typeof value=="string"){if(/^\d+$/.test(value))value=toInt(value);else if(value=mom.localeData().monthsParse(value),!isNumber(value))return mom}var month=value,date=mom.date();return date=date<29?date:Math.min(date,daysInMonth(mom.year(),month)),mom._isUTC?mom._d.setUTCMonth(month,date):mom._d.setMonth(month,date),mom}function getSetMonth(value){return value!=null?(setMonth(this,value),hooks2.updateOffset(this,!0),this):get10(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length}var shortPieces=[],longPieces=[],mixedPieces=[],i,mom,shortP,longP;for(i=0;i<12;i++)mom=createUTC([2e3,i]),shortP=regexEscape(this.monthsShort(mom,"")),longP=regexEscape(this.months(mom,"")),shortPieces.push(shortP),longPieces.push(longP),mixedPieces.push(longP),mixedPieces.push(shortP);shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),this._monthsRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i")}function createDate(y,m,d,h,M,s,ms){var date;return y<100&&y>=0?(date=new Date(y+400,m,d,h,M,s,ms),isFinite(date.getFullYear())&&date.setFullYear(y)):date=new Date(y,m,d,h,M,s,ms),date}function createUTCDate(y){var date,args;return y<100&&y>=0?(args=Array.prototype.slice.call(arguments),args[0]=y+400,date=new Date(Date.UTC.apply(null,args)),isFinite(date.getUTCFullYear())&&date.setUTCFullYear(y)):date=new Date(Date.UTC.apply(null,arguments)),date}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw=(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7;return-fwdlw+fwd-1}function dayOfYearFromWeeks(year,week,weekday,dow,doy){var localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset,resYear,resDayOfYear;return dayOfYear<=0?(resYear=year-1,resDayOfYear=daysInYear(resYear)+dayOfYear):dayOfYear>daysInYear(year)?(resYear=year+1,resDayOfYear=dayOfYear-daysInYear(year)):(resYear=year,resDayOfYear=dayOfYear),{year:resYear,dayOfYear:resDayOfYear}}function weekOfYear(mom,dow,doy){var weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1,resWeek,resYear;return week<1?(resYear=mom.year()-1,resWeek=week+weeksInYear(resYear,dow,doy)):week>weeksInYear(mom.year(),dow,doy)?(resWeek=week-weeksInYear(mom.year(),dow,doy),resYear=mom.year()+1):(resYear=mom.year(),resWeek=week),{week:resWeek,year:resYear}}function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7}addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addRegexToken("w",match1to2,match1to2NoLeadingZero),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2,match1to2NoLeadingZero),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(input2,week,config,token2){week[token2.substr(0,1)]=toInt(input2)});function localeWeek(mom){return weekOfYear(mom,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(input2){var week=this.localeData().week(this);return input2==null?week:this.add((input2-week)*7,"d")}function getSetISOWeek(input2){var week=weekOfYear(this,1,4).week;return input2==null?week:this.add((input2-week)*7,"d")}addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(format9){return this.localeData().weekdaysMin(this,format9)}),addFormatToken("ddd",0,0,function(format9){return this.localeData().weekdaysShort(this,format9)}),addFormatToken("dddd",0,0,function(format9){return this.localeData().weekdays(this,format9)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",function(isStrict,locale2){return locale2.weekdaysMinRegex(isStrict)}),addRegexToken("ddd",function(isStrict,locale2){return locale2.weekdaysShortRegex(isStrict)}),addRegexToken("dddd",function(isStrict,locale2){return locale2.weekdaysRegex(isStrict)}),addWeekParseToken(["dd","ddd","dddd"],function(input2,week,config,token2){var weekday=config._locale.weekdaysParse(input2,token2,config._strict);weekday!=null?week.d=weekday:getParsingFlags(config).invalidWeekday=input2}),addWeekParseToken(["d","e","E"],function(input2,week,config,token2){week[token2]=toInt(input2)});function parseWeekday(input2,locale2){return typeof input2!="string"?input2:isNaN(input2)?(input2=locale2.weekdaysParse(input2),typeof input2=="number"?input2:null):parseInt(input2,10)}function parseIsoWeekday(input2,locale2){return typeof input2=="string"?locale2.weekdaysParse(input2)%7||7:isNaN(input2)?null:input2}function shiftWeekdays(ws,n){return ws.slice(n,7).concat(ws.slice(0,n))}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(m,format9){var weekdays=isArray3(this._weekdays)?this._weekdays:this._weekdays[m&&m!==!0&&this._weekdays.isFormat.test(format9)?"format":"standalone"];return m===!0?shiftWeekdays(weekdays,this._week.dow):m?weekdays[m.day()]:weekdays}function localeWeekdaysShort(m){return m===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):m?this._weekdaysShort[m.day()]:this._weekdaysShort}function localeWeekdaysMin(m){return m===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):m?this._weekdaysMin[m.day()]:this._weekdaysMin}function handleStrictParse$1(weekdayName,format9,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)mom=createUTC([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(mom,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(mom,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(mom,"").toLocaleLowerCase();return strict?format9==="dddd"?(ii=indexOf.call(this._weekdaysParse,llc),ii!==-1?ii:null):format9==="ddd"?(ii=indexOf.call(this._shortWeekdaysParse,llc),ii!==-1?ii:null):(ii=indexOf.call(this._minWeekdaysParse,llc),ii!==-1?ii:null):format9==="dddd"?(ii=indexOf.call(this._weekdaysParse,llc),ii!==-1||(ii=indexOf.call(this._shortWeekdaysParse,llc),ii!==-1)?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),ii!==-1?ii:null)):format9==="ddd"?(ii=indexOf.call(this._shortWeekdaysParse,llc),ii!==-1||(ii=indexOf.call(this._weekdaysParse,llc),ii!==-1)?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),ii!==-1?ii:null)):(ii=indexOf.call(this._minWeekdaysParse,llc),ii!==-1||(ii=indexOf.call(this._weekdaysParse,llc),ii!==-1)?ii:(ii=indexOf.call(this._shortWeekdaysParse,llc),ii!==-1?ii:null))}function localeWeekdaysParse(weekdayName,format9,strict){var i,mom,regex;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,weekdayName,format9,strict);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(mom=createUTC([2e3,1]).day(i),strict&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(mom,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(mom,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(mom,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&format9==="dddd"&&this._fullWeekdaysParse[i].test(weekdayName))return i;if(strict&&format9==="ddd"&&this._shortWeekdaysParse[i].test(weekdayName))return i;if(strict&&format9==="dd"&&this._minWeekdaysParse[i].test(weekdayName))return i;if(!strict&&this._weekdaysParse[i].test(weekdayName))return i}}function getSetDayOfWeek(input2){if(!this.isValid())return input2!=null?this:NaN;var day=get10(this,"Day");return input2!=null?(input2=parseWeekday(input2,this.localeData()),this.add(input2-day,"d")):day}function getSetLocaleDayOfWeek(input2){if(!this.isValid())return input2!=null?this:NaN;var weekday=(this.day()+7-this.localeData()._week.dow)%7;return input2==null?weekday:this.add(input2-weekday,"d")}function getSetISODayOfWeek(input2){if(!this.isValid())return input2!=null?this:NaN;if(input2!=null){var weekday=parseIsoWeekday(input2,this.localeData());return this.day(this.day()%7?weekday:weekday-7)}else return this.day()||7}function weekdaysRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length}var minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[],i,mom,minp,shortp,longp;for(i=0;i<7;i++)mom=createUTC([2e3,1]).day(i),minp=regexEscape(this.weekdaysMin(mom,"")),shortp=regexEscape(this.weekdaysShort(mom,"")),longp=regexEscape(this.weekdays(mom,"")),minPieces.push(minp),shortPieces.push(shortp),longPieces.push(longp),mixedPieces.push(minp),mixedPieces.push(shortp),mixedPieces.push(longp);minPieces.sort(cmpLenRev),shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),this._weekdaysRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+minPieces.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(token2,lowercase){addFormatToken(token2,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}meridiem("a",!0),meridiem("A",!1);function matchMeridiem(isStrict,locale2){return locale2._meridiemParse}addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2,match1to2HasZero),addRegexToken("h",match1to2,match1to2NoLeadingZero),addRegexToken("k",match1to2,match1to2NoLeadingZero),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(input2,array,config){var kInput=toInt(input2);array[HOUR]=kInput===24?0:kInput}),addParseToken(["a","A"],function(input2,array,config){config._isPm=config._locale.isPM(input2),config._meridiem=input2}),addParseToken(["h","hh"],function(input2,array,config){array[HOUR]=toInt(input2),getParsingFlags(config).bigHour=!0}),addParseToken("hmm",function(input2,array,config){var pos=input2.length-2;array[HOUR]=toInt(input2.substr(0,pos)),array[MINUTE]=toInt(input2.substr(pos)),getParsingFlags(config).bigHour=!0}),addParseToken("hmmss",function(input2,array,config){var pos1=input2.length-4,pos2=input2.length-2;array[HOUR]=toInt(input2.substr(0,pos1)),array[MINUTE]=toInt(input2.substr(pos1,2)),array[SECOND]=toInt(input2.substr(pos2)),getParsingFlags(config).bigHour=!0}),addParseToken("Hmm",function(input2,array,config){var pos=input2.length-2;array[HOUR]=toInt(input2.substr(0,pos)),array[MINUTE]=toInt(input2.substr(pos))}),addParseToken("Hmmss",function(input2,array,config){var pos1=input2.length-4,pos2=input2.length-2;array[HOUR]=toInt(input2.substr(0,pos1)),array[MINUTE]=toInt(input2.substr(pos1,2)),array[SECOND]=toInt(input2.substr(pos2))});function localeIsPM(input2){return(input2+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(hours2,minutes2,isLower){return hours2>11?isLower?"pm":"PM":isLower?"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(arr1,arr2){var i,minl=Math.min(arr1.length,arr2.length);for(i=0;i<minl;i+=1)if(arr1[i]!==arr2[i])return i;return minl}function normalizeLocale(key){return key&&key.toLowerCase().replace("_","-")}function chooseLocale(names){for(var i=0,j2,next,locale2,split;i<names.length;){for(split=normalizeLocale(names[i]).split("-"),j2=split.length,next=normalizeLocale(names[i+1]),next=next?next.split("-"):null;j2>0;){if(locale2=loadLocale(split.slice(0,j2).join("-")),locale2)return locale2;if(next&&next.length>=j2&&commonPrefix(split,next)>=j2-1)break;j2--}i++}return globalLocale}function isLocaleNameSane(name){return!!(name&&name.match("^[^/\\\\]*$"))}function loadLocale(name){var oldLocale=null,aliasedRequire;if(locales[name]===void 0&&typeof module2<"u"&&module2&&module2.exports&&isLocaleNameSane(name))try{oldLocale=globalLocale._abbr,aliasedRequire=__require,aliasedRequire("./locale/"+name),getSetGlobalLocale(oldLocale)}catch{locales[name]=null}return locales[name]}function getSetGlobalLocale(key,values){var data;return key&&(isUndefined(values)?data=getLocale(key):data=defineLocale(key,values),data?globalLocale=data:typeof console<"u"&&console.warn&&console.warn("Locale "+key+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(name,config){if(config!==null){var locale2,parentConfig=baseConfig;if(config.abbr=name,locales[name]!=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."),parentConfig=locales[name]._config;else if(config.parentLocale!=null)if(locales[config.parentLocale]!=null)parentConfig=locales[config.parentLocale]._config;else if(locale2=loadLocale(config.parentLocale),locale2!=null)parentConfig=locale2._config;else return localeFamilies[config.parentLocale]||(localeFamilies[config.parentLocale]=[]),localeFamilies[config.parentLocale].push({name,config}),null;return locales[name]=new Locale2(mergeConfigs(parentConfig,config)),localeFamilies[name]&&localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config)}),getSetGlobalLocale(name),locales[name]}else return delete locales[name],null}function updateLocale(name,config){if(config!=null){var locale2,tmpLocale,parentConfig=baseConfig;locales[name]!=null&&locales[name].parentLocale!=null?locales[name].set(mergeConfigs(locales[name]._config,config)):(tmpLocale=loadLocale(name),tmpLocale!=null&&(parentConfig=tmpLocale._config),config=mergeConfigs(parentConfig,config),tmpLocale==null&&(config.abbr=name),locale2=new Locale2(config),locale2.parentLocale=locales[name],locales[name]=locale2),getSetGlobalLocale(name)}else locales[name]!=null&&(locales[name].parentLocale!=null?(locales[name]=locales[name].parentLocale,name===getSetGlobalLocale()&&getSetGlobalLocale(name)):locales[name]!=null&&delete locales[name]);return locales[name]}function getLocale(key){var locale2;if(key&&key._locale&&key._locale._abbr&&(key=key._locale._abbr),!key)return globalLocale;if(!isArray3(key)){if(locale2=loadLocale(key),locale2)return locale2;key=[key]}return chooseLocale(key)}function listLocales(){return keys2(locales)}function checkOverflow(m){var overflow,a=m._a;return a&&getParsingFlags(m).overflow===-2&&(overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0)?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)&&(overflow=DATE),getParsingFlags(m)._overflowWeeks&&overflow===-1&&(overflow=WEEK),getParsingFlags(m)._overflowWeekday&&overflow===-1&&(overflow=WEEKDAY),getParsingFlags(m).overflow=overflow),m}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(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat,isoDatesLen=isoDates.length,isoTimesLen=isoTimes.length;if(match){for(getParsingFlags(config).iso=!0,i=0,l=isoDatesLen;i<l;i++)if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0],allowTime=isoDates[i][2]!==!1;break}if(dateFormat==null){config._isValid=!1;return}if(match[3]){for(i=0,l=isoTimesLen;i<l;i++)if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||" ")+isoTimes[i][0];break}if(timeFormat==null){config._isValid=!1;return}}if(!allowTime&&timeFormat!=null){config._isValid=!1;return}if(match[4])if(tzRegex.exec(match[4]))tzFormat="Z";else{config._isValid=!1;return}config._f=dateFormat+(timeFormat||"")+(tzFormat||""),configFromStringAndFormat(config)}else config._isValid=!1}function extractFromRFC2822Strings(yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr){var result=[untruncateYear(yearStr),defaultLocaleMonthsShort.indexOf(monthStr),parseInt(dayStr,10),parseInt(hourStr,10),parseInt(minuteStr,10)];return secondStr&&result.push(parseInt(secondStr,10)),result}function untruncateYear(yearStr){var year=parseInt(yearStr,10);return year<=49?2e3+year:year<=999?1900+year:year}function preprocessRFC2822(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(weekdayStr,parsedInput,config){if(weekdayStr){var weekdayProvided=defaultLocaleWeekdaysShort.indexOf(weekdayStr),weekdayActual=new Date(parsedInput[0],parsedInput[1],parsedInput[2]).getDay();if(weekdayProvided!==weekdayActual)return getParsingFlags(config).weekdayMismatch=!0,config._isValid=!1,!1}return!0}function calculateOffset(obsOffset,militaryOffset,numOffset){if(obsOffset)return obsOffsets[obsOffset];if(militaryOffset)return 0;var hm=parseInt(numOffset,10),m=hm%100,h=(hm-m)/100;return h*60+m}function configFromRFC2822(config){var match=rfc2822.exec(preprocessRFC2822(config._i)),parsedArray;if(match){if(parsedArray=extractFromRFC2822Strings(match[4],match[3],match[2],match[5],match[6],match[7]),!checkWeekday(match[1],parsedArray,config))return;config._a=parsedArray,config._tzm=calculateOffset(match[8],match[9],match[10]),config._d=createUTCDate.apply(null,config._a),config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),getParsingFlags(config).rfc2822=!0}else config._isValid=!1}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(matched!==null){config._d=new Date(+matched[1]);return}if(configFromISO(config),config._isValid===!1)delete config._isValid;else return;if(configFromRFC2822(config),config._isValid===!1)delete config._isValid;else return;config._strict?config._isValid=!1:hooks2.createFromInputFallback(config)}hooks2.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(config){config._d=new Date(config._i+(config._useUTC?" UTC":""))});function defaults2(a,b,c){return a!=null?a:b!=null?b:c}function currentDateArray(config){var nowValue=new Date(hooks2.now());return config._useUTC?[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()]:[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()]}function configFromArray(config){var i,date,input2=[],currentDate,expectedWeekday,yearToUse;if(!config._d){for(currentDate=currentDateArray(config),config._w&&config._a[DATE]==null&&config._a[MONTH]==null&&dayOfYearFromWeekInfo(config),config._dayOfYear!=null&&(yearToUse=defaults2(config._a[YEAR],currentDate[YEAR]),(config._dayOfYear>daysInYear(yearToUse)||config._dayOfYear===0)&&(getParsingFlags(config)._overflowDayOfYear=!0),date=createUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;i<3&&config._a[i]==null;++i)config._a[i]=input2[i]=currentDate[i];for(;i<7;i++)config._a[i]=input2[i]=config._a[i]==null?i===2?1:0:config._a[i];config._a[HOUR]===24&&config._a[MINUTE]===0&&config._a[SECOND]===0&&config._a[MILLISECOND]===0&&(config._nextDay=!0,config._a[HOUR]=0),config._d=(config._useUTC?createUTCDate:createDate).apply(null,input2),expectedWeekday=config._useUTC?config._d.getUTCDay():config._d.getDay(),config._tzm!=null&&config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),config._nextDay&&(config._a[HOUR]=24),config._w&&typeof config._w.d<"u"&&config._w.d!==expectedWeekday&&(getParsingFlags(config).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow,curWeek;w=config._w,w.GG!=null||w.W!=null||w.E!=null?(dow=1,doy=4,weekYear=defaults2(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year),week=defaults2(w.W,1),weekday=defaults2(w.E,1),(weekday<1||weekday>7)&&(weekdayOverflow=!0)):(dow=config._locale._week.dow,doy=config._locale._week.doy,curWeek=weekOfYear(createLocal(),dow,doy),weekYear=defaults2(w.gg,config._a[YEAR],curWeek.year),week=defaults2(w.w,curWeek.week),w.d!=null?(weekday=w.d,(weekday<0||weekday>6)&&(weekdayOverflow=!0)):w.e!=null?(weekday=w.e+dow,(w.e<0||w.e>6)&&(weekdayOverflow=!0)):weekday=dow),week<1||week>weeksInYear(weekYear,dow,doy)?getParsingFlags(config)._overflowWeeks=!0:weekdayOverflow!=null?getParsingFlags(config)._overflowWeekday=!0:(temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear)}hooks2.ISO_8601=function(){},hooks2.RFC_2822=function(){};function configFromStringAndFormat(config){if(config._f===hooks2.ISO_8601){configFromISO(config);return}if(config._f===hooks2.RFC_2822){configFromRFC2822(config);return}config._a=[],getParsingFlags(config).empty=!0;var string=""+config._i,i,parsedInput,tokens2,token2,skipped,stringLength=string.length,totalParsedInputLength=0,era,tokenLen;for(tokens2=expandFormat(config._f,config._locale).match(formattingTokens)||[],tokenLen=tokens2.length,i=0;i<tokenLen;i++)token2=tokens2[i],parsedInput=(string.match(getParseRegexForToken(token2,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&getParsingFlags(config).unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token2]?(parsedInput?getParsingFlags(config).empty=!1:getParsingFlags(config).unusedTokens.push(token2),addTimeToArrayFromToken(token2,parsedInput,config)):config._strict&&!parsedInput&&getParsingFlags(config).unusedTokens.push(token2);getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&getParsingFlags(config).unusedInput.push(string),config._a[HOUR]<=12&&getParsingFlags(config).bigHour===!0&&config._a[HOUR]>0&&(getParsingFlags(config).bigHour=void 0),getParsingFlags(config).parsedDateParts=config._a.slice(0),getParsingFlags(config).meridiem=config._meridiem,config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem),era=getParsingFlags(config).era,era!==null&&(config._a[YEAR]=config._locale.erasConvertYear(era,config._a[YEAR])),configFromArray(config),checkOverflow(config)}function meridiemFixWrap(locale2,hour,meridiem2){var isPm;return meridiem2==null?hour:locale2.meridiemHour!=null?locale2.meridiemHour(hour,meridiem2):(locale2.isPM!=null&&(isPm=locale2.isPM(meridiem2),isPm&&hour<12&&(hour+=12),!isPm&&hour===12&&(hour=0)),hour)}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore,validFormatFound,bestFormatIsValid=!1,configfLen=config._f.length;if(configfLen===0){getParsingFlags(config).invalidFormat=!0,config._d=new Date(NaN);return}for(i=0;i<configfLen;i++)currentScore=0,validFormatFound=!1,tempConfig=copyConfig({},config),config._useUTC!=null&&(tempConfig._useUTC=config._useUTC),tempConfig._f=config._f[i],configFromStringAndFormat(tempConfig),isValid2(tempConfig)&&(validFormatFound=!0),currentScore+=getParsingFlags(tempConfig).charsLeftOver,currentScore+=getParsingFlags(tempConfig).unusedTokens.length*10,getParsingFlags(tempConfig).score=currentScore,bestFormatIsValid?currentScore<scoreToBeat&&(scoreToBeat=currentScore,bestMoment=tempConfig):(scoreToBeat==null||currentScore<scoreToBeat||validFormatFound)&&(scoreToBeat=currentScore,bestMoment=tempConfig,validFormatFound&&(bestFormatIsValid=!0));extend2(config,bestMoment||tempConfig)}function configFromObject(config){if(!config._d){var i=normalizeObjectUnits(config._i),dayOrDate=i.day===void 0?i.date:i.day;config._a=map2([i.year,i.month,dayOrDate,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10)}),configFromArray(config)}}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));return res._nextDay&&(res.add(1,"d"),res._nextDay=void 0),res}function prepareConfig(config){var input2=config._i,format9=config._f;return config._locale=config._locale||getLocale(config._l),input2===null||format9===void 0&&input2===""?createInvalid({nullInput:!0}):(typeof input2=="string"&&(config._i=input2=config._locale.preparse(input2)),isMoment(input2)?new Moment(checkOverflow(input2)):(isDate(input2)?config._d=input2:isArray3(format9)?configFromStringAndArray(config):format9?configFromStringAndFormat(config):configFromInput(config),isValid2(config)||(config._d=null),config))}function configFromInput(config){var input2=config._i;isUndefined(input2)?config._d=new Date(hooks2.now()):isDate(input2)?config._d=new Date(input2.valueOf()):typeof input2=="string"?configFromString(config):isArray3(input2)?(config._a=map2(input2.slice(0),function(obj){return parseInt(obj,10)}),configFromArray(config)):isObject3(input2)?configFromObject(config):isNumber(input2)?config._d=new Date(input2):hooks2.createFromInputFallback(config)}function createLocalOrUTC(input2,format9,locale2,strict,isUTC){var c={};return(format9===!0||format9===!1)&&(strict=format9,format9=void 0),(locale2===!0||locale2===!1)&&(strict=locale2,locale2=void 0),(isObject3(input2)&&isObjectEmpty(input2)||isArray3(input2)&&input2.length===0)&&(input2=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=isUTC,c._l=locale2,c._i=input2,c._f=format9,c._strict=strict,createFromConfig(c)}function createLocal(input2,format9,locale2,strict){return createLocalOrUTC(input2,format9,locale2,strict,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other<this?this:other:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other>this?this:other:createInvalid()});function pickBy(fn,moments){var res,i;if(moments.length===1&&isArray3(moments[0])&&(moments=moments[0]),!moments.length)return createLocal();for(res=moments[0],i=1;i<moments.length;++i)(!moments[i].isValid()||moments[i][fn](res))&&(res=moments[i]);return res}function min(){var args=[].slice.call(arguments,0);return pickBy("isBefore",args)}function max(){var args=[].slice.call(arguments,0);return pickBy("isAfter",args)}var now2=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(m){var key,unitHasDecimal=!1,i,orderLen=ordering.length;for(key in m)if(hasOwnProp(m,key)&&!(indexOf.call(ordering,key)!==-1&&(m[key]==null||!isNaN(m[key]))))return!1;for(i=0;i<orderLen;++i)if(m[ordering[i]]){if(unitHasDecimal)return!1;parseFloat(m[ordering[i]])!==toInt(m[ordering[i]])&&(unitHasDecimal=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years2=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months2=normalizedInput.month||0,weeks2=normalizedInput.week||normalizedInput.isoWeek||0,days2=normalizedInput.day||0,hours2=normalizedInput.hour||0,minutes2=normalizedInput.minute||0,seconds2=normalizedInput.second||0,milliseconds2=normalizedInput.millisecond||0;this._isValid=isDurationValid(normalizedInput),this._milliseconds=+milliseconds2+seconds2*1e3+minutes2*6e4+hours2*1e3*60*60,this._days=+days2+weeks2*7,this._months=+months2+quarters*3+years2*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(obj){return obj instanceof Duration}function absRound(number2){return number2<0?Math.round(-1*number2)*-1:Math.round(number2)}function compareArrays(array1,array2,dontConvert){var len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0,i;for(i=0;i<len;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function offset(token2,separator){addFormatToken(token2,0,0,function(){var offset2=this.utcOffset(),sign2="+";return offset2<0&&(offset2=-offset2,sign2="-"),sign2+zeroFill(~~(offset2/60),2)+separator+zeroFill(~~offset2%60,2)})}offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(input2,array,config){config._useUTC=!0,config._tzm=offsetFromString(matchShortOffset,input2)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(matcher,string){var matches=(string||"").match(matcher),chunk,parts,minutes2;return matches===null?null:(chunk=matches[matches.length-1]||[],parts=(chunk+"").match(chunkOffset)||["-",0,0],minutes2=+(parts[1]*60)+toInt(parts[2]),minutes2===0?0:parts[0]==="+"?minutes2:-minutes2)}function cloneWithOffset(input2,model){var res,diff2;return model._isUTC?(res=model.clone(),diff2=(isMoment(input2)||isDate(input2)?input2.valueOf():createLocal(input2).valueOf())-res.valueOf(),res._d.setTime(res._d.valueOf()+diff2),hooks2.updateOffset(res,!1),res):createLocal(input2).local()}function getDateOffset(m){return-Math.round(m._d.getTimezoneOffset())}hooks2.updateOffset=function(){};function getSetOffset(input2,keepLocalTime,keepMinutes){var offset2=this._offset||0,localAdjust;if(!this.isValid())return input2!=null?this:NaN;if(input2!=null){if(typeof input2=="string"){if(input2=offsetFromString(matchShortOffset,input2),input2===null)return this}else Math.abs(input2)<16&&!keepMinutes&&(input2=input2*60);return!this._isUTC&&keepLocalTime&&(localAdjust=getDateOffset(this)),this._offset=input2,this._isUTC=!0,localAdjust!=null&&this.add(localAdjust,"m"),offset2!==input2&&(!keepLocalTime||this._changeInProgress?addSubtract(this,createDuration(input2-offset2,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks2.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?offset2:getDateOffset(this)}function getSetZone(input2,keepLocalTime){return input2!=null?(typeof input2!="string"&&(input2=-input2),this.utcOffset(input2,keepLocalTime),this):-this.utcOffset()}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){return this._isUTC&&(this.utcOffset(0,keepLocalTime),this._isUTC=!1,keepLocalTime&&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 tZone=offsetFromString(matchOffset,this._i);tZone!=null?this.utcOffset(tZone):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(input2){return this.isValid()?(input2=input2?createLocal(input2).utcOffset():0,(this.utcOffset()-input2)%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 c={},other;return copyConfig(c,this),c=prepareConfig(c),c._a?(other=c._isUTC?createUTC(c._a):createLocal(c._a),this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.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(input2,key){var duration=input2,match=null,sign2,ret,diffRes;return isDuration(input2)?duration={ms:input2._milliseconds,d:input2._days,M:input2._months}:isNumber(input2)||!isNaN(+input2)?(duration={},key?duration[key]=+input2:duration.milliseconds=+input2):(match=aspNetRegex.exec(input2))?(sign2=match[1]==="-"?-1:1,duration={y:0,d:toInt(match[DATE])*sign2,h:toInt(match[HOUR])*sign2,m:toInt(match[MINUTE])*sign2,s:toInt(match[SECOND])*sign2,ms:toInt(absRound(match[MILLISECOND]*1e3))*sign2}):(match=isoRegex.exec(input2))?(sign2=match[1]==="-"?-1:1,duration={y:parseIso(match[2],sign2),M:parseIso(match[3],sign2),w:parseIso(match[4],sign2),d:parseIso(match[5],sign2),h:parseIso(match[6],sign2),m:parseIso(match[7],sign2),s:parseIso(match[8],sign2)}):duration==null?duration={}:typeof duration=="object"&&("from"in duration||"to"in duration)&&(diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to)),duration={},duration.ms=diffRes.milliseconds,duration.M=diffRes.months),ret=new Duration(duration),isDuration(input2)&&hasOwnProp(input2,"_locale")&&(ret._locale=input2._locale),isDuration(input2)&&hasOwnProp(input2,"_isValid")&&(ret._isValid=input2._isValid),ret}createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;function parseIso(inp,sign2){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign2}function positiveMomentsDifference(base,other){var res={};return res.months=other.month()-base.month()+(other.year()-base.year())*12,base.clone().add(res.months,"M").isAfter(other)&&--res.months,res.milliseconds=+other-+base.clone().add(res.months,"M"),res}function momentsDifference(base,other){var res;return base.isValid()&&other.isValid()?(other=cloneWithOffset(other,base),base.isBefore(other)?res=positiveMomentsDifference(base,other):(res=positiveMomentsDifference(other,base),res.milliseconds=-res.milliseconds,res.months=-res.months),res):{milliseconds:0,months:0}}function createAdder(direction,name){return function(val,period){var dur,tmp;return period!==null&&!isNaN(+period)&&(deprecateSimple(name,"moment()."+name+"(period, number) is deprecated. Please use moment()."+name+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),tmp=val,val=period,period=tmp),dur=createDuration(val,period),addSubtract(this,dur,direction),this}}function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds2=duration._milliseconds,days2=absRound(duration._days),months2=absRound(duration._months);mom.isValid()&&(updateOffset=updateOffset==null?!0:updateOffset,months2&&setMonth(mom,get10(mom,"Month")+months2*isAdding),days2&&set$1(mom,"Date",get10(mom,"Date")+days2*isAdding),milliseconds2&&mom._d.setTime(mom._d.valueOf()+milliseconds2*isAdding),updateOffset&&hooks2.updateOffset(mom,days2||months2))}var add4=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString(input2){return typeof input2=="string"||input2 instanceof String}function isMomentInput(input2){return isMoment(input2)||isDate(input2)||isString(input2)||isNumber(input2)||isNumberOrStringArray(input2)||isMomentInputObject(input2)||input2===null||input2===void 0}function isMomentInputObject(input2){var objectTest=isObject3(input2)&&!isObjectEmpty(input2),propertyTest=!1,properties=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,property2,propertyLen=properties.length;for(i=0;i<propertyLen;i+=1)property2=properties[i],propertyTest=propertyTest||hasOwnProp(input2,property2);return objectTest&&propertyTest}function isNumberOrStringArray(input2){var arrayTest=isArray3(input2),dataTypeTest=!1;return arrayTest&&(dataTypeTest=input2.filter(function(item){return!isNumber(item)&&isString(input2)}).length===0),arrayTest&&dataTypeTest}function isCalendarSpec(input2){var objectTest=isObject3(input2)&&!isObjectEmpty(input2),propertyTest=!1,properties=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,property2;for(i=0;i<properties.length;i+=1)property2=properties[i],propertyTest=propertyTest||hasOwnProp(input2,property2);return objectTest&&propertyTest}function getCalendarFormat(myMoment,now3){var diff2=myMoment.diff(now3,"days",!0);return diff2<-6?"sameElse":diff2<-1?"lastWeek":diff2<0?"lastDay":diff2<1?"sameDay":diff2<2?"nextDay":diff2<7?"nextWeek":"sameElse"}function calendar$1(time,formats){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(time=arguments[0],formats=void 0):isCalendarSpec(arguments[0])&&(formats=arguments[0],time=void 0):(time=void 0,formats=void 0));var now3=time||createLocal(),sod=cloneWithOffset(now3,this).startOf("day"),format9=hooks2.calendarFormat(this,sod)||"sameElse",output3=formats&&(isFunction2(formats[format9])?formats[format9].call(this,now3):formats[format9]);return this.format(output3||this.localeData().calendar(format9,this,createLocal(now3)))}function clone(){return new Moment(this)}function isAfter(input2,units){var localInput=isMoment(input2)?input2:createLocal(input2);return this.isValid()&&localInput.isValid()?(units=normalizeUnits(units)||"millisecond",units==="millisecond"?this.valueOf()>localInput.valueOf():localInput.valueOf()<this.clone().startOf(units).valueOf()):!1}function isBefore(input2,units){var localInput=isMoment(input2)?input2:createLocal(input2);return this.isValid()&&localInput.isValid()?(units=normalizeUnits(units)||"millisecond",units==="millisecond"?this.valueOf()<localInput.valueOf():this.clone().endOf(units).valueOf()<localInput.valueOf()):!1}function isBetween(from2,to2,units,inclusivity){var localFrom=isMoment(from2)?from2:createLocal(from2),localTo=isMoment(to2)?to2:createLocal(to2);return this.isValid()&&localFrom.isValid()&&localTo.isValid()?(inclusivity=inclusivity||"()",(inclusivity[0]==="("?this.isAfter(localFrom,units):!this.isBefore(localFrom,units))&&(inclusivity[1]===")"?this.isBefore(localTo,units):!this.isAfter(localTo,units))):!1}function isSame(input2,units){var localInput=isMoment(input2)?input2:createLocal(input2),inputMs;return this.isValid()&&localInput.isValid()?(units=normalizeUnits(units)||"millisecond",units==="millisecond"?this.valueOf()===localInput.valueOf():(inputMs=localInput.valueOf(),this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf())):!1}function isSameOrAfter(input2,units){return this.isSame(input2,units)||this.isAfter(input2,units)}function isSameOrBefore(input2,units){return this.isSame(input2,units)||this.isBefore(input2,units)}function diff(input2,units,asFloat){var that,zoneDelta,output3;if(!this.isValid())return NaN;if(that=cloneWithOffset(input2,this),!that.isValid())return NaN;switch(zoneDelta=(that.utcOffset()-this.utcOffset())*6e4,units=normalizeUnits(units),units){case"year":output3=monthDiff(this,that)/12;break;case"month":output3=monthDiff(this,that);break;case"quarter":output3=monthDiff(this,that)/3;break;case"second":output3=(this-that)/1e3;break;case"minute":output3=(this-that)/6e4;break;case"hour":output3=(this-that)/36e5;break;case"day":output3=(this-that-zoneDelta)/864e5;break;case"week":output3=(this-that-zoneDelta)/6048e5;break;default:output3=this-that}return asFloat?output3:absFloor(output3)}function monthDiff(a,b){if(a.date()<b.date())return-monthDiff(b,a);var wholeMonthDiff=(b.year()-a.year())*12+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,"months"),anchor2,adjust;return b-anchor<0?(anchor2=a.clone().add(wholeMonthDiff-1,"months"),adjust=(b-anchor)/(anchor-anchor2)):(anchor2=a.clone().add(wholeMonthDiff+1,"months"),adjust=(b-anchor)/(anchor2-anchor)),-(wholeMonthDiff+adjust)||0}hooks2.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks2.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString2(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(keepOffset){if(!this.isValid())return null;var utc=keepOffset!==!0,m=utc?this.clone().utc():this;return m.year()<0||m.year()>9999?formatMoment(m,utc?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction2(Date.prototype.toISOString)?utc?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(m,"Z")):formatMoment(m,utc?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var func="moment",zone="",prefix,year,datetime,suffix;return this.isLocal()||(func=this.utcOffset()===0?"moment.utc":"moment.parseZone",zone="Z"),prefix="["+func+'("]',year=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",datetime="-MM-DD[T]HH:mm:ss.SSS",suffix=zone+'[")]',this.format(prefix+year+datetime+suffix)}function format8(inputString){inputString||(inputString=this.isUtc()?hooks2.defaultFormatUtc:hooks2.defaultFormat);var output3=formatMoment(this,inputString);return this.localeData().postformat(output3)}function from(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix)}function to(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix)}function locale(key){var newLocaleData;return key===void 0?this._locale._abbr:(newLocaleData=getLocale(key),newLocaleData!=null&&(this._locale=newLocaleData),this)}var lang4=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(key){return key===void 0?this.localeData():this.locale(key)});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(dividend,divisor){return(dividend%divisor+divisor)%divisor}function localStartOfDate(y,m,d){return y<100&&y>=0?new Date(y+400,m,d)-MS_PER_400_YEARS:new Date(y,m,d).valueOf()}function utcStartOfDate(y,m,d){return y<100&&y>=0?Date.UTC(y+400,m,d)-MS_PER_400_YEARS:Date.UTC(y,m,d)}function startOf(units){var time,startOfDate;if(units=normalizeUnits(units),units===void 0||units==="millisecond"||!this.isValid())return this;switch(startOfDate=this._isUTC?utcStartOfDate:localStartOfDate,units){case"year":time=startOfDate(this.year(),0,1);break;case"quarter":time=startOfDate(this.year(),this.month()-this.month()%3,1);break;case"month":time=startOfDate(this.year(),this.month(),1);break;case"week":time=startOfDate(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":time=startOfDate(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":time=startOfDate(this.year(),this.month(),this.date());break;case"hour":time=this._d.valueOf(),time-=mod$1(time+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":time=this._d.valueOf(),time-=mod$1(time,MS_PER_MINUTE);break;case"second":time=this._d.valueOf(),time-=mod$1(time,MS_PER_SECOND);break}return this._d.setTime(time),hooks2.updateOffset(this,!0),this}function endOf(units){var time,startOfDate;if(units=normalizeUnits(units),units===void 0||units==="millisecond"||!this.isValid())return this;switch(startOfDate=this._isUTC?utcStartOfDate:localStartOfDate,units){case"year":time=startOfDate(this.year()+1,0,1)-1;break;case"quarter":time=startOfDate(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":time=startOfDate(this.year(),this.month()+1,1)-1;break;case"week":time=startOfDate(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":time=startOfDate(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":time=startOfDate(this.year(),this.month(),this.date()+1)-1;break;case"hour":time=this._d.valueOf(),time+=MS_PER_HOUR-mod$1(time+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":time=this._d.valueOf(),time+=MS_PER_MINUTE-mod$1(time,MS_PER_MINUTE)-1;break;case"second":time=this._d.valueOf(),time+=MS_PER_SECOND-mod$1(time,MS_PER_SECOND)-1;break}return this._d.setTime(time),hooks2.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(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid2(this)}function parsingFlags(){return extend2({},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(input2,array,config,token2){var era=config._locale.erasParse(input2,token2,config._strict);era?getParsingFlags(config).era=era:getParsingFlags(config).invalidEra=input2}),addRegexToken("y",matchUnsigned),addRegexToken("yy",matchUnsigned),addRegexToken("yyy",matchUnsigned),addRegexToken("yyyy",matchUnsigned),addRegexToken("yo",matchEraYearOrdinal),addParseToken(["y","yy","yyy","yyyy"],YEAR),addParseToken(["yo"],function(input2,array,config,token2){var match;config._locale._eraYearOrdinalRegex&&(match=input2.match(config._locale._eraYearOrdinalRegex)),config._locale.eraYearOrdinalParse?array[YEAR]=config._locale.eraYearOrdinalParse(input2,match):array[YEAR]=parseInt(input2,10)});function localeEras(m,format9){var i,l,date,eras=this._eras||getLocale("en")._eras;for(i=0,l=eras.length;i<l;++i){switch(typeof eras[i].since){case"string":date=hooks2(eras[i].since).startOf("day"),eras[i].since=date.valueOf();break}switch(typeof eras[i].until){case"undefined":eras[i].until=1/0;break;case"string":date=hooks2(eras[i].until).startOf("day").valueOf(),eras[i].until=date.valueOf();break}}return eras}function localeErasParse(eraName,format9,strict){var i,l,eras=this.eras(),name,abbr,narrow;for(eraName=eraName.toUpperCase(),i=0,l=eras.length;i<l;++i)if(name=eras[i].name.toUpperCase(),abbr=eras[i].abbr.toUpperCase(),narrow=eras[i].narrow.toUpperCase(),strict)switch(format9){case"N":case"NN":case"NNN":if(abbr===eraName)return eras[i];break;case"NNNN":if(name===eraName)return eras[i];break;case"NNNNN":if(narrow===eraName)return eras[i];break}else if([name,abbr,narrow].indexOf(eraName)>=0)return eras[i]}function localeErasConvertYear(era,year){var dir=era.since<=era.until?1:-1;return year===void 0?hooks2(era.since).year():hooks2(era.since).year()+(year-era.offset)*dir}function getEraName(){var i,l,val,eras=this.localeData().eras();for(i=0,l=eras.length;i<l;++i)if(val=this.clone().startOf("day").valueOf(),eras[i].since<=val&&val<=eras[i].until||eras[i].until<=val&&val<=eras[i].since)return eras[i].name;return""}function getEraNarrow(){var i,l,val,eras=this.localeData().eras();for(i=0,l=eras.length;i<l;++i)if(val=this.clone().startOf("day").valueOf(),eras[i].since<=val&&val<=eras[i].until||eras[i].until<=val&&val<=eras[i].since)return eras[i].narrow;return""}function getEraAbbr(){var i,l,val,eras=this.localeData().eras();for(i=0,l=eras.length;i<l;++i)if(val=this.clone().startOf("day").valueOf(),eras[i].since<=val&&val<=eras[i].until||eras[i].until<=val&&val<=eras[i].since)return eras[i].abbr;return""}function getEraYear(){var i,l,dir,val,eras=this.localeData().eras();for(i=0,l=eras.length;i<l;++i)if(dir=eras[i].since<=eras[i].until?1:-1,val=this.clone().startOf("day").valueOf(),eras[i].since<=val&&val<=eras[i].until||eras[i].until<=val&&val<=eras[i].since)return(this.year()-hooks2(eras[i].since).year())*dir+eras[i].offset;return this.year()}function erasNameRegex(isStrict){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),isStrict?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(isStrict){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),isStrict?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(isStrict){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),isStrict?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(isStrict,locale2){return locale2.erasAbbrRegex(isStrict)}function matchEraName(isStrict,locale2){return locale2.erasNameRegex(isStrict)}function matchEraNarrow(isStrict,locale2){return locale2.erasNarrowRegex(isStrict)}function matchEraYearOrdinal(isStrict,locale2){return locale2._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var abbrPieces=[],namePieces=[],narrowPieces=[],mixedPieces=[],i,l,erasName,erasAbbr,erasNarrow,eras=this.eras();for(i=0,l=eras.length;i<l;++i)erasName=regexEscape(eras[i].name),erasAbbr=regexEscape(eras[i].abbr),erasNarrow=regexEscape(eras[i].narrow),namePieces.push(erasName),abbrPieces.push(erasAbbr),narrowPieces.push(erasNarrow),mixedPieces.push(erasName),mixedPieces.push(erasAbbr),mixedPieces.push(erasNarrow);this._erasRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+namePieces.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+abbrPieces.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+narrowPieces.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(token2,getter){addFormatToken(0,[token2,token2.length],0,getter)}addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),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(input2,week,config,token2){week[token2.substr(0,2)]=toInt(input2)}),addWeekParseToken(["gg","GG"],function(input2,week,config,token2){week[token2]=hooks2.parseTwoDigitYear(input2)});function getSetWeekYear(input2){return getSetWeekYearHelper.call(this,input2,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(input2){return getSetWeekYearHelper.call(this,input2,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 weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getWeeksInWeekYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.weekYear(),weekInfo.dow,weekInfo.doy)}function getSetWeekYearHelper(input2,week,weekday,dow,doy){var weeksTarget;return input2==null?weekOfYear(this,dow,doy).year:(weeksTarget=weeksInYear(input2,dow,doy),week>weeksTarget&&(week=weeksTarget),setWeekAll.call(this,input2,week,weekday,dow,doy))}function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);return this.year(date.getUTCFullYear()),this.month(date.getUTCMonth()),this.date(date.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter"),addRegexToken("Q",match1),addParseToken("Q",function(input2,array){array[MONTH]=(toInt(input2)-1)*3});function getSetQuarter(input2){return input2==null?Math.ceil((this.month()+1)/3):this.month((input2-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date"),addRegexToken("D",match1to2,match1to2NoLeadingZero),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(isStrict,locale2){return isStrict?locale2._dayOfMonthOrdinalParse||locale2._ordinalParse:locale2._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(input2,array){array[DATE]=toInt(input2.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(input2,array,config){config._dayOfYear=toInt(input2)});function getSetDayOfYear(input2){var dayOfYear=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return input2==null?dayOfYear:this.add(input2-dayOfYear,"d")}addFormatToken("m",["mm",2],0,"minute"),addRegexToken("m",match1to2,match1to2HasZero),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addRegexToken("s",match1to2,match1to2HasZero),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}),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(input2,array){array[MILLISECOND]=toInt(("0."+input2)*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=add4,proto.calendar=calendar$1,proto.clone=clone,proto.diff=diff,proto.endOf=endOf,proto.format=format8,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=lang4,proto.locale=locale,proto.localeData=localeData,proto.max=prototypeMax,proto.min=prototypeMin,proto.parsingFlags=parsingFlags,proto.set=stringSet,proto.startOf=startOf,proto.subtract=subtract,proto.toArray=toArray,proto.toObject=toObject,proto.toDate=toDate,proto.toISOString=toISOString,proto.inspect=inspect5,typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),proto.toJSON=toJSON,proto.toString=toString2,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(input2){return createLocal(input2*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(string){return string}var proto$1=Locale2.prototype;proto$1.calendar=calendar,proto$1.longDateFormat=longDateFormat,proto$1.invalidDate=invalidDate,proto$1.ordinal=ordinal,proto$1.preparse=preParsePostFormat,proto$1.postformat=preParsePostFormat,proto$1.relativeTime=relativeTime,proto$1.pastFuture=pastFuture,proto$1.set=set2,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(format9,index,field,setter){var locale2=getLocale(),utc=createUTC().set(setter,index);return locale2[field](utc,format9)}function listMonthsImpl(format9,index,field){if(isNumber(format9)&&(index=format9,format9=void 0),format9=format9||"",index!=null)return get$1(format9,index,field,"month");var i,out=[];for(i=0;i<12;i++)out[i]=get$1(format9,i,field,"month");return out}function listWeekdaysImpl(localeSorted,format9,index,field){typeof localeSorted=="boolean"?(isNumber(format9)&&(index=format9,format9=void 0),format9=format9||""):(format9=localeSorted,index=format9,localeSorted=!1,isNumber(format9)&&(index=format9,format9=void 0),format9=format9||"");var locale2=getLocale(),shift=localeSorted?locale2._week.dow:0,i,out=[];if(index!=null)return get$1(format9,(index+shift)%7,field,"day");for(i=0;i<7;i++)out[i]=get$1(format9,(i+shift)%7,field,"day");return out}function listMonths(format9,index){return listMonthsImpl(format9,index,"months")}function listMonthsShort(format9,index){return listMonthsImpl(format9,index,"monthsShort")}function listWeekdays(localeSorted,format9,index){return listWeekdaysImpl(localeSorted,format9,index,"weekdays")}function listWeekdaysShort(localeSorted,format9,index){return listWeekdaysImpl(localeSorted,format9,index,"weekdaysShort")}function listWeekdaysMin(localeSorted,format9,index){return listWeekdaysImpl(localeSorted,format9,index,"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(number2){var b=number2%10,output3=toInt(number2%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th";return number2+output3}}),hooks2.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks2.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var data=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),data.milliseconds=mathAbs(data.milliseconds),data.seconds=mathAbs(data.seconds),data.minutes=mathAbs(data.minutes),data.hours=mathAbs(data.hours),data.months=mathAbs(data.months),data.years=mathAbs(data.years),this}function addSubtract$1(duration,input2,value,direction){var other=createDuration(input2,value);return duration._milliseconds+=direction*other._milliseconds,duration._days+=direction*other._days,duration._months+=direction*other._months,duration._bubble()}function add$1(input2,value){return addSubtract$1(this,input2,value,1)}function subtract$1(input2,value){return addSubtract$1(this,input2,value,-1)}function absCeil(number2){return number2<0?Math.floor(number2):Math.ceil(number2)}function bubble(){var milliseconds2=this._milliseconds,days2=this._days,months2=this._months,data=this._data,seconds2,minutes2,hours2,years2,monthsFromDays;return milliseconds2>=0&&days2>=0&&months2>=0||milliseconds2<=0&&days2<=0&&months2<=0||(milliseconds2+=absCeil(monthsToDays(months2)+days2)*864e5,days2=0,months2=0),data.milliseconds=milliseconds2%1e3,seconds2=absFloor(milliseconds2/1e3),data.seconds=seconds2%60,minutes2=absFloor(seconds2/60),data.minutes=minutes2%60,hours2=absFloor(minutes2/60),data.hours=hours2%24,days2+=absFloor(hours2/24),monthsFromDays=absFloor(daysToMonths(days2)),months2+=monthsFromDays,days2-=absCeil(monthsToDays(monthsFromDays)),years2=absFloor(months2/12),months2%=12,data.days=days2,data.months=months2,data.years=years2,this}function daysToMonths(days2){return days2*4800/146097}function monthsToDays(months2){return months2*146097/4800}function as(units){if(!this.isValid())return NaN;var days2,months2,milliseconds2=this._milliseconds;if(units=normalizeUnits(units),units==="month"||units==="quarter"||units==="year")switch(days2=this._days+milliseconds2/864e5,months2=this._months+daysToMonths(days2),units){case"month":return months2;case"quarter":return months2/3;case"year":return months2/12}else switch(days2=this._days+Math.round(monthsToDays(this._months)),units){case"week":return days2/7+milliseconds2/6048e5;case"day":return days2+milliseconds2/864e5;case"hour":return days2*24+milliseconds2/36e5;case"minute":return days2*1440+milliseconds2/6e4;case"second":return days2*86400+milliseconds2/1e3;case"millisecond":return Math.floor(days2*864e5)+milliseconds2;default:throw new Error("Unknown unit "+units)}}function makeAs(alias){return function(){return this.as(alias)}}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"),valueOf$1=asMilliseconds;function clone$1(){return createDuration(this)}function get$2(units){return units=normalizeUnits(units),this.isValid()?this[units+"s"]():NaN}function makeGetter(name){return function(){return this.isValid()?this._data[name]: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 round2=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(string,number2,withoutSuffix,isFuture,locale2){return locale2.relativeTime(number2||1,!!withoutSuffix,string,isFuture)}function relativeTime$1(posNegDuration,withoutSuffix,thresholds2,locale2){var duration=createDuration(posNegDuration).abs(),seconds2=round2(duration.as("s")),minutes2=round2(duration.as("m")),hours2=round2(duration.as("h")),days2=round2(duration.as("d")),months2=round2(duration.as("M")),weeks2=round2(duration.as("w")),years2=round2(duration.as("y")),a=seconds2<=thresholds2.ss&&["s",seconds2]||seconds2<thresholds2.s&&["ss",seconds2]||minutes2<=1&&["m"]||minutes2<thresholds2.m&&["mm",minutes2]||hours2<=1&&["h"]||hours2<thresholds2.h&&["hh",hours2]||days2<=1&&["d"]||days2<thresholds2.d&&["dd",days2];return thresholds2.w!=null&&(a=a||weeks2<=1&&["w"]||weeks2<thresholds2.w&&["ww",weeks2]),a=a||months2<=1&&["M"]||months2<thresholds2.M&&["MM",months2]||years2<=1&&["y"]||["yy",years2],a[2]=withoutSuffix,a[3]=+posNegDuration>0,a[4]=locale2,substituteTimeAgo.apply(null,a)}function getSetRelativeTimeRounding(roundingFunction){return roundingFunction===void 0?round2:typeof roundingFunction=="function"?(round2=roundingFunction,!0):!1}function getSetRelativeTimeThreshold(threshold,limit2){return thresholds[threshold]===void 0?!1:limit2===void 0?thresholds[threshold]:(thresholds[threshold]=limit2,threshold==="s"&&(thresholds.ss=limit2-1),!0)}function humanize(argWithSuffix,argThresholds){if(!this.isValid())return this.localeData().invalidDate();var withSuffix=!1,th=thresholds,locale2,output3;return typeof argWithSuffix=="object"&&(argThresholds=argWithSuffix,argWithSuffix=!1),typeof argWithSuffix=="boolean"&&(withSuffix=argWithSuffix),typeof argThresholds=="object"&&(th=Object.assign({},thresholds,argThresholds),argThresholds.s!=null&&argThresholds.ss==null&&(th.ss=argThresholds.s-1)),locale2=this.localeData(),output3=relativeTime$1(this,!withSuffix,th,locale2),withSuffix&&(output3=locale2.pastFuture(+this,output3)),locale2.postformat(output3)}var abs$1=Math.abs;function sign(x){return(x>0)-(x<0)||+x}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var seconds2=abs$1(this._milliseconds)/1e3,days2=abs$1(this._days),months2=abs$1(this._months),minutes2,hours2,years2,s,total=this.asSeconds(),totalSign,ymSign,daysSign,hmsSign;return total?(minutes2=absFloor(seconds2/60),hours2=absFloor(minutes2/60),seconds2%=60,minutes2%=60,years2=absFloor(months2/12),months2%=12,s=seconds2?seconds2.toFixed(3).replace(/\.?0+$/,""):"",totalSign=total<0?"-":"",ymSign=sign(this._months)!==sign(total)?"-":"",daysSign=sign(this._days)!==sign(total)?"-":"",hmsSign=sign(this._milliseconds)!==sign(total)?"-":"",totalSign+"P"+(years2?ymSign+years2+"Y":"")+(months2?ymSign+months2+"M":"")+(days2?daysSign+days2+"D":"")+(hours2||minutes2||seconds2?"T":"")+(hours2?hmsSign+hours2+"H":"")+(minutes2?hmsSign+minutes2+"M":"")+(seconds2?hmsSign+s+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1,proto$2.abs=abs,proto$2.add=add$1,proto$2.subtract=subtract$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,proto$2.get=get$2,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,proto$2.localeData=localeData,proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),proto$2.lang=lang4,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",matchSigned),addRegexToken("X",matchTimestamp),addParseToken("X",function(input2,array,config){config._d=new Date(parseFloat(input2)*1e3)}),addParseToken("x",function(input2,array,config){config._d=new Date(toInt(input2))});return hooks2.version="2.30.1",setHookCallback(createLocal),hooks2.fn=proto,hooks2.min=min,hooks2.max=max,hooks2.now=now2,hooks2.utc=createUTC,hooks2.unix=createUnix,hooks2.months=listMonths,hooks2.isDate=isDate,hooks2.locale=getSetGlobalLocale,hooks2.invalid=createInvalid,hooks2.duration=createDuration,hooks2.isMoment=isMoment,hooks2.weekdays=listWeekdays,hooks2.parseZone=createInZone,hooks2.localeData=getLocale,hooks2.isDuration=isDuration,hooks2.monthsShort=listMonthsShort,hooks2.weekdaysMin=listWeekdaysMin,hooks2.defineLocale=defineLocale,hooks2.updateLocale=updateLocale,hooks2.locales=listLocales,hooks2.weekdaysShort=listWeekdaysShort,hooks2.normalizeUnits=normalizeUnits,hooks2.relativeTimeRounding=getSetRelativeTimeRounding,hooks2.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks2.calendarFormat=getCalendarFormat,hooks2.prototype=proto,hooks2.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"},hooks2})}});var require_safe_get_built_in=__commonJS({"node_modules/core-js/internals/safe-get-built-in.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),DESCRIPTORS=require_descriptors(),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;module2.exports=function(name){if(!DESCRIPTORS)return global[name];var descriptor=getOwnPropertyDescriptor(global,name);return descriptor&&descriptor.value}}});var require_url_constructor_detection=__commonJS({"node_modules/core-js/internals/url-constructor-detection.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var fails=require_fails(),wellKnownSymbol=require_well_known_symbol(),DESCRIPTORS=require_descriptors(),IS_PURE=require_is_pure(),ITERATOR=wellKnownSymbol("iterator");module2.exports=!fails(function(){var url9=new URL("b?a=1&b=2&c=3","http://a"),params=url9.searchParams,params2=new URLSearchParams("a=1&a=2&b=3"),result="";return url9.pathname="c%20d",params.forEach(function(value,key){params.delete("b"),result+=key+value}),params2.delete("a",2),params2.delete("b",void 0),IS_PURE&&(!url9.toJSON||!params2.has("a",1)||params2.has("a",2)||!params2.has("a",void 0)||params2.has("b"))||!params.size&&(IS_PURE||!DESCRIPTORS)||!params.sort||url9.href!=="http://a/c%20d?a=1&c=3"||params.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!params[ITERATOR]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||result!=="a1c3"||new URL("http://x",void 0).host!=="x"})}});var require_define_built_in_accessor=__commonJS({"node_modules/core-js/internals/define-built-in-accessor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var makeBuiltIn=require_make_built_in(),defineProperty2=require_object_define_property();module2.exports=function(target,name,descriptor){return descriptor.get&&makeBuiltIn(descriptor.get,name,{getter:!0}),descriptor.set&&makeBuiltIn(descriptor.set,name,{setter:!0}),defineProperty2.f(target,name,descriptor)}}});var require_define_built_ins=__commonJS({"node_modules/core-js/internals/define-built-ins.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var defineBuiltIn=require_define_built_in();module2.exports=function(target,src,options){for(var key in src)defineBuiltIn(target,key,src[key],options);return target}}});var require_an_instance=__commonJS({"node_modules/core-js/internals/an-instance.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isPrototypeOf=require_object_is_prototype_of(),$TypeError=TypeError;module2.exports=function(it,Prototype){if(isPrototypeOf(Prototype,it))return it;throw new $TypeError("Incorrect invocation")}}});var require_get_iterator_method=__commonJS({"node_modules/core-js/internals/get-iterator-method.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var classof=require_classof(),getMethod=require_get_method(),isNullOrUndefined=require_is_null_or_undefined(),Iterators=require_iterators(),wellKnownSymbol=require_well_known_symbol(),ITERATOR=wellKnownSymbol("iterator");module2.exports=function(it){if(!isNullOrUndefined(it))return getMethod(it,ITERATOR)||getMethod(it,"@@iterator")||Iterators[classof(it)]}}});var require_get_iterator=__commonJS({"node_modules/core-js/internals/get-iterator.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),aCallable=require_a_callable(),anObject=require_an_object(),tryToString=require_try_to_string(),getIteratorMethod=require_get_iterator_method(),$TypeError=TypeError;module2.exports=function(argument,usingIterator){var iteratorMethod=arguments.length<2?getIteratorMethod(argument):usingIterator;if(aCallable(iteratorMethod))return anObject(call(iteratorMethod,argument));throw new $TypeError(tryToString(argument)+" is not iterable")}}});var require_array_sort=__commonJS({"node_modules/core-js/internals/array-sort.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var arraySlice=require_array_slice(),floor=Math.floor,sort=function(array,comparefn){var length=array.length;if(length<8)for(var i=1,element,j2;i<length;){for(j2=i,element=array[i];j2&&comparefn(array[j2-1],element)>0;)array[j2]=array[--j2];j2!==i++&&(array[j2]=element)}else for(var middle=floor(length/2),left2=sort(arraySlice(array,0,middle),comparefn),right2=sort(arraySlice(array,middle),comparefn),llength=left2.length,rlength=right2.length,lindex=0,rindex=0;lindex<llength||rindex<rlength;)array[lindex+rindex]=lindex<llength&&rindex<rlength?comparefn(left2[lindex],right2[rindex])<=0?left2[lindex++]:right2[rindex++]:lindex<llength?left2[lindex++]:right2[rindex++];return array};module2.exports=sort}});var require_web_url_search_params_constructor=__commonJS({"node_modules/core-js/modules/web.url-search-params.constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();require_es_array_iterator();var $2=require_export(),global=require_global(),safeGetBuiltIn=require_safe_get_built_in(),call=require_function_call(),uncurryThis=require_function_uncurry_this(),DESCRIPTORS=require_descriptors(),USE_NATIVE_URL=require_url_constructor_detection(),defineBuiltIn=require_define_built_in(),defineBuiltInAccessor=require_define_built_in_accessor(),defineBuiltIns=require_define_built_ins(),setToStringTag=require_set_to_string_tag(),createIteratorConstructor=require_iterator_create_constructor(),InternalStateModule=require_internal_state(),anInstance=require_an_instance(),isCallable=require_is_callable(),hasOwn=require_has_own_property(),bind=require_function_bind_context(),classof=require_classof(),anObject=require_an_object(),isObject3=require_is_object(),$toString=require_to_string(),create3=require_object_create(),createPropertyDescriptor=require_create_property_descriptor(),getIterator=require_get_iterator(),getIteratorMethod=require_get_iterator_method(),createIterResultObject=require_create_iter_result_object(),validateArgumentsLength=require_validate_arguments_length(),wellKnownSymbol=require_well_known_symbol(),arraySort=require_array_sort(),ITERATOR=wellKnownSymbol("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState=InternalStateModule.set,getInternalParamsState=InternalStateModule.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR),nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers2=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers2&&Headers2.prototype,RegExp2=global.RegExp,TypeError2=global.TypeError,decodeURIComponent2=global.decodeURIComponent,encodeURIComponent2=global.encodeURIComponent,charAt=uncurryThis("".charAt),join=uncurryThis([].join),push=uncurryThis([].push),replace=uncurryThis("".replace),shift=uncurryThis([].shift),splice2=uncurryThis([].splice),split=uncurryThis("".split),stringSlice=uncurryThis("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(bytes3){return sequences[bytes3-1]||(sequences[bytes3-1]=RegExp2("((?:%[\\da-f]{2}){"+bytes3+"})","gi"))},percentDecode=function(sequence){try{return decodeURIComponent2(sequence)}catch{return sequence}},deserialize2=function(it){var result=replace(it,plus," "),bytes3=4;try{return decodeURIComponent2(result)}catch{for(;bytes3;)result=replace(result,percentSequence(bytes3--),percentDecode);return result}},find=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(match){return replacements[match]},serialize=function(it){return replace(encodeURIComponent2(it),find,replacer)},URLSearchParamsIterator=createIteratorConstructor(function(params,kind){setInternalState(this,{type:URL_SEARCH_PARAMS_ITERATOR,target:getInternalParamsState(params).entries,index:0,kind})},URL_SEARCH_PARAMS,function(){var state4=getInternalIteratorState(this),target=state4.target,index=state4.index++;if(!target||index>=target.length)return state4.target=void 0,createIterResultObject(void 0,!0);var entry=target[index];switch(state4.kind){case"keys":return createIterResultObject(entry.key,!1);case"values":return createIterResultObject(entry.value,!1)}return createIterResultObject([entry.key,entry.value],!1)},!0),URLSearchParamsState=function(init5){this.entries=[],this.url=null,init5!==void 0&&(isObject3(init5)?this.parseObject(init5):this.parseQuery(typeof init5=="string"?charAt(init5,0)==="?"?stringSlice(init5,1):init5:$toString(init5)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(url9){this.url=url9,this.update()},parseObject:function(object2){var entries=this.entries,iteratorMethod=getIteratorMethod(object2),iterator,next,step,entryIterator,entryNext,first,second;if(iteratorMethod)for(iterator=getIterator(object2,iteratorMethod),next=iterator.next;!(step=call(next,iterator)).done;){if(entryIterator=getIterator(anObject(step.value)),entryNext=entryIterator.next,(first=call(entryNext,entryIterator)).done||(second=call(entryNext,entryIterator)).done||!call(entryNext,entryIterator).done)throw new TypeError2("Expected sequence with length 2");push(entries,{key:$toString(first.value),value:$toString(second.value)})}else for(var key in object2)hasOwn(object2,key)&&push(entries,{key,value:$toString(object2[key])})},parseQuery:function(query){if(query)for(var entries=this.entries,attributes=split(query,"&"),index=0,attribute,entry;index<attributes.length;)attribute=attributes[index++],attribute.length&&(entry=split(attribute,"="),push(entries,{key:deserialize2(shift(entry)),value:deserialize2(join(entry,"="))}))},serialize:function(){for(var entries=this.entries,result=[],index=0,entry;index<entries.length;)entry=entries[index++],push(result,serialize(entry.key)+"="+serialize(entry.value));return join(result,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance(this,URLSearchParamsPrototype);var init5=arguments.length>0?arguments[0]:void 0,state4=setInternalState(this,new URLSearchParamsState(init5));DESCRIPTORS||(this.size=state4.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;defineBuiltIns(URLSearchParamsPrototype,{append:function(name,value){var state4=getInternalParamsState(this);validateArgumentsLength(arguments.length,2),push(state4.entries,{key:$toString(name),value:$toString(value)}),DESCRIPTORS||this.length++,state4.updateURL()},delete:function(name){for(var state4=getInternalParamsState(this),length=validateArgumentsLength(arguments.length,1),entries=state4.entries,key=$toString(name),$value=length<2?void 0:arguments[1],value=$value===void 0?$value:$toString($value),index=0;index<entries.length;){var entry=entries[index];if(entry.key===key&&(value===void 0||entry.value===value)){if(splice2(entries,index,1),value!==void 0)break}else index++}DESCRIPTORS||(this.size=entries.length),state4.updateURL()},get:function(name){var entries=getInternalParamsState(this).entries;validateArgumentsLength(arguments.length,1);for(var key=$toString(name),index=0;index<entries.length;index++)if(entries[index].key===key)return entries[index].value;return null},getAll:function(name){var entries=getInternalParamsState(this).entries;validateArgumentsLength(arguments.length,1);for(var key=$toString(name),result=[],index=0;index<entries.length;index++)entries[index].key===key&&push(result,entries[index].value);return result},has:function(name){for(var entries=getInternalParamsState(this).entries,length=validateArgumentsLength(arguments.length,1),key=$toString(name),$value=length<2?void 0:arguments[1],value=$value===void 0?$value:$toString($value),index=0;index<entries.length;){var entry=entries[index++];if(entry.key===key&&(value===void 0||entry.value===value))return!0}return!1},set:function(name,value){var state4=getInternalParamsState(this);validateArgumentsLength(arguments.length,1);for(var entries=state4.entries,found=!1,key=$toString(name),val=$toString(value),index=0,entry;index<entries.length;index++)entry=entries[index],entry.key===key&&(found?splice2(entries,index--,1):(found=!0,entry.value=val));found||push(entries,{key,value:val}),DESCRIPTORS||(this.size=entries.length),state4.updateURL()},sort:function(){var state4=getInternalParamsState(this);arraySort(state4.entries,function(a,b){return a.key>b.key?1:-1}),state4.updateURL()},forEach:function(callback){for(var entries=getInternalParamsState(this).entries,boundFunction=bind(callback,arguments.length>1?arguments[1]:void 0),index=0,entry;index<entries.length;)entry=entries[index++],boundFunction(entry.value,entry.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0});defineBuiltIn(URLSearchParamsPrototype,ITERATOR,URLSearchParamsPrototype.entries,{name:"entries"});defineBuiltIn(URLSearchParamsPrototype,"toString",function(){return getInternalParamsState(this).serialize()},{enumerable:!0});DESCRIPTORS&&defineBuiltInAccessor(URLSearchParamsPrototype,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0});setToStringTag(URLSearchParamsConstructor,URL_SEARCH_PARAMS);$2({global:!0,constructor:!0,forced:!USE_NATIVE_URL},{URLSearchParams:URLSearchParamsConstructor});!USE_NATIVE_URL&&isCallable(Headers2)&&(headersHas=uncurryThis(HeadersPrototype.has),headersSet=uncurryThis(HeadersPrototype.set),wrapRequestOptions=function(init5){if(isObject3(init5)){var body=init5.body,headers;if(classof(body)===URL_SEARCH_PARAMS)return headers=init5.headers?new Headers2(init5.headers):new Headers2,headersHas(headers,"content-type")||headersSet(headers,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create3(init5,{body:createPropertyDescriptor(0,$toString(body)),headers:createPropertyDescriptor(0,headers)})}return init5},isCallable(nativeFetch)&&$2({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(input2){return nativeFetch(input2,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)&&(RequestConstructor=function(input2){return anInstance(this,RequestPrototype),new NativeRequest(input2,arguments.length>1?wrapRequestOptions(arguments[1]):{})},RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$2({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})));var headersHas,headersSet,wrapRequestOptions,RequestConstructor;module2.exports={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState}}});var require_web_url_search_params=__commonJS({"node_modules/core-js/modules/web.url-search-params.js"(){"use strict";init_define_process_env();init_shim();require_web_url_search_params_constructor()}});var newautorun_exports={};__export(newautorun_exports,{enable_new_autorun:()=>enable_new_autorun});function determine_new_autorun(){var _window5;if(on_react_native())return!0;if(!((_window5=window)!=null&&_window5.location))return!1;let searchParams2=new URLSearchParams(location.search);if(searchParams2.has("newautorun"))return searchParams2.get("newautorun")==="true";var _window$bubble_new_re;return(_window$bubble_new_re=window.bubble_new_reactivity)!=null?_window$bubble_new_re:!1}var import_web_dom_collections_iterator8,import_web_url_search_params,enable_new_autorun,init_newautorun=__esm({"lib-browser/u/shared/newautorun.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator8=__toESM(require_web_dom_collections_iterator()),import_web_url_search_params=__toESM(require_web_url_search_params());init_mode_check();enable_new_autorun=determine_new_autorun()}});var state,async_state_default,init_async_state=__esm({"lib-browser/u/shared/async/new/async_state.js"(){"use strict";init_define_process_env();init_shim();state={CurrentAutoRun:null,NewSources:null,NewSourcesIndex:0,CurrentNotReadyCatcher:null,server_connection_problems:!1,batch:fn=>fn()},async_state_default=state}});function jitterFloat(base){let factor=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.1,bias=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;factor>1?factor=1:factor<0&&(factor=0);let randomBase;return bias<0?randomBase=Math.random()*-1:bias>0?randomBase=Math.random():randomBase=(Math.random()-.5)*2,base+base*randomBase*factor}function jitter(base,factor,bias){return Math.round(jitterFloat(base,factor,bias))}var init_backoff=__esm({"lib-browser/u/shared/backoff.js"(){"use strict";init_define_process_env();init_shim()}});var require_es_string_iterator=__commonJS({"node_modules/core-js/modules/es.string.iterator.js"(){"use strict";init_define_process_env();init_shim();var charAt=require_string_multibyte().charAt,toString2=require_to_string(),InternalStateModule=require_internal_state(),defineIterator=require_iterator_define(),createIterResultObject=require_create_iter_result_object(),STRING_ITERATOR="String Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(iterated){setInternalState(this,{type:STRING_ITERATOR,string:toString2(iterated),index:0})},function(){var state4=getInternalState(this),string=state4.string,index=state4.index,point;return index>=string.length?createIterResultObject(void 0,!0):(point=charAt(string,index),state4.index+=point.length,createIterResultObject(point,!1))})}});var require_object_assign=__commonJS({"node_modules/core-js/internals/object-assign.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var DESCRIPTORS=require_descriptors(),uncurryThis=require_function_uncurry_this(),call=require_function_call(),fails=require_fails(),objectKeys=require_object_keys(),getOwnPropertySymbolsModule=require_object_get_own_property_symbols(),propertyIsEnumerableModule=require_object_property_is_enumerable(),toObject=require_to_object(),IndexedObject=require_indexed_object(),$assign=Object.assign,defineProperty2=Object.defineProperty,concat=uncurryThis([].concat);module2.exports=!$assign||fails(function(){if(DESCRIPTORS&&$assign({b:1},$assign(defineProperty2({},"a",{enumerable:!0,get:function(){defineProperty2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var A={},B={},symbol=Symbol("assign detection"),alphabet="abcdefghijklmnopqrst";return A[symbol]=7,alphabet.split("").forEach(function(chr){B[chr]=chr}),$assign({},A)[symbol]!==7||objectKeys($assign({},B)).join("")!==alphabet})?function(target,source){for(var T=toObject(target),argumentsLength=arguments.length,index=1,getOwnPropertySymbols=getOwnPropertySymbolsModule.f,propertyIsEnumerable3=propertyIsEnumerableModule.f;argumentsLength>index;)for(var S18=IndexedObject(arguments[index++]),keys2=getOwnPropertySymbols?concat(objectKeys(S18),getOwnPropertySymbols(S18)):objectKeys(S18),length=keys2.length,j2=0,key;length>j2;)key=keys2[j2++],(!DESCRIPTORS||call(propertyIsEnumerable3,S18,key))&&(T[key]=S18[key]);return T}:$assign}});var require_iterator_close=__commonJS({"node_modules/core-js/internals/iterator-close.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),anObject=require_an_object(),getMethod=require_get_method();module2.exports=function(iterator,kind,value){var innerResult,innerError;anObject(iterator);try{if(innerResult=getMethod(iterator,"return"),!innerResult){if(kind==="throw")throw value;return value}innerResult=call(innerResult,iterator)}catch(error2){innerError=!0,innerResult=error2}if(kind==="throw")throw value;if(innerError)throw innerResult;return anObject(innerResult),value}}});var require_call_with_safe_iteration_closing=__commonJS({"node_modules/core-js/internals/call-with-safe-iteration-closing.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var anObject=require_an_object(),iteratorClose=require_iterator_close();module2.exports=function(iterator,fn,value,ENTRIES){try{return ENTRIES?fn(anObject(value)[0],value[1]):fn(value)}catch(error2){iteratorClose(iterator,"throw",error2)}}}});var require_is_array_iterator_method=__commonJS({"node_modules/core-js/internals/is-array-iterator-method.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var wellKnownSymbol=require_well_known_symbol(),Iterators=require_iterators(),ITERATOR=wellKnownSymbol("iterator"),ArrayPrototype=Array.prototype;module2.exports=function(it){return it!==void 0&&(Iterators.Array===it||ArrayPrototype[ITERATOR]===it)}}});var require_is_constructor=__commonJS({"node_modules/core-js/internals/is-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),fails=require_fails(),isCallable=require_is_callable(),classof=require_classof(),getBuiltIn=require_get_built_in(),inspectSource=require_inspect_source(),noop=function(){},construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop),isConstructorModern=function(argument){if(!isCallable(argument))return!1;try{return construct(noop,[],argument),!0}catch{return!1}},isConstructorLegacy=function(argument){if(!isCallable(argument))return!1;switch(classof(argument)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource(argument))}catch{return!0}};isConstructorLegacy.sham=!0;module2.exports=!construct||fails(function(){var called;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){called=!0})||called})?isConstructorLegacy:isConstructorModern}});var require_create_property=__commonJS({"node_modules/core-js/internals/create-property.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toPropertyKey=require_to_property_key(),definePropertyModule=require_object_define_property(),createPropertyDescriptor=require_create_property_descriptor();module2.exports=function(object2,key,value){var propertyKey=toPropertyKey(key);propertyKey in object2?definePropertyModule.f(object2,propertyKey,createPropertyDescriptor(0,value)):object2[propertyKey]=value}}});var require_array_from=__commonJS({"node_modules/core-js/internals/array-from.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var bind=require_function_bind_context(),call=require_function_call(),toObject=require_to_object(),callWithSafeIterationClosing=require_call_with_safe_iteration_closing(),isArrayIteratorMethod=require_is_array_iterator_method(),isConstructor=require_is_constructor(),lengthOfArrayLike=require_length_of_array_like(),createProperty=require_create_property(),getIterator=require_get_iterator(),getIteratorMethod=require_get_iterator_method(),$Array=Array;module2.exports=function(arrayLike){var O=toObject(arrayLike),IS_CONSTRUCTOR=isConstructor(this),argumentsLength=arguments.length,mapfn=argumentsLength>1?arguments[1]:void 0,mapping3=mapfn!==void 0;mapping3&&(mapfn=bind(mapfn,argumentsLength>2?arguments[2]:void 0));var iteratorMethod=getIteratorMethod(O),index=0,length,result,step,iterator,next,value;if(iteratorMethod&&!(this===$Array&&isArrayIteratorMethod(iteratorMethod)))for(iterator=getIterator(O,iteratorMethod),next=iterator.next,result=IS_CONSTRUCTOR?new this:[];!(step=call(next,iterator)).done;index++)value=mapping3?callWithSafeIterationClosing(iterator,mapfn,[step.value,index],!0):step.value,createProperty(result,index,value);else for(length=lengthOfArrayLike(O),result=IS_CONSTRUCTOR?new this(length):$Array(length);length>index;index++)value=mapping3?mapfn(O[index],index):O[index],createProperty(result,index,value);return result.length=index,result}}});var require_string_punycode_to_ascii=__commonJS({"node_modules/core-js/internals/string-punycode-to-ascii.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var uncurryThis=require_function_uncurry_this(),maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec=uncurryThis(regexSeparators.exec),floor=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis("".charCodeAt),join=uncurryThis([].join),push=uncurryThis([].push),replace=uncurryThis("".replace),split=uncurryThis("".split),toLowerCase=uncurryThis("".toLowerCase),ucs2decode=function(string){for(var output3=[],counter=0,length=string.length;counter<length;){var value=charCodeAt(string,counter++);if(value>=55296&&value<=56319&&counter<length){var extra=charCodeAt(string,counter++);(extra&64512)===56320?push(output3,((value&1023)<<10)+(extra&1023)+65536):(push(output3,value),counter--)}else push(output3,value)}return output3},digitToBasic=function(digit){return digit+22+75*(digit<26)},adapt=function(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;)delta=floor(delta/baseMinusTMin),k+=base;return floor(k+(baseMinusTMin+1)*delta/(delta+skew))},encode4=function(input2){var output3=[];input2=ucs2decode(input2);var inputLength=input2.length,n=initialN,delta=0,bias=initialBias,i,currentValue;for(i=0;i<input2.length;i++)currentValue=input2[i],currentValue<128&&push(output3,fromCharCode(currentValue));var basicLength=output3.length,handledCPCount=basicLength;for(basicLength&&push(output3,delimiter);handledCPCount<inputLength;){var m=maxInt;for(i=0;i<input2.length;i++)currentValue=input2[i],currentValue>=n&&currentValue<m&&(m=currentValue);var handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne))throw new $RangeError(OVERFLOW_ERROR);for(delta+=(m-n)*handledCPCountPlusOne,n=m,i=0;i<input2.length;i++){if(currentValue=input2[i],currentValue<n&&++delta>maxInt)throw new $RangeError(OVERFLOW_ERROR);if(currentValue===n){for(var q=delta,k=base;;){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;var qMinusT=q-t,baseMinusT=base-t;push(output3,fromCharCode(digitToBasic(t+qMinusT%baseMinusT))),q=floor(qMinusT/baseMinusT),k+=base}push(output3,fromCharCode(digitToBasic(q))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount===basicLength),delta=0,handledCPCount++}}delta++,n++}return join(output3,"")};module2.exports=function(input2){var encoded=[],labels=split(replace(toLowerCase(input2),regexSeparators,"."),"."),i,label;for(i=0;i<labels.length;i++)label=labels[i],push(encoded,exec(regexNonASCII,label)?"xn--"+encode4(label):label);return join(encoded,".")}}});var require_web_url_constructor=__commonJS({"node_modules/core-js/modules/web.url.constructor.js"(){"use strict";init_define_process_env();init_shim();require_es_string_iterator();var $2=require_export(),DESCRIPTORS=require_descriptors(),USE_NATIVE_URL=require_url_constructor_detection(),global=require_global(),bind=require_function_bind_context(),uncurryThis=require_function_uncurry_this(),defineBuiltIn=require_define_built_in(),defineBuiltInAccessor=require_define_built_in_accessor(),anInstance=require_an_instance(),hasOwn=require_has_own_property(),assign2=require_object_assign(),arrayFrom=require_array_from(),arraySlice=require_array_slice(),codeAt=require_string_multibyte().codeAt,toASCII=require_string_punycode_to_ascii(),$toString=require_to_string(),setToStringTag=require_set_to_string_tag(),validateArgumentsLength=require_validate_arguments_length(),URLSearchParamsModule=require_web_url_search_params_constructor(),InternalStateModule=require_internal_state(),setInternalState=InternalStateModule.set,getInternalURLState=InternalStateModule.getterFor("URL"),URLSearchParams2=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global.URL,TypeError2=global.TypeError,parseInt2=global.parseInt,floor=Math.floor,pow=Math.pow,charAt=uncurryThis("".charAt),exec=uncurryThis(/./.exec),join=uncurryThis([].join),numberToString=uncurryThis(1 .toString),pop=uncurryThis([].pop),push=uncurryThis([].push),replace=uncurryThis("".replace),shift=uncurryThis([].shift),split=uncurryThis("".split),stringSlice=uncurryThis("".slice),toLowerCase=uncurryThis("".toLowerCase),unshift=uncurryThis([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseIPv4=function(input2){var parts=split(input2,"."),partsLength,numbers,index,part,radix,number2,ipv4;if(parts.length&&parts[parts.length-1]===""&&parts.length--,partsLength=parts.length,partsLength>4)return input2;for(numbers=[],index=0;index<partsLength;index++){if(part=parts[index],part==="")return input2;if(radix=10,part.length>1&&charAt(part,0)==="0"&&(radix=exec(HEX_START,part)?16:8,part=stringSlice(part,radix===8?1:2)),part==="")number2=0;else{if(!exec(radix===10?DEC:radix===8?OCT:HEX,part))return input2;number2=parseInt2(part,radix)}push(numbers,number2)}for(index=0;index<partsLength;index++)if(number2=numbers[index],index===partsLength-1){if(number2>=pow(256,5-partsLength))return null}else if(number2>255)return null;for(ipv4=pop(numbers),index=0;index<numbers.length;index++)ipv4+=numbers[index]*pow(256,3-index);return ipv4},parseIPv6=function(input2){var address=[0,0,0,0,0,0,0,0],pieceIndex=0,compress=null,pointer=0,value,length,numbersSeen,ipv4Piece,number2,swaps,swap,chr=function(){return charAt(input2,pointer)};if(chr()===":"){if(charAt(input2,1)!==":")return;pointer+=2,pieceIndex++,compress=pieceIndex}for(;chr();){if(pieceIndex===8)return;if(chr()===":"){if(compress!==null)return;pointer++,pieceIndex++,compress=pieceIndex;continue}for(value=length=0;length<4&&exec(HEX,chr());)value=value*16+parseInt2(chr(),16),pointer++,length++;if(chr()==="."){if(length===0||(pointer-=length,pieceIndex>6))return;for(numbersSeen=0;chr();){if(ipv4Piece=null,numbersSeen>0)if(chr()==="."&&numbersSeen<4)pointer++;else return;if(!exec(DIGIT,chr()))return;for(;exec(DIGIT,chr());){if(number2=parseInt2(chr(),10),ipv4Piece===null)ipv4Piece=number2;else{if(ipv4Piece===0)return;ipv4Piece=ipv4Piece*10+number2}if(ipv4Piece>255)return;pointer++}address[pieceIndex]=address[pieceIndex]*256+ipv4Piece,numbersSeen++,(numbersSeen===2||numbersSeen===4)&&pieceIndex++}if(numbersSeen!==4)return;break}else if(chr()===":"){if(pointer++,!chr())return}else if(chr())return;address[pieceIndex++]=value}if(compress!==null)for(swaps=pieceIndex-compress,pieceIndex=7;pieceIndex!==0&&swaps>0;)swap=address[pieceIndex],address[pieceIndex--]=address[compress+swaps-1],address[compress+--swaps]=swap;else if(pieceIndex!==8)return;return address},findLongestZeroSequence=function(ipv6){for(var maxIndex=null,maxLength=1,currStart=null,currLength=0,index=0;index<8;index++)ipv6[index]!==0?(currLength>maxLength&&(maxIndex=currStart,maxLength=currLength),currStart=null,currLength=0):(currStart===null&&(currStart=index),++currLength);return currLength>maxLength&&(maxIndex=currStart,maxLength=currLength),maxIndex},serializeHost=function(host){var result,index,compress,ignore0;if(typeof host=="number"){for(result=[],index=0;index<4;index++)unshift(result,host%256),host=floor(host/256);return join(result,".")}else if(typeof host=="object"){for(result="",compress=findLongestZeroSequence(host),index=0;index<8;index++)ignore0&&host[index]===0||(ignore0&&(ignore0=!1),compress===index?(result+=index?":":"::",ignore0=!0):(result+=numberToString(host[index],16),index<7&&(result+=":")));return"["+result+"]"}return host},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign2({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(chr,set2){var code=codeAt(chr,0);return code>32&&code<127&&!hasOwn(set2,chr)?chr:encodeURIComponent(chr)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(string,normalized){var second;return string.length===2&&exec(ALPHA,charAt(string,0))&&((second=charAt(string,1))===":"||!normalized&&second==="|")},startsWithWindowsDriveLetter=function(string){var third;return string.length>1&&isWindowsDriveLetter(stringSlice(string,0,2))&&(string.length===2||(third=charAt(string,2))==="/"||third==="\\"||third==="?"||third==="#")},isSingleDot=function(segment){return segment==="."||toLowerCase(segment)==="%2e"},isDoubleDot=function(segment){return segment=toLowerCase(segment),segment===".."||segment==="%2e."||segment===".%2e"||segment==="%2e%2e"},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(url9,isBase,base){var urlString=$toString(url9),baseState,failure,searchParams2;if(isBase){if(failure=this.parse(urlString),failure)throw new TypeError2(failure);this.searchParams=null}else{if(base!==void 0&&(baseState=new URLState(base,!0)),failure=this.parse(urlString,null,baseState),failure)throw new TypeError2(failure);searchParams2=getInternalSearchParamsState(new URLSearchParams2),searchParams2.bindURL(this),this.searchParams=searchParams2}};URLState.prototype={type:"URL",parse:function(input2,stateOverride,base){var url9=this,state4=stateOverride||SCHEME_START,pointer=0,buffer2="",seenAt=!1,seenBracket=!1,seenPasswordToken=!1,codePoints,chr,bufferCodePoints,failure;for(input2=$toString(input2),stateOverride||(url9.scheme="",url9.username="",url9.password="",url9.host=null,url9.port=null,url9.path=[],url9.query=null,url9.fragment=null,url9.cannotBeABaseURL=!1,input2=replace(input2,LEADING_C0_CONTROL_OR_SPACE,""),input2=replace(input2,TRAILING_C0_CONTROL_OR_SPACE,"$1")),input2=replace(input2,TAB_AND_NEW_LINE,""),codePoints=arrayFrom(input2);pointer<=codePoints.length;){switch(chr=codePoints[pointer],state4){case SCHEME_START:if(chr&&exec(ALPHA,chr))buffer2+=toLowerCase(chr),state4=SCHEME;else{if(stateOverride)return INVALID_SCHEME;state4=NO_SCHEME;continue}break;case SCHEME:if(chr&&(exec(ALPHANUMERIC,chr)||chr==="+"||chr==="-"||chr==="."))buffer2+=toLowerCase(chr);else if(chr===":"){if(stateOverride&&(url9.isSpecial()!==hasOwn(specialSchemes,buffer2)||buffer2==="file"&&(url9.includesCredentials()||url9.port!==null)||url9.scheme==="file"&&!url9.host))return;if(url9.scheme=buffer2,stateOverride){url9.isSpecial()&&specialSchemes[url9.scheme]===url9.port&&(url9.port=null);return}buffer2="",url9.scheme==="file"?state4=FILE:url9.isSpecial()&&base&&base.scheme===url9.scheme?state4=SPECIAL_RELATIVE_OR_AUTHORITY:url9.isSpecial()?state4=SPECIAL_AUTHORITY_SLASHES:codePoints[pointer+1]==="/"?(state4=PATH_OR_AUTHORITY,pointer++):(url9.cannotBeABaseURL=!0,push(url9.path,""),state4=CANNOT_BE_A_BASE_URL_PATH)}else{if(stateOverride)return INVALID_SCHEME;buffer2="",state4=NO_SCHEME,pointer=0;continue}break;case NO_SCHEME:if(!base||base.cannotBeABaseURL&&chr!=="#")return INVALID_SCHEME;if(base.cannotBeABaseURL&&chr==="#"){url9.scheme=base.scheme,url9.path=arraySlice(base.path),url9.query=base.query,url9.fragment="",url9.cannotBeABaseURL=!0,state4=FRAGMENT;break}state4=base.scheme==="file"?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if(chr==="/"&&codePoints[pointer+1]==="/")state4=SPECIAL_AUTHORITY_IGNORE_SLASHES,pointer++;else{state4=RELATIVE;continue}break;case PATH_OR_AUTHORITY:if(chr==="/"){state4=AUTHORITY;break}else{state4=PATH;continue}case RELATIVE:if(url9.scheme=base.scheme,chr===EOF)url9.username=base.username,url9.password=base.password,url9.host=base.host,url9.port=base.port,url9.path=arraySlice(base.path),url9.query=base.query;else if(chr==="/"||chr==="\\"&&url9.isSpecial())state4=RELATIVE_SLASH;else if(chr==="?")url9.username=base.username,url9.password=base.password,url9.host=base.host,url9.port=base.port,url9.path=arraySlice(base.path),url9.query="",state4=QUERY;else if(chr==="#")url9.username=base.username,url9.password=base.password,url9.host=base.host,url9.port=base.port,url9.path=arraySlice(base.path),url9.query=base.query,url9.fragment="",state4=FRAGMENT;else{url9.username=base.username,url9.password=base.password,url9.host=base.host,url9.port=base.port,url9.path=arraySlice(base.path),url9.path.length--,state4=PATH;continue}break;case RELATIVE_SLASH:if(url9.isSpecial()&&(chr==="/"||chr==="\\"))state4=SPECIAL_AUTHORITY_IGNORE_SLASHES;else if(chr==="/")state4=AUTHORITY;else{url9.username=base.username,url9.password=base.password,url9.host=base.host,url9.port=base.port,state4=PATH;continue}break;case SPECIAL_AUTHORITY_SLASHES:if(state4=SPECIAL_AUTHORITY_IGNORE_SLASHES,chr!=="/"||charAt(buffer2,pointer+1)!=="/")continue;pointer++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if(chr!=="/"&&chr!=="\\"){state4=AUTHORITY;continue}break;case AUTHORITY:if(chr==="@"){seenAt&&(buffer2="%40"+buffer2),seenAt=!0,bufferCodePoints=arrayFrom(buffer2);for(var i=0;i<bufferCodePoints.length;i++){var codePoint=bufferCodePoints[i];if(codePoint===":"&&!seenPasswordToken){seenPasswordToken=!0;continue}var encodedCodePoints=percentEncode(codePoint,userinfoPercentEncodeSet);seenPasswordToken?url9.password+=encodedCodePoints:url9.username+=encodedCodePoints}buffer2=""}else if(chr===EOF||chr==="/"||chr==="?"||chr==="#"||chr==="\\"&&url9.isSpecial()){if(seenAt&&buffer2==="")return INVALID_AUTHORITY;pointer-=arrayFrom(buffer2).length+1,buffer2="",state4=HOST}else buffer2+=chr;break;case HOST:case HOSTNAME:if(stateOverride&&url9.scheme==="file"){state4=FILE_HOST;continue}else if(chr===":"&&!seenBracket){if(buffer2==="")return INVALID_HOST;if(failure=url9.parseHost(buffer2),failure)return failure;if(buffer2="",state4=PORT,stateOverride===HOSTNAME)return}else if(chr===EOF||chr==="/"||chr==="?"||chr==="#"||chr==="\\"&&url9.isSpecial()){if(url9.isSpecial()&&buffer2==="")return INVALID_HOST;if(stateOverride&&buffer2===""&&(url9.includesCredentials()||url9.port!==null))return;if(failure=url9.parseHost(buffer2),failure)return failure;if(buffer2="",state4=PATH_START,stateOverride)return;continue}else chr==="["?seenBracket=!0:chr==="]"&&(seenBracket=!1),buffer2+=chr;break;case PORT:if(exec(DIGIT,chr))buffer2+=chr;else if(chr===EOF||chr==="/"||chr==="?"||chr==="#"||chr==="\\"&&url9.isSpecial()||stateOverride){if(buffer2!==""){var port=parseInt2(buffer2,10);if(port>65535)return INVALID_PORT;url9.port=url9.isSpecial()&&port===specialSchemes[url9.scheme]?null:port,buffer2=""}if(stateOverride)return;state4=PATH_START;continue}else return INVALID_PORT;break;case FILE:if(url9.scheme="file",chr==="/"||chr==="\\")state4=FILE_SLASH;else if(base&&base.scheme==="file")switch(chr){case EOF:url9.host=base.host,url9.path=arraySlice(base.path),url9.query=base.query;break;case"?":url9.host=base.host,url9.path=arraySlice(base.path),url9.query="",state4=QUERY;break;case"#":url9.host=base.host,url9.path=arraySlice(base.path),url9.query=base.query,url9.fragment="",state4=FRAGMENT;break;default:startsWithWindowsDriveLetter(join(arraySlice(codePoints,pointer),""))||(url9.host=base.host,url9.path=arraySlice(base.path),url9.shortenPath()),state4=PATH;continue}else{state4=PATH;continue}break;case FILE_SLASH:if(chr==="/"||chr==="\\"){state4=FILE_HOST;break}base&&base.scheme==="file"&&!startsWithWindowsDriveLetter(join(arraySlice(codePoints,pointer),""))&&(isWindowsDriveLetter(base.path[0],!0)?push(url9.path,base.path[0]):url9.host=base.host),state4=PATH;continue;case FILE_HOST:if(chr===EOF||chr==="/"||chr==="\\"||chr==="?"||chr==="#"){if(!stateOverride&&isWindowsDriveLetter(buffer2))state4=PATH;else if(buffer2===""){if(url9.host="",stateOverride)return;state4=PATH_START}else{if(failure=url9.parseHost(buffer2),failure)return failure;if(url9.host==="localhost"&&(url9.host=""),stateOverride)return;buffer2="",state4=PATH_START}continue}else buffer2+=chr;break;case PATH_START:if(url9.isSpecial()){if(state4=PATH,chr!=="/"&&chr!=="\\")continue}else if(!stateOverride&&chr==="?")url9.query="",state4=QUERY;else if(!stateOverride&&chr==="#")url9.fragment="",state4=FRAGMENT;else if(chr!==EOF&&(state4=PATH,chr!=="/"))continue;break;case PATH:if(chr===EOF||chr==="/"||chr==="\\"&&url9.isSpecial()||!stateOverride&&(chr==="?"||chr==="#")){if(isDoubleDot(buffer2)?(url9.shortenPath(),chr!=="/"&&!(chr==="\\"&&url9.isSpecial())&&push(url9.path,"")):isSingleDot(buffer2)?chr!=="/"&&!(chr==="\\"&&url9.isSpecial())&&push(url9.path,""):(url9.scheme==="file"&&!url9.path.length&&isWindowsDriveLetter(buffer2)&&(url9.host&&(url9.host=""),buffer2=charAt(buffer2,0)+":"),push(url9.path,buffer2)),buffer2="",url9.scheme==="file"&&(chr===EOF||chr==="?"||chr==="#"))for(;url9.path.length>1&&url9.path[0]==="";)shift(url9.path);chr==="?"?(url9.query="",state4=QUERY):chr==="#"&&(url9.fragment="",state4=FRAGMENT)}else buffer2+=percentEncode(chr,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:chr==="?"?(url9.query="",state4=QUERY):chr==="#"?(url9.fragment="",state4=FRAGMENT):chr!==EOF&&(url9.path[0]+=percentEncode(chr,C0ControlPercentEncodeSet));break;case QUERY:!stateOverride&&chr==="#"?(url9.fragment="",state4=FRAGMENT):chr!==EOF&&(chr==="'"&&url9.isSpecial()?url9.query+="%27":chr==="#"?url9.query+="%23":url9.query+=percentEncode(chr,C0ControlPercentEncodeSet));break;case FRAGMENT:chr!==EOF&&(url9.fragment+=percentEncode(chr,fragmentPercentEncodeSet));break}pointer++}},parseHost:function(input2){var result,codePoints,index;if(charAt(input2,0)==="["){if(charAt(input2,input2.length-1)!=="]"||(result=parseIPv6(stringSlice(input2,1,-1)),!result))return INVALID_HOST;this.host=result}else if(this.isSpecial()){if(input2=toASCII(input2),exec(FORBIDDEN_HOST_CODE_POINT,input2)||(result=parseIPv4(input2),result===null))return INVALID_HOST;this.host=result}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,input2))return INVALID_HOST;for(result="",codePoints=arrayFrom(input2),index=0;index<codePoints.length;index++)result+=percentEncode(codePoints[index],C0ControlPercentEncodeSet);this.host=result}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return hasOwn(specialSchemes,this.scheme)},shortenPath:function(){var path=this.path,pathSize=path.length;pathSize&&(this.scheme!=="file"||pathSize!==1||!isWindowsDriveLetter(path[0],!0))&&path.length--},serialize:function(){var url9=this,scheme=url9.scheme,username=url9.username,password=url9.password,host=url9.host,port=url9.port,path=url9.path,query=url9.query,fragment=url9.fragment,output3=scheme+":";return host!==null?(output3+="//",url9.includesCredentials()&&(output3+=username+(password?":"+password:"")+"@"),output3+=serializeHost(host),port!==null&&(output3+=":"+port)):scheme==="file"&&(output3+="//"),output3+=url9.cannotBeABaseURL?path[0]:path.length?"/"+join(path,"/"):"",query!==null&&(output3+="?"+query),fragment!==null&&(output3+="#"+fragment),output3},setHref:function(href){var failure=this.parse(href);if(failure)throw new TypeError2(failure);this.searchParams.update()},getOrigin:function(){var scheme=this.scheme,port=this.port;if(scheme==="blob")try{return new URLConstructor(scheme.path[0]).origin}catch{return"null"}return scheme==="file"||!this.isSpecial()?"null":scheme+"://"+serializeHost(this.host)+(port!==null?":"+port:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(protocol){this.parse($toString(protocol)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(username){var codePoints=arrayFrom($toString(username));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<codePoints.length;i++)this.username+=percentEncode(codePoints[i],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(password){var codePoints=arrayFrom($toString(password));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<codePoints.length;i++)this.password+=percentEncode(codePoints[i],userinfoPercentEncodeSet)}},getHost:function(){var host=this.host,port=this.port;return host===null?"":port===null?serializeHost(host):serializeHost(host)+":"+port},setHost:function(host){this.cannotBeABaseURL||this.parse(host,HOST)},getHostname:function(){var host=this.host;return host===null?"":serializeHost(host)},setHostname:function(hostname){this.cannotBeABaseURL||this.parse(hostname,HOSTNAME)},getPort:function(){var port=this.port;return port===null?"":$toString(port)},setPort:function(port){this.cannotHaveUsernamePasswordPort()||(port=$toString(port),port===""?this.port=null:this.parse(port,PORT))},getPathname:function(){var path=this.path;return this.cannotBeABaseURL?path[0]:path.length?"/"+join(path,"/"):""},setPathname:function(pathname){this.cannotBeABaseURL||(this.path=[],this.parse(pathname,PATH_START))},getSearch:function(){var query=this.query;return query?"?"+query:""},setSearch:function(search2){search2=$toString(search2),search2===""?this.query=null:(charAt(search2,0)==="?"&&(search2=stringSlice(search2,1)),this.query="",this.parse(search2,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var fragment=this.fragment;return fragment?"#"+fragment:""},setHash:function(hash2){if(hash2=$toString(hash2),hash2===""){this.fragment=null;return}charAt(hash2,0)==="#"&&(hash2=stringSlice(hash2,1)),this.fragment="",this.parse(hash2,FRAGMENT)},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(url9){var that=anInstance(this,URLPrototype),base=validateArgumentsLength(arguments.length,1)>1?arguments[1]:void 0,state4=setInternalState(that,new URLState(url9,!1,base));DESCRIPTORS||(that.href=state4.serialize(),that.origin=state4.getOrigin(),that.protocol=state4.getProtocol(),that.username=state4.getUsername(),that.password=state4.getPassword(),that.host=state4.getHost(),that.hostname=state4.getHostname(),that.port=state4.getPort(),that.pathname=state4.getPathname(),that.search=state4.getSearch(),that.searchParams=state4.getSearchParams(),that.hash=state4.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(getter,setter){return{get:function(){return getInternalURLState(this)[getter]()},set:setter&&function(value){return getInternalURLState(this)[setter](value)},configurable:!0,enumerable:!0}};DESCRIPTORS&&(defineBuiltInAccessor(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor(URLPrototype,"hash",accessorDescriptor("getHash","setHash")));defineBuiltIn(URLPrototype,"toJSON",function(){return getInternalURLState(this).serialize()},{enumerable:!0});defineBuiltIn(URLPrototype,"toString",function(){return getInternalURLState(this).serialize()},{enumerable:!0});NativeURL&&(nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL,nativeCreateObjectURL&&defineBuiltIn(URLConstructor,"createObjectURL",bind(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn(URLConstructor,"revokeObjectURL",bind(nativeRevokeObjectURL,NativeURL)));var nativeCreateObjectURL,nativeRevokeObjectURL;setToStringTag(URLConstructor,"URL");$2({global:!0,constructor:!0,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS},{URL:URLConstructor})}});var require_web_url=__commonJS({"node_modules/core-js/modules/web.url.js"(){"use strict";init_define_process_env();init_shim();require_web_url_constructor()}});var require_punycode=__commonJS({"node_modules/url/node_modules/punycode/punycode.js"(exports3,module2){init_define_process_env();init_shim();(function(root2){var freeExports3=typeof exports3=="object"&&exports3&&!exports3.nodeType&&exports3,freeModule3=typeof module2=="object"&&module2&&!module2.nodeType&&module2,freeGlobal2=typeof window=="object"&&window;(freeGlobal2.global===freeGlobal2||freeGlobal2.window===freeGlobal2||freeGlobal2.self===freeGlobal2)&&(root2=freeGlobal2);var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors6={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error2(type){throw RangeError(errors6[type])}function map2(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";parts.length>1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map2(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var output3=[],counter=0,length=string.length,value,extra;counter<length;)value=string.charCodeAt(counter++),value>=55296&&value<=56319&&counter<length?(extra=string.charCodeAt(counter++),(extra&64512)==56320?output3.push(((value&1023)<<10)+(extra&1023)+65536):(output3.push(value),counter--)):output3.push(value);return output3}function ucs2encode(array){return map2(array,function(value){var output3="";return value>65535&&(value-=65536,output3+=stringFromCharCode(value>>>10&1023|55296),value=56320|value&1023),output3+=stringFromCharCode(value),output3}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode4(input2){var output3=[],inputLength=input2.length,out,i=0,n=initialN,bias=initialBias,basic,j2,index,oldi,w,k,digit,t,baseMinusT;for(basic=input2.lastIndexOf(delimiter),basic<0&&(basic=0),j2=0;j2<basic;++j2)input2.charCodeAt(j2)>=128&&error2("not-basic"),output3.push(input2.charCodeAt(j2));for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;index>=inputLength&&error2("invalid-input"),digit=basicToDigit(input2.charCodeAt(index++)),(digit>=base||digit>floor((maxInt-i)/w))&&error2("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digit<t);k+=base)baseMinusT=base-t,w>floor(maxInt/baseMinusT)&&error2("overflow"),w*=baseMinusT;out=output3.length+1,bias=adapt(i-oldi,out,oldi==0),floor(i/out)>maxInt-n&&error2("overflow"),n+=floor(i/out),i%=out,output3.splice(i++,0,n)}return ucs2encode(output3)}function encode4(input2){var n,delta,handledCPCount,basicLength,bias,j2,m,q,k,t,currentValue,output3=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;for(input2=ucs2decode(input2),inputLength=input2.length,n=initialN,delta=0,bias=initialBias,j2=0;j2<inputLength;++j2)currentValue=input2[j2],currentValue<128&&output3.push(stringFromCharCode(currentValue));for(handledCPCount=basicLength=output3.length,basicLength&&output3.push(delimiter);handledCPCount<inputLength;){for(m=maxInt,j2=0;j2<inputLength;++j2)currentValue=input2[j2],currentValue>=n&&currentValue<m&&(m=currentValue);for(handledCPCountPlusOne=handledCPCount+1,m-n>floor((maxInt-delta)/handledCPCountPlusOne)&&error2("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j2=0;j2<inputLength;++j2)if(currentValue=input2[j2],currentValue<n&&++delta>maxInt&&error2("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q<t);k+=base)qMinusT=q-t,baseMinusT=base-t,output3.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT);output3.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}++delta,++n}return output3.join("")}function toUnicode(input2){return mapDomain(input2,function(string){return regexPunycode.test(string)?decode4(string.slice(4).toLowerCase()):string})}function toASCII(input2){return mapDomain(input2,function(string){return regexNonASCII.test(string)?"xn--"+encode4(string):string})}if(punycode={version:"1.3.2",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode4,encode:encode4,toASCII,toUnicode},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return punycode});else if(freeExports3&&freeModule3)if(module2.exports==freeExports3)freeModule3.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports3[key]=punycode[key]);else root2.punycode=punycode})(exports3)}});var require_decode=__commonJS({"node_modules/querystring/decode.js"(exports3,module2){"use strict";init_define_process_env();init_shim();function hasOwnProperty10(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module2.exports=function(qs,sep,eq2,options){sep=sep||"&",eq2=eq2||"=";var obj={};if(typeof qs!="string"||qs.length===0)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&typeof options.maxKeys=="number"&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq2),kstr,vstr,k,v;idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty10(obj,k)?Array.isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj}}});var require_encode=__commonJS({"node_modules/querystring/encode.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module2.exports=function(obj,sep,eq2,name){return sep=sep||"&",eq2=eq2||"=",obj===null&&(obj=void 0),typeof obj=="object"?Object.keys(obj).map(function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq2;return Array.isArray(obj[k])?obj[k].map(function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq2+encodeURIComponent(stringifyPrimitive(obj)):""}}});var require_querystring=__commonJS({"node_modules/querystring/index.js"(exports3){"use strict";init_define_process_env();init_shim();exports3.decode=exports3.parse=require_decode();exports3.encode=exports3.stringify=require_encode()}});var require_url=__commonJS({"node_modules/url/url.js"(exports3){init_define_process_env();init_shim();var punycode=require_punycode();exports3.parse=urlParse;exports3.resolve=urlResolve;exports3.resolveObject=urlResolveObject;exports3.format=urlFormat;exports3.Url=Url;function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r",`
`,"	"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring12=require_querystring();function urlParse(url9,parseQueryString,slashesDenoteHost){if(url9&&isObject3(url9)&&url9 instanceof Url)return url9;var u22=new Url;return u22.parse(url9,parseQueryString,slashesDenoteHost),u22}Url.prototype.parse=function(url9,parseQueryString,slashesDenoteHost){if(!isString(url9))throw new TypeError("Parameter 'url' must be a string, not "+typeof url9);var rest=url9;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";slashes&&!(proto&&hostlessProtocol[proto])&&(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}var auth,atSign;hostEnd===-1?atSign=rest.lastIndexOf("@"):atSign=rest.lastIndexOf("@",hostEnd),atSign!==-1&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}hostEnd===-1&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(part&&!part.match(hostnamePartPattern)){for(var newpart="",j2=0,k=part.length;j2<k;j2++)part.charCodeAt(j2)>127?newpart+="x":newpart+=part[j2];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!ipv6Hostname){for(var domainArray=this.hostname.split("."),newOut=[],i=0;i<domainArray.length;++i){var s=domainArray[i];newOut.push(s.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(s):s)}this.hostname=newOut.join(".")}var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),rest[0]!=="/"&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i],esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}var hash2=rest.indexOf("#");hash2!==-1&&(this.hash=rest.substr(hash2),rest=rest.slice(0,hash2));var qm=rest.indexOf("?");if(qm!==-1?(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring12.parse(this.query)),rest=rest.slice(0,qm)):parseQueryString&&(this.search="",this.query={}),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this};function urlFormat(obj){return isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash2=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&isObject3(this.query)&&Object.keys(this.query).length&&(query=querystring12.stringify(this.query));var search2=this.search||query&&"?"+query||"";return protocol&&protocol.substr(-1)!==":"&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&host!==!1?(host="//"+(host||""),pathname&&pathname.charAt(0)!=="/"&&(pathname="/"+pathname)):host||(host=""),hash2&&hash2.charAt(0)!=="#"&&(hash2="#"+hash2),search2&&search2.charAt(0)!=="?"&&(search2="?"+search2),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search2=search2.replace("#","%23"),protocol+host+pathname+search2+hash2};function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()};function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}var result=new Url;if(Object.keys(this).forEach(function(k){result[k]=this[k]},this),result.hash=relative.hash,relative.href==="")return result.href=result.format(),result;if(relative.slashes&&!relative.protocol)return Object.keys(relative).forEach(function(k){k!=="protocol"&&(result[k]=relative[k])}),slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.path=result.pathname="/"),result.href=result.format(),result;if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol])return Object.keys(relative).forEach(function(k){result[k]=relative[k]}),result.href=result.format(),result;if(result.protocol=relative.protocol,!relative.host&&!hostlessProtocol[relative.protocol]){for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),relPath[0]!==""&&relPath.unshift(""),relPath.length<2&&relPath.unshift(""),result.pathname=relPath.join("/")}else result.pathname=relative.pathname;if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(srcPath[0]===""?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(relPath[0]===""?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")),isRelAbs)result.host=relative.host||relative.host===""?relative.host:result.host,result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,(!isNull(result.pathname)||!isNull(result.search))&&(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last2=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host)&&(last2==="."||last2==="..")||last2==="",up=0,i=srcPath.length;i>=0;i--)last2=srcPath[i],last2=="."?srcPath.splice(i,1):last2===".."?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")&&srcPath.unshift(""),hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"&&srcPath.push("");var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),(!isNull(result.pathname)||!isNull(result.search))&&(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result};Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],port!==":"&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)};function isString(arg){return typeof arg=="string"}function isObject3(arg){return typeof arg=="object"&&arg!==null}function isNull(arg){return arg===null}function isNullOrUndefined(arg){return arg==null}}});var app_json_exports={};__export(app_json_exports,{BUBBLE_RESERVED_KEYS:()=>BUBBLE_RESERVED_KEYS,CONFLICT_PATHS:()=>CONFLICT_PATHS,OBJECT_MARKER:()=>OBJECT_MARKER,PROTECTED_KEYS:()=>PROTECTED_KEYS,PROTECTED_PAGE_NAMES:()=>PROTECTED_PAGE_NAMES,READONLY_PREFIX:()=>READONLY_PREFIX});var import_web_dom_collections_iterator9,PROTECTED_KEYS,OBJECT_MARKER,BUBBLE_RESERVED_KEYS,PROTECTED_PAGE_NAMES,CONFLICT_PATHS,READONLY_PREFIX,init_app_json=__esm({"lib-browser/constants/app_json.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator9=__toESM(require_web_dom_collections_iterator()),PROTECTED_KEYS=new Set(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),OBJECT_MARKER="__obj_marker__",BUBBLE_RESERVED_KEYS=new Set(["type","id","_id","length",OBJECT_MARKER,"phone_number"]),PROTECTED_PAGE_NAMES=new Set(["index","reset_pw","404"]),CONFLICT_PATHS=["settings.client_safe.uid_counter","uid_counter","conflicts","conflicts_theirs_version_name","conflicts_undo_snapshot_id","merge_changes","no_merge_changes","merge_changes_complete","_index","screenshot"],READONLY_PREFIX="readonly."}});var btype_ids_exports={};__export(btype_ids_exports,{api_type:()=>api_type,api_type_inner:()=>api_type_inner,bubble_null:()=>bubble_null,custom_type:()=>custom_type,custom_type_name:()=>custom_type_name,is_api_type:()=>is_api_type,is_custom_type:()=>is_custom_type,is_list:()=>is_list,is_option_set:()=>is_option_set,is_readonly_type:()=>is_readonly_type,list_element_type:()=>list_element_type,list_type:()=>list_type,option_set_name:()=>option_set_name,option_set_type:()=>option_set_type,readonly_type:()=>readonly_type});function is_list(id){var _id$startsWith;return(_id$startsWith=id==null?void 0:id.startsWith(list_prefix))!=null?_id$startsWith:!1}function list_type(id){return`${list_prefix}${id}`}function list_element_type(id){return is_list(id)||warn("btype_ids assertion failure!",{function:"list",btype_id:id}),id.slice(list_prefix.length)}function is_custom_type(id){var _id$startsWith2;return(_id$startsWith2=id==null?void 0:id.startsWith(custom_prefix))!=null?_id$startsWith2:!1}function custom_type(name){return`${custom_prefix}${name}`}function is_readonly_type(id){var _id$startsWith3;return(_id$startsWith3=id==null?void 0:id.startsWith(readonly_prefix))!=null?_id$startsWith3:!1}function readonly_type(name){return`${readonly_prefix}${name}`}function custom_type_name(id){return id==="user"?"user":(is_custom_type(id)||warn("btype_ids assertion failure!",{function:"custom",btype_id:id}),id.slice(custom_prefix.length))}function is_api_type(id){var _id$startsWith4;return(_id$startsWith4=id==null?void 0:id.startsWith(api_prefix))!=null?_id$startsWith4:!1}function api_type(id){return`${api_prefix}${id}`}function api_type_inner(id){return is_api_type(id)||warn("btype_ids assertion failure!",{function:"api",btype_id:id}),id.slice(api_prefix.length)}function is_option_set(id){var _id$startsWith5;return(_id$startsWith5=id==null?void 0:id.startsWith(option_prefix))!=null?_id$startsWith5:!1}function option_set_type(name){return`${option_prefix}${name}`}function option_set_name(id){return is_option_set(id)||warn("btype_ids assertion failure!",{function:"option_set",btype_id:id}),id.slice(option_prefix.length)}var list_prefix,custom_prefix,readonly_prefix,api_prefix,option_prefix,bubble_null,init_btype_ids=__esm({"lib-browser/lang/btype_ids.js"(){"use strict";init_define_process_env();init_shim();init_logger();init_app_json();list_prefix="list.";custom_prefix="custom.";readonly_prefix=`${custom_prefix}${READONLY_PREFIX}`;api_prefix="api.";option_prefix="option.";bubble_null="null"}});var time_exports={};__export(time_exports,{DAY_H:()=>DAY_H,DAY_MS:()=>DAY_MS,DAY_S:()=>DAY_S,HOUR_MS:()=>HOUR_MS,HOUR_S:()=>HOUR_S,MICROSECONDS_NS:()=>MICROSECONDS_NS,MILLISECONDS_NS:()=>MILLISECONDS_NS,MILLISECONDS_US:()=>MILLISECONDS_US,MINUTE_MS:()=>MINUTE_MS,MINUTE_S:()=>MINUTE_S,SECOND_MS:()=>SECOND_MS,THIRTY_DAY_H:()=>THIRTY_DAY_H,THIRTY_DAY_S:()=>THIRTY_DAY_S,TimeUnit:()=>TimeUnit,WEEK_H:()=>WEEK_H,WEEK_MS:()=>WEEK_MS,WEEK_S:()=>WEEK_S,YEAR_H:()=>YEAR_H,YEAR_MONTH:()=>YEAR_MONTH,YEAR_MS:()=>YEAR_MS,YEAR_S:()=>YEAR_S});var YEAR_MONTH,DAY_H,WEEK_H,THIRTY_DAY_H,YEAR_H,MINUTE_S,HOUR_S,DAY_S,WEEK_S,THIRTY_DAY_S,YEAR_S,SECOND_MS,MINUTE_MS,HOUR_MS,DAY_MS,WEEK_MS,YEAR_MS,MILLISECONDS_US,MILLISECONDS_NS,MICROSECONDS_NS,TimeUnit,init_time=__esm({"lib-browser/constants/time.js"(){"use strict";init_define_process_env();init_shim();YEAR_MONTH=12,DAY_H=24,WEEK_H=168,THIRTY_DAY_H=720,YEAR_H=8760,MINUTE_S=60,HOUR_S=3600,DAY_S=86400,WEEK_S=604800,THIRTY_DAY_S=2592e3,YEAR_S=31536e3,SECOND_MS=1e3,MINUTE_MS=6e4,HOUR_MS=36e5,DAY_MS=864e5,WEEK_MS=6048e5,YEAR_MS=31536e6,MILLISECONDS_US=1e3,MILLISECONDS_NS=1e6,MICROSECONDS_NS=1e3,TimeUnit=function(TimeUnit2){return TimeUnit2.MINUTE="minute",TimeUnit2.HOUR="hour",TimeUnit2.DAY="day",TimeUnit2}({})}});var require_pluralize=__commonJS({"node_modules/pluralize/pluralize.js"(exports3,module2){init_define_process_env();init_shim();(function(root2,pluralize2){typeof __require=="function"&&typeof exports3=="object"&&typeof module2=="object"?module2.exports=pluralize2():typeof define=="function"&&define.amd?define(function(){return pluralize2()}):root2.pluralize=pluralize2()})(exports3,function(){var pluralRules=[],singularRules=[],uncountables={},irregularPlurals={},irregularSingles={};function sanitizeRule(rule){return typeof rule=="string"?new RegExp("^"+rule+"$","i"):rule}function restoreCase(word,token){return word===token?token:word===word.toLowerCase()?token.toLowerCase():word===word.toUpperCase()?token.toUpperCase():word[0]===word[0].toUpperCase()?token.charAt(0).toUpperCase()+token.substr(1).toLowerCase():token.toLowerCase()}function interpolate(str,args){return str.replace(/\$(\d{1,2})/g,function(match,index){return args[index]||""})}function replace(word,rule){return word.replace(rule[0],function(match,index){var result=interpolate(rule[1],arguments);return restoreCase(match===""?word[index-1]:match,result)})}function sanitizeWord(token,word,rules){if(!token.length||uncountables.hasOwnProperty(token))return word;for(var len=rules.length;len--;){var rule=rules[len];if(rule[0].test(word))return replace(word,rule)}return word}function replaceWord(replaceMap,keepMap,rules){return function(word){var token=word.toLowerCase();return keepMap.hasOwnProperty(token)?restoreCase(word,token):replaceMap.hasOwnProperty(token)?restoreCase(word,replaceMap[token]):sanitizeWord(token,word,rules)}}function checkWord(replaceMap,keepMap,rules,bool){return function(word){var token=word.toLowerCase();return keepMap.hasOwnProperty(token)?!0:replaceMap.hasOwnProperty(token)?!1:sanitizeWord(token,token,rules)===token}}function pluralize2(word,count2,inclusive){var pluralized=count2===1?pluralize2.singular(word):pluralize2.plural(word);return(inclusive?count2+" ":"")+pluralized}return pluralize2.plural=replaceWord(irregularSingles,irregularPlurals,pluralRules),pluralize2.isPlural=checkWord(irregularSingles,irregularPlurals,pluralRules),pluralize2.singular=replaceWord(irregularPlurals,irregularSingles,singularRules),pluralize2.isSingular=checkWord(irregularPlurals,irregularSingles,singularRules),pluralize2.addPluralRule=function(rule,replacement){pluralRules.push([sanitizeRule(rule),replacement])},pluralize2.addSingularRule=function(rule,replacement){singularRules.push([sanitizeRule(rule),replacement])},pluralize2.addUncountableRule=function(word){if(typeof word=="string"){uncountables[word.toLowerCase()]=!0;return}pluralize2.addPluralRule(word,"$0"),pluralize2.addSingularRule(word,"$0")},pluralize2.addIrregularRule=function(single,plural){plural=plural.toLowerCase(),single=single.toLowerCase(),irregularSingles[single]=plural,irregularPlurals[plural]=single},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(rule){return pluralize2.addIrregularRule(rule[0],rule[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(rule){return pluralize2.addPluralRule(rule[0],rule[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(rule){return pluralize2.addSingularRule(rule[0],rule[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(pluralize2.addUncountableRule),pluralize2})}});function string_contains(str,target){return typeof str!="string"?(str!=null&&typeof str=="object"&&str.indexOf!=null&&info("string contains called incorrectly on something vaguely like a string",{str:str}),!1):str.includes(target)}function replace_all(original,find,replace){return original.split(find).join(replace!=null?replace:"")}function _remove_quote(str){return str.replace(/"/g,"")}function get_columns_header(str,separator,have_quotes){var _separator,_have_quotes;if((_separator=separator)!=null||(separator=","),(_have_quotes=have_quotes)!=null||(have_quotes=!1),!str||str.trim()==="")return;str=str.trim();let entries=str.split(`
`),res=[];for(let entry of entries[0].split(separator))have_quotes?res.push(_remove_quote(entry)):res.push(entry);return res}function to_num(n){let ret=typeof n=="string"?parseFloat(n):n;return isFinite(ret)?ret:null}function csv_to_downloadable_file(filename,str){if(typeof navigator>"u")return;let blob=new Blob([str],{type:"text/csv"});filename.slice(-4)!==".csv"&&(filename+=".csv");let maybe_IE_navigator=navigator;if(maybe_IE_navigator.msSaveOrOpenBlob){let blob_saver=maybe_IE_navigator.msSaveOrOpenBlob;setTimeout(()=>{blob_saver(blob,filename)},1e3)}else{let download_url=window.URL.createObjectURL(blob),a=document.createElement("a");a.className="fake-link-to-trigger-a-download",a.rel="noopener",a.download=filename,a.href=download_url,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>{window.URL.revokeObjectURL(download_url)},5e3)}}function truncate_text(str,n,no_break_words){if(typeof str!="string"||str.length<=n)return str;let sub_str=str.substr(0,n-1);return no_break_words?sub_str.substr(0,sub_str.lastIndexOf(" ")):sub_str+"\u2026"}function toTitleCase(str){let ignore_bbcode=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof str!="string")return str;let regex=/(?:^|\s)./g;return ignore_bbcode&&(regex=/(?:^|\s)(?:\[.*?\])?./g),str.replace(regex,match=>{let len=match.length;return match.slice(0,len-1)+match[len-1].toUpperCase()})}function FirstLetterCapitalize(str){"worklet";return typeof str!="string"||str.length===0?str:str[0].toUpperCase()+str.slice(1)}function is_email(val){if(typeof val!="string")return!1;let lowercase=val.toLowerCase(),match=lowercase.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);return!(!match||match[0]!==lowercase)}function charCode(str){return str.charCodeAt(0)}function string_replace_range(str,start3,end2,replacement){return str.substring(0,start3)+replacement+str.substring(end2)}function text_contains(str,target){var _str$toLowerCase$inde,_str$toLowerCase$inde2,_str$toLowerCase,_target$toLowerCase;return(_str$toLowerCase$inde=str==null||(_str$toLowerCase$inde2=(_str$toLowerCase=str.toLowerCase()).indexOf)==null?void 0:_str$toLowerCase$inde2.call(_str$toLowerCase,(_target$toLowerCase=target==null?void 0:target.toLowerCase())!=null?_target$toLowerCase:""))!=null?_str$toLowerCase$inde:-1}function starts_with_vowel(str){return/^[aeiou]/i.test(str)}function ends_with(str,target){if(typeof str!="string")return!1;let idx=str.lastIndexOf(target);return idx===-1?!1:idx+target.length===str.length}function starts_with(str,target){return typeof str!="string"||typeof target!="string"?!1:str.slice(0,target.length)===target}function starts_with_number(str){return/^\d/.test(str)}function remove_invalid_from_num(n){let is_negative=n[0]==="-",valid=/[^0-9., ]+/g,ret=n.replace(valid,"");return is_negative&&(ret="-"+ret),ret}function fixedEncodeURIComponent(str){return encodeURIComponent(str).replace(/[!'()*]/g,c=>"%"+c.charCodeAt(0).toString(16))}function is_url_safe(str){return!url_unsafe_regex.test(str)}function replace_spaces_with_hyphens(str){return(str!=null?str:"").toLowerCase().replace(/\s/g,"-").replace(url_unsafe_regex_g,"")}function format_bytes(bytes3,decimals){var _decimals;if((_decimals=decimals)!=null||(decimals=0),bytes3===0)return"0 Bytes";let i=Math.floor(Math.log(bytes3)/Math.log(1024));return i===0&&(decimals=0),`${parseFloat((bytes3/Math.pow(1024,i)).toFixed(decimals))} ${STORAGE_UNITS[i]}`}function increment_filename(filename){let regex=/\(([0-9]+)\)/,match=regex.exec(filename);if(match){let new_num=parseInt(match[1])+1;return filename.replace(regex,`(${new_num})`)}else{let pieces=filename.split(".");return pieces.slice(0,pieces.length-1).join(".")+" (1)."+pieces[pieces.length-1]}}function custom_type_name2(type){return type!=="user"&&(type=custom_type(type)),type}function firebase_remove_illegal(str){return str.replace(global_firebase_illegal_regex,"_")}function _replace(str,char,encoded){let split=str.split(char);return split.length===1?str:split.join(encoded)}function encode_key(str){if(!firebase_illegal(str))return str;let r2=_replace(str,escaping_char,escaping_char+escaping_char);for(let char in reverse_key_mapping){let encoded=reverse_key_mapping[char];r2=_replace(r2,char,escaping_char+encoded)}return r2}function decode_key(str){let r2=_replace(str,escaping_char+escaping_char,escaping_char);for(let[encoded,char]of Object.entries(illegal_key_mapping))r2=_replace(r2,escaping_char+encoded,char);return r2}function add_thousand_sep(n,separator){var _separator2;return(_separator2=separator)!=null||(separator=","),n==null?"":n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,separator)}function add_thousand_sep_locale(n,locale){let number2=Number(n);return n==null||Number.isNaN(number2)?"":number2.toLocaleString(locale)}function id_safe(id){if(!id)throw new UnexpectedError("bad id: falsy value ",{id_as_string:String(id)});return id.replace(_id_safe_regex,"__")}function create_css_class_from_label(text2){return text2.replace(/ /g,"_").replace(/'/g,"_").replace(/\.\.\./g,"_").replace(/\./g,"_").toLowerCase()}function compact_number(numeric_value){return Intl.NumberFormat("en",{notation:"compact"}).format(numeric_value)}function compact_memory(gigabytes){return Intl.NumberFormat("en",{notation:"compact",style:"unit",unit:"byte",unitDisplay:"narrow"}).format(gigabytes*1e9).replace("BB","GB")}function cast_to_string(val){return val==null?"":String(val)}function eager_first_sentence_cut(initial_string,max_length){}var import_es_string_replace2,import_web_dom_collections_iterator10,import_web_url,import_web_url_search_params2,url,import_pluralize,safe_contains,is_url,url_unsafe_regex_string,url_unsafe_regex,url_unsafe_regex_g,escaping_char,illegal_key_mapping,firebase_illegal_regex_string,firebase_illegal_regex,global_firebase_illegal_regex,firebase_illegal,reverse_key_mapping,_id_safe_regex,compact_hours,create_compound_key,hash_code,escapeRegex,escape_js_string,remove_control_characters,init_b_string=__esm({"lib-browser/u/shared/b_string.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace2=__toESM(require_es_string_replace()),import_web_dom_collections_iterator10=__toESM(require_web_dom_collections_iterator()),import_web_url=__toESM(require_web_url()),import_web_url_search_params2=__toESM(require_web_url_search_params()),url=__toESM(require_url());init_errors();init_logger();init_loggable();init_byte();init_btype_ids();init_time();import_pluralize=__toESM(require_pluralize());safe_contains=string_contains;is_url=function(val,allowed_protocols){if(typeof val!="string")return!1;let parsed;return val.slice(0,2)==="//"?(parsed=url.parse("http:"+val),parsed.protocol="//"):parsed=url.parse(val),!(!parsed.protocol||allowed_protocols&&!allowed_protocols.includes(parsed.protocol)||!parsed.host)};url_unsafe_regex_string="[^a-z0-9\\-]",url_unsafe_regex=new RegExp(url_unsafe_regex_string),url_unsafe_regex_g=new RegExp(url_unsafe_regex_string,"g");escaping_char="&",illegal_key_mapping={1:".",2:"$",3:"#",4:"[",5:"]",6:"/"},firebase_illegal_regex_string=`[${Object.values(illegal_key_mapping).map(v=>"\\"+v).join("")}]`,firebase_illegal_regex=new RegExp(firebase_illegal_regex_string),global_firebase_illegal_regex=new RegExp(firebase_illegal_regex_string,"g"),firebase_illegal=str=>firebase_illegal_regex.test(str);reverse_key_mapping={};for(let[encoded,char]of Object.entries(illegal_key_mapping))reverse_key_mapping[char]=encoded;_id_safe_regex=/[.#$[\]/]/g;compact_hours=hours=>{if(hours<24)return`${hours} ${(0,import_pluralize.default)("hour",hours)}`;let days=hours/24;return`${days} ${(0,import_pluralize.default)("day",days)}`};create_compound_key=elements2=>elements2.map(element=>encodeURIComponent(element)).join("/"),hash_code=value=>[...value].reduce((hash2,char)=>Math.imul(hash2,31)+char.charCodeAt(0)|0,0),escapeRegex=/[\\`"']/g,escape_js_string=str=>str.replace(escapeRegex,match=>{switch(match){case"\\":return"\\\\";case'"':return'\\"';case"'":return"\\'";case"`":return"\\`";default:return match}}),remove_control_characters=str=>{let CONTROL_CHARACTER_REGEX=/[\x00-\x1F\x7F]/g;return str.replace(CONTROL_CHARACTER_REGEX,"")}}});var dependency_exports={};__export(dependency_exports,{Dependency:()=>Dependency,DependencyClass:()=>DependencyClass,register_dependency:()=>register_dependency});function register_dependency(computation){let currentObserver=async_state_default.CurrentAutoRun;currentObserver&&(!async_state_default.NewSources&&currentObserver._sources&&currentObserver._sources[async_state_default.NewSourcesIndex]===computation?async_state_default.NewSourcesIndex++:async_state_default.NewSources?computation!==async_state_default.NewSources[async_state_default.NewSources.length-1]&&async_state_default.NewSources.push(computation):async_state_default.NewSources=[computation])}function Dependency(){return new DependencyClass}var import_es_error_cause5,import_web_dom_collections_iterator11,log_debug_stack,DependencyClass,init_dependency=__esm({"lib-browser/u/shared/async/new/dependency.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause5=__toESM(require_es_error_cause()),import_web_dom_collections_iterator11=__toESM(require_web_dom_collections_iterator());init_async_state();log_debug_stack=!0;DependencyClass=class{constructor(){this._observers=[]}register(){register_dependency(this)}updateIfNecessary(){}needed(){return this._observers.length>0}once_invalidate(fn){let fn2={_sources:[this],_invalidate:()=>{let myIndex=this._observers.indexOf(fn2);myIndex>=0&&(this._observers[myIndex]=this._observers[this._observers.length-1],this._observers.pop()),fn()}};this._observers.push(fn2)}invalidate(){let last_invalidation_stack=log_debug_stack?new Error().stack:void 0;async_state_default.batch(()=>{for(let run of this._observers)run._invalidate(3,last_invalidation_stack)})}}}});var import_web_dom_collections_iterator12,import_es_string_replace3,API_ROUTE,API_SERVICE_ROUTE,APP_EDITOR_ROUTE,BUG_ROUTE,DATA_ROUTE,FILEUPLOAD_ROUTE,PACKAGER_ROUTE,PAGE_ROUTE,PLUGIN_ROUTE,STATIC_ROUTE,TEST_CREATION_ROUTE,USER_ROUTE,WORKFLOW_ROUTE,DOMAIN_CTRL_VAL_ROUTE,MAIN_QABOX_PATH_REGEX,TEST_QABOX_PATH_REGEX,ILLEGAL_PAGE_NAMES,init_routes=__esm({"lib-browser/constants/routes.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator12=__toESM(require_web_dom_collections_iterator()),import_es_string_replace3=__toESM(require_es_string_replace()),API_ROUTE="api",API_SERVICE_ROUTE="apiservice",APP_EDITOR_ROUTE="appeditor",BUG_ROUTE="bug",DATA_ROUTE="elasticsearch",FILEUPLOAD_ROUTE="fileupload",PACKAGER_ROUTE="package",PAGE_ROUTE="",PLUGIN_ROUTE="pluginserver",STATIC_ROUTE="static",TEST_CREATION_ROUTE="versioncontrol",USER_ROUTE="user",WORKFLOW_ROUTE="workflow",DOMAIN_CTRL_VAL_ROUTE=".well-known",MAIN_QABOX_PATH_REGEX=/.*\.qabox\.bubble\.is.*$/,TEST_QABOX_PATH_REGEX=/.*\.qabox\.test-bubble\.com.*$/,ILLEGAL_PAGE_NAMES=[...[API_ROUTE,API_SERVICE_ROUTE,APP_EDITOR_ROUTE,BUG_ROUTE,DATA_ROUTE,DOMAIN_CTRL_VAL_ROUTE,FILEUPLOAD_ROUTE,PACKAGER_ROUTE,PAGE_ROUTE,PLUGIN_ROUTE,STATIC_ROUTE,TEST_CREATION_ROUTE,USER_ROUTE,WORKFLOW_ROUTE].map(illegal_page_name=>new RegExp(`^${illegal_page_name.replace(".","\\.")}$`)),/^version-/]}});var QUEUE_TIMEOUT,SYSTEM_FIBER,init_fibers=__esm({"lib-browser/constants/fibers.js"(){"use strict";init_define_process_env();init_shim();init_routes();QUEUE_TIMEOUT="Operation timed out -- app too busy",SYSTEM_FIBER="SYSTEM_FIBER"}});var b_fiber_exports={};__export(b_fiber_exports,{BackgroundSyncRun:()=>BackgroundSyncRun,Block:()=>Block,Fiber:()=>Fiber,FiberTimeout:()=>FiberTimeout,GetFiberTimeout:()=>GetFiberTimeout,Parallel:()=>Parallel,QUEUE_TIMEOUT:()=>QUEUE_TIMEOUT,RootBackgroundSyncRun:()=>RootBackgroundSyncRun,RootSyncRun:()=>RootSyncRun,SYSTEM_FIBER:()=>SYSTEM_FIBER,Sync:()=>Sync,SyncRun:()=>SyncRun,add_metrics_headers:()=>add_metrics_headers,appnames_that_currently_cannot_take_new_background_request:()=>appnames_that_currently_cannot_take_new_background_request,assign_fiber_ownership:()=>assign_fiber_ownership,await:()=>es6_await,fiber_elapsed_time_ns:()=>fiber_elapsed_time_ns,fiber_finalize:()=>fiber_finalize,fiber_lock:()=>fiber_lock,fiber_queue_shutdown:()=>fiber_queue_shutdown,fiber_queue_soft_clean:()=>fiber_queue_soft_clean,get_capacity_units:()=>get_capacity_units,get_capacity_units_as_number_display:()=>get_capacity_units_as_number_display,get_current_fiber_activity:()=>get_current_fiber_activity,get_current_fiber_workload_used_units:()=>get_current_fiber_workload_used_units,get_tabulated_metrics:()=>get_tabulated_metrics,handlers:()=>handlers,has_time_left:()=>has_time_left,has_time_left_for_new_request:()=>has_time_left_for_new_request,increment_fiber_sampling:()=>increment_fiber_sampling,increment_fiber_sampling_with_timer:()=>increment_fiber_sampling_with_timer,initialize_fiber_metrics:()=>initialize_fiber_metrics,kill_fiber:()=>kill_fiber,next_request_allowed_at:()=>next_request_allowed_at,on_fiber_created:()=>on_fiber_created,on_post_fiber_run:()=>on_post_fiber_run,optional_pause:()=>optional_pause,pause:()=>pause,peek_has_time_left_for_background_bucket:()=>peek_has_time_left_for_background_bucket,set_fiber_queue:()=>set_fiber_queue,set_global_fiber_timeout:()=>set_global_fiber_timeout,set_running_app:()=>set_running_app,spend_time:()=>spend_time,state:()=>state2,suspend_fiber_timeout:()=>suspend_fiber_timeout,tabulate_metrics:()=>tabulate_metrics,tag_fiber:()=>tag_fiber,time_left_for_each_capacity_bucket:()=>time_left_for_each_capacity_bucket});function throw_on_client(){throw new UnexpectedError("Function should only be called on the server")}function no_op_on_client(){}var _server_b_fibers,_server_b_fibers$fibe,_server_b_fibers2,_server_b_fibers$tag_,_server_b_fibers3,_server_b_fibers$incr,_server_b_fibers4,_server_b_fibers$incr2,_server_b_fibers5,_server_b_fibers$init,_server_b_fibers6,_server_b_fibers$fibe2,_server_b_fibers7,_server_b_fibers$tabu,_server_b_fibers8,_server_b_fibers$get_,_server_b_fibers9,_server_b_fibers$add_,_server_b_fibers10,_server_b_fibers$hand,_server_b_fibers11,_server_b_fibers$set_,_server_b_fibers12,_server_b_fibers$assi,_server_b_fibers13,_server_b_fibers$has_,_server_b_fibers14,_server_b_fibers$peek,_server_b_fibers15,_server_b_fibers$time,_server_b_fibers16,_server_b_fibers$has_2,_server_b_fibers17,_server_b_fibers$next,_server_b_fibers18,_server_b_fibers$appn,_server_b_fibers19,_server_b_fibers$spen,_server_b_fibers20,_server_b_fibers$get_2,_server_b_fibers21,_server_b_fibers$get_3,_server_b_fibers22,_server_b_fibers$on_p,_server_b_fibers23,_server_b_fibers$on_f,_server_b_fibers24,_server_b_fibers$set_2,_server_b_fibers25,_server_b_fibers$fibe3,_server_b_fibers26,_server_b_fibers$fibe4,_server_b_fibers27,_server_b_fibers$opti,_server_b_fibers28,_server_b_fibers$stat,_server_b_fibers29,_server_b_fibers$kill,_server_b_fibers30,_server_b_fibers$Sync,_server_b_fibers31,_server_b_fibers$Root,_server_b_fibers32,_server_b_fibers$Back,_server_b_fibers33,_server_b_fibers$Root2,_server_b_fibers34,_server_b_fibers$set_3,_server_b_fibers35,_server_b_fibers$fibe5,_server_b_fibers36,_server_b_fibers$Sync2,_server_b_fibers37,_server_b_fibers$Para,_server_b_fibers38,_server_b_fibers$awai,_server_b_fibers39,_server_b_fibers$Fibe,_server_b_fibers40,_server_b_fibers$GetF,_server_b_fibers41,_server_b_fibers$susp,_server_b_fibers42,_server_b_fibers$Bloc,_server_b_fibers43,_server_b_fibers$paus,_server_b_fibers44,_server_b_fibers$get_4,_server_b_fibers45,_server_b_fibers$get_5,_server_b_fibers46,server_b_fibers,Fiber,fiber_lock,tag_fiber,increment_fiber_sampling_with_timer,increment_fiber_sampling,initialize_fiber_metrics,fiber_elapsed_time_ns,tabulate_metrics,get_tabulated_metrics,add_metrics_headers,handlers,set_running_app,assign_fiber_ownership,has_time_left,peek_has_time_left_for_background_bucket,time_left_for_each_capacity_bucket,has_time_left_for_new_request,next_request_allowed_at,appnames_that_currently_cannot_take_new_background_request,spend_time,get_capacity_units,get_capacity_units_as_number_display,on_post_fiber_run,on_fiber_created,set_fiber_queue,fiber_queue_soft_clean,fiber_queue_shutdown,optional_pause,state2,kill_fiber,SyncRun,RootSyncRun,BackgroundSyncRun,RootBackgroundSyncRun,set_global_fiber_timeout,fiber_finalize,Sync,Parallel,es6_await,FiberTimeout,GetFiberTimeout,suspend_fiber_timeout,Block,pause,get_current_fiber_activity,get_current_fiber_workload_used_units,init_b_fiber=__esm({"lib-browser/u/shared/async/b_fiber/index.js"(){"use strict";init_define_process_env();init_shim();init_errors();init_fibers();Fiber=(_server_b_fibers=server_b_fibers)==null?void 0:_server_b_fibers.Fiber,fiber_lock=(_server_b_fibers$fibe=(_server_b_fibers2=server_b_fibers)==null?void 0:_server_b_fibers2.fiber_lock)!=null?_server_b_fibers$fibe:throw_on_client,tag_fiber=(_server_b_fibers$tag_=(_server_b_fibers3=server_b_fibers)==null?void 0:_server_b_fibers3.tag_fiber)!=null?_server_b_fibers$tag_:throw_on_client,increment_fiber_sampling_with_timer=(_server_b_fibers$incr=(_server_b_fibers4=server_b_fibers)==null?void 0:_server_b_fibers4.increment_fiber_sampling_with_timer)!=null?_server_b_fibers$incr:no_op_on_client,increment_fiber_sampling=(_server_b_fibers$incr2=(_server_b_fibers5=server_b_fibers)==null?void 0:_server_b_fibers5.increment_fiber_sampling)!=null?_server_b_fibers$incr2:no_op_on_client,initialize_fiber_metrics=(_server_b_fibers$init=(_server_b_fibers6=server_b_fibers)==null?void 0:_server_b_fibers6.initialize_fiber_metrics)!=null?_server_b_fibers$init:throw_on_client,fiber_elapsed_time_ns=(_server_b_fibers$fibe2=(_server_b_fibers7=server_b_fibers)==null?void 0:_server_b_fibers7.fiber_elapsed_time_ns)!=null?_server_b_fibers$fibe2:throw_on_client,tabulate_metrics=(_server_b_fibers$tabu=(_server_b_fibers8=server_b_fibers)==null?void 0:_server_b_fibers8.tabulate_metrics)!=null?_server_b_fibers$tabu:throw_on_client,get_tabulated_metrics=(_server_b_fibers$get_=(_server_b_fibers9=server_b_fibers)==null?void 0:_server_b_fibers9.get_tabulated_metrics)!=null?_server_b_fibers$get_:throw_on_client,add_metrics_headers=(_server_b_fibers$add_=(_server_b_fibers10=server_b_fibers)==null?void 0:_server_b_fibers10.add_metrics_headers)!=null?_server_b_fibers$add_:no_op_on_client,handlers=(_server_b_fibers$hand=(_server_b_fibers11=server_b_fibers)==null?void 0:_server_b_fibers11.handlers)!=null?_server_b_fibers$hand:{},set_running_app=(_server_b_fibers$set_=(_server_b_fibers12=server_b_fibers)==null?void 0:_server_b_fibers12.set_running_app)!=null?_server_b_fibers$set_:throw_on_client,assign_fiber_ownership=(_server_b_fibers$assi=(_server_b_fibers13=server_b_fibers)==null?void 0:_server_b_fibers13.assign_fiber_ownership)!=null?_server_b_fibers$assi:throw_on_client,has_time_left=(_server_b_fibers$has_=(_server_b_fibers14=server_b_fibers)==null?void 0:_server_b_fibers14.has_time_left)!=null?_server_b_fibers$has_:throw_on_client,peek_has_time_left_for_background_bucket=(_server_b_fibers$peek=(_server_b_fibers15=server_b_fibers)==null?void 0:_server_b_fibers15.peek_has_time_left_for_background_bucket)!=null?_server_b_fibers$peek:throw_on_client,time_left_for_each_capacity_bucket=(_server_b_fibers$time=(_server_b_fibers16=server_b_fibers)==null?void 0:_server_b_fibers16.time_left_for_each_capacity_bucket)!=null?_server_b_fibers$time:throw_on_client,has_time_left_for_new_request=(_server_b_fibers$has_2=(_server_b_fibers17=server_b_fibers)==null?void 0:_server_b_fibers17.has_time_left_for_new_request)!=null?_server_b_fibers$has_2:throw_on_client,next_request_allowed_at=(_server_b_fibers$next=(_server_b_fibers18=server_b_fibers)==null?void 0:_server_b_fibers18.next_request_allowed_at)!=null?_server_b_fibers$next:throw_on_client,appnames_that_currently_cannot_take_new_background_request=(_server_b_fibers$appn=(_server_b_fibers19=server_b_fibers)==null?void 0:_server_b_fibers19.appnames_that_currently_cannot_take_new_background_request)!=null?_server_b_fibers$appn:throw_on_client,spend_time=(_server_b_fibers$spen=(_server_b_fibers20=server_b_fibers)==null?void 0:_server_b_fibers20.spend_time)!=null?_server_b_fibers$spen:throw_on_client,get_capacity_units=(_server_b_fibers$get_2=(_server_b_fibers21=server_b_fibers)==null?void 0:_server_b_fibers21.get_capacity_units)!=null?_server_b_fibers$get_2:throw_on_client,get_capacity_units_as_number_display=(_server_b_fibers$get_3=(_server_b_fibers22=server_b_fibers)==null?void 0:_server_b_fibers22.get_capacity_units_as_number_display)!=null?_server_b_fibers$get_3:throw_on_client,on_post_fiber_run=(_server_b_fibers$on_p=(_server_b_fibers23=server_b_fibers)==null?void 0:_server_b_fibers23.on_post_fiber_run)!=null?_server_b_fibers$on_p:throw_on_client,on_fiber_created=(_server_b_fibers$on_f=(_server_b_fibers24=server_b_fibers)==null?void 0:_server_b_fibers24.on_fiber_created)!=null?_server_b_fibers$on_f:throw_on_client,set_fiber_queue=(_server_b_fibers$set_2=(_server_b_fibers25=server_b_fibers)==null?void 0:_server_b_fibers25.set_fiber_queue)!=null?_server_b_fibers$set_2:throw_on_client,fiber_queue_soft_clean=(_server_b_fibers$fibe3=(_server_b_fibers26=server_b_fibers)==null?void 0:_server_b_fibers26.fiber_queue_soft_clean)!=null?_server_b_fibers$fibe3:throw_on_client,fiber_queue_shutdown=(_server_b_fibers$fibe4=(_server_b_fibers27=server_b_fibers)==null?void 0:_server_b_fibers27.fiber_queue_shutdown)!=null?_server_b_fibers$fibe4:throw_on_client,optional_pause=(_server_b_fibers$opti=(_server_b_fibers28=server_b_fibers)==null?void 0:_server_b_fibers28.optional_pause)!=null?_server_b_fibers$opti:no_op_on_client,state2=(_server_b_fibers$stat=(_server_b_fibers29=server_b_fibers)==null?void 0:_server_b_fibers29.state)!=null?_server_b_fibers$stat:{open_fibers:0},kill_fiber=(_server_b_fibers$kill=(_server_b_fibers30=server_b_fibers)==null?void 0:_server_b_fibers30.kill_fiber)!=null?_server_b_fibers$kill:throw_on_client,SyncRun=(_server_b_fibers$Sync=(_server_b_fibers31=server_b_fibers)==null?void 0:_server_b_fibers31.SyncRun)!=null?_server_b_fibers$Sync:throw_on_client,RootSyncRun=(_server_b_fibers$Root=(_server_b_fibers32=server_b_fibers)==null?void 0:_server_b_fibers32.RootSyncRun)!=null?_server_b_fibers$Root:throw_on_client,BackgroundSyncRun=(_server_b_fibers$Back=(_server_b_fibers33=server_b_fibers)==null?void 0:_server_b_fibers33.BackgroundSyncRun)!=null?_server_b_fibers$Back:throw_on_client,RootBackgroundSyncRun=(_server_b_fibers$Root2=(_server_b_fibers34=server_b_fibers)==null?void 0:_server_b_fibers34.RootBackgroundSyncRun)!=null?_server_b_fibers$Root2:throw_on_client,set_global_fiber_timeout=(_server_b_fibers$set_3=(_server_b_fibers35=server_b_fibers)==null?void 0:_server_b_fibers35.set_global_fiber_timeout)!=null?_server_b_fibers$set_3:throw_on_client,fiber_finalize=(_server_b_fibers$fibe5=(_server_b_fibers36=server_b_fibers)==null?void 0:_server_b_fibers36.fiber_finalize)!=null?_server_b_fibers$fibe5:throw_on_client,Sync=(_server_b_fibers$Sync2=(_server_b_fibers37=server_b_fibers)==null?void 0:_server_b_fibers37.Sync)!=null?_server_b_fibers$Sync2:throw_on_client,Parallel=(_server_b_fibers$Para=(_server_b_fibers38=server_b_fibers)==null?void 0:_server_b_fibers38.Parallel)!=null?_server_b_fibers$Para:throw_on_client,es6_await=(_server_b_fibers$awai=(_server_b_fibers39=server_b_fibers)==null?void 0:_server_b_fibers39.await)!=null?_server_b_fibers$awai:throw_on_client,FiberTimeout=(_server_b_fibers$Fibe=(_server_b_fibers40=server_b_fibers)==null?void 0:_server_b_fibers40.FiberTimeout)!=null?_server_b_fibers$Fibe:throw_on_client,GetFiberTimeout=(_server_b_fibers$GetF=(_server_b_fibers41=server_b_fibers)==null?void 0:_server_b_fibers41.GetFiberTimeout)!=null?_server_b_fibers$GetF:throw_on_client,suspend_fiber_timeout=(_server_b_fibers$susp=(_server_b_fibers42=server_b_fibers)==null?void 0:_server_b_fibers42.suspend_fiber_timeout)!=null?_server_b_fibers$susp:throw_on_client,Block=(_server_b_fibers$Bloc=(_server_b_fibers43=server_b_fibers)==null?void 0:_server_b_fibers43.Block)!=null?_server_b_fibers$Bloc:throw_on_client,pause=(_server_b_fibers$paus=(_server_b_fibers44=server_b_fibers)==null?void 0:_server_b_fibers44.pause)!=null?_server_b_fibers$paus:throw_on_client,get_current_fiber_activity=(_server_b_fibers$get_4=(_server_b_fibers45=server_b_fibers)==null?void 0:_server_b_fibers45.get_current_fiber_activity)!=null?_server_b_fibers$get_4:throw_on_client,get_current_fiber_workload_used_units=(_server_b_fibers$get_5=(_server_b_fibers46=server_b_fibers)==null?void 0:_server_b_fibers46.get_current_fiber_workload_used_units)!=null?_server_b_fibers$get_5:throw_on_client}});var b_async_exports={};__export(b_async_exports,{FakeKey:()=>FakeKey,Key:()=>Key,KeyBase:()=>KeyBase,KeyList:()=>KeyList,MakeKey:()=>MakeKey,MakeKeyList:()=>MakeKeyList,MakeSwitch:()=>MakeSwitch,Promise:()=>Promise3,PromiseClass:()=>PromiseClass,Switch:()=>Switch,SyncWait:()=>SyncWait,TransientKeyList:()=>TransientKeyList,WaitFor:()=>WaitFor,ensure_ready:()=>ensure_ready,promise_array:()=>promise_array,retry:()=>retry,retry_on_match:()=>retry_on_match,run_without_catching_not_ready:()=>run_without_catching_not_ready,throw_not_ready:()=>throw_not_ready,timeout_promise:()=>timeout_promise,timeout_warning:()=>timeout_warning});function identity2(x){return x}function Promise3(data,name){return data!=null&&(data instanceof PromiseClass||typeof data.then=="function")?data:new PromiseClass(data,name)}function promise_array(promises){if(promises.length===0)return Promise3([]);if(promises.length===1)return promises[0].then(res=>[res]);let[left_half,right_half]=partition(promises);return promise_array(left_half).then(left_results=>promise_array(right_half).then(right_results=>left_results.concat(right_results)))}function timeout_promise(timeout){let promise=Promise3(null,`b_async.timeout_promise:${timeout}`);return setTimeout(promise.resolve.bind(promise),timeout),promise}function throw_not_ready(key,can_catch){var _can_catch;if((_can_catch=can_catch)!=null||(can_catch=!0),can_catch&&async_state_default.CurrentNotReadyCatcher&&!NeverCatchNotReady)async_state_default.CurrentNotReadyCatcher.push(key);else throw new NotReadyError(key)}function run_without_catching_not_ready(fn){let old_not_ready_status=NeverCatchNotReady;try{NeverCatchNotReady=!0,fn()}finally{NeverCatchNotReady=old_not_ready_status}}function ensure_ready(key,can_catch){var _can_catch2,_b_fiber$Fiber;return(_can_catch2=can_catch)!=null||(can_catch=!0),key.is_turned()?!0:((_b_fiber$Fiber=Fiber)==null?void 0:_b_fiber$Fiber.current)!=null&&!running_test()?(SyncWait(key),!0):(throw_not_ready(key,can_catch),!1)}function retry_on_match(_ref){let{retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn}=_ref;if(typeof retries2!="number")throw new UnexpectedError("b_async.retry bad retries");if(typeof try_fn!="function")throw new UnexpectedError("b_async.retry bad function param");try{let result=try_fn();return match_fn&&match_fn(null,result)?retry_body({retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn},new UnexpectedError("retry_on_match is looping")):result}catch(err){if(match_fn&&!match_fn(err))throw err;return retry_body({retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn},err)}}function retry_body(_ref2,err){let{retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn}=_ref2;if(err instanceof Error&&safe_contains(err.message,QUEUE_TIMEOUT)||!(retries2>0))throw err;return delay2&&pause(jitter(delay2),"retry on match delay"),before_retry_fn==null||before_retry_fn(err),retry_on_match({retries:retries2-1,delay:delay2,try_fn,match_fn,before_retry_fn})}function retry(retries2,delay2,try_fn){return retry_on_match({retries:retries2,delay:delay2,try_fn})}function SyncWait(){for(var _len=arguments.length,keys2=new Array(_len),_key=0;_key<_len;_key++)keys2[_key]=arguments[_key];let key_set=TransientKeyList(keys2);if(key_set.is_turned())return;let block=Block(key_set.toString());WaitFor(key_set,block.success.bind(block)),block.wait()}function MakeKey(timeout,name,timeout_cb){return name||error("anonymous key created: please name it: b_async.MakeKey(null, 'my name') or b_async.MakeKey(timeout, 'my name')"),new Key(timeout,name,timeout_cb)}function FakeKey(){return __fake_key||(__fake_key=MakeKey(void 0,"fake_key"),__fake_key.turn()),__fake_key}function WaitFor(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];let adjustedLength=Math.max(args.length,1),keys2=args.slice(0,adjustedLength-1),func=args[adjustedLength-1];if(func==null)return;let flattened_keys=keys2.flat(),keylist=TransientKeyList(flattened_keys);keylist.is_turned()?func():keylist.listen(new Waiter(func))}function timeout_warning(name,seconds,cb){let wait_seconds=seconds!=null?seconds:40,timeout=setTimeout(function(){typeof name=="function"&&(name=name()),info("Key failed to return after timeout",{wait_seconds,name}),cb==null||cb()},wait_seconds*1e3);return()=>clearTimeout(timeout)}function MakeSwitch(timeout,name){if(name||error("anonymous switch created: please name it"),timeout)throw new UnexpectedError("switch timeout not implemented");return new Switch(name)}function MakeKeyList(keys2){return new KeyList(keys2)}function TransientKeyList(keys2){return new KeyList(keys2,!0)}var import_web_dom_collections_iterator13,import_es_error_cause6,PromiseClass,NeverCatchNotReady,__fake_key,_simple_listener_id,KeyBase,Waiter,Key,Switch,KeyList,init_b_async=__esm({"lib-browser/u/shared/async/new/b_async.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator13=__toESM(require_web_dom_collections_iterator()),import_es_error_cause6=__toESM(require_es_error_cause());init_async_state();init_backoff();init_b_string();init_b_array();init_dependency();init_errors();init_b_fiber();init_mode_check();init_logger();PromiseClass=class _PromiseClass{constructor(data,name){if(this._fails=void 0,this._dones=void 0,this._done=void 0,this._waiting_on=void 0,this.prefetching=!1,this._error=void 0,this._value=void 0,this._handled_error=!1,this._ready_key=void 0,this._fails=[],this._dones=[],this._done=!1,name)this._waiting_on=name;else if(typeof data=="function"){let val;try{val=data()}catch(err){this.reject(err);return}this.resolve(val)}else this.resolve(data)}get_prefetching(){return this.prefetching?this.prefetching:this._waiting_on instanceof _PromiseClass?this._waiting_on.get_prefetching():!1}toString(){if(this._done){var _this$_error;return`Promise(${String((_this$_error=this._error)!=null?_this$_error:this._value)})`}else return this._waiting_on instanceof _PromiseClass?String(this._waiting_on):`Promise(waiting on ${String(this._waiting_on)})`}reject(err){if(!this._done)if(err instanceof NotReadyError&&warn("Promise rejected with a not-ready key: use a autorun.run_once!"),this._done=!0,this._waiting_on=void 0,this._error=err,this._fails.length>0)for(let cb of this._fails)cb(err);else on_client()&&setTimeout(()=>{if(!this._handled_error)throw err},100)}resolve(val){if(!this._done)if(val instanceof _PromiseClass)this._waiting_on=val,val._attach_success(new_val=>this.resolve(new_val)),val._attach_failure(err=>this.reject(err));else{this._done=!0,this._waiting_on=void 0,this._value=val;for(let cb of this._dones)cb(val)}}_attach_success(cb){if(typeof cb!="function")throw new UnexpectedError("not a function");this._done?this._error==null&&cb(this._value):this._dones.push(cb)}_attach_failure(cb){if(typeof cb!="function")throw new UnexpectedError("not a function");this._done?this._error!=null&&(cb(this._error),this._handled_error=!0):this._fails.push(cb)}then(done_filter,fail_filter){let done_fn=done_filter!=null?done_filter:identity2,error_fn=fail_filter!=null?fail_filter:identity2,promise=Promise3(null,this);return this._attach_success(val=>{let new_val;try{new_val=done_fn(val)}catch(err){promise.reject(err);return}promise.resolve(new_val)}),this._attach_failure(err=>{let new_err;try{new_err=error_fn(err)}catch(e){new_err=e}new_err!=null?promise.reject(new_err):promise.resolve(void 0)}),promise}callback(cb){this.then(res=>{cb(null,res)},err=>(cb(err),null))}done(cb){var _cb;(_cb=cb)!=null||(cb=identity2),this._attach_success(cb),this._attach_failure(err=>{err!=null&&setTimeout(()=>{throw err},1)})}block(){let block=Block(this.toString(),this.get_prefetching());return this.callback((err,value)=>{err!=null?block.fail(err):block.success(value)}),block.wait()}block_promise(timeout){return on_server()&&suspend_fiber_timeout(timeout,()=>this.block()),this}sync(){if(on_server())return this.block();if(ensure_ready(this.ready_key(),!1),this._error!=null)throw this._error;return this._value}ready_key(){if(!this._ready_key){let key=MakeKey(void 0,()=>this.toString());this._ready_key=key,this._attach_success(()=>key.turn()),this._attach_failure(()=>key.turn())}return this._ready_key}inspect(){return this._done?this._error!=null?{state:"rejected",reason:this._error}:{state:"fulfilled",value:this._value}:{state:"pending"}}make_cb(){return(err,res)=>err!=null?this.reject(err):this.resolve(res)}};NeverCatchNotReady=!1;__fake_key=null;_simple_listener_id=0,KeyBase=class{constructor(){this._id=void 0,this._listeners=void 0,this._listener_count=0,this._turned_dependency=void 0}id(){return this._id||(this._id=_simple_listener_id,_simple_listener_id++),this._id}listen(listener){var _this$_listeners;(_this$_listeners=this._listeners)!=null||(this._listeners={});let id=listener.id();if(this._listeners[id]==null&&(this._listeners[id]=listener,this._listener_count++,this._listener_count===1e4)){var _window5;(!is_edit_mode()||(_window5=window)!=null&&_window5.current_user_is_admin)&&warn("Listener count at 10000",{key:String(this)})}}unlisten(key){var _this$_listeners2;let id=key.id();((_this$_listeners2=this._listeners)==null?void 0:_this$_listeners2[id])!=null&&(delete this._listeners[id],this._listener_count--)}turned_dependency(){var _this$_turned_depende;return(_this$_turned_depende=this._turned_dependency)!=null||(this._turned_dependency=Dependency()),this._turned_dependency}_was_updated(){var _this$_listeners3;let object2=(_this$_listeners3=this._listeners)!=null?_this$_listeners3:{};for(let id in object2)object2[id].notify(this);if(this.is_turned()){var _this$_turned_depende2;(_this$_turned_depende2=this._turned_dependency)==null||_this$_turned_depende2.invalidate()}this.is_dead()&&(this._listeners=void 0,this._turned_dependency=void 0)}_update_dead(){var _this$_listeners4;if(!this.is_dead())throw new UnexpectedError("not dead");let object2=(_this$_listeners4=this._listeners)!=null?_this$_listeners4:{};for(let id in object2)object2[id].notify_dead(this);this._listeners=void 0,this._turned_dependency=void 0}to_promise(){let promise=Promise3(null,this);return WaitFor(this,()=>promise.resolve()),promise}toString(){return`KeyBase of type ${this.constructor.name}`}};Waiter=class extends KeyBase{constructor(fn){super(),this.fn=void 0,this.fn=fn}is_dead(){return this.fn!=null}is_turned(){return this.fn!=null}max_expected_time(){return null}notify(keylist){if(keylist.is_turned()){var _this$fn;(_this$fn=this.fn)==null||_this$fn.call(this),this.fn=null,this._was_updated()}}notify_dead(){}toString(){var _this$fn2;return`Waiter {${String((_this$fn2=this.fn)==null?void 0:_this$fn2.toString().slice(0,100))}...}`}};Key=class extends KeyBase{constructor(timeout_length,name,timeout_cb){super(),this.timeout_length=void 0,this.name=void 0,this.end_time=void 0,this.timeout=void 0,this._turned=void 0,this.timeout_length=timeout_length,this.name=name,this.timeout_length&&this.timeout_length!==1/0&&(this.end_time=Date.now()+1e3*this.timeout_length,this.timeout=timeout_warning(this.name,this.timeout_length,timeout_cb)),this._turned=!1}is_turned(){return this._turned}is_dead(){return this._turned}max_expected_time(){return this.is_turned()||!this.end_time?null:this.timeout_length===1/0?1/0:this.end_time-Date.now()}turn(){var _this$timeout;this._turned||(this._turned=!0,this._was_updated(),(_this$timeout=this.timeout)==null||_this$timeout.call(this))}toString(){return this.name!=null?"Key "+(typeof this.name=="function"?this.name():this.name):"Anonymous Key"}};Switch=class extends KeyBase{constructor(name){super(),this.name=void 0,this._turned=void 0,this._destroyed=void 0,this.name=name,this._turned=!1,this._destroyed=!1}is_turned(){return this._turned}is_dead(){return this._destroyed}max_expected_time(){return null}turn_off(){if(this._turned){if(this._destroyed)throw new UnexpectedError("cannot turn off a destroyed switch");this._turned=!1,this._was_updated()}}turn_on(){this._turned||(this._turned=!0,this._was_updated())}destroy(){this._destroyed=!0,this._turned?this._update_dead():this.turn_on()}toString(){return this.name?"Switch "+this.name:"Anonymous Switch"}};KeyList=class extends KeyBase{constructor(keys2){let transient2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super(),this.transient=void 0,this._keys=void 0,this._unturned=void 0,this._destroyed=void 0,this._batch_turned=void 0,this.transient=transient2,this._keys={},this._unturned=0;for(let key of keys2!=null?keys2:[])this.add_key(key)}is_turned(){return this._unturned===0}is_dead(){var _this$_destroyed;return(_this$_destroyed=this._destroyed)!=null?_this$_destroyed:!1}make_transient(){return TransientKeyList(Object.values(this._keys))}remove_all(){for(let id in this._keys){let key=this._keys[id];this._remove(key)}this._unturned=0}_was_updated(){this._batch_turned===void 0&&super._was_updated()}batch_notifications(){this._batch_turned=this.is_turned()}notify_batch(){if(this._batch_turned===void 0)throw new UnexpectedError("batch_notification not called");let updated=this._batch_turned!==this.is_turned();this._batch_turned=void 0,updated&&this._was_updated()}_inc(){this._unturned++,this._unturned===1&&this._was_updated()}_dec(){this._unturned--,this._unturned===0&&this._was_updated()}max_expected_time(){let expected=Object.values(this._keys).map(key=>key.max_expected_time()).filter(t=>!!t);return expected.length?Math.min(...expected):null}add_key(key){if(this._destroyed===!0)throw new UnexpectedError("cannot add key to a destroyed list");if(!key.is_dead()&&this._keys[key.id()]==null){if(!key.is_turned())this._inc();else if(this.transient)return;this._keys[key.id()]=key,key.listen(this)}}notify(key){key.is_turned()?this._dec():this._inc(),(key.is_dead()||this.transient)&&this._remove(key)}notify_dead(key){this._remove(key)}_remove(key){delete this._keys[key.id()],key.unlisten(this)}add_promise(promise){return this.add_key(promise.ready_key())}make(timeout,name,timeout_cb){let key=MakeKey(timeout,name,timeout_cb);return this.add_key(key),key}get(){return Object.values(this._keys)}toString(){let my_keys=this.get(),unturned_key_strings=my_keys.filter(key=>key.is_turned!=null&&!key.is_turned()).map(key=>key.toString());return`[KeyList(${my_keys.length}) ${unturned_key_strings.join(", ")} ]`}destroy(){this._destroyed=!0;for(let id in this._keys)this._keys[id].unlisten(this);this._keys={},this._unturned===0?this._update_dead():(this._unturned=0,this._was_updated())}}}});var state3,async_state_default2,init_async_state2=__esm({"lib-browser/u/shared/async/old/async_state.js"(){"use strict";init_define_process_env();init_shim();state3={CurrentAutoRun:null,CurrentNotReadyCatcher:null,server_connection_problems:!1},async_state_default2=state3}});var dependency_exports2={};__export(dependency_exports2,{Dependency:()=>Dependency2,DependencyClass:()=>DependencyClass2});function Dependency2(){return new DependencyClass2}var import_web_dom_collections_iterator14,DependencyClass2,init_dependency2=__esm({"lib-browser/u/shared/async/old/dependency.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator14=__toESM(require_web_dom_collections_iterator());init_async_state2();init_uuid();DependencyClass2=class{constructor(){this.runs=void 0,this.count=void 0,this.no_scheduled_collection=void 0,this.runs={},this.count=0,this.no_scheduled_collection=!0}register(curAuto){var _curAuto;(_curAuto=curAuto)!=null||(curAuto=async_state_default2.CurrentAutoRun),curAuto!=null&&(this.runs[curAuto.id]=curAuto,this.count++,curAuto._has_dependency=!0,this.no_scheduled_collection&&this.count>50&&(this.no_scheduled_collection=!1,this.schedule_collection()))}is_registered(curAuto){var _curAuto2;return(_curAuto2=curAuto)!=null||(curAuto=async_state_default2.CurrentAutoRun),curAuto!=null&&this.runs[curAuto.id]!=null}needed(){return this.count===0?!1:(this.garbage_collect(),this.count>0)}garbage_collect(){let old=this.runs;this.runs={},this.count=0;for(let k in old){let v=old[k];v._is_destroyed||(this.runs[k]=v,this.count++)}}schedule_collection(){setTimeout(()=>{this.no_scheduled_collection=!0,this.garbage_collect()},3e4)}once_invalidate(fn){let temporary_autorun={_is_destroyed:!1,invalidate:()=>{try{fn()}finally{temporary_autorun._is_destroyed=!0}}};this.runs[LUID()]=temporary_autorun}invalidate(){let to_invalidate=Object.values(this.runs);this.runs={},this.count=0;for(let run of to_invalidate)run.invalidate()}}}});var b_async_exports2={};__export(b_async_exports2,{FakeKey:()=>FakeKey2,Key:()=>Key2,KeyBase:()=>KeyBase2,KeyList:()=>KeyList2,MakeKey:()=>MakeKey2,MakeKeyList:()=>MakeKeyList2,MakeSwitch:()=>MakeSwitch2,Promise:()=>Promise4,PromiseClass:()=>PromiseClass2,Switch:()=>Switch2,SyncWait:()=>SyncWait2,TransientKeyList:()=>TransientKeyList2,WaitFor:()=>WaitFor2,ensure_ready:()=>ensure_ready2,promise_array:()=>promise_array2,retry:()=>retry2,retry_on_match:()=>retry_on_match2,run_without_catching_not_ready:()=>run_without_catching_not_ready2,throw_not_ready:()=>throw_not_ready2,timeout_promise:()=>timeout_promise2,timeout_warning:()=>timeout_warning2});function identity3(x){return x}function Promise4(data,name){return data!=null&&(data instanceof PromiseClass2||typeof data.then=="function")?data:new PromiseClass2(data,name)}function promise_array2(promises){if(promises.length===0)return Promise4([]);if(promises.length===1)return promises[0].then(res=>[res]);let[left_half,right_half]=partition(promises);return promise_array2(left_half).then(left_results=>promise_array2(right_half).then(right_results=>left_results.concat(right_results)))}function timeout_promise2(timeout){let promise=Promise4(null,`b_async.timeout_promise:${timeout}`);return setTimeout(promise.resolve.bind(promise),timeout),promise}function throw_not_ready2(key,can_catch){var _can_catch;if((_can_catch=can_catch)!=null||(can_catch=!0),key.turned_dependency().register(),can_catch&&async_state_default2.CurrentNotReadyCatcher&&!NeverCatchNotReady2)async_state_default2.CurrentNotReadyCatcher.push(key);else throw new NotReadyError(key)}function run_without_catching_not_ready2(fn){let old_not_ready_status=NeverCatchNotReady2;try{NeverCatchNotReady2=!0,fn()}finally{NeverCatchNotReady2=old_not_ready_status}}function ensure_ready2(key,can_catch){var _can_catch2,_b_fiber$Fiber;return(_can_catch2=can_catch)!=null||(can_catch=!0),key.is_turned()?!0:((_b_fiber$Fiber=Fiber)==null?void 0:_b_fiber$Fiber.current)!=null&&!running_test()?(SyncWait2(key),!0):(throw_not_ready2(key,can_catch),!1)}function retry_on_match2(_ref){let{retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn}=_ref;if(typeof retries2!="number")throw new UnexpectedError("b_async.retry bad retries");if(typeof try_fn!="function")throw new UnexpectedError("b_async.retry bad function param");try{let result=try_fn();return match_fn&&match_fn(null,result)?retry_body2({retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn},new UnexpectedError("retry_on_match is looping")):result}catch(err){if(match_fn&&!match_fn(err))throw err;return retry_body2({retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn},err)}}function retry_body2(_ref2,err){let{retries:retries2,delay:delay2,try_fn,match_fn,before_retry_fn}=_ref2;if(err instanceof Error&&safe_contains(err.message,QUEUE_TIMEOUT)||!(retries2>0))throw err;return delay2&&pause(jitter(delay2),"retry on match delay"),before_retry_fn==null||before_retry_fn(err),retry_on_match2({retries:retries2-1,delay:delay2,try_fn,match_fn,before_retry_fn})}function retry2(retries2,delay2,try_fn){return retry_on_match2({retries:retries2,delay:delay2,try_fn})}function SyncWait2(){for(var _len=arguments.length,keys2=new Array(_len),_key=0;_key<_len;_key++)keys2[_key]=arguments[_key];let key_set=TransientKeyList2(keys2);if(key_set.is_turned())return;let block=Block(key_set.toString());WaitFor2(key_set,block.success.bind(block)),block.wait()}function MakeKey2(timeout,name,timeout_cb){return name||error("anonymous key created: please name it: b_async.MakeKey(null, 'my name') or b_async.MakeKey(timeout, 'my name')"),new Key2(timeout,name,timeout_cb)}function FakeKey2(){return __fake_key2||(__fake_key2=MakeKey2(void 0,"fake_key"),__fake_key2.turn()),__fake_key2}function WaitFor2(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];let adjustedLength=Math.max(args.length,1),keys2=args.slice(0,adjustedLength-1),func=args[adjustedLength-1];if(func==null)return;let flattened_keys=keys2.flat(),keylist=TransientKeyList2(flattened_keys);keylist.is_turned()?func():keylist.listen(new Waiter2(func))}function timeout_warning2(name,seconds,cb){let wait_seconds=seconds!=null?seconds:40,timeout=setTimeout(function(){typeof name=="function"&&(name=name()),info("Key failed to return after timeout",{wait_seconds,name}),cb==null||cb()},wait_seconds*1e3);return()=>clearTimeout(timeout)}function MakeSwitch2(timeout,name){if(name||error("anonymous switch created: please name it"),timeout)throw new UnexpectedError("switch timeout not implemented");return new Switch2(name)}function MakeKeyList2(keys2){return new KeyList2(keys2)}function TransientKeyList2(keys2){return new KeyList2(keys2,!0)}var import_web_dom_collections_iterator15,import_es_error_cause7,PromiseClass2,NeverCatchNotReady2,__fake_key2,_simple_listener_id2,KeyBase2,Waiter2,Key2,Switch2,KeyList2,init_b_async2=__esm({"lib-browser/u/shared/async/old/b_async.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator15=__toESM(require_web_dom_collections_iterator()),import_es_error_cause7=__toESM(require_es_error_cause());init_async_state2();init_backoff();init_b_string();init_b_array();init_dependency2();init_errors();init_b_fiber();init_mode_check();init_logger();PromiseClass2=class _PromiseClass{constructor(data,name){if(this._fails=void 0,this._dones=void 0,this._done=void 0,this._waiting_on=void 0,this.prefetching=!1,this._error=void 0,this._value=void 0,this._handled_error=!1,this._ready_key=void 0,this._fails=[],this._dones=[],this._done=!1,name)this._waiting_on=name;else if(typeof data=="function"){let val;try{val=data()}catch(err){this.reject(err);return}this.resolve(val)}else this.resolve(data)}get_prefetching(){return this.prefetching?this.prefetching:this._waiting_on instanceof _PromiseClass?this._waiting_on.get_prefetching():!1}toString(){if(this._done){var _this$_error;return`Promise(${String((_this$_error=this._error)!=null?_this$_error:this._value)})`}else return this._waiting_on instanceof _PromiseClass?String(this._waiting_on):`Promise(waiting on ${String(this._waiting_on)})`}reject(err){if(!this._done)if(err instanceof NotReadyError&&warn("Promise rejected with a not-ready key: use a autorun.run_once!"),this._done=!0,this._waiting_on=void 0,this._error=err,this._fails.length>0)for(let cb of this._fails)cb(err);else on_client()&&setTimeout(()=>{if(!this._handled_error)throw err},100)}resolve(val){if(!this._done)if(val instanceof _PromiseClass)this._waiting_on=val,val._attach_success(new_val=>this.resolve(new_val)),val._attach_failure(err=>this.reject(err));else{this._done=!0,this._waiting_on=void 0,this._value=val;for(let cb of this._dones)cb(val)}}_attach_success(cb){if(typeof cb!="function")throw new UnexpectedError("not a function");this._done?this._error==null&&cb(this._value):this._dones.push(cb)}_attach_failure(cb){if(typeof cb!="function")throw new UnexpectedError("not a function");this._done?this._error!=null&&(cb(this._error),this._handled_error=!0):this._fails.push(cb)}then(done_filter,fail_filter){let done_fn=done_filter!=null?done_filter:identity3,error_fn=fail_filter!=null?fail_filter:identity3,promise=Promise4(null,this);return this._attach_success(val=>{let new_val;try{new_val=done_fn(val)}catch(err){promise.reject(err);return}promise.resolve(new_val)}),this._attach_failure(err=>{let new_err;try{new_err=error_fn(err)}catch(e){new_err=e}new_err!=null?promise.reject(new_err):promise.resolve(void 0)}),promise}callback(cb){this.then(res=>{cb(null,res)},err=>(cb(err),null))}done(cb){var _cb;(_cb=cb)!=null||(cb=identity3),this._attach_success(cb),this._attach_failure(err=>{err!=null&&setTimeout(()=>{throw err},1)})}block(){let block=Block(this.toString(),this.get_prefetching());return this.callback((err,value)=>{err!=null?block.fail(err):block.success(value)}),block.wait()}block_promise(timeout){return on_server()&&suspend_fiber_timeout(timeout,()=>this.block()),this}sync(){if(on_server())return this.block();if(ensure_ready2(this.ready_key(),!1),this._error!=null)throw this._error;return this._value}ready_key(){if(!this._ready_key){let key=MakeKey2(void 0,()=>this.toString());this._ready_key=key,this._attach_success(()=>key.turn()),this._attach_failure(()=>key.turn())}return this._ready_key}inspect(){return this._done?this._error!=null?{state:"rejected",reason:this._error}:{state:"fulfilled",value:this._value}:{state:"pending"}}make_cb(){return(err,res)=>err!=null?this.reject(err):this.resolve(res)}};NeverCatchNotReady2=!1;__fake_key2=null;_simple_listener_id2=0,KeyBase2=class{constructor(){this._id=void 0,this._listeners=void 0,this._listener_count=0,this._turned_dependency=void 0}id(){return this._id||(this._id=_simple_listener_id2,_simple_listener_id2++),this._id}listen(listener){var _this$_listeners;(_this$_listeners=this._listeners)!=null||(this._listeners={});let id=listener.id();if(this._listeners[id]==null&&(this._listeners[id]=listener,this._listener_count++,this._listener_count===1e4)){var _window5;(!is_edit_mode()||(_window5=window)!=null&&_window5.current_user_is_admin)&&warn("Listener count at 10000",{key:String(this)})}}unlisten(key){var _this$_listeners2;let id=key.id();((_this$_listeners2=this._listeners)==null?void 0:_this$_listeners2[id])!=null&&(delete this._listeners[id],this._listener_count--)}turned_dependency(){var _this$_turned_depende;return(_this$_turned_depende=this._turned_dependency)!=null||(this._turned_dependency=Dependency2()),this._turned_dependency}is_registered(curAuto){return this.turned_dependency().is_registered(curAuto)}_was_updated(){var _this$_listeners3;let object2=(_this$_listeners3=this._listeners)!=null?_this$_listeners3:{};for(let id in object2)object2[id].notify(this);if(this.is_turned()){var _this$_turned_depende2;(_this$_turned_depende2=this._turned_dependency)==null||_this$_turned_depende2.invalidate()}this.is_dead()&&(delete this._listeners,delete this._turned_dependency)}_update_dead(){var _this$_listeners4;if(!this.is_dead())throw new UnexpectedError("not dead");let object2=(_this$_listeners4=this._listeners)!=null?_this$_listeners4:{};for(let id in object2)object2[id].notify_dead(this);delete this._listeners,delete this._turned_dependency}to_promise(){let promise=Promise4(null,this);return WaitFor2(this,()=>promise.resolve()),promise}toString(){return`KeyBase of type ${this.constructor.name}`}};Waiter2=class extends KeyBase2{constructor(fn){super(),this.fn=void 0,this.fn=fn}is_dead(){return this.fn!=null}is_turned(){return this.fn!=null}max_expected_time(){return null}notify(keylist){if(keylist.is_turned()){var _this$fn;(_this$fn=this.fn)==null||_this$fn.call(this),this.fn=null,this._was_updated()}}notify_dead(){}toString(){var _this$fn2;return`Waiter {${String((_this$fn2=this.fn)==null?void 0:_this$fn2.toString().slice(0,100))}...}`}};Key2=class extends KeyBase2{constructor(timeout_length,name,timeout_cb){super(),this.timeout_length=void 0,this.name=void 0,this.end_time=void 0,this.timeout=void 0,this._turned=void 0,this.timeout_length=timeout_length,this.name=name,this.timeout_length&&this.timeout_length!==1/0&&(this.end_time=Date.now()+1e3*this.timeout_length,this.timeout=timeout_warning2(this.name,this.timeout_length,timeout_cb)),this._turned=!1}is_turned(){return this._turned}is_dead(){return this._turned}max_expected_time(){return this.is_turned()||!this.end_time?null:this.timeout_length===1/0?1/0:this.end_time-Date.now()}turn(){var _this$timeout;this._turned||(this._turned=!0,this._was_updated(),(_this$timeout=this.timeout)==null||_this$timeout.call(this))}toString(){return this.name!=null?"Key "+(typeof this.name=="function"?this.name():this.name):"Anonymous Key"}};Switch2=class extends KeyBase2{constructor(name){super(),this.name=void 0,this._turned=void 0,this._destroyed=void 0,this.name=name,this._turned=!1,this._destroyed=!1}is_turned(){return this._turned}is_dead(){return this._destroyed}max_expected_time(){return null}turn_off(){if(this._turned){if(this._destroyed)throw new UnexpectedError("cannot turn off a destroyed switch");this._turned=!1,this._was_updated()}}turn_on(){this._turned||(this._turned=!0,this._was_updated())}destroy(){this._destroyed=!0,this._turned?this._update_dead():this.turn_on()}toString(){return this.name?"Switch "+this.name:"Anonymous Switch"}};KeyList2=class extends KeyBase2{constructor(keys2){let transient2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super(),this.transient=void 0,this._keys=void 0,this._unturned=void 0,this._destroyed=void 0,this.transient=transient2,this._keys={},this._unturned=0;for(let key of keys2!=null?keys2:[])this.add_key(key)}is_turned(){return this._unturned===0}is_dead(){var _this$_destroyed;return(_this$_destroyed=this._destroyed)!=null?_this$_destroyed:!1}make_transient(){return TransientKeyList2(Object.values(this._keys))}remove_all(){let was_turned=this.is_turned();for(let id in this._keys){let key=this._keys[id];this._remove(key)}this._unturned=0,was_turned||this._was_updated()}_inc(){this._unturned++,this._unturned===1&&this._was_updated()}_dec(){this._unturned--,this._unturned===0&&this._was_updated()}max_expected_time(){let expected=Object.values(this._keys).map(key=>key.max_expected_time()).filter(t=>!!t);return expected.length?Math.min(...expected):null}add_key(key){if(this._destroyed===!0)throw new UnexpectedError("cannot add key to a destroyed list");if(!key.is_dead()&&this._keys[key.id()]==null){if(!key.is_turned())this._inc();else if(this.transient)return;this._keys[key.id()]=key,key.listen(this)}}notify(key){key.is_turned()?this._dec():this._inc(),(key.is_dead()||this.transient)&&this._remove(key)}notify_dead(key){this._remove(key)}_remove(key){delete this._keys[key.id()],key.unlisten(this)}add_promise(promise){return this.add_key(promise.ready_key())}make(timeout,name,timeout_cb){let key=MakeKey2(timeout,name,timeout_cb);return this.add_key(key),key}get(){return Object.values(this._keys)}toString(){let my_keys=this.get(),unturned_key_strings=my_keys.filter(key=>key.is_turned!=null&&!key.is_turned()).map(key=>key.toString());return`[KeyList(${my_keys.length}) ${unturned_key_strings.join(", ")} ]`}destroy(){this._destroyed=!0;for(let id in this._keys)this._keys[id].unlisten(this);this._keys={},this._unturned===0?this._update_dead():(this._unturned=0,this._was_updated())}}}});var require_b_async=__commonJS({"lib-browser/u/shared/async/b_async.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(init_newautorun(),__toCommonJS(newautorun_exports)).enable_new_autorun?module2.exports=(init_b_async(),__toCommonJS(b_async_exports)):module2.exports=(init_b_async2(),__toCommonJS(b_async_exports2))}});var _otel,_otel2,_otel$getBaggageEntry,_otel3,_otel$getAllBaggageEn,_otel4,_otel$withBaggageEntr,_otel5,_otel$getActiveSpan,_otel6,_otel$getActiveContex,_otel7,_otel$withContext,_otel8,_otel$getActiveSpanCo,_otel9,_otel$withSpanContext,_otel10,_otel$traceAsync,_otel11,otel,transactionState,Span,Transaction,startTransaction,endTransaction,addTransactionLabels,startSpan,endSpan,_traceSpanCb,createSpan,traceSpan,noOpCb,traceSpanCallback,getCompletedTransactions,clearCompletedTransactions,getBaggageEntry,getAllBaggageEntries,withBaggageEntries,getActiveSpan,getActiveContext,withContext,getActiveSpanContext,withSpanContext,traceSpanAsync,init_clientApm=__esm({"lib-browser/monitoring/apm/clientApm.js"(){"use strict";init_define_process_env();init_shim();init_logger();init_mode_check();otel=null,transactionState={currentTransaction:null,completedTransactions:[]},Span=class{constructor(name){let labels=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sync=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.name=name,this.labels=labels,this.sync=sync,this.start=Date.now()}end(){this.end=Date.now()}setStart(start3){this.start=start3}},Transaction=class extends Span{constructor(name,labels){super(name,labels),this.spans=[]}startSpan(name){let labels=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sync=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,span2=new Span(name,labels,sync);return this.spans.push(span2),span2}end(){super.end(),transactionState.completedTransactions.push(transactionState.currentTransaction),transactionState.currentTransaction=null}},startTransaction=function(name,labels){if(transactionState.currentTransaction){warn("APM: Only one transaction can exist at a time");return}return transactionState.currentTransaction=new Transaction(name,labels),transactionState.currentTransaction},endTransaction=function(transaction){transaction&&transaction.end()},addTransactionLabels=function(labels){transactionState.currentTransaction&&Object.assign(transactionState.currentTransaction.labels,labels)};(_otel=otel)!=null&&_otel.trace&&(addTransactionLabels=otel.addSpanAttributes);startSpan=function(name){let labels=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sync=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(transactionState.currentTransaction)return transactionState.currentTransaction.startSpan(name,labels,sync)},endSpan=function(span2){span2&&span2.end()},_traceSpanCb=function(name,labels,fn){let span2=startSpan(name,labels,!0);try{return fn()}finally{endSpan(span2)}},createSpan=()=>({end:()=>{}}),traceSpan=_traceSpanCb,noOpCb=()=>{},traceSpanCallback=(name,labels,fn)=>fn({cb:noOpCb});(_otel2=otel)!=null&&_otel2.trace&&(createSpan=otel.createSpan,traceSpan=otel.trace,traceSpanCallback=otel.traceCallback);getCompletedTransactions=()=>transactionState.completedTransactions,clearCompletedTransactions=()=>transactionState.completedTransactions=[],getBaggageEntry=(_otel$getBaggageEntry=(_otel3=otel)==null?void 0:_otel3.getBaggageEntry)!=null?_otel$getBaggageEntry:()=>{},getAllBaggageEntries=(_otel$getAllBaggageEn=(_otel4=otel)==null?void 0:_otel4.getAllBaggageEntries)!=null?_otel$getAllBaggageEn:()=>{},withBaggageEntries=(_otel$withBaggageEntr=(_otel5=otel)==null?void 0:_otel5.withBaggageEntries)!=null?_otel$withBaggageEntr:(entries,fn)=>fn(),getActiveSpan=(_otel$getActiveSpan=(_otel6=otel)==null?void 0:_otel6.getActiveSpan)!=null?_otel$getActiveSpan:()=>{},getActiveContext=(_otel$getActiveContex=(_otel7=otel)==null?void 0:_otel7.getActiveContext)!=null?_otel$getActiveContex:()=>{},withContext=(_otel$withContext=(_otel8=otel)==null?void 0:_otel8.withContext)!=null?_otel$withContext:(context,fn)=>fn(),getActiveSpanContext=(_otel$getActiveSpanCo=(_otel9=otel)==null?void 0:_otel9.getActiveSpanContext)!=null?_otel$getActiveSpanCo:()=>{},withSpanContext=(_otel$withSpanContext=(_otel10=otel)==null?void 0:_otel10.withSpanContext)!=null?_otel$withSpanContext:(spanContext,fn)=>fn(),traceSpanAsync=(_otel$traceAsync=(_otel11=otel)==null?void 0:_otel11.traceAsync)!=null?_otel$traceAsync:(name,labels,fn)=>fn({cb:noOpCb})}});var apm_exports={};__export(apm_exports,{_traceSpanCb:()=>_traceSpanCb,addTransactionLabels:()=>addTransactionLabels,clearCompletedTransactions:()=>clearCompletedTransactions,createSpan:()=>createSpan,endSpan:()=>endSpan,endTransaction:()=>endTransaction,getActiveContext:()=>getActiveContext,getActiveSpan:()=>getActiveSpan,getActiveSpanContext:()=>getActiveSpanContext,getAllBaggageEntries:()=>getAllBaggageEntries,getBaggageEntry:()=>getBaggageEntry,getCompletedTransactions:()=>getCompletedTransactions,startSpan:()=>startSpan,startTransaction:()=>startTransaction,traceSpan:()=>traceSpan,traceSpanAsync:()=>traceSpanAsync,traceSpanCallback:()=>traceSpanCallback,withBaggageEntries:()=>withBaggageEntries,withContext:()=>withContext,withSpanContext:()=>withSpanContext});var init_apm=__esm({"lib-browser/monitoring/apm/index.js"(){"use strict";init_define_process_env();init_shim();init_clientApm()}});function lib_to_string(){let res=["Lib Object {"];res.push(""),res.push("Settings:");function add_fn(name){var _this$name;res.push("    "+name+": "+((_this$name=this[name])==null?void 0:_this$name.call(this)))}add_fn("is_edit_mode"),add_fn("appname"),add_fn("app_version");let all_keys2={...CONTENTS};return res.push(""),res.push("Available:"),res.push(...Object.keys(this).map(key=>(delete all_keys2[key],"    "+key))),res.push(""),res.push("Missing:"),res.push(...Object.keys(all_keys2).map(k=>"    "+k)),res.push(""),res.push("}"),res.join(`
`)}function wrap(v){return()=>v}function validate_and_wrap(l){var _l$toString;(_l$toString=l.toString)!=null||(l.toString=lib_to_string);for(let k in l){let v=l[k];if(!["toString","running_with_lib"].includes(k)&&v!==void 0)switch(CONTENTS[k]){case"function":if(typeof v!="function")throw new errors.UnexpectedError("expected function for "+k+" but got "+v);break;case"wrap":typeof v!="function"&&(l[k]=wrap(v));break;case"object":if(typeof v!="object")throw new errors.UnexpectedError("expected object for "+k+" but got "+v);break;default:throw CONTENTS[k]==null?new errors.UnexpectedError("Trying to validate a lib and found an invalid key: "+k):new errors.UnexpectedError("Unrecognized contents entry for "+k+": "+CONTENTS[k])}}}function register_watcher(event,fn){!(event in watchers)||typeof fn!="function"||watchers[event].push(fn)}function call_change_watcher(event,incoming,previous){for(let watcher of(_watchers$event=watchers[event])!=null?_watchers$event:[]){var _watchers$event;watcher(incoming,previous)}}function on_lib_change(incoming,previous,reason){track_running_app(incoming,previous),reason===ENTER&&previous==null&&set_error_hooks(),call_change_watcher(reason,incoming,previous),[ENTER,EXTEND].includes(reason)&&track_fiber_owner(incoming,previous)}function set_error_hooks(){mode_check3.is_edit_mode()||errors.set_error_hook("default_display",()=>{var _Lib2;return(_Lib2=Lib())==null?void 0:_Lib2.get_text("CORE","TEMPORARY_BUG")}),errors.set_error_hook("localize_message",(plugin2,name)=>{var _Lib2;return(_Lib2=Lib())==null?void 0:_Lib2.get_text(plugin2,name)}),errors.set_error_hook("get_client_args",args=>{var _ref,_args$code,_Lib3;return{code:(_ref=(_args$code=args.code)!=null?_args$code:(_Lib3=Lib())==null?void 0:_Lib3.fiber_id())!=null?_ref:"no code found"}})}function track_running_app(incoming){var _b_fiber$Fiber,_incoming$appname,_incoming$app_version;if((incoming==null?void 0:incoming.appname)==null||((_b_fiber$Fiber=b_fiber.Fiber)==null?void 0:_b_fiber$Fiber.current)==null)return;let new_appname=(_incoming$appname=incoming.appname)==null?void 0:_incoming$appname.call(incoming),new_app_version=(_incoming$app_version=incoming.app_version)==null?void 0:_incoming$app_version.call(incoming);new_appname!=null&&b_fiber.set_running_app(new_appname,new_app_version)}function track_fiber_owner(incoming){var _b_fiber$Fiber2,_incoming$appname2,_incoming$app_version2;if((incoming==null?void 0:incoming.appname)==null||((_b_fiber$Fiber2=b_fiber.Fiber)==null?void 0:_b_fiber$Fiber2.current)==null)return;let new_appname=(_incoming$appname2=incoming.appname)==null?void 0:_incoming$appname2.call(incoming),new_app_version=(_incoming$app_version2=incoming.app_version)==null?void 0:_incoming$app_version2.call(incoming),{fiber_appname}=b_fiber.Fiber.current;new_appname==null?fiber_appname!=null&&(logger.log("warn","overwriting fiber appname with null",{fiber_appname}),b_fiber.Fiber.current.fiber_appname=null):new_appname==="meta"?fiber_appname==null&&b_fiber.assign_fiber_ownership(new_appname,new_app_version):(fiber_appname==null||fiber_appname==="meta"||fiber_appname===new_appname||logger.log("warn","transmuting fiber between non-meta apps",{fiber_appname,new_appname}),b_fiber.assign_fiber_ownership(new_appname,new_app_version))}var import_web_dom_collections_iterator16,mode_check3,errors,b_object,b_async,b_fiber,apm,logger,CONTENTS,get_lib_or_undef,lib_default,Lib,ENTER,EXIT,EXTEND,RETRACT,watchers,lib_ready_key,get_lib_ready_key,_global_lib,init_lib=__esm({"lib-browser/lib/index.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator16=__toESM(require_web_dom_collections_iterator()),mode_check3=(init_mode_check(),__toCommonJS(mode_check_exports)),errors=(init_errors(),__toCommonJS(errors_exports)),b_object=(init_b_object(),__toCommonJS(b_object_exports)),b_async=require_b_async(),b_fiber=(init_b_fiber(),__toCommonJS(b_fiber_exports)),apm=(init_apm(),__toCommonJS(apm_exports)),logger=(init_logger(),__toCommonJS(logger_exports)),CONTENTS={app:"wrap",load_plugin:"function",plugin_prefixes:"object",load_custom:"function",bubble_version:"function",bv:"function",appname:"wrap",app_version:"wrap",db_instance:"wrap",current_user:"wrap",current_user_id:"wrap",current_timezone:"wrap",scope:"wrap",is_edit_mode:"wrap",test_prod:"wrap",http_request:"function",app_domain:"function",app_plan:"function",derived:"function",derived_name:"wrap",experiment:"function",location:"object",element:"object",workflow:"object",pageparam:"object",user:"object",phonegap:"object",app_language:"function",get_text:"function",locale:"wrap",browser_locale:"wrap",visual_edit:"object",edit_canvas:"object",action_editor:"object",action_canvas:"object",data_editor:"object",data_canvas:"object",styles_editor:"object",styles_canvas:"object",logs_editor:"object",app_owners:"function",plugin_editor:"object",plugin_canvas:"object",settings_editor:"object",settings_canvas:"object",property_editor:"object",undostack:"object",clipboard:"object",comment_panel:"object",property_instance_container:"object",exhaustive_composer_canvas:"object",type_editor:"object",option_set_editor:"object",composer:"object",GlobalComposerFocusTracker:"object",SlidablePalette:"function",slidable_palette:"object",ImagePalette:"function",appchange:"object",getChecker:"function",changes:"object",sets:"object",get_session_id:"function",current_user_rights:"function",apptests:"object",visual_edit_is_ready:"object",add_plugin:"object",subscription:"object",app_indicator:"function",request:"object",history:"object",bubble_hostname:"wrap",full_url:"wrap",canonical_uri:"wrap",protocol:"wrap",hostname:"wrap",temp_db:"wrap",ignore_privacy_rules:"wrap",is_api:"function",api_version:"function",request_cache:"object",KeyValueDB:"function",emailservice:"object",task_manager:"object",fileupload:"object",ip:"wrap",speakeasy:"object",log_context:"object",bad_values_in_logs:"object",set_log_tag:"function",log:"function",fiber_id:"function",editor_vendor:"object",force_responsive_version:"object",native_bridge:"object"};typeof window>"u"||window===null?get_lib_or_undef=()=>{var _b_fiber$Fiber$curren;return(_b_fiber$Fiber$curren=b_fiber.Fiber.current)==null?void 0:_b_fiber$Fiber$curren._running_lib}:get_lib_or_undef=()=>_global_lib;lib_default=get_lib_or_undef,Lib=get_lib_or_undef;Lib.if_any=get_lib_or_undef;Lib.or_throw=function(){let cur_lib=get_lib_or_undef();if(cur_lib==null)throw new errors.UnexpectedError("Missing Lib!");return cur_lib};Lib.register_watcher=register_watcher;ENTER="enter",EXIT="exit",EXTEND="extend",RETRACT="retract",watchers={[ENTER]:[],[EXIT]:[],[EXTEND]:[],[RETRACT]:[]};lib_ready_key=null,get_lib_ready_key=Lib.get_lib_ready_key=()=>{var _lib_ready_key;return(_lib_ready_key=lib_ready_key)!=null||(lib_ready_key=b_async.MakeKey(null,"lib_ready_key")),lib_ready_key};Lib.set_global_lib=function(l){validate_and_wrap(l),on_lib_change(l,_global_lib,ENTER),_global_lib=l,get_lib_ready_key().turn()};Lib.extend_global=function(settings){let cur_lib=Lib(),new_l=b_object.extend({},cur_lib,settings);return on_lib_change(new_l,cur_lib,EXTEND),Lib.set_global_lib(new_l)};Lib.wait_for_lib=cb=>b_async.WaitFor(get_lib_ready_key(),cb);Lib.with_lib=function(l,fn){validate_and_wrap(l),l.running_with_lib?l={...l}:l.running_with_lib=!0;let old_lib=b_fiber.Fiber.current._running_lib;on_lib_change(l,old_lib,ENTER),b_fiber.Fiber.current._running_lib=l,typeof l.fiber_id=="function"&&apm.addTransactionLabels({fiber_id:l.fiber_id()});try{return fn()}finally{on_lib_change(old_lib,l,EXIT),b_fiber.Fiber.current._running_lib=old_lib}};typeof window<"u"&&window!==null?Lib.extend=function(settings,fn){if(!_global_lib)throw new errors.UnexpectedError("can only call Lib.extend if you have already called Lib.set_global_lib");validate_and_wrap(settings);let originals={};for(let[k,v]of Object.entries(settings))v!==void 0&&(originals[k]=_global_lib[k],_global_lib[k]=v);on_lib_change(_global_lib,originals,EXTEND);try{return fn()}finally{on_lib_change(originals,_global_lib,RETRACT),Object.assign(_global_lib,originals)}}:Lib.extend=function(settings,fn){if(!b_fiber.Fiber.current._running_lib)throw new errors.UnexpectedError("can only call Lib.extend if you are already in a Lib.with_lib");validate_and_wrap(settings);let originals={};for(let[k,v]of Object.entries(settings))v!==void 0&&(originals[k]=b_fiber.Fiber.current._running_lib[k],b_fiber.Fiber.current._running_lib[k]=v);on_lib_change(b_fiber.Fiber.current._running_lib,originals,EXTEND);try{return fn()}finally{on_lib_change(originals,b_fiber.Fiber.current._running_lib,RETRACT),Object.assign(b_fiber.Fiber.current._running_lib,originals)}}}});var require_moment_timezone_min=__commonJS({"vendor/jquery_plugins/moment.timezone.min.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(function(c,M){"use strict";typeof module2=="object"&&module2.exports?module2.exports=M(require_moment()):typeof define=="function"&&define.amd?define(["moment"],M):M(c.moment)})(exports3,function(o){"use strict";o.version===void 0&&o.default&&(o=o.default);var M,z={},i={},b={},e={},r2={},c=(o&&typeof o.version=="string"||S18("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/"),o.version.split(".")),a=+c[0],A=+c[1];function n(c2){return 96<c2?c2-87:64<c2?c2-29:c2-48}function p(c2){var M2=0,a2=c2.split("."),A2=a2[0],o2=a2[1]||"",i2=1,b2=0,a2=1;for(c2.charCodeAt(0)===45&&(a2=-(M2=1));M2<A2.length;M2++)b2=60*b2+n(A2.charCodeAt(M2));for(M2=0;M2<o2.length;M2++)i2/=60,b2+=n(o2.charCodeAt(M2))*i2;return b2*a2}function q(c2){for(var M2=0;M2<c2.length;M2++)c2[M2]=p(c2[M2])}function O(c2,M2){for(var a2=[],A2=0;A2<M2.length;A2++)a2[A2]=c2[M2[A2]];return a2}function d(c2){for(var c2=c2.split("|"),M2=c2[2].split(" "),a2=c2[3].split(""),A2=c2[4].split(" "),o2=(q(M2),q(a2),q(A2),A2),i2=a2.length,b2=0;b2<i2;b2++)o2[b2]=Math.round((o2[b2-1]||0)+6e4*o2[b2]);return o2[i2-1]=1/0,{name:c2[0],abbrs:O(c2[1].split(" "),a2),offsets:O(M2,a2),untils:A2,population:0|c2[5]}}function f(c2){c2&&this._set(d(c2))}function t(c2,M2){this.name=c2,this.zones=M2}function N(c2){var M2=c2.toTimeString(),a2=M2.match(/\([a-z ]+\)/i);(a2=a2&&a2[0]?(a2=a2[0].match(/[A-Z]/g))?a2.join(""):void 0:(a2=M2.match(/[A-Z]{3,5}/g))?a2[0]:void 0)==="GMT"&&(a2=void 0),this.at=+c2,this.abbr=a2,this.offset=c2.getTimezoneOffset()}function u22(c2){this.zone=c2,this.offsetScore=0,this.abbrScore=0}function L(){for(var c2,M2,a2=new Date().getFullYear()-2,A2=new N(new Date(a2,0,1)),o2=[A2],i2=1;i2<48;i2++)(M2=new N(new Date(a2,i2,1))).offset!==A2.offset&&(c2=function(c3,M3){for(var a3;a3=6e4*((M3.at-c3.at)/12e4|0);)(a3=new N(new Date(c3.at+a3))).offset===c3.offset?c3=a3:M3=a3;return c3}(A2,M2),o2.push(c2),o2.push(new N(new Date(c2.at+6e4)))),A2=M2;for(i2=0;i2<4;i2++)o2.push(new N(new Date(a2+i2,0,1))),o2.push(new N(new Date(a2+i2,6,1)));return o2}function l(c2,M2){return c2.offsetScore!==M2.offsetScore?c2.offsetScore-M2.offsetScore:c2.abbrScore!==M2.abbrScore?c2.abbrScore-M2.abbrScore:c2.zone.population!==M2.zone.population?M2.zone.population-c2.zone.population:M2.zone.name.localeCompare(c2.zone.name)}function W(){try{var c2=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c2&&3<c2.length){var M2=e[B(c2)];if(M2)return M2;S18("Moment Timezone found "+c2+" from the Intl api, but did not have that data loaded.")}}catch{}for(var a2,A2,o2=L(),i2=o2.length,b2=function(c3){for(var M3,a3,A3=c3.length,o3={},i3=[],b3=0;b3<A3;b3++)for(M3 in a3=r2[c3[b3].offset]||{})a3.hasOwnProperty(M3)&&(o3[M3]=!0);for(b3 in o3)o3.hasOwnProperty(b3)&&i3.push(e[b3]);return i3}(o2),n2=[],p2=0;p2<b2.length;p2++){for(a2=new u22(X(b2[p2])),A2=0;A2<i2;A2++)a2.scoreOffsetAt(o2[A2]);n2.push(a2)}return n2.sort(l),0<n2.length?n2[0].zone.name:void 0}function B(c2){return(c2||"").toLowerCase().replace(/\//g,"_")}function s(c2){var M2,a2,A2,o2;for(typeof c2=="string"&&(c2=[c2]),M2=0;M2<c2.length;M2++){o2=B(a2=(A2=c2[M2].split("|"))[0]),z[o2]=c2[M2],e[o2]=a2,b2=i2=p2=n2=void 0;var i2,b2,n2=o2,p2=A2[2].split(" ");for(q(p2),i2=0;i2<p2.length;i2++)b2=p2[i2],r2[b2]=r2[b2]||{},r2[b2][n2]=!0}}function X(c2,M2){c2=B(c2);var a2=z[c2];return a2 instanceof f?a2:typeof a2=="string"?(a2=new f(a2),z[c2]=a2):i[c2]&&M2!==X&&(M2=X(i[c2],X))?((a2=z[c2]=new f)._set(M2),a2.name=e[c2],a2):null}function m(c2){var M2,a2,A2,o2;for(typeof c2=="string"&&(c2=[c2]),M2=0;M2<c2.length;M2++)A2=B((a2=c2[M2].split("|"))[0]),o2=B(a2[1]),i[A2]=o2,e[A2]=a2[0],i[o2]=A2,e[o2]=a2[1]}function T(c2){s(c2.zones),m(c2.links);var M2,a2,A2,o2=c2.countries;if(o2&&o2.length)for(M2=0;M2<o2.length;M2++)a2=(A2=o2[M2].split("|"))[0].toUpperCase(),A2=A2[1].split(" "),b[a2]=new t(a2,A2);C.dataVersion=c2.version}function E(c2){return E.didShowError||(E.didShowError=!0,S18("moment.tz.zoneExists('"+c2+"') has been deprecated in favor of !moment.tz.zone('"+c2+"')")),!!X(c2)}function R(c2){var M2=c2._f==="X"||c2._f==="x";return!(!c2._a||c2._tzm!==void 0||M2)}function S18(c2){typeof console<"u"&&typeof console.error=="function"&&console.error(c2)}function C(c2){var M2=Array.prototype.slice.call(arguments,0,-1),a2=arguments[arguments.length-1],A2=X(a2),M2=o.utc.apply(null,M2);return A2&&!o.isMoment(c2)&&R(M2)&&M2.add(A2.parse(M2),"minutes"),M2.tz(a2),M2}(a<2||a==2&&A<6)&&S18("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+o.version+". See momentjs.com"),f.prototype={_set:function(c2){this.name=c2.name,this.abbrs=c2.abbrs,this.untils=c2.untils,this.offsets=c2.offsets,this.population=c2.population},_index:function(c2){for(var M2=+c2,a2=this.untils,A2=0;A2<a2.length;A2++)if(M2<a2[A2])return A2},countries:function(){var M2=this.name;return Object.keys(b).filter(function(c2){return b[c2].zones.indexOf(M2)!==-1})},parse:function(c2){for(var M2,a2,A2,o2=+c2,i2=this.offsets,b2=this.untils,n2=b2.length-1,p2=0;p2<n2;p2++)if(M2=i2[p2],a2=i2[p2+1],A2=i2[p2&&p2-1],M2<a2&&C.moveAmbiguousForward?M2=a2:A2<M2&&C.moveInvalidForward&&(M2=A2),o2<b2[p2]-6e4*M2)return i2[p2];return i2[n2]},abbr:function(c2){return this.abbrs[this._index(c2)]},offset:function(c2){return S18("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(c2)]},utcOffset:function(c2){return this.offsets[this._index(c2)]}},u22.prototype.scoreOffsetAt=function(c2){this.offsetScore+=Math.abs(this.zone.utcOffset(c2.at)-c2.offset),this.zone.abbr(c2.at).replace(/[^A-Z]/g,"")!==c2.abbr&&this.abbrScore++},C.version="0.5.43",C.dataVersion="",C._zones=z,C._links=i,C._names=e,C._countries=b,C.add=s,C.link=m,C.load=T,C.zone=X,C.zoneExists=E,C.guess=function(c2){return M=M&&!c2?M:W()},C.names=function(){var c2,M2=[];for(c2 in e)e.hasOwnProperty(c2)&&(z[c2]||z[i[c2]])&&e[c2]&&M2.push(e[c2]);return M2.sort()},C.Zone=f,C.unpack=d,C.unpackBase60=p,C.needsOffset=R,C.moveInvalidForward=!0,C.moveAmbiguousForward=!1,C.countries=function(){return Object.keys(b)},C.zonesForCountry=function(c2,M2){var a2;return a2=(a2=c2).toUpperCase(),(c2=b[a2]||null)?(a2=c2.zones.sort(),M2?a2.map(function(c3){return{name:c3,offset:X(c3).utcOffset(new Date)}}):a2):null};var h,c=o.fn;function P(c2){return function(){return this._z?this._z.abbr(this):c2.call(this)}}function g(c2){return function(){return this._z=null,c2.apply(this,arguments)}}return o.tz=C,o.defaultZone=null,o.updateOffset=function(c2,M2){var a2,A2=o.defaultZone;c2._z===void 0&&(A2&&R(c2)&&!c2._isUTC&&(c2._d=o.utc(c2._a)._d,c2.utc().add(A2.parse(c2),"minutes")),c2._z=A2),c2._z&&(A2=c2._z.utcOffset(c2),Math.abs(A2)<16&&(A2/=60),c2.utcOffset!==void 0?(a2=c2._z,c2.utcOffset(-A2,M2),c2._z=a2):c2.zone(A2,M2))},c.tz=function(c2,M2){if(c2){if(typeof c2!="string")throw new Error("Time zone name must be a string, got "+c2+" ["+typeof c2+"]");return this._z=X(c2),this._z?o.updateOffset(this,M2):S18("Moment Timezone has no data for "+c2+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name},c.zoneName=P(c.zoneName),c.zoneAbbr=P(c.zoneAbbr),c.utc=g(c.utc),c.local=g(c.local),c.utcOffset=(h=c.utcOffset,function(){return 0<arguments.length&&(this._z=null),h.apply(this,arguments)}),o.tz.setDefault=function(c2){return(a<2||a==2&&A<9)&&S18("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+o.version+"."),o.defaultZone=c2?X(c2):null,o},c=o.momentProperties,Object.prototype.toString.call(c)==="[object Array]"?(c.push("_z"),c.push("_a")):c&&(c._z=null),T({version:"2023c",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|WET WEST CET CEST|0 -10 -10 -20|01012320102|3bX0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Bissau|-01 GMT|10 0|01|cap0|39e4","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|LX0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0 kSp0 1cL0 1cN0 1fz0 1a10 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0|15e6","Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|32e5","Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|0101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|85e3","Africa/El_Aaiun|-01 +00 +01|10 0 -10|01212121212121212121212121212121212121212121212121212121212121212121|fi10 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|20e4","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Juba|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 PeX0|","Africa/Khartoum|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5","Africa/Monrovia|MMT GMT|I.u 0|01|4SoI.u|11e5","Africa/Ndjamena|WAT WAST|-10 -20|010|nNb0 Wn0|13e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|","Africa/Tripoli|EET CET CEST|-20 -10 -20|0121212121212121210120120|tda0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5","Africa/Tunis|CET CEST|-10 -20|0101010101010101010|hOn0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5","Africa/Windhoek|SAST CAT WAT|-20 -20 -10|01212121212121212121212121212121212121212121212121|Ndy0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|BST BDT AHST HST HDT|b0 a0 a0 a0 90|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AHST AHDT YST AKST AKDT|a0 90 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kc0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Puerto_Rico|AST|40|0||24e5","America/Araguaina|-03 -02|30 20|01010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4","America/Argentina/Buenos_Aires|-03 -02|30 20|01010101010101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Catamarca|-03 -02 -04|30 20 40|01010101210102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Cordoba|-03 -02 -04|30 20 40|01010101210101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Jujuy|-03 -02 -04|30 20 40|010101202101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0|","America/Argentina/La_Rioja|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Mendoza|-03 -02 -04|30 20 40|01010120202102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0|","America/Argentina/Rio_Gallegos|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Salta|-03 -02 -04|30 20 40|010101012101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0|","America/Argentina/San_Juan|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0|","America/Argentina/San_Luis|-03 -02 -04|30 20 40|010101202020102020|9Rf0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0|","America/Argentina/Tucuman|-03 -02 -04|30 20 40|0101010121010201010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0|","America/Argentina/Ushuaia|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0|","America/Asuncion|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|6FE0 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Bahia_Banderas|PST MST MDT CDT CST|80 70 60 50 60|01212121212121212121212121212134343434343434343434343434|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|84e3","America/Bahia|-03 -02|30 20|010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5","America/Barbados|AST ADT|40 30|010101010|i7G0 IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4","America/Belem|-03 -02|30 20|0101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0|20e5","America/Belize|CST CDT|60 50|01010|9xG0 qn0 lxB0 mn0|57e3","America/Boa_Vista|-04 -03|40 30|01010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2","America/Bogota|-05 -04|50 40|010|Snh0 1PX0|90e5","America/Boise|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4","America/Cambridge_Bay|MST MDT CST CDT EST|70 60 60 50 50|010101010101010101010101010101010101010101010101010101012342101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2","America/Campo_Grande|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST EST EDT CDT|60 50 40 50|012121230303030303030303030303030303030301|t9G0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|-04 -0430|40 4u|010|1wmv0 kqo0|29e5","America/Cayenne|-03|30|0||58e3","America/Chicago|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|CST CDT MDT MST|60 50 60 70|0101023232323232323232323232323232323232323232323232320|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4","America/Ciudad_Juarez|CST CDT MDT MST|60 50 60 70|010102323232323232323232323232323232323232323232323232032323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Costa_Rica|CST CDT|60 50|010101010|mgS0 Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5","America/Phoenix|MST|70|0||42e5","America/Cuiaba|-04 -03|40 30|0101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4","America/Danmarkshavn|-03 -02 GMT|30 20 0|0101010101010101010101010101010102|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8","America/Dawson_Creek|PST PDT MST|80 70 70|0101012|Ka0 1cL0 1cN0 1fz0 1cN0 ML0|12e3","America/Dawson|YST PST PDT MST|90 80 70 70|012121212121212121212121212121212121212121212121212121212121212121212121212121212123|9ix0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|13e2","America/Denver|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Detroit|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|85H0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5","America/Edmonton|MST MDT|70 60|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5","America/Eirunepe|-05 -04|50 40|01010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3","America/El_Salvador|CST CDT|60 50|01010|Gcu0 WL0 1qN0 WL0|11e5","America/Tijuana|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fmy0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5","America/Fort_Nelson|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010102|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Fort_Wayne|EST EDT|50 40|01010101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Fortaleza|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5","America/Glace_Bay|AST ADT|40 30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E60 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","America/Godthab|-03 -02 -01|30 20 10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010121212121212121|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 2so0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3","America/Goose_Bay|AST ADT ADDT|40 30 20|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|EST EDT AST|50 40 40|0101010101010101010101010101010101010101010101010101010101010101010101010210101010101010101010101010|mG70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 7jA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guatemala|CST CDT|60 50|010101010|9tG0 An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5","America/Guayaquil|-05 -04|50 40|010|TKR0 rz0|27e5","America/Guyana|-0345 -03 -04|3J 30 40|012|dzfJ Ey0f|80e4","America/Halifax|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Havana|CST CDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K50 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Hermosillo|PST MST MDT|80 70 60|01212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4","America/Indiana/Knox|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101210101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Marengo|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Petersburg|CST CDT EST EDT|60 50 50 40|0101010101010101210123232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Tell_City|EST EDT CDT CST|50 40 50 60|01023232323232323232323232323232323232323232323232323|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vevay|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vincennes|EST EDT CDT CST|50 40 50 60|01023201010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Winamac|EST EDT CDT CST|50 40 50 60|01023101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Inuvik|PST PDT MDT MST|80 70 60 70|01010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|5Ea0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2","America/Iqaluit|EST EDT CST CDT|50 40 60 50|01010101010101010101010101010101010101010101010101010101230101010101010101010101010101010101010101010101010101010101010|5E70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2","America/Jamaica|EST EDT|50 40|010101010101010101010|9Kv0 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4","America/Juneau|PST PDT YDT YST AKST AKDT|80 70 80 90 90 80|0101010101010101010102010101345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3","America/Kentucky/Louisville|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Kentucky/Monticello|CST CDT EST EDT|60 50 50 40|010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/La_Paz|-04|40|0||19e5","America/Lima|-05 -04|50 40|010101010|CVF0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6","America/Los_Angeles|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Maceio|-03 -02|30 20|0101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4","America/Managua|CST EST CDT|60 50 50|010202010102020|86u0 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5","America/Manaus|-04 -03|40 30|010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5","America/Martinique|AST ADT|40 30|010|oXg0 19X0|39e4","America/Matamoros|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4","America/Mazatlan|PST MST MDT|80 70 60|01212121212121212121212121212121212121212121212121212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|44e4","America/Menominee|EST CDT CST|50 50 60|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|85H0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2","America/Merida|CST EST CDT|60 50 50|010202020202020202020202020202020202020202020202020202020|t9G0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|11e5","America/Metlakatla|PST PDT AKST AKDT|80 70 90 80|0101010101010101010101010101023232302323232323232323232323232|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Mexico_City|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010|13Vk0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6","America/Miquelon|AST -03 -02|40 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|p9g0 gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Moncton|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3","America/Monterrey|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|41e5","America/Montevideo|-03 -02 -0130 -0230|30 20 1u 2u|0101023010101010101010101010101010101010101010101010|JD0 jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Toronto|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5","America/New_York|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Nome|BST BDT YST AKST AKDT|b0 a0 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2","America/Noronha|-02 -01|20 10|01010101010101010|CxC0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2","America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010123232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/Center|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/New_Salem|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Ojinaga|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323201010101010101010|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 Rc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Paramaribo|-0330 -03|3u 30|01|zSPu|24e4","America/Port-au-Prince|EST EDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010|wu50 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Rio_Branco|-05 -04|50 40|010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4","America/Porto_Velho|-04 -03|40 30|0101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0|37e4","America/Punta_Arenas|-03 -04|30 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|","America/Winnipeg|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4","America/Rankin_Inlet|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101010101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2","America/Recife|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5","America/Regina|CST|60|0||19e4","America/Resolute|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101012101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229","America/Santarem|-04 -03|40 30|01010101|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4","America/Santiago|-03 -04|30 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|62e5","America/Santo_Domingo|-0430 EST AST|4u 50 40|0101010101212|ksu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5","America/Sao_Paulo|-03 -02|30 20|010101010101010101010101010101010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","America/Scoresbysund|-02 -01 +00|20 10 0|0102121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|oXg0 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|452","America/Sitka|PST PDT YST AKST AKDT|80 70 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2","America/St_Johns|NST NDT NDDT|3u 2u 1u|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K5u 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Swift_Current|MST CST|70 60|01|5E90|16e3","America/Tegucigalpa|CST CDT|60 50|0101010|Gcu0 WL0 1qN0 WL0 GRd0 AL0|11e5","America/Thule|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010|PHG0 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656","America/Vancouver|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Whitehorse|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101012|p7K0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3","America/Yakutat|YST YDT AKST AKDT|90 80 90 80|0101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|Kb0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642","Antarctica/Casey|+08 +11|-80 -b0|010101010101|1ARS0 T90 40P0 KL0 blz0 3m10 1o30 14k0 1kr0 12l0 1o01|10","Antarctica/Davis|+07 +05|-70 -50|01010|1ART0 VB0 3Wn0 KN0|70","Pacific/Port_Moresby|+10|-a0|0||25e4","Antarctica/Macquarie|AEDT AEST|-b0 -a0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 3Co0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|1","Antarctica/Mawson|+06 +05|-60 -50|01|1ARU0|60","Pacific/Auckland|NZST NZDT|-c0 -d0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|14e5","Antarctica/Palmer|-03 -02 -04|30 20 40|01020202020202020202020202020202020202020202020202020202020202020202020|9Rf0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","Antarctica/Rothera|-00 -03|0 30|01|gOo0|130","Asia/Riyadh|+03|-30|0||57e5","Antarctica/Troll|-00 +00 +02|0 0 -20|012121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40","Asia/Urumqi|+06|-60|0||32e5","Europe/Berlin|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXd0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e5","Asia/Almaty|+06 +07 +05|-60 -70 -50|0101010101010101010102010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5","Asia/Amman|EET EEST +03|-20 -30 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|8kK0 KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 LA0 1C00|25e5","Asia/Anadyr|+13 +14 +12 +11|-d0 -e0 -c0 -b0|010202020202020202023202020202020202020202020202020202020232|rmX0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3","Asia/Aqtau|+05 +06 +04|-50 -60 -40|0101010101010101010201010120202020202020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4","Asia/Aqtobe|+05 +06 +04|-50 -60 -40|01010101010101010102010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4","Asia/Ashgabat|+05 +06 +04|-50 -60 -40|01010101010101010101020|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4","Asia/Atyrau|+05 +06 +04|-50 -60 -40|010101010101010101020101010101010102020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Baghdad|+03 +04|-30 -40|01010101010101010101010101010101010101010101010101010|u190 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5","Asia/Qatar|+04 +03|-40 -30|01|5QI0|96e4","Asia/Baku|+04 +05 +03|-40 -50 -30|010101010101010101010201010101010101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|+07|-70|0||15e6","Asia/Barnaul|+07 +08 +06|-70 -80 -60|01010101010101010101020101010102020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|","Asia/Beirut|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|61a0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5","Asia/Bishkek|+06 +07 +05|-60 -70 -50|0101010101010101010102020202020202020202020202020|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4","Asia/Brunei|+08|-80|0||42e4","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+09 +10 +08|-90 -a0 -80|0101010101010101010102010101010101010101010101010101010101010120|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|+07 +08 +10 +09|-70 -80 -a0 -90|012323232323232323232323232323232323232323232313131|jsF0 cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST CDT|-80 -90|0101010101010|DKG0 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6","Asia/Colombo|+0530 +0630 +06|-5u -6u -60|0120|14giu 11zu n3cu|22e5","Asia/Dhaka|+06 +07|-60 -70|010|1A5R0 1i00|16e6","Asia/Damascus|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|M00 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5","Asia/Dili|+09 +08|-90 -80|010|fpr0 Xld0|19e4","Asia/Dubai|+04|-40|0||39e5","Asia/Dushanbe|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101012010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Asia/Gaza|IST IDT EET EEST|-20 -30 -20 -30|010101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|18e5","Asia/Hebron|IST IDT EET EEST|-20 -30 -20 -30|01010101010101010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|25e4","Asia/Ho_Chi_Minh|+08 +07|-80 -70|01|dfs0|90e5","Asia/Hong_Kong|HKT HKST|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5","Asia/Hovd|+06 +07 +08|-60 -70 -80|01212121212121212121212121212121212121212121212121|jsG0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+08 +09 +07|-80 -90 -70|010101010101010101010201010101010101010101010101010101010101010|rn40 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|EET EEST +03 +04|-20 -30 -30 -40|01010101010123201010101010101010101010101010101010101010101010101010101010101012|8jz0 11A0 WN0 1qL0 TB0 1tX0 U10 1tz0 11B0 1in0 17d0 z90 cne0 pb0 2Cp0 1800 14o0 1dc0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Kamchatka|+12 +13 +11|-c0 -d0 -b0|0101010101010101010102010101010101010101010101010101010101020|rn00 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4","Asia/Karachi|+05 PKT PKST|-50 -50 -60|01212121|2Xv0 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6","Asia/Kathmandu|+0530 +0545|-5u -5J|01|CVuu|12e5","Asia/Khandyga|+09 +10 +08 +11|-90 -a0 -80 -b0|01010101010101010101020101010101010101010101010131313131313131310|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|+07 +08 +06|-70 -80 -60|010101010101010101010201010101010101010101010101010101010101010|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|+0730 +08|-7u -80|01|td40|71e5","Asia/Macau|CST CDT|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4","Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|0101010101010101010102010101010101010101010101010101010101010120|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST PDT|-80 -90|010|k0E0 1db0|24e6","Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|32e4","Asia/Novokuznetsk|+07 +08 +06|-70 -80 -60|0101010101010101010102010101010101010101010101010101010101020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4","Asia/Novosibirsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101020202020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|+06 +07 +05|-60 -70 -50|010101010101010101010201010101010101010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5","Asia/Oral|+05 +06 +04|-50 -60 -40|010101010101010202020202020202020202020202020|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4","Asia/Pontianak|WITA WIB|-80 -70|01|HNs0|23e4","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qostanay|+05 +06 +04|-50 -60 -40|0101010101010101010201010101010101010101010101|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Qyzylorda|+05 +06|-50 -60|010101010101010101010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010202020202020202020202020202020|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Samarkand|+05 +06|-50 -60|010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4","Asia/Seoul|KST KDT|-90 -a0|01010|Gf50 11A0 1o00 11A0|23e6","Asia/Srednekolymsk|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010101010101010101010101010101010|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2","Asia/Taipei|CST CDT|-80 -90|0101010|akg0 1db0 1cN0 1db0 97B0 AL0|74e5","Asia/Tashkent|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5","Asia/Tbilisi|+04 +05 +03|-40 -50 -30|01010101010101010101020202010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5","Asia/Tehran|+0330 +0430 +04 +05|-3u -4u -40 -50|0123201010101010101010101010101010101010101010101010101010101010101010|hyHu 1pc0 120u Rc0 XA0 Wou JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|+0530 +06|-5u -60|01|HcGu|79e3","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101010101010101010101020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|+07 +08 +09|-70 -80 -90|01212121212121212121212121212121212121212121212121|jsF0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|+09 +12 +11 +10|-90 -c0 -b0 -a0|0121212121212121212123212121212121212121212121212121212121212123|rn30 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|+10 +11 +09|-a0 -b0 -90|010101010101010101010201010101010101010101010101010101010101010|rn20 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|+09 +10 +08|-90 -a0 -80|010101010101010101010201010101010101010101010101010101010101010|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|+05 +06 +04|-50 -60 -40|010101010101010101010201010101010101010101010101010101010101010|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|+04 +05 +03|-40 -50 -30|01010101010101010101020202020101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|-01 +00 WET|10 0 0|0101010101010101010101010101010121010101010101010101010101010101010101010101010101010101010101010101010101010|hAN0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4","Atlantic/Bermuda|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avi0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3","Atlantic/Canary|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Atlantic/Cape_Verde|-02 -01|20 10|01|elE0|50e4","Atlantic/Faroe|WET WEST|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|49e3","Atlantic/Madeira|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hAM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e4","Atlantic/South_Georgia|-02|20|0||30","Atlantic/Stanley|-04 -03 -02|40 30 20|01212101010101010101010101010101010101010101010101010101|wrg0 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2","Australia/Sydney|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|40e5","Australia/Adelaide|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|11e5","Australia/Brisbane|AEST AEDT|-a0 -b0|010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5","Australia/Broken_Hill|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|18e3","Australia/Hobart|AEDT AEST|-b0 -a0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|21e4","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845 +0945|-8J -9J|0101010101010|bHRf Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368","Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|01212121213131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu|347","Australia/Lindeman|AEST AEDT|-a0 -b0|0101010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10","Australia/Melbourne|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|39e5","Australia/Perth|AWST AWDT|-80 -90|0101010101010|bHS0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5","Europe/Brussels|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|21e5","Pacific/Easter|-06 -07 -05|60 70 50|010101010101010101010101020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|30e2","EET|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Europe/Dublin|IST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Etc/GMT-1|+01|-10|0||","Pacific/Guadalcanal|+11|-b0|0||11e4","Pacific/Tarawa|+12|-c0|0||29e3","Etc/GMT-13|+13|-d0|0||","Etc/GMT-14|+14|-e0|0||","Etc/GMT-2|+02|-20|0||","Indian/Maldives|+05|-50|0||35e4","Pacific/Palau|+09|-90|0||21e3","Etc/GMT+1|-01|10|0||","Pacific/Tahiti|-10|a0|0||18e4","Pacific/Niue|-11|b0|0||12e2","Etc/GMT+12|-12|c0|0||","Etc/GMT+5|-05|50|0||","Etc/GMT+6|-06|60|0||","Etc/GMT+7|-07|70|0||","Etc/GMT+8|-08|80|0||","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0||","Europe/Andorra|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|B7d0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|79e3","Europe/Astrakhan|+04 +05 +03|-40 -50 -30|0101010101010101020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5","Europe/Athens|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cOK0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5","Europe/London|BST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6","Europe/Belgrade|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|wdd0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Prague|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muN0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|13e5","Europe/Bucharest|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|mRa0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|19e5","Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cO0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|38e4","Europe/Chisinau|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010101012323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4","Europe/Gibraltar|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|tLB0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|30e3","Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm00 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Kaliningrad|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010102323232323232323232323232323232323232323232343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4","Europe/Kiev|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o10 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|34e5","Europe/Kirov|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|01010101010101010232302323232323232323232323232323232323232343|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4","Europe/Lisbon|CET WET WEST CEST|-10 0 -10 -20|01212121212121212121212121212121203030302121212121212121212121212121212121212121212121212121212121212121212121|go00 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5","Europe/Madrid|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|apy0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|62e5","Europe/Malta|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Minsk|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010101023232323232323232323232323232323232323234|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5","Europe/Paris|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fbc0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6","Europe/Moscow|MSK MSD EEST EET MSK|-30 -40 -30 -20 -40|0101010101010101010102301010101010101010101010101010101010101040|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6","Europe/Riga|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|64e4","Europe/Rome|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|39e5","Europe/Samara|+04 +05 +03|-40 -50 -30|01010101010101010202010101010101010101010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5","Europe/Saratov|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810|","Europe/Simferopol|MSK MSD EET EEST MSK|-30 -40 -20 -30 -40|0101010101010101010232323101010323232323232323232323232323232323240|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eN0 1cM0 1cM0 1cM0 1cM0 dV0 WO0 1cM0 1cM0 1fy0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Sofia|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muJ0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Tallinn|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e4","Europe/Tirane|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|axz0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Ulyanovsk|+04 +05 +03 +02|-40 -50 -30 -20|010101010101010102023202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5","Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|18e5","Europe/Vilnius|MSK MSD EEST EET CEST CET|-30 -40 -30 -20 -20 -10|01010101010101010232323232323232323454323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Europe/Volgograd|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|0101010101010102323230232323232323232323232323232323232323234303|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0 5gn0|10e5","Europe/Warsaw|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Pacific/Honolulu|HST|a0|0||37e4","Indian/Chagos|+05 +06|-50 -60|01|13ij0|30e2","Indian/Mauritius|+04 +05|-40 -50|01010|v5U0 14L0 12kr0 11z0|15e4","Pacific/Kwajalein|-12 +12|c0 -c0|01|Vxo0|14e3","MET|MET MEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Pacific/Chatham|+1245 +1345|-cJ -dJ|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|600","Pacific/Apia|-11 -10 +14 +13|b0 a0 -e0 -d0|010123232323232323232323|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0|37e3","Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4","Pacific/Efate|+11 +12|-b0 -c0|01010101010101010101010|9EA0 Dc0 n610 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3","Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1","Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483","Pacific/Fiji|+12 +13|-c0 -d0|01010101010101010101010101010|1ace0 LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0|88e4","Pacific/Galapagos|-05 -06|50 60|0101|CVF0 gNd0 rz0|25e3","Pacific/Guam|GST GDT ChST|-a0 -b0 -a0|010101010102|JQ0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4","Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2","Pacific/Kosrae|+12 +11|-c0 -b0|01|1aAA0|66e2","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Nauru|+1130 +12|-bu -c0|01|maCu|10e3","Pacific/Norfolk|+1130 +1230 +11 +12|-bu -cu -b0 -c0|010232323232323232323232323|bHOu Oo0 1COo0 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|25e4","Pacific/Noumea|+11 +12|-b0 -c0|0101010|jhp0 xX0 1PB0 yn0 HeP0 Ao0|98e3","Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56","Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3","Pacific/Tongatapu|+13 +14|-d0 -e0|010101010|1csd0 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3","WET|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Cayenne|Etc/GMT+3","America/Chicago|CST6CDT","America/Chicago|US/Central","America/Denver|America/Shiprock","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|America/Yellowknife","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Godthab|America/Nuuk","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Iqaluit|America/Pangnirtung","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/La_Paz|Etc/GMT+4","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|EST5EDT","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|EST","America/Phoenix|America/Creston","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Puerto_Rico|America/Anguilla","America/Puerto_Rico|America/Antigua","America/Puerto_Rico|America/Aruba","America/Puerto_Rico|America/Blanc-Sablon","America/Puerto_Rico|America/Curacao","America/Puerto_Rico|America/Dominica","America/Puerto_Rico|America/Grenada","America/Puerto_Rico|America/Guadeloupe","America/Puerto_Rico|America/Kralendijk","America/Puerto_Rico|America/Lower_Princes","America/Puerto_Rico|America/Marigot","America/Puerto_Rico|America/Montserrat","America/Puerto_Rico|America/Port_of_Spain","America/Puerto_Rico|America/St_Barthelemy","America/Puerto_Rico|America/St_Kitts","America/Puerto_Rico|America/St_Lucia","America/Puerto_Rico|America/St_Thomas","America/Puerto_Rico|America/St_Vincent","America/Puerto_Rico|America/Tortola","America/Puerto_Rico|America/Virgin","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|America/Nassau","America/Toronto|America/Nipigon","America/Toronto|America/Thunder_Bay","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|America/Rainy_River","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Brunei|Asia/Kuching","Asia/Brunei|Etc/GMT-8","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Reunion","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Singapore","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Riyadh|Antarctica/Syowa","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Riyadh|Etc/GMT-3","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Antarctica/Vostok","Asia/Urumqi|Asia/Kashgar","Asia/Urumqi|Etc/GMT-6","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/South_Georgia|Etc/GMT+2","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Currie","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Berlin|Arctic/Longyearbyen","Europe/Berlin|Atlantic/Jan_Mayen","Europe/Berlin|Europe/Copenhagen","Europe/Berlin|Europe/Oslo","Europe/Berlin|Europe/Stockholm","Europe/Brussels|CET","Europe/Brussels|Europe/Amsterdam","Europe/Brussels|Europe/Luxembourg","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Kiev|Europe/Kyiv","Europe/Kiev|Europe/Uzhgorod","Europe/Kiev|Europe/Zaporozhye","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Europe/Monaco","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Indian/Maldives|Etc/GMT-5","Indian/Maldives|Indian/Kerguelen","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Enderbury|Pacific/Kanton","Pacific/Gambier|Etc/GMT+9","Pacific/Guadalcanal|Etc/GMT-11","Pacific/Guadalcanal|Pacific/Pohnpei","Pacific/Guadalcanal|Pacific/Ponape","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Niue|Etc/GMT+11","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Palau|Etc/GMT-9","Pacific/Port_Moresby|Antarctica/DumontDUrville","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Port_Moresby|Pacific/Chuuk","Pacific/Port_Moresby|Pacific/Truk","Pacific/Port_Moresby|Pacific/Yap","Pacific/Tahiti|Etc/GMT+10","Pacific/Tarawa|Etc/GMT-12","Pacific/Tarawa|Pacific/Funafuti","Pacific/Tarawa|Pacific/Majuro","Pacific/Tarawa|Pacific/Wake","Pacific/Tarawa|Pacific/Wallis"],countries:["AD|Europe/Andorra","AE|Asia/Dubai","AF|Asia/Kabul","AG|America/Puerto_Rico America/Antigua","AI|America/Puerto_Rico America/Anguilla","AL|Europe/Tirane","AM|Asia/Yerevan","AO|Africa/Lagos Africa/Luanda","AQ|Antarctica/Casey Antarctica/Davis Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Troll Asia/Urumqi Pacific/Auckland Pacific/Port_Moresby Asia/Riyadh Antarctica/McMurdo Antarctica/DumontDUrville Antarctica/Syowa Antarctica/Vostok","AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia","AS|Pacific/Pago_Pago","AT|Europe/Vienna","AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla","AW|America/Puerto_Rico America/Aruba","AX|Europe/Helsinki Europe/Mariehamn","AZ|Asia/Baku","BA|Europe/Belgrade Europe/Sarajevo","BB|America/Barbados","BD|Asia/Dhaka","BE|Europe/Brussels","BF|Africa/Abidjan Africa/Ouagadougou","BG|Europe/Sofia","BH|Asia/Qatar Asia/Bahrain","BI|Africa/Maputo Africa/Bujumbura","BJ|Africa/Lagos Africa/Porto-Novo","BL|America/Puerto_Rico America/St_Barthelemy","BM|Atlantic/Bermuda","BN|Asia/Kuching Asia/Brunei","BO|America/La_Paz","BQ|America/Puerto_Rico America/Kralendijk","BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco","BS|America/Toronto America/Nassau","BT|Asia/Thimphu","BW|Africa/Maputo Africa/Gaborone","BY|Europe/Minsk","BZ|America/Belize","CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Toronto America/Iqaluit America/Winnipeg America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Inuvik America/Dawson_Creek America/Fort_Nelson America/Whitehorse America/Dawson America/Vancouver America/Panama America/Puerto_Rico America/Phoenix America/Blanc-Sablon America/Atikokan America/Creston","CC|Asia/Yangon Indian/Cocos","CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi","CF|Africa/Lagos Africa/Bangui","CG|Africa/Lagos Africa/Brazzaville","CH|Europe/Zurich","CI|Africa/Abidjan","CK|Pacific/Rarotonga","CL|America/Santiago America/Punta_Arenas Pacific/Easter","CM|Africa/Lagos Africa/Douala","CN|Asia/Shanghai Asia/Urumqi","CO|America/Bogota","CR|America/Costa_Rica","CU|America/Havana","CV|Atlantic/Cape_Verde","CW|America/Puerto_Rico America/Curacao","CX|Asia/Bangkok Indian/Christmas","CY|Asia/Nicosia Asia/Famagusta","CZ|Europe/Prague","DE|Europe/Zurich Europe/Berlin Europe/Busingen","DJ|Africa/Nairobi Africa/Djibouti","DK|Europe/Berlin Europe/Copenhagen","DM|America/Puerto_Rico America/Dominica","DO|America/Santo_Domingo","DZ|Africa/Algiers","EC|America/Guayaquil Pacific/Galapagos","EE|Europe/Tallinn","EG|Africa/Cairo","EH|Africa/El_Aaiun","ER|Africa/Nairobi Africa/Asmara","ES|Europe/Madrid Africa/Ceuta Atlantic/Canary","ET|Africa/Nairobi Africa/Addis_Ababa","FI|Europe/Helsinki","FJ|Pacific/Fiji","FK|Atlantic/Stanley","FM|Pacific/Kosrae Pacific/Port_Moresby Pacific/Guadalcanal Pacific/Chuuk Pacific/Pohnpei","FO|Atlantic/Faroe","FR|Europe/Paris","GA|Africa/Lagos Africa/Libreville","GB|Europe/London","GD|America/Puerto_Rico America/Grenada","GE|Asia/Tbilisi","GF|America/Cayenne","GG|Europe/London Europe/Guernsey","GH|Africa/Abidjan Africa/Accra","GI|Europe/Gibraltar","GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule","GM|Africa/Abidjan Africa/Banjul","GN|Africa/Abidjan Africa/Conakry","GP|America/Puerto_Rico America/Guadeloupe","GQ|Africa/Lagos Africa/Malabo","GR|Europe/Athens","GS|Atlantic/South_Georgia","GT|America/Guatemala","GU|Pacific/Guam","GW|Africa/Bissau","GY|America/Guyana","HK|Asia/Hong_Kong","HN|America/Tegucigalpa","HR|Europe/Belgrade Europe/Zagreb","HT|America/Port-au-Prince","HU|Europe/Budapest","ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura","IE|Europe/Dublin","IL|Asia/Jerusalem","IM|Europe/London Europe/Isle_of_Man","IN|Asia/Kolkata","IO|Indian/Chagos","IQ|Asia/Baghdad","IR|Asia/Tehran","IS|Africa/Abidjan Atlantic/Reykjavik","IT|Europe/Rome","JE|Europe/London Europe/Jersey","JM|America/Jamaica","JO|Asia/Amman","JP|Asia/Tokyo","KE|Africa/Nairobi","KG|Asia/Bishkek","KH|Asia/Bangkok Asia/Phnom_Penh","KI|Pacific/Tarawa Pacific/Kanton Pacific/Kiritimati","KM|Africa/Nairobi Indian/Comoro","KN|America/Puerto_Rico America/St_Kitts","KP|Asia/Pyongyang","KR|Asia/Seoul","KW|Asia/Riyadh Asia/Kuwait","KY|America/Panama America/Cayman","KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral","LA|Asia/Bangkok Asia/Vientiane","LB|Asia/Beirut","LC|America/Puerto_Rico America/St_Lucia","LI|Europe/Zurich Europe/Vaduz","LK|Asia/Colombo","LR|Africa/Monrovia","LS|Africa/Johannesburg Africa/Maseru","LT|Europe/Vilnius","LU|Europe/Brussels Europe/Luxembourg","LV|Europe/Riga","LY|Africa/Tripoli","MA|Africa/Casablanca","MC|Europe/Paris Europe/Monaco","MD|Europe/Chisinau","ME|Europe/Belgrade Europe/Podgorica","MF|America/Puerto_Rico America/Marigot","MG|Africa/Nairobi Indian/Antananarivo","MH|Pacific/Tarawa Pacific/Kwajalein Pacific/Majuro","MK|Europe/Belgrade Europe/Skopje","ML|Africa/Abidjan Africa/Bamako","MM|Asia/Yangon","MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan","MO|Asia/Macau","MP|Pacific/Guam Pacific/Saipan","MQ|America/Martinique","MR|Africa/Abidjan Africa/Nouakchott","MS|America/Puerto_Rico America/Montserrat","MT|Europe/Malta","MU|Indian/Mauritius","MV|Indian/Maldives","MW|Africa/Maputo Africa/Blantyre","MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Chihuahua America/Ciudad_Juarez America/Ojinaga America/Mazatlan America/Bahia_Banderas America/Hermosillo America/Tijuana","MY|Asia/Kuching Asia/Singapore Asia/Kuala_Lumpur","MZ|Africa/Maputo","NA|Africa/Windhoek","NC|Pacific/Noumea","NE|Africa/Lagos Africa/Niamey","NF|Pacific/Norfolk","NG|Africa/Lagos","NI|America/Managua","NL|Europe/Brussels Europe/Amsterdam","NO|Europe/Berlin Europe/Oslo","NP|Asia/Kathmandu","NR|Pacific/Nauru","NU|Pacific/Niue","NZ|Pacific/Auckland Pacific/Chatham","OM|Asia/Dubai Asia/Muscat","PA|America/Panama","PE|America/Lima","PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier","PG|Pacific/Port_Moresby Pacific/Bougainville","PH|Asia/Manila","PK|Asia/Karachi","PL|Europe/Warsaw","PM|America/Miquelon","PN|Pacific/Pitcairn","PR|America/Puerto_Rico","PS|Asia/Gaza Asia/Hebron","PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores","PW|Pacific/Palau","PY|America/Asuncion","QA|Asia/Qatar","RE|Asia/Dubai Indian/Reunion","RO|Europe/Bucharest","RS|Europe/Belgrade","RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Volgograd Europe/Astrakhan Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr","RW|Africa/Maputo Africa/Kigali","SA|Asia/Riyadh","SB|Pacific/Guadalcanal","SC|Asia/Dubai Indian/Mahe","SD|Africa/Khartoum","SE|Europe/Berlin Europe/Stockholm","SG|Asia/Singapore","SH|Africa/Abidjan Atlantic/St_Helena","SI|Europe/Belgrade Europe/Ljubljana","SJ|Europe/Berlin Arctic/Longyearbyen","SK|Europe/Prague Europe/Bratislava","SL|Africa/Abidjan Africa/Freetown","SM|Europe/Rome Europe/San_Marino","SN|Africa/Abidjan Africa/Dakar","SO|Africa/Nairobi Africa/Mogadishu","SR|America/Paramaribo","SS|Africa/Juba","ST|Africa/Sao_Tome","SV|America/El_Salvador","SX|America/Puerto_Rico America/Lower_Princes","SY|Asia/Damascus","SZ|Africa/Johannesburg Africa/Mbabane","TC|America/Grand_Turk","TD|Africa/Ndjamena","TF|Asia/Dubai Indian/Maldives Indian/Kerguelen","TG|Africa/Abidjan Africa/Lome","TH|Asia/Bangkok","TJ|Asia/Dushanbe","TK|Pacific/Fakaofo","TL|Asia/Dili","TM|Asia/Ashgabat","TN|Africa/Tunis","TO|Pacific/Tongatapu","TR|Europe/Istanbul","TT|America/Puerto_Rico America/Port_of_Spain","TV|Pacific/Tarawa Pacific/Funafuti","TW|Asia/Taipei","TZ|Africa/Nairobi Africa/Dar_es_Salaam","UA|Europe/Simferopol Europe/Kyiv","UG|Africa/Nairobi Africa/Kampala","UM|Pacific/Pago_Pago Pacific/Tarawa Pacific/Midway Pacific/Wake","US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu","UY|America/Montevideo","UZ|Asia/Samarkand Asia/Tashkent","VA|Europe/Rome Europe/Vatican","VC|America/Puerto_Rico America/St_Vincent","VE|America/Caracas","VG|America/Puerto_Rico America/Tortola","VI|America/Puerto_Rico America/St_Thomas","VN|Asia/Bangkok Asia/Ho_Chi_Minh","VU|Pacific/Efate","WF|Pacific/Tarawa Pacific/Wallis","WS|Pacific/Apia","YE|Asia/Riyadh Asia/Aden","YT|Africa/Nairobi Indian/Mayotte","ZA|Africa/Johannesburg","ZM|Africa/Maputo Africa/Lusaka","ZW|Africa/Maputo Africa/Harare"]}),o})}});function require_moment2(){let r_moment;return on_server()?r_moment=__require("moment-timezone"):r_moment=require_moment_timezone_min(),r_moment}function extract_parts(mask){let match,parts=[],merge="";for(;(match=oneOf('"',"'").exec(mask))!=null;){let end2=mask.indexOf(match[0],match.index+1);end2!==-1?(parts.push({content:merge+mask.substring(0,match.index),type:"normal"}),parts.push({content:mask.substring(match.index+1,end2),type:"literal"}),mask=mask.substring(end2+1),merge=""):(merge=mask.substring(0,match.index+1),mask=mask.substring(match.index+1))}return mask!==""&&parts.push({content:merge+mask,type:"normal"}),parts}function replaceFunc(date){return fullMatch=>{let equivalentMoment=dateTokens.get(fullMatch);if(equivalentMoment!=null)return equivalentMoment;let handler=specialHandlers[fullMatch];if(handler!=null)return handler(date);if(momentTokens.has(fullMatch))return ESCAPE_START+fullMatch+ESCAPE_END;throw new UnexpectedError("Invalid Capturing Group detected in regex!",{fullMatch})}}function convert_mask_to_moment(date,mask){mask.startsWith("UTC:")&&(mask=mask.substring(4),date=date.tz("UTC"));let parts=extract_parts(mask),result="";for(let part of parts)part.type==="literal"?(result+=ESCAPE_START,result+=part.content.replace(escapeReplacer,`${ESCAPE_END}$<esc>${ESCAPE_START}`),result+=ESCAPE_END):result+=part.content.replace(escapeReplacer,`${ESCAPE_START}$<esc>${ESCAPE_END}`).replace(replaceRegex,replaceFunc(date));return{result,date}}function format_date(date_object,mask,date_words,tz_name){var _mask;if((_mask=mask)!=null||(mask="ddd mmm dd yyyy hh:MM:ss"),date_object==null||isNaN(date_object.valueOf()))return"";{let m_object=to_moment(date_object,tz_name);if(mask){let{result,date}=convert_mask_to_moment(m_object,mask);mask=result,m_object=date}if(date_words!=null){let old_locale=import_moment.default.locale();import_moment.default.defineLocale("temp_locale",{parentLocale:old_locale,monthsShort:date_words.monthNames.slice(0,12),months:date_words.monthNames.slice(12),weekdaysShort:date_words.dayNames.slice(0,7),weekdays:date_words.dayNames.slice(7)});let result=m_object.locale("temp_locale").format(mask);return import_moment.default.updateLocale("temp_locale",null),import_moment.default.locale(old_locale),result}else return m_object.format(mask)}}function format_date_interval(interval,mask){if(isNaN(interval))return null;switch(mask){case"days":return Math.round(interval/(1e3*60*60*24)*10)/10;case"hours":return Math.round(interval/(1e3*60*60)*10)/10;case"minutes":return Math.round(interval/(1e3*60));case"seconds":return Math.round(interval/1e3)}}function human_readable_to_epoch(date_string,timezone){return date_string?timezone?import_moment.default.tz(date_string,"MM/DD/YYYY H:mm",timezone).valueOf():(0,import_moment.default)(date_string,"MM/DD/YYYY H:mm").valueOf():null}function print_date_interval(interval){for(let mask of["days","hours","minutes","seconds"]){let num=format_date_interval(interval,mask);if(num===1)return`${num} ${mask.slice(0,mask.length-1)}`;if(num!==null&&num>1||mask==="seconds")return`${num!=null?num:"NaN"} ${mask}`}return""}function get_previous_month_year(date){let now2=date!=null?date:new Date,current_year=now2.getFullYear(),current_month=now2.getMonth(),previous_month=current_month===0?12:current_month,previous_month_calendar_year=previous_month<12?current_year:current_year-1;return{month:previous_month,year:previous_month_calendar_year}}function get_prior_midnight_utc_ts(ts){return get_prior_midnight_utc_date(new Date(ts)).getTime()}function mk_date(d,timezone){let ret;if(d instanceof Date)ret=d;else if(typeof d=="number")ret=new Date(d);else if(typeof d=="string")if(String(parseFloat(d))===d)ret=new Date(parseFloat(d));else if(timezone!=null||lib_default.or_throw().bubble_version()>=17){var _timezone;if((_timezone=timezone)!=null||(timezone=lib_default.or_throw().current_timezone()),(0,import_moment.default)(d,[import_moment.default.ISO_8601,import_moment.default.RFC_2822]).isValid())ret=import_moment.default.tz(d,timezone).toDate();else if(/GMT[+-]\d{4}/.test(d)||/\((?!PM|AM|am|pm)([a-z]|[A-Z]){2,3}\)/.test(d)||/ (?!PM|AM|am|pm)([a-z]|[A-Z]){2,3}$/.test(d))ret=(0,import_moment.default)(d).toDate();else{let formatted=(0,import_moment.default)(d).format("YYYY-MM-DD[T]HH:mm:ss");ret=import_moment.default.tz(formatted,timezone).toDate()}}else ret=(0,import_moment.default)(d).toDate();else ret=new Date(NaN);return isNaN(ret.valueOf())?null:ret}function to_moment(d,tz_name){let m=(0,import_moment.default)(mk_date(d));return tz_name!=null&&m.tz(tz_name),m}function from_moment(m){return m.isValid()?mk_date(m.toDate()):null}function moment_add(base,value,unit){var _b_string$to_num;let base_moment=to_moment(base,lib_default.or_throw().current_timezone()),numeric_val=(_b_string$to_num=to_num(value))!=null?_b_string$to_num:0;return base_moment.add(numeric_val,unit),from_moment(base_moment)}function moment_set(base,value,unit){let base_moment=to_moment(base,lib_default.or_throw().current_timezone()),numeric_val=to_num(value);return numeric_val==null||base_moment.set(unit,numeric_val),from_moment(base_moment)}var import_es_string_replace4,import_web_dom_collections_iterator17,import_moment,ESCAPE_START,ESCAPE_END,allTokens,specialHandlers,escapeReplacer,momentTokens,dateTokens,replaceRegex,format_date_short_based_on_locale,get_last_day_of_month,get_last_day_of_utc_month,get_first_day_of_month,get_utc_tomorrow_midnight,get_prior_midnight_utc_date,date_math,init_b_date=__esm({"lib-browser/u/shared/b_date.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace4=__toESM(require_es_string_replace()),import_web_dom_collections_iterator17=__toESM(require_web_dom_collections_iterator()),import_moment=__toESM(require_moment());init_mode_check();init_lib();init_time();init_b_string();init_regexUtilities();init_errors();ESCAPE_START="[",ESCAPE_END="]",allTokens=[["yyyy","YYYY"],["yy","YY"],["m","M"],[null,"Mo"],["mm","MM"],["mmm","MMM"],["mmmm","MMMM"],[null,"w"],[null,"wo"],[null,"ww"],["d","D"],["dd","DD"],[null,"DDD"],[null,"DDDo"],[null,"DDDD"],["ddd","ddd"],["dddd","dddd"],[null,"do"],["TT","A"],["tt","a"],["H","H"],["HH","HH"],["h","h"],["hh","hh"],["M","m"],["MM","mm"],["L","SS"],["l","SSS"],["Z","z"],[null,"zz"]],specialHandlers={t:date=>ESCAPE_START+date.format("a")[0]+ESCAPE_END,T:date=>ESCAPE_START+date.format("A")[0]+ESCAPE_END,o:date=>{let utcOffset=date.utcOffset(),hours=Math.floor(Math.abs(utcOffset)/60),minutes=Math.abs(utcOffset)-60*hours,sign=utcOffset>=0?"+":"-";return ESCAPE_START+sign+(hours<10?`0${hours}`:`${hours}`)+(minutes<10?`0${minutes}`:`${minutes}`)+ESCAPE_END},S:date=>{let ordinality=date.format("Do");return ESCAPE_START+ordinality.replace(/\d/g,"")+ESCAPE_END}},escapeReplacer=withFlags("g",capture("esc",oneOf(ESCAPE_START,ESCAPE_END))),momentTokens=new Set(allTokens.map(a=>a[1])),dateTokens=new Map(allTokens.filter(a=>a[0]!==null)),replaceRegex=withFlags("g",capture("token",oneOf(...[...momentTokens.values(),...dateTokens.keys(),...Object.keys(specialHandlers)].sort((a,b)=>b.length-a.length))));format_date_short_based_on_locale=(date,_ref)=>{let{year,month,day,hour,minute}=_ref;return date.toLocaleString(void 0,{year:year?"numeric":void 0,month:month?"short":void 0,day:day?"numeric":void 0,hour:hour?"2-digit":void 0,minute:minute?"2-digit":void 0})};get_last_day_of_month=(year,month)=>new Date(year,month,0),get_last_day_of_utc_month=(year,month)=>new Date(Date.UTC(year,month,0)),get_first_day_of_month=(year,month)=>new Date(year,month,1),get_utc_tomorrow_midnight=()=>{let next_day=new Date(Date.now()+864e5);return new Date(Date.UTC(next_day.getUTCFullYear(),next_day.getUTCMonth(),next_day.getUTCDate()))},get_prior_midnight_utc_date=date=>{let date_to_evaluate=date!=null?date:new Date;return new Date(Date.UTC(date_to_evaluate.getUTCFullYear(),date_to_evaluate.getUTCMonth(),date_to_evaluate.getUTCDate()))};date_math={plus_seconds(base,value){var _b_string$to_num2;let base_date=mk_date(base);if(base_date==null||base==null)return null;let numeric_incr=(_b_string$to_num2=to_num(value))!=null?_b_string$to_num2:0;return mk_date(new Date(Math.round(base_date.valueOf()+numeric_incr*1e3)))},plus_minutes(base,value){var _b_string$to_num3;let base_date=mk_date(base);if(base==null||base_date==null)return null;let numeric_incr=(_b_string$to_num3=to_num(value))!=null?_b_string$to_num3:0;return mk_date(new Date(Math.round(base_date.valueOf()+numeric_incr*6e4)))},plus_hours(base,value){var _b_string$to_num4;let base_date=mk_date(base);if(base==null||base_date==null)return null;let numeric_incr=(_b_string$to_num4=to_num(value))!=null?_b_string$to_num4:0;return mk_date(new Date(Math.round(base_date.valueOf()+numeric_incr*36e5)))},plus_days(base,value){return moment_add(base,value,"days")},plus_months(base,value){return moment_add(base,value,"months")},plus_years(base,value){return moment_add(base,value,"years")},change_seconds(base,value){return moment_set(moment_set(base,value,"second"),"0","millisecond")},change_minutes(base,value){return moment_set(base,value,"minute")},change_hours(base,value){return moment_set(base,value,"hour")},change_date(base,value){return moment_set(base,value,"date")},change_month(base,value){let n_b=to_num(value);return n_b==null?mk_date(base):(n_b-=1,moment_set(base,n_b,"month"))},change_years(base,value){return moment_set(base,value,"year")},extract_from_date(base,_,properties){let tz2;switch(properties.tz_type){case"static":tz2=properties.tz_static;break;case"dynamic":tz2=properties.tz_dynamic;break;default:tz2=lib_default.or_throw().current_timezone()}let base_moment=to_moment(base,tz2);if(!base_moment.isValid())return null;switch(properties.component_to_extract){case"minute":return base_moment.minute();case"hour":return base_moment.hour();case"day":return base_moment.day();case"date":return base_moment.date();case"week":return base_moment.isoWeek();case"month":return base_moment.month()+1;case"year":return base_moment.year();case"UNIX":return base_moment.valueOf();default:return null}}}}});function optional_pause_tick(){let weight=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,pause_message=arguments.length>1?arguments[1]:void 0;if(on_server()){var _b_fiber$Fiber$curren,_b_fiber$Fiber$curren2;(_b_fiber$Fiber$curren2=(_b_fiber$Fiber$curren=Fiber.current).optional_pause_ticks)!=null||(_b_fiber$Fiber$curren.optional_pause_ticks=0),Fiber.current.optional_pause_ticks+=weight,Fiber.current.optional_pause_ticks>=WEIGHT_PER_PAUSE&&(Fiber.current.optional_pause_ticks=0,optional_pause(pause_message))}}function with_pause_tick(operation){let weight=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return function(){let result=operation(...arguments);return optional_pause_tick(weight),result}}function incremental_json_deep_copy(data){let string=incremental_json_stringify(data);return incremental_json_parse(string)}function incremental_json_parse(string){let incremental_threshold=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e4;return String(string)===""?null:!on_server()||String(string).length<incremental_threshold?JSON.parse(string):JSON.parse(string,(key,value)=>(optional_pause_tick(1,"incremental json parse"),value))}function incremental_json_stringify(obj){return on_server()?JSON.stringify(obj,(key,value)=>(optional_pause_tick(1,"incremental json stringify"),value)):JSON.stringify(obj)}function incremental_json_length(object2){let should_count=arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>!0,seen=new Set,stack=[],length=0,count2=0;function visit(value){switch(count2++,count2%100===0&&optional_pause("incremental json length"),typeof value){case"string":length+=2+value.length;return;case"boolean":case"number":length+=String(value).length;return;case"function":return;case"object":value==null?length+=4:import_buffer.Buffer.isBuffer(value)?length+=2+value.length:seen.has(value)||(seen.add(value),stack.push(value))}}for(visit(object2);stack.length>0;){let next=stack.pop();if(Array.isArray(next)){length+=2;for(let i=0;i<next.length;i++)visit(next[i]),length+=i===0?0:1}else if(next.constructor===Object||next.constructor===null){length+=2;let first=!0;for(let key in next){let value=next[key];value!==void 0&&should_count(key,value)&&(length+=2+key.length+1,visit(value),length+=first?0:1,first=!1)}}}return length}function incremental_for_each(){let array,fn,iterations;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];args.length>2?[iterations,array,fn]=args:(iterations=50,[array,fn]=args),array.forEach((item,idx,array2)=>{if(fn(item,idx,array2),(idx+1)%iterations===0)return optional_pause()})}function incremental_map(){let array,fn,iterations;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return args.length>2?[iterations,array,fn]=args:(iterations=50,[array,fn]=args),array.map((item,idx,array2)=>{let ret=fn(item,idx,array2);return(idx+1)%iterations===0&&optional_pause(),ret})}function incremental_for_each_2(){let array,fn,iterations;for(var _len3=arguments.length,args=new Array(_len3),_key3=0;_key3<_len3;_key3++)args[_key3]=arguments[_key3];args.length>2?[iterations,array,fn]=args:(iterations=50,[array,fn]=args);let count2=0;for(let child_array of array)for(let inner_item of child_array)fn(inner_item),count2++,count2%iterations===0&&optional_pause()}function json_to_csv(obj,separator,show_labels,show_quotes,optional_pause_interval){var _separator,_show_labels,_show_quotes,_optional_pause_inter;(_separator=separator)!=null||(separator=","),(_show_labels=show_labels)!=null||(show_labels=!0),(_show_quotes=show_quotes)!=null||(show_quotes=!1),(_optional_pause_inter=optional_pause_interval)!=null||(optional_pause_interval=100),typeof obj!="object"&&(obj=JSON.parse(obj));let str="";if(show_labels){let processed_entry=[];if(show_quotes)for(let key in obj[0]){let value=key+"";processed_entry.push('"'+value.replace(/"/g,'""')+'"')}else for(let key in obj[0])processed_entry.push(key);str=processed_entry.join(separator)+`
`}for(let index=0;index<obj.length;index++){let entry=obj[index];index%optional_pause_interval===0&&optional_pause();let processed_entry=[];if(show_quotes)for(let key in entry){let value=String(entry[key]);processed_entry.push('"'+value.replace(/"/g,'""')+'"')}else for(let key in entry){let value=entry[key];processed_entry.push(value)}str=str+processed_entry.join(separator)+`
`}return str}var import_web_dom_collections_iterator18,import_es_string_replace5,WEIGHT_PER_PAUSE,init_incremental=__esm({"lib-browser/u/shared/incremental.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator18=__toESM(require_web_dom_collections_iterator()),import_es_string_replace5=__toESM(require_es_string_replace());init_b_fiber();init_mode_check();WEIGHT_PER_PAUSE=100}});function num_equals(a,b){let numA=to_num(a),numB=to_num(b),absA=Math.abs(numA),absB=Math.abs(numB);if(numA===numB)return!0;let diff=Math.abs(numA-numB),epsilon=1e-15;return numA===0||numB===0||diff<Number.MIN_VALUE?diff<epsilon*Number.MIN_VALUE:diff/Math.min(absA+absB,Number.MAX_VALUE)<epsilon}var import_es_string_replace6,DEFAULT_PRECISION,_round_number,round_all,dec_to_string,init_b_number=__esm({"lib-browser/u/shared/b_number.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace6=__toESM(require_es_string_replace());init_b_fiber();init_incremental();init_b_string();DEFAULT_PRECISION=15,_round_number=number2=>parseFloat(number2.toPrecision(DEFAULT_PRECISION)),round_all=function(obj){let counter_obj=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{count:0};if(Array.isArray(obj))incremental_for_each(obj,(elem,i,arr)=>{typeof elem=="number"?arr[i]=_round_number(elem):round_all(arr[i],counter_obj)});else if(obj&&(obj.constructor===Object||obj.constructor==null))for(let key in obj)typeof obj[key]=="number"?(counter_obj.count++,obj[key]=_round_number(obj[key])):round_all(obj[key],counter_obj)},dec_to_string=function(val){let max_precision=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DEFAULT_PRECISION,result=val.toPrecision(max_precision);return result=result.replace(/(\.[0-9]*?)0*(e-?[0-9]+)?$/,"$1$2").replace(/\.(e-?[0-9]+)?$/,"$1"),result}}});var searchNextIncrementalNumber,searchLastObservedPresentValueAndFirstObservedAbsentValue,binarySearchNextIncrementalNumber,init_b_search=__esm({"lib-browser/u/shared/b_search.js"(){"use strict";init_define_process_env();init_shim();searchNextIncrementalNumber=_ref=>{let{isPresent,startValue}=_ref,{lastObservedPresentValue,firstObservedAbsentValue}=searchLastObservedPresentValueAndFirstObservedAbsentValue({isPresent,startValue});return lastObservedPresentValue==null?firstObservedAbsentValue:binarySearchNextIncrementalNumber({isPresent:value=>value===firstObservedAbsentValue?!1:isPresent(value),fromValue:lastObservedPresentValue+1,toValue:firstObservedAbsentValue})},searchLastObservedPresentValueAndFirstObservedAbsentValue=_ref2=>{let{isPresent,startValue}=_ref2;if(isPresent(startValue)){let nextStartValue=startValue===0?1:startValue*2;return{lastObservedPresentValue:startValue,...searchLastObservedPresentValueAndFirstObservedAbsentValue({isPresent,startValue:nextStartValue})}}else return{firstObservedAbsentValue:startValue}},binarySearchNextIncrementalNumber=_ref3=>{let{isPresent,fromValue,toValue}=_ref3,nextAbsentValue=Number.NaN;for(;fromValue<=toValue;){let middleValue=Math.floor((fromValue+toValue)/2);isPresent(middleValue)?fromValue=middleValue+1:(nextAbsentValue=middleValue,toValue=middleValue-1)}return nextAbsentValue}}});function fromBB_to_HTML(str,is_pre_wrap){return isPreWrap=is_pre_wrap,_fromBB_to_HTML(str,!0)}function probably_has_bbcode(str){return!!str.match(PROBABLE_TAG_REGEX)}var import_es_string_replace7,breakAfterBlock,breakStartBlock,breakEndBlock,breakAfterBlock,fixInvalidChildren,removeEmptyTags,fixInvalidNesting,isPreWrap,QuoteType,stripQuotes,formatString,normaliseColour,list_types,listStyle,escapeEntities,parse2,tokenType,hasTag,TokenizeToken,tokenize,tokenizeTag,tokenizeAttrs,parseTokens,last,lower,normaliseNewLines,convertToHTML,fixChildren,removeEmpty,fixNesting,isChildAllowed,get_bbcodes,toHTML,_fromBB_to_HTML,PROBABLE_TAG_REGEX,init_bbcodeparser=__esm({"lib-browser/u/client/bbcodeparser.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace7=__toESM(require_es_string_replace()),breakAfterBlock=!0,breakStartBlock=!1,breakEndBlock=!1,breakAfterBlock=!1,fixInvalidChildren=!0,removeEmptyTags=!0,fixInvalidNesting=!0,isPreWrap=!1,QuoteType={always:1,never:2,auto:3},stripQuotes=function(str){return str&&str.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2")},formatString=function(){var args=arguments;return args[0].replace(/\{(\d+)\}/g,function(str,p1){return typeof args[p1-0+1]<"u"?args[p1-0+1]:"{"+p1+"}"})},normaliseColour=function(color){var m,toHex;return toHex=function(n){return n=parseInt(n,10),isNaN(n)?"00":(n=Math.max(0,Math.min(n,255)).toString(16),n.length<2?"0"+n:n)},color=color||"#000",(m=color.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+toHex(m[1])+toHex(m[2]-0)+toHex(m[3]-0):(m=color.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+m[1]+m[1]+m[2]+m[2]+m[3]+m[3]:color},list_types=["decimal","lower-alpha","lower-roman"],listStyle=function(index){for(;list_types.length<=index;)list_types.push("decimal","lower-alpha","lower-roman");return list_types[index]},escapeEntities=function(str){return str&&str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ {2}/g," &nbsp;").replace(/\r\n|\r/g,`
`).replace(/\n/g,"<br />")},parse2=function(str,preserveNewLines){var ret=parseTokens(tokenize(str));return fixInvalidChildren&&fixChildren(ret),removeEmptyTags&&removeEmpty(ret),fixInvalidNesting&&fixNesting(ret),normaliseNewLines(ret,null,preserveNewLines),removeEmptyTags&&removeEmpty(ret),ret},tokenType={open:"open",content:"content",newline:"newline",close:"close"},hasTag=function(name,type,arr){for(var i=arr.length;i--;)if(arr[i].type===type&&arr[i].name===name)return!0;return!1},TokenizeToken=function(type,name,val,attrs,children2,closing){var base=this;base.type=type,base.name=name,base.val=val,base.attrs=attrs||{},base.children=children2||[],base.closing=closing||null};TokenizeToken.prototype={clone:function(includeChildren){var base=this;return new TokenizeToken(base.type,base.name,base.val,base.attrs,includeChildren?base.children:[],base.closing?base.closing.clone():null)},splitAt:function(splitAt){var clone,base=this,splitAtLength=0,childrenLen=base.children.length;if(typeof object!="number"&&(splitAt=base.children.indexOf(splitAt)),splitAt<0||splitAt>childrenLen)return null;for(;childrenLen--;)childrenLen>=splitAt?splitAtLength++:childrenLen=0;return clone=base.clone(),clone.children=base.children.splice(splitAt,splitAtLength),clone}};tokenize=function(str){var matches,type,i,toks=[],tokens=[{type:"close",regex:/^\[\/[^\[\]]+\]/},{type:"open",regex:/^\[[^\[\]]+\]/},{type:"newline",regex:/^(\r\n|\r|\n)/},{type:"content",regex:/^([^\[\r\n]+|\[)/}];tokens.reverse();strloop:for(;str.length;){for(i=tokens.length;i--;)if(type=tokens[i].type,!(!(matches=str.match(tokens[i].regex))||!matches[0])){toks.push(tokenizeTag(type,matches[0])),str=str.substr(matches[0].length);continue strloop}str.length&&toks.push(tokenizeTag(tokenType.content,str)),str=""}return toks},tokenizeTag=function(type,val){var matches,attrs,name;return type==="open"&&(matches=val.match(/\[([^\]\s=]+)(?:([^\]]+))?\]/))?(name=lower(matches[1]),matches[2]&&(matches[2]=matches[2].replace(/^\s\s*/,"").replace(/\s\s*$/,""))&&(attrs=tokenizeAttrs(matches[2]))):type==="close"&&(matches=val.match(/\[\/([^\[\]]+)\]/))?name=lower(matches[1]):type==="newline"&&(name="#newline"),(!name||(type==="open"||type==="close")&&!get_bbcodes()[name])&&(type="content",name="#"),new TokenizeToken(type,name,val,attrs)},tokenizeAttrs=function(attrs){var matches,atribsRegex=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,unquote=stripQuotes,ret={};if(attrs.charAt(0)==="="&&attrs.indexOf("=",1)<0)ret.defaultattr=unquote(attrs.substr(1));else for(attrs.charAt(0)==="="&&(attrs="defaultattr"+attrs);matches=atribsRegex.exec(attrs);)ret[lower(matches[1])]=unquote(matches[3])||matches[4];return ret},parseTokens=function(toks){for(var token,bbcode,curTok,clone,i,previous,next,cloned=[],output3=[],openTags=[],currentOpenTag=function(){return last(openTags)},addTag=function(token2){currentOpenTag()?currentOpenTag().children.push(token2):output3.push(token2)},closesCurrentTag=function(name){return currentOpenTag()&&(bbcode=get_bbcodes()[currentOpenTag().name])&&bbcode.closedBy&&bbcode.closedBy.indexOf(name)>-1};token=toks.shift();){switch(next=toks[0],token.type){case tokenType.open:closesCurrentTag(token.name)&&openTags.pop(),addTag(token),bbcode=get_bbcodes()[token.name],(!bbcode||!bbcode.isSelfClosing)&&(bbcode.closedBy||hasTag(token.name,tokenType.close,toks))?openTags.push(token):(!bbcode||!bbcode.isSelfClosing)&&(token.type=tokenType.content);break;case tokenType.close:if(currentOpenTag()&&token.name!==currentOpenTag().name&&closesCurrentTag("/"+token.name)&&openTags.pop(),currentOpenTag()&&token.name===currentOpenTag().name)currentOpenTag().closing=token,openTags.pop();else if(hasTag(token.name,tokenType.open,openTags)){for(;curTok=openTags.pop();){if(curTok.name===token.name){curTok.closing=token;break}clone=curTok.clone(),cloned.length>1&&clone.children.push(last(cloned)),cloned.push(clone)}for(addTag(last(cloned)),i=cloned.length;i--;)openTags.push(cloned[i]);cloned.length=0}else token.type=tokenType.content,addTag(token);break;case tokenType.newline:currentOpenTag()&&next&&closesCurrentTag((next.type===tokenType.close?"/":"")+next.name)&&(next.type===tokenType.close&&next.name===currentOpenTag().name||(bbcode=get_bbcodes()[currentOpenTag().name],(bbcode&&bbcode.breakAfter||bbcode&&bbcode.isInline===!1&&breakAfterBlock&&bbcode.breakAfter!==!1)&&openTags.pop())),addTag(token);break;default:addTag(token);break}previous=token}return output3},last=function(arr){return arr.length?arr[arr.length-1]:null},lower=function(str){return str.toLowerCase()},normaliseNewLines=function(children2,parent,onlyRemoveBreakAfter){var token,left2,right2,parentBBCode,bbcode,removedBreakEnd,removedBreakBefore,remove,childrenLength=children2.length,i=childrenLength;for(parent&&(parentBBCode=get_bbcodes()[parent.name]);i--;)if(token=children2[i])if(token.type===tokenType.newline){if(left2=i>0?children2[i-1]:null,right2=i<childrenLength-1?children2[i+1]:null,remove=!1,!onlyRemoveBreakAfter&&parentBBCode&&parentBBCode.isSelfClosing!==!0&&(left2?!removedBreakEnd&&!right2&&(parentBBCode.isInline===!1&&breakEndBlock&&parentBBCode.breakEnd!==!1&&(remove=!0),parentBBCode.breakEnd&&(remove=!0),removedBreakEnd=remove):(parentBBCode.isInline===!1&&breakStartBlock&&parentBBCode.breakStart!==!1&&(remove=!0),parentBBCode.breakStart&&(remove=!0))),left2&&left2.type===tokenType.open&&(bbcode=get_bbcodes()[left2.name])&&(onlyRemoveBreakAfter?bbcode.isInline===!1&&(remove=!0):(bbcode.isInline===!1&&breakAfterBlock&&bbcode.breakAfter!==!1&&(remove=!0),bbcode.breakAfter&&(remove=!0))),!onlyRemoveBreakAfter&&!removedBreakBefore&&right2&&right2.type===tokenType.open&&(bbcode=get_bbcodes()[right2.name])&&(bbcode.isInline,bbcode.breakBefore&&(remove=!0),removedBreakBefore=remove,remove)){children2.splice(i,1);continue}remove&&children2.splice(i,1),removedBreakBefore=!1}else token.type===tokenType.open&&normaliseNewLines(token.children,token,onlyRemoveBreakAfter)},convertToHTML=function(tokens,isRoot){var token,bbcode,content,html,needsBlockWrap,blockWrapOpen,isInline,lastChild,ret=[];for(isInline=function(bbcode2){return(!bbcode2||(typeof bbcode2.isHtmlInline<"u"?bbcode2.isHtmlInline:bbcode2.isInline))!==!1};tokens.length>0;)if(token=tokens.shift()){if(token.type===tokenType.open)lastChild=token.children[token.children.length-1]||{},bbcode=get_bbcodes()[token.name],needsBlockWrap=isRoot&&isInline(bbcode),content=convertToHTML(token.children,!1),bbcode&&bbcode.html?(!isInline(bbcode)&&isInline(get_bbcodes()[lastChild.name])&&!bbcode.isPreFormatted&&!bbcode.skipLastLineBreak&&(content+="<br />"),typeof bbcode.html=="function"?html=bbcode.html(token,token.attrs,content):html=formatString(bbcode.html,content)):html=token.val+content+(token.closing?token.closing.val:"");else if(token.type===tokenType.newline){if(isRoot&&blockWrapOpen==!1){ret.push("<br />");continue}!blockWrapOpen&&!isPreWrap&&(ret.push("<div>"),blockWrapOpen=!0),blockWrapOpen&&ret.push("</div>"),ret.push(`
`),blockWrapOpen=!1;continue}else needsBlockWrap=isRoot,html=escapeEntities(token.val);!needsBlockWrap&&blockWrapOpen&&(ret.push(`</div>
`),blockWrapOpen=!1),ret.push(html)}return blockWrapOpen&&ret.push(`</div>
`),ret.join("")},fixChildren=function(children2,parent){for(var token,args,i=children2.length;i--;)(token=children2[i])&&(isChildAllowed(parent,token)||(token.name=null,token.type=tokenType.content,isChildAllowed(parent,token)?(args=[i+1,0].concat(token.children),token.closing&&(token.closing.name=null,token.closing.type=tokenType.content,args.push(token.closing)),i+=args.length-1,Array.prototype.splice.apply(children2,args)):parent.children.splice(i,1)),token.type===tokenType.open&&fixChildren(token.children,token))},removeEmpty=function(tokens){var token,bbcode,isTokenWhiteSpace,i=tokens.length;for(isTokenWhiteSpace=function(children2){for(var j2=children2.length;j2--;)if(children2[j2].type===tokenType.open||children2[j2].type===tokenType.close||children2[j2].type===tokenType.content&&children2[j2].val&&/\S|\u00A0/.test(children2[j2].val))return!1;return!0};i--;)!(token=tokens[i])||token.type!==tokenType.open||(bbcode=get_bbcodes()[token.name],removeEmpty(token.children),isTokenWhiteSpace(token.children)&&bbcode&&!bbcode.isSelfClosing&&!bbcode.allowsEmpty&&tokens.splice.apply(tokens,[i,1].concat(token.children)))},fixNesting=function(children2,parents,insideInline,rootArr){var token,i,parent,parentIndex,parentParentChildren,right2,isInline=function(token2){var bbcode=get_bbcodes()[token2.name];return!bbcode||bbcode.isInline!==!1};for(parents=parents||[],rootArr=rootArr||children2,i=0;i<children2.length;i++)if(!(!(token=children2[i])||token.type!==tokenType.open)){if(!isInline(token)&&insideInline&&(parent=last(parents),right2=parent.splitAt(token),parentParentChildren=parents.length>1?parents[parents.length-2].children:rootArr,(parentIndex=parentParentChildren.indexOf(parent))>-1)){right2.children.splice(right2.children.indexOf(token),1),parentParentChildren.splice(parentIndex+1,0,token,right2);return}parents.push(token),fixNesting(token.children,parents,insideInline||isInline(token),rootArr),parents.pop(token)}},isChildAllowed=function(parent,child){var bbcode=parent?get_bbcodes()[parent.name]:null,allowedChildren=bbcode?bbcode.allowedChildren:null;return!fixInvalidChildren||!allowedChildren?!0:!(allowedChildren&&allowedChildren.indexOf(child.name||"#")<0)},get_bbcodes=function(){return{b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"<strong>{0}</strong>"},em:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"<em>{0}</em>"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"<em>{0}</em>"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"<u>{0}</u>"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"<s>{0}</s>"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"<sub>{0}</sub>"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"<sup>{0}</sup>"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:QuoteType.never,format:function(element,content){var font;return(element[0].nodeName.toLowerCase()!=="font"||!(font=element.attr("face")))&&(font=element.css("font-family")),"[font="+stripQuotes(font)+"]"+content+"[/font]"},html:function(token,attrs,content){return'<font face="'+attrs.defaultattr+'">'+content+"</font>"}},h1:{tags:{h1:null},styles:{"font-size":null},format:"[h1]{0}[/h1]",html:function(token,attrs,content){return'<span style="font-size:2.2em">'+content+"</span>"}},h2:{tags:{h2:null},styles:{"font-size":null},format:"[h2]{0}[/h2]",html:function(token,attrs,content){return'<span style="font-size:1.7em">'+content+"</span>"}},h3:{tags:{h3:null},styles:{"font-size":null},format:"[h3]{0}[/h3]",html:function(token,attrs,content){return'<span style="font-size:1.17em">'+content+"</span>"}},h4:{tags:{h4:null},styles:{"font-size":null},format:"[h4]{0}[/h4]",html:function(token,attrs,content){return'<span style="font-size:1em">'+content+"</span>"}},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(element,content){var fontSize=element.attr("size"),size=1;return fontSize||(fontSize=element.css("fontSize")),fontSize.indexOf("px")>-1?(fontSize=fontSize.replace("px","")-0,fontSize>12&&(size=2),fontSize>15&&(size=3),fontSize>17&&(size=4),fontSize>23&&(size=5),fontSize>31&&(size=6),fontSize>47&&(size=7)):size=fontSize,"[size="+size+"]"+content+"[/size]"},html:function(token,attrs,content){return'<font size="'+attrs.defaultattr+'">'+content+"</font>"}},color:{tags:{font:{color:null}},styles:{color:null},quoteType:QuoteType.never,html:function(token,attrs,content){return'<font color="'+normaliseColour(attrs.defaultattr)+'">'+content+"</font>"}},highlight:{tags:{font:{color:null}},styles:{color:null},quoteType:QuoteType.never,html:function(token,attrs,content){return'<span style="background:'+normaliseColour(attrs.defaultattr)+'">'+content+"</span>"}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"<ul>{0}</ul>"},ml:{tags:{ml:null},html:""},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:function(token,attrs,content){var map_label_to_style={1:"decimal",a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};if(attrs.defaultattr!=null&&map_label_to_style[attrs.defaultattr]!=null){var value=map_label_to_style[attrs.defaultattr];return'<ol style="list-style-type:'+value+'">'+content+"</ol>"}return"<ul>"+content+"</ul>"}},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:function(token,attrs,content){if(typeof attrs.data<"u"){var index=Number(attrs.data);return'<ol style="list-style-type:'+listStyle(index)+';">'+content+"</ol>"}else return"<ol>"+content+"</ol>"}},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:function(token,attrs,content){return typeof attrs.align<"u"?'<li style="text-align:'+attrs.align+';">'+content+"</li>":"<li>"+content+"</li>"}},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"<li>{0}</li>"},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,html:"<table>{0}</table>"},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,html:"<tr>{0}</tr>"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,html:"<th>{0}</th>"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,html:"<td>{0}</td>"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,html:"<hr />"},img:{allowsEmpty:!0,tags:{img:{src:null}},quoteType:QuoteType.never,html:function(token,attrs,content){var parts,attribs="";return typeof attrs.width<"u"&&(attribs+=' width="'+attrs.width+'"'),typeof attrs.height<"u"&&(attribs+=' height="'+attrs.height+'"'),attrs.defaultattr&&(parts=attrs.defaultattr.split(/x/i),attribs=' width="'+parts[0]+'" height="'+(parts.length===2?parts[1]:parts[0])+'"'),attrs.alt&&(attribs+=' alt="'+attrs.alt+'"'),typeof window>"u"&&content.indexOf("http:")===-1&&content.indexOf("https:")===-1&&(content="http:"+content),"<img"+attribs+' src="'+content+'" />'}},link:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:QuoteType.never,html:function(token,attrs,content){return'<a href="'+encodeURI(attrs.defaultattr||content)+'" target="_blank">'+content+"</a>"}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:QuoteType.never,html:function(token,attrs,content){var target,r2;return typeof attrs.target>"u"?target="_blank":target=attrs.target,r2='<a href="'+(attrs.defaultattr||content)+'" target='+target,typeof attrs.nofollow<"u"&&(r2=r2+' rel="nofollow"'),r2=r2+">"+content+"</a>",r2}},email:{quoteType:QuoteType.never,html:function(token,attrs,content){return'<a href="mailto:'+(attrs.defaultattr||content)+'" target = "_blank">'+content+"</a>"}},quote:{tags:{blockquote:null},isInline:!1,quoteType:QuoteType.never,html:function(token,attrs,content){return attrs.defaultattr&&(content='<cite style="border-left: 4px solid #ccc;margin-bottom: 5px;margin-top: 5px;padding-left: 16px;">'+attrs.defaultattr+"</cite>"+content),'<blockquote style="border-left: 4px solid #ccc;margin-bottom: 5px;margin-top: 5px;padding-left: 16px;">'+content+"</blockquote>"}},indent:{tags:{indent:null},isInline:!0,html:function(token,attrs,content){var indent="<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";if(typeof attrs.data<"u"){for(var indent_num=Number(attrs.data),all_indents="",tracker=1;tracker<=indent_num;)all_indents+=indent,tracker+=1;return all_indents+content}else return content}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],html:"<code>{0}</code>"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,html:'<div align="left">{0}</div>'},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,html:'<div align="center">{0}</div>'},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,html:'<div align="right">{0}</div>'},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,html:'<div align="justify" '+(isPreWrap?'style="white-space: pre-line"':"")+">{0}</div>"},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},html:'<iframe width="560" height="315" src="//www.youtube.com/embed/{0}?wmode=opaque" data-youtube-id="{0}" frameborder="0" allowfullscreen></iframe>'},video:{allowsEmpty:!0,html:'<iframe width="560" height="315" src="{0}" frameborder="0" allowfullscreen></iframe>'},rtl:{styles:{direction:["rtl"]},html:'<div style="direction: rtl">{0}</div>'},ltr:{styles:{direction:["ltr"]},html:'<div style="direction: ltr">{0}</div>'},fa:{quoteType:QuoteType.never,html:function(token,attrs,content){return'<div class="fa fa-'+(attrs.defaultattr||content)+'"></div>'}},ignore:{}}},toHTML=function(str,preserveNewLines){return convertToHTML(parse2(str,preserveNewLines),!0)},_fromBB_to_HTML=toHTML;PROBABLE_TAG_REGEX=/\[\/([^\]]{1,20})\]/}});var workflow_exports={};__export(workflow_exports,{ALLOWED_WORKFLOW_FAILURES:()=>ALLOWED_WORKFLOW_FAILURES,CAUGHT_ERROR_SOURCES:()=>CAUGHT_ERROR_SOURCES,DEFAULT_CATCHER_TYPE:()=>DEFAULT_CATCHER_TYPE,ERROR_CATCHER_TYPES:()=>ERROR_CATCHER_TYPES,ERROR_SOURCES:()=>ERROR_SOURCES,KEY_CODE_TO_CHAR:()=>KEY_CODE_TO_CHAR,MAX_RECURSIVE_WORKFLOW_DEPTH_LIVE:()=>MAX_RECURSIVE_WORKFLOW_DEPTH_LIVE,MAX_RECURSIVE_WORKFLOW_DEPTH_TEST:()=>MAX_RECURSIVE_WORKFLOW_DEPTH_TEST,WORKFLOW_FAILED_SERVERSIDE:()=>WORKFLOW_FAILED_SERVERSIDE});var MAX_RECURSIVE_WORKFLOW_DEPTH_LIVE,MAX_RECURSIVE_WORKFLOW_DEPTH_TEST,ERROR_SOURCES,ERROR_CATCHER_TYPES,DEFAULT_CATCHER_TYPE,CAUGHT_ERROR_SOURCES,WORKFLOW_FAILED_SERVERSIDE,ALLOWED_WORKFLOW_FAILURES,KEY_CODE_TO_CHAR,init_workflow=__esm({"lib-browser/constants/workflow.js"(){"use strict";init_define_process_env();init_shim();MAX_RECURSIVE_WORKFLOW_DEPTH_LIVE="max_recursive_workflow_depth_live",MAX_RECURSIVE_WORKFLOW_DEPTH_TEST="max_recursive_workflow_depth_test",ERROR_SOURCES=function(ERROR_SOURCES2){return ERROR_SOURCES2.GENERAL_WORKFLOW="general_workflow",ERROR_SOURCES2.ELEMENT_WORKFLOW="element_workflow",ERROR_SOURCES2.ELEMENT="element",ERROR_SOURCES2}({}),ERROR_CATCHER_TYPES=function(ERROR_CATCHER_TYPES2){return ERROR_CATCHER_TYPES2.all_wf_errors="Any workflow error",ERROR_CATCHER_TYPES2.element_wf_errors="Element workflow errors only",ERROR_CATCHER_TYPES2}({}),DEFAULT_CATCHER_TYPE="element_wf_errors",CAUGHT_ERROR_SOURCES={all_wf_errors:[ERROR_SOURCES.GENERAL_WORKFLOW,ERROR_SOURCES.ELEMENT_WORKFLOW,ERROR_SOURCES.ELEMENT],element_wf_errors:[ERROR_SOURCES.ELEMENT_WORKFLOW,ERROR_SOURCES.ELEMENT]},WORKFLOW_FAILED_SERVERSIDE="We weren't able to complete your action.  Please try again...",ALLOWED_WORKFLOW_FAILURES=[WORKFLOW_FAILED_SERVERSIDE],KEY_CODE_TO_CHAR={KeyA:"A",KeyB:"B",KeyC:"C",KeyD:"D",KeyE:"E",KeyF:"F",KeyG:"G",KeyH:"H",KeyI:"I",KeyJ:"J",KeyK:"K",KeyL:"L",KeyM:"M",KeyN:"N",KeyO:"O",KeyP:"P",KeyQ:"Q",KeyR:"R",KeyS:"S",KeyT:"T",KeyU:"U",KeyV:"V",KeyW:"W",KeyX:"X",KeyY:"Y",KeyZ:"Z",Backspace:"Backspace",Tab:"Tab",BracketLeft:"[",BracketRight:"]",Backslash:"\\",Semicolon:";",Quote:"'",Comma:",",Period:".",Slash:"/",Space:"Spacebar",Backquote:"`",Minus:"-",Equal:"=",CapsLock:"Caps Lock",ArrowDown:"Down Arrow",ArrowUp:"Up Arrow",ArrowLeft:"Left Arrow",ArrowRight:"Right Arrow",Enter:"Enter",Escape:"Esc",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F12:"F12",PageUp:"PageUp",PageDown:"PageDown",Delete:"Delete",NumpadAdd:"+",NumpadEnter:"Enter",Numpad1:"1(Numpad)",Numpad2:"2(Numpad)",Numpad3:"3(Numpad)",Numpad4:"4(Numpad)",Numpad5:"5(Numpad)",Numpad6:"6(Numpad)",Numpad7:"7(Numpad)",Numpad8:"8(Numpad)",Numpad9:"9(Numpad)",Numpad0:"0(Numpad)",NumpadDecimal:".(Numpad)",NumpadDivide:"/(Numpad)",NumpadMultiply:"*(Numpad)",NumpadSubtract:"-"}}});function setHydrateContext(context){sharedConfig.context=context}function nextHydrateContext(){return{...sharedConfig.context,id:`${sharedConfig.context.id}${sharedConfig.context.count++}-`,count:0}}function createRoot(fn,detachedOwner){let listener=Listener,owner=Owner,unowned=fn.length===0,current=detachedOwner===void 0?owner:detachedOwner,root2=unowned?UNOWNED:{owned:null,cleanups:null,context:current?current.context:null,owner:current},updateFn=unowned?fn:()=>fn(()=>untrack(()=>cleanNode(root2)));Owner=root2,Listener=null;try{return runUpdates(updateFn,!0)}finally{Listener=listener,Owner=owner}}function createSignal(value,options){options=options?Object.assign({},signalOptions,options):signalOptions;let s={value,observers:null,observerSlots:null,comparator:options.equals||void 0},setter=value2=>(typeof value2=="function"&&(Transition&&Transition.running&&Transition.sources.has(s)?value2=value2(s.tValue):value2=value2(s.value)),writeSignal(s,value2));return[readSignal.bind(s),setter]}function createComputed(fn,value,options){let c=createComputation(fn,value,!0,STALE);Scheduler&&Transition&&Transition.running?Updates.push(c):updateComputation(c)}function createRenderEffect(fn,value,options){let c=createComputation(fn,value,!1,STALE);Scheduler&&Transition&&Transition.running?Updates.push(c):updateComputation(c)}function createEffect(fn,value,options){runEffects=runUserEffects;let c=createComputation(fn,value,!1,STALE),s=SuspenseContext&&useContext(SuspenseContext);s&&(c.suspense=s),(!options||!options.render)&&(c.user=!0),Effects?Effects.push(c):updateComputation(c)}function createMemo(fn,value,options){options=options?Object.assign({},signalOptions,options):signalOptions;let c=createComputation(fn,value,!0,0);return c.observers=null,c.observerSlots=null,c.comparator=options.equals||void 0,Scheduler&&Transition&&Transition.running?(c.tState=STALE,Updates.push(c)):updateComputation(c),readSignal.bind(c)}function isPromise(v){return v&&typeof v=="object"&&"then"in v}function createResource(pSource,pFetcher,pOptions){let source,fetcher,options;arguments.length===2&&typeof pFetcher=="object"||arguments.length===1?(source=!0,fetcher=pSource,options=pFetcher||{}):(source=pSource,fetcher=pFetcher,options=pOptions||{});let pr=null,initP=NO_INIT,id=null,loadedUnderTransition=!1,scheduled=!1,resolved="initialValue"in options,dynamic=typeof source=="function"&&createMemo(source),contexts=new Set,[value,setValue]=(options.storage||createSignal)(options.initialValue),[error2,setError]=createSignal(void 0),[track2,trigger]=createSignal(void 0,{equals:!1}),[state4,setState]=createSignal(resolved?"ready":"unresolved");if(sharedConfig.context){id=`${sharedConfig.context.id}${sharedConfig.context.count++}`;let v;options.ssrLoadFrom==="initial"?initP=options.initialValue:sharedConfig.load&&(v=sharedConfig.load(id))&&(initP=v)}function loadEnd(p,v,error3,key){return pr===p&&(pr=null,key!==void 0&&(resolved=!0),(p===initP||v===initP)&&options.onHydrated&&queueMicrotask(()=>options.onHydrated(key,{value:v})),initP=NO_INIT,Transition&&p&&loadedUnderTransition?(Transition.promises.delete(p),loadedUnderTransition=!1,runUpdates(()=>{Transition.running=!0,completeLoad(v,error3)},!1)):completeLoad(v,error3)),v}function completeLoad(v,err){runUpdates(()=>{err===void 0&&setValue(()=>v),setState(err!==void 0?"errored":resolved?"ready":"unresolved"),setError(err);for(let c of contexts.keys())c.decrement();contexts.clear()},!1)}function read(){let c=SuspenseContext&&useContext(SuspenseContext),v=value(),err=error2();if(err!==void 0&&!pr)throw err;return Listener&&!Listener.user&&c&&createComputed(()=>{track2(),pr&&(c.resolved&&Transition&&loadedUnderTransition?Transition.promises.add(pr):contexts.has(c)||(c.increment(),contexts.add(c)))}),v}function load(refetching=!0){if(refetching!==!1&&scheduled)return;scheduled=!1;let lookup=dynamic?dynamic():source;if(loadedUnderTransition=Transition&&Transition.running,lookup==null||lookup===!1){loadEnd(pr,untrack(value));return}Transition&&pr&&Transition.promises.delete(pr);let p=initP!==NO_INIT?initP:untrack(()=>fetcher(lookup,{value:value(),refetching}));return isPromise(p)?(pr=p,"value"in p?(p.status==="success"?loadEnd(pr,p.value,void 0,lookup):loadEnd(pr,void 0,void 0,lookup),p):(scheduled=!0,queueMicrotask(()=>scheduled=!1),runUpdates(()=>{setState(resolved?"refreshing":"pending"),trigger()},!1),p.then(v=>loadEnd(p,v,void 0,lookup),e=>loadEnd(p,void 0,castError(e),lookup)))):(loadEnd(pr,p,void 0,lookup),p)}return Object.defineProperties(read,{state:{get:()=>state4()},error:{get:()=>error2()},loading:{get(){let s=state4();return s==="pending"||s==="refreshing"}},latest:{get(){if(!resolved)return read();let err=error2();if(err&&!pr)throw err;return value()}}}),dynamic?createComputed(()=>load(!1)):load(!1),[read,{refetch:load,mutate:setValue}]}function batch(fn){return runUpdates(fn,!1)}function untrack(fn){if(!ExternalSourceConfig&&Listener===null)return fn();let listener=Listener;Listener=null;try{return ExternalSourceConfig?ExternalSourceConfig.untrack(fn):fn()}finally{Listener=listener}}function on(deps,fn,options){let isArray3=Array.isArray(deps),prevInput,defer=options&&options.defer;return prevValue=>{let input2;if(isArray3){input2=Array(deps.length);for(let i=0;i<deps.length;i++)input2[i]=deps[i]()}else input2=deps();if(defer)return defer=!1,prevValue;let result=untrack(()=>fn(input2,prevInput,prevValue));return prevInput=input2,result}}function onMount(fn){createEffect(()=>untrack(fn))}function onCleanup(fn){return Owner===null||(Owner.cleanups===null?Owner.cleanups=[fn]:Owner.cleanups.push(fn)),fn}function getListener(){return Listener}function getOwner(){return Owner}function runWithOwner(o,fn){let prev=Owner,prevListener=Listener;Owner=o,Listener=null;try{return runUpdates(fn,!0)}catch(err){handleError(err)}finally{Owner=prev,Listener=prevListener}}function startTransition(fn){if(Transition&&Transition.running)return fn(),Transition.done;let l=Listener,o=Owner;return Promise.resolve().then(()=>{Listener=l,Owner=o;let t;return(Scheduler||SuspenseContext)&&(t=Transition||(Transition={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),t.done||(t.done=new Promise(res=>t.resolve=res)),t.running=!0),runUpdates(fn,!1),Listener=Owner=null,t?t.done:void 0})}function createContext(defaultValue,options){let id=Symbol("context");return{id,Provider:createProvider(id),defaultValue}}function useContext(context){return Owner&&Owner.context&&Owner.context[context.id]!==void 0?Owner.context[context.id]:context.defaultValue}function children(fn){let children2=createMemo(fn),memo=createMemo(()=>resolveChildren(children2()));return memo.toArray=()=>{let c=memo();return Array.isArray(c)?c:c!=null?[c]:[]},memo}function readSignal(){let runningTransition=Transition&&Transition.running;if(this.sources&&(runningTransition?this.tState:this.state))if((runningTransition?this.tState:this.state)===STALE)updateComputation(this);else{let updates=Updates;Updates=null,runUpdates(()=>lookUpstream(this),!1),Updates=updates}if(Listener){let sSlot=this.observers?this.observers.length:0;Listener.sources?(Listener.sources.push(this),Listener.sourceSlots.push(sSlot)):(Listener.sources=[this],Listener.sourceSlots=[sSlot]),this.observers?(this.observers.push(Listener),this.observerSlots.push(Listener.sources.length-1)):(this.observers=[Listener],this.observerSlots=[Listener.sources.length-1])}return runningTransition&&Transition.sources.has(this)?this.tValue:this.value}function writeSignal(node,value,isComp){let current=Transition&&Transition.running&&Transition.sources.has(node)?node.tValue:node.value;if(!node.comparator||!node.comparator(current,value)){if(Transition){let TransitionRunning=Transition.running;(TransitionRunning||!isComp&&Transition.sources.has(node))&&(Transition.sources.add(node),node.tValue=value),TransitionRunning||(node.value=value)}else node.value=value;node.observers&&node.observers.length&&runUpdates(()=>{for(let i=0;i<node.observers.length;i+=1){let o=node.observers[i],TransitionRunning=Transition&&Transition.running;TransitionRunning&&Transition.disposed.has(o)||((TransitionRunning?!o.tState:!o.state)&&(o.pure?Updates.push(o):Effects.push(o),o.observers&&markDownstream(o)),TransitionRunning?o.tState=STALE:o.state=STALE)}if(Updates.length>1e6)throw Updates=[],new Error},!1)}return value}function updateComputation(node){if(!node.fn)return;cleanNode(node);let time=ExecCount;runComputation(node,Transition&&Transition.running&&Transition.sources.has(node)?node.tValue:node.value,time),Transition&&!Transition.running&&Transition.sources.has(node)&&queueMicrotask(()=>{runUpdates(()=>{Transition&&(Transition.running=!0),Listener=Owner=node,runComputation(node,node.tValue,time),Listener=Owner=null},!1)})}function runComputation(node,value,time){let nextValue,owner=Owner,listener=Listener;Listener=Owner=node;try{nextValue=node.fn(value)}catch(err){return node.pure&&(Transition&&Transition.running?(node.tState=STALE,node.tOwned&&node.tOwned.forEach(cleanNode),node.tOwned=void 0):(node.state=STALE,node.owned&&node.owned.forEach(cleanNode),node.owned=null)),node.updatedAt=time+1,handleError(err)}finally{Listener=listener,Owner=owner}(!node.updatedAt||node.updatedAt<=time)&&(node.updatedAt!=null&&"observers"in node?writeSignal(node,nextValue,!0):Transition&&Transition.running&&node.pure?(Transition.sources.add(node),node.tValue=nextValue):node.value=nextValue,node.updatedAt=time)}function createComputation(fn,init5,pure,state4=STALE,options){let c={fn,state:state4,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:init5,owner:Owner,context:Owner?Owner.context:null,pure};if(Transition&&Transition.running&&(c.state=0,c.tState=state4),Owner===null||Owner!==UNOWNED&&(Transition&&Transition.running&&Owner.pure?Owner.tOwned?Owner.tOwned.push(c):Owner.tOwned=[c]:Owner.owned?Owner.owned.push(c):Owner.owned=[c]),ExternalSourceConfig&&c.fn){let[track2,trigger]=createSignal(void 0,{equals:!1}),ordinary=ExternalSourceConfig.factory(c.fn,trigger);onCleanup(()=>ordinary.dispose());let triggerInTransition=()=>startTransition(trigger).then(()=>inTransition.dispose()),inTransition=ExternalSourceConfig.factory(c.fn,triggerInTransition);c.fn=x=>(track2(),Transition&&Transition.running?inTransition.track(x):ordinary.track(x))}return c}function runTop(node){let runningTransition=Transition&&Transition.running;if((runningTransition?node.tState:node.state)===0)return;if((runningTransition?node.tState:node.state)===PENDING)return lookUpstream(node);if(node.suspense&&untrack(node.suspense.inFallback))return node.suspense.effects.push(node);let ancestors=[node];for(;(node=node.owner)&&(!node.updatedAt||node.updatedAt<ExecCount);){if(runningTransition&&Transition.disposed.has(node))return;(runningTransition?node.tState:node.state)&&ancestors.push(node)}for(let i=ancestors.length-1;i>=0;i--){if(node=ancestors[i],runningTransition){let top2=node,prev=ancestors[i+1];for(;(top2=top2.owner)&&top2!==prev;)if(Transition.disposed.has(top2))return}if((runningTransition?node.tState:node.state)===STALE)updateComputation(node);else if((runningTransition?node.tState:node.state)===PENDING){let updates=Updates;Updates=null,runUpdates(()=>lookUpstream(node,ancestors[0]),!1),Updates=updates}}}function runUpdates(fn,init5){if(Updates)return fn();let wait=!1;init5||(Updates=[]),Effects?wait=!0:Effects=[],ExecCount++;try{let res=fn();return completeUpdates(wait),res}catch(err){wait||(Effects=null),Updates=null,handleError(err)}}function completeUpdates(wait){if(Updates&&(Scheduler&&Transition&&Transition.running?scheduleQueue(Updates):runQueue(Updates),Updates=null),wait)return;let res;if(Transition){if(!Transition.promises.size&&!Transition.queue.size){let sources=Transition.sources,disposed=Transition.disposed;Effects.push.apply(Effects,Transition.effects),res=Transition.resolve;for(let e2 of Effects)"tState"in e2&&(e2.state=e2.tState),delete e2.tState;Transition=null,runUpdates(()=>{for(let d of disposed)cleanNode(d);for(let v of sources){if(v.value=v.tValue,v.owned)for(let i=0,len=v.owned.length;i<len;i++)cleanNode(v.owned[i]);v.tOwned&&(v.owned=v.tOwned),delete v.tValue,delete v.tOwned,v.tState=0}setTransPending(!1)},!1)}else if(Transition.running){Transition.running=!1,Transition.effects.push.apply(Transition.effects,Effects),Effects=null,setTransPending(!0);return}}let e=Effects;Effects=null,e.length&&runUpdates(()=>runEffects(e),!1),res&&res()}function runQueue(queue){for(let i=0;i<queue.length;i++)runTop(queue[i])}function scheduleQueue(queue){for(let i=0;i<queue.length;i++){let item=queue[i],tasks=Transition.queue;tasks.has(item)||(tasks.add(item),Scheduler(()=>{tasks.delete(item),runUpdates(()=>{Transition.running=!0,runTop(item)},!1),Transition&&(Transition.running=!1)}))}}function runUserEffects(queue){let i,userLength=0;for(i=0;i<queue.length;i++){let e=queue[i];e.user?queue[userLength++]=e:runTop(e)}if(sharedConfig.context){if(sharedConfig.count){sharedConfig.effects||(sharedConfig.effects=[]),sharedConfig.effects.push(...queue.slice(0,userLength));return}else sharedConfig.effects&&(queue=[...sharedConfig.effects,...queue],userLength+=sharedConfig.effects.length,delete sharedConfig.effects);setHydrateContext()}for(i=0;i<userLength;i++)runTop(queue[i])}function lookUpstream(node,ignore){let runningTransition=Transition&&Transition.running;runningTransition?node.tState=0:node.state=0;for(let i=0;i<node.sources.length;i+=1){let source=node.sources[i];if(source.sources){let state4=runningTransition?source.tState:source.state;state4===STALE?source!==ignore&&(!source.updatedAt||source.updatedAt<ExecCount)&&runTop(source):state4===PENDING&&lookUpstream(source,ignore)}}}function markDownstream(node){let runningTransition=Transition&&Transition.running;for(let i=0;i<node.observers.length;i+=1){let o=node.observers[i];(runningTransition?!o.tState:!o.state)&&(runningTransition?o.tState=PENDING:o.state=PENDING,o.pure?Updates.push(o):Effects.push(o),o.observers&&markDownstream(o))}}function cleanNode(node){let i;if(node.sources)for(;node.sources.length;){let source=node.sources.pop(),index=node.sourceSlots.pop(),obs=source.observers;if(obs&&obs.length){let n=obs.pop(),s=source.observerSlots.pop();index<obs.length&&(n.sourceSlots[s]=index,obs[index]=n,source.observerSlots[index]=s)}}if(Transition&&Transition.running&&node.pure){if(node.tOwned){for(i=node.tOwned.length-1;i>=0;i--)cleanNode(node.tOwned[i]);delete node.tOwned}reset(node,!0)}else if(node.owned){for(i=node.owned.length-1;i>=0;i--)cleanNode(node.owned[i]);node.owned=null}if(node.cleanups){for(i=node.cleanups.length-1;i>=0;i--)node.cleanups[i]();node.cleanups=null}Transition&&Transition.running?node.tState=0:node.state=0}function reset(node,top2){if(top2||(node.tState=0,Transition.disposed.add(node)),node.owned)for(let i=0;i<node.owned.length;i++)reset(node.owned[i])}function castError(err){return err instanceof Error?err:new Error(typeof err=="string"?err:"Unknown error",{cause:err})}function runErrors(err,fns,owner){try{for(let f of fns)f(err)}catch(e){handleError(e,owner&&owner.owner||null)}}function handleError(err,owner=Owner){let fns=ERROR&&owner&&owner.context&&owner.context[ERROR],error2=castError(err);if(!fns)throw error2;Effects?Effects.push({fn(){runErrors(error2,fns,owner)},state:STALE}):runErrors(error2,fns,owner)}function resolveChildren(children2){if(typeof children2=="function"&&!children2.length)return resolveChildren(children2());if(Array.isArray(children2)){let results=[];for(let i=0;i<children2.length;i++){let result=resolveChildren(children2[i]);Array.isArray(result)?results.push.apply(results,result):results.push(result)}return results}return children2}function createProvider(id,options){return function(props){let res;return createRenderEffect(()=>res=untrack(()=>(Owner.context={...Owner.context,[id]:props.value},children(()=>props.children))),void 0),res}}function dispose(d){for(let i=0;i<d.length;i++)d[i]()}function mapArray(list4,mapFn,options={}){let items=[],mapped=[],disposers=[],len=0,indexes=mapFn.length>1?[]:null;return onCleanup(()=>dispose(disposers)),()=>{let newItems=list4()||[],i,j2;return newItems[$TRACK],untrack(()=>{let newLen=newItems.length,newIndices,newIndicesNext,temp,tempdisposers,tempIndexes,start3,end2,newEnd,item;if(newLen===0)len!==0&&(dispose(disposers),disposers=[],items=[],mapped=[],len=0,indexes&&(indexes=[])),options.fallback&&(items=[FALLBACK],mapped[0]=createRoot(disposer=>(disposers[0]=disposer,options.fallback())),len=1);else if(len===0){for(mapped=new Array(newLen),j2=0;j2<newLen;j2++)items[j2]=newItems[j2],mapped[j2]=createRoot(mapper);len=newLen}else{for(temp=new Array(newLen),tempdisposers=new Array(newLen),indexes&&(tempIndexes=new Array(newLen)),start3=0,end2=Math.min(len,newLen);start3<end2&&items[start3]===newItems[start3];start3++);for(end2=len-1,newEnd=newLen-1;end2>=start3&&newEnd>=start3&&items[end2]===newItems[newEnd];end2--,newEnd--)temp[newEnd]=mapped[end2],tempdisposers[newEnd]=disposers[end2],indexes&&(tempIndexes[newEnd]=indexes[end2]);for(newIndices=new Map,newIndicesNext=new Array(newEnd+1),j2=newEnd;j2>=start3;j2--)item=newItems[j2],i=newIndices.get(item),newIndicesNext[j2]=i===void 0?-1:i,newIndices.set(item,j2);for(i=start3;i<=end2;i++)item=items[i],j2=newIndices.get(item),j2!==void 0&&j2!==-1?(temp[j2]=mapped[i],tempdisposers[j2]=disposers[i],indexes&&(tempIndexes[j2]=indexes[i]),j2=newIndicesNext[j2],newIndices.set(item,j2)):disposers[i]();for(j2=start3;j2<newLen;j2++)j2 in temp?(mapped[j2]=temp[j2],disposers[j2]=tempdisposers[j2],indexes&&(indexes[j2]=tempIndexes[j2],indexes[j2](j2))):mapped[j2]=createRoot(mapper);mapped=mapped.slice(0,len=newLen),items=newItems.slice(0)}return mapped});function mapper(disposer){if(disposers[j2]=disposer,indexes){let[s,set2]=createSignal(j2);return indexes[j2]=set2,mapFn(newItems[j2],s)}return mapFn(newItems[j2])}}}function createComponent(Comp,props){if(hydrationEnabled&&sharedConfig.context){let c=sharedConfig.context;setHydrateContext(nextHydrateContext());let r2=untrack(()=>Comp(props||{}));return setHydrateContext(c),r2}return untrack(()=>Comp(props||{}))}function trueFn(){return!0}function resolveSource(s){return(s=typeof s=="function"?s():s)?s:{}}function resolveSources(){for(let i=0,length=this.length;i<length;++i){let v=this[i]();if(v!==void 0)return v}}function mergeProps(...sources){let proxy=!1;for(let i=0;i<sources.length;i++){let s=sources[i];proxy=proxy||!!s&&$PROXY in s,sources[i]=typeof s=="function"?(proxy=!0,createMemo(s)):s}if(proxy)return new Proxy({get(property2){for(let i=sources.length-1;i>=0;i--){let v=resolveSource(sources[i])[property2];if(v!==void 0)return v}},has(property2){for(let i=sources.length-1;i>=0;i--)if(property2 in resolveSource(sources[i]))return!0;return!1},keys(){let keys2=[];for(let i=0;i<sources.length;i++)keys2.push(...Object.keys(resolveSource(sources[i])));return[...new Set(keys2)]}},propTraps);let sourcesMap={},defined=Object.create(null);for(let i=sources.length-1;i>=0;i--){let source=sources[i];if(!source)continue;let sourceKeys=Object.getOwnPropertyNames(source);for(let i2=sourceKeys.length-1;i2>=0;i2--){let key=sourceKeys[i2];if(key==="__proto__"||key==="constructor")continue;let desc=Object.getOwnPropertyDescriptor(source,key);if(!defined[key])defined[key]=desc.get?{enumerable:!0,configurable:!0,get:resolveSources.bind(sourcesMap[key]=[desc.get.bind(source)])}:desc.value!==void 0?desc:void 0;else{let sources2=sourcesMap[key];sources2&&(desc.get?sources2.push(desc.get.bind(source)):desc.value!==void 0&&sources2.push(()=>desc.value))}}}let target={},definedKeys=Object.keys(defined);for(let i=definedKeys.length-1;i>=0;i--){let key=definedKeys[i],desc=defined[key];desc&&desc.get?Object.defineProperty(target,key,desc):target[key]=desc?desc.value:void 0}return target}function splitProps(props,...keys2){if($PROXY in props){let blocked=new Set(keys2.length>1?keys2.flat():keys2[0]),res=keys2.map(k=>new Proxy({get(property2){return k.includes(property2)?props[property2]:void 0},has(property2){return k.includes(property2)&&property2 in props},keys(){return k.filter(property2=>property2 in props)}},propTraps));return res.push(new Proxy({get(property2){return blocked.has(property2)?void 0:props[property2]},has(property2){return blocked.has(property2)?!1:property2 in props},keys(){return Object.keys(props).filter(k=>!blocked.has(k))}},propTraps)),res}let otherObject={},objects=keys2.map(()=>({}));for(let propName of Object.getOwnPropertyNames(props)){let desc=Object.getOwnPropertyDescriptor(props,propName),isDefaultDesc=!desc.get&&!desc.set&&desc.enumerable&&desc.writable&&desc.configurable,blocked=!1,objectIndex=0;for(let k of keys2)k.includes(propName)&&(blocked=!0,isDefaultDesc?objects[objectIndex][propName]=desc.value:Object.defineProperty(objects[objectIndex],propName,desc)),++objectIndex;blocked||(isDefaultDesc?otherObject[propName]=desc.value:Object.defineProperty(otherObject,propName,desc))}return[...objects,otherObject]}function For(props){let fallback="fallback"in props&&{fallback:()=>props.fallback};return createMemo(mapArray(()=>props.each,props.children,fallback||void 0))}function Show(props){let keyed=props.keyed,condition=createMemo(()=>props.when,void 0,{equals:(a,b)=>keyed?a===b:!a==!b});return createMemo(()=>{let c=condition();if(c){let child=props.children;return typeof child=="function"&&child.length>0?untrack(()=>child(keyed?c:()=>{if(!untrack(condition))throw narrowedError("Show");return props.when})):child}return props.fallback},void 0,void 0)}function resetErrorBoundaries(){Errors&&[...Errors].forEach(fn=>fn())}var sharedConfig,equalFn,$PROXY,$TRACK,$DEVCOMP,signalOptions,ERROR,runEffects,STALE,PENDING,UNOWNED,NO_INIT,Owner,Transition,Scheduler,ExternalSourceConfig,Listener,Updates,Effects,ExecCount,transPending,setTransPending,SuspenseContext,FALLBACK,hydrationEnabled,propTraps,narrowedError,Errors,SuspenseListContext,init_solid=__esm({"node_modules/solid-js/dist/solid.js"(){init_define_process_env();init_shim();sharedConfig={context:void 0,registry:void 0};equalFn=(a,b)=>a===b,$PROXY=Symbol("solid-proxy"),$TRACK=Symbol("solid-track"),$DEVCOMP=Symbol("solid-dev-component"),signalOptions={equals:equalFn},ERROR=null,runEffects=runQueue,STALE=1,PENDING=2,UNOWNED={owned:null,cleanups:null,context:null,owner:null},NO_INIT={},Owner=null,Transition=null,Scheduler=null,ExternalSourceConfig=null,Listener=null,Updates=null,Effects=null,ExecCount=0;[transPending,setTransPending]=createSignal(!1);FALLBACK=Symbol("fallback");hydrationEnabled=!1;propTraps={get(_,property2,receiver){return property2===$PROXY?receiver:_.get(property2)},has(_,property2){return property2===$PROXY?!0:_.has(property2)},set:trueFn,deleteProperty:trueFn,getOwnPropertyDescriptor(_,property2){return{configurable:!0,enumerable:!0,get(){return _.get(property2)},set:trueFn,deleteProperty:trueFn}},ownKeys(_){return _.keys()}};narrowedError=name=>`Stale read from <${name}>.`;SuspenseListContext=createContext()}});function getPropAlias(prop,tagName){let a=PropAliases[prop];return typeof a=="object"?a[tagName]?a.$:void 0:a}function reconcileArrays(parentNode,a,b){let bLength=b.length,aEnd=a.length,bEnd=bLength,aStart=0,bStart=0,after=a[aEnd-1].nextSibling,map2=null;for(;aStart<aEnd||bStart<bEnd;){if(a[aStart]===b[bStart]){aStart++,bStart++;continue}for(;a[aEnd-1]===b[bEnd-1];)aEnd--,bEnd--;if(aEnd===aStart){let node=bEnd<bLength?bStart?b[bStart-1].nextSibling:b[bEnd-bStart]:after;for(;bStart<bEnd;)parentNode.insertBefore(b[bStart++],node)}else if(bEnd===bStart)for(;aStart<aEnd;)(!map2||!map2.has(a[aStart]))&&a[aStart].remove(),aStart++;else if(a[aStart]===b[bEnd-1]&&b[bStart]===a[aEnd-1]){let node=a[--aEnd].nextSibling;parentNode.insertBefore(b[bStart++],a[aStart++].nextSibling),parentNode.insertBefore(b[--bEnd],node),a[aEnd]=b[bEnd]}else{if(!map2){map2=new Map;let i=bStart;for(;i<bEnd;)map2.set(b[i],i++)}let index=map2.get(a[aStart]);if(index!=null)if(bStart<index&&index<bEnd){let i=aStart,sequence=1,t;for(;++i<aEnd&&i<bEnd&&!((t=map2.get(a[i]))==null||t!==index+sequence);)sequence++;if(sequence>index-bStart){let node=a[aStart];for(;bStart<index;)parentNode.insertBefore(b[bStart++],node)}else parentNode.replaceChild(b[bStart++],a[aStart++])}else aStart++;else a[aStart++].remove()}}}function render(code,element,init5,options={}){let disposer;return createRoot(dispose2=>{disposer=dispose2,element===document?code():insert(element,code(),element.firstChild?null:void 0,init5)},options.owner),()=>{disposer(),element.textContent=""}}function template(html,isCE,isSVG){let node,create3=()=>{let t=document.createElement("template");return t.innerHTML=html,isSVG?t.content.firstChild.firstChild:t.content.firstChild},fn=isCE?()=>untrack(()=>document.importNode(node||(node=create3()),!0)):()=>(node||(node=create3())).cloneNode(!0);return fn.cloneNode=fn,fn}function delegateEvents(eventNames,document2=window.document){let e=document2[$$EVENTS]||(document2[$$EVENTS]=new Set);for(let i=0,l=eventNames.length;i<l;i++){let name=eventNames[i];e.has(name)||(e.add(name),document2.addEventListener(name,eventHandler))}}function setAttribute(node,name,value){sharedConfig.context&&node.isConnected||(value==null?node.removeAttribute(name):node.setAttribute(name,value))}function setAttributeNS(node,namespace,name,value){sharedConfig.context&&node.isConnected||(value==null?node.removeAttributeNS(namespace,name):node.setAttributeNS(namespace,name,value))}function className(node,value){sharedConfig.context&&node.isConnected||(value==null?node.removeAttribute("class"):node.className=value)}function addEventListener(node,name,handler,delegate){if(delegate)Array.isArray(handler)?(node[`$$${name}`]=handler[0],node[`$$${name}Data`]=handler[1]):node[`$$${name}`]=handler;else if(Array.isArray(handler)){let handlerFn=handler[0];node.addEventListener(name,handler[0]=e=>handlerFn.call(node,handler[1],e))}else node.addEventListener(name,handler)}function classList(node,value,prev={}){let classKeys=Object.keys(value||{}),prevKeys=Object.keys(prev),i,len;for(i=0,len=prevKeys.length;i<len;i++){let key=prevKeys[i];!key||key==="undefined"||value[key]||(toggleClassKey(node,key,!1),delete prev[key])}for(i=0,len=classKeys.length;i<len;i++){let key=classKeys[i],classValue=!!value[key];!key||key==="undefined"||prev[key]===classValue||!classValue||(toggleClassKey(node,key,!0),prev[key]=classValue)}return prev}function style(node,value,prev){if(!value)return prev?setAttribute(node,"style"):value;let nodeStyle=node.style;if(typeof value=="string")return nodeStyle.cssText=value;typeof prev=="string"&&(nodeStyle.cssText=prev=void 0),prev||(prev={}),value||(value={});let v,s;for(s in prev)value[s]==null&&nodeStyle.removeProperty(s),delete prev[s];for(s in value)v=value[s],v!==prev[s]&&(nodeStyle.setProperty(s,v),prev[s]=v);return prev}function spread(node,props={},isSVG,skipChildren){let prevProps={};return skipChildren||createRenderEffect(()=>prevProps.children=insertExpression(node,props.children,prevProps.children)),createRenderEffect(()=>typeof props.ref=="function"?use(props.ref,node):props.ref=node),createRenderEffect(()=>assign(node,props,isSVG,!0,prevProps,!0)),prevProps}function use(fn,element,arg){return untrack(()=>fn(element,arg))}function insert(parent,accessor,marker,initial){if(marker!==void 0&&!initial&&(initial=[]),typeof accessor!="function")return insertExpression(parent,accessor,initial,marker);createRenderEffect(current=>insertExpression(parent,accessor(),current,marker),initial)}function assign(node,props,isSVG,skipChildren,prevProps={},skipRef=!1){props||(props={});for(let prop in prevProps)if(!(prop in props)){if(prop==="children")continue;prevProps[prop]=assignProp(node,prop,null,prevProps[prop],isSVG,skipRef)}for(let prop in props){if(prop==="children"){skipChildren||insertExpression(node,props.children);continue}let value=props[prop];prevProps[prop]=assignProp(node,prop,value,prevProps[prop],isSVG,skipRef)}}function getNextElement(template2){let node,key;return!sharedConfig.context||!(node=sharedConfig.registry.get(key=getHydrationKey()))?template2():(sharedConfig.completed&&sharedConfig.completed.add(node),sharedConfig.registry.delete(key),node)}function toPropertyName(name){return name.toLowerCase().replace(/-([a-z])/g,(_,w)=>w.toUpperCase())}function toggleClassKey(node,key,value){let classNames=key.trim().split(/\s+/);for(let i=0,nameLen=classNames.length;i<nameLen;i++)node.classList.toggle(classNames[i],value)}function assignProp(node,prop,value,prev,isSVG,skipRef){let isCE,isProp,isChildProp,propAlias,forceProp;if(prop==="style")return style(node,value,prev);if(prop==="classList")return classList(node,value,prev);if(value===prev)return prev;if(prop==="ref")skipRef||value(node);else if(prop.slice(0,3)==="on:"){let e=prop.slice(3);prev&&node.removeEventListener(e,prev),value&&node.addEventListener(e,value)}else if(prop.slice(0,10)==="oncapture:"){let e=prop.slice(10);prev&&node.removeEventListener(e,prev,!0),value&&node.addEventListener(e,value,!0)}else if(prop.slice(0,2)==="on"){let name=prop.slice(2).toLowerCase(),delegate=DelegatedEvents.has(name);if(!delegate&&prev){let h=Array.isArray(prev)?prev[0]:prev;node.removeEventListener(name,h)}(delegate||value)&&(addEventListener(node,name,value,delegate),delegate&&delegateEvents([name]))}else if(prop.slice(0,5)==="attr:")setAttribute(node,prop.slice(5),value);else if((forceProp=prop.slice(0,5)==="prop:")||(isChildProp=ChildProperties.has(prop))||!isSVG&&((propAlias=getPropAlias(prop,node.tagName))||(isProp=Properties.has(prop)))||(isCE=node.nodeName.includes("-"))){if(forceProp)prop=prop.slice(5),isProp=!0;else if(sharedConfig.context&&node.isConnected)return value;prop==="class"||prop==="className"?className(node,value):isCE&&!isProp&&!isChildProp?node[toPropertyName(prop)]=value:node[propAlias||prop]=value}else{let ns=isSVG&&prop.indexOf(":")>-1&&SVGNamespace[prop.split(":")[0]];ns?setAttributeNS(node,ns,prop,value):setAttribute(node,Aliases[prop]||prop,value)}return value}function eventHandler(e){let key=`$$${e.type}`,node=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==node&&Object.defineProperty(e,"target",{configurable:!0,value:node}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return node||document}}),sharedConfig.registry&&!sharedConfig.done&&(sharedConfig.done=_$HY.done=!0);node;){let handler=node[key];if(handler&&!node.disabled){let data=node[`${key}Data`];if(data!==void 0?handler.call(node,data,e):handler.call(node,e),e.cancelBubble)return}node=node._$host||node.parentNode||node.host}}function insertExpression(parent,value,current,marker,unwrapArray){let hydrating=!!sharedConfig.context&&parent.isConnected;if(hydrating){!current&&(current=[...parent.childNodes]);let cleaned=[];for(let i=0;i<current.length;i++){let node=current[i];node.nodeType===8&&node.data.slice(0,2)==="!$"?node.remove():cleaned.push(node)}current=cleaned}for(;typeof current=="function";)current=current();if(value===current)return current;let t=typeof value,multi=marker!==void 0;if(parent=multi&&current[0]&&current[0].parentNode||parent,t==="string"||t==="number"){if(hydrating)return current;if(t==="number"&&(value=value.toString()),multi){let node=current[0];node&&node.nodeType===3?node.data!==value&&(node.data=value):node=document.createTextNode(value),current=cleanChildren(parent,current,marker,node)}else current!==""&&typeof current=="string"?current=parent.firstChild.data=value:current=parent.textContent=value}else if(value==null||t==="boolean"){if(hydrating)return current;current=cleanChildren(parent,current,marker)}else{if(t==="function")return createRenderEffect(()=>{let v=value();for(;typeof v=="function";)v=v();current=insertExpression(parent,v,current,marker)}),()=>current;if(Array.isArray(value)){let array=[],currentArray=current&&Array.isArray(current);if(normalizeIncomingArray(array,value,current,unwrapArray))return createRenderEffect(()=>current=insertExpression(parent,array,current,marker,!0)),()=>current;if(hydrating){if(!array.length)return current;if(marker===void 0)return[...parent.childNodes];let node=array[0],nodes2=[node];for(;(node=node.nextSibling)!==marker;)nodes2.push(node);return current=nodes2}if(array.length===0){if(current=cleanChildren(parent,current,marker),multi)return current}else currentArray?current.length===0?appendNodes(parent,array,marker):reconcileArrays(parent,current,array):(current&&cleanChildren(parent),appendNodes(parent,array));current=array}else if(value.nodeType){if(hydrating&&value.parentNode)return current=multi?[value]:value;if(Array.isArray(current)){if(multi)return current=cleanChildren(parent,current,marker,value);cleanChildren(parent,current,null,value)}else current==null||current===""||!parent.firstChild?parent.appendChild(value):parent.replaceChild(value,parent.firstChild);current=value}}return current}function normalizeIncomingArray(normalized,array,current,unwrap2){let dynamic=!1;for(let i=0,len=array.length;i<len;i++){let item=array[i],prev=current&&current[normalized.length],t;if(!(item==null||item===!0||item===!1))if((t=typeof item)=="object"&&item.nodeType)normalized.push(item);else if(Array.isArray(item))dynamic=normalizeIncomingArray(normalized,item,prev)||dynamic;else if(t==="function")if(unwrap2){for(;typeof item=="function";)item=item();dynamic=normalizeIncomingArray(normalized,Array.isArray(item)?item:[item],Array.isArray(prev)?prev:[prev])||dynamic}else normalized.push(item),dynamic=!0;else{let value=String(item);prev&&prev.nodeType===3&&prev.data===value?normalized.push(prev):normalized.push(document.createTextNode(value))}}return dynamic}function appendNodes(parent,array,marker=null){for(let i=0,len=array.length;i<len;i++)parent.insertBefore(array[i],marker)}function cleanChildren(parent,current,marker,replacement){if(marker===void 0)return parent.textContent="";let node=replacement||document.createTextNode("");if(current.length){let inserted=!1;for(let i=current.length-1;i>=0;i--){let el=current[i];if(node!==el){let isParent=el.parentNode===parent;!inserted&&!i?isParent?parent.replaceChild(node,el):parent.insertBefore(node,marker):isParent&&el.remove()}else inserted=!0}}else parent.insertBefore(node,marker);return[node]}function getHydrationKey(){let hydrate=sharedConfig.context;return`${hydrate.id}${hydrate.count++}`}function ssr(template2,...nodes2){}function createElement(tagName,isSVG=!1){return isSVG?document.createElementNS(SVG_NAMESPACE,tagName):document.createElement(tagName)}function Dynamic(props){let[p,others]=splitProps(props,["component"]),cached3=createMemo(()=>p.component);return createMemo(()=>{let component=cached3();switch(typeof component){case"function":return untrack(()=>component(others));case"string":let isSvg=SVGElements.has(component),el=sharedConfig.context?getNextElement():createElement(component,isSvg);return spread(el,others,isSvg),el}})}var booleans,Properties,ChildProperties,Aliases,PropAliases,DelegatedEvents,SVGElements,SVGNamespace,$$EVENTS,voidFn,RequestContext,isServer,SVG_NAMESPACE,init_web=__esm({"node_modules/solid-js/web/dist/web.js"(){init_define_process_env();init_shim();init_solid();init_solid();booleans=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Properties=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...booleans]),ChildProperties=new Set(["innerHTML","textContent","innerText","children"]),Aliases=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),PropAliases=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});DelegatedEvents=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),SVGElements=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","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-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),SVGNamespace={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};$$EVENTS="_$DX_DELEGATE";voidFn=()=>{},RequestContext=Symbol();isServer=!1,SVG_NAMESPACE="http://www.w3.org/2000/svg"}});function highlight_dom_changes(){_highlight_dom_changes=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0}function input(classes2,appendTo,type,placeholder,styles){let input_div=make_html("input",classes2,appendTo,"",styles);return input_div.attr("type",type),input_div.attr("placeholder",placeholder),(is_edit_mode()||is_plugin_edit_mode())&&(input_div.attr("autocomplete","new-password"),input_div.attr("name",LUID())),input_div}function textarea(classes2,appendTo,name,placeholder,styles){let input_div=make_html("textarea",classes2,appendTo,"",styles);return input_div.attr("name",name),input_div.attr("placeholder",placeholder),input_div}function includes2(arr,el){return arr.includes(el)}function text(tag,appendTo,text2,classes2){if(includes2(["h1","h2","h3","h4","h5"],tag))return make_html(tag,classes2,appendTo,text2);let text_class=tag;return classes2&&(classes2=classes2+" "+(text_class!=null?text_class:"")),make_html("p",classes2,appendTo,text2)}function img(classes2,appendTo,src,styles){let img_div=make_html("img",classes2,appendTo,void 0,styles);return src&&(img_div[0].src=src),img_div}function jsx_element(element,classes2,appendTo,styles){let domElement=div(classes2,appendTo,void 0,styles),dispose2=render(element,domElement[0]);return onCleanup(()=>{dispose2(),domElement.remove()}),domElement}function make_html(elementType,classes2,appendTo,text2,styles){(classes2==null||classes2==="")&&(classes2=[]),Array.isArray(classes2)||(classes2=[classes2]),classes2=classes2.map(c=>c.replace(".",""));let domElement=$("<"+elementType+"></"+elementType+">");for(let cls of classes2)cls&&domElement.addClass(cls.toLowerCase());return typeof styles=="object"&&domElement.css(styles),_highlight_dom_changes&&(domElement[0].classList.add("highlight-dom-changes"),domElement.one("animationend",()=>{domElement[0].classList.remove("highlight-dom-changes")})),appendTo&&appendTo.append(domElement),text2!=null&&domElement.text(text2),domElement}function apply_scale(div2,scale){let t=`scale(${scale},${scale})`,o="0 0";div2.css({transform:t,"-ms-transform":t,"-webkit-transform":t,"-o-transform":t,"-moz-transform":t,"tranform-origin":o,"-ms-transform-origin":o,"-webkit-transform-origin":o,"-o-transform-origin":o,"-moz-transform-origin":o})}function apply_css_fallbacks(property2,values){var _values$find;return typeof CSS>"u"||typeof CSS.supports!="function"?values[values.length-1]:(_values$find=values.find(value=>typeof value!="string"||CSS.supports(property2,value)))!=null?_values$find:values[values.length-1]}function is_fixed(div2){let parent=div2;for(;parent.length&&!parent.is("body");){if(parent.css("position")==="fixed")return!0;parent=parent.parent()}return!1}function is_attached(div2){return div2.closest("html").length>0}function did_event_pass_through(event,selector_or_fn){var _event$target;if(event.currentTarget===null)return!1;let test;typeof selector_or_fn=="string"?test=div2=>div2.is(selector_or_fn):test=selector_or_fn;let targ=$((_event$target=event.target)!=null?_event$target:void 0);for(;targ[0]!=null&&targ[0]!==event.currentTarget;){if(test(targ))return!0;targ=targ.parent()}return!1}function trigger_blur(canvas){var _window$BrowserDetect,_window$BrowserDetect2;if(((_window$BrowserDetect=window.BrowserDetect)==null?void 0:_window$BrowserDetect.OS)==="iPhone/iPod"&&((_window$BrowserDetect2=window.BrowserDetect)==null?void 0:_window$BrowserDetect2.browser)==="Safari"){canvas.blur();return}let temp_input=$('<input class="fake-input"></input>');is_on_mobile_or_tablet()&&temp_input.attr("readonly","true"),temp_input.css({top:$(window).scrollTop()+5,left:10,position:"absolute",overflow:"hidden",width:0,"font-size":"40px"}),$("body").append(temp_input),temp_input.focus(),temp_input.blur(),temp_input.remove()}function velocity(div2,animation,options){if(!div2||!div2.length){var _options$complete_cb;(_options$complete_cb=options.complete_cb)==null||_options$complete_cb.call(options);return}if(div2.velocity==null){showed_velocity_warning||(showed_velocity_warning=!0,window.alert(`Some code is overwriting jQuery which prevents your app from working normally. Please check your application in the editor and make sure you are not requiring a version of jQuery in the page/app headers or in a plugin. 

You can use Bubble safe mode to test your application (hover on PREVIEW).`));return}if(options.complete)throw new UnexpectedError("b_ui.velocity called with complete, it should be complete_cb not to be overwritten");if(typeof options!="object")throw new UnexpectedError(`b_ui.velocity called with options not being an object, will break ${String(options)}`);return $.fx.off&&(options.duration=0),options.complete=function(){var _options$complete_cb2;(_options$complete_cb2=options.complete_cb)==null||_options$complete_cb2.call(options),velocity_animation_running=!1},velocity_animation_running=!0,div2.velocity(animation,options)}function are_animations_running(){return velocity_animation_running}function delay(div2,time){div2.css("fake_css_nonsense",100),velocity(div2,{fake_css_nonsense:0},{duration:time})}function set_global_cursor(cursor){_cursor_styler||(_cursor_styler=$("<style></style>")),_cursor_styler.text(`* { cursor: ${cursor} !important; }`),$(document.head).append(_cursor_styler)}function remove_global_cursor(){var _cursor_styler2;(_cursor_styler2=_cursor_styler)==null||_cursor_styler2.remove()}function meta(e){return e.metaKey||e.ctrlKey}function bbcode_to_html(text2,is_pre_wrap){var _text,_is_pre_wrap;(_text=text2)!=null||(text2=""),(_is_pre_wrap=is_pre_wrap)!=null||(is_pre_wrap=!1);let html_before_parsing=text2;return html_before_parsing=html_before_parsing.replace(/&#x2F;/g,"/"),fromBB_to_HTML(html_before_parsing,is_pre_wrap)}function has_bbcode(text2){var _text2;return(_text2=text2)!=null||(text2=""),probably_has_bbcode(text2)}function scroll_freeze(){_old_scroll=$(document).scrollTop()}function scroll_unfreeze(){$(document).scrollTop(_old_scroll)}function isScrolledIntoView(elem,parent_class){var _parent_class;let docViewBottom,docViewTop,parent_div;if((_parent_class=parent_class)!=null||(parent_class=window),elem.length===0)return{status:!0};parent_class===window||!elem.parents(parent_class+":visible").length?(parent_div=$(window),docViewTop=$(parent_div).scrollTop(),docViewBottom=docViewTop+parent_div.height()-30):(parent_div=elem.parents(parent_class+":visible"),docViewTop=Math.max(parent_div.offset().top,$(window).scrollTop()),docViewBottom=Math.min(docViewTop+parent_div.height(),$(window).scrollTop()+$(window).height()-40));let elemTop=$(elem).offset().top,elemBottom=elemTop+$(elem).height();return elemBottom<=docViewBottom&&elemTop>=docViewTop?{status:!0}:{status:!1,side:elemBottom>docViewBottom?"bottom":"top"}}function revealInScreen(element,parent_class,top2){var _parent_class2;if((_parent_class2=parent_class)!=null||(parent_class=window),!(element==null||!element.length||element==="destroyed")){if(top2==null){var _element$offset,_element$offset$call;if(top2=(_element$offset=element.offset)==null||(_element$offset$call=_element$offset.call(element))==null?void 0:_element$offset$call.top,top2==null)return;if(parent_class!==window){let parent_element=$(parent_class+":visible");top2=top2+parent_element.scrollTop()-parent_element.offset().top}}if(!isScrolledIntoView(element,parent_class).status)try{parent_class!==window?$(parent_class+":visible").scrollTop(top2-20):$(document).scrollTop(top2-100)}catch{}}}function make_zindex(div2){let min_z=20,t=div2;for(;t.length>0&&t[0]!==document;){let test_z=parseFloat(t.css("z-index"));isNaN(test_z)&&(test_z=0),test_z>min_z&&(min_z=test_z),t=t.parent()}return min_z+1}function real_inner_width_slow(canvas){if(canvas==="destroyed")return;let measure2=div("measure",canvas),width2=measure2.width();return measure2.remove(),width2===0?canvas.width()===100&&canvas.css("width")==="100%"?void 0:canvas.width():width2}function real_inner_width(canvas){if(canvas==="destroyed")return;let client_width=canvas[0].clientWidth;if(client_width===0)return canvas.innerWidth();let is_overflowing=canvas[0].scrollHeight>canvas[0].clientHeight,{overflowY}=window.getComputedStyle(canvas[0]);if(overflowY==="scroll"||is_overflowing&&overflowY==="auto")return client_width;let{width:width2}=canvas[0].getBoundingClientRect(),{borderRightWidth,borderLeftWidth,paddingLeft,paddingRight}=window.getComputedStyle(canvas[0]),total_border_width=parseFloat(borderRightWidth)+parseFloat(borderLeftWidth),total_padding=parseFloat(paddingLeft)+parseFloat(paddingRight);return width2-total_border_width-total_padding}function real_inner_width_superfast(canvas){if(canvas==="destroyed")return;let width2=canvas[0].clientWidth;return width2>0?width2:Math.round(canvas.innerWidth())}function create_style_sheet(content){let style2=document.createElement("style");style2.type="text/css",style2.innerHTML=content,document.getElementsByTagName("head")[0].appendChild(style2)}function make_numeric(input2,integer_only){input2.keydown(evt=>{let denied;(evt.keyCode>=65&&evt.keyCode<=90||[186,191,219,220,221,222,187].includes(evt.keyCode))&&!evt.ctrlKey&&!evt.altKey&&!evt.metaKey&&(denied=!0),integer_only&&evt.keyCode===190&&(denied=!0),denied&&evt.preventDefault()})}function console_with_styling(msg){console.log(""),console.log("%c"+msg,["background: #0205D3","color: white","display: block","text-align: center","font-weight: bold","padding: 7px","border-radius: 2px"].join(";")),console.log("")}function key_is_modifier(key){return key==="Shift"||key==="Alt"||key==="Meta"||key==="Control"}function build_key_combo_string(evt){let keyboard_combo=[];evt.ctrlKey&&keyboard_combo.push("Ctrl"),evt.metaKey&&keyboard_combo.push("Meta"),evt.shiftKey&&keyboard_combo.push("Shift"),evt.altKey&&keyboard_combo.push("Alt");let regex_tester=char=>/^([a-z0-9A-Z\\\][';/.,`]{1}$)/.test(char);key_is_modifier(evt.key)||(regex_tester(evt.key)?keyboard_combo.push(evt.key):KEY_CODE_TO_CHAR[evt.key]?keyboard_combo.push(KEY_CODE_TO_CHAR[evt.key]):KEY_CODE_TO_CHAR[evt.code]?keyboard_combo.push(KEY_CODE_TO_CHAR[evt.code]):regex_tester(String.fromCharCode(evt.keyCode))&&evt.key!=="Dead"&&keyboard_combo.push(String.fromCharCode(evt.keyCode)));let keyboard_comb_str="";for(let i=0;i<keyboard_combo.length;i++){let key=keyboard_combo[i];if(key==="Meta"){var _window5,_window$BrowserDetect3;((_window5=window)==null||(_window$BrowserDetect3=_window5.BrowserDetect)==null?void 0:_window$BrowserDetect3.OS)==="Windows"?key="WindowsKey":key="Command"}else if(key==="Alt"){var _window23,_window2$BrowserDetec;((_window23=window)==null||(_window2$BrowserDetec=_window23.BrowserDetect)==null?void 0:_window2$BrowserDetec.OS)==="Windows"?key="Alt":key="Option"}i>0?keyboard_comb_str+="+"+key:keyboard_comb_str+=key}return keyboard_comb_str}function make_key_combo_listener(input2){let key_listener=evt=>{evt.stopPropagation(),evt.preventDefault(),input2.val(build_key_combo_string(evt)),input2.on("blur",()=>input2.trigger("change"))};input2[0].addEventListener("keydown",key_listener)}function get_element(div2){if(typeof div2=="string"&&(div2=$(div2)),is_edit_mode()){div2.hasClass("inner-element")||(div2=div2.parents(".inner-element").first());let id=div2.attr("id");return id?window.appquery.element(id):"not found -- should be a div with the inner-element class"}else{var _div$0$bubble_data$bu,_div$,_div$$bubble_data;return div2.hasClass("bubble-element")||(div2=div2.parents(".bubble-element").first()),(_div$0$bubble_data$bu=(_div$=div2[0])==null||(_div$$bubble_data=_div$.bubble_data)==null?void 0:_div$$bubble_data.bubble_instance)!=null?_div$0$bubble_data$bu:"not found -- should be a div with the bubble-element class"}}var import_es_string_replace8,import_web_dom_collections_iterator19,b_async2,_highlight_dom_changes,div,pre_json,span,velocity_animation_running,showed_velocity_warning,_cursor_styler,escape3,unescape3,_old_scroll,page_loaded_key,page_is_loaded,init_b_ui=__esm({"lib-browser/u/client/b_ui.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace8=__toESM(require_es_string_replace()),import_web_dom_collections_iterator19=__toESM(require_web_dom_collections_iterator()),b_async2=__toESM(require_b_async());init_bbcodeparser();init_errors();init_mode_check();init_uuid();init_b_window();init_workflow();init_lodash();init_solid();init_web();init_customVelocityAnimations();_highlight_dom_changes=!1;typeof window<"u"&&(window.highlight_dom_changes=highlight_dom_changes);div=(classes2,appendTo,text2,styles)=>make_html("div",classes2,appendTo,text2,styles),pre_json=(classes2,appendTo,text2,styles)=>make_html("pre",classes2,appendTo,text2,styles),span=(classes2,appendTo,text2,styles)=>make_html("span",classes2,appendTo,text2,styles);velocity_animation_running=!1,showed_velocity_warning=!1;escape3=escape_default,unescape3=unescape_default;if(typeof window<"u"){let key=page_loaded_key=b_async2.MakeKey(void 0,"b_ui.page_loaded_key"),initial_date=Date.now();page_is_loaded=function(){key.turn(),$(document.body).append(div("page-is-loaded")),console.log(`page is loaded after ${(Date.now()-initial_date)/1e3} seconds`)}}}});var require_events=__commonJS({"node_modules/events/events.js"(exports3,module2){init_define_process_env();init_shim();function EventEmitter6(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}module2.exports=EventEmitter6;EventEmitter6.EventEmitter=EventEmitter6;EventEmitter6.prototype._events=void 0;EventEmitter6.prototype._maxListeners=void 0;EventEmitter6.defaultMaxListeners=10;EventEmitter6.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this};EventEmitter6.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),type==="error"&&(!this._events.error||isObject3(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction2(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject3(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i<len;i++)listeners[i].apply(this,args);return!0};EventEmitter6.prototype.addListener=function(type,listener){var m;if(!isFunction2(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction2(listener.listener)?listener.listener:listener),this._events[type]?isObject3(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject3(this._events[type])&&!this._events[type].warned&&(isUndefined(this._maxListeners)?m=EventEmitter6.defaultMaxListeners:m=this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),typeof console.trace=="function"&&console.trace())),this};EventEmitter6.prototype.on=EventEmitter6.prototype.addListener;EventEmitter6.prototype.once=function(type,listener){if(!isFunction2(listener))throw TypeError("listener must be a function");var fired=!1;function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}return g.listener=listener,this.on(type,g),this};EventEmitter6.prototype.removeListener=function(type,listener){var list4,position,length,i;if(!isFunction2(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list4=this._events[type],length=list4.length,position=-1,list4===listener||isFunction2(list4.listener)&&list4.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject3(list4)){for(i=length;i-- >0;)if(list4[i]===listener||list4[i].listener&&list4[i].listener===listener){position=i;break}if(position<0)return this;list4.length===1?(list4.length=0,delete this._events[type]):list4.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this};EventEmitter6.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[type]&&delete this._events[type],this;if(arguments.length===0){for(key in this._events)key!=="removeListener"&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction2(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this};EventEmitter6.prototype.listeners=function(type){var ret;return!this._events||!this._events[type]?ret=[]:isFunction2(this._events[type])?ret=[this._events[type]]:ret=this._events[type].slice(),ret};EventEmitter6.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction2(evlistener))return 1;if(evlistener)return evlistener.length}return 0};EventEmitter6.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction2(arg){return typeof arg=="function"}function isNumber(arg){return typeof arg=="number"}function isObject3(arg){return typeof arg=="object"&&arg!==null}function isUndefined(arg){return arg===void 0}}});var import_web_dom_collections_iterator20,events,last_vimeo_handler,add_finish_cb_to_vimeo,init_b_ui_editor=__esm({"lib-browser/u/editor_all/b_ui_editor.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator20=__toESM(require_web_dom_collections_iterator());init_b_array();init_b_ui();events=__toESM(require_events());init_mode_check();init_b_window();last_vimeo_handler=null,add_finish_cb_to_vimeo=function(video_zone,id,cb){var _window$removeEventLi,_window5,_window$detachEvent,_window23;let onMessageReceived,post=(action,value)=>{let data={method:action};value&&(data.value=value),$(video_zone.find("iframe"))[0].contentWindow.postMessage(JSON.stringify(data),"https://player.vimeo.com/video/"+id)};(_window$removeEventLi=(_window5=window).removeEventListener)==null||_window$removeEventLi.call(_window5,"message",last_vimeo_handler),(_window$detachEvent=(_window23=window).detachEvent)==null||_window$detachEvent.call(_window23,"onmessage",last_vimeo_handler),last_vimeo_handler=onMessageReceived=e=>{var _e;if((_e=e)!=null&&_e.data)try{let data=JSON.parse(e.data);data.event==="ended"&&cb(),data.event==="ready"&&post("addEventListener","ended")}catch(error2){e=error2}},window.addEventListener?window.addEventListener("message",onMessageReceived,!1):window.attachEvent("onmessage",onMessageReceived,!1)}}});function get_domain_components(domain){if(domain.indexOf("www.")===0&&(domain=domain.slice(4)),on_server()){let parsed=tld.parse(domain);return{top_domain:parsed.domain,subdomains:parsed.subdomain}}else{let second_level_domains=["ac.uk","co.uk","gov.uk","ltd.uk","me.uk","net.uk","nhs.uk","org.uk","plc.uk","police.uk","com.au","com.br"],split=domain.split("."),extra_domain=0;for(let second_level_domain of second_level_domains)if(ends_with(domain,second_level_domain)){extra_domain+=1;break}let top_domain=split.slice(-(2+extra_domain)),subdomains=split.slice(0,split.length-(2+extra_domain));return{top_domain:top_domain.join("."),subdomains:subdomains.join(".")}}}var import_web_dom_collections_iterator21,tld,init_domain_parser=__esm({"lib-browser/u/shared/domain_parser.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator21=__toESM(require_web_dom_collections_iterator());init_b_string();init_mode_check()}});var timestamp,init_timestamp=__esm({"lib-browser/u/shared/timestamp.js"(){"use strict";init_define_process_env();init_shim();init_mode_check();init_errors();if(on_server())timestamp=()=>Date.now();else if(on_worker())timestamp=function(){throw new UnexpectedError("not supported in web workers right now")};else if(on_client())timestamp=()=>Date.now()+window.server_time_offset;else throw new UnexpectedError("unrecognized environment: on_server, on_worker, on_client all returned false")}});function hexToR(h){return parseInt(cutHex(h).substring(0,2),16)}function hexToG(h){return parseInt(cutHex(h).substring(2,4),16)}function hexToB(h){return parseInt(cutHex(h).substring(4,6),16)}function cutHex(h){return h.charAt(0)==="#"?h.substring(1,7):h}function hexToRGB(hex){return[hexToR(hex),hexToG(hex),hexToB(hex)]}function RGBToHex(rgb){return"#"+(rgb[0]*256*256+rgb[1]*256+rgb[2]).toString(16)}function HexToNumber(hex){return parseInt(cutHex(hex),16)}function NumberToHex(num){return"#"+num.toString(16)}function RGBA_to_ARGB(val){if(!val||val.split==null)return"";let split=val.split("rgba(");if(split.length===1)return val;val=split[split.length-1],val=val.slice(0,val.length-1).replace(/\s/g,"");let[red,green,blue,opacity]=val.split(",");return"#"+Math.floor(parseFloat(opacity)*255).toString(16)+parseInt(red).toString(16)+parseInt(green).toString(16)+parseInt(blue).toString(16)}function rgb_to_hex(val){let split=val.split("rgba(");if(split.length===1)return{code:val,opacity:1};val=split[split.length-1],val=val.slice(0,val.length-1).replace(/\s/g,"");let[red,green,blue,opacity]=val.split(",");return{opacity:parseFloat(opacity),code:"#"+((1<<24)+(parseInt(red)<<16)+(parseInt(green)<<8)+parseInt(blue)).toString(16).substr(1)}}function decimal_to_percent(val){return`${Math.round(val*100)}%`}function percent_to_decimal(val){return parseFloat(val)/100}function hex_to_rgb(code,opacity){code=code.replace("#","");let r2=hexToR(code),g=hexToG(code),b=hexToB(code);return`rgba(${r2},${g},${b},${opacity/100})`}function rgba_to_array(val){return val.match(/[.?\d]+/g)}function RGBA_to_RGB(val){if(!val||val.split==null)return"";let split=val.split("rgba(");if(split.length===1)return val;let parameters=split[1].split(",");return"rgb("+parameters.slice(0,parameters.length-1).join(",")+")"}function lighten_color(hex,alpha){try{let parts=hexToRGB(hex);return RGBToHex(lighten_rgb_color(parts,alpha))}catch{return"#FFFFFF"}}var import_es_string_replace9,import_web_dom_collections_iterator22,lighten_rgb_color,rgb_color_to_rgb_string,init_color=__esm({"lib-browser/u/client/color.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace9=__toESM(require_es_string_replace()),import_web_dom_collections_iterator22=__toESM(require_web_dom_collections_iterator());lighten_rgb_color=(_ref,alpha)=>{let[r2,g,b]=_ref,lighten=val=>Math.round(val*alpha+255*(1-alpha));return[lighten(r2),lighten(g),lighten(b)]},rgb_color_to_rgb_string=_ref2=>{let[r2,g,b]=_ref2;return`rgb(${r2}, ${g}, ${b})`}}});var require_promise_native_constructor=__commonJS({"node_modules/core-js/internals/promise-native-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global();module2.exports=global.Promise}});var require_a_constructor=__commonJS({"node_modules/core-js/internals/a-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isConstructor=require_is_constructor(),tryToString=require_try_to_string(),$TypeError=TypeError;module2.exports=function(argument){if(isConstructor(argument))return argument;throw new $TypeError(tryToString(argument)+" is not a constructor")}}});var require_species_constructor=__commonJS({"node_modules/core-js/internals/species-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var anObject=require_an_object(),aConstructor=require_a_constructor(),isNullOrUndefined=require_is_null_or_undefined(),wellKnownSymbol=require_well_known_symbol(),SPECIES=wellKnownSymbol("species");module2.exports=function(O,defaultConstructor){var C=anObject(O).constructor,S18;return C===void 0||isNullOrUndefined(S18=anObject(C)[SPECIES])?defaultConstructor:aConstructor(S18)}}});var require_new_promise_capability=__commonJS({"node_modules/core-js/internals/new-promise-capability.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var aCallable=require_a_callable(),$TypeError=TypeError,PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==void 0||reject!==void 0)throw new $TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject}),this.resolve=aCallable(resolve),this.reject=aCallable(reject)};module2.exports.f=function(C){return new PromiseCapability(C)}}});var require_promise_resolve=__commonJS({"node_modules/core-js/internals/promise-resolve.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var anObject=require_an_object(),isObject3=require_is_object(),newPromiseCapability=require_new_promise_capability();module2.exports=function(C,x){if(anObject(C),isObject3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability.f(C),resolve=promiseCapability.resolve;return resolve(x),promiseCapability.promise}}});var require_es_promise_finally=__commonJS({"node_modules/core-js/modules/es.promise.finally.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),IS_PURE=require_is_pure(),NativePromiseConstructor=require_promise_native_constructor(),fails=require_fails(),getBuiltIn=require_get_built_in(),isCallable=require_is_callable(),speciesConstructor=require_species_constructor(),promiseResolve=require_promise_resolve(),defineBuiltIn=require_define_built_in(),NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails(function(){NativePromisePrototype.finally.call({then:function(){}},function(){})});$2({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(onFinally){var C=speciesConstructor(this,getBuiltIn("Promise")),isFunction2=isCallable(onFinally);return this.then(isFunction2?function(x){return promiseResolve(C,onFinally()).then(function(){return x})}:onFinally,isFunction2?function(e){return promiseResolve(C,onFinally()).then(function(){throw e})}:onFinally)}});!IS_PURE&&isCallable(NativePromiseConstructor)&&(method=getBuiltIn("Promise").prototype.finally,NativePromisePrototype.finally!==method&&defineBuiltIn(NativePromisePrototype,"finally",method,{unsafe:!0}));var method}});var _SPAN_TYPES,EPOCHS,SPANS,init_epoch=__esm({"lib-browser/constants/epoch.js"(){"use strict";init_define_process_env();init_shim();_SPAN_TYPES={drawing:"Drawing",network:"Network"},EPOCHS={load_runmode:{name:"Epoch: Runmode page fully loaded",start_at_page_load:!0},load_editor:{name:"Epoch: Editor page fully loaded",start_at_page_load:!0},load_maison:{name:"Epoch: Editor Maison page fully loaded",start_at_page_load:!0}},SPANS={render:{name:"Client: render complete",type:_SPAN_TYPES.drawing,start_at_page_load:!0,sync:!1},data_retrieval:{name:"Client: data retrieval",type:_SPAN_TYPES.network,sync:!1,start_at_page_load:!1},autorun_scheduled:{name:"Client: Autorun run_scheduled",type:_SPAN_TYPES.drawing,sync:!1,start_at_page_load:!1},page_draw:{name:"Client: page.draw()",type:_SPAN_TYPES.drawing,sync:!0,start_at_page_load:!1},rg_display_data_in_cells:{name:"Client: RepeatingGroup display_data_in_cells",type:_SPAN_TYPES.drawing,sync:!0,start_at_page_load:!1},rg_add_cells:{name:"Client: RepeatingGroup add_cells",type:_SPAN_TYPES.drawing,sync:!0,start_at_page_load:!1}}}});var domain_exports={};__export(domain_exports,{BLOG_URL:()=>BLOG_URL,LOCAL_HOSTNAME:()=>LOCAL_HOSTNAME,META_HOSTNAME:()=>META_HOSTNAME,META_ORIGIN:()=>META_ORIGIN,OLD_META_HOSTNAME:()=>OLD_META_HOSTNAME});var META_HOSTNAME,META_ORIGIN,OLD_META_HOSTNAME,LOCAL_HOSTNAME,BLOG_URL,init_domain=__esm({"lib-browser/constants/domain.js"(){"use strict";init_define_process_env();init_shim();META_HOSTNAME="bubble.io",META_ORIGIN="https://bubble.io",OLD_META_HOSTNAME="bubble.is",LOCAL_HOSTNAME="local.bubble.is",BLOG_URL=`https://${META_HOSTNAME}/blog/`}});var domain_utilities_exports={};__export(domain_utilities_exports,{LABEL_REGEX:()=>LABEL_REGEX,MODIFIED_LABEL_REGEX:()=>MODIFIED_LABEL_REGEX,get_dedicated_env:()=>get_dedicated_env,get_domain_from_referer:()=>get_domain_from_referer,is_appname_valid:()=>is_appname_valid,is_environment_dedicated:()=>is_environment_dedicated,is_host_aws:()=>is_host_aws,is_host_ip_address:()=>is_host_ip_address,is_host_on_bubble:()=>is_host_on_bubble,is_hostname_bubble:()=>is_hostname_bubble,is_hostname_bubble_plus_subdomain:()=>is_hostname_bubble_plus_subdomain,is_hostname_dedicated:()=>is_hostname_dedicated,is_hostname_local_bubble:()=>is_hostname_local_bubble,is_hostname_valid:()=>is_hostname_valid,is_internal_request:()=>is_internal_request,is_origin_on_bubble:()=>is_origin_on_bubble,validate_url:()=>validate_url});function is_appname_valid(name){return LABEL_REGEX.test(name)}function is_hostname_valid(hostname){return DOMAIN_REGEX.test(hostname)}function is_hostname_local_bubble(hostname){return hostname===LOCAL_HOSTNAME}function is_host_aws(host){return AWS_HOST.test(host)}function is_host_ip_address(host){return IP_ADDRESS.test(host)}function is_internal_request(host){return!!host&&(host.startsWith("localhost")||is_host_aws(host)||is_host_ip_address(host))}function is_hostname_bubble(hostname){return BUBBLE_IO_IS_HOSTNAME.test(hostname)}function is_hostname_bubble_plus_subdomain(hostname){return BUBBLE_IO_PLUS_SUB_HOSTNAME.test(hostname)}function is_host_on_bubble(host){return BUBBLE_IO_IS_ANY_STRING.test(host)}function is_origin_on_bubble(origin){return BUBBLE_IO_IS_PLUS_SUB_ORIGIN.test(origin)}function is_hostname_dedicated(hostname){return BUBBLE_DEDICATED_ENV_HOSTNAME.test(hostname)}function is_environment_dedicated(env){return BUBBLE_DEDICATED_ENV.test(env)}function get_dedicated_env(hostname){var _hostname$match;if(hostname)return(_hostname$match=hostname.match(BUBBLE_DEDICATED_ENV_HOSTNAME))==null?void 0:_hostname$match[1]}function get_domain_from_referer(referer){if(referer!=null){if(referer.startsWith(BLOG_URL))return"bubble.io/blog";let match_data=DOMAIN_EXTRACT_REGEX.exec(referer);if(match_data)return match_data[1]}return"direct"}function validate_url(url9){try{return new URL(url9)}catch{return!1}}var import_web_dom_collections_iterator23,import_web_url2,import_web_url_search_params3,LABEL_REGEX,MODIFIED_LABEL_REGEX,DOMAIN_REGEX,DOMAIN_EXTRACT_REGEX,BUBBLE_IO_IS,DEDICATED_ENV_NAME,BUBBLE_IO_IS_HOSTNAME,BUBBLE_IO_PLUS_SUB_HOSTNAME,BUBBLE_IO_IS_PLUS_SUB_ORIGIN,BUBBLE_IO_IS_ANY_STRING,BUBBLE_DEDICATED_ENV_HOSTNAME,BUBBLE_DEDICATED_ENV,AWS_HOST,IP_ADDRESS,init_domain_utilities=__esm({"lib-browser/shared/domain_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator23=__toESM(require_web_dom_collections_iterator()),import_web_url2=__toESM(require_web_url()),import_web_url_search_params3=__toESM(require_web_url_search_params());init_domain();LABEL_REGEX=/^(?:[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)$/,MODIFIED_LABEL_REGEX=/^(?:[a-z\d](?:[a-z\d-_]{0,61}[a-z\d])?)$/,DOMAIN_REGEX=/^(?:[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?\.)+(?:xn--[a-z\d]+|[a-z]{2,})$/,DOMAIN_EXTRACT_REGEX=/^(?:https?:\/\/)?(?:[^@/\n]+@)?(?:www.)?([^:/\n]+)/,BUBBLE_IO_IS="bubble\\.i[so]",DEDICATED_ENV_NAME="(td|d\\d+)",BUBBLE_IO_IS_HOSTNAME=new RegExp(`^${BUBBLE_IO_IS}$`),BUBBLE_IO_PLUS_SUB_HOSTNAME=new RegExp(`^([a-z\\d-]+\\.)?${META_HOSTNAME}$`),BUBBLE_IO_IS_PLUS_SUB_ORIGIN=new RegExp(`^https:\\/\\/([a-z\\d-]+\\.)?${BUBBLE_IO_IS}$`),BUBBLE_IO_IS_ANY_STRING=new RegExp(`\\b${BUBBLE_IO_IS}(?:$|/)`),BUBBLE_DEDICATED_ENV_HOSTNAME=new RegExp(`^${DEDICATED_ENV_NAME}\\.${BUBBLE_IO_IS}$`),BUBBLE_DEDICATED_ENV=new RegExp(`^${DEDICATED_ENV_NAME}$`),AWS_HOST=/\.amazonaws\.com(?::\d+)?$/,IP_ADDRESS=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/}});function local_data_store(data,show_warning){let key=LUID();return local_storage_put(key,data,show_warning),key}function local_data_retrieve(key){var _window23;let data=local_storage_get(key);return on_react_native()||((_window23=window)==null?void 0:_window23.localStorage)==null?window.local_storage_fallback("remove",key):window.localStorage.removeItem(key),data}function local_storage_is_available(){var _window32;let test_key=LUID();if(((_window32=window)==null?void 0:_window32.localStorage)!=null)try{return window.localStorage.setItem(test_key,"testing-localstorage"),window.localStorage.removeItem(test_key),!0}catch{return!1}return!1}function local_storage_put(key,data,show_warning,skip_global){local_storage_put_object({key,data,show_warning,skip_global})}function local_storage_put_object(_ref){var _window42;let{key,data,show_warning,skip_global,on_quota_exceeded_fn}=_ref;!skip_global&&use_global_clipboard(key)&&global_clipboard_put(key,data);let encoded=JSON.stringify(data);if(on_react_native()||((_window42=window)==null?void 0:_window42.localStorage)==null)window.local_storage_fallback("set",key,encoded);else try{window.localStorage.setItem(key,encoded)}catch(err){let error2=err;if(on_quota_exceeded_fn&&error2.message.includes("exceeded the quota")){let current_key=window.localStorage.getItem(key),current_size=current_key?current_key.length+key.length:0,total_remaining=get_local_storage_remaining_char();on_quota_exceeded_fn(total_remaining+current_size);return}console.log(error2.stack),console.log("clearing local storage"),client_storage_events.emit("pre_clear"),window.localStorage.clear(),client_storage_events.emit("clear");try{window.localStorage.setItem(key,encoded)}catch(error3){if(show_warning){var _window5,_window5$BrowserDetec;let msg;throw((_window5=window)==null||(_window5$BrowserDetec=_window5.BrowserDetect)==null?void 0:_window5$BrowserDetec.browser)==="Safari"?msg="Safari in private mode does not support local storage, which prevents the workflow from running properly.":msg="This browser does not support local storage, which prevents the workflow from running properly.",new UserError(void 0,msg)}else throw new UnexpectedError(`Second local storage failure.  Encoded size is ${encoded.length}, and message was: ${error3.message}. key was ' +
              ${key} and data was: ${encoded.slice(0,2e3)}`)}}}function local_storage_get(key){try{if(on_react_native()||typeof window>"u"){var _global$local_storage2;return JSON.parse((_global$local_storage2=window.local_storage_fallback("get",key))!=null?_global$local_storage2:"null")}if(window.localStorage==null)return info("no local storage present"),null;var _window$localStorage$;return JSON.parse((_window$localStorage$=window.localStorage.getItem(key))!=null?_window$localStorage$:"null")}catch(e){return info("cannot read local storage",{error:ensure_bubble_error(e)}),null}}function get_all_keys(){try{if(on_react_native()||typeof window>"u")return window.local_storage_fallback("allKeys");if(window.localStorage==null){info("no local storage present");return}else{let keys2=[];for(let i=0;i<localStorage.length;i++){let key=localStorage.key(i);key!=null&&keys2.push(key)}return keys2}}catch(e){info("cannot read local storage",{error:ensure_bubble_error(e)});return}}function smart_split_str(str,divider,limit2){let pieces=str.split(divider),ret=[];return ret.push(...pieces.slice(0,limit2)),ret.push(pieces.slice(limit2).join(divider)),ret}function rebuild_cookies(){if(on_react_native()){var _cookies;(_cookies=cookies)!=null||(cookies={});return}if(cookies={},on_phonegap())for(let name in window.localStorage){let value=window.localStorage[name];cookies[name]=value}else{var _document$cookie;for(let piece of document.cookie.split(";")){let[name,value]=smart_split_str(piece.trim(),"=",1);cookies[name]=value}is_cookies=((_document$cookie=document.cookie)==null?void 0:_document$cookie.length)>0,is_cookies||(document.cookie="testcookie=hello",is_cookies=document.cookie.includes("testcookie"),document.cookie="testcookie=; expires=Thu, 01 Jan 1970 00:00:01 GMT")}cookies_built=!0}function createCookie(name,value,days){if(on_react_native()){var _cookies2;(_cookies2=cookies)!=null||(cookies={}),value?cookies[name]=value:delete cookies[name];return}if(on_phonegap())window.localStorage.setItem(name,value);else{let expires,secure;days===-1?expires="; expires=Thu, 01 Jan 1970 00:00:01 GMT":days?expires="; expires="+new Date(Date.now()+days*864e5).toUTCString():expires="",starts_with(window.document.location.href,"https://")?secure="; secure; SameSite=Lax":secure="",document.cookie=name+"="+value+expires+"; path=/"+secure}cookies=null}function readCookie(name){var _name;return cookies||rebuild_cookies(),(_name=cookies[name])!=null?_name:null}function eraseCookie(name){createCookie(name,"",-1)}function cookies_enabled(){return cookies_built||rebuild_cookies(),on_phonegap()||on_react_native()||is_cookies}function get_all_cookies(){return cookies||rebuild_cookies(),Object.keys(cookies)}function use_global_clipboard(key){return is_edit_mode()&&key.includes("clipboard")}function global_clipboard_put(key,data){var _clipboard_iframe2,_clipboard_iframe2$0$;initialize_global_clipboard();let timestamp2=Date.now();window.localStorage["_this_session_clipboard_"+key]=timestamp2,(_clipboard_iframe2=_clipboard_iframe)==null||(_clipboard_iframe2$0$=_clipboard_iframe2[0].contentWindow)==null||_clipboard_iframe2$0$.postMessage({action:"global_clipboard_put",key,data,timestamp:timestamp2,id:UUID()},META_ORIGIN)}function approve_global_clipboard(origin){let approved=window.localStorage.global_clipboard_approved?JSON.parse(window.localStorage.global_clipboard_approved):[];approved.push(origin),console.log("Approved origin "+origin+" on this computer.  Please refresh your editor window"),window.localStorage.global_clipboard_approved=JSON.stringify(approved)}function initialize_global_clipboard(){_clipboard_iframe||(window.addEventListener("message",handle_clipboard_message,!1),_clipboard_iframe=$(`<iframe
     src="${META_ORIGIN}/appeditor/clipboard"
     style="position: absolute; left: -2px; width: 1px; height: 1px"
></iframe>"`),$("body").append(_clipboard_iframe))}function handle_clipboard_message(event){var _event$data,_event$data2;if(!is_origin_on_bubble(event.origin))return;if(((_event$data=event.data)==null?void 0:_event$data.action)==="init_me"){var _clipboard_iframe3,_clipboard_iframe3$0$;(_clipboard_iframe3=_clipboard_iframe)==null||(_clipboard_iframe3$0$=_clipboard_iframe3[0].contentWindow)==null||_clipboard_iframe3$0$.postMessage({action:"init_sync",url:window.location.href},META_ORIGIN);return}if(((_event$data2=event.data)==null?void 0:_event$data2.action)!=="new_clipboard_item")return;let storage_key=event.data.key;window.localStorage["_this_session_clipboard_"+storage_key]>=event.data.timestamp||(window.localStorage["_this_session_clipboard_"+storage_key]=event.data.timestamp,local_storage_put(event.data.key,event.data.data,!1,!0))}function copy_on_click(div2,before,skip_css){skip_css||div2.css({"-webkit-user-select":"all","-moz-user-select":"all","-ms-user-select":"all","user-select":"all",cursor:"pointer"});let text2="(copied)";div2.on("vclick",()=>{div2.text().includes(text2)||setTimeout(()=>{let new_text;document.execCommand("copy");let old_text=div2.html();before?new_text=text2+"  "+old_text:new_text=old_text+"  "+text2,div2.html(new_text),setTimeout(()=>{div2.html(old_text)},1e3)},100)})}function get_active_epoch(){return transient.epoch.active}function set_active_epoch(epoch){transient.epoch.active=epoch}var import_web_dom_collections_iterator24,import_events,_global2,_global$local_storage,client_storage_events,session_storage,_window5,get_local_storage_char,PRECISION,MAX_LOCAL_STORAGE_CHARS,LOCAL_STORAGE_SIZE,get_local_storage_max_char,get_local_storage_remaining_char,cookies,is_cookies,cookies_built,_clipboard_iframe,clipboard_script,transient,init_client_storage=__esm({"lib-browser/u/client/client_storage.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator24=__toESM(require_web_dom_collections_iterator()),import_events=__toESM(require_events());init_b_string();init_domain();init_domain_utilities();init_errors();init_logger();init_mode_check();init_uuid();init_time();client_storage_events=new import_events.default.EventEmitter;try{session_storage=(_window5=window)==null?void 0:_window5.sessionStorage}catch{}(_global$local_storage=(_global2=window).local_storage_fallback)!=null||(_global2.local_storage_fallback=()=>{throw new UnexpectedError("trying to store into localstorage, but it does not exist")});get_local_storage_char=()=>Object.entries(window.localStorage).reduce((total,_ref2)=>{let[key,value]=_ref2;return total+key.length+value.length},0),PRECISION=1e3,MAX_LOCAL_STORAGE_CHARS=10*1e3*1e3,get_local_storage_max_char=()=>{if(!LOCAL_STORAGE_SIZE){let min=get_local_storage_char(),max=MAX_LOCAL_STORAGE_CHARS,test_string=Array(max-min+1).join("0"),test_key=LUID(),mid;for(;max-min>PRECISION;){mid=Math.floor((max+min)/2);try{window.localStorage.setItem(test_key,test_string.slice(0,mid)),min=mid}catch{max=mid}}window.localStorage.removeItem(test_key),LOCAL_STORAGE_SIZE=min}return LOCAL_STORAGE_SIZE},get_local_storage_remaining_char=()=>get_local_storage_max_char()-get_local_storage_char();cookies=null,is_cookies=!1,cookies_built=!1;clipboard_script=`
var _dead = false;
function receiveMessage(event) {
if (_dead) { return; }

if (!isOkay(event.origin)) {
    _dead = true;
    console.log('Note: an unrecognized domain, ' + event.origin + ', is trying to access your global Bubble editor clipboard.  If you would like to grant access, go to https://bubble.io, and in the javascript console, type client_storage.approve_global_clipboard(\\'' + event.origin + '\\'); and then refresh the editor window.');
    return;
}

var parentOrigin = event.origin;

if (event.data.action === 'init_sync') {
    function handleStoragePut(event) {
        if (!event.key) { return; }
        if (event.key.indexOf('global_clipboard_message_') != 0) { return; }
        if (!event.newValue) { return; }
        var message = JSON.parse(event.newValue);
        parent.postMessage({
            'action': 'new_clipboard_item',
            'key': message.key,
            'data': message.data,
            'timestamp': message.timestamp
        }, parentOrigin);
    }

    window.addEventListener("storage", handleStoragePut, false);
}

if (event.data.action === 'global_clipboard_put') {
    var message_key = 'global_clipboard_message_' + event.data.id;
    window.localStorage[message_key] = JSON.stringify(event.data);
    setTimeout(function() {
        delete window.localStorage[message_key];
    }, 10000);
}
}

function isOkay(origin) {
if (window.localStorage.global_clipboard_approved && JSON.parse(window.localStorage.global_clipboard_approved).indexOf(event.origin) > -1) {
    return true;
}
if (/^https:\\/\\/([^\\.]+\\.)?bubble\\.i[so]$/.test(origin)) {
    return true;
}
return false;
}

window.addEventListener("message", receiveMessage, false);

parent.postMessage({'action': 'init_me'}, '*');`;transient={epoch:{active:void 0}}}});function _classPrivateMethodInitSpec(obj,privateSet){_checkPrivateRedeclaration(obj,privateSet),privateSet.add(obj)}function _checkPrivateRedeclaration(obj,privateCollection){if(privateCollection.has(obj))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(receiver,privateSet,fn){if(!privateSet.has(receiver))throw new TypeError("attempted to get private field on non-instance");return fn}function _createLabels2(){let url9=lib_default().location.base_url,page2=lib_default().location.get_page(),user_appname=_getUserAppname(),appname=lib_default().appname(),epoch_id=this.id;return{epoch_name:this.name,epoch_id,user_appname,appname,url:url9,page:page2}}var import_es_error_cause8,import_web_dom_collections_iterator25,_createLabels,Epoch,start,end,addEpochLabels,startSpan2,traceSpan2,endSpan2,_getUserAppname,_updateStartTimesOnPageLoad,init_epoch2=__esm({"lib-browser/client/metrics/epoch.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause8=__toESM(require_es_error_cause()),import_web_dom_collections_iterator25=__toESM(require_web_dom_collections_iterator());init_uuid();init_apm();init_epoch();init_lib();init_mode_check();init_client_storage();_createLabels=new WeakSet,Epoch=class{constructor(name){_classPrivateMethodInitSpec(this,_createLabels),this.name=name,this.id=UUID(),this.labels=_classPrivateMethodGet(this,_createLabels,_createLabels2).call(this),this.transaction=startTransaction(name,this.labels)}};start=name=>{end();let createdEpoch=new Epoch(name);set_active_epoch(createdEpoch)},end=()=>{let activeEpoch=get_active_epoch();if(activeEpoch){var _window5,_window$performance2,_window$performance$t,_Object$values$find;let windowFetchStart=(_window5=window)==null||(_window$performance2=_window5.performance)==null||(_window$performance$t=_window$performance2.timing)==null?void 0:_window$performance$t.fetchStart;(((_Object$values$find=Object.values(EPOCHS).find(epochDetail=>epochDetail.name===activeEpoch.name))==null?void 0:_Object$values$find.start_at_page_load)||!1)&&windowFetchStart&&_updateStartTimesOnPageLoad(activeEpoch,windowFetchStart),endTransaction(activeEpoch.transaction)}set_active_epoch(void 0)},addEpochLabels=labels=>{let activeEpoch=get_active_epoch();activeEpoch&&(Object.assign(activeEpoch.labels,labels),addTransactionLabels(labels))},startSpan2=function(name,type){let sync=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,activeEpoch=get_active_epoch();if(activeEpoch)return startSpan(name,{...activeEpoch.labels,type},sync)},traceSpan2=(name,type,fn)=>{let activeEpoch=get_active_epoch();return activeEpoch?traceSpan(name,{...activeEpoch.labels,type},fn):fn()},endSpan2=span2=>{endSpan(span2)},_getUserAppname=()=>{let appname=lib_default().appname();if(is_edit_mode()){var _Lib$location$get_que,_Lib$location$get_que2;return(_Lib$location$get_que=(_Lib$location$get_que2=lib_default().location.get_query())==null?void 0:_Lib$location$get_que2.id)!=null?_Lib$location$get_que:appname}else return appname},_updateStartTimesOnPageLoad=(epoch,windowFetchStart)=>{let transaction=epoch.transaction;transaction.setStart(windowFetchStart),transaction.spans.filter(span2=>{var _Object$values$find2;return(_Object$values$find2=Object.values(SPANS).find(spanValue=>spanValue.name===span2.name))==null?void 0:_Object$values$find2.start_at_page_load}).forEach(span2=>span2.setStart(windowFetchStart))}}});function run_scheduled(old_run){let span_details=SPANS.autorun_scheduled;traceSpan2(span_details.name,span_details.type,()=>{finishEffects(old_run)})}function batch2(fn){if(to_run!==null)return fn();to_run=[];let out;try{out=fn()}finally{on_server()?finishingEffects||run_scheduled(to_run):setTimeout(run_scheduled,0,to_run)}return out}function finishEffects(old_run){finishingEffects=!0,to_run=null;for(let run of old_run)run.updateIfNecessary();finishingEffects=!1,to_run===null?queueMicrotask(()=>scheduled_key.turn_on()):on_server()&&finishEffects(to_run)}function schedule(run){run.run_immediately?to_run.unshift(run):to_run.push(run),run.dont_track_scheduling||scheduled_key.turn_off()}var import_web_dom_collections_iterator26,scheduled_key,to_run,finishingEffects,init_scheduler=__esm({"lib-browser/u/shared/async/new/scheduler.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator26=__toESM(require_web_dom_collections_iterator());init_epoch();init_b_async();init_epoch2();init_mode_check();init_async_state();scheduled_key=MakeSwitch(void 0,"autorun.scheduled_key");scheduled_key.turn_on();to_run=null,finishingEffects=!1;async_state_default.batch=batch2}});var autorun_exports={};__export(autorun_exports,{AlwaysErrorWatcher:()=>AlwaysErrorWatcher,Autorun:()=>Autorun,Box:()=>Box,BoxClass:()=>BoxClass,FakeWatcher:()=>FakeWatcher,Watcher:()=>Watcher,autorun:()=>autorun,autorun_once:()=>autorun_once,autorun_return:()=>autorun_return,autorun_top:()=>autorun_top,autorun_warn:()=>autorun_warn,autotop:()=>autotop,mock_auto_run:()=>mock_auto_run,no_outstanding_run_once:()=>no_outstanding_run_once,removeSourceObservers:()=>removeSourceObservers,run_once:()=>run_once,scheduled_key:()=>scheduled_key,singleton:()=>singleton,updateSources:()=>updateSources,wait_for_attached:()=>wait_for_attached,wait_for_element:()=>wait_for_element,wait_for_updates:()=>wait_for_updates,wait_for_visible:()=>wait_for_visible});function run_once(timeout_seconds,sync_fn,cb){let dont_wait=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,only_count_visible=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,promise;if(typeof timeout_seconds!="number")throw new UnexpectedError("calling run_once with non-numeric value for timeout_seconds");if(on_server())promise=Promise3(sync_fn);else{let check_timed_out2=function(){var _expected;if(done_key.is_turned())return;let expected=watcher.max_expected_time();(_expected=expected)!=null||(expected=visible_time_remaining(visibility_events,timeout_milliseconds,only_count_visible)),expected<0?timed_out2():setTimeout(check_timed_out2,Math.min(1e4,expected))},timed_out2=function(){let waiting_on,status=watcher.get_current_status();status.status==="error"?waiting_on="WAS AN ERR, WHY DID WE NOT CALL ERROR HANDLER?":status.status==="ready"?waiting_on=`WATCHER IS READY, WHY DID WE NOT CALL ONCE_VALUE: ${String(status.value)}`:status.ready_keys?status.ready_keys.is_turned()?waiting_on=`Watcher is marked not ready but keys are turned. _debug_turned_key = ${String(watcher._debug_turned_key)}. IS SCHEDULED: ${String(watcher._dirty)}`:waiting_on=`waiting on ${String(status.ready_keys)}`:waiting_on="<NO READY KEYS>",async_state_default.server_connection_problems?promise.reject(new UserError("BAD_CONNECTION")):promise.reject(new UnexpectedError("autorun.run_once timeout",{timeout_seconds,fn_source:String(sync_fn),waiting_on})),done_key.turn(),watcher.destroy()};var check_timed_out=check_timed_out2,timed_out=timed_out2;let done_key;promise=Promise3(null,`Running once: ${String(sync_fn)}`);let visibility_events=[{timestamp:Date.now(),visibility:on_react_native()?"visible":document.visibilityState}],removeVisbilityHandler=()=>{};if(only_count_visible&&(only_count_visible=!on_react_native()),only_count_visible){let visibilityHandler=()=>{visibility_events.push({timestamp:Date.now(),visibility:document.visibilityState})};document.addEventListener("visibilitychange",visibilityHandler),removeVisbilityHandler=()=>{document.removeEventListener("visibilitychange",visibilityHandler)}}dont_wait?done_key=MakeKey(timeout_seconds+5,"run once: "+String(sync_fn)):done_key=no_outstanding_run_once.make(timeout_seconds+5,"run once: "+String(sync_fn));let watcher=new Autorun(sync_fn,{watcher:!0});dont_wait&&watcher.stop_track_scheduling(),watcher.once_value(val=>{done_key.is_turned()&&console.error("Watcher for run_once was not destroyed immediately"),done_key.turn(),watcher.destroy(),removeVisbilityHandler(),promise.resolve(val)}),watcher.once_error(err=>{done_key.is_turned()&&console.error("Watcher for run_once was not destroyed immediately"),console.error("run_once failed with error",err),done_key.turn(),watcher.destroy(),removeVisbilityHandler(),promise.reject(err)});let timeout_milliseconds=timeout_seconds*1e3;check_timed_out2()}return cb&&promise.callback(cb),promise}function visible_time_remaining(visibility_events,timeout_milliseconds,only_count_visible){if(!only_count_visible)return visibility_events[0].timestamp+timeout_milliseconds-Date.now();let total_visible_time=0;for(let i=0;i<visibility_events.length-1;i++){let event=visibility_events[i],next_event=visibility_events[i+1];event.visibility==="visible"&&(total_visible_time+=next_event.timestamp-event.timestamp)}let current_time=Date.now(),last_event=visibility_events[visibility_events.length-1];return last_event.visibility==="visible"&&(total_visible_time+=current_time-last_event.timestamp),timeout_milliseconds-total_visible_time}function singleton(C){let _instance=null;return()=>(_instance==null&&(_instance=autorun_top(()=>new C)),_instance)}function safe_compare(a,b){try{return[!0,compare(a,b)]}catch(err){if(err instanceof NotReadyError)return[!1];throw err}}function Watcher(fn_or_params){let compare3,fn;typeof fn_or_params=="function"?fn=fn_or_params:{fn,compare:compare3}=fn_or_params;let watcher=new Autorun(fn,{compare:compare3,watcher:!0});return batch2(()=>schedule(watcher)),watcher}function FakeWatcher(data){return new FakeWatcherClass(data)}function wait_for_updates(fn){setTimeout(function(){scheduled_key.is_turned()?fn():WaitFor(scheduled_key,()=>wait_for_updates(fn))},10)}function wait_for_element(selector,timeout,cb){let retry_timeout,err_timeout=setTimeout(function(){retry_timeout!=null&&clearTimeout(retry_timeout),cb(`could not find ${selector} after ${timeout} ms`)},timeout);function wait(){$(selector).length>0?(clearTimeout(err_timeout),cb()):retry_timeout=setTimeout(wait,100)}wait()}function wait_for_attached(div2,cb,options){var _options;(_options=options)!=null||(options={});let{error_message}=options,finished=!1;div2.on("remove",function(){finished=!0});function check(fallback){var _fallback;if((_fallback=fallback)!=null||(fallback=10),!finished)if(is_attached(div2))cb();else if(typeof fallback=="function")fallback();else{let nextFallback=fallback*2;setTimeout(function(){check(nextFallback)},fallback)}}check(function(){WaitFor(scheduled_key,function(){check(function(){error_message?owner_warn("element not attached after scheduled_key",{display:error_message,html:div2[0].outerHTML}):error("element was not attached after autorun.scheduled_key",{html:div2[0].outerHTML}),check()})})})}function wait_for_visible(div2,cb){function check(fallback){var _fallback2;if((_fallback2=fallback)!=null||(fallback=10),!(typeof fallback=="number"&&fallback>500))if(div2.is(":visible"))cb();else if(typeof fallback=="function")fallback();else{let nextFallback=fallback*2;setTimeout(()=>check(nextFallback),fallback)}}check(function(){WaitFor(scheduled_key,()=>check())})}function autorun(fn_or_options,cleanup_or_empty){let options=typeof fn_or_options=="object"?fn_or_options:{do:fn_or_options,while:void 0,finally:cleanup_or_empty},{do:do_fn,while:while_fn,finally:finally_fn}=options;if(is_edit_mode()){let old_do_fn=do_fn,old_finally_fn=finally_fn,disposer;do_fn=()=>{autorun_top(()=>untrack(()=>{var _disposer;return(_disposer=disposer)==null?void 0:_disposer()}));let not_ready=createRoot(dispose2=>{disposer=dispose2;try{old_do_fn()}catch(err){if(err instanceof NotReadyError)return err;throw err}return null});if(not_ready!=null)throw not_ready},finally_fn=()=>{var _disposer2;(_disposer2=disposer)==null||_disposer2(),old_finally_fn==null||old_finally_fn()}}if(while_fn)return conditional_autorun(do_fn,while_fn,finally_fn);{let ar=new Autorun(do_fn,{cleanup:finally_fn});return batch2(()=>ar.evaluate()),ar}}function conditional_autorun(do_fn,while_fn,finally_fn){return batch2(()=>{let run=new Autorun(do_fn,{cleanup:()=>{finally_fn==null||finally_fn(),pauser.destroy()}}),pauser=new Autorun(()=>{while_fn()?run.unpause():run.pause()});return pauser.evaluate(),run.updateIfNecessary(),run})}function updateSources(){let node=async_state_default.CurrentAutoRun,newSources=async_state_default.NewSources,newSourcesIndex=async_state_default.NewSourcesIndex;if(newSources){if(node._sources&&removeSourceObservers(node,newSourcesIndex),node._sources&&newSourcesIndex>0){node._sources.length=newSourcesIndex+newSources.length;for(let i=0;i<newSources.length;i++)(newSources[i]._check||newSources[i]._dirty)&&error("new source is dirty or check",{invalidator:newSources[i]._lastInvalidationStack}),node._sources[newSourcesIndex+i]=newSources[i]}else node._sources=newSources;let source;for(let i=newSourcesIndex;i<node._sources.length;i++)source=node._sources[i],source._observers?source._observers.push(node):source._observers=[node]}else node._sources&&newSourcesIndex<node._sources.length&&(removeSourceObservers(node,newSourcesIndex),node._sources.length=newSourcesIndex)}function removeSourceObservers(node,index){let swap;for(let i=index;i<node._sources.length;i++){let source=node._sources[i];source._observers&&(swap=source._observers.indexOf(node),source._observers[swap]=source._observers[source._observers.length-1],source._observers.pop())}}function autorun_once(fn){let ar=new Autorun(fn,{run_once:!0});return batch2(()=>ar.evaluate()),ar}function autorun_top(fn){let old_running=async_state_default.CurrentAutoRun;async_state_default.CurrentAutoRun=null;let old_not_ready_catcher=async_state_default.CurrentNotReadyCatcher;async_state_default.CurrentNotReadyCatcher=null;try{return fn()}catch(err){throw err instanceof NotReadyError&&log(ensure_bubble_error(err)),err}finally{async_state_default.CurrentAutoRun=old_running,async_state_default.CurrentNotReadyCatcher=old_not_ready_catcher}}function autotop(fn){return autorun_top(()=>autorun(fn))}function mock_auto_run(fn){let mock=new MockAutoRun,old_running=async_state_default.CurrentAutoRun,old_not_ready_catcher=async_state_default.CurrentNotReadyCatcher,prevSources=async_state_default.NewSources,prevSourcesIndex=async_state_default.NewSourcesIndex;try{return async_state_default.CurrentAutoRun=mock,async_state_default.CurrentNotReadyCatcher=null,async_state_default.NewSources=null,async_state_default.NewSourcesIndex=0,fn(),mock}finally{updateSources(),async_state_default.CurrentAutoRun=old_running,async_state_default.CurrentNotReadyCatcher=old_not_ready_catcher,async_state_default.NewSources=prevSources,async_state_default.NewSourcesIndex=prevSourcesIndex}}function Box(state4,not_ready){let b=new BoxClass(state4);not_ready===!0&&b.not_ready();let val_fn=b.val.bind(b);return Object.assign(val_fn,{set:b.set.bind(b),get:b.get.bind(b),dangerously_peek:b.dangerously_peek.bind(b),to_promise:b.to_promise.bind(b)})}function autorun_return(fn){let w=new Autorun(fn,{watcher:!0,autorun_return:!0}),out=batch2(()=>w.get());return w.once_change(()=>{w.destroy()}),out}var import_es_promise_finally,import_web_dom_collections_iterator27,no_outstanding_run_once,FakeWatcherClass,Autorun,autorun_warn,MockAutoRun,BoxClass,AlwaysErrorWatcher,init_autorun=__esm({"lib-browser/u/shared/async/new/autorun.js"(){"use strict";init_define_process_env();init_shim();import_es_promise_finally=__toESM(require_es_promise_finally()),import_web_dom_collections_iterator27=__toESM(require_web_dom_collections_iterator());init_async_state();init_b_async();init_b_object();init_b_ui();init_dependency();init_errors();init_logger();init_mode_check();init_uuid();init_solid();init_scheduler();init_scheduler();no_outstanding_run_once=MakeKeyList();FakeWatcherClass=class{constructor(data){this.data=void 0,this.data=data}get_ready_key(){return FakeKey()}stop_track_scheduling(){}max_expected_time(){return null}invalidate(){}get_current(){return[!0,this.data]}get_current_status(){return{status:"ready",value:this.data}}get_current_status_array(){return[null,!0,this.data]}get(){return this.data}on_value(handler){handler(this.data)}on_error(){}on_not_ready(){}once_error(){}once_value(handler){handler(this.data)}once_change(){}on_condition(condition,handler){(condition===this.data||typeof condition=="function"&&condition(this.data))&&handler(this.data)}once_condition(condition,handler){this.on_condition(condition,handler)}destroy(){}};Autorun=class _Autorun{constructor(fn){var _options$run_once,_options$watcher,_options$log_errors;let options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._is_destroyed=!1,this._dirty=!0,this._check=!1,this._parent=async_state_default.CurrentAutoRun,this._subs=[],this._sources=null,this._observers=null,this._is_paused=!1,this._is_ancestor_paused=!1,this._fn=void 0,this._cleanup=void 0,this._dispose=void 0,this.run_once=void 0,this.run_immediately=!1,this.dont_track_scheduling=!1,this._watcher=void 0,this.error=void 0,this.value=void 0,this.ready=!1,this.ready_keys=void 0,this._debug_turned_key=void 0,this.listeners=void 0,this.error_listeners=void 0,this.not_ready_listeners=void 0,this._compare=void 0,this._log_errors=void 0,this._running=!1,this._updatingIfNecessary=!1,this._fn=fn,this._cleanup=options.cleanup,this._compare=options.compare,this.run_once=(_options$run_once=options.run_once)!=null?_options$run_once:!1,this._watcher=(_options$watcher=options.watcher)!=null?_options$watcher:!1,this._log_errors=(_options$log_errors=options.log_errors)!=null?_options$log_errors:!0,(!this._watcher||options.autorun_return)&&this._parent!=null&&this._parent.add_sub(this),options.debug&&(this.id=LUID())}set_run_immediately(run_immediately){this.run_immediately=run_immediately}alive(){return!this._is_destroyed}evaluate(){is_edit_mode()?(this._dispose&&autorun_top(this._dispose),createRoot(dispose2=>{this._dispose=dispose2,this.inner_evaluate()})):this.inner_evaluate()}inner_evaluate(){if(this._is_destroyed)return;if(this.ready_keys&&!this.ready_keys.is_turned()){this._dirty=!1;return}if(this._is_paused||this._is_ancestor_paused||!this._dirty)return;let old_not_ready_catcher=async_state_default.CurrentNotReadyCatcher,my_not_ready_catcher=this._watcher?[]:null,old_autorun=async_state_default.CurrentAutoRun,prevSources=async_state_default.NewSources,prevSourcesIndex=async_state_default.NewSourcesIndex,last_error,value;async_state_default.CurrentNotReadyCatcher=my_not_ready_catcher,async_state_default.CurrentAutoRun=this,async_state_default.NewSources=null,async_state_default.NewSourcesIndex=0,this._running=!0;try{this.destroy_subs(),value=this._fn()}catch(err){if(err instanceof NotReadyError&&err.not_ready_key!=null){let ready_key=err.not_ready_key;my_not_ready_catcher?my_not_ready_catcher.push(ready_key):ready_key.turned_dependency().register()}else last_error=ensure_bubble_error(err)}finally{this.run_once||updateSources(),async_state_default.CurrentNotReadyCatcher=old_not_ready_catcher,async_state_default.CurrentAutoRun=old_autorun,async_state_default.NewSources=prevSources,async_state_default.NewSourcesIndex=prevSourcesIndex,this._lastInvalidationStack&&(this._lastInvalidationStack=void 0)}if(my_not_ready_catcher!==null)if(last_error!=null)if(this.error=last_error,this.value=void 0,this.ready=!0,this._debug_turned_key=void 0,this.invalidate_observers(2),this.error_listeners!=null&&this.error_listeners.size>0)for(let handler of this.error_listeners)try{handler(this.error)}catch(err){log(ensure_bubble_error(err))}else this._log_errors&&log(this.error);else if(my_not_ready_catcher.length===0){let fire_updates=!this.ready;if(!fire_updates)if(this._compare)fire_updates=!this._compare(value,this.value);else{let comparison=safe_compare(value,this.value);fire_updates=!comparison[0]||!comparison[1]}if(fire_updates){if(this.ready=!0,this.error=void 0,this.value=value,this._debug_turned_key=void 0,this.invalidate_observers(2),this.listeners){let listeners_copy=[...this.listeners];queueMicrotask(()=>{for(let handler of listeners_copy)try{handler(value)}catch(err){log(ensure_bubble_error(err))}})}}else this.value=value}else{var _this$ready_keys;if(this.ready&&this.not_ready_listeners)for(let handler of this.not_ready_listeners)try{handler()}catch(err){log(ensure_bubble_error(err))}this.ready=!1,this.value=value,this.error=void 0,(_this$ready_keys=this.ready_keys)!=null||(this.ready_keys=MakeKeyList()),this.ready_keys.batch_notifications(),this.ready_keys.remove_all();for(let key of my_not_ready_catcher)key.is_turned()?this._debug_turned_key=key:this.ready_keys.add_key(key);this.ready_keys.notify_batch();let dep=this.ready_keys.turned_dependency();this._sources?this._sources.push(dep):this._sources=[dep],dep._observers.push(this)}this._running=!1,this._dirty=!1,this._check=!1}destroy_subs(){for(let sub of this._subs)sub.destroy();this._subs=[]}destroy(){var _this$ready_keys2;this._is_destroyed=!0,this._sources&&(removeSourceObservers(this,0),this._sources=null),this.destroy_subs();try{var _this$_dispose,_this$_cleanup;(_this$_dispose=this._dispose)==null||_this$_dispose.call(this),(_this$_cleanup=this._cleanup)==null||_this$_cleanup.call(this)}catch(err){error("Error while cleaning up autorun",{error:ensure_bubble_error(err)})}this.listeners=void 0,this.not_ready_listeners=void 0,this.error_listeners=void 0,this._observers=null,(_this$ready_keys2=this.ready_keys)==null||_this$ready_keys2.destroy(),this.ready_keys=void 0,this._dirty=!1,this._check=!1,this._dispose=void 0,this._cleanup=void 0,this._fn=void 0}add_sub(sub){this._subs.push(sub)}stop_tracking(){this.dont_track_scheduling=!0}pause(){this._is_paused=!0,this._subs.forEach(pause_via_ancestor);function pause_via_ancestor(run){let already_paused=run._is_paused||run._is_ancestor_paused;run._is_ancestor_paused=!0,already_paused||run._subs.forEach(pause_via_ancestor)}}unpause(){this._is_paused=!1,batch2(()=>this.run_or_unpause_subs())}run_or_unpause_subs(){this._is_paused||this._is_ancestor_paused||(this._dirty?this.updateIfNecessary():this._subs.forEach(sub=>{sub._is_ancestor_paused=!1,sub.run_or_unpause_subs()}))}updateIfNecessary(){if(!this._is_destroyed){if(this._updatingIfNecessary){_Autorun._logged_autorun_cyclic||(error("Tried to update an autorun while it was already updating, cyclic"),_Autorun._logged_autorun_cyclic=!0);return}if(this._updatingIfNecessary=!0,this._check){if(this._sources){for(let source of this._sources)if(source.updateIfNecessary(),this._dirty)break}this._check=!1}this._dirty&&this.evaluate(),this._updatingIfNecessary=!1}}invalidate_observers(state4,invalidator){if(!this._is_destroyed&&this._observers)for(let observer2 of this._observers)observer2._invalidate(state4,invalidator)}invalidate(){this._is_destroyed||batch2(()=>this._invalidate(2))}_invalidate(state4,invalidator){if(this._is_destroyed||this.run_once)return;let changed=!(this._check||this._dirty);state4===1?this._dirty||(this._check=!0):(this._dirty=!0,this._check=!1),state4!==2&&this._running&&console.error("Implicitly invalidated an Autorun, probably because a Box/Switch was mutated while running."),invalidator&&(this._lastInvalidationStack=invalidator),changed&&!this._running&&(schedule(this),this.invalidate_observers(1,invalidator))}get_ready_key(){var _this$ready_keys3;return(_this$ready_keys3=this.ready_keys)!=null||(this.ready_keys=TransientKeyList()),this.ready_keys}stop_track_scheduling(){this.dont_track_scheduling=!0}max_expected_time(){var _this$ready_keys$max_,_this$ready_keys4;return(_this$ready_keys$max_=(_this$ready_keys4=this.ready_keys)==null?void 0:_this$ready_keys4.max_expected_time())!=null?_this$ready_keys$max_:null}get_current(){let no_throw=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(batch2(()=>this.updateIfNecessary()),register_dependency(this),this.error!=null){if(no_throw)return[null,null,this.error];throw this.error}return this.ready?[this.ready,this.value]:[this.ready,this.ready_keys]}get_current_status(){return this.error!=null?{status:"error",error:this.error}:this.ready?{status:"ready",value:this.value}:{status:"not_ready",ready_keys:this.ready_keys}}get_current_status_array(){return this.error!=null?[this.error]:this.ready?[null,this.ready,this.value]:[null,this.ready,this.ready_keys]}get(){if(this._is_destroyed){if(console.warn("reading from destroyed autorun"),this.error!=null)throw this.error;return this.ready||ensure_ready(this.ready_keys,!1),this.value}return batch2(()=>{if(this.updateIfNecessary(),this.error!=null)throw register_dependency(this),this.error;return this.ready||(ensure_ready(this.ready_keys,!1),this.updateIfNecessary()),register_dependency(this),this.value})}on_value(handler){var _this$listeners;if(batch2(()=>this.updateIfNecessary()),(_this$listeners=this.listeners)!=null||(this.listeners=new Set),this.listeners.add(handler),this.error!=null)log(this.error);else if(this.ready)try{handler(this.value)}catch(err){log(ensure_bubble_error(err))}}on_condition(condition,handler){let passes_condition;typeof condition=="function"?passes_condition=condition:passes_condition=val=>val===condition,this.on_value(val=>{passes_condition(val)&&handler(val)})}on_not_ready(handler){var _this$not_ready_liste;if((_this$not_ready_liste=this.not_ready_listeners)!=null||(this.not_ready_listeners=new Set),this.not_ready_listeners.add(handler),!this.ready)try{handler()}catch(err){log(ensure_bubble_error(err))}}on_error(handler){var _this$error_listeners;if(batch2(()=>this.updateIfNecessary()),(_this$error_listeners=this.error_listeners)!=null||(this.error_listeners=new Set),this.error_listeners.add(handler),this.error!=null)try{handler(this.error)}catch(err){log(ensure_bubble_error(err))}}once_error(handler){let new_handler=err=>{var _this$error_listeners2;(_this$error_listeners2=this.error_listeners)==null||_this$error_listeners2.delete(new_handler),handler(err)};this.on_error(new_handler)}once_value(handler){let new_handler=val=>{var _this$listeners2;(_this$listeners2=this.listeners)==null||_this$listeners2.delete(new_handler),handler(val)};this.on_value(new_handler)}once_condition(condition,handler){let passes_condition;typeof condition=="function"?passes_condition=condition:passes_condition=val=>val===condition;let new_handler=val=>{if(passes_condition(val)){var _this$listeners3;(_this$listeners3=this.listeners)==null||_this$listeners3.delete(new_handler),handler(val)}};this.on_value(new_handler)}once_change(handler){var _this$listeners4;(_this$listeners4=this.listeners)!=null||(this.listeners=new Set);let new_handler=val=>{var _this$listeners5;(_this$listeners5=this.listeners)==null||_this$listeners5.delete(new_handler),handler(val)};this.listeners.add(new_handler)}};Autorun._logged_autorun_cyclic=!1;autorun_warn=autorun_top;MockAutoRun=class{constructor(){this._check=!1,this._dirty=!1,this.id=LUID(),this._sources=[]}add_sub(sub){}stop_tracking(){}will_run(){if(this._check)for(let source of this._sources)source.updateIfNecessary();let old_dirty=this._dirty;return this._dirty=!1,this._check=!1,old_dirty}_invalidate(state4){state4===1&&(this._dirty||(this._check=!0)),(state4===2||state4===3)&&(this._dirty=!0,this._check=!1)}destroy(){removeSourceObservers(this,0),this._sources=[]}};BoxClass=class extends DependencyClass{constructor(state4){super(),this.state=void 0,this.is_not_ready=void 0,this.not_ready_switch=void 0,this.state=state4,this.is_not_ready=!1}not_ready(){var _this$not_ready_switc;this.is_not_ready=!0,(_this$not_ready_switc=this.not_ready_switch)!=null||(this.not_ready_switch=MakeSwitch(void 0,"autorun.Box not_ready_switch")),this.not_ready_switch.turn_off()}val(new_val,not_ready){if(not_ready===!0)this.not_ready();else{if(new_val===void 0)return this.get();this.set(new_val)}}dangerously_peek(){return this.state}get(){return this.is_not_ready&&ensure_ready(this.not_ready_switch),this.register(),this.state}set(new_val){compare(this.state,new_val)||(this.state=new_val,this.invalidate()),this.is_not_ready&&(this.is_not_ready=!1,this.not_ready_switch.turn_on())}to_promise(){if(this.is_not_ready){let promise=Promise3(null,this.not_ready_switch);return WaitFor(this.not_ready_switch,()=>promise.resolve(this.state)),promise}else return Promise3(this.state)}};AlwaysErrorWatcher=new Autorun(()=>{throw new UnexpectedError("This watcher cannot be accessed")},{log_errors:!1})}});var eval_node_state_exports={};__export(eval_node_state_exports,{create_with_original_eval_node:()=>create_with_original_eval_node,get_current_eval_node:()=>get_current_eval_node,with_eval_node:()=>with_eval_node});function get_current_eval_node(){return current_eval_node}var current_eval_node,with_eval_node,create_with_original_eval_node,init_eval_node_state=__esm({"lib-browser/lang/evaluation/eval_node_state.js"(){"use strict";init_define_process_env();init_shim();init_mode_check();current_eval_node=null;on_server()?with_eval_node=(appnode,fn)=>fn():with_eval_node=function(appnode,fn){let old_eval_node=current_eval_node;current_eval_node=appnode;try{return fn()}finally{current_eval_node=old_eval_node}};create_with_original_eval_node=()=>{let original_eval_node=current_eval_node;return fn=>with_eval_node(original_eval_node,fn)}}});var autorun_exports2={};__export(autorun_exports2,{AlwaysErrorWatcher:()=>AlwaysErrorWatcher2,Autorun:()=>Autorun2,Box:()=>Box2,BoxClass:()=>BoxClass2,FakeWatcher:()=>FakeWatcher2,Watcher:()=>Watcher2,autorun:()=>autorun2,autorun_once:()=>autorun_once2,autorun_return:()=>autorun_return2,autorun_top:()=>autorun_top2,autorun_warn:()=>autorun_warn2,autorun_watch:()=>autorun_watch,autotop:()=>autotop2,mock_auto_run:()=>mock_auto_run2,no_outstanding_run_once:()=>no_outstanding_run_once2,run_once:()=>run_once2,schedule:()=>schedule2,scheduled_key:()=>scheduled_key2,singleton:()=>singleton2,wait_for_attached:()=>wait_for_attached2,wait_for_element:()=>wait_for_element2,wait_for_updates:()=>wait_for_updates2,wait_for_updates_keys:()=>wait_for_updates_keys,wait_for_visible:()=>wait_for_visible2});function run_once2(timeout_seconds,sync_fn,cb){let dont_wait=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,only_count_visible=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,promise;if(typeof timeout_seconds!="number")throw new UnexpectedError("calling run_once with non-numeric value for timeout_seconds");let with_original_eval_node=create_with_original_eval_node();if(on_server())promise=Promise4(sync_fn);else{let check_timed_out2=function(){var _expected;if(done_key.is_turned())return;let expected=watcher.max_expected_time();(_expected=expected)!=null||(expected=visible_time_remaining2(visibility_events,timeout_milliseconds,only_count_visible)),expected<0?timed_out2():setTimeout(check_timed_out2,Math.min(1e4,expected))},timed_out2=function(){let waiting_on,status=watcher.get_current_status();status.status==="error"?waiting_on="WAS AN ERR, WHY DID WE NOT CALL ERROR HANDLER?":status.status==="ready"?waiting_on=`WATCHER IS READY, WHY DID WE NOT CALL ONCE_VALUE: ${String(status.value)}`:status.ready_keys?status.ready_keys.is_turned()?waiting_on=`Watcher is marked not ready but keys are turned. _debug_turned_key = ${String(watcher._debug_turned_key)}. IS SCHEDULED: ${String(!!watcher._is_scheduled)}`:waiting_on=`waiting on ${String(status.ready_keys)}`:waiting_on="<NO READY KEYS>",removeVisbilityHandler(),async_state_default2.server_connection_problems?promise.reject(new UserError("BAD_CONNECTION")):promise.reject(new UnexpectedError("autorun.run_once timeout",{timeout_seconds,fn_source:String(sync_fn),waiting_on})),done_key.turn(),watcher.destroy()};var check_timed_out=check_timed_out2,timed_out=timed_out2;let done_key;promise=Promise4(null,`Running once: ${String(sync_fn)}`);let visibility_events=[{timestamp:Date.now(),visibility:on_react_native()?"visible":document.visibilityState}],removeVisbilityHandler=()=>{};if(only_count_visible&&(only_count_visible=!on_react_native()),only_count_visible){let visibilityHandler=()=>{visibility_events.push({timestamp:Date.now(),visibility:document.visibilityState})};document.addEventListener("visibilitychange",visibilityHandler),removeVisbilityHandler=()=>{document.removeEventListener("visibilitychange",visibilityHandler)}}dont_wait?done_key=MakeKey2(timeout_seconds+5,"run once: "+String(sync_fn)):done_key=no_outstanding_run_once2.make(timeout_seconds+5,"run once: "+String(sync_fn));let watcher=Watcher2(()=>with_original_eval_node(sync_fn));dont_wait&&watcher.dont_track_scheduling(),watcher.once_value(val=>{done_key.is_turned()||(done_key.turn(),watcher.destroy(),removeVisbilityHandler(),promise.resolve(val))}),watcher.once_error(err=>{done_key.is_turned()||(done_key.turn(),watcher.destroy(),removeVisbilityHandler(),promise.reject(err))});let timeout_milliseconds=timeout_seconds*1e3;check_timed_out2()}return cb&&promise.callback((err,result)=>with_original_eval_node(()=>cb(err,result))),promise}function visible_time_remaining2(visibility_events,timeout_milliseconds,only_count_visible){if(!only_count_visible)return visibility_events[0].timestamp+timeout_milliseconds-Date.now();let total_visible_time=0;for(let i=0;i<visibility_events.length-1;i++){let event=visibility_events[i],next_event=visibility_events[i+1];event.visibility==="visible"&&(total_visible_time+=next_event.timestamp-event.timestamp)}let current_time=Date.now(),last_event=visibility_events[visibility_events.length-1];return last_event.visibility==="visible"&&(total_visible_time+=current_time-last_event.timestamp),timeout_milliseconds-total_visible_time}function singleton2(C){let _instance=null;return()=>(_instance==null&&(_instance=autorun_top2(()=>new C)),_instance)}function _try_catch_finally(t,c,f){try{t()}catch(err){c(err)}finally{f()}}function safe_compare2(a,b){try{return[!0,compare(a,b)]}catch(err){if(err instanceof NotReadyError)return[!1];throw err}}function Watcher2(fn_or_params){let watcher_test=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,compare3,fn;return typeof fn_or_params=="function"?fn=fn_or_params:{fn,compare:compare3}=fn_or_params,new WatcherClass(fn,{watcher_test,compare:compare3})}function FakeWatcher2(data){return new FakeWatcherClass2(data)}function wait_for_updates2(fn){setTimeout(function(){scheduled_key2.is_turned()&&wait_for_updates_keys.is_turned()?fn():WaitFor2(scheduled_key2,wait_for_updates_keys,()=>wait_for_updates2(fn))},10)}function wait_for_element2(selector,timeout,cb){let retry_timeout,err_timeout=setTimeout(function(){retry_timeout!=null&&clearTimeout(retry_timeout),cb(`could not find ${selector} after ${timeout} ms`)},timeout);function wait(){$(selector).length>0?(clearTimeout(err_timeout),cb()):retry_timeout=setTimeout(wait,100)}wait()}function wait_for_attached2(div2,cb,options){var _options;(_options=options)!=null||(options={});let{error_message}=options,finished=!1;div2.on("remove",function(){finished=!0});function check(fallback){var _fallback;if((_fallback=fallback)!=null||(fallback=10),!finished)if(is_attached(div2))cb();else if(typeof fallback=="function")fallback();else{let nextFallback=fallback*2;setTimeout(function(){check(nextFallback)},fallback)}}check(function(){WaitFor2(scheduled_key2,function(){check(function(){error_message?owner_warn("element not attached after scheduled_key",{display:error_message,html:div2[0].outerHTML}):error("element was not attached after autorun.scheduled_key",{html:div2[0].outerHTML}),check()})})})}function wait_for_visible2(div2,cb){function check(fallback){var _fallback2;if((_fallback2=fallback)!=null||(fallback=10),!(typeof fallback=="number"&&fallback>500))if(div2.is(":visible"))cb();else if(typeof fallback=="function")fallback();else{let nextFallback=fallback*2;setTimeout(()=>check(nextFallback),fallback)}}check(function(){WaitFor2(scheduled_key2,()=>check())})}function autorun2(fn_or_options,cleanup_or_empty){let options=typeof fn_or_options=="object"?fn_or_options:{do:fn_or_options,while:void 0,finally:cleanup_or_empty},{do:do_fn,while:while_fn,finally:finally_fn}=options;if(is_edit_mode()){let old_do_fn=do_fn,old_finally_fn=finally_fn,disposer;do_fn=()=>{autorun_top2(()=>untrack(()=>{var _disposer;return(_disposer=disposer)==null?void 0:_disposer()}));let not_ready=createRoot(dispose2=>{disposer=dispose2;try{old_do_fn()}catch(err){if(err instanceof NotReadyError)return err;throw err}return null});if(not_ready!=null)throw not_ready},finally_fn=()=>{var _disposer2;(_disposer2=disposer)==null||_disposer2(),old_finally_fn==null||old_finally_fn()}}return while_fn?conditional_autorun2(do_fn,while_fn,finally_fn):new Autorun2(do_fn,finally_fn).run_me()}function conditional_autorun2(do_fn,while_fn,finally_fn){let has_ever_run=!1,run=new Autorun2(do_fn,()=>{finally_fn==null||finally_fn(),pauser.destroy()}),pauser=new Autorun2(()=>{while_fn()?(run.unpause(),has_ever_run||(has_ever_run=!0,run.run_me())):run.pause()}).run_me();return run}function autorun_once2(fn){return new Autorun2(fn,void 0,!0).run_me()}function autorun_warn2(fn){return fn()}function autorun_top2(fn){let old_running=async_state_default2.CurrentAutoRun;async_state_default2.CurrentAutoRun=null;let old_not_ready_catcher=async_state_default2.CurrentNotReadyCatcher;async_state_default2.CurrentNotReadyCatcher=null;try{return fn()}catch(err){throw err instanceof NotReadyError&&log(ensure_bubble_error(err)),err}finally{async_state_default2.CurrentAutoRun=old_running,async_state_default2.CurrentNotReadyCatcher=old_not_ready_catcher}}function autotop2(fn){return autorun_top2(()=>autorun2(fn))}function mock_auto_run2(fn){let old_not_ready_catcher,old_running;try{old_running=async_state_default2.CurrentAutoRun;let mock=new MockAutoRun2;return async_state_default2.CurrentAutoRun=mock,old_not_ready_catcher=async_state_default2.CurrentNotReadyCatcher,async_state_default2.CurrentNotReadyCatcher=null,fn(),mock}finally{async_state_default2.CurrentAutoRun=old_running,async_state_default2.CurrentNotReadyCatcher=old_not_ready_catcher}}function autorun_watch(){_auto_run_to_watch=async_state_default2.CurrentAutoRun}function Box2(state4,not_ready){let b=new BoxClass2(state4);not_ready===!0&&b.not_ready();let val_fn=b.val.bind(b);return Object.assign(val_fn,{set:b.set.bind(b),get:b.get.bind(b),dangerously_peek:b.dangerously_peek.bind(b),to_promise:b.to_promise.bind(b)})}function autorun_return2(fn){let my_dependency=Dependency2(),my_result,my_err;if(autorun2(()=>{try{let new_result=fn();compare(new_result,my_result)||my_dependency.invalidate(),my_result=new_result,my_err=void 0}catch(err){my_err=err,my_dependency.invalidate()}}),my_dependency.register(),my_err!=null)throw my_err.suppress_dependency_error=!0,my_err;return my_result}var import_web_dom_collections_iterator28,import_es_promise_finally2,no_outstanding_run_once2,WatcherClass,AlwaysErrorWatcher2,FakeWatcherClass2,wait_for_updates_keys,Autorun2,MockAutoRun2,scheduled_key2,schedule2,_auto_run_to_watch,BoxClass2,init_autorun2=__esm({"lib-browser/u/shared/async/old/autorun.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator28=__toESM(require_web_dom_collections_iterator()),import_es_promise_finally2=__toESM(require_es_promise_finally());init_async_state2();init_b_async2();init_b_object();init_b_ui();init_dependency2();init_errors();init_logger();init_mode_check();init_uuid();init_epoch2();init_epoch();init_solid();init_eval_node_state();no_outstanding_run_once2=MakeKeyList2();WatcherClass=class{constructor(fn){var _this$_ar_object;let options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.evaluate=void 0,this.cleanup=void 0,this.ready_keys=void 0,this._is_scheduled=void 0,this._dont_track_scheduling=!1,this._ar_object=void 0,this.error=void 0,this.value=void 0,this.ready=!1,this._debug_turned_key=void 0,this.dependency=void 0,this.error_listeners=void 0,this.listeners=void 0,this.not_ready_listeners=void 0;let{watcher_test=!1,compare:compare3,log_errors=!0}=options;is_edit_mode()?this.evaluate=()=>{autorun_top2(()=>untrack(()=>{var _this$cleanup;return(_this$cleanup=this.cleanup)==null?void 0:_this$cleanup.call(this)})),createRoot(dispose2=>{this.cleanup=dispose2,this.do_evaluate(fn,watcher_test,compare3,log_errors)})}:this.evaluate=this.do_evaluate.bind(this,fn,watcher_test,compare3,log_errors),this.evaluate(),((_this$_ar_object=this._ar_object)==null?void 0:_this$_ar_object._has_dependency)===!0||!this.ready?this.dependency=Dependency2():(this.evaluate=void 0,this._ar_object=void 0)}do_evaluate(fn,watcher_test,compare3,log_errors){let old_not_ready_catcher=async_state_default2.CurrentNotReadyCatcher,my_not_ready_catcher=[],old_autorun=async_state_default2.CurrentAutoRun,my_autorun=this.build_wrapped_autorun(watcher_test);this._ar_object=my_autorun;let last_error,value;if(_try_catch_finally(function(){async_state_default2.CurrentNotReadyCatcher=my_not_ready_catcher,async_state_default2.CurrentAutoRun=my_autorun,value=fn()},function(err){if(err instanceof NotReadyError&&err.not_ready_key!=null){let ready_key=err.not_ready_key;!ready_key.is_registered(my_autorun)&&err.suppress_dependency_error!==!0&&error("Watcher caught unregistered key",{key:ready_key.toString()}),my_not_ready_catcher.push(ready_key)}else last_error=ensure_bubble_error(err)},function(){async_state_default2.CurrentNotReadyCatcher=old_not_ready_catcher,async_state_default2.CurrentAutoRun=old_autorun}),last_error!=null){var _this$dependency;if(this.error=last_error,this.value=void 0,this.ready=!0,this._debug_turned_key=void 0,(_this$dependency=this.dependency)==null||_this$dependency.invalidate(),this.error_listeners!=null&&this.error_listeners.size>0)for(let handler of this.error_listeners)try{handler(this.error)}catch(err){log(ensure_bubble_error(err))}else log_errors&&log(this.error)}else if(my_not_ready_catcher.length===0){let fire_updates=!this.ready;if(!fire_updates)if(compare3)fire_updates=!compare3(value,this.value);else{let comparison=safe_compare2(value,this.value);fire_updates=!comparison[0]||!comparison[1]}if(fire_updates){var _this$dependency2;if(this.ready=!0,this.error=void 0,this.value=value,this._debug_turned_key=void 0,(_this$dependency2=this.dependency)==null||_this$dependency2.invalidate(),this.listeners)for(let handler of this.listeners)try{handler(this.value)}catch(err){log(ensure_bubble_error(err))}}else this.value=value}else{var _this$ready_keys;if(this.ready&&this.not_ready_listeners)for(let handler of this.not_ready_listeners)try{handler()}catch(err){log(ensure_bubble_error(err))}this.ready=!1,this.value=void 0,this.error=void 0,(_this$ready_keys=this.ready_keys)!=null||(this.ready_keys=MakeKeyList2()),this.ready_keys.remove_all();for(let key of my_not_ready_catcher)key.is_turned()?this._debug_turned_key=key:this.ready_keys.add_key(key)}}build_wrapped_autorun(watcher_test){let wrapped_autorun={id:LUID(),_subs:[],invalidate:()=>{if(this.ready_keys&&!this.ready_keys.is_turned()){this.ready_keys.turned_dependency().register(wrapped_autorun);return}wrapped_autorun.invalidate=function(){},wrapped_autorun.destroy(),running_test()&&!watcher_test?wrapped_autorun.run_me():(on_server()&&warn("invalidating watcher on server",{keys:String(this.ready_keys)}),schedule2(wrapped_autorun),this._is_scheduled=wrapped_autorun)},add_sub:sub=>{wrapped_autorun._subs.push(sub)},destroy_subs(){for(let sub of wrapped_autorun._subs)sub.destroy();wrapped_autorun._subs=[]},_is_destroyed:!1,destroy:()=>{wrapped_autorun._is_destroyed=!0,wrapped_autorun.destroy_subs()},run_me:()=>{wrapped_autorun.run_me=function(){},wrapped_autorun===this._is_scheduled&&(this._is_scheduled=void 0),this.evaluate()},dont_track_scheduling:this._dont_track_scheduling,stop_tracking:()=>{this.dont_track_scheduling()}};return wrapped_autorun}get_ready_key(){var _this$ready_keys2;return(_this$ready_keys2=this.ready_keys)!=null||(this.ready_keys=TransientKeyList2()),this.ready_keys}dont_track_scheduling(){this._dont_track_scheduling=!0,this._ar_object&&(this._ar_object.dont_track_scheduling=!0)}invalidate(){var _this$_ar_object2;return(_this$_ar_object2=this._ar_object)==null?void 0:_this$_ar_object2.invalidate()}max_expected_time(){var _this$ready_keys$max_,_this$ready_keys3;return(_this$ready_keys$max_=(_this$ready_keys3=this.ready_keys)==null?void 0:_this$ready_keys3.max_expected_time())!=null?_this$ready_keys$max_:null}get_current(){var _this$_is_scheduled,_this$dependency3;let no_throw=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if((_this$_is_scheduled=this._is_scheduled)==null||_this$_is_scheduled.run_me(),(_this$dependency3=this.dependency)==null||_this$dependency3.register(),this.error!=null){if(no_throw)return[null,null,this.error];throw this.error}return this.ready?[this.ready,this.value]:[this.ready,this.ready_keys]}get_current_status(){return this.error!=null?{status:"error",error:this.error}:this.ready?{status:"ready",value:this.value}:{status:"not_ready",ready_keys:this.ready_keys}}get_current_status_array(){return this.error!=null?[this.error]:this.ready?[null,this.ready,this.value]:[null,this.ready,this.ready_keys]}get(){var _this$_is_scheduled2,_this$dependency6;if((_this$_is_scheduled2=this._is_scheduled)==null||_this$_is_scheduled2.run_me(),this.error!=null){var _this$dependency4;throw(_this$dependency4=this.dependency)==null||_this$dependency4.register(),this.error}if(!this.ready){var _this$dependency5;ensure_ready2(this.ready_keys,!1),this.evaluate();let value=this.get();return(_this$dependency5=this.dependency)==null||_this$dependency5.register(),value}return(_this$dependency6=this.dependency)==null||_this$dependency6.register(),this.value}on_value(handler){var _this$listeners;if((_this$listeners=this.listeners)!=null||(this.listeners=new Set),this.listeners.add(handler),this.error!=null)log(this.error);else if(this.ready)try{handler(this.value)}catch(err){log(ensure_bubble_error(err))}}on_condition(condition,handler){let passes_condition;typeof condition=="function"?passes_condition=condition:passes_condition=val=>val===condition,this.on_value(val=>{passes_condition(val)&&handler(val)})}on_not_ready(handler){var _this$not_ready_liste;if((_this$not_ready_liste=this.not_ready_listeners)!=null||(this.not_ready_listeners=new Set),this.not_ready_listeners.add(handler),!this.ready)try{handler()}catch(err){log(ensure_bubble_error(err))}}on_error(handler){var _this$error_listeners;if((_this$error_listeners=this.error_listeners)!=null||(this.error_listeners=new Set),this.error_listeners.add(handler),this.error!=null)try{handler(this.error)}catch(err){log(ensure_bubble_error(err))}}once_error(handler){let new_handler=err=>{var _this$error_listeners2;(_this$error_listeners2=this.error_listeners)==null||_this$error_listeners2.delete(new_handler),handler(err)};this.on_error(new_handler)}once_value(handler){let new_handler=val=>{var _this$listeners2;(_this$listeners2=this.listeners)==null||_this$listeners2.delete(new_handler),handler(val)};this.on_value(new_handler)}once_condition(condition,handler){let passes_condition;typeof condition=="function"?passes_condition=condition:passes_condition=val=>val===condition;let new_handler=val=>{if(passes_condition(val)){var _this$listeners3;(_this$listeners3=this.listeners)==null||_this$listeners3.delete(new_handler),handler(val)}};this.on_value(new_handler)}once_change(handler){var _this$listeners4;(_this$listeners4=this.listeners)!=null||(this.listeners=new Set);let new_handler=val=>{var _this$listeners5;(_this$listeners5=this.listeners)==null||_this$listeners5.delete(new_handler),handler(val)};this.listeners.add(new_handler)}destroy(){var _this$ready_keys4,_this$_ar_object3,_this$cleanup2;this.listeners=void 0,this.not_ready_listeners=void 0,this.error_listeners=void 0,this.dependency=void 0,(_this$ready_keys4=this.ready_keys)==null||_this$ready_keys4.destroy(),this.ready_keys=void 0,this.evaluate=function(){},this._is_scheduled=void 0,(_this$_ar_object3=this._ar_object)==null||_this$_ar_object3.destroy(),this._ar_object=void 0,(_this$cleanup2=this.cleanup)==null||_this$cleanup2.call(this),this.cleanup=void 0}},AlwaysErrorWatcher2=new WatcherClass(()=>{throw new UnexpectedError("This watcher cannot be accessed")},{log_errors:!1});FakeWatcherClass2=class{constructor(data){this.data=void 0,this.data=data}get_ready_key(){return FakeKey2()}dont_track_scheduling(){}max_expected_time(){return null}invalidate(){}get_current(){return[!0,this.data]}get_current_status(){return{status:"ready",value:this.data}}get_current_status_array(){return[null,!0,this.data]}get(){return this.data}on_value(handler){handler(this.data)}on_error(){}on_not_ready(){}once_error(){}once_value(handler){handler(this.data)}once_change(){}on_condition(condition,handler){(condition===this.data||typeof condition=="function"&&condition(this.data))&&handler(this.data)}once_condition(condition,handler){this.on_condition(condition,handler)}destroy(){}},wait_for_updates_keys=MakeKeyList2();Autorun2=class{constructor(fn,cleanup){let run_once68=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this._is_destroyed=!1,this._subs=[],this._is_paused=!1,this._is_ancestor_paused=!1,this._run_on_unpause=!1,this.fn=void 0,this.cleanup=void 0,this.run_once=void 0,this.id=void 0,this.run_immediately=!1,this._is_running=!1,this._do_another_run=void 0,this._recursive_runs=void 0,this.dont_track_scheduling=!1,this.fn=fn,this.cleanup=cleanup,this.run_once=run_once68,this.id=LUID(),async_state_default2.CurrentAutoRun!=null&&async_state_default2.CurrentAutoRun.add_sub(this)}set_run_immediately(run_immediately){this.run_immediately=run_immediately}alive(){return!this._is_destroyed}invalidate(){if(!this._is_destroyed&&!this.run_once){if(_auto_run_to_watch===this&&error("Watched autorun just got invalidated"),this._is_paused||this._is_ancestor_paused){this._run_on_unpause=!0;return}if(this.run_immediately||on_server())if(this._is_running){if(this._do_another_run=!0,this._recursive_runs!=null&&this._recursive_runs>20)throw new UnexpectedError("recursive autorun run immediately loop")}else this.run_me();else schedule2(this)}}run_me(){if(this._is_destroyed)return this;if(this._is_paused||this._is_ancestor_paused)return this._run_on_unpause=!0,this;this.destroy_subs();let old_running=async_state_default2.CurrentAutoRun;async_state_default2.CurrentAutoRun=this;let old_not_ready_catcher=async_state_default2.CurrentNotReadyCatcher;async_state_default2.CurrentNotReadyCatcher=null,this._is_running=!0;try{this.fn()}catch(err){if(err instanceof NotReadyError&&err.not_ready_key!=null){let key=err.not_ready_key;!key.is_registered(this)&&err.suppress_dependency_error!==!0&&error("Unregistered key caught by autorun",{key:key.toString()})}else log(ensure_bubble_error(err))}finally{this._is_running=!1,async_state_default2.CurrentAutoRun=old_running,async_state_default2.CurrentNotReadyCatcher=old_not_ready_catcher}if(this._do_another_run===!0){var _this$_recursive_runs;this._do_another_run=!1,(_this$_recursive_runs=this._recursive_runs)!=null||(this._recursive_runs=0),this._recursive_runs++,this.run_me()}else delete this._recursive_runs;return this}destroy_subs(){for(let sub of this._subs)sub.destroy();this._subs=[]}destroy(){var _this$cleanup3;this._is_destroyed=!0,this.destroy_subs(),(_this$cleanup3=this.cleanup)==null||_this$cleanup3.call(this)}add_sub(sub){this._subs.push(sub)}stop_tracking(){this.dont_track_scheduling=!0}pause(){this._is_paused=!0,this._subs.forEach(pause_via_ancestor);function pause_via_ancestor(run){let already_paused=run._is_paused||run._is_ancestor_paused;run._is_ancestor_paused=!0,already_paused||run._subs.forEach(pause_via_ancestor)}}unpause(){this._is_paused=!1,run_or_unpause_subs(this);function run_or_unpause_subs(run){run._is_paused||run._is_ancestor_paused||(run._run_on_unpause?(run._run_on_unpause=!1,run.invalidate()):run._subs.forEach(sub=>{sub._is_ancestor_paused=!1,run_or_unpause_subs(sub)}))}}};MockAutoRun2=class{constructor(){this.wr=void 0,this.id=void 0,this._is_destroyed=void 0,this.wr=!1,this.id=LUID(),this._is_destroyed=!1}add_sub(sub){}stop_tracking(){}will_run(){return this.wr}invalidate(){this.wr=!0}destroy(){}},scheduled_key2=MakeSwitch2(void 0,"autorun.scheduled_key");scheduled_key2.turn_on();schedule2=function(){let to_run2={},_is_scheduled=!1,microtask_count=0,_running_autoruns=!1,MAX_MICROTASKS=is_edit_mode()?0:100;function ensure_scheduled(){if(!_is_scheduled)if(_is_scheduled=!0,microtask_count++,_running_autoruns)microtask_count<=MAX_MICROTASKS?queueMicrotask(run_scheduled2):(setTimeout(run_scheduled2,1),microtask_count=0);else{var _window5,_window$requestAnimat;(_window5=window)==null||(_window$requestAnimat=_window5.requestAnimationFrame)==null||_window$requestAnimat.call(_window5,run_scheduled2),setTimeout(run_scheduled2)}}function run_scheduled2(){let span_details=SPANS.autorun_scheduled;traceSpan2(span_details.name,span_details.type,()=>_run_scheduled())}function _run_scheduled(){_is_scheduled=!1,_running_autoruns=!0;let run_list=Object.values(to_run2);to_run2={};for(let run of run_list)run.run_me();_running_autoruns=!1,_is_scheduled||(setTimeout(()=>{_is_scheduled||scheduled_key2.turn_on()},1),microtask_count=0)}return function(run){to_run2[run.id]=run,run.dont_track_scheduling||scheduled_key2.turn_off(),ensure_scheduled()}}();BoxClass2=class{constructor(state4){this.state=void 0,this.dependency=void 0,this.is_not_ready=void 0,this.not_ready_switch=void 0,this.state=state4,this.dependency=Dependency2(),this.is_not_ready=!1}not_ready(){var _this$not_ready_switc;this.is_not_ready=!0,(_this$not_ready_switc=this.not_ready_switch)!=null||(this.not_ready_switch=MakeSwitch2(void 0,"autorun.Box not_ready_switch")),this.not_ready_switch.turn_off()}val(new_val,not_ready){if(not_ready===!0)this.not_ready();else{if(new_val===void 0)return this.get();this.set(new_val)}}dangerously_peek(){return this.state}get(){return this.is_not_ready&&ensure_ready2(this.not_ready_switch),this.dependency.register(),this.state}set(new_val){compare(this.state,new_val)||(this.state=new_val,this.dependency.invalidate()),this.is_not_ready&&(this.is_not_ready=!1,this.not_ready_switch.turn_on())}to_promise(){if(this.is_not_ready){let promise=Promise4(null,this.not_ready_switch);return WaitFor2(this.not_ready_switch,()=>promise.resolve(this.state)),promise}else return Promise4(this.state)}}}});var require_autorun=__commonJS({"lib-browser/u/shared/async/autorun.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(init_newautorun(),__toCommonJS(newautorun_exports)).enable_new_autorun?module2.exports=(init_autorun(),__toCommonJS(autorun_exports)):module2.exports=(init_autorun2(),__toCommonJS(autorun_exports2))}});function with_fiber_notifier(notify,fn){let old_notify=Fiber.current._u_with_fiber_notifier;Fiber.current._u_with_fiber_notifier=notify;try{return fn()}finally{Fiber.current._u_with_fiber_notifier=old_notify}}function no_fiber_notifier(fn){function notify(){}return with_fiber_notifier(notify,fn)}function publish_fiber_notification(notification){var _b_fiber$Fiber$curren,_b_fiber$Fiber$curren2;(_b_fiber$Fiber$curren=Fiber.current)==null||(_b_fiber$Fiber$curren2=_b_fiber$Fiber$curren._u_with_fiber_notifier)==null||_b_fiber$Fiber$curren2.call(_b_fiber$Fiber$curren,notification)}function notification_capturer(fn){let captured=[],res=with_fiber_notifier(notification=>captured.push(notification),fn);function rethrower(){for(let notification of captured)publish_fiber_notification(notification)}return[res,rethrower]}function with_flush_caches(fn){let old_flush=Fiber.current._u_with_flush_caches;Fiber.current._u_with_flush_caches=!0;try{return fn()}finally{Fiber.current._u_with_flush_caches=old_flush}}var import_web_dom_collections_iterator29,flushing_caches,init_server_notifications=__esm({"lib-browser/u/server/server_notifications.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator29=__toESM(require_web_dom_collections_iterator());init_b_fiber();flushing_caches=()=>Fiber.current._u_with_flush_caches}});function autorun_cache(fn_or_options){let fn,options;typeof fn_or_options=="function"?(fn=fn_or_options,options={}):(options=fn_or_options,fn=fn_or_options.fn);let watchers2={},server_key_unique=LUID();return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];if(args.length>3)throw new UnexpectedError("autorun_cache only supports 3 args right now");let arg_array=args.slice(0,3);has_unique_string(this)&&arg_array.push(this);for(let i=0;i<arg_array.length;i++){let a=arg_array[i];if(has_unique_string(a)&&(a=a.toUniqueString()),typeof a=="string"&&(a='"'+a),a!=null&&typeof a=="object")throw new UnexpectedError("passed in object to autorun_cache",{the_object:a});arg_array[i]=a}let key=arg_array.join(" ");if(on_server()){var _b_fiber$Fiber,_target$__server_auto,_target$__server_auto2,_target$__server_auto3;let target=(_b_fiber$Fiber=Fiber)==null?void 0:_b_fiber$Fiber.current;if(target==null)return fn.call(this,...args);let appname=target.running_appname,app_version=target.running_app_version,app_key=`${server_key_unique}${appname}_${app_version}`;(_target$__server_auto=target.__server_autorun_cache)!=null||(target.__server_autorun_cache={}),(_target$__server_auto3=(_target$__server_auto2=target.__server_autorun_cache)[app_key])!=null||(_target$__server_auto2[app_key]=new LRU({max:1e3,length(){return 1}}));let my_fiber_cache=target.__server_autorun_cache[app_key],stored;if(my_fiber_cache.has(key))stored=my_fiber_cache.get(key);else{let[res,rethrower]=notification_capturer(()=>fn.call(this,...args));stored={res,rethrower},my_fiber_cache.set(key,stored)}return stored.rethrower(),stored.res}else{let watcher=watchers2[key];return watcher==="evaluating"?fn.call(this,...args):(watcher==null&&(watchers2[key]="evaluating",watchers2[key]=watcher=(0,import_autorun.Watcher)({fn:()=>fn.call(this,...args),compare:options.compare_fn})),watcher.get())}}}var import_web_dom_collections_iterator30,import_autorun,init_autorun_cache=__esm({"lib-browser/u/shared/async/autorun_cache.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator30=__toESM(require_web_dom_collections_iterator()),import_autorun=__toESM(require_autorun());init_errors();init_b_fiber();init_mode_check();init_server_notifications();init_uuid();init_b_object();init_loggable()}});var require_dependency=__commonJS({"lib-browser/u/shared/async/dependency.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(init_newautorun(),__toCommonJS(newautorun_exports)).enable_new_autorun?module2.exports=(init_dependency(),__toCommonJS(dependency_exports)):module2.exports=(init_dependency2(),__toCommonJS(dependency_exports2))}});var require_spark_md5=__commonJS({"node_modules/spark-md5/spark-md5.js"(exports3,module2){init_define_process_env();init_shim();(function(factory){if(typeof exports3=="object")module2.exports=factory();else if(typeof define=="function"&&define.amd)define(factory);else{var glob;try{glob=window}catch{glob=self}glob.SparkMD5=factory()}})(function(undefined2){"use strict";var add32=function(a,b){return a+b&4294967295},hex_chr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function cmn(q,a,b,x,s,t){return a=add32(add32(a,q),add32(x,t)),add32(a<<s|a>>>32-s,b)}function md5cycle(x,k){var a=x[0],b=x[1],c=x[2],d=x[3];a+=(b&c|~b&d)+k[0]-680876936|0,a=(a<<7|a>>>25)+b|0,d+=(a&b|~a&c)+k[1]-389564586|0,d=(d<<12|d>>>20)+a|0,c+=(d&a|~d&b)+k[2]+606105819|0,c=(c<<17|c>>>15)+d|0,b+=(c&d|~c&a)+k[3]-1044525330|0,b=(b<<22|b>>>10)+c|0,a+=(b&c|~b&d)+k[4]-176418897|0,a=(a<<7|a>>>25)+b|0,d+=(a&b|~a&c)+k[5]+1200080426|0,d=(d<<12|d>>>20)+a|0,c+=(d&a|~d&b)+k[6]-1473231341|0,c=(c<<17|c>>>15)+d|0,b+=(c&d|~c&a)+k[7]-45705983|0,b=(b<<22|b>>>10)+c|0,a+=(b&c|~b&d)+k[8]+1770035416|0,a=(a<<7|a>>>25)+b|0,d+=(a&b|~a&c)+k[9]-1958414417|0,d=(d<<12|d>>>20)+a|0,c+=(d&a|~d&b)+k[10]-42063|0,c=(c<<17|c>>>15)+d|0,b+=(c&d|~c&a)+k[11]-1990404162|0,b=(b<<22|b>>>10)+c|0,a+=(b&c|~b&d)+k[12]+1804603682|0,a=(a<<7|a>>>25)+b|0,d+=(a&b|~a&c)+k[13]-40341101|0,d=(d<<12|d>>>20)+a|0,c+=(d&a|~d&b)+k[14]-1502002290|0,c=(c<<17|c>>>15)+d|0,b+=(c&d|~c&a)+k[15]+1236535329|0,b=(b<<22|b>>>10)+c|0,a+=(b&d|c&~d)+k[1]-165796510|0,a=(a<<5|a>>>27)+b|0,d+=(a&c|b&~c)+k[6]-1069501632|0,d=(d<<9|d>>>23)+a|0,c+=(d&b|a&~b)+k[11]+643717713|0,c=(c<<14|c>>>18)+d|0,b+=(c&a|d&~a)+k[0]-373897302|0,b=(b<<20|b>>>12)+c|0,a+=(b&d|c&~d)+k[5]-701558691|0,a=(a<<5|a>>>27)+b|0,d+=(a&c|b&~c)+k[10]+38016083|0,d=(d<<9|d>>>23)+a|0,c+=(d&b|a&~b)+k[15]-660478335|0,c=(c<<14|c>>>18)+d|0,b+=(c&a|d&~a)+k[4]-405537848|0,b=(b<<20|b>>>12)+c|0,a+=(b&d|c&~d)+k[9]+568446438|0,a=(a<<5|a>>>27)+b|0,d+=(a&c|b&~c)+k[14]-1019803690|0,d=(d<<9|d>>>23)+a|0,c+=(d&b|a&~b)+k[3]-187363961|0,c=(c<<14|c>>>18)+d|0,b+=(c&a|d&~a)+k[8]+1163531501|0,b=(b<<20|b>>>12)+c|0,a+=(b&d|c&~d)+k[13]-1444681467|0,a=(a<<5|a>>>27)+b|0,d+=(a&c|b&~c)+k[2]-51403784|0,d=(d<<9|d>>>23)+a|0,c+=(d&b|a&~b)+k[7]+1735328473|0,c=(c<<14|c>>>18)+d|0,b+=(c&a|d&~a)+k[12]-1926607734|0,b=(b<<20|b>>>12)+c|0,a+=(b^c^d)+k[5]-378558|0,a=(a<<4|a>>>28)+b|0,d+=(a^b^c)+k[8]-2022574463|0,d=(d<<11|d>>>21)+a|0,c+=(d^a^b)+k[11]+1839030562|0,c=(c<<16|c>>>16)+d|0,b+=(c^d^a)+k[14]-35309556|0,b=(b<<23|b>>>9)+c|0,a+=(b^c^d)+k[1]-1530992060|0,a=(a<<4|a>>>28)+b|0,d+=(a^b^c)+k[4]+1272893353|0,d=(d<<11|d>>>21)+a|0,c+=(d^a^b)+k[7]-155497632|0,c=(c<<16|c>>>16)+d|0,b+=(c^d^a)+k[10]-1094730640|0,b=(b<<23|b>>>9)+c|0,a+=(b^c^d)+k[13]+681279174|0,a=(a<<4|a>>>28)+b|0,d+=(a^b^c)+k[0]-358537222|0,d=(d<<11|d>>>21)+a|0,c+=(d^a^b)+k[3]-722521979|0,c=(c<<16|c>>>16)+d|0,b+=(c^d^a)+k[6]+76029189|0,b=(b<<23|b>>>9)+c|0,a+=(b^c^d)+k[9]-640364487|0,a=(a<<4|a>>>28)+b|0,d+=(a^b^c)+k[12]-421815835|0,d=(d<<11|d>>>21)+a|0,c+=(d^a^b)+k[15]+530742520|0,c=(c<<16|c>>>16)+d|0,b+=(c^d^a)+k[2]-995338651|0,b=(b<<23|b>>>9)+c|0,a+=(c^(b|~d))+k[0]-198630844|0,a=(a<<6|a>>>26)+b|0,d+=(b^(a|~c))+k[7]+1126891415|0,d=(d<<10|d>>>22)+a|0,c+=(a^(d|~b))+k[14]-1416354905|0,c=(c<<15|c>>>17)+d|0,b+=(d^(c|~a))+k[5]-57434055|0,b=(b<<21|b>>>11)+c|0,a+=(c^(b|~d))+k[12]+1700485571|0,a=(a<<6|a>>>26)+b|0,d+=(b^(a|~c))+k[3]-1894986606|0,d=(d<<10|d>>>22)+a|0,c+=(a^(d|~b))+k[10]-1051523|0,c=(c<<15|c>>>17)+d|0,b+=(d^(c|~a))+k[1]-2054922799|0,b=(b<<21|b>>>11)+c|0,a+=(c^(b|~d))+k[8]+1873313359|0,a=(a<<6|a>>>26)+b|0,d+=(b^(a|~c))+k[15]-30611744|0,d=(d<<10|d>>>22)+a|0,c+=(a^(d|~b))+k[6]-1560198380|0,c=(c<<15|c>>>17)+d|0,b+=(d^(c|~a))+k[13]+1309151649|0,b=(b<<21|b>>>11)+c|0,a+=(c^(b|~d))+k[4]-145523070|0,a=(a<<6|a>>>26)+b|0,d+=(b^(a|~c))+k[11]-1120210379|0,d=(d<<10|d>>>22)+a|0,c+=(a^(d|~b))+k[2]+718787259|0,c=(c<<15|c>>>17)+d|0,b+=(d^(c|~a))+k[9]-343485551|0,b=(b<<21|b>>>11)+c|0,x[0]=a+x[0]|0,x[1]=b+x[1]|0,x[2]=c+x[2]|0,x[3]=d+x[3]|0}function md5blk(s){var md5blks=[],i;for(i=0;i<64;i+=4)md5blks[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24);return md5blks}function md5blk_array(a){var md5blks=[],i;for(i=0;i<64;i+=4)md5blks[i>>2]=a[i]+(a[i+1]<<8)+(a[i+2]<<16)+(a[i+3]<<24);return md5blks}function md51(s){var n=s.length,state4=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64)md5cycle(state4,md5blk(s.substring(i-64,i)));for(s=s.substring(i-64),length=s.length,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0;i<length;i+=1)tail[i>>2]|=s.charCodeAt(i)<<(i%4<<3);if(tail[i>>2]|=128<<(i%4<<3),i>55)for(md5cycle(state4,tail),i=0;i<16;i+=1)tail[i]=0;return tmp=n*8,tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/),lo=parseInt(tmp[2],16),hi=parseInt(tmp[1],16)||0,tail[14]=lo,tail[15]=hi,md5cycle(state4,tail),state4}function md51_array(a){var n=a.length,state4=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64)md5cycle(state4,md5blk_array(a.subarray(i-64,i)));for(a=i-64<n?a.subarray(i-64):new Uint8Array(0),length=a.length,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0;i<length;i+=1)tail[i>>2]|=a[i]<<(i%4<<3);if(tail[i>>2]|=128<<(i%4<<3),i>55)for(md5cycle(state4,tail),i=0;i<16;i+=1)tail[i]=0;return tmp=n*8,tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/),lo=parseInt(tmp[2],16),hi=parseInt(tmp[1],16)||0,tail[14]=lo,tail[15]=hi,md5cycle(state4,tail),state4}function rhex(n){var s="",j2;for(j2=0;j2<4;j2+=1)s+=hex_chr[n>>j2*8+4&15]+hex_chr[n>>j2*8&15];return s}function hex(x){var i;for(i=0;i<x.length;i+=1)x[i]=rhex(x[i]);return x.join("")}hex(md51("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(add32=function(x,y){var lsw=(x&65535)+(y&65535),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function clamp(val,length){return val=val|0||0,val<0?Math.max(val+length,0):Math.min(val,length)}ArrayBuffer.prototype.slice=function(from,to){var length=this.byteLength,begin=clamp(from,length),end2=length,num,target,targetArray,sourceArray;return to!==undefined2&&(end2=clamp(to,length)),begin>end2?new ArrayBuffer(0):(num=end2-begin,target=new ArrayBuffer(num),targetArray=new Uint8Array(target),sourceArray=new Uint8Array(this,begin,num),targetArray.set(sourceArray),target)}}();function toUtf8(str){return/[\u0080-\uFFFF]/.test(str)&&(str=unescape(encodeURIComponent(str))),str}function utf8Str2ArrayBuffer(str,returnUInt8Array){var length=str.length,buff=new ArrayBuffer(length),arr=new Uint8Array(buff),i;for(i=0;i<length;i+=1)arr[i]=str.charCodeAt(i);return returnUInt8Array?arr:buff}function arrayBuffer2Utf8Str(buff){return String.fromCharCode.apply(null,new Uint8Array(buff))}function concatenateArrayBuffers(first,second,returnUInt8Array){var result=new Uint8Array(first.byteLength+second.byteLength);return result.set(new Uint8Array(first)),result.set(new Uint8Array(second),first.byteLength),returnUInt8Array?result:result.buffer}function hexToBinaryString(hex2){var bytes3=[],length=hex2.length,x;for(x=0;x<length-1;x+=2)bytes3.push(parseInt(hex2.substr(x,2),16));return String.fromCharCode.apply(String,bytes3)}function SparkMD53(){this.reset()}return SparkMD53.prototype.append=function(str){return this.appendBinary(toUtf8(str)),this},SparkMD53.prototype.appendBinary=function(contents){this._buff+=contents,this._length+=contents.length;var length=this._buff.length,i;for(i=64;i<=length;i+=64)md5cycle(this._hash,md5blk(this._buff.substring(i-64,i)));return this._buff=this._buff.substring(i-64),this},SparkMD53.prototype.end=function(raw){var buff=this._buff,length=buff.length,i,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ret;for(i=0;i<length;i+=1)tail[i>>2]|=buff.charCodeAt(i)<<(i%4<<3);return this._finish(tail,length),ret=hex(this._hash),raw&&(ret=hexToBinaryString(ret)),this.reset(),ret},SparkMD53.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},SparkMD53.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},SparkMD53.prototype.setState=function(state4){return this._buff=state4.buff,this._length=state4.length,this._hash=state4.hash,this},SparkMD53.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},SparkMD53.prototype._finish=function(tail,length){var i=length,tmp,lo,hi;if(tail[i>>2]|=128<<(i%4<<3),i>55)for(md5cycle(this._hash,tail),i=0;i<16;i+=1)tail[i]=0;tmp=this._length*8,tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/),lo=parseInt(tmp[2],16),hi=parseInt(tmp[1],16)||0,tail[14]=lo,tail[15]=hi,md5cycle(this._hash,tail)},SparkMD53.hash=function(str,raw){return SparkMD53.hashBinary(toUtf8(str),raw)},SparkMD53.hashBinary=function(content,raw){var hash2=md51(content),ret=hex(hash2);return raw?hexToBinaryString(ret):ret},SparkMD53.ArrayBuffer=function(){this.reset()},SparkMD53.ArrayBuffer.prototype.append=function(arr){var buff=concatenateArrayBuffers(this._buff.buffer,arr,!0),length=buff.length,i;for(this._length+=arr.byteLength,i=64;i<=length;i+=64)md5cycle(this._hash,md5blk_array(buff.subarray(i-64,i)));return this._buff=i-64<length?new Uint8Array(buff.buffer.slice(i-64)):new Uint8Array(0),this},SparkMD53.ArrayBuffer.prototype.end=function(raw){var buff=this._buff,length=buff.length,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,ret;for(i=0;i<length;i+=1)tail[i>>2]|=buff[i]<<(i%4<<3);return this._finish(tail,length),ret=hex(this._hash),raw&&(ret=hexToBinaryString(ret)),this.reset(),ret},SparkMD53.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},SparkMD53.ArrayBuffer.prototype.getState=function(){var state4=SparkMD53.prototype.getState.call(this);return state4.buff=arrayBuffer2Utf8Str(state4.buff),state4},SparkMD53.ArrayBuffer.prototype.setState=function(state4){return state4.buff=utf8Str2ArrayBuffer(state4.buff,!0),SparkMD53.prototype.setState.call(this,state4)},SparkMD53.ArrayBuffer.prototype.destroy=SparkMD53.prototype.destroy,SparkMD53.ArrayBuffer.prototype._finish=SparkMD53.prototype._finish,SparkMD53.ArrayBuffer.hash=function(arr,raw){var hash2=md51_array(new Uint8Array(arr)),ret=hex(hash2);return raw?hexToBinaryString(ret):ret},SparkMD53})}});var import_spark_md5,create_hash,init_create_hash=__esm({"lib-browser/u/shared/create_hash.js"(){"use strict";init_define_process_env();init_shim();import_spark_md5=__toESM(require_spark_md5());create_hash=()=>{let hash2=new import_spark_md5.default;return{update:text2=>{hash2.append(text2)},digest:()=>hash2.end()}}}});function digest(text2,encoding){var _encoding;(_encoding=encoding)!=null||(encoding="utf8");let hasher=create_hash("md5");return hasher.update(text2,encoding),hasher.digest("hex")}function incremental_digest(obj){let hasher=create_hash("md5"),steps=0,visited=new Set;function add4(obj2){if(steps+=1,steps%100===0&&optional_pause("add incremental digest"),!visited.has(obj2)){if(obj2!=null&&typeof obj2=="object"){if(visited.add(obj2),on_server()&&import_buffer.Buffer.isBuffer(obj2)){hasher.update(obj2);return}hasher.update("os|","utf8"),obj2 instanceof Date&&hasher.update("d|"+String(obj2));for(let k in obj2){let v=obj2[k];hasher.update(k+"|","utf8"),add4(v)}hasher.update("|oe","utf8");return}typeof obj2=="string"?hasher.update("s|"+obj2.replace(/\|/g,"||")):hasher.update("r|"+String(obj2))}}return add4(obj),hasher.digest("hex")}var import_web_dom_collections_iterator31,import_es_string_replace10,init_hash=__esm({"lib-browser/u/shared/hash.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator31=__toESM(require_web_dom_collections_iterator()),import_es_string_replace10=__toESM(require_es_string_replace());init_create_hash();init_b_fiber();init_mode_check()}});var all_page_errors,init_test_state=__esm({"lib-browser/u/client/test_state.js"(){"use strict";init_define_process_env();init_shim();all_page_errors=[]}});var u_exports={};__export(u_exports,{BubbleError:()=>BubbleError,ClientError:()=>ClientError,DEFAULT_PRECISION:()=>DEFAULT_PRECISION,DeprecatedVersionError:()=>DeprecatedVersionError,ERROR_LEVELS:()=>ERROR_LEVELS,ExpectedError:()=>ExpectedError,FirstLetterCapitalize:()=>FirstLetterCapitalize,HexToNumber:()=>HexToNumber,LUID:()=>LUID,LinkedList:()=>LinkedList,MAX_OBJECT_KEYS:()=>MAX_OBJECT_KEYS,MobileDeployError:()=>MobileDeployError,NotFound:()=>NotFound,NotReadyError:()=>NotReadyError,NumberToHex:()=>NumberToHex,OfflineError:()=>OfflineError,OwnerError:()=>OwnerError,RGBA_to_ARGB:()=>RGBA_to_ARGB,RGBA_to_RGB:()=>RGBA_to_RGB,RGBToHex:()=>RGBToHex,Random:()=>Random,Redirect:()=>Redirect,StripePaymentRequiresAction:()=>StripePaymentRequiresAction,TimeoutLinkedList:()=>TimeoutLinkedList,UUID:()=>UUID,UUID_SEED:()=>UUID_SEED,UnarchivingMessage:()=>UnarchivingMessage,Unauthorized:()=>Unauthorized,UnauthorizedEmployee:()=>UnauthorizedEmployee,UnexpectedError:()=>UnexpectedError,UnexpectedPostgresError:()=>UnexpectedPostgresError,UsageLimitAction:()=>UsageLimitAction,UsageLimitError:()=>UsageLimitError,UserError:()=>UserError,add_finish_cb_to_vimeo:()=>add_finish_cb_to_vimeo,add_source_appname_tracker:()=>add_source_appname_tracker,add_source_appname_tracker_to_change_args:()=>add_source_appname_tracker_to_change_args,add_thousand_sep:()=>add_thousand_sep,add_thousand_sep_locale:()=>add_thousand_sep_locale,all_keys:()=>all_keys,all_page_errors:()=>all_page_errors,all_transition_names:()=>allTransitionNames,apply_css_fallbacks:()=>apply_css_fallbacks,apply_scale:()=>apply_scale,approve_global_clipboard:()=>approve_global_clipboard,are_animations_running:()=>are_animations_running,array_remove:()=>array_remove,array_replace:()=>array_replace,assertNever:()=>assertNever,autorun_cache:()=>autorun_cache,base64:()=>base642,base64decode:()=>base64decode2,bbcode_to_html:()=>bbcode_to_html,build_key_combo_string:()=>build_key_combo_string,capture_stack:()=>capture_stack,cast_to_string:()=>cast_to_string,charCode:()=>charCode,clean_args:()=>clean_args,clipboard_script:()=>clipboard_script,compact_hours:()=>compact_hours,compact_memory:()=>compact_memory,compact_number:()=>compact_number,compare:()=>compare,console_with_styling:()=>console_with_styling,contains_uuid_regexp:()=>contains_uuid_regexp,convert_mask_to_moment:()=>convert_mask_to_moment,cookies_enabled:()=>cookies_enabled,copy_on_click:()=>copy_on_click,count:()=>count,createCookie:()=>createCookie,create_compound_key:()=>create_compound_key,create_css_class_from_label:()=>create_css_class_from_label,create_style_sheet:()=>create_style_sheet,csv_to_downloadable_file:()=>csv_to_downloadable_file,custom_transitions:()=>noBounceTransitions,custom_type_name:()=>custom_type_name2,date_math:()=>date_math,dec_to_string:()=>dec_to_string,decimal_to_percent:()=>decimal_to_percent,decode_key:()=>decode_key,deep_copy:()=>deep_copy,deep_freeze:()=>deep_freeze,delay:()=>delay,did_event_pass_through:()=>did_event_pass_through,digest:()=>digest,div:()=>div,eager_first_sentence_cut:()=>eager_first_sentence_cut,edit_mode_only:()=>edit_mode_only,encode_key:()=>encode_key,ends_with:()=>ends_with,ensure_bubble_error:()=>ensure_bubble_error,eraseCookie:()=>eraseCookie,error_append:()=>error_append,error_append_args:()=>error_append_args,errors:()=>errors_exports,escape:()=>escape3,escape_js_string:()=>escape_js_string,events:()=>client_storage_events,extend:()=>extend,extract_from_object:()=>extract_from_object,firebase_illegal:()=>firebase_illegal,firebase_remove_illegal:()=>firebase_remove_illegal,fixedEncodeURIComponent:()=>fixedEncodeURIComponent,flatten:()=>flatten,flushing_caches:()=>flushing_caches,format_bytes:()=>format_bytes,format_data_for_logging:()=>format_data_for_logging,format_date:()=>format_date,format_date_interval:()=>format_date_interval,format_date_short_based_on_locale:()=>format_date_short_based_on_locale,format_for_logging:()=>format_for_logging,from_json_client:()=>from_json_client,get_active_epoch:()=>get_active_epoch,get_all_cookies:()=>get_all_cookies,get_all_keys:()=>get_all_keys,get_columns_header:()=>get_columns_header,get_domain_components:()=>get_domain_components,get_element:()=>get_element,get_first_day_of_month:()=>get_first_day_of_month,get_last_day_of_month:()=>get_last_day_of_month,get_last_day_of_utc_month:()=>get_last_day_of_utc_month,get_previous_month_year:()=>get_previous_month_year,get_prior_midnight_utc_date:()=>get_prior_midnight_utc_date,get_prior_midnight_utc_ts:()=>get_prior_midnight_utc_ts,get_random_seed:()=>get_random_seed,get_sorted_object_by_values:()=>get_sorted_object_by_values,get_source_appname_from_data:()=>get_source_appname_from_data,get_status_code:()=>get_status_code,get_utc_tomorrow_midnight:()=>get_utc_tomorrow_midnight,get_uuid_seed:()=>get_uuid_seed,groupBy:()=>groupBy,handle_clipboard_message:()=>handle_clipboard_message,has_a_key:()=>has_a_key,has_bbcode:()=>has_bbcode,has_unique_string:()=>has_unique_string,hash_code:()=>hash_code,hexToRGB:()=>hexToRGB,hex_to_rgb:()=>hex_to_rgb,highlight_dom_changes:()=>highlight_dom_changes,human_readable_to_epoch:()=>human_readable_to_epoch,id_safe:()=>id_safe,img:()=>img,increment_filename:()=>increment_filename,incremental_digest:()=>incremental_digest,incremental_for_each:()=>incremental_for_each,incremental_for_each_2:()=>incremental_for_each_2,incremental_json_deep_copy:()=>incremental_json_deep_copy,incremental_json_length:()=>incremental_json_length,incremental_json_parse:()=>incremental_json_parse,incremental_json_stringify:()=>incremental_json_stringify,incremental_map:()=>incremental_map,initialize_global_clipboard:()=>initialize_global_clipboard,input:()=>input,isArrayLike:()=>isArrayLike2,isErrorLike:()=>isErrorLike,isScrolledIntoView:()=>isScrolledIntoView,is_UUID:()=>is_UUID,is_android:()=>is_android,is_attached:()=>is_attached,is_debug_mode:()=>is_debug_mode,is_edit_mode:()=>is_edit_mode,is_email:()=>is_email,is_empty:()=>is_empty,is_fixed:()=>is_fixed,is_fullscreen:()=>is_fullscreen,is_json:()=>is_json,is_maison:()=>is_maison,is_mapping_error:()=>is_mapping_error,is_on_mobile_or_tablet:()=>is_on_mobile_or_tablet,is_plugin_edit_mode:()=>is_plugin_edit_mode,is_record:()=>is_record,is_url:()=>is_url,is_url_safe:()=>is_url_safe,join_into_human_readable_list:()=>join_into_human_readable_list,json_deep_copy:()=>json_deep_copy,json_parse:()=>json_parse,json_stringify:()=>json_stringify,json_to_csv:()=>json_to_csv,jsx_element:()=>jsx_element,lighten_color:()=>lighten_color,lighten_rgb_color:()=>lighten_rgb_color,local_data_retrieve:()=>local_data_retrieve,local_data_store:()=>local_data_store,local_storage_get:()=>local_storage_get,local_storage_is_available:()=>local_storage_is_available,local_storage_put:()=>local_storage_put,local_storage_put_object:()=>local_storage_put_object,make_key_combo_listener:()=>make_key_combo_listener,make_new:()=>make_new,make_numeric:()=>make_numeric,make_zindex:()=>make_zindex,map_values:()=>map_values,maybe_add_source_appname_to_object:()=>maybe_add_source_appname_to_object,meta:()=>meta,mk_date:()=>mk_date,no_fiber_notifier:()=>no_fiber_notifier,no_runmode:()=>no_runmode,not_empty:()=>not_empty,notification_capturer:()=>notification_capturer,num_equals:()=>num_equals,on_client:()=>on_client,on_phonegap:()=>on_phonegap,on_react_native:()=>on_react_native,on_server:()=>on_server,on_worker:()=>on_worker,optional_pause_tick:()=>optional_pause_tick,page_is_loaded:()=>page_is_loaded,page_loaded_key:()=>page_loaded_key,partition:()=>partition,percent_to_decimal:()=>percent_to_decimal,pre_json:()=>pre_json,print_date_interval:()=>print_date_interval,publish_fiber_notification:()=>publish_fiber_notification,range:()=>range,range_right:()=>range_right,readCookie:()=>readCookie,real_inner_width:()=>real_inner_width,real_inner_width_slow:()=>real_inner_width_slow,real_inner_width_superfast:()=>real_inner_width_superfast,rebuild_cookies:()=>rebuild_cookies,remove_circular_references:()=>remove_circular_references,remove_control_characters:()=>remove_control_characters,remove_global_cursor:()=>remove_global_cursor,remove_invalid_from_num:()=>remove_invalid_from_num,replace_all:()=>replace_all,replace_spaces_with_hyphens:()=>replace_spaces_with_hyphens,require:()=>fakequire,require_moment:()=>require_moment2,revealInScreen:()=>revealInScreen,rgb_color_to_rgb_string:()=>rgb_color_to_rgb_string,rgb_to_hex:()=>rgb_to_hex,rgba_to_array:()=>rgba_to_array,round_all:()=>round_all,running_server:()=>running_server,running_test:()=>running_test,safe_contains:()=>safe_contains,scroll_freeze:()=>scroll_freeze,scroll_unfreeze:()=>scroll_unfreeze,searchNextIncrementalNumber:()=>searchNextIncrementalNumber,server_errors:()=>server_errors,session_storage:()=>session_storage,set_active_epoch:()=>set_active_epoch,set_error_hook:()=>set_error_hook,set_global_cursor:()=>set_global_cursor,set_running_server:()=>set_running_server,set_running_tests:()=>set_running_tests,short_uid:()=>short_uid,shuffle_array:()=>shuffle_array,smush:()=>smush,sort_array:()=>sort_array,sort_data_fields:()=>sort_data_fields,sort_obj:()=>sort_obj,span:()=>span,stableSort:()=>stableSort,stableSortLanguages:()=>stableSortLanguages,start_count:()=>start_count,starts_with:()=>starts_with,starts_with_number:()=>starts_with_number,starts_with_vowel:()=>starts_with_vowel,stop_count:()=>stop_count,string_contains:()=>string_contains,string_replace_range:()=>string_replace_range,stripFalsy:()=>stripFalsy,text:()=>text,text_contains:()=>text_contains,textarea:()=>textarea,throw_test_error:()=>throw_test_error,timestamp:()=>timestamp,toTitleCase:()=>toTitleCase,to_moment:()=>to_moment,to_num:()=>to_num,to_object:()=>to_object,to_owner_display:()=>to_owner_display,trigger_blur:()=>trigger_blur,truncate_text:()=>truncate_text,unescape:()=>unescape3,unique:()=>unique,velocity:()=>velocity,walk:()=>walk,with_fiber_notifier:()=>with_fiber_notifier,with_flush_caches:()=>with_flush_caches,with_pause_tick:()=>with_pause_tick,zip:()=>zip});var _buffer$base,_buffer,_buffer$base64decode,_buffer2,_server_errors,_server_errors2,_server_errors3,fakequire,buffer,server_errors,base642,base64decode2,ClientError,NotFound,Redirect,init_u=__esm({"lib-browser/u/u.js"(){"use strict";init_define_process_env();init_shim();init_mode_check();init_errors();init_b_window();init_b_object();init_b_array();init_b_date();init_b_number();init_b_search();init_b_string();init_b_ui();init_b_ui_editor();init_domain_parser();init_mode_check();init_timestamp();init_uuid();init_color();init_b_window();__reExport(u_exports,__toESM(require_b_async()));__reExport(u_exports,__toESM(require_autorun()));init_autorun_cache();__reExport(u_exports,__toESM(require_dependency()));init_client_storage();init_errors();init_hash();init_incremental();init_server_notifications();init_test_state();fakequire=__require;(on_server()||running_test())&&(buffer=fakequire("./shared/buffer"),server_errors=fakequire("./server/server_errors"));base642=(_buffer$base=(_buffer=buffer)==null?void 0:_buffer.base64)!=null?_buffer$base:base64,base64decode2=(_buffer$base64decode=(_buffer2=buffer)==null?void 0:_buffer2.base64decode)!=null?_buffer$base64decode:base64decode,ClientError=(_server_errors=server_errors)==null?void 0:_server_errors.ClientError,NotFound=(_server_errors2=server_errors)==null?void 0:_server_errors2.NotFound,Redirect=(_server_errors3=server_errors)==null?void 0:_server_errors3.Redirect}});var u_exports2={};__export(u_exports2,{BubbleError:()=>BubbleError,ClientError:()=>ClientError,DEFAULT_PRECISION:()=>DEFAULT_PRECISION,DeprecatedVersionError:()=>DeprecatedVersionError,ERROR_LEVELS:()=>ERROR_LEVELS,ExpectedError:()=>ExpectedError,FirstLetterCapitalize:()=>FirstLetterCapitalize,HexToNumber:()=>HexToNumber,LUID:()=>LUID,LinkedList:()=>LinkedList,MAX_OBJECT_KEYS:()=>MAX_OBJECT_KEYS,MobileDeployError:()=>MobileDeployError,NotFound:()=>NotFound,NotReadyError:()=>NotReadyError,NumberToHex:()=>NumberToHex,OfflineError:()=>OfflineError,OwnerError:()=>OwnerError,RGBA_to_ARGB:()=>RGBA_to_ARGB,RGBA_to_RGB:()=>RGBA_to_RGB,RGBToHex:()=>RGBToHex,Random:()=>Random,Redirect:()=>Redirect,StripePaymentRequiresAction:()=>StripePaymentRequiresAction,TimeoutLinkedList:()=>TimeoutLinkedList,UUID:()=>UUID,UUID_SEED:()=>UUID_SEED,UnarchivingMessage:()=>UnarchivingMessage,Unauthorized:()=>Unauthorized,UnauthorizedEmployee:()=>UnauthorizedEmployee,UnexpectedError:()=>UnexpectedError,UnexpectedPostgresError:()=>UnexpectedPostgresError,UsageLimitAction:()=>UsageLimitAction,UsageLimitError:()=>UsageLimitError,UserError:()=>UserError,add_finish_cb_to_vimeo:()=>add_finish_cb_to_vimeo,add_source_appname_tracker:()=>add_source_appname_tracker,add_source_appname_tracker_to_change_args:()=>add_source_appname_tracker_to_change_args,add_thousand_sep:()=>add_thousand_sep,add_thousand_sep_locale:()=>add_thousand_sep_locale,all_keys:()=>all_keys,all_page_errors:()=>all_page_errors,all_transition_names:()=>allTransitionNames,apply_css_fallbacks:()=>apply_css_fallbacks,apply_scale:()=>apply_scale,approve_global_clipboard:()=>approve_global_clipboard,are_animations_running:()=>are_animations_running,array_remove:()=>array_remove,array_replace:()=>array_replace,assertNever:()=>assertNever,autorun_cache:()=>autorun_cache,base64:()=>base642,base64decode:()=>base64decode2,bbcode_to_html:()=>bbcode_to_html,build_key_combo_string:()=>build_key_combo_string,capture_stack:()=>capture_stack,cast_to_string:()=>cast_to_string,charCode:()=>charCode,clean_args:()=>clean_args,clipboard_script:()=>clipboard_script,compact_hours:()=>compact_hours,compact_memory:()=>compact_memory,compact_number:()=>compact_number,compare:()=>compare,console_with_styling:()=>console_with_styling,contains_uuid_regexp:()=>contains_uuid_regexp,convert_mask_to_moment:()=>convert_mask_to_moment,cookies_enabled:()=>cookies_enabled,copy_on_click:()=>copy_on_click,count:()=>count,createCookie:()=>createCookie,create_compound_key:()=>create_compound_key,create_css_class_from_label:()=>create_css_class_from_label,create_style_sheet:()=>create_style_sheet,csv_to_downloadable_file:()=>csv_to_downloadable_file,custom_transitions:()=>noBounceTransitions,custom_type_name:()=>custom_type_name2,date_math:()=>date_math,dec_to_string:()=>dec_to_string,decimal_to_percent:()=>decimal_to_percent,decode_key:()=>decode_key,deep_copy:()=>deep_copy,deep_freeze:()=>deep_freeze,delay:()=>delay,did_event_pass_through:()=>did_event_pass_through,digest:()=>digest,div:()=>div,eager_first_sentence_cut:()=>eager_first_sentence_cut,edit_mode_only:()=>edit_mode_only,encode_key:()=>encode_key,ends_with:()=>ends_with,ensure_bubble_error:()=>ensure_bubble_error,eraseCookie:()=>eraseCookie,error_append:()=>error_append,error_append_args:()=>error_append_args,errors:()=>errors_exports,escape:()=>escape3,escape_js_string:()=>escape_js_string,events:()=>client_storage_events,extend:()=>extend,extract_from_object:()=>extract_from_object,firebase_illegal:()=>firebase_illegal,firebase_remove_illegal:()=>firebase_remove_illegal,fixedEncodeURIComponent:()=>fixedEncodeURIComponent,flatten:()=>flatten,flushing_caches:()=>flushing_caches,format_bytes:()=>format_bytes,format_data_for_logging:()=>format_data_for_logging,format_date:()=>format_date,format_date_interval:()=>format_date_interval,format_date_short_based_on_locale:()=>format_date_short_based_on_locale,format_for_logging:()=>format_for_logging,from_json_client:()=>from_json_client,get_active_epoch:()=>get_active_epoch,get_all_cookies:()=>get_all_cookies,get_all_keys:()=>get_all_keys,get_columns_header:()=>get_columns_header,get_domain_components:()=>get_domain_components,get_element:()=>get_element,get_first_day_of_month:()=>get_first_day_of_month,get_last_day_of_month:()=>get_last_day_of_month,get_last_day_of_utc_month:()=>get_last_day_of_utc_month,get_previous_month_year:()=>get_previous_month_year,get_prior_midnight_utc_date:()=>get_prior_midnight_utc_date,get_prior_midnight_utc_ts:()=>get_prior_midnight_utc_ts,get_random_seed:()=>get_random_seed,get_sorted_object_by_values:()=>get_sorted_object_by_values,get_source_appname_from_data:()=>get_source_appname_from_data,get_status_code:()=>get_status_code,get_utc_tomorrow_midnight:()=>get_utc_tomorrow_midnight,get_uuid_seed:()=>get_uuid_seed,groupBy:()=>groupBy,handle_clipboard_message:()=>handle_clipboard_message,has_a_key:()=>has_a_key,has_bbcode:()=>has_bbcode,has_unique_string:()=>has_unique_string,hash_code:()=>hash_code,hexToRGB:()=>hexToRGB,hex_to_rgb:()=>hex_to_rgb,highlight_dom_changes:()=>highlight_dom_changes,human_readable_to_epoch:()=>human_readable_to_epoch,id_safe:()=>id_safe,img:()=>img,increment_filename:()=>increment_filename,incremental_digest:()=>incremental_digest,incremental_for_each:()=>incremental_for_each,incremental_for_each_2:()=>incremental_for_each_2,incremental_json_deep_copy:()=>incremental_json_deep_copy,incremental_json_length:()=>incremental_json_length,incremental_json_parse:()=>incremental_json_parse,incremental_json_stringify:()=>incremental_json_stringify,incremental_map:()=>incremental_map,initialize_global_clipboard:()=>initialize_global_clipboard,input:()=>input,isArrayLike:()=>isArrayLike2,isErrorLike:()=>isErrorLike,isScrolledIntoView:()=>isScrolledIntoView,is_UUID:()=>is_UUID,is_android:()=>is_android,is_attached:()=>is_attached,is_debug_mode:()=>is_debug_mode,is_edit_mode:()=>is_edit_mode,is_email:()=>is_email,is_empty:()=>is_empty,is_fixed:()=>is_fixed,is_fullscreen:()=>is_fullscreen,is_json:()=>is_json,is_maison:()=>is_maison,is_mapping_error:()=>is_mapping_error,is_on_mobile_or_tablet:()=>is_on_mobile_or_tablet,is_plugin_edit_mode:()=>is_plugin_edit_mode,is_record:()=>is_record,is_url:()=>is_url,is_url_safe:()=>is_url_safe,join_into_human_readable_list:()=>join_into_human_readable_list,json_deep_copy:()=>json_deep_copy,json_parse:()=>json_parse,json_stringify:()=>json_stringify,json_to_csv:()=>json_to_csv,jsx_element:()=>jsx_element,lighten_color:()=>lighten_color,lighten_rgb_color:()=>lighten_rgb_color,local_data_retrieve:()=>local_data_retrieve,local_data_store:()=>local_data_store,local_storage_get:()=>local_storage_get,local_storage_is_available:()=>local_storage_is_available,local_storage_put:()=>local_storage_put,local_storage_put_object:()=>local_storage_put_object,make_key_combo_listener:()=>make_key_combo_listener,make_new:()=>make_new,make_numeric:()=>make_numeric,make_zindex:()=>make_zindex,map_values:()=>map_values,maybe_add_source_appname_to_object:()=>maybe_add_source_appname_to_object,meta:()=>meta,mk_date:()=>mk_date,no_fiber_notifier:()=>no_fiber_notifier,no_runmode:()=>no_runmode,not_empty:()=>not_empty,notification_capturer:()=>notification_capturer,num_equals:()=>num_equals,on_client:()=>on_client,on_phonegap:()=>on_phonegap,on_react_native:()=>on_react_native,on_server:()=>on_server,on_worker:()=>on_worker,optional_pause_tick:()=>optional_pause_tick,page_is_loaded:()=>page_is_loaded,page_loaded_key:()=>page_loaded_key,partition:()=>partition,percent_to_decimal:()=>percent_to_decimal,pre_json:()=>pre_json,print_date_interval:()=>print_date_interval,publish_fiber_notification:()=>publish_fiber_notification,range:()=>range,range_right:()=>range_right,readCookie:()=>readCookie,real_inner_width:()=>real_inner_width,real_inner_width_slow:()=>real_inner_width_slow,real_inner_width_superfast:()=>real_inner_width_superfast,rebuild_cookies:()=>rebuild_cookies,remove_circular_references:()=>remove_circular_references,remove_control_characters:()=>remove_control_characters,remove_global_cursor:()=>remove_global_cursor,remove_invalid_from_num:()=>remove_invalid_from_num,replace_all:()=>replace_all,replace_spaces_with_hyphens:()=>replace_spaces_with_hyphens,require:()=>fakequire,require_moment:()=>require_moment2,revealInScreen:()=>revealInScreen,rgb_color_to_rgb_string:()=>rgb_color_to_rgb_string,rgb_to_hex:()=>rgb_to_hex,rgba_to_array:()=>rgba_to_array,round_all:()=>round_all,running_server:()=>running_server,running_test:()=>running_test,safe_contains:()=>safe_contains,scroll_freeze:()=>scroll_freeze,scroll_unfreeze:()=>scroll_unfreeze,searchNextIncrementalNumber:()=>searchNextIncrementalNumber,server_errors:()=>server_errors,session_storage:()=>session_storage,set_active_epoch:()=>set_active_epoch,set_error_hook:()=>set_error_hook,set_global_cursor:()=>set_global_cursor,set_running_server:()=>set_running_server,set_running_tests:()=>set_running_tests,short_uid:()=>short_uid,shuffle_array:()=>shuffle_array,smush:()=>smush,sort_array:()=>sort_array,sort_data_fields:()=>sort_data_fields,sort_obj:()=>sort_obj,span:()=>span,stableSort:()=>stableSort,stableSortLanguages:()=>stableSortLanguages,start_count:()=>start_count,starts_with:()=>starts_with,starts_with_number:()=>starts_with_number,starts_with_vowel:()=>starts_with_vowel,stop_count:()=>stop_count,string_contains:()=>string_contains,string_replace_range:()=>string_replace_range,stripFalsy:()=>stripFalsy,text:()=>text,text_contains:()=>text_contains,textarea:()=>textarea,throw_test_error:()=>throw_test_error,timestamp:()=>timestamp,toTitleCase:()=>toTitleCase,to_moment:()=>to_moment,to_num:()=>to_num,to_object:()=>to_object,to_owner_display:()=>to_owner_display,trigger_blur:()=>trigger_blur,truncate_text:()=>truncate_text,unescape:()=>unescape3,unique:()=>unique,velocity:()=>velocity,walk:()=>walk,with_fiber_notifier:()=>with_fiber_notifier,with_flush_caches:()=>with_flush_caches,with_pause_tick:()=>with_pause_tick,zip:()=>zip});var init_u2=__esm({"lib-browser/u/index.js"(){"use strict";init_define_process_env();init_shim();init_u();init_u();__reExport(u_exports2,u_exports);typeof window<"u"&&(window.u=u_exports)}});var registered,register_style_property,get_style_properties,init_style_properties=__esm({"lib-browser/lang/elements/style_properties.js"(){"use strict";init_define_process_env();init_shim();registered={},register_style_property=name=>{registered[name]=!0},get_style_properties=()=>registered}});var runmode_exports={};__export(runmode_exports,{CLICKABLE_ELEMENT:()=>CLICKABLE_ELEMENT,FLOATING_GROUP_ZINDEX_OFFSET:()=>FLOATING_GROUP_ZINDEX_OFFSET,MAX_POPUP_ZINDEX:()=>MAX_POPUP_ZINDEX,POPUP_ZINDEX:()=>POPUP_ZINDEX});var CLICKABLE_ELEMENT,POPUP_ZINDEX,MAX_POPUP_ZINDEX,FLOATING_GROUP_ZINDEX_OFFSET,init_runmode=__esm({"lib-browser/constants/runmode.js"(){"use strict";init_define_process_env();init_shim();CLICKABLE_ELEMENT="clickable-element",POPUP_ZINDEX=2002,MAX_POPUP_ZINDEX=2102,FLOATING_GROUP_ZINDEX_OFFSET=500}});var shrink_exports={};__export(shrink_exports,{S:()=>S,expand:()=>expand,expand_object:()=>expand_object,expand_path:()=>expand_path,shrink:()=>shrink,shrink_again:()=>shrink_again,shrink_object:()=>shrink_object,shrink_path:()=>shrink_path});function can_shrink(long){return mapping[long]!=null}function shrink(long){return typeof long!="string"?long:can_shrink(long)?ESCAPE+mapping[long]:long.indexOf(ESCAPE)===0?ESCAPE+long:long}function shrink_path(long_path){return long_path.split(".").map(e=>shrink(e)).join(".")}function shrink_again(medium){return typeof medium!="string"?medium:can_shrink(medium)?ESCAPE+mapping[medium]:medium}function is_shrunk(short){return reverse[short]!=null}function expand(short){if(typeof short!="string"||short.indexOf(ESCAPE)!==0)return short;let without_escape=short.slice(1);return is_shrunk(without_escape)?reverse[without_escape]:without_escape}function expand_path(short_path){return short_path.split(".").map(e=>expand(e)).join(".")}function expand_object(obj,depth2){var _depth;if((_depth=depth2)!=null||(depth2=0),depth2%3===2&&optional_pause(),obj==null||typeof obj!="object")return obj;let innerDepth=depth2+1;if(Array.isArray(obj))return obj.map((v,idx)=>(idx%10===0&&optional_pause(),expand_object(v,innerDepth)));let new_obj={};return Object.entries(obj).forEach((_ref3,idx)=>{let[k,v]=_ref3;idx%10===0&&optional_pause(),new_obj[expand(k)]=expand_object(v,innerDepth)}),new_obj}function shrink_object(obj,depth2){var _depth2;if((_depth2=depth2)!=null||(depth2=0),depth2%3===2&&optional_pause(),obj==null||typeof obj!="object")return obj;let c_obj=obj;!Array.isArray(obj)&&c_obj.constructor!==Object&&warn("Shrinking a non-simple object",{object:obj,type:c_obj.constructor.name});let innerDepth=depth2+1;if(Array.isArray(obj))return obj.map((v,idx)=>(idx%10===0&&optional_pause(),shrink_object(v,innerDepth)));let new_obj={};return Object.entries(obj).forEach((_ref4,idx)=>{let[k,v]=_ref4;idx%10===0&&optional_pause(),new_obj[shrink(k)]=shrink_object(v,innerDepth)}),new_obj}var import_web_dom_collections_iterator32,mapping,not_shrunk,S,reverse,ESCAPE,init_shrink=__esm({"lib-browser/lang/shrink.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator32=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_logger();init_loggable();mapping={display_sender_name:"d7",list_id:"li",deleted:"del",email_address:"ea",action_id:"ai",description:"d3",label:"lab",user_name:"un",floating:"f7",formatting_type:"ft",poststripeauth:"p8",image_pressed:"ip",center_background:"cb",image_normal:"i9",image_hover:"ih",descending:"d2",password2:"p2",require_confirm:"rc",choices:"ch",default:"d1",terms:"tz",thing_type:"tt",initial_values:"i2",element_type:"et",email:"em",from:"fr",sort_field:"sf",separator_width:"sw",useiframe:"u2",columns:"c5",separator_color:"sc",html:"ht",name_has_been_changed:"n0",fields:"f3",rows:"rs",separator_style:"ss",body:"b3",subject:"su",constraint_type:"c2",constraints:"co",element_name:"e4",bind:"bi",meta_description:"md",type_to_find:"t5",group_type:"gt",action:"ak",to_change:"tc",stripes:"st",after:"af",changes:"cs",title:"t1",data_source:"ds",additional_values:"av",limit_number_of_characters:"0l",backdrop:"bd",workflows:"wf",margintop:"mt",password:"pw",event_name:"en",app_path:"ap",mandatory:"1m",linktype:"1l",open_in_new_tab:"o9",stripe_height:"sh",contents:"ct",floating_reference:"3f",stretch_or_rescale:"2f",tabs:"ts",custom_id:"ci",icon:"9i",page:"pa",content_format:"cf",display:"d",icon_color:"ic",args:"a",placeholder:"ps",background_gradient_direction:"b4",content:"c1",background_image:"bgi",bggcolor:"bg2",style:"s1",textshadow:"tes",key:"k",elements:"el",event:"e1",value:"v",repeat_background_vertical:"rbv",repeat_background_horizontal:"rbh",underline:"u",italic:"i",vertical_centering:"vc",textshadow_blur:"tsb",textshadow_color:"tsc",textshadow_horizontal:"tsh",textshadow_vertical:"tsv",page_item_type:"pet",readable_field:"rf",bold:"b",__initialized:"in",element_id:"ei",text:"3",line_height:"lh",condition:"c",letter_spacing:"ls",word_spacing:"ws",padding_vertical:"pv",background_gradient_from:"bgf",background_gradient_to:"bgt",padding_horizontal:"ph",current_parent:"cp",font_face:"f",font_alignment:"fa",font_size:"fs",border_width:"bw",states:"s",boxshadow_blur:"bsb",boxshadow_color:"bsc",boxshadow_vertical:"bv",boxshadow_horizontal:"bh",font_color:"fc",bgcolor:"bgc",default_name:"dn",entries:"e",border_color:"bc",is_visible:"iv",background_style:"bas",border_roundness:"br",border_style:"bos",zindex:"z",top:"t",left:"l",width:"w",height:"h",boxshadow_style:"bs",boxshadow_spread:"bsp",next:"n",name:"nm",properties:"p",type:"x",pages:"p3",element_definitions:"ed"},not_shrunk={provider:!0,actions:!0,val:!0,id:!0,_id:!0,value_id:!0},S={};Object.entries(mapping).forEach(_ref=>{let[k,v]=_ref,happyKey=k,happyVal=`%${v}`;S[happyKey]=happyVal});Object.keys(not_shrunk).forEach(k=>{S[k]=k});reverse={},ESCAPE="%";Object.entries(mapping).forEach(_ref2=>{let[k,v]=_ref2,safeK=k;if(v.includes(ESCAPE)||k.includes(ESCAPE))throw new UnexpectedError("cannot use # sign in shrinks: "+k+", "+v);if(v.toLowerCase()!==v)throw new UnexpectedError("cannot use upper case in shrinks: "+v);if(reverse[v])throw new UnexpectedError("Mapping "+v+" to "+k+" but "+v+" is already mapped to "+reverse[v]);reverse[v]=safeK})}});var elements_exports={};__export(elements_exports,{ELEMENT_TYPE_TO_NAME:()=>ELEMENT_TYPE_TO_NAME,FONT_FAMILY_VERSION:()=>FONT_FAMILY_VERSION,GLOBAL_ELEMENTS:()=>GLOBAL_ELEMENTS,LATEST_ELEMENT_VERSION:()=>LATEST_ELEMENT_VERSION,LATEST_RESPONSIVE_VERSION:()=>LATEST_RESPONSIVE_VERSION,NEW_BUTTON_VERSION:()=>NEW_BUTTON_VERSION,NEW_MOBILE_VIEW_DEFAULTS:()=>NEW_MOBILE_VIEW_DEFAULTS,NEW_PAGE_DEFAULTS:()=>NEW_PAGE_DEFAULTS,NOT_STATIC_PROP:()=>NOT_STATIC_PROP,OLD_VERSION_OVERRIDE_PROPERTIES:()=>OLD_VERSION_OVERRIDE_PROPERTIES,PADDING_VERSION:()=>PADDING_VERSION,PLACEHOLDER_COLOR_VERSION:()=>PLACEHOLDER_COLOR_VERSION,STATE_NOT_READY:()=>STATE_NOT_READY,TYPES_TO_EXCLUDE_FROM_SEARCH:()=>TYPES_TO_EXCLUDE_FROM_SEARCH,VERSION_STYLE_OVERRIDES:()=>VERSION_STYLE_OVERRIDES});var NEW_PAGE_DEFAULTS,NEW_MOBILE_VIEW_DEFAULTS,LATEST_RESPONSIVE_VERSION,LATEST_ELEMENT_VERSION,NEW_BUTTON_VERSION,VERSION_STYLE_OVERRIDES,OLD_VERSION_OVERRIDE_PROPERTIES,FONT_FAMILY_VERSION,NOT_STATIC_PROP,STATE_NOT_READY,PADDING_VERSION,PLACEHOLDER_COLOR_VERSION,ELEMENT_TYPE_TO_NAME,TYPES_TO_EXCLUDE_FROM_SEARCH,GLOBAL_ELEMENTS,init_elements=__esm({"lib-browser/constants/elements.js"(){"use strict";init_define_process_env();init_shim();NEW_PAGE_DEFAULTS={HEIGHT:767,WIDTH:1080,MIN_WIDTH_PX:0,RESPONSIVE_VERSION_WHEN_NOT_DEFINED:0,NEW_RESPONSIVE:!0,FIXED_WIDTH:!0,CONTAINER_LAYOUT:"fixed"},NEW_MOBILE_VIEW_DEFAULTS={HEIGHT:852,WIDTH:393,MIN_HEIGHT_PX:852,DEFAULT_WIDTH:393,MIN_WIDTH_PX:0,NEW_RESPONSIVE:!0,FIXED_WIDTH:!0,CONTAINER_LAYOUT:"column"},LATEST_RESPONSIVE_VERSION=1,LATEST_ELEMENT_VERSION=5,NEW_BUTTON_VERSION=5,VERSION_STYLE_OVERRIDES=4,OLD_VERSION_OVERRIDE_PROPERTIES=["padding_top","padding_bottom","padding_left","padding_right"],FONT_FAMILY_VERSION=1,NOT_STATIC_PROP=Symbol("NOT_STATIC_PROP"),STATE_NOT_READY={},PADDING_VERSION=2,PLACEHOLDER_COLOR_VERSION=3,ELEMENT_TYPE_TO_NAME={Text:"Text",Button:"Button",Icon:"Icon",Link:"Link",Image:"Image",Shape:"Shape",Alert:"Alert",Video:"Video",HTML:"HTML",GoogleMap:"Map",PoweredByBubble:"Built on Bubble",Group:"Group",RepeatingGroup:"Repeating Group",Popup:"Popup",FloatingGroup:"Floating Group",GroupFocus:"Group Focus",Table:"Table",Input:"Input",MultilineInput:"Multiline Input",Checkbox:"Checkbox",Dropdown:"Dropdown",AutocompleteDropdown:"Searchbox",RadioButtons:"Radio Buttons",SliderInput:"Slider Input",DateInput:"Date/Time Picker",PictureInput:"Picture Uploader",FileInput:"File Uploader","slickcarousel-Carousel":"Slideshow","chartjs-LineBarChart":"Line/Bar Chart"},TYPES_TO_EXCLUDE_FROM_SEARCH=["GroupWithFocus","TableMainAxis","TableCrossAxis","TableCell","HorizontalListItem","VerticalListItem","VerticalList","HorizontalList","AppBar","AppBarButton","TabBar","TabItem","SelectableList","SelectableListItem","Sheet","SwipeAction","SectionList","SectionHeader","WebView"],GLOBAL_ELEMENTS=["TabBar"]}});var async_state,async_state_default3,init_async_state3=__esm({"lib-browser/u/shared/async/async_state.js"(){"use strict";init_define_process_env();init_shim();init_async_state();init_async_state2();init_newautorun();enable_new_autorun?async_state=async_state_default:async_state=async_state_default2;async_state_default3=async_state}});function appquery(appname,app_version){return lib_default().app(appname,app_version)}var import_web_dom_collections_iterator33,appquery_default,init_appquery=__esm({"lib-browser/lang/appquery.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator33=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();appquery_default=appquery;appquery.app=appquery;appquery.add_methods=function(cls){for(let k of all_keys(cls.prototype))appquery[k]=function(){let cur_app=lib_default().app();if(!cur_app[k]){var _cur_app$constructor;throw new UnexpectedError("Current Lib().app() is missing function",{k,cur_app:String(cur_app),cur_app_keys:String(all_keys(cur_app)),cur_app_constructor:cur_app==null||(_cur_app$constructor=cur_app.constructor)==null?void 0:_cur_app$constructor.name,app_fn:String(lib_default().app)})}return cur_app[k](...arguments)}};typeof window<"u"&&window!==null&&(window.appquery=appquery)}});var registry_exports={};__export(registry_exports,{add:()=>add,add_generic:()=>add_generic,create:()=>create,create_generic:()=>create_generic,get:()=>get2,has:()=>has,is:()=>is,list:()=>list,new_action:()=>new_action,new_element:()=>new_element,new_event:()=>new_event,new_expression:()=>new_expression,new_workflow_item:()=>new_workflow_item});function add(name,Cls){let options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{abstract=!1}=options;all_nodes[name]=Cls,Cls.prototype.lang_constructor=name,!abstract&&!Cls.prototype.make_new&&(Cls.prototype.make_new=json=>new Cls(json))}function has(name){return name in all_nodes}function is(node,name){return node instanceof get2(name)}function get2(name){if(!all_nodes[name])throw new UnexpectedError("Unknown app node type",{name});return all_nodes[name]}function create(name){let Cls=get2(name);for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return new Cls(...args)}function add_generic(name,creator){all_generics[name]=creator}function create_generic(name){if(!all_generics[name])throw new UnexpectedError("Unknown generic app node type",{name});for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];return all_generics[name](...args)}var import_web_dom_collections_iterator34,all_nodes,all_generics,list,new_element,new_expression,new_workflow_item,new_event,new_action,init_registry=__esm({"lib-browser/lang/nodes/registry.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator34=__toESM(require_web_dom_collections_iterator());init_errors();all_nodes={},all_generics={};list=()=>Object.keys(all_nodes);new_element=create_generic.bind(null,"element"),new_expression=create_generic.bind(null,"expression"),new_workflow_item=create_generic.bind(null,"workflow_item"),new_event=create_generic.bind(null,"event"),new_action=create_generic.bind(null,"action")}});var NodeTypes,node_types_default,init_node_types=__esm({"lib-browser/lang/nodes/node_types.js"(){"use strict";init_define_process_env();init_shim();NodeTypes=function(NodeTypes2){return NodeTypes2.APP_NODE="AppNode",NodeTypes2.HAS_PROPERTIES="HasProperties",NodeTypes2.HAS_ID="HasID",NodeTypes2.FAKE_APPLICATION="FakeApplication",NodeTypes2.APPLICATION="Application",NodeTypes2.APPLICATION_VERSION="ApplicationVersion",NodeTypes2.API_WORKFLOWS="API",NodeTypes2.CUSTOM_TYPE="CustomType",NodeTypes2.READONLY_TYPE="ReadonlyType",NodeTypes2.SECURABLE_TYPE="SecurableType",NodeTypes2.CUSTOM_FIELD_STATE="CustomFieldState",NodeTypes2.CUSTOM_FIELD="CustomField",NodeTypes2.PRIVACY_ROLE="PrivacyRole",NodeTypes2.OPTION_SET="OptionSet",NodeTypes2.OPTION_ATTRIBUTE="OptionAttribute",NodeTypes2.OPTION_VALUE="OptionValue",NodeTypes2.COMMENT="Comment",NodeTypes2.EXPRESSION="Expression",NodeTypes2.EMPTY="Empty",NodeTypes2.LITERAL="Literal",NodeTypes2.OBJECT_LITERAL="ObjectLiteral",NodeTypes2.TEXT_EXPRESSION="TextExpression",NodeTypes2.LIVE_EXPRESSION="LiveExpression",NodeTypes2.DATA_SOURCE="DataSource",NodeTypes2.MESSAGE_NODE="MessageNode",NodeTypes2.GEO_ADDRESS_NODE="GeoAddressNode",NodeTypes2.WORKFLOW_OBJECT="WorkflowObject",NodeTypes2.GENERIC_EVENT="GenericEvent",NodeTypes2.EVENT="Event",NodeTypes2.API_EVENT_OBJECT="APIEventObject",NodeTypes2.ACTION="Action",NodeTypes2.STATE="State",NodeTypes2.TRANSITION="Transition",NodeTypes2.GENERIC_ELEMENT="GenericElement",NodeTypes2.ELEMENT="Element",NodeTypes2.STYLE="Style",NodeTypes2.STYLE_STATE="StyleState",NodeTypes2.CUSTOM_STATE="CustomState",NodeTypes2.ROOT="Root",NodeTypes2.PAGE="Page",NodeTypes2.CUSTOM_DEFINITION="CustomDefinition",NodeTypes2.GLOBAL_ELEMENT="GlobalElement",NodeTypes2}(NodeTypes||{}),node_types_default=NodeTypes}});var HYDRATE_STRING,ELEMENT_INSTANCE_DEHYDRATE,ESTATE_PREFIX,NV_MARKER,NULL_VALUE_TO_REGISTER,EVAL_TYPE,init_eval=__esm({"lib-browser/constants/eval.js"(){"use strict";init_define_process_env();init_shim();HYDRATE_STRING="1348695171700984260__LOOKUP__",ELEMENT_INSTANCE_DEHYDRATE="ElementInstance",ESTATE_PREFIX="ElementState:",NV_MARKER="not_valid_1431708660335x963720156345516400",NULL_VALUE_TO_REGISTER={},EVAL_TYPE=function(EVAL_TYPE2){return EVAL_TYPE2.value="VALUE",EVAL_TYPE2.thunk="THUNK",EVAL_TYPE2.skip="SKIP",EVAL_TYPE2}({})}});var registry_exports2={};__export(registry_exports2,{add:()=>add2,create:()=>create2,get:()=>get3,has:()=>has2,is:()=>is2,list:()=>list2});function add2(name,Cls){all_values[name]=Cls}function has2(name){return name in all_values}function get3(name){if(!all_values[name])throw new UnexpectedError("Unknown db value type",{name});return all_values[name]}function is2(Cls,name){return Cls instanceof all_values[name]}function create2(name){let Cls=get3(name);for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return new Cls(...args)}var import_web_dom_collections_iterator35,all_values,list2,init_registry2=__esm({"lib-browser/db/values/registry.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator35=__toESM(require_web_dom_collections_iterator());init_errors();all_values={};list2=()=>Object.keys(all_values)}});var ValueTypes,value_types_default,init_value_types=__esm({"lib-browser/db/values/value_types.js"(){"use strict";init_define_process_env();init_shim();ValueTypes=function(ValueTypes3){return ValueTypes3.DYNAMIC="Dynamic",ValueTypes3.LIST_WRAPPER="ListWrapper",ValueTypes3.NODE_BASE="NodeBase",ValueTypes3.STATIC_NODE="StaticNode",ValueTypes3.STATIC_OBJECT="StaticObject",ValueTypes3.STATIC_LIST="StaticList",ValueTypes3.TRANSFORM_LIST="TransformList",ValueTypes3.CONCAT_LIST="ConcatList",ValueTypes3.INTERSECT_LIST="IntersectList",ValueTypes3.UNIQUE_LIST="UniqueList",ValueTypes3.SORTED_LIST="SortedList",ValueTypes3.NODE_LIST="NodeList",ValueTypes3.MINUS_LIST="MinusList",ValueTypes3.CLIENT_DB_NODE="ClientDBNode",ValueTypes3.CLIENT_DB_OBJECT="ClientDBObject",ValueTypes3.SERVER_DB_NODE="ServerDBNode",ValueTypes3.SERVER_DB_OBJECT="ServerDBObject",ValueTypes3}(ValueTypes||{}),value_types_default=ValueTypes}});var hydrate_exports={};__export(hydrate_exports,{_dehydrate_btype_id_data:()=>_dehydrate_btype_id_data,_rehydrate_btype_id_data:()=>_rehydrate_btype_id_data,dehydrate_prefix:()=>dehydrate_prefix,dehydrate_tree:()=>dehydrate_tree,dehydrate_tree_to_db_primitive:()=>dehydrate_tree_to_db_primitive,dehydrate_tree_to_string_safe:()=>dehydrate_tree_to_string_safe,dehydrated_array_index_of:()=>dehydrated_array_index_of,from_json:()=>from_json,is_json_class:()=>is_json_class,register_db:()=>register_db,rehydrate:()=>rehydrate,rehydrate_tree:()=>rehydrate_tree});function from_json(my_db,obj){return db[obj._class]||warn("Trying to from_json on a bad _class",{_class:String(obj._class)}),db[obj._class].from_json(my_db,obj)}function is_json_class(data){return data&&data._class&&db[data._class]&&typeof db[data._class].from_json=="function"}function dehydrate_tree(){let obj=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(typeof obj=="function")throw new UnexpectedError("cannot dehydrate a function",{toString:obj.toString()});if(obj&&typeof obj.to_json=="function")return obj.to_json();if(obj&&typeof obj.dehydrate=="function")return obj.dehydrate();if(obj instanceof Date)return obj.valueOf();if(obj&&typeof obj=="object"){if(obj.constructor!=={}.constructor&&!Array.isArray(obj))throw new UnexpectedError(`trying to dehydrate a class: ${obj.constructor.name}`);optional_pause("dehydrate_tree pre iterate");let count2=0,ret=Array.isArray(obj)?[]:{};for(let k of Object.keys(obj))count2++,count2%10===0&&optional_pause("dehydrate_tree in iterate"),ret[k]=dehydrate_tree(obj[k]);return optional_pause("dehydrate_tree finished"),ret}else return obj}function rehydrate(my_db,val){if(is_json_class(val))return from_json(my_db,val);if(starts_with(val,HYDRATE_STRING)){val=val.replace(HYDRATE_STRING,"");let pieces=val.split("::");return pieces.length>1?db[pieces[0]]?db[pieces[0]].rehydrate(my_db,pieces.slice(1).join("::")):null:my_db.get(val)}else return val}function rehydrate_tree(my_db,obj){if(my_db&&typeof my_db.get!="function")throw new UnexpectedError(`called rehydrate tree with ${my_db} for my_db, it should be (my_db, obj)`);if(typeof obj=="function")throw new UnexpectedError(`called rehydrate tree with function: ${obj}`);if(typeof obj=="string"&&starts_with(obj,HYDRATE_STRING))return rehydrate(my_db,obj);if(obj&&typeof obj=="object"){if(is_json_class(obj))return from_json(my_db,obj);if(is2(obj,value_types_default.DYNAMIC))return obj;let ret=Array.isArray(obj)?[]:{},counter=0;for(let k of Object.keys(obj))counter++,counter%10===0&&optional_pause(),ret[k]=rehydrate_tree(my_db,obj[k]);return ret}return obj}function _dehydrate_btype_id_data(data,btype_id){let key=dehydrate_tree(data);return key=incremental_json_stringify(key),key=`${btype_id!=null?btype_id:""},${key}`,key}function _rehydrate_btype_id_data(my_db,key){let data,pieces=key.split(","),btype_id=pieces[0];return btype_id.indexOf("{")===0?(btype_id=null,data=key):(btype_id||(btype_id=null),data=pieces.slice(1).join(",")),data==="undefined"?data=void 0:data=incremental_json_parse(data),data=rehydrate_tree(my_db,data),{btype_id,data}}function outer_stringify(obj){return dehydrate_prefix("OuterStringified")+incremental_json_stringify(obj)}function dehydrate_tree_to_db_primitive(obj){if(Array.isArray(obj))return obj.map(entry=>dehydrate_tree_to_db_primitive(entry));let dehydrated=dehydrate_tree(obj);return is_json_class(dehydrated)?outer_stringify(dehydrated):dehydrated}function dehydrate_tree_to_string_safe(obj){if(Array.isArray(obj))return obj.map(entry=>dehydrate_tree_to_string_safe(entry));let dehydrated=dehydrate_tree(obj);return dehydrated&&typeof dehydrated=="object"?outer_stringify(dehydrated):dehydrated}function is_old_dehydrated_string(string){return typeof string=="string"&&starts_with(string,HYDRATE_STRING)&&!starts_with(string,dehydrate_prefix("OuterStringified"))}function dehydrated_array_index_of(array,string){let simple_index_of=array.indexOf(string);return simple_index_of>-1?simple_index_of:array.findIndex(item=>is_old_dehydrated_string(item)&&string===dehydrate_tree_to_string_safe(rehydrate_tree(lib_default().db_instance(),item)))}var import_web_dom_collections_iterator36,import_es_string_replace11,db,register_db,dehydrate_prefix,init_hydrate=__esm({"lib-browser/db/hydrate.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator36=__toESM(require_web_dom_collections_iterator()),import_es_string_replace11=__toESM(require_es_string_replace());init_lib();init_b_fiber();init_b_string();init_incremental();init_logger();init_errors();init_eval();init_registry2();init_value_types();db={},register_db=_db=>db=_db;dehydrate_prefix=classname=>HYDRATE_STRING+classname+"::"}});var ALL,init_special_logging_apps=__esm({"lib-browser/constants/special_logging_apps.js"(){"use strict";init_define_process_env();init_shim();ALL={}}});var import_web_dom_collections_iterator37,APP_PERSONAL_2019,APP_PROFESSIONAL_2019,APP_PRODUCTION_2019,APP_STARTER_2023,APP_STARTER_2024,APP_GROWTH_2023,APP_TEAM_2023,APP_CUSTOM_2023,DEFAULT_DEDICATED_PLAN,AGENCY_PLAN,TEST_EMPLOYEE,TEST_PLAN,APP_INSTRUCTOR,APP_HACKATHON,APP_EMPLOYEE,APP_EDUCATION,APP_ORGANIZATION_FREE,APP_PLUGIN_DEMO,UserSelectablePre2019Plans,AllPre2019Plans,UserSelectable2023Plans,PricingModel2023Plans,UserSelectable2024Plans,PricingModel2024Plans,UserSelectableLatestPlans,PricingModelWorkloadBasedPlans,SPECIAL_SUBSCRIPTION_PLANS,ENTERPRISE_PLANS,LEGACY_2019_PLANS,init_app_plans=__esm({"lib-browser/constants/app_plans.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator37=__toESM(require_web_dom_collections_iterator()),APP_PERSONAL_2019="app_personal_2019",APP_PROFESSIONAL_2019="app_professional_2019",APP_PRODUCTION_2019="app_production_2019",APP_STARTER_2023="app_starter_2023",APP_STARTER_2024="app_starter_2024",APP_GROWTH_2023="app_growth_2023",APP_TEAM_2023="app_team_2023",APP_CUSTOM_2023="app_custom_2023",DEFAULT_DEDICATED_PLAN="enterprise",AGENCY_PLAN="app_agency",TEST_EMPLOYEE="app_test_employee",TEST_PLAN="app_testing",APP_INSTRUCTOR="app_instructor",APP_HACKATHON="app_hackathon",APP_EMPLOYEE="app_employee",APP_EDUCATION="app_education",APP_ORGANIZATION_FREE="app_organization_free",APP_PLUGIN_DEMO="app_plugin_demo",UserSelectablePre2019Plans=["app_personal","app_production","app_professional","app_team"],AllPre2019Plans=["personal","professional","team",...UserSelectablePre2019Plans],UserSelectable2023Plans=[APP_STARTER_2023,APP_GROWTH_2023,APP_TEAM_2023],PricingModel2023Plans=[...UserSelectable2023Plans,APP_CUSTOM_2023],UserSelectable2024Plans=[APP_STARTER_2024,APP_GROWTH_2023,APP_TEAM_2023],PricingModel2024Plans=[...UserSelectable2024Plans,APP_CUSTOM_2023],UserSelectableLatestPlans=[APP_STARTER_2023,...UserSelectable2024Plans],PricingModelWorkloadBasedPlans=[APP_STARTER_2023,...PricingModel2024Plans],SPECIAL_SUBSCRIPTION_PLANS=Object.freeze([AGENCY_PLAN,APP_EDUCATION,APP_EMPLOYEE,APP_INSTRUCTOR,APP_HACKATHON,APP_ORGANIZATION_FREE,APP_PLUGIN_DEMO,TEST_EMPLOYEE]),ENTERPRISE_PLANS=Object.freeze([DEFAULT_DEDICATED_PLAN,APP_CUSTOM_2023]),LEGACY_2019_PLANS=Object.freeze([APP_PERSONAL_2019,APP_PROFESSIONAL_2019,APP_PRODUCTION_2019])}});var defaults,SPECIAL_APPS,init_apps=__esm({"lib-browser/constants/apps.js"(){"use strict";init_define_process_env();init_shim();init_app_plans();defaults={blocked:!1,editable:!1,forkable:!1,hard_code:!1,meta:!1,no_issue_checker:!1,test:!1},SPECIAL_APPS={coffeesearcher:{...defaults,editable:!0,forkable:!0,hard_code:!0},countrycity:{...defaults,editable:!0,forkable:!0,hard_code:!0},cutepuppy:{...defaults,editable:!0,forkable:!0,hard_code:!0},demo:{...defaults,editable:!0,hard_code:!0,no_issue_checker:!0},empty_template:{...defaults,hard_code:!0},findatrainer:{...defaults,editable:!0,forkable:!0,hard_code:!0},g2_iphone_test:{...defaults,no_issue_checker:!0},itunessearcher:{...defaults,editable:!0,forkable:!0,hard_code:!0},launchpage:{...defaults,editable:!0,forkable:!0,hard_code:!0},learn:{...defaults,editable:!0,hard_code:!0,no_issue_checker:!0},lostandfound:{...defaults,editable:!0,forkable:!0,hard_code:!0},meta:{...defaults,meta:!0,plan:DEFAULT_DEDICATED_PLAN},meta_dedicated:{...defaults,hard_code:!0,meta:!0},microbloggingapp:{...defaults,editable:!0,forkable:!0,hard_code:!0},template:{...defaults,hard_code:!0},template_live:{...defaults,hard_code:!0},template_new_responsive:{...defaults,hard_code:!0},test_app:{...defaults,hard_code:!0,no_issue_checker:!0,plan:TEST_PLAN,test:!0},test_app_editor:{...defaults,hard_code:!0,no_issue_checker:!0,plan:TEST_PLAN,test:!0},test_app2:{...defaults,hard_code:!0,no_issue_checker:!0,plan:TEST_PLAN,test:!0},test_app_plugins:{...defaults,hard_code:!0,plan:TEST_PLAN,test:!0},test_app_education:{...defaults,hard_code:!0,plan:APP_EDUCATION,test:!0},test_app_elements:{...defaults,hard_code:!0,no_issue_checker:!1,plan:TEST_PLAN,test:!0},test_app_legacy_elements:{...defaults,hard_code:!0,no_issue_checker:!1,plan:TEST_PLAN,test:!0},test_app_cycles:{...defaults,hard_code:!0,no_issue_checker:!1,plan:TEST_PLAN,test:!0},test_old_bv:{...defaults,hard_code:!0,no_issue_checker:!0,plan:TEST_PLAN,test:!0},derived_test:{...defaults,hard_code:!0,test:!0},todomvcapp:{...defaults,editable:!0,forkable:!0,hard_code:!0},tour:{...defaults,editable:!0,hard_code:!0,no_issue_checker:!0},airbnbclonetemplate:{...defaults,blocked:!0},bubblewits1:{...defaults,blocked:!0},bubblewits2:{...defaults,blocked:!0},bubblewits3:{...defaults,blocked:!0},spam:{...defaults,blocked:!0},trello:{...defaults,blocked:!0},yelpclone:{...defaults,blocked:!0}}}});function check_value(appname,key){var _SPECIAL_APPS$appname,_SPECIAL_APPS$appname2;return(_SPECIAL_APPS$appname=(_SPECIAL_APPS$appname2=SPECIAL_APPS[appname])==null?void 0:_SPECIAL_APPS$appname2[key])!=null?_SPECIAL_APPS$appname:!1}function is_local_editable(appname){return check_value(appname,"editable")}function is_hardcoded(appname){return check_value(appname,"hard_code")}function is_test2(appname){return check_value(appname,"test")}function hardcoded_apps(){if(hardcoded_appnames==null){var _hardcoded_appnames;(_hardcoded_appnames=hardcoded_appnames)!=null||(hardcoded_appnames=new Set(Object.entries(SPECIAL_APPS).filter(_ref=>{let[_,app]=_ref;return app.hard_code}).map(_ref2=>{let[appname,_]=_ref2;return appname}))),Object.freeze(hardcoded_appnames)}return hardcoded_appnames}var import_web_dom_collections_iterator38,_configuration$meta_h,hardcoded_appnames,init_apps_utilities=__esm({"lib-browser/shared/apps_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator38=__toESM(require_web_dom_collections_iterator());init_apps();init_client_config2();SPECIAL_APPS.meta.hard_code=(_configuration$meta_h=client_config_default2.meta_hardcoded)!=null?_configuration$meta_h:!1}});var test_apps_exports={};__export(test_apps_exports,{APPS_EXCLUDED_FROM_TUTORIALS:()=>APPS_EXCLUDED_FROM_TUTORIALS,APPS_WITHOUT_PE_HELP_BUTTON:()=>APPS_WITHOUT_PE_HELP_BUTTON,APPS_WITHOUT_PE_INSPECTOR:()=>APPS_WITHOUT_PE_INSPECTOR,E2E_TEST_APPS_PREFIX:()=>E2E_TEST_APPS_PREFIX,EDITOR_TESTS_APPNAME:()=>EDITOR_TESTS_APPNAME,FUNCTIONAL_TEST_APPNAME_PREFIXES:()=>FUNCTIONAL_TEST_APPNAME_PREFIXES,MAIN_RUNMODE_TESTS_APPNAME:()=>MAIN_RUNMODE_TESTS_APPNAME,MAX_EDITMODE_TESTS_PER_CHUNK:()=>MAX_EDITMODE_TESTS_PER_CHUNK,NUMBER_OF_EDIT_TESTS:()=>NUMBER_OF_EDIT_TESTS,OLD_TEST_APP_KEY:()=>OLD_TEST_APP_KEY,TEST_APP_KEY:()=>TEST_APP_KEY});var EDITOR_TESTS_APPNAME,MAIN_RUNMODE_TESTS_APPNAME,APPS_WITHOUT_PE_INSPECTOR,APPS_WITHOUT_PE_HELP_BUTTON,TEST_APP_KEY,OLD_TEST_APP_KEY,FUNCTIONAL_TEST_APPNAME_PREFIXES,E2E_TEST_APPS_PREFIX,APPS_EXCLUDED_FROM_TUTORIALS,NUMBER_OF_EDIT_TESTS,MAX_EDITMODE_TESTS_PER_CHUNK,init_test_apps=__esm({"lib-browser/constants/test_apps.js"(){"use strict";init_define_process_env();init_shim();EDITOR_TESTS_APPNAME="test_app_editor",MAIN_RUNMODE_TESTS_APPNAME="test_app",APPS_WITHOUT_PE_INSPECTOR=["learn","demo"],APPS_WITHOUT_PE_HELP_BUTTON=["learn",EDITOR_TESTS_APPNAME,"demo"],TEST_APP_KEY="test-app-234789asdfjl",OLD_TEST_APP_KEY="test_app_234789asdfjl",FUNCTIONAL_TEST_APPNAME_PREFIXES=["backup_test_original","backup-test-original","backup_test_restore","backup-test-restore"],E2E_TEST_APPS_PREFIX="test_app",APPS_EXCLUDED_FROM_TUTORIALS=["learn","test_app","test_app2"],NUMBER_OF_EDIT_TESTS=31,MAX_EDITMODE_TESTS_PER_CHUNK=7}});function is_e2e_test_appname(appname){return hardcoded_apps().has(appname)&&appname.startsWith(E2E_TEST_APPS_PREFIX)}var import_web_dom_collections_iterator39,init_test_apps_utilities=__esm({"lib-browser/shared/test_apps_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator39=__toESM(require_web_dom_collections_iterator());init_apps_utilities();init_test_apps()}});var import_web_dom_collections_iterator40,Investigation,init_Investigation=__esm({"lib-browser/logging/investigations/Investigation.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator40=__toESM(require_web_dom_collections_iterator()),Investigation=class{constructor(filter){this.filter=filter}active(){return this.filter()}}}});function sample_events(probability){return Math.random()<probability}function special_logging_apps_only(){var _Lib2,_Lib$appname;let appname=(_Lib2=lib_default())==null||(_Lib$appname=_Lib2.appname)==null?void 0:_Lib$appname.call(_Lib2);if(running_test()||appname&&is_e2e_test_appname(appname))return!0;if(appname==null)return!1;var _special_logging_apps;return(_special_logging_apps=ALL[appname])!=null?_special_logging_apps:!1}function sample_sessions(probability){return sample_events(probability)?new Investigation(()=>!0):new Investigation(()=>!1)}var frozen_state_discrepancies,frozen_state_debugging,workflow_execution,action_update_thing,fetch_bigger_chunks,is_mobile,init_shared=__esm({"lib-browser/logging/investigations/shared.js"(){"use strict";init_define_process_env();init_shim();init_lib();init_mode_check();init_special_logging_apps();init_environment_utilities();init_test_apps_utilities();init_Investigation();frozen_state_discrepancies=new Investigation(()=>{let probability;return is_production()?probability=.1:(running_test(),probability=1),sample_events(probability)}),frozen_state_debugging=new Investigation(special_logging_apps_only),workflow_execution=new Investigation(special_logging_apps_only),action_update_thing=new Investigation(special_logging_apps_only),fetch_bigger_chunks=sample_sessions(.01),is_mobile=new Investigation(()=>is_production()?sample_events(.01):!0)}});var DETECT_FIELD_NAMES,MISSING_TYPE,OPTION_VALUE_FORMATS,LIST_OPERATOR_NAMES,init_lang=__esm({"lib-browser/constants/lang.js"(){"use strict";init_define_process_env();init_shim();DETECT_FIELD_NAMES="DETECT",MISSING_TYPE="<<MISSING TYPE INFO>>",OPTION_VALUE_FORMATS=function(OPTION_VALUE_FORMATS2){return OPTION_VALUE_FORMATS2.name_is_key="name_is_key",OPTION_VALUE_FORMATS2.name_is_db_value_with_fallback="name_is_db_value_with_fallback",OPTION_VALUE_FORMATS2}({}),LIST_OPERATOR_NAMES=function(LIST_OPERATOR_NAMES2){return LIST_OPERATOR_NAMES2.Count="count",LIST_OPERATOR_NAMES2.Contains="contains",LIST_OPERATOR_NAMES2.NotContains="not_contains",LIST_OPERATOR_NAMES2.FirstElement="first_element",LIST_OPERATOR_NAMES2.LastElement="last_element",LIST_OPERATOR_NAMES2.RandomElement="random_element",LIST_OPERATOR_NAMES2.SpecificItem="specific_item",LIST_OPERATOR_NAMES2.LimitTo="limit_to",LIST_OPERATOR_NAMES2.ListFrom="list_from",LIST_OPERATOR_NAMES2.ContainsList="contains_list",LIST_OPERATOR_NAMES2.Join="join",LIST_OPERATOR_NAMES2.Sum="sum",LIST_OPERATOR_NAMES2.Product="product",LIST_OPERATOR_NAMES2.Average="average",LIST_OPERATOR_NAMES2.Median="median",LIST_OPERATOR_NAMES2.Min="min",LIST_OPERATOR_NAMES2.Max="max",LIST_OPERATOR_NAMES2.PlusElement="plus_element",LIST_OPERATOR_NAMES2.MinusElement="minus_element",LIST_OPERATOR_NAMES2.MinusList="minus_list",LIST_OPERATOR_NAMES2.MergedWith="merged_with",LIST_OPERATOR_NAMES2.IntersectWith="intersect_with",LIST_OPERATOR_NAMES2.GroupBy="group_by",LIST_OPERATOR_NAMES2.Filtered="filtered",LIST_OPERATOR_NAMES2.Sorted="sorted",LIST_OPERATOR_NAMES2.RankedBy="ranked_by",LIST_OPERATOR_NAMES2.Unique="unique",LIST_OPERATOR_NAMES2.ApproximateCount="approximate_count",LIST_OPERATOR_NAMES2.CachedAggregation="cached_aggregation",LIST_OPERATOR_NAMES2.FormatAsText="format_as_text",LIST_OPERATOR_NAMES2.MakeStatic="make_static",LIST_OPERATOR_NAMES2}({})}});function raw_to_child_names(raw){let res;if(raw==null||typeof raw!="object")res=[];else if(Array.isArray(raw))res=raw.map((v,i)=>String(i));else{let possible_array=-1;if(res=[],Object.entries(raw).filter(_ref=>{let[k,v]=_ref;return v!==void 0&&!["length",OBJECT_MARKER].includes(k)}).forEach(_ref2=>{let[k,v]=_ref2;if(possible_array!=null){let idx=parseInt(k);String(idx)!==String(k)?possible_array=null:possible_array=Math.max(idx,possible_array)}res.push(k)}),possible_array!=null&&possible_array>-1&&possible_array<SPARSENESS_THRESHOLD*res.length){res=[];for(let i=0;i<=possible_array;i++)res.push(String(i))}else res.sort()}return res}function escape_app_json_key(key){return key.replace(escape_regex,match=>escape_codes[match])}function unescape_app_json_key(key){return key.replace(unescape_regex,match=>unescape_codes[match])}var import_web_dom_collections_iterator41,import_es_string_replace12,SPARSENESS_THRESHOLD,escape_codes,unescape_codes,escape_regex,unescape_regex,init_json_utils=__esm({"lib-browser/lang/app_json/json_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator41=__toESM(require_web_dom_collections_iterator()),import_es_string_replace12=__toESM(require_es_string_replace());init_app_json();init_regexUtilities();SPARSENESS_THRESHOLD=100;escape_codes={".":"^{p1}","^":"^{c1}"},unescape_codes={};Object.keys(escape_codes).forEach(key=>{unescape_codes[escape_codes[key]]=key});escape_regex=new RegExp(oneOf(...Object.keys(escape_codes)),"g"),unescape_regex=new RegExp(oneOf(...Object.values(escape_codes)),"g")}});function EmptyJSON(owner,id,search2){return new EmptyJSONClass(owner,id,search2)}var import_web_dom_collections_iterator42,JSONBase,EmptyJSONClass,init_json_base=__esm({"lib-browser/lang/app_json/json_base.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator42=__toESM(require_web_dom_collections_iterator());init_json_utils();init_shrink();init_app_json();init_shrink();JSONBase=class{child_by_path(path){return this.by_path(shrink_path(path))}by_path(_path){let pieces=_path.split("."),targ=this;for(let p of pieces)p&&(targ=targ._child(p));return targ}child(name){return this._child(shrink(name))}name(){return expand(this._name())}path(){let _path=this._path();return _path&&_path.split(".").map(piece=>expand(piece)).join(".")}get is_json(){return!0}by_id(id){let _path=this.raw_index("id_to_path",id),root2=this.root();return _path&&root2.pre_cache(_path,!0),_path==null?EmptyJSON(this,id):root2.by_path(_path)}read_index(){let data=this.raw_index(...arguments);return data!=null&&typeof data=="object"&&(delete data[OBJECT_MARKER],delete data.length),data}children(){return this._child_names().map(name=>this._child(name))}child_names(){return this._child_names().map(_name=>expand(_name))}is_equal_to(json){var _json$toUniqueString;return(json==null||(_json$toUniqueString=json.toUniqueString)==null?void 0:_json$toUniqueString.call(json))===this.toUniqueString()}_raw_to_child_names(raw){return raw_to_child_names(raw)}raw(){let raw=this._raw();return raw===void 0?raw:expand_object(raw)}_raw_child(_name){return this._child(_name)._raw()}_raw_gchild(_n1,_n2){return this._gchild(_n1,_n2)._raw()}set(data,metadata){this._set(shrink_object(data),metadata)}pre_cache(path,shrunk){if(!path&&!this._path())return;let target=this;if(path)for(let piece of path.split(".").filter(p=>p))shrunk?target=target._child(piece):target=target.child(piece);target.ensure_loading()}toString(){return"JSON Base"}};EmptyJSONClass=class extends JSONBase{constructor(owner,_id,search2){super(),this.owner=void 0,this._id=void 0,this.search=void 0,this.__path=void 0,this.owner=owner,this._id=_id,this.search=search2,this.__path=""}empty(){return!0}exists(){return!1}_raw(){}raw_type(){return"undefined"}get(){return null}id(){var _this$_id;return(_this$_id=this._id)!=null?_this$_id:""}to_id(){return this}to_path(){return this}toString(){var _this$_id2,_this$search;return"EmptyJSON<"+((_this$_id2=this._id)!=null?_this$_id2:"")+((_this$search=this.search)!=null?_this$search:"")+">"}toUniqueString(){return this.toString()+"_"+this.owner.toString()}path_cache(){return this.toString()+"_"+this.owner.toString()}ensure_exists(){return null}_path(){return""}_name(){return""}parent(){return null}_child(name){return EmptyJSON(this.owner,null,`${this.toString()}.child(${String(name)})`)}_gchild(_n1,_n2){return EmptyJSON(this.owner,null,`${this.toString()}.gchild(${String(_n1)},${String(_n2)})`)}pre_cache(path,shrunk){this.owner.pre_cache(path,shrunk)}ensure_loading(){}_child_names(){return[]}root(){return this.owner.root()}application(){return this.owner.application()}appname(){return this.owner.appname()}app_version(){return this.owner.app_version()}raw_index(){return this.owner.raw_index(...arguments)}register_indexer(){}smart_cache(name,creator,additional_arg){return creator(this,additional_arg)}_set(data,metadata){}serialize(){return{}}uid(){return""}}}});function build_class(broadcast_names){let instance_methods=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},EnhancedArray2=class extends EArray{};return Object.assign(EnhancedArray2.prototype,instance_methods),broadcast_names.forEach(name=>{var _EnhancedArray$protot,_EnhancedArray$protot2;(_EnhancedArray$protot2=(_EnhancedArray$protot=EnhancedArray2.prototype)[name])!=null||(_EnhancedArray$protot[name]=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return this.flatMap(obj=>{if(obj==null)return null;if(typeof obj[name]!="function")throw new UnexpectedError("EArray child missing",{name});return obj[name](...args)})})}),EnhancedArray2}var import_web_dom_collections_iterator43,EArray,init_enhanced_array=__esm({"lib-browser/lang/enhanced_array.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator43=__toESM(require_web_dom_collections_iterator());init_u2();EArray=class extends Array{is_equal_to(other){return Array.isArray(other)&&other.length===this.length&&this.every((item,idx)=>compare(item,other[idx]))}toString(){return"Enhanced Array: "+this.to_array()}to_array(){return Array.from(this)}sort(sort_fn){return this.constructor.from(this.to_array().sort(sort_fn))}};EArray.prototype[Symbol.isConcatSpreadable]=!0}});var decaf_exports={};__export(decaf_exports,{array_from:()=>array_from,object_entries:()=>object_entries,object_keys:()=>object_keys,object_values:()=>object_values});var object_keys,object_values,object_entries,array_from,init_decaf=__esm({"lib-browser/u/shared/decaf.js"(){"use strict";init_define_process_env();init_shim();object_keys=obj=>obj&&(typeof obj=="object"||typeof obj=="function")?Object.keys(obj):[],object_values=obj=>obj&&(typeof obj=="object"||typeof obj=="function")?Object.values(obj):[],object_entries=obj=>obj&&(typeof obj=="object"||typeof obj=="function")?Object.entries(obj):[],array_from=x=>Array.from(x)}});var nodes_utils_exports={};__export(nodes_utils_exports,{deserialize:()=>deserialize,enhance_array:()=>enhance_array,filter_array:()=>filter_array,from_raw:()=>from_raw,from_raw_array:()=>from_raw_array,get_EnhancedArray:()=>get_EnhancedArray,make_filter:()=>make_filter,raw_array_node:()=>raw_array_node,raw_child:()=>raw_child,raw_children:()=>raw_children,raw_properties:()=>raw_properties,set_owner:()=>set_owner,to_array:()=>to_array,to_raw:()=>to_raw});function deserialize(application_version,serialized){function process_arg(arg){switch(arg.type){case"json":return application_version.json.by_path(arg.value);case"node":return deserialize(application_version,arg.value);case"raw":return arg.value;default:throw new UnexpectedError(arg.type)}}let args=serialized.args.map(arg=>process_arg(arg)),arg0=args[0],arg1=args[1],arg2=args[2];return args.length>3&&error("error deserializing: we have something with more than 3 args",{constructor_name:serialized.constructor_name}),create(serialized.constructor_name,arg0,arg1,arg2)}function filter_array(filter,array){if(!filter)return enhance_array(array);filter=make_filter(filter);let array_to_enhance=[];for(let entry of array!=null?array:[])filter(entry)&&array_to_enhance.push(entry);return enhance_array(array_to_enhance)}function filter_to_string(){return"Compiled filter: "+this._original}function filter_function(class_type,type,property_name,property_value,with_name,obj){if(class_type){if(obj instanceof JSONBase)throw new UnexpectedError("We do not support running class filters on JSONs");if(!((obj._raw?from_raw(obj):obj)instanceof class_type))return!1}let json,use_json,_raw3;if(obj instanceof JSONBase?(json=obj,use_json=!0):obj._raw!=null?(_raw3=obj._raw,use_json=!1):(json=obj.json,use_json=!0),use_json){if(!json||type&&type!==json._child(S2.type).get())return!1;if(property_name){var _val;let val=json._raw_gchild(S2.properties,property_name);if(((_val=val)==null?void 0:_val[S2.type])==="TextExpression"&&(val=object_values(val[S2.entries]).join("")),String(val)!==property_value)return!1}return!(with_name&&json._child(S2.name).get()!==with_name)}else{if(_raw3==null||type&&type!==_raw3[S2.type])return!1;if(property_name){var _raw$S$properties,_val2;let val=(_raw$S$properties=_raw3[S2.properties])==null?void 0:_raw$S$properties[property_name];if(((_val2=val)==null?void 0:_val2[S2.type])==="TextExpression"&&(val=object_values(val[S2.entries]).join("")),String(val)!==property_value)return!1}return!(with_name&&_raw3[S2.name]!==with_name)}}function identity_filter(){return!0}function make_filter(filter_str){if(!filter_str)return identity_filter;if(typeof filter_str=="function")return filter_str;if(!filter_cache[filter_str]){let property2,type;if(filter_str.charAt(0)==='"'){let split_from=filter_str.indexOf('"',1);type=filter_str.substring(1,split_from),property2=filter_str.substring(split_from+2)}else{let filter_str_array=filter_str.split(".");type=filter_str_array[0],property2=filter_str_array.slice(1).join(".")}let property_name,with_name,property_value;property2&&(property_name=property2.split("=")[0],property_value=property2.split("=")[1],property_name==="name"&&(with_name=property_value,property_name=null),property_name===`
ame`&&(property_name="name")),property_name=shrink(property_name);let class_type;has(type)&&(error("Deprecated: filter using class_type",{filter_str}),class_type=get2(type),type=null),filter_cache[filter_str]=filter_function.bind(null,class_type,type,property_name,property_value,with_name),filter_cache[filter_str]._type=type,filter_cache[filter_str]._original=filter_str,filter_cache[filter_str].toString=filter_to_string}return filter_cache[filter_str]}function to_raw(node){var _node$owner;let{json}=node,_raw3=json==null?void 0:json._raw();if(_raw3==null)return null;let _path=json._path(),owner;if((_node$owner=node.owner)!=null&&_node$owner.is_node&&(owner=to_raw(node.owner),owner.converter=node.owner.make_new,!owner.converter))throw new UnexpectedError("Class "+node.owner.constructor.name+" is missing a make_new function");return{_raw:_raw3,_path,owner}}function from_raw(base_json,converter,_ref){let{_raw:_raw3,_path,owner}=_ref,json=base_json.root().by_path(_path);if(owner!=null){if(!owner.converter)throw new UnexpectedError(`bad owner:
`+JSON.stringify({_raw:_raw3,_path,owner},null,4));owner=from_raw(base_json,owner.converter,owner)}return converter(json,owner)}function raw_child(_ref2,name){let{_raw:_raw3,_path,owner}=_ref2;return _raw3=_raw3[name],_raw3?(_path=_path+"."+name,{_raw:_raw3,_path,owner}):null}function set_owner(node,owner,owner_converter){node.owner=owner,owner.converter=owner_converter}function raw_children(_ref3,name){var _raw$name;let{_raw:_raw3,_path,owner}=_ref3,path_base=_path+"."+name+".",object2=(_raw$name=_raw3[name])!=null?_raw$name:{};return Object.entries(object2).filter(_ref4=>{let[k,v]=_ref4;return v!=null&&!["length",OBJECT_MARKER2].includes(k)}).map(_ref5=>{let[k,v]=_ref5;return{_raw:v,_path:path_base+k,owner}})}function raw_properties(owner,owner_converter){var _raw$S$properties2;let{_raw:_raw3,_path}=owner;owner.converter=owner_converter;let path_base=_path+"."+S2.properties+".",object2=(_raw$S$properties2=_raw3[S2.properties])!=null?_raw$S$properties2:{};return Object.entries(object2).filter(_ref6=>{let[k,v]=_ref6;return v!=null&&!["length",OBJECT_MARKER2].includes(k)}).map(_ref7=>{let[k,v]=_ref7;return{_raw:v,_path:path_base+k,owner}})}function raw_array_node(_ref8){let{_raw:_raw3,_path,owner}=_ref8,path_base=_path+".",object2=_raw3!=null?_raw3:{};return Object.entries(object2).filter(_ref9=>{let[k,v]=_ref9;return v!=null&&!["length",OBJECT_MARKER2].includes(k)}).map(_ref10=>{let[k,v]=_ref10;return{_raw:v,_path:path_base+k,owner}})}function build_enhanced_array(){let names=[],test_array=["asdf"];for(let nm of list()){let cls=get2(nm);if(cls&&cls.prototype instanceof get2(node_types_default.APP_NODE))for(let fn_name of all_keys(cls.prototype))test_array[fn_name]==null&&names.push(fn_name)}EnhancedArray=build_class(names,{filter(filter){return filter_array(filter,this)}})}function get_EnhancedArray(){return EnhancedArray||build_enhanced_array(),EnhancedArray}function enhance_array(array){EnhancedArray||build_enhanced_array();let ret=new EnhancedArray;return Array.prototype.push.apply(ret,array),ret}function to_array(arr){return arr.to_array?arr.to_array():arr}var import_web_dom_collections_iterator44,OBJECT_MARKER2,S2,filter_cache,from_raw_array,EnhancedArray,init_nodes_utils=__esm({"lib-browser/lang/nodes/nodes_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator44=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_logger();init_shrink();init_app_json();init_json_base();init_registry();init_enhanced_array();init_decaf();init_node_types();({OBJECT_MARKER:OBJECT_MARKER2}=app_json_exports),{S:S2}=shrink_exports;identity_filter.toString=()=>"Identity filter";filter_cache={};from_raw_array=(base_json,converter,array)=>enhance_array(array.map(entry=>from_raw(base_json,converter,entry)));EnhancedArray=null}});var import_web_dom_collections_iterator45,AppNode,init_AppNode=__esm({"lib-browser/lang/nodes/AppNode.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator45=__toESM(require_web_dom_collections_iterator());init_u2();init_registry();init_nodes_utils();AppNode=class{constructor(json){this.json=void 0,this.json=json}get_changelog_type(){return null}root(){return null}get is_node(){return!0}has_id(){return!1}toString(){return this.lang_constructor+"<"+this.json.path()+">"}toUniqueString(){return this.lang_constructor+"<"+this.json.toUniqueString()+">"}app(){var _root$_appnode_applic;let root2=this.json.root();return(_root$_appnode_applic=root2._appnode_application_version_cache)!=null||(root2._appnode_application_version_cache=create("ApplicationVersion",root2)),root2._appnode_application_version_cache}id(){return this.json.id()}is_equal_to(node){return(node==null?void 0:node.toUniqueString())===this.toUniqueString()}path(){return this.json.path()}raw(){return this.json.raw()}read_index(){return this.json.read_index(...arguments)}is(filter){return make_filter(filter)(this)}exists(){return this.json.exists()}ensure_exists(){return this.json.ensure_exists()?this:null}disable_rename(){return!1}serialize(){if(!this.lang_constructor)throw new UnexpectedError("missing lang_constructor: "+this.constructor.name);function process_arg(arg){return arg.is_json?{type:"json",value:arg._path()}:arg.is_node?{type:"node",value:arg.serialize()}:{type:"raw",value:arg}}let args=this.serialize_args().map(arg=>process_arg(arg));return{constructor_name:this.lang_constructor,args}}serialize_args(){return[this.json]}}}});var caching_exports={};__export(caching_exports,{ALL_MODES:()=>ALL_MODES,AUTORUN:()=>AUTORUN,RUN_MODE:()=>RUN_MODE,all_cache:()=>all_cache,cached:()=>cached,run_cache:()=>run_cache,run_cache_1_param:()=>run_cache_1_param,standalone:()=>standalone});function cached(){let options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{type,parameters=0,...other_options}=options;if(type===AUTORUN)return autorun_cache_decorator(other_options);if(type===ALL_MODES)return make_decorator(all_cache);if(type===RUN_MODE){if(parameters===0)return make_decorator(run_cache);if(parameters===1)return make_decorator(run_cache_1_param)}throw new UnexpectedError("Unsupported cache options",{type,parameters})}function standalone(options,fn){var _fn$name;let name=(_fn$name=fn.name)!=null?_fn$name:"fn",wrapper={[name]:fn},descriptor=Object.getOwnPropertyDescriptor(wrapper,name),decorator=cached(options),standalone_cache={[name]:decorator(wrapper,name,descriptor).value};return standalone_cache[name].bind(standalone_cache)}function make_decorator(wrapper_fn){return function(target,property_key,descriptor){return{...descriptor,value:wrapper_fn(property_key,descriptor.value)}}}function autorun_cache_decorator(){let options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(target,property_key,descriptor)=>({...descriptor,value:autorun_cache(extend({},{fn:descriptor.value},options))})}function run_cache(method_name,fn){return on_client()&&!is_edit_mode()?function(){let res=fn.call(this);return this[method_name]=()=>res,res}:fn}function run_cache_1_param(name,fn){return on_client()?function(arg){let key=name+"_run_cache_1_param";if(!this[key])if(lib_default().is_edit_mode())this[key]=fn;else{let _cache={};this[key]=function(arg2){var _cache$arg;return(_cache$arg=_cache[arg2])!=null||(_cache[arg2]=fn.call(this,arg2)),_cache[arg2]}}return this[key](arg)}:fn}function all_cache(name,fn){return function(){let res=fn.call(this);return this[name]=()=>res,res}}var RUN_MODE,ALL_MODES,AUTORUN,init_caching=__esm({"lib-browser/lang/caching.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_lib();RUN_MODE="run",ALL_MODES="all",AUTORUN="autorun"}});function _applyDecoratedDescriptor(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator46,_dec,_dec2,_class2,S3,_property_json_cache,HasProperties,init_HasProperties=__esm({"lib-browser/lang/nodes/HasProperties.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator46=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_b_fiber();init_logger();init_caching();init_registry();init_shrink();init_lang();init_nodes_utils();init_AppNode();init_appquery();init_btype_ids();({S:S3}=shrink_exports),_property_json_cache={},HasProperties=(_dec=cached({type:RUN_MODE,parameters:1}),_dec2=cached({type:RUN_MODE}),_class2=class extends AppNode{get_default(name){var _field_names$name;if(!this.field_names)throw new UnexpectedError("does not have field names defined: "+this);let field_names=this.field_names();return field_names===DETECT_FIELD_NAMES?null:(_field_names$name=field_names[name])==null?void 0:_field_names$name.default}get_custom_parameters(){var _param_node$entries,_param_node$entries2;let param_node=this.property("parameters");return((_param_node$entries=(_param_node$entries2=param_node.entries)==null?void 0:_param_node$entries2.call(param_node))!=null?_param_node$entries:[]).map(entry=>{var _entry$get_static_pro;let base_btype_id=(_entry$get_static_pro=entry.get_static_property("btype_id"))!=null?_entry$get_static_pro:entry.get_static_property("value"),is_list2=entry.get_static_property("is_list");return{param_id:entry.get_static_property("param_id"),param_name:entry.get_static_property("param_name"),optional:entry.get_static_property("optional"),btype_id:is_list2?list_type(base_btype_id):base_btype_id}})}preprocess_properties(properties,context){return properties}property(name){var _this$_property_owner;let path=`${appquery_default.app_version()}${this.json.path_cache()}${name}`,prop_json;if(on_server()){var _b_fiber$Fiber$curren,_b_fiber$Fiber$curren2;(_b_fiber$Fiber$curren2=(_b_fiber$Fiber$curren=Fiber.current)._property_json_cache)!=null||(_b_fiber$Fiber$curren._property_json_cache=new LRU({max:1e3,length:()=>1}));let cache_obj=Fiber.current._property_json_cache;cache_obj.has(path)?prop_json=cache_obj.get(path):(prop_json=this.json._gchild(S3.properties,shrink(name)),cache_obj.set(path,prop_json))}else{var _property_json_cache$;(_property_json_cache$=_property_json_cache[path])!=null||(_property_json_cache[path]=this.json._gchild(S3.properties,shrink(name))),prop_json=_property_json_cache[path]}return new_expression(prop_json,(_this$_property_owner=this._property_owner)!=null?_this$_property_owner:this)}get_static_property(name){let _raw3=this.json._raw_gchild(S3.properties,shrink(name));if(_raw3!=null)if(typeof _raw3=="object")switch(_raw3[S3.type]){case"Empty":return null;case"TextExpression":{var _raw$S$entries;let iterable=(_raw$S$entries=_raw3[S3.entries])!=null?_raw$S$entries:[],result=[];return Object.values(iterable).forEach(entry=>{entry!=null&&typeof entry=="object"&&verbose("stringifying object object",{_raw:_raw3}),result.push(entry)}),result.join("")}case"GeoAddressNode":return _raw3[shrink("val")];default:return _raw3}else return _raw3;else{var _this$get_default;return(_this$get_default=this.get_default(name))!=null?_this$get_default:null}}properties(){return enhance_array(this.json._child(S3.properties).children().map(json=>{var _this$_property_owner2;return new_expression(json,(_this$_property_owner2=this._property_owner)!=null?_this$_property_owner2:this)}))}},_applyDecoratedDescriptor(_class2.prototype,"get_static_property",[_dec],Object.getOwnPropertyDescriptor(_class2.prototype,"get_static_property"),_class2.prototype),_applyDecoratedDescriptor(_class2.prototype,"properties",[_dec2],Object.getOwnPropertyDescriptor(_class2.prototype,"properties"),_class2.prototype),_class2)}});var import_web_dom_collections_iterator47,HasID,init_HasID=__esm({"lib-browser/lang/nodes/HasID.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator47=__toESM(require_web_dom_collections_iterator());init_lib();init_HasProperties();init_nodes_utils();HasID=class extends HasProperties{exists(){return this.json.child("id").exists()}has_id(){return!0}is_malformed(){return!1}display(){return`AppNode<${this.id()}>`}}}});var exported,nodes_default,init_nodes=__esm({"lib-browser/lang/nodes/index.js"(){"use strict";init_define_process_env();init_shim();init_registry();init_node_types();init_AppNode();init_HasProperties();init_HasID();init_nodes_utils();exported={...nodes_utils_exports,...node_types_default,...registry_exports,AppNode,HasProperties,HasID},nodes_default=exported;add(node_types_default.APP_NODE,AppNode,{abstract:!0});add(node_types_default.HAS_PROPERTIES,HasProperties,{abstract:!0});add(node_types_default.HAS_ID,HasID,{abstract:!0})}});function expression_find_expressions(exp,filter){let results=[],{_raw:_raw3}=exp;if(!_raw3||typeof _raw3!="object")return results;let type=_raw3[S4.type];if(["Empty","GeoAddress"].includes(type))return results;if(type)if(type==="TextExpression")for(let sub of nodes_default.raw_children(exp,S4.entries))filter(sub)&&results.push(sub),results.push(...expression_find_expressions(sub,filter));else{if(_raw3[S4.properties])for(let sub of nodes_default.raw_children(exp,S4.properties))filter(sub)&&results.push(sub),results.push(...expression_find_expressions(sub,filter));if(type==="Message"&&_raw3[S4.args]){let sub=nodes_default.raw_child(exp,S4.args);sub&&(filter(sub)&&results.push(sub),results.push(...expression_find_expressions(sub,filter)))}if(_raw3[S4.next]){let sub=nodes_default.raw_child(exp,S4.next);sub&&(filter(sub)&&results.push(sub),results.push(...expression_find_expressions(sub,filter)))}}else for(let sub of nodes_default.raw_array_node(exp))filter(sub)&&results.push(sub),results.push(...expression_find_expressions(sub,filter));return results}var import_web_dom_collections_iterator48,S4,create_reduced,lit_eval_value,missing_datasource,init_expression_utils=__esm({"lib-browser/lang/expressions/expression_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator48=__toESM(require_web_dom_collections_iterator());init_nodes();init_shrink();init_hydrate();({S:S4}=shrink_exports),create_reduced=function(val,btype_id){return btype_id==="reduced"?val:{[S4.type]:"Dehydrated",[S4.properties]:{[S4.val]:dehydrate_tree(val),[S4.value_id]:btype_id}}},lit_eval_value=function(type){switch(type){case"string":return"text";case"boolean":return"sys.bool";case"number":return"number"}},missing_datasource=function(type){return{_fields:()=>[],field_names:{},get_unique_string(){},evaluate(){},get_btype:()=>"null",display:()=>"[missing: "+type+"]",check_for_errors(report){report("Could not find "+type)}}}}});var import_web_dom_collections_iterator49,db_values,db_values_default,init_db_values=__esm({"lib-browser/db/values/db_values.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator49=__toESM(require_web_dom_collections_iterator());init_value_types();init_registry2();db_values={registry:registry_exports2};Object.entries(value_types_default).forEach(_ref=>{let[name,type]=_ref;return db_values[name]=type});db_values_default=db_values}});var db_exports={};__export(db_exports,{ADMIN_USER_ID:()=>ADMIN_USER_ID,ALL_MAX:()=>ALL_MAX,ARCHIVED_DB_COUNT:()=>ARCHIVED_DB_COUNT,BATCH_SIZE:()=>BATCH_SIZE,BUCKET_GROUPINGS:()=>BUCKET_GROUPINGS,CALENDAR_GROUPINGS:()=>CALENDAR_GROUPINGS,CUSTOM_TABLE_NAME_PREFIX:()=>CUSTOM_TABLE_NAME_PREFIX,CUSTOM_TABLE_NAME_REGEX:()=>CUSTOM_TABLE_NAME_REGEX,DATA_PANEL_SEARCH_FAKE_EVAL_NODE:()=>DATA_PANEL_SEARCH_FAKE_EVAL_NODE,DONT_KNOW:()=>DONT_KNOW,LIST_WRAPPER_CLASS_NAME:()=>LIST_WRAPPER_CLASS_NAME,LOCAL_STORAGE_PREFIXES:()=>LOCAL_STORAGE_PREFIXES,MAX_GROUPING_CALL:()=>MAX_GROUPING_CALL,MAX_SEARCH_CHUNK:()=>MAX_SEARCH_CHUNK,NON_AUTHENTICATED_USER_ID:()=>NON_AUTHENTICATED_USER_ID,NO_DB_CONSTRAINTS:()=>NO_DB_CONSTRAINTS,NO_SEARCH_PATH:()=>NO_SEARCH_PATH,NO_USER:()=>NO_USER,POSTGRES_AUTOINDEX_KEY:()=>POSTGRES_AUTOINDEX_KEY,REDIS_AND_POSTGRES:()=>REDIS_AND_POSTGRES,REDIS_ONLY:()=>REDIS_ONLY,RetryError:()=>RetryError,SUPPORTED_AGGREGATIONS:()=>SUPPORTED_AGGREGATIONS,SYSTEM_TYPE_IDS:()=>SYSTEM_TYPE_IDS,SearchSituation:()=>SearchSituation,range_states:()=>range_states});var NO_USER,NO_SEARCH_PATH,ADMIN_USER_ID,NON_AUTHENTICATED_USER_ID,DATA_PANEL_SEARCH_FAKE_EVAL_NODE,MAX_SEARCH_CHUNK,DONT_KNOW,MAX_GROUPING_CALL,NO_DB_CONSTRAINTS,SUPPORTED_AGGREGATIONS,CALENDAR_GROUPINGS,BUCKET_GROUPINGS,SYSTEM_TYPE_IDS,ALL_MAX,ARCHIVED_DB_COUNT,range_states,RetryError,REDIS_ONLY,REDIS_AND_POSTGRES,BATCH_SIZE,POSTGRES_AUTOINDEX_KEY,CUSTOM_TABLE_NAME_PREFIX,CUSTOM_TABLE_NAME_REGEX,LIST_WRAPPER_CLASS_NAME,SearchSituation,LOCAL_STORAGE_PREFIXES,init_db=__esm({"lib-browser/constants/db.js"(){"use strict";init_define_process_env();init_shim();NO_USER="no_user",NO_SEARCH_PATH="no_search_path",ADMIN_USER_ID="admin_user",NON_AUTHENTICATED_USER_ID="non_authenticated_user",DATA_PANEL_SEARCH_FAKE_EVAL_NODE="<data admin panel>",MAX_SEARCH_CHUNK=400,DONT_KNOW="dontknow",MAX_GROUPING_CALL=100,NO_DB_CONSTRAINTS=["list.date_range","list.number_range","list.geographic_address"],SUPPORTED_AGGREGATIONS=["count","sum","product","average","median","min","max"],CALENDAR_GROUPINGS=["day","month"],BUCKET_GROUPINGS=["bucket","day","month"],SYSTEM_TYPE_IDS={MAGIC_LINK:"magic_link",PW_RESET:"password_reset",CONFIRMATION_EMAIL:"confirmation email entry",STRIPE_ORDER:"Order",STRIPE_SUBSCRIPTION_ORDER:"SubscriptionOrder"},ALL_MAX=1e12,ARCHIVED_DB_COUNT=-2,range_states=function(range_states2){return range_states2.LOADING="loading",range_states2.AVAILABLE="available",range_states2.ERROR="error",range_states2.NOT_STARTED="not_started",range_states2.DELETED="deleted",range_states2.PAST_END="past_end",range_states2.OFFLINE="offline",range_states2}({}),RetryError=class{},REDIS_ONLY="redis-only",REDIS_AND_POSTGRES="redis-and-postgres",BATCH_SIZE=100,POSTGRES_AUTOINDEX_KEY="postgres_auto_index",CUSTOM_TABLE_NAME_PREFIX="custom$0",CUSTOM_TABLE_NAME_REGEX=/^custom\$0/,LIST_WRAPPER_CLASS_NAME="ListWrapper",SearchSituation=function(SearchSituation2){return SearchSituation2.InitialSearch="initial search",SearchSituation2.Invalidation="invalidation",SearchSituation2.Unknown="unknown",SearchSituation2}({}),LOCAL_STORAGE_PREFIXES={BUBBLE_THING:"bubble_thing_",RESULT_DEP_ENTRY:"res_dep_",RESULT_CACHE_ENTRY:"res_cache_",VIEW_COUNT_ENTRY:"view_count_",OWNING_VIEW_ENTRY:"owning_view_",ASSET_ENTRY:"asset_"}}});var special_keys_exports={};__export(special_keys_exports,{ADVANCED_SEARCH_CONSTRAINT:()=>ADVANCED_SEARCH_CONSTRAINT,ALL_DB_FIELDS:()=>ALL_DB_FIELDS,DYNAMIC_SORTING_FIELD:()=>DYNAMIC_SORTING_FIELD,RANDOM_SORTING:()=>RANDOM_SORTING,UNIQUE_ID:()=>UNIQUE_ID});var ALL_DB_FIELDS,ADVANCED_SEARCH_CONSTRAINT,UNIQUE_ID,DYNAMIC_SORTING_FIELD,RANDOM_SORTING,init_special_keys=__esm({"lib-browser/constants/special_keys.js"(){"use strict";init_define_process_env();init_shim();ALL_DB_FIELDS="_all",ADVANCED_SEARCH_CONSTRAINT="_advanced_search_constraint",UNIQUE_ID="_id",DYNAMIC_SORTING_FIELD="_dynamic_sort_field",RANDOM_SORTING="_random_sorting"}});var Registry,plugins,providers,init_btypes_registry=__esm({"lib-browser/lang/btypes_registry.js"(){"use strict";init_define_process_env();init_shim();init_logger();Registry=class{constructor(){this.items={}}get(name){return this.items[name]}add(name,plugin2){name in this.items&&warn("Adding duplicate btype definition",{name}),this.items[name]=plugin2}keys(){return Object.keys(this.items)}values(){return Object.values(this.items)}entries(){return Object.entries(this.items)}},plugins=new Registry,providers=new Registry}});function get4(missing_id){let full_id=`${missing_btype_prefix} ${missing_id}`;return{name:missing_id,id:()=>full_id,is_missing:()=>!0,storable:!1,is_simple:!1,can_sort:!1,display:()=>missing_btype_display,display_for_issue(){let display2="a non-defined btype";return this.id().indexOf("_current")!==-1&&(display2+=" (reinitialize the plugin call)"),display2},debugging_display:function(val){return`(Value is of an unknown type ${missing_id} and cannot be displayed)`},matches:val=>val===missing_id||val===full_id,cast:()=>null,get_bubble_null:()=>null,get_message_names:()=>[],get_message:name=>{}}}var missing_btype_prefix,missing_btype_display,is_missing,strip_prefix,init_missing_btype=__esm({"lib-browser/lang/missing_btype.js"(){"use strict";init_define_process_env();init_shim();missing_btype_prefix="Missing btype:",missing_btype_display="Missing type... ",is_missing=id=>id.startsWith(missing_btype_prefix),strip_prefix=id=>is_missing(id)?id.slice(missing_btype_prefix.length+1):id}});var btypes_exports={};__export(btypes_exports,{Message:()=>Message,any:()=>any,compound:()=>compound,display_matcher:()=>display_matcher,get:()=>get5,get_display_for_btype:()=>get_display_for_btype,is_custom_type:()=>is_custom_type2,is_option_set:()=>is_option_set2,list:()=>list3,not_built_in:()=>not_built_in,saveable:()=>saveable,search:()=>search,stringable:()=>stringable});function get5(id){var _id;if((_id=id)!=null&&_id.get_message)return id;if(typeof id!="string"){if(id!=null){var _id2;info("non-string btype_id",{type:typeof id,stringified:(_id2=id)==null?void 0:_id2.toString()})}id="null"}return id!=null&&is_missing(id)?get_raw(strip_prefix(id)):get_raw(id==="date_unix"?"date":id)}function is_option_set2(btype_id){return typeof btype_id=="string"&&is_option_set(btype_id)}function search(filter){let basic_btypes=list3(),provider_btypes=providers.entries().filter(_ref3=>{let[_,def]=_ref3;return typeof def.list=="function"}).flatMap(_ref4=>{let[name,_]=_ref4;return list3(name)});return[...basic_btypes,...provider_btypes].filter(v=>v.matches(filter))}function mk_not(id){let fn=btype=>btype.id()!==id;return fn.display=()=>"anything but a "+get5(id).display(),fn}function mk_simple(btype1){function fn(btype2){return btype2.synonyms().includes(btype1.id())||btype1.synonyms().includes(btype2.id())}return fn.display=()=>"a "+btype1.display(),fn.display_for_issue=()=>btype1.display_for_issue(),fn}function mk_any(provider_id){let prefix=provider_id+".",fn=btype=>btype.id().startsWith(prefix);return fn.display=()=>"any "+get5(provider_id).display(),fn}function make_matcher(str_or_fn){if(typeof str_or_fn=="object"&&typeof str_or_fn.id=="function")return mk_simple(str_or_fn);if(typeof str_or_fn=="string")return str_or_fn.startsWith("!")?mk_not(str_or_fn.slice(1)):str_or_fn==="list*bindable"?compound:str_or_fn.endsWith("*")?mk_any(str_or_fn.slice(0,-1)):mk_simple(get5(str_or_fn));if(typeof str_or_fn=="function")return str_or_fn.display||(error("every matcher function must have a display function",{str_or_fn}),str_or_fn.display=()=>"a thing"),str_or_fn;throw new UnexpectedError("blank or invalid matcher",{str_or_fn})}function saveable(v){var _v$custom_type,_custom_type$deleted;let custom_type2=(_v$custom_type=v==null?void 0:v.custom_type())!=null?_v$custom_type:{};return!custom_type2.not_writeable&&!((_custom_type$deleted=custom_type2.deleted)!=null&&_custom_type$deleted.call(custom_type2))&&typeof custom_type2.writeable_fields=="function"}function display_matcher(v){var _val$display_for_issu,_val$display_for_issu2;let val=make_matcher(v);return(_val$display_for_issu=(_val$display_for_issu2=val.display_for_issue)==null?void 0:_val$display_for_issu2.call(val))!=null?_val$display_for_issu:val.display()}var import_web_dom_collections_iterator50,import_es_string_replace13,is_custom_type2,get_raw,get_btype,list3,get_display_for_btype,Btype,Message,any,compound,stringable,not_built_in,init_btypes=__esm({"lib-browser/lang/btypes.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator50=__toESM(require_web_dom_collections_iterator()),import_es_string_replace13=__toESM(require_es_string_replace());init_u2();init_decaf();init_btype_ids();init_lib();init_appquery();init_caching();init_logger();init_btypes_registry();init_missing_btype();is_custom_type2=btype_id=>btype_id==="user"||typeof btype_id=="string"&&is_custom_type(btype_id),get_raw=standalone({type:RUN_MODE,parameters:1},id=>get_btype(id!=null?id:"null",appquery_default.toUniqueString()));get_btype=autorun_cache((id,app_id)=>new Btype(id)),list3=autorun_cache(provider_id=>{var _provider$list;if(!provider_id)return plugins.entries().filter(_ref=>{let[_,plugin2]=_ref;return!plugin2.dont_list}).map(_ref2=>{let[name,_]=_ref2;return get5(name)});let pieces=provider_id.split("."),provider_plugin=lib_default().load_plugin(lib_default().plugin_prefixes.btype+pieces[0]),path=pieces.slice(1).join(".");return((_provider$list=(path===""?provider_plugin:provider_plugin.get(path)).list())!=null?_provider$list:[]).map(id=>get5(provider_id+"."+id))});get_display_for_btype=function(literal){var _btype$custom_type,_btype$custom_type$ca;if(literal==null)return null;if(typeof literal!="string")return String(literal);if(is_missing(literal))return literal;let btype=get5(literal),display2=btype==null?void 0:btype.display();return display2!=null&&(_btype$custom_type=btype.custom_type)!=null&&(_btype$custom_type$ca=_btype$custom_type.call(btype))!=null&&_btype$custom_type$ca.deleted()?display2+" (deleted)":display2!=null?display2:literal},Btype=class{constructor(id){this._id=typeof id=="string"?id:"null";let[name,...path_parts]=this._id.split("."),path=path_parts.join("."),namespace=lib_default().load_plugin(lib_default().plugin_prefixes.btype+name),plugin2=path!==""?namespace==null?void 0:namespace.get(path):namespace;this.plugin=typeof plugin2=="function"?plugin2():plugin2,this.plugin||(this.plugin=get4(this._id))}id(){return this._id}get_message(name){var _this$plugin$get_mess;let m_data=(_this$plugin$get_mess=this.plugin.get_message(name))!=null?_this$plugin$get_mess:{description:" [not found: "+name+"]",not_found:!0,fn:()=>{}};return new Message(name,m_data,this._id)}get_messages(lookup_only){return array_from(this.plugin.get_message_names({exclude_special_messages:lookup_only})).map(name=>this.get_message(name))}call(name,a,b,properties){return this.get_message(name).evaluate(a,b,properties)}display(){return this.plugin.display()}display_for_issue(){return typeof this.plugin.display_for_issue=="function"?this.plugin.display_for_issue():this.id()==="null"?"empty":this.display()}is_aggregate(){return this.plugin.is_aggregate}equals(a,b){return this.plugin.equals(a,b)}get_sample(){return this.plugin.get_sample()}get_bubble_null(){return typeof this.plugin.get_bubble_null!="function"?(warn("missing get_bubble_null",{btype:this}),null):this.plugin.get_bubble_null()}cast(data){var _this$plugin$cast;return typeof this.plugin.cast!="function"?data:(_this$plugin$cast=this.plugin.cast(data))!=null?_this$plugin$cast:null}is_missing(){var _this$plugin$is_missi,_this$plugin$is_missi2,_this$plugin;return(_this$plugin$is_missi=(_this$plugin$is_missi2=(_this$plugin=this.plugin).is_missing)==null?void 0:_this$plugin$is_missi2.call(_this$plugin))!=null?_this$plugin$is_missi:!1}from_human(string,context){return this.plugin.from_human?this.plugin.from_human(string,context):this.cast(string)}runmode_display(instance4,context){if(!this.plugin.runmode_display){var _window5;return(_window5=window)!=null&&_window5.current_user_is_admin&&console.log(`trying to render a ${this.id()} to string, but no V.runmode_display function`),""}return this.plugin.runmode_display(instance4,context)}has_runmode_display(){return this.plugin.runmode_display!=null}export_to_string(instance4,context){return this.plugin.export_to_string(instance4,context)}has_export_to_string(){return this.plugin.export_to_string!=null}debugging_display(instance4,context){return this.plugin.debugging_display(instance4,context)}has_debugging_display(){return this.plugin.debugging_display!=null}can_sort(){return this.plugin.can_sort}custom_type(){var _this$plugin$custom_t,_this$plugin2;return(_this$plugin$custom_t=(_this$plugin2=this.plugin).custom_type)==null?void 0:_this$plugin$custom_t.call(_this$plugin2)}option_set(){var _this$plugin$option_s,_this$plugin3;return(_this$plugin$option_s=(_this$plugin3=this.plugin).option_set)==null?void 0:_this$plugin$option_s.call(_this$plugin3)}can_get_JS_object(){return this.plugin.get_JS_object!=null?!0:(error("No get_JS_object for btype",{id:this._id}),!1)}get_JS_object(val){return this.plugin.get_JS_object(val)}can_JS_to_bubble(){return this.plugin.JS_to_bubble!=null}JS_to_bubble(val){return this.plugin.JS_to_bubble(val)}matches(str_or_fn){return typeof this.plugin.matches=="function"?this.plugin.matches(str_or_fn):make_matcher(str_or_fn)(this)}synonyms(){if(this.inner()){var _this$inner$plugin$sy;let inner_synonyms=(_this$inner$plugin$sy=this.inner().plugin.synonyms)!=null?_this$inner$plugin$sy:[];return[this.id(),...inner_synonyms.map(i=>list_type(i))]}else{var _this$plugin$synonyms;return[this.id(),...(_this$plugin$synonyms=this.plugin.synonyms)!=null?_this$plugin$synonyms:[]]}}storable(){return this.plugin.storable}bindable(){return this.plugin.bindable}get_composer_input_type(){return this.plugin.composer_input_type}inner(){var _this$plugin$inner,_this$plugin4;return(_this$plugin$inner=(_this$plugin4=this.plugin).inner)==null?void 0:_this$plugin$inner.call(_this$plugin4)}inner_including_ranges(){if(this.plugin.inner)return this.plugin.inner();let range2=/_range$/;return this.id().match(range2)?get5(this.id().replace(range2,"")):this}is_range(){return this.plugin.inner==null&&/_range$/.test(this.id())}is_list(){return this.plugin.is_list}};Message=class{constructor(name,M,btype){this.evaluate=this.evaluate.bind(this),this.evaluate_without_cast=this.evaluate_without_cast.bind(this),this._name=name,this.M=M,this.btype=btype,this.fn=this.M.fn}is_not_found(){return this.M.not_found}no_composer(node){var _this$M$no_composer,_this$M;return(_this$M$no_composer=(_this$M=this.M).no_composer)==null?void 0:_this$M$no_composer.call(_this$M,node)}has_args(){return this.M.arg_btype!=null}no_arg_no_properties(){return!this.has_args()&&this.spot_data()!=="SlidableAtom"}public_for_plugins(){return this.M.public_for_plugins}arg_btype(){return this.M.arg_btype?get5(this.M.arg_btype):null}name(){return this._name}is_client_state(){var _this$M$is_client_sta,_this$M$is_client_sta2,_this$M2;return(_this$M$is_client_sta=(_this$M$is_client_sta2=(_this$M2=this.M).is_client_state)==null?void 0:_this$M$is_client_sta2.call(_this$M2))!=null?_this$M$is_client_sta:!1}ret_btype_id(message_raw){if(typeof this.M.ret_btype=="function")return this.M.ret_btype(message_raw);var _this$M$ret_btype;return(_this$M$ret_btype=this.M.ret_btype)!=null?_this$M$ret_btype:"null"}ret_btype(message_raw){return get5(this.ret_btype_id(message_raw))}check_for_errors(node,report){this.M.check_for_errors&&this.M.check_for_errors(node,report)}ret_btype_null(){return this.ret_btype(...arguments).get_bubble_null()}spot_data(){return this.M.spot_data}fields(static_property,message_node){var _this$M$fields,_this$M$fields2,_this$M3;return(_this$M$fields=(_this$M$fields2=(_this$M3=this.M).fields)==null?void 0:_this$M$fields2.call(_this$M3,static_property,message_node))!=null?_this$M$fields:[]}field_names(){var _this$M$field_names;if(this.M.fields&&!this.M.field_names)throw new UnexpectedError("missing field_names for message "+this._name);return(_this$M$field_names=this.M.field_names)!=null?_this$M$field_names:{}}description(node,no_s){let options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=typeof this.M.description=="function"?this.M.description(node,options):this.M.description,initial_s=/^'s /;return no_s&&d.match(initial_s)?d.replace(initial_s,""):d}filter_context(context){if(context.owner_type==="PrivacyRole"){if(this.M.privacy_condition_okay===!1)return!1;let constraint=this.M.build_pg_constraint,binary_constraint=this.M.build_pg_relationship&&this.M.build_pg_r_constraint;return constraint&&(binary_constraint||!this.M.arg_btype)||["and_","or_"].includes(this._name)?!0:this.is_lookup()}let hide_in_states=["format_boolean","format_boolean_number"];return context.owner_type==="State"&&context.is_style&&hide_in_states.includes(this._name)?!1:this.M.filter_context?this.M.filter_context(context):!0}is_lookup(){return this.M.is_lookup}get_lookup_name(){return typeof this.M.is_lookup=="string"?this.M.is_lookup:this._name}evaluate(prev,arg_evaled,properties,_raw3,context){let result=this.evaluate_without_cast(prev,arg_evaled,properties,_raw3,context);return this.is_lookup()?this.ret_btype(_raw3).cast(result):result}evaluate_without_cast(prev,arg_evaled,properties,_raw3,context){var _prev$_type;let prev_type=prev==null||(_prev$_type=prev._type)==null?void 0:_prev$_type.call(prev);if(prev_type&&prev_type!==this.btype)return this.ret_btype(_raw3).get_bubble_null();if(this.is_lookup()){var _prev$child,_prev$child$call$get,_prev$child$call;return prev==null||(_prev$child=prev.child)==null||(_prev$child$call$get=(_prev$child$call=_prev$child.call(prev,this.get_lookup_name())).get)==null?void 0:_prev$child$call$get.call(_prev$child$call)}else return this.fn(prev,arg_evaled,properties,_raw3,context)}build_pg_relationship(col1,col2){return this.M.arg_btype==null?[this._name+" does not take args so no relationship"]:this.M.build_pg_relationship?[null,this.M.build_pg_relationship(col1,col2)]:["no pg relationship for "+this._name]}build_pg_constraint(col,val){return this.M.build_pg_constraint?[null,this.M.build_pg_constraint(col,val)]:["no pg constraint for "+this._name]}build_pg_r_constraint(col,val){return this.M.arg_btype==null?[this._name+" does not take args so no reversed"]:this.M.build_pg_r_constraint?[null,this.M.build_pg_r_constraint(col,val)]:["no pg reversed constraint for "+this._name]}no_frozen_state(_ref5){var _prev$query;let{prev}=_ref5;return(prev==null||(_prev$query=prev.query)==null?void 0:_prev$query.t)==="NodeList"||this.M.no_frozen_state}message_cache_id(_ref6){var _this$M$message_cache,_this$M4;let{raw,properties}=_ref6;return(_this$M$message_cache=(_this$M4=this.M).message_cache_id)==null?void 0:_this$M$message_cache.call(_this$M4,{raw,properties})}can_shortcircuit_args(){return this.M.can_shortcircuit_args}properties_for_pre_evaluation(_ref7){let{_properties}=_ref7;return this.M.properties_for_pre_evaluation?this.M.properties_for_pre_evaluation({_properties}):_properties}},any=v=>!0;any.display=()=>"any";saveable.display=()=>"anything saveable";saveable.get_name=()=>"saveable";compound=v=>v&&v.bindable();compound.display=()=>"any thing";stringable=v=>(v==null?void 0:v.has_runmode_display())&&v.id()!=="null";stringable.display=()=>"anything that can be printed as text";not_built_in=btype_id=>/^(list\.)?custom/.test(btype_id);not_built_in.display=()=>"anything that is not a built-in type"}});var require_main=__commonJS({"node_modules/ngeohash/main.js"(exports3,module2){init_define_process_env();init_shim();var BASE32_CODES="0123456789bcdefghjkmnpqrstuvwxyz",BASE32_CODES_DICT={};for(i=0;i<BASE32_CODES.length;i++)BASE32_CODES_DICT[BASE32_CODES.charAt(i)]=i;var i,encode4=function(latitude,longitude,numberOfChars){for(var chars=[],bits=0,bitsTotal=0,hash_value=0,maxlat=90,minlat=-90,maxlon=180,minlon=-180,mid;chars.length<numberOfChars;)if(bitsTotal%2===0?(mid=(maxlon+minlon)/2,longitude>mid?(hash_value=(hash_value<<1)+1,minlon=mid):(hash_value=(hash_value<<1)+0,maxlon=mid)):(mid=(maxlat+minlat)/2,latitude>mid?(hash_value=(hash_value<<1)+1,minlat=mid):(hash_value=(hash_value<<1)+0,maxlat=mid)),bits++,bitsTotal++,bits===5){var code=BASE32_CODES[hash_value];chars.push(code),bits=0,hash_value=0}return chars.join("")},encode_uint64=function(latitude,longitude,bitDepth){bitDepth=bitDepth||52;for(var bitsTotal=0,maxlat=90,minlat=-90,maxlon=180,minlon=-180,mid,combinedBits=0;bitsTotal<bitDepth;)combinedBits*=2,bitsTotal%2===0?(mid=(maxlon+minlon)/2,longitude>mid?(combinedBits+=1,minlon=mid):maxlon=mid):(mid=(maxlat+minlat)/2,latitude>mid?(combinedBits+=1,minlat=mid):maxlat=mid),bitsTotal++;return combinedBits},decode_bbox=function(hash_string){for(var islon=!0,maxlat=90,minlat=-90,maxlon=180,minlon=-180,hash_value=0,i2=0,l=hash_string.length;i2<l;i2++){var code=hash_string[i2].toLowerCase();hash_value=BASE32_CODES_DICT[code];for(var bits=4;bits>=0;bits--){var bit=hash_value>>bits&1;if(islon){var mid=(maxlon+minlon)/2;bit===1?minlon=mid:maxlon=mid}else{var mid=(maxlat+minlat)/2;bit===1?minlat=mid:maxlat=mid}islon=!islon}}return[minlat,minlon,maxlat,maxlon]},decode_bbox_uint64=function(hash_int,bitDepth){bitDepth=bitDepth||52;for(var bitsTotal=0,maxlat=90,minlat=-90,maxlon=180,minlon=-180,lat_bit=0,lon_bit=0,step=bitDepth/2,i2=0;i2<step;i2++)lon_bit=get_bit(hash_int,(step-i2)*2-1),lat_bit=get_bit(hash_int,(step-i2)*2-2),lat_bit===0?maxlat=(maxlat+minlat)/2:minlat=(maxlat+minlat)/2,lon_bit===0?maxlon=(maxlon+minlon)/2:minlon=(maxlon+minlon)/2;return[minlat,minlon,maxlat,maxlon]};function get_bit(bits,position){return bits/Math.pow(2,position)&1}var decode4=function(hash_string){var bbox=decode_bbox(hash_string),lat=(bbox[0]+bbox[2])/2,lon=(bbox[1]+bbox[3])/2,laterr=bbox[2]-lat,lonerr=bbox[3]-lon;return{latitude:lat,longitude:lon,error:{latitude:laterr,longitude:lonerr}}},decode_uint64=function(hash_int,bitDepth){var bbox=decode_bbox_uint64(hash_int,bitDepth),lat=(bbox[0]+bbox[2])/2,lon=(bbox[1]+bbox[3])/2,laterr=bbox[2]-lat,lonerr=bbox[3]-lon;return{latitude:lat,longitude:lon,error:{latitude:laterr,longitude:lonerr}}},neighbor=function(hashstring,direction){var lonlat=decode4(hashstring),neighbor_lat=lonlat.latitude+direction[0]*lonlat.error.latitude*2,neighbor_lon=lonlat.longitude+direction[1]*lonlat.error.longitude*2;return encode4(neighbor_lat,neighbor_lon,hashstring.length)},bboxes=function(minLat,minLon,maxLat,maxLon,numberOfChars){numberOfChars=numberOfChars||9;for(var hashSouthWest=encode4(minLat,minLon,numberOfChars),hashNorthEast=encode4(maxLat,maxLon,numberOfChars),latlon=decode4(hashSouthWest),perLat=latlon.error.latitude*2,perLon=latlon.error.longitude*2,boxSouthWest=decode_bbox(hashSouthWest),boxNorthEast=decode_bbox(hashNorthEast),latStep=Math.round((boxNorthEast[0]-boxSouthWest[0])/perLat),lonStep=Math.round((boxNorthEast[1]-boxSouthWest[1])/perLon),hashList=[],lat=0;lat<=latStep;lat++)for(var lon=0;lon<=lonStep;lon++)hashList.push(neighbor(hashSouthWest,[lat,lon]));return hashList},geohash2={encode:encode4,encode_uint64,decode:decode4,decode_uint64,decode_bbox,decode_bbox_uint64,neighbor,bboxes};module2.exports=geohash2}});var SAMPLE_VALUE,GEOHASH_PRECISION,init_geolocation=__esm({"lib-browser/constants/geolocation.js"(){"use strict";init_define_process_env();init_shim();SAMPLE_VALUE={lat:40.72743,lng:-74.00595,address:"175 Varick Street, New York, NY 10014, USA",components:{"street number":"175",street:"Varick Street",neighborhood:"Lower Manhattan",city:"New York","state code":"NY",state:"New York",county:"New York County","zip code":"10014",country:"United States","country code":"US"}},GEOHASH_PRECISION=15}});function is_hashed(hash2){if(typeof hash2!="string"||hash2.length<=GEOHASH_PRECISION)return!1;let first_sep=hash2.indexOf("/");if(first_sep===-1||first_sep!==GEOHASH_PRECISION)return!1;let maybe_hash_coordinates=hash2.substring(0,GEOHASH_PRECISION);return!/[^0-9b-hjkmnp-z]/.test(maybe_hash_coordinates)}function is_b_location(location2){return location2!=null&&location2.lat!=null&&location2.lng!=null}function to_json_components(address){let res={};for(let field in google_fields){let find2=function(){for(let google_field of possible_google_fields)for(let component of address.address_components)if(component.types.includes(google_field))return field_data.short?component.short_name:component.long_name;return null};var find=find2,_field_data$google_fi;let field_data=google_fields[field],possible_google_fields=(_field_data$google_fi=field_data.google_field)!=null?_field_data$google_fi:field;Array.isArray(possible_google_fields)||(possible_google_fields=[possible_google_fields]);let val=find2();val!=null&&(res[field]=val)}return res}function rehydrate_b_location(address){return typeof address!="string"||!address.includes(HYDRATE_STRING)?address:rehydrate_tree(lib_default.or_throw().db_instance(appquery_default.appname(),appquery_default.app_version()),address)}function round_lat_lng(data){data!=null&&data.lat&&data!=null&&data.lng&&(data.lat=Math.floor(data.lat*1e4)/1e4,data.lng=Math.floor(data.lng*1e4)/1e4)}function geographic_distance(point1,point2,unit){let R;unit==="miles"?R=3958:R=6371;let toRad=value=>value*Math.PI/180,dLat=toRad(point2.lat-point1.lat),dLon=toRad(point2.lng-point1.lng),lat1=toRad(point1.lat),lat2=toRad(point2.lat),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.sin(dLon/2)*Math.sin(dLon/2)*Math.cos(lat1)*Math.cos(lat2),c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return R*c}var import_web_dom_collections_iterator51,google_fields,init_b_location_utils=__esm({"lib-browser/geolocation/shared/b_location_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator51=__toESM(require_web_dom_collections_iterator());init_hydrate();init_lib();init_appquery();init_eval();init_geolocation();google_fields={"room number":{google_field:"room"},floor:{},"street number":{google_field:"street_number"},street:{google_field:"route"},neighborhood:{},premise:{},subpremise:{},city:{google_field:["locality","sublocality","postal_town"]},"state code":{google_field:"administrative_area_level_1",short:!0},state:{google_field:"administrative_area_level_1"},county:{google_field:"administrative_area_level_2"},"zip code":{google_field:"postal_code"},country:{},"country code":{google_field:"country",short:!0}}}});function get_from_cache(data,hasher){let key=hasher(data);return address_localization_cache[key]}function request_geocode(data,raw_resp_to_obj,extra_args,localization_hasher,request_geocode_impl2){let hash2=localization_hasher(data);return address_localization_cache[hash2]||request_geocode_impl2(data,raw_resp_to_obj,result=>{address_localization_cache[hash2]=result,(result==null?void 0:result.address)!=null&&(address_localization_cache[result.address]=result)},extra_args),address_localization_cache[hash2]}var address_localization_cache,init_shared_core=__esm({"lib-browser/geolocation/shared/shared_core.js"(){"use strict";init_define_process_env();init_shim();address_localization_cache={}}});function request_timezone(data){if(implementations===void 0)throw new UnexpectedError("Request Timezone Called before init");return implementations.request_timezone(data)}function request_autocomplete(data,cb){if(implementations===void 0)throw new UnexpectedError("Request Autocomplete called before init!");return implementations.request_autocomplete(data,cb)}function request_from_cache(data){if(implementations===void 0)throw new UnexpectedError("Request from cache called before init!");return get_from_cache(data,implementations.localization_hasher)}function request_geocode2(data,raw_resp_to_obj,extra_args){if(implementations===void 0)throw new UnexpectedError("Request Geocode Called Before Init!");return request_geocode(data,raw_resp_to_obj,extra_args,implementations.localization_hasher,implementations.request_geocode)}function init(category,new_implementations){if(implementations!==void 0&&implementations.prev_category!==category)throw new UnexpectedError("Conflicting initializes called!",{category,prev_category:implementations.prev_category});implementations={...new_implementations,prev_category:category}}var implementations,init_core2=__esm({"lib-browser/geolocation/core.js"(){"use strict";init_define_process_env();init_shim();init_errors();init_shared_core()}});var b_location_exports={};__export(b_location_exports,{convert_to_new_format:()=>convert_to_new_format,convert_to_old_format:()=>convert_to_old_format,ensure_valid_location:()=>ensure_valid_location,from_address:()=>from_address,from_place_id:()=>from_place_id,geographic_distance:()=>geographic_distance,get_address:()=>get_address,get_components:()=>get_components,google_fields:()=>google_fields,is_b_location:()=>is_b_location,is_equal:()=>is_equal,is_hashed:()=>is_hashed,rehydrate_b_location:()=>rehydrate_b_location,round_lat_lng:()=>round_lat_lng,to_json_components:()=>to_json_components});function ensure_valid_location(address,skip_components){return is_hashed(address)?convert_to_new_format(address,skip_components):is_b_location(address)?address:null}function convert_to_old_format(address){var _address$address;let precise_round=(num,decimals)=>Math.round(num*Math.pow(10,decimals))/Math.pow(10,decimals),components;return address.components?components="/"+JSON.stringify(address.components):address.address!=null?components="/"+JSON.stringify(get_components(address)):components="",geohash.encode(precise_round(address.lat,5),precise_round(address.lng,5),GEOHASH_PRECISION)+"/"+((_address$address=address.address)!=null?_address$address:"")+components}function convert_to_new_format(hash2,skip_components){let hash_coordinates=hash2.split("/")[0],{latitude,longitude}=geohash.decode(hash_coordinates),address=hash2.split("/")[1],components;return skip_components||(components=get_components({lat:latitude,lng:longitude,address})),{lat:latitude,lng:longitude,address,components}}function is_equal(a,b){let validA=ensure_valid_location(a);validA!=null&&(a=validA.address);let validB=ensure_valid_location(b);return validB&&(b=validB.address),a===b}function _extract_component(location2,extract_fn,throw_not_ready5){var _throw_not_ready;return location2==null||location2===""?extract_fn(null):(is_hashed(location2)&&(location2=convert_to_new_format(location2)),extract_fn(location2)?(typeof location2=="string"&&info("Unexpected, successfully extracted from string!",{location:location2}),extract_fn(location2)):((_throw_not_ready=throw_not_ready5)!=null||(throw_not_ready5=!1),extract_fn(typeof location2=="string"?_get_location_obj("geocode",{address:location2},{throw_not_ready:throw_not_ready5}):_get_location_obj("geocode_latlong",location2,{throw_not_ready:throw_not_ready5}))))}function get_address(location2){return _extract_component(location2,res=>{var _res$address;return(_res$address=res==null?void 0:res.address)!=null?_res$address:""})}function get_components(location2,throw_not_ready5){return _extract_component(location2,res=>res==null?void 0:res.components,throw_not_ready5)}function from_address(address,alert_on_failure){var _alert_on_failure;return(_alert_on_failure=alert_on_failure)!=null||(alert_on_failure=!1),ensure_valid_location(address)?ensure_valid_location(address):address===""||typeof address!="string"?address:_get_location_obj("geocode",{address},{alert_on_failure})}function from_place_id(place_id,alert_on_failure){var _alert_on_failure2;return(_alert_on_failure2=alert_on_failure)!=null||(alert_on_failure=!1),place_id===""||typeof place_id!="string"?place_id:_get_location_obj("geocode",{place_id},{alert_on_failure})}function _get_location_obj(type,data,extra_args){var _extra_args;if((_extra_args=extra_args)!=null||(extra_args={}),data.place_id==null&&data.address==null&&data.lat==null&&data.lng==null)return null;let request={request_type:type,language:lib_default.or_throw().app_language(),...data};round_lat_lng(request);function raw_response_to_obj(result){let{formatted_address}=result,components=to_json_components(result);function get_coord(value){return typeof value=="function"?value():value}return{lat:get_coord(result.geometry.location.lat),lng:get_coord(result.geometry.location.lng),address:formatted_address,placeId:result.place_id,components}}return request_geocode2(request,raw_response_to_obj,extra_args)}var geohash,init_b_location=__esm({"lib-browser/geolocation/b_location.js"(){"use strict";init_define_process_env();init_shim();init_lib();geohash=__toESM(require_main());init_b_location_utils();init_geolocation();init_core2();init_logger();init_b_location_utils()}});var import_web_dom_collections_iterator52,IN_MEMORY_SIZE,MAX_BATCHES,sort_constraints,constrain_equivalent,can_execute_in_memory,use_geographic_sorting,bad_in_memory_sorts,add_bad_in_memory_sort,can_sort_locally,QueryPlanner,init_query_planner=__esm({"lib-browser/db/query_planner.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator52=__toESM(require_web_dom_collections_iterator());init_mode_check();init_hydrate();init_db();init_special_keys();init_btypes();init_b_location();IN_MEMORY_SIZE=100,MAX_BATCHES=3,sort_constraints=function(constraints){return constraints.sort((a,b)=>{var _a$value,_b$value;let can_a=can_execute_in_memory(a),can_b=can_execute_in_memory(b);if(can_a!==can_b)return can_a?1:-1;let a_key=String(a.key)+a.constraint_type+JSON.stringify(dehydrate_tree((_a$value=a.value)!=null?_a$value:null)),b_key=String(b.key)+b.constraint_type+JSON.stringify(dehydrate_tree((_b$value=b.value)!=null?_b$value:null));return a_key<b_key?-1:b_key<a_key?1:0}),constraints},constrain_equivalent={equals:!0,"not equal":!0,is_empty:!0,is_not_empty:!0,in:!0,"not in":!0,contains:!0,"not contains":!0,empty:!0,"not empty":!0,"greater than":!0,gte:!0,"less than":!0,lte:!0,"not true":!0},can_execute_in_memory=function(constraint){if(constraint.key===ADVANCED_SEARCH_CONSTRAINT)return!0;if(["or","and"].includes(constraint.constraint_type)){for(let sub of constraint.opts)if(!can_execute_in_memory(sub))return!1;return!0}return constrain_equivalent[constraint.constraint_type]},use_geographic_sorting=function(type,sorts_list){for(let sort_item of sorts_list!=null?sorts_list:[]){if(sort_item.sort_field==null||typeof sort_item.sort_field!="object")continue;let message=get5(type).get_message(sort_item.sort_field.location_field);if(!(!message||message.ret_btype().id()!=="geographic_address")&&ensure_valid_location(sort_item.sort_field.geo_reference,!0))return!0}return!1},bad_in_memory_sorts=[],add_bad_in_memory_sort=sort=>bad_in_memory_sorts.push(sort),can_sort_locally=function(type,sorts_list,constraints){if(use_geographic_sorting(type,sorts_list))return!1;for(let sort of sorts_list!=null?sorts_list:[])if(sort.sort_field===RANDOM_SORTING)return!1;if(bad_in_memory_sorts.length>0){let stringified=JSON.stringify({type,sorts_list,constraints});for(let sort of bad_in_memory_sorts)if(sort===stringified)return!1}return!0},QueryPlanner=class{constructor(){this.root=void 0,this.root={}}update(type,constraints,sorts_list,stats,only_if_greater){var _this$root,_this$root$type;sort_constraints(constraints);let node=(_this$root$type=(_this$root=this.root)[type])!=null?_this$root$type:_this$root[type]={type,constraints:[]};for(let idx=0;idx<constraints.length;idx++){var _node,_node$children,_node$children2,_JSON$stringify,_node$children2$_JSON;let constraint=constraints[idx];(_node$children=(_node=node).children)!=null||(_node.children={}),node=(_node$children2$_JSON=(_node$children2=node.children)[_JSON$stringify=JSON.stringify(constraint)])!=null?_node$children2$_JSON:_node$children2[_JSON$stringify]={type,constraints:constraints.slice(0,+idx+1||void 0)}}if(sorts_list!=null){var _node2,_node2$searches,_node$searches,_JSON$stringify2,_node$searches$_JSON$;(_node2$searches=(_node2=node).searches)!=null||(_node2.searches={}),node=(_node$searches$_JSON$=(_node$searches=node.searches)[_JSON$stringify2=JSON.stringify(sorts_list)])!=null?_node$searches$_JSON$:_node$searches[_JSON$stringify2]={type,constraints,sorts_list}}if(stats.from!=null){var _node3,_node3$from,_node4,_node4$has_gaps,_node$from;(_node3$from=(_node3=node).from)!=null||(_node3.from=node.loaded),(_node4$has_gaps=(_node4=node).has_gaps)!=null||(_node4.has_gaps=node.loaded!=null&&(stats.from>node.loaded+1||node.from>stats.loaded+1)),node.from=Math.min((_node$from=node.from)!=null?_node$from:1/0,stats.from)}for(let k in stats){let v=stats[k];k!=="from"&&(!only_if_greater||node[k]==null||v>node[k])&&(node[k]=v)}}get_stats(type,constraints,sorts_list){sort_constraints(constraints);let node=this.root[type];if(node==null)return null;for(let idx=0;idx<constraints.length;idx++){var _node$children3;let constraint=constraints[idx];if(!((_node$children3=node.children)!=null&&_node$children3[JSON.stringify(constraint)]))return null;node=node.children[JSON.stringify(constraint)]}if(sorts_list!=null){var _node$searches2,_node$searches3;return(_node$searches2=node.searches)!=null&&_node$searches2[JSON.stringify(sorts_list)]?(_node$searches3=node.searches)==null?void 0:_node$searches3[JSON.stringify(sorts_list)]:null}else return node}node_to_search(node,default_sorts_list){var _node$sorts_list;return{t:"CallSearch",type:node.type,constraints:node.constraints,sorts_list:(_node$sorts_list=node.sorts_list)!=null?_node$sorts_list:default_sorts_list}}pick_search(type,constraints,sorts_list,n){sort_constraints(constraints);let sort_must_match=!can_sort_locally(type,sorts_list,constraints),sort_key=JSON.stringify(sorts_list),check_node=(node,remaining_idx,skipped)=>{let can_return_this_node,s_node,make_leftover=()=>skipped.concat(constraints.slice(remaining_idx));if(constraints[remaining_idx]&&!can_execute_in_memory(constraints[remaining_idx])?can_return_this_node=!1:can_return_this_node=!0,node.length!=null&&node.length<IN_MEMORY_SIZE&&can_return_this_node){if(!node.searches)return[node,make_leftover(),!0];if(node.searches[sort_key])return[node.searches[sort_key],make_leftover(),!0];if(!sort_must_match)for(let k in node.searches)return[node.searches[k],make_leftover(),!0]}if(node.children&&constraints.length>remaining_idx){let best=null;for(let idx=remaining_idx;idx<constraints.length;++idx)if(node.children[JSON.stringify(constraints[idx])]){let new_node=node.children[JSON.stringify(constraints[idx])],new_idx=idx+1,new_skipped=skipped.concat(constraints.slice(remaining_idx,idx)),bad_skip=!1;for(let c of new_skipped)if(!can_execute_in_memory(c)){bad_skip=!0;break}if(bad_skip)break;let res2=check_node(new_node,new_idx,new_skipped);if(res2!=null){if(res2[2])return res2;(best==null||res2[1].length<best[1].length)&&(best=res2)}}if(best!=null)return best}if(node.searches&&can_return_this_node)for(let s_key in node.searches){var _s_node$loaded,_s_node$loaded2;if(s_node=node.searches[s_key],sort_must_match&&s_key!==sort_key)continue;let{loading_to}=s_node;if(node.length!=null&&node.length<s_node.loading_to&&(loading_to=node.length),(loading_to-((_s_node$loaded=s_node.loaded)!=null?_s_node$loaded:0))/400>MAX_BATCHES)continue;if(node.length==null&&on_client()){if(n!=null&&n<IN_MEMORY_SIZE)continue;if(s_node.loaded<IN_MEMORY_SIZE)return[s_node,make_leftover(),!1];continue}let more_to_load=node.length-((_s_node$loaded2=s_node.loaded)!=null?_s_node$loaded2:0);if(!(n!=null&&more_to_load>1.5*n)){if(s_node.loading_to>node.length*.5&&more_to_load<MAX_BATCHES*400)return[s_node,make_leftover(),!1];if(more_to_load<2*IN_MEMORY_SIZE)return[s_node,make_leftover(),!1]}}return null},res=this.root[type]?check_node(this.root[type],0,[]):null,leftover,search2;if(res!=null){let node;[node,leftover]=res,search2=this.node_to_search(node,sorts_list)}else leftover=[],search2={t:"CallSearch",type,constraints,sorts_list};return{search:search2,leftover}}}}});function turn_search_properties_into_a_json(type,constraints,sorts_list){return json_stringify(dehydrate_tree({type,constraints:sort_constraints(Object.values(constraints!=null?constraints:{}).filter(item=>item!=null)),sorts_list}))}var MESSAGE_PREFIX,ELEMENT_PARENT_KEY,ELEMENT_ANCESTOR_KEY,exported2,state_keys_default,init_state_keys=__esm({"lib-browser/lang/evaluation/state_keys.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_hydrate();init_query_planner();MESSAGE_PREFIX="Message_",ELEMENT_PARENT_KEY="ElementParent",ELEMENT_ANCESTOR_KEY="ElementAncestor";exported2={CurrentUser:()=>"CurrentUser",Message(_ref){var _prev,_arg,_properties,_additional;let{prev,arg,message,properties,additional,prior_btype_id}=_ref;(_prev=prev)!=null||(prev=null),(_arg=arg)!=null||(arg=null),(_properties=properties)!=null||(properties={}),(_additional=additional)!=null||(additional="");let key_components=[json_stringify(dehydrate_tree(prev)),message,json_stringify(dehydrate_tree(arg)),json_stringify(dehydrate_tree(properties)),additional,prior_btype_id];return MESSAGE_PREFIX+key_components.join("_")},CurrentPageItem:()=>"CurrentPageItem",CurrentWorkflowItem:()=>null,PageData(name){return name==="Current Date/Time"?null:"PageData_"+name},APIEventParameter:key=>"APIEventParameter_"+key,ElementParent:()=>ELEMENT_PARENT_KEY,ElementAncestor:()=>ELEMENT_ANCESTOR_KEY,CurrentCellsIndex:()=>"CurrentCellsIndex",ThisElement(){},PreviousStep:action_id=>"PreviousStep_"+action_id,Search:(type,constraints,sorts_list)=>"Search_"+turn_search_properties_into_a_json(type,constraints,sorts_list),GetDataFromAPI:properties=>"GetDataFromAPI_"+JSON.stringify(dehydrate_tree(properties)),ArbitraryText:properties=>"ArbitraryText_"+JSON.stringify(dehydrate_tree(properties))},state_keys_default=exported2}});function verifyFrozenState(){if(!on_server())return!0}function eval_geo_address(_raw3){return[ensure_valid_location(_raw3[S5.val]),"geographic_address"]}function eval_text_expression(_raw3,context){let entries=_raw3[S5.entries],_entry_names=raw_to_child_names(entries),unjoined=[],unjoined_reduced=[],_reduced=!1;for(let _entry_name of _entry_names){let entry=entries[_entry_name],[evaled,btype_id]=evaluate(entry,context,null,null);if(btype_id==="reduced")_reduced=!0;else{let btype=get5(btype_id),has_runmode_display=btype.has_runmode_display(),casted_entry=has_runmode_display?btype.runmode_display(evaled,context):"";if(!has_runmode_display&&is_debug_mode()&&btype.id()!=="null"){var _owner$field;let can_call_field_method=value=>value==null?void 0:value.fields,eval_node=get_current_eval_node(),owner=eval_node==null?void 0:eval_node.owner,context_element=eval_node==null?void 0:eval_node.context_element(),property_name=can_call_field_method(owner)?`property ${String((_owner$field=owner.field(eval_node.node_name()))==null?void 0:_owner$field.caption)}`:"a property";owner_warn("trying to display a text value that cannot be displayed as text",{display:`"${String(context_element==null?void 0:context_element.display())}" - parts of property ${property_name} cannot be displayed as text, and will be omitted.`})}unjoined.push(casted_entry)}unjoined_reduced.push([evaled,btype_id])}return _reduced?[{[S5.type]:"TextExpression",[S5.entries]:unjoined_reduced.map(_ref=>{let[evaled,btype_id]=_ref;return create_reduced2(evaled,btype_id)})},"reduced"]:[unjoined.join(""),"text"]}function eval_object_literal(_raw3,context){if(is_json_class(_raw3))return[_raw3];let res={},reduced={},_reduced=!1;for(let k in _raw3){let v=_raw3[k],[evaled,btype_id]=evaluate(v,context,null,null);btype_id==="reduced"&&(_reduced=!0),res[expand(k)]=evaled,reduced[k]=[evaled,btype_id]}if(_reduced){let reduced_res={};for(let k in reduced){let[evaled,btype_id]=reduced[k];reduced_res[k]=create_reduced2(evaled,btype_id)}return[reduced_res,"reduced"]}else return[res]}function eval_live_expression(state_key,_eval,ret_btype_id,_raw3,context,is_client_state){function do_eval(){var _eval2;let v1=(_eval2=_eval())!=null?_eval2:null;if(v1!=null&&v1[NV_MARKER])return;let my_value=get5(ret_btype_id),casted_result=my_value.cast(v1);if(!isEqual_default(v1,casted_result)){var _v1$constructor$name,_casted_result$constr,_eval_node_state$get_;warn("cast resulted in change",{cast:{before:v1,before_constructor:(_v1$constructor$name=v1==null?void 0:v1.constructor.name)!=null?_v1$constructor$name:typeof v1,before_to_string:String(v1),after:casted_result,after_constructor:(_casted_result$constr=casted_result==null?void 0:casted_result.constructor.name)!=null?_casted_result$constr:typeof casted_result,after_to_string:String(casted_result),btype_id:my_value.id()},state_key,_raw:_raw3,current_eval_node:(_eval_node_state$get_=get_current_eval_node())==null?void 0:_eval_node_state$get_.serialize()})}return casted_result}let val,{frozen_state}=context;!state_key||!frozen_state?val=do_eval():frozen_state.has_key(state_key)&&(!verifyFrozenState()||is_client_state||frozen_state.is_trusted(state_key))?val=frozen_state.get(state_key):(frozen_state.has_key(state_key)&&verifyFrozenState()&&info("re-checking supplied frozen state"),val=do_eval(),frozen_state.set(state_key,val),frozen_state.trust(state_key));let next=_raw3[S5.next];return next!=null?evaluate(next,context,val,null,ret_btype_id):[val,ret_btype_id]}function reduce_bool(message_name,bool,raw,next,context){bool!==!0&&(bool=!1);let ret_btype_id,val;return message_name==="and_"&&bool===!1?(val=!1,ret_btype_id="sys.bool"):message_name==="or_"&&bool===!0?(val=!0,ret_btype_id="sys.bool"):(val=raw,ret_btype_id="reduced"),next!=null?evaluate(next,context,val,null,ret_btype_id):[val,ret_btype_id]}function eval_message(_raw3,context,prev,prior_btype_id){var _message$ret_btype$_i,_message$ret_btype,_message$is_client_st;let message_name=_raw3[S5.name],parent_value=prior_btype_id!=="reduced"?get5(prior_btype_id):void 0,message=parent_value==null?void 0:parent_value.get_message(message_name),ret_btype_id=(_message$ret_btype$_i=message==null||(_message$ret_btype=message.ret_btype(_raw3))==null?void 0:_message$ret_btype._id)!=null?_message$ret_btype$_i:"null",can_shortcircuit_args=message==null?void 0:message.can_shortcircuit_args(),can_do_shorthand=can_shortcircuit_args==null?void 0:can_shortcircuit_args(prev),_args=_raw3[S5.args],arg_evaled,arg_btype_id;if(can_do_shorthand?[arg_evaled,arg_btype_id]=[null,"null"]:_args!=null&&([arg_evaled,arg_btype_id]=evaluate(_args,context,null,null)),arg_btype_id==="reduced"||prior_btype_id==="reduced"){if(["and_","or_"].includes(message_name)&&(arg_btype_id!=="reduced"||prior_btype_id!=="reduced")){let bool,raw;return arg_btype_id!=="reduced"?(bool=unpack_reduced(arg_evaled),raw=prev):(bool=unpack_reduced(prev),raw=arg_evaled),reduce_bool(message_name,bool,raw,_raw3[S5.next],context)}return prev=create_reduced2(prev,prior_btype_id),reduce_message(_raw3,context,prev)}if(!message||message.is_not_found())return[null,"null"];if(message.ret_btype==null?warn("message missing ret_btype"):message.ret_btype().cast||warn("message has a ret_btype that cannot cast"),typeof message.field_names!="function")throw new UnexpectedError("Message does not have field_names()",{message_name,prior_btype_id,field_names:message.field_names});let _properties=message.properties_for_pre_evaluation({_properties:_raw3[S5.properties]}),names=message.field_names(),properties=evaluate_properties(_properties,context,names);if(properties===MUST_REDUCE)return prev=create_reduced2(prev,prior_btype_id),reduce_message(_raw3,context,prev);let state_key;if(message.no_frozen_state({prev}))state_key=null;else{let additional_key=message.message_cache_id({raw:_raw3,properties});state_key=state_keys_default.Message({prev,arg:arg_evaled,message:message_name,properties,additional:additional_key,prior_btype_id})}function _eval(){optional_pause("pre-message "+message_name);let ret=message.evaluate(prev,arg_evaled,properties,_raw3,context);return optional_pause("post-message "+message_name),ret}return eval_live_expression(state_key,_eval,ret_btype_id,_raw3,context,(_message$is_client_st=message==null?void 0:message.is_client_state())!=null?_message$is_client_st:!1)}function unpack_reduced(val){return(val==null?void 0:val[S5.type])!=="Dehydrated"||(val==null?void 0:val[S5.next])!=null?val:rehydrate_tree(lib_default.or_throw().db_instance(),val[S5.properties][S5.val])}function add_next(prev,next){prev=json_deep_copy(prev);let target=prev;for(;target[S5.next];)target=target[S5.next];return target[S5.next]=next,prev}function reduce_message(_raw3,context,prev){let message_name=_raw3[S5.name],new_arg;if(_raw3[S5.args]!=null){let[result,btype_id]=evaluate(_raw3[S5.args],context,null,null);new_arg=create_reduced2(result,btype_id)}let new_props,_properties=_raw3[S5.properties];_properties&&(new_props={},Object.entries(_properties).forEach(_ref2=>{let[k,v]=_ref2,[result,btype_id]=evaluate(v,context,null,null);new_props[k]=create_reduced2(result,btype_id)}));let new_raw_base={[S5.name]:message_name,[S5.properties]:new_props,[S5.args]:new_arg,[S5.type]:"Message"},new_raw=add_next(prev,new_raw_base);return reduce_next(new_raw,_raw3[S5.next],context)}function reduce_data_source(type,_raw3,context){let new_props,_properties=_raw3[S5.properties];_properties&&(new_props={},Object.entries(_properties).forEach(_ref3=>{let[k,v]=_ref3,[result,btype_id]=evaluate(v,context,null,null);new_props[k]=create_reduced2(result,btype_id)}));let new_raw={[S5.properties]:new_props,[S5.type]:type};return reduce_next(new_raw,_raw3[S5.next],context)}function reduce_next(prev,next,context){return next==null?[prev,"reduced"]:evaluate(next,context,prev,null,"reduced")}function reduce_injected(_raw3,context){let new_raw={[S5.type]:"InjectedValue"};return reduce_next(new_raw,_raw3[S5.next],context)}function eval_data_source(type,_raw3,context){var _Lib$or_throw$load_pl,_D$is_client_state,_D$is_client_state2;let D=(_Lib$or_throw$load_pl=lib_default.or_throw().load_plugin(`${lib_default.or_throw().plugin_prefixes.datasource}${type}`,!0))!=null?_Lib$or_throw$load_pl:missing_datasource(type),properties=evaluate_properties(_raw3[S5.properties],context,D.field_names);if(properties===MUST_REDUCE)return reduce_data_source(type,_raw3,context);let state_key=D.get_unique_string(properties,context.element),ret_btype_id=D.get_runmode_btype(_raw3,context,properties);ret_btype_id==null&&type!=="Dehydrated"&&warn("Missing ret_btype_id in data eval_data_source",{_raw:_raw3,type});function _eval(){let ret_btype=get5(ret_btype_id),post_ret_btype_id=ret_btype!=null&&ret_btype.is_missing()?void 0:ret_btype.id();return post_ret_btype_id&&ret_btype_id&&post_ret_btype_id!==ret_btype_id&&warn("bad btypes.get in eval_data_source",{post_ret_btype_id,ret_btype_id}),D.evaluate(properties,context,ret_btype,_raw3)}return eval_live_expression(state_key,_eval,ret_btype_id,_raw3,context,(_D$is_client_state=D==null||(_D$is_client_state2=D.is_client_state)==null?void 0:_D$is_client_state2.call(D,key=>properties[key]))!=null?_D$is_client_state:!1)}var import_web_dom_collections_iterator53,S5,MUST_REDUCE,evaluate_properties,evaluate_json,evaluate,reduce,create_reduced2,make_partial_expression_evaluator,init_evaluate=__esm({"lib-browser/lang/evaluation/evaluate.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator53=__toESM(require_web_dom_collections_iterator());init_lodash();init_u2();init_b_fiber();init_hydrate();init_logger();init_shared();init_eval();init_lang();init_nodes();init_expression_utils();init_json_utils();init_db_values();init_value_types();init_eval_node_state();init_state_keys();init_btypes();init_lib();init_b_location();init_shrink();init_node_types();init_loggable();init_u2();({S:S5}=shrink_exports),MUST_REDUCE={},evaluate_properties=function(_raw3,context,field_names){var _raw22;(_raw22=_raw3)!=null||(_raw3={});let props={};if(field_names===DETECT_FIELD_NAMES)for(let k in _raw3){let v=_raw3[k],[result,btype_id]=evaluate(v,context,null,null);if(btype_id==="reduced")return MUST_REDUCE;props[expand(k)]=result}else for(let name in field_names){let expr=_raw3[shrink(name)],field_default=field_names[name].default;switch(field_names[name].prop_type){case EVAL_TYPE.thunk:props[name]=inner_context=>{var _inner_context;(_inner_context=inner_context)!=null||(inner_context=context);let[result,btype_id]=evaluate(expr,inner_context,null,field_default);return btype_id==="reduced"?MUST_REDUCE:result};break;case EVAL_TYPE.skip:continue;case EVAL_TYPE.value:default:{var _context$on_property_;let[result,btype_id]=evaluate(expr,context,null,field_default);if(context==null||(_context$on_property_=context.on_property_evaluation)==null||_context$on_property_.call(context,name,result),btype_id==="reduced")return MUST_REDUCE;props[name]=result}}}return props},evaluate_json=(json,context,prev,default_value)=>evaluate(json._raw(),context,prev,default_value),evaluate=function(_raw3,context,prev,default_value,prior_btype_id){if(_raw3==null)return[default_value,"null"];let type=_raw3[S5.type];if(type)switch(type){case"Empty":return[default_value,"null"];case"Message":return eval_message(_raw3,context,prev,prior_btype_id);case"TextExpression":return eval_text_expression(_raw3,context);case"GeoAddress":return eval_geo_address(_raw3);default:return type==="InjectedValue"&&context.reduce_mode?reduce_injected(_raw3,context):eval_data_source(type,_raw3,context)}return typeof _raw3=="object"?eval_object_literal(_raw3,context):[_raw3,lit_eval_value(typeof _raw3)]},reduce=function(_raw3,context,return_simple){context=extend({},context,{reduce_mode:!0}),context.duplicated_from_context=context.object_id,context.object_id=UUID(),context.duplicated_at="evaluate.reduce";let[result,btype_id]=evaluate(_raw3,context,null,null);return return_simple?unpack_reduced(result):create_reduced2(result,btype_id)};create_reduced2=create_reduced;make_partial_expression_evaluator=function(context){let MessageNode2=nodes_default.get(node_types_default.MESSAGE_NODE);function _make_partial(exp){let source=exp;for(;source instanceof MessageNode2;)source=source.prior();function partial(exp2){let[prev,prior_btype_id]=exp2 instanceof MessageNode2?partial(exp2.prior()):[void 0,void 0],_raw3=json_deep_copy(exp2.json._raw());_raw3==null||delete _raw3[S5.next];try{return context.is_in_partial=!0,with_eval_node(source,()=>evaluate(_raw3,context,prev,null,prior_btype_id))}finally{context.is_in_partial=!1}}return partial(exp)}return _make_partial}}});var node_eval_exports={};__export(node_eval_exports,{eval_property:()=>eval_property,evaluate_action_clientside:()=>evaluate_action_clientside,evaluate_action_condition:()=>evaluate_action_condition,evaluate_action_properties:()=>evaluate_action_properties,evaluate_event_condition:()=>evaluate_event_condition,evaluate_properties:()=>evaluate_properties2,evaluate_state_condition:()=>evaluate_state_condition,evaluate_wf_properties:()=>evaluate_wf_properties});function evaluate_state_condition(state4,context){return with_eval_node(state4,()=>evaluate(state4.json._raw_child(S6.condition),context,null,null)[0])}function evaluate_event_condition(event,context,situation){return event.get_static_property("workflow_disabled")?!1:traceSpan("evaluate event condition",{},()=>{let result=eval_property(event,"condition",context,null,!0);return addTransactionLabels({"evaluation.condition_result":result,"workflow.situation":situation}),result})}function evaluate_action_condition(action,context){return on_server()&&action.check_use_visible()&&appquery_default().get_public_setting("use_visible")?!1:traceSpan("evaluate action condition",{},()=>{let result=eval_property(action,"condition",context,null,!0);return addTransactionLabels({"evaluation.condition_result":result}),result})}function evaluate_action_properties(action,context){return traceSpan("evaluate action properties",{"workflow.action.id":action.id(),"workflow.action.type":action.type()},()=>{let condition=evaluate_action_condition(action,context);if(!condition&&!action.A.handle_condition_internally)return{condition:!1};let prop_json_raw=action.json._child(S6.properties)._raw();add_evaluation_transaction_labels(prop_json_raw);let props_original=with_eval_node(action,()=>evaluate_properties(prop_json_raw,context,action.field_names())),props=action.preprocess_properties(props_original,context);return props.condition=condition,props})}function evaluate_properties2(node,context){if(!node)return null;if(is(node,node_types_default.ACTION))return evaluate_action_properties(node,context);let prop_json=node.json._child(S6.properties),props_original=with_eval_node(node,()=>evaluate_properties(prop_json._raw(),context,node.field_names()));return node.preprocess_properties(props_original,context)}function evaluate_wf_properties(node,context){var _Lib$workflow$debugge;if(is(node,node_types_default.GENERIC_EVENT))return autorun3.run_once(30,()=>({condition:evaluate_event_condition(node,context)}));let action_debugger_on=["slow","step_by_step"].includes((_Lib$workflow$debugge=lib_default().workflow.debugger)==null?void 0:_Lib$workflow$debugge.workflow_mode);if(node.does_fall_back_to_server()&&!action_debugger_on){let p=b_async3.Promise(null,"property evaluation"),has_volatile_expressions=["Search","GetDataFromAPI"].some(type=>node.find_expressions(type).length>0);if(context.server_workflow_completed||has_volatile_expressions)p.reject(new UnexpectedError("no local evaluation"));else{let old_autorun;try{old_autorun=async_state_default3.CurrentAutoRun,async_state_default3.CurrentAutoRun={_sources:null,_invalidate(){},invalidate(){},add_sub(){}},p.resolve(evaluate_properties2(node,context))}catch(err){p.reject(err)}finally{async_state_default3.CurrentAutoRun=old_autorun}}return p}return autorun3.run_once(30,()=>(context.initial_random_iterations==null&&context.random_generator?context.initial_random_iterations=context.random_generator.iterations:context.initial_random_iterations!=null&&(context.random_generator=new Random(context.random_seed,context.initial_random_iterations)),evaluate_properties2(node,context)))}function evaluate_action_clientside(action,context){return action.needs_clientside_properties()?evaluate_wf_properties(action,context):b_async3.Promise(null)}function eval_property(node,name,context,prev,default_value){return with_eval_node(node.property(name),()=>{let raw=node.json._raw_gchild(S6.properties,shrink(name));return add_evaluation_transaction_labels(raw),evaluate(raw,context,prev,default_value)[0]})}var autorun3,b_async3,S6,add_evaluation_transaction_labels,init_node_eval=__esm({"lib-browser/lang/evaluation/node_eval.js"(){"use strict";init_define_process_env();init_shim();init_mode_check();init_errors();autorun3=__toESM(require_autorun()),b_async3=__toESM(require_b_async());init_async_state3();init_uuid();init_lib();init_eval_node_state();init_appquery();init_registry();init_node_types();init_evaluate();init_apm();init_shrink();({S:S6}=shrink_exports);add_evaluation_transaction_labels=raw=>{addTransactionLabels({"evaluation.raw":JSON.stringify(expand_object(raw))})}}});var allow_overrides_check,init_allow_overrides_check=__esm({"lib-browser/lang/evaluation/allow_overrides_check.js"(){"use strict";init_define_process_env();init_shim();init_elements();allow_overrides_check=(element,name,element_fields)=>{var _element_fields,_ref,_element_fields$name;let element_version_number=element.element_version();(_element_fields=element_fields)!=null||(element_fields=element.definition_or_self.field_names());let sufficient_version=element_version_number>=VERSION_STYLE_OVERRIDES,legacy_overrides=(_ref=((_element_fields$name=element_fields[name])==null?void 0:_element_fields$name.allow_overrides)&&OLD_VERSION_OVERRIDE_PROPERTIES.includes(name))!=null?_ref:!1;return sufficient_version||legacy_overrides}}});var element_edit_eval_exports={};__export(element_edit_eval_exports,{edit_eval:()=>edit_eval,get_border_widths:()=>get_border_widths,get_container_width:()=>get_container_width});function edit_eval(name,instance4,element_arg){var _active_state$propert;let element=element_arg!=null?element_arg:instance4==null?void 0:instance4.element,style2=element.get_style_if_exists(),prop=null,editor_has_context=(instance4==null?void 0:instance4.responsive_mode())||((instance4==null?void 0:instance4.edit_mode())||(instance4==null?void 0:instance4.reusable_edit_mode()))&&instance4.element.is_responsive_v1()&&lib_default.or_throw().visual_edit.responsive_mode_box()==="responsive",context;editor_has_context&&(context=lib_default.or_throw().visual_edit.get_state_eval_context()),context&&(context=Object.assign(context,{element:instance4}));let states=[];style2&&element.is_styleable_property(name)&&states.push(...style2.states()),states.push(...element.states()),states.reverse();let active_state=states.find(state4=>state4.property_names().includes(name)?context?evaluate_state_condition(state4,context):element.is_on_edit_mode(state4):!1);if(prop=(_active_state$propert=active_state==null?void 0:active_state.property(name))!=null?_active_state$propert:null,prop===null&&style2&&element.is_styleable_property(name)&&(!allow_overrides_check(element,name)||element.definition_or_self.property(name).raw()==null)&&(prop=style2.property(name)),prop===null&&(prop=element.property(name)),prop.is_empty()){var _element$get_default;return(_element$get_default=element.get_default(name))!=null?_element$get_default:null}else{if(prop.is_static())return prop.get_static();{let field=element.field(name);if((field==null?void 0:field.editor)==="Color"&&field!=null&&field.dynamic){var _element$get_default2;return(_element$get_default2=element.get_default(name))!=null?_element$get_default2:null}if(prop.get_eval_value().matches("text")){let make_dynamic_null=element.type()==="HTML"&&name==="html";return prop.get_tree_display(make_dynamic_null)}return null}}}function get_container_width(element){if(element.E.get_container_width)return element.E.get_container_width(element);{let border_width=edit_eval("four_border_style",null,element)?_get_border_width(element,"left")+_get_border_width(element,"right"):2*_get_border_width(element);return element.get_width()-border_width}}function _get_border_width(element,side){let suffix=side?`_${side}`:"",style2=edit_eval(`border_style${suffix}`,null,element);if(style2===void 0||style2==="none")return 0;var _edit_eval;return(_edit_eval=edit_eval(`border_width${suffix}`,null,element))!=null?_edit_eval:0}function get_border_widths(element){let sides=["left","right","bottom","top"],widths={};if(edit_eval("four_border_style",null,element))for(let side of sides)widths[side]=_get_border_width(element,side);else{let border_width=_get_border_width(element);for(let side of sides)widths[side]=border_width}return widths}var import_web_dom_collections_iterator54,init_element_edit_eval=__esm({"lib-browser/lang/evaluation/element_edit_eval.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator54=__toESM(require_web_dom_collections_iterator());init_lib();init_node_eval();init_allow_overrides_check()}});var fonts_exports={};__export(fonts_exports,{ALL_WEIGHTS:()=>ALL_WEIGHTS,CUSTOM_FONT_FLAG:()=>CUSTOM_FONT_FLAG,DEFAULT_CSS_TOKEN:()=>DEFAULT_CSS_TOKEN,DEFAULT_FAMILY:()=>DEFAULT_FAMILY,DEFAULT_FONT:()=>DEFAULT_FONT,DEFAULT_FONT_FAMILY_DROPDOWN:()=>DEFAULT_FONT_FAMILY_DROPDOWN,DEFAULT_FONT_SIZE:()=>DEFAULT_FONT_SIZE,DEFAULT_TOKENS:()=>DEFAULT_TOKENS,DEFAULT_WEIGHT:()=>DEFAULT_WEIGHT,FONT_STYLE_LIST:()=>FONT_STYLE_LIST,FONT_TOKEN_NAME_AND_WEIGHT:()=>FONT_TOKEN_NAME_AND_WEIGHT,FONT_VARIANTS:()=>FONT_VARIANTS,FONT_VARIANT_TO_NAME:()=>FONT_VARIANT_TO_NAME,MISSING_USER_FONT_TOKEN_TEXT:()=>MISSING_USER_FONT_TOKEN_TEXT,NAMED_WEIGHTS:()=>NAMED_WEIGHTS,SPECIAL_DISPLAY:()=>SPECIAL_DISPLAY,TOKEN_DESCRIPTIONS:()=>TOKEN_DESCRIPTIONS,TOKEN_NAMES:()=>TOKEN_NAMES});var DEFAULT_FONT,DEFAULT_FAMILY,DEFAULT_WEIGHT,DEFAULT_FONT_SIZE,ALL_WEIGHTS,NAMED_WEIGHTS,TOKEN_NAMES,TOKEN_DESCRIPTIONS,DEFAULT_TOKENS,CUSTOM_FONT_FLAG,MISSING_USER_FONT_TOKEN_TEXT,DEFAULT_CSS_TOKEN,FONT_TOKEN_NAME_AND_WEIGHT,FONT_VARIANTS,SPECIAL_DISPLAY,FONT_VARIANT_TO_NAME,FONT_STYLE_LIST,DEFAULT_FONT_FAMILY_DROPDOWN,init_fonts=__esm({"lib-browser/constants/fonts.js"(){"use strict";init_define_process_env();init_shim();DEFAULT_FONT="Lato:::",DEFAULT_FAMILY="Lato",DEFAULT_WEIGHT="400",DEFAULT_FONT_SIZE=14,ALL_WEIGHTS=["100","200","300","400","500","600","700","800","900"],NAMED_WEIGHTS={regular:"400",bold:"700"},TOKEN_NAMES=function(TOKEN_NAMES2){return TOKEN_NAMES2.default="App Font",TOKEN_NAMES2}({}),TOKEN_DESCRIPTIONS=function(TOKEN_DESCRIPTIONS2){return TOKEN_DESCRIPTIONS2.default="Applied to all elements using App Font as their font family in styles.",TOKEN_DESCRIPTIONS2}({}),DEFAULT_TOKENS=function(DEFAULT_TOKENS2){return DEFAULT_TOKENS2.default="Lato",DEFAULT_TOKENS2}({}),CUSTOM_FONT_FLAG=":::custom",MISSING_USER_FONT_TOKEN_TEXT="Custom font (MISSING)",DEFAULT_CSS_TOKEN="var(--font_default)",FONT_TOKEN_NAME_AND_WEIGHT=/var\(--font_(.*)\)(.*)/,FONT_VARIANTS=["default"],SPECIAL_DISPLAY={100:"100 (Thin)",200:"200 (Extra Light)",300:"300 (Light)",400:"400 (Regular)",500:"500 (Medium)",600:"600 (Semi Bold)",700:"700 (Bold)",800:"800 (Extra Bold)",900:"900 (Black)"},FONT_VARIANT_TO_NAME={100:"thin",200:"extraLight",300:"light",400:"regular",500:"medium",600:"semiBold",700:"bold",800:"extraBold",900:"black"},FONT_STYLE_LIST=["bold","italic","underline"],DEFAULT_FONT_FAMILY_DROPDOWN="Source Sans Pro"}});var DELETED_USER_TOKEN_STRING,DEFAULT_USER_TOKENS,init_tokens=__esm({"lib-browser/constants/tokens.js"(){"use strict";init_define_process_env();init_shim();DELETED_USER_TOKEN_STRING=" (DELETED)",DEFAULT_USER_TOKENS={default:{}}}});var webfonts_exports={};__export(webfonts_exports,{active_key:()=>active_key,already_loaded:()=>already_loaded,check_font_valid:()=>check_font_valid,clean_list:()=>clean_list,convert_all_legacy:()=>convert_all_legacy,convert_if_legacy:()=>convert_if_legacy,font_token_to_font:()=>font_token_to_font,fontface_key:()=>fontface_key,fontface_keys:()=>fontface_keys,get_canonical:()=>get_canonical,get_face_and_variant:()=>get_face_and_variant,get_full_clean_list:()=>get_full_clean_list,get_full_clean_list_mobile:()=>get_full_clean_list_mobile,get_quoted_face_and_variant:()=>get_quoted_face_and_variant,get_unquoted_face_and_variant:()=>get_unquoted_face_and_variant,is_user_font_token:()=>is_user_font_token,load_app_fonts:()=>load_app_fonts,load_default_fonts:()=>load_default_fonts,load_external:()=>load_external,load_font:()=>load_font,load_for_preview:()=>load_for_preview,pretty_font:()=>pretty_font,standardized_name:()=>standardized_name,substitute_font_token:()=>substitute_font_token,to_font_face:()=>to_font_face,to_google_list:()=>to_google_list});function convert_if_legacy(font){let{font_family,variant}=get_unquoted_face_and_variant(font);return font_family in renamed_fonts?standardized_name({font_family:renamed_fonts[font_family],variant}):font}function convert_all_legacy(font_list){for(let i=0;i<font_list.length;i++)font_list[i]=convert_if_legacy(font_list[i])}function standardized_name(data){return data.variant?`${data.font_family}:::${data.variant}`:`${data.font_family}:::`}function get_unquoted_face_and_variant(val){if(!val)return{};if(!val.includes(":::"))return{font_family:val,variant:null};let split=val.split(":::");return{font_family:split.slice(0,split.length-1).join(":::"),variant:split[split.length-1]||null}}function get_quoted_face_and_variant(val){let font_data=get_unquoted_face_and_variant(val);return val!=null&&val.includes("var(")||(font_data.font_family=`'${font_data.font_family}'`),font_data}function get_face_and_variant(val){var _window5;return val=convert_if_legacy(val),typeof window<"u"&&(_window5=window)!=null&&_window5.google_web_fonts_active?get_quoted_face_and_variant(val):get_unquoted_face_and_variant(val)}function get_canonical(val){if(val)return standardized_name(get_face_and_variant(val))}function font_token_to_font(val){let font_token=val.match(FONT_TOKEN_NAME_AND_WEIGHT)[1];if(is_user_font_token(font_token)){var _appquery$get_public_,_font_tokens_user$var,_font_tokens_user$var2;let font_tokens_user=(_appquery$get_public_=appquery_default.get_public_setting("font_tokens_user"))!=null?_appquery$get_public_:json_deep_copy(DEFAULT_USER_TOKENS),[uid,variant]=font_token.split("_"),token_props=(_font_tokens_user$var=font_tokens_user[variant])!=null&&(_font_tokens_user$var2=_font_tokens_user$var[uid])!=null&&_font_tokens_user$var2.font_family?font_tokens_user[variant][uid]:{name:MISSING_USER_FONT_TOKEN_TEXT,font_family:DEFAULT_FAMILY};return{font_token,token_name:token_props.name,font_family:token_props.font_family.replace(CUSTOM_FONT_FLAG,"")}}else{var _appquery$get_public_2;let font_tokens2=(_appquery$get_public_2=appquery_default.get_public_setting("font_tokens"))!=null?_appquery$get_public_2:DEFAULT_TOKENS;return{font_token,token_name:TOKEN_NAMES[font_token],font_family:font_tokens2[font_token].replace(CUSTOM_FONT_FLAG,"")}}}function substitute_font_token(val){return val.replace(FONT_TOKEN_NAME_AND_WEIGHT,(_,token,weight)=>{if(is_user_font_token(token)){var _appquery$get_public_3;let font_tokens_user=(_appquery$get_public_3=appquery_default.get_public_setting("font_tokens_user"))!=null?_appquery$get_public_3:json_deep_copy(DEFAULT_USER_TOKENS),[uid,variant]=token.split("_"),token_props=font_tokens_user[variant][uid];return token_props.font_family.includes(CUSTOM_FONT_FLAG)?token_props.font_family:token_props.font_family+weight}else{var _appquery$get_public_4;let font_tokens2=(_appquery$get_public_4=appquery_default.get_public_setting("font_tokens"))!=null?_appquery$get_public_4:DEFAULT_TOKENS;return font_tokens2[token].includes(CUSTOM_FONT_FLAG)?font_tokens2[token]:font_tokens2[token]+weight}})}function pretty_font(val){let{font_family,variant}=get_face_and_variant(val),res=font_family;if(font_family!=null&&font_family.includes("var(")){let name_and_family=font_token_to_font(font_family);res=`${name_and_family.token_name} (${name_and_family.font_family})`}return variant!=null&&variant!=="custom"&&(res+=` (${variant})`),res}function load_font(font,text_sampling){var _text_sampling;let cb=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;(_text_sampling=text_sampling)!=null||(text_sampling=!1),font&&(font=get_canonical(font),is_font_loaded(font)||(get_face_and_variant(font).variant==="custom"?load_external(get_face_and_variant(font).font_family):load_from_google([font],cb,text_sampling)))}function load_external(font,css_path){let{font_family}=get_quoted_face_and_variant(font);already_loaded.push(`${font_family}${CUSTOM_FONT_FLAG}`);let WebFontConfig={custom:{families:[font_family],urls:[css_path]}};window.WebFont.load(WebFontConfig)}function to_google_format(font){let{font_family,variant}=get_face_and_variant(font);return variant?`${font_family}:${variant}`:font_family}function load_fonts_list(list4){let non_loaded_fonts=list4.filter(font=>!is_font_loaded(font));non_loaded_fonts.length>0?load_from_google(non_loaded_fonts,()=>active_key.turn()):active_key.turn()}function load_for_preview(list4,cb){convert_all_legacy(list4);let non_loaded_fonts=list4.filter(font=>!is_font_loaded(font));non_loaded_fonts.length!==0&&load_from_google(non_loaded_fonts,cb)}function is_font_loaded(family){return already_loaded.includes(family)||non_google_fonts.includes(family)}function load_from_google(list4){var _text_sampling2;let cb=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,text_sampling=arguments.length>2?arguments[2]:void 0;(_text_sampling2=text_sampling)!=null||(text_sampling=!1);for(let font of list4)already_loaded.push(font);filter_out_unsupported_fonts_client(list4,filtered_fonts=>{filtered_fonts.length<1&&(filtered_fonts=["Lato"]);let WebFontConfig={google:{families:filtered_fonts},active(){cb==null||cb()}};text_sampling&&list4.length===1&&(WebFontConfig.google.text=pretty_font(list4[0])),window.WebFont.load(WebFontConfig)})}function clean_list(fonts){return fonts.filter(font_face=>{let canonical_font_face=get_canonical(font_face);return canonical_font_face&&typeof canonical_font_face=="string"&&!non_google_fonts.includes(canonical_font_face)})}function to_google_list(fonts){return fonts.filter(Boolean).map(font=>to_google_format(font))}function load_app_fonts(){autorun4.run_once(60,()=>{var _Lib$app$get_public_s;return{fonts_used_in_app:lib_default().derived("AppFonts").content(),custom_fonts_installed:(_Lib$app$get_public_s=lib_default().app().get_public_setting("fonts"))!=null?_Lib$app$get_public_s:{}}},(err,results)=>{err&&(log(err),results={needed_fonts:[],fonts_used_in_app:[],custom_fonts_installed:{}});let fonts=results.fonts_used_in_app.concat(preloaded_fonts);convert_all_legacy(fonts),load_fonts_list(fonts),load_custom_fonts(results.custom_fonts_installed)})}function load_custom_fonts(custom_fonts_setting){window.WebFont.load({custom:{families:Object.keys(custom_fonts_setting),urls:Object.values(custom_fonts_setting)}})}function load_default_fonts(){load_fonts_list(preloaded_fonts)}function check_font_valid(name,url9,valid_cb,invalid_cb){let testStrings={};testStrings[name]=FONT_TEST_STRING;let WebFontConfig={custom:{families:[name],urls:[url9],testStrings},active(){valid_cb==null||valid_cb(name,url9)},fontinactive(){invalid_cb==null||invalid_cb(name,url9),console.log(`fontinactive being called for ${name}, Google says the fonts didnt render`)}};window.WebFont.load(WebFontConfig)}function get_full_clean_list(input_fonts){let all_fonts=[];for(let font_name of input_fonts){let font_data=get_face_and_variant(font_name);if(!LINKED_VARIANTS.includes(font_data.variant)){all_fonts.push(font_name);continue}let all_variants=get_all_variants(font_name);if(all_variants==null){all_fonts.push(font_name);continue}for(let linked_variant of LINKED_VARIANTS)if(all_variants.includes(linked_variant)){let canonical_font=standardized_name({font_family:font_data.font_family,variant:linked_variant});all_fonts.includes(canonical_font)||all_fonts.push(canonical_font)}}return clean_list(all_fonts)}function getSynonymousWeightFromValue(synonymousWeights,variant){var _Object$keys$filter;return(_Object$keys$filter=Object.keys(synonymousWeights).filter(key=>synonymousWeights[key]===variant))==null?void 0:_Object$keys$filter[0]}function get_full_clean_list_mobile(input_fonts){let all_fonts=[];for(let font_name of input_fonts){var _SYNONYMOUS_FONT_WEIG;let font_data=get_face_and_variant(font_name),synonymous_weight=(_SYNONYMOUS_FONT_WEIG=SYNONYMOUS_FONT_WEIGHTS_MOBILE[font_data.variant])!=null?_SYNONYMOUS_FONT_WEIG:getSynonymousWeightFromValue(SYNONYMOUS_FONT_WEIGHTS_MOBILE,font_data.variant);if(!Object.keys(LINKED_VARIANTS_MOBILE).includes(font_data.variant)&&!Object.keys(LINKED_VARIANTS_MOBILE).includes(synonymous_weight)){all_fonts.push(font_name);continue}let all_variants=get_all_variants(font_name);if(all_variants==null){all_fonts.push(font_name);continue}for(let linked_variant of(_ref2=(_LINKED_VARIANTS_MOBI=LINKED_VARIANTS_MOBILE[font_data.variant])!=null?_LINKED_VARIANTS_MOBI:LINKED_VARIANTS_MOBILE[synonymous_weight])!=null?_ref2:[]){var _ref2,_LINKED_VARIANTS_MOBI,_SYNONYMOUS_FONT_WEIG2;let synonymous_linked_variant=(_SYNONYMOUS_FONT_WEIG2=SYNONYMOUS_FONT_WEIGHTS_MOBILE[linked_variant])!=null?_SYNONYMOUS_FONT_WEIG2:getSynonymousWeightFromValue(SYNONYMOUS_FONT_WEIGHTS_MOBILE,linked_variant);if(all_variants.includes(linked_variant)||all_variants.includes(synonymous_linked_variant)){let canonical_font=standardized_name({font_family:font_data.font_family,variant:linked_variant});all_fonts.includes(canonical_font)||all_fonts.push(canonical_font)}}}return clean_list(all_fonts)}function to_font_face(font_family,font_weight){return font_family in renamed_fonts&&(font_family=renamed_fonts[font_family]),font_family==null?null:font_family.includes(CUSTOM_FONT_FLAG)?font_family:standardized_name({...get_unquoted_face_and_variant(font_family),variant:font_weight})}function is_user_font_token(token){var _Object$keys;return!((_Object$keys=Object.keys(DEFAULT_TOKENS))!=null&&_Object$keys.includes(token))}var import_web_dom_collections_iterator55,import_es_string_replace14,autorun4,b_async4,preloaded_fonts,non_google_fonts,renamed_fonts,already_loaded,FONT_TEST_STRING,active_key,fontface_key,fontface_keys,_window$fontface_load,_fontface_keys$alread,LINKED_VARIANTS,LINKED_VARIANTS_MOBILE,SYNONYMOUS_FONT_WEIGHTS_MOBILE,init_webfonts=__esm({"lib-browser/webfonts.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator55=__toESM(require_web_dom_collections_iterator()),import_es_string_replace14=__toESM(require_es_string_replace()),autorun4=__toESM(require_autorun());init_mode_check();init_errors();init_b_object();b_async4=__toESM(require_b_async());init_logger();init_fonts();init_tokens();init_appquery();init_lib();preloaded_fonts=["Arial:::","Tinos:::","Raleway:::","Cousine:::","Open Sans:::","Open Sans:::600","Noto Sans:::","Noto Serif:::","EB Garamond:::","PT Sans:::","Ubuntu:::","Lato:::","Oswald:::","ABeeZee:::","Source Sans 3:::300","Source Sans 3:::400"],non_google_fonts=["Arial:::","Times New Roman:::","Courier New:::","Georgia:::","Trebuchet MS:::","Verdana:::","Palatino:::","Garamond:::","Bookman:::","Avant Garde:::","Arial Black:::","Impact:::"],renamed_fonts={"Source Sans Pro":"Source Sans 3","Source Serif Pro":"Source Serif 4","Droid Sans":"Noto Sans","Droid Serif":"Noto Serif"},already_loaded=[],FONT_TEST_STRING=["BESbswy","\u0623\u0633\u0626\u0644\u0629 \u0648\u0623\u062C\u0648\u0628\u0629"].join("");active_key=b_async4.MakeKey(null,"webfonts.active_key"),fontface_key=b_async4.MakeKey(null,"webfonts.fontface_key"),fontface_keys={};if(typeof window<"u"&&window!==null&&!on_react_native()){window.google_web_fonts_active?active_key.turn():window.google_web_fonts_active_cb=()=>active_key.turn();for(let already_loaded_font of Object.keys((_window$fontface_load=window.fontface_loaded)!=null?_window$fontface_load:{}).concat(non_google_fonts))(_fontface_keys$alread=fontface_keys[already_loaded_font])!=null||(fontface_keys[already_loaded_font]=b_async4.MakeKey(null,`webfont.fontface_key_${already_loaded_font}`)),fontface_keys[already_loaded_font].turn();window.all_fontface_loaded?fontface_key.turn():window.fontface_webfonts_loaded_cb=function(font){if(font!=null){var _fontface_keys$font;(_fontface_keys$font=fontface_keys[font])!=null||(fontface_keys[font]=b_async4.MakeKey(null,`webfont.fontface_key_${font}`)),fontface_keys[font].turn()}else fontface_key.turn()}}else active_key.turn(),fontface_key.turn();LINKED_VARIANTS=["regular","italic"];LINKED_VARIANTS_MOBILE={regular:["regular","italic","700","700italic"],italic:["italic","regular"],100:["100","100italic","700","700italic"],200:["200","200italic","700","700italic"],300:["300","300italic","700","700italic"],500:["500","500italic","700","700italic"],600:["600","600italic","700","700italic"],700:["700","700italic"],800:["800","800italic","700","700italic"],900:["900","900italic","700","700italic"]},SYNONYMOUS_FONT_WEIGHTS_MOBILE={400:"regular",100:"100italic","100italic":"100",200:"200italic","200italic":"200",300:"300italic","300italic":"300",italic:"400italic","400italic":"italic",500:"500italic","500italic":"500",600:"600italic","600italic":"600",700:"700italic","700italic":"700",800:"800italic","800italic":"800",900:"900italic","900italic":"900"}}});function get_mapped_property(element_version,style_version,property_name){for(let i=element_version;i<style_version;i++)if(mapped_properties[i][property_name])return mapped_properties[i][property_name];return null}function get_unmapped_properties(element_version,style_version,property_name){for(let i=element_version;i<style_version;i++)if(unmapped_properties[i][property_name])return unmapped_properties[i][property_name];return[]}function map_property(element_version,style_version,property_name,value){for(let i=element_version;i<style_version;i++)if(mapped_properties[i][property_name])return mapping_functions[i](property_name,value);return value}var import_web_dom_collections_iterator56,autorun5,mapped_properties,unmapped_properties,mapping_functions,init_elements_versioning=__esm({"lib-browser/core/core_elements/elements_versioning.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator56=__toESM(require_web_dom_collections_iterator());init_elements();init_lib();init_appquery();autorun5=__toESM(require_autorun());init_logger();init_webfonts();init_fonts();mapped_properties=[{font_family:"font_face",font_weight:"font_face"},{padding_left:"padding_horizontal",padding_right:"padding_horizontal",padding_top:"padding_vertical",padding_bottom:"padding_vertical"},{},{},{}],unmapped_properties=[{font_face:["font_family","font_weight"]},{padding_horizontal:["padding_left","padding_right"],padding_vertical:["padding_bottom","padding_top"]},{},{},{}],mapping_functions=[(new_property,font_face)=>{let{font_family,variant}=get_unquoted_face_and_variant(font_face);if(new_property==="font_family")return font_family;if(variant==="custom")return"400";var _fonts_consts$NAMED_W;return(_fonts_consts$NAMED_W=NAMED_WEIGHTS[variant])!=null?_fonts_consts$NAMED_W:variant},(new_property,old_value)=>old_value,()=>{}]}});function apply_margin(style2,properties){for(let side of["left","top","right","bottom"]){let value=properties[`margin_${side}`];style2[`margin-${side}`]=value!=null?`${value}px`:""}}var import_web_dom_collections_iterator57,margin_properties,container_properties,flex_element_properties,nonant_letter_to_alignment,relative_element_properties,fixed_element_properties,element_reset,init_responsive_css=__esm({"lib-browser/shared/responsive/responsive_css.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator57=__toESM(require_web_dom_collections_iterator()),margin_properties=["margin_left","margin_right","margin_top","margin_bottom"],container_properties=properties=>{var _properties$container,_properties$row_gap,_properties$column_ga;return{"justify-content":(_properties$container=properties.container_alignment)!=null?_properties$container:"","row-gap":properties.use_gap&&(_properties$row_gap=properties.row_gap)!=null?_properties$row_gap:"","column-gap":properties.use_gap&&(_properties$column_ga=properties.column_gap)!=null?_properties$column_ga:""}};flex_element_properties=direction=>properties=>{var _properties$align_sel,_properties$max_width,_properties$order,_properties$max_heigh;let ret={"align-self":(_properties$align_sel=properties.align_self)!=null?_properties$align_sel:"","min-width":properties.min_width,"max-width":(_properties$max_width=properties.max_width)!=null?_properties$max_width:"",order:(_properties$order=properties.order)!=null?_properties$order:"","min-height":properties.has_fixed_aspect_ratio?"":properties.min_height,"max-height":properties.has_fixed_aspect_ratio?"":(_properties$max_heigh=properties.max_height)!=null?_properties$max_heigh:""};return direction==="row"?(properties.fit_width?(ret.width="max-content",ret["flex-grow"]=0):(ret.width=properties.min_width,ret["flex-grow"]=1),properties.fit_height||properties.has_fixed_aspect_ratio?ret.height="max-content":properties.min_height===properties.max_height?ret.height=properties.min_height:properties.align_self==="stretch"?ret.height="auto":ret.height=properties.min_height):(properties.fit_height||properties.has_fixed_aspect_ratio?(ret.height="max-content",ret["flex-grow"]=0,ret["flex-shrink"]=0):(ret.height=properties.min_height,ret["flex-grow"]=1),properties.min_width===properties.max_width?ret.width=properties.min_width:properties.align_self==="stretch"||properties.fit_width?ret.width="auto":ret.width=`calc(100% - ${properties.margin_left+properties.margin_right}px)`),apply_margin(ret,properties),ret},nonant_letter_to_alignment={a:"start",b:"center",c:"end"},relative_element_properties=function(properties){var _properties$nonant_al,_properties$nonant_al2,_properties$max_width2,_properties$max_heigh2;let ret={"align-self":nonant_letter_to_alignment[(_properties$nonant_al=properties.nonant_alignment)==null?void 0:_properties$nonant_al.charAt(1)],"justify-self":nonant_letter_to_alignment[(_properties$nonant_al2=properties.nonant_alignment)==null?void 0:_properties$nonant_al2.charAt(0)],"min-width":properties.min_width,"max-width":(_properties$max_width2=properties.max_width)!=null?_properties$max_width2:"","min-height":properties.has_fixed_aspect_ratio?"":properties.min_height,"max-height":properties.has_fixed_aspect_ratio?"":(_properties$max_heigh2=properties.max_height)!=null?_properties$max_heigh2:""};return properties.min_width===properties.max_width?ret.width=properties.min_width:properties.fit_width?ret.width="max-content":ret.width=`calc(100% - ${properties.margin_left+properties.margin_right}px)`,properties.fit_height||properties.has_fixed_aspect_ratio?ret.height="max-content":properties.min_height===properties.max_height?ret.height=properties.min_height:ret.height=`calc(100% - ${properties.margin_top+properties.margin_bottom}px)`,apply_margin(ret,properties),ret},fixed_element_properties=properties=>({top:`${properties.top}px`,left:`${properties.left}px`,width:properties.min_width,height:properties.min_height}),element_reset={margin:"","align-self":"","justify-self":"","min-width":"","max-width":"",width:"","min-height":"","max-height":"","flex-grow":"",top:"",left:"",right:"",bottom:"",position:""}}});function compare2(a,b){return filterNulls((a2,b2)=>{switch(typeof a2){case"number":return a2-b2;case"string":return a2<b2?-1:a2>b2?1:0}},"first")(a,b)}function filterNulls(sort_fn,nullHandling){return(a,b)=>a==null&&b==null?0:a==null?nullHandling==="first"?-1:1:b==null?nullHandling==="first"?1:-1:sort_fn(a,b)}var init_sorting=__esm({"lib-browser/u/shared/sorting.js"(){"use strict";init_define_process_env();init_shim()}});function create_sort_fn(property2){return(a,b)=>{var _a$element_id,_a$element_id2,_a$id,_b$element_id,_b$element_id2,_b$id;return a.get_static_property(property2)-b.get_static_property(property2)||compare2((_a$element_id=(_a$element_id2=a.element_id)==null?void 0:_a$element_id2.call(a))!=null?_a$element_id:(_a$id=a.id)==null?void 0:_a$id.call(a),(_b$element_id=(_b$element_id2=b.element_id)==null?void 0:_b$element_id2.call(b))!=null?_b$element_id:(_b$id=b.id)==null?void 0:_b$id.call(b))}}function get_functional_layout(layout){var _LAYOUT_PROPERTIES$la,_LAYOUT_PROPERTIES$la2;return(_LAYOUT_PROPERTIES$la=(_LAYOUT_PROPERTIES$la2=LAYOUT_PROPERTIES[layout])==null?void 0:_LAYOUT_PROPERTIES$la2.acts_as)!=null?_LAYOUT_PROPERTIES$la:layout}var CONTAINER_CLASSES,LAYOUT_PROPERTIES,LAYOUT_NAMES,MOBILE_LAYOUT_NAMES,COL_VERT_ALIGNMENT_OPTIONS,COL_VERT_ALIGNMENTS,FIXED_LAYOUT,DIMENSION_TO_CROSS_AXIS,BUTTON_PROPERTIES,CONTAINER_PROPERTIES,init_responsive_layout=__esm({"lib-browser/shared/responsive/responsive_layout.js"(){"use strict";init_define_process_env();init_shim();init_responsive_css();init_appquery();init_sorting();CONTAINER_CLASSES="fixed relative flex row column";LAYOUT_PROPERTIES={fixed:{classes:"fixed",css_func:fixed_element_properties,container_properties:{},element_properties:{top:"top",left:"left"},sort_fn:create_sort_fn("zindex"),sort_property:"zindex"},relative:{classes:"relative",css_func:relative_element_properties,container_properties:{},element_properties:{nonant_alignment:"nonant_alignment"},sort_fn:create_sort_fn("zindex"),sort_property:"zindex"},row:{classes:"flex row",css_func:flex_element_properties("row"),container_properties:{container_horiz_alignment:"container_alignment",use_gap:"use_gap",row_gap:"row_gap",column_gap:"column_gap"},element_properties:{vert_alignment:"align_self",order:"order"},sort_fn:create_sort_fn("order"),sort_property:"order"},column:{classes:"flex column",css_func:flex_element_properties("column"),container_properties:{container_vert_alignment:"container_alignment",use_gap:"use_gap",row_gap:"row_gap"},element_properties:{horiz_alignment:"align_self",order:"order"},sort_fn:create_sort_fn("order"),sort_property:"order"},table:{classes:"table",css_func:()=>({}),container_properties:{},element_properties:{},sort_fn:create_sort_fn("axis_index"),sort_property:"axis_index"},table_cross_axis:{classes:"axis",css_func:()=>({}),container_properties:{},element_properties:{},sort_fn:(a,b)=>{let axis1=appquery_default.element(a.get_static_property("cell_main_axis_id")),axis2=appquery_default.element(b.get_static_property("cell_main_axis_id"));return create_sort_fn("axis_index")(axis1,axis2)},sort_property:"axis_index"},app_bar:{classes:"app-bar",acts_as:"row",css_func:flex_element_properties("row"),container_properties:{},element_properties:{vert_alignment:"align_self",order:"order"},sort_fn:(a,b)=>{let a_type=a.get_static_property("app_bar_button_type"),b_type=b.get_static_property("app_bar_button_type");return a_type!==b_type?a_type==="leading"?-1:1:create_sort_fn("order")(a,b)},sort_property:"order",get_siblings:element=>{var _element$parent$eleme,_element$parent;let my_type=element.get_static_property("app_bar_button_type");return((_element$parent$eleme=(_element$parent=element.parent())==null?void 0:_element$parent.elements())!=null?_element$parent$eleme:[]).filter(sibling=>sibling.get_static_property("app_bar_button_type")===my_type)}}};LAYOUT_NAMES={fixed:"Fixed",relative:"Align to parent",row:"Row",column:"Column"},MOBILE_LAYOUT_NAMES={fixed:LAYOUT_NAMES.fixed,row:LAYOUT_NAMES.row,column:LAYOUT_NAMES.column},COL_VERT_ALIGNMENT_OPTIONS={"flex-start":"Top-aligned",center:"Centered","flex-end":"Bottom-aligned"},COL_VERT_ALIGNMENTS={...COL_VERT_ALIGNMENT_OPTIONS,"space-around":"Space around","space-between":"Space between"},FIXED_LAYOUT="fixed",DIMENSION_TO_CROSS_AXIS={width:"column",height:"row"},BUTTON_PROPERTIES=["button_horiz_alignment","button_vert_alignment","button_single_item_vert_alignment","gap"],CONTAINER_PROPERTIES=["container_layout","container_horiz_alignment","container_vert_alignment","use_gap","row_gap","column_gap"]}});var element_props_exports={};__export(element_props_exports,{get_font_face:()=>get_font_face,is_filling_height:()=>is_filling_height,is_filling_width:()=>is_filling_width,is_fitting_height:()=>is_fitting_height,is_fitting_width:()=>is_fitting_width,max_height_css:()=>max_height_css,max_width_css:()=>max_width_css,min_height_css:()=>min_height_css,min_width_css:()=>min_width_css});function get_font_face(instance4){if(instance4.element.element_version(!0)>=FONT_FAMILY_VERSION){var _element_eval$evaluat,_element_eval$evaluat2;return to_font_face((_element_eval$evaluat=evaluate_property(instance4,"font_family"))!=null?_element_eval$evaluat:"",(_element_eval$evaluat2=evaluate_property(instance4,"font_weight"))!=null?_element_eval$evaluat2:"")}else{var _element_eval$evaluat3;return(_element_eval$evaluat3=evaluate_property(instance4,"font_face"))!=null?_element_eval$evaluat3:""}}function min_width_css(instance4){if(!instance4.element.E.uses_css_responsive)return`${instance4.element.get_min_width()}px`;if(instance4.element.only_fixed_or_fill_width()&&!instance4.get_static_property("single_width")||instance4.element.only_fixed_or_fit_width()&&!instance4.get_static_property("single_width")||instance4.element.no_width())return"0px";if(instance4.element.can_be_variable_width()&&!instance4.element.force_fixed()){var _element_eval$evaluat4;return(_element_eval$evaluat4=evaluate_property(instance4,"min_width_css"))!=null?_element_eval$evaluat4:"0px"}else return`${instance4.element.get_width()}px`}function max_width_css(instance4){if(!instance4.element.E.uses_css_responsive){let max_width=instance4.element.get_max_width();return max_width!=null?`${max_width}px`:void 0}if(instance4.element.only_fixed_or_fill_width()&&!instance4.get_static_property("single_width")||instance4.element.no_width())return"100%";if(instance4.element.only_fixed_or_fit_width()&&!instance4.get_static_property("single_width"))return;if(instance4.element.can_be_variable_width()&&!instance4.element.force_fixed())if(instance4.get_static_property("single_width")){var _element_eval$evaluat5;return(_element_eval$evaluat5=evaluate_property(instance4,"min_width_css"))!=null?_element_eval$evaluat5:"0px"}else{var _element_eval$evaluat6;return(_element_eval$evaluat6=evaluate_property(instance4,"max_width_css"))!=null?_element_eval$evaluat6:void 0}else return`${instance4.element.get_width()}px`}function min_height_css(instance4){if(!instance4.element.E.uses_css_responsive||instance4.element.only_fixed_or_fill_height()&&!instance4.get_static_property("single_height")||instance4.element.only_fixed_or_fit_height()&&!instance4.get_static_property("single_height"))return"0px";if(instance4.element.can_be_variable_width()&&!instance4.element.force_fixed()){var _element_eval$evaluat7;return(_element_eval$evaluat7=evaluate_property(instance4,"min_height_css"))!=null?_element_eval$evaluat7:"0px"}else return`${instance4.element.get_height()}px`}function max_height_css(instance4){if(instance4.element.E.uses_css_responsive){if(instance4.element.only_fixed_or_fill_height()&&!instance4.get_static_property("single_height"))return"100%";if(instance4.element.only_fixed_or_fit_height()&&!instance4.get_static_property("single_height"))return;if(instance4.element.can_be_variable_width()&&!instance4.element.force_fixed())if(instance4.get_static_property("single_height")){var _element_eval$evaluat8;return(_element_eval$evaluat8=evaluate_property(instance4,"min_height_css"))!=null?_element_eval$evaluat8:"0px"}else{var _element_eval$evaluat9;return(_element_eval$evaluat9=evaluate_property(instance4,"max_height_css"))!=null?_element_eval$evaluat9:void 0}else return`${instance4.element.get_height()}px`}}function is_filling_width(instance4){return instance4.element.E.uses_css_responsive?!!(instance4.element.only_fixed_or_fill_width()&&!instance4.get_static_property("single_width")):!1}function is_filling_height(instance4){return instance4.element.E.uses_css_responsive?!!(instance4.element.only_fixed_or_fill_height()&&!instance4.get_static_property("single_height")):!1}function is_fitting_width(instance4){var _instance$element$par;if(!instance4.element.E.uses_css_responsive)return!1;if(instance4.element.only_fixed_or_fit_width()&&!instance4.get_static_property("single_width")&&!instance4.element.no_width())return!0;if(!instance4.element.can_fit_width()||instance4.element.force_fixed())return!1;let container_layout=get_functional_layout((_instance$element$par=instance4.element.parent())==null?void 0:_instance$element$par.container_layout());return container_layout===DIMENSION_TO_CROSS_AXIS.width?evaluate_property(instance4,"horiz_alignment")!=="stretch"&&instance4.element.fit_width():container_layout===FIXED_LAYOUT?!1:instance4.element.fit_width()}function is_fitting_height(instance4){var _instance$element$par2;if(!instance4.element.E.uses_css_responsive||instance4.element.only_fixed_or_fit_height()&&!instance4.get_static_property("single_height"))return!0;if(!instance4.element.can_fit_height()||instance4.element.force_fixed())return!1;let container_layout=get_functional_layout((_instance$element$par2=instance4.element.parent())==null?void 0:_instance$element$par2.container_layout());return container_layout===DIMENSION_TO_CROSS_AXIS.height?!instance4.get_static_property("single_height")&&evaluate_property(instance4,"vert_alignment")!=="stretch":container_layout===FIXED_LAYOUT?!1:instance4.element.fit_height()}var init_element_props=__esm({"lib-browser/lang/evaluation/element_props.js"(){"use strict";init_define_process_env();init_shim();init_element_eval();init_elements();init_webfonts();init_responsive_layout()}});function run_eval(name,style2,potentially_relevant_states,simple_cache,instance4,element){var _element,_element$field_names$,_res;(_element=element)!=null||(element=instance4==null?void 0:instance4.element);let relevant_states=potentially_relevant_states.filter(state5=>is_state_on(instance4,state5)),state4=relevant_states[relevant_states.length-1],element_version=element.element_version(!1),style_version=element.element_version(!0),mapped_property=get_mapped_property(element_version,style_version,name),is_mapped=mapped_property&&element.states().includes(state4),state_prop=is_mapped?mapped_property:name,res;if(state4!=null&&(!state4.property(state_prop).is_empty()||(_element$field_names$=element.field_names()[state_prop])!=null&&_element$field_names$.allow_empty_condition)){let context=instance4.prop_eval_context(!0);res=eval_property(state4,state_prop,context),is_mapped&&(res=map_property(element.element_version(!1),element.element_version(!0),name,res))}else if(style2&&(!allow_overrides_check(element,name)||simple_cache==null))res=style2.get_static_property(name);else if(simple_cache===NOT_STATIC_PROP){let context=instance4.prop_eval_context(!0);res=eval_property(element,name,context,null,element.get_default(name))}else res=simple_cache;if(["text","html"].includes(name)&&on_client())if(b_async5.ensure_ready(active_key),window.wait_for_individual_fonts){var _font_face;let font_face=get_font_face(instance4);(_font_face=font_face)!=null&&_font_face.includes("var(")&&(font_face=substitute_font_token(font_face)),font_face!=null&&(fontface_keys[font_face]==null&&(fontface_keys[font_face]=b_async5.MakeKey(void 0,`webfont.fontface_key_${font_face}`),setTimeout(()=>{warn("fontface key never properly turned",{font_face}),fontface_keys[font_face].turn()},3e3)),b_async5.ensure_ready(fontface_keys[font_face]))}else b_async5.ensure_ready(fontface_key);return(_res=res)!=null?_res:null}var b_async5,init_element_run_eval=__esm({"lib-browser/lang/evaluation/element_run_eval.js"(){"use strict";init_define_process_env();init_shim();init_logger();init_node_eval();init_elements();init_mode_check();b_async5=__toESM(require_b_async());init_webfonts();init_elements_versioning();init_element_props();init_element_eval();init_allow_overrides_check()}});var init_element_server_eval=__esm({"lib-browser/lang/evaluation/element_server_eval.js"(){"use strict";init_define_process_env();init_shim();init_allow_overrides_check()}});var element_eval_exports={};__export(element_eval_exports,{eval_property_with_states:()=>eval_property_with_states,evaluate_property:()=>evaluate_property,get_property_watcher:()=>get_property_watcher,is_state_on:()=>is_state_on,on_property_change:()=>on_property_change,pre_cache:()=>pre_cache});function get_property_watcher_fn(element,name){if(lib_default.or_throw().is_edit_mode())return instance4=>edit_eval(name,instance4);{var _element$_property_wa,_style$states;(_element$_property_wa=element._property_watcher_fns)!=null||(element._property_watcher_fns={});let watcher_fn;if(!on_server()&&(watcher_fn=element._property_watcher_fns[name]))return watcher_fn;let style2=element.is_styleable_property(name)?element.get_style_if_exists():null,is_relevant=state4=>state4.property_names().includes(name),relevant_states=((_style$states=style2==null?void 0:style2.states())!=null?_style$states:[]).filter(is_relevant),mapped_property=get_mapped_property(element.element_version(!1),element.element_version(!0),name);mapped_property&&(is_relevant=state4=>state4.property_names().includes(mapped_property)),relevant_states.push(...element.states().filter(is_relevant));let simple_cache;if(style2&&(!allow_overrides_check(element,name)||element.definition_or_self.property(name).raw()==null)){if(relevant_states.length===0)return style2.get_static_property(name)}else{var _raw22;let _raw4=element.property(name).json._raw();if(((_raw22=_raw4)==null?void 0:_raw22[S.type])==="Empty"&&(_raw4=null),_raw4==null||typeof _raw4!="object"){var _ref,_raw3;simple_cache=(_ref=(_raw3=_raw4)!=null?_raw3:element.get_default(name))!=null?_ref:null}else simple_cache=NOT_STATIC_PROP;if(simple_cache!==NOT_STATIC_PROP&&relevant_states.length===0)return simple_cache}return element._property_watcher_fns[name]=instance4=>run_eval(name,style2,relevant_states,simple_cache,instance4,element),element._property_watcher_fns[name]}}function _create_property_watcher(instance4,name){let evaluator_or_value=get_property_watcher_fn(instance4.element,name);if(typeof evaluator_or_value!="function")return autorun6.FakeWatcher(evaluator_or_value);let evaluator=evaluator_or_value,w;return name==="is_visible"?w=autorun6.Watcher(()=>{instance4.evaluating_visibility=!0;try{return evaluator(instance4)}finally{instance4.evaluating_visibility=!1}}):w=autorun6.Watcher(()=>evaluator(instance4)),lib_default.or_throw().is_edit_mode()||w.on_error(err=>instance4.on_run_eval_error(name,err)),instance4.on_destroy(()=>w.destroy()),w}function _ensure_watcher_created(instance4,name,creation_fn){return instance4._watchers[name]?!0:instance4._created_watchers[name]?!1:(instance4._created_watchers[name]=!0,instance4._watchers[name]=creation_fn(),!0)}function get_property_watcher(instance4,name){if(!_ensure_watcher_created(instance4,name,()=>_create_property_watcher(instance4,name)))throw new UnexpectedError("get_property_watcher called recursively");return instance4._watchers[name]}function evaluate_property(instance4,name,pre_cache2){var _b_fiber$Fiber;if(instance4==null||instance4.is_destroyed())return null;if(["height","width"].includes(name)){var _instance$element$roo;if(((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())===0||!instance4.element.uses_css_responsive()){var _instance$element$roo2;if(!instance4.edit_mode()&&(_instance$element$roo2=instance4.element.root())!=null&&_instance$element$roo2.use_responsive_algorithm())return instance4._dimension_box(name)}else return instance4.state(`current_${name}`)}if(instance4.run_mode()){let precomputed=instance4.element.get_precomputed();if(precomputed[name]===void 0){var _instance$get_static_;precomputed[name]=(_instance$get_static_=instance4.get_static_property(name,!0))!=null?_instance$get_static_:null}if(precomputed[name]!==NOT_STATIC_PROP)return precomputed[name]}if(!_ensure_watcher_created(instance4,name,()=>_create_property_watcher(instance4,name))){let element_name=instance4.element.get_name(!0);throw new OwnerError(`Recursion when evaluating property ${name} on element "${element_name}"`)}if(pre_cache2)return;let[ready,value,error2]=instance4._watchers[name].get_current(!0);if(!error2){if(!async_state_default3.CurrentAutoRun&&!async_state_default3.CurrentNotReadyCatcher&&!((_b_fiber$Fiber=Fiber)!=null&&_b_fiber$Fiber.current)&&instance4.run_mode()&&error("Calling evaluate_property outside of an autorun or watcher",{name}),!ready){b_async6.throw_not_ready(value);return}return value}}function pre_cache(instance4,properties){for(let prop of properties)evaluate_property(instance4,prop,!0)}function on_property_change(instance4,properties,handler){let new_handler=props=>{if(instance4.element.exists()&&!instance4.is_destroyed())try{handler(props)}catch(err){let key=err instanceof NotReadyError&&err.not_ready_key;if(key)b_async6.WaitFor(key,()=>new_handler(props));else throw err}},precomputed;if(typeof properties=="string"){if(instance4.run_mode()){if(precomputed=instance4.element.get_precomputed(),precomputed[properties]===void 0){var _instance$get_static_2;precomputed[properties]=(_instance$get_static_2=instance4.get_static_property(properties,!0))!=null?_instance$get_static_2:null}if(precomputed[properties]!==NOT_STATIC_PROP){new_handler(precomputed[properties]);return}}if(!_ensure_watcher_created(instance4,properties,()=>_create_property_watcher(instance4,properties)))throw new UnexpectedError("on_property_change called recursively");instance4._watchers[properties].on_value(new_handler);return}let static_values={},watchers2={};if(instance4.run_mode()){precomputed=instance4.element.get_precomputed();let is_watcher=!1,to_iterate=properties;for(let property2 of to_iterate){if(precomputed[property2]===void 0){var _instance$get_static_3;precomputed[property2]=(_instance$get_static_3=instance4.get_static_property(property2,!0))!=null?_instance$get_static_3:null}if(precomputed[property2]!==NOT_STATIC_PROP)static_values[property2]=precomputed[property2];else{if(is_watcher=!0,!_ensure_watcher_created(instance4,property2,()=>_create_property_watcher(instance4,property2)))throw new UnexpectedError("on_property_change called recursively");watchers2[property2]=instance4._watchers[property2]}}if(!is_watcher){new_handler(static_values);return}}else{let to_iterate=properties;for(let property2 of to_iterate){if(!_ensure_watcher_created(instance4,property2,()=>_create_property_watcher(instance4,property2)))throw new UnexpectedError("on_property_change called recursively");watchers2[property2]=instance4._watchers[property2]}}let combined=autorun6.Watcher(()=>{let combined_properties={};return Object.entries(watchers2).forEach(_ref2=>{let[name3,watcher]=_ref2;combined_properties[name3]=watcher.get()}),Object.entries(static_values).forEach(_ref3=>{let[name3,val]=_ref3;combined_properties[name3]=val}),combined_properties});combined.on_value(new_handler),instance4.on_destroy(()=>combined.destroy())}function is_state_on(instance4,state4){let state_id=`state:${state4.toUniqueString()}`;if(!_ensure_watcher_created(instance4,state_id,()=>autorun6.Watcher(()=>evaluate_state_condition(state4,instance4.prop_eval_context())))){let element_name=instance4.element.get_name(!0);throw new OwnerError(`Recursion when evaluating a condition on element "${element_name}"`)}let[ready,value]=instance4._watchers[state_id].get_current();return ready&&value}function eval_property_with_states(element,name,context){let instance4=context.element,relevant_states=instance4.element.states().filter(state4=>!state4.property(name).is_empty()&&is_state_on(instance4,state4));if(relevant_states.length){let state4=relevant_states[relevant_states.length-1];return eval_property(state4,name,context)}else return eval_property(element,name,context)}var import_web_dom_collections_iterator58,b_async6,autorun6,init_element_eval=__esm({"lib-browser/lang/evaluation/element_eval.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator58=__toESM(require_web_dom_collections_iterator());init_lib();init_logger();init_shrink();init_elements();init_node_eval();init_errors();init_b_fiber();b_async6=__toESM(require_b_async()),autorun6=__toESM(require_autorun());init_async_state3();init_mode_check();init_element_edit_eval();init_element_run_eval();init_elements_versioning();init_element_server_eval();init_allow_overrides_check()}});var analytics_exports={};__export(analytics_exports,{format_campaign_data:()=>format_campaign_data,init_segment:()=>init_segment,manage_utm_data:()=>manage_utm_data,package_utm_data:()=>package_utm_data,page:()=>page,reset:()=>reset2,retrieve_utm_from_header:()=>retrieve_utm_from_header,track:()=>track,track_count:()=>track_count,track_count_with_marketing_metadata:()=>track_count_with_marketing_metadata,track_for_alternate_user:()=>track_for_alternate_user,track_with_marketing_metadata:()=>track_with_marketing_metadata,track_with_user_badges:()=>track_with_user_badges});function wrap_analytics(name,defaultValue){return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return window.meta_analytics?window.meta_analytics[name](...args):defaultValue}}var import_web_dom_collections_iterator59,retrieve_utm_from_header,format_campaign_data,package_utm_data,manage_utm_data,init_segment,reset2,track_with_marketing_metadata,track_count_with_marketing_metadata,track,page,track_count,track_for_alternate_user,track_with_user_badges,init_analytics=__esm({"lib-browser/client/analytics.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator59=__toESM(require_web_dom_collections_iterator());retrieve_utm_from_header=wrap_analytics("retrieve_utm_from_header",[]),format_campaign_data=wrap_analytics("format_campaign_data",{}),package_utm_data=wrap_analytics("package_utm_data",""),manage_utm_data=wrap_analytics("manage_utm_data",void 0),init_segment=wrap_analytics("init_segment",void 0),reset2=wrap_analytics("reset",void 0),track_with_marketing_metadata=wrap_analytics("track_with_marketing_metadata",void 0),track_count_with_marketing_metadata=wrap_analytics("track_count_with_marketing_metadata",void 0),track=wrap_analytics("track",void 0),page=wrap_analytics("page",void 0),track_count=wrap_analytics("track_count",void 0),track_for_alternate_user=wrap_analytics("track_for_alternate_user",void 0),track_with_user_badges=wrap_analytics("track_with_user_badges",void 0)}});var import_web_dom_collections_iterator60,APP_EDITED,CREATED_NEW_DATA_FIELD,CREATED_NEW_DATA_TYPE,CREATED_NEW_ELEMENT,DATA_ACTION_DONE,ACTION_CREATED,EVENT_CREATED,STYLES_VARIABLE_CREATED,STYLES_VARIABLE_DELETED,YOUTUBE_VIDEO_ENDED,YOUTUBE_VIDEO_PLAYING,YOUTUBE_VIDEO_BUFFER,YOUTUBE_VIDEO_CUED,YOUTUBE_VIDEO_PAUSED,YOUTUBE_VIDEO_RATE_CHANGED,YOUTUBE_VIDEO_QUALITY_CHANGED,dataEventsList,designEventsList,workflowEventsList,eventsUsedForSegmentEventCount,eventsUsedForSegmentEventCountMap,init_segment_events=__esm({"lib-browser/constants/segment_events.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator60=__toESM(require_web_dom_collections_iterator()),APP_EDITED="App Edited",CREATED_NEW_DATA_FIELD="Created New Data Field",CREATED_NEW_DATA_TYPE="Created New Data Type",CREATED_NEW_ELEMENT="Created New Element",DATA_ACTION_DONE="Data Action Done",ACTION_CREATED="Created New Action",EVENT_CREATED="Created New Event",STYLES_VARIABLE_CREATED="Styles Variable Created",STYLES_VARIABLE_DELETED="Styles Variable Deleted",YOUTUBE_VIDEO_ENDED="Youtube video ended",YOUTUBE_VIDEO_PLAYING="Youtube video playing",YOUTUBE_VIDEO_BUFFER="Youtube video buffering",YOUTUBE_VIDEO_CUED="Youtube video cued",YOUTUBE_VIDEO_PAUSED="Youtube video paused",YOUTUBE_VIDEO_RATE_CHANGED="Youtube video playback rate changed",YOUTUBE_VIDEO_QUALITY_CHANGED="Youtube video playback quality changed",dataEventsList=[CREATED_NEW_DATA_FIELD,CREATED_NEW_DATA_TYPE,DATA_ACTION_DONE],designEventsList=[CREATED_NEW_ELEMENT],workflowEventsList=[ACTION_CREATED,EVENT_CREATED],eventsUsedForSegmentEventCount=[...dataEventsList,...designEventsList,...workflowEventsList,APP_EDITED],eventsUsedForSegmentEventCountMap={};eventsUsedForSegmentEventCount.forEach(event=>{eventsUsedForSegmentEventCountMap[event]=!0})}});var AmplitudeFeatureFlagID,AMPLITUDE_FEATURE_FLAGS,WF_TAB_REDESIGN,init_feature_flags=__esm({"lib-browser/constants/feature_flags.js"(){"use strict";init_define_process_env();init_shim();AmplitudeFeatureFlagID=function(AmplitudeFeatureFlagID2){return AmplitudeFeatureFlagID2.AI_CUSTOM_PAGE_GENERATION="ai-custom-pages-v0",AmplitudeFeatureFlagID2.APP_SOFT_CANCELATION="app-soft-cancelation",AmplitudeFeatureFlagID2.APP_INTERFACE_MANAGER="app-interface-manager",AmplitudeFeatureFlagID2.NATIVE_MOBILE_ALPHA="native-mobile-v0",AmplitudeFeatureFlagID2.NEW_MENUBAR="new-menubar-bubble",AmplitudeFeatureFlagID2.NEW_PLUGIN_MODAL_DATA_TRACKED="new-plugin-modal-data-tracking",AmplitudeFeatureFlagID2.NEW_PRICING_POPUP="new-pricing-popup",AmplitudeFeatureFlagID2.STARTER_2024_RELEASED="starter-2024-released",AmplitudeFeatureFlagID2.STRIPE_HOSTED_CHECKOUT="stripe-hosted-checkout",AmplitudeFeatureFlagID2.UPDATE_LEGACY_ANNUAL_APPS="update-legacy-annual-apps",AmplitudeFeatureFlagID2.VERIFY_AGENCY_USER_2FA="verify-agency-user-2fa",AmplitudeFeatureFlagID2.WORKLOAD_NOTIFICATION_RULES="workload-notification-rules",AmplitudeFeatureFlagID2.WORKLOAD_PIE_CHART_IMPROVEMENTS="workload-pie-chart-update",AmplitudeFeatureFlagID2.WORKLOAD_TEMPORARY_BANNER="workload-temporary-banner",AmplitudeFeatureFlagID2.LOAD_INTERCOM_SNIPPET="load-intercom-snippet",AmplitudeFeatureFlagID2}({}),AMPLITUDE_FEATURE_FLAGS={[AmplitudeFeatureFlagID.AI_CUSTOM_PAGE_GENERATION]:{description:"AI page generation",ownedBy:"AI pod"},[AmplitudeFeatureFlagID.APP_SOFT_CANCELATION]:{description:"Allow apps to keep remaining time when canceling their paid plan",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.APP_INTERFACE_MANAGER]:{description:"Show the new version of app interface manager in the menubar",ownedBy:"Core Blue pod"},[AmplitudeFeatureFlagID.NATIVE_MOBILE_ALPHA]:{description:"Native mobile alpha",ownedBy:"Mobile pod"},[AmplitudeFeatureFlagID.NEW_MENUBAR]:{description:"Show the new version of menubar on editor",ownedBy:"Activation pod"},[AmplitudeFeatureFlagID.NEW_PLUGIN_MODAL_DATA_TRACKED]:{description:"Show a new modal that includes whether data is tracked when submitting a plugin",ownedBy:"Activation pod"},[AmplitudeFeatureFlagID.NEW_PRICING_POPUP]:{description:"Show a popup to nudge users to select new pricing before Oct 1",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.STARTER_2024_RELEASED]:{description:"Use starter 2024 plan",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.STRIPE_HOSTED_CHECKOUT]:{description:"Use stripe hosted checkout",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.UPDATE_LEGACY_ANNUAL_APPS]:{description:"Update legacy annual apps",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.VERIFY_AGENCY_USER_2FA]:{description:"Redirect agency users not using 2FA",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.WORKLOAD_NOTIFICATION_RULES]:{description:"Enable notification rules set by user",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.WORKLOAD_PIE_CHART_IMPROVEMENTS]:{description:"Improvements to the Workload Pie Chart",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.WORKLOAD_TEMPORARY_BANNER]:{description:"Show banner explaining Workload erroneous Page tags for Elasticsearch",ownedBy:"Monetization pod"},[AmplitudeFeatureFlagID.LOAD_INTERCOM_SNIPPET]:{description:"Working around Intercom's incomplete visibility logic for Intercom messenger",ownedBy:"Core Blue Pod"}},WF_TAB_REDESIGN="wf_redesign"}});function isWfRedesignEnabled(){var _saved_value;return(_saved_value=saved_value)!=null||(saved_value=isWfRedesignURLFlagEnabled()&&appquery_default.has_feature_enabled(WF_TAB_REDESIGN)&&appquery_default.appname()!=="learn"),saved_value}function isWfRedesignURLFlagEnabled(){var _window$WF_TAB_REDESI2,_window23;if(Date.now()>WF_RELEASE_DATE){var _window$WF_TAB_REDESI,_window5;return!(appquery_default.appname()==="learn"||appquery_default.appname()==="test_app_editor"&&!((_window$WF_TAB_REDESI=(_window5=window)==null?void 0:_window5[WF_TAB_REDESIGN])!=null&&_window$WF_TAB_REDESI))}return((_window$WF_TAB_REDESI2=(_window23=window)==null?void 0:_window23[WF_TAB_REDESIGN])!=null?_window$WF_TAB_REDESI2:!1)&&appquery_default.appname()!=="learn"}var saved_value,WF_RELEASE_DATE,init_flagCheck=__esm({"lib-browser/editor/workflow_tab/state/flagCheck.js"(){"use strict";init_define_process_env();init_shim();init_feature_flags();init_appquery();WF_RELEASE_DATE=1727805908e3}});var workflow_utils_exports={};__export(workflow_utils_exports,{event_find_expressions:()=>event_find_expressions,find_my_expressions:()=>find_my_expressions,getCommonFieldNames:()=>getCommonFieldNames});function find_my_expressions(item,filter){return item?(filter=nodes_default.make_filter(filter),nodes_default.raw_properties(item,nodes_default.new_workflow_item).flatMap(prop=>{let sub_expressions=expression_find_expressions(prop,filter);return filter(prop)?[prop,...sub_expressions]:sub_expressions})):[]}function event_find_expressions(event,filter){return event?(filter=nodes_default.make_filter(filter),[event,...nodes_default.raw_children(event,S7.actions)].flatMap(item=>find_my_expressions(item,filter))):[]}function getCommonFieldNames(){return{condition:{prop_type:EVAL_TYPE.skip},event_color:{default:"grey",only_edit_mode:!0},wf_folder:{only_edit_mode:!0}}}var import_web_dom_collections_iterator61,S7,init_workflow_utils=__esm({"lib-browser/lang/workflow/workflow_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator61=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_expression_utils();init_shrink();init_eval();init_lib();init_analytics();init_segment_events();init_flagCheck();({S:S7}=shrink_exports)}});function get_plugin_and_type(type){if(!type)return[null,null];if(!type.includes(PLUGIN_SEPARATOR))return[null,type];let splitted=type.split(PLUGIN_SEPARATOR);return[splitted[0],splitted.slice(1).join(PLUGIN_SEPARATOR)]}function get_plugin_id(plugin_id){return plugin_id.split("_current")[0]}var init_service_type_parser=__esm({"lib-browser/services/shared/service_type_parser.js"(){"use strict";init_define_process_env();init_shim();init_plugin()}});function resize_container_width(instance4,width2){function get_width(){var _instance$element$roo;if((_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()){var _u$real_inner_width;return(_u$real_inner_width=real_inner_width(instance4.get_canvas()))!=null?_u$real_inner_width:width2}else return instance4.element.get_width()}let original_width=get_width();if(original_width){var _instance$child_conta;(_instance$child_conta=instance4.child_container)==null||_instance$child_conta.resize_width(original_width)}instance4._set_immediate(()=>{u_exports2.wait_for_updates(()=>{let new_width=get_width();if(new_width&&Math.abs(new_width-original_width)>1){var _instance$child_conta2;(_instance$child_conta2=instance4.child_container)==null||_instance$child_conta2.resize_width(new_width)}})})}var init_containers=__esm({"lib-browser/core/core_elements/legacy/responsive_v0/shared/containers.js"(){"use strict";init_define_process_env();init_shim();init_u2()}});function create_layout_resizing_keylist(cb){let keylist=u_exports2.MakeKeyList();layout_resizing_keylists.push(keylist),u_exports2.wait_for_updates(()=>{u_exports2.WaitFor(keylist,()=>{array_remove(layout_resizing_keylists,keylist),cb()})})}function add_layout_resizing_key(){let new_key=u_exports2.MakeKey(30,"layout_resizing_key");return layout_resizing_keylists.forEach(keylist=>{keylist.add_key(new_key)}),new_key}function make_opacity_transition(instance4,properties){var _instance$element;let opacity=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,static_opacity=instance4.get_static_property("opacity",!0);if(((_instance$element=instance4.element)==null?void 0:_instance$element.field("opacity"))==null&&static_opacity==null||(opacity==null||opacity===""?opacity=static_opacity/100:opacity=parseFloat(opacity),opacity===1))return properties.animation;let custom_animation_name="custom_"+opacity+"_"+properties.animation,overwritten_opacity=!1,current_transition;if(properties.animation in $.Velocity.RegisterEffect.packagedEffects)current_transition=json_deep_copy($.Velocity.RegisterEffect.packagedEffects[properties.animation]);else if(properties.animation in noBounceTransitions)current_transition=json_deep_copy(noBounceTransitions[properties.animation]);else return warn("Could not find animation",{name:properties.animation}),properties.animation;for(let call of current_transition.calls)"opacity"in call[0]&&(typeof call[0].opacity=="number"?(call[0].opacity*=opacity,overwritten_opacity=!0):call[0].opacity.forEach((item,i)=>{typeof item=="number"&&(call[0].opacity[i]*=opacity,overwritten_opacity=!0)}));return overwritten_opacity&&window.$.Velocity.RegisterEffect(custom_animation_name,current_transition),overwritten_opacity?custom_animation_name:properties.animation}function perform_animate_in(instance4,properties,options){var _canvas$velocity,_instance$_transforms,_instance$_transforms2,_instance$_transforms3,_instance$_transforms4,_instance$_transforms5;let legacy=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,canvas=instance4.get_canvas();legacy||(legacy=!instance4.element.E.uses_css_responsive),(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop",!0),(_instance$_transforms=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms3=(_instance$_transforms2=instance4._transforms).initial_transform)!=null||(_instance$_transforms2.initial_transform=canvas[0].style.transform);let is_element_a_dropdown=instance4.element.type()==="Dropdown";(_instance$_transforms5=(_instance$_transforms4=instance4._transforms).initial_opacity)!=null||(_instance$_transforms4.initial_opacity=canvas[0].style.opacity),instance4._is_visible_me=!0,instance4._update_visible(),instance4._display_me(),instance4.state("opacity_override",0),canvas[0].style.opacity=0,create_layout_resizing_keylist(()=>{instance4._has_been_hidden!==!0&&u_exports2.run_once(30,()=>{let opacity;if(!legacy)if(instance4._is_animating)opacity=instance4._instance_opacity;else{var _require$evaluate_pro;instance4._instance_opacity=opacity,opacity=((_require$evaluate_pro=(init_element_eval(),__toCommonJS(element_eval_exports)).evaluate_property(instance4,"opacity"))!=null?_require$evaluate_pro:100)/100}instance4.set_animating(!0);let velocity_data=canvas.data("velocity");velocity_data&&(velocity_data.transformCache={});let animation_name=make_opacity_transition(instance4,properties,opacity);velocity(canvas,animation_name,{...options,complete_cb(){var _instance$element$roo;instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,is_element_a_dropdown&&(canvas[0].style.opacity=instance4._transforms.initial_opacity),instance4._transforms=void 0,instance4.state("opacity_override",null),!running_test()&&(((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())<1||!instance4.element.E.uses_css_responsive)&&resize_container_width(instance4)},display:""})})})}function perform_animate_out(instance4,properties,options){var _canvas$velocity2,_instance$_transforms6,_instance$_transforms7,_instance$_transforms8,_instance$_transforms9,_instance$_transforms10;let callback=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,canvas=instance4.get_canvas();(_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),(_instance$_transforms6=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms8=(_instance$_transforms7=instance4._transforms).initial_opacity)!=null||(_instance$_transforms7.initial_opacity=canvas[0].style.opacity),(_instance$_transforms10=(_instance$_transforms9=instance4._transforms).initial_transform)!=null||(_instance$_transforms9.initial_transform=canvas[0].style.transform);let velocity_data=canvas.data("velocity");velocity_data&&(velocity_data.transformCache={});let animate_options={...instance4.get_hidden_css(),...options,complete_cb:()=>{instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,canvas[0].style.opacity=instance4._transforms.initial_opacity,instance4._transforms=void 0,instance4._is_visible_me=!1,instance4._update_visible(),instance4.state("opacity_override",null),callback==null||callback()}},opacity;instance4._is_animating?opacity=instance4._instance_opacity:(opacity=canvas[0].style.opacity,instance4._instance_opacity=opacity,instance4.state("opacity_override",opacity)),instance4.set_animating(!0);let animation_name=make_opacity_transition(instance4,properties,opacity);velocity(canvas,animation_name,animate_options)}function new_state(json){return nodes_default.create(nodes_default.STATE,json)}function get_short_display(type){var _element_obj$display$,_element_obj$display;let element_obj=lib_default().load_plugin(lib_default().plugin_prefixes.element+type,!0);return(_element_obj$display$=element_obj==null||(_element_obj$display=element_obj.display)==null?void 0:_element_obj$display.replace(remove_space_regex,""))!=null?_element_obj$display$:get_plugin_and_type(type)[1]}function find_elements(element,filter){if(!element)return[];filter=nodes_default.make_filter(filter);let children2=nodes_default.raw_children(element,S8.elements),results=[];for(let child of children2)filter(child)&&results.push(child),results.push(...find_elements(child,filter));return results}function element_find_expressions(element,filter){var _element$_raw;let options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{include_style_expression:!1,return_with_element_info:!1},_seen_nodes=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!element||_seen_nodes[element._raw.id])return[];_seen_nodes[element._raw.id]=!0,filter=nodes_default.make_filter(filter);let properties=nodes_default.raw_properties(element,el=>nodes_default.new_element(el)),direct_property_expressions=properties.filter(filter),property_subexpressions=properties.flatMap(property2=>expression_find_expressions(property2,filter)),style2=(_element$_raw=element._raw)==null?void 0:_element$_raw[S8.style],style_state_expressions=[];if(style2!=null&&options.include_style_expression){let raw_style=to_raw(appquery_default.style(style2));_seen_nodes[raw_style._raw.id]=!0,style_state_expressions=nodes_default.raw_children(raw_style,S8.states).flatMap(state4=>state_find_expressions(state4,filter))}let state_expressions=nodes_default.raw_children(element,S8.states).flatMap(state4=>state_find_expressions(state4,filter)),event_expressions=nodes_default.raw_children(element,S8.workflows).flatMap(event=>event_find_expressions(event,filter)),child_element_expressions=find_elements(element).flatMap(e=>element_find_expressions(e,filter,{include_style_expression:options.include_style_expression,return_with_element_info:options.return_with_element_info},_seen_nodes));return options.return_with_element_info?[...direct_property_expressions.map(exp=>[exp,element._raw.id]),...property_subexpressions.map(exp=>[exp,element._raw.id]),...style_state_expressions.map(exp=>[exp,element._raw.id]),...state_expressions.map(exp=>[exp,element._raw.id]),...event_expressions.map(exp=>[exp,element._id]),...child_element_expressions]:[...direct_property_expressions,...property_subexpressions,...style_state_expressions,...state_expressions,...event_expressions,...child_element_expressions]}function state_find_expressions(state4,filter){if(!state4)return[];filter=nodes_default.make_filter(filter);let results=[];function process2(exp){return filter(exp)&&results.push(exp),results.push(...expression_find_expressions(exp,filter))}let condition=nodes_default.raw_child(state4,S8.condition,state4);condition&&(nodes_default.set_owner(condition,state4,new_state),process2(condition));for(let prop of nodes_default.raw_properties(state4,new_state))process2(prop);return results}var import_web_dom_collections_iterator62,import_es_string_replace15,S8,_use_issue_checker,layout_resizing_keylists,get_states_from_raw_json,remove_space_regex,init_elements_utils=__esm({"lib-browser/lang/elements/elements_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator62=__toESM(require_web_dom_collections_iterator()),import_es_string_replace15=__toESM(require_es_string_replace());init_u2();init_b_object();init_mode_check();init_lib();init_nodes();init_expression_utils();init_workflow_utils();init_logger();init_service_type_parser();init_nodes_utils();init_appquery();init_containers();init_shrink();({S:S8}=shrink_exports),_use_issue_checker=()=>{var _Lib$visual_edit$issu,_Lib$visual_edit;return(_Lib$visual_edit$issu=(_Lib$visual_edit=lib_default().visual_edit)==null?void 0:_Lib$visual_edit.issue_checker_on)!=null?_Lib$visual_edit$issu:!0},layout_resizing_keylists=[];get_states_from_raw_json=json=>json.child("states").children().filter(state_json=>state_json.exists());remove_space_regex=/ /g}});var import_web_dom_collections_iterator63,Counter,DummyCounter,init_Counter=__esm({"lib-browser/u/shared/Counter.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator63=__toESM(require_web_dom_collections_iterator());init_mode_check();Counter=class _Counter{constructor(shape){this._map=void 0,this._total=void 0,typeof shape=="number"||!shape?this._total=shape!=null?shape:0:this._map={...shape}}static onClient(shape){return on_client()?new _Counter(shape):new DummyCounter}withTotal(){var _this$_total;return(_this$_total=this._total)!=null||(this._total=0),this}get total(){var _this$_total2;return(_this$_total2=this._total)!=null?_this$_total2:0}get(path){if(path===void 0){var _this$_total3;return(_this$_total3=this._total)!=null?_this$_total3:0}else{var _this$_map$path,_this$_map;return(_this$_map$path=(_this$_map=this._map)==null?void 0:_this$_map[path])!=null?_this$_map$path:0}}add(pathOrValue,valueOrEmpty){let[path,value]=typeof pathOrValue=="number"?[void 0,pathOrValue!=null?pathOrValue:1]:[pathOrValue,valueOrEmpty!=null?valueOrEmpty:1];if(typeof this._total=="number"&&(this._total+=value),typeof path<"u"){var _this$_map2,_this$_map$path2;(_this$_map2=this._map)!=null||(this._map={}),this._map[path]=((_this$_map$path2=this._map[path])!=null?_this$_map$path2:0)+value}}toJSON(){return this._total!==void 0&&this._map!==void 0?{total:this.total,...this._map}:this._total!==void 0?this._total:this._map!==void 0?{...this._map}:0}},DummyCounter=class extends Counter{get(){return 0}add(){}}}});function with_draw_reason(draw_reason,fn){let prev_draw_reason=draw_status.draw_reason;try{return draw_status.draw_reason=draw_reason,fn()}finally{draw_status.draw_reason=prev_draw_reason}}function record_lifecycle(event){let count2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;counts.lifecycle.add(event,count2);let{draw_phase,draw_reason}=draw_status;event===LifecycleEvent.Drawn&&(draw_phase===DrawPhase.InitialDraw?counts.elements.initially_drawn.add(draw_reason,count2):counts.elements.eventually_drawn.add(draw_reason,count2))}function measure_initial_draw(options,fn){let{deferred_drawing_enabled=!1}=options;draw_status.draw_phase=DrawPhase.InitialDraw,draw_status.draw_reason=DrawReason.VisibleOnPageLoad;try{fn()}finally{draw_status.draw_phase=DrawPhase.PostInitialDraw,draw_status.draw_reason=DrawReason.Unknown}if(deferred_drawing_enabled){let drawn=counts.elements.initially_drawn;return{deferred_drawing_enabled:!0,elements_initially_drawn:drawn.total,elements_initially_deferred:counts.elements.initially_deferred.total,elements_drawn_because_visible:drawn.get(DrawReason.VisibleOnPageLoad),elements_drawn_because_undeferrable:drawn.get(DrawReason.CantDefer),elements_drawn_because_size:drawn.get(DrawReason.NeedsChildrenSize)}}else return{deferred_drawing_enabled:!1}}function get_current_phase(){return draw_status.draw_phase}var DrawReason,LifecycleEvent,DrawPhase,draw_status,counts,element_counts,init_rendering_perf=__esm({"lib-browser/lang/elements/rendering_perf.js"(){"use strict";init_define_process_env();init_shim();init_Counter();DrawReason=function(DrawReason2){return DrawReason2.Unknown="Unknown",DrawReason2.DeferFlagOff="DeferFlagOff",DrawReason2.VisibleOnPageLoad="VisibleOnPageLoad",DrawReason2.BecameVisible="BecameVisible",DrawReason2.CantDefer="CantDefer",DrawReason2.NeedsChildrenSize="NeedsChildrenSize",DrawReason2.SizeNeeded="SizeNeeded",DrawReason2}({}),LifecycleEvent=function(LifecycleEvent2){return LifecycleEvent2.Constructed="Constructed",LifecycleEvent2.Registered="Registered",LifecycleEvent2.Drawn="Drawn",LifecycleEvent2}({}),DrawPhase=function(DrawPhase2){return DrawPhase2.NotStarted="NotStarted",DrawPhase2.InitialDraw="InitialDraw",DrawPhase2.PostInitialDraw="PostInitialDraw",DrawPhase2}({}),draw_status={draw_phase:DrawPhase.NotStarted,draw_reason:DrawReason.VisibleOnPageLoad},counts={lifecycle:Counter.onClient(),elements:{initially_drawn:Counter.onClient().withTotal(),initially_deferred:Counter.onClient(),eventually_drawn:Counter.onClient().withTotal()}},element_counts={element_instances:Counter.onClient().withTotal()};typeof window<"u"&&(window.element_performance_counts=counts)}});function handleResize(entries){for(let entry of entries){var _entry$target$_b_resi,_entry$target;(_entry$target$_b_resi=(_entry$target=entry.target)._b_resize_fn)==null||_entry$target$_b_resi.call(_entry$target,entry)}}function observe(element,fn){let type=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"border-box";if(typeof ResizeObserver<"u"){var _observer;element._b_resize_fn=fn,(_observer=observer)!=null||(observer=new ResizeObserver(handleResize)),observer.observe(element,{box:type})}}function unobserve(element){var _observer2;(_observer2=observer)==null||_observer2.unobserve(element),delete element._b_resize_fn}var import_web_dom_collections_iterator64,observer,init_resize_observer=__esm({"lib-browser/u/client/resize_observer.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator64=__toESM(require_web_dom_collections_iterator()),observer=null}});var OFFLINE_BANNER_NAME,BUILT_IN_REUSABLES_JSON,init_built_in_reusables=__esm({"lib-browser/shared/mobile/built_in_reusables.js"(){"use strict";init_define_process_env();init_shim();OFFLINE_BANNER_NAME="offline_banner",BUILT_IN_REUSABLES_JSON={};BUILT_IN_REUSABLES_JSON.offline_banner={elements:{bTHEc:{properties:{text:{entries:{0:"Offline - you are using cached data."},type:"TextExpression"},bold:!1,font_face:"var(--font_default):::regular",height:36,left:0,top:0,width:100,zindex:3,font_color:"rgba(255,255,255,1)",font_size:12,line_height:1.4,vertical_centering:!0,order:2,fit_width:!0,fit_height:!0,font_family:"var(--font_default)",font_weight:"400",padding_top:0,padding_left:0,single_width:!1,min_width_css:"0px",padding_right:0,single_height:!1,min_height_css:"0px",padding_bottom:0,vert_alignment:"center",horiz_alignment:"flex-start"},type:"Text",id:"bTGzq",current_parent:"bTHDt",default_name:"Text B"},bTHEi:{properties:{height:30,left:25,top:0,width:30,zindex:2,icon:"phosphor outline cloud-slash",icon_color:"rgba(255,255,255,1)",vertical_centering:!0,order:1,fit_height:!1,padding_top:5,padding_left:5,single_width:!0,min_width_css:"30px",padding_right:5,single_height:!0,min_height_css:"30px",padding_bottom:5,vert_alignment:"center",horiz_alignment:"flex-start"},type:"Icon",id:"bTGzw",current_parent:"bTHDt",default_name:"Icon B"}},properties:{height:200,width:200,element_type:"FloatingGroup",background_style:"bgcolor",bgcolor:"rgba(82,82,82,1)",fit_width:!0,custom_element_platform:"mobile",padding_top:8,padding_left:16,single_width:!1,default_width:393,min_height_px:0,padding_right:16,padding_bottom:8,element_version:5,container_layout:"row",responsive_version:1,container_vert_alignment:"center",container_horiz_alignment:"center"},type:"CustomDefinition",id:"bTGzp",default_name:OFFLINE_BANNER_NAME,name:OFFLINE_BANNER_NAME}}});var DEVICE_SKIN_IPHONE_14_15_PRO_MAX,DEVICE_SKIN_IPHONE_14_15_PRO,DEVICE_SKIN_IPHONE_13_14,DEVICE_SKIN_IPHONE_X_13_MINI,DEVICE_SKIN_IPHONE_8,DEVICE_SKIN_IPHONE_SE,DEVICE_SKIN_PIXEL_8_PRO,DEVICE_SKIN_PIXEL_6_PRO,DEVICE_SKIN_PIXEL_5,DEVICE_SKIN_GALAXY_21_PLUS,DEVICE_SKIN_GALAXY_21,init_images=__esm({"lib-browser/constants/images.js"(){"use strict";init_define_process_env();init_shim();DEVICE_SKIN_IPHONE_14_15_PRO_MAX="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639557908x704005990632488400%2FiPhone%252014%2520Pro%2520Max%2520%25E2%2580%2593%2520Space%2520Black.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_IPHONE_14_15_PRO="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718397227199x139742131558321150%2FiPhone%252014%2520Pro%2520%25E2%2580%2593%2520Space%2520Black.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_IPHONE_13_14="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639597098x543146683448303600%2FiPhone%252013%2520-%2520Midnight.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_IPHONE_X_13_MINI="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639576471x448054494051861800%2FiPhone%2520X%253A13%2520Mini%2520-%2520Space%2520Grey.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_IPHONE_8="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639586441x442887841911419100%2FiPhone%25208%2520-%2520Space%2520Grey.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_IPHONE_SE="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639568016x856275130728663600%2FiPhone%2520SE%2520-%2520Space%2520Grey.png?w=384&h=&auto=compress&fit=max",DEVICE_SKIN_PIXEL_8_PRO="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718643526773x384520288309185600%2FPixel%25208%2520Pro%2520-%2520Obsidian.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_PIXEL_6_PRO="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639616733x908462830821457500%2FPixel%25206%2520Pro.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_PIXEL_5="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718639608779x886990559657388400%2FPixel%25205%2520-%2520Black.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_GALAXY_21_PLUS="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718648386559x425305397226157400%2FSamsung%2520Galaxy%252021%2520Plus%2520-%2520Black.png?w=512&h=&auto=compress&fit=max",DEVICE_SKIN_GALAXY_21="https://d1muf25xaso8hp.cloudfront.net/https%3A%2F%2Fmeta-p.cdn.bubble.io%2Ff1718721359123x473394578578634200%2FSamsung%2520Galaxy%252021%2520%25E2%2580%2594%2520Black-min.png?w=512&h=&auto=compress&fit=max"}});var DEFAULT_MOBILE_DEVICE,SAFE_AREA_BOTTOM,SAFE_AREA_TOP,STANDARD_SAFE_AREA_INSETS,MOBILE_DEVICES,DEFAULT_SNAP_POINT,SNAP_PRESETS,SNAP_PRESETS_TO_VALUE,LIST_ITEMS,LIST_TYPES,init_mobile=__esm({"lib-browser/constants/mobile.js"(){"use strict";init_define_process_env();init_shim();init_built_in_reusables();init_images();DEFAULT_MOBILE_DEVICE="iphone_14_15_pro",SAFE_AREA_BOTTOM=34,SAFE_AREA_TOP=50,STANDARD_SAFE_AREA_INSETS={top:SAFE_AREA_TOP,bottom:SAFE_AREA_BOTTOM,left:0,right:0},MOBILE_DEVICES={iphone_14_15_pro_max:{os:"ios",platform:"apple",name:"iPhone 14/15 Pro Max",width:390,min_height:844,skin_info:{src:DEVICE_SKIN_IPHONE_14_15_PRO_MAX,width:"110%",height:"104%",transform:"translate(-4.7%, -1.92%)"}},iphone_14_15_pro:{os:"ios",platform:"apple",name:"iPhone 14/15 Pro",width:393,min_height:852,skin_info:{src:DEVICE_SKIN_IPHONE_14_15_PRO,width:"111%",height:"104.5%",transform:"translate(-5.1%, -2.1%)"}},iphone_13_14:{os:"ios",platform:"apple",name:"iPhone 13/14",width:390,min_height:844,skin_info:{src:DEVICE_SKIN_IPHONE_13_14,width:"112%",height:"105%",transform:"translate(-5.5%, -2.3%)"}},iphone_x_13_mini:{os:"ios",platform:"apple",name:"iPhone X/13 mini",width:375,min_height:812,skin_info:{src:DEVICE_SKIN_IPHONE_X_13_MINI,width:"116%",height:"106.3%",transform:"translate(-6.65%, -2.95%)",status_bar_padding:"17px 0px 14px 25px"}},iphone_8:{os:"ios",platform:"apple",name:"iPhone 8",width:375,min_height:667,skin_info:{src:DEVICE_SKIN_IPHONE_8,width:"117%",height:"133.3%",transform:"translate(-7.0%, -12.38%)",device_scaling_reduction:200,preview_y_offset:"6rem",no_rounding:!0}},iphone_se:{os:"ios",platform:"apple",name:"iPhone SE",width:320,min_height:568,skin_info:{src:DEVICE_SKIN_IPHONE_SE,width:"117%",height:"133.3%",transform:"translate(-7.0%, -12.35%)",device_scaling_reduction:190,preview_y_offset:"5.5rem",no_rounding:!0}},pixel_7_8_pro:{os:"android",platform:"google",name:"Pixel 7/8 Pro",width:412,min_height:915,skin_info:{src:DEVICE_SKIN_PIXEL_8_PRO,width:"104%",height:"101.6%",transform:"translate(-1.7%, -0.8%)"}},pixel_6_pro:{os:"android",platform:"google",name:"Pixel 6 Pro",width:412,min_height:892,skin_info:{src:DEVICE_SKIN_PIXEL_6_PRO,width:"106.9%",height:"103.7%",transform:"translate(-3.1%, -1.8%)",no_rounding:!0}},pixel_5:{os:"android",platform:"google",name:"Pixel 5",width:393,min_height:851,skin_info:{src:DEVICE_SKIN_PIXEL_5,width:"112%",height:"104.5%",transform:"translate(-4.8%, -2.35%)",status_bar_padding:"25px 24px 10px 50px"}},galaxy_s24_plus:{os:"android",platform:"samsung",name:"Galaxy S21 Plus",width:384,min_height:854,skin_info:{src:DEVICE_SKIN_GALAXY_21_PLUS,width:"110%",height:"104.26%",transform:"translate(-3.8%, -1.73%)"}},galaxy_s24:{os:"android",platform:"samsung",name:"Galaxy S21",width:360,min_height:800,skin_info:{src:DEVICE_SKIN_GALAXY_21,width:"110%",height:"104.1%",transform:"translate(-3.8%, -1.7%)"}}},DEFAULT_SNAP_POINT="medium",SNAP_PRESETS=["full","large","medium"],SNAP_PRESETS_TO_VALUE={full:100,large:92,medium:40},LIST_ITEMS=["VerticalListItem","HorizontalListItem"],LIST_TYPES=["VerticalList","HorizontalList","SectionList"]}});function get_runtime_parent(context){var _context$element;let targ=(_context$element=context.element)==null?void 0:_context$element.parent();for(;targ&&targ.element.type()!=="RepeatingGroup"&&targ.element.type()!=="Table"&&!targ.element.get_states().includes("group_data");)targ=targ.parent();return targ}function get_ancestor_element(type,datasource){if(type==="TableMainAxis"){let target_id=get_ancestor_element("TableCell",datasource).get_static_property("cell_main_axis_id");return appquery_default.element(target_id)}let element=datasource.context_element();for(;element&&element.type()!==type;)element=element.parent();return element}function get_runmode_element_ancestor_instance(type,element_instance,instance_cb){if(type==="TableMainAxis"){let table=get_runmode_element_ancestor_instance("Table",element_instance,instance_cb),target_id=get_runmode_element_ancestor_instance("TableCell",element_instance).get_static_property("cell_main_axis_id"),main_axis=table.find_instance_by_id(target_id);return instance_cb==null||instance_cb(main_axis),main_axis}for(;element_instance&&(!Array.isArray(type)||!type.includes(element_instance.element.type()))&&element_instance.element.type()!==type;){let element_type=element_instance.element.type();if((type==="TableCrossAxis"||LIST_ITEMS.includes(type)||type==="SectionHeader")&&element_type==="GroupItem")return instance_cb==null||instance_cb(element_instance),element_instance;instance_cb==null||instance_cb(element_instance),element_instance=element_instance.parent()}return instance_cb==null||instance_cb(element_instance),element_instance}function is_element_visible(element,element_node){var _element$root,_element_node$root,_element_node$parents;if(!element_node||((_element$root=element.root())==null?void 0:_element$root.id())!==((_element_node$root=element_node.root())==null?void 0:_element_node$root.id()))return!1;let okay_repeating_elements=((_element_node$parents=element_node.parents)==null?void 0:_element_node$parents.call(element_node).filter(parent=>{var _parent$is_repeating;return parent==null||(_parent$is_repeating=parent.is_repeating)==null?void 0:_parent$is_repeating.call(parent)})).map(r2=>r2.id());function is_okay(e){for(let r2 of e.parents().filter(parent=>{var _parent$is_repeating2;return parent==null||(_parent$is_repeating2=parent.is_repeating)==null?void 0:_parent$is_repeating2.call(parent)}))if(!okay_repeating_elements.includes(r2.id()))return!1;return!0}return is_okay(element)}var import_web_dom_collections_iterator65,get_element_parent,context_parent_btype,element_parent_btype,init_core_ds_element_utilities=__esm({"lib-browser/core/core_datasources/utilities/core_ds_element_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator65=__toESM(require_web_dom_collections_iterator());init_btypes();init_appquery();init_mobile();get_element_parent=datasource=>{var _datasource$context_e;return(_datasource$context_e=datasource.context_element())==null?void 0:_datasource$context_e.parent()};context_parent_btype=context_element=>{var _context_element$type,_context_element$pare4,_context_element$pare5;if((context_element==null||(_context_element$type=context_element.type)==null?void 0:_context_element$type.call(context_element))==="TableCell"){var _context_element$pare,_context_element$pare2,_context_element$pare3;return(_context_element$pare=(_context_element$pare2=context_element.parent())==null||(_context_element$pare3=_context_element$pare2.parent())==null?void 0:_context_element$pare3.get_static_property("group_type"))!=null?_context_element$pare:null}return(_context_element$pare4=context_element==null||(_context_element$pare5=context_element.parent())==null?void 0:_context_element$pare5.get_static_property("group_type"))!=null?_context_element$pare4:null},element_parent_btype=(static_property,datasource)=>get5(context_parent_btype(datasource.context_element()))}});function get_current_geographic_position(){if(navigator.geolocation){var _core$request_from_ca;if(!waiting_for_current_location_watcher){let update_position2=function(position){let current=current_geographic_location(),current_geo_coords={lat:current==null?void 0:current.lat,lng:current==null?void 0:current.lng};if(!current_geographic_location()||geographic_distance(current_geo_coords,{lat:position.coords.latitude,lng:position.coords.longitude})>.01)return current_geographic_location({lat:position.coords.latitude,lng:position.coords.longitude})};var update_position=update_position2;waiting_for_current_location_watcher=b_async7.MakeKey(1/0,"waiting_for_current_location_watcher");let setup_watcher=()=>{navigator.geolocation.watchPosition(update_position2,err=>console.log(err),{enableHighAccuracy:!0})};navigator.geolocation.getCurrentPosition(position=>{update_position2(position),waiting_for_current_location_watcher.turn(),setup_watcher()},err=>{if(owner_error(err.message),err.message.includes("User denied Geolocation")){waiting_for_current_location_watcher.turn();return}waiting_for_current_location_watcher.turn(),setup_watcher()},{enableHighAccuracy:!1,maximumAge:30*60*1e3})}b_async7.ensure_ready(waiting_for_current_location_watcher);let val=current_geographic_location();round_lat_lng(val);let request={request_type:"geocode_latlong",language:lib_default().app_language(),...val};return(_core$request_from_ca=request_from_cache(request))!=null?_core$request_from_ca:val}else return null}function get_timezone_for_location(address){if(!address||!is_b_location(address))return"";let latitude=address.lat,longitude=address.lng,timestamp2=parseInt(Date.now()/1e3);return request_timezone({latitude,longitude,timestamp:timestamp2,request_type:"timezone"})}var b_async7,autorun7,waiting_for_current_location_watcher,current_geographic_location,get_address_place_autocomplete,init_location_lookups=__esm({"lib-browser/geolocation/location_lookups.js"(){"use strict";init_define_process_env();init_shim();init_lib();init_logger();b_async7=__toESM(require_b_async()),autorun7=__toESM(require_autorun());init_b_location_utils();init_core2();init_b_object();waiting_for_current_location_watcher=null,current_geographic_location=autorun7.Box(null);get_address_place_autocomplete=(req,cb)=>request_autocomplete(extend({request_type:"autocomplete"},req),cb)}});var context_exports={};__export(context_exports,{fromFrozenStateOr:()=>fromFrozenStateOr});function fromFrozenStateOr(context,key,missingValue){var _context$frozen_state;return(_context$frozen_state=context.frozen_state)!=null&&_context$frozen_state.has_key(key)?context.frozen_state.get(key):missingValue()}var init_context=__esm({"lib-browser/lang/evaluation/context.js"(){"use strict";init_define_process_env();init_shim()}});var locations_exports={};__export(locations_exports,{BREAKING_REVISION_TOPIC:()=>BREAKING_REVISION_TOPIC,DEFAULT_CUSTOM_BRANCH_DESCRIPTION:()=>DEFAULT_CUSTOM_BRANCH_DESCRIPTION,DEFAULT_HOTFIX_DESCRIPTION:()=>DEFAULT_HOTFIX_DESCRIPTION,DEFAULT_LIVE_DESCRIPTION:()=>DEFAULT_LIVE_DESCRIPTION,DEFAULT_TEST_NO_VC_DESCRIPTION:()=>DEFAULT_TEST_NO_VC_DESCRIPTION,DEFAULT_TEST_VC_DESCRIPTION:()=>DEFAULT_TEST_VC_DESCRIPTION,DEVELOPMENT_ENVIRONMENT_DISPLAY:()=>DEVELOPMENT_ENVIRONMENT_DISPLAY,ENVIRONMENTS:()=>ENVIRONMENTS,HOTFIX_VERSION_DISPLAY:()=>HOTFIX_VERSION_DISPLAY,LIVE_ENVIRONMENT_DISPLAY:()=>LIVE_ENVIRONMENT_DISPLAY,LIVE_VERSION:()=>LIVE_VERSION,LIVE_VERSION_DISPLAY:()=>LIVE_VERSION_DISPLAY,OKAY_VERSIONS:()=>OKAY_VERSIONS,PENDING_TEMPLATE_VERSION:()=>PENDING_TEMPLATE_VERSION,PUBLISHED_TEMPLATE_VERSION:()=>PUBLISHED_TEMPLATE_VERSION,RESERVED_VERSION_NAMES:()=>RESERVED_VERSION_NAMES,TEMPLATE_VERSIONS:()=>TEMPLATE_VERSIONS,TEST_VERSION:()=>TEST_VERSION,TEST_VERSION_DISPLAY:()=>TEST_VERSION_DISPLAY,VERSIONS_DISPLAY:()=>VERSIONS_DISPLAY,VERSION_PATH_PREFIX:()=>VERSION_PATH_PREFIX});var LIVE_ENVIRONMENT_DISPLAY,DEVELOPMENT_ENVIRONMENT_DISPLAY,ENVIRONMENTS,LIVE_VERSION,TEST_VERSION,RESERVED_VERSION_NAMES,PENDING_TEMPLATE_VERSION,PUBLISHED_TEMPLATE_VERSION,BREAKING_REVISION_TOPIC,OKAY_VERSIONS,TEMPLATE_VERSIONS,VERSION_PATH_PREFIX,LIVE_VERSION_DISPLAY,TEST_VERSION_DISPLAY,HOTFIX_VERSION_DISPLAY,VERSIONS_DISPLAY,DEFAULT_TEST_NO_VC_DESCRIPTION,DEFAULT_TEST_VC_DESCRIPTION,DEFAULT_LIVE_DESCRIPTION,DEFAULT_CUSTOM_BRANCH_DESCRIPTION,DEFAULT_HOTFIX_DESCRIPTION,init_locations=__esm({"lib-browser/constants/locations.js"(){"use strict";init_define_process_env();init_shim();LIVE_ENVIRONMENT_DISPLAY="Live",DEVELOPMENT_ENVIRONMENT_DISPLAY="Development",ENVIRONMENTS=[LIVE_ENVIRONMENT_DISPLAY,DEVELOPMENT_ENVIRONMENT_DISPLAY],LIVE_VERSION="live",TEST_VERSION="test",RESERVED_VERSION_NAMES=[LIVE_VERSION,TEST_VERSION,DEVELOPMENT_ENVIRONMENT_DISPLAY,LIVE_ENVIRONMENT_DISPLAY].map(version_name=>version_name.toLowerCase()),PENDING_TEMPLATE_VERSION="pending_template",PUBLISHED_TEMPLATE_VERSION="published_template",BREAKING_REVISION_TOPIC="breaking_revision",OKAY_VERSIONS=[LIVE_VERSION,TEST_VERSION],TEMPLATE_VERSIONS=[PENDING_TEMPLATE_VERSION,PUBLISHED_TEMPLATE_VERSION],VERSION_PATH_PREFIX="version-",LIVE_VERSION_DISPLAY="Live",TEST_VERSION_DISPLAY="Main",HOTFIX_VERSION_DISPLAY="hotfix",VERSIONS_DISPLAY={[TEST_VERSION]:TEST_VERSION_DISPLAY,[LIVE_VERSION]:LIVE_VERSION_DISPLAY},DEFAULT_TEST_NO_VC_DESCRIPTION="This is your default development branch. Make changes here, and deploy them to Live.",DEFAULT_TEST_VC_DESCRIPTION="This is your default deployment branch. Make changes and test them in custom branches, then merge into Main and deploy from Main to Live.",DEFAULT_LIVE_DESCRIPTION="This is your live site on the web.",DEFAULT_CUSTOM_BRANCH_DESCRIPTION="This is your custom branch #BRANCHNAME. Make changes here, and merge them into Main for deployment. You can customize this description.",DEFAULT_HOTFIX_DESCRIPTION="Use this branch to make urgent bug fixes or time-sensitive changes, and deploy them directly to Live."}});function callVersionControlPostEndpoint(endpoint,data,callback){lib_default.or_throw().location.post(endpoint,data,callback)}var init_version_control_post_endpoints=__esm({"lib-browser/editor/version_control_functionality/actions/version_control_post_endpoints.js"(){"use strict";init_define_process_env();init_shim();init_lib()}});var init_types=__esm({"lib-browser/shared/mobile/types.js"(){"use strict";init_define_process_env();init_shim()}});var init_mobile_engine_number=__esm({"lib-browser/shared/mobile/mobile_engine_number.js"(){"use strict";init_define_process_env();init_shim()}});var multiple_live_versions_exports={};__export(multiple_live_versions_exports,{canonicalizeLiveVersion:()=>canonicalizeLiveVersion,deprecateLiveVersion:()=>deprecateLiveVersion,formatVersionTimestamp:()=>formatVersionTimestamp,getLastDeployedEngineNumber:()=>getLastDeployedEngineNumber,getLiveVersionCopiesByStatusSorted:()=>getLiveVersionCopiesByStatusSorted,isLiveVersion:()=>isLiveVersion,isLiveVersionCopy:()=>isLiveVersionCopy});function getLastDeployedEngineNumber(versions){let versionsArray=Array.from(getLiveVersionCopiesByStatusSorted({versions,statuses:["available","in_progress"]})),lastVersionsEngineNumber;if(versionsArray.length>0){var _versionsArray$pop,_versionsArray$pop$1$;if(lastVersionsEngineNumber=(_versionsArray$pop=versionsArray.pop())==null||(_versionsArray$pop$1$=_versionsArray$pop[1].live_version_metadata)==null?void 0:_versionsArray$pop$1$.mobile_engine_number,lastVersionsEngineNumber==null)throw new UnexpectedError("Missing bubble engine number from previous build",{appname:lib_default.or_throw().appname(),app_version:lib_default.or_throw().app_version()})}else lastVersionsEngineNumber=2;return lastVersionsEngineNumber}function formatVersionTimestamp(deploy_timestamp){let date=new Date(deploy_timestamp).toLocaleString(),[dateString,timeString]=date.split(", ");return dateString=dateString.replace(/\//g,"-"),`Version ${dateString} ${timeString}`}function deprecateLiveVersion(_ref5){var _Lib$or_throw$current,_Lib$or_throw,_Lib$or_throw$current2;let{live_app_version}=_ref5;return callVersionControlPostEndpoint("server://appeditor/deprecate_live_version",{appname:appquery_default.appname(),user_id:(_Lib$or_throw$current=(_Lib$or_throw=lib_default.or_throw()).current_user)==null||(_Lib$or_throw$current2=_Lib$or_throw$current.call(_Lib$or_throw))==null?void 0:_Lib$or_throw$current2._id(),live_app_version},(err,res)=>{err!=null&&log(err)})}var import_web_dom_collections_iterator66,import_es_string_replace16,isLiveVersion,isLiveVersionCopy,canonicalizeLiveVersion,getLiveVersionCopiesByStatusSorted,init_multiple_live_versions=__esm({"lib-browser/shared/version_control/multiple_live_versions.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator66=__toESM(require_web_dom_collections_iterator()),import_es_string_replace16=__toESM(require_es_string_replace());init_locations();init_version_control_post_endpoints();init_types();init_logger();init_lib();init_appquery();init_errors();init_mobile_engine_number();isLiveVersion=version2=>version2?version2===LIVE_VERSION||isLiveVersionCopy(version2):!1,isLiveVersionCopy=version2=>version2.startsWith(`${LIVE_VERSION}.`),canonicalizeLiveVersion=version2=>isLiveVersion(version2)?LIVE_VERSION:version2,getLiveVersionCopiesByStatusSorted=_ref=>{let{versions,sortOrder="ascending",statuses=["available"]}=_ref,liveVersionCopies=Object.entries(versions).filter(_ref2=>{var _versionMetadata$live;let[versionId,versionMetadata]=_ref2,status=(_versionMetadata$live=versionMetadata.live_version_metadata)==null?void 0:_versionMetadata$live.status;return isLiveVersionCopy(versionId)&&status&&(statuses==null?void 0:statuses.includes(status))}).sort((_ref3,_ref4)=>{var _versionMetadataA$liv,_versionMetadataA$liv2,_versionMetadataB$liv,_versionMetadataB$liv2;let[,versionMetadataA]=_ref3,[,versionMetadataB]=_ref4,timestampA=(_versionMetadataA$liv=(_versionMetadataA$liv2=versionMetadataA.live_version_metadata)==null?void 0:_versionMetadataA$liv2.deploy_timestamp)!=null?_versionMetadataA$liv:0,timestampB=(_versionMetadataB$liv=(_versionMetadataB$liv2=versionMetadataB.live_version_metadata)==null?void 0:_versionMetadataB$liv2.deploy_timestamp)!=null?_versionMetadataB$liv:0;return sortOrder==="ascending"?timestampA-timestampB:timestampB-timestampA});return new Map(liveVersionCopies)}}});var page_state_exports={};__export(page_state_exports,{get_all_data_names:()=>get_all_data_names,get_basic_datasources:()=>get_basic_datasources,get_page_data:()=>get_page_data,get_page_data_names:()=>get_page_data_names,get_page_data_ready_key:()=>get_page_data_ready_key,get_page_data_type:()=>get_page_data_type,input_focused:()=>input_focused,page_current_scroll_position:()=>page_current_scroll_position,page_width:()=>page_width});function get_basic_datasources(root2,additional){var _additional,_root$is_api;(_additional=additional)!=null||(additional={});let obj={current_user(){if(lib_default().bubble_version()>=23){let id=lib_default().current_user()._id();return lib_default().db_instance().get(id)}else return lib_default().current_user()},page_data(properties,context){return get_page_data(properties.name,context)},page_data_btype(properties){var _get_page_data_type;return(_get_page_data_type=get_page_data_type(properties.name))!=null?_get_page_data_type:" null"}};return root2!=null&&(_root$is_api=root2.is_api)!=null&&_root$is_api.call(root2)||extend(obj,{current_page_item(){return lib_default().pageparam.get()},current_page_item_btype(){var _root$get_static_prop;return(_root$get_static_prop=root2.get_static_property("page_item_type"))!=null?_root$get_static_prop:"null"}}),extend(obj,additional)}function get_page_data_names(context){var _context$owner_node$c,_context$owner_node,_context$owner_node$c2,_context$owner_node$c3,_context$owner_node$c4,_context$owner_node2,_context$owner_node$c5,_context$owner_node$c6,_context$owner_node$c7,_context$owner_node3,_context$owner_node$c8,_context$owner_node$c9,_context$owner_node4,_context$owner_node$c10,_context$owner_node$c11,_appquery$get_public_;if(context.owner_type==="BackendWorkflow")return api_page_data_names;let res=[...base_data_names];return((_context$owner_node$c=(_context$owner_node=context.owner_node).context_element)==null||(_context$owner_node$c2=_context$owner_node$c.call(_context$owner_node))==null||(_context$owner_node$c3=_context$owner_node$c2.root())==null?void 0:_context$owner_node$c3.type())==="CustomDefinition"&&res.push(...custom_definition_names),(_context$owner_node$c4=(_context$owner_node2=context.owner_node).context_element)!=null&&(_context$owner_node$c5=_context$owner_node$c4.call(_context$owner_node2))!=null&&(_context$owner_node$c6=_context$owner_node$c5.root())!=null&&_context$owner_node$c6.is_mobile()&&((_context$owner_node$c7=(_context$owner_node3=context.owner_node).context_element)==null||(_context$owner_node$c8=_context$owner_node$c7.call(_context$owner_node3))==null?void 0:_context$owner_node$c8.type())!=="Page"&&context.owner_type!=="Workflow"&&res.push(...mobile_view_names),((_context$owner_node$c9=(_context$owner_node4=context.owner_node).context_element)==null||(_context$owner_node$c10=_context$owner_node$c9.call(_context$owner_node4))==null||(_context$owner_node$c11=_context$owner_node$c10.root())==null?void 0:_context$owner_node$c11.id())===((_appquery$get_public_=appquery_default.get_public_setting("built_in_mobile_views"))==null?void 0:_appquery$get_public_.update_app)&&res.push(...can_update_via_refresh_name),res.push(...rest_data_names),res}function get_all_data_names(){return[...base_data_names,...custom_definition_names,...mobile_view_names,...can_update_via_refresh_name,...rest_data_names]}function get_page_data(name,context){var _context$element,_context$element$root,_context$element2,_context$element2$roo,_context$element2$roo2,_context$_current_dat,_context$element$root2,_context$element4,_context$element4$roo,_context$element$root3,_context$element5,_context$element5$roo;if(context.is_api&&!api_page_data_names.includes(name))throw new UnexpectedError("calling a PageData datasource in API invalid: "+name);if(context.in_pageservice&&!["Current Page Name","Current View Title","Website Home","AppIsTest"].includes(name))throw new OwnerError("Datasource not allowed in page",{display:"Calling a data source invalid when generating the page HTML: "+name});switch(name){case"Website Home":return lib_default().location.get_server_base({canonicalizeLiveVersion:!0});case"This Url":return lib_default().location.my_location();case"Current Page Name":return lib_default().location.get_page();case"Current View Title":return evaluate_property((_context$element=context.element)==null||(_context$element$root=_context$element.root_instance)==null?void 0:_context$element$root.call(_context$element),"title");case"Can Update Via Refresh":return(_context$element2=context.element)==null||(_context$element2$roo=_context$element2.root_instance)==null||(_context$element2$roo2=_context$element2$roo.call(_context$element2))==null?void 0:_context$element2$roo2.state("can_update_via_refresh");case"CurrentLanguage":return lib_default().app_language();case"AppIsTest":return!isLiveVersion(lib_default().app_version());case"AppVersion":return appquery_default.app_version();case"Website Admin Email":return appquery_default.admin_email();case"Current Date/Time":return(_context$_current_dat=context._current_date_time)!=null||(context._current_date_time=new Date(timestamp())),context._current_date_time;case"Current Position":return context.frozen_state&&on_server()?context.frozen_state.other_data["Current Position"]:get_current_geographic_position();case"Current Page Width":if(on_react_native()){var _context$element3,_context$element3$roo;return page_width((_context$element3=context.element)==null||(_context$element3$roo=_context$element3.root_instance)==null?void 0:_context$element3$roo.call(_context$element3))}else if(on_client())return page_width();return context.frozen_state.other_data["Current Page Width"];case"Current Page Scrolling Position":return on_client()?page_current_scroll_position():context.frozen_state.other_data["Current Page Scroll Position"];case"Is Reset Password Token Valid":return null;case"Page Loaded Above Fold":return on_server()?fromFrozenStateOr(context,PageData("Page Loaded Above Fold"),()=>!0):lib_default().element.page_done_loading((_context$element$root2=(_context$element4=context.element)==null||(_context$element4$roo=_context$element4.root_instance)==null?void 0:_context$element4$roo.call(_context$element4))!=null?_context$element$root2:lib_default().element.get_page());case"Page Loaded (Entire)":return on_server()?fromFrozenStateOr(context,PageData("Page Loaded (Entire)"),()=>!0):lib_default().element.page_done_loading((_context$element$root3=(_context$element5=context.element)==null||(_context$element5$roo=_context$element5.root_instance)==null?void 0:_context$element5$roo.call(_context$element5))!=null?_context$element$root3:lib_default().element.get_page(),!0);case"IsOffline":return on_server()?fromFrozenStateOr(context,PageData("IsOffline"),()=>!1):!lib_default().location.is_online();default:throw new UnexpectedError("unrecognized: "+name)}}function get_page_data_type(name){switch(name){case"Current Date/Time":return"date";case"Current Position":return"geographic_address";case"Current Page Width":return"number";case"Current Page Scrolling Position":return"number";case"Page Loaded Above Fold":case"Page Loaded (Entire)":case"Is Reset Password Token Valid":case"AppIsTest":return"boolean";case"IsOffline":return"boolean";case"Can Update Via Refresh":return"boolean";default:return"text"}}var import_web_dom_collections_iterator67,PageData,page_width,page_current_scroll_position,api_page_data_names,base_data_names,custom_definition_names,mobile_view_names,can_update_via_refresh_name,rest_data_names,get_page_data_ready_key,input_focused,init_page_state=__esm({"lib-browser/lang/evaluation/page_state.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator67=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_lib();init_location_lookups();init_element_eval();init_context();init_multiple_live_versions();init_state_keys();({PageData}=state_keys_default);on_react_native()?page_width=instance4=>instance4?instance4.state("current_width"):0:window?page_width=u_exports2.Box($(window).width()):page_width=u_exports2.Box(null,!0);page_current_scroll_position=u_exports2.Box(0),api_page_data_names=["Website Home","CurrentLanguage","Website Admin Email","Current Date/Time","AppIsTest","AppVersion"],base_data_names=["Website Home","This Url","CurrentLanguage"],custom_definition_names=["Current Page Name"],mobile_view_names=["Current View Title"],can_update_via_refresh_name=["Can Update Via Refresh"],rest_data_names=["Website Admin Email","Current Date/Time","Current Position","Current Page Width","Current Page Scrolling Position","Page Loaded Above Fold","Page Loaded (Entire)","AppIsTest","AppVersion","IsOffline"];get_page_data_ready_key=()=>u_exports2.FakeKey();input_focused=u_exports2.Box(!1)}});var Dynamic2,Dynamic_default,init_Dynamic=__esm({"lib-browser/db/values/Dynamic.js"(){"use strict";init_define_process_env();init_shim();Dynamic2=class{},Dynamic_default=Dynamic2}});function to_id(obj,idx,btype_id){if(obj==null)return null;if(idx%10===0&&optional_pause(),typeof obj._id!="function")throw new UnexpectedError("_id isnt function",{btype_id:btype_id,object_type:typeof obj,obj_data:json_stringify(obj,void 0,!0)});return obj._id()}function wrapped_dehydrate(obj,idx){return idx%10===0&&optional_pause(),dehydrate_tree(obj)}var import_web_dom_collections_iterator68,_lang_btypes,set_lang_btypes,lang_btypes,_is_geographic_object,resolve_sorts,ObjectBase,email_getter,get_temp_db,_static_get,can_group_with,can_group,can_group_on,can_aggregate_on,array_to_ids,coerce_to_integer,init_db_utils=__esm({"lib-browser/db/db_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator68=__toESM(require_web_dom_collections_iterator());init_registry2();init_value_types();init_logger();init_hydrate();init_errors();init_u2();init_b_fiber();init_eval();init_db();init_postgres_pool();init_btype_ids();init_loggable();_lang_btypes=null,set_lang_btypes=input2=>_lang_btypes=input2,lang_btypes=()=>_lang_btypes,_is_geographic_object=function(data,btype_id){return btype_id&&typeof btype_id=="string"?btype_id==="geographic_address":!!(data.lat&&data.lng&&!data._id)},resolve_sorts=function(sorts_list,allow_db_only){let processed_sorts=[];for(let item of sorts_list!=null?sorts_list:[])item&&(item.self||item.sort_on_id||item.sort_field&&(allow_db_only||typeof item.sort_field!="object"))&&processed_sorts.push(item);return processed_sorts},ObjectBase={exists(){return this.raw_shallow()!=null},_id(){return this.id},_type(){let type=this.db._get_type(this.id);return type||(this.raw_shallow(),type=this.db._get_type(this.id)),type},parent_id(){return this.id},dehydrate(){return HYDRATE_STRING+this.id},get(){return this},key(){return this.id},flush(){this.db.flush(this.id)},child(name){return this._child(name.split("."))},_child(path){return new this.db.DBNODE(this,path,this.db)},get_email(){return email_getter(this)},is_logged_in(){var _this$child$get;return(_this$child$get=this.child("user_signed_up").get())!=null?_this$child$get:!1},maison_by_default(){var _this$child$get2;return(_this$child$get2=this.child("maison_by_default_boolean").get())!=null?_this$child$get2:!1},poll(interval,n){if(running_test()){console.log("Polling turned on, but disabling it because this is a test");return}return this.db._local(this._id()).poll(interval,n)}},email_getter=function(json){let email=json.child("authentication").child("email").child("email").raw();if(email)return email;let providers3=json.child("authentication").raw();for(let provider_id in providers3){let data=providers3[provider_id];if(data.email!=null)return data.email}return null},get_temp_db=function(temp_db,appname){if(temp_db!=null&&temp_db.includes(":")){if(temp_db.split(":")[0]===appname)return temp_db.split(":")[1]}else return temp_db},_static_get=function(data,database,btype_id){if(is2(data,value_types_default.DYNAMIC)||data!=null&&data.is_db_proxy||data!=null&&data.getTime)return data;let value=_lang_btypes.get(btype_id);if(value.is_range())return value.cast(rehydrate(database,data));if(Array.isArray(data)){typeof btype_id=="string"&&(btype_id=value.inner_including_ranges().id());let StaticList2=get3(value_types_default.STATIC_LIST);return new StaticList2(rehydrate_tree(database,data),database,btype_id)}if(data&&typeof data=="object"){if(_is_geographic_object(data,btype_id))return data;if(is_json_class(data))return from_json(database,data);let StaticObject2=get3(value_types_default.STATIC_OBJECT);return new StaticObject2(data,database,btype_id)}let rehydrated=rehydrate(database,data);return btype_id?_lang_btypes.get(btype_id).cast(rehydrated):rehydrated},can_group_with=function(btype_id,message){switch(_lang_btypes.get(btype_id).get_message(message).ret_btype_id()){case"number":return["exact","bucket"];case"date":return["exact"].concat(CALENDAR_GROUPINGS);default:return["exact"]}},can_group=btype_id=>["text","number","date","user"].includes(btype_id)||is_custom_type(btype_id)||is_option_set(btype_id),can_group_on=function(btype_id){let messages=_lang_btypes.get(btype_id).get_messages();return messages=messages.filter(message=>message.is_lookup()),messages=messages.filter(message=>can_group(message.ret_btype_id())),messages.map(message=>message.name())},can_aggregate_on=function(fn,btype_id){if(fn==="count")return[];let messages=_lang_btypes.get(btype_id).get_messages(),aggregatable=message=>message.is_lookup()&&message.ret_btype_id()==="number"||message.ret_btype_id()==="date"&&["max","min","average","median"].includes(fn!=null?fn:"");return messages=messages.filter(aggregatable),messages.map(message=>message.name())};array_to_ids=function(btype_id,array){return _lang_btypes.get(btype_id).custom_type()!=null?array.map((obj,idx)=>to_id(obj,idx,btype_id)):array.map((obj,idx)=>wrapped_dehydrate(obj,idx))},coerce_to_integer=function(value,data_to_log){let int_value=Math.floor(value);return value!==int_value&&warn("consumer tried to pass non-integer value",{value,data_to_log}),int_value}}});function _static_node_from_cache(my_db,_ref){var _my_db$__StaticNode_r,_my_db$__StaticNode_r2,_my_db$__StaticNode_r3;let{data,btype_id}=_ref,cache_key=incremental_json_stringify({data:dehydrate_tree(data),btype_id});return(_my_db$__StaticNode_r=my_db.__StaticNode_rehydrate_cache)!=null||(my_db.__StaticNode_rehydrate_cache={}),(_my_db$__StaticNode_r3=(_my_db$__StaticNode_r2=my_db.__StaticNode_rehydrate_cache)[cache_key])!=null||(_my_db$__StaticNode_r2[cache_key]=new StaticNode(data,my_db,btype_id)),my_db.__StaticNode_rehydrate_cache[cache_key]}var import_web_dom_collections_iterator69,StaticNode,init_StaticNode=__esm({"lib-browser/db/values/StaticNode.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator69=__toESM(require_web_dom_collections_iterator());init_u2();init_Dynamic();init_db_utils();init_value_types();init_registry2();init_logger();init_lib();init_hydrate();StaticNode=class _StaticNode extends Dynamic_default{constructor(data,db3,btype_id){var _this$db;super(),this.data=data,this.db=db3,this.btype_id=btype_id,(_this$db=this.db)!=null||(this.db=lib_default().db_instance())}get_data(){return this.data}set(){return debug("SETTING TO A STATIC NODE... IGNORING THIS")}push(){return debug("PUSHING TO A STATIC NODE.... IGNORING THIS")}push_list(){return debug("PUSHING TO A STATIC NODE.... IGNORING THIS")}raw(){return is2(this.data,value_types_default.LIST_WRAPPER)?this.data.get_children():this.data}_type(){return this.btype_id}child(name){let new_data,new_btype_id,data=this.get_data(),splitted=String(name).split(".");if(splitted.length>1&&typeof data[splitted[0]]=="object"){new_data=data;for(let piece of splitted){var _new_data;new_data=(_new_data=new_data)==null?void 0:_new_data[piece]}}else new_data=data==null?void 0:data[name];if(this.btype_id!=null)if(this.btype_id==="user"&&name==="authentication"||name.indexOf("authentication.")===0)new_btype_id="sys.json";else if(this.btype_id==="user"&&name==="user_signed_up")new_btype_id="boolean";else if(this.btype_id==="user"&&name==="StripeCustomerID")new_btype_id="text";else if(this.btype_id==="sys.json")new_btype_id="sys.json";else{var _db_utils$lang_btypes,_db_utils$lang_btypes2;new_btype_id=(_db_utils$lang_btypes=lang_btypes().get(this.btype_id))==null||(_db_utils$lang_btypes2=_db_utils$lang_btypes.get_message(name))==null?void 0:_db_utils$lang_btypes2.ret_btype_id(),new_btype_id==="null"&&(new_btype_id=null),new_btype_id||owner_error("Could not find StaticNode child value id",{display:`Cannot evaluate the child ${name} on type ${this.btype_id} because it does not exist`,ours:this.btype_id,name})}else new_btype_id=null;return new _StaticNode(new_data,this.db,new_btype_id)}get(){return _static_get(this.get_data(),this.db,this.btype_id)}to_json(){var _this$_json_cache;return(_this$_json_cache=this._json_cache)!=null||(this._json_cache=this.compute_to_json()),this._json_cache}compute_to_json(){return{_class:"StaticNode",data:dehydrate_tree(this.data),btype_id:this.btype_id}}dehydrate(){var _this$db2,_this$db2$__StaticNod,_this$db$__StaticNode,_this$db$__StaticNode2;let key=_dehydrate_btype_id_data(this.data,this.btype_id),cache_key=incremental_json_stringify({data:dehydrate_tree(this.data),btype_id:this.btype_id});return(_this$db2$__StaticNod=(_this$db2=this.db).__StaticNode_rehydrate_cache)!=null||(_this$db2.__StaticNode_rehydrate_cache={}),(_this$db$__StaticNode2=(_this$db$__StaticNode=this.db.__StaticNode_rehydrate_cache)[cache_key])!=null||(_this$db$__StaticNode[cache_key]=this),dehydrate_prefix("StaticNode")+key}};StaticNode.from_json=(my_db,_ref2)=>{let{data,btype_id,value_id}=_ref2,id=btype_id!=null?btype_id:value_id;return new StaticNode(data,my_db,id)};StaticNode.rehydrate=function(my_db,key){let{btype_id,data}=_rehydrate_btype_id_data(my_db,key);return _static_node_from_cache(my_db,{data,btype_id})}}});var import_web_dom_collections_iterator70,import_fast_deep_equal2,_class16,ListWrapper,init_ListWrapper=__esm({"lib-browser/db/values/ListWrapper.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator70=__toESM(require_web_dom_collections_iterator()),import_fast_deep_equal2=__toESM(require_fast_deep_equal());init_u2();init_incremental();init_db_utils();init_db();init_value_types();init_byte();init_registry2();init_eval_node_state();init_lib();init_hydrate();init_Dynamic();init_loggable();init_db();init_eval_node_state();ListWrapper=class _ListWrapper extends Dynamic_default{constructor(db3,query){if(super(),this.db=void 0,this.query=void 0,this._creation_eval_node=void 0,!db3)throw new UnexpectedError("missing db");if(!query)throw new UnexpectedError("missing query");this.db=db3,this.query=query;let eval_node=get_current_eval_node();return eval_node&&(this._creation_eval_node=eval_node),this}set(){}_with_eval_node(fn){return!on_client()||!this._creation_eval_node?fn():with_eval_node(this._creation_eval_node,fn)}get_children(from,n){if(n<1)return[];from+n>ALL_MAX&&(n=ALL_MAX-from);let ret=this._with_eval_node(()=>this.db.execute_with_dependency(this.query,from,n));return this.db.array_to_objects(this.query,ret)}all_ids(){let n=ALL_MAX,new_query={t:"Columns",columns:["_id"],prev:this.query};return this._with_eval_node(()=>this.db.execute_with_dependency(new_query,0,n))}get_plan(from,n){return this.db.build_query_plan(this.query,from,n)}length(options){let length_query={t:"Length",prev:this.query,options};return this._with_eval_node(()=>this.db.execute_with_dependency(length_query,0,1)[0])}length_or_zero(){var _this$length;return(_this$length=this.length())!=null?_this$length:0}get_item_btype_id(){return this.db.get_plan_ret_btype(this.query)}filter(constraints,null_not_dropped){if(constraints=lib_default.or_throw().bv().resolve_constraints(constraints,null_not_dropped),constraints=dehydrate_tree(constraints),constraints.length===0)return this;for(let c of constraints)if(c.constraint_type==="return_empty_set")return lib_default.or_throw().db_instance().static_list(this.get_item_btype_id(),[]);let new_query={t:"Filter",constraints,prev:this.query};return this.withQuery(new_query)}with_extra_fields(extra_field_names){if(!extra_field_names||extra_field_names.length===0)return this;let new_query={t:"ExtraFields",extra_field_names,prev:this.query};return this.withQuery(new_query)}sort(sorts_list){if(sorts_list=resolve_sorts(sorts_list,!1),sorts_list.length===0)return this;let new_query={t:"Sort",sorts_list,prev:this.query};return this.withQuery(new_query)}sort_on_id(){return this.sort([{sort_field:"_id"}])}capped(max_length){let new_query={t:"Cap",max:max_length,prev:this.query};return this.withQuery(new_query)}offset(offset){let new_query={t:"Offset",offset,prev:this.query};return this.withQuery(new_query)}to_json(){return{_class:LIST_WRAPPER_CLASS_NAME,query:this.query}}dehydrate(){return dehydrate_prefix("ListWrapper")+incremental_json_stringify(this.query)}get(){return this}all(){return this.get_children(0,ALL_MAX)}all_iteratively(callback){let cursor;for(;cursor=this._iterate(cursor),!!cursor.batch.length;)callback(cursor.batch)}_iterate(cursor){var _cursor$index;let batch_size=this._get_batch_size(cursor),batch3=this.get_children((_cursor$index=cursor==null?void 0:cursor.index)!=null?_cursor$index:0,batch_size);return this._create_next_cursor(cursor,batch3,batch_size)}_get_batch_size(cursor){let TARGET_BATCH_BYTE_SIZE=1048576,MIN_BATCH_SIZE=1,MAX_BATCH_SIZE=400,INITIAL_BATCH_SIZE=20,target_batch_size=cursor&&Number.isFinite(cursor.average_item_byte_size)?Math.floor(TARGET_BATCH_BYTE_SIZE/cursor.average_item_byte_size):INITIAL_BATCH_SIZE;return Math.min(Math.max(target_batch_size,MIN_BATCH_SIZE),MAX_BATCH_SIZE)}_create_next_cursor(cursor,batch3,batch_size){let is_valid_sample=sample=>(sample==null?void 0:sample._id)!=null&&typeof(sample==null?void 0:sample.raw)=="function",samples=batch3.slice(0,20).filter(is_valid_sample);samples.forEach(sample=>{var _sample$precache;return(_sample$precache=sample.precache)==null?void 0:_sample$precache.call(sample)});let raw_samples=samples.map(sample=>sample.raw()),sample_byte_size=incremental_json_length(raw_samples);if(cursor){let next_sample_count=cursor.sample_count+samples.length;return{batch:batch3,index:cursor.index+batch_size,sample_count:next_sample_count,average_item_byte_size:(cursor.average_item_byte_size*cursor.sample_count+sample_byte_size)/next_sample_count}}else return{batch:batch3,index:batch_size,sample_count:samples.length,average_item_byte_size:sample_byte_size/samples.length}}flush(){this.db.flush_writes(),this.db.reset_while_keeping_the_cursor()}make_static(){return this.db.static_list(this.get_item_btype_id(),this.all())}contains(item,V){let contains_query={t:"Contains",prev:this.query,btype_id:V.id(),item:dehydrate_tree(item)};return this._with_eval_node(()=>this.db.execute_with_dependency(contains_query,0,1)[0])}position(item,V){let position_query={t:"Position",prev:this.query,btype_id:V.id(),item:dehydrate_tree(item)};return this._with_eval_node(()=>this.db.execute_with_dependency(position_query,0,1)[0])}_length_compare(op,n,options){return this._with_eval_node(()=>this.db.execute_with_dependency({t:"Compare",op,n,prev:{t:"Length",prev:{t:"Columns",columns:["_id"],prev:this.query},options}},0,1)[0])}length_greater_than(n,options){return this._length_compare(">",n,options)}length_greater_or_equal_than(n,options){return this._length_compare(">=",n,options)}length_less_than(n,options){return this._length_compare("<",n,options)}length_less_or_equal_than(n,options){return this._length_compare("<=",n,options)}length_equals(n,options){return this._length_compare("===",n,options)}length_not_equals(n,options){return this._length_compare("!==",n,options)}_numeric_op(op,options){if(this.get_item_btype_id()!=="number")return null;let numeric_query={t:"Numeric",prev:this.query,op,options};return this._with_eval_node(()=>this.db.execute_with_dependency(numeric_query,0,1)[0])}_date_op(op,options){if(this.get_item_btype_id()!=="date")return null;let numeric_query={t:"Numeric",prev:this.query,op,options};return this._with_eval_node(()=>new Date(this.db.execute_with_dependency(numeric_query,0,1)[0]))}sum(options){return this._numeric_op("sum",options)}product(options){return this._numeric_op("product",options)}average(options){var _this$_numeric_op;return(_this$_numeric_op=this._numeric_op("average",options))!=null?_this$_numeric_op:this._date_op("average",options)}median(options){var _this$_numeric_op2;return(_this$_numeric_op2=this._numeric_op("median",options))!=null?_this$_numeric_op2:this._date_op("median",options)}min(options){var _this$_numeric_op3;return(_this$_numeric_op3=this._numeric_op("min",options))!=null?_this$_numeric_op3:this._date_op("min",options)}max(options){var _this$_numeric_op4;return(_this$_numeric_op4=this._numeric_op("max",options))!=null?_this$_numeric_op4:this._date_op("max",options)}flatten(){let new_query={t:"Flatten",prev:this.query};return this.withQuery(new_query)}list_cast(target_btype_id){return target_btype_id===this.get_item_btype_id()?this:this.withQuery({t:"Cast",prev:this.query,btype_id:target_btype_id})}group_by(_ref){var _get_current_eval_nod;let{groupings,aggregations}=_ref,btype_id=this.get_item_btype_id();function convert(grouping){return grouping=extend({},grouping),grouping.start!=null&&(grouping.start=grouping.start.valueOf()),grouping.end!=null&&(grouping.end=grouping.end.valueOf()),grouping}groupings=groupings.map(grouping=>convert(grouping));for(let{message,fn,timezone_string}of groupings){if(!can_group_on(btype_id).includes(message))throw new UnexpectedError("bad grouping message",{fn,btype_id:btype_id,message});if(fn!=null&&!can_group_with(btype_id,message).includes(fn))throw new UnexpectedError("bad grouping function",{fn,btype_id:btype_id,message});if(CALENDAR_GROUPINGS.includes(fn)&&timezone_string==null)throw new UnexpectedError("grouping fn "+fn+" requires a timezone string")}for(let{fn,message}of aggregations){if(!SUPPORTED_AGGREGATIONS.includes(fn))throw new UnexpectedError("bad aggregation function: "+fn);if(message!=null&&!can_aggregate_on(fn,btype_id).includes(message))throw new UnexpectedError("bad aggregation message",{fn,btype_id:btype_id,message})}let new_query={t:"GroupBy",groupings,aggregations,prev:this.query,metadata:{serialized_eval_node:(_get_current_eval_nod=get_current_eval_node())==null?void 0:_get_current_eval_nod.serialize()}};return this.withQuery(new_query)}is_equal_to(other_list){return!is2(other_list,value_types_default.LIST_WRAPPER)||this.db!==other_list.db||this._creation_eval_node!==other_list._creation_eval_node?!1:(0,import_fast_deep_equal2.default)(this.query,other_list.query)}withQuery(query){return this._with_eval_node(()=>new _ListWrapper(this.db,query))}};_class16=ListWrapper;ListWrapper.from_json=(my_db,_ref2)=>{let{query}=_ref2;return new _class16(my_db,query)};ListWrapper.rehydrate=function(my_db,key){let query=incremental_json_parse(key);return new _class16(my_db,query)}}});var import_web_dom_collections_iterator71,NodeBase,init_NodeBase=__esm({"lib-browser/db/values/NodeBase.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator71=__toESM(require_web_dom_collections_iterator());init_Dynamic();init_StaticNode();init_ListWrapper();init_db_utils();init_hydrate();NodeBase=class extends Dynamic_default{constructor(parent,_path,db3){super(),this.parent=parent,this._path=_path,this.db=db3}path(){return this._path.join(".")}toString(){return"DBNode<"+this.key()+">"}key(){return this.parent_id()+"."+this._path.join(".")}child(name){let new_path;return this.parent?(this._path&&(new_path=this._path.concat(name.split("."))),this.parent._child(new_path)):new StaticNode(void 0)}parent_id(){return this.parent._id()}get(type){let val=this.raw();if(!type){var _this$parent$_type,_this$parent,_db_utils$lang_btypes,_db_utils$lang_btypes2;let parent_btype_id=(_this$parent$_type=(_this$parent=this.parent)._type)==null?void 0:_this$parent$_type.call(_this$parent),message_name=this._path.join(".");type=(_db_utils$lang_btypes=lang_btypes().get(parent_btype_id))==null||(_db_utils$lang_btypes2=_db_utils$lang_btypes.get_message(message_name))==null?void 0:_db_utils$lang_btypes2.ret_btype_id()}return Array.isArray(val)?(typeof type=="string"&&(type=lang_btypes().get(type).inner_including_ranges().id()),new ListWrapper(this.db,{t:"NodeList",type,id:this.parent_id(),field:this._path.join(".")})):val&&typeof val=="object"?_is_geographic_object(val,type)?val:this:rehydrate(this.db,val,type)}_extract(data){for(let p of(_this$_path=this._path)!=null?_this$_path:[]){var _this$_path,_data$p,_data;data=(_data$p=(_data=data)==null?void 0:_data[p])!=null?_data$p:null}return data}}}});function offlineSupportEnabled(){var _window5;return on_react_native()&&((_window5=window)==null?void 0:_window5.location)==null}var init_feature_check=__esm({"lib-browser/u/shared/feature_check.js"(){"use strict";init_define_process_env();init_shim();init_mode_check()}});function getBubbbleThingPrefix(appname,app_version){return`${appname}_${app_version}_${LOCAL_STORAGE_PREFIXES.BUBBLE_THING}`}function getResultDependencyPrefix(appname,app_version){return`${appname}_${app_version}_${LOCAL_STORAGE_PREFIXES.RESULT_DEP_ENTRY}`}function getResultCachePrefix(appname,app_version){return`${appname}_${app_version}_${LOCAL_STORAGE_PREFIXES.RESULT_CACHE_ENTRY}`}function getViewCountPrefix(appname,app_version){return`${appname}_${app_version}_${LOCAL_STORAGE_PREFIXES.VIEW_COUNT_ENTRY}`}function getOwningViewPrefix(appname,app_version){return`${appname}_${app_version}_${LOCAL_STORAGE_PREFIXES.OWNING_VIEW_ENTRY}`}var init_local_storage_helpers=__esm({"lib-browser/db/local_storage_helpers.js"(){"use strict";init_define_process_env();init_shim();init_db()}});function push_list_input_is_valid(node,original_value,new_value){return Array.isArray(original_value)?Array.isArray(new_value)?!0:(error("value is not an array",{firebase:node.firebase,new_value:JSON.stringify(new_value)}),!1):(error("path is not array",{firebase:node.firebase,original_value:JSON.stringify(original_value)}),!1)}function contains(array,value){if(Array.isArray(value)){for(let a of array)if(Array.isArray(a)&&json_stringify(a)===json_stringify(value))return!0}else if(is_b_location(value)){for(let a of array)if(is_b_location(a)&&json_stringify({lat:a.lat,lng:a.lng})===json_stringify({lat:value.lat,lng:value.lng}))return!0}return!1}function merge_into_single_list(original_value,value){let exceeds_limit=!1;if(value.length===0)return{list:original_value,exceeds_limit};for(let val of value)if(!contains(original_value,val)&&dehydrated_array_index_of(original_value,val)===-1)if(client_config_default2.MAX_LIST_LENGTH&&original_value.length>client_config_default2.MAX_LIST_LENGTH){exceeds_limit=!0;break}else original_value.push(val);return{list:original_value,exceeds_limit}}var import_web_dom_collections_iterator72,init_DBNode_utils=__esm({"lib-browser/db/values/DBNode_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator72=__toESM(require_web_dom_collections_iterator());init_logger();init_b_location_utils();init_u2();init_client_config2();init_hydrate()}});var import_web_dom_collections_iterator73,ClientDBNode,init_ClientDBNode=__esm({"lib-browser/db/values/ClientDBNode.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator73=__toESM(require_web_dom_collections_iterator());init_lib();init_logger();init_u2();init_b_location();init_b_location_utils();init_hydrate();init_eval_node_state();init_NodeBase();init_feature_check();init_local_storage_helpers();init_DBNode_utils();init_client_config2();ClientDBNode=class extends NodeBase{_operate(value,cb){let parent_id=this.parent_id();return this.db._ensure_loading(parent_id),value=dehydrate_tree_to_db_primitive(value),cb(parent_id,value,this._extract(this.db._get_data(parent_id)))}set(value){let options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._operate(value,(parent_id,value2,old_value)=>this.db._set_local(parent_id,this._path,value2))}push(value){if(value!=null)return this.push_list([value])}push_list(value){return this._operate(value,(parent_id,value2,cur_value)=>{let original_value=(cur_value!=null?cur_value:[]).slice();if(push_list_input_is_valid(this,original_value,value2)){let{list:list4,exceeds_limit}=merge_into_single_list(original_value,value2);if(this.set(list4),exceeds_limit)throw new OwnerError(`List at maximum length (${client_config_default2.MAX_LIST_LENGTH})`)}})}remove(value){return this._operate(value,(parent_id,value2,cur_value)=>{var _cur_value;let index,new_value;if((_cur_value=cur_value)!=null||(cur_value=[]),!Array.isArray(cur_value))error("path is not array",{firebase:this.firebase,cur_value});else{if((index=dehydrated_array_index_of(cur_value,value2))>-1)return new_value=cur_value.slice(),new_value.splice(index,1),this.set(new_value);if(Array.isArray(value2)||is_b_location(value2)){if(new_value=[],is_b_location(value2))for(let a of cur_value)is_equal(a,value2)||new_value.push(a);else for(let a of cur_value)json_stringify(a)!==json_stringify(value2)&&new_value.push(a);this.set(new_value)}}})}raw(){let parent_id=this.parent_id();if(offlineSupportEnabled()){var _eval_node_state$get_,_eval_node_state$get_2;let owning_view=(_eval_node_state$get_=get_current_eval_node())==null||(_eval_node_state$get_2=_eval_node_state$get_.owner)==null?void 0:_eval_node_state$get_2.root().id();if(owning_view){let thing_key=`${getBubbbleThingPrefix(lib_default().appname(),lib_default().app_version())}${parent_id}`;this.db.disassociate_view_data(owning_view),this.db.update_view_association(owning_view,parent_id,thing_key)}}this.db._ensure_loading(parent_id);for(var _len=arguments.length,can_catch=new Array(_len),_key=0;_key<_len;_key++)can_catch[_key]=arguments[_key];return u_exports2.ensure_ready(this.db._get_ready_key(parent_id),...can_catch),this.db._register_dependency(parent_id),this._extract(this.db._get_data(parent_id))}raw_shallow(){return this.raw()}dehydrate(){return dehydrate_prefix("ClientDBNode")+this.key()}precache(){let parent_id=this.parent_id();return this.db._ensure_loading(parent_id)}};ClientDBNode.rehydrate=(database,key)=>database.get_node(key)}});var require_es_array_at=__commonJS({"node_modules/core-js/modules/es.array.at.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),toObject=require_to_object(),lengthOfArrayLike=require_length_of_array_like(),toIntegerOrInfinity=require_to_integer_or_infinity(),addToUnscopables=require_add_to_unscopables();$2({target:"Array",proto:!0},{at:function(index){var O=toObject(this),len=lengthOfArrayLike(O),relativeIndex=toIntegerOrInfinity(index),k=relativeIndex>=0?relativeIndex:len+relativeIndex;return k<0||k>=len?void 0:O[k]}});addToUnscopables("at")}});var require_es_string_at_alternative=__commonJS({"node_modules/core-js/modules/es.string.at-alternative.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),uncurryThis=require_function_uncurry_this(),requireObjectCoercible=require_require_object_coercible(),toIntegerOrInfinity=require_to_integer_or_infinity(),toString2=require_to_string(),fails=require_fails(),charAt=uncurryThis("".charAt),FORCED=fails(function(){return"\u{20BB7}".at(-2)!=="\uD842"});$2({target:"String",proto:!0,forced:FORCED},{at:function(index){var S18=toString2(requireObjectCoercible(this)),len=S18.length,relativeIndex=toIntegerOrInfinity(index),k=relativeIndex>=0?relativeIndex:len+relativeIndex;return k<0||k>=len?void 0:charAt(S18,k)}})}});var NotificationTopic,SearchNotificationTopic,LastChangeTopic,AppPlanChangeTopic,init_notifier_topics=__esm({"lib-browser/constants/notifier_topics.js"(){"use strict";init_define_process_env();init_shim();NotificationTopic="id-update-",SearchNotificationTopic="search-update",LastChangeTopic="last-change-",AppPlanChangeTopic="app-plan-update-"}});function numberify(x){return String(parseFloat(x))===x?parseFloat(x):x}function _equals(expected,actual){return expected===!1&&actual==null?!0:numberify(expected)===numberify(actual)}function _text_contains_string(expected,actual){let term=actual!=null?actual:"",words=expected!=null?expected:null;return term.indexOf(words)!==-1}function _text_contains(expected,actual){var _expected$toLowerCase,_actual$toLowerCase;let expected_words=(_expected$toLowerCase=expected==null?void 0:expected.toLowerCase().split(/\s+/))!=null?_expected$toLowerCase:["WILL_NEVER_FIND_THIS"],actual_words=((_actual$toLowerCase=actual==null?void 0:actual.toLowerCase())!=null?_actual$toLowerCase:"").split(/\s+/);for(let word of expected_words)if(!actual_words.includes(word))return!1;return!0}function range_invert(array){return array[0]>array[1]?[array[1],array[0]]:array}var import_es_error_cause9,import_web_dom_collections_iterator74,ConstraintDef,all,by_name,get6,all_search_constraints,init_constraint_defs=__esm({"lib-browser/db/constraint_defs.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause9=__toESM(require_es_error_cause()),import_web_dom_collections_iterator74=__toESM(require_web_dom_collections_iterator());init_lodash();init_errors();init_b_object();init_b_location_utils();init_b_location();init_b_array();ConstraintDef=class{constructor(_ref){let{name,fn,value_type}=_ref;if(this.name=name,this.fn=fn,this.value_type=value_type,!["none","simple","array","geographic_address"].includes(this.value_type))throw new Error}takes_no_value(){return this.value_type==="none"}takes_array_value(){return this.value_type==="array"}process_array_value(v){if(Array.isArray(v))return v;if((v==null?void 0:v.all)!=null){var _v$all;return(_v$all=v.all())!=null?_v$all:[]}else if(v&&isArrayLike2(v)){let values_array=Object.values(v);return values_array.length===0?[]:values_array}else return[]}resolve_constraint(_ref2){let{entry,null_not_dropped}=_ref2;return null_not_dropped&&(entry=this.heed_empty_constraint(entry),!entry)?void 0:entry.constraint_type==="return_empty_set"?entry:get6(entry.constraint_type).ignore_empty_constraint(entry)}heed_empty_constraint(entry){let new_entry=extend({},entry);if(this.takes_array_value()){if(!this.process_array_value(entry.value).length){if(this.name==="not in")return;new_entry.constraint_type="return_empty_set"}}else[null,""].includes(new_entry.value)&&(this.name==="equals"&&(new_entry.constraint_type="is_empty"),this.takes_no_value()||(new_entry.constraint_type="return_empty_set"));return this.name==="geographic_search"&&!new_entry.value.origin_address&&(new_entry.constraint_type="return_empty_set"),new_entry}ignore_empty_constraint(entry){if(this.takes_array_value()){let value=this.process_array_value(entry.value);if(value.length)return extend({},entry,{value})}else{if(this.takes_no_value())return{key:entry.key,constraint_type:entry.constraint_type,self:entry.self};if(this.name!=="geographic_search"&&entry.value!=null&&entry.value!=="")return entry;if(this.name==="geographic_search"&&entry.value.origin_address!=null&&entry.value.origin_address!=="")return entry.value.origin_address=from_address(entry.value.origin_address),entry}return null}};all=memoize_default(()=>{let object2={email_equals:{value_type:"simple"},email_contains_string:{value_type:"simple"},equals:{value_type:"simple",fn:_equals},"not equal":{value_type:"simple",fn(expected,actual){return!_equals(expected,actual)}},is_empty:{value_type:"none",fn(expected,actual){return actual==null||actual===""}},is_not_empty:{value_type:"none",fn(expected,actual){return actual!=null&&actual!==""}},in:{value_type:"array",fn(expected,actual){return(expected!=null?expected:[]).some(item=>_equals(item,actual))}},"not in":{value_type:"array",fn(expected,actual){return!(expected!=null?expected:[]).some(item=>_equals(item,actual))}},contains:{value_type:"simple",fn(expected,actual){var _actual$indexOf;return((_actual$indexOf=actual==null?void 0:actual.indexOf(expected))!=null?_actual$indexOf:-1)!==-1}},"not contains":{value_type:"simple",fn(expected,actual){var _actual$indexOf2;return((_actual$indexOf2=actual==null?void 0:actual.indexOf(expected))!=null?_actual$indexOf2:-1)===-1}},empty:{value_type:"none",fn(expected,actual){return!actual||actual.length===0}},"not empty":{value_type:"none",fn(expected,actual){return(actual==null?void 0:actual.length)>0}},"greater than":{value_type:"simple",fn(expected,actual){return actual!=null&&numberify(actual)>numberify(expected)}},gte:{value_type:"simple",fn(expected,actual){return actual!=null&&numberify(actual)>=numberify(expected)}},"less than":{value_type:"simple",fn(expected,actual){return actual!=null&&numberify(actual)<numberify(expected)}},lte:{value_type:"simple",fn(expected,actual){return actual!=null&&numberify(actual)<=numberify(expected)}},"not true":{value_type:"none",fn(expected,actual){return[!1,null,void 0].includes(actual)}},"text contains string":{value_type:"simple",fn:_text_contains_string},"not text contains string":{value_type:"simple",fn(expected,actual){return!_text_contains_string(expected,actual)}},"text contains":{value_type:"simple",fn:_text_contains},"not text contains":{value_type:"simple",fn(expected,actual){return!_text_contains(expected,actual)}},geographic_search:{value_type:"geographic_address",fn(_ref3,actual){let{range:range2,unit,origin_address}=_ref3;if(!actual||!origin_address)return!1;let origin_address_coordinates={lat:origin_address.lat,lng:origin_address.lng},actual_coordinates={lat:actual.lat,lng:actual.lng};return geographic_distance(actual_coordinates,origin_address_coordinates,unit)<=range2}},contains_all_fields:{value_type:"simple",fn(expected,actual){var _actual$toLowerCase$s,_expected$toLowerCase2,_expected;let actual_pieces=(_actual$toLowerCase$s=actual==null?void 0:actual.toLowerCase().split(" "))!=null?_actual$toLowerCase$s:[],expected_pieces=(_expected$toLowerCase2=(_expected=expected)==null?void 0:_expected.toLowerCase().split(" "))!=null?_expected$toLowerCase2:["WILL_NEVER_FIND_THIS"];for(expected of expected_pieces){let found=!1;for(let piece of actual_pieces)if(piece.indexOf(expected)!==-1){found=!0;break}if(!found)return!1}return!0}},prefix_search:{value_type:"simple",fn(expected,actual){var _actual$toLowerCase$s2;let actual_pieces=(_actual$toLowerCase$s2=actual==null?void 0:actual.toLowerCase().split(" "))!=null?_actual$toLowerCase$s2:[];for(let actual_piece of actual_pieces)if(actual_piece.indexOf(expected)===0)return!0;return!1}},match_phrase_prefix:{value_type:"simple",fn(expected,actual){var _actual$toLowerCase$s3;let actual_pieces=(_actual$toLowerCase$s3=actual==null?void 0:actual.toLowerCase().split(" "))!=null?_actual$toLowerCase$s3:[];for(let actual_piece of actual_pieces)if(actual_piece.indexOf(expected)===0)return!0;return!1}},range_contains:{value_type:"array",fn(expected,actual){var _actual,_expected2;return((_actual=actual)==null?void 0:_actual[0])==null||((_expected2=expected)==null?void 0:_expected2[0])==null?!1:(expected=range_invert(expected),actual=range_invert(actual),actual[0]<=expected[0]&&actual[1]>=expected[1])}},range_contains_point:{value_type:"simple",fn(expected,actual){var _actual2;return((_actual2=actual)==null?void 0:_actual2[0])==null||expected==null?!1:(actual=range_invert(actual),actual[0]<=expected&&actual[1]>=expected)}},range_contained_by:{value_type:"array",fn(expected,actual){var _actual3,_expected3;return((_actual3=actual)==null?void 0:_actual3[0])==null||((_expected3=expected)==null?void 0:_expected3[0])==null?!1:(expected=range_invert(expected),actual=range_invert(actual),expected[0]<=actual[0]&&expected[1]>=actual[1])}},range_overlaps:{value_type:"array",fn(expected,actual){var _actual4,_expected4;return((_actual4=actual)==null?void 0:_actual4[0])==null||((_expected4=expected)==null?void 0:_expected4[0])==null?!1:(expected=range_invert(expected),actual=range_invert(actual),actual[0]<=expected[1]&&actual[1]>=expected[0])}},range_greater_than:{value_type:"array",fn(expected,actual){var _actual5,_expected5;return((_actual5=actual)==null?void 0:_actual5[0])==null||((_expected5=expected)==null?void 0:_expected5[0])==null?!1:(expected=range_invert(expected),actual=range_invert(actual),actual[0]>expected[1])}},range_less_than:{value_type:"array",fn(expected,actual){var _actual6,_expected6;return((_actual6=actual)==null?void 0:_actual6[0])==null||((_expected6=expected)==null?void 0:_expected6[0])==null?!1:(expected=range_invert(expected),actual=range_invert(actual),actual[1]<expected[0])}},range_greater_than_point:{value_type:"simple",fn(expected,actual){var _actual7;return((_actual7=actual)==null?void 0:_actual7[0])==null||expected==null?!1:(actual=range_invert(actual),actual[0]>expected)}},range_less_than_point:{value_type:"simple",fn(expected,actual){var _actual8;return((_actual8=actual)==null?void 0:_actual8[0])==null||expected==null?!1:(actual=range_invert(actual),actual[1]<expected)}}};return Object.keys(object2).map(name=>new ConstraintDef(extend({name},object2[name])))}),by_name=memoize_default(()=>keyBy_default(all(),c=>c.name)),get6=name=>{let def=by_name()[name];if(!def)throw new UnexpectedError("missing constraint_def",{name});return def},all_search_constraints=mapValues_default(by_name(),c=>c.fn)}});function ensure_single(plan,from,fn){if(from>0)return()=>[];let called=!1;return function(n){var _n;return(_n=n)!=null||(n=1),n!==1?[]:called?[]:(called=!0,fn())}}function can_execute_in_db(btype_id,constraint){let needle;if(constraint.key==="_id"&&["lower than","greater than"].includes(constraint.constraint_type))return!0;if(btype_id==="user"&&["email","StripeCustomerID","user_signed_up"].includes(constraint.key))return!(constraint.key==="email"&&constraint.constraint_type!=="email_equals"&&constraint.constraint_type!=="email_contains_string");if(["and","or"].includes(constraint.constraint_type))return!0;if(constraint.key===UNIQUE_ID)return["equals","not equal","in","not in"].includes(constraint.constraint_type);if(constraint.key===ALL_DB_FIELDS)return!0;if(constraint.key===ADVANCED_SEARCH_CONSTRAINT)return!1;let message=lang_btypes().get(btype_id).get_message(constraint.key);return message.is_lookup()&&(needle=message.ret_btype_id(),!NO_DB_CONSTRAINTS.includes(needle))}function pass_filter(item,processed_constraints,btype_id){for(let c of processed_constraints)if(!local_constrain(item,c,btype_id))return!1;return!0}function simple_id_sort(a,b){return a==null||!a._id()?1:b==null||!b._id()?-1:a._id().localeCompare(b._id(),"en-US")}function sort_in_memory(results,sorts_list,btype_id){if(sorts_list.length===0)results.sort(simple_id_sort);else if(sorts_list[0].sort_field===RANDOM_SORTING)shuffle_array(results);else{let next_comparer2=function(items){return items[0]?make_sort_comparer(extractor(items[0]),items[0].descending,next_comparer2(items.slice(1))):(a,b)=>results.indexOf(a)-results.indexOf(b)};var next_comparer=next_comparer2;let extractor=sort_item=>function(entry){if(sort_item.sort_on_id)return entry._id();if(sort_item.self)return entry;if(sort_item.sort_field&&entry!=null){if(lang_btypes().get(btype_id).option_set()!=null){var _get$option_set$value;return(_get$option_set$value=lang_btypes().get(btype_id).option_set().value(entry))==null?void 0:_get$option_set$value.attr(sort_item.sort_field)}if(typeof entry.child!="function")if(is_api_type(btype_id)){let message=lang_btypes().get(btype_id).get_message(sort_item.sort_field);if(message.is_not_found())throw new OwnerError("Sorting on this type of thing is currently not supported");return message.evaluate_without_cast(entry)}else throw new UnexpectedError("Trying to sort on a bad object",{btype_id,sort_item:sort_item,string_entry:String(entry)});return entry.child(sort_item.sort_field).get()}else return null};results.sort(next_comparer2(sorts_list))}}function first_pass_regex(){return/[ &'.-]/g}function locale_compare(a,b){let first_pass=en_us_collator.compare(a.replace(first_pass_regex(),""),b.replace(first_pass_regex(),""));return first_pass!==0?first_pass:en_us_collator.compare(a,b)}function make_sort_comparer(extractor,descending,next_comparer){let d;return descending?d=-1:d=1,function(a,b){let original_a_val=extractor(a),original_b_val=extractor(b),a_val=numberify(original_a_val),b_val=numberify(original_b_val);return typeof original_a_val==typeof original_b_val&&typeof a_val!=typeof b_val&&(a_val=original_a_val,b_val=original_b_val),typeof a_val!=typeof b_val?["undefined","object","function"].includes(typeof a_val)?1:["undefined","object","function"].includes(typeof b_val)?-1:typeof a_val=="string"?1*d:typeof b_val=="string"?-1*d:typeof a_val=="number"?1*d:typeof b_val=="number"?-1*d:void 0:a_val===b_val&&next_comparer?next_comparer(a,b):typeof a_val=="string"?locale_compare(a_val,b_val)*d:typeof a_val=="number"?(a_val-b_val)*d:typeof a_val=="boolean"?a_val?d:-d:a_val instanceof Date&&b_val instanceof Date?a_val<b_val?-1*d:1*d:0}}function get_group_by_btype_id(prev_btype_id,groupings,aggregations){let prev_value=lang_btypes().get(prev_btype_id),struct_data={};for(let[idx,{message:message_name}]of groupings.entries()){let message=prev_value.get_message(message_name);struct_data["grouping"+String(idx)]=[message.description(void 0,!0),message.ret_btype_id()]}for(let[idx,{fn,message:message_name}]of aggregations.entries()){let btype_id,display2;if(message_name){let message=prev_value.get_message(message_name);display2=fn+" of "+message.description(void 0,!0),btype_id=message.ret_btype_id()}else display2=fn,btype_id="number";struct_data["agg"+String(idx)]=[display2,btype_id]}return"struct."+base642(JSON.stringify({caption:"Grouping",definition:struct_data}))}function calculate_sort_score(data,sorts_list){let score=[];for(let a of sorts_list!=null?sorts_list:[])typeof a.sort_field=="string"?score.push(data==null?void 0:data[a.sort_field]):score.push(0);return score}function is_less_than(sorts_list,a_id,a_score,b_id,b_score,server_sorted){var _server_sorted;if((_server_sorted=server_sorted)!=null||(server_sorted=!1),server_sorted)return a_score[0]<b_score[0];for(let[n,{descending}]of(sorts_list!=null?sorts_list:[]).entries())if(a_score[n]!==b_score[n]){if(a_score[n]==null)return!1;if(b_score[n]==null)return!0;if(typeof a_score[n]=="string"){let ret=locale_compare(a_score[n],b_score[n]);return descending?ret>0:ret<0}else return descending?a_score[n]>b_score[n]:a_score[n]<b_score[n]}return a_id<b_id}function local_constrain(obj,c,btype_id){if(obj==null||typeof obj._type=="function"&&obj._type()==null)return!1;if(c.key===ADVANCED_SEARCH_CONSTRAINT){let context={datasources:{injected_value(){return obj},injected_value_btype(){var _c$self,_obj$_type,_ref,_ref2,_c$self2,_obj$_type3;let investigation_default=(_c$self=c.self)!=null?_c$self:obj==null||(_obj$_type=obj._type)==null?void 0:_obj$_type.call(obj);if(investigation_default!=null&&investigation_default!==btype_id){var _obj$_type2;debug("different btype_id in injected datasource constraint",{self:c.self,obj_type:obj==null||(_obj$_type2=obj._type)==null?void 0:_obj$_type2.call(obj),btype_id})}return(_ref=(_ref2=(_c$self2=c.self)!=null?_c$self2:obj==null||(_obj$_type3=obj._type)==null?void 0:_obj$_type3.call(obj))!=null?_ref2:btype_id)!=null?_ref:"null"}},advanced_search:!0},[result]=evaluate(c.value,context,null,null);return result}else{let sub;if(c.constraint_type in EMAIL_TEST_FNS){let auth_node=obj.child("authentication"),email_email=auth_node.child("email").child("email").get();if(EMAIL_TEST_FNS[c.constraint_type](email_email,c.value))return!0;for(let oauth_provider of appquery_default.get_oauth_providers()){let oauth_email=auth_node.child(oauth_provider).child("email").get();if(EMAIL_TEST_FNS[c.constraint_type](oauth_email,c.value))return!0}return!1}else if(c.constraint_type==="or"){var _c$opts;if(!((_c$opts=c.opts)!=null&&_c$opts.length))throw new UnexpectedError("assertion: or must have at least one sub",{c:c});for(sub of c.opts)if(local_constrain(obj,sub,btype_id))return!0;return!1}else if(c.constraint_type==="and"){var _c$opts2;if(!((_c$opts2=c.opts)!=null&&_c$opts2.length))throw new UnexpectedError("assertion: and must have at least one sub",{c:c});for(sub of c.opts)if(!local_constrain(obj,sub,btype_id))return!1;return!0}else{let message,val;if(c.key==="_id"&&typeof obj._id=="function")val=obj._id();else if(c.key===ALL_DB_FIELDS)val=json_stringify(obj.raw());else if(typeof obj.child!="function")if(is_api_type(btype_id)){if(message=lang_btypes().get(btype_id).get_message(c.key),message.is_not_found())throw new OwnerError("Filtering on this type of thing is currently not supported");val=message.evaluate_without_cast(obj),val instanceof ListWrapper&&(val=val.all())}else return!1;else{let is_lookup;btype_id&&(message=lang_btypes().get(btype_id).get_message(c.key),is_lookup=message.is_lookup());let lookup_key=null;if(typeof is_lookup=="string"?lookup_key=is_lookup:(is_lookup||!message)&&(lookup_key=c.key),lookup_key&&message){var _obj$child$raw,_message$evaluate_wit;let raw_val=(_obj$child$raw=obj.child(c.key).raw())!=null?_obj$child$raw:null,msg_val=(_message$evaluate_wit=message.evaluate_without_cast(obj))!=null?_message$evaluate_wit:null;raw_val!==msg_val&&message.ret_btype().option_set()&&info("Local constrain value mismatch",{raw_val,msg_val,c:c,lookup_key})}if(lookup_key){if(val=obj.child(c.key).raw(),is_json_class(val)){let wrapped_value=from_json(obj.db,val);wrapped_value instanceof ListWrapper?val=wrapped_value.all():error("JSON class value is not handled",{val:val})}}else val=message.evaluate_without_cast(obj,null,null,null,{constraint_messsage:c.key})}let constrain_fn=all_search_constraints[c.constraint_type];if(!constrain_fn)throw new UnexpectedError("bad constraint type "+c.constraint_type);return constrain_fn(c.value,val)}}}function only_sorted_by_id_like(sorts_list){return(sorts_list!=null?sorts_list:[]).every(sort=>ID_SORT_EQUIVALENTS.includes(sort.sort_field))}var import_web_dom_collections_iterator75,import_es_string_replace17,_Intl,en_us_collator,AGGREGATE_LOCAL_CHANGE,aggregate_started_key,EMAIL_TEST_FNS,can_use_cursor_pagination,ID_SORT_EQUIVALENTS,init_plan_utils=__esm({"lib-browser/db/plans/plan_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator75=__toESM(require_web_dom_collections_iterator()),import_es_string_replace17=__toESM(require_es_string_replace());init_u2();init_db_utils();init_db();init_special_keys();init_constraint_defs();init_appquery();init_evaluate();init_logger();init_ListWrapper();init_hydrate();init_btype_ids();init_loggable();typeof Intl<"u"&&((_Intl=Intl)==null?void 0:_Intl.Collator)!=null?en_us_collator=new Intl.Collator("en-US"):en_us_collator={compare(a,b){return String(a).localeCompare(b,"en-US")}};AGGREGATE_LOCAL_CHANGE={count(was_in_search,is_in_search,old_value,new_value,current){return current+(was_in_search?-1:1)},sum(was_in_search,is_in_search,old_value,new_value,current){var _old_value,_new_value;return(_old_value=old_value)!=null||(old_value=0),(_new_value=new_value)!=null||(new_value=0),current+new_value-old_value},product(was_in_search,is_in_search,old_value,new_value,current){var _old_value2,_new_value2;return(_old_value2=old_value)!=null||(old_value=1),(_new_value2=new_value)!=null||(new_value=1),current*new_value/old_value}},aggregate_started_key=(agg_fn,field,options)=>"CallAggregate_started_"+agg_fn+(field?"_"+field:"")+(options!=null&&options.should_approx?"_approximate":"")+(options!=null&&options.cacheable?"_cached":""),EMAIL_TEST_FNS={email_equals:(a,b)=>a===b,email_contains_string:(a,b)=>a==null?void 0:a.includes(b)};can_use_cursor_pagination=plan=>only_sorted_by_id_like(plan.sorts_list),ID_SORT_EQUIVALENTS=["_id"]}});var import_web_dom_collections_iterator76,static_warning_disabled,StaticList,StaticList_default,init_StaticList=__esm({"lib-browser/db/values/StaticList.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator76=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_logger();init_btype_ids();init_ListWrapper();init_lib();init_hydrate();init_db_utils();static_warning_disabled=!1,StaticList=class _StaticList extends ListWrapper{constructor(data,database,btype_id){var _database;if((_database=database)!=null||(database=lib_default().db_instance()),btype_id==null){var _btype_id;static_warning_disabled||info("StaticList created without btype_id");for(let sample_item of data){if(sample_item==null){optional_pause();continue}if(btype_id=_StaticList.guess_btype_id(sample_item),!btype_id)throw new UnexpectedError("could not guess btype_id",{dehydrated:dehydrate_tree(data)});break}(_btype_id=btype_id)!=null||(btype_id="null")}super(database,{t:"Static",data:array_to_ids(btype_id,data),btype_id})}};StaticList.rehydrate=function(my_db,key){let{btype_id,data}=_rehydrate_btype_id_data(my_db,key);return new StaticList(data,my_db,btype_id)};StaticList.guess_btype_id=function(obj){return obj==null?null:typeof obj=="string"?"text":typeof obj=="number"?"number":typeof obj._type=="function"?obj._type():typeof obj=="boolean"?"sys.bool":obj instanceof ListWrapper?list_type(obj.get_item_btype_id()):null};StaticList_default=StaticList}});var SampleNode,SampleList,SampleObject,init_sample=__esm({"lib-browser/db/sample.js"(){"use strict";init_define_process_env();init_shim();init_hydrate();init_StaticList();init_appquery();init_btypes();SampleNode=class SampleNode2{constructor(object2,name,value){var _this$value,_this$object$value$ge;this.object=object2,this.name=name,this.value=value,(_this$value=this.value)!=null||(this.value=(_this$object$value$ge=this.object.value.get_message(this.name))==null?void 0:_this$object$value$ge.ret_btype())}get(){var _this$value2;return(_this$value2=this.value)==null?void 0:_this$value2.get_sample()}raw(){var _this$value3;return(_this$value3=this.value)==null?void 0:_this$value3.get_sample()}set(){}push(){}remove(){}dehydrate(){return dehydrate_prefix("SampleNode")+this.value.id()}static rehydrate(db3,key){return new SampleNode2(null,null,get5(key))}},SampleList=class SampleList2{constructor(btype_id){let btype=get5(btype_id);return new StaticList_default([btype==null?void 0:btype.get_sample(),btype==null?void 0:btype.get_sample()],null,btype_id)}static rehydrate(db3,key){return new SampleList2(key)}},SampleObject=class SampleObject2{constructor(value){try{this.value=get5(value)}catch{this.value=get5("null")}this.id=value}child(name){return new SampleNode(this,name)}dehydrate(){return dehydrate_prefix("SampleObject")+this.value.id()}_id(){return"sample:"+this.id}_type(){return this.value.id()}is_equal_to(x){var _x$dehydrate;return(x==null||(_x$dehydrate=x.dehydrate)==null?void 0:_x$dehydrate.call(x))===this.dehydrate()}precache(){}exists(){return!1}ignore_privacy(){return this}get(){}is_logged_in(){}get_email(){}static rehydrate(db3,key){return new SampleObject2(key)}}}});var client_exports={};__export(client_exports,{get_server_time_offset:()=>get_server_time_offset,watch:()=>watch});function watch(_ref,version_fn,on_update){var _topics$topic;let[prefix,...args]=_ref;if(!client_config_default2.notifier_host)return;let topic=`${prefix}${args.join("-")}`;(_topics$topic=_topics[topic])!=null||(_topics[topic]={watchers:[],last_msg:null,subscribed_version:null}),_topics[topic].watchers.push({version_fn,on_update});let{last_msg,subscribed_version}=_topics[topic];if(subscribed_version!=null){var _last_msg$version;let version2=version_fn();if(typeof version2!="number"&&error("non-numeric version",{version:version2,topic}),version2<subscribed_version)throw new UnexpectedError("Watching Notifier topic that has been subscribed to with a newer version",{topic,version:version2,subscribed_version});last_msg!=null&&version2<((_last_msg$version=last_msg.version)!=null?_last_msg$version:-1/0)&&on_update(last_msg)}else _topics[topic].subscribed_version=-1/0,setImmediate(()=>subscribe_to(topic))}function get_server_time_offset(cb){ensure_initializing();function try_it(){if(socket_ready()&&ts_handler==null){var _socket;let start3=Date.now();ts_handler=function(timestamp2){let end2=Date.now(),avg=Math.round((start3+end2)/2),time_diff=timestamp2-avg;cb(time_diff),ts_handler=null,ts_refresh_handler=null},ts_refresh_handler=function(){ts_handler=null,setTimeout(try_it,100),ts_refresh_handler=null},(_socket=socket)==null||_socket.send("ts")}else setTimeout(try_it,100)}try_it()}function socket_ready(){var _socket2;return socket_authenticated&&((_socket2=socket)==null?void 0:_socket2.readyState)===1}function initialize_socket(){var _ts_refresh_handler,_configuration$notifi,_configuration$notifi2;if(_temp_kill)return;if(window.WebSocket==null){console.log("No window.WebSocket class defined: real time updates are disabled");return}(_ts_refresh_handler=ts_refresh_handler)==null||_ts_refresh_handler(),socket_authenticated=!1;let conn_string,notifier_host=(_configuration$notifi=client_config_default2.notifier_host)!=null?_configuration$notifi:"",notifier_port=(_configuration$notifi2=client_config_default2.notifier_port)!=null?_configuration$notifi2:"";notifier_host?conn_string=`${notifier_host}:${notifier_port}`:conn_string=notifier_host,socket=new window.WebSocket(`wss://${conn_string}`);let _last_error=null;socket.onclose=function(close_event){var _disconnect;if((_disconnect=disconnect)!=null||(disconnect=Date.now()),awaiting_acknowledgement=!1,setTimeout(initialize_socket,Math.min(6e4,retries*retries*1e3)),retries++,retries===10){var _Lib2,_Lib$location;if(offlineSupportEnabled()&&!((_Lib2=lib_default())!=null&&(_Lib$location=_Lib2.location)!=null&&_Lib$location.is_online()))return;error("notifier_client: socket closed after 10 retries",{last_error:_last_error,close_code:close_event==null?void 0:close_event.code,close_reason:close_event==null?void 0:close_event.reason})}},socket.onerror=function(err){var _Lib2,_Lib2$location;if(_last_error=err,(_Lib2=lib_default())!=null&&(_Lib2$location=_Lib2.location)!=null&&_Lib2$location.is_online()){var _last_error$stack;console.log(`notifier_client.coffee: got error from socket: ${(_last_error$stack=_last_error.stack)!=null?_last_error$stack:""}`)}},socket.onopen=()=>{var _configuration$notifi3;socket.send(`s ${(_configuration$notifi3=client_config_default2.notifier_domain)!=null?_configuration$notifi3:String(new UnexpectedError("no notifier domain set"))}`)},socket.onmessage=function(message_object){let msg=message_object.data;if(msg==="ok")socket_authenticated||(socket_authenticated=!0,retries=0,subscribe_to_all());else if(msg.slice(0,2)==="h "){let pieces=msg.split(" "),topic=pieces[1],version2=pieces[2]?parseInt(pieces[2]):-1/0,message=pieces[3];_topics[topic]!=null&&(_topics[topic].last_msg={topic,version:version2,message},_topics[topic].watchers.forEach(watcher=>watcher.on_update({topic,version:version2,message})))}else if(msg.slice(0,2)==="i "){let msg_id=msg.split(" ")[1];if(msg_id!==String(ack_counter)){error("Got a bad subscription ack!",{ack_counter,msg,msg_id}),socket.close();return}awaiting_acknowledgement=!1,check_send_next()}else if(msg.slice(0,3)==="ts "){var _ts_handler;(_ts_handler=ts_handler)==null||_ts_handler(parseInt(msg.slice(3)))}else error("unrecognized message from notifier",{msg})}}function subscribe_to_all(){to_subscribe_queue=Object.keys(_topics),check_send_next()}function subscribe_to(topic){to_subscribe_queue.push(topic),check_send_next()}function check_send_next(){var _socket4;if(to_subscribe_queue.length===0){fully_subscribed();return}if(!socket_ready()||awaiting_acknowledgement){ensure_initializing();return}awaiting_acknowledgement=!0;let to_send=to_subscribe_queue.slice(0,BATCH_SIZE2);to_subscribe_queue=to_subscribe_queue.slice(BATCH_SIZE2),ack_counter++;let msg="g "+String(ack_counter);for(let topic of to_send){let watcher_versions=_topics[topic].watchers.map(watcher=>watcher.version_fn()).filter(watcher_version=>typeof watcher_version!="number"?(error("non-numeric version",{version:watcher_version,topic}),!1):!0);if(watcher_versions.length===0)continue;let version2=Math.min(...watcher_versions);_topics[topic].subscribed_version=version2,msg+=" "+topic+" "+String(version2)}(_socket4=socket)==null||_socket4.send(msg)}function fully_subscribed(){if(disconnect){if(Date.now()-disconnect>STALE_CUTOFF)for(let topic in _topics)_topics[topic].watchers.forEach(_ref2=>{let{on_update}=_ref2;return on_update({stale:!0})});disconnect=null}}function ensure_initializing(){websocket_initializing||(websocket_initializing=!0,initialize_socket())}var import_web_dom_collections_iterator77,import_web_immediate,_topics,STALE_CUTOFF,BATCH_SIZE2,ts_handler,ts_refresh_handler,websocket_initializing,socket,socket_authenticated,disconnect,retries,awaiting_acknowledgement,ack_counter,_temp_kill,to_subscribe_queue,init_client=__esm({"lib-browser/notifier/client.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator77=__toESM(require_web_dom_collections_iterator()),import_web_immediate=__toESM(require_web_immediate());init_lib();init_u2();init_errors();init_logger();init_feature_check();init_client_config2();_topics={},STALE_CUTOFF=23*60*60*1e3,BATCH_SIZE2=25;ts_handler=null,ts_refresh_handler=null;websocket_initializing=!1,socket=null,socket_authenticated=!1;disconnect=null,retries=0,awaiting_acknowledgement=!1,ack_counter=0;typeof window<"u"&&window!==null&&(_temp_kill=!1,window.kill_notifier_socket=function(){var _socket3;_temp_kill=!0,(_socket3=socket)==null||_socket3.close()},window.restore_notifier_socket=function(){_temp_kill=!1,initialize_socket()});to_subscribe_queue=[]}});var util_exports={};__export(util_exports,{get_dedicated_subdomains:()=>get_dedicated_subdomains,get_meta_hostname:()=>get_meta_hostname,get_meta_hostname_for_app:()=>get_meta_hostname_for_app,get_meta_hostname_for_hostname:()=>get_meta_hostname_for_hostname,is_meta_hostname:()=>is_meta_hostname,set_dedicated_subdomain:()=>set_dedicated_subdomain,set_dedicated_subdomains:()=>set_dedicated_subdomains});function get_meta_hostname_for_app(appname){return client_config_default2.is_dedicated?client_config_default2.dedicated_subdomain:client_config_default2.PROD_DOMAINS.main}function set_dedicated_subdomain(subdomain){let dot_is_domain=subdomain.replace(/\.i[so]$/,".is"),dot_io_domain=subdomain.replace(/\.i[so]$/,".io");dedicated_subdomains=[dot_is_domain,dot_io_domain]}function is_meta_hostname(hostname){if(MAIN_QABOX_PATH_REGEX.test(hostname)||TEST_QABOX_PATH_REGEX.test(hostname))return!0;if(typeof hostname!="string")return!1;if(/\.local$/.test(hostname)||is_hostname_bubble_plus_subdomain(hostname)||dedicated_subdomains.includes(hostname)||is_host_aws(hostname))return!0;let stripped_hostname=hostname.replace(/(?:^www\.)?(?:\.*$)?/g,"");return!!(object_values(client_config_default2.PROD_DOMAINS).includes(stripped_hostname)||is_hostname_local_bubble(hostname))}function get_meta_hostname_for_hostname(current_hostname){return client_config_default2.echo_hostname&&is_meta_hostname(current_hostname)?current_hostname:_meta_hostname}var import_es_string_replace18,dedicated_subdomains,get_dedicated_subdomains,set_dedicated_subdomains,_meta_hostname,get_meta_hostname,init_util=__esm({"lib-browser/util.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace18=__toESM(require_es_string_replace());init_client_config2();init_environment_utilities();init_domain();init_domain_utilities();init_decaf();init_routes();dedicated_subdomains=[],get_dedicated_subdomains=()=>dedicated_subdomains,set_dedicated_subdomains=subdomains=>dedicated_subdomains=subdomains;client_config_default2.is_dedicated&&client_config_default2.dedicated_subdomain&&set_dedicated_subdomain(client_config_default2.dedicated_subdomain);_meta_hostname=null;is_production()?client_config_default2.is_dedicated?_meta_hostname=client_config_default2.dedicated_subdomain:_meta_hostname=client_config_default2.PROD_DOMAINS.main:client_config_default2.dedicated_subdomain?_meta_hostname=client_config_default2.dedicated_subdomain:_meta_hostname=LOCAL_HOSTNAME;get_meta_hostname=()=>_meta_hostname}});var _class17,_class22,_class32,_class42,_class52,Redirect2,NotFound2,ServerResponse,ClientError2,MaliciousRequest,init_server_errors=__esm({"lib-browser/u/server/server_errors.js"(){"use strict";init_define_process_env();init_shim();init_errors();Redirect2=(_class17=class extends ExpectedError{constructor(statusCode,url9){super("redirect"),this.statusCode=statusCode,this.url=url9}},_class17.prototype.error_class="Redirect",_class17);Redirect2.prototype.toString=function(){return`Redirect (${this.statusCode}) to ${this.url}`};NotFound2=(_class22=class extends ExpectedError{},_class22.prototype.error_class="NotFound",_class22),ServerResponse=(_class32=class extends ExpectedError{constructor(statusCode,headers,body){super("server_response"),this.statusCode=statusCode,this.headers=headers,this.body=body}toString(){return`ServerResponse ${this.statusCode}`}},_class32.prototype.error_class="ServerResponse",_class32),ClientError2=(_class42=class extends UnexpectedError{display(){return"Invalid request: see error code for details"}},_class42.prototype.error_class="ClientError",_class42.prototype.suggested_level="owner_error",_class42),MaliciousRequest=class extends UnexpectedError{display(){return"Invalid request: see error code for details"}};_class52=MaliciousRequest;_class52.prototype.error_class="ClientError",_class52.prototype.suggested_level="owner_error"}});var locations_exports2={};__export(locations_exports2,{Location:()=>Location,get_db_display:()=>get_db_display,get_db_version:()=>get_db_version,get_primary_version:()=>get_primary_version,is_hardcode:()=>is_hardcode,live_key:()=>live_key});function get_primary_version(app_version){return isLiveVersion(app_version)?LIVE_VERSION:TEST_VERSION}function get_db_version(app_version){return isLiveVersion(app_version)?LIVE_VERSION:starts_with(app_version,client_config_default2.private_version_prefix)||TEMPLATE_VERSIONS.includes(app_version)?app_version:TEST_VERSION}function get_db_display(app_version){return app_version=get_db_version(app_version),app_version===TEST_VERSION?DEVELOPMENT_ENVIRONMENT_DISPLAY:LIVE_ENVIRONMENT_DISPLAY}var import_web_dom_collections_iterator78,url2,querystring,is_hardcode,live_key,Location,init_locations2=__esm({"lib-browser/locations.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator78=__toESM(require_web_dom_collections_iterator()),url2=__toESM(require_url()),querystring=__toESM(require_querystring());init_util();init_b_string();init_b_object();init_errors();init_uuid();init_client_config2();init_locations();init_apps_utilities();init_environment_utilities();init_server_errors();init_routes();init_multiple_live_versions();is_hardcode=(appname,app_version)=>is_hardcoded(appname)&&(app_version==null?void 0:app_version.indexOf(client_config_default2.private_version_prefix))!==0,live_key=()=>{var _configuration$hostna;return client_config_default2.env+" "+get_meta_hostname()+" "+((_configuration$hostna=client_config_default2.hostname_modifier)!=null?_configuration$hostna:"")},Location=class{constructor(base_url,options){this.base_url=base_url,options&&options.normalizeUnicode&&(this.base_url=this.standardize_unicode_url())}get_pieces(){var _path$;let pieces={},parsed=this.parsed_url();if(is_empty(parsed))return{};let path=parsed.pathname.split("/").filter(p=>p!=="");if(client_config_default2.apps_domain&&ends_with(parsed.hostname,"."+client_config_default2.apps_domain))pieces.appname=parsed.hostname.slice(0,parsed.hostname.lastIndexOf("."+client_config_default2.apps_domain)),pieces.use_apps_domain=!0;else{if(client_config_default2.apps_domain&&parsed.hostname===client_config_default2.apps_domain)throw new Redirect2(302,"https://"+get_meta_hostname());is_meta_hostname(parsed.hostname)&&path[0]==="site"?(pieces.use_site_path=!0,pieces.appname=path[1],path=path.slice(2)):pieces.domain=parsed.hostname}return((_path$=path[0])==null?void 0:_path$.indexOf(VERSION_PATH_PREFIX))===0?(pieces.app_version=path[0].slice(VERSION_PATH_PREFIX.length),pieces.version_explicit=!0,path=path.slice(1)):(pieces.version_explicit=!1,pieces.app_version=LIVE_VERSION),pieces.path=path,pieces.query=parsed.query,(MAIN_QABOX_PATH_REGEX.test(pieces.domain)||TEST_QABOX_PATH_REGEX.test(pieces.domain))&&(pieces.appname="meta"),pieces}is_production(appname){return this.parsed_url().hostname===get_meta_hostname_for_app(appname)}format_pieces(pieces,options){var _options$protocol;let base=((_options$protocol=options==null?void 0:options.protocol)!=null?_options$protocol:this.parsed_url().protocol)+"//";if(pieces.domain)base+=pieces.domain;else if(client_config_default2.apps_domain&&!pieces.use_site_path)base+=pieces.appname+"."+client_config_default2.apps_domain;else{var _pieces$meta_hostname;base+=(_pieces$meta_hostname=pieces.meta_hostname)!=null?_pieces$meta_hostname:get_meta_hostname_for_hostname(this.parsed_url().hostname),base+="/site/",base+=pieces.appname}let ve=pieces.version_explicit;if(!["default",void 0,null,!0,!1].includes(ve))throw new UnexpectedError("unrecognized version explicit: "+ve);options!=null&&options.canonicalizeLiveVersion&&isLiveVersionCopy(pieces.app_version)&&(ve=!1),(ve===!0||ve==="default"&&pieces.app_version!==LIVE_VERSION)&&(base+="/version-"+pieces.app_version);for(let entry of(_pieces$path=pieces.path)!=null?_pieces$path:[]){var _pieces$path;base+="/"+entry}let qstring=querystring.stringify(pieces.query);return pieces.query!=null&&qstring.length!==0&&(base+="?"+qstring),base}protocol(){return this.parsed_url().protocol}get_base_for_meta(options){var _options$protocol2;let parsed=this.parsed_url(),base=is_production()?"https:":(_options$protocol2=options==null?void 0:options.protocol)!=null?_options$protocol2:parsed.protocol;return base+="//",base+=get_meta_hostname_for_hostname(parsed.hostname),parsed.port&&(base+=":"+parsed.port),base}get_server_base(options){let pieces=this.get_pieces();return delete pieces.path,delete pieces.query,this.format_pieces(pieces,options)+"/"}get_page_url(page2,query,hash2){let data=url2.parse(page2!=null?page2:"");(data.pathname==="index"||data.pathname==null)&&(data.pathname="");let uri=this.get_server_base()+data.pathname,query_base=data.query!=null?querystring.decode(data.query):{};query&&!is_empty(query)&&extend(query_base,query);let query_string=querystring.stringify(query_base);return query_string.length>0&&(uri+="?"+query_string),hash2&&(uri+="#"+hash2),uri}get_page(){var _this$get_pieces$path;return(_this$get_pieces$path=this.get_pieces().path[0])!=null?_this$get_pieces$path:"index"}get_underlying_page(){var _window$bubble_page_n,_window5;return(_window$bubble_page_n=(_window5=window)==null?void 0:_window5.bubble_page_name)!=null?_window$bubble_page_n:this.get_page()}parsed_url(){return this.base_url?url2.parse(this.base_url,!0):{}}my_location(){return this.base_url}get_query(){return this.parsed_url().query}get_unique_id_in_url(){let{path}=this.get_pieces();if(path[1]!=null){let splitted=path[1].split("-"),possible_id=splitted[splitted.length-1];if(is_UUID(possible_id))return possible_id}return null}get_slug_in_url(){let{path}=this.get_pieces();if(path[1]!=null){let possible_slug=decodeURIComponent(path[1]);if(!this.get_unique_id_in_url())return possible_slug}return null}get_canonical_url(){let parsed=this.parsed_url();return`${parsed.protocol}//${parsed.hostname}${parsed.pathname}`}standardize_unicode_url(){let pieces=url2.parse(this.base_url);for(let component of["search","pathname"])/[^\u0000-\u007f]/.test(pieces[component])&&(pieces[component]=encodeURI(pieces[component]));return url2.format(pieces)}}}});function _static_object_from_cache(my_db,_ref){var _my_db$__StaticObject,_my_db$__StaticObject2,_my_db$__StaticObject3;let{data,btype_id}=_ref,cache_key=incremental_json_stringify({data:dehydrate_tree(data),btype_id});return(_my_db$__StaticObject=my_db.__StaticObject_rehydrate_cache)!=null||(my_db.__StaticObject_rehydrate_cache={}),(_my_db$__StaticObject3=(_my_db$__StaticObject2=my_db.__StaticObject_rehydrate_cache)[cache_key])!=null||(_my_db$__StaticObject2[cache_key]=new StaticObject(data,my_db,btype_id)),my_db.__StaticObject_rehydrate_cache[cache_key]}var StaticObject,init_StaticObject=__esm({"lib-browser/db/values/StaticObject.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_db_utils();init_StaticNode();init_lib();init_hydrate();StaticObject=class _StaticObject extends StaticNode{constructor(data,db3,btype_id,_exists,_bubble_id,options){var _options;(_options=options)!=null||(options={}),super(data,db3,btype_id),this._exists=_exists,this._bubble_id=_bubble_id,this.allow_email=options.allow_email}_id(){var _this$__id;if(this._bubble_id!=null)return this._bubble_id;let data=this.get_data();return data!=null&&data._id?typeof data._id=="function"?data._id():data._id:((_this$__id=this.__id)!=null||(this.__id=incremental_digest(this.to_json())),this.__id)}get(){return this}ignore_privacy(){return this.db.ignore_privacy_rules?this:lib_default.extend({ignore_privacy_rules:!0},()=>new _StaticObject(this.data,lib_default().db_instance(),this.btype_id))}exists(){var _this$_exists;return(_this$_exists=this._exists)!=null?_this$_exists:!1}delete(){}poll(){}is_equal_to(a){return typeof(a==null?void 0:a._id)!="function"?!1:a._id()===this._id()}get_email(){if(this.allow_email)return email_getter(this)}is_logged_in(){}to_json(){var _this$_json_cache;return(_this$_json_cache=this._json_cache)!=null||(this._json_cache=this.compute_to_json()),this._json_cache}compute_to_json(){return{_class:"StaticObject",data:dehydrate_tree(this.data),btype_id:this.btype_id}}dehydrate(){var _this$db,_this$db$__StaticObje,_this$db$__StaticObje2,_this$db$__StaticObje3;let key=_dehydrate_btype_id_data(this.data,this.btype_id),cache_key=incremental_json_stringify({data:dehydrate_tree(this.data),btype_id:this.btype_id});return(_this$db$__StaticObje=(_this$db=this.db).__StaticObject_rehydrate_cache)!=null||(_this$db.__StaticObject_rehydrate_cache={}),(_this$db$__StaticObje3=(_this$db$__StaticObje2=this.db.__StaticObject_rehydrate_cache)[cache_key])!=null||(_this$db$__StaticObje2[cache_key]=this),dehydrate_prefix("StaticObject")+key}};StaticObject.from_json=(my_db,_ref2)=>{let{data,btype_id,value_id}=_ref2,id=btype_id!=null?btype_id:value_id;return new StaticObject(data,my_db,id)};StaticObject.rehydrate=function(my_db,key){let{btype_id,data}=_rehydrate_btype_id_data(my_db,key);return _static_object_from_cache(my_db,{data,btype_id})}}});function get_merged_array(_ref){let{merge_into,merge_from,sorts_list,min_id,min_score,max_id,max_score,server_sorted,sort_scores,seen_ids}=_ref,new_results=[];function merge_array(arr){let idx=0,nr_idx=0;for(;idx<arr.length&&is_less_than(sorts_list,arr[idx],sort_scores[arr[idx]],min_id,min_score,server_sorted);)idx++;for(;idx<arr.length&&(max_id==null||arr[idx]===max_id||is_less_than(sorts_list,arr[idx],sort_scores[arr[idx]],max_id,max_score,server_sorted));){if(!seen_ids.has(arr[idx])){for(seen_ids.add(arr[idx]);nr_idx<new_results.length&&is_less_than(sorts_list,new_results[nr_idx],sort_scores[new_results[nr_idx]],arr[idx],sort_scores[arr[idx]],server_sorted);)nr_idx++;nr_idx===new_results.length?new_results.push(arr[idx]):new_results.splice(nr_idx,0,arr[idx]),nr_idx++}idx++}}return merge_array(merge_into.results),merge_array(merge_into.after),merge_array(merge_from.before),merge_array(merge_from.results),new_results}var import_web_dom_collections_iterator79,CallSearch,CallSearch_default,init_CallSearch=__esm({"lib-browser/db/plans/CallSearch.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator79=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_logger();init_db();init_plan_utils();init_StaticObject();init_query_planner();init_loggable();CallSearch={watch_search_call(plan){return{constraints:plan.constraints,type:plan.type}},load(_ref2,cb){var _this$query_planner$g,_2;let{plan,from,n,from_id,situation}=_ref2,{constraints,sorts_list,type,extra,columns}=plan;this.query_planner().update(type,constraints,sorts_list,{loading_to:from+n},!0);let{local_change_buffer}=(_this$query_planner$g=this.query_planner().get_stats(type,constraints,sorts_list))!=null?_this$query_planner$g:{};n+=local_change_buffer!=null?local_change_buffer:0;let full_constraints,search_offset,descending=(_2=(sorts_list!=null?sorts_list:[])[0])==null?void 0:_2.descending;can_use_cursor_pagination(plan)&&from_id?(full_constraints=[...constraints,{key:"_id",constraint_type:descending?"less than":"greater than",value:from_id}],search_offset=0):(full_constraints=[...constraints],search_offset=from),this.elasticsearch("search",{appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),type,constraints:full_constraints,sorts_list,from:search_offset,n,search_path:this.build_search_path(plan,from+n),extra,columns,situation},(err,res)=>{var _res$hits$hits,_res$hits;if(err){cb(err);return}let entries=(_res$hits$hits=(_res$hits=res.hits)==null?void 0:_res$hits.hits)!=null?_res$hits$hits:[],{search_version}=res,{at_end}=res,results=[],raw_data={};for(let[idx,entry]of entries.entries()){idx%10===0&&optional_pause();let id=entry._id;if(results.push(id),columns!=null){var _local$version;let local=this._locals[id];local!=null&&entry._version>((_local$version=local.version)!=null?_local$version:-1)&&(local.raw!=null?extend(local.raw,entry._source):local.raw=entry._source)}else this._set_data(id,entry._source,entry._type,entry._version);raw_data[id]=entry._source}if(res.extras!=null&&columns==null)for(let[idx,entry]of res.extras.entries())idx%10===0&&optional_pause(),entry&&this._handle_get_response(entry._id,null,entry);at_end&&this.query_planner().update(type,constraints,null,{length:from+results.length}),this.query_planner().update(type,constraints,sorts_list,{from,loaded:from+results.length}),cb(null,{at_end,results,raw_data,search_version})})},get_ret_btype(plan){return plan.type},initialize_range(plan,range2,res){range2.at_end=res.at_end,range2.results=res.results,range2.before=[],range2.after=[],range2.search_version=res.search_version;let{type,constraints,sorts_list}=plan,can_sort=can_sort_locally(type,sorts_list,constraints);if(range2.sort_scores={},can_sort){for(let[idx,item_id]of range2.results.entries())idx%10===0&&optional_pause(),range2.sort_scores[item_id]=calculate_sort_score(res.raw_data[item_id],plan.sorts_list);let all_but_last_results=range2.results.slice(0,range2.results.length-1);for(let[idx,item_id]of all_but_last_results.entries()){let next_id=range2.results[idx+1];if(!is_less_than(sorts_list,item_id,range2.sort_scores[item_id],next_id,range2.sort_scores[next_id])){warn("Client-server sort mismatch",{type,sorts_list:sorts_list,db_first:range2.sort_scores[item_id],db_second:range2.sort_scores[next_id],first_id:item_id,second_id:next_id}),can_sort=!1,add_bad_in_memory_sort(JSON.stringify({type,sorts_list,constraints}));let cache_key=this.get_cache_key(plan);for(let r2 of this.result_cache[cache_key].ranges)r2.state===range_states.AVAILABLE&&r2!==range2&&(r2.state=range_states.DELETED);this.invalidate_call_dependency(cache_key);break}}}if(!can_sort){for(let[idx,item_id]of range2.results.entries())idx%10===0&&optional_pause(),range2.sort_scores[item_id]=[range2.from+idx];range2.server_sorted=!0}CallSearch._adjust_range_length.call(this,plan,range2,!0)},local_change(plan,range2,id,type,_,new_raw){if(plan.type!==type)return!1;let in_search;if(new_raw==null)in_search=!1;else{in_search=!0;let obj=new StaticObject(new_raw,null,type);for(let c of plan.constraints)if(!local_constrain(obj,c,type)){if(!can_execute_in_memory(c))return DONT_KNOW;in_search=!1;break}}if(!in_search)return range2.sort_scores[id]==null||(delete range2.sort_scores[id],array_remove(range2.before,id),array_remove(range2.after,id),!range2.results.includes(id))?!1:(array_remove(range2.results,id),CallSearch._adjust_range_length.call(this,plan,range2),!0);if(!can_sort_locally(type,plan.sorts_list,plan.constraints))return DONT_KNOW;let new_score=calculate_sort_score(new_raw,plan.sorts_list),was_in_search=range2.sort_scores[id]!=null;if(was_in_search&&JSON.stringify(range2.sort_scores[id])===JSON.stringify(new_score))return!1;range2.sort_scores[id]=new_score,was_in_search&&(array_remove(range2.before,id),array_remove(range2.after,id),array_remove(range2.results,id));function insert_into(arr){let start3=0,end2=arr.length;for(;start3!==end2;){let pos=Math.floor(start3+(end2-start3)/2);is_less_than(plan.sorts_list,id,new_score,arr[pos],range2.sort_scores[arr[pos]])?end2=pos:(start3=pos+1,start3>end2&&(start3=end2))}arr.splice(start3,0,id)}return range2.results.length===0?range2.from===0&&range2.at_end?range2.results.push(id):(range2.from!==0&&insert_into(range2.before),range2.at_end||insert_into(range2.after)):is_less_than(plan.sorts_list,id,new_score,range2.results[0],range2.sort_scores[range2.results[0]])?range2.from===0?range2.results.unshift(id):insert_into(range2.before):is_less_than(plan.sorts_list,range2.results[range2.results.length-1],range2.sort_scores[range2.results[range2.results.length-1]],id,new_score)?range2.at_end?range2.results.push(id):insert_into(range2.after):insert_into(range2.results),CallSearch._adjust_range_length.call(this,plan,range2),!0},_adjust_range_length(plan,range2,initial){if(range2.results.length>range2.to-range2.from){delete range2.at_end;return}else if(range2.results.length===range2.to-range2.from||range2.at_end)return;if(!initial){var _this$query_planner$g2;let shrink_amount=range2.to-(range2.from+range2.results.length),{type,constraints,sorts_list}=plan,{local_change_buffer}=(_this$query_planner$g2=this.query_planner().get_stats(type,constraints,sorts_list))!=null?_this$query_planner$g2:{};shrink_amount+=local_change_buffer!=null?local_change_buffer:0,this.query_planner().update(type,constraints,sorts_list,{local_change_buffer:shrink_amount})}if(range2.to=range2.from+range2.results.length,range2.results.length===0)return this.delete_range(plan,range2)},merge_ranges(plan,merge_into,merge_from){let min_id=merge_into.results[0],min_score=merge_into.sort_scores[min_id],max_id=merge_from.results[merge_from.results.length-1],max_score=merge_from.sort_scores[max_id];for(let k in merge_from.sort_scores){var _merge_into$sort_scor,_merge_into$sort_scor2;let v=merge_from.sort_scores[k];(_merge_into$sort_scor2=(_merge_into$sort_scor=merge_into.sort_scores)[k])!=null||(_merge_into$sort_scor[k]=v)}let ss=merge_into.sort_scores,new_results=get_merged_array({merge_into,merge_from,sort_scores:ss,sorts_list:plan.sorts_list,min_id,min_score,max_id,max_score,server_sorted:merge_into.server_sorted,seen_ids:new Set});merge_into.results=new_results,merge_into.after=merge_from.after,merge_into.at_end=merge_from.at_end,merge_into.to=merge_from.to,merge_from.search_version<merge_into.search_version&&(merge_into.search_version=merge_from.search_version),CallSearch._adjust_range_length.call(this,plan,merge_into)}},CallSearch_default=CallSearch}});var All,All_default,init_All=__esm({"lib-browser/db/plans/All.js"(){"use strict";init_define_process_env();init_shim();init_u2();All={get_ret_btype(plan){return plan.type},fn(){throw new UnexpectedError("All cannot be executed")}},All_default=All}});var import_web_dom_collections_iterator80,Static,Static_default,init_Static=__esm({"lib-browser/db/plans/Static.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator80=__toESM(require_web_dom_collections_iterator());init_logger();init_db();init_loggable();Static={fn(plan,from){var _btype_id,_data;let{data,btype_id,value_id}=plan;if((_btype_id=btype_id)!=null||(btype_id=value_id),(_data=data)!=null||(data=[]),!Array.isArray(data)){error("Bad array rehydrated",{data:data,btype_id});let arr=[];for(let[k,v]of data.entries()){let idx=parseInt(k);isNaN(idx)||(arr[idx]=v)}data=arr}return n=>{var _n;(_n=n)!=null||(n=ALL_MAX);let to=from+n,ret=data.slice(from,to);return from=to,ret}},get_ret_btype(plan){var _plan$btype_id;return(_plan$btype_id=plan.btype_id)!=null?_plan$btype_id:plan.value_id}},Static_default=Static}});var Transform,Transform_default,init_Transform=__esm({"lib-browser/db/plans/Transform.js"(){"use strict";init_define_process_env();init_shim();init_b_fiber();init_db_utils();init_hydrate();Transform={fn(plan,from){var _btype_id;let{prev,btype_id,message,properties,_raw:_raw3,arg,value_id}=plan;(_btype_id=btype_id)!=null||(btype_id=value_id);let next=this.iterate(prev,from);properties=rehydrate_tree(this,properties);let btype_message=lang_btypes().get(btype_id).get_message(message);function transform(item,idx){return idx%10===0&&optional_pause("transform"),btype_message.evaluate_without_cast(item,arg,properties,_raw3)}return n=>{let raw=next(n);if(raw==null)return[];let objects=this.array_to_objects(prev,raw,!0);optional_pause("pre-transform");let results=objects.map((item,idx)=>transform(item,idx));return optional_pause("post-transform"),array_to_ids(btype_message.ret_btype_id(),results)}},get_ret_btype(plan){var _btype_id2;let{btype_id,message,value_id}=plan;return(_btype_id2=btype_id)!=null||(btype_id=value_id),lang_btypes().get(btype_id).get_message(message).ret_btype().id()},preserves_length:!0,preserves_context:{sorted_above:!0}},Transform_default=Transform}});var Cast,Cast_default,init_Cast=__esm({"lib-browser/db/plans/Cast.js"(){"use strict";init_define_process_env();init_shim();init_db_utils();Cast={fn(plan,from){let{prev,btype_id}=plan,next=this.iterate(prev,from);return n=>{var _next;return array_to_ids(btype_id,this.array_to_objects(plan,(_next=next(n))!=null?_next:[],!0))}},get_ret_btype(plan){var _plan$btype_id;return(_plan$btype_id=plan.btype_id)!=null?_plan$btype_id:plan.value_id},preserves_length:!0,preserves_context:{sorted_above:!0}},Cast_default=Cast}});var import_web_dom_collections_iterator81,Numeric,Numeric_default,init_Numeric=__esm({"lib-browser/db/plans/Numeric.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator81=__toESM(require_web_dom_collections_iterator());init_plan_utils();init_u2();Numeric={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{let item,n,{prev,op}=plan,list4=this.all(prev);if(list4.length===0)return[null];switch(op){case"sum":{let ret=0;for(n of list4)n!=null&&(ret+=n);return[ret]}case"product":{let ret=1;for(n of list4)n!=null&&(ret*=n);return[ret]}case"average":{let ret=0,count2=0;for(n of list4)n!=null&&(count2++,ret+=n);return count2===0?[null]:[ret/count2]}case"median":return list4=Array.from([]).concat(list4),list4.sort((a,b)=>a-b),list4=list4.filter(item2=>item2!==null),list4.length===0?[null]:list4.length%2===0?[(list4[list4.length/2-1]+list4[list4.length/2])/2]:[list4[Math.floor(list4.length/2)]];case"min":{let ret=list4[0];for(item of list4.slice(1))item!=null&&item<ret&&(ret=item);return[ret]}case"max":{let ret=list4[0];for(item of list4.slice(1))if(item!=null&&item>ret){var _item;ret=(_item=item)!=null?_item:0}return[ret]}default:throw new UnexpectedError("unrecognized op: "+op)}})},get_ret_btype(){return"number"},adds_context:{sorted_above:!0}},Numeric_default=Numeric}});var Contains,Contains_default,init_Contains=__esm({"lib-browser/db/plans/Contains.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_plan_utils();init_db_utils();init_b_fiber();init_hydrate();init_plans();Contains={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{var _btype_id;let ret,{btype_id,item,prev,value_id}=plan;(_btype_id=btype_id)!=null||(btype_id=value_id);let V=lang_btypes().get(btype_id);item=rehydrate_tree(this,item);let next=this.iterate(prev);for(;ret=next();){let iterable=this.array_to_objects(prev,ret);for(let idx=0;idx<iterable.length;idx++){let entry=iterable[idx];if(idx%10===0&&optional_pause(),V.equals(entry,item))return[!0]}}return[!1]})},get_ret_btype(){return"sys.bool"},adds_context:{sorted_above:!0},simplify(query){if(plans[query.prev.t].preserves_items){var _query$btype_id;return{t:"Contains",btype_id:(_query$btype_id=query.btype_id)!=null?_query$btype_id:query.value_id,item:query.item,prev:query.prev.prev}}else return query.prev.t==="Concat"?{t:"Reduce",op:"or",prev:{t:"Concat",prevs:query.prev.prevs.map(prev=>extend({},query,{prev}))}}:query.prev.t==="Intersect"?{t:"Reduce",op:"and",prev:{t:"Concat",prevs:query.prev.prevs.map(prev=>extend({},query,{prev}))}}:null}},Contains_default=Contains}});var import_web_dom_collections_iterator82,Position,Position_default,init_Position=__esm({"lib-browser/db/plans/Position.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator82=__toESM(require_web_dom_collections_iterator());init_plan_utils();init_db_utils();init_b_fiber();init_hydrate();Position={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{let ret,{btype_id,item,prev}=plan,V=lang_btypes().get(btype_id);item=rehydrate_tree(this,item);let pos=-1,next=this.iterate(prev);for(;ret=next();){let objects=this.array_to_objects(prev,ret,!0);for(let[idx,entry]of objects.entries())if(idx%10===0&&optional_pause(),pos++,V.equals(entry,item))return[pos]}return[-1]})},get_ret_btype(){return"number"}},Position_default=Position}});var Compare,Compare_default,init_Compare=__esm({"lib-browser/db/plans/Compare.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_loggable();init_plan_utils();Compare={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{var _this$execute_get_chi;let{op,n,prev}=plan,x=(_this$execute_get_chi=this.execute_get_children(prev,0,1))==null?void 0:_this$execute_get_chi[0];switch(op){case">":return[x>n];case"<":return[x<n];case">=":return[x>=n];case"<=":return[x<=n];case"===":return[x===n];case"!==":return[x!==n];default:throw new UnexpectedError("unrecognized op",{plan:plan})}})},get_ret_btype(){return"sys.bool"}},Compare_default=Compare}});var import_es_string_replace19,NodeList,NodeList_default,init_NodeList=__esm({"lib-browser/db/plans/NodeList.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace19=__toESM(require_es_string_replace());init_u2();init_b_fiber();init_db_utils();init_eval();init_btype_ids();init_loggable();NodeList={fn(plan,from){var _obj$child$_extract;let{id,field}=plan;if(!id)throw new UnexpectedError("NodeList missing id",{plan:plan});let obj=this.get(id),raw_list=(_obj$child$_extract=obj.child(field)._extract(obj.raw()))!=null?_obj$child$_extract:[];if(!Array.isArray(raw_list))throw new UnexpectedError("NodeList called on bad field",{plan:plan});let convert=(item,idx)=>{if(idx%10===0&&optional_pause(),typeof item!="string"||!starts_with(item,HYDRATE_STRING)||item.length>200||item.includes("StaticNode")||item.includes("StaticObject"))return item;let local_id=item.replace(HYDRATE_STRING,""),local=this._local(local_id);return local.dependency.register(),local.raw==null&&local.ready_key.is_turned()?null:local_id},results=[];return n=>{let ret,to,idx,item;for(n!=null?to=from+n:to=from+this.GET_BATCH_SIZE,to=coerce_to_integer(to,{n,to,from,plan});results.length<to&&raw_list.length>0;){let needed=(to-results.length)*1.2,to_add=raw_list.slice(0,needed);for(raw_list=raw_list.slice(needed),idx=0;idx<to_add.length;idx++)item=to_add[idx],convert(item,idx);for(to_add=to_add.map((item2,idx2)=>convert(item2,idx2)),to_add=to_add.filter(item2=>item2!=null),idx=0;idx<to_add.length;idx++)item=to_add[idx],idx%10===0&&optional_pause(),results.push(item)}return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},get_ret_btype(plan){var _get$get_message$ret_;if(plan.type)return plan.type;if(plan.id==null)throw new UnexpectedError("NodeList missing id",{plan:plan});let type=this.get(plan.id)._type();if(!type)return"null";let btype_id=(_get$get_message$ret_=lang_btypes().get(type).get_message(plan.field).ret_btype())==null?void 0:_get$get_message$ret_.id();if(btype_id==null||btype_id==="null")return"null";if(btype_id==="date_range")return"date";if(btype_id==="number_range")return"number";if(!is_list(btype_id))throw new UnexpectedError("NodeList has non-list value for field: "+btype_id);return list_element_type(btype_id)}},NodeList_default=NodeList}});var Length,Length_default,init_Length=__esm({"lib-browser/db/plans/Length.js"(){"use strict";init_define_process_env();init_shim();init_db();init_plan_utils();init_plans();Length={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{let ret,{prev,bound}=plan;bound||(bound=ALL_MAX);let fetch_to=Math.min(bound,400),count2=0,next=this.iterate(prev);for(;count2<bound&&(ret=next(fetch_to));)count2+=ret.length;return[count2]})},get_ret_btype(){return"number"},simplify(query){return plans[query.prev.t].preserves_length?{t:"Length",bound:query.bound,prev:query.prev.prev,options:query.options}:query.prev.t==="Concat"?{t:"Reduce",op:"+",prev:{t:"Concat",prevs:query.prev.prevs.map(prev=>({t:"Length",prev,options:query.options}))}}:null},adds_context:{sorted_above:!0}},Length_default=Length}});var Cap,Cap_default,init_Cap=__esm({"lib-browser/db/plans/Cap.js"(){"use strict";init_define_process_env();init_shim();Cap={fn(plan,from){let{prev,max}=plan,next=this.iterate(prev,from);return max-=from,from=0,n=>{let new_n,max_n=max-from;if(max_n<1)return[];n!=null?new_n=Math.min(n,max_n):new_n=null;let ret=next(new_n);return ret?(ret.length>max_n&&(ret=ret.slice(0,max_n)),from+=ret.length,ret):[]}},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)}},Cap_default=Cap}});var Offset,Offset_default,init_Offset=__esm({"lib-browser/db/plans/Offset.js"(){"use strict";init_define_process_env();init_shim();Offset={fn(plan,from){let{prev,offset}=plan;offset=Math.floor(offset),offset<0&&(offset=0);let next=this.iterate(prev,from+offset);return n=>{var _next;return(_next=next(n))!=null?_next:[]}},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)}},Offset_default=Offset}});var import_web_dom_collections_iterator83,Flatten,Flatten_default,init_Flatten=__esm({"lib-browser/db/plans/Flatten.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator83=__toESM(require_web_dom_collections_iterator());init_u2();init_hydrate();init_db_utils();init_btype_ids();init_loggable();Flatten={fn(plan,from){let{prev}=plan,next=this.iterate(prev),inner_next=null,lists=[],results=[];return n=>{let ret,to;for(n!=null?to=from+n:to=from+1,to=coerce_to_integer(to,{n,to,from,plan});results.length<to;){if(inner_next==null){var _hydrate$rehydrate_tr,_hydrate$rehydrate_tr2,_hydrate$rehydrate_tr3;if(lists.length===0){let next_lists=next();if(next_lists==null)break;lists=next_lists}let next_plan=(_hydrate$rehydrate_tr=rehydrate_tree(this,lists.shift()))==null||(_hydrate$rehydrate_tr2=(_hydrate$rehydrate_tr3=_hydrate$rehydrate_tr).get_plan)==null?void 0:_hydrate$rehydrate_tr2.call(_hydrate$rehydrate_tr3);if(next_plan==null)continue;inner_next=this.iterate(next_plan)}for(;results.length<to;){if(ret=inner_next(),ret==null){inner_next=null;break}results.push(...ret)}}return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},validate(query){let prev_id=this.get_plan_ret_btype(query.prev);if(!is_list(prev_id))throw new UnexpectedError("Flatten must be called on a plan that returns lists",{query:query})},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev).slice(5)},preserves_context:{sorted_above:!0},simplify(query){return null}},Flatten_default=Flatten}});var import_web_dom_collections_iterator84,Concat,Concat_default,init_Concat=__esm({"lib-browser/db/plans/Concat.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator84=__toESM(require_web_dom_collections_iterator());init_u2();init_loggable();init_db_utils();Concat={fn(plan,from){let{prevs}=plan,plan_idx=-1,results=[],next=null;return n=>{let ret,to;for(n!=null?to=from+n:to=from+1,to=coerce_to_integer(to,{n,to,from,plan});results.length<to;){if(next==null){if(plan_idx++,plan_idx>=prevs.length)break;next=this.iterate(prevs[plan_idx])}ret=next(),ret==null?next=null:results.push(...ret)}return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},validate(query){if(!Array.isArray(query.prevs))throw new UnexpectedError("Concat must have prevs array",{query:query})},get_ret_btype(plan){for(let prev of plan.prevs){let btype_id=this.get_plan_ret_btype(prev);if(btype_id!=null&&btype_id!=="null")return btype_id}return"null"},preserves_context:{sorted_above:!0},simplify(query){let found_one=!1,prevs=[];for(let prev of query.prevs)if(prev.t==="Concat"){found_one=!0;for(let concat_prev of prev.prevs)prevs.push(concat_prev)}else prevs.push(prev);return found_one?extend({},query,{prevs}):null}},Concat_default=Concat}});var import_web_dom_collections_iterator85,Intersect,Intersect_default,init_Intersect=__esm({"lib-browser/db/plans/Intersect.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator85=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_query_planner();init_db_utils();init_loggable();Intersect={fn(plan,from){let plan_idx,{prevs}=plan,results=[],seen=prevs.map(_=>({})),added={};function add4(item,idx,item_idx){item_idx%10===0&&optional_pause();let stringified=JSON.stringify(item);if(!added[stringified]){seen[idx][stringified]=!0;for(let i=0;i<prevs.length;i++)if(!seen[i][stringified])return;added[stringified]=!0,results.push(item)}}let nexts=prevs.map(prev=>this.iterate(prev));plan_idx=0;let at_end=0;return n=>{let ret,to;for(n!=null?to=from+n:to=from+1,to=coerce_to_integer(to,{n,to,from,plan});results.length<to&&at_end<prevs.length;){if(nexts[plan_idx]){let batch3=nexts[plan_idx]();if(!batch3)nexts[plan_idx]=null,at_end++;else for(let item_idx=0;item_idx<batch3.length;item_idx++){let item=batch3[item_idx];add4(item,plan_idx,item_idx)}}plan_idx++,plan_idx===prevs.length&&(plan_idx=0)}return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},get_ret_btype(plan){for(let prev of plan.prevs){let btype_id=this.get_plan_ret_btype(prev);if(btype_id!=null&&btype_id!=="null")return btype_id}return"null"},validate(query){if(!Array.isArray(query.prevs))throw new UnexpectedError("Intersect must have prevs array",{query:query})},preserves_context:{sorted_above:!0},simplify(query,context){let prev,found_one=!1,prevs=[];for(prev of query.prevs)if(prev.t==="Intersect"){found_one=!0;for(let concat_prev of prev.prevs)prevs.push(concat_prev)}else prevs.push(prev);if(found_one)return extend({},query,{prevs});if(!context.sorted_above)return null;let inner=null,first_prev=null;for(prev of query.prevs){if(prev.t==="Filter")inner=prev.prev;else if(prev.t==="All")inner=prev;else return null;if(first_prev==null)first_prev=JSON.stringify(inner);else if(first_prev!==JSON.stringify(inner))return null}let added={},constraints=[];for(prev of query.prevs)if(prev.t==="Filter")for(let c of prev.constraints)added[JSON.stringify(c)]||(added[JSON.stringify(c)]=!0,constraints.push(c));return constraints.length===0?inner:{t:"Filter",constraints:sort_constraints(constraints),prev:inner}}},Intersect_default=Intersect}});var import_web_dom_collections_iterator86,Unique,Unique_default,init_Unique=__esm({"lib-browser/db/plans/Unique.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator86=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_plan_utils();init_query_planner();Unique={simplify(query,context){let constraint,constraints;if(query.prev.t!=="Concat")return null;let found_one=!1,remove_uniques=q=>q.t==="Unique"?(found_one=!0,q.prev):q,new_prevs=query.prev.prevs.map(remove_uniques);if(found_one)return{t:"Unique",prev:this.simplify_query(extend({},query.prev,{prevs:new_prevs}))};if(!context.sorted_above)return null;let constraint_arrays=query.prev.prevs,first_prev=null,inner=null;for(let prev of constraint_arrays){if(prev.t==="All")return prev;if(prev.t==="Filter")inner=prev.prev;else return null;if(first_prev==null)first_prev=JSON.stringify(inner);else if(first_prev!==JSON.stringify(inner))return null}let unique_constraint_arrays=[];for(let filter of constraint_arrays){let unique_constraints_in_filter={},unique_constraint_array=[];for(constraint of filter.constraints)unique_constraints_in_filter[JSON.stringify(constraint)]||(unique_constraint_array.push(constraint),unique_constraints_in_filter[JSON.stringify(constraint)]=!0);unique_constraint_arrays.push(unique_constraint_array)}let constraint_count_in_filters={};for(constraints of unique_constraint_arrays)for(constraint of constraints){var _JSON$stringify,_constraint_count_in_;(_constraint_count_in_=constraint_count_in_filters[_JSON$stringify=JSON.stringify(constraint)])!=null||(constraint_count_in_filters[_JSON$stringify]=0),constraint_count_in_filters[JSON.stringify(constraint)]=constraint_count_in_filters[JSON.stringify(constraint)]+1}let inner_btype_id=this.get_plan_ret_btype(inner),subs=[],top2=[],drop_or=!1;for(constraints of unique_constraint_arrays){let non_factorisable=[];for(constraint of(_constraints=constraints)!=null?_constraints:[]){var _constraints;if(constraint_count_in_filters[JSON.stringify(constraint)]===unique_constraint_arrays.length)top2.push(constraint),constraint_count_in_filters[JSON.stringify(constraint)]="added";else if(constraint_count_in_filters[JSON.stringify(constraint)]!=="added"){if(!can_execute_in_db(inner_btype_id,constraint))return null;non_factorisable.push(constraint)}}if(non_factorisable.length===0)drop_or=!0;else if(non_factorisable.length===1)if(non_factorisable[0].constraint_type==="or")for(let s of non_factorisable[0].opts)subs.push(s);else subs.push(non_factorisable[0]);else subs.push({constraint_type:"and",opts:sort_constraints(non_factorisable)})}return drop_or||top2.push({constraint_type:"or",opts:sort_constraints(subs)}),{t:"Filter",constraints:sort_constraints(top2),prev:inner}},fn(plan,from){let{prev}=plan,results=[],seen_already={},next=this.iterate(prev);return n=>{let ret,to;n!=null?to=from+n:to=from+1;let unfiltered;for(;results.length<to&&(unfiltered=next());)for(let[idx,item]of unfiltered.entries())idx%10===0&&optional_pause(),seen_already[JSON.stringify(item)]||(seen_already[JSON.stringify(item)]=!0,results.push(item));return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)},preserves_items:!0,sort_neutral:!0,preserves_context:{sorted_above:!0}},Unique_default=Unique}});var import_web_dom_collections_iterator87,Reduce,Reduce_default,init_Reduce=__esm({"lib-browser/db/plans/Reduce.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator87=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_plan_utils();Reduce={is_single:!0,fn(plan,from){return ensure_single(plan,from,()=>{let cur,fn,{op,prev}=plan;switch(op){case"+":cur=0,fn=(a,b)=>[a+b];break;case"or":cur=!1,fn=(a,b)=>[a||b,a||b];break;case"and":cur=!0,fn=(a,b)=>[a&&b];break;default:throw new UnexpectedError("unrecognized op "+op)}let next=this.iterate(prev),ret;for(;ret=next();)for(let[idx,item]of ret.entries()){let stop;if(idx%10===0&&optional_pause(),[cur,stop]=fn(cur,item),stop)return[cur]}return[cur]})},get_ret_btype(plan){switch(plan.op){case"+":return"number";case"or":return"boolean";default:throw new UnexpectedError("unrecognized op "+plan.op)}},adds_context:{sorted_above:!0}},Reduce_default=Reduce}});var Filter,Filter_default,init_Filter=__esm({"lib-browser/db/plans/Filter.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_b_fiber();init_plan_utils();init_query_planner();init_db_utils();init_loggable();Filter={fn(plan,from){let{prev,constraints}=plan,results=[],next=this.iterate(prev),btype_id=this.get_plan_ret_btype(plan.prev);return n=>{let ret,to;n!=null?to=from+n:to=from+1,to=coerce_to_integer(to,{n,to,from,plan});let unfiltered;for(;results.length<to&&(unfiltered=next());){let unfiltered_objects=this.array_to_objects(prev,unfiltered,!0);for(let idx=0;idx<unfiltered_objects.length;idx++){let obj=unfiltered_objects[idx];idx%10===0&&optional_pause(),pass_filter(obj,constraints,btype_id)&&results.push(unfiltered[idx])}}return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},validate(query){if(!Array.isArray(query.constraints))throw new UnexpectedError("Filter must have constraints array",{query:query})},canonicalize(query){return sort_constraints(query.constraints)},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)},simplify(query){return query.prev.t==="Filter"?{t:"Filter",constraints:query.constraints.concat(query.prev.constraints),prev:query.prev.prev}:query.prev.t==="Concat"||query.prev.t==="Intersect"?{t:query.prev.t,prevs:query.prev.prevs.map(prev=>this.simplify_query(extend({},query,{prev})))}:null},sort_neutral:!0,preserves_context:{sorted_above:!0}},Filter_default=Filter}});var Sort,Sort_default,init_Sort=__esm({"lib-browser/db/plans/Sort.js"(){"use strict";init_define_process_env();init_shim();init_db();init_db_utils();init_plan_utils();Sort={fn(plan,from){let{prev,sorts_list}=plan,results=this.all(prev),objects=this.array_to_objects(prev,results,!0);sort_in_memory(objects,sorts_list,this.get_plan_ret_btype(plan.prev));let ids=this.array_to_ids(prev,objects);return n=>{var _n;(_n=n)!=null||(n=ALL_MAX);let to=from+n,ret=ids.slice(from,to);return from=to,ret}},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)},preserves_items:!0,preserves_length:!0,canonicalize(query){query.sorts_list=resolve_sorts(query.sorts_list,!0)},adds_context:{sorted_above:!0},simplify(query,context){return context.sorted_above?query.prev:null}},Sort_default=Sort}});function to_moment2(timezone_string,timestamp2){return timezone_string==="browser"?moment2(timestamp2):moment2(timestamp2).tz(timezone_string)}function to_stable_ish_floating_point(number2,interval){let interval_magnitude=Math.log10(interval),decimal_places=Math.max(0,SIGNIFICANT_DIGITS-interval_magnitude);return Number(number2.toFixed(decimal_places))}var import_web_dom_collections_iterator88,import_moment_timezone_min,moment2,SIGNIFICANT_DIGITS,GroupByBucketer,init_GroupByBucketer=__esm({"lib-browser/db/plans/GroupByBucketer.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator88=__toESM(require_web_dom_collections_iterator());init_u2();init_db_utils();init_plan_utils();init_db();import_moment_timezone_min=__toESM(require_moment_timezone_min());moment2=import_moment_timezone_min.default;SIGNIFICANT_DIGITS=5;GroupByBucketer=class{constructor(prev_btype_id,groupings,aggregations){this.prev_btype_id=prev_btype_id,this.aggregations=aggregations,this.prev_value=lang_btypes().get(this.prev_btype_id),this.bucket_starts=groupings.map(this.get_start,this),this.all_groupings=groupings,this.last_grouping=groupings[groupings.length-1],this.last_grouping.end!=null&&BUCKET_GROUPINGS.includes(this.last_grouping.fn)?(this.continuous_group=this.last_grouping,this.groupings=groupings.slice(0,groupings.length-1),this.bucket_end=this.get_bucket_from_data(this.last_grouping,this.continuous_group.end)):(this.continuous_group=null,this.bucket_end=null,this.groupings=this.all_groupings)}get_bucket_data(grouping,item){return this.prev_value.get_message(grouping.message).evaluate_without_cast(item)}get_bucket(grouping,item){let data=this.get_bucket_data(grouping,item);return this.get_bucket_from_data(grouping,data)}get_bucket_from_data(grouping,data){var _grouping$fn;switch((_grouping$fn=grouping.fn)!=null?_grouping$fn:"exact"){case"exact":return data;case"bucket":{if(data==null)return null;let{start:start3,interval}=grouping,intervals=Math.floor((data-start3)/interval),bucket_value=start3+intervals*interval;return to_stable_ish_floating_point(bucket_value,interval)}case"day":case"month":{if(data==null)return null;let{start:start3}=grouping,{interval,timezone_string}=grouping;if(start3=to_moment2(timezone_string,grouping.start).startOf(grouping.fn),data<start3.valueOf())throw new UnexpectedError("assertion error: got data < start",{data,start:start3,grouping});let unit=grouping.fn==="day"?"days":grouping.fn,cur=start3;for(;;){let next=cur.clone().add(interval,unit);if(next.valueOf()>data)return cur.valueOf();cur=next}}default:throw new UnexpectedError("unrecognized fn "+grouping.fn)}}next_bucket(grouping,data){var _grouping$fn2;switch((_grouping$fn2=grouping.fn)!=null?_grouping$fn2:"exact"){case"exact":throw new UnexpectedError("cannot call next_bucket on an exact match",{grouping,data});case"bucket":{let{interval}=grouping,bucket_value=data+interval;return to_stable_ish_floating_point(bucket_value,interval)}case"day":case"month":{let{interval,timezone_string}=grouping,unit=grouping.fn==="day"?"days":grouping.fn;return to_moment2(timezone_string,data).add(interval,unit).valueOf()}}}get_start(grouping){return BUCKET_GROUPINGS.includes(grouping.fn)?this.get_bucket_from_data(grouping,grouping.start):null}is_in_range(item){let data;for(let idx=0;idx<this.groupings.length;idx++){let grouping=this.groupings[idx];if(this.bucket_starts[idx]!=null&&(data=this.get_bucket_data(grouping,item),data==null||data<this.bucket_starts[idx]))return!1}if(this.continuous_group!=null){if(data=this.get_bucket_data(this.continuous_group,item),data==null)return null;if(data<this.bucket_starts[this.groupings.length]||this.get_bucket_from_data(this.continuous_group,data)>this.bucket_end)return!1}return!0}build_grouping_sorter(idx){var _idx;let next_comparer;(_idx=idx)!=null||(idx=0);let extractor=item=>{let bucket=this.get_bucket(this.all_groupings[idx],item);return typeof(bucket==null?void 0:bucket._id)=="function"?bucket._id():bucket};return idx+1<this.all_groupings.length?next_comparer=this.build_grouping_sorter(idx+1):next_comparer=()=>0,make_sort_comparer(extractor,!1,next_comparer)}get_continuous_start(){return this.get_start(this.continuous_group)}get_continuous_end(){return this.get_bucket_from_data(this.continuous_group,this.continuous_group.end)}get_grouping_constraints(){let start3,constraints=[];for(let grouping of this.groupings)start3=this.get_start(grouping),start3!=null&&constraints.push({constraint_type:"or",opts:[{constraint_type:"greater than",key:grouping.message,value:start3},{constraint_type:"equals",key:grouping.message,value:start3}]});if(this.continuous_group){start3=this.get_continuous_start(),constraints.push({constraint_type:"or",opts:[{constraint_type:"greater than",key:this.continuous_group.message,value:start3},{constraint_type:"equals",key:this.continuous_group.message,value:start3}]});let end2=this.next_bucket(this.continuous_group,this.get_continuous_end());constraints.push({constraint_type:"less than",key:this.continuous_group.message,value:end2})}return constraints}}}});var TransformList,TransformList_default,init_TransformList=__esm({"lib-browser/db/values/TransformList.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_hydrate();init_ListWrapper();TransformList=class extends ListWrapper{constructor(source_list,transform_data){let{btype_id,message,properties,_raw:_raw3,arg}=transform_data,prev=source_list.query,database=source_list.db;properties=dehydrate_tree(properties),super(database,{t:"Transform",prev,btype_id,message,properties,_raw:_raw3,arg})}};TransformList.rehydrate=function(my_db,key){let{source_list,transform_data}=incremental_json_parse(key);return new TransformList(rehydrate(my_db,source_list),transform_data)};TransformList_default=TransformList}});var import_web_dom_collections_iterator89,GroupBy,GroupBy_default,init_GroupBy=__esm({"lib-browser/db/plans/GroupBy.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator89=__toESM(require_web_dom_collections_iterator());init_GroupByBucketer();init_logger();init_plan_utils();init_TransformList();init_hydrate();GroupBy={fn(plan,from){let{aggregations}=plan,prev=plan.prev,prev_btype_id=this.get_plan_ret_btype(prev),bucketer=new GroupByBucketer(prev_btype_id,plan.groupings,aggregations),results=[],ungrouped=this.array_to_objects(prev,this.all(prev)).filter(item=>item!==null&&bucketer.is_in_range(item));ungrouped.sort(bucketer.build_grouping_sorter());let current_grouping=null,current_continuous=null,in_current_group=item=>{for(let[idx,grouping]of bucketer.groupings.entries())if(dehydrate_tree(bucketer.get_bucket(grouping,item))!==dehydrate_tree(current_grouping[idx]))return!1;return!(bucketer.continuous_group!=null&&bucketer.get_bucket(bucketer.continuous_group,item)!==current_continuous)},next_grouping=()=>{if(bucketer.continuous_group!=null){if(current_continuous==null)current_continuous=bucketer.get_continuous_start();else if(current_continuous=bucketer.next_bucket(bucketer.continuous_group,current_continuous),current_continuous>bucketer.get_continuous_end()){if(current_grouping=null,bucketer.groupings.length===0)return;current_continuous=bucketer.get_continuous_start()}}else current_grouping=null;if(current_grouping==null){if(ungrouped[0]==null&&bucketer.groupings.length>0)return;current_grouping=bucketer.groupings.map(grouping=>bucketer.get_bucket(grouping,ungrouped[0]))}},get_next_group=()=>{if(next_grouping(),current_grouping==null)return;let building=[];for(;ungrouped[0]!=null&&in_current_group(ungrouped[0]);)building.push(ungrouped.shift());let res={};for(let[idx,value]of current_grouping.entries())res["grouping"+String(idx)]=value;bucketer.continuous_group!=null&&(res["grouping"+String(current_grouping.length)]=current_continuous);let as_static_list=null;for(let[idx,{fn,message}]of aggregations.entries()){let agg;if(fn==="count")agg=building.length;else{var _as_static_list;(_as_static_list=as_static_list)!=null||(as_static_list=this.static_list(prev_btype_id,building));let transformed=new TransformList_default(as_static_list,{btype_id:prev_btype_id,message});fn in transformed?agg=transformed[fn]():(info("Unexpectedly missing transform call!",{fn_name:fn}),agg=transformed._numeric_op(fn))}res["agg"+String(idx)]=agg}return res};return n=>{let ret,to;n!=null?to=from+n:to=from+1;let next_group;for(;results.length<to&&(next_group=get_next_group());)results.push(dehydrate_tree(next_group));return n!=null?ret=results.slice(from,to):ret=results.slice(from),from+=ret.length,ret}},get_ret_btype(plan){let{aggregations,groupings,prev}=plan;return get_group_by_btype_id(this.get_plan_ret_btype(prev),groupings,aggregations)},adds_context:{sorted_above:!0}},GroupBy_default=GroupBy}});var Columns,Columns_default,init_Columns=__esm({"lib-browser/db/plans/Columns.js"(){"use strict";init_define_process_env();init_shim();init_u2();Columns={get_ret_btype(plan){return plan.type},fn(){throw new UnexpectedError("Columns cannot be executed")}},Columns_default=Columns}});var ExtraFields,ExtraFields_default,init_ExtraFields=__esm({"lib-browser/db/plans/ExtraFields.js"(){"use strict";init_define_process_env();init_shim();init_u2();ExtraFields={get_ret_btype(plan){return this.get_plan_ret_btype(plan.prev)},fn(){throw new UnexpectedError("ExtraFields cannot be executed")}},ExtraFields_default=ExtraFields}});var import_web_dom_collections_iterator90,CallAggregate,CallAggregate_default,init_CallAggregate=__esm({"lib-browser/db/plans/CallAggregate.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator90=__toESM(require_web_dom_collections_iterator());init_u2();init_db();init_plan_utils();init_StaticObject();init_loggable();CallAggregate={watch_search_call(plan){return{constraints:plan.constraints,type:plan.type}},load(_ref,cb){var _field,_options;let{plan,from,n}=_ref;if(from!==0||n!==1)throw new UnexpectedError("CallAggregate weird params",{plan:plan,from,n});let{constraints,type,agg_fn,field,options}=plan;(_field=field)!=null||(field=void 0),(_options=options)!=null||(options=void 0);let info2={};info2[aggregate_started_key(agg_fn,field,options)]=!0,this.query_planner().update(type,constraints,null,info2);let fns=[{n:agg_fn,field,options}];this.elasticsearch("aggregate",{appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),type,constraints,aggregate:{fns},search_path:this.build_search_path(plan,agg_fn)},(err,res)=>{var _options2,_options3;if(err){cb(err);return}let value=res.fns[0],{search_version}=res;agg_fn==="count"&&!((_options2=options)!=null&&_options2.should_approx)&&!((_options3=options)!=null&&_options3.cacheable)&&this.query_planner().update(type,constraints,null,{length:value}),cb(null,{value,search_version})})},initialize_range(plan,range2,ret){range2.search_version=ret.search_version,range2.at_end=!0,range2.results=[ret.value]},local_change(plan,range2,id,type,old_raw,new_raw){var _range$_unknown_ids2;let new_value=null,old_value=null;if(plan.type!==type)return!1;function in_search(raw){if(raw==null)return!1;let obj=new StaticObject(raw,null,type);for(let c of plan.constraints)if(!local_constrain(obj,c,type))return!1;return!0}if(old_raw===DONT_KNOW){var _range$_unknown_ids;return(_range$_unknown_ids=range2._unknown_ids)!=null||(range2._unknown_ids={}),range2._unknown_ids[id]=!0,DONT_KNOW}if((_range$_unknown_ids2=range2._unknown_ids)!=null&&_range$_unknown_ids2[id])return DONT_KNOW;let was_in_search=in_search(old_raw),is_in_search=in_search(new_raw),changed=was_in_search!==is_in_search;return!changed&&was_in_search&&plan.field&&(changed=old_raw[plan.field]!==new_raw[plan.field]),changed?AGGREGATE_LOCAL_CHANGE[plan.agg_fn]?(plan.field&&(old_value=was_in_search?old_raw==null?void 0:old_raw[plan.field]:null,new_value=is_in_search?new_raw==null?void 0:new_raw[plan.field]:null),range2.results[0]=AGGREGATE_LOCAL_CHANGE[plan.agg_fn](was_in_search,is_in_search,old_value,new_value,range2.results[0]),!0):DONT_KNOW:!1},merge_ranges(plan,merge_into,merge_from){throw new UnexpectedError("Merge CallAggregate",{plan:plan,merge_into:merge_into,merge_from:merge_from})},get_ret_btype(){return null}},CallAggregate_default=CallAggregate}});var import_web_dom_collections_iterator91,Difference,Difference_default,init_Difference=__esm({"lib-browser/db/plans/Difference.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator91=__toESM(require_web_dom_collections_iterator());init_u2();init_loggable();init_db_utils();Difference={fn(plan,from){let{prevs:[a,b]}=plan,next_a=this.iterate(a),next_b=this.iterate(b),seen=new Set,results=[];return n=>{let to=n?from+n:from+1,end2=coerce_to_integer(to,{n,to,from,plan}),b_values=next_b();for(;b_values!=null;)b_values.forEach(value=>{seen.add(JSON.stringify(value))}),b_values=next_b();let a_values=next_a();for(;results.length<end2&&a_values!=null&&(a_values.forEach(item=>{seen.has(JSON.stringify(item))||results.push(item)}),!(results.length>=end2));)a_values=next_a();let ret=n!=null?results.slice(from,end2):results.slice(from);return from+=ret.length,ret}},get_ret_btype(plan){return this.get_plan_ret_btype(plan.prevs[0])},validate(query){if(query.prevs==null||query.prevs.length!==2)throw new UnexpectedError("Difference must be called with a prevs list of size 2",{query:query})},preserves_context:{sorted_above:!0}},Difference_default=Difference}});var import_web_dom_collections_iterator92,CallGroupBy,CallGroupBy_default,init_CallGroupBy=__esm({"lib-browser/db/plans/CallGroupBy.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator92=__toESM(require_web_dom_collections_iterator());init_u2();init_db();init_plan_utils();init_mode_check();init_GroupByBucketer();init_StaticObject();init_lib();init_hydrate();init_query_planner();init_loggable();CallGroupBy={watch_search_call(plan){let{constraints,type,groupings,aggregations}=plan,bucketer=new GroupByBucketer(type,groupings,aggregations);return constraints=Array.from([]).concat(constraints,bucketer.get_grouping_constraints()),sort_constraints(constraints),{constraints,type,is_group_by:!0}},load(_ref,cb){let{plan,from,n}=_ref,{constraints,type,groupings,aggregations}=plan;function convert(grouping){return grouping=extend({},grouping),grouping.timezone_string==="browser"&&(grouping.timezone_string=lib_default.or_throw().current_timezone()),grouping}groupings=groupings.map(convert);let extract_last=raw=>groupings.map((_,i)=>raw[`grouping${String(i)}`]);u_exports2.run_once(120,()=>{if(from>0){let previous_results=this.execute_call_get_children(plan,0,from);if(previous_results.length<from)return"at_end";let raw=rehydrate_tree(this,previous_results[previous_results.length-1]).raw();return extract_last(raw)}else return null},(err,last2)=>{if(err){cb(err);return}if(last2==="at_end")return cb(null,{at_end:!0,results:[]});let results=[],keep_going=!0,btype_id=get_group_by_btype_id(type,groupings,aggregations),search_version=null,do_next_batch=()=>{keep_going=!1;let needed=n-results.length;return this.elasticsearch("group_by",{appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),type,constraints,groupings,aggregations,last:last2,n:Math.min(needed,100),search_path:this.build_search_path(plan,from+n)},(err2,res)=>{if(err2){cb(err2);return}(!search_version||res.search_version<search_version)&&({search_version}=res);for(let group of res.groups)results.push(dehydrate_tree(new StaticObject(group,lib_default.or_throw().db_instance(),btype_id)));res.groups[res.groups.length-1]&&(last2=extract_last(res.groups[res.groups.length-1]));let{at_end}=res;at_end||results.length===n?cb(null,{at_end,results,search_version}):results.length>n?cb(new UnexpectedError("should never go above n",{results_length:results.length,n,plan:plan})):on_server()?keep_going=!0:do_next_batch()})};for(;keep_going;)do_next_batch()})},get_ret_btype(plan){let{type,groupings,aggregations}=plan;return get_group_by_btype_id(type,groupings,aggregations)},initialize_range(plan,range2,res){range2.at_end=res.at_end,range2.results=res.results,range2.search_version=res.search_version},local_change(plan,range2,id,type,old_raw,new_raw){var _range$_unknown_ids2;if(plan.type!==type)return!1;function in_search(raw){if(raw==null)return!1;let obj=new StaticObject(raw,null,type);for(let c of plan.constraints)if(!local_constrain(obj,c,type))return!1;return!0}if(old_raw===DONT_KNOW){var _range$_unknown_ids;return(_range$_unknown_ids=range2._unknown_ids)!=null||(range2._unknown_ids={}),range2._unknown_ids[id]=!0,DONT_KNOW}if((_range$_unknown_ids2=range2._unknown_ids)!=null&&_range$_unknown_ids2[id])return DONT_KNOW;let was_in_search=in_search(old_raw),is_in_search=in_search(new_raw),changed=was_in_search!==is_in_search;if(!changed&&was_in_search){for(let aggregation of plan.aggregations)if(aggregation.message&&old_raw[aggregation.message]!==new_raw[aggregation.message]){changed=!0;break}if(!changed){for(let grouping of plan.groupings)if(old_raw[grouping.message]!==new_raw[grouping.message]){changed=!0;break}}}return changed?DONT_KNOW:!1},merge_ranges(plan,merge_into,merge_from){merge_into.results.push(...merge_from.results),merge_into.to=merge_from.to,merge_from.search_version<merge_into.search_version&&(merge_into.search_version=merge_from.search_version)}},CallGroupBy_default=CallGroupBy}});var plans,init_plans=__esm({"lib-browser/db/plans/index.js"(){"use strict";init_define_process_env();init_shim();init_CallSearch();init_All();init_Static();init_Transform();init_Cast();init_Numeric();init_Contains();init_Position();init_Compare();init_NodeList();init_Length();init_Cap();init_Offset();init_Flatten();init_Concat();init_Intersect();init_Unique();init_Reduce();init_Filter();init_Sort();init_GroupBy();init_Columns();init_ExtraFields();init_CallAggregate();init_Difference();init_CallGroupBy();plans={CallSearch:CallSearch_default,All:All_default,Static:Static_default,Transform:Transform_default,Cast:Cast_default,Numeric:Numeric_default,Contains:Contains_default,Position:Position_default,Compare:Compare_default,NodeList:NodeList_default,Length:Length_default,Cap:Cap_default,Offset:Offset_default,Flatten:Flatten_default,Concat:Concat_default,Intersect:Intersect_default,Unique:Unique_default,Reduce:Reduce_default,Filter:Filter_default,Sort:Sort_default,GroupBy:GroupBy_default,Columns:Columns_default,ExtraFields:ExtraFields_default,CallAggregate:CallAggregate_default,CallGroupBy:CallGroupBy_default,Difference:Difference_default}}});var ConcatList,ConcatList_default,init_ConcatList=__esm({"lib-browser/db/values/ConcatList.js"(){"use strict";init_define_process_env();init_shim();init_hydrate();init_db_utils();init_ListWrapper();init_lib();ConcatList=class extends ListWrapper{constructor(source_lists){var _lists$0$db,_lists$;let lists=source_lists.all().filter(list4=>list4!==null),database=(_lists$0$db=(_lists$=lists[0])==null?void 0:_lists$.db)!=null?_lists$0$db:lib_default().db_instance();lists.length===0&&lists.push(database.static_list(lang_btypes().get(source_lists.get_item_btype_id()).inner().id()));let prevs=lists.map(list4=>list4.query);super(database,{t:"Concat",prevs})}};ConcatList.rehydrate=(my_db,key)=>new ConcatList(rehydrate(my_db,key));ConcatList_default=ConcatList}});var IntersectList,IntersectList_default,init_IntersectList=__esm({"lib-browser/db/values/IntersectList.js"(){"use strict";init_define_process_env();init_shim();init_hydrate();init_db_utils();init_ListWrapper();init_lib();IntersectList=class extends ListWrapper{constructor(source_lists){var _lists$0$db,_lists$;let lists=source_lists.all().filter(list4=>list4!==null),database=(_lists$0$db=(_lists$=lists[0])==null?void 0:_lists$.db)!=null?_lists$0$db:lib_default().db_instance();lists.length===0&&lists.push(database.static_list(lang_btypes().get(source_lists.get_item_btype_id()).inner().id()));let prevs=lists.map(list4=>list4.query);super(database,{t:"Intersect",prevs})}};IntersectList.rehydrate=(my_db,key)=>new IntersectList(rehydrate(my_db,key));IntersectList_default=IntersectList}});var UniqueList,UniqueList_default,init_UniqueList=__esm({"lib-browser/db/values/UniqueList.js"(){"use strict";init_define_process_env();init_shim();init_hydrate();init_ListWrapper();UniqueList=class extends ListWrapper{constructor(source_list){let prev=source_list.query,database=source_list.db;super(database,{t:"Unique",prev})}};UniqueList.rehydrate=(my_db,key)=>new UniqueList(rehydrate(my_db,key));UniqueList_default=UniqueList}});var SortedList,SortedList_default,init_SortedList=__esm({"lib-browser/db/values/SortedList.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_hydrate();init_ListWrapper();SortedList=class extends ListWrapper{constructor(source_list,properties){let{sorts_list}=properties,prev=source_list.query,database=source_list.db;super(database,{t:"Sort",sorts_list,prev})}};SortedList.rehydrate=function(my_db,key){let{source_list,properties}=incremental_json_parse(key);return new SortedList(rehydrate(my_db,source_list),properties)};SortedList_default=SortedList}});var NodeList2,NodeList_default2,init_NodeList2=__esm({"lib-browser/db/values/NodeList.js"(){"use strict";init_define_process_env();init_shim();init_ListWrapper();NodeList2=class extends ListWrapper{constructor(dbnode){let id=dbnode.parent_id(),field=dbnode._path.join(".");super(dbnode.db,{t:"NodeList",id,field})}};NodeList2.rehydrate=(my_db,key)=>new NodeList2(my_db.get_node(key));NodeList_default2=NodeList2}});function mk_sync_run(name,fn){var _b_fiber$Fiber;on_server()&&((_b_fiber$Fiber=Fiber)==null?void 0:_b_fiber$Fiber.current)==null?SyncRun(name,fn):fn()}var import_web_dom_collections_iterator93,import_es_array_at,import_es_string_at_alternative,import_es_string_replace20,OuterStringified,VersionSource,Local,global_data_items_loaded,_warned_no_search_path_plan_type,FALSE_PLAN,TRUE_PLAN,get_admin_user_id,transform_constraint_for_db,DB,_no_user_cache,_no_user_dependency,wipe_no_user,NoUser,exports2,db_default,init_db2=__esm({"lib-browser/db/db.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator93=__toESM(require_web_dom_collections_iterator()),import_es_array_at=__toESM(require_es_array_at()),import_es_string_at_alternative=__toESM(require_es_string_at_alternative()),import_es_string_replace20=__toESM(require_es_string_replace());init_u2();init_b_fiber();init_b_array();init_async_state3();init_mode_check();init_uuid();init_logger();init_db();init_db();init_locations();init_eval();init_eval_node_state();init_special_keys();init_db_utils();init_notifier_topics();init_plan_utils();init_sample();init_lib();init_btypes();init_appquery();init_client();init_client_config2();init_locations2();init_hydrate();init_query_planner();init_loggable();init_ClientDBNode();init_plans();init_Dynamic();init_StaticNode();init_StaticObject();init_NodeBase();init_StaticList();init_TransformList();init_ConcatList();init_IntersectList();init_UniqueList();init_SortedList();init_NodeList2();init_ListWrapper();init_plan_utils();init_eval_node_state();set_lang_btypes(btypes_exports);OuterStringified={rehydrate(my_db,value){return rehydrate_tree(my_db,incremental_json_parse(value))}};VersionSource={NOTIFIER:"NOTIFIER",EXTERNAL:"EXTERNAL"},Local=class{constructor(_db,id){this.db=void 0,this.id=void 0,this.raw=void 0,this.flushed_raw=void 0,this.type=void 0,this.version=void 0,this.latest_version=void 0,this._outstanding_set_data_promise=void 0,this.latest_version_source=void 0,this.ready_key=void 0,this.dependency=void 0,this._old_keys=void 0,this._watching=void 0,this.error=void 0,this._is_loading=void 0,this.just_created=void 0,this.treat_as_changed=void 0,this.from_storage=!1,this.db=_db,this.id=id,this.ready_key=u_exports2.MakeKey(void 0,"initial data for "+this.id),this.dependency=u_exports2.Dependency(),this._old_keys=[]}is_watching(){return this._watching}flush(no_invalidate){if(this.ready_key&&this._old_keys.push(this.ready_key),this.ready_key=u_exports2.MakeKey(void 0,"reloading item after stale"),this.flushed_raw=this.raw,delete this.raw,delete this.version,!no_invalidate)return this.dependency.invalidate()}mark_ready(){this.ready_key.turn();for(let key of this._old_keys)key.turn();this._old_keys=[]}watch(){if(on_server()||!this.db.can_watch||this._watching)return;this._watching=!0;let index=`${this.db.appname}_${get_db_version(this.db.app_version)}${this.db.temp_db?"_"+this.db.temp_db:""}`;watch([NotificationTopic,index,this.id],()=>{var _ref,_this$latest_version;return(_ref=(_this$latest_version=this.latest_version)!=null?_this$latest_version:this.version)!=null?_ref:0},_ref2=>{let{stale,version:version2,message}=_ref2;stale?this.flush():version2!=null&&this.set_latest_version(version2,VersionSource.NOTIFIER)})}poll(interval,n){n>0&&setTimeout(()=>{this.db._reload(this.id),this.poll(interval,n-1)},interval)}set_latest_version(version2,version_source){var _version2,_this$latest_version2;if((_version2=version2)!=null||(version2=0),(_this$latest_version2=this.latest_version)!=null||(this.latest_version=0),version2>this.latest_version){var _this$version;this.latest_version=version2,this.latest_version_source=version_source,this.latest_version>((_this$version=this.version)!=null?_this$version:0)&&this.db._wait_for_process_updates(this.id,this.latest_version,()=>{this.db._reload(this.id)})}}dump(){let{raw,type,version:version2}=this,ready=this.ready_key.is_turned();return JSON.stringify({raw,type,version:version2,ready},null,4)}},global_data_items_loaded=0,_warned_no_search_path_plan_type=new Set,FALSE_PLAN={t:"Static",btype_id:"sys.bool",data:[!1]},TRUE_PLAN={t:"Static",btype_id:"sys.bool",data:[!0]},get_admin_user_id=function(app_info){if(app_info==null){let lib=lib_default.or_throw();app_info={appname:lib.appname(),app_version:lib.app_version(),temp_db:lib.temp_db()}}let db_version=get_db_version(app_info.app_version),key;return app_info.temp_db?key=`${app_info.temp_db}_${app_info.appname}_${db_version}`:key=`${app_info.appname}_${db_version}`,`${ADMIN_USER_ID}_${key}`},transform_constraint_for_db=function(type,constraint){return type==="user"&&constraint.key==="email"&&constraint.constraint_type==="equals"?extend({},constraint,{constraint_type:"email_equals"}):type==="user"&&constraint.key==="logged_in"?extend({},constraint,{key:"user_signed_up"}):constraint},DB=class{constructor(){this._locals=void 0,this.local_changes=void 0,this.result_cache=void 0,this._query_planner=void 0,this._search_path_cache=void 0,this.search_path=void 0,this._locals={},this.result_cache={},this.local_changes=new Set}inspect(){return this.constructor.name}query_planner(){var _this$_query_planner;return(_this$_query_planner=this._query_planner)!=null||(this._query_planner=new QueryPlanner),this._query_planner}iterate(plan,from){var _from,_plans$plan$t;(_from=from)!=null||(from=0);let with_original_eval_node=create_with_original_eval_node();if(typeof((_plans$plan$t=plans[plan.t])==null?void 0:_plans$plan$t.load)=="function")return n=>with_original_eval_node(()=>{var _from2;(_from2=from)!=null||(from=0);let to;if(n!=null)to=from+n;else{let ranges=this.get_ranges(plan,from,from+1);if(ranges===range_states.PAST_END)return null;[range_states.AVAILABLE,range_states.LOADING].includes(ranges[0].state)&&ranges[0].to>from?to=ranges[0].to:to=Math.min(from+400,Math.max(from+10,from*2))}let ret=this.execute_call_get_children(plan,from,to-from);return ret.length===0?null:(from=to,ret)});{let next=plans[plan.t].fn.call(this,plan,from);return n=>with_original_eval_node(()=>{let res=next(n);return res.length===0?null:res})}}all(plan){let ret=this.iterate(plan)(ALL_MAX);return ret!=null?ret:[]}build_search_path(plan,to){var _this$_search_path_ca,_this$_search_path_ca2,_this$_search_path_ca3,_this$_search_path_ca4;(_this$_search_path_ca=this._search_path_cache)!=null||(this._search_path_cache={});let key=JSON.stringify({plan,to});return(_this$_search_path_ca3=(_this$_search_path_ca2=this._search_path_cache)[key])!=null||(_this$_search_path_ca2[key]=this.get_current_search_path_for_plan(plan)),this._search_path_cache[key]==null&&on_client()&&!_warned_no_search_path_plan_type.has(plan.t)&&(_warned_no_search_path_plan_type.add(plan.t),warn("No search path found",{display:`No search path found for ${plan.t}`,key})),JSON.stringify((_this$_search_path_ca4=this._search_path_cache[key])!=null?_this$_search_path_ca4:null)}get_current_search_path_for_plan(plan){var _plan$metadata$serial,_plan$metadata,_eval_node_state$get_;return(_plan$metadata$serial=(_plan$metadata=plan.metadata)==null?void 0:_plan$metadata.serialized_eval_node)!=null?_plan$metadata$serial:(_eval_node_state$get_=get_current_eval_node())==null?void 0:_eval_node_state$get_.serialize()}get_plan_for_node(query,context){switch(query.t){case"All":{var _context$sorts_list;let all4={t:"CallSearch",type:query.type,constraints:[],sorts_list:(_context$sorts_list=context.sorts_list)!=null?_context$sorts_list:[]};return context.lookup&&(all4.extra={lookup:context.lookup}),all4}case"Filter":{var _prev$constraints,_context$sorts_list2;let prev=this.get_plan_for_node(query.prev,{});if(prev.t!=="CallSearch")return extend({},query,{prev});if(((_prev$constraints=prev.constraints)==null?void 0:_prev$constraints.length)>0)throw new UnexpectedError("should not have constraints",{query:query,prev:prev});let can=[],cannot=[];for(let constraint of query.constraints){let db_constraint=transform_constraint_for_db(prev.type,constraint);can_execute_in_db(prev.type,db_constraint)?can.push(db_constraint):cannot.push(constraint)}let{search:search2,leftover}=this.query_planner().pick_search(prev.type,can,(_context$sorts_list2=context.sorts_list)!=null?_context$sorts_list2:[],context.n);return cannot.push(...leftover!=null?leftover:[]),cannot.length===0?(context.lookup&&(search2.extra={lookup:context.lookup}),search2):{t:"Filter",constraints:cannot,prev:search2}}case"Sort":{let prev=this.get_plan_for_node(query.prev,{sorts_list:query.sorts_list,n:context.n,lookup:context.lookup}),call_search;return prev.t==="CallSearch"?call_search=prev:prev.t==="Filter"&&prev.prev.t==="CallSearch"&&(call_search=prev.prev),call_search?JSON.stringify(call_search.sorts_list)===JSON.stringify(query.sorts_list)?prev:extend({},query,{prev}):extend({},query,{prev})}case"Contains":{var _this$get_plan_ret_bt,_item$_type;let prev=this.get_plan_for_node(query.prev,{});if(prev.t!=="CallSearch"&&prev.t!=="Filter")return extend({},query,{prev});if(get5((_this$get_plan_ret_bt=this.get_plan_ret_btype(prev))!=null?_this$get_plan_ret_bt:"null").custom_type()==null)return extend({},query,{prev});let item=rehydrate_tree(this,query.item);if(prev.t==="CallSearch"&&prev.type!==(item==null||(_item$_type=item._type)==null?void 0:_item$_type.call(item))||!(item!=null&&item.exists()))return FALSE_PLAN;let in_db=[];for(let constraint of(_prev$constraints2=prev.constraints)!=null?_prev$constraints2:[]){var _prev$constraints2;if(prev.t==="Filter"||can_execute_in_memory(constraint)){if(!local_constrain(item,constraint,prev.type))return FALSE_PLAN}else in_db.push(constraint)}if(in_db.length===0)return prev.t==="CallSearch"?TRUE_PLAN:extend({},query,{prev});in_db.push({key:UNIQUE_ID,constraint_type:"equals",value:item._id()});let new_query={t:"Compare",op:">",n:0,prev:{t:"Length",prev:{t:"Filter",constraints:in_db,prev:{t:"All",type:prev.type}}}};return this.get_plan_for_node(new_query,{})}case"Compare":{if(query.prev.t==="Length"&&query.n===0){let prev_prev=this.get_plan_for_node(query.prev.prev,{});return{t:"Compare",prev:{t:"Length",bound:query.n+1,prev:prev_prev,options:query.prev.options},op:query.op,n:query.n}}let prev=this.get_plan_for_node(query.prev,{});return prev.t==="Length"&&(prev={t:"Length",bound:query.n+1,prev:prev.prev,options:query.prev.options}),{t:"Compare",prev,op:query.op,n:query.n}}case"GroupBy":{let prev=this.get_plan_for_node(query.prev,{n:ALL_MAX}),do_in_memory=prev2=>extend({},query,{prev:prev2});if(prev.t!=="CallSearch")return do_in_memory(prev);let stats_node=this.query_planner().get_stats(prev.type,prev.constraints);if(stats_node!=null&&stats_node.searches&&stats_node.length!=null){for(let s_node of Object.values(stats_node.searches))if(s_node.loaded>=stats_node.length)return do_in_memory(this.query_planner().node_to_search(s_node))}return{t:"CallGroupBy",aggregations:query.aggregations,groupings:query.groupings,constraints:prev.constraints,type:prev.type,metadata:query.metadata}}case"Length":case"Numeric":{var _fallback;let use_existing,field,options,can_aggregate,agg_fn,fallback,prev;if(query.t==="Length")prev=this.get_plan_for_node(query.prev,{n:ALL_MAX}),can_aggregate=prev.t==="CallSearch",fallback=prev,use_existing=s_node=>({t:"Length",prev:this.query_planner().node_to_search(s_node)}),agg_fn="count",field=void 0,options=query.options;else{let transform=query.prev;if(can_aggregate=transform.t==="Transform",transform.t==="Transform"){let message=get5(transform.btype_id).get_message(transform.message);can_aggregate=message.ret_btype_id()!=="null"&&message.is_lookup()}can_aggregate&&(prev=this.get_plan_for_node(transform.prev,{n:ALL_MAX}),can_aggregate=prev.t==="CallSearch"),use_existing=s_node=>{let new_transform=extend({},transform,{prev:this.query_planner().node_to_search(s_node)});return extend({},query,{prev:new_transform})},agg_fn=query.op,field=transform.message,options=query.options}if(can_aggregate){prev=prev;let stats_node=this.query_planner().get_stats(prev.type,prev.constraints);if(stats_node!=null&&stats_node.searches){if(stats_node.length!=null){for(let s_node of Object.values(stats_node.searches))if(!s_node.from&&!s_node.has_gaps&&s_node.loaded>=stats_node.length)return use_existing(s_node)}if(!stats_node[aggregate_started_key(agg_fn,field,options)])for(let s_node of Object.values(stats_node.searches)){var _s_node$loaded;let remaining=s_node.loading_to-((_s_node$loaded=s_node.loaded)!=null?_s_node$loaded:0);if(!s_node.from&&!s_node.has_gaps&&remaining>0&&remaining<400)return use_existing(s_node)}}return{t:"CallAggregate",type:prev.type,constraints:prev.constraints,agg_fn,field,options}}return(_fallback=fallback)!=null||(fallback=this.get_plan_for_node(query.prev,{n:ALL_MAX})),extend({},query,{prev:fallback})}case"Transform":{let lookup,message=get5(query.btype_id).get_message(query.message);message.is_lookup()&&message.ret_btype().custom_type()!=null?(lookup=[query.message],context.lookup&&(lookup=lookup.concat(context.lookup))):lookup=null;let prev=this.get_plan_for_node(query.prev,{lookup});return extend({},query,{prev})}case"ExtraFields":{var _query$extra_field_na;let prev=this.get_plan_for_node(query.prev,{});return((_query$extra_field_na=query.extra_field_names)==null?void 0:_query$extra_field_na.length)>0&&(prev.extra={lookup:query.extra_field_names}),prev}case"Columns":{let prev=this.get_plan_for_node(query.prev,{});if(prev!=null){var _btypes$get$custom_ty,_btypes$get$custom_ty2,_prev$sorts_list;let fields=new Set((_btypes$get$custom_ty=(_btypes$get$custom_ty2=get5(prev.type).custom_type())==null?void 0:_btypes$get$custom_ty2.fields().map(field=>field.name()))!=null?_btypes$get$custom_ty:[]),get_sort_column=sort=>{var _sort$sort_field;return typeof sort.sort_field=="string"?sort.sort_field:(_sort$sort_field=sort.sort_field)==null?void 0:_sort$sort_field.location_field};prev.columns=unique(["_id","_version",...((_prev$sorts_list=prev.sorts_list)!=null?_prev$sorts_list:[]).map(sort=>get_sort_column(sort)).filter(column_name=>column_name!=null&&fields.has(column_name)),...query.columns.filter(column=>fields.has(column))])}return prev}default:{let overwrite={};return query.prev&&(overwrite.prev=this.get_plan_for_node(query.prev,{})),query.prevs&&(overwrite.prevs=query.prevs.map(prev=>this.get_plan_for_node(prev,{}))),extend({},query,overwrite)}}}validate_query(query){var _plans$query$t$valida;if(!plans[query.t])throw new UnexpectedError("Unrecognized query",{query:query});if((_plans$query$t$valida=plans[query.t].validate)==null||_plans$query$t$valida.call(this,query),query.prev!=null&&this.validate_query(query.prev),query.prevs!=null){if(!Array.isArray(query.prevs))throw new UnexpectedError("Prevs must be array",{query:query});for(let prev of query.prevs)this.validate_query(prev)}}build_query_plan(query,from,n){return query=json_deep_copy(query),this.validate_query(query),query=this.simplify_query(query),this.canonicalize_query(query),this.get_plan_for_node(query,{n})}execute_query(query,from,n){let plan=this.build_query_plan(query,from,n);return this.execute_get_children(plan,from,n)}init_result_cache(plan){let cache_key=this.get_cache_key(plan);return this.result_cache[cache_key]||(this.result_cache[cache_key]={plan,ranges:[],searched_count:0,invalidated:!1}),this.result_cache[cache_key]}get_ranges(plan,from,to){if(to<=from)throw new UnexpectedError("assertion error: to must be strictly greater than from",{plan:plan,from,to});if(from<0)throw new UnexpectedError("assertion error: from must be at least 0",{plan:plan,from,to});let result_cache=this.init_result_cache(plan),{ranges}=result_cache,ret=[],current_index=from,at_end=!1;for(let range2 of ranges){if(current_index>=to)break;if(range2.to<=current_index){if(range2.state===range_states.AVAILABLE&&range2.at_end)return range_states.PAST_END;continue}if(current_index<range2.from){let range_end=Math.min(range2.from,to);ret.push({state:range_states.NOT_STARTED,from:current_index,to:range_end}),current_index=range_end}if(range2.from>=to)break;if(ret.push(range2),current_index=range2.to,range2.state===range_states.AVAILABLE&&range2.at_end){at_end=!0;break}}current_index<to&&(at_end||ret.push({state:range_states.NOT_STARTED,from:current_index,to}));let was_available=!1;for(let range2 of ret)if(range2.state===range_states.AVAILABLE){if(was_available)throw new UnexpectedError("assertion error: adjacent available ranges");was_available=!0}else was_available=!1;return ret}get_plan_ret_btype(plan){return plans[plan.t].get_ret_btype.call(this,plan)}array_to_objects(plan,array,pre_cache2){let btype_id=this.get_plan_ret_btype(plan);if((!btype_id||btype_id==="null")&&(array==null?void 0:array.length)>0&&error("null btype_id in array_to_objects",{plan:plan,btype_id:btype_id,array_length:array.length}),typeof btype_id=="object")if(btype_id!=null&&btype_id.get_message)error("Got value instead of value id",{plan:plan});else throw new UnexpectedError("Got object btype_id",{plan:plan});let wrapped_get=(id,idx)=>{if(id==null)return null;idx%10===0&&optional_pause("in wrapped_get");let obj=this.get(id);if(pre_cache2){var _obj$precache;(_obj$precache=obj.precache)==null||_obj$precache.call(obj)}return obj},wrapped_static_get=(item,idx)=>(idx%10===0&&optional_pause("in wrapped_static_get"),_static_get(item,this,btype_id));optional_pause("array_to_objects: pre");let ret;return get5(btype_id!=null?btype_id:"").custom_type()!=null?ret=array.map((id,idx)=>wrapped_get(id,idx)):ret=array.map((item,idx)=>wrapped_static_get(item,idx)),optional_pause("array_to_objects: post"),ret}array_to_ids(plan,array){let btype_id=this.get_plan_ret_btype(plan);return(!btype_id||btype_id==="null")&&(array==null?void 0:array.length)>0&&error("null btype_id in array_to_ids",{plan:plan,btype_id,array_length:array.length}),array_to_ids(btype_id,array)}get_cache_key(plan){return plan.extra!=null&&(plan=json_deep_copy(plan),delete plan.extra),JSON.stringify(plan)}execute_get_children(plan,from,n){var _next;let context={plan,from,n};if(n<=0)throw new UnexpectedError("must request at least 1 result",{context:context});if(from<0)throw new UnexpectedError("cannot call negative from",{context:context});return(_next=this.iterate(plan,from)(n))!=null?_next:[]}execute_call_get_children(plan,from,n,situation){let to=from+n,ranges=this.get_ranges(plan,from,to);if(ranges===range_states.PAST_END)return this.register_call_dependency(plan),[];if(ranges.length===1&&ranges[0].state===range_states.AVAILABLE){let start3=from-ranges[0].from,end2=start3+n;return this.register_call_dependency(plan),ranges[0].results.slice(start3,end2)}if(ranges[0].state===range_states.OFFLINE)return this.register_call_dependency(plan),[];let loading_keys=[],to_load=[];for(let range2 of ranges)switch(range2.state){case range_states.LOADING:loading_keys.push(range2.loading_key);break;case range_states.AVAILABLE:break;case range_states.ERROR:throw range2.err;case range_states.NOT_STARTED:to_load.push(range2);break;default:throw new UnexpectedError("Unrecognized range state: "+JSON.stringify(range2))}if(to_load.length>0){var _async_state$CurrentN;if(((_async_state$CurrentN=async_state_default3.CurrentNotReadyCatcher)==null?void 0:_async_state$CurrentN.length)>0)return[];for(let range2 of to_load)loading_keys.push(this.load_get_children(plan,range2.from,range2.to-range2.from))}let loading_key=u_exports2.TransientKeyList(loading_keys);if(loading_key.is_turned())return this.execute_call_get_children(plan,from,n,situation);if(u_exports2.ensure_ready(loading_key),on_client())return[];throw new RetryError}add_loading_range(plan,from,n,loading_key){let to=from+n,result_cache=this.init_result_cache(plan),{ranges}=result_cache,idx,from_id;for(idx=0;idx<ranges.length;idx++){let range2=ranges[idx];if(range2.from>=to)break;if(range2.from>from)throw new UnexpectedError("adding overlapping range",{plan:plan,from,n,existing_ranges:ranges})}ranges[idx-1]&&ranges[idx-1].state===range_states.AVAILABLE&&ranges[idx-1].to===from&&(from_id=ranges[idx-1].results.slice(-1)[0]);let new_range={state:range_states.LOADING,from_id,from,to,loading_key,result_cache};return ranges.splice(idx,0,new_range),new_range}invalidate_plan(cache_key){let result_cache=this.result_cache[cache_key];result_cache&&(result_cache.invalidated=!0,result_cache.ranges=[],this.invalidate_call_dependency(cache_key))}get_plan_version(cache_key){let min_version=null;for(let range2 of(_this$result_cache$ca=(_this$result_cache$ca2=this.result_cache[cache_key])==null?void 0:_this$result_cache$ca2.ranges)!=null?_this$result_cache$ca:[]){var _this$result_cache$ca,_this$result_cache$ca2;range2.search_version!=null&&(min_version==null||range2.search_version<min_version)&&(min_version=range2.search_version)}return min_version}handle_results(plan,target_range,err,res){let cache_key=this.get_cache_key(plan);if(this.init_result_cache(plan),target_range.state!==range_states.LOADING&&err)throw error("Got an error for a non-loading range, throwing error",{plan:plan,state:target_range.state}),err;if(target_range.state!==range_states.LOADING)throw new UnexpectedError("assertion error: handle_results called on a non-loading range",{plan:plan,range_state:target_range.state});if(target_range.loading_key.turn(),delete target_range.loading_key,err instanceof OfflineError){var _Lib2;target_range.state=range_states.OFFLINE,(_Lib2=lib_default())==null||_Lib2.location.once_online(()=>{this.invalidate_plan(cache_key)});return}if(err)target_range.state=range_states.ERROR,target_range.err=err,this.schedule_discard_errors(plan);else{plans[plan.t].initialize_range.call(this,plan,target_range,res),target_range.state=range_states.AVAILABLE;for(let id of this.local_changes){let local=this._local(id);plans[plan.t].local_change.call(this,plan,target_range,id,local.type,DONT_KNOW,local.raw)}let new_ranges=[],last_available=null;for(let range2 of Array.from([]).concat(this.result_cache[cache_key].ranges))range2.state===range_states.AVAILABLE?last_available&&last_available.to===range2.from?plans[plan.t].merge_ranges.call(this,plan,last_available,range2):(last_available=range2,new_ranges.push(range2)):(last_available=null,new_ranges.push(range2));new_ranges=new_ranges.filter(range2=>range2.state!==range_states.DELETED),this.result_cache[cache_key].ranges=new_ranges}}delete_range(plan,range2){let cache_key=this.get_cache_key(plan);array_remove(this.result_cache[cache_key].ranges,range2),range2.state=range_states.DELETED}load_get_children(plan,from,n){var _plans$plan$t2;if(typeof((_plans$plan$t2=plans[plan.t])==null?void 0:_plans$plan$t2.load)!="function")throw new UnexpectedError("no load function for "+plan.t);let loading_key=u_exports2.MakeKey(void 0,JSON.stringify({plan,from,n})),result_cache=this.init_result_cache(plan),situation=this.get_search_situation(result_cache);result_cache.invalidated=!1,result_cache.searched_count+=1;let new_range=this.add_loading_range(plan,from,n,loading_key);return plans[plan.t].load.call(this,{plan,from,n,from_id:new_range.from_id,situation},this.handle_results.bind(this,plan,new_range)),loading_key}get_search_situation(result_cache){return result_cache.invalidated?SearchSituation.Invalidation:result_cache.searched_count===0?SearchSituation.InitialSearch:SearchSituation.Unknown}canonicalize_query(query){if(plans[query.t].canonicalize&&plans[query.t].canonicalize(query),query.prev&&this.canonicalize_query(query.prev),query.prevs)for(let prev of query.prevs)this.canonicalize_query(prev);return null}simplify_query(query,context){var _context;(_context=context)!=null||(context={});let new_context={};for(let[k,v]of Object.entries(context)){var _plans$query$t$preser;(_plans$query$t$preser=plans[query.t].preserves_context)!=null&&_plans$query$t$preser[k]&&(new_context[k]=v)}if(plans[query.t].adds_context)for(let[k,v]of Object.entries(plans[query.t].adds_context))new_context[k]=v;for(query.prev&&(query=extend({},query,{prev:this.simplify_query(query.prev,new_context)})),query.prevs&&(query=extend({},query,{prevs:query.prevs.map(prev=>this.simplify_query(prev,new_context))}));;){var _plans$query$t$simpli,_query$prev;if(!plans[query.t])throw new UnexpectedError("Unrecognized query type",{query:query});let simplified=(_plans$query$t$simpli=plans[query.t].simplify)==null?void 0:_plans$query$t$simpli.call(this,query,context);if(simplified){query=simplified;continue}if(((_query$prev=query.prev)==null?void 0:_query$prev.t)==="Sort"&&plans[query.t].sort_neutral){var _plans$new_prev$t$sim;let sort_prev=query.prev.prev,new_prev=extend({},query,{prev:sort_prev});simplified=(_plans$new_prev$t$sim=plans[new_prev.t].simplify)==null?void 0:_plans$new_prev$t$sim.call(this,new_prev,context),simplified&&(new_prev=simplified),query=extend({},query.prev,{prev:new_prev});continue}return query}}get_node(key){let[id,...path]=key.split("."),parent=this.get_object(id);return new this.DBNODE(parent,path,this)}get_object(id){return new this.DBOBJECT(id,this)}_local(id){var _this$_locals,_this$_locals$id;return(_this$_locals$id=(_this$_locals=this._locals)[id])!=null||(_this$_locals[id]=new Local(this,id)),this._locals[id]}_has_local(id){return this._local(id).raw!==void 0}is_watching(id){return this._locals[id]!=null&&this._local(id).is_watching()}flush(id){this._local(id).flush(),this._reload(id)}_get_data(id){if(id===NO_USER)return new NoUser().raw();let local=this._local(id);if(local.error)throw local.error;return local.raw?local.raw:null}_get_ready_key(id){return[NO_USER,"constructor"].includes(id)?u_exports2.FakeKey():this._local(id).ready_key}_ensure_loading(id){id!==NO_USER&&(!this._has_local(id)||this._local(id).from_storage)&&this._reload(id)}_wait_for_process_updates(id,version2,cb){version2==="local"||!this._get_ready_key(id).is_turned()||on_server()?cb():lib_default.or_throw().workflow.wait_for_server(cb)}_reload(id,clear_cache){var _this$_local$latest_v;if(id===NO_USER)return;let local=this._local(id);if(local.from_storage=!1,local._is_loading)return;local._is_loading=!0;let latest_version=(_this$_local$latest_v=this._local(id).latest_version)!=null?_this$_local$latest_v:0;!is_UUID(id)&&(id==null?void 0:id.length)>100&&info("trying to load non-uuid thing",{id}),this.elasticsearch("get",{id,appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),clear_cache},(err,res)=>{if(local._is_loading=!1,this._handle_get_response(id,err,res),(res==null?void 0:res._version)!=null&&res._version<latest_version)return client_config_default2.offline&&res._type==="user"&&res._source.bubble_employee_boolean?void 0:(error("Got an out of date version in _reload",{id,latest_version,version:res._version}),this._reload(id,!0))})}_handle_get_response(id,err,res){if(err!=null){this._set_error(id,err);return}let{_version,found,_source,_type}=res;if(found)this._set_data(id,_source,_type,_version);else{var _this$_local$latest_v2;this._set_data(id,null,null,(_this$_local$latest_v2=this._local(id).latest_version)!=null?_this$_local$latest_v2:0)}}_register_dependency(id){id===NO_USER&&new NoUser().register_dependency(),this._local(id).dependency.register()}_set_local(id,path,value){this._ensure_loading(id),u_exports2.WaitFor(this._get_ready_key(id),()=>{var _this$_get_data;let new_data=json_deep_copy((_this$_get_data=this._get_data(id))!=null?_this$_get_data:{});if(path){let to_change=new_data;for(let[i,p]of path.entries())if(i===path.length-1)to_change[p]=value;else{var _to_change,_to_change$p;(_to_change$p=(_to_change=to_change)[p])!=null||(_to_change[p]={}),to_change=to_change[p]}}else extend(new_data,value);this._set_data(id,new_data,null,"local")})}_delete_local(id){return this._set_data(id,null,null,"local")}_create_local(id,type){return this._set_data(id,{},type,"local")}_get_type(id){return id===NO_USER?"user":this._local(id).type}ensure_object_updates(object_updates){let count2=0;for(let id in object_updates){let version2=object_updates[id];count2++,count2%10===0&&optional_pause();let local=this._local(id),was_turned;local.ready_key.is_turned()&&(version2==="clear"||version2>local.version)?(local.ready_key=u_exports2.MakeKey(30,"data ensure_object_updates loaded for "+id),was_turned=!0):was_turned=!1,version2==="clear"?was_turned&&(local.flushed_raw=local.raw,delete local.raw,delete local.version,this._reload(id)):local.set_latest_version(version2,VersionSource.EXTERNAL)}}_set_error(id,error2){let local=this._local(id);local.error=error2,local.mark_ready()}_set_data(id,data,type,version2){let from_storage=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,promise=u_exports2.Promise(null,"db._set_data "+id);return id===NO_USER?(new NoUser()._write(data),promise.resolve(),promise):(version2!=="local"&&global_data_items_loaded++,this._wait_for_process_updates(id,version2,()=>{mk_sync_run("db_set_data",()=>{var _local$version;let local=this._local(id);if(local.from_storage=from_storage,!(version2==="local"||version2>((_local$version=local.version)!=null?_local$version:-1)))promise.resolve();else{var _local$raw,_local$_outstanding_s2;if(local.latest_version>version2){var _local$_outstanding_s;this._reload(id),(_local$_outstanding_s=local._outstanding_set_data_promise)==null||_local$_outstanding_s.resolve(promise),local._outstanding_set_data_promise=promise;return}if(version2==="local"&&type!=null&&(local.just_created=!0),local.just_created&&version2!=="local")if(data===null){promise.resolve();return}else local.just_created=!1;version2==="local"?this.local_changes.add(id):(local.version=version2,this.local_changes.delete(id));let old_data=(_local$raw=local.raw)!=null?_local$raw:local.flushed_raw;delete local.flushed_raw,local.raw=data,type!=null&&(local.type=type),(local.type||local.raw===null)&&(local.error=null,local.mark_ready(),this.local_item_updated(id,local.raw,local.type,version2)),local.dependency.invalidate(),local.watch(),(_local$_outstanding_s2=local._outstanding_set_data_promise)==null||_local$_outstanding_s2.resolve(),promise.resolve(),(old_data!=null||version2==="local"||local.latest_version_source===VersionSource.EXTERNAL)&&(local.treat_as_changed=!1,this.publish_change(id,type!=null?type:local.type,old_data,data))}})}),promise)}publish_change(id,type,old_raw,new_raw){for(let cache_key in this.result_cache){let result_cache=this.result_cache[cache_key],{plan}=result_cache,invalidate=!1;for(let range2 of Array.from([]).concat(result_cache.ranges))if(range2.state===range_states.AVAILABLE){let ret=plans[plan.t].local_change.call(this,plan,range2,id,type,old_raw,new_raw);if(ret===DONT_KNOW){let watch_search_call=plans[plan.t].watch_search_call.call(this,plan);this.notify_maybe_invalid(watch_search_call,!0)}else ret&&(invalidate=!0)}invalidate&&this.invalidate_call_dependency(cache_key)}}cur_temp_db(){if(this.temp_db)return get_temp_db(this.temp_db,this.get_appname())}lookup_user(key,value){let constraints=[{key,constraint_type:"equals",value}];return this.find("user",constraints).get_children(0,1)[0]}find(type,constraints,sorts_list,search_path){var _constraints;constraints=dehydrate_tree(constraints),type==="user"&&(constraints=constraints.concat([{key:"user_signed_up",constraint_type:"equals",value:!0},{key:"_id",constraint_type:"not equal",value:this.get_admin_user_id()},{key:"_id",constraint_type:"not equal",value:get_admin_user_id({appname:this.appname,app_version:LIVE_VERSION})},{key:"_id",constraint_type:"not equal",value:get_admin_user_id({appname:this.appname,app_version:TEST_VERSION})},{key:"_id",constraint_type:"not equal",value:ADMIN_USER_ID}]));let query={t:"All",type};((_constraints=constraints)==null?void 0:_constraints.length)>0&&(query={t:"Filter",constraints,prev:query}),(sorts_list==null?void 0:sorts_list.length)>0&&(query={t:"Sort",sorts_list,prev:query});let list_wrapper=new ListWrapper(this,query);return search_path&&!get_current_eval_node()&&(list_wrapper._creation_eval_node={serialize(){return search_path}}),list_wrapper}static_list(btype_id,array){var _array;if(!btype_id)throw new UnexpectedError("Value id is required",{btype_id});if((_array=array)!=null||(array=[]),!Array.isArray(array))throw new UnexpectedError("Bad array",{array_type:typeof array,array_str:String(array),btype_id:btype_id});let array_of_ids=array_to_ids(btype_id,array);return this.static_list_from_ids(btype_id,array_of_ids)}static_list_from_ids(btype_id,array){var _array2;if(!btype_id)throw new UnexpectedError("Value id is required",{btype_id});if((_array2=array)!=null||(array=[]),!Array.isArray(array))throw new UnexpectedError("Bad array",{array_type:typeof array,array_str:String(array),btype_id:btype_id});let query={t:"Static",data:array,btype_id};return new ListWrapper(this,query)}retrieve(type,keys2){let constraints=[];for(let key in keys2){let value=keys2[key];if(value==null)throw new UnexpectedError("retrieve: value cannot be null for key "+key);constraints.push({key,value,constraint_type:"equals"})}let search2=this.find(type,constraints),retries2=5;for(;search2.get_children(0,1)[0]==null;){if(retries2-=1,retries2===0)throw new UnexpectedError("Retrieve failed for "+type,{keys:keys2});pause(1e3,"db retrieve attempt cooldown")}return search2.get_children(0,1)[0]}get_admin_user_id(){let tdb=this.cur_temp_db();return get_admin_user_id({appname:this.appname,app_version:this.app_version,temp_db:tdb})}id(){return this.appname+"_"+this.app_version+(this.temp_db?"_"+this.temp_db:"")}get_new_object_data(type,id){let user_id;return type==="user"?user_id=id:user_id=lib_default.or_throw().current_user()._id(),{"Created By":HYDRATE_STRING+String(user_id),"Created Date":timestamp(),"Modified Date":timestamp()}}create(type,initial_data,id){var _initial_data,_id;if((_initial_data=initial_data)!=null||(initial_data={}),id&&on_server()&&this.get(id).exists())throw new UnexpectedError("cannot create object, id already exists",{id:()=>id,type,initial_data:initial_data});(_id=id)!=null||(id=UUID());let node=this.get_object(id),data=this.get_new_object_data(type,id);return extend(data,initial_data),this._create_local(id,type),node.set(data,{is_insert:!0}),node}get(id){if(!id||typeof id!="string")throw new UnexpectedError("bad id: must be a string",{id_type:typeof id,id_as_string:String(id)});return id===NO_USER?new NoUser:id.indexOf("sample:")===0?new SampleObject(id.replace("sample:","")):this.get_object(id)}},_no_user_cache=null,_no_user_dependency=null,wipe_no_user=function(){if(on_server())delete Fiber.current.NoUserObject;else{var _u$session_storage;_no_user_cache=null,(_u$session_storage=session_storage)==null||_u$session_storage.removeItem("NoUserObject")}},NoUser=class{constructor(){var _no_user_dependency2;this.ready_key=void 0,this.dependency=void 0,this.ready_key=u_exports2.FakeKey(),(_no_user_dependency2=_no_user_dependency)!=null||(_no_user_dependency=u_exports2.Dependency()),this.dependency=_no_user_dependency}key(){return NO_USER}get(){return this}set(){}child(name){return new ClientDBNode(this,[name],lib_default.or_throw().db_instance())}_child(path){return new ClientDBNode(this,path,lib_default.or_throw().db_instance())}dehydrate(){return HYDRATE_STRING+NO_USER}_id(){return NO_USER}_type(){return"user"}is_equal_to(x){var _x$dehydrate;return(x==null||(_x$dehydrate=x.dehydrate)==null?void 0:_x$dehydrate.call(x))===this.dehydrate()}precache(){}exists(){return!1}ignore_privacy(){return this}get_email(){return null}is_logged_in(){return!1}raw(){var _u$session_storage$ge,_u$session_storage2;function get_raw_with_defaults(){let initial_values={};if(!lib_default.or_throw().is_edit_mode()){var _custom_type$fields;let iterable=(_custom_type$fields=appquery_default.custom_type("user").fields())!=null?_custom_type$fields:[];for(let n=0;n<iterable.length;n++){let field=iterable[n];!field.deleted()&&field.default_val()!=null&&(initial_values[field.name()]=field.default_val())}}return initial_values["Created Date"]=timestamp(),initial_values["Modified Date"]=timestamp(),initial_values}if(on_server()){var _b_fiber$Fiber$curren,_b_fiber$Fiber2,_b_fiber$Fiber2$curre;return(_b_fiber$Fiber$curren=(_b_fiber$Fiber2=Fiber)==null||(_b_fiber$Fiber2$curre=_b_fiber$Fiber2.current)==null?void 0:_b_fiber$Fiber2$curre.NoUserObject)!=null?_b_fiber$Fiber$curren:get_raw_with_defaults()}return _no_user_cache!=null?_no_user_cache:json_parse((_u$session_storage$ge=(_u$session_storage2=session_storage)==null?void 0:_u$session_storage2.getItem("NoUserObject"))!=null?_u$session_storage$ge:json_stringify(get_raw_with_defaults()))}raw_shallow(){return this.raw()}_write(new_raw){var _b_fiber$Fiber3,_no_user_dependency3;on_server()&&((_b_fiber$Fiber3=Fiber)==null?void 0:_b_fiber$Fiber3.current)!=null&&(Fiber.current.NoUserObject=new_raw);try{session_storage.setItem("NoUserObject",JSON.stringify(new_raw))}catch{var _u$session_storage3;_no_user_cache=new_raw,(_u$session_storage3=session_storage)==null||_u$session_storage3.removeItem("NoUserObject")}return(_no_user_dependency3=_no_user_dependency)==null?void 0:_no_user_dependency3.invalidate()}register_dependency(){var _no_user_dependency4;(_no_user_dependency4=_no_user_dependency)!=null||(_no_user_dependency=u_exports2.Dependency()),_no_user_dependency.register()}},exports2={Dynamic:Dynamic_default,StaticNode,StaticObject,NodeBase,StaticList:StaticList_default,TransformList:TransformList_default,ConcatList:ConcatList_default,IntersectList:IntersectList_default,UniqueList:UniqueList_default,SortedList:SortedList_default,NodeList:NodeList_default2,ListWrapper,OuterStringified,NoUser,DB};register_db(exports2);db_default=exports2}});var ClientDBObject,ClientDBObject_default,init_ClientDBObject=__esm({"lib-browser/db/values/ClientDBObject.js"(){"use strict";init_define_process_env();init_shim();init_db2();init_db_utils();init_ClientDBNode();ClientDBObject=class _ClientDBObject extends ClientDBNode{constructor(id,db3){super(void 0,void 0,db3),this.id=id}ignore_privacy(){return this}delete(){this.db._delete_local(this.id)}is_equal_to(other_object){return!(other_object instanceof _ClientDBObject)||this.db!==other_object.db?!1:this.id===other_object.id}};(function(){for(let k in ObjectBase){let v=ObjectBase[k];ClientDBObject.prototype[k]=v}})();ClientDBObject_default=db_default.ClientDBObject=ClientDBObject}});function isBytes(a){return a instanceof Uint8Array||a!=null&&typeof a=="object"&&a.constructor.name==="Uint8Array"}function bytes(b,...lengths){if(!isBytes(b))throw new Error("Uint8Array expected");if(lengths.length>0&&!lengths.includes(b.length))throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`)}function exists(instance4,checkFinished=!0){if(instance4.destroyed)throw new Error("Hash instance has been destroyed");if(checkFinished&&instance4.finished)throw new Error("Hash#digest() has already been called")}function output(out,instance4){bytes(out);let min=instance4.outputLen;if(out.length<min)throw new Error(`digestInto() expects output buffer of length at least ${min}`)}var init_assert=__esm({"node_modules/@noble/ciphers/esm/_assert.js"(){init_define_process_env();init_shim()}});function utf8ToBytes(str){if(typeof str!="string")throw new Error(`string expected, got ${typeof str}`);return new Uint8Array(new TextEncoder().encode(str))}function toBytes(data){if(typeof data=="string")data=utf8ToBytes(data);else if(isBytes(data))data=data.slice();else throw new Error(`Uint8Array expected, got ${typeof data}`);return data}function equalBytes(a,b){if(a.length!==b.length)return!1;let diff=0;for(let i=0;i<a.length;i++)diff|=a[i]^b[i];return diff===0}function setBigUint64(view,byteOffset,value,isLE3){if(typeof view.setBigUint64=="function")return view.setBigUint64(byteOffset,value,isLE3);let _32n=BigInt(32),_u32_max=BigInt(4294967295),wh=Number(value>>_32n&_u32_max),wl=Number(value&_u32_max),h=isLE3?4:0,l=isLE3?0:4;view.setUint32(byteOffset+h,wh,isLE3),view.setUint32(byteOffset+l,wl,isLE3)}var u8,u32,createView,isLE,wrapCipher,init_utils=__esm({"node_modules/@noble/ciphers/esm/utils.js"(){init_define_process_env();init_shim();init_assert();u8=arr=>new Uint8Array(arr.buffer,arr.byteOffset,arr.byteLength),u32=arr=>new Uint32Array(arr.buffer,arr.byteOffset,Math.floor(arr.byteLength/4)),createView=arr=>new DataView(arr.buffer,arr.byteOffset,arr.byteLength),isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");wrapCipher=(params,c)=>(Object.assign(c,params),c)}});function _toGHASHKey(k){k.reverse();let hiBit=k[15]&1,carry=0;for(let i=0;i<k.length;i++){let t=k[i];k[i]=t>>>1|carry,carry=(t&1)<<7}return k[0]^=-hiBit&225,k}function wrapConstructorWithKey(hashCons){let hashC=(msg,key)=>hashCons(key,msg.length).update(toBytes(msg)).digest(),tmp=hashCons(new Uint8Array(16),0);return hashC.outputLen=tmp.outputLen,hashC.blockLen=tmp.blockLen,hashC.create=(key,expectedLength)=>hashCons(key,expectedLength),hashC}var BLOCK_SIZE,ZEROS16,ZEROS32,POLY,mul2,swapLE,estimateWindow,GHASH,Polyval,ghash,polyval,init_polyval=__esm({"node_modules/@noble/ciphers/esm/_polyval.js"(){init_define_process_env();init_shim();init_utils();init_assert();BLOCK_SIZE=16,ZEROS16=new Uint8Array(16),ZEROS32=u32(ZEROS16),POLY=225,mul2=(s0,s1,s2,s3)=>{let hiBit=s3&1;return{s3:s2<<31|s3>>>1,s2:s1<<31|s2>>>1,s1:s0<<31|s1>>>1,s0:s0>>>1^POLY<<24&-(hiBit&1)}},swapLE=n=>(n>>>0&255)<<24|(n>>>8&255)<<16|(n>>>16&255)<<8|n>>>24&255|0;estimateWindow=bytes3=>bytes3>64*1024?8:bytes3>1024?4:2,GHASH=class{constructor(key,expectedLength){this.blockLen=BLOCK_SIZE,this.outputLen=BLOCK_SIZE,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,key=toBytes(key),bytes(key,16);let kView=createView(key),k0=kView.getUint32(0,!1),k1=kView.getUint32(4,!1),k2=kView.getUint32(8,!1),k3=kView.getUint32(12,!1),doubles=[];for(let i=0;i<128;i++)doubles.push({s0:swapLE(k0),s1:swapLE(k1),s2:swapLE(k2),s3:swapLE(k3)}),{s0:k0,s1:k1,s2:k2,s3:k3}=mul2(k0,k1,k2,k3);let W=estimateWindow(expectedLength||1024);if(![1,2,4,8].includes(W))throw new Error(`ghash: wrong window size=${W}, should be 2, 4 or 8`);this.W=W;let windows=128/W,windowSize=this.windowSize=2**W,items=[];for(let w=0;w<windows;w++)for(let byte=0;byte<windowSize;byte++){let s0=0,s1=0,s2=0,s3=0;for(let j2=0;j2<W;j2++){if(!(byte>>>W-j2-1&1))continue;let{s0:d0,s1:d1,s2:d2,s3:d3}=doubles[W*w+j2];s0^=d0,s1^=d1,s2^=d2,s3^=d3}items.push({s0,s1,s2,s3})}this.t=items}_updateBlock(s0,s1,s2,s3){s0^=this.s0,s1^=this.s1,s2^=this.s2,s3^=this.s3;let{W,t,windowSize}=this,o0=0,o1=0,o2=0,o3=0,mask=(1<<W)-1,w=0;for(let num of[s0,s1,s2,s3])for(let bytePos=0;bytePos<4;bytePos++){let byte=num>>>8*bytePos&255;for(let bitPos=8/W-1;bitPos>=0;bitPos--){let bit=byte>>>W*bitPos&mask,{s0:e0,s1:e1,s2:e2,s3:e3}=t[w*windowSize+bit];o0^=e0,o1^=e1,o2^=e2,o3^=e3,w+=1}}this.s0=o0,this.s1=o1,this.s2=o2,this.s3=o3}update(data){data=toBytes(data),exists(this);let b32=u32(data),blocks=Math.floor(data.length/BLOCK_SIZE),left2=data.length%BLOCK_SIZE;for(let i=0;i<blocks;i++)this._updateBlock(b32[i*4+0],b32[i*4+1],b32[i*4+2],b32[i*4+3]);return left2&&(ZEROS16.set(data.subarray(blocks*BLOCK_SIZE)),this._updateBlock(ZEROS32[0],ZEROS32[1],ZEROS32[2],ZEROS32[3]),ZEROS32.fill(0)),this}destroy(){let{t}=this;for(let elm of t)elm.s0=0,elm.s1=0,elm.s2=0,elm.s3=0}digestInto(out){exists(this),output(out,this),this.finished=!0;let{s0,s1,s2,s3}=this,o32=u32(out);return o32[0]=s0,o32[1]=s1,o32[2]=s2,o32[3]=s3,out}digest(){let res=new Uint8Array(BLOCK_SIZE);return this.digestInto(res),this.destroy(),res}},Polyval=class extends GHASH{constructor(key,expectedLength){key=toBytes(key);let ghKey=_toGHASHKey(key.slice());super(ghKey,expectedLength),ghKey.fill(0)}update(data){data=toBytes(data),exists(this);let b32=u32(data),left2=data.length%BLOCK_SIZE,blocks=Math.floor(data.length/BLOCK_SIZE);for(let i=0;i<blocks;i++)this._updateBlock(swapLE(b32[i*4+3]),swapLE(b32[i*4+2]),swapLE(b32[i*4+1]),swapLE(b32[i*4+0]));return left2&&(ZEROS16.set(data.subarray(blocks*BLOCK_SIZE)),this._updateBlock(swapLE(ZEROS32[3]),swapLE(ZEROS32[2]),swapLE(ZEROS32[1]),swapLE(ZEROS32[0])),ZEROS32.fill(0)),this}digestInto(out){exists(this),output(out,this),this.finished=!0;let{s0,s1,s2,s3}=this,o32=u32(out);return o32[0]=s0,o32[1]=s1,o32[2]=s2,o32[3]=s3,out.reverse()}};ghash=wrapConstructorWithKey((key,expectedLength)=>new GHASH(key,expectedLength)),polyval=wrapConstructorWithKey((key,expectedLength)=>new Polyval(key,expectedLength))}});function mul22(n){return n<<1^POLY2&-(n>>7)}function mul(a,b){let res=0;for(;b>0;b>>=1)res^=a&-(b&1),a=mul22(a);return res}function genTtable(sbox2,fn){if(sbox2.length!==256)throw new Error("Wrong sbox length");let T0=new Uint32Array(256).map((_,j2)=>fn(sbox2[j2])),T1=T0.map(rotl32_8),T2=T1.map(rotl32_8),T3=T2.map(rotl32_8),T01=new Uint32Array(256*256),T23=new Uint32Array(256*256),sbox22=new Uint16Array(256*256);for(let i=0;i<256;i++)for(let j2=0;j2<256;j2++){let idx=i*256+j2;T01[idx]=T0[i]^T1[j2],T23[idx]=T2[i]^T3[j2],sbox22[idx]=sbox2[i]<<8|sbox2[j2]}return{sbox:sbox2,sbox2:sbox22,T0,T1,T2,T3,T01,T23}}function expandKeyLE(key){bytes(key);let len=key.length;if(![16,24,32].includes(len))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${len}`);let{sbox2}=tableEncoding,k32=u32(key),Nk=k32.length,subByte=n=>applySbox(sbox2,n,n,n,n),xk=new Uint32Array(len+28);xk.set(k32);for(let i=Nk;i<xk.length;i++){let t=xk[i-1];i%Nk===0?t=subByte(rotr32_8(t))^xPowers[i/Nk-1]:Nk>6&&i%Nk===4&&(t=subByte(t)),xk[i]=xk[i-Nk]^t}return xk}function expandKeyDecLE(key){let encKey=expandKeyLE(key),xk=encKey.slice(),Nk=encKey.length,{sbox2}=tableEncoding,{T0,T1,T2,T3}=tableDecoding;for(let i=0;i<Nk;i+=4)for(let j2=0;j2<4;j2++)xk[i+j2]=encKey[Nk-i-4+j2];encKey.fill(0);for(let i=4;i<Nk-4;i++){let x=xk[i],w=applySbox(sbox2,x,x,x,x);xk[i]=T0[w&255]^T1[w>>>8&255]^T2[w>>>16&255]^T3[w>>>24]}return xk}function apply0123(T01,T23,s0,s1,s2,s3){return T01[s0<<8&65280|s1>>>8&255]^T23[s2>>>8&65280|s3>>>24&255]}function applySbox(sbox2,s0,s1,s2,s3){return sbox2[s0&255|s1&65280]|sbox2[s2>>>16&255|s3>>>16&65280]<<16}function encrypt(xk,s0,s1,s2,s3){let{sbox2,T01,T23}=tableEncoding,k=0;s0^=xk[k++],s1^=xk[k++],s2^=xk[k++],s3^=xk[k++];let rounds=xk.length/4-2;for(let i=0;i<rounds;i++){let t02=xk[k++]^apply0123(T01,T23,s0,s1,s2,s3),t12=xk[k++]^apply0123(T01,T23,s1,s2,s3,s0),t22=xk[k++]^apply0123(T01,T23,s2,s3,s0,s1),t32=xk[k++]^apply0123(T01,T23,s3,s0,s1,s2);s0=t02,s1=t12,s2=t22,s3=t32}let t0=xk[k++]^applySbox(sbox2,s0,s1,s2,s3),t1=xk[k++]^applySbox(sbox2,s1,s2,s3,s0),t2=xk[k++]^applySbox(sbox2,s2,s3,s0,s1),t3=xk[k++]^applySbox(sbox2,s3,s0,s1,s2);return{s0:t0,s1:t1,s2:t2,s3:t3}}function decrypt(xk,s0,s1,s2,s3){let{sbox2,T01,T23}=tableDecoding,k=0;s0^=xk[k++],s1^=xk[k++],s2^=xk[k++],s3^=xk[k++];let rounds=xk.length/4-2;for(let i=0;i<rounds;i++){let t02=xk[k++]^apply0123(T01,T23,s0,s3,s2,s1),t12=xk[k++]^apply0123(T01,T23,s1,s0,s3,s2),t22=xk[k++]^apply0123(T01,T23,s2,s1,s0,s3),t32=xk[k++]^apply0123(T01,T23,s3,s2,s1,s0);s0=t02,s1=t12,s2=t22,s3=t32}let t0=xk[k++]^applySbox(sbox2,s0,s3,s2,s1),t1=xk[k++]^applySbox(sbox2,s1,s0,s3,s2),t2=xk[k++]^applySbox(sbox2,s2,s1,s0,s3),t3=xk[k++]^applySbox(sbox2,s3,s2,s1,s0);return{s0:t0,s1:t1,s2:t2,s3:t3}}function getDst(len,dst){if(!dst)return new Uint8Array(len);if(bytes(dst),dst.length<len)throw new Error(`aes: wrong destination length, expected at least ${len}, got: ${dst.length}`);return dst}function ctrCounter(xk,nonce,src,dst){bytes(nonce,BLOCK_SIZE2),bytes(src);let srcLen=src.length;dst=getDst(srcLen,dst);let ctr3=nonce,c32=u32(ctr3),{s0,s1,s2,s3}=encrypt(xk,c32[0],c32[1],c32[2],c32[3]),src32=u32(src),dst32=u32(dst);for(let i=0;i+4<=src32.length;i+=4){dst32[i+0]=src32[i+0]^s0,dst32[i+1]=src32[i+1]^s1,dst32[i+2]=src32[i+2]^s2,dst32[i+3]=src32[i+3]^s3;let carry=1;for(let i2=ctr3.length-1;i2>=0;i2--)carry=carry+(ctr3[i2]&255)|0,ctr3[i2]=carry&255,carry>>>=8;({s0,s1,s2,s3}=encrypt(xk,c32[0],c32[1],c32[2],c32[3]))}let start3=BLOCK_SIZE2*Math.floor(src32.length/BLOCK_SIZE32);if(start3<srcLen){let b32=new Uint32Array([s0,s1,s2,s3]),buf=u8(b32);for(let i=start3,pos=0;i<srcLen;i++,pos++)dst[i]=src[i]^buf[pos]}return dst}function ctr32(xk,isLE3,nonce,src,dst){bytes(nonce,BLOCK_SIZE2),bytes(src),dst=getDst(src.length,dst);let ctr3=nonce,c32=u32(ctr3),view=createView(ctr3),src32=u32(src),dst32=u32(dst),ctrPos=isLE3?0:12,srcLen=src.length,ctrNum=view.getUint32(ctrPos,isLE3),{s0,s1,s2,s3}=encrypt(xk,c32[0],c32[1],c32[2],c32[3]);for(let i=0;i+4<=src32.length;i+=4)dst32[i+0]=src32[i+0]^s0,dst32[i+1]=src32[i+1]^s1,dst32[i+2]=src32[i+2]^s2,dst32[i+3]=src32[i+3]^s3,ctrNum=ctrNum+1>>>0,view.setUint32(ctrPos,ctrNum,isLE3),{s0,s1,s2,s3}=encrypt(xk,c32[0],c32[1],c32[2],c32[3]);let start3=BLOCK_SIZE2*Math.floor(src32.length/BLOCK_SIZE32);if(start3<srcLen){let b32=new Uint32Array([s0,s1,s2,s3]),buf=u8(b32);for(let i=start3,pos=0;i<srcLen;i++,pos++)dst[i]=src[i]^buf[pos]}return dst}function validateBlockDecrypt(data){if(bytes(data),data.length%BLOCK_SIZE2!==0)throw new Error(`aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size ${BLOCK_SIZE2}`)}function validateBlockEncrypt(plaintext,pcks5,dst){let outLen=plaintext.length,remaining=outLen%BLOCK_SIZE2;if(!pcks5&&remaining!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");let b=u32(plaintext);if(pcks5){let left2=BLOCK_SIZE2-remaining;left2||(left2=BLOCK_SIZE2),outLen=outLen+left2}let out=getDst(outLen,dst),o=u32(out);return{b,o,out}}function validatePCKS(data,pcks5){if(!pcks5)return data;let len=data.length;if(!len)throw new Error("aes/pcks5: empty ciphertext not allowed");let lastByte=data[len-1];if(lastByte<=0||lastByte>16)throw new Error(`aes/pcks5: wrong padding byte: ${lastByte}`);let out=data.subarray(0,-lastByte);for(let i=0;i<lastByte;i++)if(data[len-i-1]!==lastByte)throw new Error("aes/pcks5: wrong padding");return out}function padPCKS(left2){let tmp=new Uint8Array(16),tmp32=u32(tmp);tmp.set(left2);let paddingByte=BLOCK_SIZE2-left2.length;for(let i=BLOCK_SIZE2-paddingByte;i<BLOCK_SIZE2;i++)tmp[i]=paddingByte;return tmp32}function computeTag(fn,isLE3,key,data,AAD){let h=fn.create(key,data.length+((AAD==null?void 0:AAD.length)||0));AAD&&h.update(AAD),h.update(data);let num=new Uint8Array(16),view=createView(num);return AAD&&setBigUint64(view,0,BigInt(AAD.length*8),isLE3),setBigUint64(view,8,BigInt(data.length*8),isLE3),h.update(num),h.digest()}var BLOCK_SIZE2,BLOCK_SIZE32,EMPTY_BLOCK,POLY2,sbox,invSbox,rotr32_8,rotl32_8,tableEncoding,tableDecoding,xPowers,ctr,ecb,cbc,gcm,limit,siv,init_aes=__esm({"node_modules/@noble/ciphers/esm/aes.js"(){init_define_process_env();init_shim();init_utils();init_polyval();init_assert();BLOCK_SIZE2=16,BLOCK_SIZE32=4,EMPTY_BLOCK=new Uint8Array(BLOCK_SIZE2),POLY2=283;sbox=(()=>{let t=new Uint8Array(256);for(let i=0,x=1;i<256;i++,x^=mul22(x))t[i]=x;let box=new Uint8Array(256);box[0]=99;for(let i=0;i<255;i++){let x=t[255-i];x|=x<<8,box[t[i]]=(x^x>>4^x>>5^x>>6^x>>7^99)&255}return box})(),invSbox=sbox.map((_,j2)=>sbox.indexOf(j2)),rotr32_8=n=>n<<24|n>>>8,rotl32_8=n=>n<<8|n>>>24;tableEncoding=genTtable(sbox,s=>mul(s,3)<<24|s<<16|s<<8|mul(s,2)),tableDecoding=genTtable(invSbox,s=>mul(s,11)<<24|mul(s,13)<<16|mul(s,9)<<8|mul(s,14)),xPowers=(()=>{let p=new Uint8Array(16);for(let i=0,x=1;i<16;i++,x=mul22(x))p[i]=x;return p})();ctr=wrapCipher({blockSize:16,nonceLength:16},function(key,nonce){bytes(key),bytes(nonce,BLOCK_SIZE2);function processCtr(buf,dst){let xk=expandKeyLE(key),n=nonce.slice(),out=ctrCounter(xk,n,buf,dst);return xk.fill(0),n.fill(0),out}return{encrypt:(plaintext,dst)=>processCtr(plaintext,dst),decrypt:(ciphertext,dst)=>processCtr(ciphertext,dst)}});ecb=wrapCipher({blockSize:16},function(key,opts={}){bytes(key);let pcks5=!opts.disablePadding;return{encrypt:(plaintext,dst)=>{bytes(plaintext);let{b,o,out:_out}=validateBlockEncrypt(plaintext,pcks5,dst),xk=expandKeyLE(key),i=0;for(;i+4<=b.length;){let{s0,s1,s2,s3}=encrypt(xk,b[i+0],b[i+1],b[i+2],b[i+3]);o[i++]=s0,o[i++]=s1,o[i++]=s2,o[i++]=s3}if(pcks5){let tmp32=padPCKS(plaintext.subarray(i*4)),{s0,s1,s2,s3}=encrypt(xk,tmp32[0],tmp32[1],tmp32[2],tmp32[3]);o[i++]=s0,o[i++]=s1,o[i++]=s2,o[i++]=s3}return xk.fill(0),_out},decrypt:(ciphertext,dst)=>{validateBlockDecrypt(ciphertext);let xk=expandKeyDecLE(key),out=getDst(ciphertext.length,dst),b=u32(ciphertext),o=u32(out);for(let i=0;i+4<=b.length;){let{s0,s1,s2,s3}=decrypt(xk,b[i+0],b[i+1],b[i+2],b[i+3]);o[i++]=s0,o[i++]=s1,o[i++]=s2,o[i++]=s3}return xk.fill(0),validatePCKS(out,pcks5)}}}),cbc=wrapCipher({blockSize:16,nonceLength:16},function(key,iv,opts={}){bytes(key),bytes(iv,16);let pcks5=!opts.disablePadding;return{encrypt:(plaintext,dst)=>{let xk=expandKeyLE(key),{b,o,out:_out}=validateBlockEncrypt(plaintext,pcks5,dst),n32=u32(iv),s0=n32[0],s1=n32[1],s2=n32[2],s3=n32[3],i=0;for(;i+4<=b.length;)s0^=b[i+0],s1^=b[i+1],s2^=b[i+2],s3^=b[i+3],{s0,s1,s2,s3}=encrypt(xk,s0,s1,s2,s3),o[i++]=s0,o[i++]=s1,o[i++]=s2,o[i++]=s3;if(pcks5){let tmp32=padPCKS(plaintext.subarray(i*4));s0^=tmp32[0],s1^=tmp32[1],s2^=tmp32[2],s3^=tmp32[3],{s0,s1,s2,s3}=encrypt(xk,s0,s1,s2,s3),o[i++]=s0,o[i++]=s1,o[i++]=s2,o[i++]=s3}return xk.fill(0),_out},decrypt:(ciphertext,dst)=>{validateBlockDecrypt(ciphertext);let xk=expandKeyDecLE(key),n32=u32(iv),out=getDst(ciphertext.length,dst),b=u32(ciphertext),o=u32(out),s0=n32[0],s1=n32[1],s2=n32[2],s3=n32[3];for(let i=0;i+4<=b.length;){let ps0=s0,ps1=s1,ps2=s2,ps3=s3;s0=b[i+0],s1=b[i+1],s2=b[i+2],s3=b[i+3];let{s0:o0,s1:o1,s2:o2,s3:o3}=decrypt(xk,s0,s1,s2,s3);o[i++]=o0^ps0,o[i++]=o1^ps1,o[i++]=o2^ps2,o[i++]=o3^ps3}return xk.fill(0),validatePCKS(out,pcks5)}}});gcm=wrapCipher({blockSize:16,nonceLength:12,tagLength:16},function(key,nonce,AAD){if(bytes(nonce),nonce.length===0)throw new Error("aes/gcm: empty nonce");let tagLength=16;function _computeTag(authKey,tagMask,data){let tag=computeTag(ghash,!1,authKey,data,AAD);for(let i=0;i<tagMask.length;i++)tag[i]^=tagMask[i];return tag}function deriveKeys(){let xk=expandKeyLE(key),authKey=EMPTY_BLOCK.slice(),counter=EMPTY_BLOCK.slice();if(ctr32(xk,!1,counter,counter,authKey),nonce.length===12)counter.set(nonce);else{let nonceLen=EMPTY_BLOCK.slice(),view=createView(nonceLen);setBigUint64(view,8,BigInt(nonce.length*8),!1),ghash.create(authKey).update(nonce).update(nonceLen).digestInto(counter)}let tagMask=ctr32(xk,!1,counter,EMPTY_BLOCK);return{xk,authKey,counter,tagMask}}return{encrypt:plaintext=>{bytes(plaintext);let{xk,authKey,counter,tagMask}=deriveKeys(),out=new Uint8Array(plaintext.length+tagLength);ctr32(xk,!1,counter,plaintext,out);let tag=_computeTag(authKey,tagMask,out.subarray(0,out.length-tagLength));return out.set(tag,plaintext.length),xk.fill(0),out},decrypt:ciphertext=>{if(bytes(ciphertext),ciphertext.length<tagLength)throw new Error(`aes/gcm: ciphertext less than tagLen (${tagLength})`);let{xk,authKey,counter,tagMask}=deriveKeys(),data=ciphertext.subarray(0,-tagLength),passedTag=ciphertext.subarray(-tagLength),tag=_computeTag(authKey,tagMask,data);if(!equalBytes(tag,passedTag))throw new Error("aes/gcm: invalid ghash tag");let out=ctr32(xk,!1,counter,data);return authKey.fill(0),tagMask.fill(0),xk.fill(0),out}}}),limit=(name,min,max)=>value=>{if(!Number.isSafeInteger(value)||min>value||value>max)throw new Error(`${name}: invalid value=${value}, must be [${min}..${max}]`)},siv=wrapCipher({blockSize:16,nonceLength:12,tagLength:16},function(key,nonce,AAD){let AAD_LIMIT=limit("AAD",0,68719476736),PLAIN_LIMIT=limit("plaintext",0,2**36),NONCE_LIMIT=limit("nonce",12,12),CIPHER_LIMIT=limit("ciphertext",16,2**36+16);bytes(nonce),NONCE_LIMIT(nonce.length),AAD&&(bytes(AAD),AAD_LIMIT(AAD.length));function deriveKeys(){let len=key.length;if(len!==16&&len!==24&&len!==32)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${len} bytes`);let xk=expandKeyLE(key),encKey=new Uint8Array(len),authKey=new Uint8Array(16),n32=u32(nonce),s0=0,s1=n32[0],s2=n32[1],s3=n32[2],counter=0;for(let derivedKey of[authKey,encKey].map(u32)){let d32=u32(derivedKey);for(let i=0;i<d32.length;i+=2){let{s0:o0,s1:o1}=encrypt(xk,s0,s1,s2,s3);d32[i+0]=o0,d32[i+1]=o1,s0=++counter}}return xk.fill(0),{authKey,encKey:expandKeyLE(encKey)}}function _computeTag(encKey,authKey,data){let tag=computeTag(polyval,!0,authKey,data,AAD);for(let i=0;i<12;i++)tag[i]^=nonce[i];tag[15]&=127;let t32=u32(tag),s0=t32[0],s1=t32[1],s2=t32[2],s3=t32[3];return{s0,s1,s2,s3}=encrypt(encKey,s0,s1,s2,s3),t32[0]=s0,t32[1]=s1,t32[2]=s2,t32[3]=s3,tag}function processSiv(encKey,tag,input2){let block=tag.slice();return block[15]|=128,ctr32(encKey,!0,block,input2)}return{encrypt:plaintext=>{bytes(plaintext),PLAIN_LIMIT(plaintext.length);let{encKey,authKey}=deriveKeys(),tag=_computeTag(encKey,authKey,plaintext),out=new Uint8Array(plaintext.length+16);return out.set(tag,plaintext.length),out.set(processSiv(encKey,tag,plaintext)),encKey.fill(0),authKey.fill(0),out},decrypt:ciphertext=>{bytes(ciphertext),CIPHER_LIMIT(ciphertext.length);let tag=ciphertext.subarray(-16),{encKey,authKey}=deriveKeys(),plaintext=processSiv(encKey,tag,ciphertext.subarray(0,-16)),expectedTag=_computeTag(encKey,authKey,plaintext);if(encKey.fill(0),authKey.fill(0),!equalBytes(tag,expectedTag))throw new Error("invalid polyval tag");return plaintext}}})}});function number(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function isBytes2(a){return a instanceof Uint8Array||a!=null&&typeof a=="object"&&a.constructor.name==="Uint8Array"}function bytes2(b,...lengths){if(!isBytes2(b))throw new Error("Expected Uint8Array");if(lengths.length>0&&!lengths.includes(b.length))throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`)}function hash(hash2){if(typeof hash2!="function"||typeof hash2.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number(hash2.outputLen),number(hash2.blockLen)}function exists2(instance4,checkFinished=!0){if(instance4.destroyed)throw new Error("Hash instance has been destroyed");if(checkFinished&&instance4.finished)throw new Error("Hash#digest() has already been called")}function output2(out,instance4){bytes2(out);let min=instance4.outputLen;if(out.length<min)throw new Error(`digestInto() expects output buffer of length at least ${min}`)}var init_assert2=__esm({"node_modules/@noble/hashes/esm/_assert.js"(){init_define_process_env();init_shim()}});function isBytes3(a){return a instanceof Uint8Array||a!=null&&typeof a=="object"&&a.constructor.name==="Uint8Array"}function utf8ToBytes2(str){if(typeof str!="string")throw new Error(`utf8ToBytes expected string, got ${typeof str}`);return new Uint8Array(new TextEncoder().encode(str))}function toBytes2(data){if(typeof data=="string"&&(data=utf8ToBytes2(data)),!isBytes3(data))throw new Error(`expected Uint8Array, got ${typeof data}`);return data}function checkOpts(defaults2,opts){if(opts!==void 0&&toStr.call(opts)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(defaults2,opts)}function wrapConstructor(hashCons){let hashC=msg=>hashCons().update(toBytes2(msg)).digest(),tmp=hashCons();return hashC.outputLen=tmp.outputLen,hashC.blockLen=tmp.blockLen,hashC.create=()=>hashCons(),hashC}var createView2,isLE2,Hash2,toStr,init_utils2=__esm({"node_modules/@noble/hashes/esm/utils.js"(){init_define_process_env();init_shim();createView2=arr=>new DataView(arr.buffer,arr.byteOffset,arr.byteLength),isLE2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE2)throw new Error("Non little-endian hardware is not supported");Hash2=class{clone(){return this._cloneInto()}},toStr={}.toString}});var HMAC,hmac,init_hmac=__esm({"node_modules/@noble/hashes/esm/hmac.js"(){init_define_process_env();init_shim();init_assert2();init_utils2();HMAC=class extends Hash2{constructor(hash2,_key){super(),this.finished=!1,this.destroyed=!1,hash(hash2);let key=toBytes2(_key);if(this.iHash=hash2.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let blockLen=this.blockLen,pad2=new Uint8Array(blockLen);pad2.set(key.length>blockLen?hash2.create().update(key).digest():key);for(let i=0;i<pad2.length;i++)pad2[i]^=54;this.iHash.update(pad2),this.oHash=hash2.create();for(let i=0;i<pad2.length;i++)pad2[i]^=106;this.oHash.update(pad2),pad2.fill(0)}update(buf){return exists2(this),this.iHash.update(buf),this}digestInto(out){exists2(this),bytes2(out,this.outputLen),this.finished=!0,this.iHash.digestInto(out),this.oHash.update(out),this.oHash.digestInto(out),this.destroy()}digest(){let out=new Uint8Array(this.oHash.outputLen);return this.digestInto(out),out}_cloneInto(to){to||(to=Object.create(Object.getPrototypeOf(this),{}));let{oHash,iHash,finished,destroyed,blockLen,outputLen}=this;return to=to,to.finished=finished,to.destroyed=destroyed,to.blockLen=blockLen,to.outputLen=outputLen,to.oHash=oHash._cloneInto(to.oHash),to.iHash=iHash._cloneInto(to.iHash),to}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},hmac=(hash2,key,message)=>new HMAC(hash2,key).update(message).digest();hmac.create=(hash2,key)=>new HMAC(hash2,key)}});function pbkdf2Init(hash2,_password,_salt,_opts){hash(hash2);let opts=checkOpts({dkLen:32,asyncTick:10},_opts),{c,dkLen,asyncTick}=opts;if(number(c),number(dkLen),number(asyncTick),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let password=toBytes2(_password),salt=toBytes2(_salt),DK=new Uint8Array(dkLen),PRF=hmac.create(hash2,password),PRFSalt=PRF._cloneInto().update(salt);return{c,dkLen,asyncTick,DK,PRF,PRFSalt}}function pbkdf2Output(PRF,PRFSalt,DK,prfW,u22){return PRF.destroy(),PRFSalt.destroy(),prfW&&prfW.destroy(),u22.fill(0),DK}function pbkdf2(hash2,password,salt,opts){let{c,dkLen,DK,PRF,PRFSalt}=pbkdf2Init(hash2,password,salt,opts),prfW,arr=new Uint8Array(4),view=createView2(arr),u22=new Uint8Array(PRF.outputLen);for(let ti=1,pos=0;pos<dkLen;ti++,pos+=PRF.outputLen){let Ti=DK.subarray(pos,pos+PRF.outputLen);view.setInt32(0,ti,!1),(prfW=PRFSalt._cloneInto(prfW)).update(arr).digestInto(u22),Ti.set(u22.subarray(0,Ti.length));for(let ui=1;ui<c;ui++){PRF._cloneInto(prfW).update(u22).digestInto(u22);for(let i=0;i<Ti.length;i++)Ti[i]^=u22[i]}}return pbkdf2Output(PRF,PRFSalt,DK,prfW,u22)}var init_pbkdf2=__esm({"node_modules/@noble/hashes/esm/pbkdf2.js"(){init_define_process_env();init_shim();init_assert2();init_hmac();init_utils2()}});var require_check_correctness_of_iteration=__commonJS({"node_modules/core-js/internals/check-correctness-of-iteration.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var wellKnownSymbol=require_well_known_symbol(),ITERATOR=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}},iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch{}var called,iteratorWithReturn;module2.exports=function(exec,SKIP_CLOSING){try{if(!SKIP_CLOSING&&!SAFE_CLOSING)return!1}catch{return!1}var ITERATION_SUPPORT=!1;try{var object2={};object2[ITERATOR]=function(){return{next:function(){return{done:ITERATION_SUPPORT=!0}}}},exec(object2)}catch{}return ITERATION_SUPPORT}}});var require_array_buffer_basic_detection=__commonJS({"node_modules/core-js/internals/array-buffer-basic-detection.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"}});var require_array_buffer_view_core=__commonJS({"node_modules/core-js/internals/array-buffer-view-core.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var NATIVE_ARRAY_BUFFER=require_array_buffer_basic_detection(),DESCRIPTORS=require_descriptors(),global=require_global(),isCallable=require_is_callable(),isObject3=require_is_object(),hasOwn=require_has_own_property(),classof=require_classof(),tryToString=require_try_to_string(),createNonEnumerableProperty=require_create_non_enumerable_property(),defineBuiltIn=require_define_built_in(),defineBuiltInAccessor=require_define_built_in_accessor(),isPrototypeOf=require_object_is_prototype_of(),getPrototypeOf=require_object_get_prototype_of(),setPrototypeOf=require_object_set_prototype_of(),wellKnownSymbol=require_well_known_symbol(),uid=require_uid(),InternalStateModule=require_internal_state(),enforceInternalState=InternalStateModule.enforce,getInternalState=InternalStateModule.get,Int8Array2=global.Int8Array,Int8ArrayPrototype=Int8Array2&&Int8Array2.prototype,Uint8ClampedArray2=global.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray2&&Uint8ClampedArray2.prototype,TypedArray=Int8Array2&&getPrototypeOf(Int8Array2),TypedArrayPrototype=Int8ArrayPrototype&&getPrototypeOf(Int8ArrayPrototype),ObjectPrototype=Object.prototype,TypeError2=global.TypeError,TO_STRING_TAG=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR="TypedArrayConstructor",NATIVE_ARRAY_BUFFER_VIEWS=NATIVE_ARRAY_BUFFER&&!!setPrototypeOf&&classof(global.opera)!=="Opera",TYPED_ARRAY_TAG_REQUIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function(it){if(!isObject3(it))return!1;var klass=classof(it);return klass==="DataView"||hasOwn(TypedArrayConstructorsList,klass)||hasOwn(BigIntArrayConstructorsList,klass)},getTypedArrayConstructor=function(it){var proto=getPrototypeOf(it);if(isObject3(proto)){var state4=getInternalState(proto);return state4&&hasOwn(state4,TYPED_ARRAY_CONSTRUCTOR)?state4[TYPED_ARRAY_CONSTRUCTOR]:getTypedArrayConstructor(proto)}},isTypedArray2=function(it){if(!isObject3(it))return!1;var klass=classof(it);return hasOwn(TypedArrayConstructorsList,klass)||hasOwn(BigIntArrayConstructorsList,klass)},aTypedArray=function(it){if(isTypedArray2(it))return it;throw new TypeError2("Target is not a typed array")},aTypedArrayConstructor=function(C){if(isCallable(C)&&(!setPrototypeOf||isPrototypeOf(TypedArray,C)))return C;throw new TypeError2(tryToString(C)+" is not a typed array constructor")},exportTypedArrayMethod=function(KEY,property2,forced,options){if(DESCRIPTORS){if(forced)for(var ARRAY in TypedArrayConstructorsList){var TypedArrayConstructor=global[ARRAY];if(TypedArrayConstructor&&hasOwn(TypedArrayConstructor.prototype,KEY))try{delete TypedArrayConstructor.prototype[KEY]}catch{try{TypedArrayConstructor.prototype[KEY]=property2}catch{}}}(!TypedArrayPrototype[KEY]||forced)&&defineBuiltIn(TypedArrayPrototype,KEY,forced?property2:NATIVE_ARRAY_BUFFER_VIEWS&&Int8ArrayPrototype[KEY]||property2,options)}},exportTypedArrayStaticMethod=function(KEY,property2,forced){var ARRAY,TypedArrayConstructor;if(DESCRIPTORS){if(setPrototypeOf){if(forced){for(ARRAY in TypedArrayConstructorsList)if(TypedArrayConstructor=global[ARRAY],TypedArrayConstructor&&hasOwn(TypedArrayConstructor,KEY))try{delete TypedArrayConstructor[KEY]}catch{}}if(!TypedArray[KEY]||forced)try{return defineBuiltIn(TypedArray,KEY,forced?property2:NATIVE_ARRAY_BUFFER_VIEWS&&TypedArray[KEY]||property2)}catch{}else return}for(ARRAY in TypedArrayConstructorsList)TypedArrayConstructor=global[ARRAY],TypedArrayConstructor&&(!TypedArrayConstructor[KEY]||forced)&&defineBuiltIn(TypedArrayConstructor,KEY,property2)}};for(NAME in TypedArrayConstructorsList)Constructor=global[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor:NATIVE_ARRAY_BUFFER_VIEWS=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&(enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS||!isCallable(TypedArray)||TypedArray===Function.prototype)&&(TypedArray=function(){throw new TypeError2("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS))for(NAME in TypedArrayConstructorsList)global[NAME]&&setPrototypeOf(global[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS))for(NAME in TypedArrayConstructorsList)global[NAME]&&setPrototypeOf(global[NAME].prototype,TypedArrayPrototype);NATIVE_ARRAY_BUFFER_VIEWS&&getPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&setPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype);if(DESCRIPTORS&&!hasOwn(TypedArrayPrototype,TO_STRING_TAG)){TYPED_ARRAY_TAG_REQUIRED=!0,defineBuiltInAccessor(TypedArrayPrototype,TO_STRING_TAG,{configurable:!0,get:function(){return isObject3(this)?this[TYPED_ARRAY_TAG]:void 0}});for(NAME in TypedArrayConstructorsList)global[NAME]&&createNonEnumerableProperty(global[NAME],TYPED_ARRAY_TAG,NAME)}module2.exports={NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQUIRED&&TYPED_ARRAY_TAG,aTypedArray,aTypedArrayConstructor,exportTypedArrayMethod,exportTypedArrayStaticMethod,getTypedArrayConstructor,isView,isTypedArray:isTypedArray2,TypedArray,TypedArrayPrototype}}});var require_typed_array_constructors_require_wrappers=__commonJS({"node_modules/core-js/internals/typed-array-constructors-require-wrappers.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),fails=require_fails(),checkCorrectnessOfIteration=require_check_correctness_of_iteration(),NATIVE_ARRAY_BUFFER_VIEWS=require_array_buffer_view_core().NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer2=global.ArrayBuffer,Int8Array2=global.Int8Array;module2.exports=!NATIVE_ARRAY_BUFFER_VIEWS||!fails(function(){Int8Array2(1)})||!fails(function(){new Int8Array2(-1)})||!checkCorrectnessOfIteration(function(iterable){new Int8Array2,new Int8Array2(null),new Int8Array2(1.5),new Int8Array2(iterable)},!0)||fails(function(){return new Int8Array2(new ArrayBuffer2(2),1,void 0).length!==1})}});var require_to_index=__commonJS({"node_modules/core-js/internals/to-index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIntegerOrInfinity=require_to_integer_or_infinity(),toLength=require_to_length(),$RangeError=RangeError;module2.exports=function(it){if(it===void 0)return 0;var number2=toIntegerOrInfinity(it),length=toLength(number2);if(number2!==length)throw new $RangeError("Wrong length or index");return length}}});var require_math_sign=__commonJS({"node_modules/core-js/internals/math-sign.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=Math.sign||function(x){var n=+x;return n===0||n!==n?n:n<0?-1:1}}});var require_math_float_round=__commonJS({"node_modules/core-js/internals/math-float-round.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var sign=require_math_sign(),abs=Math.abs,EPSILON=2220446049250313e-31,INVERSE_EPSILON=1/EPSILON,roundTiesToEven=function(n){return n+INVERSE_EPSILON-INVERSE_EPSILON};module2.exports=function(x,FLOAT_EPSILON,FLOAT_MAX_VALUE,FLOAT_MIN_VALUE){var n=+x,absolute=abs(n),s=sign(n);if(absolute<FLOAT_MIN_VALUE)return s*roundTiesToEven(absolute/FLOAT_MIN_VALUE/FLOAT_EPSILON)*FLOAT_MIN_VALUE*FLOAT_EPSILON;var a=(1+FLOAT_EPSILON/EPSILON)*absolute,result=a-(a-absolute);return result>FLOAT_MAX_VALUE||result!==result?s*(1/0):s*result}}});var require_math_fround=__commonJS({"node_modules/core-js/internals/math-fround.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var floatRound=require_math_float_round(),FLOAT32_EPSILON=11920928955078125e-23,FLOAT32_MAX_VALUE=34028234663852886e22,FLOAT32_MIN_VALUE=11754943508222875e-54;module2.exports=Math.fround||function(x){return floatRound(x,FLOAT32_EPSILON,FLOAT32_MAX_VALUE,FLOAT32_MIN_VALUE)}}});var require_ieee7542=__commonJS({"node_modules/core-js/internals/ieee754.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $Array=Array,abs=Math.abs,pow=Math.pow,floor=Math.floor,log4=Math.log,LN2=Math.LN2,pack=function(number2,mantissaLength,bytes3){var buffer2=$Array(bytes3),exponentLength=bytes3*8-mantissaLength-1,eMax=(1<<exponentLength)-1,eBias=eMax>>1,rt=mantissaLength===23?pow(2,-24)-pow(2,-77):0,sign=number2<0||number2===0&&1/number2<0?1:0,index=0,exponent,mantissa,c;for(number2=abs(number2),number2!==number2||number2===1/0?(mantissa=number2!==number2?1:0,exponent=eMax):(exponent=floor(log4(number2)/LN2),c=pow(2,-exponent),number2*c<1&&(exponent--,c*=2),exponent+eBias>=1?number2+=rt/c:number2+=rt*pow(2,1-eBias),number2*c>=2&&(exponent++,c/=2),exponent+eBias>=eMax?(mantissa=0,exponent=eMax):exponent+eBias>=1?(mantissa=(number2*c-1)*pow(2,mantissaLength),exponent+=eBias):(mantissa=number2*pow(2,eBias-1)*pow(2,mantissaLength),exponent=0));mantissaLength>=8;)buffer2[index++]=mantissa&255,mantissa/=256,mantissaLength-=8;for(exponent=exponent<<mantissaLength|mantissa,exponentLength+=mantissaLength;exponentLength>0;)buffer2[index++]=exponent&255,exponent/=256,exponentLength-=8;return buffer2[--index]|=sign*128,buffer2},unpack=function(buffer2,mantissaLength){var bytes3=buffer2.length,exponentLength=bytes3*8-mantissaLength-1,eMax=(1<<exponentLength)-1,eBias=eMax>>1,nBits=exponentLength-7,index=bytes3-1,sign=buffer2[index--],exponent=sign&127,mantissa;for(sign>>=7;nBits>0;)exponent=exponent*256+buffer2[index--],nBits-=8;for(mantissa=exponent&(1<<-nBits)-1,exponent>>=-nBits,nBits+=mantissaLength;nBits>0;)mantissa=mantissa*256+buffer2[index--],nBits-=8;if(exponent===0)exponent=1-eBias;else{if(exponent===eMax)return mantissa?NaN:sign?-1/0:1/0;mantissa+=pow(2,mantissaLength),exponent-=eBias}return(sign?-1:1)*mantissa*pow(2,exponent-mantissaLength)};module2.exports={pack,unpack}}});var require_array_fill=__commonJS({"node_modules/core-js/internals/array-fill.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toObject=require_to_object(),toAbsoluteIndex=require_to_absolute_index(),lengthOfArrayLike=require_length_of_array_like();module2.exports=function(value){for(var O=toObject(this),length=lengthOfArrayLike(O),argumentsLength=arguments.length,index=toAbsoluteIndex(argumentsLength>1?arguments[1]:void 0,length),end2=argumentsLength>2?arguments[2]:void 0,endPos=end2===void 0?length:toAbsoluteIndex(end2,length);endPos>index;)O[index++]=value;return O}}});var require_array_buffer=__commonJS({"node_modules/core-js/internals/array-buffer.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_global(),uncurryThis=require_function_uncurry_this(),DESCRIPTORS=require_descriptors(),NATIVE_ARRAY_BUFFER=require_array_buffer_basic_detection(),FunctionName=require_function_name(),createNonEnumerableProperty=require_create_non_enumerable_property(),defineBuiltInAccessor=require_define_built_in_accessor(),defineBuiltIns=require_define_built_ins(),fails=require_fails(),anInstance=require_an_instance(),toIntegerOrInfinity=require_to_integer_or_infinity(),toLength=require_to_length(),toIndex=require_to_index(),fround=require_math_fround(),IEEE754=require_ieee7542(),getPrototypeOf=require_object_get_prototype_of(),setPrototypeOf=require_object_set_prototype_of(),arrayFill=require_array_fill(),arraySlice=require_array_slice(),inheritIfRequired=require_inherit_if_required(),copyConstructorProperties=require_copy_constructor_properties(),setToStringTag=require_set_to_string_tag(),InternalStateModule=require_internal_state(),PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",getInternalArrayBufferState=InternalStateModule.getterFor(ARRAY_BUFFER),getInternalDataViewState=InternalStateModule.getterFor(DATA_VIEW),setInternalState=InternalStateModule.set,NativeArrayBuffer=global[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,ArrayBufferPrototype=$ArrayBuffer&&$ArrayBuffer[PROTOTYPE],$DataView=global[DATA_VIEW],DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,Array2=global.Array,RangeError2=global.RangeError,fill=uncurryThis(arrayFill),reverse2=uncurryThis([].reverse),packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(number2){return[number2&255]},packInt16=function(number2){return[number2&255,number2>>8&255]},packInt32=function(number2){return[number2&255,number2>>8&255,number2>>16&255,number2>>24&255]},unpackInt32=function(buffer2){return buffer2[3]<<24|buffer2[2]<<16|buffer2[1]<<8|buffer2[0]},packFloat32=function(number2){return packIEEE754(fround(number2),23,4)},packFloat64=function(number2){return packIEEE754(number2,52,8)},addGetter=function(Constructor,key,getInternalState){defineBuiltInAccessor(Constructor[PROTOTYPE],key,{configurable:!0,get:function(){return getInternalState(this)[key]}})},get10=function(view,count2,index,isLittleEndian){var store=getInternalDataViewState(view),intIndex=toIndex(index),boolIsLittleEndian=!!isLittleEndian;if(intIndex+count2>store.byteLength)throw new RangeError2(WRONG_INDEX);var bytes3=store.bytes,start3=intIndex+store.byteOffset,pack=arraySlice(bytes3,start3,start3+count2);return boolIsLittleEndian?pack:reverse2(pack)},set2=function(view,count2,index,conversion,value,isLittleEndian){var store=getInternalDataViewState(view),intIndex=toIndex(index),pack=conversion(+value),boolIsLittleEndian=!!isLittleEndian;if(intIndex+count2>store.byteLength)throw new RangeError2(WRONG_INDEX);for(var bytes3=store.bytes,start3=intIndex+store.byteOffset,i=0;i<count2;i++)bytes3[start3+i]=pack[boolIsLittleEndian?i:count2-i-1]};NATIVE_ARRAY_BUFFER?(INCORRECT_ARRAY_BUFFER_NAME=PROPER_FUNCTION_NAME&&NativeArrayBuffer.name!==ARRAY_BUFFER,!fails(function(){NativeArrayBuffer(1)})||!fails(function(){new NativeArrayBuffer(-1)})||fails(function(){return new NativeArrayBuffer,new NativeArrayBuffer(1.5),new NativeArrayBuffer(NaN),NativeArrayBuffer.length!==1||INCORRECT_ARRAY_BUFFER_NAME&&!CONFIGURABLE_FUNCTION_NAME})?($ArrayBuffer=function(length){return anInstance(this,ArrayBufferPrototype),inheritIfRequired(new NativeArrayBuffer(toIndex(length)),this,$ArrayBuffer)},$ArrayBuffer[PROTOTYPE]=ArrayBufferPrototype,ArrayBufferPrototype.constructor=$ArrayBuffer,copyConstructorProperties($ArrayBuffer,NativeArrayBuffer)):INCORRECT_ARRAY_BUFFER_NAME&&CONFIGURABLE_FUNCTION_NAME&&createNonEnumerableProperty(NativeArrayBuffer,"name",ARRAY_BUFFER),setPrototypeOf&&getPrototypeOf(DataViewPrototype)!==ObjectPrototype&&setPrototypeOf(DataViewPrototype,ObjectPrototype),testView=new $DataView(new $ArrayBuffer(2)),$setInt8=uncurryThis(DataViewPrototype.setInt8),testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),(testView.getInt8(0)||!testView.getInt8(1))&&defineBuiltIns(DataViewPrototype,{setInt8:function(byteOffset,value){$setInt8(this,byteOffset,value<<24>>24)},setUint8:function(byteOffset,value){$setInt8(this,byteOffset,value<<24>>24)}},{unsafe:!0})):($ArrayBuffer=function(length){anInstance(this,ArrayBufferPrototype);var byteLength=toIndex(length);setInternalState(this,{type:ARRAY_BUFFER,bytes:fill(Array2(byteLength),0),byteLength}),DESCRIPTORS||(this.byteLength=byteLength,this.detached=!1)},ArrayBufferPrototype=$ArrayBuffer[PROTOTYPE],$DataView=function(buffer2,byteOffset,byteLength){anInstance(this,DataViewPrototype),anInstance(buffer2,ArrayBufferPrototype);var bufferState=getInternalArrayBufferState(buffer2),bufferLength=bufferState.byteLength,offset=toIntegerOrInfinity(byteOffset);if(offset<0||offset>bufferLength)throw new RangeError2("Wrong offset");if(byteLength=byteLength===void 0?bufferLength-offset:toLength(byteLength),offset+byteLength>bufferLength)throw new RangeError2(WRONG_LENGTH);setInternalState(this,{type:DATA_VIEW,buffer:buffer2,byteLength,byteOffset:offset,bytes:bufferState.bytes}),DESCRIPTORS||(this.buffer=buffer2,this.byteLength=byteLength,this.byteOffset=offset)},DataViewPrototype=$DataView[PROTOTYPE],DESCRIPTORS&&(addGetter($ArrayBuffer,"byteLength",getInternalArrayBufferState),addGetter($DataView,"buffer",getInternalDataViewState),addGetter($DataView,"byteLength",getInternalDataViewState),addGetter($DataView,"byteOffset",getInternalDataViewState)),defineBuiltIns(DataViewPrototype,{getInt8:function(byteOffset){return get10(this,1,byteOffset)[0]<<24>>24},getUint8:function(byteOffset){return get10(this,1,byteOffset)[0]},getInt16:function(byteOffset){var bytes3=get10(this,2,byteOffset,arguments.length>1?arguments[1]:!1);return(bytes3[1]<<8|bytes3[0])<<16>>16},getUint16:function(byteOffset){var bytes3=get10(this,2,byteOffset,arguments.length>1?arguments[1]:!1);return bytes3[1]<<8|bytes3[0]},getInt32:function(byteOffset){return unpackInt32(get10(this,4,byteOffset,arguments.length>1?arguments[1]:!1))},getUint32:function(byteOffset){return unpackInt32(get10(this,4,byteOffset,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(byteOffset){return unpackIEEE754(get10(this,4,byteOffset,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(byteOffset){return unpackIEEE754(get10(this,8,byteOffset,arguments.length>1?arguments[1]:!1),52)},setInt8:function(byteOffset,value){set2(this,1,byteOffset,packInt8,value)},setUint8:function(byteOffset,value){set2(this,1,byteOffset,packInt8,value)},setInt16:function(byteOffset,value){set2(this,2,byteOffset,packInt16,value,arguments.length>2?arguments[2]:!1)},setUint16:function(byteOffset,value){set2(this,2,byteOffset,packInt16,value,arguments.length>2?arguments[2]:!1)},setInt32:function(byteOffset,value){set2(this,4,byteOffset,packInt32,value,arguments.length>2?arguments[2]:!1)},setUint32:function(byteOffset,value){set2(this,4,byteOffset,packInt32,value,arguments.length>2?arguments[2]:!1)},setFloat32:function(byteOffset,value){set2(this,4,byteOffset,packFloat32,value,arguments.length>2?arguments[2]:!1)},setFloat64:function(byteOffset,value){set2(this,8,byteOffset,packFloat64,value,arguments.length>2?arguments[2]:!1)}}));var INCORRECT_ARRAY_BUFFER_NAME,testView,$setInt8;setToStringTag($ArrayBuffer,ARRAY_BUFFER);setToStringTag($DataView,DATA_VIEW);module2.exports={ArrayBuffer:$ArrayBuffer,DataView:$DataView}}});var require_is_integral_number=__commonJS({"node_modules/core-js/internals/is-integral-number.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isObject3=require_is_object(),floor=Math.floor;module2.exports=Number.isInteger||function(it){return!isObject3(it)&&isFinite(it)&&floor(it)===it}}});var require_to_positive_integer=__commonJS({"node_modules/core-js/internals/to-positive-integer.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toIntegerOrInfinity=require_to_integer_or_infinity(),$RangeError=RangeError;module2.exports=function(it){var result=toIntegerOrInfinity(it);if(result<0)throw new $RangeError("The argument can't be less than 0");return result}}});var require_to_offset=__commonJS({"node_modules/core-js/internals/to-offset.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toPositiveInteger=require_to_positive_integer(),$RangeError=RangeError;module2.exports=function(it,BYTES){var offset=toPositiveInteger(it);if(offset%BYTES)throw new $RangeError("Wrong offset");return offset}}});var require_to_uint8_clamped=__commonJS({"node_modules/core-js/internals/to-uint8-clamped.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var round2=Math.round;module2.exports=function(it){var value=round2(it);return value<0?0:value>255?255:value&255}}});var require_is_big_int_array=__commonJS({"node_modules/core-js/internals/is-big-int-array.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var classof=require_classof();module2.exports=function(it){var klass=classof(it);return klass==="BigInt64Array"||klass==="BigUint64Array"}}});var require_to_big_int=__commonJS({"node_modules/core-js/internals/to-big-int.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toPrimitive=require_to_primitive(),$TypeError=TypeError;module2.exports=function(argument){var prim=toPrimitive(argument,"number");if(typeof prim=="number")throw new $TypeError("Can't convert number to bigint");return BigInt(prim)}}});var require_typed_array_from=__commonJS({"node_modules/core-js/internals/typed-array-from.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var bind=require_function_bind_context(),call=require_function_call(),aConstructor=require_a_constructor(),toObject=require_to_object(),lengthOfArrayLike=require_length_of_array_like(),getIterator=require_get_iterator(),getIteratorMethod=require_get_iterator_method(),isArrayIteratorMethod=require_is_array_iterator_method(),isBigIntArray=require_is_big_int_array(),aTypedArrayConstructor=require_array_buffer_view_core().aTypedArrayConstructor,toBigInt=require_to_big_int();module2.exports=function(source){var C=aConstructor(this),O=toObject(source),argumentsLength=arguments.length,mapfn=argumentsLength>1?arguments[1]:void 0,mapping3=mapfn!==void 0,iteratorMethod=getIteratorMethod(O),i,length,result,thisIsBigIntArray,value,step,iterator,next;if(iteratorMethod&&!isArrayIteratorMethod(iteratorMethod))for(iterator=getIterator(O,iteratorMethod),next=iterator.next,O=[];!(step=call(next,iterator)).done;)O.push(step.value);for(mapping3&&argumentsLength>2&&(mapfn=bind(mapfn,arguments[2])),length=lengthOfArrayLike(O),result=new(aTypedArrayConstructor(C))(length),thisIsBigIntArray=isBigIntArray(result),i=0;length>i;i++)value=mapping3?mapfn(O[i],i):O[i],result[i]=thisIsBigIntArray?toBigInt(value):+value;return result}}});var require_is_array=__commonJS({"node_modules/core-js/internals/is-array.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var classof=require_classof_raw();module2.exports=Array.isArray||function(argument){return classof(argument)==="Array"}}});var require_array_species_constructor=__commonJS({"node_modules/core-js/internals/array-species-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isArray3=require_is_array(),isConstructor=require_is_constructor(),isObject3=require_is_object(),wellKnownSymbol=require_well_known_symbol(),SPECIES=wellKnownSymbol("species"),$Array=Array;module2.exports=function(originalArray){var C;return isArray3(originalArray)&&(C=originalArray.constructor,isConstructor(C)&&(C===$Array||isArray3(C.prototype))?C=void 0:isObject3(C)&&(C=C[SPECIES],C===null&&(C=void 0))),C===void 0?$Array:C}}});var require_array_species_create=__commonJS({"node_modules/core-js/internals/array-species-create.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var arraySpeciesConstructor=require_array_species_constructor();module2.exports=function(originalArray,length){return new(arraySpeciesConstructor(originalArray))(length===0?0:length)}}});var require_array_iteration=__commonJS({"node_modules/core-js/internals/array-iteration.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var bind=require_function_bind_context(),uncurryThis=require_function_uncurry_this(),IndexedObject=require_indexed_object(),toObject=require_to_object(),lengthOfArrayLike=require_length_of_array_like(),arraySpeciesCreate=require_array_species_create(),push=uncurryThis([].push),createMethod=function(TYPE){var IS_MAP=TYPE===1,IS_FILTER=TYPE===2,IS_SOME=TYPE===3,IS_EVERY=TYPE===4,IS_FIND_INDEX=TYPE===6,IS_FILTER_REJECT=TYPE===7,NO_HOLES=TYPE===5||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var O=toObject($this),self2=IndexedObject(O),length=lengthOfArrayLike(self2),boundFunction=bind(callbackfn,that),index=0,create3=specificCreate||arraySpeciesCreate,target=IS_MAP?create3($this,length):IS_FILTER||IS_FILTER_REJECT?create3($this,0):void 0,value,result;length>index;index++)if((NO_HOLES||index in self2)&&(value=self2[index],result=boundFunction(value,index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push(target,value)}else switch(TYPE){case 4:return!1;case 7:push(target,value)}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}};module2.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}}});var require_set_species=__commonJS({"node_modules/core-js/internals/set-species.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var getBuiltIn=require_get_built_in(),defineBuiltInAccessor=require_define_built_in_accessor(),wellKnownSymbol=require_well_known_symbol(),DESCRIPTORS=require_descriptors(),SPECIES=wellKnownSymbol("species");module2.exports=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn(CONSTRUCTOR_NAME);DESCRIPTORS&&Constructor&&!Constructor[SPECIES]&&defineBuiltInAccessor(Constructor,SPECIES,{configurable:!0,get:function(){return this}})}}});var require_array_from_constructor_and_list=__commonJS({"node_modules/core-js/internals/array-from-constructor-and-list.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var lengthOfArrayLike=require_length_of_array_like();module2.exports=function(Constructor,list4,$length){for(var index=0,length=arguments.length>2?$length:lengthOfArrayLike(list4),result=new Constructor(length);length>index;)result[index]=list4[index++];return result}}});var require_typed_array_constructor=__commonJS({"node_modules/core-js/internals/typed-array-constructor.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var $2=require_export(),global=require_global(),call=require_function_call(),DESCRIPTORS=require_descriptors(),TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS=require_typed_array_constructors_require_wrappers(),ArrayBufferViewCore=require_array_buffer_view_core(),ArrayBufferModule=require_array_buffer(),anInstance=require_an_instance(),createPropertyDescriptor=require_create_property_descriptor(),createNonEnumerableProperty=require_create_non_enumerable_property(),isIntegralNumber=require_is_integral_number(),toLength=require_to_length(),toIndex=require_to_index(),toOffset=require_to_offset(),toUint8Clamped=require_to_uint8_clamped(),toPropertyKey=require_to_property_key(),hasOwn=require_has_own_property(),classof=require_classof(),isObject3=require_is_object(),isSymbol2=require_is_symbol(),create3=require_object_create(),isPrototypeOf=require_object_is_prototype_of(),setPrototypeOf=require_object_set_prototype_of(),getOwnPropertyNames=require_object_get_own_property_names().f,typedArrayFrom=require_typed_array_from(),forEach=require_array_iteration().forEach,setSpecies=require_set_species(),defineBuiltInAccessor=require_define_built_in_accessor(),definePropertyModule=require_object_define_property(),getOwnPropertyDescriptorModule=require_object_get_own_property_descriptor(),arrayFromConstructorAndList=require_array_from_constructor_and_list(),InternalStateModule=require_internal_state(),inheritIfRequired=require_inherit_if_required(),getInternalState=InternalStateModule.get,setInternalState=InternalStateModule.set,enforceInternalState=InternalStateModule.enforce,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,RangeError2=global.RangeError,ArrayBuffer2=ArrayBufferModule.ArrayBuffer,ArrayBufferPrototype=ArrayBuffer2.prototype,DataView3=ArrayBufferModule.DataView,NATIVE_ARRAY_BUFFER_VIEWS=ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG=ArrayBufferViewCore.TYPED_ARRAY_TAG,TypedArray=ArrayBufferViewCore.TypedArray,TypedArrayPrototype=ArrayBufferViewCore.TypedArrayPrototype,isTypedArray2=ArrayBufferViewCore.isTypedArray,BYTES_PER_ELEMENT="BYTES_PER_ELEMENT",WRONG_LENGTH="Wrong length",addGetter=function(it,key){defineBuiltInAccessor(it,key,{configurable:!0,get:function(){return getInternalState(this)[key]}})},isArrayBuffer=function(it){var klass;return isPrototypeOf(ArrayBufferPrototype,it)||(klass=classof(it))==="ArrayBuffer"||klass==="SharedArrayBuffer"},isTypedArrayIndex=function(target,key){return isTypedArray2(target)&&!isSymbol2(key)&&key in target&&isIntegralNumber(+key)&&key>=0},wrappedGetOwnPropertyDescriptor=function(target,key){return key=toPropertyKey(key),isTypedArrayIndex(target,key)?createPropertyDescriptor(2,target[key]):nativeGetOwnPropertyDescriptor(target,key)},wrappedDefineProperty=function(target,key,descriptor){return key=toPropertyKey(key),isTypedArrayIndex(target,key)&&isObject3(descriptor)&&hasOwn(descriptor,"value")&&!hasOwn(descriptor,"get")&&!hasOwn(descriptor,"set")&&!descriptor.configurable&&(!hasOwn(descriptor,"writable")||descriptor.writable)&&(!hasOwn(descriptor,"enumerable")||descriptor.enumerable)?(target[key]=descriptor.value,target):nativeDefineProperty(target,key,descriptor)};DESCRIPTORS?(NATIVE_ARRAY_BUFFER_VIEWS||(getOwnPropertyDescriptorModule.f=wrappedGetOwnPropertyDescriptor,definePropertyModule.f=wrappedDefineProperty,addGetter(TypedArrayPrototype,"buffer"),addGetter(TypedArrayPrototype,"byteOffset"),addGetter(TypedArrayPrototype,"byteLength"),addGetter(TypedArrayPrototype,"length")),$2({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor,defineProperty:wrappedDefineProperty}),module2.exports=function(TYPE,wrapper,CLAMPED){var BYTES=TYPE.match(/\d+/)[0]/8,CONSTRUCTOR_NAME=TYPE+(CLAMPED?"Clamped":"")+"Array",GETTER="get"+TYPE,SETTER="set"+TYPE,NativeTypedArrayConstructor=global[CONSTRUCTOR_NAME],TypedArrayConstructor=NativeTypedArrayConstructor,TypedArrayConstructorPrototype=TypedArrayConstructor&&TypedArrayConstructor.prototype,exported89={},getter=function(that,index){var data=getInternalState(that);return data.view[GETTER](index*BYTES+data.byteOffset,!0)},setter=function(that,index,value){var data=getInternalState(that);data.view[SETTER](index*BYTES+data.byteOffset,CLAMPED?toUint8Clamped(value):value,!0)},addElement=function(that,index){nativeDefineProperty(that,index,{get:function(){return getter(this,index)},set:function(value){return setter(this,index,value)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS&&(TypedArrayConstructor=wrapper(function(dummy,data,typedArrayOffset,$length){return anInstance(dummy,TypedArrayConstructorPrototype),inheritIfRequired(function(){return isObject3(data)?isArrayBuffer(data)?$length!==void 0?new NativeTypedArrayConstructor(data,toOffset(typedArrayOffset,BYTES),$length):typedArrayOffset!==void 0?new NativeTypedArrayConstructor(data,toOffset(typedArrayOffset,BYTES)):new NativeTypedArrayConstructor(data):isTypedArray2(data)?arrayFromConstructorAndList(TypedArrayConstructor,data):call(typedArrayFrom,TypedArrayConstructor,data):new NativeTypedArrayConstructor(toIndex(data))}(),dummy,TypedArrayConstructor)}),setPrototypeOf&&setPrototypeOf(TypedArrayConstructor,TypedArray),forEach(getOwnPropertyNames(NativeTypedArrayConstructor),function(key){key in TypedArrayConstructor||createNonEnumerableProperty(TypedArrayConstructor,key,NativeTypedArrayConstructor[key])}),TypedArrayConstructor.prototype=TypedArrayConstructorPrototype):(TypedArrayConstructor=wrapper(function(that,data,offset,$length){anInstance(that,TypedArrayConstructorPrototype);var index=0,byteOffset=0,buffer2,byteLength,length;if(!isObject3(data))length=toIndex(data),byteLength=length*BYTES,buffer2=new ArrayBuffer2(byteLength);else if(isArrayBuffer(data)){buffer2=data,byteOffset=toOffset(offset,BYTES);var $len=data.byteLength;if($length===void 0){if($len%BYTES)throw new RangeError2(WRONG_LENGTH);if(byteLength=$len-byteOffset,byteLength<0)throw new RangeError2(WRONG_LENGTH)}else if(byteLength=toLength($length)*BYTES,byteLength+byteOffset>$len)throw new RangeError2(WRONG_LENGTH);length=byteLength/BYTES}else return isTypedArray2(data)?arrayFromConstructorAndList(TypedArrayConstructor,data):call(typedArrayFrom,TypedArrayConstructor,data);for(setInternalState(that,{buffer:buffer2,byteOffset,byteLength,length,view:new DataView3(buffer2)});index<length;)addElement(that,index++)}),setPrototypeOf&&setPrototypeOf(TypedArrayConstructor,TypedArray),TypedArrayConstructorPrototype=TypedArrayConstructor.prototype=create3(TypedArrayPrototype)),TypedArrayConstructorPrototype.constructor!==TypedArrayConstructor&&createNonEnumerableProperty(TypedArrayConstructorPrototype,"constructor",TypedArrayConstructor),enforceInternalState(TypedArrayConstructorPrototype).TypedArrayConstructor=TypedArrayConstructor,TYPED_ARRAY_TAG&&createNonEnumerableProperty(TypedArrayConstructorPrototype,TYPED_ARRAY_TAG,CONSTRUCTOR_NAME);var FORCED=TypedArrayConstructor!==NativeTypedArrayConstructor;exported89[CONSTRUCTOR_NAME]=TypedArrayConstructor,$2({global:!0,constructor:!0,forced:FORCED,sham:!NATIVE_ARRAY_BUFFER_VIEWS},exported89),BYTES_PER_ELEMENT in TypedArrayConstructor||createNonEnumerableProperty(TypedArrayConstructor,BYTES_PER_ELEMENT,BYTES),BYTES_PER_ELEMENT in TypedArrayConstructorPrototype||createNonEnumerableProperty(TypedArrayConstructorPrototype,BYTES_PER_ELEMENT,BYTES),setSpecies(CONSTRUCTOR_NAME)}):module2.exports=function(){}}});var require_es_typed_array_uint32_array=__commonJS({"node_modules/core-js/modules/es.typed-array.uint32-array.js"(){"use strict";init_define_process_env();init_shim();var createTypedArrayConstructor=require_typed_array_constructor();createTypedArrayConstructor("Uint32",function(init5){return function(data,byteOffset,length){return init5(this,data,byteOffset,length)}})}});var require_es_typed_array_at=__commonJS({"node_modules/core-js/modules/es.typed-array.at.js"(){"use strict";init_define_process_env();init_shim();var ArrayBufferViewCore=require_array_buffer_view_core(),lengthOfArrayLike=require_length_of_array_like(),toIntegerOrInfinity=require_to_integer_or_infinity(),aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod("at",function(index){var O=aTypedArray(this),len=lengthOfArrayLike(O),relativeIndex=toIntegerOrInfinity(index),k=relativeIndex>=0?relativeIndex:len+relativeIndex;return k<0||k>=len?void 0:O[k]})}});var require_es_typed_array_fill=__commonJS({"node_modules/core-js/modules/es.typed-array.fill.js"(){"use strict";init_define_process_env();init_shim();var ArrayBufferViewCore=require_array_buffer_view_core(),$fill=require_array_fill(),toBigInt=require_to_big_int(),classof=require_classof(),call=require_function_call(),uncurryThis=require_function_uncurry_this(),fails=require_fails(),aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,slice=uncurryThis("".slice),CONVERSION_BUG=fails(function(){var count2=0;return new Int8Array(2).fill({valueOf:function(){return count2++}}),count2!==1});exportTypedArrayMethod("fill",function(value){var length=arguments.length;aTypedArray(this);var actualValue=slice(classof(this),0,3)==="Big"?toBigInt(value):+value;return call($fill,this,actualValue,length>1?arguments[1]:void 0,length>2?arguments[2]:void 0)},CONVERSION_BUG)}});var require_array_iteration_from_last=__commonJS({"node_modules/core-js/internals/array-iteration-from-last.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var bind=require_function_bind_context(),IndexedObject=require_indexed_object(),toObject=require_to_object(),lengthOfArrayLike=require_length_of_array_like(),createMethod=function(TYPE){var IS_FIND_LAST_INDEX=TYPE===1;return function($this,callbackfn,that){for(var O=toObject($this),self2=IndexedObject(O),index=lengthOfArrayLike(self2),boundFunction=bind(callbackfn,that),value,result;index-- >0;)if(value=self2[index],result=boundFunction(value,index,O),result)switch(TYPE){case 0:return value;case 1:return index}return IS_FIND_LAST_INDEX?-1:void 0}};module2.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}}});var require_es_typed_array_find_last=__commonJS({"node_modules/core-js/modules/es.typed-array.find-last.js"(){"use strict";init_define_process_env();init_shim();var ArrayBufferViewCore=require_array_buffer_view_core(),$findLast=require_array_iteration_from_last().findLast,aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod("findLast",function(predicate){return $findLast(aTypedArray(this),predicate,arguments.length>1?arguments[1]:void 0)})}});var require_esnext_typed_array_find_last=__commonJS({"node_modules/core-js/modules/esnext.typed-array.find-last.js"(){"use strict";init_define_process_env();init_shim();require_es_typed_array_find_last()}});var require_es_typed_array_find_last_index=__commonJS({"node_modules/core-js/modules/es.typed-array.find-last-index.js"(){"use strict";init_define_process_env();init_shim();var ArrayBufferViewCore=require_array_buffer_view_core(),$findLastIndex=require_array_iteration_from_last().findLastIndex,aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod("findLastIndex",function(predicate){return $findLastIndex(aTypedArray(this),predicate,arguments.length>1?arguments[1]:void 0)})}});var require_esnext_typed_array_find_last_index=__commonJS({"node_modules/core-js/modules/esnext.typed-array.find-last-index.js"(){"use strict";init_define_process_env();init_shim();require_es_typed_array_find_last_index()}});var require_es_typed_array_set=__commonJS({"node_modules/core-js/modules/es.typed-array.set.js"(){"use strict";init_define_process_env();init_shim();var global=require_global(),call=require_function_call(),ArrayBufferViewCore=require_array_buffer_view_core(),lengthOfArrayLike=require_length_of_array_like(),toOffset=require_to_offset(),toIndexedObject=require_to_object(),fails=require_fails(),RangeError2=global.RangeError,Int8Array2=global.Int8Array,Int8ArrayPrototype=Int8Array2&&Int8Array2.prototype,$set=Int8ArrayPrototype&&Int8ArrayPrototype.set,aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS=!fails(function(){var array=new Uint8ClampedArray(2);return call($set,array,{length:1,0:3},1),array[1]!==3}),TO_OBJECT_BUG=WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS&&ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS&&fails(function(){var array=new Int8Array2(2);return array.set(1),array.set("2",1),array[0]!==0||array[1]!==2});exportTypedArrayMethod("set",function(arrayLike){aTypedArray(this);var offset=toOffset(arguments.length>1?arguments[1]:void 0,1),src=toIndexedObject(arrayLike);if(WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS)return call($set,this,src,offset);var length=this.length,len=lengthOfArrayLike(src),index=0;if(len+offset>length)throw new RangeError2("Wrong length");for(;index<len;)this[offset+index]=src[index++]},!WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS||TO_OBJECT_BUG)}});var require_engine_ff_version=__commonJS({"node_modules/core-js/internals/engine-ff-version.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var userAgent=require_engine_user_agent(),firefox=userAgent.match(/firefox\/(\d+)/i);module2.exports=!!firefox&&+firefox[1]}});var require_engine_is_ie_or_edge=__commonJS({"node_modules/core-js/internals/engine-is-ie-or-edge.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var UA=require_engine_user_agent();module2.exports=/MSIE|Trident/.test(UA)}});var require_engine_webkit_version=__commonJS({"node_modules/core-js/internals/engine-webkit-version.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var userAgent=require_engine_user_agent(),webkit=userAgent.match(/AppleWebKit\/(\d+)\./);module2.exports=!!webkit&&+webkit[1]}});var require_es_typed_array_sort=__commonJS({"node_modules/core-js/modules/es.typed-array.sort.js"(){"use strict";init_define_process_env();init_shim();var global=require_global(),uncurryThis=require_function_uncurry_this_clause(),fails=require_fails(),aCallable=require_a_callable(),internalSort=require_array_sort(),ArrayBufferViewCore=require_array_buffer_view_core(),FF=require_engine_ff_version(),IE_OR_EDGE=require_engine_is_ie_or_edge(),V8=require_engine_v8_version(),WEBKIT=require_engine_webkit_version(),aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,Uint16Array2=global.Uint16Array,nativeSort=Uint16Array2&&uncurryThis(Uint16Array2.prototype.sort),ACCEPT_INCORRECT_ARGUMENTS=!!nativeSort&&!(fails(function(){nativeSort(new Uint16Array2(2),null)})&&fails(function(){nativeSort(new Uint16Array2(2),{})})),STABLE_SORT=!!nativeSort&&!fails(function(){if(V8)return V8<74;if(FF)return FF<67;if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<602;var array=new Uint16Array2(516),expected=Array(516),index,mod;for(index=0;index<516;index++)mod=index%4,array[index]=515-index,expected[index]=index-2*mod+3;for(nativeSort(array,function(a,b){return(a/4|0)-(b/4|0)}),index=0;index<516;index++)if(array[index]!==expected[index])return!0}),getSortCompare=function(comparefn){return function(x,y){return comparefn!==void 0?+comparefn(x,y)||0:y!==y?-1:x!==x?1:x===0&&y===0?1/x>0&&1/y<0?1:-1:x>y}};exportTypedArrayMethod("sort",function(comparefn){return comparefn!==void 0&&aCallable(comparefn),STABLE_SORT?nativeSort(this,comparefn):internalSort(aTypedArray(this),getSortCompare(comparefn))},!STABLE_SORT||ACCEPT_INCORRECT_ARGUMENTS)}});var require_array_to_reversed=__commonJS({"node_modules/core-js/internals/array-to-reversed.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var lengthOfArrayLike=require_length_of_array_like();module2.exports=function(O,C){for(var len=lengthOfArrayLike(O),A=new C(len),k=0;k<len;k++)A[k]=O[len-k-1];return A}}});var require_es_typed_array_to_reversed=__commonJS({"node_modules/core-js/modules/es.typed-array.to-reversed.js"(){"use strict";init_define_process_env();init_shim();var arrayToReversed=require_array_to_reversed(),ArrayBufferViewCore=require_array_buffer_view_core(),aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,getTypedArrayConstructor=ArrayBufferViewCore.getTypedArrayConstructor;exportTypedArrayMethod("toReversed",function(){return arrayToReversed(aTypedArray(this),getTypedArrayConstructor(this))})}});var require_esnext_typed_array_to_reversed=__commonJS({"node_modules/core-js/modules/esnext.typed-array.to-reversed.js"(){"use strict";init_define_process_env();init_shim();require_es_typed_array_to_reversed()}});var require_es_typed_array_to_sorted=__commonJS({"node_modules/core-js/modules/es.typed-array.to-sorted.js"(){"use strict";init_define_process_env();init_shim();var ArrayBufferViewCore=require_array_buffer_view_core(),uncurryThis=require_function_uncurry_this(),aCallable=require_a_callable(),arrayFromConstructorAndList=require_array_from_constructor_and_list(),aTypedArray=ArrayBufferViewCore.aTypedArray,getTypedArrayConstructor=ArrayBufferViewCore.getTypedArrayConstructor,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,sort=uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);exportTypedArrayMethod("toSorted",function(compareFn){compareFn!==void 0&&aCallable(compareFn);var O=aTypedArray(this),A=arrayFromConstructorAndList(getTypedArrayConstructor(O),O);return sort(A,compareFn)})}});var require_esnext_typed_array_to_sorted=__commonJS({"node_modules/core-js/modules/esnext.typed-array.to-sorted.js"(){"use strict";init_define_process_env();init_shim();require_es_typed_array_to_sorted()}});var require_array_with=__commonJS({"node_modules/core-js/internals/array-with.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var lengthOfArrayLike=require_length_of_array_like(),toIntegerOrInfinity=require_to_integer_or_infinity(),$RangeError=RangeError;module2.exports=function(O,C,index,value){var len=lengthOfArrayLike(O),relativeIndex=toIntegerOrInfinity(index),actualIndex=relativeIndex<0?len+relativeIndex:relativeIndex;if(actualIndex>=len||actualIndex<0)throw new $RangeError("Incorrect index");for(var A=new C(len),k=0;k<len;k++)A[k]=k===actualIndex?value:O[k];return A}}});var require_es_typed_array_with=__commonJS({"node_modules/core-js/modules/es.typed-array.with.js"(){"use strict";init_define_process_env();init_shim();var arrayWith=require_array_with(),ArrayBufferViewCore=require_array_buffer_view_core(),isBigIntArray=require_is_big_int_array(),toIntegerOrInfinity=require_to_integer_or_infinity(),toBigInt=require_to_big_int(),aTypedArray=ArrayBufferViewCore.aTypedArray,getTypedArrayConstructor=ArrayBufferViewCore.getTypedArrayConstructor,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,PROPER_ORDER=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(error2){return error2===8}}();exportTypedArrayMethod("with",function(index,value){var O=aTypedArray(this),relativeIndex=toIntegerOrInfinity(index),actualValue=isBigIntArray(O)?toBigInt(value):+value;return arrayWith(O,getTypedArrayConstructor(O),relativeIndex,actualValue)},!PROPER_ORDER)}});var require_esnext_typed_array_with=__commonJS({"node_modules/core-js/modules/esnext.typed-array.with.js"(){"use strict";init_define_process_env();init_shim();require_es_typed_array_with()}});function setBigUint642(view,byteOffset,value,isLE3){if(typeof view.setBigUint64=="function")return view.setBigUint64(byteOffset,value,isLE3);let _32n=BigInt(32),_u32_max=BigInt(4294967295),wh=Number(value>>_32n&_u32_max),wl=Number(value&_u32_max),h=isLE3?4:0,l=isLE3?0:4;view.setUint32(byteOffset+h,wh,isLE3),view.setUint32(byteOffset+l,wl,isLE3)}var SHA2,init_sha2=__esm({"node_modules/@noble/hashes/esm/_sha2.js"(){init_define_process_env();init_shim();init_assert2();init_utils2();SHA2=class extends Hash2{constructor(blockLen,outputLen,padOffset,isLE3){super(),this.blockLen=blockLen,this.outputLen=outputLen,this.padOffset=padOffset,this.isLE=isLE3,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(blockLen),this.view=createView2(this.buffer)}update(data){exists2(this);let{view,buffer:buffer2,blockLen}=this;data=toBytes2(data);let len=data.length;for(let pos=0;pos<len;){let take=Math.min(blockLen-this.pos,len-pos);if(take===blockLen){let dataView=createView2(data);for(;blockLen<=len-pos;pos+=blockLen)this.process(dataView,pos);continue}buffer2.set(data.subarray(pos,pos+take),this.pos),this.pos+=take,pos+=take,this.pos===blockLen&&(this.process(view,0),this.pos=0)}return this.length+=data.length,this.roundClean(),this}digestInto(out){exists2(this),output2(out,this),this.finished=!0;let{buffer:buffer2,view,blockLen,isLE:isLE3}=this,{pos}=this;buffer2[pos++]=128,this.buffer.subarray(pos).fill(0),this.padOffset>blockLen-pos&&(this.process(view,0),pos=0);for(let i=pos;i<blockLen;i++)buffer2[i]=0;setBigUint642(view,blockLen-8,BigInt(this.length*8),isLE3),this.process(view,0);let oview=createView2(out),len=this.outputLen;if(len%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let outLen=len/4,state4=this.get();if(outLen>state4.length)throw new Error("_sha2: outputLen bigger than state");for(let i=0;i<outLen;i++)oview.setUint32(4*i,state4[i],isLE3)}digest(){let{buffer:buffer2,outputLen}=this;this.digestInto(buffer2);let res=buffer2.slice(0,outputLen);return this.destroy(),res}_cloneInto(to){to||(to=new this.constructor),to.set(...this.get());let{blockLen,buffer:buffer2,length,finished,destroyed,pos}=this;return to.length=length,to.pos=pos,to.finished=finished,to.destroyed=destroyed,length%blockLen&&to.buffer.set(buffer2),to}}}});var import_es_typed_array_uint32_array,import_es_typed_array_at,import_es_typed_array_fill,import_esnext_typed_array_find_last,import_esnext_typed_array_find_last_index,import_es_typed_array_set,import_es_typed_array_sort,import_esnext_typed_array_to_reversed,import_esnext_typed_array_to_sorted,import_esnext_typed_array_with,K,Chi,IV,rotl,MD5_W,MD5,md5,init_md5=__esm({"lib-browser/db/md5.js"(){"use strict";init_define_process_env();init_shim();import_es_typed_array_uint32_array=__toESM(require_es_typed_array_uint32_array()),import_es_typed_array_at=__toESM(require_es_typed_array_at()),import_es_typed_array_fill=__toESM(require_es_typed_array_fill()),import_esnext_typed_array_find_last=__toESM(require_esnext_typed_array_find_last()),import_esnext_typed_array_find_last_index=__toESM(require_esnext_typed_array_find_last_index()),import_es_typed_array_set=__toESM(require_es_typed_array_set()),import_es_typed_array_sort=__toESM(require_es_typed_array_sort()),import_esnext_typed_array_to_reversed=__toESM(require_esnext_typed_array_to_reversed()),import_esnext_typed_array_to_sorted=__toESM(require_esnext_typed_array_to_sorted()),import_esnext_typed_array_with=__toESM(require_esnext_typed_array_with());init_sha2();init_utils2();K=Array.from({length:64},(_,i)=>Math.floor(2**32*Math.abs(Math.sin(i+1)))),Chi=(a,b,c)=>a&b^~a&c,IV=new Uint32Array([1732584193,4023233417,2562383102,271733878]),rotl=(word,shift)=>word<<shift|word>>>32-shift>>>0,MD5_W=new Uint32Array(16),MD5=class extends SHA2{constructor(){super(64,16,8,!0),this.A=IV[0]|0,this.B=IV[1]|0,this.C=IV[2]|0,this.D=IV[3]|0}get(){let{A,B,C,D}=this;return[A,B,C,D]}set(A,B,C,D){this.A=A|0,this.B=B|0,this.C=C|0,this.D=D|0}process(view,offset){for(let i=0;i<16;i++,offset+=4)MD5_W[i]=view.getUint32(offset,!0);let{A,B,C,D}=this;for(let i=0;i<64;i++){let F,g,s;i<16?(F=Chi(B,C,D),g=i,s=[7,12,17,22]):i<32?(F=Chi(D,B,C),g=(5*i+1)%16,s=[5,9,14,20]):i<48?(F=B^C^D,g=(3*i+5)%16,s=[4,11,16,23]):(F=C^(B|~D),g=7*i%16,s=[6,10,15,21]),F=F+A+K[i]+MD5_W[g],A=D,D=C,C=B,B=B+rotl(F,s[i%4])}A=A+this.A|0,B=B+this.B|0,C=C+this.C|0,D=D+this.D|0,this.set(A,B,C,D)}roundClean(){MD5_W.fill(0)}destroy(){this.set(0,0,0,0),this.buffer.fill(0)}},md5=wrapConstructor(()=>new MD5)}});var encode_data_raw,init_obfuscate_shared=__esm({"lib-browser/db/obfuscate_shared.js"(){"use strict";init_define_process_env();init_shim();init_client_config2();init_timestamp();encode_data_raw=encode4=>(data,appname)=>{let v="1",cur_timestamp=String(timestamp()),timestamp_version=`${cur_timestamp}_${v}`,key=appname+cur_timestamp,iv=String(Math.random()),encoded={z:encode4(key,iv,JSON.stringify(data),appname),y:encode4(appname,"po9",timestamp_version,appname),x:encode4(appname,"fl1",iv,appname)};return client_config_default2.debug_unobfuscated_client_queries&&(encoded.__debug_raw=data),encoded}}});function encode3(key,iv,text2,appname){let derivedKey=pbkdf2(md5,key,appname,{c:7,dkLen:32}),derivedIv=pbkdf2(md5,iv,appname,{c:7,dkLen:16}),output3=cbc(derivedKey,derivedIv,{disablePadding:!1}).encrypt(utf8ToBytes(text2));return gBase64.fromUint8Array(output3)}var encode_data,init_obfuscate=__esm({"lib-browser/db/obfuscate.js"(){"use strict";init_define_process_env();init_shim();init_aes();init_pbkdf2();init_md5();init_utils();init_base64();init_obfuscate_shared();encode_data=encode_data_raw(encode3)}});function uid_cookie_name(appname,app_version,temp_db){var _ref,_ref2,_configuration$cookie;let cn_prefix=(_ref=(_ref2=(_configuration$cookie=client_config_default2.cookie_name_prefix)!=null?_configuration$cookie:client_config_default2.environment_name)!=null?_ref2:client_config_default2.env)!=null?_ref:"";return appname+"_u1"+(isLiveVersion(app_version)?"":"_"+app_version)+cn_prefix+(temp_db?"_"+temp_db:"")}var init_cookies=__esm({"lib-browser/shared/cookies.js"(){"use strict";init_define_process_env();init_shim();init_client_config2();init_multiple_live_versions()}});var _ready_keys,init_client_firebase=__esm({"lib-browser/db/client_firebase.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_lib();init_client_config2();init_cookies();typeof window<"u"&&window.firebase!=null&&window.firebase.initializeApp!=null&&window.firebase.initializeApp(client_config_default2.firebase_app_config);_ready_keys={};_ready_keys.firebase_workflow=u_exports2.MakeSwitch(null,"firebase_workflow ready key")}});var languages_exports={};__export(languages_exports,{LANGUAGE_DATA_TYPE_TO_KEY:()=>LANGUAGE_DATA_TYPE_TO_KEY,add_built_ins:()=>add_built_ins,app_language:()=>app_language,available_languages:()=>available_languages,format_iso_code_for_browser:()=>format_iso_code_for_browser,get_built_in_json:()=>get_built_in_json,get_built_in_json_from_data:()=>get_built_in_json_from_data,get_iso_code:()=>get_iso_code,get_language_data:()=>get_language_data,get_languages_data:()=>get_languages_data,get_runmode_language_data:()=>get_runmode_language_data,get_text:()=>get_text,get_user_language_field:()=>get_user_language_field,is_language_available:()=>is_language_available,is_rtl:()=>is_rtl,iso_based_language_obj:()=>iso_based_language_obj,iso_lookup_language:()=>iso_lookup_language,language_data:()=>language_data});function available_languages(){return Object.keys(get_languages_data())}function is_language_available(name){return get_languages_data()[name]!=null}function get_runmode_language_data(language){if(on_client())return window.language_data}function get_user_language_field(){let app=lib_default().app(),field=app.get_public_setting("language_field");return field&&app.custom_type("user").field(field).exists()?field:null}function app_language(no_default){function fix_spelling(val){return val==="portugese"?"portuguese":val}function confirm_available(language){return language=fix_spelling(language),language&&is_language_available(language)?language:no_default?null:"en_us"}if(lib_default().is_edit_mode())return confirm_available(appquery_default.get_public_setting("app_language"));if(on_client()&&window.application_language)return window.application_language}function language_data(no_default){return get_runmode_language_data(app_language())}function get_text(plugin2,name){if(!lib_default().app)return null;let language=lib_default().app_language(),user_setting_text=lib_default().app().get_public_setting(`text.${language}.${plugin2}.${name}`);if(on_client()){let text2=user_setting_text;if(text2==null){var _get_language_data,_get_language_data$pl;if(text2=(_get_language_data=get_language_data(language))==null||(_get_language_data$pl=_get_language_data[plugin2])==null?void 0:_get_language_data$pl[name],!text2){var _get_language_data$pl2,_get_language_data2,_get_language_data2$p;owner_warn("Missing translation text",{display:`No translation available yet for text ${plugin2}-${name} in ${language}`}),text2=(_get_language_data$pl2=(_get_language_data2=get_language_data("en_us"))==null||(_get_language_data2$p=_get_language_data2[plugin2])==null?void 0:_get_language_data2$p[name])!=null?_get_language_data$pl2:"(no translation)"}}return text2}}function get_iso_code(language){if(language==null)return"en_US";if(on_client())return window.language_data[language].iso_code}function format_iso_code_for_browser(iso_code){let[first,second]=iso_code.split(/[_-]/);return second!=null?`${first}-${second.toUpperCase()}`:first}function is_rtl(language){if(on_client()){var _window$language_data;return(_window$language_data=window.language_data[language].is_rtl)!=null?_window$language_data:!1}}function get_language_data(app_language2){if(on_client())return window.translation_data[app_language2]!=null?window.translation_data[app_language2]:(iso_based_language_obj==null&&(iso_based_language_obj=iso_lookup_language()),window.translation_data[iso_based_language_obj[app_language2]]);throw new Error("Cannot call get_language_data on server side")}function iso_lookup_language(){let iso_based_object={};for(let[k,v]of Object.entries(get_languages_data()))iso_based_object[v.iso_code]=k;return iso_based_object}function add_built_ins(language_node){if(language_node==null)throw new UnexpectedError("Language node is null for add_built_ins");let yes_text=language_node.child("yes_text").get(),no_text=language_node.child("no_text").get(),day_names_text=language_node.child("day_names_text").get(),month_names_text=language_node.child("month_names_text").get();return get_built_in_json({yes_text,no_text,day_names_text,month_names_text})}function get_built_in_json_from_data(language_data2){if(language_data2==null)throw new UnexpectedError("Language data is null for get_built_in_json_from_data");let yes_text=language_data2.yes,no_text=language_data2.no,day_names_text=language_data2.day_names,month_names_text=language_data2.month_names;return get_built_in_json({yes_text,no_text,day_names_text,month_names_text})}function get_built_in_json(_ref){let{yes_text,no_text,day_names_text,month_names_text}=_ref;return{BUILT_IN:{YES:yes_text,NO:no_text,DATE_FORMAT:{dayNames:day_names_text.split(","),monthNames:month_names_text.split(",")}}}}function get_languages_data(){if(on_client()){var _window$language_data2;return(_window$language_data2=window.language_data)!=null?_window$language_data2:{}}return get_server_languages()}var import_web_dom_collections_iterator94,import_es_error_cause10,LANGUAGE_DATA_TYPE_TO_KEY,iso_based_language_obj,init_languages=__esm({"lib-browser/languages.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator94=__toESM(require_web_dom_collections_iterator()),import_es_error_cause10=__toESM(require_es_error_cause());init_b_object();init_errors();init_mode_check();init_appquery();init_btypes();init_logger();init_lib();init_btype_ids();init_apps_utilities();LANGUAGE_DATA_TYPE_TO_KEY=Object.freeze({language:"server_languages",translation:"server_translations",application_message:"server_application_messages"});iso_based_language_obj=null}});function report_search_update(metrics){Math.random()<1/client_config_default2.search_update_metrics_sample_rate&&lib_default.or_throw().location.post("server://user/m/realtime_update",{timestamp:metrics.received_timestamp,appname:metrics.appname,app_version:metrics.app_version,"notifier.topic":metrics.topic,"realtime_update.type":"search","realtime_update.latency_ms":metrics.received_timestamp-metrics.commit_timestamp,"realtime_update.rate_limited_duration_ms":metrics.rate_limited_duration_ms,"realtime_update.last_search_result_count":metrics.last_search_result_count},err=>{err&&log(err)})}var init_realtime_update_metrics=__esm({"lib-browser/client/metrics/realtime_update_metrics.js"(){"use strict";init_define_process_env();init_shim();init_lib();init_logger();init_client_config2()}});function updateSessionUID(uid){var _window$ReactNativeWe,_window$ReactNativeWe2;uid!==window.bubble_session_uid&&(window.bubble_session_uid=uid,sessionListeners.forEach(listener=>listener(uid)),(_window$ReactNativeWe=window.ReactNativeWebView)==null||(_window$ReactNativeWe2=_window$ReactNativeWe.postMessage)==null||_window$ReactNativeWe2.call(_window$ReactNativeWe,uid))}function getSessionUID(){return window.bubble_session_uid}var sessionListeners,init_session=__esm({"lib-browser/client/session.js"(){"use strict";init_define_process_env();init_shim();sessionListeners=[]}});function get_temp_db2(){let cookie;if(on_react_native())cookie=window.react_native_temp_db;else if(cookies_enabled())cookie=readCookie("temp_db");else return null;return get_temp_db(cookie,lib_default().appname())}function recheck_uid(cb,last_request_uri){var _cb;(_cb=cb)!=null||(cb=function(){}),lib_default.wait_for_lib(()=>{var _new_uid,_getSessionUID;let new_uid=readCookie(uid_cookie_name(lib_default().appname(),lib_default().app_version(),get_temp_db2()));new_uid!=null&&new_uid!==getSessionUID()&&info("bubble_session_uid not updated",{last_request_uri,new_uid,bubble_session_uid:getSessionUID()}),(_new_uid=new_uid)!=null||(new_uid=(_getSessionUID=getSessionUID())!=null?_getSessionUID:NO_USER),new_uid!==_uid()&&(_uid(new_uid),reauth2(),u_exports2.run_once(30,()=>{let current_user5=lib_default().current_user(),language_field=get_user_language_field();return language_field!=null&&current_user5.child(language_field).get(),current_user5.get_email()})),cb()})}var import_web_immediate2,import_web_dom_collections_iterator95,import_es_error_cause11,_class18,_uid,server_time_offset_key,prefetchable_fetch_names,prefetchable_request_names,reauth2,ClientDBShared,init_shared2=__esm({"lib-browser/db/client_db/shared.js"(){"use strict";init_define_process_env();init_shim();import_web_immediate2=__toESM(require_web_immediate()),import_web_dom_collections_iterator95=__toESM(require_web_dom_collections_iterator()),import_es_error_cause11=__toESM(require_es_error_cause());init_u2();init_db2();init_plans();init_db_utils();init_obfuscate();init_db();init_time();init_logger();init_lib();init_client_firebase();init_cookies();init_epoch2();init_epoch();init_ClientDBNode();init_ClientDBObject();init_languages();init_client();init_notifier_topics();init_feature_check();init_realtime_update_metrics();init_eval_node_state();init_feature_check();init_appquery();init_local_storage_helpers();init_timestamp();init_session();init_multiple_live_versions();_uid=u_exports2.Box();server_time_offset_key=u_exports2.MakeKey(null,"server_time_offset");typeof window<"u"&&window!==null&&(window.server_time_offset=0,setImmediate(()=>get_server_time_offset(offset=>{window.server_time_offset=offset,server_time_offset_key.turn()})));prefetchable_fetch_names=["get","search","aggregate"],prefetchable_request_names=["mget","msearch","maggregate"],reauth2=official_retry=>lib_default.wait_for_lib(()=>{rebuild_cookies()}),ClientDBShared=(_class18=class extends db_default.DB{constructor(temp_db,appname,app_version,can_watch){super(),this.temp_db=temp_db,this.appname=appname,this.app_version=app_version,this.can_watch=can_watch,this._gets=[],this._searches=[],this._searches_current_count=0,this._aggregates=[],this.result_cache={},this.result_dependency_cache={},this.watch_search_status={},this.perc_ids_to_calls={},this.perc_id_update_versions={},this._notifier_client=client_exports,this._last_run={},this._next_scheduled={},this._to_percolate=[],this._all_time_queued_fetches=0,this._prefetched_request_counts={mget:0,msearch:0,maggregate:0},this.visited_views=new Set}local_item_updated(id,data,type,version2){var _u$session_storage;if(type!=null&&version2!=="local"&&data!=null&&offlineSupportEnabled()){let thing_key=`${getBubbbleThingPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${id}`;try{local_storage_put(thing_key,{type,version:version2,data}),this.store_views_count(id,thing_key)}catch{}}let keyname="db_latest_version_"+id;if((_u$session_storage=session_storage)!=null&&_u$session_storage.getItem(keyname))return session_storage.setItem(keyname,String(version2))}initialize_data(id,data,type,version2){if(this.has_session_storage=session_storage!=null,!!this.has_session_storage)try{var _this$_tracking_on_pa;let keyname="db_latest_version_"+id,latest_version=session_storage.getItem(keyname);if(latest_version==="local"||parseInt(latest_version)>version2)return;session_storage.setItem(keyname,String(version2)),(_this$_tracking_on_pa=this._tracking_on_page_load)!=null||(this._tracking_on_page_load={}),this._tracking_on_page_load[id]=!0,this._set_data(id,data,type,version2)}catch(err){console.log("error in client_db.initialize_data: "+err.stack)}}schedule_discard_errors(plan){setTimeout(()=>{let result_cache=this.init_result_cache(plan);result_cache.ranges=result_cache.ranges.filter(range2=>range2.state!==range_states.ERROR)},3e4)}execute_with_dependency(query,from,n){throw new Error("not implemented")}register_call_dependency(plan){var _this$result_cache$ca,_this$result_cache$ca2;if(!this.can_watch)return;let cache_key=this.get_cache_key(plan);(_this$result_cache$ca2=(_this$result_cache$ca=this.result_cache[cache_key]).dependency)!=null||(_this$result_cache$ca.dependency=u_exports2.Dependency()),this.result_cache[cache_key].dependency.register(),this.ensure_watching_plan(plan)}invalidate_call_dependency(cache_key){var _this$result_cache$ca3,_this$result_cache$ca4;(_this$result_cache$ca3=this.result_cache[cache_key])==null||(_this$result_cache$ca4=_this$result_cache$ca3.dependency)==null||_this$result_cache$ca4.invalidate()}add_plan_to_watch_search(plan){var _this$watch_search_st,_this$watch_search_st2;let watch_search_call=plans[plan.t].watch_search_call(plan);if(!watch_search_call)return;let watch_search_key=JSON.stringify(watch_search_call),plan_key=this.get_cache_key(plan);(_this$watch_search_st2=(_this$watch_search_st=this.watch_search_status)[watch_search_key])!=null||(_this$watch_search_st[watch_search_key]={plans:{},search_path:this.build_search_path(plan,"watch")}),this.watch_search_status[watch_search_key].plans[plan_key]=!0}ensure_watching_plan(plan){if(!this.can_watch)return;this.add_plan_to_watch_search(plan);let watch_search_call=plans[plan.t].watch_search_call(plan);watch_search_call&&this.ensure_watching_search(watch_search_call)}ensure_watching_search(watch_search_call){let watch_search_key=JSON.stringify(watch_search_call);this.watch_search_status[watch_search_key].scheduled||(this.watch_search_status[watch_search_key].scheduled=!0,this.do_percolate(watch_search_call))}schedule_percolator(watch_search_call,expires){let watch_search_key=JSON.stringify(watch_search_call);this.watch_search_status[watch_search_key].scheduled=!0,this._set_timeout(()=>{this.percolate_still_needed(watch_search_call)?this.do_percolate(watch_search_call):this.watch_search_status[watch_search_key].scheduled=!1},expires-Date.now())}percolate_still_needed(watch_search_call){throw new Error("not implemented")}set_perc_ids(watch_search_call,_ref){let{search_ids,expires}=_ref,perc_ids=search_ids;if(perc_ids==null||!this.can_watch)return;let watch_search_key=JSON.stringify(watch_search_call);this.schedule_percolator(watch_search_call,expires);for(let perc_id of perc_ids){var _search_status$perc_i;let search_status=this.watch_search_status[watch_search_key];(_search_status$perc_i=search_status.perc_ids)!=null||(search_status.perc_ids=[]),!search_status.perc_ids.includes(perc_id)&&(search_status.perc_ids.push(perc_id),this.perc_ids_to_calls[perc_id]||(this.perc_ids_to_calls[perc_id]=[],this._notifier_client.watch([SearchNotificationTopic,perc_id],this.get_perc_id_version.bind(this,perc_id),this.handle_perc_updates.bind(this,perc_id))),this.perc_ids_to_calls[perc_id].push(watch_search_call))}}get_perc_id_version(perc_id){var _min_version;if(this.perc_id_update_versions[perc_id])return this.perc_id_update_versions[perc_id];let min_version;for(let watch_search_call of this.perc_ids_to_calls[perc_id]){let watch_search_key=JSON.stringify(watch_search_call);for(let plan_key in this.watch_search_status[watch_search_key].plans){let plan_version=this.get_plan_version(plan_key);plan_version!=null&&(min_version==null||plan_version<min_version)&&(min_version=plan_version)}}return(_min_version=min_version)!=null?_min_version:0}watching_all_ids(message){if(!message)return!1;let parsed_message=json_parse(message,!0);return Array.isArray(parsed_message)?parsed_message.every(id=>this.is_watching(id)):this.is_watching(parsed_message)}handle_perc_updates(perc_id,update){let update_received_time=timestamp(),{version:completion_timestamp,message}=update;if(completion_timestamp!=null&&(this.perc_id_update_versions[perc_id]=completion_timestamp),!this.watching_all_ids(message))for(let watch_search_call of this.perc_ids_to_calls[perc_id])this.notify_maybe_invalid(watch_search_call,!1,{appname:appquery_default.appname(),app_version:appquery_default.app_version(),topic:update.topic,received_timestamp:update_received_time,commit_timestamp:completion_timestamp})}notify_maybe_invalid(watch_search_call,known_id,metrics){lib_default().workflow.wait_for_server(()=>{let watch_search_key=JSON.stringify(watch_search_call);if(this._next_scheduled[watch_search_key])return;let stats_node=this.query_planner().get_stats(watch_search_call.type,watch_search_call.constraints),period,length=stats_node==null?void 0:stats_node.length;if(known_id?length!=null?length<50?period=500:length<1e3?period=2e3:period=1e4:watch_search_call.is_group_by?period=1e4:period=2e3:length!=null?length<10?period=2e3:length<50?period=5e3:length<1e3?period=1e4:period=3e4:watch_search_call.is_group_by?period=3e4:period=1e4,(()=>this._last_run[watch_search_key]&&this._last_run[watch_search_key]>Date.now()-period&&!this.percolator_rate_limit_disabled)()){this._next_scheduled[watch_search_key]=!0;let start_time=Date.now();this._set_timeout(()=>{lib_default().workflow.wait_for_server(()=>{this._next_scheduled[watch_search_key]=!1;let timestamp2=Date.now();this._last_run[watch_search_key]=timestamp2,this.invalidate_plans(watch_search_key),metrics&&report_search_update({...metrics,last_search_result_count:length,rate_limited_duration_ms:timestamp2-start_time})})},this._last_run[watch_search_key]+period-start_time)}else this._last_run[watch_search_key]=Date.now(),this.invalidate_plans(watch_search_key),metrics&&report_search_update({...metrics,last_search_result_count:length})})}_set_timeout(fn,timeout){return setTimeout(fn,timeout)}_set_immediate(fn){return setImmediate(fn)}wait_for_plan_loading(cache_key,cb){let result_cache=this.result_cache[cache_key],keys2=[];for(let range2 of(_result_cache$ranges=result_cache==null?void 0:result_cache.ranges)!=null?_result_cache$ranges:[]){var _result_cache$ranges;range2.state===range_states.LOADING&&keys2.push(range2.loading_key)}if(keys2.length>0)u_exports2.WaitFor(keys2,()=>{this._set_timeout(()=>{u_exports2.wait_for_updates(this.wait_for_plan_loading.bind(this,cache_key,cb))},5)});else return cb()}invalidate_plans(watch_search_key){if(this.watch_search_status[watch_search_key])for(let plan_key in this.watch_search_status[watch_search_key].plans)this.wait_for_plan_loading(plan_key,()=>{this.invalidate_plan(plan_key)})}do_percolate(watch_search_call){this._to_percolate.push(watch_search_call),this._watch_percolate_scheduled||(this._watch_percolate_scheduled=!0,this._set_timeout(this.bulk_watch.bind(this),200))}bulk_watch(){this._watch_percolate_scheduled=!1;let searches=this._to_percolate;this._to_percolate=[];let build_to_send=watch_search_call=>{let watch_search_key=JSON.stringify(watch_search_call),{type,constraints}=watch_search_call,{search_path}=this.watch_search_status[watch_search_key];return{type,constraints,search_path}},to_send=searches.map(build_to_send);this.elasticsearch("bulk_watch",{appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),searches:to_send},(err,res)=>{if(err)if(offlineSupportEnabled()&&err instanceof OfflineError)for(let watch_search_call of searches){let watch_search_key=JSON.stringify(watch_search_call);this.watch_search_status[watch_search_key].scheduled=!1,lib_default().location.once_online(()=>this.ensure_watching_search(watch_search_call))}else log(err);else for(let[idx,watch_search_call]of searches.entries())this.set_perc_ids(watch_search_call,res[idx])})}get_appname(){return this.appname}get_app_version(){return this.app_version}get_temp_db(){return get_temp_db(this.temp_db,this.appname)}elasticsearch(cmd,data,cb){if(prefetchable_fetch_names.includes(cmd)&&this._all_time_queued_fetches++,cmd==="get"&&!data.clear_cache){this._schedule_multi_get(),this._gets.push({id:data.id,cb});return}if(cmd==="search"&&data.n<40){this._searches.push({data,cb}),this._searches_current_count+=data.n,this._schedule_multi_search();return}if(cmd==="aggregate"){this._aggregates.push({data,cb}),this._schedule_multi_aggregate();return}let encoded=encode_data(data,lib_default().appname()),span_details=extend({},SPANS.data_retrieval);span_details.name=`${span_details.name} - ${cmd}`;let data_span=startSpan2(span_details.name,span_details.type,span_details.sync),with_original_eval_node=create_with_original_eval_node();function debug_wrapper(err,res){return(err==null?void 0:err.message)==="bad request from client"&&info("report invalid params",{data,encoded,cmd,err}),endSpan2(data_span),with_original_eval_node(()=>cb(err,res))}this._is_prefetching&&prefetchable_request_names.includes(cmd)&&this._prefetched_request_counts[cmd]++,lib_default().location.post("server://elasticsearch/"+cmd,encoded,debug_wrapper)}_schedule_multi_get(){this._multi_get_scheduled||(this._multi_get_scheduled=!0,this._multi_get_switch||(this._multi_get_switch=u_exports2.MakeSwitch(null,"multi get switch"),this._multi_get_switch.turn_on()),u_exports2.WaitFor(this._multi_get_switch,()=>{setTimeout(()=>this._do_multi_get(10))}))}_do_multi_get(){if(this._multi_get_scheduled=!1,this._gets.length===0)return;let batch_size=this.GET_BATCH_SIZE,to_get=this._gets.slice(0,batch_size);this._gets=this._gets.slice(batch_size),this._multi_get_switch.turn_off(),this._gets.length>0&&this._schedule_multi_get();let ids=to_get.map(_ref2=>{let{id}=_ref2;return id}),params={appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),ids};return this.elasticsearch("mget",params,(err,res)=>{var _res$docs;if(!err&&((_res$docs=res.docs)==null?void 0:_res$docs.length)!==to_get.length&&(err=new UnexpectedError("bad response from mget",{params,res})),err)for(let{cb}of to_get)cb(err);else{let skipped=[];for(let[idx,data]of res.docs.entries())data!=null?to_get[idx].cb(null,data):skipped.push(to_get[idx]);this._gets=skipped.concat(this._gets),this._schedule_multi_get()}this._multi_get_switch.turn_on()})}_schedule_multi_search(){if(this._multi_search_scheduled){(this._searches.length>30||this._searches_current_count>200)&&(clearTimeout(this._multi_search_timeout),this._do_multi_search());return}this._multi_search_scheduled=!0,this._multi_search_timeout=setTimeout(this._do_multi_search.bind(this),10)}_schedule_multi_aggregate(){if(this._multi_aggregate_scheduled){this._aggregates.length>20&&(clearTimeout(this._multi_aggregate_timeout),this._do_multi_aggregate());return}this._multi_aggregate_scheduled=!0,this._multi_aggregate_timeout=setTimeout(this._do_multi_aggregate.bind(this),10)}get_prefetched_request_counts(){return this._prefetched_request_counts}get_all_time_queued_fetches(){return this._all_time_queued_fetches}prefetch_queued_fetches(){this._is_prefetching=!0,this._multi_get_scheduled&&this._do_multi_get(),this._multi_search_scheduled&&(clearTimeout(this._multi_search_timeout),this._do_multi_search()),this._multi_aggregate_scheduled&&(clearTimeout(this._multi_aggregate_timeout),this._do_multi_aggregate()),this._is_prefetching=!1}_do_multi_search(){this._multi_search_scheduled=!1;let to_search=this._searches;this._searches=[],this._searches_current_count=0;let searches=to_search.map(_ref3=>{let{data}=_ref3;return data}),params={appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),searches};this.elasticsearch("msearch",params,(err,res)=>{var _res$responses;if(!err&&((_res$responses=res.responses)==null?void 0:_res$responses.length)!==to_search.length&&(err=new UnexpectedError("bad response from msearch",{res,params})),err)for(let{cb}of to_search)cb(err);else for(let[idx,data]of res.responses.entries())to_search[idx].cb(null,data)})}_do_multi_aggregate(){this._multi_aggregate_scheduled=!1;let to_send=this._aggregates;this._aggregates=[];let aggregates=to_send.map(_ref4=>{let{data}=_ref4;return data}),params={appname:this.appname,app_version:this.app_version,temp_db:this.cur_temp_db(),aggregates};this.elasticsearch("maggregate",params,(err,res)=>{if(!err&&res.responses.length!==to_send.length&&(err=new UnexpectedError("bad response from maggregate",{res,params})),err)for(let{cb}of to_send)cb(err);else for(let[idx,data]of res.responses.entries())to_send[idx].cb(null,data)})}update_view_association(owning_view,to_add,to_add_storage_key){let owning_view_key=`${getOwningViewPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${owning_view}`,views_count_entry_key=`${getViewCountPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${to_add}`,cached_results=local_storage_get(owning_view_key);if(!(cached_results!=null&&cached_results.includes(views_count_entry_key))){let new_cached_results=cached_results==null?[views_count_entry_key]:[...cached_results,views_count_entry_key];try{var _val$views_count;local_storage_put(owning_view_key,new_cached_results);let val=local_storage_get(views_count_entry_key);local_storage_put(views_count_entry_key,{views_count:((_val$views_count=val==null?void 0:val.views_count)!=null?_val$views_count:0)+1,storage_key:to_add_storage_key})}catch{}}}disassociate_view_data(owning_view){if(this.visited_views.has(owning_view))return;this.visited_views.add(owning_view);let owning_view_key=`${getOwningViewPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${owning_view}`,cached_results=local_storage_get(owning_view_key);if(cached_results!=null){for(let id of cached_results){let result=local_storage_get(id);if(result==null)continue;let{views_count,storage_key}=result;try{local_storage_put(id,{views_count:views_count>0?views_count-1:0,storage_key})}catch(err){warn("Failed to write to local storage",{err})}}local_data_retrieve(owning_view_key)}}},_class18.prototype.DBNODE=ClientDBNode,_class18.prototype.DBOBJECT=ClientDBObject_default,_class18.prototype.GET_BATCH_SIZE=200,_class18)}});var new_exports={};__export(new_exports,{ClientDB:()=>ClientDB2,current_user:()=>current_user,instance:()=>instance,new_instance:()=>new_instance,reauth:()=>reauth3,recheck_uid:()=>recheck_uid2,server_time_offset_key:()=>server_time_offset_key2});function instance(appname,app_version,temp_db){var _appname,_app_version,_temp_db,_db_cache$key;(_appname=appname)!=null||(appname=lib_default().appname()),(_app_version=app_version)!=null||(app_version=lib_default().app_version()),(_temp_db=temp_db)!=null||(temp_db=get_temp_db2());let key=smush(appname,app_version,temp_db);return(_db_cache$key=db_cache[key])!=null||(db_cache[key]=new ClientDB2(temp_db,appname,app_version,!0)),db_cache[key]}function new_instance(appname,app_version,temp_db){var _appname2,_app_version2,_temp_db2;return(_appname2=appname)!=null||(appname=lib_default().appname()),(_app_version2=app_version)!=null||(app_version=lib_default().app_version()),(_temp_db2=temp_db)!=null||(temp_db=get_temp_db2()),new ClientDB2(temp_db,appname,app_version)}function current_user(appname,app_version,temp_db){return recheck_uid2(),instance(appname,app_version,temp_db).get(_uid())}var import_es_error_cause12,import_web_dom_collections_iterator96,_class23,db_cache,recheck_uid2,server_time_offset_key2,reauth3,ClientDBWatcher,ClientDB2,init_new=__esm({"lib-browser/db/client_db/new.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause12=__toESM(require_es_error_cause()),import_web_dom_collections_iterator96=__toESM(require_web_dom_collections_iterator());init_u2();init_async_state();init_scheduler();init_errors();init_lib();init_ClientDBNode();init_ClientDBObject();init_client();init_eval_node_state();init_shared2();init_feature_check();init_local_storage_helpers();init_multiple_live_versions();db_cache={},recheck_uid2=recheck_uid,server_time_offset_key2=server_time_offset_key,reauth3=reauth2;ClientDBWatcher=class{constructor(id,fn){this.results=new Error("Asked for value of a ClientDBWatcher before it had evaluated"),this._sources=null,this._observers=null,this._dirty=!0,this._check=!1,this.ready_key=void 0,this._running=!1,this.from_storage=!1,this.cur_eval_node=get_current_eval_node(),this.id=id,this.fn=fn}register(){u_exports2.register_dependency(this)}needed(){return this._observers?this._observers.length>0:!1}updateIfNecessary(){let adding=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!this.needed()&&!adding)){if(this._check){if(this._sources){for(let source of this._sources)if(source.updateIfNecessary(),this._dirty)break}this._check=!1}this._dirty&&this.update()}}update(){if(!this._dirty)return;let results,ready_key,old_not_ready_catcher=async_state_default.CurrentNotReadyCatcher,old_autorun=async_state_default.CurrentAutoRun,prevSources=async_state_default.NewSources,prevSourcesIndex=async_state_default.NewSourcesIndex;with_eval_node(this.cur_eval_node,()=>{this._running=!0;try{async_state_default.CurrentAutoRun=this,async_state_default.CurrentNotReadyCatcher=null,async_state_default.NewSources=null,async_state_default.NewSourcesIndex=0,results=this.fn()}catch(err){let key=err instanceof NotReadyError&&err.not_ready_key;if(key)key.turned_dependency().register(),ready_key=key,results=[];else throw err}finally{u_exports2.updateSources(),async_state_default.CurrentNotReadyCatcher=old_not_ready_catcher,async_state_default.CurrentAutoRun=old_autorun,async_state_default.NewSources=prevSources,async_state_default.NewSourcesIndex=prevSourcesIndex,this._running=!1}});let results_changed=JSON.stringify(this.results)!==JSON.stringify(results);this.results=results,this.ready_key=ready_key,this._dirty=!1,results_changed&&this._observers&&async_state_default.batch(()=>{for(let run of this._observers)run._invalidate(2)})}_invalidate(state4){let changed=!(this._check||this._dirty);if(state4===1?this._dirty||(this._check=!0):(this._dirty=!0,this._check=!1),state4!==2&&this._running)throw new UnexpectedError("assertion error: current_result invalidated too soon",this);if(changed&&(schedule(this),this._observers))for(let run of this._observers)run._invalidate(1)}},ClientDB2=class extends ClientDBShared{constructor(temp_db,appname,app_version,can_watch){super(),this.temp_db=temp_db,this.appname=appname,this.app_version=app_version,this.can_watch=can_watch,this._gets=[],this._searches=[],this._searches_current_count=0,this._aggregates=[],this.result_cache={},this.result_dependency_cache={},this.watch_search_status={},this.perc_ids_to_calls={},this.perc_id_update_versions={},this._notifier_client=client_exports,this._last_run={},this._next_scheduled={},this._to_percolate=[],this._all_time_queued_fetches=0,this._prefetched_request_counts={mget:0,msearch:0,maggregate:0}}execute_with_dependency(query,from,n){var _eval_node_state$get_,_eval_node_state$get_2,_eval_node_state$get_3;let cache_key=JSON.stringify(query)+"_"+from+"_"+n,owning_view=(_eval_node_state$get_=get_current_eval_node())==null||(_eval_node_state$get_2=_eval_node_state$get_.owner)==null||(_eval_node_state$get_3=_eval_node_state$get_2.root())==null?void 0:_eval_node_state$get_3.id(),plan=this.build_query_plan(query,from,n),result_cache_key=`${getResultCachePrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${JSON.stringify(plan)}`,result_dep_key=`${getResultDependencyPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${cache_key}`;if(owning_view&&offlineSupportEnabled()&&(this.disassociate_view_data(owning_view),this.update_view_association(owning_view,JSON.stringify(plan),result_cache_key),this.update_view_association(owning_view,cache_key,result_dep_key)),!this.result_dependency_cache[cache_key]||this.result_dependency_cache[cache_key].from_storage){var _async_state$CurrentN;if(((_async_state$CurrentN=async_state_default.CurrentNotReadyCatcher)==null?void 0:_async_state$CurrentN.length)>0)return[];let current_result2=new ClientDBWatcher(cache_key,()=>{let res=this.execute_query(query,from,n);return offlineSupportEnabled()&&owning_view&&(this.store_res_cache_entry(plan),this.store_res_dep_cache_entry(cache_key,res)),res});this.result_dependency_cache[cache_key]=current_result2,current_result2.update()}let current_result=this.result_dependency_cache[cache_key];return current_result.updateIfNecessary(!0),current_result.register(),current_result.ready_key&&u_exports2.ensure_ready(current_result.ready_key,!1),current_result.results}percolate_still_needed(watch_search_call){let watch_search_key=JSON.stringify(watch_search_call),found_one=!1,new_plans={};for(let plan_key in this.watch_search_status[watch_search_key].plans){var _this$result_cache$pl,_this$result_cache$pl2;(_this$result_cache$pl=this.result_cache[plan_key])!=null&&(_this$result_cache$pl2=_this$result_cache$pl.dependency)!=null&&_this$result_cache$pl2.needed()?this.result_cache[plan_key].dependency._observers.length===1&&!this.result_cache[plan_key].dependency._observers[0].needed()?this.invalidate_plan(plan_key):(found_one=!0,new_plans[plan_key]=!0):this.invalidate_plan(plan_key)}return this.watch_search_status[watch_search_key].plans=new_plans,found_one}populate_from_storage(){let to_remove=[],keys2=get_all_keys();keys2==null||keys2.forEach(key=>{try{if(key.startsWith(getBubbbleThingPrefix(this.appname,canonicalizeLiveVersion(this.app_version)))){let val=local_storage_get(key),{type,version:version2,data}=val,{_id}=data;this._set_data(_id,data,type,version2,!0)}else if(key.startsWith(getResultDependencyPrefix(this.appname,canonicalizeLiveVersion(this.app_version)))){let val=local_storage_get(key),{res,cache_key}=val,watcher=new ClientDBWatcher(cache_key,()=>{});watcher.results=res,watcher.from_storage=!0,watcher._dirty=!1,this.result_dependency_cache[cache_key]=watcher}else if(key.startsWith(getResultCachePrefix(this.appname,canonicalizeLiveVersion(this.app_version)))){let val=local_storage_get(key),{plan,serialized_ranges,cache_key}=val;this.result_cache[cache_key]={plan,ranges:serialized_ranges,invalidated:!1,searched_count:1}}if(key.startsWith(getViewCountPrefix(this.appname,canonicalizeLiveVersion(this.app_version)))){let val=local_storage_get(key),{views_count,storage_key}=val;(views_count===0||views_count==null)&&to_remove.push({storage_key,key})}}catch{local_data_retrieve(key)}});for(let keys3 of to_remove){let{storage_key,key}=keys3;local_data_retrieve(key),local_data_retrieve(storage_key)}for(let cache_key in this.result_cache){let cache2=this.result_cache[cache_key];if(cache2&&Array.isArray(cache2.ranges))for(let range2 of cache2.ranges)range2.result_cache=cache2}}store_res_cache_entry(plan){let cache_key=JSON.stringify(plan),val=this.result_cache[cache_key];if((val==null?void 0:val.ranges)==null)return;let serialized_ranges=val.ranges.map(range2=>{let{result_cache:_,...rest}=range2;return rest}),result_cache_key=`${getResultCachePrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${cache_key}`;try{local_storage_put(result_cache_key,{plan,serialized_ranges,cache_key}),this.store_views_count(cache_key,result_cache_key)}catch{}}store_res_dep_cache_entry(cache_key,res){let result_dep_key=`${getResultDependencyPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${cache_key}`;try{local_storage_put(result_dep_key,{res,cache_key}),this.store_views_count(cache_key,result_dep_key)}catch{}}store_views_count(id,storage_key){let views_key=`${getViewCountPrefix(this.appname,canonicalizeLiveVersion(this.app_version))}${id}`;if(!local_storage_get(views_key))try{local_storage_put(views_key,{views_count:0,storage_key})}catch{}}};_class23=ClientDB2;_class23.prototype.DBNODE=ClientDBNode,_class23.prototype.DBOBJECT=ClientDBObject_default,_class23.prototype.GET_BATCH_SIZE=200}});var old_exports={};__export(old_exports,{ClientDB:()=>ClientDB3,current_user:()=>current_user2,instance:()=>instance2,new_instance:()=>new_instance2,reauth:()=>reauth4,recheck_uid:()=>recheck_uid3,server_time_offset_key:()=>server_time_offset_key3});function instance2(appname,app_version,temp_db){var _appname,_app_version,_temp_db,_db_cache$key;(_appname=appname)!=null||(appname=lib_default().appname()),(_app_version=app_version)!=null||(app_version=lib_default().app_version()),(_temp_db=temp_db)!=null||(temp_db=get_temp_db2());let key=smush(appname,app_version,temp_db);return(_db_cache$key=db_cache2[key])!=null||(db_cache2[key]=new ClientDB3(temp_db,appname,app_version,!0)),db_cache2[key]}function new_instance2(appname,app_version,temp_db){var _appname2,_app_version2,_temp_db2;return(_appname2=appname)!=null||(appname=lib_default().appname()),(_app_version2=app_version)!=null||(app_version=lib_default().app_version()),(_temp_db2=temp_db)!=null||(temp_db=get_temp_db2()),new ClientDB3(temp_db,appname,app_version)}function current_user2(appname,app_version,temp_db){return recheck_uid3(),instance2(appname,app_version,temp_db).get(_uid())}var _class19,db_cache2,recheck_uid3,server_time_offset_key3,reauth4,ClientDB3,init_old=__esm({"lib-browser/db/client_db/old.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_async_state3();init_errors();init_lib();init_ClientDBNode();init_ClientDBObject();init_client();init_eval_node_state();init_shared2();db_cache2={},recheck_uid3=recheck_uid,server_time_offset_key3=server_time_offset_key,reauth4=reauth2;ClientDB3=class extends ClientDBShared{constructor(temp_db,appname,app_version,can_watch){super(),this.temp_db=temp_db,this.appname=appname,this.app_version=app_version,this.can_watch=can_watch,this._gets=[],this._searches=[],this._searches_current_count=0,this._aggregates=[],this.result_cache={},this.result_dependency_cache={},this.watch_search_status={},this.perc_ids_to_calls={},this.perc_id_update_versions={},this._notifier_client=client_exports,this._last_run={},this._next_scheduled={},this._to_percolate=[],this._all_time_queued_fetches=0,this._prefetched_request_counts={mget:0,msearch:0,maggregate:0}}execute_with_dependency(query,from,n){var _this$result_dependen,_this$result_dependen2;let cache_key=JSON.stringify(query)+"_"+from+"_"+n;if((_this$result_dependen2=(_this$result_dependen=this.result_dependency_cache)[cache_key])!=null||(_this$result_dependen[cache_key]={}),!this.result_dependency_cache[cache_key].current_result){var _async_state$CurrentN;if(((_async_state$CurrentN=async_state_default3.CurrentNotReadyCatcher)==null?void 0:_async_state$CurrentN.length)>0)return[];let cur_eval_node=get_current_eval_node(),current_result={id:cache_key,invalidate:()=>{var _this$result_dependen3;if(current_result.invalidated=!0,current_result===((_this$result_dependen3=this.result_dependency_cache[cache_key])==null?void 0:_this$result_dependen3.current_result)){if(!current_result.dependency.needed()){delete this.result_dependency_cache[cache_key];return}this.result_dependency_cache[cache_key].old_result=this.result_dependency_cache[cache_key].current_result,this.result_dependency_cache[cache_key].current_result=null,this._set_immediate(()=>{u_exports2.run_once(120,()=>{with_eval_node(cur_eval_node,()=>{this.execute_with_dependency(query,from,n)})},!1,!0)})}}},results,old_not_ready_catcher=async_state_default3.CurrentNotReadyCatcher,old_autorun=async_state_default3.CurrentAutoRun;try{async_state_default3.CurrentAutoRun=current_result,async_state_default3.CurrentNotReadyCatcher=null,results=this.execute_query(query,from,n)}catch(err){let key=err instanceof NotReadyError&&err.not_ready_key;throw key&&old_autorun&&key.turned_dependency().register(old_autorun),err}finally{async_state_default3.CurrentNotReadyCatcher=old_not_ready_catcher,async_state_default3.CurrentAutoRun=old_autorun}if(current_result.invalidated)throw new UnexpectedError("assertion error: current_result invalidated too soon",{query,from,n});let dependency3;this.result_dependency_cache[cache_key].old_result?({dependency:dependency3}=this.result_dependency_cache[cache_key].old_result,JSON.stringify(this.result_dependency_cache[cache_key].old_result.results)!==JSON.stringify(results)&&dependency3.invalidate(),this.result_dependency_cache[cache_key].old_result=null):dependency3=u_exports2.Dependency(),current_result.dependency=dependency3,current_result.results=results,this.result_dependency_cache[cache_key].current_result=current_result}return this.result_dependency_cache[cache_key].current_result.dependency.register(),this.result_dependency_cache[cache_key].current_result.results}percolate_still_needed(watch_search_call){let watch_search_key=JSON.stringify(watch_search_call),found_one=!1,new_plans={};for(let plan_key in this.watch_search_status[watch_search_key].plans){var _this$result_cache$pl,_this$result_cache$pl2;(_this$result_cache$pl=this.result_cache[plan_key])!=null&&(_this$result_cache$pl2=_this$result_cache$pl.dependency)!=null&&_this$result_cache$pl2.needed()?(found_one=!0,new_plans[plan_key]=!0):this.invalidate_plan(plan_key)}return this.watch_search_status[watch_search_key].plans=new_plans,found_one}populate_from_storage(){throw new UnexpectedError("populate_from_storage called from old clientdb")}store_res_cache_entry(cache_key,plan){throw new UnexpectedError("store_res_cache_entry called from old clientdb")}};_class19=ClientDB3;_class19.prototype.DBNODE=ClientDBNode,_class19.prototype.DBOBJECT=ClientDBObject_default,_class19.prototype.GET_BATCH_SIZE=200}});var require_client_db=__commonJS({"lib-browser/db/client_db/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(init_newautorun(),__toCommonJS(newautorun_exports)).enable_new_autorun?module2.exports=(init_new(),__toCommonJS(new_exports)):module2.exports=(init_old(),__toCommonJS(old_exports));typeof window<"u"&&window!==null&&(window.client_db=module2.exports)}});function run_in_dehydrate_context(context,fn){let old_context=FrozenState.dehydrate_context;try{return FrozenState.dehydrate_context=context,fn()}finally{FrozenState.dehydrate_context=old_context}}var import_web_dom_collections_iterator97,import_es_string_replace21,import_es_error_cause13,client_db,S9,INSTANCE_NOT_FOUND,FrozenState,init_FrozenState=__esm({"lib-browser/lang/evaluation/FrozenState.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator97=__toESM(require_web_dom_collections_iterator()),import_es_string_replace21=__toESM(require_es_string_replace()),import_es_error_cause13=__toESM(require_es_error_cause());init_u2();init_b_fiber();init_hydrate();init_async_state3();init_logger();init_eval();init_shared();init_decaf();init_node_eval();init_core_ds_element_utilities();init_page_state();init_state_keys();init_appquery();init_lib();client_db=__toESM(require_client_db());init_evaluate();init_btypes();init_shrink();init_context();({S:S9}=shrink_exports),INSTANCE_NOT_FOUND="NOT_FOUND";FrozenState=class _FrozenState{static from_client_state(client_state,context){let frozen_state=new _FrozenState(context);return extend(frozen_state,client_state),frozen_state}static deserialize(context,serialized){let frozen_state=new _FrozenState(context);return extend(frozen_state,serialized),frozen_state}constructor(context){if(this.context=context,this.context.frozen_state)throw new UnexpectedError("this frozen state already has a context");this.context.frozen_state=this,this.cache={},this.exists={},this.trustworthy={},this.element_instances={},this.element_state={},this.other_data={},this.unshrunk_keys={},this.raw_access_log=[]}_save_element_instance(instance4,element_id,not_found){if(not_found){var _this$element_instanc,_this$element_instanc2;(_this$element_instanc2=(_this$element_instanc=this.element_instances)[element_id])!=null||(_this$element_instanc[element_id]=INSTANCE_NOT_FOUND)}else{var _instance$parent,_this$element_instanc3,_this$element_instanc4,_this$element_instanc5,_instance$toUniqueStr,_this$element_instanc6;this.element_instances[element_id]===INSTANCE_NOT_FOUND&&(this.element_instances[element_id]=null);let object2={dehydrated:dehydrate_tree(instance4),parent_element_id:dehydrate_tree((_instance$parent=instance4.parent())==null?void 0:_instance$parent.element_id())};if((_this$element_instanc4=(_this$element_instanc3=this.element_instances)[element_id])!=null||(_this$element_instanc3[element_id]=object2),(_this$element_instanc6=(_this$element_instanc5=this.element_instances)[_instance$toUniqueStr=instance4.toUniqueString()])!=null||(_this$element_instanc5[_instance$toUniqueStr]=object2),instance4.element.type()==="CustomElement"&&instance4.element_id()!==element_id){var _this$element_instanc7,_ref,_this$element_instanc8;(_this$element_instanc8=(_this$element_instanc7=this.element_instances)[_ref=`${instance4.toUniqueString()}:${element_id}`])!=null||(_this$element_instanc7[_ref]=object2)}}}instance_id_not_found(element_id){return this.element_instances[element_id]===INSTANCE_NOT_FOUND}element_id_to_instance_id(element_id,fallback_id){if(this.instance_id_not_found(element_id))throw new UnexpectedError("instance id not found -- should not hit this",{element_id});let res=this.element_instances[element_id];if(!res){let fallback=this.element_instances[fallback_id];if(fallback!=null)return warn("using fallback dehydrated, why is this not in frozen state?",{element_id,fallback_id}),fallback.dehydrated;throw new UnexpectedError("could not find element id in frozen state",{element_id})}return res.dehydrated}element_id_to_parent_element_id(element_id,fallback_id){if(this.instance_id_not_found(element_id))throw new UnexpectedError("instance id not found -- should not hit this",{element_id});let res=this.element_instances[element_id];if(!res){let fallback=this.element_instances[fallback_id];if(fallback!=null)return warn("using fallback parent_element_id, why is this not in frozen state?",{element_id,fallback_id}),fallback.parent_element_id;throw new UnexpectedError("could not find element id in frozen state",{element_id})}return res.parent_element_id}shorten(key){return key=String(key),key.length>50?incremental_digest(key):key}freeze_node(node){return this._build_freeze_promise(()=>{this._freeze_current_element(),this._find_element_references(node,"find_expressions")})}freeze_workflows(events7,cb){this._build_freeze_promise(()=>{this._freeze_workflows(events7)}).callback((err,res)=>{err&&err.message==="autorun.run_once timeout"&&(err=new OwnerError("Workflows could not run because too many events triggered at the same time.",{events:events7.map(e=>({id:e.id(),type:e.type()}))})),cb(err,res)})}_build_freeze_promise(freezer){return u_exports2.run_once(60,()=>{u_exports2.ensure_ready(u_exports2.scheduled_key,!1),lib_default().app_language();let seen_instances={};return run_in_dehydrate_context({instance:instance4=>{seen_instances[instance4.toUniqueString()]||(seen_instances[instance4.toUniqueString()]=!0,this._save_element_instance(instance4,instance4.element_id()))},save_to_state:(instance4,state_name,value)=>{var _this$element_state,_this$element_state$i,_this$element_state$i2,_this$element_state$i3;let instance_id=dehydrate_tree(instance4);(_this$element_state$i=(_this$element_state=this.element_state)[instance_id])!=null||(_this$element_state[instance_id]={}),(_this$element_state$i3=(_this$element_state$i2=this.element_state[instance_id])[state_name])!=null||(_this$element_state$i2[state_name]=dehydrate_tree(value!=null?value:null))}},()=>freezer())},null,!0,!0)}_freeze_current_element(){if(this.context.element){let parent_instance=get_runtime_parent(this.context);if(parent_instance){var _this$element_state2,_instance_id,_this$element_state2$,_this$element_state$i4,_this$element_state$i5;let instance_id=dehydrate_tree(parent_instance);this._save_element_instance(parent_instance,parent_instance.element_id()),(_this$element_state2$=(_this$element_state2=this.element_state)[_instance_id=instance_id])!=null||(_this$element_state2[_instance_id]={}),(_this$element_state$i5=(_this$element_state$i4=this.element_state[instance_id]).group_data)!=null||(_this$element_state$i4.group_data=dehydrate_tree(parent_instance.state("group_data")));let group_item=parent_instance,group_item_ancestry=[];for(;group_item!=null&&group_item.element.type()!=="GroupItem";){var _group_item$parent,_group_item;group_item=(_group_item$parent=(_group_item=group_item).parent)==null?void 0:_group_item$parent.call(_group_item),group_item_ancestry.push(group_item)}if(group_item){var _this$element_state3,_instance_id2,_this$element_state3$,_this$element_state$i6,_this$element_state$i7,_this$element_state$i8,_this$element_state$i9;for(let ancestor of group_item_ancestry)instance_id=dehydrate_tree(ancestor),this._save_element_instance(parent_instance,instance_id);instance_id=dehydrate_tree(group_item),(_this$element_state3$=(_this$element_state3=this.element_state)[_instance_id2=instance_id])!=null||(_this$element_state3[_instance_id2]={}),(_this$element_state$i7=(_this$element_state$i6=this.element_state[instance_id]).cell_index)!=null||(_this$element_state$i6.cell_index=group_item.state("cell_index")),(_this$element_state$i9=(_this$element_state$i8=this.element_state[instance_id]).group_data)!=null||(_this$element_state$i8.group_data=dehydrate_tree(group_item.state("group_data")))}}this._save_element_instance(this.context.element,this.context.element.element_id())}}_freeze_workflows(events7,_frozen_by_parent){var _frozen_by_parent2;(_frozen_by_parent2=_frozen_by_parent)!=null||(_frozen_by_parent={});for(let event of events7){let item=event;for(;item;){if(this._freeze(item),["TriggerCustomEvent","TriggerCustomEventFromReusable"].includes(item.type())){let custom_event=appquery_default.event(item.get_static_property("custom_event"));if(custom_event!=null&&custom_event.exists())if(_frozen_by_parent[custom_event.id()]!=null)_frozen_by_parent[custom_event.id()]!=="REPORTED"&&(_frozen_by_parent[custom_event.id()]="REPORTED",owner_error("This custom event is triggering a custom event that triggers itself (directly or indirectly)",{event:custom_event}));else{let original_element;if(item.type()==="TriggerCustomEventFromReusable"){var _this$context$element;original_element=this.context.element,this.context.element=(_this$context$element=this.context.element)==null?void 0:_this$context$element.find_instance_by_id(item.get_static_property("element_id"))}try{let to_add={};to_add[custom_event.id()]="SEEN",this._freeze_workflows([custom_event],extend({},_frozen_by_parent,to_add))}finally{item.type()==="TriggerCustomEventFromReusable"&&(this.context.element=original_element)}}}item=item.next()}}this._freeze_current_element()}has_invalid_state(){for(let states of object_values(this.element_state))for(let value of object_values(states))if(value!=null&&value[NV_MARKER])return!0;return!1}retrieve_element_state(instance4,state4){var _this$element_state$i10;let instance_id=dehydrate_tree(instance4),stored=(_this$element_state$i10=this.element_state[instance_id])==null?void 0:_this$element_state$i10[state4];if(stored!=null&&stored[NV_MARKER])throw new UnexpectedError("not valid input data made it to server");if(stored!==void 0)return rehydrate_tree(lib_default().db_instance(),stored);if(state4==="value")return this.retrieve_element_state(instance4,"value_that_is_valid");throw new UnexpectedError("trying to retrieve missing element state",{instance_id,state:state4})}_freeze(item){if(!item.is_action())if(lib_default().workflow.uses_server(item)){var _this$context,_this$context$_temp_d;(_this$context$_temp_d=(_this$context=this.context)._temp_db_instance)!=null||(_this$context._temp_db_instance=client_db.new_instance());let current_user5=lib_default().current_user();current_user5&&(current_user5=this.context._temp_db_instance.get(current_user5._id())),lib_default.extend({db_instance:this.context._temp_db_instance,current_user:current_user5},()=>{evaluate_event_condition(item,this.context)})}else evaluate_event_condition(item,this.context);let referenced_element_id=item.element_id();if(referenced_element_id!=null){var _this$context$element2;let referenced_instance=(_this$context$element2=this.context.element)==null?void 0:_this$context$element2.find_instance_by_id(referenced_element_id);referenced_instance?this._save_element_instance(referenced_instance,referenced_element_id):this._save_element_instance(null,referenced_element_id,!0)}this._find_element_references(item,"find_my_expressions")}_find_element_references(node,expression_finder){let element_expressions=node[expression_finder]("GetElement");for(let exp of element_expressions){let element_id=exp.element_id();this._add_element(element_id,exp)}element_expressions=node[expression_finder]("ThisElement");for(let exp of element_expressions){let element_id=exp.context_element().id();this._add_element(element_id,exp)}element_expressions=node[expression_finder]("DefaultBreakpoint");for(let exp of element_expressions){var _exp$context_element$;let element_id=(_exp$context_element$=exp.context_element().root())==null?void 0:_exp$context_element$.id();element_id&&this._add_element(element_id,exp)}element_expressions=node[expression_finder]("ElementAncestor");for(let exp of element_expressions){let type=exp.get_static_property("ancestor_type"),save_element_instance=instance4=>{this._add_element(instance4.element.id(),exp)};get_runmode_element_ancestor_instance(type,this.context.element,save_element_instance)}let filter_fn=node2=>{var _node$_raw$S$properti;return node2._raw[S9.type]==="GetDataFromAPI"&&((_node$_raw$S$properti=node2._raw[S9.properties])==null?void 0:_node$_raw$S$properti.provider)==="ipify.GetIP"};for(let exp of node[expression_finder](filter_fn))evaluate_json(exp.json,this.context);!this.other_data["Current Position"]&&node[expression_finder](`PageData.
ame=Current Position`).length>0&&(this.other_data["Current Position"]=get_page_data("Current Position",this.context)),this.other_data["Current Page Scroll Position"]||(this.other_data["Current Page Scroll Position"]=page_current_scroll_position()),this.other_data["Current Page Width"]||(this.other_data["Current Page Width"]=page_width())}_add_element(element_id,exp){var _this$context$element3;let instance4=(_this$context$element3=this.context.element)==null?void 0:_this$context$element3.find_instance_by_id(element_id);if(!instance4)this._save_element_instance(null,element_id,!0);else{var _next$name;let instance_id=dehydrate_tree(instance4);this._save_element_instance(instance4,element_id);let next=exp.next(),message_name=next==null||(_next$name=next.name)==null?void 0:_next$name.call(next);if(message_name){var _this$element_state4,_this$element_state4$;(_this$element_state4$=(_this$element_state4=this.element_state)[instance_id])!=null||(_this$element_state4[instance_id]={});let message=get5("element."+element_id).get_message(message_name),fake_instance={state:key=>{let value=fromFrozenStateOr({frozen_state:this},state_keys_default.Message({prev:instance4,message:key,prior_btype_id:`element.${element_id}`}),()=>instance4.state(key));if(this.element_state[instance_id][key]=dehydrate_tree(value!=null?value:null),typeof value=="string"&&instance4.is_secure()&&value.trim().length>2){var _this$other_data,_this$other_data$secu;(_this$other_data$secu=(_this$other_data=this.other_data).secure_list)!=null||(_this$other_data.secure_list=[]),this.other_data.secure_list.push(value.trim())}return value},is_visible:()=>{let value=fromFrozenStateOr({frozen_state:this},state_keys_default.Message({prev:instance4,message:"is_visible",prior_btype_id:`element.${element_id}`}),()=>instance4.is_visible());return this.element_state[instance_id].is_visible=dehydrate_tree(value!=null?value:null),value},toUniqueString:()=>instance4.toUniqueString(),element:instance4.element,element_id:()=>instance4.element_id(),find_instance_by_id:id=>instance4.find_instance_by_id(id),is_destroyed:()=>instance4.is_destroyed(),run_mode:()=>instance4.run_mode(),get_static_property:(name,precomputed)=>instance4.get_static_property(name,precomputed),_watchers:instance4._watchers,_created_watchers:instance4._created_watchers,is_fake_instance:!0};message.evaluate(fake_instance,null,null,null,this.context)}}}clone(context){let clone=new _FrozenState(context);for(let prop of["cache","exists","element_instances","element_state","other_data"])clone[prop]=json_deep_copy(this[prop]);running_test()&&(clone.trustworthy=json_deep_copy(this.trustworthy));for(let states of object_values(clone.element_state))for(let[state4,value]of object_entries(states))value!=null&&value[NV_MARKER]&&delete states[state4];return clone}get_client_state(){return{element_instances:this.element_instances,element_state:this.element_state,other_data:this.other_data,cache:this.cache,exists:this.exists}}update_from_action(action,return_value,properties_promise,context){let changes={},set_data=(k,v)=>{this.set(k,v),changes[k]={v}},previous_step_key=state_keys_default.PreviousStep(action.id());return return_value&&set_data(previous_step_key,return_value),action.return_btype().id()&&set_data(previous_step_key+"_btype",action.return_btype().id()),properties_promise.then(properties=>{var _action$get_data_to_r;optional_pause();let to_refresh=(_action$get_data_to_r=action.get_data_to_refresh(properties,context))!=null?_action$get_data_to_r:{};return optional_pause(),object_entries(to_refresh).forEach(_ref2=>{let[key,value]=_ref2;if(optional_pause(),value!=null?(value===NULL_VALUE_TO_REGISTER&&(value=null),this.set(key,value),changes[key]={v:value}):(this.clear(key),changes[key]={x:!0}),on_server()&&key.indexOf(ESTATE_PREFIX)===0){let instance_id=key.replace(ESTATE_PREFIX,"");this.element_state[instance_id]&&object_entries(value).forEach(_ref3=>{let[state_name,new_value]=_ref3;optional_pause(),new_value!=null&&(this.element_state[instance_id][state_name]=dehydrate_tree(new_value))})}}),changes})}get(key){let short_key=this.shorten(key),value=this.exists[short_key]?this.cache[short_key]:void 0;return frozen_state_debugging.active()&&this.push_raw_access_log({action:"get",key,short_key,value:value!=null?value:null}),rehydrate_tree(lib_default().db_instance(),value)}set(key){var _async_state$CurrentN;let value=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(((_async_state$CurrentN=async_state_default3.CurrentNotReadyCatcher)==null?void 0:_async_state$CurrentN.length)>0)return;let short_key=this.shorten(key),dehydrated_value=dehydrate_tree(value);this.cache[short_key]=dehydrated_value,this.exists[short_key]=!0,on_client()||(this.trustworthy[short_key]=!0),frozen_state_debugging.active()&&(this.unshrunk_keys[short_key]=key,this.push_raw_access_log({action:"set",key,short_key,value:dehydrated_value}))}clear(key){let short_key=this.shorten(key);delete this.cache[short_key],delete this.exists[short_key],frozen_state_debugging.active()&&this.push_raw_access_log({action:"clear",short_key})}has_key(key){let short_key=this.shorten(key),value=this.exists[short_key];return frozen_state_debugging.active()&&this.push_raw_access_log({action:"has_key",short_key,value:value!=null?value:!1}),this.exists[short_key]}push_raw_access_log(_ref4){var _Error$stack;let{action,key,short_key,value,rehydrated}=_ref4;this.raw_access_log.push({action,short_key,key,value,rehydrated,timestamp:Date.now(),stack:((_Error$stack=new Error().stack)==null?void 0:_Error$stack.split(`
`).slice(2,52).join(`
`))||"Stack unavailable."})}is_trusted(key){if(on_client())return!0;{let short_key=this.shorten(key);return this.trustworthy[short_key]===!0}}trust(key){if(!on_client()){let short_key=this.shorten(key);this.trustworthy[short_key]=!0}}serialize(){return{cache:this.cache,exists:this.exists,element_instances:this.element_instances,element_state:this.element_state,other_data:this.other_data,trustworthy:this.trustworthy}}};FrozenState.dehydrate_context=null}});function waitForVisible(instance4){if(instance4._is_visible||instance4.is_visible(!0))return(0,import_b_async4.FakeKey)();let key=(0,import_b_async4.MakeKey)(void 0,`${instance4.element_id()} turned visible`);return instance4._is_visible_cbs.push(()=>{key.turn()}),key}function watchDraw(instance4,callbacks){function sizeDraw(instance5,parentDrawn){let turnedVisible=waitForVisible(instance5),selfDrawn=(0,import_b_async4.MakeKeyList)([parentDrawn,turnedVisible]);function iterateChildren(cb){if(!instance5.element.draws_own_children()){let iterate2=function(){instance5.children.forEach(child=>{child.element.added_to_container()&&cb(child)})};var iterate=iterate2;instance5.is_solid_initialized&&instance5.element.solid_component==null&&instance5.children.length>0?instance5.wait_for_first_draw(iterate2):iterate2()}}if(selfDrawn.is_turned())callbacks.onDraw(instance5),iterateChildren(child=>{sizeDraw(child,(0,import_b_async4.FakeKey)())});else{let sizeDrawChildren2=function(){instance5.element.ignores_child_sizes()?(0,import_b_async4.WaitFor)(selfDrawn,()=>{iterateChildren(child=>{sizeDraw(child,(0,import_b_async4.FakeKey)())})}):iterateChildren(child=>{sizeDraw(child,selfDrawn)})};var sizeDrawChildren=sizeDrawChildren2;callbacks.onSizeDraw(instance5),(0,import_b_async4.WaitFor)(selfDrawn,()=>callbacks.onDraw(instance5)),instance5.element.no_size_when_hidden()?(0,import_b_async4.WaitFor)(turnedVisible,sizeDrawChildren2):sizeDrawChildren2()}}sizeDraw(instance4,(0,import_b_async4.FakeKey)())}function isAlwaysDeferred(rawJson){let type=rawJson[S.type];if(ALWAYS_DEFERRED.has(type)||is_UUID(type))return!0;if(type==="CustomElement"){var _rawJson$S$properties;let customId=(_rawJson$S$properties=rawJson[S.properties])==null?void 0:_rawJson$S$properties[S.custom_id];if(customId==null)return!1;let customDefinition=appquery_default.custom_definition(customId);if(customDefinition==null)return!1;if(!customsChecked.has(customId)){if(customsChecking.has(customId))return!1;customsChecking.add(customId),checkNonDeferrable(customDefinition),customsChecked.add(customId)}return!mustRegister.has(customId)}if(type==="HTML"){var _rawJson$S$properties2;return((_rawJson$S$properties2=rawJson[S.properties])==null?void 0:_rawJson$S$properties2.defer_drawing)===!0}return!1}function checkNonDeferrableJson(rawJson){let nonDeferrable=!1,children2=rawJson[S.elements];if(children2!=null){for(let childJson of Object.values(children2))if((childJson==null?void 0:childJson[S.id])!=null){let childNonDeferrable=checkNonDeferrableJson(childJson);nonDeferrable||(nonDeferrable=childNonDeferrable)}}return nonDeferrable||!isAlwaysDeferred(rawJson)?(mustRegister.add(rawJson[S.id]),!0):!1}function checkNonDeferrable(root2){let rawJson=root2.json._raw();(rawJson==null?void 0:rawJson[S.id])!=null&&checkNonDeferrableJson(rawJson),(!root2.is_responsive_v1()||root2.events().some(event=>!event.deferrable()))&&mustRegister.add(root2.id())}function mustRegisterId(id){return mustRegister.has(id)}var import_web_dom_collections_iterator98,import_b_async4,ALWAYS_DEFERRED,customsChecking,customsChecked,mustRegister,init_drawstate=__esm({"lib-browser/renderer/drawstate.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator98=__toESM(require_web_dom_collections_iterator()),import_b_async4=__toESM(require_b_async());init_appquery();init_uuid();init_shrink();ALWAYS_DEFERRED=new Set(["Alert","AutocompleteDropdown","Button","Checkbox","CustomDefinition","DateInput","Dropdown","FileInput","FloatingGroup","GoogleMaps","Group","GroupFocus","GroupWithFocus","Icon","Image","Input","Link","MultiLineInput","Page","PictureInput","Popup","PoweredByBubble","RadioButtons","RepeatingGroup","Shape","SliderInput","TableElement","TableMainAxis","TableCrossAxis","TableCell","Text","VideoComponent"]),customsChecking=new Set,customsChecked=new Set,mustRegister=new Set}});var import_web_dom_collections_iterator99,Expression,init_Expression=__esm({"lib-browser/lang/expressions/Expression.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator99=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_logger();init_nodes();init_btypes();init_expression_utils();init_appquery();Expression=class extends nodes_default.HasProperties{constructor(json,owner){if(super(json),!owner)throw new UnexpectedError("expression created without owner");this.owner=owner,this._property_owner=this.owner}is_client_state(){return!1}make_new(){return nodes_default.new_expression(...arguments)}has_next(){return!1}has_args(){return!1}is_empty(){return!1}is_literal(){return!1}get_spot(){return"DynamicAtom"}get_literal(){return null}get_eval_value(){return get5("null")}raw(){return this.json.raw()}node_name(){return this.json.name()}get_tree_display(){return this.display()}display_simple(){return this.display()}element_id(){return this.get_static_property("element_id")}pretty_print(indent){try{return indent+this.get_tree_display()}catch(err){return`${indent}Error trying to pretty_print ${this.constructor.name}:
${err.stack}`}}get_changelog_type(){var _this$owner;return(_this$owner=this.owner)==null?void 0:_this$owner.get_changelog_type()}context_element(){return this.owner.context_element()}parent_expression(){var _this$owner$type,_this$owner2;let parent_json=this.json.parent(),owner_path=this.owner.path();return!owner_path||!parent_json||parent_json.path()===owner_path||((_this$owner$type=(_this$owner2=this.owner).type)==null?void 0:_this$owner$type.call(_this$owner2))==="FakeMultiElement"?null:nodes_default.new_expression(parent_json,this.owner)}parent_expressions(filter){let res=[],cur=this;for(;cur=cur.parent_expression();)res.push(cur);return nodes_default.filter_array(filter,res)}safe_search_upwards(search_fn){let search_node=this;for(search_node!=null&&typeof search_node.json.id!="function"&&warn("Missing ID function",{original_node_path:this.path(),search_node_json_type:typeof search_node.json,original_node_id:this.id(),search_node_id:search_node.json.id});search_node!=null&&(search_node.id()==null||typeof search_node.id()=="string")&&appquery_default.by_id(search_node.id())==null;){let found=search_fn(search_node);if(found!==!1)return found;if(search_node.path().split(".").length<2)return info("Blocked reading the full app",{parent_path:search_node.path(),original_node_path:this.path(),original_node_id:this.id()}),!1;search_node=search_node.parent_expression(),search_node!=null&&typeof search_node.json.id!="function"&&warn("Missing ID function",{search_node_json_type:typeof search_node.json,search_node_id:search_node.json.id,original_node_path:this.path(),original_node_id:this.id(),parent_path:search_node.path()})}return!1}serialize_args(){return[this.json,this.owner]}find_expressions(filter){return nodes_default.from_raw_array(this.json,nodes_default.new_expression,expression_find_expressions(nodes_default.to_raw(this),nodes_default.make_filter(filter)))}}}});var StaticExpression,init_StaticExpression=__esm({"lib-browser/lang/expressions/StaticExpression.js"(){"use strict";init_define_process_env();init_shim();init_nodes();init_Expression();StaticExpression=class extends Expression{is_static(){return!0}find_expressions(){return nodes_default.enhance_array([])}field_names(){return{}}}}});var Empty,init_Empty=__esm({"lib-browser/lang/expressions/Empty.js"(){"use strict";init_define_process_env();init_shim();init_btypes();init_StaticExpression();Empty=class extends StaticExpression{get_static(){return null}is_empty(){return!0}get_btype(){return get5("null")}get_eval_value(){return get5("null")}display(){return""}type(){return"Empty"}get_spot(){return"Atom"}}}});var Literal,init_Literal=__esm({"lib-browser/lang/expressions/Literal.js"(){"use strict";init_define_process_env();init_shim();init_btypes();init_expression_utils();init_StaticExpression();Literal=class extends StaticExpression{get_static(){return this.json.get()}is_literal(){return!0}get_literal(){return this.json.get()}type(){return typeof this.json.get()}get_btype(){return get5(lit_eval_value(this.type()))}get_eval_value(){return get5(lit_eval_value(this.type()))}get_spot(){return"Atom"}get_tree_display(){let val=this.json.get();switch(this.type()){case"string":case"number":return val;case"boolean":return val?"yes":"no"}}display(){let val=this.json.get();switch(this.type()){case"string":return"\u201C"+val+"\u201D";case"boolean":return val?'"yes"':'"no"';case"number":return val}}display_simple(){let val=this.json.get();switch(this.type()){case"string":return val;case"boolean":return val?'"yes"':'"no"';case"number":return val}}}}});function is_static(_raw3){if(!_raw3)return!0;let type=_raw3[S10.type];if(type){if(type==="GeoAddress"||type==="Empty")return!0;if(type==="TextExpression"){var _raw$S$entries;let entries=(_raw$S$entries=_raw3[S10.entries])!=null?_raw$S$entries:{};return Object.values(entries).every(v=>is_static(v))}else return!1}return typeof _raw3=="object"?Object.values(_raw3).every(v=>is_static(v)):!0}function get_static(_raw3){if(_raw3==null)return null;let type=_raw3[S10.type];if(type)switch(type){case"Empty":return null;case"Message":return null;case"TextExpression":return get_static_text_expression(_raw3);case"GeoAddress":return _raw3[S10.val];default:return null}return typeof _raw3=="object"?get_static_object_literal(_raw3):_raw3}function get_static_text_expression(_raw3){let entries=_raw3[S10.entries];return raw_to_child_names(entries).map(_entry_name=>get_static(entries[_entry_name])).join("")}function get_static_object_literal(_raw3){let res={};for(let k in _raw3){let v=_raw3[k],evaled=get_static(v);res[expand(k)]=evaled}return res}var import_web_dom_collections_iterator100,S10,init_evaluate_static=__esm({"lib-browser/lang/evaluation/evaluate_static.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator100=__toESM(require_web_dom_collections_iterator());init_json_utils();init_shrink();({S:S10}=shrink_exports)}});function _applyDecoratedDescriptor2(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator101,_dec3,_class20,ObjectLiteral,init_ObjectLiteral=__esm({"lib-browser/lang/expressions/ObjectLiteral.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator101=__toESM(require_web_dom_collections_iterator());init_nodes();init_caching();init_evaluate_static();init_Expression();ObjectLiteral=(_dec3=cached({type:RUN_MODE}),_class20=class extends Expression{set_field_data(field_data_fn){this.field_names=()=>field_data_fn().map(item=>item.name),this._fields=field_data_fn}entry(name){return nodes_default.new_expression(this.json.child(name),this.owner)}type(){return"ObjectLiteral"}id(){let id=super.id();return typeof id!="string"?null:id}next(){if(!this.json.child("next").empty())return this.entry("next")}display(){return this.pretty_print(" ")}pretty_print(){let indent=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",header=indent+"ObjectLiteral:",body=this.entries().flatMap(entry=>[indent+"  "+entry.json.name(),entry.pretty_print(indent+"    ",!1)]);return[header,...body].join(`
`)}_process(e_fn){let res={};for(let entry of this.entries()){let evaled=e_fn(entry);res[entry.json.name()]=evaled}return res}properties(){return this.entries()}property(name){return this.entry(name)}get_static_property(name){return this.property(name).get_static()}is_static(){return this.entries().every(entry=>entry.is_static())}get_static(){return get_static_object_literal(this.json._raw())}check_for_errors(){return{children:this.properties()}}entries(){return nodes_default.enhance_array(this.json.children().map(json=>nodes_default.new_expression(json,this.owner)))}},_applyDecoratedDescriptor2(_class20.prototype,"entries",[_dec3],Object.getOwnPropertyDescriptor(_class20.prototype,"entries"),_class20.prototype),_class20)}});function _applyDecoratedDescriptor3(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator102,_dec4,_class21,S11,TextExpression,TextExpression_default,init_TextExpression=__esm({"lib-browser/lang/expressions/TextExpression.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator102=__toESM(require_web_dom_collections_iterator());init_nodes();init_caching();init_btypes();init_shrink();init_evaluate_static();init_Expression();({S:S11}=shrink_exports),TextExpression=(_dec4=cached({type:RUN_MODE}),_class21=class extends Expression{entry(name){return nodes_default.new_expression(this.json._gchild(S11.entries,shrink(name)),this.owner)}type(){return"TextExpression"}properties(){return this.entries()}is_static(){return this.entries().every(entry=>entry.is_static())}get_static(){return get_static_text_expression(this.json._raw())}get_tree_display(make_dynamic_null){return this.entries().map(entry=>entry.get_tree_display(make_dynamic_null)).join("")}display(){return this.get_tree_display()}get_eval_value(){return get5("text")}field_names(){return{}}entries(){return nodes_default.enhance_array(this.json._child(S11.entries).children().map(json=>nodes_default.new_expression(json,this.owner)))}},_applyDecoratedDescriptor3(_class21.prototype,"entries",[_dec4],Object.getOwnPropertyDescriptor(_class21.prototype,"entries"),_class21.prototype),_class21),TextExpression_default=TextExpression}});var S12,LiveExpression,init_LiveExpression=__esm({"lib-browser/lang/expressions/LiveExpression.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_lib();init_btypes();init_shrink();init_nodes();init_Expression();({S:S12}=shrink_exports),LiveExpression=class extends Expression{has_next(){return!0}is_static(){return!1}get_static(){return null}get_static_property_fetcher(){return name=>this.get_static_property(name)}get_tree_display(make_dynamic_null){if(make_dynamic_null){var _this$get_eval_value,_this$get_eval_value$,_this$get_eval_value$2;return(_this$get_eval_value=this.get_eval_value)==null||(_this$get_eval_value$=_this$get_eval_value.call(this))==null||(_this$get_eval_value$2=_this$get_eval_value$.get_bubble_null)==null?void 0:_this$get_eval_value$2.call(_this$get_eval_value$)}let base_display=this.display(),args_display=this.has_args()?this.args().get_tree_display():"",next_display=this.has_next()?this.next().get_tree_display():"";return base_display+args_display+next_display}next(){return nodes_default.new_expression(this.json._child(S12.next),this.owner)}type(){return this.json.child("type").get()}get_eval_value(report){if(this.has_args()){let args=this.args();if(!this.get_arg_btype().matches(args.get_eval_value())){if(report){let new_display=this.get_arg_btype().display(),old_display=args.get_eval_value().display_for_issue();old_display===new_display&&(old_display="different "+old_display);let an=/^[aeiou]/.test(old_display[0])?"an":"a";report(`This argument should be a ${new_display} but right now it is ${an} ${old_display}`,args)}return get5("null")}}let next=this.next();return next.is_empty()?this.get_btype():next.get_eval_value(report)}_find_used_properties(){return this.get_spot()==="SlidableAtom"?this.fields().filter(field=>lib_default().getChecker(this,field).condition()).map(field=>this.property(field.name)):this.properties()}}}});var import_web_dom_collections_iterator103,DataSource,init_DataSource=__esm({"lib-browser/lang/expressions/DataSource.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator103=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_btypes();init_expression_utils();init_LiveExpression();DataSource=class extends LiveExpression{constructor(json,owner,type){var _this$D;super(json,owner),this.D=lib_default().load_plugin(lib_default().plugin_prefixes.datasource+type,!0),(_this$D=this.D)!=null||(this.D=missing_datasource(type)),this._type=type}is_client_state(){var _this$D$is_client_sta,_this$D$is_client_sta2,_this$D2;return(_this$D$is_client_sta=(_this$D$is_client_sta2=(_this$D2=this.D).is_client_state)==null?void 0:_this$D$is_client_sta2.call(_this$D2,this.get_static_property_fetcher()))!=null?_this$D$is_client_sta:!1}field_names(){if(!this.D.field_names)throw new UnexpectedError("missing field_names for datasource "+this._type);return this.D.field_names}_fields(){return this.D.fields(this.get_static_property_fetcher(),this)}has_args(){return!1}get_btype(){let btype_id=this.D.get_btype(this.get_static_property_fetcher(),this);return get5(btype_id)}display(){return this.D.display?this.D.display(this.get_static_property_fetcher(),this):`DataSource ${this._type}`}get_spot(){var _this$D$get_spot,_this$D$get_spot2,_this$D3;return(_this$D$get_spot=(_this$D$get_spot2=(_this$D3=this.D).get_spot)==null?void 0:_this$D$get_spot2.call(_this$D3))!=null?_this$D$get_spot:"DynamicAtom"}get_literal(){return this.raw()}serialize_args(){return[this.json,this.owner,this._type]}is_equal_to(node){return super.is_equal_to(node)&&this._type===node._type}thumbnail_id(){var _this$D$thumbnail_id,_this$D$thumbnail_id2,_this$D4;return(_this$D$thumbnail_id=(_this$D$thumbnail_id2=(_this$D4=this.D).thumbnail_id)==null?void 0:_this$D$thumbnail_id2.call(_this$D4,this.get_static_property_fetcher(),this))!=null?_this$D$thumbnail_id:super.thumbnail_id()}}}});function message_not_found(name){return{fn(){},ret_btype:()=>get5("null"),arg_btype:()=>null,spot_data(){},field_names:{},_fields(){},M:()=>({}),description:()=>`[Not found: ${name}]`,NOT_FOUND:!0}}var MessageNode,init_MessageNode=__esm({"lib-browser/lang/expressions/MessageNode.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_nodes();init_btypes();init_LiveExpression();MessageNode=class extends LiveExpression{constructor(json,owner){var _this$prior$get_btype,_this$prior$get_btype2,_this$prior,_this$_parent_value$g,_this$_parent_value;super(json,owner),this._name=this.json.child("name").get(),this._parent_value=(_this$prior$get_btype=(_this$prior$get_btype2=(_this$prior=this.prior()).get_btype)==null?void 0:_this$prior$get_btype2.call(_this$prior))!=null?_this$prior$get_btype:get5("null"),this._message=(_this$_parent_value$g=(_this$_parent_value=this._parent_value)==null?void 0:_this$_parent_value.get_message(this.name()))!=null?_this$_parent_value$g:message_not_found(this._name)}name(){return this._name}is_client_state(){var _this$_message$is_cli,_this$_message$is_cli2,_this$_message;return(_this$_message$is_cli=(_this$_message$is_cli2=(_this$_message=this._message).is_client_state)==null?void 0:_this$_message$is_cli2.call(_this$_message,this.get_static_property_fetcher()))!=null?_this$_message$is_cli:!1}is_equal_to(node){return!(!super.is_equal_to(node)||this._name!==node.name()||this._parent_value.id()!==node._parent_value.id()||this.get_btype().id()!==node.get_btype().id())}message(){return this._message}get_btype(){return this._message.ret_btype(this.json._raw())}has_args(){return this._message.arg_btype()!=null}args(){return nodes_default.new_expression(this.json.child("args"),this.owner)}get_arg_btype(){return this._message.arg_btype()}prior(){return nodes_default.new_expression(this.json.parent(),this.owner)}get_spot(){var _this$_message$spot_d;return(_this$_message$spot_d=this._message.spot_data())!=null?_this$_message$spot_d:"DynamicAtom"}field_names(){if(!this._message.field_names){var _this$_parent_value2,_this$_parent_value2$;throw new UnexpectedError("message "+this._name+" on  "+((_this$_parent_value2=this._parent_value)==null||(_this$_parent_value2$=_this$_parent_value2.display)==null?void 0:_this$_parent_value2$.call(_this$_parent_value2))+" is missing field_names")}return this._message.field_names()}display(){return this._message.description(this)}}}});var GeoAddressNode,init_GeoAddressNode=__esm({"lib-browser/lang/expressions/GeoAddressNode.js"(){"use strict";init_define_process_env();init_shim();init_b_location();init_btypes();init_StaticExpression();GeoAddressNode=class extends StaticExpression{is_static(){return!0}get_address(){return get_address(this.json.child("val").raw())}get_static(){return this.json.child("val").raw()}get_literal(){return this.json.child("val").raw()}type(){return"GeoAddress"}get_eval_value(){return get5("geographic_address")}get_tree_display(){return this.get_address()}display(){return this.get_address()}}}});var expressions_exports={};__export(expressions_exports,{create_reduced:()=>create_reduced3,expression_find_expressions:()=>expression_find_expressions2,get_static:()=>get_static2,is_static:()=>is_static2,make_partial_expression_evaluator:()=>make_partial_expression_evaluator2});function create_expression_edit(json,owner){var _owner$type,_owner$type2,_owner$id,_owner$id2;let owner_type=(_owner$type=(_owner$type2=owner.type)==null?void 0:_owner$type2.call(owner))!=null?_owner$type:"no_type",smart_cache_key=`expression_${(_owner$id=(_owner$id2=owner.id)==null?void 0:_owner$id2.call(owner))!=null?_owner$id:"no_id"}_${owner_type}`;return json.smart_cache(smart_cache_key,new_expression2,owner)}function create_expression_base(json,owner){return json.smart_cache("expression",new_expression2,owner)}function new_expression2(json,owner){if(json.empty())return new Empty(json,owner);let type=json.child("type").get();if(type)switch(type){case"Empty":return new Empty(json,owner);case"Message":return new MessageNode(json,owner);case"TextExpression":return new TextExpression_default(json,owner);case"GeoAddress":return new GeoAddressNode(json,owner);default:return new DataSource(json,owner,type)}return json.raw_type()==="object"?new ObjectLiteral(json,owner):new Literal(json,owner)}var make_partial_expression_evaluator2,create_reduced3,expression_find_expressions2,get_static2,is_static2,init_expressions=__esm({"lib-browser/lang/expressions/index.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_nodes();init_Expression();init_Empty();init_Literal();init_ObjectLiteral();init_TextExpression();init_LiveExpression();init_DataSource();init_MessageNode();init_GeoAddressNode();init_expression_utils();init_evaluate();init_evaluate_static();make_partial_expression_evaluator2=make_partial_expression_evaluator,create_reduced3=create_reduced,expression_find_expressions2=expression_find_expressions,get_static2=get_static,is_static2=is_static;nodes_default.add(nodes_default.EXPRESSION,Expression);nodes_default.add(nodes_default.EMPTY,Empty);nodes_default.add(nodes_default.LITERAL,Literal);nodes_default.add(nodes_default.OBJECT_LITERAL,ObjectLiteral);nodes_default.add(nodes_default.TEXT_EXPRESSION,TextExpression_default);nodes_default.add(nodes_default.LIVE_EXPRESSION,LiveExpression);nodes_default.add(nodes_default.DATA_SOURCE,DataSource);nodes_default.add(nodes_default.MESSAGE_NODE,MessageNode);nodes_default.add(nodes_default.GEO_ADDRESS_NODE,GeoAddressNode);nodes_default.add_generic("expression",is_edit_mode()?create_expression_edit:create_expression_base)}});function _applyDecoratedDescriptor4(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}function run_mode_unique_id(id){if(_used_ids[id]==null)return _used_ids[id]=0,id;{let ret=id+"_"+String(_used_ids[id]);return _used_ids[id]++,ret}}var import_web_dom_collections_iterator104,import_web_immediate3,import_autorun2,import_dependency5,import_b_async5,_dec5,_class24,_class25,Mode,ALL_MODES2,lifecycle_statuses,_used_ids,ElementInstance,ElementInstance_default,init_ElementInstance=__esm({"lib-browser/lang/elements/ElementInstance.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator104=__toESM(require_web_dom_collections_iterator()),import_web_immediate3=__toESM(require_web_immediate());init_solid();init_decaf();init_logger();init_eval();init_caching();init_responsive_layout();init_elements();init_elements_utils();init_rendering_perf();init_resize_observer();init_lodash();init_FrozenState();init_page_state();init_drawstate();init_lib();init_expressions();init_client_config2();init_appquery();init_hydrate();init_loggable();import_autorun2=__toESM(require_autorun()),import_dependency5=__toESM(require_dependency());init_errors();import_b_async5=__toESM(require_b_async());init_uuid();init_b_window();init_mode_check();Mode=function(Mode2){return Mode2.RUN="run",Mode2.EDIT="edit",Mode2.THUMBNAIL="thumbnail",Mode2.RESPONSIVE="responsive",Mode2.REUSABLE_EDIT="reusable_edit",Mode2}(Mode||{}),ALL_MODES2=Object.values(Mode),lifecycle_statuses={NONE:0,CONSTRUCTED:1,REGISTERED:2,HAS_SKELETON:4,DRAWN:8,CHILDREN_REGISTERED:16,CHILDREN_DEFERRED:32,CHILDREN_DRAWN:64,SOLID_INITIALIZED:128,CHILDREN_BEING_REGISTERED:256},_used_ids={};ElementInstance=(_dec5=cached({type:RUN_MODE}),_class24=(_class25=class ElementInstance2{get legacy_container(){if(this.container==null)throw new UnexpectedError("Container not set");return this.container}constructor(element,mode){if(this.element=void 0,this.mode=void 0,this.status=void 0,this.canvas=void 0,this._parent=void 0,this.container=void 0,this.child_container=void 0,this.__to_string=void 0,this._destroy_fns=[],this._watchers={},this._created_watchers={},this._msg_handlers={},this._states={},this._has_been_hidden=null,this._has_become_visible=void 0,this.setup_sizing_key=void 0,this._is_visible=null,this._is_visible_cbs=[],this._first_draw_cbs=[],this._is_drawing=!1,this._is_visible_dependency=(0,import_dependency5.Dependency)(),this.repeating_layout_type=void 0,this.repeating_group_layout=void 0,this.table_element_layout=void 0,this.activeTimeouts=void 0,this._setting_visible=!1,this._is_animating_me=!1,this._instance_opacity=void 0,this._is_animating=!1,this._is_animating_dependency=void 0,this.__is_visible_me=!1,this._is_visible_me_dependency=void 0,this.evaluating_visibility=!1,this._wait_for_visible_polls=0,this._destroy_started=void 0,this._id_namespace=void 0,this._our_children_registered=void 0,this._our_skeleton_ready=void 0,this._is_ready_key=void 0,this._our_children_drawn=void 0,this.__dimension_box_width=void 0,this.__dimension_box_height=void 0,this._sizing_setup=!1,this._p_context=void 0,this._grouped_autoruns=new Map,this._children=void 0,this.draw_signal=void 0,this._old_width=void 0,this._transforms=void 0,!ALL_MODES2.includes(mode))throw new UnexpectedError("unrecognized: "+mode);this.element=element,this.mode=mode,this.status=lifecycle_statuses.CONSTRUCTED,mode!==Mode.RUN&&(this._children=[]),record_lifecycle(LifecycleEvent.Constructed),this.__to_string="ElementInstance:"+this.element.type(),this._has_become_visible=(0,import_b_async5.MakeKey)(void 0,"Become Visible Key"),this.setup_sizing_key=(0,import_b_async5.MakeKey)(void 0,"setup sizing key"),this._is_visible_me=(0,import_autorun2.autorun_top)(()=>this.element.is_visible_on_page_load()),this.state("current_width",instance4=>on_react_native()?(this.state("run_on_layout",!0),this.setup_sizing_key.is_turned()?instance4.state("current_width"):((0,import_b_async5.throw_not_ready)(this.setup_sizing_key,!0),0)):(instance4.setup_sizing(),instance4.state("current_width"))),this.state("current_height",instance4=>on_react_native()?(this.state("run_on_layout",!0),this.setup_sizing_key.is_turned()?instance4.state("current_height"):((0,import_b_async5.throw_not_ready)(this.setup_sizing_key,!0),0)):(instance4.setup_sizing(),instance4.state("current_height"))),on_react_native()&&this.state("is_pressed",instance4=>(this.state("run_on_is_pressed",!0),!1))}_set_immediate(fn){setImmediate(fn)}_update_visible(){let new_vis=!0;if(this.edit_mode()&&!this.container)new_vis=!1;else if(!this._is_visible_me)new_vis=!1;else{let parent=this.parent();if(parent&&(!parent._is_visible||parent._setting_visible)&&(this.element.added_to_container()||this.element.type()==="GroupItem")&&(new_vis=!1),this.element.type()==="TableCell"){let mainAxis=this.find_instance_by_id_no_retry(this.get_static_property("cell_main_axis_id"));mainAxis&&(!mainAxis._is_visible||mainAxis._setting_visible)&&(new_vis=!1)}}if(new_vis!==this._is_visible){this._is_visible=new_vis,this._setting_visible=!0;let to_call=this._is_visible_cbs;this._is_visible_cbs=[],(0,import_autorun2.autorun_top)(()=>{for(let cb of to_call)cb()}),new_vis&&this._has_become_visible.turn(),this._setting_visible=!1;for(let child of this.current_children)child._update_visible();if(this.element.type()==="TableMainAxis"){var _this$parent$children,_this$parent;let crossAxes=(_this$parent$children=(_this$parent=this.parent())==null?void 0:_this$parent.children.filter(child=>child.element.type()==="TableCrossAxis"))!=null?_this$parent$children:[];for(let crossAxis of crossAxes)for(let cell of crossAxis.children.flatMap(possibleCell=>possibleCell.element.type()==="TableCell"?[possibleCell]:possibleCell.children))cell.get_static_property("cell_main_axis_id")===this.element_id()&&cell._update_visible()}this._is_visible_dependency.invalidate()}}set_animating(state4){this._is_animating_me!==state4&&(this._is_animating_me=state4,this._update_animating())}_update_animating(){var _this$parent2;let is_animating=this._is_animating_me||((_this$parent2=this.parent())==null?void 0:_this$parent2._is_animating);if(this._is_animating!==is_animating){var _this$_is_animating_d;this._is_animating=!!is_animating;for(let child of this.current_children)child._update_animating();(_this$_is_animating_d=this._is_animating_dependency)==null||_this$_is_animating_d.invalidate()}}is_animating(skip_dependency){if(!skip_dependency){var _this$_is_animating_d2;(_this$_is_animating_d2=this._is_animating_dependency)!=null||(this._is_animating_dependency=(0,import_dependency5.Dependency)()),this._is_animating_dependency.register()}return this._is_animating}set _is_visible_me(new_val){var _this$_is_visible_me_;this.__is_visible_me=new_val,(_this$_is_visible_me_=this._is_visible_me_dependency)==null||_this$_is_visible_me_.invalidate()}get _is_visible_me(){return this.__is_visible_me}is_visible_me(){var _this$_is_visible_me_2;return(_this$_is_visible_me_2=this._is_visible_me_dependency)!=null||(this._is_visible_me_dependency=(0,import_dependency5.Dependency)()),this._is_visible_me_dependency.register(),this._is_visible_me}is_visible(skip_dependency){if(this.evaluating_visibility){let element_name=this.element.get_name(!0);throw new OwnerError(`Recursion when evaluating visibility on element "${element_name}"`)}return this._update_visible(),skip_dependency||this._is_visible_dependency.register(),!!this._is_visible}wait_for_visible_lite(cb,wait_in_thumbnail){if(!this.is_destroyed()){if(this.thumbnail_mode()&&!wait_in_thumbnail){cb();return}if(this.canvas==null&&!on_react_native()){this.wait_for_first_draw(()=>this.wait_for_visible_lite(cb,wait_in_thumbnail));return}this.is_visible(!0)?cb():this._is_visible_cbs.push(cb)}}notify_width(width2){var _this$element$E$notif,_this$element$E;this._dimension_box("width",width2),(_this$element$E$notif=(_this$element$E=this.element.E).notify_width)==null||_this$element$E$notif.call(_this$element$E,this,width2)}wait_for_visible(cb){if(this.is_destroyed())return;if(on_react_native()){this.wait_for_visible_lite(()=>(0,import_b_async5.WaitFor)(this.get_skeleton_ready_key(),cb));return}if(this.canvas==null){this.wait_for_first_draw(()=>this.wait_for_visible(cb));return}let wait_for_visible_polls_one_call=0;if(this.is_visible(!0)){if(this.is_destroyed())return;if(this.canvas.is(":visible"))cb();else{let observer2=new MutationObserver((mutations,obs)=>{if(this.canvas.is(":visible")){obs.disconnect(),cb();return}this._wait_for_visible_polls+=1,wait_for_visible_polls_one_call+=1,this._wait_for_visible_polls%100===0&&Math.random()<.01&&info("poll from wait_for_visible increment of 100",{polls:wait_for_visible_polls_one_call,all_polls:this._wait_for_visible_polls,element_name:this.element.get_name(!0),element_type:this.element.type()}),wait_for_visible_polls_one_call>=50&&wait_for_visible_polls_one_call%50===0&&Math.random()<.05&&info("polls from one wait_for_visible call over 50 increment of 50",{polls:wait_for_visible_polls_one_call,all_polls:this._wait_for_visible_polls,element_name:this.element.get_name(!0),element_type:this.element.type()})});observer2.observe(this.canvas[0],{attributes:!0,childList:!0,attributeFilter:["style"]});let parent_instance=this.parent();for(;parent_instance&&parent_instance.element.type()!=="Page";){let parent_canvas=parent_instance.canvas[0];observer2.observe(parent_canvas,{attributes:!0,childList:!0,attributeFilter:["style"]}),parent_instance=parent_instance.parent()}this.on_destroy(()=>{observer2.disconnect()})}}else this.wait_for_visible_lite(this.wait_for_visible.bind(this,cb),!0)}ensure_visible(){let ensure_visible_lite_key=(0,import_b_async5.MakeKey)(void 0,"element visible lite key");this.wait_for_visible_lite(()=>ensure_visible_lite_key.turn(),!0),(0,import_b_async5.ensure_ready)(ensure_visible_lite_key);let ensure_visible_key=(0,import_b_async5.MakeKey)(void 0,"element visible key"),visibility_check=()=>{var _this$canvas;(_this$canvas=this.canvas)!=null&&_this$canvas.is(":visible")&&(this.clearInterval(interval),ensure_visible_key.turn())},interval=this.setInterval(visibility_check,150);visibility_check(),(0,import_b_async5.ensure_ready)(ensure_visible_key)}should_collapse(){return!this.is_visible_me()&&!(this.is_animating()&&this._is_animating_me)}setTimeout(func,delay2){var _this$activeTimeouts2;let timeout=setTimeout(()=>{var _this$activeTimeouts;(_this$activeTimeouts=this.activeTimeouts)==null||_this$activeTimeouts.delete(timeout),func()},delay2);return this.activeTimeouts=(_this$activeTimeouts2=this.activeTimeouts)!=null?_this$activeTimeouts2:new Set,this.activeTimeouts.add(timeout),timeout}clearTimeout(timeout){var _this$activeTimeouts3;(_this$activeTimeouts3=this.activeTimeouts)==null||_this$activeTimeouts3.delete(timeout),clearTimeout(timeout)}setInterval(func,delay2){var _this$activeTimeouts5;let interval=setInterval(()=>{var _this$activeTimeouts4;(_this$activeTimeouts4=this.activeTimeouts)==null||_this$activeTimeouts4.delete(interval),func()},delay2);return this.activeTimeouts=(_this$activeTimeouts5=this.activeTimeouts)!=null?_this$activeTimeouts5:new Set,this.activeTimeouts.add(interval),interval}clearInterval(interval){var _this$activeTimeouts6;(_this$activeTimeouts6=this.activeTimeouts)==null||_this$activeTimeouts6.delete(interval),clearInterval(interval)}destroy(){var _this$canvas2,_this$canvas3;if(!this._destroy_started){this._destroy_started=!0,(_this$canvas2=this.canvas)!=null&&_this$canvas2[0].bubble_data&&delete this.canvas[0].bubble_data;for(let timeout of(_this$activeTimeouts7=this.activeTimeouts)!=null?_this$activeTimeouts7:[]){var _this$activeTimeouts7;clearTimeout(timeout)}for(let child of this.current_children)child.destroy();for(let fn of this._destroy_fns)try{fn()}catch(err){error("Error running destroy function",{error:ensure_bubble_error(err),element_id:this.element_id()})}this._destroy_fns=[],(_this$canvas3=this.canvas)==null||_this$canvas3.trigger("destroy.dot"),this.canvas="destroyed",this._msg_handlers=void 0,this._watchers=void 0,this.children=void 0,this._first_draw_cbs=[],this._is_visible_cbs=[]}}is_destroyed(){return this.canvas==="destroyed"}destroy_started(){return!!this._destroy_started}on_destroy(fn){this.is_destroyed()?fn():this._destroy_fns.push(fn)}get_canvas(){return this.canvas}get_outer_canvas(){var _this$canvas4,_this$canvas4$parent;return this.edit_mode()?(_this$canvas4=this.canvas)==null||(_this$canvas4$parent=_this$canvas4.parent)==null?void 0:_this$canvas4$parent.call(_this$canvas4):this.canvas}get_children_canvas(){var _this$element$E$get_c,_this$element$E2;return(_this$element$E$get_c=(_this$element$E2=this.element.E).get_children_canvas)==null?void 0:_this$element$E$get_c.call(_this$element$E2,this)}total_descendants(){return this.children.reduce((total,child)=>total+child.total_descendants(),this.children.length)}toString(){return this.__to_string}element_id(){return this.element.id()}parent(){var _this$_parent,_this$container;return(_this$_parent=this._parent)!=null?_this$_parent:(_this$container=this.container)==null?void 0:_this$container.get_owner()}root_instance(){var _this$parent$root_ins,_this$parent3;return(_this$parent$root_ins=(_this$parent3=this.parent())==null?void 0:_this$parent3.root_instance())!=null?_this$parent$root_ins:this}split_namespace(){this._id_namespace={},this._id_namespace[this.element_id()]=this}mark_children_registered(){var _this$_our_children_r;this.status|=lifecycle_statuses.CHILDREN_REGISTERED,(_this$_our_children_r=this._our_children_registered)==null||_this$_our_children_r.turn()}mark_skeleton_ready(){var _this$_our_skeleton_r;if(this.status|=lifecycle_statuses.HAS_SKELETON,(_this$_our_skeleton_r=this._our_skeleton_ready)==null||_this$_our_skeleton_r.turn(),this.element.can_defer_drawing()){var _this$_is_ready_key;(_this$_is_ready_key=this._is_ready_key)==null||_this$_is_ready_key.turn()}}mark_solid_initialized(){if(this.status|=lifecycle_statuses.SOLID_INITIALIZED,this.element.can_defer_drawing()){var _this$_is_ready_key2;(_this$_is_ready_key2=this._is_ready_key)==null||_this$_is_ready_key2.turn()}}mark_drawn(){if(!this.is_drawn){var _this$_is_ready_key3;this.status|=lifecycle_statuses.DRAWN,record_lifecycle(LifecycleEvent.Drawn),element_counts.element_instances.add(this.element.type(),1),(_this$_is_ready_key3=this._is_ready_key)==null||_this$_is_ready_key3.turn(),this.run_draw_cbs()}}get_skeleton_ready_key(){if(this.has_skeleton)return(0,import_b_async5.FakeKey)();var _this$_our_skeleton_r2;return(_this$_our_skeleton_r2=this._our_skeleton_ready)!=null||(this._our_skeleton_ready=(0,import_b_async5.MakeKey)(void 0,`_our_skeleton_ready_${this.toUniqueString()}`)),this._our_skeleton_ready}get_children_drawn_key(){var _this$_our_children_d;return(_this$_our_children_d=this._our_children_drawn)!=null||(this._our_children_drawn=(0,import_b_async5.MakeKey)(void 0,`_our_children_drawn_${this.toUniqueString()}`)),this._our_children_drawn}get_children_registered_key(){if(this.children_are_registered)return(0,import_b_async5.FakeKey)();var _this$_our_children_r2;return(_this$_our_children_r2=this._our_children_registered)!=null||(this._our_children_registered=(0,import_b_async5.MakeKey)(void 0,"_our_children_registered")),this._our_children_registered}get_is_ready_key(){if(this.is_ready)return(0,import_b_async5.FakeKey)();var _this$_is_ready_key4;return(_this$_is_ready_key4=this._is_ready_key)!=null||(this._is_ready_key=(0,import_b_async5.MakeKey)(void 0,"_self_ready")),this._is_ready_key}get_namespace(){var _this$_id_namespace,_this$parent4;return(_this$_id_namespace=this._id_namespace)!=null?_this$_id_namespace:(_this$parent4=this.parent())==null?void 0:_this$parent4.get_namespace()}add_to_namespace(instance4,element_id){var _element_id;(_element_id=element_id)!=null||(element_id=instance4.element_id());let namespace=this.get_namespace();namespace!=null&&(namespace[element_id]=instance4)}child_namespace_prefix(){let parent=this.parent();return parent?this._id_namespace?this.toUniqueString()+":":parent.child_namespace_prefix():""}toUniqueString(){var _this$parent$child_na,_this$parent5;return((_this$parent$child_na=(_this$parent5=this.parent())==null?void 0:_this$parent5.child_namespace_prefix())!=null?_this$parent$child_na:"")+this.element_id()}dehydrate(){var _FrozenState$dehydrat,_FrozenState$dehydrat2;return(_FrozenState$dehydrat=FrozenState.dehydrate_context)==null||(_FrozenState$dehydrat2=_FrozenState$dehydrat.instance)==null||_FrozenState$dehydrat2.call(_FrozenState$dehydrat,this),dehydrate_prefix(ELEMENT_INSTANCE_DEHYDRATE)+this.toUniqueString()}try_register(element,desired_id){var _instance;let instance4=this.find_instance_by_id_no_retry(element.id());if(instance4==null){let parent=element.parent();parent!=null&&(instance4=this.try_register(parent,element.id()))}if((_instance=instance4)==null||_instance.register_children(),desired_id!=null){var _instance$get_namespa,_instance2,_instance2$get_namesp;return(_instance$get_namespa=(_instance2=instance4)==null||(_instance2$get_namesp=_instance2.get_namespace())==null?void 0:_instance2$get_namesp[desired_id])!=null?_instance$get_namespa:null}return null}find_instance_by_id(id){if(!id||!this.get_namespace())return null;let found=this.find_instance_by_id_no_retry(id);if(found){if(found.is_ready)return found;(0,import_b_async5.ensure_ready)(found.get_is_ready_key())}let ancestor_element=id.includes("_group_item_")?appquery_default.element(id.split("_group_item_")[0]):appquery_default.element(id).parent();ancestor_element!=null&&found==null&&queueMicrotask(this.try_register.bind(this,ancestor_element));let all_rg_ancestors=[];for(;ancestor_element;){ancestor_element.draws_own_children()&&all_rg_ancestors.push(ancestor_element.id());let instance4=this.find_instance_by_id_no_retry(ancestor_element.id());instance4&&(0,import_b_async5.ensure_ready)(instance4.get_children_registered_key(),!1),ancestor_element=ancestor_element.parent()}if(all_rg_ancestors.length>0){let ancestor_instance=this.parent();for(;((_ancestor_instance=ancestor_instance)==null?void 0:_ancestor_instance.parent())!=null;){var _ancestor_instance;let element=ancestor_instance.parent().element;element.draws_own_children()&&all_rg_ancestors.includes(element.id())&&(0,import_b_async5.ensure_ready)(ancestor_instance.get_children_registered_key()),ancestor_instance=ancestor_instance.parent()}}return(found==null?void 0:found.element.type())==="TableMainAxis"?found:null}find_instance_by_id_no_retry(id){let scope=this;do{let namespace=scope.get_namespace();if(namespace!=null&&namespace[id])return namespace[id];scope=scope.parent()}while(scope);return null}get_visible_instances(){let instances={},namespace=this.get_namespace();object_entries(namespace).forEach(_ref=>{let[id,instance4]=_ref;instances[id]=instance4});let parent=this.parent();for(let instance4 of(_parent$get_visible_i=parent==null?void 0:parent.get_visible_instances())!=null?_parent$get_visible_i:[]){var _parent$get_visible_i,_instance$element_id,_instances$_instance$;(_instances$_instance$=instances[_instance$element_id=instance4.element_id()])!=null||(instances[_instance$element_id]=instance4)}return Object.values(instances)}get_static_property(name,suppress_warning){return this.element.get_styleable_static_property(name,suppress_warning)}get_styleable_static_property(name,suppress_warning){return this.element.get_styleable_static_property(name,suppress_warning)}_dimension_box(name,value){var _this$key;let key=`__dimension_box_${name}`,box=(_this$key=this[key])!=null?_this$key:this[key]=(0,import_autorun2.Box)(value!=null?value:this.element[`get_${name}`]());if(value!=null){box(value);return}return box()}_observe_canvas(){if(this._sizing_setup){let to_observe=this.canvas[0];observe(to_observe,debounce_default(entry=>{entry.borderBoxSize&&entry.borderBoxSize.length>0?(this.state("current_width",entry.borderBoxSize[0].inlineSize),this.state("current_height",entry.borderBoxSize[0].blockSize)):(this.state("current_width",entry.target.offsetWidth),this.state("current_height",entry.target.offsetHeight))},50,{leading:!0,trailing:!0,maxWait:100})),this.on_destroy(()=>unobserve(to_observe))}}setup_sizing(){this._sizing_setup||(this.canvas!=null&&document.contains(this.canvas[0])?(this.state("current_width",this.canvas.outerWidth()),this.state("current_height",this.canvas.outerHeight())):(this.state("current_width",0),this.state("current_height",0)),this._sizing_setup=!0,this.canvas&&this._observe_canvas())}current_width(){return this.state("current_width")}current_height(){return this.state("current_height")}get_injected_context(value,value_btype){var _this$prop_eval_conte;let base_context=(_this$prop_eval_conte=this.prop_eval_context())!=null?_this$prop_eval_conte:{element:this,datasources:{}};return{...base_context,datasources:{...base_context.datasources,injected_value:()=>value,injected_value_btype:()=>value_btype}}}prop_eval_context(reset_random_generator){return this._p_context||(this._p_context={element:this,datasources:get_basic_datasources(this.element.root()),random_seed:Math.random()}),reset_random_generator&&(this._p_context.random_generator=new Random(this._p_context.random_seed)),this._p_context}on_run_eval_error(name,err){log(ensure_bubble_error(err).extend({element_instance:this,prop_name:name}))}autorun(fn,cleanup){let ar=(0,import_autorun2.autorun)(()=>this._run_if_not_destroying(fn),cleanup);return this.on_destroy(()=>ar.destroy()),ar}grouped_autorun(group,fn){this._grouped_autoruns.has(group)||this._grouped_autoruns.set(group,[]);let ar=this.autorun(fn);return this._grouped_autoruns.get(group).push(ar),ar}destroy_grouped_autoruns(group){var _this$_grouped_autoru;(_this$_grouped_autoru=this._grouped_autoruns.get(group))==null||_this$_grouped_autoru.forEach(ar=>ar.destroy()),this._grouped_autoruns.delete(group)}_run_if_not_destroying(fn){if(!this._destroy_started)return fn()}message(name){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];this.supports_message(name)||error("Element does not support message name",{element_type:this.element.type(),name}),(0,import_autorun2.autorun_top)(()=>{var _this$_msg_handlers$n;let to_run2=(_this$_msg_handlers$n=this._msg_handlers[name])!=null?_this$_msg_handlers$n:[];for(let handler of to_run2)handler(...args)})}supports_message(name){var _this$element$E$get_p,_this$element$E$get_p2,_this$element$E3;return this.element.get_messages().includes(name)||((_this$element$E$get_p=(_this$element$E$get_p2=(_this$element$E3=this.element.E).get_private_messages)==null?void 0:_this$element$E$get_p2.call(_this$element$E3,this.element))!=null?_this$element$E$get_p:[]).includes(name)}get_messages(){return this.element.get_messages()}on_message(name,handler){var _this$_msg_handlers,_this$_msg_handlers$n2;return((_this$_msg_handlers$n2=(_this$_msg_handlers=this._msg_handlers)[name])!=null?_this$_msg_handlers$n2:_this$_msg_handlers[name]=[]).push(handler),handler}off_message(name,handler){var _this$_msg_handlers2;let handlers2=(_this$_msg_handlers2=this._msg_handlers)==null?void 0:_this$_msg_handlers2[name];if(handlers2){let idx=handlers2.indexOf(handler);idx!==-1&&handlers2.splice(idx,1)}}state(key,value,get_raw_function){var _this$_states,_this$_states$key;let state_box=(_this$_states$key=(_this$_states=this._states)[key])!=null?_this$_states$key:_this$_states[key]=(0,import_autorun2.Box)(void 0);if(value!==void 0){value===STATE_NOT_READY?state_box(void 0,!0):state_box(value);return}else{let state4=state_box();return typeof state4=="function"&&!get_raw_function?state4(this):state4}}responsive_mode(){return this.mode===Mode.RESPONSIVE}thumbnail_mode(){return this.mode===Mode.THUMBNAIL||this.mode===Mode.REUSABLE_EDIT}reusable_edit_mode(){return this.mode===Mode.REUSABLE_EDIT}edit_mode(){return this.mode===Mode.EDIT}run_mode(){return this.mode===Mode.RUN}is_secure(){var _this$element$E$is_se,_this$element$E4;return!!((_this$element$E$is_se=(_this$element$E4=this.element.E).is_secure)!=null&&_this$element$E$is_se.call(_this$element$E4,this))}is_self_nested_custom(){let custom_id=this.element.get_static_property("custom_id");if(!custom_id)return!1;let ancestor=this.parent();for(;ancestor;){if(ancestor.element.id()===custom_id||ancestor.element.get_static_property("custom_id")===custom_id)return!0;ancestor=ancestor.parent()}return!1}get is_registered(){return!!(this.status&lifecycle_statuses.REGISTERED)}get has_skeleton(){return!!(this.status&lifecycle_statuses.HAS_SKELETON)}get is_drawn(){return!!(this.status&lifecycle_statuses.DRAWN)}get is_solid_initialized(){return!!(this.status&lifecycle_statuses.SOLID_INITIALIZED)}get is_ready(){return on_react_native()?this.is_registered:this.element.can_defer_drawing()?this.has_skeleton||this.is_solid_initialized:this.is_drawn}get children_are_registered(){return!!(this.status&lifecycle_statuses.CHILDREN_REGISTERED)}get children_being_registered(){return!!(this.status&lifecycle_statuses.CHILDREN_BEING_REGISTERED)}get children_are_drawn(){return!!(this.status&lifecycle_statuses.CHILDREN_DRAWN)}register(parent){this.register_self(parent),this.register_children_deep()}register_self(parent){var _this$element$E$regis,_this$element$E5;if(!this.is_registered){if(this._parent=parent,[Mode.RUN,Mode.EDIT,Mode.REUSABLE_EDIT].includes(this.mode)){var _this$parent6;(_this$parent6=this.parent())==null||_this$parent6.add_to_namespace(this)}(_this$element$E$regis=(_this$element$E5=this.element.E).register)==null||_this$element$E$regis.call(_this$element$E5,this),this.status|=lifecycle_statuses.REGISTERED,record_lifecycle(LifecycleEvent.Registered)}}register_children_deep(){(!this.run_mode()||mustRegisterId(this.element_id()))&&(this.register_children(),this.children.forEach(child=>child.register_children_deep()))}register_children(){this.children_are_registered||this.children_being_registered||(this.status|=lifecycle_statuses.CHILDREN_BEING_REGISTERED,this.element.E.register_children?(this._children=[],this.element.E.register_children(this),this.status|=lifecycle_statuses.CHILDREN_REGISTERED):this._default_register_children(this.element.elements()))}_default_register_children(child_elements){this._children=[];for(let element of child_elements)if(element.exists()&&(!this.thumbnail_mode()||element.is_visible_on_page_load())){let instance4=new ElementInstance2(element,this.mode);this.children.push(instance4),instance4.register_self(this)}this.mark_children_registered()}get children(){return this._children||(0,import_autorun2.autorun_top)(()=>this.register_children()),this._children}set children(children2){this._children=children2,this.status|=lifecycle_statuses.CHILDREN_BEING_REGISTERED}get current_children(){var _this$_children;return(_this$_children=this._children)!=null?_this$_children:[]}create_draw_signals(){if(!this.is_solid_initialized){this.mark_solid_initialized(),this._update_visible();let[get10,set2]=createSignal(!1);if(this.draw_signal={get:get10,set:set2},this.element.solid_component){var _this$_children2;this.element.can_have_children()&&(!this.element.draws_own_children()||this.thumbnail_mode()&&(_this$_children2=this._children)!=null&&_this$_children2.length)?(0,import_b_async5.WaitFor)(this.get_children_registered_key(),()=>{for(let child of this.children)child.create_draw_signals();this.children.sort(LAYOUT_PROPERTIES[this.element.container_layout()].sort_fn)}):this.children=[]}}}create_skeleton(container){if(this.has_skeleton){warn("Attempting to create skeleton for an element that already has one! "+this.toUniqueString());return}this.container=container,this.canvas=container.render(this.get_html()),this.canvas.addClass(this.element.type()),this._is_visible_me||this._hide_me(),this._observe_canvas(),client_config_default2.run_mode_ids&&this.run_mode()&&this.canvas.attr("id",run_mode_unique_id(this.element_id())),typeof this.element.E.position_canvas=="function"&&!this.thumbnail_mode()?this.position_canvas():container.add(this),this.create_child_skeletons(container),this.mark_skeleton_ready()}create_child_skeletons(parent_container){var _Lib$or_throw$element;if(this.element.E.create_child_skeletons){this.element.E.create_child_skeletons(this);return}if((_Lib$or_throw$element=lib_default.or_throw().element)!=null&&_Lib$or_throw$element.new_rendering){let custom_definition=this.element.E.custom_definition;if(custom_definition!=null&&custom_definition().get_responsive_version()>0){let container=parent_container.create_child(this,this.get_children_canvas());this.child_container=container;for(let child of this.children)child.create_draw_signals();this.children.sort(LAYOUT_PROPERTIES[this.element.container_layout()].sort_fn),lib_default.or_throw().element.render_new_reusable(this,container.container_canvas);return}}if(this.element.can_have_children()){let container_canvas=this.get_children_canvas(),container=parent_container.create_child(this,container_canvas);this.child_container=container;let all_children;if(this.element.is_responsive_v1()){let layout_props=LAYOUT_PROPERTIES[this.element.container_layout()];all_children=this.children.sort(layout_props.sort_fn)}else{var _this$element$E$initi,_this$element$E6;(_this$element$E$initi=(_this$element$E6=this.element.E).initialize_container_width)==null||_this$element$E$initi.call(_this$element$E6,this,container),all_children=this.children}for(let child of all_children)child.create_skeleton(container);container.initialize()}}wait_for_first_draw(cb){this.is_drawn?cb():this._first_draw_cbs.push(cb)}with_canvas(canvas_cb){this.ensure_drawn(),this.wait_for_first_draw(()=>{canvas_cb(this.canvas)})}start_draw_tree(){watchDraw(this,{onDraw:instance4=>{let draw_reason=get_current_phase()===DrawPhase.InitialDraw?DrawReason.VisibleOnPageLoad:DrawReason.BecameVisible;instance4.do_draw(draw_reason)},onSizeDraw:instance4=>{instance4.do_size_only_draw()}}),this.handle_individual_draw()}handle_individual_draw(){this.run_mode()?(!this.element.can_defer_drawing()||this.is_solid_initialized&&this.element.solid_component==null&&this.children.length>0)&&this.do_draw(DrawReason.CantDefer):this.do_draw(DrawReason.DeferFlagOff),this.start_child_drawing()}do_size_only_draw(){if(this.is_drawn)return;let bail_to_full_draw;this.element.E.attempt_size_only_draw?bail_to_full_draw=!this.element.E.attempt_size_only_draw(this):bail_to_full_draw=!this.element.no_size_when_hidden(),bail_to_full_draw&&this.do_draw(DrawReason.SizeNeeded)}run_draw_cbs(){let do_draw_cbs=this._first_draw_cbs;this._first_draw_cbs=[];for(let cb of do_draw_cbs)cb()}setup_canvas_hooks(){this.canvas[0].bubble_data={bubble_instance:this};let debug2=lib_default.or_throw().workflow.debugger;debug2&&(is_on_mobile_or_tablet()||(this.canvas.on("mouseenter.debugger",()=>debug2.element_hovered(this)),this.on_destroy(()=>this.canvas.off("mouseenter.debugger"))),this.canvas.on("click.debugger",e=>{debug2.element_clicked(this,this.get_partial())&&e.stopPropagation()}),this.on_destroy(()=>this.canvas.off("click.debugger")))}initialize_canvas(){var _this$element$root;(_this$element$root=this.element.root())==null||_this$element$root.get_responsive_version(),this.initialize(),this.setup_canvas_hooks(),this.mark_drawn()}do_draw(draw_reason){this.is_drawn||this._is_drawing||(with_draw_reason(draw_reason,()=>{if(this._is_drawing=!0,count("draw children element created: "+this.element.type()),this.is_solid_initialized){var _this$draw_signal,_this$parent7;(_this$draw_signal=this.draw_signal)==null||_this$draw_signal.set(!0),(_this$parent7=this.parent())==null||_this$parent7.do_draw(draw_reason)}else this.initialize_canvas()}),this._is_drawing=!1)}start_child_drawing(){var _Lib$or_throw$styles_;if((_Lib$or_throw$styles_=lib_default.or_throw().styles_editor)!=null&&_Lib$or_throw$styles_.is_active())return;if(this.element.draws_own_children()&&this.element.E.draw_children){this.element.E.draw_children(this),this.status|=lifecycle_statuses.CHILDREN_DRAWN;return}if(this.children_are_drawn)return;let iterate_children=()=>{for(let instance4 of this.children)instance4.element.added_to_container()?instance4.handle_individual_draw():instance4.start_draw_tree()};this.is_solid_initialized&&this.element.solid_component==null&&this.children.length>0?(0,import_b_async5.WaitFor)(this.get_skeleton_ready_key(),iterate_children):this.element.can_have_children()&&!this.element.draws_own_children()&&(0,import_b_async5.WaitFor)(this.get_children_registered_key(),iterate_children),this.status|=lifecycle_statuses.CHILDREN_DRAWN,this.get_children_drawn_key().turn()}ensure_drawn(){if(this.is_drawn||this.edit_mode())return;let draw=()=>{this.do_draw(DrawReason.Unknown),this.start_child_drawing()};this.is_solid_initialized?batch(draw):draw()}get_partial(){return make_partial_expression_evaluator2(this.prop_eval_context())}set_height(height2,options){if(!this.destroy_started())if(this._dimension_box("height",height2),this.container!=null)this.container.set_height(this,height2,options);else{var _this$canvas5;(_this$canvas5=this.canvas)==null||_this$canvas5.css("height",height2)}}position_canvas(to_position){var _this$element$E$posit,_this$element$E7;(_this$element$E$posit=(_this$element$E7=this.element.E).position_canvas)==null||_this$element$E$posit.call(_this$element$E7,to_position!=null?to_position:this.canvas,this)}attach_to_body(){var _this$element$E$attac,_this$element$E$attac2,_this$element$E8;return(_this$element$E$attac=(_this$element$E$attac2=(_this$element$E8=this.element.E).attach_to_body)==null?void 0:_this$element$E$attac2.call(_this$element$E8,this))!=null?_this$element$E$attac:!this.element.added_to_container()}on_resize(cb){var _this$element$root2;if((_this$element$root2=this.element.root())!=null&&_this$element$root2.use_responsive_algorithm())if(this.run_mode()){let event_name="resize."+this.element.type()+"-"+this.toUniqueString();$(window).on(event_name,()=>{$(window).width()!==this._old_width&&(this._old_width=$(window).width(),cb(this._old_width))}),this.on_destroy(()=>$(window).off(event_name))}else this.responsive_mode()&&(this.legacy_container.on("resize_width",cb),this.on_destroy(()=>this.legacy_container.removeListener("resize_width",cb)))}initialize(){if(this.is_drawn)throw new UnexpectedError("can only call initialize once");(0,import_autorun2.autorun_top)(()=>{this.element.E.initialize(this)})}get_html(){return this.element.E.get_html(this)}workflow_show(properties,options,animated){this.element.E.workflow_show?this.element.E.workflow_show(this,properties,options,animated):this.do_show(properties,options,animated)}workflow_hide(properties,options,animated){this.element.E.workflow_hide?this.element.E.workflow_hide(this,properties,options,animated):this.do_hide(properties,options,animated)}rendering_using_solid(){var _this$element$E$use_l,_this$element$E9;return this.is_solid_initialized&&this.element.E.solid_component!=null&&!(this.edit_mode()&&(_this$element$E$use_l=(_this$element$E9=this.element.E).use_legacy_in_editor)!=null&&_this$element$E$use_l.call(_this$element$E9,this.element))&&!(this.thumbnail_mode()&&this.element.E.use_legacy_in_thumbnail)}_display_me(){if(this.element.is_responsive_v1()){var _this$canvas6;if(this.rendering_using_solid())return;(_this$canvas6=this.canvas)==null||_this$canvas6.css("visibility","")}else{var _this$canvas7;(_this$canvas7=this.canvas)==null||_this$canvas7.css("display","")}}_hide_me(){var _this$canvas8;this.rendering_using_solid()||(_this$canvas8=this.canvas)==null||_this$canvas8.css(this.get_hidden_css())}get_hidden_css(){return this.element.is_responsive_v1()?{visibility:"hidden",display:null}:{display:"none"}}do_show(properties,options,animated){if(on_react_native()){this._has_been_hidden=!1;let{do_show}=this.element.E;if(do_show)return do_show(this);this._is_visible_me=!0,this._update_visible();return}this.with_canvas(canvas=>{if(this._has_been_hidden===!1&&!animated)return;let first_show=this._has_been_hidden==null;this._has_been_hidden=!1;let{do_show}=this.element.E;if(do_show)return do_show(this,properties,options,animated,first_show);var _canvas$velocity;this._is_visible_me=!0,(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop",!0),animated?perform_animate_in(this,properties,options):(this._display_me(),this._update_visible())})}do_hide(properties,options,animated){if(on_react_native()){this._has_been_hidden=!0;let do_hide2=this.element.E.do_hide;if(do_hide2){do_hide2(this);return}this._is_visible_me=!1,this._update_visible();return}if(this._has_been_hidden===!0&&!animated)return;let first_hide=this._has_been_hidden==null;this._has_been_hidden=!0;let do_hide=this.element.E.do_hide;if(do_hide)do_hide(this,properties,options,animated,first_hide);else if(animated)this.with_canvas(canvas=>{var _canvas$velocity2;(_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),perform_animate_out(this,properties,options)});else{var _this$canvas9,_this$canvas9$velocit;(_this$canvas9=this.canvas)==null||(_this$canvas9$velocit=_this$canvas9.velocity)==null||_this$canvas9$velocit.call(_this$canvas9,"stop",!0),this._hide_me(),this._is_visible_me=!1,this._update_visible()}}register_workflows(events7){for(let event of events7){let deregister=event.register(this);deregister!=null&&this.on_destroy(deregister)}}can_register_workflows(){var _this$element$E$can_r,_this$element$E$can_r2,_this$element$E10,_this$parent8;return(_this$element$E$can_r=(_this$element$E$can_r2=(_this$element$E10=this.element.E).can_register_workflows)==null?void 0:_this$element$E$can_r2.call(_this$element$E10,this))!=null?_this$element$E$can_r:(_this$parent8=this.parent())==null?void 0:_this$parent8.can_register_workflows()}get_transition_styling(){var _this$element$field_n;let E=this.element.E,field_names=(_this$element$field_n=this.element.field_names())!=null?_this$element$field_n:{};return Object.keys(field_names).map(property2=>{var _E$transition_propert;if((_E$transition_propert=E.transition_properties)!=null&&_E$transition_propert[property2]){let transition=this.element.transition(property2);if(transition!=null&&transition.exists()){var _E$transition_propert2;return`${(_E$transition_propert2=E.transition_properties)==null?void 0:_E$transition_propert2[transition.prop_name()]} ${transition.duration()}ms ${transition.fn()}`}}return""}).filter(prop=>prop!=="").join(", ")}get_transition_css(css_props){let css_prop=this.get_transition_styling();if(css_prop){var _css_props$unique_id,_entry$target;let target=this.get_canvas(),unique_id=target.prop("outerHTML"),entry=(_css_props$unique_id=css_props[unique_id])!=null?_css_props$unique_id:css_props[unique_id]={};(_entry$target=entry.target)!=null||(entry.target=target),entry.css_prop?entry.css_prop.slice(-2)!==", "?entry.css_prop+=", "+css_prop:entry.css_prop+=css_prop:entry.css_prop=css_prop}}show_borders(){var _this$element$E$show_,_this$element$E11;(_this$element$E$show_=(_this$element$E11=this.element.E).show_borders)==null||_this$element$E$show_.call(_this$element$E11,this)}hide_borders(){var _this$element$E$hide_,_this$element$E12;(_this$element$E$hide_=(_this$element$E12=this.element.E).hide_borders)==null||_this$element$E$hide_.call(_this$element$E12,this)}},_class25.modes=Mode,_class25.ALL_MODES=ALL_MODES2,_class25.lifecycle_statuses=lifecycle_statuses,_class25.rehydrate=function(my_db,unique_string){var _Lib$or_throw$element2;let pieces=unique_string.split(":"),current=(_Lib$or_throw$element2=lib_default.or_throw().element)==null?void 0:_Lib$or_throw$element2.get_page();for(let piece of pieces){var _current;current=(_current=current)==null?void 0:_current.find_instance_by_id(piece)}return current},_class25),_applyDecoratedDescriptor4(_class24.prototype,"is_self_nested_custom",[_dec5],Object.getOwnPropertyDescriptor(_class24.prototype,"is_self_nested_custom"),_class24.prototype),_class24),ElementInstance_default=ElementInstance}});function apply_css_style(divs,opts){for(let div2 of array_from(divs!=null?divs:[]))for(let k in opts){let v=opts[k];div2.style[k]=v}}function patch_user_agent_styles(canvas){if(apply_css_style(canvas,{padding:"0px","text-align":"center",background:"none",border:"none"}),!canvas.hasClass(CLICKABLE_ELEMENT))return apply_css_style(canvas,{cursor:"inherit"})}function _border_width(instance_or_element,sides){let border_style,fn=name=>{let style2;if(instance_or_element instanceof ElementInstance_default){var _instance_or_element$,_instance_or_element$2;return style2=(_instance_or_element$=(_instance_or_element$2=instance_or_element.element).get_style_if_exists)==null?void 0:_instance_or_element$.call(_instance_or_element$2),style2?style2.get_static_property(name):evaluate_property(instance_or_element,name)}else{var _instance_or_element$3,_instance_or_element$4;return style2=(_instance_or_element$3=instance_or_element.get_style_if_exists)==null?void 0:_instance_or_element$3.call(instance_or_element),style2?style2.get_static_property(name):(_instance_or_element$4=instance_or_element.get_static_property)==null?void 0:_instance_or_element$4.call(instance_or_element,name,!0)}};if(instance_or_element.get_static_property("four_border_style")){let total_width=0;for(let border_location of sides)border_style=fn("border_style"+border_location),[void 0,"none"].includes(border_style)||(total_width+=fn("border_width"+border_location));return total_width}else return border_style=fn("border_style"),[void 0,"none"].includes(border_style)?0:2*fn("border_width")}var import_web_dom_collections_iterator105,calculate_border_height,calculate_border_width,init_application_utilities=__esm({"lib-browser/core/property_applications/application_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator105=__toESM(require_web_dom_collections_iterator());init_runmode();init_element_eval();init_ElementInstance();init_decaf();calculate_border_height=instance4=>_border_width(instance4,["_top","_bottom"]),calculate_border_width=instance4=>_border_width(instance4,["_left","_right"])}});var import_web_dom_collections_iterator106,PropertyApplication,init_PropertyApplication=__esm({"lib-browser/core/property_applications/PropertyApplication.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator106=__toESM(require_web_dom_collections_iterator());init_decaf();PropertyApplication=class{constructor(sel_fn,to_remove,to_not_apply){var _this$_uses_propertie;this.sel_fn=sel_fn,this.to_remove=to_remove!=null?to_remove:[],this.to_not_apply=to_not_apply!=null?to_not_apply:[],this.uses_properties=((_this$_uses_propertie=this._uses_properties)!=null?_this$_uses_propertie:[]).filter(a=>!this.to_remove.includes(a))}get_target(canvas){return this.sel_fn&&(typeof this.sel_fn=="string"?canvas=canvas.find(this.sel_fn):canvas=this.sel_fn(canvas)),canvas}create_autorun(instance4,fn){return instance4.grouped_autorun(this.constructor.name,fn)}apply(data,canvas,instance4){for(let r2 of this.to_remove)delete data[r2];for(let r2 of this.to_not_apply)delete data[r2];if(instance4==null||instance4.destroy_grouped_autoruns(this.constructor.name),!this.sel_fn)this._apply(data,canvas,instance4);else for(let target of array_from(this.get_target(canvas)))this._apply(data,$(target),instance4)}apply_directly(data,canvas,instance4){for(let r2 of this.to_remove)delete data[r2];for(let r2 of this.to_not_apply)delete data[r2];this._apply(data,canvas,instance4)}get_transition_css(element,canvas,css_props){var _ref;let css_prop="",transition_properties=(_ref=typeof this.transition_properties=="function"?this.transition_properties(element):this.transition_properties)!=null?_ref:{};for(let property2 of this.uses_properties)if(transition_properties!=null&&transition_properties[property2]){let transition_css=this._transition_property_to_css_string(element,property2);transition_css&&(css_prop+=transition_css+", ")}if(css_prop){var _unique_id,_css_props$_unique_id,_css_props$unique_id,_css_props$unique_id$,_css_props$unique_id$2;let unique_id,target=this.get_target(canvas);typeof this.sel_fn=="string"?unique_id=this.sel_fn:unique_id=target.prop("outerHTML"),(_css_props$_unique_id=css_props[_unique_id=unique_id])!=null||(css_props[_unique_id]={}),(_css_props$unique_id$=(_css_props$unique_id=css_props[unique_id]).target)!=null||(_css_props$unique_id.target=target),css_props[unique_id].css_prop=((_css_props$unique_id$2=css_props[unique_id].css_prop)!=null?_css_props$unique_id$2:"")+css_prop}}_transition_property_to_css_string(element,property2){let css_prop="",transition=element.transition(property2);if(!this._transition_should_be_applied(element,property2))return css_prop;if(transition!=null&&transition.exists()){let transition_properties=this.get_transition_properties(element);if(Array.isArray(transition_properties[transition.prop_name()]))css_prop+=transition_properties[transition.prop_name()].map(prop_name=>this._combine_transformation_info_into_css(prop_name,transition)).join(", ");else{let prop_name=transition_properties[transition.prop_name()];css_prop+=this._combine_transformation_info_into_css(prop_name,transition)}}return css_prop}_transition_should_be_applied(element,property2){var _this$transition_cond;return((_this$transition_cond=this.transition_conditions)==null?void 0:_this$transition_cond[property2])!=null?this.transition_conditions[property2](element):!0}_combine_transformation_info_into_css(name,transition){return`${name} ${transition.duration()}ms ${transition.fn()}`}get_transition_properties(element){var _ref2;return(_ref2=typeof this.transition_properties=="function"?this.transition_properties(element):this.transition_properties)!=null?_ref2:{}}get_transition_styling(element){let transitions=[],transition_properties=this.get_transition_properties(element);for(let property2 of this.uses_properties)if(transition_properties!=null&&transition_properties[property2]){let transition_css=this._transition_property_to_css_string(element,property2);transition_css&&transitions.push(transition_css)}return transitions.join(", ")}get_properties(element,defaults2){let props=this._get_properties(element).filter(p=>!this.to_remove.includes(p.name));if(defaults2){for(let p of props){var _this$field_names$p$n;let our_default=(_this$field_names$p$n=this.field_names[p.name])==null?void 0:_this$field_names$p$n.default;our_default&&(p.default=our_default)}for(let p of props)defaults2[p.name]!=null&&(p.default=defaults2[p.name])}return props}}}});var _class26,NoSelect,init_NoSelect=__esm({"lib-browser/core/property_applications/applications/NoSelect.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_application_utilities();NoSelect=class extends PropertyApplication{_apply(data,canvas){data&&apply_css_style(canvas,{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","user-select":"none"})}};_class26=NoSelect;_class26.prototype.apply_once=!0}});var _class27,Dimensions,init_Dimensions=__esm({"lib-browser/core/property_applications/applications/Dimensions.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();Dimensions=class extends PropertyApplication{_apply(data,canvas){}};_class27=Dimensions;_class27.prototype.field_names={width:{default:100,no_states:!0},height:{default:100,no_states:!0},left:{no_states:!0},top:{no_states:!0}},_class27.prototype.not_in_style=!0,_class27.prototype.apply_once=!0,_class27.prototype.class_name="Dimensions"}});var _class28,Opacity,init_Opacity=__esm({"lib-browser/core/property_applications/applications/Opacity.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_application_utilities();Opacity=class extends PropertyApplication{_apply(data,canvas,instance4){let opacity=data.opacity/100;instance4.state("opacity_override")!=null&&(opacity=instance4.state("opacity_override")),apply_css_style(canvas,{opacity})}};_class28=Opacity;Opacity.properties=["opacity"];_class28.prototype._uses_properties=_class28.properties,_class28.prototype.transition_properties={opacity:"opacity"},_class28.prototype.field_names={opacity:{default:100}},_class28.prototype.class_name="Opacity"}});var _class29,MinWidth,init_MinWidth=__esm({"lib-browser/core/property_applications/applications/MinWidth.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();MinWidth=class extends PropertyApplication{_apply(){}};_class29=MinWidth;_class29.prototype.field_names={min_width:{default:20,no_states:!0},fixed_width:{no_states:!0,default:!1},use_max_width:{no_states:!0,default:!1},max_width:{default:100,optional:!0,no_states:!0},collapse_margin:{default:0,optional:!0,no_states:!0},responsive_alignment:{default:"center",no_states:!0}},_class29.prototype.not_in_style=!0,_class29.prototype.apply_once=!0,_class29.prototype.class_name="MinWidth"}});var _class30,RootSizing,init_RootSizing=__esm({"lib-browser/core/property_applications/applications/RootSizing.js"(){"use strict";init_define_process_env();init_shim();init_mobile();init_PropertyApplication();RootSizing=class extends PropertyApplication{_apply(){}};_class30=RootSizing;_class30.prototype.field_names={default_view_size:{default:DEFAULT_MOBILE_DEVICE,no_states:!0,only_edit_mode:!0},default_width:{no_states:!0,default:1200},min_width_px:{no_states:!0,default:0},max_width_px:{no_states:!0,default:null},min_height_px:{no_states:!0,default:0},max_height_px:{no_states:!0,default:null}},_class30.prototype.not_in_style=!0,_class30.prototype.apply_once=!0,_class30.prototype.class_name="RootSizing"}});function is_responsive_v1_or_higher(element){var _element$root;return((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>0}function get_margin_properties(){let ret={};for(let dir of["left","right","top","bottom"])ret[`margin_${dir}`]={default:0};return ret}var import_web_dom_collections_iterator107,margin_fields,init_margins=__esm({"lib-browser/core/shared_fields/margins.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator107=__toESM(require_web_dom_collections_iterator());init_u2();margin_fields=["top","bottom","left","right"].map(dir=>({name:`margin_${dir}`,caption:FirstLetterCapitalize(dir),long_caption:`${FirstLetterCapitalize(dir)} margin`,editor:"StaticNumber",integer:!0,transition:!0,condition(element){return is_responsive_v1_or_higher(element)&&!element.no_margins()},pretty:{section:"Margins"},include_in_redesign:!1}))}});function should_add_implicit_transition(element,widthOrHeight){var _element$parent;return(element==null||(_element$parent=element.parent())==null?void 0:_element$parent.get_static_property("container_layout"))==="relative"&&!element.get_static_property(`single_${widthOrHeight}`)&&!element.get_static_property(`fit_${widthOrHeight}`)}function get_all_transitions(element,transition_css,implicit_transition){return should_add_implicit_transition(element,implicit_transition)?[transition_css,implicit_transition]:transition_css}function createTransitionProperties(element){return{get margin_top(){var _element$E;return element!=null&&(_element$E=element.E)!=null&&_element$E.uses_inset_instead_of_margin?"top":get_all_transitions(element,"margin-top","height")},get margin_right(){var _element$E2;return element!=null&&(_element$E2=element.E)!=null&&_element$E2.uses_inset_instead_of_margin?"right":get_all_transitions(element,"margin-right","width")},get margin_bottom(){var _element$E3;return element!=null&&(_element$E3=element.E)!=null&&_element$E3.uses_inset_instead_of_margin?"bottom":get_all_transitions(element,"margin-bottom","height")},get margin_left(){var _element$E4;return element!=null&&(_element$E4=element.E)!=null&&_element$E4.uses_inset_instead_of_margin?"left":get_all_transitions(element,"margin-left","width")},min_width_css:"min-width",max_width_css:"max-width",width_css:["min-width","max-width"],min_height_css:"min-height",max_height_css:"max-height",height_css:["min-height","max-height"]}}var _class31,ResponsiveElement,init_ResponsiveElement=__esm({"lib-browser/core/property_applications/applications/ResponsiveElement.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_u2();init_margins();ResponsiveElement=class extends PropertyApplication{transition_properties(element){return createTransitionProperties(element)}_apply(){}};_class31=ResponsiveElement;ResponsiveElement.properties=["margin_top","margin_right","margin_bottom","margin_left","min_width_css","max_width_css","min_height_css","max_height_css","width_css","height_css"];_class31.prototype._uses_properties=_class31.properties,_class31.prototype.transition_conditions={min_width_css(element){return!element.get_static_property("single_width")},max_width_css(element){return!element.get_static_property("single_width")},width_css(element){return element.get_static_property("single_width")},min_height_css(element){return!element.get_static_property("single_height")},max_height_css(element){return!element.get_static_property("single_height")},height_css(element){return element.get_static_property("single_height")}},_class31.prototype.field_names=extend(get_margin_properties(),{parent_container_type_label:{no_states:!0,only_edit_mode:!0},margin_label:{no_states:!0,only_edit_mode:!0},padding_label:{no_states:!0,only_edit_mode:!0},nonant_alignment:{no_states:!1,default:"aa",no_plugin:!0},vert_alignment:{no_states:!1,default:"flex-start",no_plugin:!0},horiz_alignment:{no_states:!1,default:"flex-start",no_plugin:!0},flex_move_first:{no_states:!0,only_edit_mode:!0},flex_move_prev:{no_states:!0,only_edit_mode:!0},flex_move_next:{no_states:!0,only_edit_mode:!0},flex_move_last:{no_states:!0,only_edit_mode:!0},single_width:{no_states:!0,default:!1,no_plugin:!0},fit_width:{no_states:!0,default:!1},forced_fit_width_label:{no_states:!0,only_edit_mode:!0},min_width_css:{no_states:!1,default:"0px"},max_width_css:{no_states:!1,default:null,allow_empty_condition:!0},width_css:{no_states:!0,no_plugin:!0},single_height:{no_states:!0,default:!1,no_plugin:!0},fit_height:{no_states:!0,default:!1},forced_fit_height_label:{no_states:!0,only_edit_mode:!0},min_height_css:{no_states:!1,default:"0px"},max_height_css:{no_states:!1,default:null,allow_empty_condition:!0},height_css:{no_states:!0,no_plugin:!0},use_aspect_ratio:{no_states:!0,default:!1,no_plugin:!0},aspect_ratio_width:{no_states:!0,default:1,no_plugin:!0},aspect_ratio_height:{no_states:!0,default:1,no_plugin:!0},aspect_ratio_warning:{no_states:!0,only_edit_mode:!0},width_preview:{no_states:!0,only_edit_mode:!0},height_preview:{no_states:!0,only_edit_mode:!0},collapse_when_hidden:{no_states:!0,default:!1},order:{default:0,no_states:!0,no_plugin:!0}}),_class31.prototype.not_in_style=!0,_class31.prototype.apply_once=!0,_class31.prototype.class_name="ResponsiveElement"}});var _class33,ResponsiveContainer,init_ResponsiveContainer=__esm({"lib-browser/core/property_applications/applications/ResponsiveContainer.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();ResponsiveContainer=class extends PropertyApplication{_apply(){}};_class33=ResponsiveContainer;_class33.prototype.field_names={container_layout:{no_states:!0,default:"fixed"},container_horiz_alignment:{no_states:!1,default:"flex-start"},container_vert_alignment:{no_states:!1,default:"flex-start"},use_gap:{no_states:!0,default:!1},row_gap:{no_states:!1,default:0},column_gap:{no_states:!1,default:0}},_class33.prototype.not_in_style=!0,_class33.prototype.apply_once=!0,_class33.prototype.class_name="ResponsiveContainer"}});var _class34,ShortDimensions,init_ShortDimensions=__esm({"lib-browser/core/property_applications/applications/ShortDimensions.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();ShortDimensions=class extends PropertyApplication{_apply(){}};_class34=ShortDimensions;_class34.prototype.field_names={width:{default:960,no_states:!0},height:{default:600,no_states:!0}},_class34.prototype.not_in_style=!0,_class34.prototype.apply_once=!0,_class34.prototype.class_name="ShortDimensions"}});var _class35,PositionOnly,init_PositionOnly=__esm({"lib-browser/core/property_applications/applications/PositionOnly.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();PositionOnly=class extends PropertyApplication{_apply(){}};_class35=PositionOnly;_class35.prototype.field_names={left:{no_states:!0},top:{no_states:!0}},_class35.prototype.not_in_style=!0,_class35.prototype.apply_once=!0,_class35.prototype.class_name="PositionOnly"}});var _class36,Rotation,init_Rotation=__esm({"lib-browser/core/property_applications/applications/Rotation.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_application_utilities();Rotation=class extends PropertyApplication{_apply(data,canvas){var _data$rotation_angle;let angle=(_data$rotation_angle=data.rotation_angle)!=null?_data$rotation_angle:0;if(angle===0&&data._first_time)return;let formatted_angle="rotate("+angle+"deg)";apply_css_style(canvas,{"-ms-transform":formatted_angle,"-webkit-transform":formatted_angle,transform:formatted_angle})}};_class36=Rotation;_class36.prototype.not_in_style=!0,_class36.prototype.field_names={rotation_angle:{default:0}},_class36.prototype._uses_properties=["rotation_angle"],_class36.prototype.class_name="Rotation"}});function write_box_shadow(div2,data){var _data$inset;(_data$inset=data.inset)!=null||(data.inset="");let shadow=`${data.horizontal}px ${data.vertical}px ${data.blur}px ${data.spread}px ${data.color} ${data.inset}`;div2.css({"-webkit-box-shadow":shadow,"-moz-box-shadow":shadow,"box-shadow":shadow})}function get_stack(div2){let stack=div2.data("__outline_stack");return stack||(stack=[],div2.data("__outline_stack",stack)),stack}function push_outline_stack(div2,outline){get_stack(div2).push(outline)}function remove_from_stack(div2,key){let o,stack=get_stack(div2),to_remove=stack.filter(o2=>o2.key===key);for(o of to_remove)array_remove(stack,o)}function get_top_outline(div2){let best=null,best_score=-2;for(let o of get_stack(div2))o.priority>best_score&&(best_score=o.priority,best=o);return best}function update_display(div2){let top2=get_top_outline(div2);display(div2,top2)}function display(div2,outline){var _outline$box_shadow_p;(_outline$box_shadow_p=!(outline!=null&&outline.box_shadow_properties))!=null&&_outline$box_shadow_p?div2.css({"-webkit-box-shadow":"none","-moz-box-shadow":"none","box-shadow":"none"}):write_box_shadow(div2,outline.box_shadow_properties)}function add_outline(div2,key,priority,horizontal,vertical,blur,spread2,color){let box_shadow_properties;if(!div2){console.log("called add_outline without a div");return}vertical===void 0?box_shadow_properties=horizontal:box_shadow_properties={horizontal,vertical,blur,spread:spread2,color},remove_from_stack(div2,key),push_outline_stack(div2,{key,priority,box_shadow_properties}),update_display(div2)}function remove_outline(div2,key){div2&&(remove_from_stack(div2,key),update_display(div2))}var import_web_dom_collections_iterator108,init_outlining=__esm({"lib-browser/outlining.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator108=__toESM(require_web_dom_collections_iterator());init_u2()}});var _class37,BoxShadow,init_BoxShadow=__esm({"lib-browser/core/property_applications/applications/BoxShadow.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_outlining();init_PropertyApplication();BoxShadow=class extends PropertyApplication{_apply(data,canvas){if(data&&data.boxshadow_style!=="none"){var _ref,_data$boxshadow_blur,_ref2,_data$boxshadow_horiz,_ref3,_data$boxshadow_verti,_ref4,_data$boxshadow_sprea,_ref5,_data$boxshadow_color,_data$inset;data=extend({},data),data.blur=(_ref=(_data$boxshadow_blur=data.boxshadow_blur)!=null?_data$boxshadow_blur:data.blur)!=null?_ref:0,data.horizontal=(_ref2=(_data$boxshadow_horiz=data.boxshadow_horizontal)!=null?_data$boxshadow_horiz:data.horizontal)!=null?_ref2:0,data.vertical=(_ref3=(_data$boxshadow_verti=data.boxshadow_vertical)!=null?_data$boxshadow_verti:data.vertical)!=null?_ref3:0,data.spread=(_ref4=(_data$boxshadow_sprea=data.boxshadow_spread)!=null?_data$boxshadow_sprea:data.spread)!=null?_ref4:0,data.color=(_ref5=(_data$boxshadow_color=data.boxshadow_color)!=null?_data$boxshadow_color:data.color)!=null?_ref5:0;let inset=data.boxshadow_style==="inset"?"inset":"";data.inset=data.boxshadow_style!==void 0?inset:(_data$inset=data.inset)!=null?_data$inset:"",add_outline(canvas,"default",5,data)}else data.boxshadow_style==="none"&&!data._first_time&&remove_outline(canvas,"default")}};_class37=BoxShadow;_class37.prototype.transition_properties={boxshadow_style:"box-shadow"},_class37.prototype._uses_properties=["boxshadow_style","boxshadow_horizontal","boxshadow_vertical","boxshadow_blur","boxshadow_color","boxshadow_spread"],_class37.prototype.field_names={boxshadow_style:{default:"none"},boxshadow_horizontal:{default:2},boxshadow_vertical:{default:2},boxshadow_blur:{default:4},boxshadow_color:{default:"#AAAAAA"},boxshadow_spread:{default:0}},_class37.prototype.class_name="BoxShadow",_class37.prototype.no_solid_support=!0}});var _class38,PaddingFields,init_PaddingFields=__esm({"lib-browser/core/property_applications/applications/PaddingFields.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();PaddingFields=class extends PropertyApplication{constructor(options){var _options$minimum_elem,_options$no_vertical_,_options$allow_legacy,_options$disable_vert;super(options==null?void 0:options.selector),this.minimum_element_version=(_options$minimum_elem=options==null?void 0:options.minimum_element_version)!=null?_options$minimum_elem:0,this.no_vertical_if_legacy_center=(_options$no_vertical_=options==null?void 0:options.no_vertical_if_legacy_center)!=null?_options$no_vertical_:!1,this.allow_legacy=(_options$allow_legacy=options==null?void 0:options.allow_legacy)!=null?_options$allow_legacy:!1,this.disable_vertical_padding=(_options$disable_vert=options==null?void 0:options.disable_vertical_padding)!=null?_options$disable_vert:!1}_apply(data,canvas,instance4){var _instance$element$roo;if(!((instance4==null||(_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())<1&&!((instance4==null?void 0:instance4.element.type())==="CustomElement"&&instance4.element.E.custom_definition().get_responsive_version()>0)&&!this.allow_legacy)&&data){var _data$padding_top,_data$padding_right,_data$padding_bottom,_data$padding_left,_instance$element$roo2;if((instance4==null?void 0:instance4.element.element_version(!0))<this.minimum_element_version)return;if((instance4==null?void 0:instance4.element.container_layout())==="fixed"){canvas[0].style.padding="0px";return}(_data$padding_top=data.padding_top)!=null||(data.padding_top=0),(_data$padding_right=data.padding_right)!=null||(data.padding_right=0),(_data$padding_bottom=data.padding_bottom)!=null||(data.padding_bottom=0),(_data$padding_left=data.padding_left)!=null||(data.padding_left=0),this.no_vertical_if_legacy_center&&(instance4==null||(_instance$element$roo2=instance4.element.root())==null?void 0:_instance$element$roo2.get_responsive_version())<1&&data.vertical_centering?(canvas[0].style["padding-left"]=data.padding_left+"px",canvas[0].style["padding-right"]=data.padding_right+"px"):data.padding_top===0&&data.padding_right===0&&data.padding_bottom===0&&data.padding_left===0&&data._first_time||(canvas[0].style.padding=`${data.padding_top}px ${data.padding_right}px ${data.padding_bottom}px ${data.padding_left}px`)}}};_class38=PaddingFields;PaddingFields.properties=["padding_top","padding_right","padding_bottom","padding_left","vertical_centering"];_class38.prototype._uses_properties=_class38.properties,_class38.prototype.transition_properties={padding_top:"padding-top",padding_right:"padding-right",padding_bottom:"padding-bottom",padding_left:"padding-left"},_class38.prototype.field_names={padding_top:{default:0,allow_overrides:!0},padding_right:{default:0,allow_overrides:!0},padding_bottom:{default:0,allow_overrides:!0},padding_left:{default:0,allow_overrides:!0},vertical_centering:{default:!1}},_class38.prototype.properties_for_new={vertical_centering:!0},_class38.prototype.class_name="PaddingFields",_class38.prototype.style_allows_overrides=!0}});var _class39,valid_weights,Font,init_Font=__esm({"lib-browser/core/property_applications/applications/Font.js"(){"use strict";init_define_process_env();init_shim();init_lib();init_webfonts();init_PropertyApplication();init_application_utilities();init_fonts();init_elements();valid_weights=["normal","bold","lighter","bolder","initial","inherit","unset","100","200","300","400","500","600","700","800","900"],Font=class extends PropertyApplication{constructor(sel_fn,to_remove,to_not_apply,options){var _options$condition;super(sel_fn,to_remove,to_not_apply),this.condition=(_options$condition=options==null?void 0:options.condition)!=null?_options$condition:()=>!0}_apply(data,canvas,instance4){if(data){let font_face;instance4&&instance4.element.element_version(!0)>=FONT_FAMILY_VERSION?font_face=to_font_face(data.font_family,data.font_weight):font_face=data.font_face,lib_default().is_edit_mode()&&load_font(font_face);let font_data=get_quoted_face_and_variant(font_face);apply_css_style(canvas,{"font-family":font_data.font_family,"font-size":data.font_size+"px"});let weight=null;data.bold?weight="bold":font_data.variant&&valid_weights.includes(font_data.variant)?weight=font_data.variant:data._first_time&&(!font_data.variant||!valid_weights.includes(font_data.variant))||(weight="normal"),weight&&(canvas[0].style["font-weight"]=weight);let underline=null;data.underline?underline="underline":!data.underline&&!data._first_time&&(underline="none"),underline&&(canvas[0].style["text-decoration"]=underline);let italic=null;data.italic?italic="italic":!data.italic&&!data._first_time&&(italic="normal"),italic&&(canvas[0].style["font-style"]=italic),canvas[0].style.color=data.font_color,data.font_alignment==="left"&&data._first_time&&instance4.element.type()!=="PictureInput"||(canvas[0].style["text-align"]=data.font_alignment)}}};_class39=Font;Font.properties=["font_face","font_family","font_weight","font_size","bold","underline","italic","font_color","font_alignment"];_class39.prototype._uses_properties=_class39.properties,_class39.prototype.transition_properties={font_size:"font-size",font_color:"color"},_class39.prototype.field_names={font_face:{default:DEFAULT_FONT},font_family:{default:DEFAULT_CSS_TOKEN},font_weight:{default:DEFAULT_WEIGHT},font_size:{default:14},bold:{},italic:{},underline:{},font_alignment:{default:"left"},font_color:{default:"#252525"}},_class39.prototype.class_name="Font"}});var _class40,FontShadow,init_FontShadow=__esm({"lib-browser/core/property_applications/applications/FontShadow.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();FontShadow=class extends PropertyApplication{constructor(sel_fn,to_remove,to_not_apply,options){var _options$condition;super(sel_fn,to_remove,to_not_apply),this.condition=(_options$condition=options==null?void 0:options.condition)!=null?_options$condition:()=>!0}_apply(data,canvas){if(data){if(data.textshadow){let param=`${data.textshadow_horizontal}px ${data.textshadow_vertical}px ${data.textshadow_blur}px ${data.textshadow_color}`;canvas[0].style.textShadow=param}!data.textshadow&&!data._first_time&&(canvas[0].style.textShadow="none")}}};_class40=FontShadow;_class40.prototype._uses_properties=["textshadow","textshadow_horizontal","textshadow_vertical","textshadow_blur","textshadow_color"],_class40.prototype.transition_properties={textshadow:"text-shadow"},_class40.prototype.field_names={textshadow:{},textshadow_horizontal:{default:1},textshadow_vertical:{default:1},textshadow_blur:{default:0},textshadow_color:{default:"#Ffffff"}},_class40.prototype.class_name="FontShadow"}});var _class41,FontSpacing,init_FontSpacing=__esm({"lib-browser/core/property_applications/applications/FontSpacing.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();FontSpacing=class extends PropertyApplication{constructor(sel_fn,to_remove,to_not_apply,options){var _options$condition;super(sel_fn,to_remove,to_not_apply),this.condition=(_options$condition=options==null?void 0:options.condition)!=null?_options$condition:()=>!0}_apply(data,canvas){data&&(data.letter_spacing===0&&data._first_time||(canvas[0].style["letter-spacing"]=data.letter_spacing+"px"),data.word_spacing===0&&data._first_time||(canvas[0].style["word-spacing"]=data.word_spacing+"px"),canvas[0].style["line-height"]=data.line_height)}};_class41=FontSpacing;FontSpacing.properties=["letter_spacing","word_spacing","line_height"];_class41.prototype._uses_properties=["letter_spacing","word_spacing","line_height"],_class41.prototype.transition_properties={letter_spacing:"letter-spacing",word_spacing:"word-spacing",line_height:"line-height"},_class41.prototype.field_names={word_spacing:{default:0},line_height:{default:1},letter_spacing:{default:0}},_class41.prototype.class_name="FontSpacing"}});var BORDER_TO_CORNER_MAPPING,init_style=__esm({"lib-browser/constants/style.js"(){"use strict";init_define_process_env();init_shim();BORDER_TO_CORNER_MAPPING={top:"top-left",left:"bottom-left",right:"top-right",bottom:"bottom-right"}}});var import_web_dom_collections_iterator109,_window2,_class43,border_properties,border_transition_properties,Border,init_Border=__esm({"lib-browser/core/property_applications/applications/Border.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator109=__toESM(require_web_dom_collections_iterator());init_u2();init_PropertyApplication();init_application_utilities();init_style();border_properties={four_border_style:{default:(_window2=window)!=null&&_window2.is_maison?"connected":!1,no_states:!0}},border_transition_properties={};for(let border_location of["","_top","_right","_bottom","_left"])border_properties["border_style"+border_location]={default:"none"},border_properties["border_roundness"+border_location]={default:0},border_properties["border_width"+border_location]={default:1},border_properties["border_color"+border_location]={default:"#6B6B6B"};for(let border_location of["","top","right","bottom","left"])if(border_location==="")border_transition_properties.border_roundness="border-radius",border_transition_properties.border_width="border-width",border_transition_properties.border_color="border-color";else{let corner_location=BORDER_TO_CORNER_MAPPING[border_location],_location="_"+border_location;border_transition_properties["border_roundness"+_location]="border-"+corner_location+"-radius",border_transition_properties["border_width"+_location]="border-"+border_location+"-width",border_transition_properties["border_color"+_location]="border-"+border_location+"-color"}Border=class extends PropertyApplication{constructor(sel_fn,to_remove,data){var _to_remove;(_to_remove=to_remove)!=null||(to_remove=[]),super(sel_fn,to_remove),this.data=data}_apply(data,canvas){if(data){var _this$data;if(!((_this$data=this.data)!=null&&_this$data.only_main_border)&&data.four_border_style)for(let border_location of["top","right","bottom","left"]){let options={};(data["border_style_"+border_location]!=="none"||!data._first_time)&&(options["border-"+border_location+"-style"]=data["border_style_"+border_location],options["border-"+border_location+"-width"]=data["border_width_"+border_location]+"px",options["border-"+border_location+"-color"]=RGBA_to_RGB(data["border_color_"+border_location]),options["border-"+border_location+"-color"]=data["border_color_"+border_location]);let border_corner=BORDER_TO_CORNER_MAPPING[border_location];options["border-"+border_corner+"-radius"]=data["border_roundness_"+border_location]+"px",apply_css_style(canvas,options)}else{let options={};(data.border_style!=="none"||!data._first_time)&&(options["border-style"]=data.border_style,options["border-width"]=data.border_width+"px",options["border-color"]=RGBA_to_RGB(data.border_color),options["border-color"]=data.border_color),options["border-radius"]=data.border_roundness+"px",options["-moz-border-radius"]=data.border_roundness+"px",apply_css_style(canvas,options)}}}};_class43=Border;Border.properties=Object.keys(border_properties);_class43.prototype._uses_properties=_class43.properties,_class43.prototype.transition_properties=border_transition_properties,_class43.prototype.field_names=border_properties,_class43.prototype.class_name="Border"}});var _class44,PaddingText,init_PaddingText=__esm({"lib-browser/core/property_applications/applications/PaddingText.js"(){"use strict";init_define_process_env();init_shim();init_elements();init_PropertyApplication();PaddingText=class extends PropertyApplication{_apply(data,canvas,instance4){if(data){var _instance$element$roo;let use_legacy_padding=instance4.element.element_version(!0)<PADDING_VERSION||instance4.element.context_element().E_object().is_plugin;if(((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())>0){if(data.vertical_centering?canvas.addClass("bubble-r-vertical-center"):canvas.removeClass("bubble-r-vertical-center"),use_legacy_padding){var _data$padding_vertica;let vertical_padding=(_data$padding_vertica=data.padding_vertical)!=null?_data$padding_vertica:0;vertical_padding===0&&data._first_time||canvas.css({"padding-top":vertical_padding,"padding-bottom":vertical_padding})}}else{var _vertical_padding;let vertical_padding;if(data.vertical_centering)vertical_padding=(data.height-data.font_size)/2-2;else{if(!use_legacy_padding)return;vertical_padding=data.padding_vertical}(_vertical_padding=vertical_padding)!=null||(vertical_padding=0),vertical_padding===0&&data._first_time||(canvas[0].style["padding-top"]=vertical_padding+"px ",data.stretch_to_fit&&(canvas[0].style["padding-bottom"]=vertical_padding+"px "))}if(use_legacy_padding){var _data$padding_horizon;(_data$padding_horizon=data.padding_horizontal)!=null||(data.padding_horizontal=0),data.padding_horizontal===0&&data._first_time||(canvas[0].style["padding-left"]=data.padding_horizontal+"px ",canvas[0].style["padding-right"]=data.padding_horizontal+"px ")}}}};_class44=PaddingText;_class44.prototype._uses_properties=["vertical_centering","padding_vertical","padding_horizontal","font_size","height","stretch_to_fit"],_class44.prototype.transition_properties={padding_vertical:"padding-top",padding_horizontal:"padding-left"},_class44.prototype.field_names={padding_vertical:{default:0},padding_horizontal:{default:0},vertical_centering:{default:!1}},_class44.prototype.properties_for_new={vertical_centering:!0},_class44.prototype.class_name="PaddingText"}});var _class45,Padding,init_Padding=__esm({"lib-browser/core/property_applications/applications/Padding.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_elements();Padding=class extends PropertyApplication{_apply(data,canvas,instance4){if(data&&(instance4.element.element_version(!0)<PADDING_VERSION||instance4.element.context_element().E.is_plugin)){var _data$padding_vertica,_data$padding_horizon;(_data$padding_vertica=data.padding_vertical)!=null||(data.padding_vertical=0),(_data$padding_horizon=data.padding_horizontal)!=null||(data.padding_horizontal=0),data.padding_vertical===0&&data.padding_horizontal===0&&data._first_time||(canvas[0].style.padding=data.padding_vertical+"px "+data.padding_horizontal+"px")}}};_class45=Padding;_class45.prototype._uses_properties=["padding_vertical","padding_horizontal"],_class45.prototype.transition_properties={padding_vertical:"padding-top",padding_horizontal:"padding-left"},_class45.prototype.field_names={padding_vertical:{default:0},padding_horizontal:{default:0}},_class45.prototype.class_name="Padding"}});var _class46,InputPadding,init_InputPadding=__esm({"lib-browser/core/property_applications/applications/InputPadding.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();init_elements();InputPadding=class extends PropertyApplication{_apply(data,canvas,instance4){if(data&&(instance4.element.element_version(!0)<PADDING_VERSION||instance4.element.context_element().E.is_plugin)){var _data$padding_horizon;(_data$padding_horizon=data.padding_horizontal)!=null||(data.padding_horizontal=0),canvas[0].style.padding="0px "+data.padding_horizontal+"px"}}};_class46=InputPadding;_class46.prototype._uses_properties=["padding_horizontal"],_class46.prototype.transition_properties={padding_horizontal:"padding"},_class46.prototype.field_names={padding_horizontal:{default:4}},_class46.prototype.class_name="InputPadding"}});var import_web_dom_collections_iterator110,_class47,classes,previous_placeholders,PlaceholderColor,init_PlaceholderColor=__esm({"lib-browser/core/property_applications/applications/PlaceholderColor.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator110=__toESM(require_web_dom_collections_iterator());init_PropertyApplication();init_u2();init_elements();classes={},previous_placeholders=new WeakMap,PlaceholderColor=class extends PropertyApplication{_apply(data,canvas,instance4){if(data)if(instance4&&instance4.element.element_version(!0)>=PLACEHOLDER_COLOR_VERSION){let previous_color=previous_placeholders.get(canvas[0]);if(previous_color){let previous=classes[previous_color];canvas.removeClass(previous.class_name),previous.count--,previous.count<=0&&(previous.style_tag.remove(),delete classes[previous_color])}if(!(data.placeholder_color in classes)){let class_name="a"+LUID(),style2=document.createElement("style");style2.textContent=`
.${class_name}.${class_name}::-webkit-input-placeholder {
  color: ${data.placeholder_color};
}
.${class_name}.${class_name}::-moz-placeholder {
  color:    ${data.placeholder_color};
  opacity:  1;
}
.${class_name}.${class_name}:-ms-input-placeholder {
  color: ${data.placeholder_color} !important;
}
.${class_name}.${class_name}:-moz-placeholder {
  color: ${data.placeholder_color};
  opacity:  1;
}`,document.head.appendChild(style2),classes[data.placeholder_color]={class_name,style_tag:style2,count:0}}canvas.addClass(classes[data.placeholder_color].class_name),classes[data.placeholder_color].count++,previous_placeholders.set(canvas[0],data.placeholder_color)}else canvas.removeClass(["grey","black","white","blue","green","red"].join(" ")),data.placeholder_color!=="grey"&&["grey","black","white","blue","green","red"].includes(data.placeholder_color)&&canvas.addClass(data.placeholder_color)}};_class47=PlaceholderColor;_class47.prototype._uses_properties=["placeholder_color"],_class47.prototype.transition_properties={},_class47.prototype.no_solid_support=!0,_class47.prototype.field_names={placeholder_color:{default:"rgba(181, 181, 181, 1)"}},_class47.prototype.class_name="PlaceholderColor"}});var _class48,ToolTip,init_ToolTip=__esm({"lib-browser/core/property_applications/applications/ToolTip.js"(){"use strict";init_define_process_env();init_shim();init_PropertyApplication();ToolTip=class extends PropertyApplication{_apply(data,canvas,instance4){data&&instance4.run_mode()&&canvas.attr("title",data.title_attribute)}};_class48=ToolTip;_class48.prototype._uses_properties=["title_attribute"],_class48.prototype.transition_properties={},_class48.prototype.not_in_style=!0,_class48.prototype.field_names={title_attribute:{optional:!0}},_class48.prototype.no_solid_support=!0,_class48.prototype.class_name="ToolTip"}});var _class49,UniqueID,init_UniqueID=__esm({"lib-browser/core/property_applications/applications/UniqueID.js"(){"use strict";init_define_process_env();init_shim();init_client_config2();init_appquery();init_PropertyApplication();UniqueID=class extends PropertyApplication{_apply(data,canvas,instance4){data&&instance4.run_mode()&&appquery_default.has_advanced_feature_enabled("expose_id_option")&&(data.unique_id!=null||!["",null,void 0].includes(canvas[0].id))&&(data.unique_id==null?client_config_default2.run_mode_ids||canvas.removeAttr("id"):canvas[0].id=data.unique_id)}};_class49=UniqueID;_class49.prototype._uses_properties=["unique_id"],_class49.prototype.transition_properties={},_class49.prototype.not_in_style=!0,_class49.prototype.field_names={title_attribute:{optional:!0,no_states:!0}},_class49.prototype.class_name="UniqueID"}});function replace_s3_with_cdn_url(bare_s3_url,appname){return client_config_default2.user_file_url?bare_s3_url.replace(client_config_default2.user_file_url,get_file_cdn_url(appname)):bare_s3_url}function get_file_cdn_url(appname){return appname==="meta"?`${META_APPNAME_FOR_OWN_CDN}.${CDN_URL_SUFFIX}`:`${digest(appname!=null?appname:"")}.${CDN_URL_SUFFIX}`}function is_file_cdn_url(src){let{user_file_url,user_file_cdn}=client_config_default2;return user_file_url!=null&&src.includes(user_file_url)||user_file_cdn!=null&&src.includes(user_file_cdn)||src.includes("."+CDN_URL_SUFFIX)}var import_es_string_replace22,CDN_URL_SUFFIX,init_b_file_shared=__esm({"lib-browser/u/shared/b_file_shared.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace22=__toESM(require_es_string_replace());init_client_config2();init_bundle();init_hash();CDN_URL_SUFFIX="cdn.bubble.io/"}});function ignore_imgix_fn(src,ignore_imgix,force_imgix){return force_imgix?!1:!!(!client_config_default2.image_optimization_service||src.indexOf("ignore_imgix")!==-1||ignore_imgix||src.indexOf(".svg")!==-1||!is_file_cdn_url(src)&&!client_config_default2.always_proxy_user_files)}function get_imgix_url(src,parameters){return src.indexOf("//")===0?src=lib_default().location.parsed_url().protocol+src:src.indexOf("https://")!==0&&src.indexOf("http://")!==0&&(src=lib_default().location.parsed_url().protocol+"//"+src),client_config_default2.image_optimization_service+"/"+fixedEncodeURIComponent(src)+"?"+querystring2.stringify(parameters)}function normalize_size(size){size=size*1.1;let factor=Math.floor(Math.log2(size)),midpoint=Math.pow(2,factor)*1.5;return size>=midpoint?Math.pow(2,factor+1):midpoint}function get_reduced_file_url(src,width2,height2,options){var _parameters$fit;let width_ratio;if(width2){let new_width=normalize_size(width2);width_ratio=new_width/width2,width2=new_width}else width_ratio=null;height2&&(width_ratio?height2=Math.round(width_ratio*height2):height2=normalize_size(height2));function to_valid_number_string(number2){if(isNaN(number2)||number2==null){var _Number$isNaN2;return(_Number$isNaN2=Number.isNaN)!=null&&_Number$isNaN2.call(Number,number2)&&warn("Picture with NaN dimensions",{src,width:width2,height:height2,options}),null}else return number2.toString()}let parameters={w:to_valid_number_string(width2),h:to_valid_number_string(height2),auto:"compress"};options&&extend(parameters,options);let existing_options=src.split("?")[1];return existing_options&&(existing_options=querystring2.parse(existing_options),extend(parameters,existing_options)),(_parameters$fit=parameters.fit)!=null||(parameters.fit="max"),get_imgix_url(src.split("?")[0],parameters)}function get_image_json_data(src,cb){let param={fm:"json"},existing_options=src.split("?")[1];if(existing_options){let querystring_options=querystring2.parse(existing_options);switch(querystring_options.fm="json",extend(param,querystring_options),querystring_options.fit){case"crop":case"facearea":case"clamp":case"min":case"scale":if(querystring_options.w!=null&&querystring_options.h!=null){let dims={width:querystring_options.w,height:querystring_options.h};cb(dims)}else cb(null);return}if(querystring_options.ar){cb(null);return}}src=lib_default().location.parsed_url().protocol+"//"+get_imgix_url(src.split("?")[0],param);let ajax_request=$.ajax(src);return ajax_request.done((data,textStatus,jqXHR)=>{let height2,width2;[6,8].includes(data.Orientation)?(width2=data.PixelHeight,height2=data.PixelWidth):(width2=data.PixelWidth,height2=data.PixelHeight),cb(!width2||!height2?null:{width:width2,height:height2})}),ajax_request.fail((jqXHR,textStatus,errorThrown)=>cb(null))}function add_processing_options(src,properties){if((src==null?void 0:src.split)==null)return"";let parameters={},existing_options=src.split("?")[1];if(existing_options&&extend(parameters,querystring2.parse(existing_options)),properties.auto_enhance&&(parameters.auto="enhance"),properties.red_eye&&(properties.auto?parameters.auto+=",redeye":parameters.auto="redeye"),properties.extract_face){var _properties$facepad;parameters.fit="facearea",parameters.facepad=(_properties$facepad=properties.facepad)!=null?_properties$facepad:1}else properties.crop_to_fit&&(parameters.fit="crop");for(let property2 of["blur","sepia"])properties[property2]&&(parameters[property2]=properties[property2+"_level"]);return properties.pixel&&(parameters.px=properties.pixel_level),properties.mono&&(parameters.mono=rgb_to_hex(properties.mono_level).code.split("#")[1]),properties.mask&&(parameters.mask="ellipse"),properties.q!=null&&(parameters.q=properties.q),properties.fm&&(parameters.fm=properties.fm),src.split("?")[0]+"?"+querystring2.stringify(parameters)}var import_web_dom_collections_iterator111,querystring2,init_imgix=__esm({"lib-browser/imgix.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator111=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_b_file_shared();init_lib();init_client_config2();querystring2=__toESM(require_querystring())}});function get_image_real_dimensions(src,cb){if(!src){cb({});return}if(_image_dimensions_cache[src]){cb(_image_dimensions_cache[src]);return}function get_info_through_download(){let temp_image=img(void 0,$("body"),src);temp_image.hide(),temp_image.on("load",()=>{let res={width:temp_image.width(),height:temp_image.height()};temp_image.remove(),_image_dimensions_cache[src]=res,cb(res)}),temp_image.on("error",()=>{temp_image.remove(),cb({})})}let fixed_file_url=fixedEncodeURIComponent(client_config_default2.user_file_url),is_s3_url=src.indexOf(client_config_default2.user_file_url)!==-1||src.indexOf(fixed_file_url)!==-1,has_imgix=client_config_default2.image_optimization_service&&src.indexOf(client_config_default2.image_optimization_service)!==-1;is_s3_url&&has_imgix?get_image_json_data(src,res=>{res?(_image_dimensions_cache[src]=res,cb(res)):get_info_through_download()}):get_info_through_download()}var _image_dimensions_cache,init_images2=__esm({"lib-browser/shared/images.js"(){"use strict";init_define_process_env();init_shim();init_client_config2();init_u2();init_imgix();_image_dimensions_cache={}}});var image_utils_exports={};__export(image_utils_exports,{download_image:()=>download_image,downloaded_images:()=>downloaded_images,keep_proportions:()=>keep_proportions,optimize_image:()=>optimize_image,rescale_image:()=>rescale_image,reset_img_settings:()=>reset_img_settings,transparent_image:()=>transparent_image});function rescale_image(_ref){let{src,img:img2,element_height,element_width,cb,instance:instance4,ref_version}=_ref;src.indexOf("data:image/")===0&&cb(img2);function get_element_height(){return instance4!=null?{element_height:evaluate_property(instance4,"height"),element_width:evaluate_property(instance4,"width")}:{element_height,element_width}}({element_height,element_width}=get_element_height()),src=optimize_image(src,element_width,element_height),get_image_real_dimensions(src,res=>{if(res.height==null){cb==null||cb(img2);return}if(!(instance4!=null&&u_exports2.autorun_top(()=>instance4.state("src_version"))!==ref_version)){if(reset_img_settings(img2),res.height/res.width>element_height/element_width){let new_width=res.width/res.height*element_height;img2.css({"margin-left":(element_width-new_width)/2+"px",width:new_width+"px"})}else{let new_height=res.height/res.width*element_width;img2.css({"margin-top":(element_height-new_height)/2+"px",height:new_height+"px"})}cb==null||cb(img2)}})}function keep_proportions(instance4,width2,force){let height2;return force||instance4.get_static_property("keep_proportion_resize")?(height2=width2/instance4.element.get_width()*instance4.element.get_height(),instance4.set_height(height2)):height2=instance4.element.get_height(),height2}function optimize_image(src,width2,height2,options,ignore_imgix,force_imgix){var _options;if(typeof src!="string")return;if(/^data:image\//.test(src)||/^blob:/.test(src)||(src=replace_s3_with_cdn_url(src,appquery_default.appname()),/\.(mov|mp4|mkv|avi|flv|webm)$/i.test(src)))return src;width2===0&&(width2=void 0),height2===0&&(height2=void 0);let was_https=src.indexOf("https://")===0;if(src.indexOf("http://")===0&&(src=src.split("http://").slice(1).join("http://")),src.indexOf("https://")===0&&(src=src.split("https://").slice(1).join("https://")),src.indexOf("//")===0&&(src=src.replace("//","")),!(client_config_default2.image_optimization_service&&src.indexOf(client_config_default2.image_optimization_service)!==-1||src.indexOf("/user/iop/")!==-1)&&!((_options=options)!=null&&_options.force)&&ignore_imgix_fn(src))client_config_default2.user_file_cdn&&(src=src.replace(client_config_default2.user_file_cdn,get_file_cdn_url(appquery_default.appname())));else{if(!lib_default().is_edit_mode()){var _window5;let dpr=normalize_dpr((_window5=window)==null?void 0:_window5.devicePixelRatio);if(dpr!=null){var _options2;(_options2=options)!=null||(options={}),options.dpr=dpr}}src=get_reduced_file_url(src,width2,height2,options)}let protocol;return was_https?protocol="https:":protocol=lib_default().location.parsed_url().protocol,src=protocol+"//"+src,src}function download_image(src,instance4,cb){if(downloaded_images[src])return cb==null?void 0:cb(src);{let download_div=img(void 0,void 0,src);return download_div.on("load",()=>{var _Lib$workflow$debugge;return downloaded_images[src]=!0,cb==null||cb(src),download_div.remove(),(_Lib$workflow$debugge=lib_default().workflow.debugger)==null?void 0:_Lib$workflow$debugge.get_request_size(src,"image")}),download_div.on("error",()=>{if(download_div.remove(),cb){var _Lib$workflow$debugge2;return cb(transparent_image()),(_Lib$workflow$debugge2=lib_default().workflow.debugger)==null?void 0:_Lib$workflow$debugge2.report_error({type:"warning",instance:instance4,error:{message:`The image could not be loaded: ${src} .`}})}})}}function normalize_dpr(dpr){return dpr==null?1:dpr>MIN_DPR?dpr<MAX_DPR?DPR_INCREMENTS*Math.floor(dpr/DPR_INCREMENTS):MAX_DPR:MIN_DPR}var import_es_string_replace23,reset_img_settings,MIN_DPR,MAX_DPR,DPR_INCREMENTS,transparent_image,downloaded_images,init_image_utils=__esm({"lib-browser/core/core_elements/shared/image_utils.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace23=__toESM(require_es_string_replace());init_u2();init_images2();init_element_eval();init_client_config2();init_imgix();init_lib();init_appquery();init_b_file_shared();reset_img_settings=img2=>img2.css({margin:"0px",width:"100%",height:"100%","object-fit":""});MIN_DPR=.5,MAX_DPR=8,DPR_INCREMENTS=.25;transparent_image=()=>"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",downloaded_images={}}});var DEFAULT_COLOR_TOKENS,DEFAULT_USER_COLOR_TOKEN_RGBA,MISSING_USER_COLOR_TOKEN_TEXT,RGBA_TOKEN,RGB_TOKEN_ALPHA,TOKEN_NAME,CAPTURE_ALPHA,VAR_IDENTIFIER,RGB_VAR_IDENTIFIER,COLOR_VARIANTS,SORTED_DEFAULT_TOKENS,PRIMARY_DEFAULT,TEXT_DEFAULT,SURFACE_DEFAULT,DESTRUCTIVE_DEFAULT,DEFAULT_TOKEN_NAMES_DESCRIPTIONS,init_colors=__esm({"lib-browser/constants/colors.js"(){"use strict";init_define_process_env();init_shim();DEFAULT_COLOR_TOKENS={primary:{default:"rgba(2, 5, 211, 1)"},primary_contrast:{default:"rgba(255, 255, 255, 1)"},text:{default:"rgba(9, 23, 71, 1)"},surface:{default:"rgba(255, 255, 255, 1)"},background:{default:"rgba(255, 255, 255, 0)"},destructive:{default:"rgba(255, 0, 0, 1)"},success:{default:"rgba(23, 219, 78, 1)"},alert:{default:"rgba(250, 181, 21, 1)"}},DEFAULT_USER_COLOR_TOKEN_RGBA="rgba(0,0,0,1)",MISSING_USER_COLOR_TOKEN_TEXT="Custom color (MISSING)",RGBA_TOKEN=/var\(--color_[^)]*\)/g,RGB_TOKEN_ALPHA=/rgba\(var\(--color_[^)]*\),[^)]*\)/g,TOKEN_NAME=/var\(--color_([^)]*)\)/,CAPTURE_ALPHA=/rgba\((?<base>.*), ?(?<opacity>[0-9.]+)\)/,VAR_IDENTIFIER="var(",RGB_VAR_IDENTIFIER="_rgb",COLOR_VARIANTS=["default"],SORTED_DEFAULT_TOKENS=["primary","primary_contrast","text","surface","background","destructive","success","alert"],PRIMARY_DEFAULT="var(--color_primary_default)",TEXT_DEFAULT="var(--color_text_default)",SURFACE_DEFAULT="var(--color_surface_default)",DESTRUCTIVE_DEFAULT="var(--color_destructive_default)",DEFAULT_TOKEN_NAMES_DESCRIPTIONS={primary:{name:"Primary",description:"Color for any primary buttons, actions, or hover treatment for clickable elements."},primary_contrast:{name:"Primary contrast",description:"Color of text and icons in a primary button."},text:{name:"Text",description:"Color of static text and icons."},surface:{name:"Surface",description:"Background color for containers."},background:{name:"Background",description:"Background color for pages and page sections."},destructive:{name:"Destructive",description:"Indicates major errors, deleting, and negative values."},success:{name:"Success",description:"Indicates a successful action the user has taken, or positive numerical values."},alert:{name:"Alert",description:"Caution color that notifies a user there is an action to take."}}}});var import_web_dom_collections_iterator112,import_es_string_replace24,_class50,SimpleGradient,init_SimpleGradient=__esm({"lib-browser/core/property_applications/applications/SimpleGradient.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator112=__toESM(require_web_dom_collections_iterator()),import_es_string_replace24=__toESM(require_es_string_replace());init_u2();init_PropertyApplication();init_colors();SimpleGradient=class extends PropertyApplication{_apply(data,canvas){if(data){let is_linear=[null,void 0,"linear"].includes(data.style),DEFAULT_RGBA="rgba(0,0,0,1)",c1=data.from,c2=data.to,direction,ms_direction,c_mid=data.mid;if(is_linear)if(data.direction==="custom"){var _data$angle;direction=((_data$angle=data.angle)!=null?_data$angle:45)+"deg"}else{var _data$direction;if(direction=(_data$direction=data.direction)!=null?_data$direction:"top",direction==="top"||direction==="bottom"){if(ms_direction=0,direction==="bottom"){let aux=c1;c1=c2,c2=aux,direction="top"}}else if((direction==="left"||direction==="right")&&(ms_direction=1,direction==="right")){let aux=c1;c1=c2,c2=aux,direction="left"}}let ms_c1=RGBA_to_ARGB(c1),ms_c2=RGBA_to_ARGB(c2),code;c_mid?code=`${c1} 0%, ${c_mid} 50%, ${c2} 100%`:code=`${c1} 0%, ${c2} 100%`;let css_line;if(is_linear)css_line=`linear-gradient(${direction}, ${code})`;else{var _data$shape,_data$pos,_data$xpos,_data$ypos;(_data$shape=data.shape)!=null||(data.shape="ellipse"),(_data$pos=data.pos)!=null||(data.pos="farthest-corner"),(_data$xpos=data.xpos)!=null||(data.xpos=10),(_data$ypos=data.ypos)!=null||(data.ypos=10),css_line=`radial-gradient(${data.shape} ${data.pos} at ${data.xpos}% ${data.ypos}%, ${code})`}canvas[0].style.background=c1;for(let i of["-moz-","-webkit-","-o-","-ms-",""]){if(css_line.includes("var")){let test_line=css_line.replace(RGB_TOKEN_ALPHA,DEFAULT_RGBA);if(test_line=test_line.replace(RGBA_TOKEN,DEFAULT_RGBA),!CSS.supports("background",i+test_line))continue}canvas[0].style.background=i+css_line}canvas.css("filter",`progid:DXImageTransform.Microsoft.gradient( startColorstr='${ms_c1}', endColorstr='${ms_c2}',GradientType=${ms_direction})`)}}_get_properties(){return[]}};_class50=SimpleGradient;_class50.prototype.class_name="SimpleGradient"}});function _apply_image_src(canvas,src,instance4,options){canvas.data("_last_downloaded_image",src),download_image(src,instance4,()=>{src===canvas.data("_last_downloaded_image")&&(options["background-image"]=`url("${src}")`,apply_css_style(canvas,options))})}var _class51,Background,init_Background=__esm({"lib-browser/core/property_applications/applications/Background.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_PropertyApplication();init_application_utilities();init_image_utils();init_appquery();init_SimpleGradient();init_element_eval();Background=class extends PropertyApplication{_apply(data,canvas,instance4){if(!(instance4!=null&&instance4.element.type()==="Page"&&appquery_default.page(instance4.element_id()).use_responsive_algorithm())&&data){let options={};if(!data._first_time&&(appquery_default.get_public_setting("bubble_version")<16||(instance4==null?void 0:instance4.element.type())!=="Dropdown"||data.background_style==="image")&&(options.background="none"),data.background_style==="bgcolor")options["background-color"]=RGBA_to_RGB(data.bgcolor),options["background-color"]=data.bgcolor;else if(data.background_style==="none"&&!data._first_time)options["background-color"]="transparent";else if(data.background_style==="gradient"){apply_css_style(canvas,options),new SimpleGradient()._apply({style:data.background_gradient_style,direction:data.background_gradient_direction,angle:data.background_gradient_custom_angle,from:data.background_gradient_from,to:data.background_gradient_to,mid:data.background_gradient_mid,shape:data.background_radial_gradient_shape,pos:data.background_radial_gradient_size,xpos:data.background_radial_gradient_xpos,ypos:data.background_radial_gradient_ypos},canvas);return}else if(data.background_style==="image"&&(data.backdrop_image_paralax||(options["background-color"]=data.background_color_if_empty_image),data.background_image)){var _instance$element$roo,_instance$element$roo2;let repeat_key=data.repeat_background_vertical&&data.repeat_background_horizontal?"repeat":data.repeat_background_vertical?"repeat-y":data.repeat_background_horizontal?"repeat-x":"no-repeat";options["background-repeat"]=repeat_key,data.center_background?data.is_backdrop?options["background-position"]="center top":options["background-position"]="center":options["background-position"]="",data.background_size_cover||instance4!=null&&(_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()&&data.crop_responsive?(options["background-size"]="cover",options["-webkit-background-size"]="cover",options["-moz-background-size"]="cover",options["-o-background-size"]="cover"):options["background-size"]="";let prop=instance4==null?void 0:instance4.element.property("background_image"),is_static3=prop&&(!prop.is_empty()&&prop.is_static()||prop.is_empty());if(data.background_size_cover){if((!instance4||instance4!=null&&instance4.run_mode()||is_static3)&&!data.backdrop_image_paralax){_apply_image_src(canvas,optimize_image(data.background_image,canvas.width()),instance4,options);return}}else if(data.crop_responsive&&instance4!=null&&(_instance$element$roo2=instance4.element.root())!=null&&_instance$element$roo2.use_responsive_algorithm()){if(instance4.run_mode()){let _last_source=null,_to_load=null,image_src_ar=this.create_autorun(instance4,()=>{let width2=evaluate_property(instance4,"width"),height2=evaluate_property(instance4,"height"),current_image=evaluate_property(instance4,"background_image"),is_first_load_responsive_mode=instance4.responsive_mode()&&width2===instance4.element.get_width();function do_it2(){_apply_image_src(canvas,optimize_image(current_image,width2,height2,{fit:"crop"}),instance4,options)}_to_load=optimize_image(current_image,width2,height2),current_image===_last_source&&!downloaded_images[_to_load]||is_first_load_responsive_mode?instance4.setTimeout(()=>{_to_load===optimize_image(current_image,width2,height2)&&image_src_ar.alive()&&do_it2()},300):(width2!==0||_to_load===current_image)&&(_last_source=current_image,do_it2())});return}else if(is_static3){_apply_image_src(canvas,data.background_image,instance4,options);return}}else if(!data.backdrop_image_paralax){_apply_image_src(canvas,optimize_image(data.background_image),instance4,options);return}if(data.backdrop_image_paralax)if(is_on_mobile_or_tablet()){_apply_image_src(canvas,optimize_image(data.background_image),instance4,options);return}else{options["background-image"]="none";let background_src=optimize_image(data.background_image,canvas.width());canvas.parallax({imageSrc:background_src,speed:data.backdrop_paralax_speed}),$(".parallax-slider").attr({src:background_src})}}apply_css_style(canvas,options)}}};_class51=Background;Background.properties=["background_style","bgcolor","background_gradient_direction","background_gradient_custom_angle","background_gradient_from","background_gradient_to","background_gradient_mid","background_image","repeat_background_vertical","center_background","repeat_background_horizontal","background_size_cover","background_color_if_empty_image","crop_responsive","background_gradient_style","background_radial_gradient_shape","background_radial_gradient_size","background_radial_gradient_xpos","background_radial_gradient_ypos"];_class51.prototype._uses_properties=_class51.properties,_class51.prototype.transition_properties={background_style:"background"},_class51.prototype.no_solid_support=!0,_class51.prototype.field_names={background_style:{default:"none"},bgcolor:{default:"#FFFFFF"},background_gradient_direction:{default:"top"},background_gradient_custom_angle:{default:45},background_gradient_from:{default:"#FFFFFF"},background_gradient_to:{default:"#AAAAAA"},background_gradient_mid:{optional:!0},background_gradient_style:{default:"linear"},background_radial_gradient_shape:{default:"ellipse"},background_radial_gradient_size:{default:"farthest-corner"},background_radial_gradient_xpos:{default:10},background_radial_gradient_ypos:{default:10},background_image:{},center_background:{},background_size_cover:{},repeat_background_vertical:{},repeat_background_horizontal:{},background_color_if_empty_image:{default:"rgba(255, 255, 255, 0.0)"},crop_responsive:{no_states:!0,default:!0,prop_not_in_style:!0}},_class51.prototype.class_name="Background"}});var import_web_dom_collections_iterator113,apply_css_style2,calculate_border_height2,calculate_border_width2,patch_user_agent_styles2,prop_apps,property_applications_default,_def$prototype,init_property_applications=__esm({"lib-browser/core/property_applications/index.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator113=__toESM(require_web_dom_collections_iterator());init_style_properties();init_application_utilities();init_NoSelect();init_Dimensions();init_Opacity();init_MinWidth();init_RootSizing();init_ResponsiveElement();init_ResponsiveContainer();init_ShortDimensions();init_PositionOnly();init_Rotation();init_BoxShadow();init_PaddingFields();init_Font();init_FontShadow();init_FontSpacing();init_Border();init_PaddingText();init_Padding();init_InputPadding();init_PlaceholderColor();init_ToolTip();init_UniqueID();init_Background();init_SimpleGradient();apply_css_style2=apply_css_style,calculate_border_height2=calculate_border_height,calculate_border_width2=calculate_border_width,patch_user_agent_styles2=patch_user_agent_styles,prop_apps={NoSelect,Dimensions,Opacity,MinWidth,RootSizing,ResponsiveElement,ResponsiveContainer,ShortDimensions,PositionOnly,Rotation,BoxShadow,PaddingFields,Font,FontShadow,FontSpacing,Border,PaddingText,Padding,InputPadding,PlaceholderColor,ToolTip,UniqueID,Background,SimpleGradient,apply_css_style:apply_css_style2,calculate_border_height:calculate_border_height2,calculate_border_width:calculate_border_width2,patch_user_agent_styles:patch_user_agent_styles2},property_applications_default=prop_apps;for(let def of Object.values(prop_apps))if(((_def$prototype=def.prototype)==null?void 0:_def$prototype.field_names)!=null&&!def.prototype.not_in_style)for(let[prop_name,data]of Object.entries(def.prototype.field_names))data.prop_not_in_style||register_style_property(prop_name)}});var color_tokens_exports={};__export(color_tokens_exports,{add_user_color_token:()=>add_user_color_token,color_property_to_rgba:()=>color_property_to_rgba,default_color_tokens_to_property:()=>default_color_tokens_to_property,delete_user_color_token:()=>delete_user_color_token,get_color_token_color:()=>get_color_token_color,get_color_token_display:()=>get_color_token_display,get_user_color_tokens:()=>get_user_color_tokens,is_user_color_token:()=>is_user_color_token,token_variant_to_properties:()=>token_variant_to_properties,user_color_tokens_to_property:()=>user_color_tokens_to_property,variable_to_token_variant:()=>variable_to_token_variant});function get_color_token_color(val,token_set,variant){let{rgba}=token_variant_to_properties(token_set,variant);if(val.includes(RGB_VAR_IDENTIFIER)){var _rgba_to_array$slice,_rgba_to_array,_rgba_to_array$at,_rgba_to_array2;let rgb=(_rgba_to_array$slice=(_rgba_to_array=rgba_to_array(rgba))==null?void 0:_rgba_to_array.slice(0,-1))!=null?_rgba_to_array$slice:"",alpha=(_rgba_to_array$at=(_rgba_to_array2=rgba_to_array(val))==null?void 0:_rgba_to_array2.at(-1))!=null?_rgba_to_array$at:-1;return`rgba(${rgb==null?void 0:rgb.toString()},${alpha})`}return rgba}function get_color_token_display(token_set,variant,color){let{name}=token_variant_to_properties(token_set,variant),color_hex=rgb_to_hex(color).code;return`${name} (${color_hex.toUpperCase()})`}function variable_to_token_variant(val){if(val!=null&&val.includes(VAR_IDENTIFIER)){var _val$match;let token=(_val$match=val.match(TOKEN_NAME))==null?void 0:_val$match[1];if(!token)return null;let variant=COLOR_VARIANTS.find(variant2=>!!token.includes(variant2));if(!variant)return null;let token_set=token.replace(`_${variant}`,"").replace(RGB_VAR_IDENTIFIER,"");return{variant,token_set}}return null}function is_user_color_token(token){return!SORTED_DEFAULT_TOKENS.includes(token)}function token_variant_to_properties(token,variant){var _appquery$get_public_;let color_tokens=(_appquery$get_public_=appquery_default.get_public_setting("color_tokens"))!=null?_appquery$get_public_:DEFAULT_COLOR_TOKENS,user_color_tokens=get_user_color_tokens();if(is_user_color_token(token)){var _user_color_tokens$va;let current_token=(_user_color_tokens$va=user_color_tokens[variant][token])!=null?_user_color_tokens$va:{name:MISSING_USER_COLOR_TOKEN_TEXT,description:MISSING_USER_COLOR_TOKEN_TEXT,rgba:DEFAULT_USER_COLOR_TOKEN_RGBA,deleted:!1};return{name:current_token.name,description:current_token.description,rgba:current_token.rgba,deleted:current_token.deleted}}else return{name:DEFAULT_TOKEN_NAMES_DESCRIPTIONS[token].name,description:DEFAULT_TOKEN_NAMES_DESCRIPTIONS[token].description,rgba:color_tokens[token][variant],deleted:!1}}function override_alpha(val,override){if(override==null)return val;let parts=val==null?void 0:val.match(CAPTURE_ALPHA);return parts!=null?`rgba(${parts.groups.base},${override})`:`rgba(${val},${override})`}function color_property_to_rgba(val){var _val$match2,_val$match2$groups,_appquery$get_public_2,_tokens$token$token_s;let token=variable_to_token_variant(val);if(token==null)return val;let original_alpha=(_val$match2=val.match(CAPTURE_ALPHA))==null||(_val$match2$groups=_val$match2.groups)==null?void 0:_val$match2$groups.opacity,tokens=(_appquery$get_public_2=appquery_default.get_public_setting("color_tokens"))!=null?_appquery$get_public_2:DEFAULT_COLOR_TOKENS;if((_tokens$token$token_s=tokens[token.token_set])!=null&&_tokens$token$token_s[token.variant]){var _tokens$token$token_s2;return override_alpha((_tokens$token$token_s2=tokens[token.token_set])==null?void 0:_tokens$token$token_s2[token.variant],original_alpha)}let user_tokens=get_user_color_tokens();return override_alpha(user_tokens[token.variant][token.token_set].rgba,original_alpha)}function get_user_color_tokens(){var _appquery$get_public_3;return(_appquery$get_public_3=appquery_default.get_public_setting("color_tokens_user"))!=null?_appquery$get_public_3:json_deep_copy(DEFAULT_USER_TOKENS)}function add_user_color_token(name,description){let variant=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default",rgba=arguments.length>3&&arguments[3]!==void 0?arguments[3]:DEFAULT_USER_COLOR_TOKEN_RGBA,user_color_tokens=get_user_color_tokens(),new_uid=appquery_default.uid();return user_color_tokens[variant][new_uid]={rgba,name,description,order:Object.keys(user_color_tokens[variant]).length,deleted:!1},track(STYLES_VARIABLE_CREATED,{app:appquery_default.appname(),token:new_uid,variant,name,description,type:"Color"}),appquery_default.set_setting(!0,"color_tokens_user",user_color_tokens),appquery_default.commit(),new_uid}function delete_user_color_token(variant,token){let user_color_tokens=get_user_color_tokens(),deleted_idx=user_color_tokens[variant][token].order;for(let id in user_color_tokens[variant])user_color_tokens[variant][id].order>deleted_idx&&(user_color_tokens[variant][id].order-=1);track(STYLES_VARIABLE_DELETED,{app:appquery_default.appname(),token,variant,name:user_color_tokens[variant][token].name,description:user_color_tokens[variant][token].description,type:"Color"}),user_color_tokens[variant][token].deleted=!0,user_color_tokens[variant][token].name+=DELETED_USER_TOKEN_STRING,appquery_default.set_setting(!0,"color_tokens_user",user_color_tokens),appquery_default.commit()}function default_color_tokens_to_property(){var _appquery$get_public_4;let color_tokens=(_appquery$get_public_4=appquery_default.get_public_setting("color_tokens"))!=null?_appquery$get_public_4:DEFAULT_COLOR_TOKENS,ret={};for(let token in color_tokens)for(let variant of COLOR_VARIANTS){var _rgba_to_array3;ret[`--color_${token}_${variant}`]=color_tokens[token][variant];let rgb_string=(_rgba_to_array3=rgba_to_array(color_tokens[token][variant]))==null?void 0:_rgba_to_array3.slice(0,-1).toString();ret[`--color_${token}_${variant}_rgb`]=rgb_string!=null?rgb_string:""}return ret}function user_color_tokens_to_property(){let user_color_tokens=get_user_color_tokens(),ret={};for(let variant in user_color_tokens)for(let token in user_color_tokens[variant]){var _rgba_to_array4;if(!user_color_tokens[variant][token].rgba)continue;ret[`--color_${token}_${variant}`]=user_color_tokens[variant][token].rgba;let rgb_string=(_rgba_to_array4=rgba_to_array(user_color_tokens[variant][token].rgba))==null?void 0:_rgba_to_array4.slice(0,-1).toString();ret[`--color_${token}_${variant}_rgb`]=rgb_string!=null?rgb_string:""}return ret}var import_es_array_at2,import_es_string_at_alternative2,import_es_string_replace25,import_web_dom_collections_iterator115,init_color_tokens=__esm({"lib-browser/lang/color_tokens.js"(){"use strict";init_define_process_env();init_shim();import_es_array_at2=__toESM(require_es_array_at()),import_es_string_at_alternative2=__toESM(require_es_string_at_alternative()),import_es_string_replace25=__toESM(require_es_string_replace()),import_web_dom_collections_iterator115=__toESM(require_web_dom_collections_iterator());init_colors();init_tokens();init_color();init_appquery();init_analytics();init_segment_events();init_b_object()}});function load_font_tokens_default(){var _appquery$get_public_4;let font_tokens2=(_appquery$get_public_4=appquery_default.get_public_setting("font_tokens"))!=null?_appquery$get_public_4:DEFAULT_TOKENS;for(let token in font_tokens2)ALL_WEIGHTS.forEach(weight=>{load_font(to_font_face(font_tokens2[token],weight))})}function load_font_tokens_user(){var _appquery$get_public_5;let font_tokens_user=(_appquery$get_public_5=appquery_default.get_public_setting("font_tokens_user"))!=null?_appquery$get_public_5:json_deep_copy(DEFAULT_USER_TOKENS);for(let variant in font_tokens_user)for(let uid in font_tokens_user[variant])ALL_WEIGHTS.forEach(weight=>{load_font(to_font_face(font_tokens_user[variant][uid].font_family,weight))})}function default_font_tokens_to_property(){var _appquery$get_public_9;let font_tokens2=(_appquery$get_public_9=appquery_default.get_public_setting("font_tokens"))!=null?_appquery$get_public_9:DEFAULT_TOKENS,ret={};for(let token in font_tokens2)ret["--font_"+token]=JSON.stringify(font_tokens2[token].replace(CUSTOM_FONT_FLAG,""));return ret}function user_font_tokens_to_property(){var _appquery$get_public_10;let font_tokens_user=(_appquery$get_public_10=appquery_default.get_public_setting("font_tokens_user"))!=null?_appquery$get_public_10:json_deep_copy(DEFAULT_USER_TOKENS),ret={};for(let variant in font_tokens_user)for(let uid in font_tokens_user[variant])font_tokens_user[variant][uid].font_family&&(ret["--font_"+uid+"_"+variant]=JSON.stringify(font_tokens_user[variant][uid].font_family.replace(CUSTOM_FONT_FLAG,"")));return ret}var import_es_string_replace26,init_font_tokens=__esm({"lib-browser/lang/font_tokens.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace26=__toESM(require_es_string_replace());init_appquery();init_fonts();init_tokens();init_webfonts();init_analytics();init_segment_events();init_b_object()}});var element_utils_exports={};__export(element_utils_exports,{register_group_data:()=>register_group_data,register_tab_index_listener:()=>register_tab_index_listener,reset_inputs_and_groups:()=>reset_inputs_and_groups});function reset_inputs_and_groups(instance4){for(let type of["reset_input","reset_group","clear_list"])for(let child of instance4.current_children)child.element.get_messages().includes(type)&&child.message(type)}function register_tab_index_listener(instance4,cb){instance4.autorun(()=>{let tabindex=instance4.state("tab_index");tabindex!=null&&cb(tabindex)})}function register_group_data(data,instance4){let old_data=null;function check_reset_inputs_and_groups(new_data){compare(new_data,old_data)||(old_data=new_data,reset_inputs_and_groups(instance4))}if(lib_default().bubble_version()>=29)instance4.state("group_data",()=>{if(instance4.state("datasource_changed_by_workflow_action"))return instance4.state("overridden_group_data");if(data.default_group_data)return data.default_group_data();var _element_eval$evaluat;return(_element_eval$evaluat=evaluate_property(instance4,"data_source"))!=null?_element_eval$evaluat:null}),instance4.autorun(()=>{check_reset_inputs_and_groups(instance4.state("group_data"))}),instance4.on_message("reset_group",()=>{instance4.state("datasource_changed_by_workflow_action",!1),reset_inputs_and_groups(instance4)}),instance4.on_message("set_group_data",new_data=>{var _new_data;(_new_data=new_data)!=null||(new_data=null),instance4.state("datasource_changed_by_workflow_action",!0),instance4.state("overridden_group_data",new_data)});else{let refresh_group_data2=function(){if(!instance4.state("datasource_changed_by_workflow_action")){let retrieve;return data.default_group_data?retrieve=data.default_group_data():retrieve=()=>{var _element_eval$evaluat2;return(_element_eval$evaluat2=evaluate_property(instance4,"data_source"))!=null?_element_eval$evaluat2:null},instance4.state("group_data",retrieve)}};var refresh_group_data=refresh_group_data2;instance4.state("group_data",STATE_NOT_READY),instance4.on_message("reset_group",()=>(instance4.state("datasource_changed_by_workflow_action",!1),refresh_group_data2(),reset_inputs_and_groups(instance4))),instance4.on_message("set_group_data",new_data=>{var _new_data2;return(_new_data2=new_data)!=null||(new_data=null),instance4.state("datasource_changed_by_workflow_action",!0),instance4.state("group_data",new_data),check_reset_inputs_and_groups(new_data)}),instance4.autorun(refresh_group_data2),instance4.autorun(()=>{let new_data=instance4.state("group_data");check_reset_inputs_and_groups(new_data)})}}var import_web_dom_collections_iterator117,init_element_utils=__esm({"lib-browser/core/core_elements/core_elements_utilities/element_utils.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator117=__toESM(require_web_dom_collections_iterator());init_u2();init_elements();init_element_eval();init_lib()}});var import_autorun3,seen_custom_names,seen_default_names,init_elements_state=__esm({"lib-browser/lang/elements/elements_state.js"(){"use strict";init_define_process_env();init_shim();import_autorun3=__toESM(require_autorun()),seen_custom_names={},seen_default_names={}}});var import_es_error_cause14,ServerElementInstance,init_ServerElementInstance=__esm({"lib-browser/lang/elements/ServerElementInstance.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause14=__toESM(require_es_error_cause());init_ElementInstance();init_elements();init_incremental();ServerElementInstance=class _ServerElementInstance extends ElementInstance_default{constructor(element,parent){super(element,ElementInstance_default.modes.RUN),this.cached_server_props={},this.dynamic_catcher=!1,this._server_states=void 0,this._parent=parent}state(key,value,get_raw_function){var _this$_server_states;if((_this$_server_states=this._server_states)!=null||(this._server_states={}),value!==void 0){this._server_states[key]=value;return}this.dynamic_catcher=!0;let state4=this._server_states[key];if(state4===STATE_NOT_READY&&state4!==value)throw Error();return typeof state4=="function"&&!get_raw_function?state4():state4}compute_properties(){let E=this.element.E;return E.solid_component?(this._update_visible(),this.mark_solid_initialized(),this.children=[],this.element.can_have_children()&&(E.create_server_children?E.create_server_children(this):incremental_for_each(this.element.elements(),element=>{element.exists()&&this.children.push(new _ServerElementInstance(element,this))})),E.solid_component.computeProperties(this)):null}find_instance_by_id(id){if(id==null)return null;let namespace=this.get_namespace();if(namespace==null)return null;if(namespace[id]!=null)return namespace[id];let parent=this.parent(),p_result=parent==null?void 0:parent.find_instance_by_id(id);return p_result||null}is_visible(){return this.dynamic_catcher=!0,this.element.is_visible_on_page_load()}is_visible_me(){return this.dynamic_catcher=!0,this.element.is_visible_on_page_load()}is_animating(){return this.dynamic_catcher=!0,!1}}}});function _applyDecoratedDescriptor5(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator118,_dec6,_dec22,_class53,S13,State,init_State=__esm({"lib-browser/lang/elements/State.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator118=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_nodes();init_caching();init_shrink();init_elements_utils();init_logger();({S:S13}=shrink_exports),State=(_dec6=cached({type:RUN_MODE}),_dec22=cached({type:RUN_MODE}),_class53=class extends nodes_default.AppNode{property(name){return nodes_default.new_expression(this.json._gchild(S13.properties,shrink(name)),this)}get_changelog_type(){return"Element"}get_injected_btype(){var _this$context_element,_this$context_element2;return(_this$context_element=(_this$context_element2=this.context_element().E).get_injected_btype)==null?void 0:_this$context_element.call(_this$context_element2,this.context_element())}get_injected_display(){var _this$context_element3,_this$context_element4;return(_this$context_element3=(_this$context_element4=this.context_element().E).get_injected_display)==null?void 0:_this$context_element3.call(_this$context_element4)}properties(){return this.json._child(S13.properties).child_names().map(name=>this.property(name))}find_expressions(filter){return nodes_default.from_raw_array(this.json,nodes_default.new_expression,state_find_expressions(nodes_default.to_raw(this),filter))}rel_path(){return"states."+this.json.name()}get_static_property(name){return this.property(name).get_static()}context_element(){return nodes_default.new_element(this.json.parent().parent())}root(){return this.context_element().root()}no_margins(){return this.context_element().no_margins()}get_containing_element(){return this.context_element().get_containing_element()}container_layout(){return this.context_element().container_layout()}added_to_container(){return this.context_element().added_to_container()}force_fixed(){return this.context_element().force_fixed()}not_resizable(){return this.context_element().not_resizable()}uses_css_responsive(){return this.context_element().uses_css_responsive()}has_fixed_aspect_ratio(){return this.context_element().has_fixed_aspect_ratio()}is_fixed_dimension(dimension){return this.context_element().is_fixed_dimension(dimension)}only_fixed_or_fit_height(){var _this$context_element5;return(_this$context_element5=this.context_element().only_fixed_or_fit_height)!=null?_this$context_element5:!1}only_fixed_or_fit_width(){var _this$context_element6;return(_this$context_element6=this.context_element().only_fixed_or_fit_width)!=null?_this$context_element6:!1}only_fixed_or_fill_height(){var _this$context_element7;return(_this$context_element7=this.context_element().only_fixed_or_fill_height)!=null?_this$context_element7:!1}only_fixed_or_fill_width(){var _this$context_element8;return(_this$context_element8=this.context_element().only_fixed_or_fill_width)!=null?_this$context_element8:!1}no_height(){var _this$context_element9;return(_this$context_element9=this.context_element().no_height)!=null?_this$context_element9:!1}no_width(){var _this$context_element10;return(_this$context_element10=this.context_element().no_width)!=null?_this$context_element10:!1}can_be_variable_width(){return this.context_element().can_be_variable_width()}not_max_adjustable(){return this.context_element().not_max_adjustable()}type(){return this.context_element().type()}is_mobile(){var _this$context_element11,_this$context_element12,_this$context_element13;return(_this$context_element11=(_this$context_element12=(_this$context_element13=this.context_element()).is_mobile)==null?void 0:_this$context_element12.call(_this$context_element13))!=null?_this$context_element11:!1}is_mobile_view(){var _this$context_element14,_this$context_element15,_this$context_element16;return info("Used deprecated is_mobile_view function on State"),(_this$context_element14=(_this$context_element15=(_this$context_element16=this.context_element()).is_mobile)==null?void 0:_this$context_element15.call(_this$context_element16))!=null?_this$context_element14:!1}get_style_if_exists(){return this.context_element().get_style_if_exists()}element_version(styleable){return this.context_element().element_version(styleable)}get_type_display(){return this.context_element().get_type_display()}property_names(){return this.json._child(S13.properties).children().map(json=>json.name())}condition(){return nodes_default.new_expression(this.json._child(S13.condition),this)}},_applyDecoratedDescriptor5(_class53.prototype,"property_names",[_dec6],Object.getOwnPropertyDescriptor(_class53.prototype,"property_names"),_class53.prototype),_applyDecoratedDescriptor5(_class53.prototype,"condition",[_dec22],Object.getOwnPropertyDescriptor(_class53.prototype,"condition"),_class53.prototype),_class53)}});var transition_fns,Transition2,init_Transition=__esm({"lib-browser/lang/elements/Transition.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_logger();init_lib();init_nodes();transition_fns=["ease","ease-in","ease-out","ease-in-out","linear","step-start","step-end"],Transition2=class extends nodes_default.HasProperties{constructor(json,owner){super(json),this.owner=owner,this.owner||error("transition created without owner")}context_element(){var _this$owner;return(_this$owner=this.owner)!=null?_this$owner:nodes_default.new_element(this.json.parent().parent())}prop_name(){return this.json.name()}prop_name_display(){var _property$long_captio;let property2=this.context_element().fields(!0).find(p=>p.name===this.prop_name());return property2||console.log("could not find property "+this.prop_name()+" on node "+this.context_element()),(_property$long_captio=property2.long_caption)!=null?_property$long_captio:property2.caption}duration_node(){return this.json.child("duration")}duration(){return this.duration_node().get()}fn_node(){return this.json.child("fn")}fn(){return this.fn_node().get()}find_in_editor(with_div,cb,is_page_owner){u_exports2.run_once(30,()=>this.context_element(),(err,element)=>{element.find_in_editor_raw(()=>{var _element$root;((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>0?lib_default().property_editor.current_tab("appearance"):lib_default().property_editor.current_tab("transitions"),u_exports2.wait_for_updates(()=>{with_div?cb==null||cb($(`#${this.prop_name()}.transition.section`)):cb==null||cb()})},is_page_owner)})}};Transition2.transition_fns=transition_fns;Transition2.default_transition={duration:200,fn:"ease"}}});var import_web_dom_collections_iterator119,RAW,RAW_default,init_RAW=__esm({"lib-browser/lang/application/RAW.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator119=__toESM(require_web_dom_collections_iterator()),RAW={},RAW_default=RAW}});var import_web_dom_collections_iterator120,init_responsive_algorithm=__esm({"lib-browser/shared/responsive/responsive_algorithm.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator120=__toESM(require_web_dom_collections_iterator());init_element_edit_eval()}});var AT_ROOT,ROOT_CLASS,CSS_FLAG,init_server_rendering=__esm({"lib-browser/constants/server_rendering.js"(){"use strict";init_define_process_env();init_shim();AT_ROOT="@at-root",ROOT_CLASS="b-root",CSS_FLAG="--stylesheet-active"}});function toClass(id){return id.replace(/^[\d]|[A-Z]/g,"a$&")}function toDashes(prop){return prop.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}function toCamelCase(prop){return prop.replace(/-./g,s=>s[1].toUpperCase())}function fixValue(prop,value){return typeof value=="number"&&!IS_NON_DIMENSIONAL.test(toCamelCase(prop))?`${value}px`:value}var import_es_string_replace27,IS_NON_DIMENSIONAL,init_server_css=__esm({"lib-browser/shared/server_rendering/server_css.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace27=__toESM(require_es_string_replace());init_server_rendering();IS_NON_DIMENSIONAL=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i}});function handleFallbacks(style2){let ret={};for(let prop in style2){let value=style2[prop];Array.isArray(value)?ret[prop]=apply_css_fallbacks(toDashes(prop),value.map(v=>fixValue(prop,v))):ret[prop]=fixValue(prop,value)}return ret}var import_web_dom_collections_iterator121,autorun9,Property,Style,init_properties=__esm({"lib-browser/core/core_elements/components/utils/properties.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator121=__toESM(require_web_dom_collections_iterator());init_solid();autorun9=__toESM(require_autorun());init_server_css();init_b_ui();init_logger();Property=class{constructor(fn){let options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.fn=void 0,this.fallback=void 0,this.alwaysDynamic=void 0,this.mayContainDynamic=void 0,this.noWaitVisible=void 0,this.fn=fn,this.fallback=options.fallback,this.alwaysDynamic=options.alwaysDynamic,this.mayContainDynamic=options.mayContainDynamic,this.noWaitVisible=options.noWaitVisible}computeCache(instance4){instance4.dynamic_catcher=!1;try{let result=this.fn(instance4),isStatic=!instance4.dynamic_catcher&&!this.alwaysDynamic;return this.mayContainDynamic&&!isStatic?{value:void 0,isStatic:!1}:{value:result,isStatic:!instance4.dynamic_catcher&&!this.alwaysDynamic}}catch(error2){return propagated_error("Error computing property",error2),{value:void 0,isStatic:!1}}}createClientWatcher(instance4,cachedValue,props){let[value,setValue]=createSignal(cachedValue!=null?cachedValue:this.fallback);return createEffect(()=>{if(!this.noWaitVisible&&!props.turnedVisible)return;let watcher=autorun9.Watcher(()=>{var _this$fn;return(_this$fn=this.fn(instance4))!=null?_this$fn:this.fallback});watcher.on_value(setValue),onCleanup(()=>watcher.destroy())}),value}computeStaticClient(cachedValue){return cachedValue!=null?cachedValue:this.fallback}};Style=class extends Property{constructor(fn){var _options$outerPositio;let options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(fn,{fallback:{},alwaysDynamic:options.alwaysDynamic,noWaitVisible:options.noWaitVisible}),this.selector=void 0,this.notInStylesheet=void 0,this.outerPositioning=void 0,this.fn=fn,this.selector=options.selector,this.notInStylesheet=options.notInStylesheet,this.outerPositioning=(_options$outerPositio=options.outerPositioning)!=null?_options$outerPositio:!1}createClientWatcher(instance4,cachedStyle,props){let signal=super.createClientWatcher(instance4,cachedStyle,props);return()=>{let style2=signal(),appliedStyle=handleFallbacks(style2),overrides=appliedStyle;if(this.notInStylesheet)for(let prop in cachedStyle){let value=appliedStyle[prop];(value==null||value==="")&&(overrides[prop]=void 0)}else for(let prop in cachedStyle){let value=appliedStyle[prop];if(value==null||value==="")overrides[prop]="unset";else{let cachedValue=cachedStyle[prop];Array.isArray(cachedValue)?cachedValue.includes(value)&&(overrides[prop]=void 0):cachedValue===value&&(overrides[prop]=void 0)}}return appliedStyle}}computeStaticClient(){return{}}}}});function convertStyle(prop){return prop.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}function createTestCanvas(){let _data={};return Object.assign([{style:{},className:""}],{css(objOrProp,value){typeof objOrProp=="object"?Object.assign(this[0].style,objOrProp):this[0].style[objOrProp]=value},data(str,value){return arguments.length>1&&(_data[str]=value),_data[str]},width(){return 0},find(){return this},addClass(className2){this[0].className+=" "+className2},removeClass(className2){this[0].className=this[0].className.replace(className2.trim(),"")},attr(){}})}function grabStyle(canvas){let inline_style=canvas[0].style,applied_style={};for(let prop in inline_style)applied_style[convertStyle(prop)]=inline_style[prop];return applied_style}function withMockCanvas(fn){let canvas=createTestCanvas();return fn(canvas),{style:grabStyle(canvas),className:canvas[0].className.trim()}}var import_es_string_replace28,init_jquery_wrapper=__esm({"lib-browser/core/core_elements/components/utils/jquery_wrapper.js"(){"use strict";init_define_process_env();init_shim();import_es_string_replace28=__toESM(require_es_string_replace())}});function layoutStyling(instance4){let parent=instance4.parent();if(parent==null)return{};let containerLayout=parent.element.container_layout(),element=instance4.element,layout=LAYOUT_PROPERTIES[containerLayout],isFixed=containerLayout===FIXED_LAYOUT,properties={min_width:isFixed?`${element.get_width()}px`:min_width_css(instance4),max_width:isFixed?`${element.get_width()}px`:max_width_css(instance4),min_height:isFixed?`${element.get_height()}px`:min_height_css(instance4),max_height:isFixed?`${element.get_height()}px`:max_height_css(instance4),fit_width:is_fitting_width(instance4),fit_height:is_fitting_height(instance4),has_fixed_aspect_ratio:instance4.element.has_fixed_aspect_ratio()};for(let prop of margin_properties)properties[prop]=evaluate_property(instance4,prop);for(let[field,prop]of Object.entries(layout.element_properties))properties[prop]=evaluate_property(instance4,field);let css_to_apply=layout.css_func(properties);if(!element.E.uses_css_responsive){css_to_apply["min-width"]=`${element.get_min_width()}px`;let max_width=element.get_max_width();css_to_apply["max-width"]=max_width!=null?`${max_width}px`:"",instance4.run_mode()?delete css_to_apply.height:(css_to_apply.width=`${element.get_width()}px`,css_to_apply.height=`${element.get_height()}px`,css_to_apply["flex-grow"]=0),css_to_apply["min-height"]="",css_to_apply["max-height"]=""}return css_to_apply}function containerLayoutStyling(instance4){let layout=LAYOUT_PROPERTIES[instance4.element.container_layout()],props={};for(let[field,prop]of Object.entries(layout.container_properties))props[prop]=evaluate_property(instance4,field);return container_properties(props)}var import_web_dom_collections_iterator122,init_responsive_evaluation=__esm({"lib-browser/shared/responsive/responsive_evaluation.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator122=__toESM(require_web_dom_collections_iterator());init_element_eval();init_element_props();init_responsive_css();init_responsive_layout()}});function createPropertyApplication(pApp){return new Style(instance4=>withMockCanvas(testCanvas=>{if(pApp.apply_once)pApp.apply_directly({},testCanvas);else{let props;instance4.element.E.additional_uses_properties?props=pApp.uses_properties.concat(instance4.element.E.additional_uses_properties):props=pApp.uses_properties;let values={};for(let prop of props)values[prop]=evaluate_property(instance4,prop);values._first_time=!0,pApp.apply_directly(values,testCanvas,instance4)}}).style,{selector:pApp.sel_fn!=null?` ${String(pApp.sel_fn)}`:void 0})}function propertyApplicationStyles(element){return element.get_property_applications().filter(pApp=>!pApp.no_solid_support).map(pApp=>createPropertyApplication(pApp))}function transitionStyles(element){let selectors={};if(lib_default.or_throw().is_edit_mode())return[];for(let pApp of element.get_property_applications())pApp.sel_fn&&(typeof pApp.sel_fn=="function"?error("Property applications no longer support functions as selectors",{class_name:pApp.class_name}):selectors[pApp.sel_fn]=!0);let getTransitionStyling=selector=>instance4=>{let transitions=[];for(let pApp of instance4.element.get_property_applications())(selector&&pApp.sel_fn===selector||!selector&&!pApp.sel_fn)&&transitions.push(pApp.get_transition_styling(instance4.element));selector||transitions.push(instance4.get_transition_styling());let transition=transitions.filter(str=>!!str).join(", ");return{"-webkit-transition":transition,"-moz-transition":transition,"-o-transition":transition,"-ms-transition":transition,transition}};return[new Style(getTransitionStyling(void 0),{noWaitVisible:!0}),...Object.keys(selectors).map(selector=>new Style(getTransitionStyling(selector),{selector,noWaitVisible:!0}))]}function clickabilityStyles(element){return!lib_default.or_throw().is_edit_mode()&&element.E.change_cursor_style_if_clickable&&element.get_related_workflows("ButtonClicked").length?[new Style(instance4=>({cursor:evaluate_property(instance4,"button_disabled")?"default":"pointer"}))]:[]}function basicStyling(element){return[...visibilityStyles,...propertyApplicationStyles(element),...transitionStyles(element),...clickabilityStyles(element)]}function positioningStyle(shouldAddWrapper){return[new Style(instance4=>{let styling=layoutStyling(instance4),ret={};for(let prop in styling)ret[convertStyle(prop)]=styling[prop];if(shouldAddWrapper){var _window5,_window$BrowserDetect;if(instance4.run_mode()&&!instance4.state("flickered")&&(isServer||((_window5=window)==null||(_window$BrowserDetect=_window5.BrowserDetect)==null?void 0:_window$BrowserDetect.browser)==="Safari"))return isServer||queueMicrotask(()=>instance4.state("flickered",!0)),{...ret,height:"0px"}}return ret},{noWaitVisible:!0,outerPositioning:!0,alwaysDynamic:shouldAddWrapper}),new Style(instance4=>{var _instance$element$get;return{"z-index":(_instance$element$get=instance4.element.get_zindex())!=null?_instance$element$get:void 0}},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>instance4.element.collapse_when_hidden()&&instance4.should_collapse()?{display:"none"}:{},{alwaysDynamic:!0,noWaitVisible:!0,notInStylesheet:!0,outerPositioning:!0})]}function placedStyling(element){return[...basicStyling(element),...positioningStyle(element.can_have_children()&&element.should_add_extra_wrapper())]}function tokenStyling(){return new Style(instance4=>({...default_font_tokens_to_property(),...user_font_tokens_to_property(),...default_color_tokens_to_property(),...user_color_tokens_to_property()}),{noWaitVisible:!0,selector:AT_ROOT})}var import_web_dom_collections_iterator123,visibilityStyles,init_element_styles=__esm({"lib-browser/core/core_elements/components/utils/element_styles.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator123=__toESM(require_web_dom_collections_iterator());init_jquery_wrapper();init_logger();init_properties();init_element_eval();init_font_tokens();init_color_tokens();init_server_rendering();init_lib();init_web();init_responsive_evaluation();init_ServerElementInstance();visibilityStyles=[new Style(instance4=>!instance4.is_visible_me()&&!(instance4.is_animating()&&instance4._is_animating_me)?{visibility:"hidden"}:{},{alwaysDynamic:!0,noWaitVisible:!0})]}});function getAxes(tableElement,axisType){var _tableElement$element;return(_tableElement$element=tableElement==null?void 0:tableElement.elements().filter(element=>element.type()===axisType))!=null?_tableElement$element:[]}function getRelativeIndex(axis){let axisType=axis.type();return sortByIndex(getAxes(axis.parent(),axisType)).findIndex(element=>element.id()===axis.id())}function crossAxisStyling(element){let dim=()=>{var _repeating_instance$e,_repeating_instance;return isTableDirectionHorizontal(((_repeating_instance$e=(_repeating_instance=element.repeating_instance)==null?void 0:_repeating_instance.element)!=null?_repeating_instance$e:element).parent())?"width":"height"};return[...basicStyling(element),new Style(instance4=>({"flex-direction":dim()==="height"?"row":"column","box-sizing":"content-box"})),new Style(instance4=>{var _evaluate_property;let min=(_evaluate_property=evaluate_property(instance4,`min_${dim()}_css`))!=null?_evaluate_property:"0px";if(evaluate_property(instance4,`single_${dim()}`))return{"z-index":CROSS_AXIS_ZINDEX,[dim()]:min,"flex-grow":0,"flex-shrink":0};let max=evaluate_property(instance4,`max_${dim()}_css`),fitting=element_props_exports[`is_fitting_${dim()}`](instance4);return{"z-index":CROSS_AXIS_ZINDEX,[`min-${dim()}`]:min,[`max-${dim()}`]:max!=null?max:"",[dim()]:fitting?"max-content":min,"flex-grow":fitting?0:1,"flex-shrink":0}},{outerPositioning:!0}),new Style(instance4=>instance4.is_visible_me()?{}:{display:"none"},{alwaysDynamic:!0,noWaitVisible:!0,notInStylesheet:!0,outerPositioning:!0})]}var import_web_dom_collections_iterator124,NUM_DEFAULT_COLUMNS,NUM_DEFAULT_ROWS_EDITOR,DEFAULT_REPEATING_ROW_HEIGHT,DEFAULT_HEADER_ROW_HEIGHT,DEFAULT_COLUMN_WIDTH,CELL_ZINDEX,CROSS_AXIS_ZINDEX,MAIN_AXIS_ZINDEX,PSEUDO_TABLE_ELEMENTS,TableContext,isTableDirectionHorizontal,getLetterIndex,sortByIndex,updateIndicesOnCreate,init_table_element=__esm({"lib-browser/core/core_elements/components/utils/table_element.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator124=__toESM(require_web_dom_collections_iterator());init_solid();init_appquery();init_sorting();init_properties();init_element_styles();init_element_eval();init_element_props();NUM_DEFAULT_COLUMNS=3,NUM_DEFAULT_ROWS_EDITOR=3,DEFAULT_REPEATING_ROW_HEIGHT=77,DEFAULT_HEADER_ROW_HEIGHT=43,DEFAULT_COLUMN_WIDTH=158,CELL_ZINDEX=2,CROSS_AXIS_ZINDEX=1,MAIN_AXIS_ZINDEX=0,PSEUDO_TABLE_ELEMENTS=["TableMainAxis","TableCrossAxis","TableCell"],TableContext=createContext(),isTableDirectionHorizontal=element=>(element==null?void 0:element.get_static_property("table_direction"))==="horizontal",getLetterIndex=index=>index>=26?getLetterIndex(Math.floor(index/26)-1)+getLetterIndex(index%26):String.fromCharCode("A".charCodeAt(0)+index),sortByIndex=axes=>axes.sort((a,b)=>a.get_static_property("axis_index")-b.get_static_property("axis_index")||compare2(a.id(),b.id()));updateIndicesOnCreate=function(neighborId,axisType){let direction=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"after",axis=appquery_default.element(neighborId),sorted=sortByIndex(getAxes(axis.parent(),axisType)),newIndex=sorted.indexOf(axis)+(direction==="before"?0:1);for(let i=0;i<sorted.length;i++)sorted[i].set_property("axis_index",i+(i>=newIndex?1:0));return newIndex}}});var init_element_meta_actions=__esm({"lib-browser/core/core_elements/core_elements_utilities/element_meta_actions.js"(){"use strict";init_define_process_env();init_shim();init_analytics();init_lib();init_appquery();init_table_element()}});var init_types2=__esm({"lib-browser/lang/elements/types.js"(){"use strict";init_define_process_env();init_shim()}});var css_exports={};__export(css_exports,{ACTIONS_CANVAS:()=>ACTIONS_CANVAS,ACTIONS_TAB:()=>ACTIONS_TAB,ACTION_CANVAS:()=>ACTION_CANVAS,API_CANVAS:()=>API_CANVAS,API_TAB:()=>API_TAB,APPEARANCE:()=>APPEARANCE,CONDITIONAL:()=>CONDITIONAL,CONTEXTUAL_VIDEO_PALETTE:()=>CONTEXTUAL_VIDEO_PALETTE,DATA_CANVAS:()=>DATA_CANVAS,DATA_TAB:()=>DATA_TAB,DEDICATED_PALETTE:()=>DEDICATED_PALETTE,DEFAULT_ACTIONCANVAS_TOOLBOX_WIDTH:()=>DEFAULT_ACTIONCANVAS_TOOLBOX_WIDTH,DOCS_CANVAS:()=>DOCS_CANVAS,EDITOR_CHECKLIST_ALERT_BAR:()=>EDITOR_CHECKLIST_ALERT_BAR,ELEMENTS_CANVAS:()=>ELEMENTS_CANVAS,ELEMENTS_TAB:()=>ELEMENTS_TAB,FEEDBACK_WINDOW:()=>FEEDBACK_WINDOW,GENERAL_CANVAS:()=>GENERAL_CANVAS,GENERAL_TAB:()=>GENERAL_TAB,HIGHLIGHT_BOX:()=>HIGHLIGHT_BOX,IMAGE_EDITOR_PALETTE:()=>IMAGE_EDITOR_PALETTE,LOGS_CANVAS:()=>LOGS_CANVAS,LOGS_TAB:()=>LOGS_TAB,MAINWINDOW:()=>MAINWINDOW,MAIN_TABS:()=>MAIN_TABS,MAIN_TABS_TAB:()=>MAIN_TABS_TAB,MAIN_TABS_TAB_PLUGIN:()=>MAIN_TABS_TAB_PLUGIN,MAXIMUM_TOOLBOX_WIDTH:()=>MAXIMUM_TOOLBOX_WIDTH,MESSAGE_POPUP:()=>MESSAGE_POPUP,MINIMUM_TOOLBOX_WIDTH:()=>MINIMUM_TOOLBOX_WIDTH,PLUGIN_CANVAS:()=>PLUGIN_CANVAS,PLUGIN_TAB:()=>PLUGIN_TAB,PRIVACY_SUBTAB:()=>PRIVACY_SUBTAB,PROPERTY_EDITOR:()=>PROPERTY_EDITOR,PROP_NAME:()=>PROP_NAME,PROP_NAME_SELECTOR:()=>PROP_NAME_SELECTOR,PROP_ROW:()=>PROP_ROW,SEARCH_PALETTE:()=>SEARCH_PALETTE,SETTINGS_CANVAS:()=>SETTINGS_CANVAS,SETTINGS_TAB:()=>SETTINGS_TAB,SHAREDTECH_CANVAS:()=>SHAREDTECH_CANVAS,SHAREDTECH_TAB:()=>SHAREDTECH_TAB,SLIDABLE_PALETTE:()=>SLIDABLE_PALETTE,SPOT:()=>SPOT,STATS_CANVAS:()=>STATS_CANVAS,STATS_TAB:()=>STATS_TAB,STYLES_CANVAS:()=>STYLES_CANVAS,STYLES_TAB:()=>STYLES_TAB,TABBAR_WIDTH:()=>TABBAR_WIDTH,TAB_NAME_TO_CANVAS_SELECTOR:()=>TAB_NAME_TO_CANVAS_SELECTOR,TAB_NAME_TO_TAB_SELECTOR:()=>TAB_NAME_TO_TAB_SELECTOR,TEMPLATE_CANVAS:()=>TEMPLATE_CANVAS,TEMPLATE_TAB:()=>TEMPLATE_TAB,TOOLBOX_PANE:()=>TOOLBOX_PANE,TRANSITIONS:()=>TRANSITIONS,VERSIONS_CANVAS:()=>VERSIONS_CANVAS,VERSIONS_TAB:()=>VERSIONS_TAB,VISUAL_CANVAS:()=>VISUAL_CANVAS,VISUAL_EDIT_TOOLBOX:()=>VISUAL_EDIT_TOOLBOX,VISUAL_TAB:()=>VISUAL_TAB,WORKFLOW_TAB:()=>WORKFLOW_TAB});var MAINWINDOW,MAIN_TABS,MAIN_TABS_TAB,MAIN_TABS_TAB_PLUGIN,VISUAL_TAB,GENERAL_TAB,WORKFLOW_TAB,SHAREDTECH_TAB,DATA_TAB,API_TAB,STYLES_TAB,ELEMENTS_TAB,PLUGIN_TAB,ACTIONS_TAB,SETTINGS_TAB,VERSIONS_TAB,LOGS_TAB,STATS_TAB,TEMPLATE_TAB,VISUAL_CANVAS,ACTION_CANVAS,DATA_CANVAS,STYLES_CANVAS,PLUGIN_CANVAS,SETTINGS_CANVAS,LOGS_CANVAS,TEMPLATE_CANVAS,DOCS_CANVAS,GENERAL_CANVAS,SHAREDTECH_CANVAS,API_CANVAS,ELEMENTS_CANVAS,ACTIONS_CANVAS,VERSIONS_CANVAS,STATS_CANVAS,PRIVACY_SUBTAB,PROPERTY_EDITOR,APPEARANCE,CONDITIONAL,TRANSITIONS,SLIDABLE_PALETTE,FEEDBACK_WINDOW,DEDICATED_PALETTE,SEARCH_PALETTE,IMAGE_EDITOR_PALETTE,CONTEXTUAL_VIDEO_PALETTE,PROP_NAME,PROP_ROW,PROP_NAME_SELECTOR,HIGHLIGHT_BOX,SPOT,DEFAULT_ACTIONCANVAS_TOOLBOX_WIDTH,MINIMUM_TOOLBOX_WIDTH,MAXIMUM_TOOLBOX_WIDTH,TABBAR_WIDTH,TOOLBOX_PANE,VISUAL_EDIT_TOOLBOX,EDITOR_CHECKLIST_ALERT_BAR,TAB_NAME_TO_CANVAS_SELECTOR,TAB_NAME_TO_TAB_SELECTOR,MESSAGE_POPUP,init_css=__esm({"lib-browser/editor/css.js"(){"use strict";init_define_process_env();init_shim()}});var missing_element_exports={};__export(missing_element_exports,{default:()=>missing_element_default});var exported3,missing_element_default,init_missing_element=__esm({"lib-browser/lang/elements/missing_element.js"(){"use strict";init_define_process_env();init_shim();init_element_meta_actions();init_types2();init_css();exported3={get_html(){return"<div>missing element</div>"},field_names:{},is_visible_on_page_load(){return!0},initialize(){},property_applications:[],add_an_invisible_div_on_the_top:!1},missing_element_default=exported3}});var for_mode,init_property_sections=__esm({"lib-browser/lang/elements/property_sections.js"(){"use strict";init_define_process_env();init_shim()}});function getPropertyCache(id){var _window$_bubble_watch;return(_window$_bubble_watch=window._bubble_watcher_cache)==null?void 0:_window$_bubble_watch[id]}var init_evaluation_cache=__esm({"lib-browser/shared/server_rendering/evaluation_cache.js"(){"use strict";init_define_process_env();init_shim()}});var import_web_dom_collections_iterator125,init_responsive_v0=__esm({"lib-browser/shared/responsive_v0.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator125=__toESM(require_web_dom_collections_iterator())}});var init_lang_utils=__esm({"lib-browser/lang/lang_utils.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_logger();init_State()}});var import_web_dom_collections_iterator126,CUSTOM_PROP_IDENTIFIER,ON_ELEMENT,ON_ELEMENT_LIST,init_custom_elements=__esm({"lib-browser/constants/custom_elements.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator126=__toESM(require_web_dom_collections_iterator()),CUSTOM_PROP_IDENTIFIER="param_",ON_ELEMENT={includes:key=>ON_ELEMENT_LIST.has(key)||key.startsWith(CUSTOM_PROP_IDENTIFIER)},ON_ELEMENT_LIST=new Set(["lock_in_editor","is_visible","top","left","zindex","data_source","custom_id","greyout_color","greyout_blur","responsive_alignment","prevent_user_from_closing_through_esc","collapse_margin","fixed_width","min_width","use_max_width","max_width","responsive_show","responsive_show_width","width","height","floating_reference","floating_reference_horizontal","unique_id","floating_reference_horizontal_resp","float_zindex","parallax","nonant_alignment","vert_alignment","horiz_alignment","order","collapse_when_hidden","collapse_animation","animation_type","single_width","min_width_css","max_width_css","fit_width","single_height","min_height_css","max_height_css","fit_height","margin_left","margin_right","margin_top","margin_bottom","overflow_scroll","safe_area_behavior"])}});function _applyDecoratedDescriptor6(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}function get_shrunk_style_properties(){if(!_shrunk_style_properties){_shrunk_style_properties={};let object2=get_style_properties();for(let k in object2){let v=object2[k];_shrunk_style_properties[shrink(k)]=v}}return _shrunk_style_properties}function _is_loop(elem,properties){let seen={};for(let i=0;i<properties.length;i++){let p=properties[i],expr=elem.property(p),f1=make_filter("GetElement"),f2=make_filter("ThisElement"),entries=[...expr.find_expressions(f1),...expr.find_expressions(f2)];lib_default.or_throw().is_edit_mode()?seen[elem.json._id]=!0:seen[elem.json.id()]=!0;for(let k=0;k<entries.length;k++){var _entry$raw,_entry_props$element_,_entry_props$element_2;let entry=entries[k],entry_props=(_entry$raw=entry.raw())==null?void 0:_entry$raw.properties;if(entry_props==null){debug("missing entry properties object",{raw:entry.raw(),path:entry.path()});continue}if(seen[(_entry_props$element_=entry_props.element_id)!=null?_entry_props$element_:""])return!0;seen[(_entry_props$element_2=entry_props.element_id)!=null?_entry_props$element_2:""]=!0}}return!1}var import_web_dom_collections_iterator127,import_es_string_replace29,_dec7,_dec23,_dec32,_dec42,_dec52,_dec62,_dec72,_class54,gen_name_cache,currently_computing_gen_name,_shrunk_style_properties,GenericElement,init_GenericElement=__esm({"lib-browser/lang/elements/GenericElement.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator127=__toESM(require_web_dom_collections_iterator()),import_es_string_replace29=__toESM(require_es_string_replace());init_u2();init_decaf();init_logger();init_style_properties();init_caching();init_HasID();init_RAW();init_evaluate_static();init_responsive_algorithm();init_responsive_layout();init_elements();init_elements_utils();init_elements_state();init_missing_element();init_property_sections();init_State();init_Transition();init_evaluation_cache();init_elements_versioning();init_lib();init_btypes();init_css();init_shrink();init_shrink();init_appquery();init_responsive_v0();init_property_applications();init_lang_utils();init_nodes_utils();init_registry();init_node_types();init_btype_ids();init_lang();init_custom_elements();init_loggable();init_allow_overrides_check();init_fonts();init_elements();gen_name_cache={},currently_computing_gen_name={};GenericElement=(_dec7=cached({type:AUTORUN}),_dec23=cached({type:RUN_MODE}),_dec32=cached({type:RUN_MODE,parameters:1}),_dec42=cached({type:RUN_MODE}),_dec52=cached({type:ALL_MODES}),_dec62=cached({type:RUN_MODE}),_dec72=cached({type:RUN_MODE,parameters:1}),_class54=class extends HasID{make_new(){return new_element(...arguments)}constructor(json,fake){var _ref,_options$_type;let options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(json=json.to_id(),super(json),this.E=void 0,this.fake=void 0,this._type=void 0,this.definition_or_self=void 0,this.style_override_properties=void 0,this.num_style_overrides=void 0,this._property_watcher_fns=void 0,this.is_missing=void 0,this.__solid_component=void 0,this._get_responsive_data_watcher=void 0,this._precomputed=void 0,this.fake=fake,this._type=(_ref=(_options$_type=options._type)!=null?_options$_type:json.child("type").get())!=null?_ref:MISSING_TYPE,this.style_override_properties=new Set,this.num_style_overrides=u_exports2.Box(0),this.definition_or_self=this,this._type==="CustomElement"){var _json$child$raw$custo,_json$child$raw;let plugin2=lib_default.or_throw().load_custom((_json$child$raw$custo=(_json$child$raw=json.child("properties").raw())==null?void 0:_json$child$raw.custom_id)!=null?_json$child$raw$custo:"");this.E=plugin2,this.definition_or_self=plugin2.custom_definition();let old_property=this.property.bind(this),old_default=this.get_default.bind(this),old_get_static_property=this.get_static_property.bind(this);if(this.property=plugin2.property_transformer(this,old_property),this.get_static_property=plugin2.get_static_property_transformer(this,old_get_static_property),this.get_default=plugin2.default_transformer(this,old_default),this.get_style_if_exists=plugin2.get_style_if_exists_transformer(),this.get_responsive_data=()=>{var _this$property$get_st;let custom_id=(_this$property$get_st=this.property("custom_id").get_static())!=null?_this$property$get_st:"";return this.app().custom_definition(custom_id).get_responsive_data()},this.get_visible_workflows=function(){return plugin2.get_visible_workflows(this)},this.get_related_workflows=plugin2.get_related_workflows(this),!lib_default.or_throw().is_edit_mode()){var _plugin$custom_states,_plugin$custom_states2;let plugin_states=(_plugin$custom_states=(_plugin$custom_states2=plugin2.custom_states)==null?void 0:_plugin$custom_states2.call(plugin2))!=null?_plugin$custom_states:enhance_array([]),element_states=get_states_from_raw_json(this.json).map(json2=>new State(json2)),_states=[...plugin_states,...element_states];this.states=()=>_states}}else if(!this._type)this.E=missing_element_default;else{var _Lib$or_throw$load_pl;this.E=(_Lib$or_throw$load_pl=lib_default.or_throw().load_plugin(`${lib_default.or_throw().plugin_prefixes.element}${this._type}`,!0))!=null?_Lib$or_throw$load_pl:missing_element_default}this.is_missing=this.E===missing_element_default}get solid_component(){return this.__solid_component==null&&this.build_solid_component(),this.__solid_component}build_solid_component(){var _this$E$solid_compone;return this.__solid_component=(_this$E$solid_compone=this.E.solid_component)==null?void 0:_this$E$solid_compone.buildComponent(this,getPropertyCache(this.ssr_key())),this.__solid_component}is_malformed(){return!1}display(skip_is_loop){return this.get_name(skip_is_loop)}E_object(){return this.E}disable_rename(){var _this$E$generate_name,_this$E;return((_this$E$generate_name=(_this$E=this.E).generate_name)==null?void 0:_this$E$generate_name.call(_this$E,this))!=null}get_name(runmode_show){var _this$E$generate_name2,_this$E2;let generated_name=(_this$E$generate_name2=(_this$E2=this.E).generate_name)==null?void 0:_this$E$generate_name2.call(_this$E2,this);if(generated_name)return generated_name;let name=this.json.child("name").get();if(name)return seen_custom_names[name]=!0,name;{var _this$gen_name;!runmode_show&&lib_default.or_throw().workflow.debugger!=null&&(runmode_show=!0);let temp_name=(_this$gen_name=this.gen_name(runmode_show))!=null?_this$gen_name:this.default_name();return seen_default_names[temp_name]=!0,temp_name}}name_for_datasource(){var _this$E$name_for_data,_this$E$name_for_data2,_this$E3;return(_this$E$name_for_data=(_this$E$name_for_data2=(_this$E3=this.E).name_for_datasource)==null?void 0:_this$E$name_for_data2.call(_this$E3,this))!=null?_this$E$name_for_data:this.get_name()}get_responsive_data(){if(!this.exists())return{};if(is_edit_mode())return this._get_responsive_data_watcher=u_exports2.Watcher(()=>{let data;return this.root().use_responsive_algorithm()?data=(void 0)(this):data=(void 0)(this),(void 0)(data)}),this._get_responsive_data_watcher.get();let derived=lib_default.or_throw().derived("Responsive",this.root().json._path(),this.root().use_responsive_algorithm());return derived.set_app(this.app()),derived.content()[this.id()]}get_changelog_type(){return"Element"}default_name(){return this.json.child("default_name").get()}gen_name(runmode_show){var _this$E$properties_fo,_this$E$properties_fo2,_this$E4,_gen_name_cache$node_;if(!lib_default.or_throw().is_edit_mode()&&!runmode_show)return;let properties=(_this$E$properties_fo=(_this$E$properties_fo2=(_this$E4=this.E).properties_for_name)==null?void 0:_this$E$properties_fo2.call(_this$E4,this))!=null?_this$E$properties_fo:["text","placeholder","label","icon","group_type"];if(_is_loop(this,properties))return this.default_name();let node_path=this.toUniqueString();if(currently_computing_gen_name[node_path])return this.default_name();currently_computing_gen_name[node_path]=!0,(_gen_name_cache$node_=gen_name_cache[node_path])!=null||(gen_name_cache[node_path]=u_exports2.Watcher(()=>{let get_short_type=addition=>{let a=get_short_display(this.type());if(a==="CustomElement"){var _appquery$custom_defi;let custom_id=this.get_static_property("custom_id"),name=(_appquery$custom_defi=appquery_default.custom_definition(custom_id))==null?void 0:_appquery$custom_defi.name();if(name)return name}return a+" "+addition};for(let p of properties)if(p==="group_type"){let gt=this.get_static_property(p);if(gt){var _btypes$get;let type=(_btypes$get=get5(gt))==null?void 0:_btypes$get.display();if(type)return get_short_type(type)}}else{let expr=this.property(p);if(!expr.is_empty()){let val=expr.get_tree_display().slice(0,20);return get_short_type(val)}}})),delete currently_computing_gen_name[node_path];let[ready,value]=gen_name_cache[node_path].get_current();return ready?value:void 0}get_type_display(){var _this$E$get_type_disp,_this$E$get_type_disp2,_this$E5;return(_this$E$get_type_disp=(_this$E$get_type_disp2=(_this$E5=this.E).get_type_display)==null?void 0:_this$E$get_type_disp2.call(_this$E5,this))!=null?_this$E$get_type_disp:get_short_display(this.type())}is_equal_to(elem){if(!super.is_equal_to(elem)||this._type!==elem._type)return!1;if(this._type==="CustomElement"){var _this$E6,_elem$E;return((_this$E6=this.E)==null?void 0:_this$E6.base_name)===((_elem$E=elem.E)==null?void 0:_elem$E.base_name)}return!0}toUniqueString(){return super.toUniqueString()+this._type}type(){return this._type}is_input(){var _this$E$is_input,_this$E7;return(_this$E$is_input=(_this$E7=this.E)==null?void 0:_this$E7.is_input)!=null?_this$E$is_input:!1}is_root(){var _this$is_page,_this$is_custom_defin;return((_this$is_page=this.is_page)==null?void 0:_this$is_page.call(this))||((_this$is_custom_defin=this.is_custom_definition)==null?void 0:_this$is_custom_defin.call(this))}is_page(){return!1}is_mobile(){return!1}is_mobile_view(){return info("Used deprecated is_mobile_view function on GenericElement"),!1}is_custom_definition(){return!1}id(){return this.json.id()}ssr_key(){return this.id()}is_style(){return!1}get_styleable_static_property(name,suppress_warning){if(this.is_styleable_property(name)){var _this$get_style_if_ex;let style2=(_this$get_style_if_ex=this.get_style_if_exists())==null?void 0:_this$get_style_if_ex.for_element_type(this.type());if(style2)if(allow_overrides_check(this,name)){let val=this.definition_or_self.property(name).raw();return val==null?style2.get_static_property(name):val}else return style2.get_static_property(name)}return this.get_static_property(name,suppress_warning)}get_precomputed(){if(this._precomputed)return this._precomputed;{let element_properties=this.json._raw_child(S.properties);if(this.type()==="CustomElement"){for(let k in element_properties)ON_ELEMENT.includes(expand(k))||delete element_properties[k];let custom_definition_properties=this.E.custom_definition().json._child(S.properties)._raw();for(let k in custom_definition_properties)!ON_ELEMENT.includes(expand(k))&&!["height","width"].includes(expand(k))&&(element_properties[k]=custom_definition_properties[k])}let style2=this.get_style_if_exists(),_style_properties=style2?get_shrunk_style_properties():{},_precomputed={};for(let _name1 in element_properties){if(style2&&(_style_properties[_name1]||this.is_styleable_property(_name1))&&!allow_overrides_check(this,_name1))continue;let value=element_properties[_name1];is_static(value)?_precomputed[_name1]=get_static(value):_precomputed[_name1]=NOT_STATIC_PROP}let precomputed={};Object.entries(_precomputed).forEach(_ref2=>{let[_name1,value]=_ref2;precomputed[expand(_name1)]=value}),style2&&object_entries(style2.get_precomputed()).forEach(_ref3=>{let[name,value]=_ref3;if(this.is_styleable_property(name)){var _precomputed$name;(_precomputed$name=precomputed[name])!=null||(precomputed[name]=value)}});let element_version=this.element_version(!1),style_version=this.element_version(!0),states=this.states();style2&&appquery_default.get_public_setting("bubble_version")>=26&&(states=states.concat(style2.states()));for(let state4 of states)for(let name of state4.property_names()){precomputed[name]=NOT_STATIC_PROP;for(let unmapped of get_unmapped_properties(element_version,style_version,name))precomputed[unmapped]=NOT_STATIC_PROP}return this._precomputed=precomputed,this._precomputed}}default_states(){var _this$E$default_state;return(_this$E$default_state=this.E.default_states)!=null?_this$E$default_state:[]}added_to_container(){return typeof this.E.added_to_container=="function"?this.E.added_to_container(this):this.E.position_canvas==null}container_layout(){var _this$E$standard_cont;return(_this$E$standard_cont=this.E.standard_container_layout)!=null?_this$E$standard_cont:this.get_static_property("container_layout")}should_add_extra_wrapper(){if(this.container_layout()!==FIXED_LAYOUT){for(let child of this.definition_or_self.elements()){var _child$get_static_pro,_child$get_static_pro2;let min_height2=(_child$get_static_pro=child.get_static_property("min_height_css",!0))!=null?_child$get_static_pro:"",max_height=(_child$get_static_pro2=child.get_static_property("max_height_css",!0))!=null?_child$get_static_pro2:"";if(min_height2.includes("%")||max_height.includes("%"))return!0;for(let state4 of child.states()){var _state$get_static_pro,_state$get_static_pro2;let min_height3=(_state$get_static_pro=state4.get_static_property("min_height_css"))!=null?_state$get_static_pro:"",max_height2=(_state$get_static_pro2=state4.get_static_property("max_height_css"))!=null?_state$get_static_pro2:"";if(min_height3.includes("%")||max_height2.includes("%"))return!0}}if(["FloatingGroup","GroupFocus","Popup"].includes(this.type())&&this.definition_or_self.elements().find(child=>child.type()==="RepeatingGroup"&&!child.get_static_property("fit_height"))||this.container_layout()==="column"&&!this.never_fits_height()&&this.definition_or_self.elements().find(child=>child.container_layout()==="relative"&&!child.get_static_property("single_height")&&!child.fit_height()))return!0}if(this.container_layout()==="column"&&this.fit_height()){let elements_in_container=this.definition_or_self.elements();if(elements_in_container.length>1&&elements_in_container.some(child=>child.type()==="RepeatingGroup"&&child.fit_height()))return!0}return!1}should_add_extra_wrapper_native(){var _this$get_static_prop;if(this.container_layout()!=="row")return!1;let min_height2=(_this$get_static_prop=this.get_static_property("min_height_css",!0))!=null?_this$get_static_prop:"";if(min_height2.includes("px")&&parseInt(min_height2)>0)return!0;for(let state4 of this.states()){var _state$get_static_pro3;let min_height3=(_state$get_static_pro3=state4.get_static_property("min_height_css"))!=null?_state$get_static_pro3:"";if(min_height3.includes("px")&&parseInt(min_height3)>0)return!0}return!1}container_locked(){let layout_type=this.container_layout();return layout_type!=null&&layout_type!=="fixed"}get_new_event_json(){return this.json.child("workflows").child(LUID())}events(filter){return this.json.smart_cache("events_"+String(filter),json=>{let items=json.child("workflows").children().map(j2=>new_workflow_item(j2));return filter_array(filter,items)})}find_events(filter){return this.events(filter)}find_actions(filter){return this.events().flatMap(event=>event.all_next(filter))}find_customs(){let app=this.app(),visited=new Set,to_visit=[this],result=[],element;for(;(element=to_visit.pop())!=null;)element.find_elements("CustomElement").forEach(custom=>{let custom_id=custom.get_static_property("custom_id"),custom_def=app.custom_definition(custom_id);custom_def!=null&&!visited.has(custom_id)&&(visited.add(custom_id),to_visit.push(custom_def),result.push(custom_def))});return result}find_actions_custom(filter){let from_self=this.find_actions(filter),from_customs=this.find_customs().flatMap(element=>element.find_actions(filter));return[...from_self,...from_customs]}all_elements(){if(!this.can_have_children())return enhance_array([]);let elements2=this.json.child("elements").children().filter(json=>json.child("id").exists()).map(json=>create_generic("element",json));return enhance_array(elements2)}elements(filter){return filter_array(filter,this.all_elements().filter(element=>!element.soft_deleted()))}get_navigation_elements(){var _this$E$get_navigatio,_this$E$get_navigatio2,_this$E9;return(_this$E$get_navigatio=(_this$E$get_navigatio2=(_this$E9=this.E).get_navigation_elements)==null?void 0:_this$E$get_navigatio2.call(_this$E9,this))!=null?_this$E$get_navigatio:[]}find_all_elements(filter){let raw_elements=u_exports2.autorun_return(()=>find_elements(to_raw(this),filter));return from_raw_array(this.json,new_element,raw_elements)}find_elements(filter){return this.find_all_elements(filter).filter(element=>!element.soft_deleted())}find_elements_custom(filter){let filter_fn=make_filter(filter),children2=this.elements().filter(element=>filter_fn(element)),descendants=this.elements().flatMap(element=>element.find_elements_custom(filter_fn)),custom_descendants=this.find_customs().flatMap(custom_def=>custom_def.find_elements(filter_fn)),results=[...children2,...descendants,...custom_descendants];return enhance_array(results)}find_expressions(filter){let raw_expressions=u_exports2.autorun_return(()=>element_find_expressions(to_raw(this),filter));return from_raw_array(this.json,new_expression,raw_expressions)}parent(){var _this$json$parent;if(this.fake)return null;let pnode=(_this$json$parent=this.json.parent())==null?void 0:_this$json$parent.parent();return(pnode==null?void 0:pnode.parent())!=null?new_element(pnode):null}parents(filter){let res=[],targ=this;for(;targ=targ.parent();)res.push(targ);return filter_array(filter,res)}context_element(){return this}root(){var _this$parent$root,_this$parent;return(_this$parent$root=(_this$parent=this.parent())==null?void 0:_this$parent.root())!=null?_this$parent$root:null}get_width(){return this.get_static_property("width")}get_height(){return this.get_static_property("height")}uses_font_size(){return this.field_names().font_size!=null}get_orphaned_thumbnail_width(){var _this$E$defaults;if(this.E.get_orphaned_thumbnail_width!=null)return this.E.get_orphaned_thumbnail_width(this);let default_width=(_this$E$defaults=this.E.defaults)==null?void 0:_this$E$defaults.width;if(this.uses_font_size()&&default_width!=null){let font_size=this.property("font_size").raw();if(font_size){let ratio=font_size/14;return Math.round(default_width*ratio)}}return this.get_width()}get_orphaned_thumbnail_height(){var _this$E$defaults2;if(this.E.get_orphaned_thumbnail_height!=null)return this.E.get_orphaned_thumbnail_height(this);let default_height=(_this$E$defaults2=this.E.defaults)==null?void 0:_this$E$defaults2.height;if(this.uses_font_size()&&default_height!=null){let font_size=this.property("font_size").raw();if(font_size){let ratio=font_size/14;return Math.round(default_height*ratio)}}return this.get_height()}get_left(){return this.get_static_property("left")}get_top(){return this.get_static_property("top")}get_zindex(){return this.get_static_property("zindex")}can_animate(){if(this.E.can_animate)return this.E.can_animate(this);var _this$E$do_show;return!((_this$E$do_show=this.E.do_show)!=null?_this$E$do_show:this.E.workflow_show)}can_be_variable_width(){return this.E.must_be_fixed_size!=null?!this.E.must_be_fixed_size(this):this.E.get_min_width!=null}fixed_width(){return!this.can_be_variable_width()||this.get_static_property("fixed_width")}min_width_adjustable_legacy(){return this.can_be_variable_width()&&!this.get_static_property("fixed_width")&&this.E.get_min_width(this)<this.get_width()}max_width_adjustable_legacy(){return this.min_width_adjustable_legacy()&&!this.E.not_max_adjustable_legacy&&!this.not_max_adjustable()}not_max_adjustable(){if(typeof this.E.not_max_adjustable=="function")return this.E.not_max_adjustable(this);var _this$E$not_max_adjus;return(_this$E$not_max_adjus=this.E.not_max_adjustable)!=null?_this$E$not_max_adjus:!1}default_min_width(){var _this$root$get_width,_this$root;return((_this$root$get_width=(_this$root=this.root())==null?void 0:_this$root.get_width())!=null?_this$root$get_width:0)>600?Math.round(this.get_width()*.2):this.get_width()}get_min_width(){if(this.E.get_min_width==null||this.get_static_property("fixed_width"))return this.get_width();let min_width_percent=this.get_static_property("min_width"),width2=this.get_width(),user_set=(min_width_percent!=null?min_width_percent:0)/100*width2,element_determined=this.E.get_min_width(this);return Math.max(user_set,element_determined)}get_max_width(){if(this.E.get_min_width==null||this.get_static_property("fixed_width"))return this.get_width();if(!this.get_static_property("use_max_width"))return null;let max_width_percent=this.get_static_property("max_width"),width2=this.get_width();return(max_width_percent!=null?max_width_percent:100)/100*width2}responsive_show(){return this.get_static_property("responsive_show")}responsive_show_width(){return this.get_static_property("responsive_show_width")}is_fixed_dimension(dimension){return this.get_static_property(`single_${dimension}`)}force_fixed(){return!this.E.no_fixed_sizing&&this.container_layout()==="fixed"}root_min_width(){return this.force_fixed()?this.get_width():this.get_static_property("min_width_px")}root_max_width(){return this.force_fixed()?this.get_width():this.not_max_adjustable()?null:this.get_static_property("max_width_px")}root_min_height(){return this.force_fixed()?this.get_height():this.get_static_property("min_height_px")}root_max_height(){return this.force_fixed()?this.get_height():this.not_max_adjustable()?null:this.get_static_property("max_height_px")}can_fit_width(){if(typeof this.E.can_fit_width=="function")return this.E.can_fit_width(this);var _this$E$can_fit_width;return(_this$E$can_fit_width=this.E.can_fit_width)!=null?_this$E$can_fit_width:!1}can_fit_height(){if(typeof this.E.can_fit_height=="function")return this.E.can_fit_height(this);var _this$E$can_fit_heigh;return(_this$E$can_fit_heigh=this.E.can_fit_height)!=null?_this$E$can_fit_heigh:!1}only_fixed_or_fit_height(){var _this$E$only_fixed_or;return(_this$E$only_fixed_or=this.E.only_fixed_or_fit_height)!=null?_this$E$only_fixed_or:!1}only_fixed_or_fit_width(){var _this$E$only_fixed_or2;return(_this$E$only_fixed_or2=this.E.only_fixed_or_fit_width)!=null?_this$E$only_fixed_or2:!1}only_fixed_or_fill_height(){var _this$E$only_fixed_or3;return(_this$E$only_fixed_or3=this.E.only_fixed_or_fill_height)!=null?_this$E$only_fixed_or3:!1}only_fixed_or_fill_width(){var _this$E$only_fixed_or4;return(_this$E$only_fixed_or4=this.E.only_fixed_or_fill_width)!=null?_this$E$only_fixed_or4:!1}is_repeating(){var _this$E$is_repeating,_this$E$is_repeating2,_this$E10;return(_this$E$is_repeating=(_this$E$is_repeating2=(_this$E10=this.E).is_repeating)==null?void 0:_this$E$is_repeating2.call(_this$E10,this))!=null?_this$E$is_repeating:!1}no_height(){var _this$E$no_height;return(_this$E$no_height=this.E.no_height)!=null?_this$E$no_height:!1}no_width(){var _this$E$no_width;return(_this$E$no_width=this.E.no_width)!=null?_this$E$no_width:!1}is_restricted_container(){if(typeof this.E.is_restricted_container=="function")return this.E.is_restricted_container(this);var _this$E$is_restricted;return(_this$E$is_restricted=this.E.is_restricted_container)!=null?_this$E$is_restricted:!1}collapse_when_hidden(){var _this$root2;return(_this$root2=this.root())!=null&&_this$root2.is_mobile()?!0:this.get_static_property("collapse_when_hidden")}fit_width(){return this.E.uses_css_responsive&&this.can_fit_width()&&!this.force_fixed()&&!this.get_static_property("single_width")?this.get_static_property("fit_width"):!1}fit_height(){return this.E.uses_css_responsive?this.can_fit_height()&&!this.force_fixed()&&!this.get_static_property("single_height")?this.get_static_property("fit_height"):!1:!0}never_fits_width(){var _this$parent2;if(!this.can_fit_width()||this.force_fixed())return!0;let container_layout=get_functional_layout((_this$parent2=this.parent())==null?void 0:_this$parent2.container_layout());if(container_layout===DIMENSION_TO_CROSS_AXIS.width){if(!this.get_static_property("fit_width"))return!0;let initial_halign=this.get_static_property("horiz_alignment",!0),state_changes_halign=this.states().some(state4=>state4.get_static_property("horiz_alignment")!=="stretch");return initial_halign==="stretch"&&!state_changes_halign}else return container_layout===FIXED_LAYOUT?!0:!this.get_static_property("fit_width")}never_fits_height(){var _this$parent3;if(!this.can_fit_height()||this.force_fixed())return!0;let container_layout=get_functional_layout((_this$parent3=this.parent())==null?void 0:_this$parent3.container_layout());if(container_layout===DIMENSION_TO_CROSS_AXIS.height){if(this.get_static_property("single_height"))return!0;let initial_valign=this.get_static_property("vert_alignment",!0),state_changes_valign=this.states().some(state4=>state4.get_static_property("vert_alignment")!=="stretch");return initial_valign==="stretch"&&!state_changes_valign}else return container_layout===FIXED_LAYOUT?!0:!this.get_static_property("fit_height")}can_fix_aspect_ratio(){var _this$E$can_fix_aspec,_this$E$can_fix_aspec2,_this$E11;return(_this$E$can_fix_aspec=(_this$E$can_fix_aspec2=(_this$E11=this.E).can_fix_aspect_ratio)==null?void 0:_this$E$can_fix_aspec2.call(_this$E11,this))!=null?_this$E$can_fix_aspec:!1}has_fixed_aspect_ratio(){var _this$parent4;return this.can_fix_aspect_ratio()&&((_this$parent4=this.parent())==null?void 0:_this$parent4.container_layout())!=="fixed"&&this.get_static_property("use_aspect_ratio")}uses_css_responsive(){var _this$E$uses_css_resp;return(_this$E$uses_css_resp=this.E.uses_css_responsive)!=null?_this$E$uses_css_resp:!1}get_containing_element(){return this.parent()}no_margins(){var _this$E$no_margins,_this$E$no_margins2,_this$E12;return(_this$E$no_margins=(_this$E$no_margins2=(_this$E12=this.E).no_margins)==null?void 0:_this$E$no_margins2.call(_this$E12,this))!=null?_this$E$no_margins:!1}state_by_name(name){return new State(this.json.child("states").child(name))}get_messages(){var _this$E$get_messages,_this$E$get_messages2,_this$E13;return(_this$E$get_messages=(_this$E$get_messages2=(_this$E13=this.E).get_messages)==null?void 0:_this$E$get_messages2.call(_this$E13,this))!=null?_this$E$get_messages:[]}add_specific_messages(messages){var _this$E$add_specific_,_this$E14;if((_this$E$add_specific_=(_this$E14=this.E).add_specific_messages)==null||_this$E$add_specific_.call(_this$E14,messages,this),Math.random()<1/1e3)for(let[msg,val]of Object.entries(messages))val.is_client_state||warn("Element Message Not Marked Clientside",{element_type:this.type(),message_name:msg})}get_states(){var _this$E$get_states,_this$E$get_states2,_this$E15;return(_this$E$get_states=(_this$E$get_states2=(_this$E15=this.E).get_states)==null?void 0:_this$E$get_states2.call(_this$E15,this))!=null?_this$E$get_states:[]}get_state_value(name){var _this$E$get_state_val,_this$E$get_state_val2,_this$E16;return get5((_this$E$get_state_val=(_this$E$get_state_val2=(_this$E16=this.E).get_state_value)==null?void 0:_this$E$get_state_val2.call(_this$E16,this,name))!=null?_this$E$get_state_val:"null")}_fields(include_all_properties){return this.E.fields(this,include_all_properties)}field(name){var _this$fields;return(_this$fields=this.fields)==null?void 0:_this$fields.call(this).find(a=>a.name===name)}field_names(){return this.E.field_names}is_styleable_property(prop_name){return this.get_styleable_properties()[prop_name]}get_property_applications(){var _this$E$property_appl;let a=(_this$E$property_appl=this.E.property_applications)!=null?_this$E$property_appl:[];return this._type==="CustomDefinition"?a:[...a,new property_applications_default.UniqueID]}get_btype_id(){var _this$E$get_btype_id,_this$E$get_btype_id2,_this$E17;return(_this$E$get_btype_id=(_this$E$get_btype_id2=(_this$E17=this.E).get_btype_id)==null?void 0:_this$E$get_btype_id2.call(_this$E17,this))!=null?_this$E$get_btype_id:"element."+this.id()}get_visible_workflows(){return filter_array(x=>!x.json._raw_gchild(S.properties,"workflow_disabled"),this.parents().flatMap(el=>el.events()))}get_related_workflows(event_type){let id=this.id(),res=this.get_visible_workflows().filter(event=>event.element_id()===id&&event.type()===event_type);return enhance_array(res)}can_have_children(){var _this$E$can_have_chil,_this$E$can_have_chil2,_this$E18;return(_this$E$can_have_chil=(_this$E$can_have_chil2=(_this$E18=this.E).can_have_children)==null?void 0:_this$E$can_have_chil2.call(_this$E18,this))!=null?_this$E$can_have_chil:!1}tell_editcanvas(){return!0}is_visible_on_page_load(){return this.E.is_visible_on_page_load(this)}modal(){var _this$E$modal,_this$E$modal2,_this$E19;return(_this$E$modal=(_this$E$modal2=(_this$E19=this.E).modal)==null?void 0:_this$E$modal2.call(_this$E19,this))!=null?_this$E$modal:!1}not_draggable(){var _this$E$not_draggable,_this$E$not_draggable2,_this$E20;return(_this$E$not_draggable=(_this$E$not_draggable2=(_this$E20=this.E).not_draggable)==null?void 0:_this$E$not_draggable2.call(_this$E20,this))!=null?_this$E$not_draggable:!1}not_resizable(){var _this$E$not_resizable,_this$E$not_resizable2,_this$E21;return(_this$E$not_resizable=(_this$E$not_resizable2=(_this$E21=this.E).not_resizable)==null?void 0:_this$E$not_resizable2.call(_this$E21,this))!=null?_this$E$not_resizable:!1}goes_on_document(){var _this$E$goes_on_docum,_this$E$goes_on_docum2,_this$E22;return(_this$E$goes_on_docum=(_this$E$goes_on_docum2=(_this$E22=this.E).goes_on_document)==null?void 0:_this$E$goes_on_docum2.call(_this$E22,this))!=null?_this$E$goes_on_docum:!1}draws_own_children(){var _this$E$draws_own_chi,_this$E$draws_own_chi2,_this$E23;return(_this$E$draws_own_chi=(_this$E$draws_own_chi2=(_this$E23=this.E).draws_own_children)==null?void 0:_this$E$draws_own_chi2.call(_this$E23,this))!=null?_this$E$draws_own_chi:!1}can_reference(){var _this$E$can_reference,_this$E$can_reference2,_this$E24;return(_this$E$can_reference=(_this$E$can_reference2=(_this$E24=this.E).can_reference)==null?void 0:_this$E$can_reference2.call(_this$E24,this))!=null?_this$E$can_reference:!0}get_style_node(){return new_expression(this.json.child("style"),this)}get_style_id(){var _this$json$child$get;return(_this$json$child$get=this.json.child("style").get())!=null?_this$json$child$get:void 0}get_style(){return this.app().style(this.get_style_id())}property_supports_states(){var _this$E$property_supp;return(_this$E$property_supp=this.E.property_supports_states)!=null?_this$E$property_supp:!0}property_supports_transitions(){var _this$E$property_supp2;return(_this$E$property_supp2=this.E.property_supports_transitions)!=null?_this$E$property_supp2:!0}hide_property_editor_tabs(){var _this$E$hide_property;return(_this$E$hide_property=this.E.hide_property_editor_tabs)!=null?_this$E$hide_property:!1}primary_field(){var _this$E$primary_field,_this$E27;return(_this$E$primary_field=(_this$E27=this.E).primary_field)==null?void 0:_this$E$primary_field.call(_this$E27,this)}mandatory_sections(){var _this$E$mandatory_sec,_this$E$mandatory_sec2,_this$E28;return(_this$E$mandatory_sec=(_this$E$mandatory_sec2=(_this$E28=this.E).mandatory_sections)==null?void 0:_this$E$mandatory_sec2.call(_this$E28,this))!=null?_this$E$mandatory_sec:null}can_copy_style(){var _this$E$can_copy_styl;return(_this$E$can_copy_styl=this.E.can_copy_style)!=null?_this$E$can_copy_styl:!0}property_sections(mode){var _property_sections$fo;return(_property_sections$fo=for_mode[mode])!=null?_property_sections$fo:for_mode.all}exclusively_responsive_sections(){return[{name:"Responsive",show_title:!1},{name:"Margins",show_title:!1},{name:"PaddingFields",show_title:!1},{name:"ResponsiveContainer",show_title:!1}]}element_custom_states(){return this.E.element_custom_states?this.E.element_custom_states():this.json.child("custom_states").children().map(json=>create(node_types_default.CUSTOM_STATE,json))}element_custom_state(name){if(!name)return null;if(this.E.element_custom_state)return this.E.element_custom_state(name);{let base_name=custom_type_name(name),json=this.json.child("custom_states").child(base_name);return create(node_types_default.CUSTOM_STATE,json)}}transitions(){let transitions=this.json.child("transitions").children().map(json=>new Transition2(json,this));return enhance_array(transitions)}transition(prop_name){if(this.E.transition)return this.E.transition(prop_name,this);let element_transition=this.json.child("transitions").child(prop_name);if(element_transition.exists())return new Transition2(element_transition,this);let style2=this.get_style_if_exists();if(style2)return style2.transition(prop_name)}add_transition(prop_name){lib_default.or_throw().changes.create_change("AddTransition",{element_id:this.id(),prop_name,data:Transition2.default_transition}).execute(),this.commit()}find_events_using_this_element(){var _Lib$or_throw$visual_,_Lib$or_throw$visual_2;let element_id=this.id();return((_Lib$or_throw$visual_=(_Lib$or_throw$visual_2=lib_default.or_throw().visual_edit.root_node())==null?void 0:_Lib$or_throw$visual_2.events())!=null?_Lib$or_throw$visual_:[]).filter(event=>event.element_id()===element_id||event.find_my_expressions("GetElement.element_id="+element_id).length)}find_actions_using_this_element(){var _Lib$or_throw$visual_3,_Lib$or_throw$visual_4;let element_id=this.id();return((_Lib$or_throw$visual_3=(_Lib$or_throw$visual_4=lib_default.or_throw().visual_edit.root_node())==null?void 0:_Lib$or_throw$visual_4.events())!=null?_Lib$or_throw$visual_3:[]).flatMap(event=>event.actions()||[]).filter(action=>action.element_id()===element_id||action.find_my_expressions("GetElement.element_id="+element_id).length)}find_elements_using_this_element(){var _Lib$or_throw$visual_5,_Lib$or_throw$visual_6,_Lib$or_throw$visual_7;let element_id=this.id();return((_Lib$or_throw$visual_5=(_Lib$or_throw$visual_6=lib_default.or_throw().visual_edit.root_node())==null||(_Lib$or_throw$visual_7=_Lib$or_throw$visual_6.find_elements)==null?void 0:_Lib$or_throw$visual_7.call(_Lib$or_throw$visual_6))!=null?_Lib$or_throw$visual_5:[]).filter(element=>element.id()!==element_id&&element.find_expressions("GetElement.element_id="+element_id).length)}states(){let states=get_states_from_raw_json(this.json).map(json=>new State(json));return enhance_array(states)}get_styleable_properties(){var _this$E$styleable_pro;let general_style_properties=get_style_properties(),element_style_properties=(_this$E$styleable_pro=this.E.styleable_properties)!=null?_this$E$styleable_pro:{};return extend({},general_style_properties,element_style_properties)}get_style_if_exists(){let id=this.json._child(S.style).get();if(id==null)return null;let style2=this.app().style(String(id));return style2.exists()?style2:null}has_overridden_style(){let has_element_padding_overridden=["top","bottom","left","right"].filter(dir=>this.property(`padding_${dir}`).raw()!=null).length>0,overridden=!1;return this.get_style_if_exists()&&this.element_version()>=VERSION_STYLE_OVERRIDES&&(this.num_style_overrides()>0||has_element_padding_overridden)&&(overridden=!0),overridden}can_defer_drawing(){return typeof this.E.can_defer_drawing!="function"?!1:this.E.can_defer_drawing(this)}no_size_when_hidden(){var _this$parent6;let collapses=this.collapse_when_hidden(),out_of_document=!this.added_to_container(),in_fixed=this.is_responsive_v1()&&((_this$parent6=this.parent())==null?void 0:_this$parent6.container_layout())===FIXED_LAYOUT;return collapses||out_of_document||in_fixed}ignores_child_sizes(){return this.is_responsive_v1()&&this.uses_css_responsive()&&this.never_fits_width()&&this.never_fits_height()}element_version(styleable){var _Lib2,_Lib$derived_name,_Lib22,_Lib2$derived_name,_this$root$get_static,_this$root3;return styleable&&this.get_style_if_exists()!=null?appquery_default.get_public_setting("style_version"):((_Lib2=lib_default())==null||(_Lib$derived_name=_Lib2.derived_name)==null?void 0:_Lib$derived_name.call(_Lib2))==="Responsive"||((_Lib22=lib_default())==null||(_Lib2$derived_name=_Lib22.derived_name)==null?void 0:_Lib2$derived_name.call(_Lib22))==="ResponsiveDependencies"?VERSION_STYLE_OVERRIDES-1:(_this$root$get_static=(_this$root3=this.root())==null?void 0:_this$root3.get_static_property("element_version"))!=null?_this$root$get_static:LATEST_ELEMENT_VERSION}is_responsive_v1(){var _this$root$get_respon,_this$root4;return((_this$root$get_respon=(_this$root4=this.root())==null?void 0:_this$root4.get_responsive_version())!=null?_this$root$get_respon:1)>0}cant_delete(){var _this$E$cant_delete,_this$E$cant_delete2,_this$E29;return(_this$E$cant_delete=(_this$E$cant_delete2=(_this$E29=this.E).cant_delete)==null?void 0:_this$E$cant_delete2.call(_this$E29,this))!=null?_this$E$cant_delete:!1}soft_delete(){let change_args={target_id:this.id(),path:"soft_deleted",old_value:this.json.child("soft_deleted").raw(),value:!0};lib_default.or_throw().changes.create_change("SetData",change_args).execute()}restore(){let change_args={target_id:this.id(),path:"soft_deleted",old_value:this.json.child("soft_deleted").raw(),value:!1};lib_default.or_throw().changes.create_change("SetData",change_args).execute()}soft_deleted(){var _this$json$child$raw4;return(_this$json$child$raw4=this.json.child("soft_deleted").raw())!=null?_this$json$child$raw4:!1}soft_deleted_elements(){return this.all_elements().filter(element=>element.soft_deleted())}is_pseudo(){var _this$E$is_pseudo;return typeof this.E.is_pseudo=="function"?this.E.is_pseudo(this):(_this$E$is_pseudo=this.E.is_pseudo)!=null?_this$E$is_pseudo:!1}extra_layout_props(){var _this$E$extra_layout_;return typeof this.E.extra_layout_props=="function"?this.E.extra_layout_props(this):(_this$E$extra_layout_=this.E.extra_layout_props)!=null?_this$E$extra_layout_:[]}is_draggable_within_parent(){var _this$E$is_draggable_;return(_this$E$is_draggable_=this.E.is_draggable_within_parent)!=null?_this$E$is_draggable_:!1}ensure_customs_loaded(){let visited=new Set;visited.add(this.definition_or_self.id());let to_visit=[this.definition_or_self],element;for(;(element=to_visit.pop())!=null;)element.json.raw(),element.find_elements("CustomElement").forEach(custom=>{let def=custom.definition_or_self,id=def.id();visited.has(id)||(visited.add(id),to_visit.push(def))})}},_applyDecoratedDescriptor6(_class54.prototype,"should_add_extra_wrapper",[_dec7],Object.getOwnPropertyDescriptor(_class54.prototype,"should_add_extra_wrapper"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"should_add_extra_wrapper_native",[_dec23],Object.getOwnPropertyDescriptor(_class54.prototype,"should_add_extra_wrapper_native"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"get_related_workflows",[_dec32],Object.getOwnPropertyDescriptor(_class54.prototype,"get_related_workflows"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"states",[_dec42],Object.getOwnPropertyDescriptor(_class54.prototype,"states"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"get_styleable_properties",[_dec52],Object.getOwnPropertyDescriptor(_class54.prototype,"get_styleable_properties"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"get_style_if_exists",[_dec62],Object.getOwnPropertyDescriptor(_class54.prototype,"get_style_if_exists"),_class54.prototype),_applyDecoratedDescriptor6(_class54.prototype,"element_version",[_dec72],Object.getOwnPropertyDescriptor(_class54.prototype,"element_version"),_class54.prototype),_class54)}});var init_fs=__esm({"(disabled):fs"(){init_define_process_env();init_shim()}});function add_to_registry(name,Cls,registry){if(!registry[name]){var _instance$human;let instance4=new Cls;if(instance4.name=name,(_instance$human=instance4.human)!=null||(instance4.human=toTitleCase(name)),registry[name]=instance4,!instance4.authenticator)throw new UnexpectedError("Error building service "+name+": missing authenticator");typeof instance4.authenticator!="function"&&(instance4.authenticator._service=instance4)}}var init_registry_management=__esm({"lib-browser/services/shared/shared/registry_management.js"(){"use strict";init_define_process_env();init_shim();init_u2()}});function on_plugin_registration(cb){for(let service of registered_keys)cb(service,plugins2[service]);service_listeners.push(cb)}function register_plugin(plugin_name,raw_data){add_to_registry(plugin_name,raw_data.cls,plugins2),registered_keys.push(plugin_name);let instance4=plugins2[plugin_name];for(let key in instance4.keys){let data=instance4.keys[key];data.default&&(defaults_for_plugins_settings[plugin_name+"_"+key]=data.default)}for(let cb of service_listeners)cb(plugin_name,instance4)}function get_hardcoded_plugin(plugin_id){if(plugin_id!=null&&plugins2[plugin_id]!=null)return plugins2[plugin_id]}function get_app_hardcoded_plugins(){return Object.entries(appquery_default.get_plugin_versions()).filter(_ref=>{let[_,version2]=_ref;return version2===!0}).map(_ref2=>{let[plugin_id]=_ref2;return get_hardcoded_plugin(plugin_id)})}var import_web_dom_collections_iterator128,plugins2,registered_keys,service_listeners,defaults_for_plugins_settings,plugin_registry,plugin_registry_default,init_plugin_registry=__esm({"lib-browser/services/shared/plugin_registry.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator128=__toESM(require_web_dom_collections_iterator());init_fs();init_u2();init_registry_management();init_appquery();plugins2={},registered_keys=[],service_listeners=[],defaults_for_plugins_settings={};plugin_registry={defaults_for_plugins_settings,on_plugin_registration,register_plugin,get_hardcoded_plugin,get_app_hardcoded_plugins},plugin_registry_default=plugin_registry}});var internal_service_registry_exports={};__export(internal_service_registry_exports,{add_service:()=>add_service,get_service:()=>get_service,services:()=>services});function add_service(name,Cls){add_to_registry(name,Cls,services)}function get_service(service_id){if(service_id!=null&&services[service_id]!=null)return services[service_id]}var services,init_internal_service_registry=__esm({"lib-browser/services/shared/internal_service_registry.js"(){"use strict";init_define_process_env();init_shim();init_registry_management();services={}}});var plugin_getter_exports={};__export(plugin_getter_exports,{get_app_plugins:()=>get_app_plugins,get_plugin:()=>get_plugin,initialize:()=>initialize});function initialize(pluginservice_getter_fn){if(_pluginservice_getter_fn==null)_pluginservice_getter_fn=pluginservice_getter_fn;else throw new Error("plugin_getter: pluginservice_getter_fn already initialized")}function assert_initialized(method_name){if(_pluginservice_getter_fn==null)throw new Error(`plugin_getter.${method_name} called before initialization`)}function get_app_plugins(){return assert_initialized("get_app_plugins"),Object.entries(appquery_default.get_plugin_versions()).map(_ref=>{let[plugin_id,version2]=_ref;return get_plugin(plugin_id,version2)})}function get_plugin(plugin_id,version2){if(assert_initialized("get_plugin"),plugin_id==null)return;let internal_service=get_service(plugin_id);if(internal_service!=null)return warn("plugin_getter: provided name is an internal service, not a plugin",{service_name:plugin_id,version:version2}),internal_service;let hardcoded_plugin=plugin_registry_default.get_hardcoded_plugin(plugin_id,version2);if(hardcoded_plugin!=null)return hardcoded_plugin;let actual_id=plugin_id;if(plugin_id.indexOf("_current")!==-1&&(plugin_id=get_plugin_id(plugin_id),version2="current"),!!is_UUID(plugin_id)&&!(!version2&&(version2=appquery_default.get_plugin_version(plugin_id),!version2)))return _get_service_plugin(plugin_id,actual_id,version2)}var import_es_error_cause15,import_web_dom_collections_iterator129,_pluginservice_getter_fn,_get_service_plugin,init_plugin_getter=__esm({"lib-browser/services/shared/plugin_getter.js"(){"use strict";init_define_process_env();init_shim();import_es_error_cause15=__toESM(require_es_error_cause()),import_web_dom_collections_iterator129=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_service_type_parser();init_plugin_registry();init_internal_service_registry();init_logger();_get_service_plugin=autorun_cache((plugin_id,actual_id,version2)=>_pluginservice_getter_fn(plugin_id,actual_id,version2))}});var dot_regex,Element2,init_Element=__esm({"lib-browser/lang/elements/Element.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_lib();init_logger();init_plugin_getter();init_mode_check();init_plugin_registry();init_nodes();init_elements_utils();init_GenericElement();dot_regex=/\./g,Element2=class extends GenericElement{constructor(json,fake,options){super(json,fake,options),this.maybe_register_issue_indexers(),this.setup_autofixer()}maybe_register_issue_indexers(){is_edit_mode()&&!this.fake&&_use_issue_checker()&&this.is_top_level()&&this.app().can_run_issue_checker()&&!this.issue_checker_registered&&(this.issue_checker_registered=!0,this.json.register_indexer("issues_list",()=>{if(lib_default().visual_edit.allow_issue_indexer_runs()){let me=nodes_default.new_element(this.json),id=me.id();if(!id)return;let issues=lib_default().apptests.check_issues(me);return[["issues_list",id],json_stringify(issues)]}}))}is_malformed(){return!1}setup_autofixer(){is_edit_mode()&&!this.fake&&this.E.autofix_issues!=null&&queueMicrotask(()=>{let destroyed=!1,ar=null;ar=u_exports2.autotop(()=>{var _Lib$visual_edit$get_;if(this.root()==null){var _ar;destroyed=!0,(_ar=ar)==null||_ar.destroy();return}this.root().id()===((_Lib$visual_edit$get_=lib_default().visual_edit.get_root())==null?void 0:_Lib$visual_edit$get_.id())&&this.E.autofix_issues(this)}),destroyed&&ar.destroy()})}is_top_level(){var _path$match;let path=this.json.path();return(path==null||(_path$match=path.match(dot_regex))==null?void 0:_path$match.length)===3}is_api(){return!1}is_page(){return!1}check_for_errors(report,compute_cross_page,derived_mode){var _this$E$check_for_err,_this$E;if(((_this$E$check_for_err=(_this$E=this.E).check_for_errors)==null?void 0:_this$E$check_for_err.call(_this$E,this,report,compute_cross_page))===!0)return;let properties_to_check=super.check_for_errors(report),our_plugins=get_app_plugins().filter(Boolean).map(p=>p.name);if(this.E.is_plugin&&!our_plugins.includes(this.E.service)){let element=this.display(),plugin2=get_plugin(this.E.service).display();report(`${element} - You're using this element but haven't installed the plugin ${plugin2}`)}let children2=this.events().concat(this.states(),properties_to_check.children);if(!derived_mode){let direct_child_elements=this.elements();direct_child_elements.maybe_register_issue_indexers(),children2=children2.concat(direct_child_elements)}return{children:children2}}}}});function _applyDecoratedDescriptor7(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator130,_dec8,_dec24,_dec33,_class55,S14,Style2,HybridStyle,init_Style=__esm({"lib-browser/lang/elements/Style.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator130=__toESM(require_web_dom_collections_iterator());init_u2();init_decaf();init_lib();init_logger();init_caching();init_evaluate_static();init_nodes();init_RAW();init_shrink();init_elements();init_elements_utils();init_elements_state();init_property_sections();init_missing_element();init_Transition();init_lodash();init_segment_events();init_appquery();({S:S14}=shrink_exports),Style2=(_dec8=cached({type:RUN_MODE}),_dec24=cached({type:RUN_MODE}),_dec33=cached({type:RUN_MODE,parameters:1}),_class55=class extends nodes_default.HasProperties{constructor(){super(...arguments)}is_style(){return!0}root(){return null}is_responsive_v1(){return!0}get_type_display(){return get_short_display(this.type())}name(){return this.json.name()}id(){return this.name()}type(){return this.json.child("type").get()}property_supports_states(){return!0}property_supports_transitions(){return!0}mandatory_sections(){return[]}get_styleable_static_property(name){return this.get_static_property(name)}get_element_from_style(){return this.json.exists()?((!this.json.child("id").get()||!this.json.to_id().child("type").get())&&this.json.child("type").raw()!=="Page"&&(warn("legacy situation, no id or type on style",{path:this.json.path(),value:this.json.raw()}),this.json.child("id").set(this.name(),{name:"LegacyStyleChange"}),lib_default().changes.set_id_cache({json:this.json,data:this.json.raw()})),nodes_default.new_element(this.json,!0)):null}E_object(){var _Lib$load_plugin;return this.type()&&(_Lib$load_plugin=lib_default().load_plugin(lib_default().plugin_prefixes.element+this.type(),!0))!=null?_Lib$load_plugin:missing_element_exports}get_width(){return this.get_default("width")}get_height(){return this.get_default("height")}get_default(name){var _this$field_names,_this$field_names$nam;return(_this$field_names=this.field_names())==null||(_this$field_names$nam=_this$field_names[name])==null?void 0:_this$field_names$nam.default}context_element(){return this}force_fixed(){return!1}get_btype_id(){return"style."+this.type()}get_style_id(){return null}get_style_if_exists(){return null}element_version(styleable){return appquery_default.get_public_setting("style_version")}state_by_name(name){return nodes_default.create(nodes_default.STYLE_STATE,this.json.child("states").child(name))}transitions(){return nodes_default.enhance_array(this.json.child("transitions").children().map(json=>nodes_default.create(nodes_default.TRANSITION,json,this)))}transition(prop_name){return nodes_default.create(nodes_default.TRANSITION,this.json.child("transitions").child(prop_name),this)}_fields(include_all_properties){return this.E_object().fields(this,include_all_properties)}use_responsive_algorithm(){return appquery_default.get_public_setting("no_legacy_responsive")}get_property_applications(){return this.E_object().property_applications}property_sections(mode){var _property_sections$fo;return(_property_sections$fo=for_mode[mode])!=null?_property_sections$fo:for_mode.all}get_precomputed(){if(!this._precomputed){let object2=this.json._raw_child(S14.properties),precomputed={};object_entries(object2).forEach(_ref=>{let[_name1,value]=_ref,name1=expand(_name1);precomputed[name1]=get_static(value)});for(let state4 of this.states())for(let name of state4.property_names())precomputed[name]=NOT_STATIC_PROP;this._precomputed=precomputed}return this._precomputed}field_names(){return this.E_object()?this.E_object().field_names:null}states(){return nodes_default.enhance_array(get_states_from_raw_json(this.json).map(json=>nodes_default.create(nodes_default.STYLE_STATE,json)))}for_element_type(type){return type!=="CustomElement"&&type!==this.type()?new HybridStyle(this.json,type):this}},_applyDecoratedDescriptor7(_class55.prototype,"field_names",[_dec8],Object.getOwnPropertyDescriptor(_class55.prototype,"field_names"),_class55.prototype),_applyDecoratedDescriptor7(_class55.prototype,"states",[_dec24],Object.getOwnPropertyDescriptor(_class55.prototype,"states"),_class55.prototype),_applyDecoratedDescriptor7(_class55.prototype,"for_element_type",[_dec33],Object.getOwnPropertyDescriptor(_class55.prototype,"for_element_type"),_class55.prototype),_class55),HybridStyle=class extends Style2{type(){return this.overriden_type}constructor(json,type){super(json),this.overriden_type=type}}}});var StyleState,init_StyleState=__esm({"lib-browser/lang/elements/StyleState.js"(){"use strict";init_define_process_env();init_shim();init_lib();init_elements_utils();init_State();init_Style();StyleState=class extends State{context_element(){return new Style2(this.json.parent().parent())}toUniqueString(){return new State(this.json).toUniqueString()}}}});var defaultable,CustomFieldState,init_CustomFieldState=__esm({"lib-browser/lang/application/CustomFieldState.js"(){"use strict";init_define_process_env();init_shim();init_nodes();init_btype_ids();defaultable=["text","number","date","boolean","file","image","geographic_address"],CustomFieldState=class extends nodes_default.AppNode{display(){return this.json.child("display").get()}btype(){return this.json.child("value").get()}default_val(){return this.can_have_default()?this.json.child("default_val").raw():null}can_have_default(){if(this.name()==null||this.is_list())return!1;let btype=this.btype();return defaultable.includes(btype)||is_option_set(btype)}is_list(){return is_list(this.btype())}list_element_type(){return list_element_type(this.btype())}exists(){return this.json.child("value").get()!=null}id(){return this.name()}}}});var CustomState,init_CustomState=__esm({"lib-browser/lang/elements/CustomState.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_lib();init_nodes();init_missing_btype();init_btype_ids();init_CustomFieldState();CustomState=class extends CustomFieldState{name(){return custom_type(this.json.name())}make_static(){return this.json.child("make_static").get()}get_changelog_type(){return"Element"}parent(){return nodes_default.create(nodes_default.ELEMENT,this.json.parent().parent())}default_val(){return this.is_list()?[]:super.default_val()}}}});var import_web_dom_collections_iterator131,Root,init_Root=__esm({"lib-browser/lang/elements/Root.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator131=__toESM(require_web_dom_collections_iterator());init_u2();init_mode_check();init_nodes();init_lib();init_RAW();init_elements_utils();init_GenericElement();init_logger();init_appquery();init_css();Root=class extends GenericElement{constructor(json,options){super(json,!1,options)}use_responsive_algorithm(){return appquery_default.get_public_setting("no_legacy_responsive")||this.get_responsive_version()>0||this.get_static_property("new_responsive")}get_responsive_version(force_server_access){var _ref,_this$get_static_prop;return on_server()&&!lib_default.or_throw().force_responsive_version&&!force_server_access?0:(_ref=(_this$get_static_prop=this.get_static_property("responsive_version"))!=null?_this$get_static_prop:appquery_default.get_public_setting("base_responsive_version"))!=null?_ref:0}default_width(){return this.get_static_property("default_width")}run_indexers(timeout){return this.json.run_indexers(timeout)}parent(){return null}root(){return this}is_api(){return!1}name(){return this.json.child("name").get()}}}});function has_adv_timezone_overridden(){return appquery_default.get_public_setting("adv_timezone_overridden")}function has_rounding_operator_timezone_controls_on(){let current_bv=appquery_default.get_public_setting("bubble_version"),has_legacy_timezone_improvements_on=appquery_default.has_feature_enabled("timezone_improvements");return current_bv>=22||has_legacy_timezone_improvements_on}function has_input_timezone_controls_on(){let has_advanced_feature_enabled=appquery_default.has_advanced_feature_enabled("timezone_controls_date_time_inputs"),has_legacy_experiment_on=appquery_default.get_public_setting("bubble_version")<22&&(appquery_default.has_feature_enabled("tz_info_in_date_input")||appquery_default.get_public_setting("bubble_version")>=20);return has_advanced_feature_enabled||has_legacy_experiment_on}var init_timezone_override_settings=__esm({"lib-browser/lang/timezone_override_settings.js"(){"use strict";init_define_process_env();init_shim();init_appquery()}});var import_web_dom_collections_iterator132,moment3,Page,init_Page=__esm({"lib-browser/lang/elements/Page.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator132=__toESM(require_web_dom_collections_iterator());init_lib();init_shrink();init_service_type_parser();init_Root();init_app_json();moment3=__toESM(require_moment_timezone_min());init_timezone_override_settings();init_logger();Page=class extends Root{constructor(json){super(json,{_type:"Page"})}get_plugin_element_headers(){let long_path=this.json.path(),short_path=shrink(long_path.split(".")[0])+"."+long_path.split(".")[1];return lib_default().derived("PagePluginHeaders",short_path).content()}load_plugin_element_headers(){let headers=[];for(let element_type of this.get_element_types()){var _Lib$load_plugin,_Lib$load_plugin$elem,_Lib$load_plugin2;let[plugin_key,element_name]=get_plugin_and_type(element_type),no_cache=/_current/.test(plugin_key),val=(_Lib$load_plugin=lib_default().load_plugin(lib_default().plugin_prefixes.element+element_type,!0,no_cache))==null||(_Lib$load_plugin$elem=(_Lib$load_plugin2=_Lib$load_plugin).element_html_header)==null?void 0:_Lib$load_plugin$elem.call(_Lib$load_plugin2);![null,void 0,""].includes(val)&&!headers.includes(val)&&headers.push(`<!-- ${element_name} -->
`+val+`
`)}return headers}is_custom_definition(){return!1}is_page(){return!0}is_mobile(){return this.json.child("is_mobile_view").get()}is_mobile_view(){return info("Used deprecated is_mobile_view function on Page"),this.json.child("is_mobile_view").get()}is_api(){return!1}is_editor(){return this.json.child("is_editor").get()}is_plugin_editor(){return this.json.child("is_plugin_editor").get()}required_js_files(){return this.E.required_js_files(this)}required_css_files(){return this.E.required_css_files(this)}get_page_timezone(){let prop_suffix=has_adv_timezone_overridden()?"_overridden":"";switch(this.get_static_property(`tz_type${prop_suffix}`)){case"static":return this.get_static_property(`tz_static${prop_suffix}`);default:return moment3.tz.guess()}}}}});var import_web_dom_collections_iterator133,CustomDefinition,init_CustomDefinition=__esm({"lib-browser/lang/elements/CustomDefinition.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator133=__toESM(require_web_dom_collections_iterator());init_Root();CustomDefinition=class extends Root{constructor(json){super(json,{_type:"CustomDefinition"})}is_custom_definition(){return!0}is_page(){return!1}is_api(){return!1}is_mobile(){var _ref;return(_ref=this.get_static_property("custom_element_platform")==="mobile"||this.get_static_property("is_mobile"))!=null?_ref:!1}get_default_value(custom_param){var _this$property$entrie,_this$property,_this$property$entrie2;return this==null||(_this$property$entrie=(_this$property=this.property("parameters")).entries)==null||(_this$property$entrie2=_this$property$entrie.call(_this$property).find(prop=>prop.get_static_property("param_id")===custom_param.split("_")[1]))==null?void 0:_this$property$entrie2.property("default_value").raw()}element_type(){return this.get_static_property("element_type")}}}});var GlobalElement,init_GlobalElement=__esm({"lib-browser/lang/elements/GlobalElement.js"(){"use strict";init_define_process_env();init_shim();init_Root();init_logger();GlobalElement=class extends Root{is_custom_definition(){return!1}is_page(){return!1}is_mobile(){return!1}is_mobile_view(){return info("Used deprecated is_mobile_view function on GlobalElement"),!1}is_api(){return!1}is_editor(){return!0}is_plugin_editor(){return!1}required_js_files(){return[]}required_css_files(){return[]}get_responsive_version(){return 1}}}});function wrap$1(value){let p=value[$PROXY];if(!p&&(Object.defineProperty(value,$PROXY,{value:p=new Proxy(value,proxyTraps$1)}),!Array.isArray(value))){let keys2=Object.keys(value),desc=Object.getOwnPropertyDescriptors(value);for(let i=0,l=keys2.length;i<l;i++){let prop=keys2[i];desc[prop].get&&Object.defineProperty(value,prop,{enumerable:desc[prop].enumerable,get:desc[prop].get.bind(p)})}}return p}function isWrappable(obj){let proto;return obj!=null&&typeof obj=="object"&&(obj[$PROXY]||!(proto=Object.getPrototypeOf(obj))||proto===Object.prototype||Array.isArray(obj))}function unwrap(item,set2=new Set){let result,unwrapped,v,prop;if(result=item!=null&&item[$RAW])return result;if(!isWrappable(item)||set2.has(item))return item;if(Array.isArray(item)){Object.isFrozen(item)?item=item.slice(0):set2.add(item);for(let i=0,l=item.length;i<l;i++)v=item[i],(unwrapped=unwrap(v,set2))!==v&&(item[i]=unwrapped)}else{Object.isFrozen(item)?item=Object.assign({},item):set2.add(item);let keys2=Object.keys(item),desc=Object.getOwnPropertyDescriptors(item);for(let i=0,l=keys2.length;i<l;i++)prop=keys2[i],!desc[prop].get&&(v=item[prop],(unwrapped=unwrap(v,set2))!==v&&(item[prop]=unwrapped))}return item}function getNodes(target,symbol){let nodes2=target[symbol];return nodes2||Object.defineProperty(target,symbol,{value:nodes2=Object.create(null)}),nodes2}function getNode(nodes2,property2,value){if(nodes2[property2])return nodes2[property2];let[s,set2]=createSignal(value,{equals:!1,internal:!0});return s.$=set2,nodes2[property2]=s}function proxyDescriptor$1(target,property2){let desc=Reflect.getOwnPropertyDescriptor(target,property2);return!desc||desc.get||!desc.configurable||property2===$PROXY||property2===$NODE||(delete desc.value,delete desc.writable,desc.get=()=>target[$PROXY][property2]),desc}function trackSelf(target){getListener()&&getNode(getNodes(target,$NODE),$SELF)()}function ownKeys(target){return trackSelf(target),Reflect.ownKeys(target)}function setProperty(state4,property2,value,deleting=!1){if(!deleting&&state4[property2]===value)return;let prev=state4[property2],len=state4.length;value===void 0?(delete state4[property2],state4[$HAS]&&state4[$HAS][property2]&&prev!==void 0&&state4[$HAS][property2].$()):(state4[property2]=value,state4[$HAS]&&state4[$HAS][property2]&&prev===void 0&&state4[$HAS][property2].$());let nodes2=getNodes(state4,$NODE),node;if((node=getNode(nodes2,property2,prev))&&node.$(()=>value),Array.isArray(state4)&&state4.length!==len){for(let i=state4.length;i<len;i++)(node=nodes2[i])&&node.$();(node=getNode(nodes2,"length",len))&&node.$(state4.length)}(node=nodes2[$SELF])&&node.$()}function mergeStoreNode(state4,value){let keys2=Object.keys(value);for(let i=0;i<keys2.length;i+=1){let key=keys2[i];setProperty(state4,key,value[key])}}function updateArray(current,next){if(typeof next=="function"&&(next=next(current)),next=unwrap(next),Array.isArray(next)){if(current===next)return;let i=0,len=next.length;for(;i<len;i++){let value=next[i];current[i]!==value&&setProperty(current,i,value)}setProperty(current,"length",len)}else mergeStoreNode(current,next)}function updatePath(current,path,traversed=[]){let part,prev=current;if(path.length>1){part=path.shift();let partType=typeof part,isArray3=Array.isArray(current);if(Array.isArray(part)){for(let i=0;i<part.length;i++)updatePath(current,[part[i]].concat(path),traversed);return}else if(isArray3&&partType==="function"){for(let i=0;i<current.length;i++)part(current[i],i)&&updatePath(current,[i].concat(path),traversed);return}else if(isArray3&&partType==="object"){let{from=0,to=current.length-1,by=1}=part;for(let i=from;i<=to;i+=by)updatePath(current,[i].concat(path),traversed);return}else if(path.length>1){updatePath(current[part],path,[part].concat(traversed));return}prev=current[part],traversed=[part].concat(traversed)}let value=path[0];typeof value=="function"&&(value=value(prev,traversed),value===prev)||part===void 0&&value==null||(value=unwrap(value),part===void 0||isWrappable(prev)&&isWrappable(value)&&!Array.isArray(value)?mergeStoreNode(prev,value):setProperty(current,part,value))}function createStore(...[store,options]){let unwrappedStore=unwrap(store||{}),isArray3=Array.isArray(unwrappedStore),wrappedStore=wrap$1(unwrappedStore);function setStore(...args){batch(()=>{isArray3&&args.length===1?updateArray(unwrappedStore,args[0]):updatePath(unwrappedStore,args)})}return[wrappedStore,setStore]}var $RAW,$NODE,$HAS,$SELF,proxyTraps$1,$ROOT,init_store=__esm({"node_modules/solid-js/store/dist/store.js"(){init_define_process_env();init_shim();init_solid();$RAW=Symbol("store-raw"),$NODE=Symbol("store-node"),$HAS=Symbol("store-has"),$SELF=Symbol("store-self");proxyTraps$1={get(target,property2,receiver){if(property2===$RAW)return target;if(property2===$PROXY)return receiver;if(property2===$TRACK)return trackSelf(target),receiver;let nodes2=getNodes(target,$NODE),tracked=nodes2[property2],value=tracked?tracked():target[property2];if(property2===$NODE||property2===$HAS||property2==="__proto__")return value;if(!tracked){let desc=Object.getOwnPropertyDescriptor(target,property2);getListener()&&(typeof value!="function"||target.hasOwnProperty(property2))&&!(desc&&desc.get)&&(value=getNode(nodes2,property2,value)())}return isWrappable(value)?wrap$1(value):value},has(target,property2){return property2===$RAW||property2===$PROXY||property2===$TRACK||property2===$NODE||property2===$HAS||property2==="__proto__"?!0:(getListener()&&getNode(getNodes(target,$HAS),property2)(),property2 in target)},set(){return!0},deleteProperty(){return!0},ownKeys,getOwnPropertyDescriptor:proxyDescriptor$1};$ROOT=Symbol("store-root")}});function createBeforeLeave(){let listeners=new Set;function subscribe(listener){return listeners.add(listener),()=>listeners.delete(listener)}let ignore=!1;function confirm(to,options){if(ignore)return!(ignore=!1);let e={to,options,defaultPrevented:!1,preventDefault:()=>e.defaultPrevented=!0};for(let l of listeners)l.listener({...e,from:l.location,retry:force=>{force&&(ignore=!0),l.navigate(to,{...options,resolve:!1})}});return!e.defaultPrevented}return{subscribe,confirm}}function saveCurrentDepth(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),depth=window.history.state._depth}function keepDepth(state4){return{...state4,_depth:window.history.state&&window.history.state._depth}}function notifyIfNotBlocked(notify,block){let ignore=!1;return()=>{let prevDepth=depth;saveCurrentDepth();let delta=prevDepth==null?null:depth-prevDepth;if(ignore){ignore=!1;return}delta&&block(delta)?(ignore=!0,window.history.go(-delta)):notify()}}function normalizePath(path,omitSlash=!1){let s=path.replace(trimPathRegex,"$1");return s?omitSlash||/^[?#]/.test(s)?s:"/"+s:""}function resolvePath(base,path,from){if(hasSchemeRegex.test(path))return;let basePath=normalizePath(base),fromPath=from&&normalizePath(from),result="";return!fromPath||path.startsWith("/")?result=basePath:fromPath.toLowerCase().indexOf(basePath.toLowerCase())!==0?result=basePath+fromPath:result=fromPath,(result||"/")+normalizePath(path,!result)}function invariant(value,message){if(value==null)throw new Error(message);return value}function joinPaths(from,to){return normalizePath(from).replace(/\/*(\*.*)?$/g,"")+normalizePath(to)}function extractSearchParams(url9){let params={};return url9.searchParams.forEach((value,key)=>{params[key]=value}),params}function createMatcher(path,partial,matchFilters){let[pattern,splat]=path.split("/*",2),segments=pattern.split("/").filter(Boolean),len=segments.length;return location2=>{let locSegments=location2.split("/").filter(Boolean),lenDiff=locSegments.length-len;if(lenDiff<0||lenDiff>0&&splat===void 0&&!partial)return null;let match={path:len?"":"/",params:{}},matchFilter=s=>matchFilters===void 0?void 0:matchFilters[s];for(let i=0;i<len;i++){let segment=segments[i],locSegment=locSegments[i],dynamic=segment[0]===":",key=dynamic?segment.slice(1):segment;if(dynamic&&matchSegment(locSegment,matchFilter(key)))match.params[key]=locSegment;else if(dynamic||!matchSegment(locSegment,segment))return null;match.path+=`/${locSegment}`}if(splat){let remainder=lenDiff?locSegments.slice(-lenDiff).join("/"):"";if(matchSegment(remainder,matchFilter(splat)))match.params[splat]=remainder;else return null}return match}}function matchSegment(input2,filter){let isEqual2=s=>s.localeCompare(input2,void 0,{sensitivity:"base"})===0;return filter===void 0?!0:typeof filter=="string"?isEqual2(filter):typeof filter=="function"?filter(input2):Array.isArray(filter)?filter.some(isEqual2):filter instanceof RegExp?filter.test(input2):!1}function scoreRoute(route){let[pattern,splat]=route.pattern.split("/*",2),segments=pattern.split("/").filter(Boolean);return segments.reduce((score,segment)=>score+(segment.startsWith(":")?2:3),segments.length-(splat===void 0?0:1))}function createMemoObject(fn){let map2=new Map,owner=getOwner();return new Proxy({},{get(_,property2){return map2.has(property2)||runWithOwner(owner,()=>map2.set(property2,createMemo(()=>fn()[property2]))),map2.get(property2)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(fn())}})}function mergeSearchString(search2,params){let merged=new URLSearchParams(search2);Object.entries(params).forEach(([key,value])=>{value==null||value===""?merged.delete(key):merged.set(key,String(value))});let s=merged.toString();return s?`?${s}`:""}function expandOptionals(pattern){let match=/(\/?\:[^\/]+)\?/.exec(pattern);if(!match)return[pattern];let prefix=pattern.slice(0,match.index),suffix=pattern.slice(match.index+match[0].length),prefixes=[prefix,prefix+=match[1]];for(;match=/^(\/\:[^\/]+)\?/.exec(suffix);)prefixes.push(prefix+=match[1]),suffix=suffix.slice(match[0].length);return expandOptionals(suffix).reduce((results,expansion)=>[...results,...prefixes.map(p=>p+expansion)],[])}function createRoutes(routeDef,base=""){let{component,load,children:children2,info:info2}=routeDef,isLeaf=!children2||Array.isArray(children2)&&!children2.length,shared={key:routeDef,component,load,info:info2};return asArray(routeDef.path).reduce((acc,originalPath)=>{for(let expandedPath of expandOptionals(originalPath)){let path=joinPaths(base,expandedPath),pattern=isLeaf?path:path.split("/*",1)[0];pattern=pattern.split("/").map(s=>s.startsWith(":")||s.startsWith("*")?s:encodeURIComponent(s)).join("/"),acc.push({...shared,originalPath,pattern,matcher:createMatcher(pattern,!isLeaf,routeDef.matchFilters)})}return acc},[])}function createBranch(routes,index=0){return{routes,score:scoreRoute(routes[routes.length-1])*1e4-index,matcher(location2){let matches=[];for(let i=routes.length-1;i>=0;i--){let route=routes[i],match=route.matcher(location2);if(!match)return null;matches.unshift({...match,route})}return matches}}}function asArray(value){return Array.isArray(value)?value:[value]}function createBranches(routeDef,base="",stack=[],branches=[]){let routeDefs=asArray(routeDef);for(let i=0,len=routeDefs.length;i<len;i++){let def=routeDefs[i];if(def&&typeof def=="object"){def.hasOwnProperty("path")||(def.path="");let routes=createRoutes(def,base);for(let route of routes){stack.push(route);let isEmptyArray=Array.isArray(def.children)&&def.children.length===0;if(def.children&&!isEmptyArray)createBranches(def.children,route.pattern,stack,branches);else{let branch=createBranch([...stack],branches.length);branches.push(branch)}stack.pop()}}}return stack.length?branches:branches.sort((a,b)=>b.score-a.score)}function getRouteMatches(branches,location2){for(let i=0,len=branches.length;i<len;i++){let match=branches[i].matcher(location2);if(match)return match}return[]}function createLocation(path,state4){let origin=new URL(mockBase),url9=createMemo(prev=>{let path_=path();try{return new URL(path_,origin)}catch{return console.error(`Invalid path ${path_}`),prev}},origin,{equals:(a,b)=>a.href===b.href}),pathname=createMemo(()=>url9().pathname),search2=createMemo(()=>url9().search,!0),hash2=createMemo(()=>url9().hash),key=()=>"";return{get pathname(){return pathname()},get search(){return search2()},get hash(){return hash2()},get state(){return state4()},get key(){return key()},query:createMemoObject(on(search2,()=>extractSearchParams(url9())))}}function getIntent(){return intent}function getInLoadFn(){return inLoadFn}function setInLoadFn(value){inLoadFn=value}function createRouterContext(integration,branches,getContext,options={}){let{signal:[source,setSource],utils={}}=integration,parsePath=utils.parsePath||(p=>p),renderPath=utils.renderPath||(p=>p),beforeLeave=utils.beforeLeave||createBeforeLeave(),basePath=resolvePath("",options.base||"");if(basePath===void 0)throw new Error(`${basePath} is not a valid base path`);basePath&&!source().value&&setSource({value:basePath,replace:!0,scroll:!1});let[isRouting,setIsRouting]=createSignal(!1),lastTransitionTarget,transition=(newIntent,newTarget)=>{newTarget.value===reference()&&newTarget.state===state4()||(lastTransitionTarget===void 0&&setIsRouting(!0),intent=newIntent,lastTransitionTarget=newTarget,startTransition(()=>{lastTransitionTarget===newTarget&&(setReference(lastTransitionTarget.value),setState(lastTransitionTarget.state),resetErrorBoundaries(),isServer||submissions[1]([]))}).finally(()=>{lastTransitionTarget===newTarget&&batch(()=>{intent=void 0,newIntent==="navigate"&&navigateEnd(lastTransitionTarget),setIsRouting(!1),lastTransitionTarget=void 0})}))},[reference,setReference]=createSignal(source().value),[state4,setState]=createSignal(source().state),location2=createLocation(reference,state4),referrers=[],submissions=createSignal(isServer?initFromFlash():[]),matches=createMemo(()=>typeof options.transformUrl=="function"?getRouteMatches(branches(),options.transformUrl(location2.pathname)):getRouteMatches(branches(),location2.pathname)),params=createMemoObject(()=>{let m=matches(),params2={};for(let i=0;i<m.length;i++)Object.assign(params2,m[i].params);return params2}),baseRoute={pattern:basePath,path:()=>basePath,outlet:()=>null,resolvePath(to){return resolvePath(basePath,to)}};return createRenderEffect(on(source,source2=>transition("native",source2),{defer:!0})),{base:baseRoute,location:location2,params,isRouting,renderPath,parsePath,navigatorFactory,matches,beforeLeave,preloadRoute,singleFlight:options.singleFlight===void 0?!0:options.singleFlight,submissions};function navigateFromRoute(route,to,options2){untrack(()=>{if(typeof to=="number"){to&&(utils.go?utils.go(to):console.warn("Router integration does not support relative routing"));return}let{replace,resolve,scroll,state:nextState}={replace:!1,resolve:!0,scroll:!0,...options2},resolvedTo=resolve?route.resolvePath(to):resolvePath("",to);if(resolvedTo===void 0)throw new Error(`Path '${to}' is not a routable path`);if(referrers.length>=MAX_REDIRECTS)throw new Error("Too many redirects");let current=reference();if(resolvedTo!==current||nextState!==state4())if(isServer){let e=voidFn();e&&(e.response={status:302,headers:new Headers({Location:resolvedTo})}),setSource({value:resolvedTo,replace,scroll,state:nextState})}else beforeLeave.confirm(resolvedTo,options2)&&(referrers.push({value:current,replace,scroll,state:state4()}),transition("navigate",{value:resolvedTo,state:nextState}))})}function navigatorFactory(route){return route=route||useContext(RouteContextObj)||baseRoute,(to,options2)=>navigateFromRoute(route,to,options2)}function navigateEnd(next){let first=referrers[0];first&&(setSource({...next,replace:first.replace,scroll:first.scroll}),referrers.length=0)}function preloadRoute(url9,options2={}){let matches2=getRouteMatches(branches(),url9.pathname),prevIntent=intent;intent="preload";for(let match in matches2){let{route,params:params2}=matches2[match];route.component&&route.component.preload&&route.component.preload();let{load}=route;inLoadFn=!0,options2.preloadData&&load&&runWithOwner(getContext(),()=>load({params:params2,location:{pathname:url9.pathname,search:url9.search,hash:url9.hash,query:extractSearchParams(url9),state:null,key:""},intent:"preload"})),inLoadFn=!1}intent=prevIntent}function initFromFlash(){let e=voidFn();return e&&e.router&&e.router.submission?[e.router.submission]:[]}}function createRouteContext(router,parent,outlet,match){let{base,location:location2,params}=router,{pattern,component,load}=match().route,path=createMemo(()=>match().path);component&&component.preload&&component.preload(),inLoadFn=!0;let data=load?load({params,location:location2,intent:intent||"initial"}):void 0;return inLoadFn=!1,{parent,pattern,path,outlet:()=>component?createComponent(component,{params,location:location2,data,get children(){return outlet()}}):outlet(),resolvePath(to){return resolvePath(base.path(),to,path())}}}function Root2(props){let location2=props.routerState.location,params=props.routerState.params,data=createMemo(()=>props.load&&untrack(()=>{setInLoadFn(!0),props.load({params,location:location2,intent:getIntent()||"initial"}),setInLoadFn(!1)}));return createComponent(Show,{get when(){return props.root},keyed:!0,get fallback(){return props.children},children:Root3=>createComponent(Root3,{params,location:location2,get data(){return data()},get children(){return props.children}})})}function Routes(props){if(isServer){let e=voidFn();if(e&&e.router&&e.router.dataOnly){dataOnly(e,props.routerState,props.branches);return}e&&((e.router||(e.router={})).matches||(e.router.matches=props.routerState.matches().map(({route,path,params})=>({path:route.originalPath,pattern:route.pattern,match:path,params,info:route.info}))))}let disposers=[],root2,routeStates=createMemo(on(props.routerState.matches,(nextMatches,prevMatches,prev)=>{let equal=prevMatches&&nextMatches.length===prevMatches.length,next=[];for(let i=0,len=nextMatches.length;i<len;i++){let prevMatch=prevMatches&&prevMatches[i],nextMatch=nextMatches[i];prev&&prevMatch&&nextMatch.route.key===prevMatch.route.key?next[i]=prev[i]:(equal=!1,disposers[i]&&disposers[i](),createRoot(dispose2=>{disposers[i]=dispose2,next[i]=createRouteContext(props.routerState,next[i-1]||props.routerState.base,createOutlet(()=>routeStates()[i+1]),()=>props.routerState.matches()[i])}))}return disposers.splice(nextMatches.length).forEach(dispose2=>dispose2()),prev&&equal?prev:(root2=next[0],next)}));return createOutlet(()=>routeStates()&&root2)()}function dataOnly(event,routerState,branches){let url9=new URL(event.request.url),prevMatches=getRouteMatches(branches,new URL(event.router.previousUrl||event.request.url).pathname),matches=getRouteMatches(branches,url9.pathname);for(let match=0;match<matches.length;match++){(!prevMatches[match]||matches[match].route!==prevMatches[match].route)&&(event.router.dataOnly=!0);let{route,params}=matches[match];route.load&&route.load({params,location:routerState.location,intent:"preload"})}}function intercept([value,setValue],get10,set2){return[get10?()=>get10(value()):value,set2?v=>setValue(set2(v)):setValue]}function querySelector(selector){if(selector==="#")return null;try{return document.querySelector(selector)}catch{return null}}function createRouter(config){let ignore=!1,wrap2=value=>typeof value=="string"?{value}:value,signal=intercept(createSignal(wrap2(config.get()),{equals:(a,b)=>a.value===b.value&&a.state===b.state}),void 0,next=>(!ignore&&config.set(next),next));return config.init&&onCleanup(config.init((value=config.get())=>{ignore=!0,signal[1](wrap2(value)),ignore=!1})),createRouterComponent({signal,create:config.create,utils:config.utils})}function bindEvent(target,type,handler){return target.addEventListener(type,handler),()=>target.removeEventListener(type,handler)}function scrollToHash(hash2,fallbackTop){let el=querySelector(`#${hash2}`);el?el.scrollIntoView():fallbackTop&&window.scrollTo(0,0)}function getPath(url9){let u22=new URL(url9);return u22.pathname+u22.search}function StaticRouter(props){let e,url9=props.url||(e=voidFn())&&getPath(e.request.url)||"",obj={value:props.transformUrl?props.transformUrl(url9):url9};return createRouterComponent({signal:[()=>obj,next=>Object.assign(obj,next)]})(props)}function getCache(){if(!isServer)return cacheMap;let req=voidFn();if(!req)throw new Error("Cannot find cache context");return(req.router||(req.router={})).cache||(req.router.cache=new Map)}function cache(fn,name){fn.GET&&(fn=fn.GET);let cachedFn=(...args)=>{let cache2=getCache(),intent2=getIntent(),inLoadFn2=getInLoadFn(),navigate=getOwner()?useNavigate():void 0,now2=Date.now(),key=name+hashKey(args),cached3=cache2.get(key),tracking;if(isServer){let e=voidFn();if(e){let dataOnly2=(e.router||(e.router={})).dataOnly;if(dataOnly2){let data=e&&(e.router.data||(e.router.data={}));if(data&&key in data)return data[key];if(Array.isArray(dataOnly2)&&!dataOnly2.includes(key))return data[key]=void 0,Promise.resolve()}}}if(getListener()&&!isServer&&(tracking=!0,onCleanup(()=>cached3[3].count--)),cached3&&cached3[0]&&(isServer||intent2==="native"||cached3[3].count||Date.now()-cached3[0]<PRELOAD_TIMEOUT)){tracking&&(cached3[3].count++,cached3[3][0]()),cached3[2]==="preload"&&intent2!=="preload"&&(cached3[0]=now2);let res2=cached3[1];return intent2!=="preload"&&(res2="then"in cached3[1]?cached3[1].then(handleResponse(!1),handleResponse(!0)):handleResponse(!1)(cached3[1]),!isServer&&intent2==="navigate"&&startTransition(()=>cached3[3][1](cached3[0]))),inLoadFn2&&"then"in res2&&res2.catch(()=>{}),res2}let res=!isServer&&sharedConfig.context&&sharedConfig.has(key)?sharedConfig.load(key):fn(...args);if(cached3?(cached3[0]=now2,cached3[1]=res,cached3[2]=intent2,!isServer&&intent2==="navigate"&&startTransition(()=>cached3[3][1](cached3[0]))):(cache2.set(key,cached3=[now2,res,intent2,createSignal(now2)]),cached3[3].count=0),tracking&&(cached3[3].count++,cached3[3][0]()),isServer){let e=voidFn();if(e&&e.router.dataOnly)return e.router.data[key]=res}if(intent2!=="preload"&&(res="then"in res?res.then(handleResponse(!1),handleResponse(!0)):handleResponse(!1)(res)),inLoadFn2&&"then"in res&&res.catch(()=>{}),isServer&&sharedConfig.context&&sharedConfig.context.async&&!sharedConfig.context.noHydrate){let e=voidFn();(!e||!e.serverOnly)&&sharedConfig.context.serialize(key,res)}return res;function handleResponse(error2){return async v=>{if(v instanceof Response){let url9=v.headers.get(LocationHeader);if(url9!==null){if(navigate&&url9.startsWith("/"))startTransition(()=>{navigate(url9,{replace:!0})});else if(!isServer)window.location.href=url9;else if(isServer){let e=voidFn();e&&(e.response={status:302,headers:new Headers({Location:url9})})}return}v.customBody&&(v=await v.customBody())}if(error2)throw v;return v}}};return cachedFn.keyFor=(...args)=>name+hashKey(args),cachedFn.key=name,cachedFn}function hashKey(args){return JSON.stringify(args,(_,val)=>isPlainObject(val)?Object.keys(val).sort().reduce((result,key)=>(result[key]=val[key],result),{}):val)}function isPlainObject(obj){let proto;return obj!=null&&typeof obj=="object"&&(!(proto=Object.getPrototypeOf(obj))||proto===Object.prototype)}function setupNativeEvents(preload=!0,explicitLinks=!1,actionBase="/_server",transformUrl){return router=>{let basePath=router.base.path(),navigateFromRoute=router.navigatorFactory(router.base),preloadTimeout={};function isSvg(el){return el.namespaceURI==="http://www.w3.org/2000/svg"}function handleAnchor(evt){if(evt.defaultPrevented||evt.button!==0||evt.metaKey||evt.altKey||evt.ctrlKey||evt.shiftKey)return;let a=evt.composedPath().find(el=>el instanceof Node&&el.nodeName.toUpperCase()==="A");if(!a||explicitLinks&&!a.hasAttribute("link"))return;let svg=isSvg(a),href=svg?a.href.baseVal:a.href;if((svg?a.target.baseVal:a.target)||!href&&!a.hasAttribute("state"))return;let rel=(a.getAttribute("rel")||"").split(/\s+/);if(a.hasAttribute("download")||rel&&rel.includes("external"))return;let url9=svg?new URL(href,document.baseURI):new URL(href);if(!(url9.origin!==window.location.origin||basePath&&url9.pathname&&!url9.pathname.toLowerCase().startsWith(basePath.toLowerCase())))return[a,url9]}function handleAnchorClick(evt){let res=handleAnchor(evt);if(!res)return;let[a,url9]=res,to=router.parsePath(url9.pathname+url9.search+url9.hash),state4=a.getAttribute("state");evt.preventDefault(),navigateFromRoute(to,{resolve:!1,replace:a.hasAttribute("replace"),scroll:!a.hasAttribute("noscroll"),state:state4&&JSON.parse(state4)})}function handleAnchorPreload(evt){let res=handleAnchor(evt);if(!res)return;let[a,url9]=res;typeof transformUrl=="function"&&(url9.pathname=transformUrl(url9.pathname)),preloadTimeout[url9.pathname]||router.preloadRoute(url9,{preloadData:a.getAttribute("preload")!=="false"})}function handleAnchorIn(evt){let res=handleAnchor(evt);if(!res)return;let[a,url9]=res;typeof transformUrl=="function"&&(url9.pathname=transformUrl(url9.pathname)),!preloadTimeout[url9.pathname]&&(preloadTimeout[url9.pathname]=setTimeout(()=>{router.preloadRoute(url9,{preloadData:a.getAttribute("preload")!=="false"}),delete preloadTimeout[url9.pathname]},200))}function handleAnchorOut(evt){let res=handleAnchor(evt);if(!res)return;let[,url9]=res;typeof transformUrl=="function"&&(url9.pathname=transformUrl(url9.pathname)),preloadTimeout[url9.pathname]&&(clearTimeout(preloadTimeout[url9.pathname]),delete preloadTimeout[url9.pathname])}function handleFormSubmit(evt){if(evt.defaultPrevented)return;let actionRef=evt.submitter&&evt.submitter.hasAttribute("formaction")?evt.submitter.getAttribute("formaction"):evt.target.getAttribute("action");if(!actionRef)return;if(!actionRef.startsWith("https://action/")){let url9=new URL(actionRef,mockBase);if(actionRef=router.parsePath(url9.pathname+url9.search),!actionRef.startsWith(actionBase))return}if(evt.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");let handler=actions.get(actionRef);if(handler){evt.preventDefault();let data=new FormData(evt.target);evt.submitter&&evt.submitter.name&&data.append(evt.submitter.name,evt.submitter.value),handler.call({r:router,f:evt.target},data)}}delegateEvents(["click","submit"]),document.addEventListener("click",handleAnchorClick),preload&&(document.addEventListener("mouseover",handleAnchorIn),document.addEventListener("mouseout",handleAnchorOut),document.addEventListener("focusin",handleAnchorPreload),document.addEventListener("touchstart",handleAnchorPreload)),document.addEventListener("submit",handleFormSubmit),onCleanup(()=>{document.removeEventListener("click",handleAnchorClick),preload&&(document.removeEventListener("mouseover",handleAnchorIn),document.removeEventListener("mouseout",handleAnchorOut),document.removeEventListener("focusin",handleAnchorPreload),document.removeEventListener("touchstart",handleAnchorPreload)),document.removeEventListener("submit",handleFormSubmit)})}}function Router(props){if(isServer)return StaticRouter(props);let getSource=()=>{let url9=window.location.pathname+window.location.search;return{value:props.transformUrl?props.transformUrl(url9)+window.location.hash:url9+window.location.hash,state:window.history.state}},beforeLeave=createBeforeLeave();return createRouter({get:getSource,set({value,replace,scroll,state:state4}){replace?window.history.replaceState(keepDepth(state4),"",value):window.history.pushState(state4,"",value),scrollToHash(decodeURIComponent(window.location.hash.slice(1)),scroll),saveCurrentDepth()},init:notify=>bindEvent(window,"popstate",notifyIfNotBlocked(notify,delta=>{if(delta&&delta<0)return!beforeLeave.confirm(delta);{let s=getSource();return!beforeLeave.confirm(s.value,{state:s.state})}})),create:setupNativeEvents(props.preload,props.explicitLinks,props.actionBase,props.transformUrl),utils:{go:delta=>window.history.go(delta),beforeLeave}})(props)}var depth,hasSchemeRegex,trimPathRegex,mockBase,MAX_REDIRECTS,RouterContextObj,RouteContextObj,useRouter,useNavigate,useLocation,useIsRouting,useSearchParams,intent,inLoadFn,createRouterComponent,createOutlet,Route,LocationHeader,PRELOAD_TIMEOUT,CACHE_TIMEOUT,cacheMap,actions,init_dist=__esm({"node_modules/@solidjs/router/dist/index.js"(){init_define_process_env();init_shim();init_web();init_solid();init_store();isServer||saveCurrentDepth();hasSchemeRegex=/^(?:[a-z0-9]+:)?\/\//i,trimPathRegex=/^\/+|(\/)\/+$/g,mockBase="http://sr";MAX_REDIRECTS=100,RouterContextObj=createContext(),RouteContextObj=createContext(),useRouter=()=>invariant(useContext(RouterContextObj),"<A> and 'use' router primitives can be only used inside a Route."),useNavigate=()=>useRouter().navigatorFactory(),useLocation=()=>useRouter().location,useIsRouting=()=>useRouter().isRouting,useSearchParams=()=>{let location2=useLocation(),navigate=useNavigate(),setSearchParams2=(params,options)=>{let searchString=untrack(()=>location2.pathname+mergeSearchString(location2.search,params)+location2.hash);navigate(searchString,{scroll:!1,resolve:!1,...options})};return[location2.query,setSearchParams2]};inLoadFn=!1;createRouterComponent=router=>props=>{let{base}=props,routeDefs=children(()=>props.children),branches=createMemo(()=>createBranches(routeDefs(),props.base||"")),context,routerState=createRouterContext(router,branches,()=>context,{base,singleFlight:props.singleFlight,transformUrl:props.transformUrl});return router.create&&router.create(routerState),createComponent(RouterContextObj.Provider,{value:routerState,get children(){return createComponent(Root2,{routerState,get root(){return props.root},get load(){return props.rootLoad},get children(){return[createMemo(()=>(context=getOwner())&&null),createComponent(Routes,{routerState,get branches(){return branches()}})]}})}})};createOutlet=child=>()=>createComponent(Show,{get when(){return child()},keyed:!0,children:child2=>createComponent(RouteContextObj.Provider,{value:child2,get children(){return child2.outlet()}})}),Route=props=>{let childRoutes=children(()=>props.children);return mergeProps(props,{get children(){return childRoutes()}})};LocationHeader="Location",PRELOAD_TIMEOUT=5e3,CACHE_TIMEOUT=18e4,cacheMap=new Map;isServer||setInterval(()=>{let now2=Date.now();for(let[k,v]of cacheMap.entries())!v[3].count&&now2-v[0]>CACHE_TIMEOUT&&cacheMap.delete(k)},3e5);cache.set=(key,value)=>{let cache2=getCache(),now2=Date.now(),cached3=cache2.get(key);cached3?(cached3[0]=now2,cached3[1]=value,cached3[2]="preload"):(cache2.set(key,cached3=[now2,value,,createSignal(now2)]),cached3[3].count=0)};cache.clear=()=>getCache().clear();actions=new Map}});var implementation_exports={};__export(implementation_exports,{getEditorPathname:()=>getEditorPathname,getEditorSearchParam:()=>getEditorSearchParam,getParameterUpdates:()=>getParameterUpdates,previousSearch:()=>previousSearch,registerParameterDependency:()=>registerParameterDependency,renderEditorRouter:()=>renderEditorRouter,setEditorSearchParams:()=>setEditorSearchParams,updateSavedValue:()=>updateSavedValue});function previousSearch(key){var _previousLocation;return(_previousLocation=previousLocation())==null?void 0:_previousLocation.get(key)}function setPreviousParams(search2){if(search2!=null){let fake_url=new URL(`https://foo.com${search2}`);setPreviousLocation(fake_url.searchParams)}else setPreviousLocation(null)}function EditorRouter(){let[localSearchParams,setLocalSearchParams]=useSearchParams();editorLocation=useLocation(),searchParams=localSearchParams,setSearchParams=setLocalSearchParams;let isRouting=useIsRouting();createEffect(wasRouting=>{let routing=isRouting();if(wasRouting&&!routing){let localRoutingCbs=routingCbs;routingCbs=[];for(let cb of localRoutingCbs)cb()}return routing},isRouting());function registerSearchParam(key){searchParamsMemos[key]=createMemo(()=>{var _localSearchParams$ke;return(_localSearchParams$ke=localSearchParams[key])!=null?_localSearchParams$ke:null})}return registerSearchParam("wf_item"),registerSearchParam("element"),registerSearchParam("tab"),createComputed(previous=>{var _editorLocation$searc,_editorLocation;return untrack(()=>{history_popped?history_popped=!1:(setPreviousParams(previous),previous!=null&&history.push(previous))}),(_editorLocation$searc=(_editorLocation=editorLocation)==null?void 0:_editorLocation.search)!=null?_editorLocation$searc:null},null),[]}function renderEditorRouter(){render(()=>createComponent(Router,{get children(){return createComponent(Route,{path:"/page",component:EditorRouter})}}),document.getElementById("mainwindow"))}function updateSavedValue(param,newValue){savedSearchParams[param]=newValue}function registerParameterDependency(parameter,dependencies,save){parameterDependencies[parameter]==null&&(parameterDependencies[parameter]={});for(let dependencyKey in dependencies)parameterDependencies[parameter][dependencyKey]==null&&(parameterDependencies[parameter][dependencyKey]=dependencies[dependencyKey]);save&&(shouldSave[parameter]=!0)}function getParameterUpdates(parsed,dependencyKey,newDependencyValue){let currentDependencyValue=untrack(()=>{var _searchParams$depende,_searchParams;return(_searchParams$depende=(_searchParams=searchParams)==null?void 0:_searchParams[dependencyKey])!=null?_searchParams$depende:null});if(!currentDependencyValue||currentDependencyValue===newDependencyValue)return{};let modifications={[dependencyKey]:newDependencyValue};for(let[param,dependencies]of Object.entries(parameterDependencies)){let searchParam=param;dependencies[dependencyKey]&&dependencies[dependencyKey]!==newDependencyValue&&parsed.query[searchParam]!=null&&(shouldSave[param]&&(savedSearchParams[searchParam]=parsed.query[searchParam]),modifications[searchParam]=void 0),dependencies[dependencyKey]&&dependencies[dependencyKey]===newDependencyValue&&parsed.query[searchParam]==null&&savedSearchParams[searchParam]!=null&&(modifications[searchParam]=String(savedSearchParams[searchParam]),delete savedSearchParams[searchParam])}return modifications}function getEditorSearchParamMemo(key){return searchParamsMemos[key]==null?()=>null:searchParamsMemos[key]}function getEditorSearchParam(key){return getEditorSearchParamMemo(key)()}function setEditorSearchParams(params,options,cb){function legacySetParams(){let url9=new URL(document.location.href),current_url=url9.toString();for(let[key,value]of Object.entries(params))value==null||value===""?url9.searchParams.delete(key):url9.searchParams.set(key,String(value));url9.toString()!==current_url&&(window.history.pushState({},"",url9),cb==null||cb())}function newSetParams(){cb&&routingCbs.push(cb),setSearchParams(params,options)}let wfEnabled;try{wfEnabled=isWfRedesignEnabled()}catch{legacySetParams();return}wfEnabled?newSetParams():legacySetParams()}function getEditorPathname(){var _editorLocation$pathn,_editorLocation2;return(_editorLocation$pathn=(_editorLocation2=editorLocation)==null?void 0:_editorLocation2.pathname)!=null?_editorLocation$pathn:null}var import_web_dom_collections_iterator134,import_web_url3,import_web_url_search_params4,searchParams,setSearchParams,editorLocation,routingCbs,searchParamsMemos,savedSearchParams,history,previousLocation,setPreviousLocation,history_popped,parameterDependencies,shouldSave,init_implementation=__esm({"lib-browser/editor/editorRouter/implementation.js"(){"use strict";init_define_process_env();init_shim();init_web();import_web_dom_collections_iterator134=__toESM(require_web_dom_collections_iterator()),import_web_url3=__toESM(require_web_url()),import_web_url_search_params4=__toESM(require_web_url_search_params());init_web();init_dist();init_solid();init_flagCheck();routingCbs=[],searchParamsMemos={},savedSearchParams={},history=[],[previousLocation,setPreviousLocation]=createSignal(null);history_popped=!1;window.addEventListener("popstate",()=>{history[history.length-1]===window.location.search&&(history_popped=!0,history.pop(),setPreviousParams(history[history.length-1]))});parameterDependencies={},shouldSave={}}});var mock_exports={};__export(mock_exports,{getEditorPathname:()=>getEditorPathname2,getEditorSearchParam:()=>getEditorSearchParam2,getParameterUpdates:()=>getParameterUpdates2,previousSearch:()=>previousSearch2,registerParameterDependency:()=>registerParameterDependency2,renderEditorRouter:()=>renderEditorRouter2,setEditorSearchParams:()=>setEditorSearchParams2,updateSavedValue:()=>updateSavedValue2});function renderEditorRouter2(){}function updateSavedValue2(param,newValue){}function registerParameterDependency2(parameter,dependencies,save){}function getParameterUpdates2(parsed,dependencyKey,newDependencyValue){return{}}function getEditorSearchParam2(key){return null}function setEditorSearchParams2(params,options,cb){}function getEditorPathname2(){return null}function previousSearch2(key){}var init_mock=__esm({"lib-browser/editor/editorRouter/mock.js"(){"use strict";init_define_process_env();init_shim()}});var require_editorRouter=__commonJS({"lib-browser/editor/editorRouter/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();init_u2();var router_implementation;is_edit_mode()?router_implementation=(init_implementation(),__toCommonJS(implementation_exports)):router_implementation=(init_mock(),__toCommonJS(mock_exports));module2.exports=router_implementation}});var import_editorRouter,init_selection=__esm({"lib-browser/editor/workflow_tab/logic/selection.js"(){"use strict";init_define_process_env();init_shim();import_editorRouter=__toESM(require_editorRouter())}});function can_have_legacy_name_property(type){return!workflow_objects_types_with_name_properties[type]}var import_web_dom_collections_iterator135,S15,workflow_objects_types_with_name_properties,WorkflowObject,init_WorkflowObject=__esm({"lib-browser/lang/workflow/WorkflowObject.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator135=__toESM(require_web_dom_collections_iterator());init_u2();init_RAW();init_nodes();init_appquery();init_css();init_lib();init_shrink();init_workflow_utils();init_selection();init_flagCheck();({S:S15}=shrink_exports),workflow_objects_types_with_name_properties={"stripe-CreateCoupon":!0};WorkflowObject=class extends nodes_default.HasID{type(){return this.json.child("type").get()}id(){return this.json.id()}is_api(){var _this$root;return(_this$root=this.root())==null?void 0:_this$root.is_api()}get_changelog_type(){return this.is_api()?"Backend Workflow":"Workflow"}hide_property_editor_tabs(){return!0}pretty_print(indent,outer){var _indent,_outer,_display;(_indent=indent)!=null||(indent=""),(_outer=outer)!=null||(outer=!0);let res=[];outer&&res.push(`
`),res.push(indent);let display2;try{display2=this.display()}catch{}(_display=display2)!=null||(display2=this.type()),res.push((this.is_action()?"Action ":"Event ")+this.id()+": "+display2);for(let prop of this.properties())res.push(`
`+indent+"  "+prop.json.name()+":"),res.push(`
`+prop.pretty_print(indent+"    ",!1));let n=this.next();return n&&(res.push(indent+`

          \u2193

`),res.push(n.pretty_print(indent,!1))),outer&&res.push(`
`),res.join("")}get_name(){let name=this.json.child("name").get();return name||!can_have_legacy_name_property(this.type())?name:this.get_static_property("name")}find_my_expressions(filter){return nodes_default.from_raw_array(this.json,nodes_default.new_expression,find_my_expressions(nodes_default.to_raw(this),filter))}root(){var _this$event,_this$event$owner,_this$event$owner$cal;return(_this$event=this.event())==null||(_this$event$owner=_this$event.owner)==null||(_this$event$owner$cal=_this$event$owner.call(_this$event))==null?void 0:_this$event$owner$cal.root()}my_element(){let element_id=this.element_id();return element_id?appquery_default.element(element_id):null}element_id(){return this.json.smart_cache("element_id",json=>json._raw_gchild(S15.properties,S15.element_id))}next_recommended_actions(){return[]}};WorkflowObject.prototype.make_new=nodes_default.new_workflow_item}});var import_web_dom_collections_iterator136,all_migrations,register_migration,get_migration_fn,init_migrations=__esm({"lib-browser/lang/migrations.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator136=__toESM(require_web_dom_collections_iterator());init_core();init_b_object();init_btypes();all_migrations={},register_migration=migration_data=>{var _migration_data$plugi,_all_migrations$_migr;(_all_migrations$_migr=all_migrations[_migration_data$plugi=migration_data.plugin_name])!=null||(all_migrations[_migration_data$plugi]=[]),all_migrations[migration_data.plugin_name].push(migration_data)};register_migration({plugin_name:"Action:TriggerCustomEvent",original_path:"properties.workflow_thing",new_path:"properties.arguments.0.arg_value",additional_info:()=>({param_id:LEGACY_PARAM_ID})});register_migration({plugin_name:"Action:ScheduleCustom",original_path:"properties.workflow_thing",new_path:"properties.arguments.0.arg_value",additional_info:()=>({param_id:LEGACY_PARAM_ID})});register_migration({plugin_name:"Action:TriggerCustomEventFromReusable",original_path:"properties.workflow_thing",new_path:"properties.arguments.0.arg_value",additional_info:()=>({param_id:LEGACY_PARAM_ID})});register_migration({plugin_name:"Event:CustomEvent",original_path:"properties.custom_event_data_type",new_path:"properties.parameters.0.btype_id",additional_info:btype_id=>{let btype=get5(btype_id),name=btype.is_missing()?"Thing":btype.display();return{param_id:LEGACY_PARAM_ID,param_name:"Workflow's "+name}}});get_migration_fn=plugin_name=>{let relevant_migrations=all_migrations[plugin_name];return relevant_migrations?json=>{let ran_migration=!1;for(let migration_info of relevant_migrations){let original_data=json.child_by_path(migration_info.original_path).raw();if(original_data!=null){ran_migration=!0;let split_new_pos=migration_info.new_path.split("."),new_name=split_new_pos[split_new_pos.length-1],new_parent=migration_info.new_path.substring(0,migration_info.new_path.length-new_name.length-1);json.child_by_path(new_parent).set(extend({[new_name]:original_data},migration_info.additional_info(original_data))),json.child_by_path(migration_info.original_path).set(null)}}return ran_migration}:()=>!1}}});function _applyDecoratedDescriptor8(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}function missing_event(type){return{_fields:()=>[],field_names:{},display:()=>`[missing${type?`: ${type}`:" type"}]`,register(){},defaultWorkflowName:()=>"Unnamed Workflow"}}var import_web_dom_collections_iterator137,_dec9,_class56,S16,GenericEvent,init_GenericEvent=__esm({"lib-browser/lang/workflow/GenericEvent.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator137=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_caching();init_lib();init_elements_utils();init_shrink();init_migrations();init_WorkflowObject();init_workflow_utils();init_btype_ids();init_btypes();init_flagCheck();({S:S16}=shrink_exports);GenericEvent=(_dec9=cached({type:RUN_MODE}),_class56=class extends WorkflowObject{constructor(json){var _this$E,_this$E$field_names;json=json.to_id(),super(json);let type=this.type();if(this._plugin_type=type,is_edit_mode()&&get_migration_fn(lib_default().plugin_prefixes.event+type)(this.json),type&&(this.E=lib_default().load_plugin(lib_default().plugin_prefixes.event+type,!0)),(_this$E=this.E)!=null||(this.E=missing_event(type)),this.E.fields&&!this.E.field_names)throw new UnexpectedError("missing field_names for "+type);this._field_names=(_this$E$field_names=this.E.field_names)!=null?_this$E$field_names:getCommonFieldNames(),_use_issue_checker()&&this.app().can_run_issue_checker()&&json.register_indexer("issues_list",()=>{if(lib_default().visual_edit.allow_issue_indexer_runs()){let me=nodes_default.new_workflow_item(this.json),id=me.id();if(!id)return;let issues=lib_default().apptests.check_issues(me);return[["issues_list",id],json_stringify(issues)]}})}is_equal_to(other){return super.is_equal_to(other)?this._plugin_type===other._plugin_type:!1}find_expressions(filter){return nodes_default.from_raw_array(this.json,nodes_default.new_expression,event_find_expressions(nodes_default.to_raw(this),filter))}is_action(){return!1}is_api_event(){return!1}next(){let json=this.json.child("actions").child(0);return json.exists()?nodes_default.new_workflow_item(json):null}all_next(filter){let actions2=this.json.child("actions").children().map(json=>nodes_default.new_workflow_item(json));return nodes_default.filter_array(filter,actions2)}get_next_json(){return this.json.child("actions").child(this.json.children().length)}actions(filter){return this.all_next(filter)}disable_rename(){return isWfRedesignEnabled()}event(){return this}context_element(){var _this$my_element;return(_this$my_element=this.my_element())!=null?_this$my_element:this.owner()}owner(){var _this$json$parent;let json=(_this$json$parent=this.json.parent())==null?void 0:_this$json$parent.parent();if(json)return nodes_default.new_element(json)}register(element_instance){return this.E.register(this,element_instance)}deferrable(){var _this$E$deferrable;return(_this$E$deferrable=this.E.deferrable)!=null?_this$E$deferrable:!1}isUserAction(){var _this$E$isUserAction;return(_this$E$isUserAction=this.E.isUserAction)!=null?_this$E$isUserAction:!1}field_names(){return this._field_names}returnFields(){var _this$get_static_prop;return Object.values((_this$get_static_prop=this.get_static_property("return_types"))!=null?_this$get_static_prop:{}).map(entry=>({return_id:entry.return_id,display:entry[S16.display],btype_id:entry.is_list?list_type(entry.btype_id):entry.btype_id,optional:entry.optional}))}returnValueBtype(){var _this$display,_this$display2;let returnFields=this.returnFields();if(this.type()!=="CustomEvent"||returnFields.length===0)return get5("null");let result={caption:`${(_this$display=(_this$display2=this.display)==null?void 0:_this$display2.call(this))!=null?_this$display:""}'s return value`,definition:Object.fromEntries(returnFields.map(entry=>[entry.return_id,[entry.display,entry.btype_id]]))};return get5(`struct.${base642(JSON.stringify(result))}`)}condition(){return nodes_default.new_expression(this.json._child(S16.properties)._child(S16.condition),this)}},_applyDecoratedDescriptor8(_class56.prototype,"condition",[_dec9],Object.getOwnPropertyDescriptor(_class56.prototype,"condition"),_class56.prototype),_class56)}});var import_web_dom_collections_iterator138,exported4,Event_default,init_Event=__esm({"lib-browser/lang/workflow/Event.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator138=__toESM(require_web_dom_collections_iterator());init_plugin_getter();init_GenericEvent();init_flagCheck();exported4=class extends GenericEvent{},Event_default=exported4}});var apiconnectorbase_exports={};__export(apiconnectorbase_exports,{IGNORE_FIELD:()=>IGNORE_FIELD,PRIVATE_ONLY:()=>PRIVATE_ONLY,PUBLIC_ONLY:()=>PUBLIC_ONLY});var IGNORE_FIELD,PUBLIC_ONLY,PRIVATE_ONLY,init_apiconnectorbase=__esm({"lib-browser/constants/apiconnectorbase.js"(){"use strict";init_define_process_env();init_shim();IGNORE_FIELD="_ignore",PUBLIC_ONLY="public_only",PRIVATE_ONLY="private_only"}});function special_dehydrate(field,value){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:0)+1%10===0&&optional_pause(),field==="_id"?typeof(value==null?void 0:value._id)=="function"?value._id():Array.isArray(value)?value.map((item,index)=>special_dehydrate(field,item,index)):value:dehydrate_tree(value)}function to_array2(val){var _val;return(_val=val)!=null||(val=[]),typeof val.all=="function"&&(val=val.all()),val.filter(item=>item!=null)}function get_postgres_language(){let app_language2=lib_default().app_language();return postgres_languages_iso[app_language2]?postgres_languages_iso[app_language2]:postgres_languages.includes(app_language2)?app_language2:"simple"}var import_web_dom_collections_iterator139,equals,equals_both,not_equals,not_equals_both,is_empty2,is_not_empty,is_true,is_false,contains2,contains_both,in_array,not_contains,not_contains_both,not_in,text_contains_string,contains_all_fields,prefix_search,email_prefix_search,email_equals,email_contains_string,postgres_languages_iso,postgres_languages,build_range_constaint,range_contains,range_contained_by,range_overlaps,range_greater_than,range_less_than,init_postgres_constraints=__esm({"lib-browser/db/postgres_constraints.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator139=__toESM(require_web_dom_collections_iterator());init_hydrate();init_b_location();init_appquery();init_b_fiber();init_lib();equals=function(c,v){return v==null?{t:"C",c,n:"is_empty"}:{t:"C",c,n:"equals",v:special_dehydrate(c,v)}},equals_both=(col1,col2)=>({t:"F",n:"equals_both",a:{col1,col2}}),not_equals=function(c,v){return v==null?{t:"C",c,n:"is_not_empty"}:{t:"C",c,n:"not_equals",v:special_dehydrate(c,v)}},not_equals_both=(col1,col2)=>({t:"F",n:"not_equals_both",a:{col1,col2}}),is_empty2=c=>({t:"C",c,n:"is_empty"}),is_not_empty=c=>({t:"C",c,n:"is_not_empty"}),is_true=c=>({t:"C",c,n:"equals",v:!0}),is_false=c=>({t:"C",c,n:"equals",v:!1}),contains2=function(c,v){return v==null?!1:{t:"C",c,n:"contains",v:special_dehydrate(c,v)}},contains_both=(col1,col2)=>({t:"F",n:"contains_both",a:{col1,col2}}),in_array=function(c,v){return v=to_array2(v),v.length===0?!1:{t:"C",c,n:"in",v:special_dehydrate(c,v)}},not_contains=function(c,v){return v==null?null:{t:"C",c,n:"not_contains",v:special_dehydrate(c,v)}},not_contains_both=(col1,col2)=>({t:"F",n:"not_contains_both",a:{col1,col2}}),not_in=function(c,v){return v=to_array2(v),v.length===0?null:{t:"C",c,n:"not_in",v:special_dehydrate(c,v)}},text_contains_string=function(c,v){return v==null?null:{t:"C",c,n:"contains_string",v}},contains_all_fields=function(c,v,opts){if(v==null)return null;let language;return opts!=null&&opts.no_language?language="simple":language=get_postgres_language(),{t:"C",c:"_all",n:"contains",v:{language,query:v}}};contains_all_fields.no_field_required=!0;prefix_search=function(c,v,opts){let language;return v==null?null:(opts!=null&&opts.no_language?language="simple":language=get_postgres_language(),{t:"C",c,n:"prefix",v:{language,query:v}})},email_prefix_search=function(c,v){if(v==null||typeof v!="string")return!1;let main={t:"O",a:[]};main.a.push(prefix_search("authentication.email.email",v.toLowerCase()));for(let oauth_provider of appquery_default.get_oauth_providers())main.a.push(prefix_search("authentication."+oauth_provider+".email",v.toLowerCase()));return main};email_prefix_search.no_field_required=!0;email_equals=function(_,v){if(v==null||typeof v!="string")return!1;let main={t:"O",a:[]};main.a.push(equals("authentication.email.email",v.toLowerCase()));for(let oauth_provider of appquery_default.get_oauth_providers())main.a.push(equals("authentication."+oauth_provider+".email",v.toLowerCase()));return main};email_equals.no_field_required=!0;email_contains_string=function(_,v){if(v==null||typeof v!="string")return!1;let base_email_path="authentication.email.email",oauth_email_paths=appquery_default.get_oauth_providers().map(p=>`authentication.${p}.email`);return{t:"O",a:[base_email_path,...oauth_email_paths].map(p=>text_contains_string(p,v.toLowerCase()))}};email_contains_string.no_field_required=!0;postgres_languages_iso={da_dk:"danish",nl_nl:"dutch",en_us:"english",fi_fi:"finnish",fr_fr:"french",de_de:"german",hu_hu:"hungarian",it_it:"italian",no_no:"norwegian",pt_br:"portuguese",ro_ro:"romanian",ru_ru:"russian",es_es:"spanish",sv_se:"swedish",tr_tr:"turkish"},postgres_languages=Object.values(postgres_languages_iso),build_range_constaint=n=>function(c,v){return v==null?!1:{t:"C",c,n,v}},range_contains=build_range_constaint("range_contains"),range_contained_by=build_range_constaint("range_contained_by"),range_overlaps=build_range_constaint("range_overlaps"),range_greater_than=build_range_constaint("range_greater_than"),range_less_than=build_range_constaint("range_less_than")}});var build_is_contained_by_list,build_is_not_contained_by_list,process_list_arg,cast_to_list,array_to_static_list,list_get_bubble_null,init_list_utilities=__esm({"lib-browser/core/core_btypes/utilities/list_utilities.js"(){"use strict";init_define_process_env();init_shim();init_db_values();init_btypes();init_btype_ids();init_b_fiber();init_lib();build_is_contained_by_list=btype_id=>({description:" is in ",section:"Other Operators",ret_btype:"sys.bool",arg_btype:list_type(btype_id),fn:(prev,arg)=>{let btype=get5(btype_id);return prev=btype.cast(prev),process_list_arg(btype_id,arg).contains(prev,btype)}}),build_is_not_contained_by_list=btype_id=>({description:" is not in ",section:"Other Operators",ret_btype:"sys.bool",arg_btype:list_type(btype_id),fn:(prev,arg)=>{let btype=get5(btype_id);return prev=btype.cast(prev),!process_list_arg(btype_id,arg).contains(prev,btype)}}),process_list_arg=(btype_id,val)=>{var _cast_to_list;return(_cast_to_list=cast_to_list(btype_id,val))!=null?_cast_to_list:array_to_static_list(btype_id,[])},cast_to_list=(btype_id,val)=>db_values_default.registry.is(val,db_values_default.LIST_WRAPPER)?get5(val.get_item_btype_id()).matches(btype_id)?val:list_get_bubble_null():Array.isArray(val)?array_to_static_list(btype_id,val):list_get_bubble_null(),array_to_static_list=(btype_id,array)=>{let btype_object=get5(btype_id),casted_array=array.map((entry,idx)=>(idx%10===9&&optional_pause(),btype_object.cast(entry))).filter(x=>x!=null);return lib_default().db_instance().static_list(btype_id,casted_array)},list_get_bubble_null=()=>null}});var EMPTY_RAW_STRUCT_ID_ENDING,init_external_values=__esm({"lib-browser/constants/external_values.js"(){"use strict";init_define_process_env();init_shim();EMPTY_RAW_STRUCT_ID_ENDING="__bubble_originally_empty"}});function create_fake_field(name,data){let deleted,display2,btype;return typeof data=="object"?(btype=data.value,deleted=data.deleted,display2=data.display):(btype=data,deleted=!1,display2=name),{name:()=>name,raw:()=>!0,btype:()=>btype,exists:()=>!0,display:()=>display2,deleted:()=>deleted}}function create_fake_type(name,fields,privacy_roles){return{exists:()=>!0,name:()=>name,field:k=>create_fake_field(k,fields[k]),fields:()=>object_entries(fields).filter(_ref=>{let[k,value]=_ref;return typeof value!="object"||value.display}).map(_ref2=>{let[k,value]=_ref2;return create_fake_field(k,value)}),no_rename:!0,display:()=>name,privacy_roles:()=>object_entries(privacy_roles).map(_ref3=>{let[name2,data]=_ref3;return fake_privacy_role(name2,data)}),privacy_role(name2){if(privacy_roles!=null&&privacy_roles[name2])return fake_privacy_role(name2,privacy_roles[name2])}}}function fake_privacy_role(name,data){return{get_permissions:()=>data.permissions,condition:()=>({json:()=>({raw:data.condition}),get_eval_value:()=>get5("sys.bool")})}}function get_special_fields(custom_type2,additional){let sets_to_include=[SPECIAL_ALL];return additional&&sets_to_include.push(additional),custom_type2.name()==="user"&&(sets_to_include.push(SPECIAL_USER),appquery_default.app().plugin_special()==="meta"&&sets_to_include.push(SPECIAL_META_USER)),sets_to_include.flatMap(set2=>object_entries(set2).map(_ref4=>{let[field_name,value]=_ref4;return create_fake_field(field_name,value)}))}var import_web_dom_collections_iterator140,both_fields,subscription_order_fields,order_fields,fake_order,fake_subscription_order,password_reset_fields,password_reset_privacy,magic_link_fields,fake_pw_reset,fake_magic_link,fake_confirmation_email,SPECIAL_TYPES,SPECIAL_ALL,SPECIAL_USER,SPECIAL_META_USER,init_builtins=__esm({"lib-browser/lang/application/builtins.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator140=__toESM(require_web_dom_collections_iterator());init_u2();init_decaf();init_appquery();init_btypes();init_db();both_fields={run_id:{value:"sys.uid"},charge_user_id:{value:"sys.uid"},status:{value:"sys.uid"}},subscription_order_fields={plan_id:{value:"sys.uid",display:"Plan id"},done:{value:"boolean",display:"Subscription was successful"},coupon_id:{value:"sys.uid",display:"Coupon id"},quantity:{value:"number",display:"Quantity"},trial_end:{value:"date",display:"Trial End"},tax_percent:{value:"number",display:"Tax percent"},user_id:{value:"sys.uid"},subscribe_id:{value:"sys.uid"},stringified_properties:{value:"sys.uid"}},order_fields={amount:{value:"number",display:"Amount"},amount_received:{value:"number",display:"Amount Received (including coupons)"},app_fee:{value:"number",display:"Application Fee"},currency:{value:"sys.uid",display:"Currency"},StripeChargeID:{value:"sys.uid",display:"Charge Id"},captured:{value:"boolean",display:"Captured"},payment_intent_id:{value:"text",display:"Payment intent id"},description:{value:"text",display:"Order description"},charged_user_email:{value:"sys.uid",display:"Email of charged user"},product_name:{value:"text",display:"Product name"},image:{value:"text",display:"Product image"},statement_descriptor:{value:"text",display:"Statement descriptor"},charge_user_action_id:{value:"sys.uid"},charged_user_id:{value:"sys.uid"},charged_user:{value:"sys.uid"},payee_user:{value:"sys.uid"},authorize_only:{value:"boolean"},allow_promotion_codes:{value:"boolean"}},fake_order=create_fake_type(SYSTEM_TYPE_IDS.STRIPE_ORDER,extend({},both_fields,order_fields)),fake_subscription_order=create_fake_type(SYSTEM_TYPE_IDS.STRIPE_SUBSCRIPTION_ORDER,extend({},both_fields,subscription_order_fields)),password_reset_fields={used:"boolean",user_id:"custom",token_text:"text",email:"text"},password_reset_privacy={everyone:{permissions:{}},no_one:{condition:!1,permissions:{}}},magic_link_fields={used:"boolean",user_id:"custom",email:"text",validity_ms:"number",spage_thing:"text",fpage_thing:"text",succ_page_name:"text",fail_page_name:"text",s_additional_parameters:"text",f_additional_parameters:"text",success_page:"text",failure_page:"text",stay_logged_in:"boolean",token_text:"text"},fake_pw_reset=create_fake_type(SYSTEM_TYPE_IDS.PW_RESET,password_reset_fields,password_reset_privacy),fake_magic_link=create_fake_type(SYSTEM_TYPE_IDS.MAGIC_LINK,magic_link_fields,password_reset_privacy),fake_confirmation_email=create_fake_type(SYSTEM_TYPE_IDS.CONFIRMATION_EMAIL,password_reset_fields,password_reset_privacy),SPECIAL_TYPES=[fake_order,fake_subscription_order,fake_pw_reset,fake_confirmation_email,fake_magic_link],SPECIAL_ALL={"Modified Date":"date","Created Date":"date","Created By":"custom",Slug:"text",recurring_scheduling:"json"},SPECIAL_USER={StripeCustomerID:"custom",stripeauthtoken:"not_indexed",email:"custom",user_signed_up:"boolean"},SPECIAL_META_USER={max_number_of_app:"long"}}});var MISSING_PLUGIN,init_plugin2=__esm({"lib-browser/strings/plugin.js"(){"use strict";init_define_process_env();init_shim();MISSING_PLUGIN="could not find plugin"}});var generic_actions_utilities_exports={};__export(generic_actions_utilities_exports,{APIEvent_param_prefix:()=>APIEvent_param_prefix,apply_default_fields:()=>apply_default_fields,change_field_names:()=>change_field_names,get_data_to_refresh_for_change_action:()=>get_data_to_refresh_for_change_action,get_page:()=>get_page,get_resume_url:()=>get_resume_url,get_run_mode_api_event_name:()=>get_run_mode_api_event_name,get_velocity_animation_duration:()=>get_velocity_animation_duration,make_pre_process_properties:()=>make_pre_process_properties,pre_process_properties:()=>pre_process_properties,prepare_raw_thing_to_copy:()=>prepare_raw_thing_to_copy,sub_node_key_to_btype:()=>sub_node_key_to_btype});function change_field_names(prop_type){return{changes:{prop_type}}}function get_page(id){var _page;let page2=appquery_default.page(id);return(_page=page2)!=null||(page2=appquery_default.get_page_by_name(id)),page2}function get_velocity_animation_duration(animation){var _$$Velocity,_ref4,_stock_effects$animat,_stock_effects$animat2,_custom_effects$anima;let stock_effects=(_$$Velocity=$.Velocity)==null?void 0:_$$Velocity.RegisterEffect.packagedEffects,custom_effects=noBounceTransitions;return(_ref4=(_stock_effects$animat=(_stock_effects$animat2=stock_effects[animation])==null?void 0:_stock_effects$animat2.defaultDuration)!=null?_stock_effects$animat:(_custom_effects$anima=custom_effects[animation])==null?void 0:_custom_effects$anima.defaultDuration)!=null?_ref4:300}function get_data_to_refresh_for_change_action(_ref5){let{to_change,to_change_btype_id,changes}=_ref5;if(to_change==null&&lib_default().bubble_version()>=9)return{};let to_refresh={};for(let change of object_values(changes))if(change.key){let key_to_refresh=state_keys_default.Message({prev:to_change,message:change.key,prior_btype_id:to_change_btype_id});change.action?to_refresh[key_to_refresh]=null:to_refresh[key_to_refresh]=change.value}return to_refresh[state_keys_default.Message({prev:to_change,message:"Modified Date",prior_btype_id:to_change_btype_id})]=null,to_refresh}function prepare_raw_thing_to_copy(raw){return raw?(delete raw["Created By"],delete raw["Created Date"],delete raw["Modified Date"],delete raw.Slug,raw):null}function sub_node_key_to_btype(main,key){var _main$get_message;return!main||!key?null:(_main$get_message=main.get_message(key))==null?void 0:_main$get_message.ret_btype()}function get_run_mode_api_event_name(event_id){if(event_id&&!lib_default().is_edit_mode()){let api_index=lib_default().derived("APIWFByName",!0).content();for(let name in api_index)if(api_index[name]===event_id)return name}}function get_resume_url(context,action,server_workflow_terminated){let originalURL=url3.parse(document.location.href,!0);delete originalURL.search;let resume_key=lib_default().workflow.make_resume_key(context,action,server_workflow_terminated);return resume_key&&(originalURL.query.resume=resume_key),url3.format(originalURL)}var import_web_dom_collections_iterator141,url3,make_pre_process_properties,pre_process_properties,apply_default_fields,APIEvent_param_prefix,init_generic_actions_utilities=__esm({"lib-browser/core/core_actions/utilities/generic_actions_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator141=__toESM(require_web_dom_collections_iterator());init_u2();init_state_keys();init_btypes();init_plugin2();init_decaf();init_lib();init_appquery();url3=__toESM(require_url()),make_pre_process_properties=_ref=>{let{prop_name,thing_btype_id}=_ref;return function(properties){var _properties$prop_name;let thing_custom_type=null;try{thing_custom_type=get5(thing_btype_id).custom_type()}catch{}(_properties$prop_name=properties[prop_name])!=null||(properties[prop_name]={});for(let entry of Object.values(properties[prop_name])){var _field_value,_field_value$inner,_field_value2;if(entry===void 0)continue;let field_value;if(thing_custom_type){let field_btype_id=thing_custom_type.field(entry.key).btype();field_value=get5(field_btype_id)}if(entry.action!=null&&!((_field_value=field_value)!=null&&(_field_value$inner=(_field_value2=_field_value).inner)!=null&&_field_value$inner.call(_field_value2))&&(entry.action=null),["add_list","remove_list","set_list"].includes(entry==null?void 0:entry.action)){var _entry$value$all,_entry$value,_entry$value$all2,_entry$value2;entry.value=((_entry$value$all=(_entry$value=entry.value)==null||(_entry$value$all2=(_entry$value2=_entry$value).all)==null?void 0:_entry$value$all2.call(_entry$value2))!=null?_entry$value$all:[]).map(a=>{var _a$all,_a$all2;return(_a$all=a==null||(_a$all2=a.all)==null?void 0:_a$all2.call(a))!=null?_a$all:a})}}return properties}},pre_process_properties=_ref2=>{let{properties,prop_name,thing_btype_id}=_ref2;return make_pre_process_properties({prop_name,thing_btype_id})(properties)},apply_default_fields=(prop_name,type,properties)=>{var _properties$prop_name2,_ref3;if(typeof type!="string")return properties;let custom_type2;try{custom_type2=get5(type).custom_type()}catch(err){if(String(err==null?void 0:err.message).indexOf(MISSING_PLUGIN)===-1)throw err;return properties}(_properties$prop_name2=properties[prop_name])!=null||(properties[prop_name]={});let setup_fields=Object.values(properties[prop_name]).filter(change=>change==null?void 0:change.key).map(change=>change==null?void 0:change.key),idx=Object.values(properties[prop_name]).length,default_fields=(_ref3=custom_type2.default()||custom_type2.get_default_fields())!=null?_ref3:{};for(let field of default_fields)!field.deleted&&!setup_fields.includes(field.name)&&field.default_val!=null&&(properties[prop_name][idx]={key:field.name,value:field.default_val},idx++);return properties};APIEvent_param_prefix="_wf_param_"}});var core_ds_db_ops_utilities_exports={};__export(core_ds_db_ops_utilities_exports,{_get_sortable_btypes:()=>_get_sortable_btypes,constraints_without_values:()=>constraints_without_values,convert_api_call_to_db_object:()=>convert_api_call_to_db_object,get_key_value:()=>get_key_value,get_sorts_list:()=>get_sorts_list,is_field_okay:()=>is_field_okay,resolve_constraints:()=>resolve_constraints});function _get_sortable_btypes(db_fields_only){let white_list_btypes=["boolean","text","number","date","dateinterval","file","image"];return db_fields_only&&white_list_btypes.push("geographic_address"),white_list_btypes}function is_field_okay(field_name,btype_id){let btype=get5(btype_id);if(field_name===RANDOM_SORTING)return!0;let option_set=btype.option_set();if(option_set!=null&&option_set.exists())return!!(field_name==="display"||option_set.attribute(field_name).exists());let custom_type2=btype.custom_type();return[ALL_DB_FIELDS,UNIQUE_ID].includes(field_name)||custom_type2!=null&&custom_type2.exists()&&(field_name==="email"&&custom_type2.id()==="user"||custom_type2.field(field_name).exists()||get_special_fields(custom_type2).map(field=>field.name()).includes(field_name))||btype_id.startsWith("api")&&btype.plugin.get_message_names().includes(field_name)||btype.is_aggregate()?!0:(warn("bad field name in search",{field_name,btype_id}),!1)}function get_sorts_list(properties,db_fields_only){let list4=[],btype=get5(properties.type_to_find),custom_type2=btype.custom_type(),boolean_btype=get5("boolean");if(btype.is_missing())return[{sort_field:get_actual_sort_field(properties,properties.type_to_find,db_fields_only),descending:boolean_btype.cast(properties.descending)}];function process_item(item){let sort_field=get_actual_sort_field(item,properties.type_to_find,db_fields_only),descending=boolean_btype.cast(item.descending);return custom_type2!=null&&custom_type2.exists()&&custom_type2.field(sort_field).btype()==="geographic_address"?ensure_valid_location(item.geo_reference)?sort_field={location_field:sort_field,geo_reference:item.geo_reference}:sort_field=null:sort_field&&!is_field_okay(sort_field,properties.type_to_find)?(sort_field=null,descending=null):(sort_field===RANDOM_SORTING||[null,void 0].includes(sort_field))&&(descending=null),{sort_field,descending}}if(list4.push(process_item(properties)),properties.sort_field===RANDOM_SORTING)return list4;for(let item of object_values(properties.additional_sort_fields))list4.push(process_item(item));return list4}function get_actual_sort_field(properties,type_to_find,db_fields_only){if(properties.sort_field!==DYNAMIC_SORTING_FIELD)return properties.sort_field;if(!properties.dynamic_sort_field)return null;let btype=get5(type_to_find);if(btype.is_missing())return null;let to_find=properties.dynamic_sort_field.toLowerCase(),fields=[];if(db_fields_only){let custom_type2=btype.custom_type();for(let field of custom_type2.fields())fields.push({display:field.display(),name:field.name(),btype:field.btype()});fields.push({display:"Created Date",name:"Created Date",btype:"date"}),fields.push({display:"Modified Date",name:"Modified Date",btype:"date"}),fields.push({display:"Slug",name:"Slug",btype:"text"})}else{let messages=btype.get_messages();for(let message of messages)(message==null?void 0:message.arg_btype())==null&&fields.push({display:message.description(void 0,!0),name:message.name(),btype:message.ret_btype_id()});to_find==="created date"&&(to_find="creation date")}let sortable_btypes=_get_sortable_btypes(db_fields_only);for(let field of fields)if(field.display.toLowerCase()===to_find){if(!sortable_btypes.includes(field.btype))throw new OwnerError("The dynamic sort field "+properties.dynamic_sort_field+" on the type "+btype.display()+" cannot be used for sorting");return field.name}throw new OwnerError("Dynamic sort field not recognized",{display:"The dynamic sort field "+properties.dynamic_sort_field+" is not recognized as a field on the type "+btype.display()})}function convert_api_call_to_db_object(result,call){let val=get5(call.btype_id);if(!val.plugin.convert_to_bubble_instance)throw new UnexpectedError("value "+val.id()+" missing convert_to_bubble_instance",{btype_id:val.id(),appname:appquery_default.appname(),result});if(call.is_list){let raw_array=array_from(result!=null?result:[]).map(a=>val.plugin.convert_to_bubble_instance(a));return lib_default().db_instance().static_list(call.btype_id,raw_array)}return val.plugin.convert_to_bubble_instance(result)}function get_key_value(key_name,to_find_name){let to_find_value=to_find_name?get5(to_find_name):null,key_value,key_value_delisted;if(key_name==="email"&&to_find_name==="user")key_value="email";else if([ALL_DB_FIELDS,ADVANCED_SEARCH_CONSTRAINT,UNIQUE_ID,"StripeCustomerID"].includes(key_name))key_value=key_name;else{var _key_value;key_value=sub_node_key_to_btype(to_find_value,key_name),key_value_delisted=(_key_value=key_value)!=null&&_key_value.is_list()?key_value.inner():key_value}return{key_value_delisted,key_value}}var import_web_dom_collections_iterator142,resolve_constraints,constraints_without_values,init_core_ds_db_ops_utilities=__esm({"lib-browser/core/core_datasources/utilities/core_ds_db_ops_utilities.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator142=__toESM(require_web_dom_collections_iterator());init_errors();init_logger();init_decaf();init_constraint_defs();init_btypes();init_special_keys();init_b_location();init_lodash();init_appquery();init_lib();init_builtins();init_generic_actions_utilities();resolve_constraints=(constraints,null_not_dropped)=>compact_default(map_default(constraints!=null?constraints:{},entry=>error_append_args({entry},()=>{if(!entry)return;if(entry.key===ADVANCED_SEARCH_CONSTRAINT)return entry;if(entry.key===UNIQUE_ID){var _entry$constraint_typ;(_entry$constraint_typ=entry.constraint_type)!=null||(entry.constraint_type="equals")}return entry.constraint_type?get6(entry.constraint_type).resolve_constraint({entry,null_not_dropped}):void 0})));constraints_without_values=all().filter(c=>c.takes_no_value()).map(c=>c.name)}});function make_call_fn(call){return function(a,b,properties,_raw3,context){if(b)throw new UnexpectedError("external.js make_call_fn - This line should be unreachable");if(!a)return this.ret_btype_null();if(call.is_authenticated()){let result=call.execute(a,properties,null,_raw3,context);return convert_api_call_to_db_object(result,call)}}}var init_make_call_fn=__esm({"lib-browser/external/make_call_fn.js"(){"use strict";init_define_process_env();init_shim();init_errors();init_core_ds_db_ops_utilities()}});function generate_call_message(message_definition){var _message_definition$c;let[plugin_name,call_name]=message_definition.call.split("."),call=get_plugin(plugin_name).get_call(call_name),caption=(_message_definition$c=message_definition.caption)!=null?_message_definition$c:toTitleCase(call_name),data={ret_btype:call.get_btype_id(),fn:make_call_fn(call)};if(call.field_names){var _call$description_for;data.field_names=call.field_names}return data.section="Data Fields",data}var import_web_dom_collections_iterator143,ExternalValue,init_ExternalValue=__esm({"lib-browser/external/ExternalValue.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator143=__toESM(require_web_dom_collections_iterator());init_b_array();init_b_fiber();init_b_object();init_b_string();init_incremental();init_btypes();init_plugin_getter();init_postgres_constraints();init_list_utilities();init_lib();init_external_values();init_make_call_fn();ExternalValue=class{_fields(){if(typeof this.fields=="function"){var _this$fields;return(_this$fields=this.fields())!=null?_this$fields:{}}else{var _this$fields2;return(_this$fields2=this.fields)!=null?_this$fields2:{}}}is_missing(){return!1}flatten_raw(raw){if(!raw)return{};let result={};for(let[key,key_data]of Object.entries(this._fields())){optional_pause_tick(20);let val;if(key_data.extract)val=key_data.extract(raw);else if(key_data.no_key)val=raw;else{var _key_data$path;let path=(_key_data$path=key_data.path)!=null?_key_data$path:[key];val=extract_from_object(raw,path)}if(key_data.post_call_processing&&(val=key_data.post_call_processing(val,raw)),key_data.cast_on_fetch&&val!=null){var _ref,_key_data$ret_btype;val=get5((_ref=(_key_data$ret_btype=key_data.ret_btype)!=null?_key_data$ret_btype:key_data.ret_value)!=null?_ref:"text").cast(val)}val!=null&&(result[key]=val)}return optional_pause("finished flatten raw"),result}get_bubble_null(){return null}export_to_string(){return"(Data from an API)"}debugging_display(){return"(Data from an API)"}get_message_names(options){var _options;(_options=options)!=null||(options={});let field_names=Object.keys(this._fields());return options.exclude_special_messages||field_names.push(...Object.keys(this.get_special_messages())),unique(field_names)}get_message(name){let message_definition=this._fields()[name],special_messages={};if(!(!message_definition&&(special_messages=this.get_special_messages(),message_definition=special_messages[name],message_definition==null)))return message_definition.call?generate_call_message(message_definition):special_messages[name]?message_definition:this.get_basic_message(name,message_definition)}get_basic_message(name,message_definition){var _message_definition$c2,_ref2,_message_definition$r;return{description:"'s "+((_message_definition$c2=message_definition.caption)!=null?_message_definition$c2:toTitleCase(name)),ret_btype:(_ref2=(_message_definition$r=message_definition.ret_btype)!=null?_message_definition$r:message_definition.ret_value)!=null?_ref2:"text",fields:message_definition.fields,field_names:message_definition.field_names,spot_data:message_definition.spot_data,section:"Data Fields",description_for_sliding_palette:message_definition.description_for_sliding_palette}}get_special_messages(){return this.no_special_messages?{}:{bubble_is_empty:{description:" is empty",section:"Operators",ret_btype:"sys.bool",fn(a,b){var _a$data,_a$data$_id,_a$data$_id$endsWith;let empty_struct_except_for_id=lib_default().bubble_version()>=24&&(a==null||(_a$data=a.data)==null||(_a$data$_id=_a$data._id)==null||(_a$data$_id$endsWith=_a$data$_id.endsWith)==null?void 0:_a$data$_id$endsWith.call(_a$data$_id,EMPTY_RAW_STRUCT_ID_ENDING));return a==null||a===""||empty_struct_except_for_id},build_pg_constraint:is_empty2},bubble_is_not_empty:{description:" is not empty",section:"Operators",ret_btype:"sys.bool",fn(a,b){var _a$data2,_a$data2$_id,_a$data2$_id$endsWith;let empty_struct_except_for_id=lib_default().bubble_version()>=24&&(a==null||(_a$data2=a.data)==null||(_a$data2$_id=_a$data2._id)==null||(_a$data2$_id$endsWith=_a$data2$_id.endsWith)==null?void 0:_a$data2$_id$endsWith.call(_a$data2$_id,EMPTY_RAW_STRUCT_ID_ENDING));return a!=null&&a!==""&&!empty_struct_except_for_id},build_pg_constraint:is_not_empty},is_contained_by_list:build_is_contained_by_list(this.full_name),is_not_contained_by_list:build_is_not_contained_by_list(this.full_name)}}}}});var import_web_dom_collections_iterator144,StructValue,init_StructValue=__esm({"lib-browser/external/StructValue.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator144=__toESM(require_web_dom_collections_iterator());init_hash();init_sample();init_btypes();init_StaticObject();init_StaticList();init_Dynamic();init_ExternalValue();init_lib();init_external_values();StructValue=class _StructValue extends ExternalValue{constructor(human,fields,options){var _options;super(),(_options=options)!=null||(options={}),this.human=human,this.fields=fields,this.fields||(this.fields={},this.no_extract=!0),Object.assign(this,{storable:!0,bindable:!0,is_lookup:!0},options)}display(){return this.human}editable(){return!1}short_id(){return this.name}debugging_display(val){return`(Data with ID "${val==null?void 0:val._id()}" from an API)`}equals(a,b){return(a==null?void 0:a._id())===(b==null?void 0:b._id())}get_sample(){return new SampleObject(this.full_name)}cast(val){return val instanceof Dynamic_default?val:typeof val=="object"&&val!=null?new StaticObject(val,null,this.full_name):null}get_basic_message(){return Object.assign(super.get_basic_message(...arguments),{is_lookup:!0})}extract(raw){if(this.no_extract||typeof raw==="string")return raw;let result=this.flatten_raw(raw);return result._id||(result._id=incremental_digest(result),lib_default().bubble_version()>=24&&!raw&&(result._id+=EMPTY_RAW_STRUCT_ID_ENDING)),result}convert_to_bubble_instance(js_obj){if(Array.isArray(js_obj)){let sub_btype=get5(this.full_name);if(sub_btype.plugin.convert_to_bubble_instance){let converted=js_obj.map(inner=>sub_btype.plugin.convert_to_bubble_instance(inner));return new StaticList_default(converted,void 0,this.full_name)}else return new StaticList_default(js_obj,void 0,this.full_name)}else if(js_obj!=null&&typeof js_obj=="object"){let res={};for(let[key,key_data]of Object.entries(this._fields())){let sub_btype=get5(key_data.ret_btype);if(sub_btype.is_list()){let inner_val=sub_btype.inner();inner_val.plugin instanceof _StructValue?res[key]=inner_val.plugin.convert_to_bubble_instance(js_obj[key]):res[key]=sub_btype.cast(js_obj[key])}else{var _sub_btype$plugin$con,_sub_btype$plugin$con2,_sub_btype$plugin;res[key]=(_sub_btype$plugin$con=(_sub_btype$plugin$con2=(_sub_btype$plugin=sub_btype.plugin).convert_to_bubble_instance)==null?void 0:_sub_btype$plugin$con2.call(_sub_btype$plugin,js_obj[key]))!=null?_sub_btype$plugin$con:js_obj[key]}}return res._id=js_obj._id,new StaticObject(res,void 0,this.full_name)}else return this.cast(js_obj)}get_JS_object(raw){if(raw==null)return null;raw.raw!=null&&(raw=raw.raw());let result_object={};for(let message_name of this.get_message_names({exclude_special_messages:!0})){let message=this.get_message(message_name);result_object[message_name]=get5(message.ret_btype).get_JS_object(raw[message_name])}return result_object}JS_to_bubble(raw){let result_object={};for(let message_name of this.get_message_names({exclude_special_messages:!0})){let message=this.get_message(message_name);result_object[message_name]=get5(message.ret_btype).JS_to_bubble(raw[message_name])}return new StaticObject(result_object,void 0,this.full_name)}}}});var import_web_dom_collections_iterator145,import_es_string_replace30,APIConnectorStructValue,init_APIConnectorStructValue=__esm({"lib-browser/apiconnectorbase/APIConnectorStructValue.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator145=__toESM(require_web_dom_collections_iterator()),import_es_string_replace30=__toESM(require_es_string_replace());init_u2();init_logger();init_b_fiber();init_incremental();init_btypes();init_btype_ids();init_StructValue();init_StaticObject();init_StaticList();init_apiconnectorbase();APIConnectorStructValue=class _APIConnectorStructValue extends StructValue{constructor(human,fields,options,key_prefix){var _options;(_options=options)!=null||(options={});let fields_with_raw=Object.assign(fields,{body_raw_text:{extract(raw){return incremental_json_stringify(raw.body)},caption:"raw body text",ret_btype:"text"}});super(human,fields_with_raw,options),this.key_prefix=key_prefix}get_message_names(){var _this$_fields;return Object.entries((_this$_fields=this._fields())!=null?_this$_fields:{}).filter(_ref=>{let[field,field_data]=_ref;return field_data.ret_btype!==IGNORE_FIELD}).map(_ref2=>{let[field]=_ref2;return field})}flatten_raw(raw){if(!raw)return{};let result={},object2=this._fields();for(let key in object2){let key_data=object2[key];optional_pause_tick(20,`flatten raw call field key (${key})`);let val;if(key_data.extract)val=key_data.extract(raw);else if(key_data.no_key)val=raw;else{var _key_data$path;let path=(_key_data$path=key_data.path)!=null?_key_data$path:[key.replace(this.key_prefix,"")];val=extract_from_object(raw,path)}if(key_data.post_call_processing&&(val=key_data.post_call_processing(val,raw)),val!=null&&typeof val!="function"){if(key_data.ret_btype){let sub_btype=get5(key_data.ret_btype);if(is_list(key_data.ret_btype)&&Array.isArray(val)){let inner_val=sub_btype.inner();if(inner_val.is_missing())throw new OwnerError("Issue with call",{display:"Issue with the call "+this.human+". Please initialize it again"});val=val.map(a=>{var _inner_val$plugin$ext,_inner_val$plugin$ext2,_inner_val$plugin;return(_inner_val$plugin$ext=(_inner_val$plugin$ext2=(_inner_val$plugin=inner_val.plugin).extract)==null?void 0:_inner_val$plugin$ext2.call(_inner_val$plugin,a))!=null?_inner_val$plugin$ext:a})}else{var _sub_btype$plugin$ext,_sub_btype$plugin$ext2,_sub_btype$plugin;if(sub_btype.is_missing())throw new OwnerError("Issue with call",{display:"Issue with the call "+this.human+". Please initialize it again"});val=(_sub_btype$plugin$ext=(_sub_btype$plugin$ext2=(_sub_btype$plugin=sub_btype.plugin).extract)==null?void 0:_sub_btype$plugin$ext2.call(_sub_btype$plugin,val))!=null?_sub_btype$plugin$ext:val}}result[key]=val}}return optional_pause("finished flatten raw"),result}convert_to_bubble_instance(result){let res,sub_btype;if(Array.isArray(result))if(res=[],sub_btype=get5(this.full_name),sub_btype.plugin.convert_to_bubble_instance){for(let r2 of result)res.push(sub_btype.plugin.convert_to_bubble_instance(r2));return new StaticList_default(res,void 0,this.full_name)}else return new StaticList_default(result,void 0,this.full_name);else if(result!=null&&typeof result=="object"){res={};let object2=this._fields();for(let key in object2){let key_data=object2[key];if(sub_btype=get5(key_data.ret_btype),is_list(key_data.ret_btype)&&Array.isArray(result[key])){let inner_val=sub_btype.inner();inner_val.plugin instanceof _APIConnectorStructValue?res[key]=inner_val.plugin.convert_to_bubble_instance(result[key]):res[key]=sub_btype.cast(result[key])}else{var _sub_btype$plugin$con,_sub_btype$plugin$con2,_sub_btype$plugin2;sub_btype.is_missing()&&owner_error("Missing API connector response type data",{display:`Cannot properly interpret response from API call ${this.human}, please reinitialize the call`}),res[key]=(_sub_btype$plugin$con=(_sub_btype$plugin$con2=(_sub_btype$plugin2=sub_btype.plugin).convert_to_bubble_instance)==null?void 0:_sub_btype$plugin$con2.call(_sub_btype$plugin2,result[key]))!=null?_sub_btype$plugin$con:result[key]}}return res._id=result._id,new StaticObject(res,void 0,this.full_name)}else return result}export_to_string(){return"(data from API connector)"}}}});function get_btypes_from_call(api_id,api_data,vals,key_prefix){for(let _ in api_data.calls){let call_data=api_data.calls[_];for(let val_name in call_data.types){let val_data=call_data.types[val_name];for(let k in val_data.fields){var _field$ret_btype;let field=val_data.fields[k];if((_field$ret_btype=field.ret_btype)!=null||(field.ret_btype=field.ret_value),[null,void 0,IGNORE_FIELD].includes(field.ret_btype))delete val_data.fields[k];else{let is_unix;field.ret_btype==="date_unix"&&(is_unix=!0,field.ret_btype="date"),field.post_call_processing=function(obj){let ret_btype;return field.ret_btype==="geographic_address"?(ret_btype=get5(field.ret_btype),ret_btype.plugin.cast(obj)):field.ret_btype==="date"?(is_unix?typeof obj=="number"&&(obj=obj*1e3):typeof obj=="number"&&String(obj).length<10&&(obj=obj*1e3),ret_btype=get5(field.ret_btype),ret_btype.plugin.cast(obj)):obj}}}vals[val_name]=new APIConnectorStructValue(val_data.caption,val_data.fields,{storable:!0},key_prefix)}}}var init_call_btypes=__esm({"lib-browser/apiconnectorbase/call_btypes.js"(){"use strict";init_define_process_env();init_shim();init_btypes();init_apiconnectorbase();init_APIConnectorStructValue()}});function _applyDecoratedDescriptor9(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var import_web_dom_collections_iterator146,_dec10,_class57,APIEventObject,init_APIEventObject=__esm({"lib-browser/lang/workflow/APIEventObject.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator146=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_caching();init_appquery();init_call_btypes();init_btype_ids();init_GenericEvent();init_btypes();APIEventObject=(_dec10=cached({type:AUTORUN}),_class57=class extends GenericEvent{owner(){return nodes_default.create(nodes_default.API_WORKFLOWS,this.json.parent())}is_api_event(){return!0}get_custom_parameters(){if(this.type()!=="APIEvent")return super.get_custom_parameters();let is_get=this.get_static_property("trigger_option")==="get"&&this.get_static_property("expose");if(this.get_static_property("parameter_def")==="auto"&&!is_get){var _this$get_static_prop;let{is_list:is_list2}=json_parse((_this$get_static_prop=this.get_static_property("data_type"))!=null?_this$get_static_prop:"{}"),base_id="api_wf_data."+this.id();return[{param_id:"_wf_request_data",param_name:"_wf_request_data",btype_id:is_list2?list_type(base_id):base_id}]}else{var _param_node$entries,_param_node$entries2;let param_node=this.property("parameters");return((_param_node$entries=(_param_node$entries2=param_node.entries)==null?void 0:_param_node$entries2.call(param_node))!=null?_param_node$entries:[]).map((entry,i)=>{var _entry$get_static_pro,_entry$get_static_pro2;return{param_id:(_entry$get_static_pro=entry.get_static_property("key"))!=null?_entry$get_static_pro:`[Missing key: ${i}]`,param_name:(_entry$get_static_pro2=entry.get_static_property("key"))!=null?_entry$get_static_pro2:`[Missing key: ${i}]`,optional:entry.get_static_property("optional"),btype_id:entry.get_static_property("is_list")?list_type(entry.get_static_property("value")):entry.get_static_property("value"),in_url:is_get||entry.get_static_property("in_url")}})}}is_exposed(){return this.get_static_property("expose")}creates_session(){return this.actions("SignUp").length>0||this.actions("LogIn").length>0}return_data_actions(){return this.actions("APIReturnData")}wf_name(preserve_capitalization){if(preserve_capitalization){var _this$get_static_prop2;return(_this$get_static_prop2=this.get_static_property("wf_name"))==null?void 0:_this$get_static_prop2.trim()}else{var _this$get_static_prop3;return(_this$get_static_prop3=this.get_static_property("wf_name"))==null?void 0:_this$get_static_prop3.toLowerCase().trim()}}get_btype(){let res={};if(this.get_static_property("parameter_def")==="auto"){var _this$get_static_prop4;let fake_api={calls:{}},{types}=json_parse((_this$get_static_prop4=this.get_static_property("data_type"))!=null?_this$get_static_prop4:"{}");fake_api.calls[this.id()]={types},get_btypes_from_call("api_event",fake_api,res,"_wf_");for(let value_name in res){let value=res[value_name];value.name=value_name,value.full_name="api_wf_data."+value_name}}return res}},_applyDecoratedDescriptor9(_class57.prototype,"get_btype",[_dec10],Object.getOwnPropertyDescriptor(_class57.prototype,"get_btype"),_class57.prototype),_class57)}});function missing_action(type){return{field_names:{},fields:()=>[],display:()=>"[missing: "+type+"]"}}var import_web_dom_collections_iterator147,Action,init_Action=__esm({"lib-browser/lang/workflow/Action.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator147=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_btypes();init_appquery();init_lib();init_plugin_getter();init_migrations();init_apm();init_WorkflowObject();init_workflow_utils();Action=class extends WorkflowObject{constructor(json){var _this$A,_this$A$field_names;json=json.to_id(),super(json);let type=this.type();if(is_edit_mode()&&get_migration_fn(lib_default().plugin_prefixes.action+type)(this.json),type&&(this.A=lib_default().load_plugin(lib_default().plugin_prefixes.action+type,!0)),(_this$A=this.A)!=null||(this.A=missing_action(type)),!this.A.field_names)throw new UnexpectedError("Missing field names for "+type);this._field_names=(_this$A$field_names=this.A.field_names)!=null?_this$A$field_names:{},typeof this._field_names=="object"&&(this._field_names.condition={})}is_action(){return!0}check_use_visible(){return this.A.check_use_visible}is_mergeable(){return this.A.is_mergeable}can_server_side_redirect(){var _this$A$can_redirect,_this$A2;return(_this$A$can_redirect=(_this$A2=this.A).can_redirect)==null?void 0:_this$A$can_redirect.call(_this$A2,this)}server_side_redirect(context){return this.A.server_side_redirect(this,context)}find_expressions(filter){return nodes_default.from_raw_array(this.json,nodes_default.new_expression,find_my_expressions(nodes_default.to_raw(this),filter))}safe_to_send(){return!this.A.do_not_send_result_to_client}safe_to_log(){return!this.A.do_not_log_result}return_btype(){var _this$A$return_btype,_this$A$return_btype2,_this$A3;let btype_id=(_this$A$return_btype=(_this$A$return_btype2=(_this$A3=this.A).return_btype)==null?void 0:_this$A$return_btype2.call(_this$A3,this))!=null?_this$A$return_btype:"null";return get5(btype_id)}_custom_event_actions_requires(type,_seen_events){if(!["TriggerCustomEvent","TriggerCustomEventFromReusable"].includes(this.type()))return!1;let custom_event=appquery_default.event(this.get_static_property("custom_event"));return!custom_event||!custom_event.exists()||_seen_events[custom_event.id()]?!1:(_seen_events[custom_event.id()]=!0,custom_event.actions().some(action=>action["requires_"+type](_seen_events)))}requires_server(){let _seen_events=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof this.A.requires_server=="function"?this.A.requires_server():this.A.server_method?!0:this._custom_event_actions_requires("server",_seen_events)}requires_cookies(){let _seen_events=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.A.requires_cookies?!0:this._custom_event_actions_requires("cookies",_seen_events)}server_method(){return this.A.server_method}terminate_server_workflow(){var _this$A$terminate_ser;return(_this$A$terminate_ser=this.A.terminate_server_workflow)!=null?_this$A$terminate_ser:this.A.server_method_resume!=null}server_method_resume(){return this.A.server_method_resume}display(verb_only){let name=this.get_name();return name&&typeof name=="string"?name:this.A.display(this,verb_only)}use_injected_datasource(node){return this.A.use_injected_datasource?this.A.use_injected_datasource(this,node):[!1,!0]}get_injected_btype(node){var _this$A$get_injected_,_this$A4;return(_this$A$get_injected_=(_this$A4=this.A).get_injected_btype)==null?void 0:_this$A$get_injected_.call(_this$A4,this,node)}get_injected_display(node){var _this$A$get_injected_2,_this$A5;return(_this$A$get_injected_2=(_this$A5=this.A).get_injected_display)==null?void 0:_this$A$get_injected_2.call(_this$A5,this,node)}next(){var _this$json$parent;let idx=parseInt(this.json.name()),json=(_this$json$parent=this.json.parent())==null?void 0:_this$json$parent.child(idx+1);return json!=null&&json.exists()?nodes_default.new_workflow_item(json):null}all_next(filter){let idx=parseInt(this.json.name());if(!this.json.parent())return[];let workflow_items=this.json.parent().children().slice(idx+1).map(json=>nodes_default.new_workflow_item(json));return nodes_default.filter_array(filter,workflow_items)}get_next_json(){var _this$json$parent2;let idx=parseInt(this.json.name());return(_this$json$parent2=this.json.parent())==null?void 0:_this$json$parent2.child(idx+1)}previous(){var _this$json$parent3;let idx=parseInt(this.json.name());if(idx===0)return this.event();let json=(_this$json$parent3=this.json.parent())==null?void 0:_this$json$parent3.child(idx-1);return json!=null&&json.exists()?nodes_default.new_workflow_item(json):null}event(){var _this$json$parent4;return nodes_default.new_workflow_item((_this$json$parent4=this.json.parent())==null?void 0:_this$json$parent4.parent())}context_element(){var _this$event;return(_this$event=this.event())==null?void 0:_this$event.context_element()}field_names(){return this._field_names}get_data_to_refresh(properties,context){if(this.A.data_to_refresh&&properties.condition)return this.A.data_to_refresh(this,properties,context.element)}preprocess_properties(properties,context){return this.A.preprocess_properties?traceSpan("preprocess action properties",{"workflow.action.id":this.id(),"workflow.action.type":this.type()},()=>this.A.preprocess_properties(properties,this,context)):properties}can_fall_back_to_server(){return this.A.fall_back_to_server}does_fall_back_to_server(){return this.A.fall_back_to_server&&this.requires_server()}needs_clientside_properties(){return this.A.run||this.A.data_to_refresh}run(context,properties_promise,cb){if(!this.A.run){cb();return}properties_promise.callback((err,data)=>{if(err){this.does_fall_back_to_server()?context.get_server_outcome(this,cb):cb(err);return}try{return context.page_context_id<lib_default().workflow.page_context_id?cb():data.condition||this.A.handle_condition_internally?this.A.run(this,data,context,cb):cb()}catch(error2){return cb(error2)}})}resume(context,cb){if(this.A.resume)try{return this.A.resume(this,context,cb)}catch(err){return cb(err)}else return cb()}delete(options){var _options$parent_chang,_options$parent_chang2;if(!this.exists())return;let data=this.json.raw(),change=((_options$parent_chang=options==null||(_options$parent_chang2=options.parent_change)==null?void 0:_options$parent_chang2.add_change.bind(options.parent_change))!=null?_options$parent_chang:lib_default().changes.create_change)("RemoveAction",{parent_id:this.previous().id(),id:this.id(),data,intent_details:{user_interaction:"Direct Action Delete",user_action:options==null?void 0:options.user_action,parent_user_action:options==null?void 0:options.parent_user_action,parent_id:options==null?void 0:options.parent_id}});change==null||change.execute()}}}});var workflow_exports2={};__export(workflow_exports2,{event_find_expressions:()=>event_find_expressions2,get_api_event:()=>get_api_event});function new_workflow_item2(json){var _json$parent,_json$parent2;return json?((_json$parent=json.parent())==null?void 0:_json$parent.name())==="workflows"?new Event_default(json):((_json$parent2=json.parent())==null?void 0:_json$parent2.name())==="api"?new APIEventObject(json):new Action(json):null}function new_event2(json){var _json$parent3,_json$parent4;return json?((_json$parent3=json.parent())==null?void 0:_json$parent3.name())==="workflows"?new Event_default(json):((_json$parent4=json.parent())==null?void 0:_json$parent4.name())==="api"?new APIEventObject(json):null:null}function new_action2(json){var _json$parent5;return!json||["workflows","api"].includes((_json$parent5=json.parent())==null?void 0:_json$parent5.name())?null:new Action(json)}function get_api_event(endpoint_name){var _id;let id=lib_default().derived("APIWFByName",!0).content()[endpoint_name];if((_id=id)!=null||(id=lib_default().derived("APIWFByName").content()[endpoint_name]),id){var _evt$is_api_event;let evt=appquery_default.event(id);if((_evt$is_api_event=evt.is_api_event)!=null&&_evt$is_api_event.call(evt))return evt}return null}var event_find_expressions2,init_workflow2=__esm({"lib-browser/lang/workflow/index.js"(){"use strict";init_define_process_env();init_shim();init_nodes();init_lib();init_appquery();init_WorkflowObject();init_GenericEvent();init_Event();init_APIEventObject();init_Action();init_workflow_utils();nodes_default.add(nodes_default.WORKFLOW_OBJECT,WorkflowObject);nodes_default.add(nodes_default.GENERIC_EVENT,GenericEvent);nodes_default.add(nodes_default.EVENT,Event_default);nodes_default.add(nodes_default.API_EVENT_OBJECT,APIEventObject);nodes_default.add(nodes_default.ACTION,Action);nodes_default.add_generic("workflow_item",new_workflow_item2);nodes_default.add_generic("event",new_event2);nodes_default.add_generic("action",new_action2);event_find_expressions2=event_find_expressions}});function new_element2(json,fake){let type=json.child("type").get();return type==="Page"?new Page(json):type==="CustomDefinition"?new CustomDefinition(json):GLOBAL_ELEMENTS.includes(type)?new GlobalElement(json):new Element2(json,fake)}var elements,STATE_NOT_READY2,add_layout_resizing_key2,perform_animate_in2,transition_fns2,elements_default,init_elements2=__esm({"lib-browser/lang/elements/index.js"(){"use strict";init_define_process_env();init_shim();init_nodes();init_elements_utils();init_elements_state();init_ElementInstance();init_ServerElementInstance();init_State();init_Transition();init_GenericElement();init_Element();init_Style();init_StyleState();init_CustomState();init_Root();init_Page();init_CustomDefinition();init_GlobalElement();init_elements();init_db2();init_workflow2();init_expressions();nodes_default.add(nodes_default.STATE,State);nodes_default.add(nodes_default.TRANSITION,Transition2);nodes_default.add(nodes_default.GENERIC_ELEMENT,GenericElement);nodes_default.add(nodes_default.ELEMENT,Element2);nodes_default.add(nodes_default.STYLE,Style2);nodes_default.add(nodes_default.STYLE_STATE,StyleState);nodes_default.add(nodes_default.CUSTOM_STATE,CustomState);nodes_default.add(nodes_default.ROOT,Root);nodes_default.add(nodes_default.PAGE,Page);nodes_default.add(nodes_default.CUSTOM_DEFINITION,CustomDefinition);nodes_default.add(nodes_default.GLOBAL_ELEMENT,GlobalElement);nodes_default.add_generic("element",(json,fake)=>json.smart_cache("element",new_element2,fake));elements={};elements.ElementInstance=(element,mode)=>new ElementInstance_default(element,mode);elements.ServerElementInstance=element=>new ServerElementInstance(element);STATE_NOT_READY2=STATE_NOT_READY,add_layout_resizing_key2=add_layout_resizing_key,perform_animate_in2=perform_animate_in;for(let k in ElementInstance_default.modes){let v=ElementInstance_default.modes[k];elements[k]=v}transition_fns2=Transition2.transition_fns;db_default.ElementInstance=ElementInstance_default;elements_default=elements}});function handleMutations(mutations){for(let mutation of mutations){let io=intersectionObservers.get(mutation.target);io!=null&&(mutation.removedNodes.forEach(n=>{n instanceof Element&&io.unobserve(n)}),mutation.addedNodes.forEach(n=>{n instanceof Element&&io.observe(n)}))}}function watchClip(element,cb){if(typeof MutationObserver<"u"&&typeof IntersectionObserver<"u"){var _mutationObserver;if(intersectionObservers.has(element))return;let io=new IntersectionObserver((entries,observer2)=>{entries.some(entry=>entry.boundingClientRect.height>0&&entry.intersectionRatio<1)&&(observer2.disconnect(),intersectionObservers.delete(element),cb())},{root:element,threshold:[0,1]});intersectionObservers.set(element,io),element.childNodes.forEach(child=>{child instanceof Element&&io.observe(child)}),(_mutationObserver=mutationObserver)!=null||(mutationObserver=new MutationObserver(handleMutations)),mutationObserver.observe(element,{childList:!0})}else cb()}function unwatchClip(element){var _intersectionObserver;(_intersectionObserver=intersectionObservers.get(element))==null||_intersectionObserver.disconnect(),intersectionObservers.delete(element)}var import_web_dom_collections_iterator148,intersectionObservers,mutationObserver,init_clipping=__esm({"lib-browser/core/core_elements/shared/clipping.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator148=__toESM(require_web_dom_collections_iterator()),intersectionObservers=new WeakMap}});function apply_dotdotdot(instance4,wrap2){let canvas=instance4.get_canvas();if(instance4.thumbnail_mode()){canvas.css("overflow","hidden");return}function apply_dotdotdot3(){canvas.dotdotdot({wrap:wrap2,callback:(isTruncated,orgContent)=>{instance4.setTimeout(()=>{u_exports2.run_once(30,()=>{var _instance$canvas,_instance$canvas$text;if(!instance4.is_destroyed())return instance4.canvas.text().trim()===""&&instance4.canvas.append(" "),instance4.edit_mode()&&orgContent.length!==0&&((_instance$canvas=instance4.canvas)==null||(_instance$canvas$text=_instance$canvas.text)==null?void 0:_instance$canvas$text.call(_instance$canvas))&&instance4.canvas.text().trim()===""&&evaluate_property(instance4,"text")!==""},(err,add_placeholder)=>{if(err){log(err);return}if(add_placeholder){let dot_placeholder=div("dots-placeholder",canvas);dot_placeholder.css({"line-height":0,"font-size":20,"text-align":instance4.get_static_property("font_alignment",!0)}),dot_placeholder.text("............")}})},1)}})}instance4.setTimeout(()=>{instance4.run_mode()?watchClip(canvas[0],()=>{apply_dotdotdot3()}):apply_dotdotdot3()},1),instance4.autorun(()=>{var _canvas$trigger;for(let prop of["font_size","font_family","font_weight","padding_vertical","line_height","word_spacing","letter_spacing","fit_width","fit_height","min_width_css","max_width_css","min_height_css","max_height_css","single_width","single_height"])evaluate_property(instance4,prop);(_canvas$trigger=canvas.trigger)==null||_canvas$trigger.call(canvas,"update.dot")}),dotdotdot_observer!=null?(dotdotdot_observer.observe(canvas[0]),instance4.autorun(()=>{var _instance$canvas$trig,_instance$canvas2;instance4.parent().current_width(),(_instance$canvas$trig=(_instance$canvas2=instance4.canvas).trigger)==null||_instance$canvas$trig.call(_instance$canvas2,"update.dot")})):canvas.css("overflow","hidden")}function remove_dotdotdot(instance4){if(instance4.canvas!=="destroyed"){var _instance$canvas$trig2,_instance$canvas3,_dotdotdot_observer;(_instance$canvas$trig2=(_instance$canvas3=instance4.canvas).trigger)==null||_instance$canvas$trig2.call(_instance$canvas3,"destroy.dot"),unwatchClip(instance4.canvas[0]),(_dotdotdot_observer=dotdotdot_observer)==null||_dotdotdot_observer.unobserve(instance4.canvas[0])}}function could_clip(instance4){var _instance$element$par;if(max_height_css(instance4)!=null)return!0;if(((_instance$element$par=instance4.element.parent())==null?void 0:_instance$element$par.container_layout())==="row"){if(evaluate_property(instance4,"vert_alignment")!=="stretch")return!1}else if(instance4.element.fit_height())return!1;return!0}function apply_text(instance4,div2,props){function wrap_html(html){return instance4.element.is_responsive_v1()&&(props.vertical_centering||instance4.run_mode()&&could_clip(instance4))?`<div>${html}</div>`:html}let is_pre_wrap=appquery_default.get_public_setting("bubble_version")>=10,canvas=instance4.get_canvas(),recognize_links=instance4.get_static_property("recognize_links"),no_bbcode=instance4.get_static_property("no_bbcode"),text2;if(instance4.run_mode()||!props.editor_preview_text||!props.text||instance4.element.property("text").is_static()?text2=props.text:text2=props.editor_preview_text,no_bbcode)if(has_bbcode(text2)){if(instance4.element.is_responsive_v1()&&could_clip(instance4)){var _div$trigger;let inner_div=div("");inner_div.text(text2),div2.append(inner_div),(_div$trigger=div2.trigger)==null||_div$trigger.call(div2,"update.dot")}else div2.text(text2);property_applications_default.apply_css_style(canvas,{"white-space":"pre-wrap"})}else{let formatted_text;recognize_links?formatted_text=bbcode_to_html(replace_links_emails(instance4,props),is_pre_wrap):formatted_text=bbcode_to_html(text2,is_pre_wrap),div2.html(wrap_html(formatted_text))}else recognize_links&&(text2=replace_links_emails(instance4,props)),div2.html(wrap_html(bbcode_to_html(text2,is_pre_wrap)))}function replace_links_emails(instance4,_ref){let{text:text2,editor_preview_text,link_color,nofollow}=_ref;if(!instance4.run_mode()&&editor_preview_text&&text2&&!instance4.element.property("text").is_static())return editor_preview_text;if(typeof text2!="string"||!instance4.run_mode())return text2;let url_opening_bbcode=["[url=","[url]","[video]","[youtube]"],url_closing_bbcode=["[/url]","[/img]","[/video]","[/youtube]"];function check_url_bbcode(string,link,idx,test_bbcode,check_behind){return check_behind?idx+link.length+test_bbcode.length<=string.length&&string.substring(idx+link.length,idx+link.length+test_bbcode.length)===test_bbcode:idx>=test_bbcode.length&&string.substring(idx-test_bbcode.length,idx)===test_bbcode&&idx+link.length<string.length&&string[idx+link.length]==="]"}function check_email_in_url(string,email,idx){for(let index=0;index<url_opening_bbcode.length;index++){let opening_test_bbcode=url_opening_bbcode[index],closing_test_bbcode=url_closing_bbcode[index];if(string.substring(0,idx).includes(opening_test_bbcode)&&string.substring(idx).includes(closing_test_bbcode)){let substring_after_email=string.substring(idx),idx_url_opening_bbcode=substring_after_email.indexOf(opening_test_bbcode);if(idx_url_opening_bbcode<0||idx_url_opening_bbcode>0&&idx_url_opening_bbcode>substring_after_email.indexOf(closing_test_bbcode))return!0}}return!1}function apply_link_color(string){if(link_color==null)return string;if(link_color.includes(VAR_IDENTIFIER)){var _appquery$get_public_;let color_tokens=(_appquery$get_public_=appquery_default.get_public_setting("color_tokens"))!=null?_appquery$get_public_:DEFAULT_COLOR_TOKENS,{token_set,variant}=variable_to_token_variant(link_color);color_tokens[token_set]?link_color=color_tokens[token_set][variant]:link_color=get_user_color_tokens()[variant][token_set].rgba}return`[color=${rgb_to_hex(link_color).code}]${string}[/color]`}let no_follow_tag=nofollow?" nofollow=true":"",formatted_text=text2.replace(regex_for_links,(link,idx)=>{let test_bbcode;for(test_bbcode of url_opening_bbcode)if(check_url_bbcode(text2,link,idx,test_bbcode))return link;for(test_bbcode of url_closing_bbcode)if(check_url_bbcode(text2,link,idx,test_bbcode,!0))return link;let link_url=/^http/.test(link)?link:`http://${link}`;return apply_link_color(`[url=${link_url}${no_follow_tag}]${link}[/url]`)});return formatted_text=formatted_text.replace(regex_for_emails,(email,idx)=>{if(check_email_in_url(formatted_text,email,idx))return email;for(let test_bbcode of["[url=https://mailto:","[url=mailto:","[url]"])if(check_url_bbcode(formatted_text,email,idx,test_bbcode))return email;return check_url_bbcode(formatted_text,email,idx,"[/url]",!0)?email:apply_link_color(`[email=${email}]${email}[/email]`)}),formatted_text}var import_web_dom_collections_iterator149,import_es_string_replace31,regex_for_links,regex_for_emails,dotdotdot_observer,init_text_elements=__esm({"lib-browser/core/core_elements/shared/text_elements.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator149=__toESM(require_web_dom_collections_iterator()),import_es_string_replace31=__toESM(require_es_string_replace());init_logger();init_u2();init_appquery();init_property_applications();init_clipping();init_element_eval();init_element_props();init_colors();init_color_tokens();regex_for_links=/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.']*\)|[-A-Z0-9+&@#/%=~_|$?!:,.'])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.']*\)|[-A-Z0-9+&@#/%=~_|$])/gim,regex_for_emails=/(?:[a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gim;typeof ResizeObserver<"u"&&ResizeObserver!==null&&(dotdotdot_observer=new ResizeObserver(entries=>{for(let entry of entries)$(entry.target).trigger("update.dot")}))}});function wait_for_img_tags_loaded(div2,cb){if(!(div2 instanceof $)){cb();return}let imgs=div2.find("img").not(function(){return this.complete});if(!imgs.length){cb();return}let count2=imgs.length;imgs.on("load",()=>{count2--,count2===0&&cb()})}function apply_dynamic_properties_text(instance4){let canvas=instance4.get_canvas(),shrink_if_less_high=instance4.get_static_property("shrink_if_less_high"),last_props=null,applied_props=null,last_height=null;instance4.autorun(()=>{instance4.state("notify_width");let props_to_evaluate=["text","font_size","padding_vertical","line_height","rotation_angle","link_color","nofollow"],props={};for(let prop of props_to_evaluate)props[prop]=evaluate_property(instance4,prop);if(props.notify_width=instance4.state("notify_width"),props.font_face=get_font_face(instance4),last_props=props,!instance4.is_animating())if(instance4.run_mode()||instance4.responsive_mode()){var _instance$element$roo;if((_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()&&instance4.element.element_version(!0)<PADDING_VERSION){var _props$padding_vertic;canvas[0].style["padding-bottom"]=((_props$padding_vertic=props.padding_vertical)!=null?_props$padding_vertic:0)+"px"}if(text_should_stretch_vertically(instance4)){let adjust_height2=function(cb){if(instance4.is_animating(!0)){cb();return}if(!instance4.is_visible(!0)){cb();return}applied_props=JSON.stringify(last_props),apply_text(instance4,content,last_props),wait_for_img_tags_loaded(content,()=>{let border_margin_dif=canvas.outerHeight()-canvas.height();if(props.rotation_angle!=null&&![0,180].includes(props.rotation_angle)){cb();return}let inner_height2=content.height(),min_height2=instance4.element.get_height();shrink_if_less_high?(last_height=inner_height2+border_margin_dif,instance4.set_height(last_height)):(last_height=Math.max(min_height2,inner_height2+border_margin_dif),instance4.set_height(last_height)),cb()})};var adjust_height=adjust_height2;if(!instance4.is_visible()){set_text_height_to_invisibility_state(instance4);return}if(JSON.stringify(props)===applied_props){last_height&&instance4.set_height(last_height);return}let content=canvas.find(".content");content.length===0&&(content=div("content",canvas));let dummy_image_div=div("content-for-img"),key=add_layout_resizing_key2();u_exports2.wait_for_updates(()=>{let div_to_watch_for_images;has_bbcode(last_props.text)&&!instance4.get_static_property("no_bbcode")&&last_props.text.indexOf("[/img]")>-1?(apply_text(instance4,dummy_image_div,last_props),div_to_watch_for_images=dummy_image_div):div_to_watch_for_images=null,wait_for_img_tags_loaded(div_to_watch_for_images,()=>{let{font_family}=get_quoted_face_and_variant(props.font_face),{font_size}=props;adjust_height2(()=>{var _font_family;(_font_family=font_family)!=null&&_font_family.includes("var(")&&(font_family=font_token_to_font(font_family).font_family),wait_for_font_loaded(`${font_size}px ${font_family}`,loaded_instantly=>{if(loaded_instantly){key.turn();return}adjust_height2(()=>key.turn())})})})})}else instance4.is_visible()&&(property_applications_default.apply_css_style(canvas,{"word-break":"break-word"}),apply_text(instance4,canvas,props))}else apply_text(instance4,canvas,props),(void 0)(instance4)})}function wait_for_font_loaded(font_code,cb){if(font_code==null){cb(!0);return}if(document.fonts==null){cb(!0);return}if(document.fonts.check(font_code)){cb(!0);return}let font_load_promise=document.fonts.load(font_code);if(font_load_promise.finally!=null)font_load_promise.finally(()=>cb(!1));else if(font_load_promise.then!=null){if(font_load_promise.then(()=>cb(!1)).catch(()=>cb(!1)),Math.random()>.99){var _Promise$prototype$fi,_Promise$prototype$th;info("odd missing Promise.prototype.finally",{type:typeof font_load_promise,this_then:font_load_promise.then.toString(),finally:Promise==null||(_Promise$prototype$fi=Promise.prototype.finally)==null?void 0:_Promise$prototype$fi.toString(),then:Promise==null||(_Promise$prototype$th=Promise.prototype.then)==null?void 0:_Promise$prototype$th.toString()})}}else{var _Promise$prototype$th2;info("document.font polyfill but not Promise",{type:typeof font_load_promise,then:Promise==null||(_Promise$prototype$th2=Promise.prototype.then)==null?void 0:_Promise$prototype$th2.toString()}),cb(!0)}}function apply_dotdotdot2(instance4,wrap2){let canvas=instance4.get_canvas();if(instance4.thumbnail_mode()){canvas.css("overflow","hidden");return}return instance4.setTimeout(()=>canvas.dotdotdot({wrap:wrap2,callback:(isTruncated,orgContent)=>{u_exports2.run_once(30,()=>{var _instance$canvas,_instance$canvas$text;return instance4.edit_mode()&&orgContent.length!==0&&((_instance$canvas=instance4.canvas)==null||(_instance$canvas$text=_instance$canvas.text)==null?void 0:_instance$canvas$text.call(_instance$canvas))&&instance4.canvas.text().trim()===""&&evaluate_property(instance4,"text")!==""},(err,add_placeholder)=>{if(err){log(err);return}if(add_placeholder){let dot_placeholder=div("dots-placeholder",canvas);property_applications_default.apply_css_style(dot_placeholder,{"line-height":0,"font-size":"20px","text-align":instance4.get_static_property("font_alignment",!0)}),dot_placeholder.text("............")}})}}),1),pre_cache(instance4,["width","height","font_size","padding_vertical","line_height","word_spacing","letter_spacing"]),instance4.autorun(()=>{var _canvas$trigger;for(let prop of["width","height","font_size","padding_vertical","line_height","word_spacing","letter_spacing"])evaluate_property(instance4,prop);instance4.element.get_style_id(),(_canvas$trigger=canvas.trigger)==null||_canvas$trigger.call(canvas,"update.dot")})}function text_should_stretch_vertically(instance4){var _instance$element$roo2;let use_responsive=(_instance$element$roo2=instance4.element.root())==null?void 0:_instance$element$roo2.use_responsive_algorithm(),cut_off_content=instance4.get_static_property("cut_off_content"),stretch_to_fit=instance4.get_static_property("stretch_to_fit");return use_responsive&&!cut_off_content||!use_responsive&&stretch_to_fit}function set_text_height_to_invisibility_state(instance4){instance4.get_static_property("shrink_if_less_high")?instance4.set_height(0):instance4.set_height(instance4.element.get_height())}var import_web_dom_collections_iterator150,import_es_promise_finally3,init_text_elements2=__esm({"lib-browser/core/core_elements/legacy/responsive_v0/shared/text_elements.js"(){"use strict";init_define_process_env();init_shim();import_web_dom_collections_iterator150=__toESM(require_web_dom_collections_iterator()),import_es_promise_finally3=__toESM(require_es_promise_finally());init_property_applications();init_element_utils();init_u2();init_elements2();init_webfonts();init_logger();init_element_eval();init_element_props();init_elements();init_text_elements()}});var Application2,init_Application=__esm({"lib-browser/lang/application/Application.js"(){"use strict";init_define_process_env();init_shim();init_lib();Application2=class{constructor(_appname){this._appname=_appname}appname(){return this._appname}domain(){return lib_default().app_domain()}}}});var known_plugins_exports={};__export(known_plugins_exports,{ADD_TO_ANY:()=>ADD_TO_ANY,API_CONNECTOR:()=>API_CONNECTOR,BLOCKSPRING:()=>BLOCKSPRING,BOX:()=>BOX,BRAINTREE:()=>BRAINTREE,BUBBLEBOT:()=>BUBBLEBOT,BUBBLE_PLUGIN:()=>BUBBLE_PLUGIN,DB_CONNECTOR:()=>DB_CONNECTOR,DOCUSIGN:()=>DOCUSIGN,LEGACY_API_CONNECTOR:()=>LEGACY_API_CONNECTOR,MAILCHIMP:()=>MAILCHIMP,PEXELS:()=>PEXELS,RECAPTCHA:()=>RECAPTCHA,SEGMENT:()=>SEGMENT,SENDGRID:()=>SENDGRID,STRIPE:()=>STRIPE,TWILIO:()=>TWILIO,ZIGGEO:()=>ZIGGEO});var API_CONNECTOR,BLOCKSPRING,BOX,BRAINTREE,BUBBLE_PLUGIN,BUBBLEBOT,DB_CONNECTOR,DOCUSIGN,LEGACY_API_CONNECTOR,MAILCHIMP,PEXELS,RECAPTCHA,SEGMENT,SENDGRID,STRIPE,TWILIO,ZIGGEO,ADD_TO_ANY,init_known_plugins=__esm({"lib-browser/constants/known_plugins.js"(){"use strict";init_define_process_env();init_shim();API_CONNECTOR="apiconnector2",BLOCKSPRING="Blockspring",BOX="box",BRAINTREE="braintree",BUBBLE_PLUGIN="bubble_plugin",BUBBLEBOT="bubblebot",DB_CONNECTOR="dbconnector",DOCUSIGN="docusign",LEGACY_API_CONNECTOR="apiconnector",MAILCHIMP="mailchimp",PEXELS="pexels",RECAPTCHA="recaptcha",SEGMENT="segment",SENDGRID="sendgrid",STRIPE="stripe",TWILIO="twilio",ZIGGEO="ziggeo",ADD_TO_ANY="addtoany"}});var require_nprogress=__commonJS({"vendor/jquery_plugins/nprogress.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(function(root2,factory){typeof define=="function"&&define.amd?define(factory):typeof exports3=="object"?module2.exports=factory():root2.NProgress=factory()})(exports3,function(){var NProgress2={};NProgress2.version="0.1.6";var Settings=NProgress2.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};NProgress2.configure=function(options){var key,value;for(key in options)value=options[key],value!==void 0&&options.hasOwnProperty(key)&&(Settings[key]=value);return this},NProgress2.status=null,NProgress2.set=function(n){var started=NProgress2.isStarted();n=clamp(n,Settings.minimum,1),NProgress2.status=n===1?null:n;var progress=NProgress2.render(!started),bar=progress.querySelector(Settings.barSelector),speed=Settings.speed,ease=Settings.easing;return progress.offsetWidth,queue(function(next){Settings.positionUsing===""&&(Settings.positionUsing=NProgress2.getPositioningCSS()),css7(bar,barPositionCSS(n,speed,ease)),n===1?(css7(progress,{transition:"none",opacity:1}),progress.offsetWidth,setTimeout(function(){css7(progress,{transition:"all "+speed+"ms linear",opacity:0}),setTimeout(function(){NProgress2.remove(),next()},speed)},speed)):setTimeout(next,speed)}),this},NProgress2.isStarted=function(){return typeof NProgress2.status=="number"},NProgress2.start=function(){NProgress2.status||NProgress2.set(0);var work=function(){setTimeout(function(){NProgress2.status&&(NProgress2.trickle(),work())},Settings.trickleSpeed)};return Settings.trickle&&work(),this},NProgress2.done=function(force){return!force&&!NProgress2.status?this:NProgress2.inc(.3+.5*Math.random()).set(1)},NProgress2.inc=function(amount){var n=NProgress2.status;return n?(typeof amount!="number"&&(amount=(1-n)*clamp(Math.random()*n,.1,.95)),n=clamp(n+amount,0,.994),NProgress2.set(n)):NProgress2.start()},NProgress2.trickle=function(){return NProgress2.inc(Math.random()*Settings.trickleRate)},function(){var initial=0,current=0;NProgress2.promise=function($promise){return!$promise||$promise.state()=="resolved"?this:(current==0&&NProgress2.start(),initial++,current++,$promise.always(function(){current--,current==0?(initial=0,NProgress2.done()):NProgress2.set((initial-current)/initial)}),this)}}(),NProgress2.render=function(fromStart){if(NProgress2.isRendered())return document.getElementById("nprogress");addClass(document.documentElement,"nprogress-busy");var progress=document.createElement("div");progress.id="nprogress",progress.innerHTML=Settings.template;var bar=progress.querySelector(Settings.barSelector),perc=fromStart?"-100":toBarPerc(NProgress2.status||0),parent=document.querySelector(Settings.parent),spinner2;return css7(bar,{transition:"all 0 linear",transform:"translate3d("+perc+"%,0,0)"}),Settings.showSpinner||(spinner2=progress.querySelector(Settings.spinnerSelector),spinner2&&removeElement(spinner2)),parent!=document.body&&addClass(parent,"nprogress-custom-parent"),parent.appendChild(progress),progress},NProgress2.remove=function(){removeClass(document.documentElement,"nprogress-busy"),removeClass(document.querySelector(Settings.parent),"nprogress-custom-parent");var progress=document.getElementById("nprogress");progress&&removeElement(progress)},NProgress2.isRendered=function(){return!!document.getElementById("nprogress")},NProgress2.getPositioningCSS=function(){var bodyStyle=document.body.style,vendorPrefix="WebkitTransform"in bodyStyle?"Webkit":"MozTransform"in bodyStyle?"Moz":"msTransform"in bodyStyle?"ms":"OTransform"in bodyStyle?"O":"";return vendorPrefix+"Perspective"in bodyStyle?"translate3d":vendorPrefix+"Transform"in bodyStyle?"translate":"margin"};function clamp(n,min,max){return n<min?min:n>max?max:n}function toBarPerc(n){return(-1+n)*100}function barPositionCSS(n,speed,ease){var barCSS;return Settings.positionUsing==="translate3d"?barCSS={transform:"translate3d("+toBarPerc(n)+"%,0,0)"}:Settings.positionUsing==="translate"?barCSS={transform:"translate("+toBarPerc(n)+"%,0)"}:barCSS={"margin-left":toBarPerc(n)+"%"},barCSS.transition="all "+speed+"ms "+ease,barCSS}var queue=function(){var pending=[];function next(){var fn=pending.shift();fn&&fn(next)}return function(fn){pending.push(fn),pending.length==1&&next()}}(),css7=function(){var cssPrefixes=["Webkit","O","Moz","ms"],cssProps={};function camelCase(string){return string.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(match,letter){return letter.toUpperCase()})}function getVendorProp(name){var style2=document.body.style;if(name in style2)return name;for(var i=cssPrefixes.length,capName=name.charAt(0).toUpperCase()+name.slice(1),vendorName;i--;)if(vendorName=cssPrefixes[i]+capName,vendorName in style2)return vendorName;return name}function getStyleProp(name){return name=camelCase(name),cssProps[name]||(cssProps[name]=getVendorProp(name))}function applyCss(element,prop,value){prop=getStyleProp(prop),element.style[prop]=value}return function(element,properties){var args=arguments,prop,value;if(args.length==2)for(prop in properties)value=properties[prop],value!==void 0&&properties.hasOwnProperty(prop)&&applyCss(element,prop,value);else applyCss(element,args[1],args[2])}}();function hasClass(element,name){var list4=typeof element=="string"?element:classList2(element);return list4.indexOf(" "+name+" ")>=0}function addClass(element,name){var oldList=classList2(element),newList=oldList+name;hasClass(oldList,name)||(element.className=newList.substring(1))}function removeClass(element,name){var oldList=classList2(element),newList;hasClass(element,name)&&(newList=oldList.replace(" "+name+" "," "),element.className=newList.substring(1,newList.length-1))}function classList2(element){return(" "+(element.className||"")+" ").replace(/\s+/gi," ")}function removeElement(element){element&&element.parentNode&&element.parentNode.removeChild(element)}return NProgress2})}});var require_spin_min=__commonJS({"vendor/jquery_plugins/spin.min.js"(exports3,module2){"use strict";init_define_process_env();init_shim();(function(t,e){typeof exports3=="object"?module2.exports=e():typeof define=="function"&&define.amd?define(e):t.Spinner=e()})(exports3,function(){"use strict";var t=["webkit","Moz","ms","O"],e={},i;function o(t2,e2){var i2=document.createElement(t2||"div"),o2;for(o2 in e2)i2[o2]=e2[o2];return i2}function n(t2){for(var e2=1,i2=arguments.length;e2<i2;e2++)t2.appendChild(arguments[e2]);return t2}var r2=function(){var t2=o("style",{type:"text/css"});return n(document.getElementsByTagName("head")[0],t2),t2.sheet||t2.styleSheet}();function s(t2,o2,n2,s2){var a2=["opacity",o2,~~(t2*100),n2,s2].join("-"),f2=.01+n2/s2*100,l2=Math.max(1-(1-t2)/o2*(100-f2),t2),d2=i.substring(0,i.indexOf("Animation")).toLowerCase(),u23=d2&&"-"+d2+"-"||"";return e[a2]||(r2.insertRule("@"+u23+"keyframes "+a2+"{0%{opacity:"+l2+"}"+f2+"%{opacity:"+t2+"}"+(f2+.01)+"%{opacity:1}"+(f2+o2)%100+"%{opacity:"+t2+"}100%{opacity:"+l2+"}}",r2.cssRules.length),e[a2]=1),a2}function a(e2,i2){var o2=e2.style,n2,r3;if(o2[i2]!==void 0)return i2;for(i2=i2.charAt(0).toUpperCase()+i2.slice(1),r3=0;r3<t.length;r3++)if(n2=t[r3]+i2,o2[n2]!==void 0)return n2}function f(t2,e2){for(var i2 in e2)t2.style[a(t2,i2)||i2]=e2[i2];return t2}function l(t2){for(var e2=1;e2<arguments.length;e2++){var i2=arguments[e2];for(var o2 in i2)t2[o2]===void 0&&(t2[o2]=i2[o2])}return t2}function d(t2){for(var e2={x:t2.offsetLeft,y:t2.offsetTop};t2=t2.offsetParent;)e2.x+=t2.offsetLeft,e2.y+=t2.offsetTop;return e2}var u22={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};function p(t2){if(typeof this>"u")return new p(t2);this.opts=l(t2||{},p.defaults,u22)}p.defaults={},l(p.prototype,{spin:function(t2){this.stop();var e2=this,n2=e2.opts,r3=e2.el=f(o(0,{className:n2.className}),{position:n2.position,width:0,zIndex:n2.zIndex}),s2=n2.radius+n2.length+n2.width,a2,l2;if(t2&&(t2.insertBefore(r3,t2.firstChild||null),l2=d(t2),a2=d(r3),f(r3,{left:(n2.left=="auto"?l2.x-a2.x+(t2.offsetWidth>>1):parseInt(n2.left,10)+s2)+"px",top:(n2.top=="auto"?l2.y-a2.y+(t2.offsetHeight>>1):parseInt(n2.top,10)+s2)+"px"})),r3.setAttribute("role","progressbar"),e2.lines(r3,e2.opts),!i){var u23=0,p2=(n2.lines-1)*(1-n2.direction)/2,c2,h2=n2.fps,m=h2/n2.speed,y=(1-n2.opacity)/(m*n2.trail/100),g=m/n2.lines;(function v(){u23++;for(var t3=0;t3<n2.lines;t3++)c2=Math.max(1-(u23+(n2.lines-t3)*g)%m*y,n2.opacity),e2.opacity(r3,t3*n2.direction+p2,c2,n2);e2.timeout=e2.el&&setTimeout(v,~~(1e3/h2))})()}return e2},stop:function(){var t2=this.el;return t2&&(clearTimeout(this.timeout),t2.parentNode&&t2.parentNode.removeChild(t2),this.el=void 0),this},lines:function(t2,e2){var r3=0,a2=(e2.lines-1)*(1-e2.direction)/2,l2;function d2(t3,i2){return f(o(),{position:"absolute",width:e2.length+e2.width+"px",height:e2.width+"px",background:t3,boxShadow:i2,transformOrigin:"left",transform:"rotate("+~~(360/e2.lines*r3+e2.rotate)+"deg) translate("+e2.radius+"px,0)",borderRadius:(e2.corners*e2.width>>1)+"px"})}for(;r3<e2.lines;r3++)l2=f(o(),{position:"absolute",top:1+~(e2.width/2)+"px",transform:e2.hwaccel?"translate3d(0,0,0)":"",opacity:e2.opacity,animation:i&&s(e2.opacity,e2.trail,a2+r3*e2.direction,e2.lines)+" "+1/e2.speed+"s linear infinite"}),e2.shadow&&n(l2,f(d2("#000","0 0 4px #000"),{top:"2px"})),n(t2,n(l2,d2(e2.color,"0 0 1px rgba(0,0,0,.1)")));return t2},opacity:function(t2,e2,i2){e2<t2.childNodes.length&&(t2.childNodes[e2].style.opacity=i2)}});function c(){function t2(t3,e2){return o("<"+t3+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e2)}r2.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(e2,i2){var o2=i2.length+i2.width,r3=2*o2;function s2(){return f(t2("group",{coordsize:r3+" "+r3,coordorigin:-o2+" "+-o2}),{width:r3,height:r3})}var a2=-(i2.width+i2.length)*2+"px",l2=f(s2(),{position:"absolute",top:a2,left:a2}),d2;function u23(e3,r4,a3){n(l2,n(f(s2(),{rotation:360/i2.lines*e3+"deg",left:~~r4}),n(f(t2("roundrect",{arcsize:i2.corners}),{width:o2,height:i2.width,left:i2.radius,top:-i2.width>>1,filter:a3}),t2("fill",{color:i2.color,opacity:i2.opacity}),t2("stroke",{opacity:0}))))}if(i2.shadow)for(d2=1;d2<=i2.lines;d2++)u23(d2,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(d2=1;d2<=i2.lines;d2++)u23(d2);return n(e2,l2)},p.prototype.opacity=function(t3,e2,i2,o2){var n2=t3.firstChild;o2=o2.shadow&&o2.lines||0,n2&&e2+o2<n2.childNodes.length&&(n2=n2.childNodes[e2+o2],n2=n2&&n2.firstChild,n2=n2&&n2.firstChild,n2&&(n2.opacity=i2))}}var h=f(o("group"),{behavior:"url(#default#VML)"});return!a(h,"transform")&&h.adj?c():i=a(h,"animation"),p})}});var status_bar_exports={};__export(status_bar_exports,{bar_visible:()=>bar_visible,force_done:()=>force_done,hide_run_mode:()=>hide_run_mode,no_status_bar:()=>no_status_bar,show_progress_line:()=>show_progress_line,show_run_mode:()=>show_run_mode,spinner:()=>spinner,spinner_key:()=>spinner_key});function show_progress_line(waiting_on){if(on_react_native())return()=>{};if(waiting_on==null)throw new UnexpectedError("must pass in what we are waiting on (a key or promise preferably)");if(bar_color==null){var _appquery$app$get_pub;bar_color=(_appquery$app$get_pub=appquery_default.app().get_public_setting("status_bar_color"))!=null?_appquery$app$get_pub:"#29d",import_nprogress.default.configure({showSpinner:!1,template:`<div class="bar" role="bar" style="background:${bar_color};">
    <div class="peg" style="box-shadow:0 0 10px ${bar_color}, 0 0 5px ${bar_color};">
    </div>
</div>`})}_number_of_shows===0&&(no_status_bar.turn_off(),setTimeout(()=>{_number_of_shows>0&&import_nprogress.default.start()},200)),_number_of_shows++;let status_timeout=setTimeout(()=>console.log("warning: status bar still waiting on "+waiting_on),10*1e3),_finished=!1,progressed=!1;return progress=>{if(!_finished)if(progress==null){if(_finished=!0,_number_of_shows--,clearTimeout(status_timeout),_number_of_shows===0)return import_nprogress.default.done(),setTimeout(()=>no_status_bar.turn_on(),400);progressed&&import_nprogress.default.set(.5)}else progressed=!0,import_nprogress.default.set(progress)}}function spinner(instance4){var _Spinner,_spinner_color,_appquery$app$get_pub2;let div2=instance4.get_canvas();if(!div2[0])return()=>{};let my_key=spinner_key.make(null,"spinner_key"),id=instance4.element.id();if(elements_with_spin.includes(id))return()=>{};elements_with_spin.push(id),(_Spinner=Spinner)!=null||(Spinner=require_spin_min()),(_spinner_color=spinner_color)!=null||(spinner_color=(_appquery$app$get_pub2=appquery_default.app().get_public_setting("spinner_color"))!=null?_appquery$app$get_pub2:"black");let animation=null,_should_show_spinner=!0,timeout=setTimeout(()=>{if(_should_show_spinner){var _instance$element$roo;let opts={lines:13,length:10,width:2,radius:10,corners:1,rotate:0,direction:1,color:spinner_color,speed:1,trail:70,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2e9,top:Math.min(Math.max(instance4.element.get_height(),div2.height())/2-10,100),left:div2.width()/2-25};((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())>0&&(opts.top=Math.min(Math.max(instance4.element.get_height(),div2.height())/2-10,50)),animation=new Spinner(opts).spin(div2[0])}},700);return()=>{var _animation;clearTimeout(timeout),_should_show_spinner=!1,(_animation=animation)==null||_animation.stop(),array_remove(elements_with_spin,id),my_key.turn()}}var import_nprogress,_number_of_shows,bar_color,no_status_bar,bar_id,hide_run_mode,show_run_mode,bar_visible,force_done,elements_with_spin,spinner_key,Spinner,spinner_color,init_status_bar=__esm({"lib-browser/core/status_bar.js"(){"use strict";init_define_process_env();init_shim();init_u2();init_appquery();import_nprogress=__toESM(require_nprogress()),_number_of_shows=0;import_nprogress.default.configure({showSpinner:!1});bar_color=null,no_status_bar=u_exports2.MakeSwitch(null,"no_status_bar");no_status_bar.turn_on();bar_id="#nprogress",hide_run_mode=()=>$(bar_id).hide(),show_run_mode=()=>$(bar_id).show(),bar_visible=()=>$(bar_id).is(":visible"),force_done=()=>import_nprogress.default.done(),elements_with_spin=[],spinner_key=u_exports2.MakeKeyList(),Spinner=null,spinner_color=null}});var require_is_regexp=__commonJS({"node_modules/core-js/internals/is-regexp.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var isObject3=require_is_object(),classof=require_classof_raw(),wellKnownSymbol=require_well_known_symbol(),MATCH=wellKnownSymbol("match");module2.exports=function(it){var isRegExp;return isObject3(it)&&((isRegExp=it[MATCH])!==void 0?!!isRegExp:classof(it)==="RegExp")}}});var require_regexp_get_flags=__commonJS({"node_modules/core-js/internals/regexp-get-flags.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var call=require_function_call(),hasOwn=require_has_own_property(),isPrototypeOf=require_object_is_prototype_of(),regExpFlags=require_regexp_flags(),RegExpPrototype=RegExp.prototype;module2.exports=function(R){var flags=R.flags;return flags===void 0&&!("flags"in RegExpPrototype)&&!hasOwn(R,"flags")&&isPrototypeOf(RegExpPrototype,R)?call(regExpFlags,R):flags}}});var require_es_string_match_all=__commonJS({"node_modules/core-js/modules/es.string.match-all.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),call=require_function_call(),uncurryThis=require_function_uncurry_this_clause(),createIteratorConstructor=require_iterator_create_constructor(),createIterResultObject=require_create_iter_result_object(),requireObjectCoercible=require_require_object_coercible(),toLength=require_to_length(),toString2=require_to_string(),anObject=require_an_object(),isNullOrUndefined=require_is_null_or_undefined(),classof=require_classof_raw(),isRegExp=require_is_regexp(),getRegExpFlags=require_regexp_get_flags(),getMethod=require_get_method(),defineBuiltIn=require_define_built_in(),fails=require_fails(),wellKnownSymbol=require_well_known_symbol(),speciesConstructor=require_species_constructor(),advanceStringIndex=require_advance_string_index(),regExpExec=require_regexp_exec_abstract(),InternalStateModule=require_internal_state(),IS_PURE=require_is_pure(),MATCH_ALL=wellKnownSymbol("matchAll"),REGEXP_STRING="RegExp String",REGEXP_STRING_ITERATOR=REGEXP_STRING+" Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(REGEXP_STRING_ITERATOR),RegExpPrototype=RegExp.prototype,$TypeError=TypeError,stringIndexOf=uncurryThis("".indexOf),nativeMatchAll=uncurryThis("".matchAll),WORKS_WITH_NON_GLOBAL_REGEX=!!nativeMatchAll&&!fails(function(){nativeMatchAll("a",/./)}),$RegExpStringIterator=createIteratorConstructor(function(regexp,string,$global,fullUnicode){setInternalState(this,{type:REGEXP_STRING_ITERATOR,regexp,string,global:$global,unicode:fullUnicode,done:!1})},REGEXP_STRING,function(){var state4=getInternalState(this);if(state4.done)return createIterResultObject(void 0,!0);var R=state4.regexp,S18=state4.string,match=regExpExec(R,S18);return match===null?(state4.done=!0,createIterResultObject(void 0,!0)):state4.global?(toString2(match[0])===""&&(R.lastIndex=advanceStringIndex(S18,toLength(R.lastIndex),state4.unicode)),createIterResultObject(match,!1)):(state4.done=!0,createIterResultObject(match,!1))}),$matchAll=function(string){var R=anObject(this),S18=toString2(string),C=speciesConstructor(R,RegExp),flags=toString2(getRegExpFlags(R)),matcher,$global,fullUnicode;return matcher=new C(C===RegExp?R.source:R,flags),$global=!!~stringIndexOf(flags,"g"),fullUnicode=!!~stringIndexOf(flags,"u"),matcher.lastIndex=toLength(R.lastIndex),new $RegExpStringIterator(matcher,S18,$global,fullUnicode)};$2({target:"String",proto:!0,forced:WORKS_WITH_NON_GLOBAL_REGEX},{matchAll:function(regexp){var O=requireObjectCoercible(this),flags,S18,matcher,rx;if(isNullOrUndefined(regexp)){if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(O,regexp)}else{if(isRegExp(regexp)&&(flags=toString2(requireObjectCoercible(getRegExpFlags(regexp))),!~stringIndexOf(flags,"g")))throw new $TypeError("`.matchAll` does not allow non-global regexes");if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(O,regexp);if(matcher=getMethod(regexp,MATCH_ALL),matcher===void 0&&IS_PURE&&classof(regexp)==="RegExp"&&(matcher=$matchAll),matcher)return call(matcher,regexp,O)}return S18=toString2(O),rx=new RegExp(regexp,"g"),IS_PURE?call($matchAll,rx,S18):rx[MATCH_ALL](S18)}});IS_PURE||MATCH_ALL in RegExpPrototype||defineBuiltIn(RegExpPrototype,MATCH_ALL,$matchAll)}});var require_es_string_replace_all=__commonJS({"node_modules/core-js/modules/es.string.replace-all.js"(){"use strict";init_define_process_env();init_shim();var $2=require_export(),call=require_function_call(),uncurryThis=require_function_uncurry_this(),requireObjectCoercible=require_require_object_coercible(),isCallable=require_is_callable(),isNullOrUndefined=require_is_null_or_undefined(),isRegExp=require_is_regexp(),toString2=require_to_string(),getMethod=require_get_method(),getRegExpFlags=require_regexp_get_flags(),getSubstitution=require_get_substitution(),wellKnownSymbol=require_well_known_symbol(),IS_PURE=require_is_pure(),REPLACE=wellKnownSymbol("replace"),$TypeError=TypeError,indexOf=uncurryThis("".indexOf),replace=uncurryThis("".replace),stringSlice=uncurryThis("".slice),max=Math.max;$2({target:"String",proto:!0},{replaceAll:function(searchValue,replaceValue){var O=requireObjectCoercible(this),IS_REG_EXP,flags,replacer,string,searchString,functionalReplace,searchLength,advanceBy,replacement,position=0,endOfLastMatch=0,result="";if(!isNullOrUndefined(searchValue)){if(IS_REG_EXP=isRegExp(searchValue),IS_REG_EXP&&(flags=toString2(requireObjectCoercible(getRegExpFlags(searchValue))),!~indexOf(flags,"g")))throw new $TypeError("`.replaceAll` does not allow non-global regexes");if(replacer=getMethod(searchValue,REPLACE),replacer)return call(replacer,searchValue,O,replaceValue);if(IS_PURE&&IS_REG_EXP)return replace(toString2(O),searchValue,replaceValue)}for(string=toString2(O),searchString=toString2(searchValue),functionalReplace=isCallable(replaceValue),functionalReplace||(replaceValue=toString2(replaceValue)),searchLength=searchString.length,advanceBy=max(1,searchLength),position=indexOf(string,searchString);position!==-1;)replacement=functionalReplace?toString2(replaceValue(searchString,position,string)):getSubstitution(searchString,string,position,[],void 0,replaceValue),result+=stringSlice(string,endOfLastMatch,position)+replacement,endOfLastMatch=position+searchLength,position=position+advanceBy>string.length?-1:indexOf(string,searchString,position+advanceBy);return endOfLastMatch<string.length&&(result+=stringSlice(string,endOfLastMatch)),result}})}});var auth_exports={};__export(auth_exports,{EMPLOYEE_ACCESSING_ORGANIZATION_FREE_APP:()=>EMPLOYEE_ACCESSING_ORGANIZATION_FREE_APP,INVALID_LOGIN_CREDENTIALS:()=>INVALID_LOGIN_CREDENTIALS,NO_SUCH_USER:()=>NO_SUCH_USER,WORKOS_AUTH_URL:()=>WORKOS_AUTH_URL,WRONG_PASSWORD:()=>WRONG_PASSWORD});var INVALID_LOGIN_CREDENTIALS,NO_SUCH_USER,WRONG_PASSWORD,EMPLOYEE_ACCESSING_ORGANIZATION_FREE_APP,WORKOS_AUTH_URL,init_auth=__esm({"lib-browser/constants/auth.js"(){"use strict";init_define_process_env();init_shim();INVALID_LOGIN_CREDENTIALS="INVALID_LOGIN_CREDENTIALS",NO_SUCH_USER="NO_SUCH_USER",WRONG_PASSWORD="WRONG_PASSWORD",EMPLOYEE_ACCESSING_ORGANIZATION_FREE_APP="EMPLOYEE_ACCESSING_ORGANIZATION_FREE_APP",WORKOS_AUTH_URL="https://api.workos.com/sso"}});var require_foreach=__commonJS({"node_modules/foreach/index.js"(exports3,module2){init_define_process_env();init_shim();var hasOwn=Object.prototype.hasOwnProperty,toString2=Object.prototype.toString;module2.exports=function(obj,fn,ctx){if(toString2.call(fn)!=="[object Function]")throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i<l;i++)fn.call(ctx,obj[i],i,obj);else for(var k in obj)hasOwn.call(obj,k)&&fn.call(ctx,obj[k],k,obj)}}});var require_errors=__commonJS({"node_modules/algoliasearch/src/errors.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var inherits=require_inherits_browser();function AlgoliaSearchError(message,extraProperties){var forEach=require_foreach(),error2=this;typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):error2.stack=new Error().stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=message||"Unknown error",extraProperties&&forEach(extraProperties,function(value,key){error2[key]=value})}inherits(AlgoliaSearchError,Error);function createCustomError(name,message){function AlgoliaSearchCustomError(){var args=Array.prototype.slice.call(arguments,0);typeof args[0]!="string"&&args.unshift(message),AlgoliaSearchError.apply(this,args),this.name="AlgoliaSearch"+name+"Error"}return inherits(AlgoliaSearchCustomError,AlgoliaSearchError),AlgoliaSearchCustomError}module2.exports={AlgoliaSearchError,UnparsableJSON:createCustomError("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:createCustomError("RequestTimeout","Request timed out before getting a response"),Network:createCustomError("Network","Network issue, see err.more for details"),JSONPScriptFail:createCustomError("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:createCustomError("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:createCustomError("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:createCustomError("ObjectNotFound","Object not found"),Unknown:createCustomError("Unknown","Unknown error occured")}}});var require_buildSearchMethod=__commonJS({"node_modules/algoliasearch/src/buildSearchMethod.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=buildSearchMethod;var errors6=require_errors();function buildSearchMethod(queryParam,url9){return function(query,args,callback){if(typeof query=="function"&&typeof args=="object"||typeof callback=="object")throw new errors6.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");arguments.length===0||typeof query=="function"?(callback=query,query=""):(arguments.length===1||typeof args=="function")&&(callback=args,args=void 0),typeof query=="object"&&query!==null?(args=query,query=void 0):query==null&&(query="");var params="";query!==void 0&&(params+=queryParam+"="+encodeURIComponent(query));var additionalUA;return args!==void 0&&(args.additionalUA&&(additionalUA=args.additionalUA,delete args.additionalUA),params=this.as._getSearchParams(args,params)),this._search(params,url9,callback,additionalUA)}}}});var require_deprecate=__commonJS({"node_modules/algoliasearch/src/deprecate.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(fn,message){var warned=!1;function deprecated(){return warned||(console.warn(message),warned=!0),fn.apply(this,arguments)}return deprecated}}});var require_deprecatedMessage=__commonJS({"node_modules/algoliasearch/src/deprecatedMessage.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(previousUsage,newUsage){var githubAnchorLink=previousUsage.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+previousUsage+"` was replaced by `"+newUsage+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+githubAnchorLink}}});var require_merge=__commonJS({"node_modules/algoliasearch/src/merge.js"(exports3,module2){init_define_process_env();init_shim();var foreach=require_foreach();module2.exports=function merge(destination){var sources=Array.prototype.slice.call(arguments);return foreach(sources,function(source){for(var keyName in source)source.hasOwnProperty(keyName)&&(typeof destination[keyName]=="object"&&typeof source[keyName]=="object"?destination[keyName]=merge({},destination[keyName],source[keyName]):source[keyName]!==void 0&&(destination[keyName]=source[keyName]))}),destination}}});var require_clone=__commonJS({"node_modules/algoliasearch/src/clone.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(obj){return JSON.parse(JSON.stringify(obj))}}});var require_isArguments=__commonJS({"node_modules/object-keys/isArguments.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var toStr2=Object.prototype.toString;module2.exports=function(value){var str=toStr2.call(value),isArgs=str==="[object Arguments]";return isArgs||(isArgs=str!=="[object Array]"&&value!==null&&typeof value=="object"&&typeof value.length=="number"&&value.length>=0&&toStr2.call(value.callee)==="[object Function]"),isArgs}}});var require_implementation2=__commonJS({"node_modules/object-keys/implementation.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var keysShim;Object.keys||(has3=Object.prototype.hasOwnProperty,toStr2=Object.prototype.toString,isArgs=require_isArguments(),isEnumerable=Object.prototype.propertyIsEnumerable,hasDontEnumBug=!isEnumerable.call({toString:null},"toString"),hasProtoEnumBug=isEnumerable.call(function(){},"prototype"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(o){var ctor=o.constructor;return ctor&&ctor.prototype===o},excludedKeys={$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},hasAutomationEqualityBug=function(){if(typeof window>"u")return!1;for(var k in window)try{if(!excludedKeys["$"+k]&&has3.call(window,k)&&window[k]!==null&&typeof window[k]=="object")try{equalsConstructorPrototype(window[k])}catch{return!0}}catch{return!0}return!1}(),equalsConstructorPrototypeIfNotBuggy=function(o){if(typeof window>"u"||!hasAutomationEqualityBug)return equalsConstructorPrototype(o);try{return equalsConstructorPrototype(o)}catch{return!1}},keysShim=function(object2){var isObject3=object2!==null&&typeof object2=="object",isFunction2=toStr2.call(object2)==="[object Function]",isArguments2=isArgs(object2),isString=isObject3&&toStr2.call(object2)==="[object String]",theKeys=[];if(!isObject3&&!isFunction2&&!isArguments2)throw new TypeError("Object.keys called on a non-object");var skipProto=hasProtoEnumBug&&isFunction2;if(isString&&object2.length>0&&!has3.call(object2,0))for(var i=0;i<object2.length;++i)theKeys.push(String(i));if(isArguments2&&object2.length>0)for(var j2=0;j2<object2.length;++j2)theKeys.push(String(j2));else for(var name in object2)!(skipProto&&name==="prototype")&&has3.call(object2,name)&&theKeys.push(String(name));if(hasDontEnumBug)for(var skipConstructor=equalsConstructorPrototypeIfNotBuggy(object2),k=0;k<dontEnums.length;++k)!(skipConstructor&&dontEnums[k]==="constructor")&&has3.call(object2,dontEnums[k])&&theKeys.push(dontEnums[k]);return theKeys});var has3,toStr2,isArgs,isEnumerable,hasDontEnumBug,hasProtoEnumBug,dontEnums,equalsConstructorPrototype,excludedKeys,hasAutomationEqualityBug,equalsConstructorPrototypeIfNotBuggy;module2.exports=keysShim}});var require_object_keys2=__commonJS({"node_modules/object-keys/index.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var slice=Array.prototype.slice,isArgs=require_isArguments(),origKeys=Object.keys,keysShim=origKeys?function(o){return origKeys(o)}:require_implementation2(),originalKeys=Object.keys;keysShim.shim=function(){if(Object.keys){var keysWorksWithArguments=function(){var args=Object.keys(arguments);return args&&args.length===arguments.length}(1,2);keysWorksWithArguments||(Object.keys=function(object2){return isArgs(object2)?originalKeys(slice.call(object2)):originalKeys(object2)})}else Object.keys=keysShim;return Object.keys||keysShim};module2.exports=keysShim}});var require_omit=__commonJS({"node_modules/algoliasearch/src/omit.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(obj,test){var keys2=require_object_keys2(),foreach=require_foreach(),filtered={};return foreach(keys2(obj),function(keyName){test(keyName)!==!0&&(filtered[keyName]=obj[keyName])}),filtered}}});var require_isarray=__commonJS({"node_modules/isarray/index.js"(exports3,module2){init_define_process_env();init_shim();var toString2={}.toString;module2.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"}}});var require_map=__commonJS({"node_modules/algoliasearch/src/map.js"(exports3,module2){init_define_process_env();init_shim();var foreach=require_foreach();module2.exports=function(arr,fn){var newArr=[];return foreach(arr,function(item,itemIndex){newArr.push(fn(item,itemIndex,arr))}),newArr}}});var require_IndexCore=__commonJS({"node_modules/algoliasearch/src/IndexCore.js"(exports3,module2){init_define_process_env();init_shim();var buildSearchMethod=require_buildSearchMethod(),deprecate=require_deprecate(),deprecatedMessage=require_deprecatedMessage();module2.exports=IndexCore;function IndexCore(algoliasearch2,indexName){this.indexName=indexName,this.as=algoliasearch2,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}IndexCore.prototype.clearCache=function(){this.cache={}};IndexCore.prototype.search=buildSearchMethod("query");IndexCore.prototype.similarSearch=deprecate(buildSearchMethod("similarQuery"),deprecatedMessage("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])"));IndexCore.prototype.browse=function(query,queryParameters,callback){var merge=require_merge(),indexObj=this,page2,hitsPerPage;arguments.length===0||arguments.length===1&&typeof arguments[0]=="function"?(page2=0,callback=arguments[0],query=void 0):typeof arguments[0]=="number"?(page2=arguments[0],typeof arguments[1]=="number"?hitsPerPage=arguments[1]:typeof arguments[1]=="function"&&(callback=arguments[1],hitsPerPage=void 0),query=void 0,queryParameters=void 0):typeof arguments[0]=="object"?(typeof arguments[1]=="function"&&(callback=arguments[1]),queryParameters=arguments[0],query=void 0):typeof arguments[0]=="string"&&typeof arguments[1]=="function"&&(callback=arguments[1],queryParameters=void 0),queryParameters=merge({},queryParameters||{},{page:page2,hitsPerPage,query});var params=this.as._getSearchParams(queryParameters,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/browse",body:{params},hostType:"read",callback})};IndexCore.prototype.browseFrom=function(cursor,callback){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor},hostType:"read",callback})};IndexCore.prototype.searchForFacetValues=function(params,callback){var clone=require_clone(),omit=require_omit(),usage="Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])";if(params.facetName===void 0||params.facetQuery===void 0)throw new Error(usage);var facetName=params.facetName,filteredParams=omit(clone(params),function(keyName){return keyName==="facetName"}),searchParameters=this.as._getSearchParams(filteredParams,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(facetName)+"/query",hostType:"read",body:{params:searchParameters},callback})};IndexCore.prototype.searchFacet=deprecate(function(params,callback){return this.searchForFacetValues(params,callback)},deprecatedMessage("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])"));IndexCore.prototype._search=function(params,url9,callback,additionalUA){return this.as._jsonRequest({cache:this.cache,method:"POST",url:url9||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params}},callback,additionalUA})};IndexCore.prototype.getObject=function(objectID,attrs,callback){var indexObj=this;(arguments.length===1||typeof attrs=="function")&&(callback=attrs,attrs=void 0);var params="";if(attrs!==void 0){params="?attributes=";for(var i=0;i<attrs.length;++i)i!==0&&(params+=","),params+=attrs[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/"+encodeURIComponent(objectID)+params,hostType:"read",callback})};IndexCore.prototype.getObjects=function(objectIDs,attributesToRetrieve,callback){var isArray3=require_isarray(),map2=require_map(),usage="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!isArray3(objectIDs))throw new Error(usage);var indexObj=this;(arguments.length===1||typeof attributesToRetrieve=="function")&&(callback=attributesToRetrieve,attributesToRetrieve=void 0);var body={requests:map2(objectIDs,function(objectID){var request={indexName:indexObj.indexName,objectID};return attributesToRetrieve&&(request.attributesToRetrieve=attributesToRetrieve.join(",")),request})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body,callback})};IndexCore.prototype.as=null;IndexCore.prototype.indexName=null;IndexCore.prototype.typeAheadArgs=null;IndexCore.prototype.typeAheadValueOption=null}});var require_exitPromise=__commonJS({"node_modules/algoliasearch/src/exitPromise.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=function(fn,_setTimeout){_setTimeout(fn,0)}}});var require_IndexBrowser=__commonJS({"node_modules/algoliasearch/src/IndexBrowser.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=IndexBrowser;var inherits=require_inherits_browser(),EventEmitter6=require_events().EventEmitter;function IndexBrowser(){}inherits(IndexBrowser,EventEmitter6);IndexBrowser.prototype.stop=function(){this._stopped=!0,this._clean()};IndexBrowser.prototype._end=function(){this.emit("end"),this._clean()};IndexBrowser.prototype._error=function(err){this.emit("error",err),this._clean()};IndexBrowser.prototype._result=function(content){this.emit("result",content)};IndexBrowser.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}}});var require_Index=__commonJS({"node_modules/algoliasearch/src/Index.js"(exports3,module2){init_define_process_env();init_shim();var inherits=require_inherits_browser(),IndexCore=require_IndexCore(),deprecate=require_deprecate(),deprecatedMessage=require_deprecatedMessage(),exitPromise=require_exitPromise(),errors6=require_errors(),deprecateForwardToSlaves=deprecate(function(){},deprecatedMessage("forwardToSlaves","forwardToReplicas"));module2.exports=Index2;function Index2(){IndexCore.apply(this,arguments)}inherits(Index2,IndexCore);Index2.prototype.addObject=function(content,objectID,callback){var indexObj=this;return(arguments.length===1||typeof objectID=="function")&&(callback=objectID,objectID=void 0),this.as._jsonRequest({method:objectID!==void 0?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+(objectID!==void 0?"/"+encodeURIComponent(objectID):""),body:content,hostType:"write",callback})};Index2.prototype.addObjects=function(objects,callback){var isArray3=require_isarray(),usage="Usage: index.addObjects(arrayOfObjects[, callback])";if(!isArray3(objects))throw new Error(usage);for(var indexObj=this,postObj={requests:[]},i=0;i<objects.length;++i){var request={action:"addObject",body:objects[i]};postObj.requests.push(request)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/batch",body:postObj,hostType:"write",callback})};Index2.prototype.partialUpdateObject=function(partialObject,createIfNotExists,callback){(arguments.length===1||typeof createIfNotExists=="function")&&(callback=createIfNotExists,createIfNotExists=void 0);var indexObj=this,url9="/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/"+encodeURIComponent(partialObject.objectID)+"/partial";return createIfNotExists===!1&&(url9+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:url9,body:partialObject,hostType:"write",callback})};Index2.prototype.partialUpdateObjects=function(objects,createIfNotExists,callback){(arguments.length===1||typeof createIfNotExists=="function")&&(callback=createIfNotExists,createIfNotExists=!0);var isArray3=require_isarray(),usage="Usage: index.partialUpdateObjects(arrayOfObjects[, callback])";if(!isArray3(objects))throw new Error(usage);for(var indexObj=this,postObj={requests:[]},i=0;i<objects.length;++i){var request={action:createIfNotExists===!0?"partialUpdateObject":"partialUpdateObjectNoCreate",objectID:objects[i].objectID,body:objects[i]};postObj.requests.push(request)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/batch",body:postObj,hostType:"write",callback})};Index2.prototype.saveObject=function(object2,callback){var indexObj=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/"+encodeURIComponent(object2.objectID),body:object2,hostType:"write",callback})};Index2.prototype.saveObjects=function(objects,callback){var isArray3=require_isarray(),usage="Usage: index.saveObjects(arrayOfObjects[, callback])";if(!isArray3(objects))throw new Error(usage);for(var indexObj=this,postObj={requests:[]},i=0;i<objects.length;++i){var request={action:"updateObject",objectID:objects[i].objectID,body:objects[i]};postObj.requests.push(request)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/batch",body:postObj,hostType:"write",callback})};Index2.prototype.deleteObject=function(objectID,callback){if(typeof objectID=="function"||typeof objectID!="string"&&typeof objectID!="number"){var err=new errors6.AlgoliaSearchError(objectID&&typeof objectID!="function"?"ObjectID must be a string":"Cannot delete an object without an objectID");return callback=objectID,typeof callback=="function"?callback(err):this.as._promise.reject(err)}var indexObj=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/"+encodeURIComponent(objectID),hostType:"write",callback})};Index2.prototype.deleteObjects=function(objectIDs,callback){var isArray3=require_isarray(),map2=require_map(),usage="Usage: index.deleteObjects(arrayOfObjectIDs[, callback])";if(!isArray3(objectIDs))throw new Error(usage);var indexObj=this,postObj={requests:map2(objectIDs,function(objectID){return{action:"deleteObject",objectID,body:{objectID}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/batch",body:postObj,hostType:"write",callback})};Index2.prototype.deleteByQuery=deprecate(function(query,params,callback){var clone=require_clone(),map2=require_map(),indexObj=this,client=indexObj.as;arguments.length===1||typeof params=="function"?(callback=params,params={}):params=clone(params),params.attributesToRetrieve="objectID",params.hitsPerPage=1e3,params.distinct=!1,this.clearCache();var promise=this.search(query,params).then(stopOrDelete);function stopOrDelete(searchContent){if(searchContent.nbHits===0)return searchContent;var objectIDs=map2(searchContent.hits,function(object2){return object2.objectID});return indexObj.deleteObjects(objectIDs).then(waitTask).then(doDeleteByQuery)}function waitTask(deleteObjectsContent){return indexObj.waitTask(deleteObjectsContent.taskID)}function doDeleteByQuery(){return indexObj.deleteByQuery(query,params)}if(!callback)return promise;promise.then(success,failure);function success(){exitPromise(function(){callback(null)},client._setTimeout||setTimeout)}function failure(err){exitPromise(function(){callback(err)},client._setTimeout||setTimeout)}},deprecatedMessage("index.deleteByQuery()","index.deleteBy()"));Index2.prototype.deleteBy=function(params,callback){var indexObj=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/deleteByQuery",body:{params:indexObj.as._getSearchParams(params,"")},hostType:"write",callback})};Index2.prototype.browseAll=function(query,queryParameters){typeof query=="object"&&(queryParameters=query,query=void 0);var merge=require_merge(),IndexBrowser=require_IndexBrowser(),browser=new IndexBrowser,client=this.as,index=this,params=client._getSearchParams(merge({},queryParameters||{},{query}),"");browseLoop();function browseLoop(cursor){if(!browser._stopped){var body;cursor!==void 0?body={cursor}:body={params},client._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(index.indexName)+"/browse",hostType:"read",body,callback:browseCallback})}}function browseCallback(err,content){if(!browser._stopped){if(err){browser._error(err);return}if(browser._result(content),content.cursor===void 0){browser._end();return}browseLoop(content.cursor)}}return browser};Index2.prototype.ttAdapter=deprecate(function(params){var self2=this;return function(query,syncCb,asyncCb){var cb;typeof asyncCb=="function"?cb=asyncCb:cb=syncCb,self2.search(query,params,function(err,content){if(err){cb(err);return}cb(content.hits)})}},`ttAdapter is not necessary anymore and will be removed in the next version,
have a look at autocomplete.js (https://github.com/algolia/autocomplete.js)`);Index2.prototype.waitTask=function(taskID,callback){var baseDelay=100,maxDelay=5e3,loop=0,indexObj=this,client=indexObj.as,promise=retryLoop();function retryLoop(){return client._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/task/"+taskID}).then(function(content){loop++;var delay2=baseDelay*loop*loop;return delay2>maxDelay&&(delay2=maxDelay),content.status!=="published"?client._promise.delay(delay2).then(retryLoop):content})}if(!callback)return promise;promise.then(successCb,failureCb);function successCb(content){exitPromise(function(){callback(null,content)},client._setTimeout||setTimeout)}function failureCb(err){exitPromise(function(){callback(err)},client._setTimeout||setTimeout)}};Index2.prototype.clearIndex=function(callback){var indexObj=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/clear",hostType:"write",callback})};Index2.prototype.getSettings=function(opts,callback){arguments.length===1&&typeof opts=="function"&&(callback=opts,opts={}),opts=opts||{};var indexName=encodeURIComponent(this.indexName);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+indexName+"/settings?getVersion=2"+(opts.advanced?"&advanced="+opts.advanced:""),hostType:"read",callback})};Index2.prototype.searchSynonyms=function(params,callback){return typeof params=="function"?(callback=params,params={}):params===void 0&&(params={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:params,hostType:"read",callback})};function exportData(method,_hitsPerPage,callback){function search2(page2,_previous){var options={page:page2||0,hitsPerPage:_hitsPerPage||100},previous=_previous||[];return method(options).then(function(result){var hits=result.hits,nbHits=result.nbHits,current=hits.map(function(s){return delete s._highlightResult,s}),synonyms=previous.concat(current);return synonyms.length<nbHits?search2(options.page+1,synonyms):synonyms})}return search2().then(function(data){if(typeof callback=="function"){callback(data);return}return data})}Index2.prototype.exportSynonyms=function(hitsPerPage,callback){return exportData(this.searchSynonyms.bind(this),hitsPerPage,callback)};Index2.prototype.saveSynonym=function(synonym,opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={}),opts.forwardToSlaves!==void 0&&deprecateForwardToSlaves();var forwardToReplicas=opts.forwardToSlaves||opts.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(synonym.objectID)+"?forwardToReplicas="+forwardToReplicas,body:synonym,hostType:"write",callback})};Index2.prototype.getSynonym=function(objectID,callback){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(objectID),hostType:"read",callback})};Index2.prototype.deleteSynonym=function(objectID,opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={}),opts.forwardToSlaves!==void 0&&deprecateForwardToSlaves();var forwardToReplicas=opts.forwardToSlaves||opts.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(objectID)+"?forwardToReplicas="+forwardToReplicas,hostType:"write",callback})};Index2.prototype.clearSynonyms=function(opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={}),opts.forwardToSlaves!==void 0&&deprecateForwardToSlaves();var forwardToReplicas=opts.forwardToSlaves||opts.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+forwardToReplicas,hostType:"write",callback})};Index2.prototype.batchSynonyms=function(synonyms,opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={}),opts.forwardToSlaves!==void 0&&deprecateForwardToSlaves();var forwardToReplicas=opts.forwardToSlaves||opts.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+forwardToReplicas+"&replaceExistingSynonyms="+(opts.replaceExistingSynonyms?"true":"false"),hostType:"write",body:synonyms,callback})};Index2.prototype.searchRules=function(params,callback){return typeof params=="function"?(callback=params,params={}):params===void 0&&(params={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/search",body:params,hostType:"read",callback})};Index2.prototype.exportRules=function(hitsPerPage,callback){return exportData(this.searchRules.bind(this),hitsPerPage,callback)};Index2.prototype.saveRule=function(rule,opts,callback){if(typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={}),!rule.objectID)throw new errors6.AlgoliaSearchError("Missing or empty objectID field for rule");var forwardToReplicas=opts.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(rule.objectID)+"?forwardToReplicas="+forwardToReplicas,body:rule,hostType:"write",callback})};Index2.prototype.getRule=function(objectID,callback){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(objectID),hostType:"read",callback})};Index2.prototype.deleteRule=function(objectID,opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={});var forwardToReplicas=opts.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(objectID)+"?forwardToReplicas="+forwardToReplicas,hostType:"write",callback})};Index2.prototype.clearRules=function(opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={});var forwardToReplicas=opts.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/clear?forwardToReplicas="+forwardToReplicas,hostType:"write",callback})};Index2.prototype.batchRules=function(rules,opts,callback){typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={});var forwardToReplicas=opts.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/batch?forwardToReplicas="+forwardToReplicas+"&clearExistingRules="+(opts.clearExistingRules===!0?"true":"false"),hostType:"write",body:rules,callback})};Index2.prototype.exists=function(callback){var result=this.getSettings().then(function(){return!0}).catch(function(err){if(err instanceof errors6.AlgoliaSearchError&&err.statusCode===404)return!1;throw err});if(typeof callback!="function")return result;result.then(function(res){callback(null,res)}).catch(function(err){callback(err)})};Index2.prototype.findObject=function(findCallback,requestOptions,callback){requestOptions=requestOptions===void 0?{}:requestOptions;var paginate=requestOptions.paginate!==void 0?requestOptions.paginate:!0,query=requestOptions.query!==void 0?requestOptions.query:"",that=this,page2=0,paginateLoop=function(){return requestOptions.page=page2,that.search(query,requestOptions).then(function(result){for(var hits=result.hits,position=0;position<hits.length;position++){var hit=hits[position];if(findCallback(hit))return{object:hit,position,page:page2}}if(page2+=1,!paginate||page2>=result.nbPages)throw new errors6.ObjectNotFound("Object not found");return paginateLoop()})},promise=paginateLoop(page2);if(callback===void 0)return promise;promise.then(function(res){callback(null,res)}).catch(function(err){callback(err)})};Index2.prototype.getObjectPosition=function(result,objectID){for(var hits=result.hits,position=0;position<hits.length;position++)if(hits[position].objectID===objectID)return position;return-1};Index2.prototype.setSettings=function(settings,opts,callback){(arguments.length===1||typeof opts=="function")&&(callback=opts,opts={}),opts.forwardToSlaves!==void 0&&deprecateForwardToSlaves();var forwardToReplicas=opts.forwardToSlaves||opts.forwardToReplicas?"true":"false",indexObj=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/settings?forwardToReplicas="+forwardToReplicas,hostType:"write",body:settings,callback})};Index2.prototype.listUserKeys=deprecate(function(callback){return this.listApiKeys(callback)},deprecatedMessage("index.listUserKeys()","client.listApiKeys()"));Index2.prototype.listApiKeys=deprecate(function(callback){var indexObj=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/keys",hostType:"read",callback})},deprecatedMessage("index.listApiKeys()","client.listApiKeys()"));Index2.prototype.getUserKeyACL=deprecate(function(key,callback){return this.getApiKey(key,callback)},deprecatedMessage("index.getUserKeyACL()","client.getApiKey()"));Index2.prototype.getApiKey=deprecate(function(key,callback){var indexObj=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/keys/"+key,hostType:"read",callback})},deprecatedMessage("index.getApiKey()","client.getApiKey()"));Index2.prototype.deleteUserKey=deprecate(function(key,callback){return this.deleteApiKey(key,callback)},deprecatedMessage("index.deleteUserKey()","client.deleteApiKey()"));Index2.prototype.deleteApiKey=deprecate(function(key,callback){var indexObj=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(indexObj.indexName)+"/keys/"+key,hostType:"write",callback})},deprecatedMessage("index.deleteApiKey()","client.deleteApiKey()"));Index2.prototype.addUserKey=deprecate(function(acls,params,callback){return this.addApiKey(acls,params,callback)},deprecatedMessage("index.addUserKey()","client.addApiKey()"));Index2.prototype.addApiKey=deprecate(function(acls,params,callback){var isArray3=require_isarray(),usage="Usage: index.addApiKey(arrayOfAcls[, params, callback])";if(!isArray3(acls))throw new Error(usage);(arguments.length===1||typeof params=="function")&&(callback=params,params=null);var postObj={acl:acls};return params&&(postObj.validity=params.validity,postObj.maxQueriesPerIPPerHour=params.maxQueriesPerIPPerHour,postObj.maxHitsPerQuery=params.maxHitsPerQuery,postObj.description=params.description,params.queryParameters&&(postObj.queryParameters=this.as._getSearchParams(params.queryParameters,"")),postObj.referers=params.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:postObj,hostType:"write",callback})},deprecatedMessage("index.addApiKey()","client.addApiKey()"));Index2.prototype.addUserKeyWithValidity=deprecate(function(acls,params,callback){return this.addApiKey(acls,params,callback)},deprecatedMessage("index.addUserKeyWithValidity()","client.addApiKey()"));Index2.prototype.updateUserKey=deprecate(function(key,acls,params,callback){return this.updateApiKey(key,acls,params,callback)},deprecatedMessage("index.updateUserKey()","client.updateApiKey()"));Index2.prototype.updateApiKey=deprecate(function(key,acls,params,callback){var isArray3=require_isarray(),usage="Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])";if(!isArray3(acls))throw new Error(usage);(arguments.length===2||typeof params=="function")&&(callback=params,params=null);var putObj={acl:acls};return params&&(putObj.validity=params.validity,putObj.maxQueriesPerIPPerHour=params.maxQueriesPerIPPerHour,putObj.maxHitsPerQuery=params.maxHitsPerQuery,putObj.description=params.description,params.queryParameters&&(putObj.queryParameters=this.as._getSearchParams(params.queryParameters,"")),putObj.referers=params.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+key,body:putObj,hostType:"write",callback})},deprecatedMessage("index.updateApiKey()","client.updateApiKey()"))}});var require_ms=__commonJS({"node_modules/ms/index.js"(exports3,module2){init_define_process_env();init_shim();var s=1e3,m=s*60,h=m*60,d=h*24,y=d*365.25;module2.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0)return parse12(val);if(type==="number"&&isNaN(val)===!1)return options.long?fmtLong(val):fmtShort(val);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val))};function parse12(str){if(str=String(str),!(str.length>100)){var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(match){var n=parseFloat(match[1]),type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function fmtShort(ms){return ms>=d?Math.round(ms/d)+"d":ms>=h?Math.round(ms/h)+"h":ms>=m?Math.round(ms/m)+"m":ms>=s?Math.round(ms/s)+"s":ms+"ms"}function fmtLong(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(!(ms<n))return ms<n*1.5?Math.floor(ms/n)+" "+name:Math.ceil(ms/n)+" "+name+"s"}}});var require_debug=__commonJS({"node_modules/debug/src/debug.js"(exports3,module2){init_define_process_env();init_shim();exports3=module2.exports=createDebug.debug=createDebug.default=createDebug;exports3.coerce=coerce;exports3.disable=disable;exports3.enable=enable;exports3.enabled=enabled2;exports3.humanize=require_ms();exports3.names=[];exports3.skips=[];exports3.formatters={};var prevTime;function selectColor(namespace){var hash2=0,i;for(i in namespace)hash2=(hash2<<5)-hash2+namespace.charCodeAt(i),hash2|=0;return exports3.colors[Math.abs(hash2)%exports3.colors.length]}function createDebug(namespace){function debug2(){if(debug2.enabled){var self2=debug2,curr=+new Date,ms=curr-(prevTime||curr);self2.diff=ms,self2.prev=prevTime,self2.curr=curr,prevTime=curr;for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];args[0]=exports3.coerce(args[0]),typeof args[0]!="string"&&args.unshift("%O");var index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,function(match,format8){if(match==="%%")return match;index++;var formatter=exports3.formatters[format8];if(typeof formatter=="function"){var val=args[index];match=formatter.call(self2,val),args.splice(index,1),index--}return match}),exports3.formatArgs.call(self2,args);var logFn=debug2.log||exports3.log||console.log.bind(console);logFn.apply(self2,args)}}return debug2.namespace=namespace,debug2.enabled=exports3.enabled(namespace),debug2.useColors=exports3.useColors(),debug2.color=selectColor(namespace),typeof exports3.init=="function"&&exports3.init(debug2),debug2}function enable(namespaces){exports3.save(namespaces),exports3.names=[],exports3.skips=[];for(var split=(typeof namespaces=="string"?namespaces:"").split(/[\s,]+/),len=split.length,i=0;i<len;i++)split[i]&&(namespaces=split[i].replace(/\*/g,".*?"),namespaces[0]==="-"?exports3.skips.push(new RegExp("^"+namespaces.substr(1)+"$")):exports3.names.push(new RegExp("^"+namespaces+"$")))}function disable(){exports3.enable("")}function enabled2(name){var i,len;for(i=0,len=exports3.skips.length;i<len;i++)if(exports3.skips[i].test(name))return!1;for(i=0,len=exports3.names.length;i<len;i++)if(exports3.names[i].test(name))return!0;return!1}function coerce(val){return val instanceof Error?val.stack||val.message:val}}});var require_browser2=__commonJS({"node_modules/debug/src/browser.js"(exports3,module2){init_define_process_env();init_shim();exports3=module2.exports=require_debug();exports3.log=log4;exports3.formatArgs=formatArgs;exports3.save=save;exports3.load=load;exports3.useColors=useColors;exports3.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:localstorage();exports3.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}exports3.formatters.j=function(v){try{return JSON.stringify(v)}catch(err){return"[UnexpectedJSONParseError]: "+err.message}};function formatArgs(args){var useColors2=this.useColors;if(args[0]=(useColors2?"%c":"")+this.namespace+(useColors2?" %c":" ")+args[0]+(useColors2?"%c ":" ")+"+"+exports3.humanize(this.diff),!!useColors2){var c="color: "+this.color;args.splice(1,0,c,"color: inherit");var index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){match!=="%%"&&(index++,match==="%c"&&(lastC=index))}),args.splice(lastC,0,c)}}function log4(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{namespaces==null?exports3.storage.removeItem("debug"):exports3.storage.debug=namespaces}catch{}}function load(){var r2;try{r2=exports3.storage.debug}catch{}return!r2&&typeof import_process.default<"u"&&"env"in import_process.default&&(r2=define_process_env_default.DEBUG),r2}exports3.enable(load());function localstorage(){try{return window.localStorage}catch{}}}});var require_store=__commonJS({"node_modules/algoliasearch/src/store.js"(exports3,module2){init_define_process_env();init_shim();var debug2=require_browser2()("algoliasearch:src/hostIndexState.js"),localStorageNamespace="algoliasearch-client-js",store,moduleStore={state:{},set:function(key,data){return this.state[key]=data,this.state[key]},get:function(key){return this.state[key]||null}},localStorageStore={set:function(key,data){moduleStore.set(key,data);try{var namespace=JSON.parse(window.localStorage[localStorageNamespace]);return namespace[key]=data,window.localStorage[localStorageNamespace]=JSON.stringify(namespace),namespace[key]}catch(e){return localStorageFailure(key,e)}},get:function(key){try{return JSON.parse(window.localStorage[localStorageNamespace])[key]||null}catch(e){return localStorageFailure(key,e)}}};function localStorageFailure(key,e){return debug2("localStorage failed with",e),cleanup(),store=moduleStore,store.get(key)}store=supportsLocalStorage()?localStorageStore:moduleStore;module2.exports={get:getOrSet,set:getOrSet,supportsLocalStorage};function getOrSet(key,data){return arguments.length===1?store.get(key):store.set(key,data)}function supportsLocalStorage(){try{return"localStorage"in window&&window.localStorage!==null?(window.localStorage[localStorageNamespace]||window.localStorage.setItem(localStorageNamespace,JSON.stringify({})),!0):!1}catch{return!1}}function cleanup(){try{window.localStorage.removeItem(localStorageNamespace)}catch{}}}});var require_AlgoliaSearchCore=__commonJS({"node_modules/algoliasearch/src/AlgoliaSearchCore.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=AlgoliaSearchCore;var errors6=require_errors(),exitPromise=require_exitPromise(),IndexCore=require_IndexCore(),store=require_store(),MAX_API_KEY_LENGTH=500,RESET_APP_DATA_TIMER=define_process_env_default.RESET_APP_DATA_TIMER&&parseInt(define_process_env_default.RESET_APP_DATA_TIMER,10)||60*2*1e3;function AlgoliaSearchCore(applicationID,apiKey,opts){var debug2=require_browser2()("algoliasearch"),clone=require_clone(),isArray3=require_isarray(),map2=require_map(),usage="Usage: algoliasearch(applicationID, apiKey, opts)";if(opts._allowEmptyCredentials!==!0&&!applicationID)throw new errors6.AlgoliaSearchError("Please provide an application ID. "+usage);if(opts._allowEmptyCredentials!==!0&&!apiKey)throw new errors6.AlgoliaSearchError("Please provide an API key. "+usage);this.applicationID=applicationID,this.apiKey=apiKey,this.hosts={read:[],write:[]},opts=opts||{},this._timeouts=opts.timeouts||{connect:1*1e3,read:2*1e3,write:30*1e3},opts.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=opts.timeout);var protocol=opts.protocol||"https:";if(/:$/.test(protocol)||(protocol=protocol+":"),protocol!=="http:"&&protocol!=="https:")throw new errors6.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+opts.protocol+"`)");if(this._checkAppIdData(),opts.hosts)isArray3(opts.hosts)?(this.hosts.read=clone(opts.hosts),this.hosts.write=clone(opts.hosts)):(this.hosts.read=clone(opts.hosts.read),this.hosts.write=clone(opts.hosts.write));else{var defaultHosts=map2(this._shuffleResult,function(hostNumber){return applicationID+"-"+hostNumber+".algolianet.com"}),mainSuffix=(opts.dsn===!1?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+mainSuffix].concat(defaultHosts),this.hosts.write=[this.applicationID+".algolia.net"].concat(defaultHosts)}this.hosts.read=map2(this.hosts.read,prepareHost(protocol)),this.hosts.write=map2(this.hosts.write,prepareHost(protocol)),this.extraHeaders={},this.cache=opts._cache||{},this._ua=opts._ua,this._useCache=opts._useCache===void 0||opts._cache?!0:opts._useCache,this._useRequestCache=this._useCache&&opts._useRequestCache,this._useFallback=opts.useFallback===void 0?!0:opts.useFallback,this._setTimeout=opts._setTimeout,debug2("init done, %j",this)}AlgoliaSearchCore.prototype.initIndex=function(indexName){return new IndexCore(this,indexName)};AlgoliaSearchCore.prototype.setExtraHeader=function(name,value){this.extraHeaders[name.toLowerCase()]=value};AlgoliaSearchCore.prototype.getExtraHeader=function(name){return this.extraHeaders[name.toLowerCase()]};AlgoliaSearchCore.prototype.unsetExtraHeader=function(name){delete this.extraHeaders[name.toLowerCase()]};AlgoliaSearchCore.prototype.addAlgoliaAgent=function(algoliaAgent){var algoliaAgentWithDelimiter="; "+algoliaAgent;this._ua.indexOf(algoliaAgentWithDelimiter)===-1&&(this._ua+=algoliaAgentWithDelimiter)};AlgoliaSearchCore.prototype._jsonRequest=function(initialOpts){this._checkAppIdData();var requestDebug=require_browser2()("algoliasearch:"+initialOpts.url),body,cacheID,additionalUA=initialOpts.additionalUA||"",cache2=initialOpts.cache,client=this,tries=0,usingFallback=!1,hasFallback=client._useFallback&&client._request.fallback&&initialOpts.fallback,headers;this.apiKey.length>MAX_API_KEY_LENGTH&&initialOpts.body!==void 0&&(initialOpts.body.params!==void 0||initialOpts.body.requests!==void 0)?(initialOpts.body.apiKey=this.apiKey,headers=this._computeRequestHeaders({additionalUA,withApiKey:!1,headers:initialOpts.headers})):headers=this._computeRequestHeaders({additionalUA,headers:initialOpts.headers}),initialOpts.body!==void 0&&(body=safeJSONStringify(initialOpts.body)),requestDebug("request start");var debugData=[];function doRequest(requester,reqOpts){client._checkAppIdData();var startTime=new Date;if(client._useCache&&!client._useRequestCache&&(cacheID=initialOpts.url),client._useCache&&!client._useRequestCache&&body&&(cacheID+="_body_"+reqOpts.body),isCacheValidWithCurrentID(!client._useRequestCache,cache2,cacheID)){requestDebug("serving response from cache");var responseText=cache2[cacheID];return client._promise.resolve({body:JSON.parse(responseText),responseText})}if(tries>=client.hosts[initialOpts.hostType].length)return!hasFallback||usingFallback?(requestDebug("could not get any response"),client._promise.reject(new errors6.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+client.applicationID,{debugData}))):(requestDebug("switching to fallback"),tries=0,reqOpts.method=initialOpts.fallback.method,reqOpts.url=initialOpts.fallback.url,reqOpts.jsonBody=initialOpts.fallback.body,reqOpts.jsonBody&&(reqOpts.body=safeJSONStringify(reqOpts.jsonBody)),headers=client._computeRequestHeaders({additionalUA,headers:initialOpts.headers}),reqOpts.timeouts=client._getTimeoutsForRequest(initialOpts.hostType),client._setHostIndexByType(0,initialOpts.hostType),usingFallback=!0,doRequest(client._request.fallback,reqOpts));var currentHost=client._getHostByType(initialOpts.hostType),url9=currentHost+reqOpts.url,options={body:reqOpts.body,jsonBody:reqOpts.jsonBody,method:reqOpts.method,headers,timeouts:reqOpts.timeouts,debug:requestDebug,forceAuthHeaders:reqOpts.forceAuthHeaders};return requestDebug("method: %s, url: %s, headers: %j, timeouts: %d",options.method,url9,options.headers,options.timeouts),requester===client._request.fallback&&requestDebug("using fallback"),requester.call(client,url9,options).then(success,tryFallback);function success(httpResponse){var status=httpResponse&&httpResponse.body&&httpResponse.body.message&&httpResponse.body.status||httpResponse.statusCode||httpResponse&&httpResponse.body&&200;requestDebug("received response: statusCode: %s, computed statusCode: %d, headers: %j",httpResponse.statusCode,status,httpResponse.headers);var httpResponseOk=Math.floor(status/100)===2,endTime=new Date;if(debugData.push({currentHost,headers:removeCredentials(headers),content:body||null,contentLength:body!==void 0?body.length:null,method:reqOpts.method,timeouts:reqOpts.timeouts,url:reqOpts.url,startTime,endTime,duration:endTime-startTime,statusCode:status}),httpResponseOk)return client._useCache&&!client._useRequestCache&&cache2&&(cache2[cacheID]=httpResponse.responseText),{responseText:httpResponse.responseText,body:httpResponse.body};var shouldRetry=Math.floor(status/100)!==4;if(shouldRetry)return tries+=1,retryRequest();requestDebug("unrecoverable error");var unrecoverableError=new errors6.AlgoliaSearchError(httpResponse.body&&httpResponse.body.message,{debugData,statusCode:status});return client._promise.reject(unrecoverableError)}function tryFallback(err){requestDebug("error: %s, stack: %s",err.message,err.stack);var endTime=new Date;return debugData.push({currentHost,headers:removeCredentials(headers),content:body||null,contentLength:body!==void 0?body.length:null,method:reqOpts.method,timeouts:reqOpts.timeouts,url:reqOpts.url,startTime,endTime,duration:endTime-startTime}),err instanceof errors6.AlgoliaSearchError||(err=new errors6.Unknown(err&&err.message,err)),tries+=1,err instanceof errors6.Unknown||err instanceof errors6.UnparsableJSON||tries>=client.hosts[initialOpts.hostType].length&&(usingFallback||!hasFallback)?(err.debugData=debugData,client._promise.reject(err)):err instanceof errors6.RequestTimeout?retryRequestWithHigherTimeout():retryRequest()}function retryRequest(){return requestDebug("retrying request"),client._incrementHostIndex(initialOpts.hostType),doRequest(requester,reqOpts)}function retryRequestWithHigherTimeout(){return requestDebug("retrying request with higher timeout"),client._incrementHostIndex(initialOpts.hostType),client._incrementTimeoutMultipler(),reqOpts.timeouts=client._getTimeoutsForRequest(initialOpts.hostType),doRequest(requester,reqOpts)}}function isCacheValidWithCurrentID(useRequestCache,currentCache,currentCacheID){return client._useCache&&useRequestCache&&currentCache&&currentCache[currentCacheID]!==void 0}function interopCallbackReturn(request2,callback){if(isCacheValidWithCurrentID(client._useRequestCache,cache2,cacheID)&&request2.catch(function(){delete cache2[cacheID]}),typeof initialOpts.callback=="function")request2.then(function(content){exitPromise(function(){initialOpts.callback(null,callback(content))},client._setTimeout||setTimeout)},function(err){exitPromise(function(){initialOpts.callback(err)},client._setTimeout||setTimeout)});else return request2.then(callback)}if(client._useCache&&client._useRequestCache&&(cacheID=initialOpts.url),client._useCache&&client._useRequestCache&&body&&(cacheID+="_body_"+body),isCacheValidWithCurrentID(client._useRequestCache,cache2,cacheID)){requestDebug("serving request from cache");var maybePromiseForCache=cache2[cacheID],promiseForCache=typeof maybePromiseForCache.then!="function"?client._promise.resolve({responseText:maybePromiseForCache}):maybePromiseForCache;return interopCallbackReturn(promiseForCache,function(content){return JSON.parse(content.responseText)})}var request=doRequest(client._request,{url:initialOpts.url,method:initialOpts.method,body,jsonBody:initialOpts.body,timeouts:client._getTimeoutsForRequest(initialOpts.hostType),forceAuthHeaders:initialOpts.forceAuthHeaders});return client._useCache&&client._useRequestCache&&cache2&&(cache2[cacheID]=request),interopCallbackReturn(request,function(content){return content.body})};AlgoliaSearchCore.prototype._getSearchParams=function(args,params){if(args==null)return params;for(var key in args)key!==null&&args[key]!==void 0&&args.hasOwnProperty(key)&&(params+=params===""?"":"&",params+=key+"="+encodeURIComponent(Object.prototype.toString.call(args[key])==="[object Array]"?safeJSONStringify(args[key]):args[key]));return params};AlgoliaSearchCore.prototype._computeRequestHeaders=function(options){var forEach=require_foreach(),ua=options.additionalUA?this._ua+"; "+options.additionalUA:this._ua,requestHeaders={"x-algolia-agent":ua,"x-algolia-application-id":this.applicationID};return options.withApiKey!==!1&&(requestHeaders["x-algolia-api-key"]=this.apiKey),this.userToken&&(requestHeaders["x-algolia-usertoken"]=this.userToken),this.securityTags&&(requestHeaders["x-algolia-tagfilters"]=this.securityTags),forEach(this.extraHeaders,function(value,key){requestHeaders[key]=value}),options.headers&&forEach(options.headers,function(value,key){requestHeaders[key]=value}),requestHeaders};AlgoliaSearchCore.prototype.search=function(queries,opts,callback){var isArray3=require_isarray(),map2=require_map(),usage="Usage: client.search(arrayOfQueries[, callback])";if(!isArray3(queries))throw new Error(usage);typeof opts=="function"?(callback=opts,opts={}):opts===void 0&&(opts={});var client=this,postObj={requests:map2(queries,function(query){var params="";return query.query!==void 0&&(params+="query="+encodeURIComponent(query.query)),{indexName:query.indexName,params:client._getSearchParams(query.params,params)}})},JSONPParams=map2(postObj.requests,function(request,requestId){return requestId+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(request.indexName)+"?"+request.params)}).join("&"),url9="/1/indexes/*/queries";return opts.strategy!==void 0&&(postObj.strategy=opts.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:url9,body:postObj,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:JSONPParams}},callback})};AlgoliaSearchCore.prototype.searchForFacetValues=function(queries){var isArray3=require_isarray(),map2=require_map(),usage="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!isArray3(queries))throw new Error(usage);var client=this;return client._promise.all(map2(queries,function(query){if(!query||query.indexName===void 0||query.params.facetName===void 0||query.params.facetQuery===void 0)throw new Error(usage);var clone=require_clone(),omit=require_omit(),indexName=query.indexName,params=query.params,facetName=params.facetName,filteredParams=omit(clone(params),function(keyName){return keyName==="facetName"}),searchParameters=client._getSearchParams(filteredParams,"");return client._jsonRequest({cache:client.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(indexName)+"/facets/"+encodeURIComponent(facetName)+"/query",hostType:"read",body:{params:searchParameters}})}))};AlgoliaSearchCore.prototype.setSecurityTags=function(tags){if(Object.prototype.toString.call(tags)==="[object Array]"){for(var strTags=[],i=0;i<tags.length;++i)if(Object.prototype.toString.call(tags[i])==="[object Array]"){for(var oredTags=[],j2=0;j2<tags[i].length;++j2)oredTags.push(tags[i][j2]);strTags.push("("+oredTags.join(",")+")")}else strTags.push(tags[i]);tags=strTags.join(",")}this.securityTags=tags};AlgoliaSearchCore.prototype.setUserToken=function(userToken){this.userToken=userToken};AlgoliaSearchCore.prototype.clearCache=function(){this.cache={}};AlgoliaSearchCore.prototype.setRequestTimeout=function(milliseconds){milliseconds&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=milliseconds)};AlgoliaSearchCore.prototype.setTimeouts=function(timeouts){this._timeouts=timeouts};AlgoliaSearchCore.prototype.getTimeouts=function(){return this._timeouts};AlgoliaSearchCore.prototype._getAppIdData=function(){var data=store.get(this.applicationID);return data!==null&&this._cacheAppIdData(data),data};AlgoliaSearchCore.prototype._setAppIdData=function(data){return data.lastChange=new Date().getTime(),this._cacheAppIdData(data),store.set(this.applicationID,data)};AlgoliaSearchCore.prototype._checkAppIdData=function(){var data=this._getAppIdData(),now2=new Date().getTime();return data===null||now2-data.lastChange>RESET_APP_DATA_TIMER?this._resetInitialAppIdData(data):data};AlgoliaSearchCore.prototype._resetInitialAppIdData=function(data){var newData=data||{};return newData.hostIndexes={read:0,write:0},newData.timeoutMultiplier=1,newData.shuffleResult=newData.shuffleResult||shuffle([1,2,3]),this._setAppIdData(newData)};AlgoliaSearchCore.prototype._cacheAppIdData=function(data){this._hostIndexes=data.hostIndexes,this._timeoutMultiplier=data.timeoutMultiplier,this._shuffleResult=data.shuffleResult};AlgoliaSearchCore.prototype._partialAppIdDataUpdate=function(newData){var foreach=require_foreach(),currentData=this._getAppIdData();return foreach(newData,function(value,key){currentData[key]=value}),this._setAppIdData(currentData)};AlgoliaSearchCore.prototype._getHostByType=function(hostType){return this.hosts[hostType][this._getHostIndexByType(hostType)]};AlgoliaSearchCore.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier};AlgoliaSearchCore.prototype._getHostIndexByType=function(hostType){return this._hostIndexes[hostType]};AlgoliaSearchCore.prototype._setHostIndexByType=function(hostIndex,hostType){var clone=require_clone(),newHostIndexes=clone(this._hostIndexes);return newHostIndexes[hostType]=hostIndex,this._partialAppIdDataUpdate({hostIndexes:newHostIndexes}),hostIndex};AlgoliaSearchCore.prototype._incrementHostIndex=function(hostType){return this._setHostIndexByType((this._getHostIndexByType(hostType)+1)%this.hosts[hostType].length,hostType)};AlgoliaSearchCore.prototype._incrementTimeoutMultipler=function(){var timeoutMultiplier=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier})};AlgoliaSearchCore.prototype._getTimeoutsForRequest=function(hostType){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[hostType]*this._timeoutMultiplier}};function prepareHost(protocol){return function(host){return protocol+"//"+host.toLowerCase()}}function safeJSONStringify(obj){if(Array.prototype.toJSON===void 0)return JSON.stringify(obj);var toJSON=Array.prototype.toJSON;delete Array.prototype.toJSON;var out=JSON.stringify(obj);return Array.prototype.toJSON=toJSON,out}function shuffle(array){for(var currentIndex=array.length,temporaryValue,randomIndex;currentIndex!==0;)randomIndex=Math.floor(Math.random()*currentIndex),currentIndex-=1,temporaryValue=array[currentIndex],array[currentIndex]=array[randomIndex],array[randomIndex]=temporaryValue;return array}function removeCredentials(headers){var newHeaders={};for(var headerName in headers)if(Object.prototype.hasOwnProperty.call(headers,headerName)){var value;headerName==="x-algolia-api-key"||headerName==="x-algolia-application-id"?value="**hidden for security purposes**":value=headers[headerName],newHeaders[headerName]=value}return newHeaders}}});var require_createAnalyticsClient=__commonJS({"node_modules/algoliasearch/src/createAnalyticsClient.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=createAnalyticsClient;var algoliasearch2=require_algoliasearch();function createAnalyticsClient(appId,apiKey,opts){var analytics4={};return opts=opts||{},opts.hosts=opts.hosts||["analytics.algolia.com","analytics.algolia.com","analytics.algolia.com","analytics.algolia.com"],opts.protocol=opts.protocol||"https:",analytics4.as=algoliasearch2(appId,apiKey,opts),analytics4.getABTests=function(_params,callback){var params=params||{},offset=params.offset||0,limit2=params.limit||10;return this.as._jsonRequest({method:"GET",url:"/2/abtests?offset="+encodeURIComponent(offset)+"&limit="+encodeURIComponent(limit2),hostType:"read",forceAuthHeaders:!0,callback})},analytics4.getABTest=function(abTestID,callback){return this.as._jsonRequest({method:"GET",url:"/2/abtests/"+encodeURIComponent(abTestID),hostType:"read",forceAuthHeaders:!0,callback})},analytics4.addABTest=function(abTest,callback){return this.as._jsonRequest({method:"POST",url:"/2/abtests",body:abTest,hostType:"read",forceAuthHeaders:!0,callback})},analytics4.stopABTest=function(abTestID,callback){return this.as._jsonRequest({method:"POST",url:"/2/abtests/"+encodeURIComponent(abTestID)+"/stop",hostType:"read",forceAuthHeaders:!0,callback})},analytics4.deleteABTest=function(abTestID,callback){return this.as._jsonRequest({method:"DELETE",url:"/2/abtests/"+encodeURIComponent(abTestID),hostType:"write",forceAuthHeaders:!0,callback})},analytics4.waitTask=function(indexName,taskID,callback){return this.as.initIndex(indexName).waitTask(taskID,callback)},analytics4}}});var require_AlgoliaSearch=__commonJS({"node_modules/algoliasearch/src/AlgoliaSearch.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=AlgoliaSearch;var Index2=require_Index(),deprecate=require_deprecate(),deprecatedMessage=require_deprecatedMessage(),AlgoliaSearchCore=require_AlgoliaSearchCore(),inherits=require_inherits_browser(),errors6=require_errors();function AlgoliaSearch(){AlgoliaSearchCore.apply(this,arguments)}inherits(AlgoliaSearch,AlgoliaSearchCore);AlgoliaSearch.prototype.deleteIndex=function(indexName,callback){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(indexName),hostType:"write",callback})};AlgoliaSearch.prototype.moveIndex=function(srcIndexName,dstIndexName,callback){var postObj={operation:"move",destination:dstIndexName};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(srcIndexName)+"/operation",body:postObj,hostType:"write",callback})};AlgoliaSearch.prototype.copyIndex=function(srcIndexName,dstIndexName,scopeOrCallback,_callback){var postObj={operation:"copy",destination:dstIndexName},callback=_callback;if(typeof scopeOrCallback=="function")callback=scopeOrCallback;else if(Array.isArray(scopeOrCallback)&&scopeOrCallback.length>0)postObj.scope=scopeOrCallback;else if(typeof scopeOrCallback<"u")throw new Error("the scope given to `copyIndex` was not an array with settings, synonyms or rules");return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(srcIndexName)+"/operation",body:postObj,hostType:"write",callback})};AlgoliaSearch.prototype.getLogs=function(offset,length,callback){var clone=require_clone(),params={};return typeof offset=="object"?(params=clone(offset),callback=length):arguments.length===0||typeof offset=="function"?callback=offset:arguments.length===1||typeof length=="function"?(callback=length,params.offset=offset):(params.offset=offset,params.length=length),params.offset===void 0&&(params.offset=0),params.length===void 0&&(params.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(params,""),hostType:"read",callback})};AlgoliaSearch.prototype.listIndexes=function(page2,callback){var params="";return page2===void 0||typeof page2=="function"?callback=page2:params="?page="+page2,this._jsonRequest({method:"GET",url:"/1/indexes"+params,hostType:"read",callback})};AlgoliaSearch.prototype.initIndex=function(indexName){return new Index2(this,indexName)};AlgoliaSearch.prototype.initAnalytics=function(opts){var createAnalyticsClient=require_createAnalyticsClient();return createAnalyticsClient(this.applicationID,this.apiKey,opts)};AlgoliaSearch.prototype.listUserKeys=deprecate(function(callback){return this.listApiKeys(callback)},deprecatedMessage("client.listUserKeys()","client.listApiKeys()"));AlgoliaSearch.prototype.listApiKeys=function(callback){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback})};AlgoliaSearch.prototype.getUserKeyACL=deprecate(function(key,callback){return this.getApiKey(key,callback)},deprecatedMessage("client.getUserKeyACL()","client.getApiKey()"));AlgoliaSearch.prototype.getApiKey=function(key,callback){return this._jsonRequest({method:"GET",url:"/1/keys/"+key,hostType:"read",callback})};AlgoliaSearch.prototype.deleteUserKey=deprecate(function(key,callback){return this.deleteApiKey(key,callback)},deprecatedMessage("client.deleteUserKey()","client.deleteApiKey()"));AlgoliaSearch.prototype.deleteApiKey=function(key,callback){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+key,hostType:"write",callback})};AlgoliaSearch.prototype.restoreApiKey=function(key,callback){return this._jsonRequest({method:"POST",url:"/1/keys/"+key+"/restore",hostType:"write",callback})};AlgoliaSearch.prototype.addUserKey=deprecate(function(acls,params,callback){return this.addApiKey(acls,params,callback)},deprecatedMessage("client.addUserKey()","client.addApiKey()"));AlgoliaSearch.prototype.addApiKey=function(acls,params,callback){var isArray3=require_isarray(),usage="Usage: client.addApiKey(arrayOfAcls[, params, callback])";if(!isArray3(acls))throw new Error(usage);(arguments.length===1||typeof params=="function")&&(callback=params,params=null);var postObj={acl:acls};return params&&(postObj.validity=params.validity,postObj.maxQueriesPerIPPerHour=params.maxQueriesPerIPPerHour,postObj.maxHitsPerQuery=params.maxHitsPerQuery,postObj.indexes=params.indexes,postObj.description=params.description,params.queryParameters&&(postObj.queryParameters=this._getSearchParams(params.queryParameters,"")),postObj.referers=params.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:postObj,hostType:"write",callback})};AlgoliaSearch.prototype.addUserKeyWithValidity=deprecate(function(acls,params,callback){return this.addApiKey(acls,params,callback)},deprecatedMessage("client.addUserKeyWithValidity()","client.addApiKey()"));AlgoliaSearch.prototype.updateUserKey=deprecate(function(key,acls,params,callback){return this.updateApiKey(key,acls,params,callback)},deprecatedMessage("client.updateUserKey()","client.updateApiKey()"));AlgoliaSearch.prototype.updateApiKey=function(key,acls,params,callback){var isArray3=require_isarray(),usage="Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])";if(!isArray3(acls))throw new Error(usage);(arguments.length===2||typeof params=="function")&&(callback=params,params=null);var putObj={acl:acls};return params&&(putObj.validity=params.validity,putObj.maxQueriesPerIPPerHour=params.maxQueriesPerIPPerHour,putObj.maxHitsPerQuery=params.maxHitsPerQuery,putObj.indexes=params.indexes,putObj.description=params.description,params.queryParameters&&(putObj.queryParameters=this._getSearchParams(params.queryParameters,"")),putObj.referers=params.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+key,body:putObj,hostType:"write",callback})};AlgoliaSearch.prototype.startQueriesBatch=deprecate(function(){this._batch=[]},deprecatedMessage("client.startQueriesBatch()","client.search()"));AlgoliaSearch.prototype.addQueryInBatch=deprecate(function(indexName,query,args){this._batch.push({indexName,query,params:args})},deprecatedMessage("client.addQueryInBatch()","client.search()"));AlgoliaSearch.prototype.sendQueriesBatch=deprecate(function(callback){return this.search(this._batch,callback)},deprecatedMessage("client.sendQueriesBatch()","client.search()"));AlgoliaSearch.prototype.batch=function(operations,callback){var isArray3=require_isarray(),usage="Usage: client.batch(operations[, callback])";if(!isArray3(operations))throw new Error(usage);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:operations},hostType:"write",callback})};AlgoliaSearch.prototype.assignUserID=function(data,callback){if(!data.userID||!data.cluster)throw new errors6.AlgoliaSearchError("You have to provide both a userID and cluster",data);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping",hostType:"write",body:{cluster:data.cluster},callback,headers:{"x-algolia-user-id":data.userID}})};AlgoliaSearch.prototype.assignUserIDs=function(data,callback){if(!data.userIDs||!data.cluster)throw new errors6.AlgoliaSearchError("You have to provide both an array of userIDs and cluster",data);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/batch",hostType:"write",body:{cluster:data.cluster,users:data.userIDs},callback})};AlgoliaSearch.prototype.getTopUserID=function(callback){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/top",hostType:"read",callback})};AlgoliaSearch.prototype.getUserID=function(data,callback){if(!data.userID)throw new errors6.AlgoliaSearchError("You have to provide a userID",{debugData:data});return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/"+data.userID,hostType:"read",callback})};AlgoliaSearch.prototype.listClusters=function(callback){return this._jsonRequest({method:"GET",url:"/1/clusters",hostType:"read",callback})};AlgoliaSearch.prototype.listUserIDs=function(data,callback){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping",body:data,hostType:"read",callback})};AlgoliaSearch.prototype.removeUserID=function(data,callback){if(!data.userID)throw new errors6.AlgoliaSearchError("You have to provide a userID",{debugData:data});return this._jsonRequest({method:"DELETE",url:"/1/clusters/mapping",hostType:"write",callback,headers:{"x-algolia-user-id":data.userID}})};AlgoliaSearch.prototype.searchUserIDs=function(data,callback){return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/search",body:data,hostType:"read",callback})};AlgoliaSearch.prototype.setPersonalizationStrategy=function(data,callback){return this._jsonRequest({method:"POST",url:"/1/recommendation/personalization/strategy",body:data,hostType:"write",callback})};AlgoliaSearch.prototype.getPersonalizationStrategy=function(callback){return this._jsonRequest({method:"GET",url:"/1/recommendation/personalization/strategy",hostType:"read",callback})};AlgoliaSearch.prototype.destroy=notImplemented;AlgoliaSearch.prototype.enableRateLimitForward=notImplemented;AlgoliaSearch.prototype.disableRateLimitForward=notImplemented;AlgoliaSearch.prototype.useSecuredAPIKey=notImplemented;AlgoliaSearch.prototype.disableSecuredAPIKey=notImplemented;AlgoliaSearch.prototype.generateSecuredApiKey=notImplemented;AlgoliaSearch.prototype.getSecuredApiKeyRemainingValidity=notImplemented;function notImplemented(){var message=`Not implemented in this environment.
If you feel this is a mistake, write to support@algolia.com`;throw new errors6.AlgoliaSearchError(message)}}});var require_window=__commonJS({"node_modules/global/window.js"(exports3,module2){init_define_process_env();init_shim();var win;typeof window<"u"||typeof window<"u"?win=window:typeof self<"u"?win=self:win={};module2.exports=win}});var require_es6_promise=__commonJS({"node_modules/es6-promise/dist/es6-promise.js"(exports3,module2){init_define_process_env();init_shim();(function(global,factory){typeof exports3=="object"&&typeof module2<"u"?module2.exports=factory():typeof define=="function"&&define.amd?define(factory):global.ES6Promise=factory()})(exports3,function(){"use strict";function objectOrFunction(x){var type=typeof x;return x!==null&&(type==="object"||type==="function")}function isFunction2(x){return typeof x=="function"}var _isArray=void 0;Array.isArray?_isArray=Array.isArray:_isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"};var isArray3=_isArray,len=0,vertxNext=void 0,customSchedulerFn=void 0,asap=function(callback,arg){queue[len]=callback,queue[len+1]=arg,len+=2,len===2&&(customSchedulerFn?customSchedulerFn(flush):scheduleFlush())};function setScheduler(scheduleFn){customSchedulerFn=scheduleFn}function setAsap(asapFn){asap=asapFn}var browserWindow=typeof window<"u"?window:void 0,browserGlobal=browserWindow||{},BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver,isNode=typeof self>"u"&&typeof import_process.default<"u"&&{}.toString.call(import_process.default)==="[object process]",isWorker=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function useNextTick(){return function(){return queueMicrotask(flush)}}function useVertxTimer(){return typeof vertxNext<"u"?function(){vertxNext(flush)}:useSetTimeout()}function useMutationObserver(){var iterations=0,observer2=new BrowserMutationObserver(flush),node=document.createTextNode("");return observer2.observe(node,{characterData:!0}),function(){node.data=iterations=++iterations%2}}function useMessageChannel(){var channel=new MessageChannel;return channel.port1.onmessage=flush,function(){return channel.port2.postMessage(0)}}function useSetTimeout(){var globalSetTimeout=setTimeout;return function(){return globalSetTimeout(flush,1)}}var queue=new Array(1e3);function flush(){for(var i=0;i<len;i+=2){var callback=queue[i],arg=queue[i+1];callback(arg),queue[i]=void 0,queue[i+1]=void 0}len=0}function attemptVertx(){try{var vertx=Function("return this")().require("vertx");return vertxNext=vertx.runOnLoop||vertx.runOnContext,useVertxTimer()}catch{return useSetTimeout()}}var scheduleFlush=void 0;isNode?scheduleFlush=useNextTick():BrowserMutationObserver?scheduleFlush=useMutationObserver():isWorker?scheduleFlush=useMessageChannel():browserWindow===void 0&&typeof __require=="function"?scheduleFlush=attemptVertx():scheduleFlush=useSetTimeout();function then(onFulfillment,onRejection){var parent=this,child=new this.constructor(noop);child[PROMISE_ID]===void 0&&makePromise(child);var _state=parent._state;if(_state){var callback=arguments[_state-1];asap(function(){return invokeCallback(_state,child,callback,parent._result)})}else subscribe(parent,child,onFulfillment,onRejection);return child}function resolve$1(object2){var Constructor=this;if(object2&&typeof object2=="object"&&object2.constructor===Constructor)return object2;var promise=new Constructor(noop);return resolve(promise,object2),promise}var PROMISE_ID=Math.random().toString(36).substring(2);function noop(){}var PENDING2=void 0,FULFILLED=1,REJECTED=2;function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}function tryThen(then$$1,value,fulfillmentHandler,rejectionHandler){try{then$$1.call(value,fulfillmentHandler,rejectionHandler)}catch(e){return e}}function handleForeignThenable(promise,thenable,then$$1){asap(function(promise2){var sealed=!1,error2=tryThen(then$$1,thenable,function(value){sealed||(sealed=!0,thenable!==value?resolve(promise2,value):fulfill(promise2,value))},function(reason){sealed||(sealed=!0,reject(promise2,reason))},"Settle: "+(promise2._label||" unknown promise"));!sealed&&error2&&(sealed=!0,reject(promise2,error2))},promise)}function handleOwnThenable(promise,thenable){thenable._state===FULFILLED?fulfill(promise,thenable._result):thenable._state===REJECTED?reject(promise,thenable._result):subscribe(thenable,void 0,function(value){return resolve(promise,value)},function(reason){return reject(promise,reason)})}function handleMaybeThenable(promise,maybeThenable,then$$1){maybeThenable.constructor===promise.constructor&&then$$1===then&&maybeThenable.constructor.resolve===resolve$1?handleOwnThenable(promise,maybeThenable):then$$1===void 0?fulfill(promise,maybeThenable):isFunction2(then$$1)?handleForeignThenable(promise,maybeThenable,then$$1):fulfill(promise,maybeThenable)}function resolve(promise,value){if(promise===value)reject(promise,selfFulfillment());else if(objectOrFunction(value)){var then$$1=void 0;try{then$$1=value.then}catch(error2){reject(promise,error2);return}handleMaybeThenable(promise,value,then$$1)}else fulfill(promise,value)}function publishRejection(promise){promise._onerror&&promise._onerror(promise._result),publish(promise)}function fulfill(promise,value){promise._state===PENDING2&&(promise._result=value,promise._state=FULFILLED,promise._subscribers.length!==0&&asap(publish,promise))}function reject(promise,reason){promise._state===PENDING2&&(promise._state=REJECTED,promise._result=reason,asap(publishRejection,promise))}function subscribe(parent,child,onFulfillment,onRejection){var _subscribers=parent._subscribers,length=_subscribers.length;parent._onerror=null,_subscribers[length]=child,_subscribers[length+FULFILLED]=onFulfillment,_subscribers[length+REJECTED]=onRejection,length===0&&parent._state&&asap(publish,parent)}function publish(promise){var subscribers=promise._subscribers,settled=promise._state;if(subscribers.length!==0){for(var child=void 0,callback=void 0,detail=promise._result,i=0;i<subscribers.length;i+=3)child=subscribers[i],callback=subscribers[i+settled],child?invokeCallback(settled,child,callback,detail):callback(detail);promise._subscribers.length=0}}function invokeCallback(settled,promise,callback,detail){var hasCallback=isFunction2(callback),value=void 0,error2=void 0,succeeded=!0;if(hasCallback){try{value=callback(detail)}catch(e){succeeded=!1,error2=e}if(promise===value){reject(promise,cannotReturnOwn());return}}else value=detail;promise._state!==PENDING2||(hasCallback&&succeeded?resolve(promise,value):succeeded===!1?reject(promise,error2):settled===FULFILLED?fulfill(promise,value):settled===REJECTED&&reject(promise,value))}function initializePromise(promise,resolver){try{resolver(function(value){resolve(promise,value)},function(reason){reject(promise,reason)})}catch(e){reject(promise,e)}}var id=0;function nextId(){return id++}function makePromise(promise){promise[PROMISE_ID]=id++,promise._state=void 0,promise._result=void 0,promise._subscribers=[]}function validationError(){return new Error("Array Methods must be provided an Array")}var Enumerator=function(){function Enumerator2(Constructor,input2){this._instanceConstructor=Constructor,this.promise=new Constructor(noop),this.promise[PROMISE_ID]||makePromise(this.promise),isArray3(input2)?(this.length=input2.length,this._remaining=input2.length,this._result=new Array(this.length),this.length===0?fulfill(this.promise,this._result):(this.length=this.length||0,this._enumerate(input2),this._remaining===0&&fulfill(this.promise,this._result))):reject(this.promise,validationError())}return Enumerator2.prototype._enumerate=function(input2){for(var i=0;this._state===PENDING2&&i<input2.length;i++)this._eachEntry(input2[i],i)},Enumerator2.prototype._eachEntry=function(entry,i){var c=this._instanceConstructor,resolve$$1=c.resolve;if(resolve$$1===resolve$1){var _then=void 0,error2=void 0,didError=!1;try{_then=entry.then}catch(e){didError=!0,error2=e}if(_then===then&&entry._state!==PENDING2)this._settledAt(entry._state,i,entry._result);else if(typeof _then!="function")this._remaining--,this._result[i]=entry;else if(c===Promise$1){var promise=new c(noop);didError?reject(promise,error2):handleMaybeThenable(promise,entry,_then),this._willSettleAt(promise,i)}else this._willSettleAt(new c(function(resolve$$12){return resolve$$12(entry)}),i)}else this._willSettleAt(resolve$$1(entry),i)},Enumerator2.prototype._settledAt=function(state4,i,value){var promise=this.promise;promise._state===PENDING2&&(this._remaining--,state4===REJECTED?reject(promise,value):this._result[i]=value),this._remaining===0&&fulfill(promise,this._result)},Enumerator2.prototype._willSettleAt=function(promise,i){var enumerator=this;subscribe(promise,void 0,function(value){return enumerator._settledAt(FULFILLED,i,value)},function(reason){return enumerator._settledAt(REJECTED,i,reason)})},Enumerator2}();function all4(entries){return new Enumerator(this,entries).promise}function race(entries){var Constructor=this;return isArray3(entries)?new Constructor(function(resolve2,reject2){for(var length=entries.length,i=0;i<length;i++)Constructor.resolve(entries[i]).then(resolve2,reject2)}):new Constructor(function(_,reject2){return reject2(new TypeError("You must pass an array to race."))})}function reject$1(reason){var Constructor=this,promise=new Constructor(noop);return reject(promise,reason),promise}function needsResolver(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Promise$1=function(){function Promise16(resolver){this[PROMISE_ID]=nextId(),this._result=this._state=void 0,this._subscribers=[],noop!==resolver&&(typeof resolver!="function"&&needsResolver(),this instanceof Promise16?initializePromise(this,resolver):needsNew())}return Promise16.prototype.catch=function(onRejection){return this.then(null,onRejection)},Promise16.prototype.finally=function(callback){var promise=this,constructor=promise.constructor;return isFunction2(callback)?promise.then(function(value){return constructor.resolve(callback()).then(function(){return value})},function(reason){return constructor.resolve(callback()).then(function(){throw reason})}):promise.then(callback,callback)},Promise16}();Promise$1.prototype.then=then,Promise$1.all=all4,Promise$1.race=race,Promise$1.resolve=resolve$1,Promise$1.reject=reject$1,Promise$1._setScheduler=setScheduler,Promise$1._setAsap=setAsap,Promise$1._asap=asap;function polyfill(){var local=void 0;if(typeof window<"u")local=window;else if(typeof self<"u")local=self;else try{local=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var P=local.Promise;if(P){var promiseToString=null;try{promiseToString=Object.prototype.toString.call(P.resolve())}catch{}if(promiseToString==="[object Promise]"&&!P.cast)return}local.Promise=Promise$1}return Promise$1.polyfill=polyfill,Promise$1.Promise=Promise$1,Promise$1})}});var require_encode2=__commonJS({"node_modules/querystring-es3/encode.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module2.exports=function(obj,sep,eq2,name){return sep=sep||"&",eq2=eq2||"=",obj===null&&(obj=void 0),typeof obj=="object"?map2(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq2;return isArray3(obj[k])?map2(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq2+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray3=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map2(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i<xs.length;i++)res.push(f(xs[i],i));return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&res.push(key);return res}}});var require_inline_headers=__commonJS({"node_modules/algoliasearch/src/browser/inline-headers.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=inlineHeaders;var encode4=require_encode2();function inlineHeaders(url9,headers){return/\?/.test(url9)?url9+="&":url9+="?",url9+encode4(headers)}}});var require_jsonp_request=__commonJS({"node_modules/algoliasearch/src/browser/jsonp-request.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports=jsonpRequest;var errors6=require_errors(),JSONPCounter=0;function jsonpRequest(url9,opts,cb){if(opts.method!=="GET"){cb(new Error("Method "+opts.method+" "+url9+" is not supported by JSONP."));return}opts.debug("JSONP: start");var cbCalled=!1,timedOut=!1;JSONPCounter+=1;var head=document.getElementsByTagName("head")[0],script=document.createElement("script"),cbName="algoliaJSONP_"+JSONPCounter,done=!1;window[cbName]=function(data){if(removeGlobals(),timedOut){opts.debug("JSONP: Late answer, ignoring");return}cbCalled=!0,clean(),cb(null,{body:data,responseText:JSON.stringify(data)})},url9+="&callback="+cbName,opts.jsonBody&&opts.jsonBody.params&&(url9+="&"+opts.jsonBody.params);var ontimeout=setTimeout(timeout,opts.timeouts.complete);script.onreadystatechange=readystatechange,script.onload=success,script.onerror=error2,script.async=!0,script.defer=!0,script.src=url9,head.appendChild(script);function success(){opts.debug("JSONP: success"),!(done||timedOut)&&(done=!0,cbCalled||(opts.debug("JSONP: Fail. Script loaded but did not call the callback"),clean(),cb(new errors6.JSONPScriptFail)))}function readystatechange(){(this.readyState==="loaded"||this.readyState==="complete")&&success()}function clean(){clearTimeout(ontimeout),script.onload=null,script.onreadystatechange=null,script.onerror=null,head.removeChild(script)}function removeGlobals(){try{delete window[cbName],delete window[cbName+"_loaded"]}catch{window[cbName]=window[cbName+"_loaded"]=void 0}}function timeout(){opts.debug("JSONP: Script timeout"),timedOut=!0,clean(),cb(new errors6.RequestTimeout)}function error2(){opts.debug("JSONP: Script error"),!(done||timedOut)&&(clean(),cb(new errors6.JSONPScriptError))}}}});var require_decode2=__commonJS({"node_modules/querystring-es3/decode.js"(exports3,module2){"use strict";init_define_process_env();init_shim();function hasOwnProperty10(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module2.exports=function(qs,sep,eq2,options){sep=sep||"&",eq2=eq2||"=";var obj={};if(typeof qs!="string"||qs.length===0)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&typeof options.maxKeys=="number"&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq2),kstr,vstr,k,v;idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty10(obj,k)?isArray3(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray3=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}}});var require_querystring_es3=__commonJS({"node_modules/querystring-es3/index.js"(exports3){"use strict";init_define_process_env();init_shim();exports3.decode=exports3.parse=require_decode2();exports3.encode=exports3.stringify=require_encode2()}});var require_places=__commonJS({"node_modules/algoliasearch/src/places.js"(exports3,module2){init_define_process_env();init_shim();module2.exports=createPlacesClient;var qs3=require_querystring_es3(),buildSearchMethod=require_buildSearchMethod();function createPlacesClient(algoliasearch2){return function(appID,apiKey,opts){var cloneDeep=require_clone();opts=opts&&cloneDeep(opts)||{},opts.hosts=opts.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],(arguments.length===0||typeof appID=="object"||appID===void 0)&&(appID="",apiKey="",opts._allowEmptyCredentials=!0);var client=algoliasearch2(appID,apiKey,opts),index=client.initIndex("places");return index.search=buildSearchMethod("query","/1/places/query"),index.reverse=function(options,callback){var encoded=qs3.encode(options);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+encoded,hostType:"read",callback})},index.getObject=function(objectID,callback){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(objectID),hostType:"read",callback})},index}}}});var require_version=__commonJS({"node_modules/algoliasearch/src/version.js"(exports3,module2){"use strict";init_define_process_env();init_shim();module2.exports="3.35.1"}});var require_createAlgoliasearch=__commonJS({"node_modules/algoliasearch/src/browser/createAlgoliasearch.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var global=require_window(),Promise16=global.Promise||require_es6_promise().Promise;module2.exports=function(AlgoliaSearch,uaSuffix){var inherits=require_inherits_browser(),errors6=require_errors(),inlineHeaders=require_inline_headers(),jsonpRequest=require_jsonp_request(),places=require_places();uaSuffix=uaSuffix||"",define_process_env_default.NODE_ENV==="debug"&&require_browser2().enable("algoliasearch*");function algoliasearch2(applicationID,apiKey,opts){var cloneDeep=require_clone();return opts=cloneDeep(opts||{}),opts._ua=opts._ua||algoliasearch2.ua,new AlgoliaSearchBrowser(applicationID,apiKey,opts)}algoliasearch2.version=require_version(),algoliasearch2.ua="Algolia for JavaScript ("+algoliasearch2.version+"); "+uaSuffix,algoliasearch2.initPlaces=places(algoliasearch2),global.__algolia={debug:require_browser2(),algoliasearch:algoliasearch2};var support={hasXMLHttpRequest:"XMLHttpRequest"in global,hasXDomainRequest:"XDomainRequest"in global};support.hasXMLHttpRequest&&(support.cors="withCredentials"in new XMLHttpRequest);function AlgoliaSearchBrowser(){AlgoliaSearch.apply(this,arguments)}return inherits(AlgoliaSearchBrowser,AlgoliaSearch),AlgoliaSearchBrowser.prototype._request=function(url9,opts){return new Promise16(function(resolve,reject){if(!support.cors&&!support.hasXDomainRequest){reject(new errors6.Network("CORS not supported"));return}url9=inlineHeaders(url9,opts.headers);var body=opts.body,req=support.cors?new XMLHttpRequest:new XDomainRequest,reqTimeout,timedOut,connected=!1;reqTimeout=setTimeout(onTimeout,opts.timeouts.connect),req.onprogress=onProgress,"onreadystatechange"in req&&(req.onreadystatechange=onReadyStateChange),req.onload=onLoad,req.onerror=onError,req instanceof XMLHttpRequest?(req.open(opts.method,url9,!0),opts.forceAuthHeaders&&(req.setRequestHeader("x-algolia-application-id",opts.headers["x-algolia-application-id"]),req.setRequestHeader("x-algolia-api-key",opts.headers["x-algolia-api-key"]))):req.open(opts.method,url9),support.cors&&(body&&(opts.method==="POST"?req.setRequestHeader("content-type","application/x-www-form-urlencoded"):req.setRequestHeader("content-type","application/json")),req.setRequestHeader("accept","application/json")),body?req.send(body):req.send();function onLoad(){if(!timedOut){clearTimeout(reqTimeout);var out;try{out={body:JSON.parse(req.responseText),responseText:req.responseText,statusCode:req.status,headers:req.getAllResponseHeaders&&req.getAllResponseHeaders()||{}}}catch{out=new errors6.UnparsableJSON({more:req.responseText})}out instanceof errors6.UnparsableJSON?reject(out):resolve(out)}}function onError(event){timedOut||(clearTimeout(reqTimeout),reject(new errors6.Network({more:event})))}function onTimeout(){timedOut=!0,req.abort(),reject(new errors6.RequestTimeout)}function onConnect(){connected=!0,clearTimeout(reqTimeout),reqTimeout=setTimeout(onTimeout,opts.timeouts.complete)}function onProgress(){connected||onConnect()}function onReadyStateChange(){!connected&&req.readyState>1&&onConnect()}})},AlgoliaSearchBrowser.prototype._request.fallback=function(url9,opts){return url9=inlineHeaders(url9,opts.headers),new Promise16(function(resolve,reject){jsonpRequest(url9,opts,function(err,content){if(err){reject(err);return}resolve(content)})})},AlgoliaSearchBrowser.prototype._promise={reject:function(val){return Promise16.reject(val)},resolve:function(val){return Promise16.resolve(val)},delay:function(ms){return new Promise16(function(resolve){setTimeout(resolve,ms)})},all:function(promises){return Promise16.all(promises)}},algoliasearch2}}});var require_algoliasearch=__commonJS({"node_modules/algoliasearch/src/browser/builds/algoliasearch.js"(exports3,module2){"use strict";init_define_process_env();init_shim();var AlgoliaSearch=require_AlgoliaSearch(),createAlgoliasearch=require_createAlgoliasearch();module2.exports=createAlgoliasearch(AlgoliaSearch,"Browser")}});var latest_exports={};__export(latest_exports,{default:()=>latest_default});var latest_default,init_latest=__esm({"lib-browser/pv/latest.js"(){"use strict";init_define_process_env();init_shim();latest_default={fix_server_dates:!0,fix_server_field_types:types=>types,old_server_list:!1,bubble_props_as_functions:!0,responsive_version:1}}});var latest_exports2={};__export(latest_exports2,{MAX_POPUP_ZINDEX:()=>MAX_POPUP_ZINDEX2,NO_SUCH_USER:()=>NO_SUCH_USER2,WRONG_PASSWORD:()=>WRONG_PASSWORD2,apply_dynamic_properties_text:()=>apply_dynamic_properties_text,date_code:()=>date_math,fileupload_too_large:()=>fileupload_too_large,resolve_constraints:()=>resolve_constraints,s3_get:()=>s3_get,throw_on_failed_pwd_reset:()=>throw_on_failed_pwd_reset,wrong_password_msg:()=>wrong_password_msg});var s3_get,fileupload_too_large,NO_SUCH_USER2,WRONG_PASSWORD2,wrong_password_msg,throw_on_failed_pwd_reset,MAX_POPUP_ZINDEX2,init_latest2=__esm({"lib-browser/bv/latest.js"(){"use strict";init_define_process_env();init_shim();init_auth();init_runmode();init_b_date();init_text_elements2();init_core_ds_db_ops_utilities();s3_get=(s3_bucket_api,path,appname)=>s3_bucket_api.get_redirect({path,appname}),fileupload_too_large=size=>!1,NO_SUCH_USER2=INVALID_LOGIN_CREDENTIALS,WRONG_PASSWORD2=INVALID_LOGIN_CREDENTIALS,wrong_password_msg="We didn\u2019t find an account with those login credentials",throw_on_failed_pwd_reset=!1,MAX_POPUP_ZINDEX2=2102}});var init_editor_settings=__esm({"lib-browser/editor/editor_settings.js"(){"use strict";init_define_process_env();init_shim();init_u2()}});init_define_process_env();init_shim();init_define_process_env();init_shim();init_define_process_env();init_shim();init_define_process_env();init_shim();init_define_process_env();init_shim();var import_web_dom_collections_iterator116=__toESM(require_web_dom_collections_iterator()),import_web_immediate4=__toESM(require_web_immediate());init_u2();init_property_applications();init_image_utils();init_page_state();init_lang();init_evaluate();init_eval_node_state();init_define_process_env();init_shim();var import_web_dom_collections_iterator114=__toESM(require_web_dom_collections_iterator());init_u2();function get_stripes(element){var _element$get_style;let stripes_expressions;return(_element$get_style=element.get_style)!=null&&_element$get_style.call(element).exists()?stripes_expressions=element.get_style().property("stripes"):stripes_expressions=element.property("stripes"),stripes_expressions.is_empty()?[]:stripes_expressions.entries()}init_color_tokens();init_font_tokens();init_element_eval();function evaluate_stripes(instance4){let stripes_expressions=get_stripes(instance4.element);if(!stripes_expressions.length)return[];let stripes=[];for(let stripe_expression of stripes_expressions)with_eval_node(stripe_expression,()=>stripes.push(evaluate_properties(stripe_expression.json._raw(),instance4.prop_eval_context(),DETECT_FIELD_NAMES)));return stripes}var Page_default={property_applications:[new property_applications_default.Background],position_canvas(to_position,instance4){if(instance4.responsive_mode()){instance4.container.add(instance4);return}let start_width=this.calculate_run_mode_width(instance4);property_applications_default.apply_css_style(to_position,{width:start_width+"px",height:instance4.element.get_height()+"px"}),instance4.edit_mode()?$(".canvas").append(to_position):($("html, body").css("height","100%"),$(window.document.body).append(to_position),to_position[0].style["min-height"]="100%"),property_applications_default.apply_css_style(to_position,{"margin-right":"auto","margin-left":"auto",position:"relative","z-index":2})},register(instance4){instance4.on_message("child_movement",max_delta=>{instance4.state("last_delta",max_delta)})},initialize(instance4){instance4.run_mode()&&instance4.register_workflows(instance4.element.events()),on_property_change(instance4,"title",title=>{instance4.edit_mode()?$(".edit-date").text(title):instance4.run_mode()&&$(document).ready(()=>window.document.title=title)});let root2=document.documentElement;instance4.edit_mode()&&(instance4.autorun(()=>{load_font_tokens_default(),load_font_tokens_user()}),on_property_change(instance4,"preset_width",val=>{(void 0)[val].width!=null&&(instance4.element.set_property("width",(void 0)[val].width),instance4.element.commit_merge())}),on_property_change(instance4,"width",width2=>{let preset_width=instance4.get_static_property("preset_width");for(let preset_name in void 0){let data=(void 0)[preset_name];if(width2===data.width){preset_name!==preset_width&&(instance4.element.set_property("preset_width",preset_name),instance4.element.commit_merge());return}}preset_width!=="custom"&&(instance4.element.set_property("preset_width","custom"),instance4.element.commit_merge())})),instance4.autorun(()=>{for(let[property2,value]of Object.entries(default_font_tokens_to_property()))root2.style.setProperty(property2,value)}),instance4.autorun(()=>{for(let[property2,value]of Object.entries(user_font_tokens_to_property()))root2.style.setProperty(property2,value)}),instance4.autorun(()=>{for(let[property2,value]of Object.entries(default_color_tokens_to_property()))root2.style.setProperty(property2,value)}),instance4.autorun(()=>{for(let[property2,value]of Object.entries(user_color_tokens_to_property()))root2.style.setProperty(property2,value)}),instance4.run_mode()&&(page_width($(window).width()),$(window).on("resize",()=>page_width($(window).width())),page_current_scroll_position($(window).scrollTop()),$(window).on("scroll wheel touchmove",()=>page_current_scroll_position($(window).scrollTop())));let properties_to_load=["background_style","bgcolor","background_gradient_direction","background_gradient_from","background_gradient_mid","background_gradient_to","background_image","center_background","background_size_cover","repeat_background_vertical","repeat_background_horizontal","background_color_if_empty_image","background_gradient_style","background_radial_gradient_shape","background_radial_gradient_size","background_radial_gradient_xpos","background_radial_gradient_ypos","background_gradient_custom_angle"];function style_page(){let additional_correction_for_debugger,background_div,main_page;instance4.element.use_responsive_algorithm()?background_div=instance4.get_canvas():(background_div=div("stripe-container Backdrop",instance4.container.get_canvas()),instance4.run_mode()&&($(window).off("resize.backdrop-non-responsive"),$(window).on("resize.backdrop-non-responsive",()=>background_div[0].style.width=Math.max($(".main-page").width(),$(window).width())+"px"))),instance4.thumbnail_mode()?background_div.css({"z-index":1,position:"absolute",top:0,width:instance4.element.get_width(),height:instance4.element.get_height(),overflow:"hidden"}):property_applications_default.apply_css_style(background_div,{"z-index":1,position:instance4.get_static_property("fixed_width")?"relative":"absolute",top:"0px",width:instance4.get_static_property("fixed_width")?instance4.element.get_width():"100%",overflow:"hidden"}),is_debug_mode()?(additional_correction_for_debugger=300,$(".main-page").css("height",$(".main-page").height()+additional_correction_for_debugger)):additional_correction_for_debugger=0;let set_height=()=>{let height2;instance4.thumbnail_mode()?height2=instance4.element.get_height():(height2=Math.max(background_div.parent().height(),$(".main-page").height()),height2===0&&(height2=instance4.element.get_height())),background_div[0].style.height=height2+"px"};set_height(),window.fix_backdrop_height=set_height,instance4.edit_mode()&&instance4.autorun(()=>background_div.css("height",evaluate_property(instance4,"height")+20));let BV=null;if(pre_cache(instance4,properties_to_load.map(prop=>`backdrop_${prop}`)),pre_cache(instance4,["backdrop_paralax_speed","backdrop_image_paralax"]),instance4.autorun(()=>{let backdrop_background_data={is_backdrop:!0};for(let prop of properties_to_load)backdrop_background_data[prop]=evaluate_property(instance4,"backdrop_"+prop);if(instance4.run_mode())for(let prop of["backdrop_paralax_speed","backdrop_image_paralax"])backdrop_background_data[prop]=evaluate_property(instance4,prop);if(backdrop_background_data.background_style==="video")if(instance4.run_mode()&&!is_on_mobile_or_tablet()){BV||(BV=new $.BigVideo,BV.init()),$("#big-video-wrap").css("background","black");let video_container=$("#big-video-wrap video");video_container.attr("muted","");let video_url=optimize_image(evaluate_property(instance4,"backdrop_video_source"),void 0,void 0,void 0,!0);BV.show(video_url,{forceAutoplay:!0,doLoop:!0,ambient:!0}),instance4.autorun(()=>{evaluate_property(instance4,"backdrop_video_silence")?(video_container.attr("muted",""),BV.getPlayer().muted(!0)):(BV.getPlayer().volume(.8),video_container.removeAttr("muted"),BV.getPlayer().muted(!1))})}else{background_div.css("background","black");let image_fallback=evaluate_property(instance4,"backdrop_video_image_fallback");image_fallback&&background_div.css({"background-image":`url(${optimize_image(image_fallback,background_div.width())})`,"background-position":"center top"})}else new property_applications_default.Background()._apply(backdrop_background_data,background_div)}),!instance4.element.use_responsive_algorithm()){let stripes_drawn=u_exports2.MakeKey(null,"stripe_drawn"),stripe_divs=[];$(window).off("resize.withstripe",set_height),$(window).on("resize.withstripe",set_height),instance4.on_destroy(()=>$(window).off("resize.withstripe",set_height)),instance4.autorun(()=>{let stripe_top=0,stripe_bottom=0;function build_stripe(stripe){let options={},stripe_div=div("backdrop-stripe",background_div);return stripe.floating?options["z-index"]=5e3:options["z-index"]=zcountdown,zcountdown-=1,options.width="100%",options["box-sizing"]="border-box",options["-moz-box-sizing"]="border-box",options.height=stripe.stripe_height+"px",stripe.border_width>0&&(options["border-bottom"]=`${stripe.border_width}px ${stripe.border_style} ${stripe.border_color}`,options["border-radius"]=stripe.border_roundness+"px"),property_applications_default.apply_css_style(stripe_div,options),new property_applications_default.Background()._apply(stripe,stripe_div),new property_applications_default.BoxShadow()._apply(stripe,stripe_div),stripe_div}let set_stripe_positioning=(stripe_div,stripe)=>{let position;stripe.floating&&!instance4.edit_mode()?(position="fixed",stripe_div.addClass("floating")):position="absolute",stripe_div.css("position",position)},zcountdown=5e3;background_div.find(".backdrop-stripe").remove();let stripes=evaluate_stripes(instance4);if(stripes.length!==0){for(let stripe of stripes){let stripe_div=build_stripe(stripe);set_stripe_positioning(stripe_div,stripe),stripe.floating!==!0||stripe.floating&&stripe.floating_reference==="top"?(stripe_div.css("top",stripe_top+"px"),stripe_divs.push({div:stripe_div,top:stripe_top,height:parseFloat(stripe.stripe_height)}),stripe_top+=parseFloat(stripe.stripe_height)):(stripe_div.css("bottom",stripe_bottom+"px"),stripe_divs.push({}),stripe_bottom+=parseFloat(stripe.stripe_height))}return stripes_drawn.turn()}}),main_page=$(".main-page"),instance4.on_message("movement_in_stripe",(current_stripe,max_delta)=>u_exports2.WaitFor(stripes_drawn,()=>{let height_change_above=0;for(let i=0;i<stripe_divs.length;i++){var _stripe$height_change;let stripe=stripe_divs[i];if(stripe.top===void 0)continue;let height_change;i>=current_stripe&&(i===current_stripe?height_change=max_delta-height_change_above:height_change=stripe.height_change,stripe.div.height(stripe.height+height_change),stripe.div.css("top",stripe.top+height_change_above+"px"),stripe.height_change=height_change),height_change_above+=(_stripe$height_change=stripe.height_change)!=null?_stripe$height_change:0}let height2=instance4.element.get_height()+height_change_above+additional_correction_for_debugger;background_div.css("height",height2),main_page.css("height",height2)}))}instance4.autorun(()=>{let max_delta=instance4.state("last_delta");if(max_delta!=null){var _main_page;let height2=instance4.element.get_height()+max_delta+additional_correction_for_debugger;background_div.css("height",height2),(_main_page=main_page)==null||_main_page.css("height",height2)}})}instance4.edit_mode()?(pre_cache(instance4,properties_to_load),instance4.autorun(()=>{instance4.container.get_canvas().find(".stripe-container.Backdrop").remove(),instance4.autorun(()=>{if(!instance4.is_destroyed()){let props={};for(let prop of properties_to_load)props[prop]=evaluate_property(instance4,prop);new property_applications_default.Background()._apply(props,instance4.get_canvas())}}),style_page()})):instance4.thumbnail_mode()?instance4.autorun(style_page):style_page()},additional_data:{is_responsive_mode(instance4){return instance4.run_mode()&&instance4.element.use_responsive_algorithm()},calculate_run_mode_width(instance4){if(this.is_responsive_mode(instance4)&&!instance4.get_static_property("fixed_width")){let window_width=$(window).width();return Math.max(instance4.element.get_min_width(),window_width)}else return instance4.element.get_width()},initialize_container_width(instance4,container){if(!this.is_responsive_mode(instance4))return;container.resize_width(this.calculate_run_mode_width(instance4)),setImmediate(()=>{container.resize_width(this.calculate_run_mode_width(instance4))});let old_width=null;$(window).resize(()=>{let new_width=this.calculate_run_mode_width(instance4);if(new_width!==old_width){if(is_fullscreen())return;old_width=new_width,container.resize_width(new_width),instance4.get_canvas()[0].style.width=new_width+"px"}})}}};init_define_process_env();init_shim();init_appquery();init_property_applications();init_lib();init_text_elements2();init_element_eval();var Text_default={property_applications:[new property_applications_default.MinWidth],attempt_size_only_draw(instance4){return(instance4.run_mode()||instance4.responsive_mode())&&lib_default().bubble_version()>=4&&!instance4.is_visible()&&text_should_stretch_vertically(instance4)?(set_text_height_to_invisibility_state(instance4),!1):!0},initialize(instance4){let canvas=instance4.get_canvas();this.attempt_size_only_draw(instance4),instance4.autorun(()=>{appquery_default.get_public_setting("bubble_version")>=10?property_applications_default.apply_css_style(canvas,{"white-space":"pre-wrap"}):property_applications_default.apply_css_style(canvas,{"white-space":""})}),instance4.wait_for_visible_lite(()=>{var _instance$element$roo,_instance$element$roo2;let wrap2;instance4.edit_mode()||instance4.responsive_mode()?(wrap2="letter",instance4.responsive_mode()&&(canvas[0].style.overflow="hidden")):(wrap2="words",canvas[0].style.overflow="visible");let stretch=instance4.get_static_property("stretch_to_fit"),cut_off_content=instance4.get_static_property("cut_off_content");pre_cache(instance4,["text","font_size","padding_vertical","line_height","rotation_angle"]),lib_default().bv().apply_dynamic_properties_text(instance4),(instance4.edit_mode()||instance4.thumbnail_mode()||(_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()&&cut_off_content||!((_instance$element$roo2=instance4.element.root())!=null&&_instance$element$roo2.use_responsive_algorithm())&&!stretch)&&apply_dotdotdot2(instance4,wrap2),instance4.responsive_mode()&&(canvas[0].style["pointer-events"]="none")})},additional_data:{notify_width(instance4,width2){instance4.state("notify_width",width2)}}};init_define_process_env();init_shim();init_property_applications();var Button_default={property_applications:[new property_applications_default.MinWidth]};init_define_process_env();init_shim();init_property_applications();init_runmode();var icons_exports={};__export(icons_exports,{calculate_font_size_for_fontawesome:()=>calculate_font_size_for_fontawesome});init_define_process_env();init_shim();init_element_eval();init_property_applications();function calculate_font_size_for_fontawesome(instance4){instance4.autorun(()=>{var _instance$state;let height2=evaluate_property(instance4,"height"),width2=(_instance$state=instance4.state("notify_width"))!=null?_instance$state:evaluate_property(instance4,"width");function calculate_font_size(){let val=Math.min(height2,width2),border_correction=Math.max(property_applications_default.calculate_border_height(instance4),property_applications_default.calculate_border_width(instance4));return border_correction!==0&&(val-=border_correction+5),val}instance4.get_canvas()[0].style["font-size"]=calculate_font_size()+"px"})}init_element_eval();var Icon_default={property_applications:[new property_applications_default.MinWidth],initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();property_applications_default.patch_user_agent_styles(canvas),on_property_change(instance4,"icon",icon=>{let add4;canvas.hasClass(CLICKABLE_ELEMENT)&&(add4=!0),canvas.attr("class",""),canvas.addClass(icon+" inner-element bubble-element"),add4&&canvas.addClass(CLICKABLE_ELEMENT)}),on_property_change(instance4,"icon_color",icon_color=>{canvas[0].style.color=icon_color}),on_property_change(instance4,"spin_icon",spin_icon=>{spin_icon||(spin_icon=!1),canvas.toggleClass("fa-spin",spin_icon)}),calculate_font_size_for_fontawesome(instance4)})},additional_data:{notify_width(instance4,width2){instance4.state("notify_width",width2)}}};init_define_process_env();init_shim();var import_web_dom_collections_iterator168=__toESM(require_web_dom_collections_iterator()),import_es_string_replace36=__toESM(require_es_string_replace());init_u2();init_property_applications();init_runmode();init_define_process_env();init_shim();init_nodes();init_define_process_env();init_shim();var Application=class{constructor(version_json){this.version_json=version_json}domain(){return this.version_json.child("primary_domain").get()}appname(){return this.version_json.child("_id").get()}};init_Application();init_define_process_env();init_shim();var import_web_dom_collections_iterator159=__toESM(require_web_dom_collections_iterator()),import_es_string_replace34=__toESM(require_es_string_replace());init_u2();init_decaf();init_nodes();init_caching();init_btype_ids();init_plugin();init_locations();init_domain();init_security();init_domain_utilities();init_analytics();init_define_process_env();init_shim();var import_web_dom_collections_iterator151=__toESM(require_web_dom_collections_iterator());init_environment_utilities();init_lib();init_locations2();init_appquery();init_plugin_registry();init_plugin_getter();init_service_type_parser();var plugins_exports={};__export(plugins_exports,{is_hardcoded:()=>is_hardcoded3});init_define_process_env();init_shim();var import_web_dom_collections_iterator153=__toESM(require_web_dom_collections_iterator());init_lib();init_plugin();init_known_plugins();init_decaf();init_define_process_env();init_shim();var import_web_dom_collections_iterator152=__toESM(require_web_dom_collections_iterator());init_plugin_getter();init_plugin_registry();init_service_type_parser();init_appquery();init_u2();init_logger();init_plugin();init_plugin();init_known_plugins();init_define_process_env();init_shim();init_image_utils();var is_hardcoded2=id=>{let trimed_id=get_plugin_id(id);return!is_UUID(trimed_id)};init_plugin_registry();init_appquery();var is_hardcoded3=is_hardcoded2;init_custom_elements();init_RAW();init_define_process_env();init_shim();init_byte();init_feature_flags();init_lib();var MAX_FILE_COMPOSER_SIZE=50*1048576;var FEATURE_FLAGS_PATH="feature_flags.";var PUBLIC_ACTIVE_EXPERIMENTS={parens:{display:"Expression parentheses",description:"Automatically add parentheses to all dynamic expressions in the editor. Makes \u201CCurrent Page Width +2 *3\u201D display as \u201C(Current Page Width + 2) * 3\u201D. This feature lets you add to any part of a dynamic expression, and indicate where to apply a piece of a dynamic expression.",launch_date:1650973876351,modification_date:1650973876351,alters_app_json:!0},reference_snippet:{display:"Show snippets of the reference on hover",description:"When hovering any feature in the editor, show the beginning of the manual entry.",launch_date:1650973876351,modification_date:1650973876351,alters_app_json:!1},[WF_TAB_REDESIGN]:{display:"Redesigned Workflow Editor",description:"Discover new color labels, folders, drag and drop and more with the new workflows tab design.",launch_date:1727805908e3,modification_date:1729861377e3,alters_app_json:!0,needs_refresh:!0}};var REMOVED_FEATURE_FLAGS=["composer_revamp","composer_revamp_all"],DEPRECATED_EXPERIMENTS={timezone_improvements:{display:"Overriding timezones more broadly (deprecated)",description:"This feature set allows you to set an overriding timezone for any page, any backend workflow (API workflow, recurring event, and database trigger event), and when using the :rounding to operator.",launch_date:1657566861888,modification_date:1657566861888,alters_app_json:!1,has_been_previously_used:!1,deprecation_bv:20,test_app_exceptions:["test_app_elements"]},react_upgrade:{display:"New, more performant elements rendering (deprecated)",description:`This feature enables a new experimental rendering pipeline which more optimally renders any elements you have on the page. It does so by precomputing a lot of the properties on the server beforehand, and shipping a static CSS file to the client to avoid repeated work. 

Note: This feature only affects new responsive pages.`,launch_date:1659456830513,modification_date:1659456830513,alters_app_json:!1,deprecation_bv:21}};init_define_process_env();init_shim();var ADVANCED_FEATURE_JSON_SETTINGS_PATH="advanced_features";var ADVANCED_FEATURES={timezone_controls:{display:"Enable timezone override controls",enabled_by_default:!0,children_advanced_features:["timezone_controls_date_time_inputs","timezone_controls_page","timezone_controls_backend_workflows"]},timezone_controls_date_time_inputs:{display:"Date-time inputs (Date-Time Picker and Input)",enabled_by_default:!0,parent_advanced_feature:"timezone_controls"},timezone_controls_page:{display:"Page (at the individual page level)",enabled_by_default:!1,parent_advanced_feature:"timezone_controls",fallback:["experimental_feature","timezone_improvements"]},timezone_controls_backend_workflows:{display:"Backend workflows (API workflows, scheduled workflows, data triggers",enabled_by_default:!1,parent_advanced_feature:"timezone_controls",fallback:["experimental_feature","timezone_improvements"]},expose_id_option:{display:"Expose the option to add an ID attribute to HTML elements",enabled_by_default:!1,fallback:["raw_path","settings.client_safe.expose_id_option"]}};init_mode_check();init_client();init_notifier_topics();init_segment_events();init_css();init_define_process_env();init_shim();var BUILT_IN_PAGE_BREAKPOINTS={"built-in-mobile":{name:"Mobile",size:320,default:!1,builtin:!0},"built-in-mobile-landing":{name:"Mobile Landscape",size:768,default:!1,builtin:!0},"built-in-tablet":{name:"Tablet",size:992,default:!1,builtin:!0},"built-in-desktop":{name:"Desktop",size:1200,default:!1,builtin:!0}},BUILT_IN_MOBILE_VIEW_BREAKPOINTS={"built-in-tablet-landscape":{name:"Tablet Landscape",size:1360,default:!1,builtin:!0,on_mobile_view:!0},"built-in-tablet-portrait":{name:"Tablet",size:1024,default:!1,builtin:!0,on_mobile_view:!0},"built-in-mobile-landscape":{name:"Mobile Landscape",size:800,default:!1,builtin:!0,on_mobile_view:!0},"built-in-mobile-portrait":{name:"Mobile",size:480,default:!1,builtin:!0,on_mobile_view:!0}};init_elements();init_define_process_env();init_shim();var import_web_dom_collections_iterator154=__toESM(require_web_dom_collections_iterator()),import_es_string_replace32=__toESM(require_es_string_replace());init_routes();init_appquery();init_errors();init_define_process_env();init_shim();init_appquery();init_lib();init_feature_flags();init_u2();function mobileEnabled(){return!!appquery_default.get_public_setting("initial_mobile_view")}function pushNotificationsEnabled(){return on_server()||mobileEnabled()&&lib_default.or_throw().location.get_query().push_n==="true"}function selectableListEnabled(){return mobileEnabled()&&lib_default.or_throw().location.get_query().selectable_list==="true"}init_define_process_env();init_shim();var import_web_dom_collections_iterator155=__toESM(require_web_dom_collections_iterator());init_appquery();init_client_config2();init_builtins();init_mobile();init_logger();init_multiple_live_versions();init_define_process_env();init_shim();var import_es_error_cause16=__toESM(require_es_error_cause()),import_web_dom_collections_iterator158=__toESM(require_web_dom_collections_iterator());init_define_process_env();init_shim();var import_es_string_replace33=__toESM(require_es_string_replace()),import_web_dom_collections_iterator156=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_lib();init_appquery();init_btypes();init_btype_ids();init_css();var CustomType=class extends nodes_default.AppNode{constructor(json){json.ensure_loading(),super(json)}name(){return this.json.name()}id(){return this.name()}to_btype(){let name=this.name();return name==="user"?"user":custom_type(name)}to_btype_obj(){return get5(this.to_btype())}deleted(){return this.json.child("deleted").get()}display(){return this.json.child("display").get()}exposed_api(){return this.json.child("exposed_api").get()}fields(){return this.json.child("fields").children().map(json=>nodes_default.create(nodes_default.CUSTOM_FIELD,json))}field(name){return nodes_default.create(nodes_default.CUSTOM_FIELD,this.json.child("fields").child(name))}privacy_roles(){return this.json.child("privacy_role").children().map(json=>nodes_default.create(nodes_default.PRIVACY_ROLE,json))}privacy_role(name){let json=this.json.child("privacy_role").child(name);return nodes_default.create(nodes_default.PRIVACY_ROLE,json)}default(){return lib_default().derived("DefaultValues").content()[this.name()]}get_default_fields(skip_default_values_and_deleted){var _skip_default_values_;return(_skip_default_values_=skip_default_values_and_deleted)!=null||(skip_default_values_and_deleted=!1),this.json.child("fields").children().map(json=>{let field=nodes_default.create(nodes_default.CUSTOM_FIELD,json),current={};return current.name=field.name(),current.value=field.btype(),current.display=field.display(),skip_default_values_and_deleted||(field.default_val()!=null&&(is_option_set(field.btype())?current.default_val=field.default_val():current.default_val=get5(field.btype()).cast(field.default_val())),current.deleted=field.deleted()),current})}};init_btype_ids();init_define_process_env();init_shim();init_u2();init_lib();init_btypes();init_nodes();init_CustomFieldState();var CustomField=class extends CustomFieldState{deleted(){return this.json.child("deleted").get()}name(){return this.json.name()}parent(){return nodes_default.create(nodes_default.CUSTOM_TYPE,this.json.parent().parent())}is_custom(){return is_custom_type2(this.btype())}is_option_set(){return is_option_set2(this.btype())}};init_lib();init_appquery();init_define_process_env();init_shim();init_shrink();init_define_process_env();init_shim();var import_web_dom_collections_iterator157=__toESM(require_web_dom_collections_iterator());init_u2();init_json_base();init_registry();init_errors();function force_read(cache2,key){let casted=cache2;return casted==null?void 0:casted[key]}var RuntimeJSON=class _RuntimeJSON extends JSONBase{constructor(_cache,_parent2,__name,_root2,_appname,_app_version){if(super(),this.cache=void 0,this._parent=null,this.__name=void 0,this._root=void 0,this._appname=void 0,this._app_version=void 0,this._unique_id=void 0,this._children={},this._child_names_cache=void 0,this._smart_cache=void 0,this.__path=void 0,this._indexers=void 0,this._has_indexers=void 0,this.cache=_cache,this._parent=_parent2,this.__name=String(__name),this._appname=_appname,this._app_version=_app_version,this.is_root())this._root=this,this.__path="",this.__name="";else if(this.is_leaf())this._root=_root2,this.__path=this._parent.__path?this._parent.__path+"."+this.__name:this.__name;else throw new UnexpectedError("Must be root or leaf!");this._unique_id=LUID()}toString(){var _this$_appname,_this$__path;return`RuntimeJSON<${(_this$_appname=this._appname)!=null?_this$_appname:""}_${this.app_version().toString()}_${(_this$__path=this.__path)!=null?_this$__path:""}>`}toUniqueString(){var _this$_unique_id;return(_this$_unique_id=this._unique_id)!=null?_this$_unique_id:""}path_cache(){var _this$_unique_id2;return(_this$_unique_id2=this._unique_id)!=null?_this$_unique_id2:""}id(){var _cache$id;let cache2=this.cache;return(_cache$id=cache2==null?void 0:cache2.id)!=null?_cache$id:null}_name(){var _this$__name;return(_this$__name=this.__name)!=null?_this$__name:""}to_id(){return this}to_path(){return this}parent(){return this._parent}_path(){return this.__path}get(){return typeof this.cache=="object"?null:this.cache}empty(){return this.cache==null}appname(){return this._root._appname}app_version(){return this._root._app_version}exists(){return this.cache!=null}ensure_exists(){return this.exists()?this:null}_child(_name){var _this$_children,_this$_children$s_nam;let s_name=String(_name);return(_this$_children$s_nam=(_this$_children=this._children)[s_name])!=null||(_this$_children[s_name]=new _RuntimeJSON(force_read(this.cache,s_name),this,s_name,this._root,this._appname,this._app_version)),this._children[s_name]}_gchild(_n1,_n2){return this._child(_n1)._child(_n2)}_raw_child(_name){return force_read(this.cache,_name)}_raw_gchild(_n1,_n2){var _force_read;return force_read((_force_read=force_read(this.cache,_n1))!=null?_force_read:void 0,_n2)}_child_names(){return this._child_names_cache||this._rebuild_child_names(),this._child_names_cache}_rebuild_child_names(){this._child_names_cache=this._raw_to_child_names(this.cache)}pre_cache(path,shrunk){}raw_index(){var _this$_root$cache$_in,_this$_root,_this$_root$cache;let index=(_this$_root$cache$_in=(_this$_root=this._root)==null||(_this$_root$cache=_this$_root.cache)==null?void 0:_this$_root$cache._index)!=null?_this$_root$cache$_in:null;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];for(let arg of args){var _index;index=(_index=index)==null?void 0:_index[String(arg)]}return index}root(){return this._root}application(){return create("FakeApplication",this._root)}_raw(){return this.cache}raw_type(){return typeof this.cache}register_indexer(name,indexer){var _this$_indexers,_root$_has_indexers;(_this$_indexers=this._indexers)!=null||(this._indexers={}),this._indexers[name]=indexer;let root2=this._root;root2!=null&&((_root$_has_indexers=root2._has_indexers)!=null||(root2._has_indexers={}),root2._has_indexers[this._path()]=this)}smart_cache(name,creator,additional_arg){var _this$_smart_cache;let cache2=(_this$_smart_cache=this._smart_cache)!=null?_this$_smart_cache:this._smart_cache={};return name in cache2||(cache2[name]=creator(this,additional_arg)),cache2[name]}clear_smart_cache(){this._smart_cache=void 0,Object.entries(this._children).forEach(_ref=>{let[_name,child]=_ref;child.clear_smart_cache()})}reset_children(){this._children={},this._child_names_cache=void 0}ensure_loading(){}add_to_tree(tree){}is_leaf(){return this._parent!=null}is_root(){return this._parent==null}};function VirtualJSON(json,data){return new RuntimeJSON(shrink_object(data),json.parent(),json._name(),json.root(),json.appname(),json.app_version())}init_app_json();var READONLY_TYPE_NAMES=["device","user_device"],READONLY_TYPE_JSONS={device:{name:"device",display:"Device",fields:{device_type:{display:"Type",value:"text"},push_notification_token:{display:"Push notification token",value:"text"}}},user_device:{name:"user_device",display:"User Device",fields:{user:{display:"User",value:"user"},device:{display:"Device",value:readonly_type("device")}}}},default_privacy={everyone:{permissions:{view_all:!1,view_attachments:!1,search_for:!1,modify_api:!1,delete_api:!1,create_api:!1,auto_binding:!1,view_fields:{},binding_fields:{}}}},ReadonlyType=class extends CustomType{constructor(type){let data=READONLY_TYPE_JSONS[type],raw_json={display:data.display,deleted:!1,exposed_api:!1,fields:data.fields,privacy_role:default_privacy},fake_location=appquery_default.app().json.child("user_types").child("fake_location"),virtual_json=VirtualJSON(fake_location,raw_json),json={name:()=>data.name,path:()=>"",exists:()=>!0,raw:()=>raw_json,child:name=>virtual_json.child(name),ensure_loading:()=>{}};super(json),this.not_writeable=!0,this._type=void 0,this._type=type}id(){return`${READONLY_PREFIX}${this.name()}`}get_name(){return this.name()}to_btype(){return readonly_type(this.name())}elements(filter){throw new Error("Method not implemented.")}built_in_fields(){let json_fields=READONLY_TYPE_JSONS[this._type].fields;return{...Object.fromEntries(Object.entries(json_fields).map(_ref=>{let[name,json]=_ref;return[name,{type:json.value}]})),...super.built_in_fields()}}writeable_fields(){return[]}readable_fields(){let json_fields=READONLY_TYPE_JSONS[this._type].fields;return[...Object.entries(json_fields).map(_ref2=>{let[name,json]=_ref2;return new(lib_default.or_throw()).sets.Option(json.display,name)}),...super.readable_fields()]}get_default_fields(){let json_fields=READONLY_TYPE_JSONS[this._type].fields;return Object.entries(json_fields).map(_ref3=>{let[k,json]=_ref3;return{...json,name:k}})}has_comment(){return!1}toString(){return`ReadonlyType<${this.json.name()}>`}toUniqueString(){return this.toString()}};init_app_json();var _dec11,_class58;function _applyDecoratedDescriptor10(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var configuration=client_config_default2,mobileEnabled2=!1;var SECURABLE=SECURABLE_PREFIX,APPS_DOMAIN_SUFFIX="-no-reply@bubbleapps.io",ApplicationVersion=(_dec11=cached({type:AUTORUN}),_class58=class extends nodes_default.AppNode{constructor(json){if(super(json),this._styles_cache={},this._paid_plugin_install_checked=!1,is_edit_mode()){let construct_time=Date.now();watch([AppPlanChangeTopic,this.appname()],()=>construct_time,()=>{this.invalidate_app_plan()})}}find_expressions(filter){let page_expressions=this.pages().flatMap(page2=>page2.find_expressions(filter)),custom_definition_expressions=this.custom_definitions().flatMap(custom_definition=>custom_definition.find_expressions(filter)),api_expressions=this.api().find_expressions(filter),privacy_rules=this.custom_types().flatMap(type=>type.privacy_roles().flatMap(role=>role.find_expressions(filter)));return[...page_expressions,...custom_definition_expressions,...api_expressions,...privacy_rules]}application(){return this.json.application()}appname(){return this.application().appname()}app_version(){return this.json.app_version()}creation_date(){return this.json.child("creation_date").get()}get_changelog_type(){return"Setting"}exists(){var _version_node$get;let version_node=this.json.child("settings").child("client_safe").child("bubble_version"),last_change_node=this.json.child("last_change");return((_version_node$get=version_node.get())!=null?_version_node$get:last_change_node.get())!=null}domain(){return this.application().domain()}app_plan(check_admin){var _check_admin;if((_check_admin=check_admin)!=null||(check_admin=!1),lib_default().is_edit_mode()){var _ref,_this$_ref;(_this$_ref=this[_ref="_plan_invalidation_box_"+check_admin])!=null||(this[_ref]=u_exports2.Box(!1))}else return lib_default().app_plan()}display(){var _this$domain;return(_this$domain=this.domain())!=null?_this$domain:this.appname()}use_shared_sendgrid_key(){return this.appname()==="meta"?!1:lib_default().app_plan().custom_domain?!appquery_default.get_public_setting("sendgrid_verified"):!0}get_sendgrid_key(){return this.use_shared_sendgrid_key()?configuration.shared_sendgrid_key:appquery_default.get_private_setting("sendgrid_key")}admin_email(){let hostname=this.admin_email_hostname(),appname=this.appname();return appname?hostname===configuration.PROD_DOMAINS.main&&appname!=="meta"||this.use_shared_sendgrid_key()&&this.get_public_setting("use_sendgrid")?appname.indexOf("_")!==-1?configuration.ADMIN_NO_REPLY:this.appname()+APPS_DOMAIN_SUFFIX:this.custom_domain_admin_email():configuration.ADMIN_NO_REPLY}custom_domain_admin_email(){var _this$get_public_sett;return((_this$get_public_sett=this.get_public_setting("admin_email"))!=null?_this$get_public_sett:"admin").trim()+"@"+this.admin_email_hostname()}admin_email_hostname(){var _this$domain2;if(this.get_public_setting("app_topdomain"))return this.get_public_setting("app_topdomain");let hostname=(_this$domain2=this.domain())!=null?_this$domain2:META_HOSTNAME,{top_domain}=get_domain_components(hostname);return is_host_aws(top_domain)&&(hostname=META_HOSTNAME),top_domain}find_oauth_providers(){return Object.entries(this.get_plugin_versions()).filter(_ref4=>{let[_,version2]=_ref4;return version2}).flatMap(_ref5=>{let[plugin_name,version2]=_ref5,plugin2=get_plugin(plugin_name,version2);if(plugin2!=null&&plugin2.is_oauth_provider()){var _plugin$get_oauth_pro;return(_plugin$get_oauth_pro=plugin2.get_oauth_providers_simple())!=null?_plugin$get_oauth_pro:[]}else return[]})}get_oauth_providers(){var _Lib$derived$content;return(_Lib$derived$content=lib_default().derived("OAuthProviders").content())!=null?_Lib$derived$content:[]}get_user_calls(){return is_plugin_edit_mode()?[]:lib_default().derived("UserCalls").content()}find_user_calls(){return Object.entries(this.get_plugin_versions()).filter(_ref9=>{let[_,version2]=_ref9;return version2}).flatMap(_ref10=>{var _plugin$get_user_call;let[plugin_name,version2]=_ref10,plugin2=get_plugin(plugin_name,version2);return((_plugin$get_user_call=plugin2==null?void 0:plugin2.get_user_calls())!=null?_plugin$get_user_call:[]).map(call_name=>plugin_name+PLUGIN_SEPARATOR+call_name)})}_get_stripe_version(){return is_production()?get_db_version(this.app_version()):TEST_VERSION}stripe_client_id(){let setting_name="stripe_client_id_"+this._get_stripe_version();return this.get_public_setting(setting_name)}stripe_public_key(){let setting_name="stripe_public_key_"+this._get_stripe_version();return this.get_public_setting(setting_name)}get_public_setting_node(name){if(!name)throw new UnexpectedError("missing name");let pieces=name.split("."),json=this.json.child("settings").child("client_safe");for(let piece of pieces)json=json.child(piece);return nodes_default.new_expression(json,this)}get_public_setting(name){var _configuration$public,_configuration$public2,_this$get_public_sett2;let appname=this.appname(),override=(_configuration$public=configuration.public_app_settings_override)==null||(_configuration$public2=_configuration$public[appname])==null?void 0:_configuration$public2[name];return override!=null?override:(_this$get_public_sett2=this.get_public_setting_node(name).get_static())!=null?_this$get_public_sett2:this.settings_default(!0,name)}get_private_setting_node(name){if(!name)throw new UnexpectedError("missing name");let pieces=name.split("."),json=this.json.child("settings").child("secure");for(let piece of pieces)json=json.child(piece);return nodes_default.new_expression(json,this)}get_private_setting(name){var _configuration$privat,_configuration$privat2,_this$get_private_set;let appname=this.appname(),override=(_configuration$privat=configuration.private_app_settings_override)==null||(_configuration$privat2=_configuration$privat[appname])==null?void 0:_configuration$privat2[name];return override!=null?override:(_this$get_private_set=this.get_private_setting_node(name).get_static())!=null?_this$get_private_set:this.settings_default(!1,name)}settings_default(is_public,name){if(is_public&&name==="admin_email")return"admin";if(is_public&&name==="app_language")return"en_us";var _plugin_registry$defa;return(_plugin_registry$defa=plugin_registry_default.defaults_for_plugins_settings[name])!=null?_plugin_registry$defa:null}_id(){return this.appname()}id(){return this.appname()}is_template(){return this.json.child("is_template").get()}from_template(){return![null,void 0,""].includes(this.template_id())}template_id(){return this.json.child("template_id").get()}page(id){return id?nodes_default.create(nodes_default.PAGE,this.json.by_id(id)):null}custom_definition(id){return id?nodes_default.create(nodes_default.CUSTOM_DEFINITION,this.json.by_id(id)):null}custom_definitions(filter){let definitions=this.json.child("element_definitions").children().map(json=>nodes_default.create(nodes_default.CUSTOM_DEFINITION,json));return nodes_default.filter_array(filter,definitions)}global_elements(filter){let elements2=this.json.child("global_elements").children().map(json=>nodes_default.create(nodes_default.GLOBAL_ELEMENT,json));return nodes_default.filter_array(filter,elements2)}custom_type(name){if(!name)return null;if(is_custom_type(name))throw new UnexpectedError("This is a value id, not a custom type: "+name+".  Please do values.get(id).custom_type() instead.");if(name.startsWith(SECURABLE)){let pieces=name.split(SECURABLE);return this.securable_type(pieces[1],pieces[2])}if(name.startsWith(READONLY_PREFIX)){let pieces=name.split(READONLY_PREFIX);return nodes_default.create(nodes_default.READONLY_TYPE,pieces[1])}return nodes_default.create(nodes_default.CUSTOM_TYPE,this.json.child("user_types").child(name))}securable_type(plugin2,name){return nodes_default.create(nodes_default.SECURABLE_TYPE,plugin2,name,this.json.child("user_types").child(SECURABLE+plugin2+SECURABLE+name))}custom_types(filter,include_special_types,only_non_deleted){this.json.child("user_types").pre_cache();let is_custom_name=name=>name!=="user"&&!name.startsWith(SECURABLE),custom_types=this.json.child("user_types").children().filter(json=>is_custom_name(json.name())).map(json=>nodes_default.create(nodes_default.CUSTOM_TYPE,json)),user_type=nodes_default.create(nodes_default.CUSTOM_TYPE,this.json.child("user_types").child("user")),special_types=include_special_types?SPECIAL_TYPES:[],types=[...custom_types,user_type,...special_types];if(on_server()||pushNotificationsEnabled()){let readonly_types=READONLY_TYPE_NAMES.map(name=>nodes_default.create(nodes_default.READONLY_TYPE,name));types=[...types,...readonly_types]}return only_non_deleted&&(types=types.filter(a=>!a.deleted())),nodes_default.filter_array(filter,types)}option_set(name){if(!name)return null;if(is_option_set(name))throw new UnexpectedError("This is a value id, not a custom option set: "+name+".");return nodes_default.create(nodes_default.OPTION_SET,this.json.child("option_sets").child(name))}option_sets(filter,only_non_deleted){let types=this.json.child("option_sets").children().map(json=>nodes_default.create(nodes_default.OPTION_SET,json));return only_non_deleted&&(types=types.filter(a=>!a.deleted())),nodes_default.filter_array(filter,types)}element(id){var _json$parent;if(!id)return null;let json=this.json.by_id(id);return json&&on_server()&&(json.child("type").ensure_loading(),json.child("id").ensure_loading(),json.child("properties").ensure_loading(),json.child("custom_states").ensure_loading()),((_json$parent=json.parent())==null?void 0:_json$parent.name())==="styles"?nodes_default.new_element(json,!0):nodes_default.new_element(json)}workflow_item(id){return id?nodes_default.new_workflow_item(this.json.by_id(id)):null}event(id){return id?nodes_default.new_event(this.json.by_id(id)):null}action(id){return id?nodes_default.new_action(this.json.by_id(id)):null}by_id(id){var _json$parent2,_json$parent3,_json$parent3$parent;if(!id)return null;let json=this.json.by_id(id);if(!json.exists())return null;let parent_name=(_json$parent2=json.parent())==null?void 0:_json$parent2.name(),is_event=["workflows","actions","api"].includes(parent_name),is_action=((_json$parent3=json.parent())==null||(_json$parent3$parent=_json$parent3.parent())==null?void 0:_json$parent3$parent.name())==="actions";return is_event||is_action?this.workflow_item(id):this.element(id)}get_page_by_name(name){if(!name)return null;let derived=lib_default().derived("PageByName");derived.set_app(this);let pages_by_name=derived.content();if(pages_by_name[name]){let json=this.json.by_path(pages_by_name[name]._path);return nodes_default.create(nodes_default.PAGE,json)}else return is_edit_mode()&&mobileEnabled2()?this.get_mobile_view_by_name(name):null}get_mobile_view_by_name(name){if(!name)return null;let derived=lib_default().derived("MobileViewByName");derived.set_app(this);let mobile_views_by_name=derived.content();if(mobile_views_by_name[name]){let json=this.json.by_path(mobile_views_by_name[name]._path);return nodes_default.create(nodes_default.PAGE,json)}else return null}get_custom_by_name(name){var _derived$content$name;let derived=lib_default().derived("CustomByName");derived.set_app(this);let id=(_derived$content$name=derived.content()[name])==null?void 0:_derived$content$name.id;return id?this.custom_definition(id):null}last_change(){var _this$json$child$get;return(_this$json$child$get=this.json.child("last_change").get())!=null?_this$json$child$get:"no_last_change"}favicon(){let f=this.json.child("favicon").get();return["//s3.amazonaws.com/appforest_uf/f1438203816318x881656567333266200/favicon_rounded.png","//s3.amazonaws.com/appforest_uf/f1462750401796x354019699618220350/apple_touch_icon_precomposed.png"].includes(f)?"//a3f482aa37473c68f97b76bd2e4a3782.cdn.bubble.io/f1530294839424x143528842134401200/Icon-no-clearspace.png":f}plugin_special(){return this.json.child("plugin_special").get()}style(id){var _this$_styles_cache,_this$_styles_cache$i;let json=this.json.child("styles").child(id);return(_this$_styles_cache$i=(_this$_styles_cache=this._styles_cache)[id])!=null||(_this$_styles_cache[id]=nodes_default.create(nodes_default.STYLE,json)),this._styles_cache[id]}get_style_default(element_type){var _this$get_public_sett3;return(_this$get_public_sett3=this.get_public_setting("default_styles"))==null?void 0:_this$get_public_sett3[element_type]}get_plugin_versions(){var _this$get_public_sett4;return(_this$get_public_sett4=this.get_public_setting("plugins"))!=null?_this$get_public_sett4:{}}get_plugin_version(plugin_id){return this.get_public_setting_node("plugins").json.child(plugin_id).get()}has_plugin(plugin_id){return!!this.get_plugin_version(plugin_id)}list_plugins(){return Object.keys(this.get_plugin_versions())}get_editor_link(local){let base=local?"https://local.bubble.is":lib_default().location.get_base_for_meta(),id=appquery_default.appname(),version2=appquery_default.app_version(),r2=`${base}/page?id=${id}&version=${version2}`,name=lib_default().location.get_pieces().path[0];return name&&(r2+=`&name=${name}`),r2}with_feature_flag(_ref13){let{feature_name,old_fn,new_fn}=_ref13;return error_append(`with limited_rollout: ${feature_name}`,()=>this.has_feature_enabled(feature_name)?new_fn():old_fn())}has_feature_enabled(feature_name){var _DEPRECATED_EXPERIMEN;return REMOVED_FEATURE_FLAGS.includes(feature_name)?(warn("A supposedly removed experimental feature has not been fully excised from the code",{feature_name}),!1):DEPRECATED_EXPERIMENTS[feature_name]&&!((_DEPRECATED_EXPERIMEN=DEPRECATED_EXPERIMENTS[feature_name].test_app_exceptions)!=null&&_DEPRECATED_EXPERIMEN.includes(this.appname()))&&this.get_public_setting("bubble_version")>=DEPRECATED_EXPERIMENTS[feature_name].deprecation_bv?!1:this.get_public_setting(`${FEATURE_FLAGS_PATH}${feature_name}`)===!0}has_fallback_path_enabled(fallback){var _this$json$by_path$ra,_this$json$by_path;switch(fallback[0]){case"experimental_feature":return this.has_feature_enabled(fallback[1]);case"raw_path":return(_this$json$by_path$ra=(_this$json$by_path=this.json.by_path(fallback[1]))==null?void 0:_this$json$by_path.raw())!=null?_this$json$by_path$ra:!1;default:return!1}}app_breakpoints(){var _this$get_public_sett7;return{...BUILT_IN_PAGE_BREAKPOINTS,...BUILT_IN_MOBILE_VIEW_BREAKPOINTS,...(_this$get_public_sett7=this.get_public_setting("responsive_breakpoints"))!=null?_this$get_public_sett7:{}}}has_advanced_feature_enabled(feature_name){var _advanced_feature_inf;let advanced_feature_info=ADVANCED_FEATURES[feature_name];if(this.get_public_setting("bubble_version")<22)return advanced_feature_info!=null&&advanced_feature_info.fallback?this.has_fallback_path_enabled(advanced_feature_info.fallback):!1;if(advanced_feature_info!=null&&advanced_feature_info.parent_advanced_feature){let parent_advanced_feature=advanced_feature_info.parent_advanced_feature;if(!this.has_advanced_feature_enabled(parent_advanced_feature))return!1}let advanced_feature_is_enabled=this.get_public_setting(`${ADVANCED_FEATURE_JSON_SETTINGS_PATH}.${feature_name}`);return advanced_feature_is_enabled!=null?advanced_feature_is_enabled:advanced_feature_info!=null&&advanced_feature_info.fallback?this.has_fallback_path_enabled(advanced_feature_info.fallback):(_advanced_feature_inf=advanced_feature_info==null?void 0:advanced_feature_info.enabled_by_default)!=null?_advanced_feature_inf:!1}set_advanced_feature_enabled(feature_name,enabled_status){var _this$json$by_path2,_this$json$by_path3;let advanced_feature_info=ADVANCED_FEATURES[feature_name];if(advanced_feature_info){if(this.set_setting(!0,`${ADVANCED_FEATURE_JSON_SETTINGS_PATH}.${feature_name}`,enabled_status),advanced_feature_info.fallback)switch(advanced_feature_info.fallback[0]){case"experimental_feature":(_this$json$by_path2=this.json.by_path(advanced_feature_info.fallback[1]))==null||_this$json$by_path2.set(enabled_status);break;case"raw_path":(_this$json$by_path3=this.json.by_path(advanced_feature_info.fallback[1]))==null||_this$json$by_path3.set(enabled_status);break}this.commit()}}can_run_issue_checker(){return!isLiveVersion(this.app_version())||is_hardcode(this.appname(),this.app_version())}toString(){return this.app_version()}context_element(){return null}},_applyDecoratedDescriptor10(_class58.prototype,"get_user_calls",[_dec11],Object.getOwnPropertyDescriptor(_class58.prototype,"get_user_calls"),_class58.prototype),_class58);init_define_process_env();init_shim();init_u2();init_nodes();init_lib();init_appquery();init_RAW();init_logger();var API=class extends nodes_default.AppNode{constructor(json){var _Lib$visual_edit$issu,_Lib$visual_edit;super(json)}get_changelog_type(){return"Backend Workflow"}id(){return"api"}type(){return"API"}display(){return"Backend workflows"}get_name(){return"Backend workflows"}is_api(){return!0}is_page(){return!1}is_custom_definition(){return!1}root(){return this}get_new_event_json(){return this.json.child(LUID())}parent(){return null}events(filter){let unfiltered=this.json.children().map(j2=>nodes_default.new_workflow_item(j2));return nodes_default.filter_array(filter,unfiltered)}find_events(filter){return this.events(filter)}find_actions(filter){return this.events().flatMap(e=>{var _e$all_next;return(_e$all_next=e.all_next(filter))!=null?_e$all_next:[]})}find_expressions(filter){return this.events().flatMap(e=>{var _e$find_expressions;return(_e$find_expressions=e.find_expressions(filter))!=null?_e$find_expressions:[]})}is_mobile(){return!1}is_mobile_view(){return info("Used deprecated is_mobile_view function on API"),!1}};init_define_process_env();init_shim();var import_web_dom_collections_iterator160=__toESM(require_web_dom_collections_iterator());init_decaf();init_appquery();init_plugin_getter();init_builtins();init_btype_ids();var SecurableType=class extends CustomType{constructor(plugin2,_name,json){super(json),this.no_special_messages=!0,this.not_writeable=!0,this.plugin=plugin2,this._name=_name}name(){return this._name}get_changelog_type(){return"Data"}to_btype(){return custom_type(this.json.name())}my_data(){var _plugin_getter$get_pl;return(_plugin_getter$get_pl=get_plugin(this.plugin).securable)==null?void 0:_plugin_getter$get_pl[this.name()]}display(){var _this$my_data$display,_this$my_data;return(_this$my_data$display=(_this$my_data=this.my_data())==null?void 0:_this$my_data.display)!=null?_this$my_data$display:"[missing: "+this.plugin+" "+this.name()+"]"}get_permissions_editors(){var _this$my_data$permiss,_this$my_data2;return(_this$my_data$permiss=(_this$my_data2=this.my_data())==null?void 0:_this$my_data2.permissions_editors)!=null?_this$my_data$permiss:{}}starting_permissions(){var _this$my_data$startin,_this$my_data3;return(_this$my_data$startin=(_this$my_data3=this.my_data())==null?void 0:_this$my_data3.starting_permissions)!=null?_this$my_data$startin:{}}fields(){var _this$my_data$fields,_this$my_data4;return object_entries((_this$my_data$fields=(_this$my_data4=this.my_data())==null?void 0:_this$my_data4.fields)!=null?_this$my_data$fields:{}).map(_ref=>{let[name,data]=_ref;return create_fake_field(name,data)})}field(name){var _this$my_data$fields$,_this$my_data5;let data=(_this$my_data$fields$=(_this$my_data5=this.my_data())==null?void 0:_this$my_data5.fields[name])!=null?_this$my_data$fields$:{display:"Missing: "+name,value:"null"};return create_fake_field(name,data)}permissions_node(type_name){return appquery_default.app().json.child_by_path(`user_types.${type_name}.privacy_role`)}};init_CustomFieldState();init_define_process_env();init_shim();init_u2();init_nodes();init_lib();init_appquery();init_btypes();init_btype_ids();init_define_process_env();init_shim();init_appquery();var PrivacyRole=class extends nodes_default.AppNode{display(){return this.name()==="everyone"?"everyone":this.json.child("display").get()}name(){return this.json.name()}id(){return this.name()}parent(){let parent_json=this.json.parent().parent();return this.app().custom_type(parent_json.name())}condition(){return nodes_default.new_expression(this.json.child("condition"),this)}};init_define_process_env();init_shim();var import_web_dom_collections_iterator161=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_lib();init_define_process_env();init_shim();var ALL_OPTIONS="all values";init_lang();init_appquery();init_btype_ids();init_css();var OptionSet=class extends nodes_default.AppNode{name(){return this.json.name()}id(){return this.name()}to_btype(){let name=this.name();return option_set_type(name)}deleted(){return this.json.child("deleted").get()}display(){return this.json.child("display").get()}attributes(){return this.json.child("attributes").children().map(json=>nodes_default.create(nodes_default.OPTION_ATTRIBUTE,json))}attribute(name){let json=this.json.child("attributes").child(name);return nodes_default.create(nodes_default.OPTION_ATTRIBUTE,json)}values(){let jsons=this.json.child("values").children(),value_format=this.json.child("attributes").child("db_value").exists()?OPTION_VALUE_FORMATS.name_is_key:OPTION_VALUE_FORMATS.name_is_db_value_with_fallback;return jsons.map(json=>nodes_default.create(nodes_default.OPTION_VALUE,json,value_format))}get_id_to_name_mapping(){let db_value_is_attr=this.json.child("attributes").child("db_value").exists(),do_get_mapping=()=>{var _this$json$child$raw;let children2=Object.entries((_this$json$child$raw=this.json.child("values").raw())!=null?_this$json$child$raw:{});return Object.fromEntries(children2.map(_ref=>{let[key,ov]=_ref;return!db_value_is_attr&&ov.db_value?[ov.db_value,key]:[key,key]}))};return this.json.smart_cache("OptionSetValueMapping",do_get_mapping)}value(name){var _this$get_id_to_name_;let child_path=(_this$get_id_to_name_=this.get_id_to_name_mapping()[name])!=null?_this$get_id_to_name_:"null",value_format=this.json.child("attributes").child("db_value").exists()?OPTION_VALUE_FORMATS.name_is_key:OPTION_VALUE_FORMATS.name_is_db_value_with_fallback;return nodes_default.create(nodes_default.OPTION_VALUE,this.json.child("values").child(child_path),value_format)}reserved_attributes(){return["_id","_rev","type","display","deleted","sort_factor","db_value",...Object.values(LIST_OPERATOR_NAMES)]}reserved_values(){return["_id","_rev","type",ALL_OPTIONS,"null","undefined"]}};init_define_process_env();init_shim();init_u2();init_nodes();init_lib();init_CustomFieldState();var OptionAttribute=class extends CustomFieldState{deleted(){return this.json.child("deleted").get()}name(){return this.json.name()}parent(){return nodes_default.create(nodes_default.OPTION_SET,this.json.parent().parent())}};init_define_process_env();init_shim();var import_web_dom_collections_iterator162=__toESM(require_web_dom_collections_iterator());init_u2();init_nodes();init_lib();init_lang();var OptionValue=class extends nodes_default.AppNode{constructor(json,format8){super(json),this.format=format8}deleted(){return this.json.child("deleted").get()}name(){if(this.format===OPTION_VALUE_FORMATS.name_is_key)return this.json.name();var _this$json$child$get;return(_this$json$child$get=this.json.child("db_value").get())!=null?_this$json$child$get:this.json.name()}id(){return this.name()}display(){return this.json.child("display").get()}sort_factor(){return this.json.child("sort_factor").get()}parent(){return nodes_default.create(nodes_default.OPTION_SET,this.json.parent().parent())}attr(attr){let ret=this.json.child(attr).raw();if(ret&&typeof ret=="object"&&Object.keys(ret).every(key=>key.match(/^\d+$/))){let arr=[];return Object.entries(ret).forEach(_ref=>{let[i,val]=_ref;arr[parseInt(i)]=val}),arr}return ret}};init_define_process_env();init_shim();init_builtins();init_define_process_env();init_shim();var import_web_dom_collections_iterator163=__toESM(require_web_dom_collections_iterator());init_lib();init_appquery();init_decaf();function page_id_to_name(id_to_find){let pages2=lib_default().derived("PageByName").content(),found=object_keys(pages2).find(name=>pages2[name].id===id_to_find);return found!=null?found:null}nodes_default.add(nodes_default.FAKE_APPLICATION,Application);nodes_default.add(nodes_default.APPLICATION,Application2);nodes_default.add(nodes_default.APPLICATION_VERSION,ApplicationVersion);nodes_default.add(nodes_default.API_WORKFLOWS,API);nodes_default.add(nodes_default.CUSTOM_TYPE,CustomType);nodes_default.add(nodes_default.READONLY_TYPE,ReadonlyType);nodes_default.add(nodes_default.SECURABLE_TYPE,SecurableType);nodes_default.add(nodes_default.CUSTOM_FIELD_STATE,CustomFieldState);nodes_default.add(nodes_default.CUSTOM_FIELD,CustomField);nodes_default.add(nodes_default.PRIVACY_ROLE,PrivacyRole);nodes_default.add(nodes_default.OPTION_SET,OptionSet);nodes_default.add(nodes_default.OPTION_ATTRIBUTE,OptionAttribute);nodes_default.add(nodes_default.OPTION_VALUE,OptionValue);var page_id_to_name2=page_id_to_name;init_appquery();init_define_process_env();init_shim();var import_web_dom_collections_iterator164=__toESM(require_web_dom_collections_iterator()),import_es_string_replace35=__toESM(require_es_string_replace());init_db_values();function get_data_to_send(data,field){if(!data)return data;if(db_values_default.registry.is(data,db_values_default.STATIC_NODE))return null;if(data._id){let slug_value=data.child("Slug").get();if(slug_value!=null&&slug_value!=="")return slug_value;let id,readable;return typeof data._id=="function"?id=data._id():id=data.id,field&&typeof data.child=="function"&&(readable=data.child(field).get()),readable?make_URL_friendly_string(readable)+"-"+id:id}else return data}var space_regex=/ /g,weird_char_regex=/[.,/#!$%^&*;':\\{}=_`~()<>?"@\u2019\u2018]/gu,new_line_regex=/\n/g,dot_regex2=/\./g,MAX_READABLE_LENGTH=75;function make_URL_friendly_string(readable,max_length){var _max_length;(_max_length=max_length)!=null||(max_length=MAX_READABLE_LENGTH);let splitted=readable.split(" "),processed_readable=splitted[0];if(processed_readable.length>max_length)processed_readable=processed_readable.slice(0,+max_length+1||void 0);else for(let a of splitted.slice(1)){if(processed_readable.length+a.length>max_length)break;processed_readable+=" "+a}return processed_readable=processed_readable.toLowerCase().replace(space_regex,"-").replace(weird_char_regex,"").replace(new_line_regex,"-").replace(dot_regex2,"-"),processed_readable}init_lang();init_evaluate();init_eval_node_state();init_lib();var querystring4=__toESM(require_querystring());init_element_utils();init_text_elements2();init_define_process_env();init_shim();var import_web_dom_collections_iterator165=__toESM(require_web_dom_collections_iterator()),querystring3=__toESM(require_querystring());init_lang();init_appquery();init_element_eval();init_eval_node_state();init_evaluate();init_shrink();init_lib();init_b_object();init_mode_check();var href_attributes=["mailto","tel","sms","skype"],forbidden_url_keys=["id","debug_mode","resume","record_debugging_session"];function getPageName(instance4){var _application$page_id_,_appquery$get_page_by;let page2=evaluate_property(instance4,"page");return(_application$page_id_=page_id_to_name2(page2))!=null?_application$page_id_:(_appquery$get_page_by=appquery_default.get_page_by_name(page2))==null?void 0:_appquery$get_page_by.name()}function getLinkedPage(instance4,keep_current_page_params){var _getPageName;let pageName=(_getPageName=getPageName(instance4))!=null?_getPageName:"",dataToSend=evaluate_property(instance4,"data_to_send");if(dataToSend){let pageElement=appquery_default.get_page_by_name(pageName);if(pageElement!=null){let toAppend=get_data_to_send(dataToSend,pageElement.get_static_property("readable_field"));toAppend&&(pageName+="/"+toAppend)}}let params={};if(keep_current_page_params&&Object.assign(params,lib_default().location.get_query()),is_debug_mode()&&(params.debug_mode=!0),evaluate_property(instance4,"add_parameters")){let paramNodes=instance4.element.property("url_parameters");with_eval_node(paramNodes,function(){let urlParams=evaluate_properties(paramNodes.json._raw(),instance4.prop_eval_context(),DETECT_FIELD_NAMES);for(let{key,value}of Object.values(urlParams))forbidden_url_keys.includes(key)||(params[key]=value)})}pageName==="index"&&(pageName="");let link=lib_default().location.get_server_base({canonicalizeLiveVersion:!0})+pageName;return is_empty(params)||(link+="?"+querystring3.stringify(params)),link}function getLink(instance4){if(evaluate_property(instance4,"linktype")==="pagelink")return getLinkedPage(instance4,instance4.get_static_property("keep_current_page_params"));{var _link;let link=evaluate_property(instance4,"url");return((_link=link)==null?void 0:_link.indexOf("//"))===-1&&!href_attributes.includes(link.split(":")[0])&&link[0]!=="#"&&(link="//"+link),link}}init_element_eval();init_define_process_env();init_shim();var import_web_dom_collections_iterator167=__toESM(require_web_dom_collections_iterator());init_lib();init_logger();init_locations2();init_define_process_env();init_shim();var import_web_dom_collections_iterator166=__toESM(require_web_dom_collections_iterator());init_appquery();init_client_config2();init_lib();init_logger();init_u2();init_multiple_live_versions();var hide_banner_fn;function hide_banner(){var _hide_banner_fn;(_hide_banner_fn=hide_banner_fn)==null||_hide_banner_fn()}function show_banner(page_name){if((!appquery_default.app_plan().no_branding&&!client_config_default2.is_dedicated||isLiveVersion(appquery_default.app_version())&&appquery_default.app_plan().force_branding_live)&&(appquery_default.appname()!=="meta"||!["invoice","payout_receipt","poststripeauth"].includes(page_name))){let icon="https://a3f482aa37473c68f97b76bd2e4a3782.cdn.bubble.io/f1585607370503x914556455591480200/banner-icon.svg",long_text,big_width,small_width;appquery_default.appname()==="ajuders"?(long_text="Feito com Bubble",big_width=134,small_width=101):(long_text="Built on Bubble",big_width=128,small_width=95);let div2=$(`<div style="width: ${big_width}px !important; position: fixed !important; bottom: 10px !important; right: 10px !important; height: 29px !important; z-index: 100000000000 !important; box-shadow: 0px 0px 20px 0 #00000069 !important; background: #0205D3 !important; border-radius: 3px !important;"></div>`),wrapper=$('<div style="position: absolute;" class="notranslate" translate="no"></div>'),link=$(`<a target="${appquery_default.appname()==="meta"?"_self":"_blank"}" style="width: 100%; height: 100%; position: absolute;"></a>`),sub_wrapper=$('<div style=""></div>');sub_wrapper.append($(`<img alt="Bubble" src="${icon}" style="width: 15px !important; margin-top: 7px !important; margin-left: 6px !important; float: left;"></img>`));let text2=$(`<div style="color: white; font-size: 12px; font-family: Arial, sans-serif; margin-top: 9px; float: left; margin-left: 8px; width: ${small_width}px; font-weight: bold;"></div>`);sub_wrapper.append(text2),div2.append(wrapper.append(sub_wrapper)),div2.append(link);let link_url="https://bubble.io?utm_source=app_mention&utm_content="+appquery_default.appname();link.attr("href",link_url),window.self!==window.top?$(window.frameElement).parent().append(div2):$("body").append(div2),text2.html(long_text);let div_html=div2.html();if(!["meta","pioneer","bubblepodcasts"].includes(appquery_default.appname())&&window.self===window.top){var _get_native_fn;let banner_interval=((_get_native_fn=get_native_fn("setInterval"))!=null?_get_native_fn:window.setInterval).call(window,()=>handle_banner_cheating(div2,div_html),2e3);hide_banner_fn=()=>{document.body.innerHTML===""&&clearInterval(banner_interval)}}}}function handle_banner_cheating(div2,div_html){let cheats={tampered_banner:div2.html()!==div_html,banner_not_visible:!div2.is(":visible"),moved_div:div2.parent()[0]!==$("body")[0],not_in_document:!$.contains(document,div2[0])},details;cheats.tampered_banner&&(details={original_html:div_html,tampered_html:div2.html()});for(let[broken_rule,did_cheat]of Object.entries(cheats))if(did_cheat){info("User bypassed free branding",{broken_rule,details}),alert("This app is a free plan and should have a Bubble banner. Please upgrade to remove this banner. Removing or altering the banner in any way is against Bubble terms and can lead to your account termination."),document.location=lib_default().location.get_base_for_meta();return}}function get_native_fn(fn_name){let dummyIframe=document.createElement("iframe");document.body.appendChild(dummyIframe);let native_fn=dummyIframe.contentWindow[fn_name];return document.body.removeChild(dummyIframe),native_fn}function add_bubble_marketing(page_name){setTimeout(()=>{setTimeout(()=>{(!(appquery_default.app_plan().no_branding&&appquery_default.get_public_setting("remove_bubble_console"))||appquery_default.app_plan().force_branding_live)&&(console_with_styling("This web application is entirely built without code on Bubble"),console.log("Visit https://bubble.io to build your own apps"))},3e3),setTimeout(()=>{$.migrateWarnings.filter(warning=>!warning.includes("deprecated")).forEach(warning=>{info("JQMIGRATE WARNING "+warning)})},1e4),is_debug_mode()||setTimeout(()=>show_banner(page_name),100)},200)}init_u2();var EXPERIMENT_PROBABILITY=0,FORCE_INTERNAL_NAV_PARAM="__internalNav",EXPERIMENT_PARAM="navigate_internally";function update_url(path,query){let url9=lib_default.or_throw().location.get_page_url(path,query);window.history.pushState({path,query},"",url9),lib_default.or_throw().pageparam.invalidate()}function push_initial_browser_state(page_id){if(!internal_navigation_enabled())return;let path=lib_default.or_throw().location.get_pieces().path.join("/"),query=lib_default.or_throw().location.get_pieces().query;window.history.pushState({path,query},"",lib_default.or_throw().location.get_page_url(path,query))}function add_popstate_handler(){window.onpopstate=function(e){lib_default.or_throw().pageparam.invalidate(),!(!internal_navigation_enabled()||!e.state)&&(e.preventDefault(),navigate_internally(e.state.path,e.state.query))}}function internal_navigation_enabled(){return lib_default.or_throw().location.get_query()[FORCE_INTERNAL_NAV_PARAM]==="true"}function internal_navigation_handler(event){if(!internal_navigation_enabled())return;let element=event.currentTarget,opens_in_another_tab=element.target!=="_self",modified_click=event.button!==0||event.altKey||event.ctrlKey||event.metaKey||event.shiftKey,unknown_protocol=!["http:","https:"].includes(element.protocol);if(opens_in_another_tab||modified_click||unknown_protocol)return;let target=classify_link(element.href);if(target.type!=="external"){if(!lib_default.or_throw().workflow.prompt_to_leave_page()){event.preventDefault();return}event.preventDefault(),navigate_to_page(target.path.join("/"),target.query)}}function navigate_to_page(path,query){if(!internal_navigation_enabled())navigate_normally(path,query);else if(in_experimental_control_group()){let data={...query,[EXPERIMENT_PARAM]:"false"};navigate_normally(path,data)}else navigate_internally(path,query)}function navigate_normally(path,query){lib_default.or_throw().location.change_page(path,query)}function navigate_internally(path,query){let url9=lib_default.or_throw().location.get_page_url(path,query),page_name=new Location(url9).get_page();window.switch_page(page_name,()=>update_url(path,query))||navigate_normally(path,query)}function classify_link(destinationUrl){var _Lib2;let sourcePieces=(_Lib2=lib_default())==null?void 0:_Lib2.location.get_pieces(),destinationLocation=new Location(destinationUrl),destinationPieces=destinationLocation.get_pieces();if((sourcePieces==null?void 0:sourcePieces.appname)===destinationPieces.appname&&(sourcePieces==null?void 0:sourcePieces.app_version)===destinationPieces.app_version&&(sourcePieces==null?void 0:sourcePieces.domain)===destinationPieces.domain){let page_name=destinationLocation.get_page(),{path,query}=destinationPieces;return{type:"page",page_name,path,query}}else return{type:"external",url:destinationUrl}}function add_internal_navigation_handlers(element){let a_tags=element.getElementsByTagName("a");for(let el of a_tags)el.addEventListener("click",internal_navigation_handler)}function unload_page(){try{var _Lib$or_throw$element;(_Lib$or_throw$element=lib_default.or_throw().element.get_page())==null||_Lib$or_throw$element.destroy(),lib_default.or_throw().workflow.cancel_all_workflows()}catch(err){error("Error while unloading page",{error:ensure_bubble_error(err)})}document.body.innerHTML="",hide_banner()}function in_experimental_control_group(){let res=!1;return Math.random()<EXPERIMENT_PROBABILITY&&!window._bubble_page_load_data.navigated&&(res=!0),window._bubble_page_load_data.navigated=!0,res}var Link_default={property_applications:[new property_applications_default.MinWidth],additional_data:{notify_width(instance4,width2){instance4.state("notify_width",width2)}},initialize(instance4){let canvas=instance4.get_canvas();instance4.wait_for_visible_lite(()=>{canvas.addClass(CLICKABLE_ELEMENT),property_applications_default.apply_css_style(canvas,{"white-space":"pre-wrap","text-decoration":"none"});let dotdotdot_initialized=!1;pre_cache(instance4,["text","font_size","icon","show_icon","background_style","no_html"]),instance4.canvas[0].addEventListener("click",e=>{internal_navigation_handler(e)}),instance4.autorun(()=>{let props={};for(let prop of["text","font_size","icon","show_icon","background_style","no_html"])props[prop]=evaluate_property(instance4,prop);let{text:text2,icon,show_icon,background_style}=props;if(instance4.state("notify_width"),background_style==="image")canvas.text("");else if(show_icon){var _canvas$trigger;dotdotdot_initialized=!1,(_canvas$trigger=canvas.trigger)==null||_canvas$trigger.call(canvas,"destroy"),canvas.empty();let icon_div=div(icon+" inner-element");property_applications_default.apply_css_style(icon_div,{"font-family":"FontAwesome","padding-left":"3px"}),canvas.append(icon_div)}else{let inject_text2=function(div2){div2.html(bbcode_to_html(text2).trim())};var inject_text=inject_text2;instance4.get_static_property("wrap_when_squizzed")&&(instance4.run_mode()||instance4.responsive_mode())?(property_applications_default.apply_css_style(canvas,{"word-break":"break-word"}),instance4.wait_for_visible_lite(()=>instance4.setTimeout(()=>{let content=canvas.find(".content");content.length===0&&(content=div("content",canvas)),inject_text2(content);let border_margin_dif=canvas.outerHeight()-canvas.height(),inner_height2=parseInt(content.css("height").replace("px","")),min_height2=instance4.element.get_height();instance4.set_height(Math.max(min_height2,inner_height2+border_margin_dif))},1))):(inject_text2(canvas),(instance4.run_mode()||instance4.thumbnail_mode())&&!dotdotdot_initialized&&(dotdotdot_initialized=!0,apply_dotdotdot2(instance4,instance4.edit_mode()||instance4.responsive_mode()?"letter":"words"))),instance4.run_mode()||(void 0)(instance4)}background_style==="none"&&new property_applications_default.NoSelect()._apply(!0,canvas)}),instance4.run_mode()&&(on_property_change(instance4,"open_in_new_tab",open_in_new_tab=>{open_in_new_tab?canvas[0].target="_blank":canvas[0].target="_self"}),on_property_change(instance4,"link_disabled",link_disabled=>{instance4.state("link_disabled",link_disabled),link_disabled?(instance4.get_canvas()[0].style.cursor="not-allowed",instance4.get_canvas()[0].style["pointer-events"]="none"):(instance4.get_canvas()[0].style.cursor="pointer",instance4.get_canvas()[0].style["pointer-events"]="auto")}),on_property_change(instance4,"nofollow",nofollow=>{nofollow&&(canvas[0].rel="nofollow")}),instance4.autorun(()=>{let linktype=evaluate_property(instance4,"linktype");function get_page_name(page2){var _name,_appquery$get_page_by;let name=page_id_to_name2(page2);return(_name=name)!=null||(name=(_appquery$get_page_by=appquery_default.get_page_by_name(page2))==null?void 0:_appquery$get_page_by.name()),name}let link;if(linktype==="pagelink"){var _get_page_name;let page2=evaluate_property(instance4,"page"),page_name=(_get_page_name=get_page_name(page2))!=null?_get_page_name:"",data_to_send=evaluate_property(instance4,"data_to_send");if(data_to_send){let page_element=appquery_default.get_page_by_name(page_name);page_element!=null&&(data_to_send=get_data_to_send(data_to_send,page_element.get_static_property("readable_field")),data_to_send&&(page_name+="/"+data_to_send))}let params={};if(instance4.get_static_property("keep_current_page_params")&&extend(params,lib_default().location.get_query()),is_debug_mode()&&(params.debug_mode=!0),evaluate_property(instance4,"add_parameters")){let param_nodes=instance4.element.property("url_parameters");with_eval_node(param_nodes,()=>{let url_parameters=evaluate_properties(param_nodes.json._raw(),instance4.prop_eval_context(),DETECT_FIELD_NAMES);for(let{key,value}of Object.values(url_parameters!=null?url_parameters:{}))forbidden_url_keys.includes(key)||(params[key]=value)})}page_name==="index"&&(page_name=""),link=lib_default().location.get_server_base()+page_name,is_empty(params)||(link+="?"+querystring4.stringify(params))}else{var _link;link=evaluate_property(instance4,"url"),((_link=link)==null?void 0:_link.indexOf("//"))===-1&&!href_attributes.includes(link.split(":")[0])&&link[0]!=="#"&&(link="//"+link)}canvas[0].href=link,on_phonegap()&&(canvas.on("touchend",()=>window.open(link,"_blank","location=yes,enableViewportScale=yes")),canvas.on("click",e=>(e.preventDefault(),!1)))}))})}};init_define_process_env();init_shim();var import_web_dom_collections_iterator169=__toESM(require_web_dom_collections_iterator());init_property_applications();init_apps_utilities();init_images2();init_appquery();init_u2();init_image_utils();init_element_eval();function is_src_static(element){let prop=element.property("src");if(!prop.is_empty()&&prop.is_static()&&element.get_static_property("src",!0)!=="")return!0}var Image_default={property_applications:[new property_applications_default.MinWidth],can_defer_drawing(){return!0},register(instance4){instance4.state("src_version",0)},initialize(instance4){let canvas=instance4.get_canvas();canvas.addClass("bubble-legacy-image"),instance4.wait_for_visible_lite(()=>{let display_text,img2=img(void 0,canvas);img2[0].style.display="block",instance4.run_mode()||(display_text=div("display_text",canvas),img2[0].style.float="left");let _last_autorun_execution=null,_last_saved_source=null;instance4.run_mode()&&on_property_change(instance4,"alt_tag",val=>img2[0].alt=val!=null?val:""),pre_cache(instance4,["src","stretch_or_rescale","width","height","crop_data"]),instance4.autorun(()=>{let current_autorun_execution,properties={};for(let prop of["src","stretch_or_rescale","width","height","crop_data"])properties[prop]=evaluate_property(instance4,prop);let is_static3=is_src_static(instance4.element);if(!instance4.run_mode())if(is_static3)display_text[0].style.display="none",img2[0].style.display="block";else{var _properties$src;display_text.html((_properties$src=properties.src)!=null?_properties$src:""),property_applications_default.apply_css_style(display_text,{display:"block",overflow:"hidden",width:"100%",color:"grey"}),img2[0].style.display="none";return}if(_last_autorun_execution=current_autorun_execution=LUID(),properties.src&&!is_empty(properties.src)){let assign_image_to_element2=function(source,width2,height2,imgix_options){function begin_download(optimized_source2){_last_autorun_execution===current_autorun_execution&&download_image(optimized_source2,instance4,new_src=>{_last_autorun_execution===current_autorun_execution&&(_last_saved_source=source,img2[0].src=new_src)})}let optimized_source=optimize_image(source,width2,height2,imgix_options),delay2=source===_last_saved_source&&!downloaded_images[optimized_source];delay2&&is_test2(appquery_default.appname())&&(delay2=!1),delay2?instance4.setTimeout(begin_download.bind(null,optimized_source),300):begin_download(optimized_source)};var assign_image_to_element=assign_image_to_element2;if(img2[0].src||(img2[0].src=transparent_image(),reset_img_settings(img2)),is_static3){var _instance$element$roo;let imgix_responsive_options;if((_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()&&!instance4.get_static_property("keep_proportion_resize")?imgix_responsive_options={fit:"crop"}:imgix_responsive_options={},reset_img_settings(img2),assign_image_to_element2(properties.src,properties.width,properties.height,imgix_responsive_options),properties.crop_data){let make_css_percentage=num=>`${Math.floor(num*100)}%`;property_applications_default.apply_css_style(img2,{width:make_css_percentage(properties.crop_data.width_factor),height:make_css_percentage(properties.crop_data.height_factor),"margin-left":make_css_percentage(properties.crop_data.left_offset),"margin-top":properties.crop_data.top_offset*properties.height+"px"})}}else{let src_version=u_exports2.autorun_top(()=>instance4.state("src_version"));src_version+=1,instance4.state("src_version",src_version),properties.stretch_or_rescale==="rescale"?rescale_image({src:properties.src,img:img2,instance:instance4,ref_version:src_version,cb(){assign_image_to_element2(properties.src,evaluate_property(instance4,"width"),evaluate_property(instance4,"height"))}}):properties.stretch_or_rescale==="adjust_height"?get_image_real_dimensions(properties.src,res=>{if(res.height==null){assign_image_to_element2(properties.src,properties.width,properties.height);return}let cur_version=u_exports2.autorun_top(()=>instance4.state("src_version"));if(src_version!==cur_version)return;reset_img_settings(img2);let height2=res.height/res.width*properties.width;assign_image_to_element2(properties.src,properties.width,height2),instance4.set_height(height2)}):properties.stretch_or_rescale==="stretch"?(reset_img_settings(img2),assign_image_to_element2(properties.src,properties.width,properties.height)):properties.stretch_or_rescale==="zoom"&&(reset_img_settings(img2),property_applications_default.apply_css_style(img2,{"object-fit":"cover"}),assign_image_to_element2(properties.src,properties.width,properties.height))}}else img2[0].src=transparent_image(),_last_saved_source=null,reset_img_settings(img2)}),instance4.autorun(()=>{if(evaluate_property(instance4,"four_border_style"))for(let border_location of["top","right","bottom","left"])img2[0].style["border-radius-"+border_location]=evaluate_property(instance4,"border_roundness_"+border_location)+"px";else img2[0].style["border-radius"]=evaluate_property(instance4,"border_roundness")+"px"})})},additional_data:{notify_width(instance4,width2){keep_proportions(instance4,width2)}}};init_define_process_env();init_shim();init_property_applications();init_image_utils();var Shape_default={property_applications:[new property_applications_default.MinWidth],initialize(){},additional_data:{notify_width(instance4,width2){return keep_proportions(instance4,width2)}}};init_define_process_env();init_shim();init_u2();init_property_applications();init_image_utils();init_element_eval();var Alert_default={property_applications:[new property_applications_default.MinWidth],can_defer_drawing(){return!0},register(instance4){instance4.on_message("show_alert",properties=>{if(instance4.is_drawn){instance4.message("do_show_alert",properties);return}instance4.state("pending_alert",{orig_props:properties,start_time:Date.now()}),instance4.run_mode()&&instance4.get_static_property("at_to_top")&&instance4.ensure_drawn()})},initialize(instance4){let canvas=instance4.get_canvas();instance4.edit_mode()?canvas.empty():(instance4.run_mode()||instance4.responsive_mode())&&(canvas[0].style.display="none",instance4.responsive_mode()&&(instance4._has_been_hidden=!0)),on_property_change(instance4,"text",text2=>{canvas.html(bbcode_to_html(text2))}),instance4.on_message("do_show_alert",properties=>{var _properties$fin_start;property_applications_default.apply_css_style(canvas,{display:"block",opacity:(_properties$fin_start=properties.fin_starting_opacity)!=null?_properties$fin_start:0}),instance4._is_visible_me=!0,instance4._update_visible(),canvas.html(bbcode_to_html(properties.message)),velocity(canvas,{opacity:1},{duration:properties.fade_in,complete_cb:()=>{instance4.setTimeout(()=>{var _properties$fout_star;canvas.css("opacity",(_properties$fout_star=properties.fout_starting_opacity)!=null?_properties$fout_star:1),velocity(canvas,{opacity:0},{duration:properties.fade_out,complete_cb:()=>{canvas[0].style.display="none",instance4._is_visible_me=!1,instance4._update_visible()}})},properties.hold)}})});let pending_alert=instance4.state("pending_alert");pending_alert&&instance4.message("do_show_alert",this._convert_pending_alert(pending_alert))},position_canvas(to_position,instance4){instance4.run_mode()&&instance4.get_static_property("at_to_top")?($("body").append(to_position),property_applications_default.apply_css_style(to_position,{position:"fixed",top:"0px",left:"0px",width:"100%","min-height":instance4.element.get_height()+"px","z-index":"20000"})):instance4.container.add(instance4)},additional_data:{notify_width(instance4,width2){return keep_proportions(instance4,width2)}}};init_define_process_env();init_shim();var import_web_dom_collections_iterator170=__toESM(require_web_dom_collections_iterator()),import_es_string_replace37=__toESM(require_es_string_replace());init_u2();init_known_plugins();init_property_applications();init_plugin_registry();init_define_process_env();init_shim();init_appquery();init_lib();init_db();var should_block_cookies=()=>appquery_default.get_public_setting("cookie_opt_in")&&lib_default().current_user()._id()===NO_USER;init_image_utils();init_element_eval();var prev_key=u_exports2.MakeKey(null,"always turned");prev_key.turn();function video_queue(cb,instance4){let new_key=u_exports2.MakeKey(null,"next video");u_exports2.WaitFor(prev_key,()=>setTimeout(()=>{instance4!=null&&instance4.is_destroyed()||cb(),new_key.turn()},10)),prev_key=new_key}var VideoComponent_default={property_applications:[new property_applications_default.MinWidth],additional_data:{notify_width(instance4,width2){keep_proportions(instance4,width2,!0)}},initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();instance4.setTimeout(()=>{pre_cache(instance4,["video_source","video_id","autoplay","control_color_vimeo","width","height","padding_horizontal","padding_vertical","loop","auth_token"]);let current_properties={};instance4.autorun(()=>{let html_as_jquery_element,prop,token,video_src,actual_changes={},changes={};for(prop of["video_source","video_id","autoplay","control_color_vimeo","width","height","padding_horizontal","padding_vertical","loop","auth_token"])changes[prop]=evaluate_property(instance4,prop),changes[prop]!==current_properties[prop]&&(actual_changes[prop]=changes[prop],current_properties[prop]=changes[prop]);changes.available_width=changes.width-2*changes.padding_horizontal-property_applications_default.calculate_border_width(instance4),changes.available_height=changes.height-2*changes.padding_vertical-property_applications_default.calculate_border_height(instance4);for(prop of["available_width","available_height"])changes[prop]!==current_properties[prop]&&(actual_changes[prop]=changes[prop],current_properties[prop]=changes[prop]);let html=`<iframe allow="autoplay; fullscreen" width="${changes.available_width}" height="${changes.available_height}" `;if(should_block_cookies()&&(html+=' sandbox="allow-scripts" '),changes.video_source==="youtube"){var _changes$video_id;((_changes$video_id=changes.video_id)==null?void 0:_changes$video_id.indexOf)!=null&&changes.video_id.indexOf("watch?v=")!==-1&&(changes.video_id=changes.video_id.split("watch?v=")[1]),video_src="//www.youtube.com/embed/"+changes.video_id+"?rel=0",changes.autoplay&&instance4.run_mode()&&(video_src+="&autoplay=1"),changes.loop&&instance4.run_mode()&&(video_src+="&loop=1&playlist="+changes.video_id),html+=' frameborder="0" allowfullscreen modestbranding="1" autohide="1"'}if(changes.video_source==="vimeo"){var _changes$video_id2;((_changes$video_id2=changes.video_id)==null?void 0:_changes$video_id2.indexOf)!=null&&changes.video_id.indexOf("https://vimeo.com/")!==-1&&(changes.video_id=changes.video_id.split("https://vimeo.com/")[1]);let color=rgb_to_hex(changes.control_color_vimeo).code.slice(1);video_src="//player.vimeo.com/video/"+changes.video_id+"?title=0&byline=0&portrait=0&color="+color,changes.autoplay&&instance4.run_mode()&&(video_src+="&autoplay=1"),changes.loop&&instance4.run_mode()&&(video_src+="&loop=1"),html+=' frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'}if(changes.video_source===ZIGGEO){let service=plugin_registry_default.get_hardcoded_plugin(ZIGGEO);if(token=changes.auth_token||(service==null?void 0:service.get_key(service.key_for_html_header)),token){var _changes$video_id3,_changes$autoplay,_changes$loop;html_as_jquery_element=$("<ziggeoplayer/>"),html_as_jquery_element.attr({video:(_changes$video_id3=changes.video_id)!=null?_changes$video_id3:"no_video",application:token,auth:"true",width:"100%",height:"100%",autoplay:(_changes$autoplay=changes.autoplay)!=null?_changes$autoplay:"false",loop:(_changes$loop=changes.loop)!=null?_changes$loop:"false",theme:"modern"});let ziggeo_html=html_as_jquery_element[0].outerHTML.replace(/"/g,"'");html+=` frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen
                                style='overflow:hidden'
                                srcdoc="
<html style='overflow:hidden'>
<head style='overflow:hidden'>
<meta http-equiv='Content-Security-Policy' content='upgrade-insecure-requests'>
<link rel='stylesheet' href='https://assets.ziggeo.com/v2-stable/ziggeo.css' />
<script src='https://assets.ziggeo.com/v2-stable/ziggeo.js'><\/script>
</head>
<body style='margin:0px'>
${ziggeo_html}
</body>
</html>
"`}else video_src=`https://ziggeo.io/p/${changes.video_id}`,html+=`height="${changes.width}"
frameborder="0"
scrolling="no"
referrerpolicy="no-referrer"
allowspeakers ${changes.autoplay?"allowautoplay":""} allowfullscreen
allow="${changes.autoplay?"autoplay *; ":""}  fullscreen *"
style="width:${changes.width}px;height:${changes.height}px" `}html+="></iframe>",(changes.video_source!=="ziggeo"||!token)&&(html_as_jquery_element=$(html),html_as_jquery_element.attr("src",video_src));let only_has_dimension_changes=changes.video_source!=="ziggeo",dim_only_changes={width:!0,height:!0,available_width:!0,available_height:!0};for(let change in actual_changes)if(!dim_only_changes[change]){only_has_dimension_changes=!1;break}if(instance4.run_mode()){if(only_has_dimension_changes){canvas.children().attr({width:changes.available_width,height:changes.available_height});return}changes.video_id?video_queue(()=>{canvas.empty(),canvas.append(html_as_jquery_element)},instance4):canvas.empty()}else canvas.empty(),canvas.append(`<img style="width: ${changes.available_width}px; height: ${changes.available_height}px;" src="//s3.amazonaws.com/appforest_uf/f1665093563671x395094029933674050/video.png"></img>`)})},20)})}};init_define_process_env();init_shim();var import_web_dom_collections_iterator171=__toESM(require_web_dom_collections_iterator()),import_es_string_replace38=__toESM(require_es_string_replace());init_elements2();init_u2();init_property_applications();init_logger();init_element_utils();init_image_utils();init_text_elements2();init_element_eval();function UNMANGLED_html_wrap(fn){return fn()}var HTML_default={property_applications:[new property_applications_default.MinWidth],additional_data:{notify_width(instance4,width2){return keep_proportions(instance4,width2)}},can_defer_drawing(element){return element.get_static_property("defer_drawing")},register(instance4){if(instance4.run_mode()&&window.bubble_safe_mode)return owner_warn(new OwnerError("This HTML element is not rendered in safe mode",{element_instance:instance4}))},initialize(instance4){function do_initialize(){if(instance4.run_mode()&&window.bubble_safe_mode)return;let canvas=instance4.get_canvas(),scheduled_time_out_call_for_html_iframe=null,iframe=null,_content_window_ready=()=>iframe[0].contentWindow,last_visible_status=!1,last_html=!1;pre_cache(instance4,["html","useiframe","width","height"]),instance4.autorun(()=>{var _html;let content,props={};for(let prop of["html","useiframe","width","height"])props[prop]=evaluate_property(instance4,prop);let{html,useiframe,width:width2,height:height2}=props;if((_html=html)!=null||(html=""),instance4.run_mode())if(useiframe){let set_html=html_aux=>{instance4.clearTimeout(scheduled_time_out_call_for_html_iframe),iframe||(iframe=$('<iframe src="about:blank"></iframe>'),should_block_cookies()&&iframe.attr("sandbox","allow-scripts allow-same-origin"),canvas.append(iframe)),iframe[0].style.width=width2+"px",iframe[0].style.height=height2+"px",_content_window_ready()?(last_html!==html_aux&&(iframe[0].contentWindow.contents=html_aux,last_html=html_aux),iframe[0].src='javascript:window["contents"]'):scheduled_time_out_call_for_html_iframe=instance4.setTimeout(()=>set_html(html_aux),100)};set_html(html)}else try{if(instance4.get_static_property("stretch_to_fit")){let adjust_height2=function(cb){if(instance4.is_animating(!0)){cb==null||cb();return}let is_visible=instance4.is_visible(!0);if(!is_visible&&!last_visible_status){cb==null||cb();return}last_visible_status=is_visible;let border_margin_dif=canvas.outerHeight()-canvas.height(),inner_height2=parseInt(content.css("height").replace("px",""));inner_height2===0&&content.find(" > *").length&&(inner_height2=parseInt(content.find(" > *").css("height").replace("px","")));let min_height2=instance4.element.get_height();instance4.set_height(Math.max(min_height2,inner_height2+border_margin_dif)),cb==null||cb()};var adjust_height=adjust_height2;if(content=canvas.find(".content"),content.length===0&&(content=div("content",canvas)),last_html!==html&&(UNMANGLED_html_wrap(()=>content.html(html)),last_html=html),!instance4.is_animating()){let key=add_layout_resizing_key2();u_exports2.wait_for_updates(()=>wait_for_img_tags_loaded(content,()=>adjust_height2(()=>key.turn()))),instance4.is_visible()&&(instance4.setTimeout(adjust_height2,500),instance4.setTimeout(adjust_height2,2e3))}}else UNMANGLED_html_wrap(()=>canvas.html(html))}catch(error2){owner_only_error("html bug",{display:`Bug in custom html:
`+error2.stack,element_instance:instance4,prop_name:"html"})}else{canvas.empty();let iframe2=$(`          <iframe
              id='user_preview_iframe'
              width="${width2}"
              height="${height2}"
              sandbox="allow-scripts"
          >
              (this browser does not support HTML element preview rendering)
          </iframe>          `);iframe2[0].srcdoc=html,canvas.append(iframe2),(void 0)(instance4)}})}instance4.get_static_property("defer_drawing")?instance4.wait_for_visible_lite(do_initialize):do_initialize()}};init_define_process_env();init_shim();init_u2();init_property_applications();init_define_process_env();init_shim();init_lib();init_languages();var querystring5=__toESM(require_querystring());init_appquery();init_logger();init_apps_utilities();init_errors();var b_async8=__toESM(require_b_async()),autorun10=__toESM(require_autorun()),google_map_api_loaded=null,bubble_key=null;function get_map_key(){return bubble_key||(bubble_key=window.gm_key,delete window.gm_key),bubble_key}function load_google_map_api(){if(!google_map_api_loaded){google_map_api_loaded=b_async8.MakeKey(null,"google_map_api_loaded"),window.initialize_google_map_api=()=>{google_map_api_loaded.turn()};let script=document.createElement("script");script.type="text/javascript";let query={v:3,callback:"initialize_google_map_api"};using_bubble_key()||(query.libraries="places"),autorun10.run_once(30,()=>({map_key:get_map_key(),app_language:lib_default().app_language(!0)}),(err,_ref)=>{let{map_key,app_language:app_language2}=_ref;if(err)throw ensure_bubble_error(err);if(app_language2){var _language_map$app_lan;let language_map={zh_cn:"zh-CN",zh_tw:"zh-TW",pt_br:"pt-BR",pt_pt:"pt-PT",en_au:"en-AU",en_gb:"en-GB",fr_ca:"fr-CA"};query.language=(_language_map$app_lan=language_map[app_language2])!=null?_language_map$app_lan:get_iso_code(app_language2).split("_")[0]}map_key&&(query.key=map_key),script.src="https://maps.googleapis.com/maps/api/js?"+querystring5.stringify(query),document.getElementsByTagName("head")[0].appendChild(script)})}return google_map_api_loaded}function using_bubble_key(){var _appquery$get_public_;let appname=appquery_default.appname();return is_hardcoded(appname)||appname==="meta"?!1:[null,void 0,""].includes((_appquery$get_public_=appquery_default.get_public_setting("general_keys.google_map_key"))==null?void 0:_appquery$get_public_.trim())}function proxy_geolocation_request(data,hash2,cb){data.language=lib_default().app_language(),data.appname=appquery_default.appname();let url9=!using_bubble_key()&&data.request_type==="timezone"?"server://api/1.1/geolocation/google_proxy":"server://api/1.1/places";lib_default().location.post(url9,data,(err,results)=>{err&&(log(err),cb({status:err.message},hash2)),cb(results,hash2)})}init_element_utils();init_image_utils();init_element_eval();var GoogleMaps_default={property_applications:[new property_applications_default.MinWidth],additional_data:{notify_width(instance4,width2){keep_proportions(instance4,width2)}},initialize(instance4){instance4.wait_for_visible_lite(()=>{var _instance$currently_d;(_instance$currently_d=instance4.currently_displayed_markers)!=null||(instance4.currently_displayed_markers={});let google_map_api_loaded2=load_google_map_api(),canvas=instance4.get_canvas();if(instance4.thumbnail_mode()){canvas.css({"background-color":"#E6E6E6"});return}let map2=null;u_exports2.WaitFor(google_map_api_loaded2,()=>{let build=()=>{map2=this._get_map(instance4,{height:"100%",width:"100%",position:null,top:null,left:null,right:null,bottom:null}),instance4.edit_mode()&&(void 0)(instance4),pre_cache(instance4,["height","width","four_border_style","border_width","border_style","padding_vertical","padding_horizontal"]),instance4.autorun(()=>{this._refresh_border(instance4,map2)}),on_property_change(instance4,["allow_zoom_drag","map_style","custom_style","disable_zoom_scroll"],props=>{this._handle_map_option_change(map2,props)}),on_property_change(instance4,"map_type",map_type=>{map2.setMapTypeId(window.google.maps.MapTypeId[map_type])}),instance4.autorun(()=>{this._render_markers(instance4,map2)}),instance4.autorun(()=>{this._set_center_and_zoom(instance4,map2)})};instance4.wait_for_visible(()=>{instance4.setTimeout(build,1)})})})}};init_define_process_env();init_shim();init_u2();init_property_applications();init_define_process_env();init_shim();var import_es_string_replace39=__toESM(require_es_string_replace());init_u2();init_elements2();var COLLAPSE_ANIMATION_LENGTH=15,group_collapse_definition={do_show(instance4,properties,options,animated,first_show){var _canvas$velocity;instance4._is_visible_me=!0,instance4.ensure_drawn();let canvas=instance4.get_canvas(),was_sliding=instance4.group_slide_timeout!==null;if(canvas[0].style.display="",instance4._update_visible(),!instance4.run_mode())return;(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop"),instance4.group_slide_timeout!=null&&(instance4.clearTimeout(instance4.group_slide_timeout),instance4.group_slide_timeout=void 0);let collapse_when_hidden=instance4.get_static_property("collapse_when_hidden");function instance_height(){var _instance$state;return(_instance$state=instance4.state("actual_height"))!=null?_instance$state:instance4.element.get_height()}if(collapse_when_hidden&&!animated)if(instance4.get_static_property("collapse_animation")&&!first_show)switch(instance4.get_static_property("animation_type")){case"slide":{let _increase_size2=function(){let current_instance_height=instance_height();if(current_instance_height!==instance_height_constant&&(instance_height_constant=current_instance_height,pixels_per_ms=instance_height_constant/COLLAPSE_ANIMATION_LENGTH),current_size>=current_instance_height){instance4.set_height(current_instance_height),instance4.canvas.css("overflow","visible"),instance4.group_slide_timeout=void 0;return}current_size+=pixels_per_ms,instance4.set_height(current_size),instance4.group_slide_timeout=instance4.setTimeout(()=>_increase_size2(),1)};var _increase_size=_increase_size2;instance4.canvas.css("overflow","hidden");let instance_height_constant=instance_height(),pixels_per_ms=instance_height_constant/COLLAPSE_ANIMATION_LENGTH,current_size=was_sliding?parseInt(canvas.css("height").replace("px","")):0;instance4.set_height(current_size),_increase_size2();break}case"fade":canvas[0].style.opacity=0,instance4.set_height(instance_height()),velocity(canvas,"fadeIn",{duration:400}),instance4.canvas.css("overflow","visible")}else instance4.set_height(instance_height());else animated?(instance4.set_height(instance_height()),perform_animate_in2(instance4,properties,options,!0)):instance4.set_height(instance_height())},do_hide(instance4,properties,options,animated,first_hide){var _canvas$velocity2;instance4.ensure_drawn();let canvas=instance4.get_canvas();if(!instance4.run_mode()){instance4._is_visible_me=!1,instance4._update_visible(),canvas[0].style.display="none";return}(_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop"),instance4.group_slide_timeout!=null&&(instance4.clearTimeout(instance4.group_slide_timeout),instance4.group_slide_timeout=void 0);let collapse_when_hidden=instance4.get_static_property("collapse_when_hidden"),instance_height=parseInt(canvas.css("height").replace("px",""));if(collapse_when_hidden&&!animated)if(instance4.get_static_property("collapse_animation")&&!first_hide)switch(instance4.get_static_property("animation_type")){case"slide":{let _reduce_size2=function(){if(current_size<=0){instance4.set_height(0),canvas[0].style.display="none",instance4.canvas.css("overflow","visible"),instance4.group_slide_timeout=void 0;return}current_size-=pixels_per_ms,instance4.set_height(current_size),instance4.canvas.css("height",current_size),instance4.group_slide_timeout=instance4.setTimeout(()=>_reduce_size2(),1)};var _reduce_size=_reduce_size2;instance4.canvas.css("overflow","hidden");let pixels_per_ms=instance_height/COLLAPSE_ANIMATION_LENGTH,current_size=instance_height;_reduce_size2();break}case"fade":{velocity(canvas,"fadeOut",{duration:400,complete_cb(){return canvas[0].style.display="none",instance4.set_height(0)}});break}}else instance4.set_height(0),canvas[0].style.display="none";else if(animated){var _instance$_transforms,_instance$_transforms2,_instance$_transforms3,_instance$_transforms4,_instance$_transforms5;(_instance$_transforms=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms3=(_instance$_transforms2=instance4._transforms).initial_transform)!=null||(_instance$_transforms2.initial_transform=canvas[0].style.transform),(_instance$_transforms5=(_instance$_transforms4=instance4._transforms).initial_opacity)!=null||(_instance$_transforms4.initial_opacity=canvas[0].style.opacity),instance4.set_animating(!0),velocity(canvas,properties.animation,{duration:options.duration,complete_cb(){instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,canvas[0].style.opacity=instance4._transforms.initial_opacity,instance4._transforms=void 0,collapse_when_hidden&&instance4.set_height(0)}})}else canvas[0].style.display="none";return instance4._is_visible_me=!1,instance4._update_visible()}};var Group_default=extend({property_applications:[new property_applications_default.MinWidth],attempt_size_only_draw(instance4){return instance4.get_static_property("collapse_when_hidden")?(instance4.set_height(0),instance4.canvas[0].style.display="none",instance4.canvas.css("overflow","visible"),!1):!0},register(instance4){instance4.on_message("child_movement",max_delta=>{let height2=instance4.element.get_height()+max_delta;(instance4.is_visible()||!instance4._has_been_hidden)&&instance4.set_height(height2),instance4.state("actual_height",height2)})},initialize(instance4){}},group_collapse_definition);init_define_process_env();init_shim();var import_web_immediate5=__toESM(require_web_immediate()),import_web_dom_collections_iterator176=__toESM(require_web_dom_collections_iterator()),import_es_string_replace40=__toESM(require_es_string_replace());init_u2();init_elements2();init_elements();init_property_applications();init_lib();init_languages();init_status_bar();init_logger();init_sample();init_btypes();init_element_utils();init_epoch2();init_epoch();init_define_process_env();init_shim();var import_web_dom_collections_iterator172=__toESM(require_web_dom_collections_iterator());init_btypes();var is_parent_datasource=property2=>property2.type()==="ElementParent",is_text_expression=property2=>property2.type()==="TextExpression",get_lookup_column=datasource=>{let node=datasource.next();return node.type()==="Message"&&node.message().is_lookup()&&is_custom_type2(node.message().ret_btype_id())?node.message().get_lookup_name():null},add_field_name=(property2,extra_field_names)=>{if(is_parent_datasource(property2)){let extra_field=get_lookup_column(property2);extra_field&&extra_field_names.add(extra_field)}return extra_field_names},get_nested_fields=(element,extra_field_names)=>(element.elements().forEach(child_element=>{if(is_repeating_group(child_element))return;is_pass_through_group(child_element)&&(extra_field_names=get_nested_fields(child_element,extra_field_names)),child_element.properties().forEach(property2=>{is_text_expression(property2)?property2.entries().forEach(entry=>{extra_field_names=add_field_name(entry,extra_field_names)}):extra_field_names=add_field_name(property2,extra_field_names)})}),extra_field_names),is_repeating_group=element=>element.type()==="RepeatingGroup",is_pass_through_group=element=>{if(element.type()==="Group"){let data_source=element.property("data_source");return is_parent_datasource(data_source)&&!data_source.has_next()}return!1},evaluate_extra_fields=element=>{let extra_field_names=new Set;return extra_field_names=get_nested_fields(element,extra_field_names),Array.from(extra_field_names)};init_define_process_env();init_shim();var import_web_dom_collections_iterator173=__toESM(require_web_dom_collections_iterator());init_mode_check();init_lib();init_u2();init_element_eval();function _get_separator_width(element){let get_property=(name,suppress_warning)=>{var _element$root;return(!on_server()||lib_default().force_responsive_version)&&((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>=1?element.get_styleable_static_property(name,suppress_warning):element.get_static_property(name,suppress_warning)};return[void 0,null,"none"].includes(get_property("separator_style",!0))?0:get_property("separator_width",!0)}function _get_external_border(sides){return function(instance4){let border_style;if(instance4.get_static_property("four_border_style",!0)){let total_width=0;for(let border_location of sides)border_style=instance4.get_static_property("border_style"+border_location,!0),border_style&&border_style!=="none"&&(total_width+=instance4.get_static_property("border_width"+border_location,!0));return total_width}else return border_style=instance4.get_static_property("border_style",!0),border_style&&border_style!=="none"?2*instance4.get_static_property("border_width",!0):0}}var get_external_border_width=_get_external_border(["_left","_right"]),get_external_border_height=_get_external_border(["_top","_bottom"]);function _get_cell_width(element){let separator_width=_get_separator_width(element),num_columns=element.get_static_property("columns",!0);return(element.get_width()-separator_width*(num_columns-1)-get_external_border_width(element))/num_columns}function get_fixed_cell_rg_column_count(instance4){var _instance$element2,_instance$element3;let default_value=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(instance4==null)return default_value;let initial_columns;if(instance4.element.is_responsive_v1()>0){var _element_eval$evaluat;initial_columns=(_element_eval$evaluat=evaluate_property(instance4,"columns"))!=null?_element_eval$evaluat:default_value}else{var _instance$element$get,_instance$element;initial_columns=(_instance$element$get=(_instance$element=instance4.element)==null?void 0:_instance$element.get_static_property("columns",!0))!=null?_instance$element$get:default_value}if((_instance$element2=instance4.element)!=null&&_instance$element2.parent().is_root()||(_instance$element3=instance4.element)!=null&&_instance$element3.get_static_property("fixed_width")){var _instance$columns;return(_instance$columns=instance4.columns)!=null?_instance$columns:initial_columns}else{var _instance$columns2;return Math.min((_instance$columns2=instance4.columns)!=null?_instance$columns2:1,initial_columns)}}var NORMAL_REFRESH_THRESHOLD=1e3,ASTABLE_REFRESH_COUNT_ERR_THRESHOLD=10;function check_astable_loop(instance4,data_source,used_data_sources_cache){let has_key=!1,check_date=Date.now();used_data_sources_cache.forEach((value,key)=>{let{since_timestamp,count:count2}=value;if(check_date-since_timestamp>NORMAL_REFRESH_THRESHOLD){used_data_sources_cache.delete(key);return}if(compare(key,data_source)){if(count2>ASTABLE_REFRESH_COUNT_ERR_THRESHOLD){let page_or_reusable=instance4.element.root();throw new OwnerError("Astable data source in repeating group",{display:`${page_or_reusable.type()} ${page_or_reusable.display()}: Data source on repeating group "${instance4.element.display()}" is not stable, please fix or remove conditional data source. Some elements may be unable to render and workflows may time out.`})}used_data_sources_cache.set(key,{since_timestamp,count:count2+1}),has_key=!0}}),has_key||used_data_sources_cache.set(data_source,{since_timestamp:check_date,count:1})}init_define_process_env();init_shim();var import_web_dom_collections_iterator175=__toESM(require_web_dom_collections_iterator()),import_autorun4=__toESM(require_autorun());init_Element();init_responsive_layout();var element_registry_exports={};__export(element_registry_exports,{get_element_object:()=>get_element_object,registered_elements:()=>registered_elements});init_define_process_env();init_shim();var import_web_dom_collections_iterator174=__toESM(require_web_dom_collections_iterator());init_service_type_parser();init_plugin_getter();init_decaf();var registered_elements={};function get_element_object(type,no_cache){var _no_cache;if((_no_cache=no_cache)!=null||(no_cache=!1),type!=="CustomElement"){if(registered_elements[type])return registered_elements[type];{var _plugin_getter$get_pl;let[plugin_name]=get_plugin_and_type(type);return(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_element(type,no_cache)}}}init_appquery();var OVERRIDE_LAYOUTS=["Table","List"],GroupItem=class extends Element2{constructor(repeating_instance,height2,num,data_instance){var _repeating_instance$r,_ref,_repeating_instance_j,_ref2;let repeating_instance_json=repeating_instance.element.json,json=new RuntimeJSON(OVERRIDE_LAYOUTS.includes((_repeating_instance$r=repeating_instance.repeating_layout_type)!=null?_repeating_instance$r:"")?repeating_instance_json._raw():void 0,(_ref=repeating_instance_json==null?void 0:repeating_instance_json.parent())!=null?_ref:null,(_repeating_instance_j=repeating_instance_json==null?void 0:repeating_instance_json._name())!=null?_repeating_instance_j:"",(_ref2=repeating_instance_json==null?void 0:repeating_instance_json.root())!=null?_ref2:void 0,appquery_default.appname(),appquery_default.app_version());super(json,!1,{_type:"GroupItem"}),this.repeating_instance=void 0,this.height=void 0,this.num=void 0,this.data_instance=void 0,this.repeating_layout=void 0,this.instance=void 0,this.id_watcher=void 0,this.repeating_instance=repeating_instance,this.height=height2,this.num=num,this.E=get_element_object("GroupItem"),this.data_instance=data_instance!=null?data_instance:repeating_instance,this.repeating_layout=repeating_instance.repeating_layout_type}exists(){return!0}id(){var _this$id_watcher;(_this$id_watcher=this.id_watcher)!=null||(this.id_watcher=(0,import_autorun4.Watcher)(()=>{var _this$instance,_this$instance$state,_this$instance$state$;let element_id=this.repeating_instance.element.id(),data_id=(_this$instance=this.instance)==null||(_this$instance$state=_this$instance.state("group_data"))==null||(_this$instance$state$=_this$instance$state._id)==null?void 0:_this$instance$state$.call(_this$instance$state);return`${element_id}_group_item_${data_id!=null?data_id:"undefined"}_${this.num}`}));let[ready,value]=this.id_watcher.get_current();return ready?value:`${this.repeating_instance.element.id()}_group_item_null`}ssr_key(){return`${this.repeating_instance.element.id()}-cell`}parent(){return this.repeating_instance.element}elements(){return this.repeating_instance.element.elements()}get_height(){return this.repeating_layout==="List"?this.repeating_instance.element.get_height():this.height}get_responsive_data(){return this.repeating_instance.element.get_responsive_data()}get_static_property(name,suppress_warnings){return CONTAINER_PROPERTIES.includes(name)?this.repeating_instance.get_static_property(name,suppress_warnings):super.get_static_property(name,suppress_warnings)}container_layout(){return this.repeating_instance.element.container_layout()}get_property_applications(){var _this$repeating_layou;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou=this.repeating_layout)!=null?_this$repeating_layou:"")?this.repeating_instance.element.get_property_applications():super.get_property_applications()}_fields(include_all_properties){var _this$repeating_layou2;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou2=this.repeating_layout)!=null?_this$repeating_layou2:"")?this.repeating_instance.element._fields(include_all_properties):super._fields(include_all_properties)}field_names(){var _this$repeating_layou3;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou3=this.repeating_layout)!=null?_this$repeating_layou3:"")?this.repeating_instance.element.field_names():super.field_names()}get_btype_id(){var _this$repeating_layou4;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou4=this.repeating_layout)!=null?_this$repeating_layou4:"")?this.repeating_instance.element.get_btype_id():super.get_btype_id()}can_fit_width(){var _this$repeating_layou5;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou5=this.repeating_layout)!=null?_this$repeating_layou5:"")?this.repeating_instance.element.can_fit_width():super.can_fit_width()}can_fit_height(){var _this$repeating_layou6;return OVERRIDE_LAYOUTS.includes((_this$repeating_layou6=this.repeating_layout)!=null?_this$repeating_layou6:"")?this.repeating_instance.element.can_fit_height():super.can_fit_height()}only_fixed_or_fit_height(){return this.repeating_layout==="List"?this.repeating_instance.element.only_fixed_or_fit_height():super.only_fixed_or_fit_height()}only_fixed_or_fit_width(){return this.repeating_layout==="List"?this.repeating_instance.element.only_fixed_or_fit_width():super.only_fixed_or_fit_width()}only_fixed_or_fill_height(){return this.repeating_layout==="List"?this.repeating_instance.element.only_fixed_or_fill_height():super.only_fixed_or_fill_height()}only_fixed_or_fill_width(){return this.repeating_layout==="List"?this.repeating_instance.element.only_fixed_or_fill_width():super.only_fixed_or_fill_width()}no_height(){return this.repeating_layout==="List"?this.repeating_instance.element.no_height():super.no_height()}no_width(){return this.repeating_layout==="List"?this.repeating_instance.element.no_width():super.no_width()}get_related_workflows(event_type){return this.repeating_layout==="List"?this.repeating_instance.element.get_related_workflows(event_type):super.get_related_workflows(event_type)}can_be_variable_width(){return this.repeating_layout==="List"?this.repeating_instance.element.can_be_variable_width():super.can_be_variable_width()}};init_element_eval();var BORDER_BOX_COLOR="#CCCCCC",MAX_NUMBER_OF_CELLS=5e3,display_data_span=SPANS.rg_display_data_in_cells,add_cells_span=SPANS.rg_add_cells;function rows(instance4){return instance4.get_static_property("layout_style")==="horizontal_scroll"?1:instance4.get_static_property("rows",!0)}var RepeatingGroup_default={register(instance4){instance4.repeating_group_layout={max_index:null,add_cells:null,has_written_a_list:!1,do_create_container:()=>({}),finished_loading_switch:u_exports2.MakeSwitch(null,"loading_switch"),raw_list_data(){return null}},instance4.repeating_layout_type="RepeatingGroup";let previous_search=null;function write_data(new_data){let dehydrated;new_data!==void 0&&(instance4.repeating_group_layout.has_written_a_list=!0),new_data&&new_data.dehydrate?dehydrated=new_data.dehydrate():(dehydrated="no data",new_data=null),dehydrated!==previous_search&&(previous_search=dehydrated,instance4.state("list_data",new_data),instance4.state("show_range",0))}if(instance4.responsive_mode())setImmediate(()=>{var _instance$get_static_;let btype_id=(_instance$get_static_=instance4.get_static_property("group_type"))!=null?_instance$get_static_:"user";return write_data(lib_default().db_instance().static_list(btype_id,[new SampleObject(btype_id)]))});else if(instance4.run_mode()){instance4.state("list_data",STATE_NOT_READY);let used_data_sources_cache=new Map;instance4.autorun(()=>{if(!instance4.state("datasource_changed_by_workflow_action")){let data_source=evaluate_property(instance4,"data_source");check_astable_loop(instance4,data_source,used_data_sources_cache),write_data(data_source)}}),instance4.on_message("set_list_data",new_list=>{instance4.state("datasource_changed_by_workflow_action",!0),write_data(new_list)}),instance4.on_message("clear_list",()=>{instance4.state("datasource_changed_by_workflow_action",!1);let layout_style=instance4.get_static_property("layout_style");if(layout_style==="limit_items")instance4.state("show_range",0);else if(layout_style==="infinite_scroll"){var _instance$get_canvas;(_instance$get_canvas=instance4.get_canvas())==null||_instance$get_canvas.scrollTop(0)}else if(layout_style==="horizontal_scroll"){var _instance$get_canvas2;(_instance$get_canvas2=instance4.get_canvas())==null||_instance$get_canvas2.scrollLeft(0)}for(let child of(_instance$children=instance4.children)!=null?_instance$children:[]){var _instance$children;reset_inputs_and_groups(child)}}),instance4.on_message("show_next",wrap_to_beginning=>{var _wrap_to_beginning;(_wrap_to_beginning=wrap_to_beginning)!=null||(wrap_to_beginning=!1),u_exports2.run_once(30,()=>{var _instance$state;return(_instance$state=instance4.state("list_data"))==null?void 0:_instance$state.length()},(err,length)=>{let is_last_page;if(err){log(err);return}let layout_cells_count=rows(instance4)*get_fixed_cell_rg_column_count(instance4),to_show=instance4.state("show_range");if(to_show+=layout_cells_count,instance4.get_static_property("stable_pagination")){if(is_last_page=to_show>=length,is_last_page&&wrap_to_beginning)to_show=0;else if(is_last_page)return}else{is_last_page=to_show===length;let is_filler_last_page=to_show+layout_cells_count>length;is_last_page&&wrap_to_beginning?to_show=0:is_filler_last_page&&(to_show=Math.max(length-layout_cells_count,0))}instance4.state("show_range",to_show)})}),instance4.on_message("show_previous",wrap_to_end=>{var _wrap_to_end;return(_wrap_to_end=wrap_to_end)!=null||(wrap_to_end=!1),u_exports2.run_once(30,()=>{var _instance$state2;return(_instance$state2=instance4.state("list_data"))==null?void 0:_instance$state2.length()},(err,length)=>{if(err){log(err);return}let layout_cells_count=rows(instance4)*get_fixed_cell_rg_column_count(instance4),to_show=instance4.state("show_range");return to_show===0&&wrap_to_end?instance4.get_static_property("stable_pagination")?to_show=Math.max(length-layout_cells_count+length%layout_cells_count,0):to_show=Math.max(length-layout_cells_count,0):to_show=Math.max(to_show-layout_cells_count,0),instance4.state("show_range",to_show)})}),instance4.on_message("go_to_page",val=>u_exports2.run_once(30,()=>{var _instance$state3;return(_instance$state3=instance4.state("list_data"))==null?void 0:_instance$state3.length()},(err,length)=>{if(err){log(err);return}let layout_cells_count=rows(instance4)*get_fixed_cell_rg_column_count(instance4),to_show=(val-1)*layout_cells_count;return to_show+layout_cells_count>length&&!instance4.get_static_property("stable_pagination")&&(to_show=Math.max(0,length-layout_cells_count)),instance4.state("show_range",to_show)})),instance4.on_message("draw_till",index=>{let layout_style=instance4.get_static_property("layout_style");!["infinite_scroll","horizontal_scroll","vertical_extendable"].includes(layout_style)||!instance4.repeating_group_layout.max_index||instance4.repeating_group_layout.max_index()>index||(instance4.repeating_group_layout.add_cells(index+1),instance4.repeating_group_layout.max_index(index))}),instance4.on_message("scroll_to",properties=>{instance4.get_static_property("layout_style")!=="limit_items"&&u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>{u_exports2.run_once(30,()=>{let list4=instance4.state("list_data");return list4==null&&!instance4.state("loading")?-1:list4==null?void 0:list4.position(properties.entry,get5(instance4.get_static_property("group_type")))},(err,index)=>{var _instance$children2,_instance$children2$i;if(err){log(err);return}if(index===-1)return;function do_scroll(){let scroll_postion,child=instance4.children[index],layout_style=instance4.get_static_property("layout_style");if(layout_style==="infinite_scroll")return scroll_postion=child.get_canvas().position().top+instance4.get_canvas().scrollTop()+properties.offset,properties.animate?instance4.get_canvas().animate({scrollTop:scroll_postion},300):instance4.get_canvas().scrollTop(scroll_postion);if(layout_style==="horizontal_scroll")return scroll_postion=child.get_canvas().position().left+instance4.get_canvas().scrollLeft(),properties.animate?instance4.get_canvas().animate({scrollLeft:scroll_postion},300):instance4.get_canvas().scrollLeft(scroll_postion);if(properties.animate)return velocity(child.get_canvas(),"scroll",{duration:300,offset:-properties.offset});{let div2,parent=child.get_canvas();for(;parent.length&&!parent.hasClass("main-page")&&!div2;)parent.css("position")==="fixed"&&(div2=parent),parent=parent.parent();return(!parent.length||parent.hasClass("main-page"))&&(div2=$(window)),div2.scrollTop(child.get_canvas().offset().top+properties.offset)}}(_instance$children2=instance4.children)!=null&&(_instance$children2$i=_instance$children2[index])!=null&&_instance$children2$i.is_visible()?do_scroll():u_exports2.wait_for_updates(()=>{instance4.message("draw_till",index);function wait(){instance4.setTimeout(()=>{var _instance$children3,_instance$children3$i,_instance$children4;(_instance$children3=instance4.children)!=null&&(_instance$children3$i=_instance$children3[index])!=null&&_instance$children3$i.is_visible()&&(_instance$children4=instance4.children)!=null&&_instance$children4[index].canvas.is(":visible")?do_scroll():wait()},50)}wait()})})})})}},initialize(instance4){let list_item,canvas=instance4.get_canvas(),is_on_window=()=>{var _window5,_window$BrowserDetect;return((_window5=window)==null||(_window$BrowserDetect=_window5.BrowserDetect)==null?void 0:_window$BrowserDetect.OS)==="Windows"},is_rtl2=()=>is_rtl(lib_default().app_language()),static_columns=()=>instance4.get_static_property("columns",!0),columns=()=>{var _instance$columns;return(_instance$columns=instance4.columns)!=null?_instance$columns:static_columns()},num_to_row=num=>Math.floor((num-1)/columns())+1,num_to_col=num=>(num-1)%columns()+1;function has_top_border(num){return instance4.get_static_property("layout_style")==="horizontal_scroll"?!1:num_to_row(num)>1}function has_left_border(num){return instance4.get_static_property("layout_style")==="horizontal_scroll"?num>1:num_to_col(num)>1}let _SEPARATOR_WIDTH=1,_show_border_outline=()=>instance4.edit_mode()&&instance4.state("show_borders")&&(instance4.get_static_property("separator_width")===0||instance4.get_static_property("separator_style")==="none");function get_separator_width(){return _show_border_outline()?_SEPARATOR_WIDTH:_get_separator_width(instance4.element)}function get_iwidth(){let available_width=instance4.element.get_width()-get_external_border_width(instance4)-get_separator_width()*(columns()-1);return Math.floor(10*available_width/(columns()+0))/10}function get_iheight(){let available_height=instance4.element.get_height()-get_external_border_width(instance4)-get_separator_width()*(rows(instance4)-1);return Math.floor(10*available_height/(rows(instance4)+0))/10}let get_zindex=()=>instance4.element.get_zindex();function add_sep(num,div2){return has_top_border(num)?property_applications_default.apply_css_style(div2,{"border-top-width":get_separator_width()+"px","border-top-color":_show_border_outline()?BORDER_BOX_COLOR:instance4.get_static_property("separator_color"),"border-top-style":_show_border_outline()?"solid":instance4.get_static_property("separator_style")}):div2[0].style["border-top-style"]="none",instance4.autorun(()=>{let side;if(is_rtl2()?side="right":side="left",has_left_border(num)){let opts={};return opts["border-"+side+"-width"]=get_separator_width()+"px",opts["border-"+side+"-color"]=_show_border_outline()?BORDER_BOX_COLOR:instance4.get_static_property("separator_color"),opts["border-"+side+"-style"]=_show_border_outline()?"solid":instance4.get_static_property("separator_style"),property_applications_default.apply_css_style(div2,opts)}else div2[0].style["border-"+side+"-style"]="none"})}let _width_scrollbar;function get_width_scrollbar(){if(_width_scrollbar==null)if(["show_all","vertical_extendable","limit_items"].includes(instance4.get_static_property("layout_style")))_width_scrollbar=0;else{let div2=div("div-for-scrollbar",$("body"));div2.css("overflow-y","scroll"),_width_scrollbar=Math.max(div2[0].offsetWidth-div2[0].clientWidth,0),div2.remove()}return _width_scrollbar}let isize=(num,child)=>instance4.autorun(()=>(property_applications_default.apply_css_style(child.canvas,{float:is_rtl2()?"right":"left",position:"relative","box-sizing":"border-box","-moz-box-sizing":"border-box","z-index":get_zindex(),height:get_iheight()+(has_top_border(num)?get_separator_width():0)+"px"}),resize_cell_width(num,child)));function resize_cell_width(num,child,width2){var _ref,_child$child_containe;let iwidth=(_ref=width2!=null?width2:instance4.repeating_group_layout.cell_width)!=null?_ref:get_iwidth();return instance4.get_static_property("layout_style")!=="horizontal_scroll"&&num_to_col(num)===columns()&&columns()>1&&(iwidth-=get_width_scrollbar()+1),property_applications_default.apply_css_style(child.canvas,{width:iwidth+(has_left_border(num)?get_separator_width():0)+"px"}),add_sep(num,child.canvas),child==null||(_child$child_containe=child.child_container)==null||_child$child_containe.resize_width(iwidth),setImmediate(()=>{var _child$child_containe2;return child==null||(_child$child_containe2=child.child_container)==null?void 0:_child$child_containe2.resize_width(iwidth)})}function get_dummy_cells(){let dummies;return instance4.edit_mode()||instance4.thumbnail_mode()?dummies=$("> .list-dummy",canvas):$("> .rows",canvas).length?dummies=$("> .rows > .list-dummy",canvas):dummies=$("> .list-dummy",canvas),dummies}instance4.on_message("resize_cell",(num,child,width2)=>resize_cell_width(num,child,width2)),instance4.on_message("resize_dummies",width2=>{let iterable=get_dummy_cells();for(let n=0;n<iterable.length;n++){let dummy=iterable[n];resize_cell_width(n+1,{canvas:$(dummy)},width2)}}),instance4.run_mode()||instance4.responsive_mode()||(list_item=div("list-item",instance4.canvas)),instance4.wait_for_visible_lite(()=>{if(instance4.run_mode()||instance4.responsive_mode()){let container,layout_style=instance4.get_static_property("layout_style");instance4.children=[];let dummies=[],extra_fields=evaluate_extra_fields(instance4.element),init_raw_list_watcher=(start_fn,end_fn)=>{var _instance$repeating_g;(_instance$repeating_g=instance4.repeating_group_layout._raw_list_data_watcher)==null||_instance$repeating_g.destroy(),instance4.repeating_group_layout._raw_list_data_watcher=u_exports2.Watcher(()=>{var _list_data$with_extra,_list_data$with_extra2,_list_data$with_extra3,_list_data$with_extra4;let start_index=start_fn(),last_index=end_fn(),list_data=instance4.state("list_data");return(_list_data$with_extra=list_data==null||(_list_data$with_extra2=list_data.with_extra_fields)==null||(_list_data$with_extra3=(_list_data$with_extra4=_list_data$with_extra2.call(list_data,extra_fields)).get_children)==null?void 0:_list_data$with_extra3.call(_list_data$with_extra4,start_index,last_index))!=null?_list_data$with_extra:[]}),instance4.repeating_group_layout._raw_list_data_watcher.on_value(()=>{instance4.state("loading",!0),instance4.repeating_group_layout.finished_loading_switch.turn_off()}),instance4.repeating_group_layout.raw_list_data=()=>instance4.repeating_group_layout._raw_list_data_watcher.get()},create_cell=(num,cells_canvas)=>{if(!(instance4.responsive_mode()&&num>1)){let group_item=new GroupItem(instance4,get_iheight(),num),child=elements_default.ElementInstance(group_item,instance4.mode);child.message("set_group_data",STATE_NOT_READY),child.drawn_key=u_exports2.MakeKey(null,"cell_drawn"),group_item.instance=child,instance4.children.push(child),child.state("cell_index",num),child._is_visible_me=!1,child.register(instance4),child.create_skeleton(container),child.start_draw_tree(),isize(num,child),add_sep(num,child.canvas),child.do_hide(),child.drawn_key.turn()}if(layout_style!=="show_all"){let dummy=div("list-dummy",cells_canvas);isize(num,{canvas:dummy}),add_sep(num,dummy),dummies.push(dummy)}},rows_div,display_data_in_cells=()=>traceSpan2(display_data_span.name,display_data_span.type,()=>{let _spinner=null;return instance4.autorun(()=>{var _spinner3;let dummy;if(!instance4.is_visible()){var _spinner2;(_spinner2=_spinner)==null||_spinner2();return}instance4.state("loading",!0),instance4.repeating_group_layout.finished_loading_switch.turn_off(),_spinner||(_spinner=spinner(instance4));let list4=instance4.repeating_group_layout.raw_list_data(),list_data=instance4.state("list_data");instance4.responsive_mode()||(list4=list4.filter(item=>item!=null)),(_spinner3=_spinner)==null||_spinner3(),_spinner=null;let n;for(n=0;n<list4.length;n++){let item=list4[n];if(instance4.children[n]!=null){var _dummies$n;let child2=instance4.children[n];u_exports2.WaitFor(page_loaded_key,()=>child2.can_register_workflows().turn()),child2.message("set_group_data",item),child2.do_show(),["show_all","vertical_extendable"].includes(layout_style)&&child2.message("child_shown");let dummy2=(_dummies$n=dummies[n])==null?void 0:_dummies$n[0];dummy2!=null&&(dummy2.style.display="none")}}instance4.last_cell=n;let child=instance4.children[n-1];child&&["show_all","vertical_extendable"].includes(layout_style)&&child.message("child_shown");let first_dummy=n;if(["show_all","vertical_extendable"].includes(layout_style)){for(let m=first_dummy;m<instance4.children.length;m++)if(instance4.children[m].do_hide(),layout_style==="vertical_extendable"){var _dummies$m;dummy=(_dummies$m=dummies[m])==null?void 0:_dummies$m[0],dummy!=null&&(dummy.style.display="none")}first_dummy<instance4.children.length&&instance4.children[instance4.children.length-1].message("child_shown")}else{let total_number_of_cells=rows(instance4)*columns();for(let p=first_dummy;p<dummies.length;p++){var _instance$children$p;if(p<total_number_of_cells){var _dummies$p;dummy=(_dummies$p=dummies[p])==null?void 0:_dummies$p[0],dummy!=null&&(dummy.style.display="block")}(_instance$children$p=instance4.children[p])==null||_instance$children$p.do_hide()}if(["infinite_scroll","horizontal_scroll"].includes(layout_style)&&first_dummy<dummies.length)for(let p=first_dummy;p<dummies.length;p++)dummy=dummies[p][0],dummy!=null&&(dummy.style.display="none")}layout_style==="horizontal_scroll"&&(rows_div[0].style.width=n*get_iwidth()+(n-1)*get_separator_width()+10+"px"),list_data!=null&&layout_style==="limit_items"&&columns()===1&&rows(instance4)===1&&instance4.state("show_range")===(list_data==null?void 0:list_data.length())&&list_data.length()>1&&instance4.state("show_range",list_data.length()-1),instance4.repeating_group_layout.has_written_a_list&&u_exports2.wait_for_updates(()=>(instance4.mark_children_registered(),instance4.get_children_drawn_key().turn())),u_exports2.wait_for_updates(()=>{let[error2,ready]=instance4.repeating_group_layout._raw_list_data_watcher.get_current_status_array(),still_loading=!ready||error2!=null;instance4.state("loading",still_loading),still_loading?instance4.repeating_group_layout.finished_loading_switch.turn_off():instance4.repeating_group_layout.finished_loading_switch.turn_on()})})});if(["infinite_scroll","horizontal_scroll","show_all","vertical_extendable"].includes(layout_style)){let old_max_index=0;if(rows_div=div("rows",canvas),rows_div[0].style["-webkit-transform"]="translateZ(0)",layout_style==="infinite_scroll"&&(rows_div[0].style["min-height"]=instance4.element.get_height()+1+"px"),instance4.repeating_group_layout.add_cells=last_cell=>{traceSpan2(add_cells_span.name,add_cells_span.type,()=>{if(last_cell>old_max_index){for(let start3=old_max_index+1,num=start3,end2=last_cell,asc=start3<=end2;asc?num<=end2:num>=end2;asc?num++:num--)create_cell(num,rows_div);old_max_index=last_cell,instance4.last_cell=old_max_index}layout_style==="horizontal_scroll"&&(rows_div[0].style.width=last_cell*get_iwidth()+(last_cell-1)*get_separator_width()+10+"px")})},container=instance4.container.create_child(instance4,rows_div),["infinite_scroll","horizontal_scroll","vertical_extendable"].includes(layout_style)){let add_cells_cb2=function(additional_to_add,cb_no){var _additional_to_add;(_additional_to_add=additional_to_add)!=null||(additional_to_add=1),started_adding_cells=!0,u_exports2.run_once(30,()=>{var _instance$state$with_,_instance$state4,_instance$state4$with;return(_instance$state$with_=(_instance$state4=instance4.state("list_data"))==null||(_instance$state4$with=_instance$state4.with_extra_fields)==null?void 0:_instance$state4$with.call(_instance$state4,extra_fields).get_children(instance4.repeating_group_layout.max_index(),additional_to_add))!=null?_instance$state$with_:[]},(err,last_entry)=>{if(err){log(err),started_adding_cells=!1;return}if(last_entry.length){let offset,to_add=Math.min(last_entry.length,additional_to_add);layout_style==="infinite_scroll"?offset=columns():offset=0,instance4.repeating_group_layout.add_cells(instance4.repeating_group_layout.max_index()+to_add+offset),instance4.repeating_group_layout.max_index(instance4.repeating_group_layout.max_index()+to_add+offset-1),u_exports2.wait_for_updates(()=>started_adding_cells=!1)}else started_adding_cells=!1,cb_no==null||cb_no()})};var add_cells_cb=add_cells_cb2;let element_inner_height=instance4.element.get_height()-get_external_border_width(instance4),canvas_height=canvas.height(),options={"overflow-scrolling":"touch","-webkit-overflow-scrolling":"touch"};instance4.responsive_mode()?options["overflow-y"]="hidden":layout_style==="infinite_scroll"?is_on_window()?options["overflow-y"]="scroll":options["overflow-y"]="auto":layout_style==="vertical_extendable"?options["overflow-y"]="hidden":layout_style==="horizontal_scroll"&&(is_on_window()?options["overflow-x"]="scroll":options["overflow-x"]="auto"),property_applications_default.apply_css_style(canvas,options),instance4.autorun(()=>rows_div[0].style.float=is_rtl2()?"right":"left");let is_fixed_width=instance4.get_static_property("fixed_width");if(layout_style==="vertical_extendable"){let get_possible_cells2=function(){let inner_cell_height=get_iheight();if(inner_cell_height===0)return 0;let possible_cells=Math.ceil(($(window).scrollTop()+$(window).height()-canvas.offset().top)/inner_cell_height);return columns()*Math.max(rows(instance4),possible_cells)-1};var get_possible_cells=get_possible_cells2;instance4.repeating_group_layout.max_index=u_exports2.Box(get_possible_cells2()),instance4.setTimeout(()=>{let to_add=get_possible_cells2()-instance4.repeating_group_layout.max_index();if(to_add>0)return add_cells_cb2(to_add)},100)}else if(layout_style==="horizontal_scroll"&&!is_fixed_width){let get_columns_that_fit=()=>Math.ceil(canvas.width()/get_iwidth());instance4.repeating_group_layout.max_index=u_exports2.Box(Math.max(columns(),get_columns_that_fit())),instance4.setTimeout(()=>{let to_add=get_columns_that_fit()-instance4.repeating_group_layout.max_index();to_add>0&&add_cells_cb2(to_add)},100)}else instance4.repeating_group_layout.max_index=u_exports2.Box(rows(instance4)*columns());let started_adding_cells=!1,scroll_events="scroll wheel";if(["infinite_scroll","horizontal_scroll"].includes(layout_style))canvas.on(scroll_events,evt=>{let window_height=$(window).height();if(layout_style==="infinite_scroll"){var _window$BrowserDetect2;if(!(is_on_mobile_or_tablet()||((_window$BrowserDetect2=window.BrowserDetect)==null?void 0:_window$BrowserDetect2.OS)==="Windows")){var _evt$originalEvent;let canvas_bottom=canvas.offset().top+canvas_height;if(started_adding_cells&&canvas_bottom<$(window).scrollTop()+window_height){evt.preventDefault();return}else if(((_evt$originalEvent=evt.originalEvent)==null?void 0:_evt$originalEvent.wheelDelta)<0&&canvas_bottom>$(window).scrollTop()+window_height){canvas[0].style["overflow-y"]="hidden";return}else canvas[0].style["overflow-y"]="auto"}canvas.scrollTop()+element_inner_height>parseInt(rows_div.css("height").replace("px",""))-50&&add_cells_cb2(2*columns())}else if(layout_style==="horizontal_scroll"){if(started_adding_cells){evt.preventDefault();return}let do_it2=()=>add_cells_cb2(2,()=>rows_div.css("width",instance4.last_cell*get_iwidth()+(instance4.last_cell-1)*get_separator_width()));is_rtl2()?canvas.scrollLeft()<get_iwidth()&&do_it2():canvas.scrollLeft()+canvas.width()>parseInt(rows_div.css("width").replace("px",""))-get_iwidth()&&do_it2()}});else if(layout_style==="vertical_extendable"){let scroll_event_handing2=function(div2){let _last_cell_add_timeout=null;div2.on("DOMMouseScroll mousewheel scroll wheel",evt=>{started_adding_cells||(instance4.clearTimeout(_last_cell_add_timeout),_last_cell_add_timeout=instance4.setTimeout(()=>{let canvas_bottom=canvas.offset().top+canvas.height(),screen_height=$(window).height();if(canvas_bottom<$(window).scrollTop()+Math.max(screen_height+get_iheight()*2,100)){let number_of_rows=Math.ceil(($(window).scrollTop()+screen_height-canvas_bottom)/get_iheight()+2);add_cells_cb2(Math.max(number_of_rows+1,3)*columns())}},20))})};var scroll_event_handing=scroll_event_handing2;let floating_group_parents=instance4.element.parents("FloatingGroup");if(floating_group_parents.length){var _floating_group_paren,_floating_group_paren2;u_exports2.wait_for_attached(canvas,()=>{var _fixed_parent;let fixed_parent,parent=canvas;for(;parent.length&&!parent.is("body");)parent.css("position")==="fixed"&&(fixed_parent=parent),parent=parent.parent();(_fixed_parent=fixed_parent)!=null||(fixed_parent=$(window)),scroll_event_handing2(fixed_parent)},{error_message:`Dynamic data necessary to render vertically-extending Repeating Group "${instance4.element.display()}" inside Floating Group "${(_floating_group_paren=floating_group_parents[0])==null||(_floating_group_paren2=_floating_group_paren.display)==null?void 0:_floating_group_paren2.call(_floating_group_paren)}" was not ready on page load.
For better performance, please set the repeating group to "full list" or re-structure the page to have the repeating group's data load earlier elsewhere on the page.`})}else scroll_event_handing2($(window))}instance4.repeating_group_layout.add_cells(instance4.repeating_group_layout.max_index()+1),init_raw_list_watcher(()=>0,()=>instance4.repeating_group_layout.max_index()+1),display_data_in_cells()}else rows_div[0].style.overflow="hidden",instance4.repeating_group_layout.max_index=u_exports2.Box(null,!0),init_raw_list_watcher(()=>0,()=>instance4.repeating_group_layout.max_index()),display_data_in_cells(),instance4.autorun(()=>{var _instance$state$lengt,_instance$state5;let n=Math.min((_instance$state$lengt=(_instance$state5=instance4.state("list_data"))==null?void 0:_instance$state5.length())!=null?_instance$state$lengt:0,MAX_NUMBER_OF_CELLS);if(n>100&&owner_warn(new OwnerError("repeating group showing more than 100 items",{display:"This repeating group is showing more than 100 items, which can considerably slow down your page. You should consider using infinite scrolling",element_instance:instance4})),u_exports2.autorun_top(()=>{instance4.repeating_group_layout.add_cells(n),instance4.repeating_group_layout.max_index(n)}),n===0)return instance4.set_height(0)})}else{container=instance4.container.create_child(instance4,instance4.canvas);for(let num=1,end2=rows(instance4)*columns(),asc=end2>=1;asc?num<=end2:num>=end2;asc?num++:num--)create_cell(num,instance4.canvas);return init_raw_list_watcher(()=>instance4.state("show_range"),()=>rows(instance4)*columns()),display_data_in_cells()}}else{var _Lib$styles_editor,_Lib$styles_editor$is;instance4.thumbnail_mode()&&!((_Lib$styles_editor=lib_default().styles_editor)!=null&&(_Lib$styles_editor$is=_Lib$styles_editor.is_active)!=null&&_Lib$styles_editor$is.call(_Lib$styles_editor))&&u_exports2.run_once(60,()=>instance4.start_child_drawing())}})},get_container_width(element){let sep_width,columns=element.get_static_property("columns",!0);return[void 0,null,"none"].includes(element.get_static_property("separator_style",!0))?sep_width=element.get_static_property("separator_width",!0):sep_width=0,(element.get_width()-sep_width*(columns-1)-get_external_border_width(element))/columns},additional_data:{notify_width(instance4,total_width){if(!instance4.get_static_property("fixed_width")){let cell_width,separator_width=_get_separator_width(instance4.element),num_columns=instance4.get_static_property("columns",!0),iwidth=_get_cell_width(instance4.element);if(instance4.get_static_property("layout_style")!=="horizontal_scroll"){if(total_width){var _instance$children6,_child;let cells_to_show,child;if(num_columns===1&&!instance4.get_static_property("allow_more_than_one_colum"))cells_to_show=1,cell_width=total_width-get_external_border_width(instance4);else{let min_cell_width=this.get_min_width(instance4.element),width2=(total_width-separator_width*(num_columns-1)-get_external_border_width(instance4))/num_columns;width2<min_cell_width?cell_width=min_cell_width:total_width>instance4.element.get_width()?cell_width=iwidth:cell_width=width2,cells_to_show=Math.max(Math.floor(total_width/cell_width),1),cell_width=(total_width-separator_width*(cells_to_show-1)-get_external_border_width(instance4))/cells_to_show;let remaining_space=total_width-get_external_border_width(instance4)-cells_to_show*cell_width-separator_width*(cells_to_show-1);cell_width=cell_width+remaining_space/cells_to_show}instance4.columns=cells_to_show,instance4.repeating_group_layout.cell_width=cell_width;let iterable=(_instance$children6=instance4.children)!=null?_instance$children6:[];for(let n=0;n<iterable.length;n++)child=iterable[n],instance4.message("resize_cell",n+1,child,cell_width);(_child=child)==null||_child.message("child_shown");let is_responsive_canvas=instance4.responsive_mode(),is_runmode_responsive=instance4.run_mode()&&!instance4.get_static_property("fixed_width");(is_responsive_canvas||is_runmode_responsive)&&instance4.message("resize_dummies",cell_width)}}else{let pos=instance4.get_canvas().scrollLeft();instance4.get_canvas().find("> .rows").css("width",instance4.last_cell*iwidth+(instance4.last_cell-1)*separator_width+10),instance4.get_canvas().scrollLeft(pos),instance4.responsive_mode()&&instance4.message("resize_dummies",cell_width)}}}}};init_define_process_env();init_shim();var import_web_immediate7=__toESM(require_web_immediate()),import_web_dom_collections_iterator177=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_elements2();init_property_applications();init_runmode();init_define_process_env();init_shim();var import_web_immediate6=__toESM(require_web_immediate());init_u2();init_lib();init_property_applications();init_runmode();init_elements2();init_define_process_env();init_shim();function ignoreError(cb){return(_err,arg)=>cb(arg)}var _layers=[],get_top_layer=()=>_layers[0],get_previous_layer=()=>_layers[1],add_layer=popup=>{var _get_top_layer$state,_get_top_layer;popup.state("popup_zindex",lib_default().bubble_version()>18?((_get_top_layer$state=(_get_top_layer=get_top_layer())==null?void 0:_get_top_layer.state("popup_zindex"))!=null?_get_top_layer$state:-1)+1:0),_layers.unshift(popup)};function remove_layer(popup){let is_popup=element=>element.toUniqueString()===popup.toUniqueString(),idx=_layers.findIndex(is_popup);if(idx>=0)return _layers.splice(idx,1)[0]}function _top_layer_overflow(){var _current$state;let current=get_top_layer();return(_current$state=current==null?void 0:current.state("body_positioning"))!=null?_current$state:"auto"}var set_body_overflow=()=>document.body.style.overflow=_top_layer_overflow();function get_popup_top(instance4,element_height){if(is_on_mobile_or_tablet())return 20;{var _element_height;(_element_height=element_height)!=null||(element_height=instance4.element.get_height());let screen_height=$(window).height();return element_height>screen_height-100?30:element_height>screen_height-200?50:100}}function get_popup_positioning(instance4,height2){var _height,_window$innerHeight;let position;if(instance4._has_been_hidden)return;let canvas=instance4.get_canvas();(_height=height2)!=null||(height2=canvas.outerHeight());let window_height=(_window$innerHeight=window.innerHeight)!=null?_window$innerHeight:$(window).height();height2>window_height-get_popup_top(instance4,height2)+10||instance4.state("has_been_absolutely_positioned")!=null?(position="absolute",instance4.state("body_positioning","visible"),on_phonegap()&&$(window).off("touchmove.popup_opened")):instance4.responsive_mode()||(position="fixed",instance4.state("body_positioning","hidden"),on_phonegap()&&(instance4.element.find_elements_custom("RepeatingGroup").length||$(window).on("touchmove.popup_opened",evt=>evt.preventDefault()))),set_body_overflow(),canvas[0].style.position=position,position==="absolute"?(instance4.state("has_been_absolutely_positioned")==null&&instance4.state("has_been_absolutely_positioned",$(window).scrollTop()),canvas[0].style.top=instance4.state("has_been_absolutely_positioned")+50+"px"):canvas[0].style.top=get_popup_top(instance4,height2)+"px"}var POPUP_GREYOUT_CSS={editor:{position:"absolute","z-index":2002-1},runmode:{position:"fixed","z-index":2002}};function get_greyout(instance4){if(!instance4.state("greyout")){let greyout=div("greyout");greyout.hide(),instance4.state("greyout",greyout),instance4.on_destroy(()=>greyout.remove()),property_applications_default.apply_css_style(greyout,{top:"0px",left:"0px",width:"100%",height:"100%","background-color":"rgba(0,0,0,0.7)"}),instance4.edit_mode()?($(".canvas").append(greyout),greyout.css(POPUP_GREYOUT_CSS.editor)):instance4.responsive_mode()?(lib_default().visual_edit.responsive_canvas.get_current_preview_canvas().find("> .r-wrapper").append(greyout),greyout.css(POPUP_GREYOUT_CSS.editor)):(greyout.insertBefore(instance4.get_canvas()),greyout.css(POPUP_GREYOUT_CSS.runmode))}return instance4.state("greyout")}var BLUR_SELECTOR=".element.Popup,.element.CustomElement.non-draggable,.element.Sheet";function get_elements_to_blur(instance4){var _found_elements;let found_elements;return instance4.edit_mode()&&(found_elements=$(".element",$(css.VISUAL_CANVAS)).not($(BLUR_SELECTOR,$(css.VISUAL_CANVAS))).not($("*",$(BLUR_SELECTOR)))),instance4.run_mode()&&(found_elements=$("body > div").not(instance4.get_canvas().parents()).not(instance4.get_canvas()).not(".debugger-canvas").not(".highlight-box").not("span.tt-dropdown-menu").not(".bad-revision").not(".GroupFocus").not(".db-limit-reached")),(_found_elements=found_elements)==null?void 0:_found_elements.add(".stripe-container")}function apply_blur_effect_to_greyout(instance4,value){var _currently_blurred,_get_elements_to_blur;let currently_blurred,previous_layer=get_previous_layer();previous_layer!=null&&(currently_blurred=get_elements_to_blur(previous_layer)),(_currently_blurred=currently_blurred)!=null||(currently_blurred=$());let elements_to_blur=(_get_elements_to_blur=get_elements_to_blur(instance4))==null?void 0:_get_elements_to_blur.not(".Popup:not(:visible),.Sheet:not(:visible)"),elements_to_unblur=currently_blurred.not(elements_to_blur);elements_to_unblur==null||elements_to_unblur.css({"-webkit-filter":"none",filter:"none"});let prop_value=`blur(${value}px)`;elements_to_blur==null||elements_to_blur.css({"-webkit-filter":prop_value,filter:prop_value})}function remove_blur_effect_to_greyout(instance4){let elements_to_unblur=get_elements_to_blur(instance4);elements_to_unblur==null||elements_to_unblur.css({"-webkit-filter":"none",filter:"none"})}function apply_greyout_color(instance4,value){let greyout=get_greyout(instance4);greyout[0].style["background-color"]=value}function resize_popup(instance4,new_width){let key=add_layout_resizing_key2();return instance4.get_canvas()[0].style["margin-left"]="-"+new_width/2+"px",instance4.get_canvas()[0].style.width=new_width+"px",u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>u_exports2.run_once(30,()=>property_applications_default.calculate_border_width(instance4),ignoreError(border_width=>{instance4.child_container.resize_width(new_width-border_width),instance4._has_been_hidden?key.turn():instance4.wait_for_visible(()=>setImmediate(()=>{var _u$real_inner_width;instance4.child_container.resize_width((_u$real_inner_width=real_inner_width(instance4.get_canvas()))!=null?_u$real_inner_width:new_width-border_width),get_popup_positioning(instance4),key.turn()}))})))}function resize_popup_if_legacy(instance4,new_width){if(!instance4.element.E.uses_css_responsive){let key=add_layout_resizing_key2();return u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>u_exports2.run_once(30,()=>property_applications_default.calculate_border_width(instance4),ignoreError(border_width=>{instance4.child_container.resize_width(new_width-border_width),instance4._has_been_hidden?key.turn():instance4.wait_for_visible(()=>setImmediate(()=>{var _u$real_inner_width2;instance4.child_container.resize_width((_u$real_inner_width2=real_inner_width(instance4.get_canvas()))!=null?_u$real_inner_width2:new_width-border_width),get_popup_positioning(instance4),key.turn()}))})))}}var greyout_field_names={prevent_user_from_closing_through_esc:{no_states:!0},greyout_color:{default:"rgba(0,0,0,0.7)",in_style:!0},greyout_blur:{default:0,no_states:!0,in_style:!0}};init_element_eval();var Popup_default={property_applications:[new property_applications_default.MinWidth],initialize(instance4){instance4.wait_for_visible_lite(()=>{on_property_change(instance4,"greyout_color",greyout_color=>{apply_greyout_color(instance4,greyout_color)}),on_property_change(instance4,"greyout_blur",greyout_blur=>{[null,void 0,0].includes(greyout_blur)||instance4.wait_for_visible(()=>{apply_blur_effect_to_greyout(instance4,greyout_blur)})});let _last_max_delta=0;instance4.on_message("child_movement",max_delta=>{_last_max_delta=max_delta,instance4.wait_for_visible(()=>{let height2=instance4.element.get_height()+_last_max_delta;get_popup_positioning(instance4,height2),instance4.get_canvas()[0].style.height=height2+"px"})}),instance4.on_destroy(()=>{(![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&remove_blur_effect_to_greyout(instance4)})})},position_canvas(to_position,instance4){let position;if(instance4.responsive_mode()){position="absolute";let div2=div("r-wrapper popup");div2.append(to_position),lib_default().visual_edit.responsive_canvas.get_current_preview_canvas().find("> .r-wrapper").append(div2),instance4.container.add_to_instances(instance4),lib_default().visual_edit.responsive_canvas.register_wrapper(instance4.element_id(),div2,!0),to_position.hide()}else instance4.edit_mode()?($(".canvas").append(to_position),position="absolute"):($(window.document.body).append(to_position),position="fixed",to_position.css("display","none"));let width2=instance4.element.get_width();if(property_applications_default.apply_css_style(to_position,{height:instance4.element.get_height()+"px",top:get_popup_top(instance4)+"px",position,left:"50%"}),instance4.autorun(()=>{var _instance$state;to_position.css("z-index",2002+((_instance$state=instance4.state("popup_zindex"))!=null?_instance$state:0))}),to_position.data("overwrite-left","50%"),instance4.run_mode()||instance4.responsive_mode()){let get_width2=function(window_width){if(instance4.run_mode()){var _window_width;(_window_width=window_width)!=null||(window_width=$(window).width())}else if(instance4.responsive_mode()){var _window_width2;(_window_width2=window_width)!=null||(window_width=lib_default().visual_edit.responsive_canvas.current_width_without_dependency)}return Math.max(instance4.element.get_min_width(),Math.min(instance4.element.get_width(),window_width-20))};var get_width=get_width2;instance4.on_resize(window_width=>{instance4.is_visible()&&resize_popup(instance4,get_width2(window_width))});let _screen_height=null;$(window).on("resize.popup_"+instance4.element_id(),()=>{let _height=$(window).height();_height!==_screen_height&&(_screen_height=_height,get_popup_positioning(instance4))});let last_height=null;queueMicrotask(()=>{instance4.autorun(()=>{let height2=instance4.current_height();height2!==last_height&&(last_height=height2,get_popup_positioning(instance4,height2))})}),instance4.on_destroy(()=>$(window).off("resize.popup_"+instance4.element_id()))}else property_applications_default.apply_css_style(to_position,{width:width2+"px","margin-left":"-"+width2/2+"px"})},do_show(instance4,properties,options,animated){instance4.ensure_drawn();let canvas=instance4.get_canvas();instance4.state("has_been_absolutely_positioned",null),add_layer(instance4),canvas=instance4.get_canvas();let grey_out=get_greyout(instance4);if(instance4.run_mode()){var _instance$state2;grey_out.css("z-index",2002+((_instance$state2=instance4.state("popup_zindex"))!=null?_instance$state2:0))}(![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&apply_blur_effect_to_greyout(instance4,instance4.get_static_property("greyout_blur")),instance4.run_mode()?(get_popup_positioning(instance4),u_exports2.run_once(30,()=>({height:evaluate_property(instance4,"height"),width:evaluate_property(instance4,"width")}),ignoreError(_ref=>{var _canvas$velocity,_canvas,_grey_out$velocity;let{height:height2,width:width2}=_ref;(_canvas$velocity=(_canvas=canvas).velocity)==null||_canvas$velocity.call(_canvas,"stop"),(_grey_out$velocity=grey_out.velocity)==null||_grey_out$velocity.call(grey_out,"stop"),get_popup_positioning(instance4,height2),property_applications_default.apply_css_style(canvas,{opacity:0,"margin-left":"-"+width2/2+"px",width:width2+"px"});let new_width=Math.max(instance4.element.get_min_width(),Math.min(width2,$(window).width()-20));canvas[0].style.display="block",animated?(perform_animate_in2(instance4,properties,options,!0),setImmediate(()=>{resize_popup(instance4,new_width),canvas[0].style.display="block"})):(properties={animation:"transition.fadeIn"},options={duration:300},setImmediate(()=>{resize_popup(instance4,new_width)}),perform_animate_in2(instance4,properties,options,!0)),property_applications_default.apply_css_style(grey_out,{opacity:0,display:"block"}),velocity(grey_out,"fadeIn",{duration:300,complete_cb(){grey_out[0].style.top="-1px",instance4.setTimeout(()=>{grey_out[0].style.top="0px"},151)}}),instance4.setTimeout(()=>{let focusable_children=[],dont_do_it=!1;function find_focusable_children(parent){for(let child of(_parent$children=parent.children)!=null?_parent$children:[]){var _parent$children;if(child.element.get_messages().includes("set_focus")){if(!child.get_canvas())continue;if(child.get_canvas().is(":focus")){dont_do_it=!0;return}focusable_children.push(child)}find_focusable_children(child)}}if(find_focusable_children(instance4),!dont_do_it){focusable_children=focusable_children.filter(a=>a.state("tab_index")&&a.is_visible()),focusable_children.sort((a,b)=>a.state("tab_index")<=b.state("tab_index")?-1:1);for(let a of focusable_children)if(a.is_visible()){a.element.type()!=="DateInput"&&a.message("set_focus");break}}},400),instance4.get_static_property("prevent_user_from_closing_through_esc")||($(document).off("keydown.escape"),$(document).on("keydown.escape",event=>{event.keyCode===27&&(instance4.do_hide(),$(document).off("keydown.escape"))}),grey_out.off("click"),grey_out.on("click",()=>{instance4.do_hide()})),instance4.message("popup_opened")}))):(canvas[0].style.display="block",instance4._is_visible_me=!0,instance4._update_visible(),instance4.thumbnail_mode()||(grey_out[0].style.display="block"),instance4.responsive_mode()&&(grey_out[0].style.height=grey_out.parents(".res-preview").find(".main-page").height()+"px",u_exports2.run_once(30,()=>evaluate_property(instance4,"width"),ignoreError(width2=>{let window_width=lib_default().visual_edit.responsive_canvas.current_width_without_dependency;width2=Math.max(instance4.element.get_min_width(),Math.min(width2,window_width-20)),resize_popup(instance4,width2)}))))},do_hide(instance4,properties,options,animated){if(!instance4.is_drawn)return;instance4.set_animating(!0),on_phonegap()&&$(window).off("touchmove.popup_opened");let canvas=instance4.get_canvas(),grey_out=get_greyout(instance4);if((![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&remove_blur_effect_to_greyout(instance4),!instance4.edit_mode()&&canvas.is(":visible")){var _canvas$velocity2,_grey_out$velocity2;if((_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),(_grey_out$velocity2=grey_out.velocity)==null||_grey_out$velocity2.call(grey_out,"stop",!0),animated){var _instance$_transforms,_instance$_transforms2,_instance$_transforms3,_instance$_transforms4,_instance$_transforms5;(_instance$_transforms=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms3=(_instance$_transforms2=instance4._transforms).initial_opacity)!=null||(_instance$_transforms2.initial_opacity=canvas[0].style.opacity),(_instance$_transforms5=(_instance$_transforms4=instance4._transforms).initial_transform)!=null||(_instance$_transforms4.initial_transform=canvas[0].style.transform),velocity(canvas,properties.animation,{duration:options.duration,transform:"",complete_cb(){instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,canvas[0].style.opacity=instance4._transforms.initial_opacity,instance4._transform=void 0}})}else velocity(canvas,"fadeOut",{duration:300,complete_cb(){instance4.set_animating(!1),canvas[0].style.display="none"}});velocity(grey_out,"fadeOut",{duration:300,complete_cb:()=>{grey_out[0].style.display="none"}}),instance4.message("popup_closed")}else canvas[0].style.display="none",grey_out[0].style.display="none",instance4.set_animating(!1);instance4._is_visible_me=!1,instance4._update_visible(),remove_layer(instance4),set_body_overflow()}};init_define_process_env();init_shim();init_u2();init_lib();init_property_applications();init_runmode();init_containers();init_element_edit_eval();var PRESUMED_GRAYOUT_ZINDEX=2002,FLOATING_GROUP_ZINDEX_OFFSET2=500,FloatingGroup_default={property_applications:[new property_applications_default.MinWidth],position_canvas(to_position,instance4){let{element}=instance4,parent=instance4.element.parent();function get_zindex(){if(element.get_static_property("float_zindex")==="back")return 0;{let zindex,greyout_element=$(".greyout");return greyout_element.length===0?zindex=PRESUMED_GRAYOUT_ZINDEX-FLOATING_GROUP_ZINDEX_OFFSET2:zindex=greyout_element.css("z-index")-FLOATING_GROUP_ZINDEX_OFFSET2,(!zindex||zindex<=0)&&(zindex=2),zindex+instance4.element.get_zindex()}}if(!(instance4.run_mode()||instance4.responsive_mode())||parent.type()!=="Page"){instance4.container.add(instance4,!0),instance4.container.container_canvas.append(instance4.get_canvas()),instance4.wait_for_visible_lite(()=>{property_applications_default.apply_css_style(instance4.get_canvas(),{position:"absolute",width:instance4.element.get_width()+"px",top:instance4.element.get_top()+"px",left:instance4.element.get_left()+"px",height:instance4.element.get_height()+"px"}),u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>resize_container_width(instance4))});return}instance4.responsive_mode()&&(instance4.container.wrap(instance4),instance4.container.add_to_instances(instance4),to_position=instance4.container.to_canvas(instance4)),instance4.wait_for_visible_lite(()=>{if(element.root().use_responsive_algorithm()&&!element.root().get_static_property("fixed_width")){let calculate_horizontal=()=>{let fat_ratio,margin_ratio,initial_width=element.get_width(),min_width2=element.get_min_width(),max_width=element.get_max_width(),left_margin=element.get_left(),{container_width}=instance4.container,initial_container_width=get_container_width(parent),right_margin=initial_container_width-(left_margin+initial_width),total_margin=left_margin+right_margin,fat=initial_width-min_width2,shrink2=initial_container_width-container_width;switch(fat===0?fat_ratio=1:fat>=shrink2?(fat_ratio=(fat-shrink2)/fat,shrink2=0):(fat_ratio=0,shrink2-=fat),total_margin===0||shrink2===0?margin_ratio=1:total_margin>=shrink2?margin_ratio=(total_margin-shrink2)/total_margin:margin_ratio=0,element.get_static_property("floating_reference_horizontal_resp")){case"left":to_position.css("left",left_margin*margin_ratio);break;case"right":to_position.css("right",right_margin*margin_ratio);break}let new_width=min_width2+fat*fat_ratio;max_width&&(new_width=Math.min(new_width,max_width)),to_position.css("width",new_width),u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>resize_container_width(instance4,new_width))};instance4.container.on("resize_width",calculate_horizontal),u_exports2.WaitFor(instance4.container.flow_created,()=>{let bottom2,position,top2,initial_height=element.get_height(),floating_reference=element.get_static_property("floating_reference"),overflow_y;return["bottom","top","both"].includes(floating_reference)?(position=instance4.responsive_mode()?"absolute":"fixed",floating_reference==="top"?(top2=element.get_top(),bottom2=void 0):floating_reference==="bottom"?(top2=void 0,bottom2=parent.get_height()-element.get_top()-element.get_height(),is_debug_mode()&&(bottom2+=50)):floating_reference==="both"&&(top2=element.get_top(),bottom2=parent.get_height()-element.get_top()-element.get_height(),is_debug_mode()&&(bottom2+=50),initial_height=void 0,overflow_y="auto")):(position="absolute",top2=element.get_top(),bottom2=void 0),instance4.responsive_mode()?instance4.container.container_canvas.append(to_position):$("body").append(to_position),to_position.addClass("floating-group"),to_position.css({position,"z-index":get_zindex(),height:initial_height,top:top2,bottom:bottom2,"overflow-y":overflow_y}),calculate_horizontal()})}else{let computed_bottom,computed_left,computed_margin_left,computed_right,computed_top,position,top2=computed_top=element.get_top(),left2=computed_left=element.get_left(),height2=element.get_height(),width2=element.get_width();switch(element.get_static_property("floating_reference_horizontal")){case"left":computed_left=left2,computed_right=void 0;break;case"right":computed_right=parent.get_width()-left2-width2,computed_left=void 0;break;default:computed_left="50%",computed_margin_left=-parent.get_width()/2+left2}if(["bottom","top"].includes(element.get_static_property("floating_reference")))switch(position="fixed",element.get_static_property("floating_reference")){case"top":computed_top=element.get_top(),computed_bottom=void 0;break;case"bottom":if(computed_bottom=parent.get_height()-top2-height2,is_debug_mode()){let debugger_canvas=lib_default().workflow.debugger.canvas;computed_bottom+=debugger_canvas.children(".element-area").height()}computed_top=void 0;break}else position="absolute";$("body").append(to_position),to_position.addClass("floating-group"),to_position.css({position,"z-index":get_zindex(),width:width2,height:height2,top:computed_top,bottom:computed_bottom,left:computed_left,right:computed_right,"margin-left":computed_margin_left}),element.root().use_responsive_algorithm()&&u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>resize_container_width(instance4,width2))}let parallax_factor=instance4.get_static_property("parallax");instance4.run_mode()&&![null,void 0,1].includes(parallax_factor)&&$(window).on("scroll",()=>window.requestAnimationFrame(()=>property_applications_default.apply_css_style(to_position,{transform:"translate3d(0,"+(1-parallax_factor)*$(window).scrollTop()+"px, 0)"})))})},register(instance4){instance4.get_static_property("floating_reference")!=="both"&&instance4.on_message("child_movement",max_delta=>{instance4.state("child_movement_delta",max_delta)})},initialize(instance4){instance4.get_static_property("floating_reference")!=="both"&&instance4.autorun(()=>{let max_delta=instance4.state("child_movement_delta");if(max_delta!=null){let height2=instance4.element.get_height()+max_delta;instance4.get_canvas().height(height2)}})},additional_data:{notify_width(instance4,width2){u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>resize_container_width(instance4,width2))}}};init_define_process_env();init_shim();var import_web_dom_collections_iterator178=__toESM(require_web_dom_collections_iterator());init_u2();init_elements2();init_property_applications();init_lib();init_logger();init_appquery();init_containers();init_element_eval();init_mode_check();var GroupFocus_default={initialize(instance4){let canvas=instance4.get_canvas(),about_to_hide=!1;if(instance4.run_mode()){let event_name;is_on_mobile_or_tablet()?event_name="touchend.groupfocus, inputmaskclick":event_name="click.groupfocus, inputmaskclick",$("body").on(event_name,evt=>{var _$$attr;let searchbox_dropdown=$(".tt-dropdown-menu");instance4.is_visible()&&!canvas.data("GroupWithFocus_loading")&&canvas[0]!==evt.target&&!$.contains(canvas[0],evt.target)&&!((_$$attr=$(evt.target).attr("class"))!=null&&_$$attr.match(/\bselect2-/))&&!(searchbox_dropdown.length>0&&$.contains(searchbox_dropdown[0],evt.target))&&(running_test()?instance4.do_hide():(about_to_hide=!0,instance4.setTimeout(()=>{u_exports2.WaitFor(lib_default().workflow.everything_done_key(),()=>{about_to_hide=!1,instance4.do_hide()})},10)))}),instance4.on_message("child_movement",max_delta=>{let height2=instance4.element.get_height()+max_delta;instance4.get_canvas()[0].style.height=height2+"px"})}instance4.autorun(()=>{let manual_position=instance4.state("manual_position");manual_position&&property_applications_default.apply_css_style(instance4.get_canvas(),manual_position)})},position_canvas(to_position,instance4){let options;if(instance4.responsive_mode()){options={position:"absolute"};let div2=div("r-wrapper groupfocus");div2.append(to_position),lib_default().visual_edit.responsive_canvas.get_current_preview_canvas().find("> .r-wrapper").append(div2),instance4.container.add_to_instances(instance4),lib_default().visual_edit.responsive_canvas.register_wrapper(instance4.element_id(),div2,!0),to_position.hide()}else instance4.edit_mode()?($(".container.page-element").parent(".non-draggable").append(to_position),options={position:"absolute"}):($(window.document.body).append(to_position),options={position:"fixed"});if(extend(options,{width:instance4.element.get_width()+"px",height:instance4.element.get_height()+"px","z-index":lib_default().bv().MAX_POPUP_ZINDEX+instance4.element.get_zindex()}),property_applications_default.apply_css_style(to_position,options),instance4.run_mode()||instance4.responsive_mode()){let resize_group=width2=>{u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>instance4.wait_for_visible_lite(()=>{instance4.get_canvas().css({width:width2}),resize_container_width(instance4,width2)}))};resize_group(real_inner_width(instance4.get_canvas())),instance4.on_resize(window_width=>u_exports2.run_once(30,()=>instance4.find_instance_by_id(instance4.get_static_property("reference")),(err,reference)=>{if(err){log(err);return}if(!reference)return;let left2=reference.get_canvas().offset().left+instance4.get_static_property("offset_left"),new_width=Math.max(instance4.element.get_min_width(),Math.min(instance4.element.get_width(),window_width-20-left2));resize_group(new_width)}))}},do_show(instance4,properties,options,animated){instance4._is_visible_me=!0,instance4.ensure_drawn(),instance4._update_visible();let canvas=instance4.get_canvas();if(!instance4.run_mode()){if(canvas[0].style.display="",instance4.responsive_mode()){let greyout=div("groupfocus-greyout",lib_default().visual_edit.responsive_canvas.get_current_preview_canvas().find("> .r-wrapper"));property_applications_default.apply_css_style(greyout,{"background-color":"rgba(0, 0, 0, 0.701961)",top:"0px",left:"0px",position:"absolute",width:"100%",height:greyout.parents(".res-preview").find(".main-page").height()+"px","z-index":2001+instance4.element.get_zindex()})}return}u_exports2.run_once(30,()=>instance4.find_instance_by_id(instance4.get_static_property("reference")),(err,reference)=>{var _canvas$velocity;if(err){log(err);return}if(!reference)return;(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop"),animated?perform_animate_in2(instance4,properties,options):(canvas[0].style.display="",instance4._is_visible_me=!0,instance4._update_visible());function locate(){let reference_bottom,reference_left;if(instance4.state("manual_position"))return;let reference_canvas=reference.get_canvas();reference_canvas?(reference_left=reference_canvas.offset().left,reference_bottom=reference_canvas.offset().top+reference_canvas.height()):(reference_left=0,reference_bottom=0);let left2=reference_left+instance4.get_static_property("offset_left"),top2=reference_bottom+instance4.get_static_property("offset_top")-$(window).scrollTop();canvas.css({top:top2,left:left2})}if(locate(),!is_on_mobile_or_tablet()){let old_width=null;$(window).off("resize.groupfocus"+instance4.toUniqueString()),$(window).on("resize.groupfocus"+instance4.toUniqueString(),()=>{let new_width=$(window).width();old_width!==new_width&&(old_width=new_width,instance4.is_visible()&&!instance4.get_canvas().data("GroupWithFocus_loading")&&instance4.do_hide())})}let event_name="scroll.groupfocus"+instance4.toUniqueString();$(window).off(event_name),$(window).on(event_name,locate)})},do_hide(instance4,properties,options,animated){var _canvas$velocity2;instance4._is_visible_me=!1,instance4._update_visible();let canvas=instance4.get_canvas();if((_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),animated){var _instance$_transforms,_instance$_transforms2,_instance$_transforms3,_instance$_transforms4,_instance$_transforms5;(_instance$_transforms=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms3=(_instance$_transforms2=instance4._transforms).initial_opacity)!=null||(_instance$_transforms2.initial_opacity=canvas[0].style.opacity),(_instance$_transforms5=(_instance$_transforms4=instance4._transforms).initial_transform)!=null||(_instance$_transforms4.initial_transform=canvas[0].style.transform),instance4.set_animating(!0),velocity(canvas,properties.animation,{duration:options.duration,complete_cb(){instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,canvas[0].style.opacity=instance4._transforms.initial_opacity,instance4._transforms=void 0}})}else canvas[0].style.display="none";$(window).off("resize.groupfocus"+instance4.toUniqueString()),$(window).off("scroll.groupfocus"+instance4.toUniqueString()),instance4.responsive_mode()&&lib_default().visual_edit.responsive_canvas.get_current_preview_canvas().find("> .r-wrapper").find(".groupfocus-greyout").remove()}};init_define_process_env();init_shim();init_u2();init_property_applications();var GroupWithFocus_default=extend({property_applications:[new property_applications_default.MinWidth],initialize(instance4){let canvas=instance4.get_canvas();if(instance4.do_hide(),instance4.run_mode()){let event_name;is_on_mobile_or_tablet()?event_name="touchend.groupfocus":event_name="click.groupfocus",$("body").on(event_name,evt=>{var _$$attr;instance4.is_visible()&&!canvas.data("GroupWithFocus_loading")&&canvas[0]!==evt.target&&!$.contains(canvas[0],evt.target)&&!((_$$attr=$(evt.target).attr("class"))!=null&&_$$attr.match(/\bselect2-/))&&instance4.do_hide()}),instance4.on_message("child_movement",max_delta=>{let height2=instance4.element.get_height()+max_delta;instance4.get_canvas()[0].style.height=height2+"px"})}}},group_collapse_definition);init_define_process_env();init_shim();init_property_applications();var Input_default={property_applications:[new property_applications_default.MinWidth]};init_define_process_env();init_shim();var import_es_string_replace42=__toESM(require_es_string_replace());init_property_applications();init_element_utils();init_lib();init_u2();var inputs_exports={};__export(inputs_exports,{additional_field_names_for_text_inputs:()=>additional_field_names_for_text_inputs,assign_change_keyup_handlers:()=>assign_change_keyup_handlers,assign_enter_handler_in_input:()=>assign_enter_handler_in_input,default_for_inputs:()=>default_for_inputs,do_auto_binding:()=>do_auto_binding,format_input_content:()=>format_input_content,format_to_type:()=>format_to_type,get_auto_binding_field_names:()=>get_auto_binding_field_names,get_disabled_field_name:()=>get_disabled_field_name,get_file_upload_condition_field_name:()=>get_file_upload_condition_field_name,get_input_autobind_thing:()=>get_input_autobind_thing,get_input_autobind_thing_field:()=>get_input_autobind_thing_field,get_max_file_size_field_name:()=>get_max_file_size_field_name,get_timezone:()=>get_timezone,input_change_autorun:()=>input_change_autorun,input_content_options:()=>input_content_options,is_datelike_format:()=>is_datelike_format,is_pw_valid:()=>is_pw_valid,register_focus:()=>register_focus,register_input_states:()=>register_input_states,reset_input_div:()=>reset_input_div,run_auto_binding:()=>run_auto_binding,set_character_limit_on_input:()=>set_character_limit_on_input,switch_disabled_or_not:()=>switch_disabled_or_not,type_content_format_mapping:()=>type_content_format_mapping});init_define_process_env();init_shim();var import_web_dom_collections_iterator183=__toESM(require_web_dom_collections_iterator());init_lodash();init_u2();init_hydrate();init_mode_check();init_obfuscate();init_logger();init_eval();init_define_process_env();init_shim();var import_web_dom_collections_iterator181=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_define_process_env();init_shim();var import_es_error_cause17=__toESM(require_es_error_cause()),url4=__toESM(require_url()),querystring6=__toESM(require_querystring());typeof window<"u"&&(window.safe_require={safe_require,safe_register});var _safe_require_listing={url:url4,querystring:querystring6};function safe_require(path){let already_registered=_safe_require_listing[path];if(already_registered!=null)return already_registered;let path_parts=path.split("/");if(typeof window<"u"&&path_parts[1]==="optional"){let file_name=path_parts[path_parts.length-1],optional_modules2=window.optional_modules;if(file_name in optional_modules2)return optional_modules2[file_name];throw new Error("could not find optional module: "+path)}else return __require(path)}function safe_register(path,mod){_safe_require_listing[path]=mod}init_b_object();init_logger();init_workflow();init_core();init_appquery();var core_ds_workflow_utilities_exports={};__export(core_ds_workflow_utilities_exports,{build_duplicate_per_item_context:()=>build_duplicate_per_item_context,dehydrate_wf_params:()=>dehydrate_wf_params,generate_wf_param_datasource:()=>generate_wf_param_datasource,rehydrate_wf_params:()=>rehydrate_wf_params,wf_params_from_properties:()=>wf_params_from_properties});init_define_process_env();init_shim();var import_web_dom_collections_iterator179=__toESM(require_web_dom_collections_iterator());init_core();init_uuid();init_decaf();var ALL_PARAMS_ID="__ALL__",generate_wf_param_datasource=workflow_params=>function(properties){return properties.param_id===ALL_PARAMS_ID?workflow_params:typeof workflow_params[properties.param_id]=="function"?workflow_params[properties.param_id]():workflow_params[properties.param_id]};function dehydrate_wf_params(context,dehydrate_fn){var _context$datasources$,_context$datasources,_context$datasources$2;let dehydrated_wf_params={},all_wf_params=(_context$datasources$=(_context$datasources=context.datasources)==null||(_context$datasources$2=_context$datasources.get_wf_param)==null?void 0:_context$datasources$2.call(_context$datasources,{param_id:ALL_PARAMS_ID}))!=null?_context$datasources$:{};for(let[datasource_name,value]of Object.entries(all_wf_params))typeof value=="function"?dehydrated_wf_params[datasource_name]=dehydrate_fn(value()):dehydrated_wf_params[datasource_name]=dehydrate_fn(value);return dehydrated_wf_params}function rehydrate_wf_params(serialized_context,rehydrate_fn){let rehydrated_wf_params={};serialized_context.current_wf_item!=null&&(rehydrated_wf_params[LEGACY_PARAM_ID]=rehydrate_fn(serialized_context.current_wf_item));for(let[k,v]of object_entries(serialized_context.current_wf_params))rehydrated_wf_params[k]=rehydrate_fn(v);return rehydrated_wf_params}function wf_params_from_properties(properties){let wf_params={};if(properties.arguments)for(let{param_id,arg_value}of Object.values(properties.arguments))wf_params[param_id]=arg_value;else wf_params[LEGACY_PARAM_ID]=properties.workflow_thing;return wf_params}function build_duplicate_per_item_context(context,workflow_params){let custom_context={...context};return context.duplicated_from_context=context.object_id,context.object_id=UUID(),context.duplicated_at="core_ds_workflow_utilities.build_duplicate_per_item_context",custom_context.datasources={...context.datasources,get_wf_param:generate_wf_param_datasource(workflow_params)},custom_context}init_define_process_env();init_shim();var import_es_string_replace41=__toESM(require_es_string_replace());init_timezone_override_settings();init_lib();init_b_date();var moment4=require_moment2(),custom_tz_field_names={tz_type:{default:"browser",no_states:!0},tz_static:{},tz_dynamic:{},tz_type_overridden:{default:"browser",no_states:!0},tz_static_overridden:{},tz_dynamic_overridden:{}},get_custom_tz=_ref=>{var _dynamic_eval;let{static_eval,dynamic_eval,invalid_tz_fallback,not_overridden=!1}=_ref;if((_dynamic_eval=dynamic_eval)!=null||(dynamic_eval=static_eval),invalid_tz_fallback===void 0){var _invalid_tz_fallback;(_invalid_tz_fallback=invalid_tz_fallback)!=null||(invalid_tz_fallback=lib_default().current_timezone())}let prop_suffix=has_adv_timezone_overridden()&&!not_overridden?"_overridden":"";switch(static_eval(`tz_type${prop_suffix}`)){case"browser":return lib_default().current_timezone();case"static":return dynamic_eval(`tz_static${prop_suffix}`);case"dynamic":{let dynamic=dynamic_eval(`tz_dynamic${prop_suffix}`);return moment4.tz.zone(dynamic)?dynamic:invalid_tz_fallback}}return lib_default().current_timezone()};init_FrozenState();init_page_state();init_decaf();init_service_type_parser();var event_element_mapping_exports={};__export(event_element_mapping_exports,{add_event:()=>add_event,all_events:()=>all_events,clear_event:()=>clear_event,has_event:()=>has_event,relevant_elements:()=>relevant_elements,relevant_events:()=>relevant_events});init_define_process_env();init_shim();var import_web_dom_collections_iterator180=__toESM(require_web_dom_collections_iterator()),mapping2=new Map;function add_event(event_name,element_name){let set2=mapping2.get(event_name);set2||(set2=new Set,mapping2.set(event_name,set2)),element_name&&set2.add(element_name)}function clear_event(event_name){var _mapping$get;(_mapping$get=mapping2.get(event_name))==null||_mapping$get.clear()}function has_event(event_name,element_name){var _mapping$get$has,_mapping$get2;return(_mapping$get$has=(_mapping$get2=mapping2.get(event_name))==null?void 0:_mapping$get2.has(element_name))!=null?_mapping$get$has:!1}function all_events(){return[...mapping2.keys()]}function relevant_elements(event_name){var _mapping$get3;return[...(_mapping$get3=mapping2.get(event_name))!=null?_mapping$get3:[]]}function relevant_events(element_name){return all_events().filter(event=>has_event(event,element_name))}init_define_process_env();init_shim();init_appquery();function is_installed(plugin_name){return appquery_default.list_plugins().includes(plugin_name)}init_plugin_registry();init_plugin_getter();init_StaticObject();init_status_bar();init_define_process_env();init_shim();init_node_types();init_nodes();var app_json_exports2={};__export(app_json_exports2,{EmptyJSON:()=>EmptyJSON,JSONBase:()=>JSONBase,RuntimeJSON:()=>RuntimeJSON,VirtualJSON:()=>VirtualJSON,escape_app_json_key:()=>escape_app_json_key,raw_to_child_names:()=>raw_to_child_names,unescape_app_json_key:()=>unescape_app_json_key});init_define_process_env();init_shim();init_json_base();init_json_utils();init_caching();init_expressions();init_workflow2();init_RAW();init_elements2();init_appquery();appquery_default.add_methods(nodes_default.get(node_types_default.APPLICATION_VERSION));var all_nodes2={};Object.values(node_types_default).forEach(name=>{nodes_default.has(name)&&(all_nodes2[name]=nodes_default.get(name))});var lang={...nodes_default,...workflow_exports2,...expressions_exports,...app_json_exports2,...caching_exports,...all_nodes2,RAW:RAW_default,EnhancedArray:nodes_default.get_EnhancedArray()};function make_run_app(data,appname,app_version){return new lang.ApplicationVersion(new lang.RuntimeJSON(data,null,null,null,appname,app_version))}var lang_default=lang;init_node_eval();init_btype_ids();init_btypes();init_flagCheck();init_workflow_utils();var _core_events$plugin_g,core_events={};(_core_events$plugin_g=core_events.plugin_general_events)!=null||(core_events.plugin_general_events={});var make_gen_event=core_events.make_gen_event=function(name,data){var _data$field_names,_data$register;core_events[name]=data,data.field_names={...(_data$field_names=data.field_names)!=null?_data$field_names:{},...getCommonFieldNames()},(_data$register=data.register)!=null||(data.register=function(workflow,element_instance){let run_workflow=()=>{let context={element:element_instance};return lib_default().workflow.run_workflows(context,[workflow]).callback(err=>core_events.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.GENERAL_WORKFLOW,cb(err2){if(err2)return console.log("Workflow failed:"),log(err2)}}))},root_instance=element_instance.root_instance(),message_fn=root_instance.on_message("announce_page_event",event_name=>{event_name===name&&run_workflow()});return()=>{root_instance.off_message("announce_page_event",message_fn)}})},make_element_event=core_events.make_element_event=function(name,data,not_add_core_events,is_testing){var _data$_display,_data$defaultWorkflow;not_add_core_events||(core_events[name]=data);let old_field_names=data.field_names;data.field_names={element_id:{},...getCommonFieldNames(),...old_field_names!=null?old_field_names:{}},data.isUserAction=!0,data.register=function(){},data.deferrable=!0};make_gen_event("LoggedIn",{display(){return"User is logged in"},eventType:"Event",defaultWorkflowName(){return"User is logged in flow"},can_redirect:!0,server_side_redirect(){return lib_default().current_user().is_logged_in()}});make_gen_event("LoggedOut",{display(){return"User is logged out"},eventType:"Event",defaultWorkflowName(){return"User is logged out flow"},can_redirect:!0,server_side_redirect(){return!lib_default().current_user().is_logged_in()}});make_gen_event("PageLoaded",{display(){return"Page is loaded"},eventType:"Event",defaultWorkflowName(){return"Page is loaded flow"},can_redirect:!0,server_side_redirect(){return!0}});var is_running=u_exports2.MakeSwitch(null,"conditiontrue is running");is_running.turn_on();make_gen_event("ConditionTrue",{field_names:{run_when:{default:"just_once"}},condition_not_optional:!0,register(workflow,element_instance){let run_when=workflow.get_static_property("run_when"),watcher=null;return u_exports2.WaitFor(element_instance.get_is_ready_key(),()=>{let timestamp2=new Date(timestamp());watcher=u_exports2.Watcher(()=>{u_exports2.ensure_ready(is_running),timestamp2||(timestamp2=new Date(timestamp()));let context={element:element_instance,datasources:get_basic_datasources(element_instance.element.root()),_current_date_time:timestamp2};return new FrozenState(context),[evaluate_event_condition(workflow,context),context]});let can_run=!0;watcher.on_value(_ref3=>{let[passes,context]=_ref3;timestamp2=null,passes?can_run&&(is_running.turn_off(),lib_default().workflow.run_workflows(context,[workflow]).callback(err=>core_events.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.GENERAL_WORKFLOW,cb(err2){return err2&&log(err2),is_running.turn_on()}})),can_run=!1,run_when!=="every_time"&&watcher.destroy()):can_run=!0})}),()=>{var _watcher;return(_watcher=watcher)==null?void 0:_watcher.destroy()}}});var _on_page_errors=[],_ope_id=0;make_gen_event("OnPageError",{display(event){return"An unhandled error occurs"},eventType:"Event",defaultWorkflowName(){return"Unhandled error flow"},fields(){return[{name:"caught_error_origins",caption:"Catch ",editor:"Dropdown",set:lib_default().sets.get_set("Object")(ERROR_CATCHER_TYPES)}]},field_names:{caught_error_origins:{default:DEFAULT_CATCHER_TYPE}},register(workflow,element_instance){let my_id=_ope_id;_ope_id++;let error_origin=workflow.get_static_property("caught_error_origins");return _on_page_errors.push({id:my_id,workflow,element_instance,error_origin}),()=>{_on_page_errors=_on_page_errors.filter(x=>x.id!==my_id)}}});core_events.build_wf_error_object=function(original_error){let code=original_error.message;code||(original_error instanceof errors_exports.ExpectedError?code="MISCELLANEOUS":code="TEMPORARY_BUG");let message=human_friendly(original_error);return{code,message}};core_events.handle_uncaught_error=function(_ref4){let{original_error,caught_from,cb}=_ref4;if(original_error==null){cb(null);return}if(_on_page_errors.length===0){cb(original_error);return}let error_object=core_events.build_wf_error_object(original_error),promises=[];for(let{workflow,element_instance,error_origin}of _on_page_errors){let error_handler_type=error_origin!=null?error_origin:void 0,handled_error_sources=CAUGHT_ERROR_SOURCES[error_handler_type];if(caught_from!=null&&!handled_error_sources.includes(caught_from))continue;let error_context={element:element_instance,datasources:get_basic_datasources(element_instance.element.root())},wf_params={};wf_params[LEGACY_PARAM_ID]=new StaticObject(error_object,null,"sys.error"),error_context.datasources.get_wf_param=generate_wf_param_datasource(wf_params),promises.push(lib_default().workflow.run_workflows(error_context,[workflow],!0))}promises.length===0&&cb(original_error),u_exports2.promise_array(promises).callback((err,outcome)=>{if(err){cb(err);return}for(let wf of outcome)if(wf.length!==0){cb(null);return}cb(original_error)})};make_gen_event("DoInterval",{display(event){var _event$get_static_pro;return"Do every "+((_event$get_static_pro=event==null?void 0:event.get_static_property("interval"))!=null?_event$get_static_pro:"X")+" seconds"},eventType:"Event",defaultWorkflowName(){return"Recurring flow"},field_names:{interval:{default:5}},fields(){return[{name:"interval",caption:"Interval (seconds)",editor:"StaticNumber",optional:!1}]},register(workflow,element_instance){let interval=workflow.get_static_property("interval"),_is_on=!0;function do_it2(){_is_on&&setTimeout(()=>{let context={element:element_instance};lib_default().workflow.run_workflows(context,[workflow]).callback(err=>core_events.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.GENERAL_WORKFLOW,cb(){}})),u_exports2.WaitFor(lib_default().workflow.everything_done_key(),do_it2)},interval*1e3)}return do_it2(),()=>{_is_on=!1}}});make_element_event("ButtonClicked",{display(event){var _event$owner2,_event$owner2$is_mobi;return event!=null&&(_event$owner2=event.owner())!=null&&(_event$owner2$is_mobi=_event$owner2.is_mobile)!=null&&_event$owner2$is_mobi.call(_event$owner2)?" is tapped":" is clicked"},eventType:"Element Event",defaultWorkflowName(){return" flow"}});make_element_event("ElementPressed",{display(){return" is pressed"},eventType:"Element Event",defaultWorkflowName(){return" flow"},field_names:{min_duration:{default:500}},_fields(){return[{name:"min_duration",caption:"Min duration (ms)",editor:"StaticNumber"}]}});make_element_event("InputChanged",{display(){return"'s value is changed"},eventType:"Element Event",defaultWorkflowName(){return" value changed flow"},element_name:"An input"});make_element_event("PopupClosed",{display(){return" is closed"},eventType:"Element Event",defaultWorkflowName(){return" closing flow"},element_name:"A popup "});make_element_event("PopupOpened",{display(){return" is opened"},eventType:"Element Event",defaultWorkflowName(){return" opening flow"},element_name:"A popup "});make_element_event("SwipeActionTriggered",{display(){return" triggered a swipe action"},element_name:"A list item",eventType:"Element Event",defaultWorkflowName(){return" swipe action flow"},field_names:{action_side:{default:"left"},action_index:{default:0}},_fields(event){var _Lib$sets2,_Lib$sets3;return[{name:"action_side",caption:"Side",editor:"Dropdown",set:(_Lib$sets2=lib_default().sets)==null?void 0:_Lib$sets2.get_set("Object")({left:"Left",right:"Right"})},{name:"action_index",caption:"Index",editor:"Dropdown",set:(_Lib$sets3=lib_default().sets)==null?void 0:_Lib$sets3.get_set("Integer")([0,1,2])}]}});make_element_event("MapMarkerClicked",{display(){return"'s marker is clicked"},eventType:"Element Event",defaultWorkflowName(){return" flow"},element_name:"A map"});make_element_event("OnError",{display(){return" has an error running a workflow"}});make_gen_event("CustomEvent",{display(event){let event_name=event==null?void 0:event.get_static_property("event_name");return event_name?mode_check.on_client()&&isWfRedesignEnabled()?`${event_name} is triggered`:event_name:"Create a custom event..."},eventType:"Custom Event",defaultWorkflowName(event){let event_name=event==null?void 0:event.get_static_property("event_name");return event_name?`${event_name} flow`:"Unnamed event flow"},field_names:{event_name:{},parameters:{}},register(){},deferrable:!0,check_for_errors(event,report){var _event$get_static_pro2;if(event.returnFields().length===0)return;let no_conditions=event.actions("TerminateWorkflow").filter(action=>{var _action$property,_action$property$call,_action$property$call2;return((_action$property=action.property)==null||(_action$property$call=_action$property.call(action,"condition"))==null||(_action$property$call2=_action$property$call.json)==null?void 0:_action$property$call2.raw())==null});no_conditions.length>1&&report("You cannot have more than one unconditional 'Return Data' action");let return_types=(_event$get_static_pro2=event==null?void 0:event.get_static_property("return_types"))!=null?_event$get_static_pro2:{};Object.values(return_types).some(r2=>!r2.optional)&&no_conditions.length===0&&report("This workflow must end with a unconditional 'Return Data' action")}});make_gen_event("APIEvent",{display(event,generic){var _event$wf_name;let wf_name=event==null||(_event$wf_name=event.wf_name)==null?void 0:_event$wf_name.call(event);return wf_name?isWfRedesignEnabled()?`${wf_name} is called`:wf_name:generic?"API Workflow":"New API workflow..."},eventType:"API Event",defaultWorkflowName(event){var _event$wf_name2;let event_name=event==null||(_event$wf_name2=event.wf_name)==null?void 0:_event$wf_name2.call(event);return event_name?`${event_name} flow`:"Unnamed endpoint flow"},field_names:extend({wf_name:{},expose:{default:!0},auth_unecessary:{default:!1},ignore_privacy_rules:{default:!1},trigger_option:{default:"post"},return_200_if_not_run:{default:!1},parameters:{},detect_request:{},include_headers:{},parameter_def:{default:"manual"},modify_types:{},response_type:{default:"json"},redirect_page_success:{},redirect_page_error:{}},custom_tz_field_names),register(){},deferrable:!0,check_for_errors(event,report){event.wf_name()?event.wf_name().indexOf(" ")!==-1&&event.get_static_property("expose")?report(this.display(event)+" - the API workflow name should not have any spaces, since it can be used via the Workflow API"):firebase_illegal(event.wf_name())&&report(this.display(event)+" - the API workflow should not contain illegal characters, since it can be used via the Workflow API"):report(this.display(event)+" - the API workflow name should not be empty");for(let{param_id}of event.get_custom_parameters())param_id&&param_id.trim()!==param_id&&report(this.display(event)+" - the parameter "+param_id.trim()+" has some spaces around it")}});make_gen_event("RecurringEvent",{display(event,generic){let wf_name=event==null?void 0:event.get_static_property("event_name");return wf_name?isWfRedesignEnabled()?`${wf_name}'s scheduled time`:wf_name:generic?"Recurring event":"New recurring event..."},eventType:"Recurring Event",defaultWorkflowName(event){let wf_name=event==null?void 0:event.get_static_property("event_name");return wf_name?`${wf_name} flow`:"Untitled flow"},field_names:extend({event_name:{},custom_event_data_type:{},ignore_privacy_rules:{default:!1}},custom_tz_field_names),register(){},deferrable:!0});make_gen_event("DatabaseTriggerEvent",{display(event,generic){if(isWfRedesignEnabled()){let data_type=event==null?void 0:event.get_static_property("data_trigger_type"),btype=get5(data_type);return btype!=null&&!btype.is_missing()?`A ${btype.display()||"Thing"} is modified`:generic?"Database trigger event":"New database trigger event..."}let event_name=event==null?void 0:event.get_static_property("event_name");return event_name||(generic?"Database trigger event":"New database trigger event...")},field_names:extend({event_name:{},data_trigger_type:{}},custom_tz_field_names),eventType:"Database Trigger Event",defaultWorkflowName(event){let data_type=event==null?void 0:event.get_static_property("data_trigger_type"),btype=get5(data_type);return btype!=null&&!btype.is_missing()?`${btype.display()} modified flow`:"Unspecified data modification flow"},register(){},deferrable:!0});core_events.get_event_object=function(type){if(core_events[type])return core_events[type];{var _plugin_getter$get_pl;let[plugin_name]=get_plugin_and_type(type);return(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_event(type)}};plugin_registry_default.on_plugin_registration((_,instance4)=>{if(instance4.plugin_general_events!==null){var _core_events$plugin_g2;(_core_events$plugin_g2=core_events.plugin_general_events)!=null||(core_events.plugin_general_events={}),extend(core_events.plugin_general_events,instance4.plugin_general_events)}});var core_events_default=core_events;var element_workflows_exports={};__export(element_workflows_exports,{find_inputs_to_check:()=>find_inputs_to_check,find_invalid_inputs:()=>find_invalid_inputs,run_element_workflow:()=>run_element_workflow,start_workflow_field_names:()=>start_workflow_field_names});init_define_process_env();init_shim();var import_web_dom_collections_iterator182=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_FrozenState();init_page_state();init_runmode();init_workflow();init_core();init_lib();init_StaticObject();init_status_bar();init_element_eval();init_hydrate();init_appquery();var start_workflow_field_names={start_workflow:{no_states:!0},button_disabled:{}};function run_element_workflow(instance4,event_type,e,events_to_run,additional_datasources,is_plugin){if(!is_plugin&&(e&&did_event_pass_through(e,"."+CLICKABLE_ELEMENT)||instance4.state("force_pressed")))return;let events7=events_to_run!=null?events_to_run:instance4.element.get_related_workflows(event_type);if(!(events7!=null&&events7.length))return;let evaluation_complete=u_exports2.Promise(null,"button press evaluation");is_plugin||instance4.state("force_pressed",!0);let status=show_progress_line(evaluation_complete),handle_errors=cb=>function(original_error){if(!original_error){cb();return}let error_events=instance4.element.get_related_workflows("OnError");if(error_events.length===0){cb(original_error);return}let error_object=core_events_default.build_wf_error_object(original_error),error_context={element:instance4,datasources:get_basic_datasources(instance4.element.root())},wf_params={};wf_params[LEGACY_PARAM_ID]=new StaticObject(error_object,null,"sys.error"),error_context.datasources.get_wf_param=generate_wf_param_datasource(wf_params),additional_datasources!=null&&extend(error_context.datasources,additional_datasources),new FrozenState(error_context).freeze_workflows(error_events,err=>{if(err){cb(err);return}lib_default().workflow.run_workflows(error_context,error_events,!0).callback((err2,_events)=>{if(err2){cb(err2);return}if(_events.length===0){cb(original_error);return}return cb()})})};return evaluation_complete.callback(handle_errors(err=>core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT_WORKFLOW,cb(err2){return err2&&window.alert(human_friendly(err2)),is_plugin||instance4.state("force_pressed",!1),status()}}))),u_exports2.run_once(5,()=>is_plugin?!1:evaluate_property(instance4,"button_disabled"),(err,button_disabled)=>{if(err){evaluation_complete.reject(err);return}if(button_disabled){evaluation_complete.resolve();return}!is_plugin&&!on_react_native()&&instance4.get_canvas().removeClass("show-outline");let context={element:instance4,inputs_must_be_valid:!0,datasources:get_basic_datasources(instance4.element.root())};additional_datasources!=null&&extend(context.datasources,additional_datasources),new FrozenState(context).freeze_workflows(events7,err2=>{if(err2){evaluation_complete.reject(err2);return}return u_exports2.run_once(30,()=>find_invalid_inputs(instance4,events7,context),(err3,data)=>{if(err3){evaluation_complete.reject(err3);return}let{validation_fail,min_top}=data;if(validation_fail)if(evaluation_complete.resolve(!0),min_top.instance.canvas!=null&&!isScrolledIntoView(min_top.instance.canvas).status){var _min_top$instance;return velocity((_min_top$instance=min_top.instance)==null?void 0:_min_top$instance.get_canvas(),"scroll",{duration:200,offset:-100,complete_cb(){return min_top.instance.message("set_focus")}})}else return min_top.instance.message("set_focus");else return evaluation_complete.resolve(lib_default().workflow.run_workflows(context,events7,!0))})})}),evaluation_complete}function find_inputs_to_check(instance4,events7,context,ignore_event_condition){let to_run2=[],input_instances_raw=[];for(let event of events7){let is_input_used_with_invalid2=function(exp){var _exp$next,_exp$next$name;return((_exp$next=exp.next())==null||(_exp$next$name=_exp$next.name)==null?void 0:_exp$next$name.call(_exp$next))==="isnt_valid"},find_input_in_custom_workflow2=function(custom_workflow,parents){var _parents;let custom_event=appquery_default.event(custom_workflow.get_static_property("custom_event"));if((_parents=parents)!=null||(parents={}),parents[custom_event.id()])return;parents[custom_event.id()]=!0;let parent_instance=instance4.find_instance_by_id(custom_workflow.element_id());if(custom_event!=null&&custom_event.exists()){for(let exp of custom_event.find_expressions("GetElement"))is_input_used_with_invalid2(exp)||related_inputs.push({instance_id:exp.element_id(),parent_instance});for(let sub_custom_workflow of custom_event.actions("TriggerCustomEvent").concat(custom_event.actions("TriggerCustomEventFromReusable")))find_input_in_custom_workflow2(sub_custom_workflow,extend({},parents))}};var is_input_used_with_invalid=is_input_used_with_invalid2,find_input_in_custom_workflow=find_input_in_custom_workflow2;if(!ignore_event_condition&&!lib_default().workflow.should_workflow_run(context,event))continue;to_run2.push(event);let related_inputs=[];for(let exp of event.find_expressions("GetElement"))is_input_used_with_invalid2(exp)||related_inputs.push({instance_id:exp.element_id()});for(let exp of event.find_expressions("ThisElement"))is_input_used_with_invalid2(exp)||related_inputs.push({instance_id:instance4.element_id()});for(let custom_workflow of event.actions("TriggerCustomEvent").concat(event.actions("TriggerCustomEventFromReusable")))find_input_in_custom_workflow2(custom_workflow);for(let{instance_id,parent_instance}of related_inputs){let input_instance=(parent_instance!=null?parent_instance:instance4).find_instance_by_id(instance_id);input_instance&&input_instance.is_visible()&&input_instances_raw.push(input_instance)}}let _seen_toUniqueString={},input_instances=[];for(let a of input_instances_raw)_seen_toUniqueString[a.toUniqueString()]||(_seen_toUniqueString[a.toUniqueString()]=!0,input_instances.push(a));return{input_instances,to_run:to_run2}}function find_invalid_inputs(instance4,events7,context){let min_top={top:0,left:0,instance:null},validation_fail=!1,{input_instances,to_run:to_run2}=find_inputs_to_check(instance4,events7,context);for(let input_instance of input_instances)if(input_instance.get_messages().includes("display_validity")){var _context$frozen_state,_context$frozen_state2;input_instance.message("display_validity"),(input_instance.state("display_invalid")||(_context$frozen_state=context.frozen_state.element_state[dehydrate_tree(input_instance)])!=null&&(_context$frozen_state2=_context$frozen_state.value_that_is_valid)!=null&&_context$frozen_state2.not_valid)&&(validation_fail=!0,(min_top.top>input_instance.element.get_top()||!min_top.instance)&&(min_top.left>=input_instance.element.get_left()||!min_top.instance)&&(min_top.top=input_instance.element.get_top(),min_top.left=input_instance.element.get_left(),min_top.instance=input_instance))}return{validation_fail,min_top,to_run:to_run2}}init_appquery();init_define_process_env();init_shim();init_u2();init_b_fiber();init_logger();init_shared();init_btypes();var update_modified_date=thing=>thing.child("Modified Date").set(timestamp()),update_thing=function(thing,new_values,expected_value_id){var _thing$_id,_thing$_id2;let promise=u_exports2.Promise(null,`updating ${String(thing==null||(_thing$_id=thing._id)==null?void 0:_thing$_id.call(thing))}`);if(!thing)return console.log("trying to update something that does not exist.  this is likely an application error..."),promise.resolve(void 0),promise;if(typeof thing.child!="function")return console.log("trying to update something that doesn't look like a DB object.  This can legitimately happen in preview mode, if the to_change expression isn't valid."),promise.resolve(void 0),promise;let upsert_log_object={thing_id:thing==null||(_thing$_id2=thing._id)==null?void 0:_thing$_id2.call(thing),new_values,expected_value_id,inner_value_check:{}};return promise.resolve(u_exports2.run_once(30,()=>thing._type()).then(_type=>{if(upsert_log_object.thing_type=_type,expected_value_id!=null&&expected_value_id!==_type)return null;let custom_type2=get5(_type).custom_type();if(custom_type2!=null)return optional_pause(),u_exports2.run_once(30,()=>{var _ref;let new_values2={},object2=(_ref=new_values)!=null?_ref:{};for(let idx in object2){let entry=object2[idx];if(entry!=null&&entry.key){var _inner_btype;if(!custom_type2.field(entry.key).exists())continue;new_values2[idx]=extend({},entry);let field_btype=get5(custom_type2.field(entry.key).btype()),inner_btype=field_btype.inner();if(upsert_log_object.inner_value_check[entry.key]=inner_btype!=null,(_inner_btype=inner_btype)!=null||(inner_btype={cast(){return null}}),!entry.action&&field_btype.is_list()&&(entry.action="set_list"),!entry.action)new_values2[idx].value=field_btype.cast(entry.value);else if(["add","remove"].includes(entry.action))new_values2[idx].value=inner_btype.cast(entry.value);else{var _value;new_values2[idx].value=[];let iterable=(_value=entry.value)!=null?_value:[];for(let i=0;i<iterable.length;i++){let list_entry=iterable[i];new_values2[idx].value.push(inner_btype.cast(list_entry)),optional_pause_tick()}}}}return upsert_log_object.new_values2=new_values2,new_values2}).then(new_values2=>{action_update_thing.active()&&debug("update_thing processed values",upsert_log_object);let object2=new_values2!=null?new_values2:{};for(let idx in object2){let entry=object2[idx];if(!entry.action)thing.child(entry.key).set(entry.value);else{let add_entry=val=>thing.child(entry.key).push(val),remove_entry=val=>thing.child(entry.key).remove(val),add_entries=entries=>thing.child(entry.key).push_list(entries);if(entry.action==="add")add_entry(entry.value);else if(entry.action==="remove")remove_entry(entry.value);else if(entry.action==="set_list")thing.child(entry.key).set(entry.value);else if(entry.action==="add_list")add_entries(entry.value),optional_pause_tick();else if(entry.action==="remove_list")for(let i=0;i<entry.value.length;i++){let list_entry=entry.value[i];remove_entry(list_entry),optional_pause_tick()}else if(entry.action==="clear_list")thing.child(entry.key).set([]);else throw new UnexpectedError(`unrecognized action: ${entry.action}`)}optional_pause()}return update_modified_date(thing),null})})),promise};init_property_applications();init_workflow();init_lib();init_btypes();init_status_bar();init_element_eval();init_define_process_env();init_shim();init_u2();init_b_date();init_lib();var moment5=require_moment2();var InputMask=class{constructor(caption,mask){this.caption=caption,this.mask=mask,this.btype="text"}format_val(val,options){return this.format_text(val)}get_val(canvas,options){var _canvas$inputmask,_canvas$inputmask2;return this.parse_val((_canvas$inputmask=(_canvas$inputmask2=canvas.inputmask)==null?void 0:_canvas$inputmask2.call(canvas,"unmaskedvalue"))!=null?_canvas$inputmask:canvas.val(),options)}parse_val(text2,options){return text2}is_valid_text(text2){let formatted=this.format_text(text2);return window.Inputmask.isValid(formatted,this.get_mask())}get_mask(options){var _options;return(_options=options)!=null||(options={}),extend({greedy:!1},this.mask,options)}format_text(text2,options){return window.Inputmask.format(text2!=null?text2:"",this.get_mask(options))}},NumberMask=class extends InputMask{constructor(caption,type,mask){super(caption,mask),this.type=type,this.btype="number"}get_mask(options){var _options2;(_options2=options)!=null||(options={});let{decimal_separator,group_separator}=lib_default().locale().get_regional_separators();return extend({greedy:!1,radixPoint:decimal_separator,groupSeparator:group_separator},this.mask,options)}format_val(val,options){if(val!=null){let localized=lib_default().locale().format_number(val,options.digits);return this.format_text(localized,options)}else return""}parse_val(text2){let float_val=lib_default().locale().parse_float(text2);if(isNaN(float_val))return null;if(this.type==="integer"){let int_val=parseInt(float_val);return isNaN(int_val)?null:int_val}else return float_val}is_valid_text(text2){if(this.type==="integer"){let parsed=this.parse_val(text2);return parsed==null||isNaN(parsed)?!1:parsed===0||String(parsed)===text2}else return!0}},PercentageMask=class extends NumberMask{format_val(val,options){if(val==null)return"";let parsed=lib_default().locale().parse_float(val);if(isNaN(parsed)||(val=val*100,val=parseFloat(val.toPrecision(12))),val!=null){let localized=lib_default().locale().format_number(val,options.digits);return this.format_text(localized,options)}else return""}parse_val(text2){let input_val=super.parse_val(text2);return input_val==null?input_val:input_val/100}},DateMask=class extends InputMask{constructor(caption,_ref){let{separator,order}=_ref,date_format=order.join(separator),mask={alias:"datetime",inputFormat:date_format,placeholder:date_format};super(caption,mask),this.btype="date",this.date_format=date_format,this.separator=separator,this.order=order}format_val(val,options){return format_date(mk_date(val),this.date_format,null,options.timezone)}parse_val(text2,options){if(text2){var _options$timezone;let day,month,year,string_date=text2.split(this.separator);for(let i=0;i<this.order.length;i++){let part=this.order[i];part[0]==="m"?month=string_date[i]:part[0]==="d"?day=string_date[i]:year=string_date[i]}let tz2=(_options$timezone=options==null?void 0:options.timezone)!=null?_options$timezone:lib_default().current_timezone();return moment5.tz([year,month-1,day],tz2).toDate()}else return null}is_valid_text(val){return!!mk_date(val)}},TelMask=class extends InputMask{format_val(val){return val===""||val==null?"":this.format_text(val)}},masks={us_phone:new TelMask("US Phone",{mask:"(999) 999-9999",placeholder:"_",inputmode:"tel"}),us_ssn:new InputMask("US SSN",{alias:"ssn"}),percentage:new PercentageMask("Percentage","float",{alias:"decimal",suffix:"%",placeholder:"0",inputmode:"text"}),currency:new NumberMask("Currency","float",{alias:"currency",digits:2,inputmode:"decimal"}),date:new DateMask("Date",{separator:"/",order:["mm","dd","yyyy"]}),date_2:new DateMask("Euro date",{separator:".",order:["dd","mm","yyyy"]}),time:new InputMask("Time",{alias:"datetime",inputFormat:"HH:MM:ss",placeholder:"hh:mm:ss"}),date_time:new InputMask("Date/Time",{alias:"datetime",inputFormat:"mm/dd/yyyy HH:MM:ss",placeholder:"mm/dd/yyyy hh:mm:ss"}),date_time_no_seconds:new InputMask("Date/Time (no seconds)",{alias:"datetime",inputFormat:"mm/dd/yyyy hh:MM tt",placeholder:"mm/dd/yyyy hh:mm xm"}),numerical_ref:new InputMask("Text (numbers only)",{placeholder:"",mask:"9{1,}",inputmode:"numeric"}),credit_card_number:new InputMask("Credit card number",{placeholder:"",mask:"9999 9999 9999 [9][9][9][9]"}),credit_card_cvc:new InputMask("Credit card CVC",{placeholder:"",mask:"9{3,4}"}),credit_card_exp_month:new InputMask("Credit card exp month",{placeholder:"",mask:"9[9]"}),credit_card_exp_year:new InputMask("Credit card exp year",{placeholder:"",mask:"9999"}),bank_routing_number:new InputMask("Routing number",{placeholder:"",mask:"999999999"}),int_number:new NumberMask("Integer","integer",{alias:"numeric",digits:0,placeholder:"",autoGroup:!0,_radixDance:!1}),float_number:new NumberMask("Decimal","float",{alias:"numeric",placeholder:"",autoGroup:!0,_radixDance:!1,inputmode:"text"})};init_b_date();init_timezone_override_settings();init_b_location();var get_max_file_size_field_name={max_size:{default:50}},get_file_upload_condition_field_name={file_upload_condition:{}},type_content_format_mapping={text:["_all"],number:["int_number","float_number","currency","percentage"],geographic_address:["geographic_address"],date:["date","date_2"],file:["text"],image:["text"],number_range:[],dateinterval:[]};function register_input_states(data,states,instance4){let _in_get_content=!1;function get_content(){if(_in_get_content)return owner_error("Circular reference evaluating the input's initial content",{element_instance:instance4,prop_name:"content"}),null;if(!data.get_starting_content)return null;try{return _in_get_content=!0,data.get_starting_content(instance4)}finally{_in_get_content=!1}}function refresh_value(){instance4.state("has_been_changed")||instance4.state("value",get_content)}if(instance4.autorun(refresh_value),instance4.run_mode()){let do_change2=function(new_value){return compare(new_value,instance4.state("value",void 0,!0))?!1:(new_value===void 0&&(new_value=null),instance4.state("has_been_changed",!0),instance4.state("value",new_value),!0)},submit_message_handler2=function(new_value){var _instance$get_canvas;!do_change2(new_value)&&!unsubmitted||(unsubmitted=!1,(_instance$get_canvas=instance4.get_canvas())==null||_instance$get_canvas.blur(),instance4.state("is_focused",!1),run_auto_binding(instance4,new_value),run_element_workflow(instance4,"InputChanged"),lib_default().element.emit("user_changed_input",{instance:instance4,val:new_value}))};var do_change=do_change2,submit_message_handler=submit_message_handler2;states.includes("is_invalid")&&instance4.state("is_invalid",()=>!data.content_validated(instance4.state("value"),instance4)),instance4.state("value_that_is_valid",()=>{if(states.includes("is_invalid")&&instance4.state("is_invalid")){let not_valid={};return not_valid[NV_MARKER]=!0,not_valid}else return instance4.state("value")}),states.includes("display_invalid")&&instance4.state("display_invalid",()=>instance4.state("is_invalid")&&(instance4.state("has_been_changed")||instance4.state("force_display_validity"))),instance4.on_message("display_validity",()=>{instance4.state("force_display_validity",!0)});let unsubmitted=!1;instance4.on_message("user_change",new_value=>{do_change2(new_value)&&(unsubmitted=!0)}),instance4.on_message("user_submit",new_value=>{submit_message_handler2(new_value)}),instance4.on_message("reset_input",()=>{instance4.state("force_display_validity",!1),instance4.state("has_been_changed")&&(instance4.state("has_been_changed",!1),refresh_value())})}}var input_change_autorun=(instance4,fn)=>instance4.autorun(()=>{instance4.state("has_been_changed")||fn(instance4.state("value"))});function register_focus(instance4,target){target.focus(()=>instance4.state("is_focused",!0)),target.blur(()=>instance4.state("is_focused",!1))}function get_input_autobind_thing(instance4,type_only){var _instance$parent,_parent$element,_parent$element2,_instance$element$roo,_instance$element,_instance$element$roo2;let thing,type,parent=(_instance$parent=instance4.parent)==null?void 0:_instance$parent.call(instance4);return parent!=null&&parent.get_static_property("group_type")?(type=parent.get_static_property("group_type"),type_only||(thing=instance4.parent().state("group_data"))):(parent==null||(_parent$element=parent.element)==null?void 0:_parent$element.type())==="GroupItem"?(type=parent.parent().get_static_property("group_type"),type_only||(thing=parent.state("group_data"))):(parent==null||(_parent$element2=parent.element)==null?void 0:_parent$element2.type())==="TableCell"?(type=parent.parent().parent().get_static_property("group_type"),type_only||(thing=parent.parent().state("group_data"))):(_instance$element$roo=(_instance$element=instance4.element).root)!=null&&(_instance$element$roo2=_instance$element$roo.call(_instance$element))!=null&&_instance$element$roo2.get_static_property("page_item_type")&&(type=instance4.element.root().get_static_property("page_item_type"),type_only||(thing=lib_default().pageparam.get())),{type,thing}}function get_input_autobind_thing_field(instance4){var _thing$exists;let{type,thing}=get_input_autobind_thing(instance4);if(type==null||!(thing!=null&&(_thing$exists=thing.exists)!=null&&_thing$exists.call(thing)))return null;let bind_field=instance4.get_static_property("bind_field");return bind_field?get5(type).get_message(bind_field).evaluate(thing):null}function do_auto_binding(instance4,thing,type,bind_field,val,changes){var _changes;(_changes=changes)!=null||(changes={0:{key:bind_field,value:val}}),update_thing(thing,changes);let data_to_send={appname:appquery_default.appname(),app_version:appquery_default.app_version(),temp_db:lib_default().db_instance().cur_temp_db(),data:{type,items:[{id:thing._id(),changes:dehydrate_tree(changes)}]}},encoded=encode_data(data_to_send,lib_default().appname()),promise;appquery_default.get_public_setting("bubble_version")>=27?promise=lib_default().location.post("server://elasticsearch/modify",{...encoded,timezone_string:lib_default().current_timezone()}):promise=lib_default().location.post("server://elasticsearch/modify",encoded);let status=show_progress_line(promise);return lib_default().workflow.all_server_completed.add_promise(promise),promise.callback((err,res)=>{if(lib_default().db_instance().ensure_object_updates(res),instance4.state("currently_binding",!1),status(),err&&(lib_default().db_instance().flush(thing._id()),core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT,cb(err2){err2&&window.alert(human_friendly(err2))}})),instance4.supports_message("reset_input")&&instance4.message("reset_input"),!err&&instance4.get_static_property("show_alert_on_sucess"))return u_exports2.run_once(30,()=>{let alert_instance=instance4.find_instance_by_id(instance4.get_static_property("alert_element")),element_text=evaluate_property(instance4,"alert_message"),alert_text=evaluate_property(alert_instance,"text");return{alert_instance,element_text,alert_text}},(err2,data)=>{if(err2){log(err2);return}let{alert_instance,element_text,alert_text}=data;if(alert_instance!=null){let properties={fade_in:500,hold:500,fade_out:500};[null,void 0,""].includes(element_text)?properties.message=alert_text:properties.message=element_text,alert_instance.message("show_alert",properties)}})})}function run_auto_binding(instance4,value,is_plugin){if(!instance4.get_static_property("auto_binding"))return;let bind_field=instance4.get_static_property("bind_field"),sent_key=lib_default().workflow.all_sent_to_server.make(30,"run_aut_bonding");return u_exports2.run_once(30,()=>{let current_val,thing_type=get_input_autobind_thing(instance4),{thing}=thing_type;return thing!=null&&(current_val=thing.child(bind_field).get()),{current_val,is_invalid:is_plugin?void 0:instance4.state("is_invalid"),thing_type,val:typeof value=="function"?value():value}},(err,res)=>{if(sent_key.turn(),err){log(err);return}if(!is_plugin){if(res.is_invalid)return;instance4.state("currently_binding",!0)}let{type,thing}=res.thing_type;if(thing==null)return;let{val}=res,field_type=get5(type).custom_type().field(bind_field).btype();if(!get5(field_type).equals(res.current_val,val)&&!(!type||thing==null||!bind_field)){if(!is_plugin&&instance4.element.E.field_names.content_format){let content_format=instance4.get_static_property("content_format");if(type_content_format_mapping[field_type][0]!=="_all"&&!type_content_format_mapping[field_type].includes(content_format))return}return do_auto_binding(instance4,thing,type,bind_field,val)}})}var get_disabled_field_name={disabled:{default:!1}},get_auto_binding_field_names={auto_binding:{default:!1,no_states:!0},information:{no_states:!0},bind_field:{no_states:!0},show_alert_on_sucess:{no_states:!0},alert_element:{no_states:!0,optional:!0},alert_message:{no_states:!0,optional:!0}},additional_field_names_for_text_inputs=extend({mandatory:{},limit_number_of_characters:{no_states:!0,default:!1},character_limit:{no_states:!0}},get_disabled_field_name,get_auto_binding_field_names),switch_disabled_or_not=instance4=>on_property_change(instance4,"disabled",value=>instance4.get_canvas()[0].disabled=value),set_character_limit_on_input=instance4=>on_property_change(instance4,["limit_number_of_characters","character_limit","content_format"],_ref=>{let{limit_number_of_characters,character_limit,content_format}=_ref;return limit_number_of_characters&&character_limit&&[null,void 0,"text","numerical_ref"].includes(content_format)?instance4.get_canvas().attr("maxlength",character_limit):instance4.get_canvas().attr("maxlength","")});function assign_change_keyup_handlers(instance4,get_value){let canvas=instance4.get_canvas();on_phonegap()&&canvas.css("-webkit-user-select","text"),register_focus(instance4,instance4.canvas);let input_user_change_timeout=null,input_has_changed=!1,input_event_handler=()=>{input_has_changed=!0,input_user_change_timeout&&instance4.clearTimeout(input_user_change_timeout);let timeout;if(instance4.get_static_property("content_format")==="geographic_address")timeout=3e3;else{let val=canvas.val();[null,void 0,""].includes(val)||val.length===1?timeout=0:timeout=1500}return input_user_change_timeout=instance4.setTimeout(()=>{instance4.message("user_change",get_value()),input_user_change_timeout=null},timeout),!0};canvas.on("input",input_event_handler),canvas.on("paste",input_event_handler);let content_format=instance4.get_static_property("content_format"),using_input_mask=["int_number","float_number"].includes(content_format),old_input_value="";using_input_mask&&canvas.on("keyup",e=>{let key_is_backspace=e.key==="Backspace",input_canvas=canvas.get(0),old_value_is_negative_number=old_input_value[0]==="-";old_input_value=canvas.val();let caret_is_right_after_the_minus_sign=input_canvas.selectionStart===0&&input_canvas.selectionEnd===0;if(key_is_backspace&&caret_is_right_after_the_minus_sign&&old_value_is_negative_number)return input_event_handler()}),canvas.on("keydown",e=>{let is_multiline_input=canvas.hasClass("MultiLineInput");e.keyCode!==13||is_multiline_input||canvas.blur()}),canvas.blur(()=>{input_has_changed&&(input_has_changed=!1,change_handler()),change_debouncer.flush(),input_user_change_timeout!=null&&(instance4.message("user_change",get_value()),instance4.clearTimeout(input_user_change_timeout),input_user_change_timeout=null)});function change_handler(){instance4.message("user_submit",get_value())}let change_debouncer=debounce_default(change_handler,50);return canvas.change(()=>{running_test()?change_handler():change_debouncer()})}var default_for_inputs={font_size:14,font_color:"#3D3D3D",background_style:"bgcolor",border_style:"solid",border_width:1,border_color:"#BDBDBD",border_roundness:3,border_style_top:"solid",border_width_top:1,border_color_top:"#BDBDBD",border_roundness_top:3,border_style_left:"solid",border_width_left:1,border_color_left:"#BDBDBD",border_roundness_left:3,border_style_bottom:"solid",border_width_bottom:1,border_color_bottom:"#BDBDBD",border_roundness_bottom:3,border_style_right:"solid",border_width_right:1,border_color_right:"#BDBDBD",border_roundness_right:3,padding_horizontal:4,padding_vertical:0},input_content_options={text:"Text",email:"Email",password:"Password",int_number:"Integer",float_number:"Decimal",geographic_address:"Address"};for(let name of["us_phone","percentage","currency","date","date_2","numerical_ref"]){if(!(name in masks))throw new UnexpectedError(`${name} should be a valid mask`);input_content_options[name]=(_input_mask$masks$nam=masks[name].caption)!=null?_input_mask$masks$nam:toTitleCase(name)}var _input_mask$masks$nam;function format_to_type(content_format){if(is_on_mobile_or_tablet()){if(["int_number","us_phone","numerical_ref"].includes(content_format))return"tel";if(content_format==="float_number")return"number"}switch(content_format){case"password":return"password";case"email":return"email";default:return"input"}}function get_timezone(instance4){return has_input_timezone_controls_on()?get_custom_tz({static_eval:prop_name=>instance4.get_static_property(prop_name),dynamic_eval:prop_name=>evaluate_property(instance4,prop_name),not_overridden:!0}):lib_default().current_timezone()}function is_datelike_format(content_format){return content_format==="date"||content_format==="date_2"}function format_input_content(instance4,existing_val){let returned_val,format8=instance4.get_static_property("content_format");switch(format8){case"int_number":{let numeric_val=parseFloat(existing_val);returned_val=Number.isNaN(numeric_val)?null:Math.round(numeric_val);break}case"float_number":case"percentage":case"currency":returned_val=existing_val;break;case"geographic_address":returned_val=()=>from_address(existing_val);break;case"date":case"date_2":{let tz_name=get_timezone(instance4);returned_val=mk_date(existing_val,tz_name)}break;default:if(returned_val=existing_val,[null,void 0,"text","numerical_ref"].includes(format8)&&instance4.get_static_property("limit_number_of_characters")){let character_limit=instance4.get_static_property("character_limit");character_limit!=null&&returned_val!=null&&returned_val.length>character_limit&&(returned_val=returned_val.slice(0,character_limit))}}return typeof returned_val=="number"&&isNaN(returned_val)?null:returned_val}function is_pw_valid(pwd){if(typeof pwd!="string"||pwd.length===0||pwd.length>1e4)return!1;if(!appquery_default.get_public_setting("have_pw_policy"))return!0;let minimum_length=appquery_default.get_public_setting("pw_length");typeof minimum_length!="number"&&(minimum_length=null);let require_capital_letter=appquery_default.get_public_setting("pw_require_capital_letter"),require_number=appquery_default.get_public_setting("pw_require_number"),require_special_char=appquery_default.get_public_setting("pw_require_special_char");return!(minimum_length&&pwd.length<minimum_length||require_capital_letter&&!pwd.match(/[A-Z]/)||require_number&&!pwd.match(/\d/)||require_special_char&&!pwd.match(/[^a-zA-Z\d\s:]/))}function assign_enter_handler_in_input(instance4,needs_meta_key_pressed){var _instance$element$get,_instance$element$get2,_instance$element2;let canvas=instance4.get_canvas(),button_with_submission_click_wf=null,possibly_related_workflows=(_instance$element$get=(_instance$element$get2=(_instance$element2=instance4.element).get_visible_workflows)==null?void 0:_instance$element$get2.call(_instance$element2))!=null?_instance$element$get:[],input_el_id=instance4.element_id();for(let wf of possibly_related_workflows){var _wf$element_id;if(wf.find_expressions(`GetElement.element_id=${input_el_id}`).length<1)continue;let button=instance4.find_instance_by_id((_wf$element_id=wf.element_id)==null?void 0:_wf$element_id.call(wf));if(button!=null&&button.is_visible()){var _button_with_submissi;if((_button_with_submissi=button_with_submission_click_wf)!=null||(button_with_submission_click_wf=button),button!==button_with_submission_click_wf){button_with_submission_click_wf=null;break}}}if(canvas.off("keydown.click_the_button"),!!button_with_submission_click_wf)return canvas.on("keydown.click_the_button",event=>{if(event.shiftKey)return;let cmd_or_ctrl=meta(event);if(needs_meta_key_pressed&&!cmd_or_ctrl)return;let enter_key_code=13;if(event.keyCode===enter_key_code){let button_canvas=button_with_submission_click_wf.get_canvas();if(button_canvas.is(":visible"))return trigger_blur(canvas),button_canvas.click()}})}var reset_input_div=div2=>property_applications_default.apply_css_style(div2,{border:"none","background-color":"transparent"});init_element_eval();var MultiLineInput_default={property_applications:[new property_applications_default.MinWidth],initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();reset_input_div(canvas),canvas.attr("data-gramm_editor","false"),register_tab_index_listener(instance4,tabindex=>{canvas.attr("tabindex",tabindex)}),instance4.autorun(()=>{canvas.attr("placeholder",evaluate_property(instance4,"placeholder")),window.optional_modules.autosize.update(canvas)}),instance4.run_mode()||(canvas.attr("readonly","true"),canvas[0].style.resize="none"),set_character_limit_on_input(instance4),instance4.autorun(()=>{assign_enter_handler_in_input(instance4,!0)});let override_disable=u_exports2.Box(0);input_change_autorun(instance4,val=>{instance4.state("is_focused")||(canvas.val(val!=null?val:""),instance4.run_mode()&&instance4.get_static_property("stretch_to_fit")&&instance4.is_visible()&&(canvas[0].disabled?(override_disable(override_disable.dangerously_peek()+1),instance4.setTimeout(()=>{window.optional_modules.autosize.update(canvas),override_disable(override_disable.dangerously_peek()-1)},5)):window.optional_modules.autosize.update(canvas)))}),instance4.run_mode()&&(instance4.on_message("set_focus",()=>canvas.focus()),assign_change_keyup_handlers(instance4,()=>instance4.get_canvas().val()),instance4.autorun(()=>{override_disable()>0?canvas[0].disabled=!1:canvas[0].disabled=evaluate_property(instance4,"disabled")}),instance4.get_static_property("stretch_to_fit")&&(canvas[0].style["min-height"]=instance4.element.get_height()+"px",lib_default().bubble_version()>=8&&canvas.attr("rows",1),window.optional_modules.autosize(canvas),canvas.on("autosize:resized",()=>{let height2=parseInt(canvas.css("height").replace("px",""));instance4.set_height(height2)}),instance4.wait_for_visible(()=>window.optional_modules.autosize.update(canvas)),instance4.on_destroy(()=>window.optional_modules.autosize.destroy(canvas))))})}};init_define_process_env();init_shim();init_u2();init_property_applications();init_runmode();init_element_utils();init_element_eval();var Checkbox_default={property_applications:[new property_applications_default.MinWidth],can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();canvas[0].style.overflow="visible";let inner_id=LUID(),ip=$('<input type="checkbox" id="'+inner_id+'" style="background-color: white;"></input>'),label_div=$('<label for="'+inner_id+'"></label>');canvas.append(ip),canvas.append(label_div),register_tab_index_listener(instance4,tabindex=>{ip.attr("tabindex",tabindex)}),register_focus(instance4,ip),instance4.on_message("set_focus",()=>ip.focus()),instance4.run_mode()&&(canvas.addClass(CLICKABLE_ELEMENT),ip.change(()=>{var _ip$0$checked;return instance4.message("user_submit",(_ip$0$checked=ip[0].checked)!=null?_ip$0$checked:!1),!0}),on_property_change(instance4,"disabled",value=>{ip[0].disabled=value})),on_property_change(instance4,"label",label=>{label_div.text(label)}),(instance4.run_mode()||instance4.responsive_mode())&&instance4.autorun(()=>{var _instance$element$roo;(_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()&&(evaluate_property(instance4,"width"),instance4.set_height(Math.max(instance4.element.get_height(),label_div.height())))}),input_change_autorun(instance4,val=>{typeof val=="string"&&["false","no","null","none","undefined"].includes(val.toLowerCase())&&(val=!1),val?ip[0].checked=!0:ip[0].checked=!1})})}};init_define_process_env();init_shim();init_property_applications();var Dropdown_default={property_applications:[new property_applications_default.MinWidth]};init_define_process_env();init_shim();init_property_applications();var AutocompleteDropdown_default={property_applications:[new property_applications_default.MinWidth]};init_define_process_env();init_shim();var import_web_dom_collections_iterator185=__toESM(require_web_dom_collections_iterator()),import_web_immediate8=__toESM(require_web_immediate()),import_es_string_replace44=__toESM(require_es_string_replace());init_u2();init_property_applications();init_runmode();init_hydrate();init_logger();init_element_utils();var dropdowns_exports={};__export(dropdowns_exports,{_get_display_option:()=>_get_display_option,_get_raw_btype_dropdown:()=>_get_raw_btype_dropdown,_get_raw_choice_list_dropdown:()=>_get_raw_choice_list_dropdown,rehydrate_dropdown_value:()=>rehydrate_dropdown_value});init_define_process_env();init_shim();var import_web_dom_collections_iterator184=__toESM(require_web_dom_collections_iterator()),import_es_string_replace43=__toESM(require_es_string_replace());init_u2();init_hydrate();init_lib();init_element_eval();function _get_raw_btype_dropdown(element){if(element.get_static_property("choices_style")==="static"){if(!lib_default().is_edit_mode()){let saved_value2=element.get_static_property("computed_value");if(saved_value2!=null)return saved_value2}return value_is_text_or_number(element.get_static_property("choices",!0))}else if(element.get_static_property("dynamic_type"))return element.get_static_property("dynamic_type");return"text"}function value_is_text_or_number(choices){typeof choices!="string"&&(choices="");for(let c of choices.split(`
`).map(c2=>c2.trim()))if(c.length>0&&(["0","00","000","0000"].includes(c)||(c.indexOf("0.")!==0&&c.indexOf("00.")!==0&&c.indexOf("000.")!==0&&(c=c.replace(/^0+/g,"")),c=c.replace(/(\.[0-9]*?)0+$/,"$1"),c=c.replace(/\.$/,"")),![c,"0"].includes(String(lib_default().locale().parse_float(c)))))return"text";return"number"}function _get_raw_choice_list_dropdown(instance4,element_def){let btype_id=element_def._get_raw_btype(instance4.element);if(evaluate_property(instance4,"choices_style")==="static"){let list4,choices=evaluate_property(instance4,"choices");return typeof choices!="string"?list4=[]:(list4=choices.split(`
`).map(c=>c.trim()).filter(c=>c),btype_id==="number"&&(list4=list4.map(c=>lib_default().locale().parse_float(c)))),lib_default().db_instance().static_list(btype_id,list4)}else{let res=evaluate_property(instance4,"data_source");if(typeof(res==null?void 0:res.get_children)=="function"){if(!res.contains)throw new UnexpectedError("Get children but no contains: "+res.constructor.name+" "+res.constructor);return res}else return lib_default().db_instance().static_list(btype_id,[])}}function _get_display_option(instance4){return evaluate_property(instance4,"choices_style")==="static"?v=>v:v=>{let context=instance4.get_injected_context(v,this.get_injected_btype(instance4.element));return eval_property_with_states(instance4.element,"option_display_expression",context)}}function rehydrate_dropdown_value(val){if(val==="")return null;var _hydrate$rehydrate_tr;return(_hydrate$rehydrate_tr=rehydrate_tree(lib_default().db_instance(),val))!=null?_hydrate$rehydrate_tr:null}init_define_process_env();init_shim();var bootstrap_colors=["black","primary","danger","info","warning","success"];init_element_eval();var MAX_RADIO_OPTIONS=50,RadioButtons_default={property_applications:[new property_applications_default.MinWidth],can_defer_drawing(){return!0},register(instance4){let bad_value_watcher=u_exports2.Watcher(()=>{if(!instance4.state("has_been_changed"))return!1;let val=instance4.state("value");return val==null?!1:!this._choice_list_contains(instance4,val)});instance4.on_destroy(()=>bad_value_watcher.destroy()),bad_value_watcher.on_value(is_bad=>{is_bad&&instance4.message("reset_input")})},initialize(instance4){instance4.wait_for_visible_lite(()=>{let inner_id=LUID(),canvas=instance4.get_canvas(),wrapper=div("radio-v0",canvas);instance4.run_mode()&&canvas.addClass(CLICKABLE_ELEMENT),instance4.on_message("set_focus",()=>canvas.find("input:first").focus()),register_tab_index_listener(instance4,tabindex=>{canvas.find("input:first").attr("tabindex",tabindex)}),instance4.edit_mode()&&(wrapper[0].style.height="100%"),on_property_change(instance4,"color",value=>{for(let class_name of bootstrap_colors)wrapper.removeClass("radio-"+class_name);wrapper.addClass("radio-"+value)});let options_div_mapping={};function create_option(c,i){let dehydrated_value=dehydrate_tree_to_string_safe(c.value),choice=$('<input type="radio" value="'+dehydrated_value+'" name="'+inner_id+'" id="'+inner_id+"_option_"+i+'"><label for="'+inner_id+"_option_"+i+'">'+c.display+"</label>");return choice.data("bubble_val",dehydrated_value),options_div_mapping[dehydrated_value]=choice,choice}let get_choice_list=()=>{let raw_choices;if(instance4.edit_mode()&&evaluate_property(instance4,"choices_style")==="dynamic")return raw_choices=["Dynamic choice 1","Dynamic choice 2","Dynamic choice 3","Dynamic choice 4"],instance4.get_canvas().data("Dynamic choice 1"),raw_choices.map(a=>({display:a,value:a}));raw_choices=this._get_raw_choice_list(instance4);let get_display=this._get_display_option(instance4),raw_choice_list=raw_choices.get_children(0,MAX_RADIO_OPTIONS);u_exports2.run_once(30,()=>raw_choice_list.map(raw_choice=>get_display(raw_choice)));let choice_list=[];for(let raw_choice of raw_choice_list)choice_list.push({display:get_display(raw_choice),value:raw_choice});return choice_list},current_displayed_value=null;function select_value(val){var _options_div_mapping3,_options_div_mapping4;if(current_displayed_value=val,options_div_mapping=canvas.data("options_div_mapping"),!val)if(instance4.edit_mode()){var _options_div_mapping;let div2=Object.values((_options_div_mapping=options_div_mapping)!=null?_options_div_mapping:{})[0];if(div2!=null){div2[0].checked=!0;return}}else for(let div2 of Object.values((_options_div_mapping2=options_div_mapping)!=null?_options_div_mapping2:{})){var _options_div_mapping2;div2[0].checked=!1}let dehydrated_value=dehydrate_tree_to_string_safe(val),selected_div=(_options_div_mapping3=options_div_mapping)==null||(_options_div_mapping4=_options_div_mapping3[dehydrated_value])==null?void 0:_options_div_mapping4[0];selected_div!=null&&(selected_div.checked=!0)}let update_choice_list=()=>{let div2;wrapper.empty(),options_div_mapping={};let original_columns=instance4.get_static_property("columns"),element_width=evaluate_property(instance4,"width"),actual_columns=Math.max(Math.floor(original_columns/instance4.element.get_width()*element_width),1),width_buffer=10,anti_overlap_margin=20,width2=(element_width-property_applications_default.calculate_border_width(instance4))/actual_columns-width_buffer;width2-=anti_overlap_margin;let iterable=get_choice_list();for(let i=0;i<iterable.length;i++){let c=iterable[i];div2=create_option(c,i),wrapper.append(div2);let label=$(div2[1]);label[0].style.width=width2+"px",label[0].style["margin-right"]=anti_overlap_margin+"px",i<actual_columns?label[0].style["margin-top"]="3px":label[0].style["margin-top"]="12px"}canvas.data("options_div_mapping",options_div_mapping),wrapper.find("input[type=radio]").on("change",function(){let val=rehydrate_dropdown_value($(this).data("bubble_val"));instance4.message("user_submit",val),select_value(val)}),select_value(current_displayed_value);let value=evaluate_property(instance4,"disabled");for(let div3 of Object.values((_options_div_mapping5=options_div_mapping)!=null?_options_div_mapping5:{})){var _options_div_mapping5;div3[0].disabled=value}if(!instance4.edit_mode()&&!instance4.thumbnail_mode()){let border_margin_dif=canvas.outerHeight()-canvas.height(),min_height2=instance4.element.get_height();setImmediate(()=>{let wrapper_drawn=u_exports2.MakeKey(null,"wrapper_drawn");u_exports2.run_once(30,()=>{let inner_height2=parseInt(wrapper.css("height").replace("px",""));if(inner_height2>0)return inner_height2},(err,inner_height2)=>{if(err){log(err);return}if(inner_height2>0)return wrapper_drawn.turn(),instance4.set_height(Math.max(min_height2,inner_height2+border_margin_dif))})})}};input_change_autorun(instance4,val=>select_value(val)),u_exports2.autorun(()=>{let value=evaluate_property(instance4,"disabled");for(let div2 of Object.values((_options_div_mapping6=options_div_mapping)!=null?_options_div_mapping6:{})){var _options_div_mapping6;div2[0].disabled=value}}),instance4.autorun(()=>{instance4.is_visible()&&update_choice_list()})})}};init_define_process_env();init_shim();var import_web_dom_collections_iterator186=__toESM(require_web_dom_collections_iterator()),import_web_immediate9=__toESM(require_web_immediate());init_u2();init_property_applications();init_element_utils();init_runmode();init_element_eval();var SliderInput_default={property_applications:[new property_applications_default.MinWidth],initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas(),slider_init=u_exports2.MakeKey(null,"slider_init"),slider=div("jquery-slider",canvas);slider.slider(),canvas.css("padding",8);let is_slider_initialized=()=>slider.slider("instance");instance4.on_destroy(()=>{is_slider_initialized()&&slider.slider("destroy")}),instance4.run_mode()||slider.off(),instance4.run_mode()&&(canvas.addClass(CLICKABLE_ELEMENT),instance4.wait_for_visible(()=>{u_exports2.WaitFor(slider_init,()=>{on_property_change(instance4,"disabled",value=>{slider.slider("option","disabled",value)}),instance4.on_message("set_focus",()=>canvas.find(".ui-slider-handle").focus())})})),pre_cache(instance4,["min_value","max_value","step","range_type","orientation","height","width","handle_color","range_area_color","border_color","background_color"]),instance4.autorun(()=>{var _props$min_value,_props$max_value;let slider_value_property;instance4.get_styleable_static_property("range_type")==="range"?slider_value_property="values":slider_value_property="value";let props={};for(let prop of["min_value","max_value","step","range_type","orientation","height","width","handle_color","range_area_color","border_color","background_color"])props[prop]=evaluate_property(instance4,prop);let options={min:(_props$min_value=props.min_value)!=null?_props$min_value:0,max:(_props$max_value=props.max_value)!=null?_props$max_value:9,step:props.step,range:props.range_type==="range",orientation:props.orientation,slide:(event,ui)=>(setImmediate(()=>{instance4.message("user_change",slider.slider(slider_value_property))}),!0),stop:(event,ui)=>(setImmediate(()=>{instance4.message("user_submit",slider.slider(slider_value_property))}),!0)};if(!instance4.thumbnail_mode()||is_slider_initialized())for(let k in options){let v=options[k];slider.slider("option",k,v)}let slider_css_options={"margin-left":3,"margin-right":3,cursor:evaluate_property(instance4,"disabled")?"default":"pointer",background:props.background_color,"border-color":props.border_color},handle_css_options={cursor:evaluate_property(instance4,"disabled")?"default":"pointer",outline:"none","border-color":props.border_color};props.orientation==="horizontal"?(slider_css_options.height=props.height-16,slider_css_options.width=props.width-23,handle_css_options.top=-8,handle_css_options.height=props.height-1,handle_css_options.width=19,slider.find(".ui-slider-range").css({height:"100%"})):(slider_css_options.width=props.width-22,slider_css_options.height=props.height-20,handle_css_options.width=props.width-11,handle_css_options.height=19,slider.find(".ui-slider-range").css({width:"100%"})),handle_css_options.background=props.handle_color,props.range_type==="range"&&slider.find(".ui-slider-range").css({background:props.range_area_color}),slider.css(slider_css_options),slider.find(".ui-slider-handle").css(handle_css_options),slider_init.turn(),register_tab_index_listener(instance4,tabindex=>{canvas.find(".ui-slider-handle").attr("tabindex",tabindex)}),!(instance4.thumbnail_mode()&&!is_slider_initialized())&&input_change_autorun(instance4,val=>{slider_value_property==="values"&&val==null&&(val=[]),slider.slider(slider_value_property,val)})})})}};init_define_process_env();init_shim();var import_web_dom_collections_iterator187=__toESM(require_web_dom_collections_iterator());init_u2();init_btypes();init_property_applications();init_appquery();init_lib();init_runmode();init_webfonts();init_logger();init_element_utils();init_b_date();init_element_eval();init_element_props();init_elements();var moment6=require_moment2();function _get_array_from_date(instance4,val){if(!val)return;let date=get5("date").cast(val);if(!date)return;let tz2=get_timezone(instance4),m=moment6(date).tz(tz2);return[m.year(),m.month(),m.date()]}function get_dateFormat_fmt_string(instance4,val){let res="";switch(val){case"number1":res+="d/mm/yyyy";break;case"number2":res+="m/dd/yyyy";break;case"alpha":res+="d mmmm, yyyy";break;case"alphalong":res+="dddd, d mmmm, yyyy";break;case"alphashort":res+="d-mmm-yyyy";break;case"us_short":res+="mmmm d, yyyy";break;case"us_long":res+="dddd, mmmm d, yyyy";break;case"custom":res+=instance4.get_static_property("custom_format");break}return res}var DateInput_default={property_applications:[new property_applications_default.MinWidth],initialize(instance4){instance4.wait_for_visible_lite(()=>{let date_picker,time_input,time_picker,canvas=instance4.get_canvas(),date_input=time_input=date_picker=time_picker=null,input_div_drawn=u_exports2.MakeKey(null,"dateinput_drawn");if(instance4.on_message("add_tab_index",num=>u_exports2.WaitFor(input_div_drawn,()=>{})),canvas.addClass("date_picker_element"),canvas[0].style.overflow="visible",on_property_change(instance4,"input_type",input_type=>{canvas.empty(),date_input=$('<input type="text" class="date_div"></input>'),reset_input_div(date_input),canvas.append(date_input),register_tab_index_listener(instance4,tabindex=>{date_input.attr("tabindex",tabindex)}),input_type==="date_time"&&(time_input=$('<input type="text" class="time_div"></input>'),reset_input_div(time_input),canvas.append(time_input))}),on_property_change(instance4,"disabled",value=>{property_applications_default.apply_css_style(date_input,{cursor:value?"default":"pointer"}),property_applications_default.apply_css_style(time_input,{cursor:value?"default":"pointer"})}),pre_cache(instance4,["input_type","width","height","padding_horizontal","date_format","time_format","placeholder","overwrite_placeholder"]),instance4.autorun(()=>{var _time_input;let available_width,placeholder,time_placeholder,changes={};for(let prop of["input_type","width","height","padding_horizontal","date_format","time_format","placeholder","overwrite_placeholder","padding_top","padding_bottom","padding_left","padding_right"])changes[prop]=evaluate_property(instance4,prop);let border_height=property_applications_default.calculate_border_height(instance4),border_width=property_applications_default.calculate_border_width(instance4),horizontal_padding=instance4.element.element_version(!0)<PADDING_VERSION?2*changes.padding_horizontal:changes.padding_left+changes.padding_right,vertical_padding=instance4.element.element_version(!0)<PADDING_VERSION?0:changes.padding_top+changes.padding_bottom,bv_check=appquery_default.get_public_setting("bubble_version")<18,date_input_height=bv_check?`calc(100% - ${border_height}px)`:`calc(100% - ${vertical_padding+border_height}px)`;if(property_applications_default.apply_css_style(date_input,{height:date_input_height,"box-sizing":"content-box"}),changes.input_type==="date_time"){let time_input_width=bv_check?70:72,gap_spacing=bv_check?5:8;property_applications_default.apply_css_style(date_input,{width:`calc(100% - ${2*horizontal_padding+2*border_width}px - ${time_input_width+gap_spacing}px)`,float:"left"}),property_applications_default.apply_css_style(time_input,{width:`${time_input_width}px`,float:"right",height:`calc(100% - ${vertical_padding+border_height}px)`,"box-sizing":"content-box"})}else available_width=changes.width-horizontal_padding-border_width,date_input[0].style.width=available_width+"px";if(changes.input_type==="date"&&changes.overwrite_placeholder)placeholder=changes.placeholder;else{let placeholder_date;if(appquery_default.app().id()==="test_app"){var _inputs$get_timezone;let tz2=(_inputs$get_timezone=get_timezone(instance4))!=null?_inputs$get_timezone:lib_default().current_timezone();placeholder_date=moment6.tz("1/15/2013",tz2).toDate()}else placeholder_date=new Date;let fmt_str=get_dateFormat_fmt_string(instance4,changes.date_format);placeholder=format_date(placeholder_date,fmt_str,lib_default().get_text("BUILT_IN","DATE_FORMAT"),get_timezone(instance4))}switch(date_input.attr("placeholder",placeholder),changes.time_format){case"full":time_placeholder="12:00";break;case"ampm":time_placeholder="12:00 AM";break}return(_time_input=time_input)==null?void 0:_time_input.attr("placeholder",time_placeholder)}),instance4.run_mode()){let get_datepicker_val2=function(){var _date_picker;if((_date_picker=date_picker)!=null&&_date_picker.get()){let date_only=date_picker.get("select"),full_date={year:date_only.year,month:date_only.month,day:date_only.date};if(instance4.get_static_property("input_type")==="date_time"){let time_only=time_picker.get("select");if(time_only){var _time_only$hour,_time_only$mins;full_date.hour=(_time_only$hour=time_only==null?void 0:time_only.hour)!=null?_time_only$hour:"",full_date.minute=(_time_only$mins=time_only==null?void 0:time_only.mins)!=null?_time_only$mins:""}else return}return moment6.tz(full_date,get_timezone(instance4)).toDate()}else return null},onclose_handler2=function(){return this.$holder.blur(),u_exports2.run_once(30,get_datepicker_val2,(_,val)=>{instance4.state("is_focused",!1),val!==void 0&&instance4.message("user_submit",val)}),!0},position_function2=function(_ref){let{$holder,$root}=_ref;$holder.css("transition","0.05s ease-in-out"),$holder.position({my:"left top",at:"left bottom",of:instance4.get_canvas(),collision:"fit flip"}),lib_default().bubble_version()<19&&$root.addClass("datepicker-legacy-font")},onrender_handler2=function(){position_function2(this)},onopen_handler2=function(){queueMicrotask(()=>{position_function2(this),instance4.setTimeout(()=>position_function2(this),100)}),$(window).on("resize",()=>position_function2(this));let parent=instance4.get_canvas();u_exports2.run_once(30,()=>({width:parent.width(),"font-family":get_face_and_variant(get_font_face(instance4)).font_family}),(err,location_info)=>{var _time_picker;if(err){log(err);return}date_picker.$root.css(location_info),(_time_picker=time_picker)==null||_time_picker.$root.css(location_info)})},_get_array_from_hour2=function(raw){if(!raw)return!1;let hour=Math.floor(raw),minute=Math.round((raw-hour)*60);return[hour,minute]};var get_datepicker_val=get_datepicker_val2,onclose_handler=onclose_handler2,position_function=position_function2,onrender_handler=onrender_handler2,onopen_handler=onopen_handler2,_get_array_from_hour=_get_array_from_hour2;canvas.addClass(CLICKABLE_ELEMENT);let should_show_month_year=instance4.get_static_property("show_month_year_picker");date_input.pickadate({container:"html",firstDay:instance4.get_static_property("start_monday"),selectMonths:should_show_month_year,selectYears:should_show_month_year&&200,format:get_dateFormat_fmt_string(instance4,instance4.get_static_property("date_format")),onOpen:onopen_handler2,onClose:onclose_handler2}),date_picker=date_input.pickadate("picker"),instance4.wait_for_visible(()=>{onopen_handler2.apply(date_picker),instance4.setTimeout(()=>onopen_handler2.apply(date_picker),100)}),u_exports2.autorun(()=>date_picker.$root.css({"margin-top":evaluate_property(instance4,"height"),"max-width":evaluate_property(instance4,"width")}));let is_time_picker=!1,time_option={};if(instance4.get_static_property("input_type")==="date_time"){switch(is_time_picker=!0,time_option.container="html",time_option.interval=instance4.get_static_property("time_interval"),instance4.get_static_property("time_format")){case"full":time_option.format="H:i";break;case"ampm":time_option.format="h:i A";break}time_option.onClose=onclose_handler2,time_option.onOpen=onopen_handler2,time_option.onRender=onrender_handler2,time_input.pickatime(time_option),time_picker=time_input.pickatime("picker"),u_exports2.autorun(()=>time_picker.$root.css({"margin-top":evaluate_property(instance4,"height"),"max-width":evaluate_property(instance4,"width")}))}instance4.autorun(()=>{var _get_array_from_date22,_get_array_from_date3;let min_date=evaluate_property(instance4,"min_date"),max_date=evaluate_property(instance4,"max_date");if(date_picker.set({min:(_get_array_from_date22=_get_array_from_date(instance4,min_date))!=null?_get_array_from_date22:-1/0,max:(_get_array_from_date3=_get_array_from_date(instance4,max_date))!=null?_get_array_from_date3:1/0}),is_time_picker){let min_hour=evaluate_property(instance4,"min_hour"),max_hour=evaluate_property(instance4,"max_hour");time_picker.set({min:_get_array_from_hour2(min_hour),max:_get_array_from_hour2(max_hour)})}let prev_tz=lib_default().current_timezone();instance4.autorun(()=>{let current_tz=get_timezone(instance4);if(instance4.state("has_been_changed")&&current_tz===prev_tz)return;prev_tz=current_tz;let val=instance4.state("value");if(!u_exports2.autorun_top(()=>instance4.state("is_focused")))if(val){if(date_picker.set("select",_get_array_from_date(instance4,val)),is_time_picker){let tz2=get_timezone(instance4),m=moment6(val).tz(tz2);time_picker.set("select",[m.hours(),m.minutes()])}}else date_picker.clear(),is_time_picker&&time_picker.clear()})}),instance4.autorun(()=>{let min_date=evaluate_property(instance4,"min_date"),max_date=evaluate_property(instance4,"max_date"),val=instance4.state("value",void 0,!0);if(typeof val!="function"&&date_picker.get("select")&&val!=null){if(min_date!=null&&val<min_date)date_picker.set("select",_get_array_from_date(instance4,min_date)),instance4.state("value",min_date);else if(max_date!=null&&val>max_date){let date_to_set=max_date>=min_date?max_date:min_date!=null?min_date:val;date_picker.set("select",_get_array_from_date(instance4,date_to_set)),instance4.state("value",date_to_set)}}}),on_property_change(instance4,"disabled",value=>{date_input[0].disabled=value,time_input!=null&&(time_input[0].disabled=value)})}if(register_focus(instance4,canvas.find("input")),instance4.on_message("set_focus",()=>{date_input[0].disabled||date_picker.open()}),!instance4.run_mode()){var _time_input2;date_input.attr("readonly","true"),(_time_input2=time_input)==null||_time_input2.attr("readonly","true")}})}};init_define_process_env();init_shim();init_property_applications();init_image_utils();var PictureInput_default={property_applications:[new property_applications_default.MinWidth],additional_data:{notify_width(instance4,width2){return keep_proportions(instance4,width2)}}};init_define_process_env();init_shim();init_property_applications();var FileInput_default={property_applications:[new property_applications_default.MinWidth]};var element_modifications_exports={};__export(element_modifications_exports,{get_element_modifications:()=>get_element_modifications,set_legacy_element_modifications:()=>set_legacy_element_modifications});init_define_process_env();init_shim();init_property_applications();var element_modifications={},get_element_modifications=name=>element_modifications[name];function set_legacy_element_modifications(name,modifications){var _modifications;(_modifications=modifications)!=null||(modifications={property_applications:[new property_applications_default.MinWidth]}),element_modifications[name]=modifications}set_legacy_element_modifications("Page",Page_default);set_legacy_element_modifications("Text",Text_default);set_legacy_element_modifications("Button",Button_default);set_legacy_element_modifications("Icon",Icon_default);set_legacy_element_modifications("Link",Link_default);set_legacy_element_modifications("Image",Image_default);set_legacy_element_modifications("Shape",Shape_default);set_legacy_element_modifications("Alert",Alert_default);set_legacy_element_modifications("Video",VideoComponent_default);set_legacy_element_modifications("HTML",HTML_default);set_legacy_element_modifications("GoogleMap",GoogleMaps_default);set_legacy_element_modifications("Group",Group_default);set_legacy_element_modifications("RepeatingGroup",RepeatingGroup_default);set_legacy_element_modifications("Popup",Popup_default);set_legacy_element_modifications("FloatingGroup",FloatingGroup_default);set_legacy_element_modifications("GroupFocus",GroupFocus_default);set_legacy_element_modifications("GroupWithFocus",GroupWithFocus_default);set_legacy_element_modifications("Input",Input_default);set_legacy_element_modifications("MultiLineInput",MultiLineInput_default);set_legacy_element_modifications("Checkbox",Checkbox_default);set_legacy_element_modifications("Dropdown",Dropdown_default);set_legacy_element_modifications("AutocompleteDropdown",AutocompleteDropdown_default);set_legacy_element_modifications("RadioButtons",RadioButtons_default);set_legacy_element_modifications("SliderInput",SliderInput_default);set_legacy_element_modifications("DateInput",DateInput_default);set_legacy_element_modifications("PictureInput",PictureInput_default);set_legacy_element_modifications("FileInput",FileInput_default);init_define_process_env();init_shim();var import_web_dom_collections_iterator198=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();var element_transformer_exports={};__export(element_transformer_exports,{make_element:()=>make_element,register_hook_transformer:()=>register_hook_transformer,run_transformers:()=>run_transformers,transform_element:()=>transform_element});init_define_process_env();init_shim();var import_web_dom_collections_iterator190=__toESM(require_web_dom_collections_iterator());init_u2();init_define_process_env();init_shim();init_define_process_env();init_shim();var core_actions_consts={csv_separators:{comma:",",semicolon:";",tab:"tab",pipe:"|"},ALL_ELEMENTS:void 0,action_element_mapping:void 0,plugin_specific_core_element_actions:void 0,root_actions:void 0,custom_actions:void 0,_2fa_actions:void 0,basic_actions:void 0},core_actions_consts_default=core_actions_consts;init_property_applications();init_runmode();init_analytics();init_lib();init_appquery();init_css();init_element_meta_actions();init_define_process_env();init_shim();init_appquery();init_analytics();init_lib();var visibility_field_names={is_visible:{default:!0}};init_define_process_env();init_shim();var import_web_dom_collections_iterator188=__toESM(require_web_dom_collections_iterator()),currently_hovered=new Set,move_event=e=>{for(let instance4 of currently_hovered)instance4.canvas!=="destroyed"&&!instance4.canvas[0].matches(":hover")&&instance4.element.type()!=="TableMainAxis"&&(instance4.state("is_hovered",!1),currently_hovered.delete(instance4));currently_hovered.size===0&&window.removeEventListener("mousemove",move_event)},setup_hover=function(instance4){let supports_matches=instance4.canvas[0].matches!=null;instance4.canvas.mouseenter(()=>{instance4.state("is_hovered",!0),supports_matches&&(currently_hovered.size===0&&window.addEventListener("mousemove",move_event),currently_hovered.add(instance4))}),instance4.canvas.mouseleave(()=>{instance4.state("is_hovered",!1),currently_hovered.delete(instance4)});let is_hovered=supports_matches&&instance4.canvas[0].matches(":hover");return queueMicrotask(()=>instance4.state("is_hovered",is_hovered)),is_hovered};init_define_process_env();init_shim();var import_web_dom_collections_iterator189=__toESM(require_web_dom_collections_iterator());init_property_applications();init_elements2();init_u2();init_lib();var DEFAULT_METHODS={do_show(instance4,properties,options,animated){var _canvas$velocity;instance4._is_visible_me=!0,instance4.ensure_drawn();let canvas=instance4.get_canvas();(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop",!0),animated?perform_animate_in2(instance4,properties,options,!0):(instance4._display_me(),instance4._update_visible())},do_hide(instance4,properties,options,animated){var _canvas$velocity2;let canvas=instance4.get_canvas();if((_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),!animated)instance4._hide_me(),instance4._is_visible_me=!1,instance4._update_visible();else{var _instance$_transforms,_instance$_transforms2,_instance$_transforms3,_instance$_transforms4,_instance$_transforms5;(_instance$_transforms=instance4._transforms)!=null||(instance4._transforms={}),(_instance$_transforms3=(_instance$_transforms2=instance4._transforms).initial_opacity)!=null||(_instance$_transforms2.initial_opacity=canvas[0].style.opacity),(_instance$_transforms5=(_instance$_transforms4=instance4._transforms).initial_transform)!=null||(_instance$_transforms4.initial_transform=canvas[0].style.transform),instance4._is_visible_me=!1,instance4._update_visible(),instance4.set_animating(!0);let animate_options={duration:options.duration,complete_cb(){instance4.set_animating(!1),canvas[0].style.transform=instance4._transforms.initial_transform,canvas[0].style.opacity=instance4._transforms.initial_opacity,instance4._transforms=void 0}};options.visibility="hidden",velocity(canvas,properties.animation,animate_options)}}},MODIFIED_METHODS={position_canvas:1,do_show:0,do_hide:0,get_container_width:0,attempt_size_only_draw:0,register:0};function wrap_core_element(data){var _legacy_data$property,_legacy_data$initiali;let legacy_data=get_element_modifications(data.plugin_name);(legacy_data==null?void 0:legacy_data.additional_data)!=null&&extend(data,legacy_data.additional_data);let use_new_responsive_functions=(element,method)=>(element==null?void 0:element.is_responsive_v1())&&(element.E_object().uses_css_responsive||["position_canvas","do_show","do_hide"].includes(method));data.property_applications=[...data.property_applications],!data.uses_css_responsive&&!data.property_applications.some(p=>p instanceof property_applications_default.ResponsiveElement)&&data.property_applications.push(new property_applications_default.ResponsiveElement),data.property_applications.push(...(_legacy_data$property=legacy_data==null?void 0:legacy_data.property_applications)!=null?_legacy_data$property:[]);function modify_method(method,element_index){var _legacy_data$method;let original_method=data[method],legacy_method=(_legacy_data$method=legacy_data==null?void 0:legacy_data[method])!=null?_legacy_data$method:original_method;(original_method!=null||legacy_method!=null)&&(data[method]=function(){var _instance_or_element$;let instance_or_element=arguments[element_index],element=(_instance_or_element$=instance_or_element.element)!=null?_instance_or_element$:instance_or_element;if((!on_server()||lib_default().force_responsive_version)&&use_new_responsive_functions(element,method)){var _ref;return method==="position_canvas"&&instance_or_element.responsive_mode()||(_ref=original_method!=null?original_method:DEFAULT_METHODS[method])==null?void 0:_ref.apply(data,arguments)}else return legacy_method.apply(data,arguments)})}for(let method in MODIFIED_METHODS){let element_index=MODIFIED_METHODS[method];modify_method(method,element_index)}let original_initialize=data.initialize,legacy_initialize=(_legacy_data$initiali=legacy_data==null?void 0:legacy_data.initialize)!=null?_legacy_data$initiali:original_initialize;return data.initialize=function(instance4){if(use_new_responsive_functions(instance4.element,"initialize")?original_initialize.call(data,instance4):legacy_initialize.call(data,instance4),instance4.element.is_responsive_v1()&&!instance4.element.E_object().uses_css_responsive){if(!instance4.thumbnail_mode()){if(typeof ResizeObserver<"u"&&ResizeObserver!==null){let observer2=new ResizeObserver(entries=>{let{width:width2}=entries[0].contentRect;instance4.notify_width(width2)});observer2.observe(instance4.canvas[0]),instance4.on_destroy(()=>{observer2.disconnect()})}instance4.notify_width(instance4.canvas.width())}instance4.autorun(()=>{instance4.canvas.css({height:instance4.element.get_height()})})}},data}init_mode_check();init_element_utils();init_element_eval();init_elements();init_table_element();init_style_properties();var{apply_css_style:apply_css_style3}=property_applications_default;function make_element(name,data,not_add_core_elements){var _data$events,_data$events2,_data$actions;let processsed_data=transform_element(name,data);if(!not_add_core_elements&&(registered_elements[name]=processsed_data,processsed_data.field_names))for(let[name2,data2]of Object.entries(processsed_data.field_names))data2.in_style&&register_style_property(name2);if((_data$events=data.events)!=null&&_data$events.length&&(data.events=data.events.concat("OnError")),(_data$events2=data.events)!=null&&_data$events2.length)for(let event of data.events)add_event(event,name)}var instance_hook_transformers={},register_hook_transformer=(name,fn)=>instance_hook_transformers[name]=fn;function run_transformers(instance4){for(let _ in instance_hook_transformers){let transformer=instance_hook_transformers[_];transformer(instance4)}}function transform_element(name,data){var _data,_data$field_names,_data2,_data2$properties_for,_data$get_states,_data$get_messages,_data$get_private_mes;data.plugin_name=name,data=wrap_core_element(data);for(let key of["is_input","contains_group_data","initialize","add_an_invisible_div_on_the_top"])if(data[key]==null)throw new UnexpectedError("Error building "+name+": no value for "+key);let use_is_visible=!data.starts_hidden&&!data.always_visible;(_data$field_names=(_data=data).field_names)!=null||(_data.field_names={}),(_data2$properties_for=(_data2=data).properties_for_new)!=null||(_data2.properties_for_new={});let prop_applications=data.property_applications;for(let application2 of prop_applications){var _application$field_na,_application$properti;let fields=(_application$field_na=application2.field_names)!=null?_application$field_na:{},fields_for_new=(_application$properti=application2.properties_for_new)!=null?_application$properti:{};for(let k in fields){let v=fields[k];data.field_names[k]=json_deep_copy(v)}for(let k in fields_for_new){let v=fields_for_new[k];data.properties_for_new[k]=json_deep_copy(v)}}if(["Page"].includes(name)||(data.field_names.delete_element={no_states:!0,only_edit_mode:!0}),!["CustomDefinition","CustomElement","Page"].includes(name)&&!PSEUDO_TABLE_ELEMENTS.includes(name)&&name!=="VerticalList"&&(data.field_names.switch_element={no_states:!0,only_edit_mode:!0}),["CustomDefinition","Page"].includes(name)||(data.field_names.select_parent={no_states:!0,only_edit_mode:!0},data.field_names.reveal_in_tree={no_states:!0,only_edit_mode:!0},data.field_names.lock_in_editor={no_states:!0,only_edit_mode:!0}),data.field_names.element_style={no_states:!0},data.field_names.delete_style={no_states:!0,only_edit_mode:!0},data.field_names.edit_style={no_states:!0,only_edit_mode:!0},use_is_visible&&extend(data.field_names,visibility_field_names),data.defaults)for(let field_name in data.field_names){let field_data=data.field_names[field_name],default_value=data.defaults[field_name];default_value!=null&&(field_data.default=default_value)}if(data.starts_hidden)data.is_visible_on_page_load=instance4=>!1;else if(data.always_visible)data.is_visible_on_page_load=instance4=>!0;else if(use_is_visible)data.is_visible_on_page_load=element=>element.get_static_property("is_visible",!0);else throw new UnexpectedError("should not get here");let states;data.dont_add_hover_pressed?states=[]:states=["is_hovered","is_pressed","force_pressed"],data.plugin_name==="Link"&&states.push("is_link_disabled");let private_states=["invisible_div_drawn"],messages=["add_tab_index","scroll_to_self"],private_messages=[];if(data.contains_group_data){states.push("group_data");let old_add_specific_messages=data.add_specific_messages;data.add_specific_messages=function(messages2,element){let suck_value=element.get_state_value("group_data");return suck_value&&suck_value.id()!=="null"&&extend(messages2,{get_group_data:{description:"'s "+suck_value.display(),is_client_state(){return!0},section:"Data Sources",ret_btype:suck_value,fn(a,b){return this.ret_btype().cast(a==null?void 0:a.state("group_data"))}}}),old_add_specific_messages==null?void 0:old_add_specific_messages(messages2,element)},private_states.push("datasource_changed_by_workflow_action"),messages.push("set_group_data","reset_group"),private_messages.push()}if(data.is_pseudo){let old_add_specific_messages=data.add_specific_messages;data.add_specific_messages=function(messages2,element){if(element.type()==="TableMainAxis"){var _element$parent$get_b,_element$parent$get_b2,_element$parent;extend(messages2,{get_data:{description:"'s Table",is_client_state(){return!0},section:"States",ret_btype:(_element$parent$get_b=(_element$parent$get_b2=(_element$parent=element.parent()).get_btype_id)==null?void 0:_element$parent$get_b2.call(_element$parent))!=null?_element$parent$get_b:"null",fn(a,b){return a.parent()}}})}return old_add_specific_messages==null?void 0:old_add_specific_messages(messages2,element)}}if(data.is_input){states.push("value");let old_add_specific_messages=data.add_specific_messages;data.add_specific_messages=function(messages2,element){return extend(messages2,{get_data:{description:data.is_checkbox?" is checked":"'s value",is_client_state(){return!0},section:"States",ret_btype:element.get_state_value("value"),fn(a,b,properties,_raw3,context){return context!=null&&context.inputs_must_be_valid&&a!=null&&a.is_visible()&&(a==null||a.state("value_that_is_valid")),this.ret_btype().cast(a==null?void 0:a.state("value"))}}}),data.is_checkbox&&extend(messages2,{get_not_data:{description:" isn't checked",is_client_state(){return!0},section:"States",ret_btype:element.get_state_value("value"),fn(a,b){return!(a!=null&&a.state("value"))}}}),old_add_specific_messages==null?void 0:old_add_specific_messages(messages2,element)},states.push("value_that_is_valid"),states.push("currently_binding"),data.no_is_focused||states.push("is_focused"),private_states.push("has_been_changed","force_display_validity"),messages.push("reset_input","set_focus"),data.content_validated&&(states.push("display_invalid","is_invalid"),messages.push("display_validity")),private_messages.push("user_change","user_submit"),add_event("InputChanged",name)}data.is_file_uploader&&messages.push("cancel_upload");function use_reusable_visibility(instance4){if(!instance4.edit_mode)return!1;let root2=instance4.element.root();return root2!=null&&root2.type()==="CustomDefinition"&&root2.get_responsive_version()>0}let original_register=data.register;data.register=function(instance4){if(original_register==null||original_register.call(data,instance4),instance4.run_mode()&&(instance4.on_message("add_tab_index",num=>{instance4.state("tab_index",num)}),data.contains_group_data&&register_group_data(data,instance4)),use_is_visible&&!on_server()&&(instance4.run_mode()||instance4.responsive_mode()||use_reusable_visibility(instance4))){let handle_visibility2=function(){visibility_handler_waiting=!1,instance4._is_visible_me?(was_hidden&&instance4._has_been_hidden==null&&instance4.do_hide(),instance4.do_show()):instance4.is_drawn?instance4.do_hide():(instance4._hide_me(),was_hidden=!0,instance4.wait_for_first_draw(()=>{instance4._is_visible_me||instance4.do_hide()}))};var handle_visibility=handle_visibility2;let was_hidden=!1,visibility_handler_waiting=!1,parent=instance4.parent();on_property_change(instance4,"is_visible",visible=>{instance4._is_visible_me=visible,visibility_handler_waiting||(visibility_handler_waiting=!0,u_exports2.WaitFor(instance4.get_skeleton_ready_key(),()=>{parent?u_exports2.WaitFor(parent._has_become_visible,handle_visibility2):handle_visibility2()}))})}data.is_input&&register_input_states(data,states,instance4)};let original_initialize=data.initialize;data.initialize=function(instance4){let margin_left_initally_set,margin_top_initally_set;original_initialize.call(data,instance4),margin_top_initally_set=margin_left_initally_set=!1,instance4.edit_mode()&&(on_property_change(instance4,"margin_top",new_margin_top=>{margin_top_initally_set&&instance4.get_static_property("top")<new_margin_top&&(instance4.element.set_property("top",new_margin_top),instance4.element.commit_merge()),margin_top_initally_set=!0}),on_property_change(instance4,"margin_left",new_margin_left=>{margin_left_initally_set&&instance4.get_static_property("left")<new_margin_left&&(instance4.element.set_property("left",new_margin_left),instance4.element.commit_merge()),margin_left_initally_set=!0}));function apply_property_applications(){for(let p_app of instance4.element.get_property_applications())(function(p_app2){if(p_app2.apply_once)return p_app2.apply({},instance4.canvas);{let props;data.additional_uses_properties?props=p_app2.uses_properties.concat(data.additional_uses_properties):props=p_app2.uses_properties;let _first_time=!0;return on_property_change(instance4,props,values=>{values._first_time=_first_time,p_app2.apply(values,instance4.canvas,instance4),_first_time=!1})}})(p_app)}instance4.wait_for_visible_lite(()=>apply_property_applications()),instance4.run_mode()&&instance4.wait_for_visible_lite(()=>{let css_props={};for(let p_app of instance4.element.get_property_applications())p_app.get_transition_css(instance4.element,instance4.canvas,css_props);instance4.get_transition_css(css_props),instance4.setTimeout(()=>{for(let _ in css_props){let{target,css_prop}=css_props[_];[void 0,""].includes(css_prop)||(css_prop.slice(-2)===", "&&(css_prop=css_prop.slice(0,css_prop.length-2)),apply_css_style3(target,{"-webkit-transition":css_prop,"-moz-transition":css_prop,"-o-transition":css_prop,"-ms-transition":css_prop,transition:css_prop}))}},0)}),data.change_cursor_style_if_clickable&&instance4.run_mode()&&instance4.element.get_related_workflows("ButtonClicked").length&&(register_tab_index_listener(instance4,num=>{instance4.get_canvas().attr("tabindex",num)}),instance4.get_canvas().addClass(CLICKABLE_ELEMENT),instance4.wait_for_visible_lite(()=>on_property_change(instance4,"button_disabled",button_disabled=>{button_disabled?(instance4.get_canvas()[0].style.cursor="default",instance4.get_canvas()[0].tabindex="-1"):instance4.get_canvas()[0].style.cursor="pointer"}))),instance4.run_mode()&&instance4.element.get_related_workflows("ButtonClicked").length&&(instance4.get_canvas().focus(()=>{instance4.get_canvas().addClass("show-outline")}),instance4.get_canvas().blur(()=>{instance4.get_canvas().removeClass("show-outline")}),data.specific_click_handler||instance4.get_canvas().click(e=>{let stop_workflows,debug2=lib_default().workflow.debugger;if(debug2!=null&&(stop_workflows=debug2.element_clicked(instance4,instance4.get_partial())),!stop_workflows)return run_element_workflow(instance4,"ButtonClicked",e)})),data.add_an_invisible_div_on_the_top&&!instance4.run_mode()&&(void 0)(instance4),instance4.run_mode()&&!data.dont_add_hover_pressed&&(is_on_mobile_or_tablet()?instance4.canvas.on("touchstart",()=>{instance4.state("is_pressed",!0),$(document).one("touchend",()=>{let remove_pressed_timeout=instance4.setTimeout(()=>instance4.state("is_pressed",!1),100);$(document).one("scroll",()=>(instance4.state("is_pressed",!1),instance4.clearTimeout(remove_pressed_timeout)))})}):(instance4.state("is_hovered",setup_hover,!0),instance4.canvas.mousedown(()=>{instance4.state("is_pressed",!0),$(document).one("mouseup",()=>{instance4.state("is_pressed",!1)})}))),instance4.run_mode()&&run_transformers(instance4),data.always_visible&&instance4._display_me()};let element_states=(_data$get_states=data.get_states)!=null?_data$get_states:()=>[];data.get_states=element=>states.concat(element_states(element));let element_messages=(_data$get_messages=data.get_messages)!=null?_data$get_messages:()=>[];data.get_messages=element=>messages.concat(element_messages(element));let element_private_messages=(_data$get_private_mes=data.get_private_messages)!=null?_data$get_private_mes:()=>[];return data.get_private_messages=element=>private_messages.concat(element_private_messages(element)),data}init_element_eval();init_element_props();init_elements();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator196=__toESM(require_web_dom_collections_iterator());init_b_ui();init_mode_check();init_solid();init_define_process_env();init_shim();init_web();init_web();init_web();var import_es_string_replace45=__toESM(require_es_string_replace()),import_web_dom_collections_iterator193=__toESM(require_web_dom_collections_iterator());init_solid();init_server_css();init_properties();init_element_eval();init_errors();init_define_process_env();init_shim();var import_web_dom_collections_iterator191=__toESM(require_web_dom_collections_iterator());init_solid();init_web();init_define_process_env();init_shim();init_solid();var PortalContext_default=createContext({addElement(el){document.body.appendChild(el)},removeElement(el){document.body.removeChild(el)}});function BodyPortal(props){if(isServer)return"";let marker=document.createTextNode("");function renderPortal(){if(sharedConfig.context){let[s,set2]=createSignal(!1);return queueMicrotask(()=>set2(!0)),()=>s()&&props.children}else return()=>props.children}let portalContext=useContext(PortalContext_default);function appendChild(node){portalContext.addElement(node),onCleanup(()=>portalContext.removeElement(node))}function addElement(element){element!=null&&appendChild(typeof element=="object"?element:document.createTextNode(String(element)))}let elements2=children(renderPortal());return createRenderEffect(()=>{let resolvedElements=elements2();Array.isArray(resolvedElements)?resolvedElements.forEach(addElement):addElement(resolvedElements)}),marker}init_define_process_env();init_shim();init_solid();var FIRST_DIVIDER=Symbol("FIRST"),EditorContext=createContext(),EditorContext_default=EditorContext;init_define_process_env();init_shim();var import_web_dom_collections_iterator192=__toESM(require_web_dom_collections_iterator());init_solid();function createVisibilityLatch(instance4){let[visible,setVisible]=createSignal(!1);return onMount(()=>{instance4.wait_for_visible_lite(()=>setVisible(!0))}),visible}function createCanvasRef(instance4){return node=>{node!=null&&(instance4.canvas=$(node),instance4.setup_canvas_hooks(),instance4._observe_canvas(),instance4.run_mode()&&run_transformers(instance4))}}init_appquery();var import_autorun5=__toESM(require_autorun()),idProperty=new Property(instance4=>{if(instance4.edit_mode())return instance4.element_id().replace(/[^a-zA-Z0-9]/g,"_");if(instance4.run_mode()&&appquery_default.has_advanced_feature_enabled("expose_id_option"))return evaluate_property(instance4,"unique_id")},{noWaitVisible:!0});function createElement2(Component,preCompute,listProperties){return{buildComponent:(element,cachedProperties)=>{var _cachedProperties$pre;let preCached=(_cachedProperties$pre=cachedProperties==null?void 0:cachedProperties.preCached)!=null?_cachedProperties$pre:preCompute==null?void 0:preCompute(element),result=listProperties(element,preCached),properties={...result.properties,id:idProperty},styles=result.styles,baseProps={},baseStyle={},baseChildStyles={},dynamicProperties=[],dynamicStyles={};for(let prop in properties)cachedProperties!=null&&cachedProperties.statics[prop]?baseProps[prop]=properties[prop].computeStaticClient(cachedProperties.props[prop]):dynamicProperties.push(prop);return styles.forEach((style2,index)=>{if((cachedProperties==null||cachedProperties.styles[index]!=null)&&(dynamicStyles[index]=style2),style2.notInStylesheet&&(cachedProperties==null?void 0:cachedProperties.styles[index])!=null)if(style2.selector){var _style$selector,_baseChildStyles$_sty;Object.assign((_baseChildStyles$_sty=baseChildStyles[_style$selector=style2.selector])!=null?_baseChildStyles$_sty:baseChildStyles[_style$selector]={},cachedProperties.styles[index])}else Object.assign(baseStyle,cachedProperties.styles[index])}),props=>{let instance4=props.instance,turnedVisible=createVisibilityLatch(instance4),builtins={get turnedVisible(){return turnedVisible()}},newProps={};function addProp(name,signal){Object.defineProperty(newProps,name,{get:signal})}for(let prop of dynamicProperties){let signal=properties[prop].createClientWatcher(instance4,cachedProperties==null?void 0:cachedProperties.props[prop],builtins);addProp(prop,signal)}let childStyleFns={},styleFns=[],outerStyleFns=[];for(let index in dynamicStyles){let style2=dynamicStyles[index],signal=style2.createClientWatcher(instance4,cachedProperties==null?void 0:cachedProperties.styles[index],builtins);if(style2.selector){var _style$selector2,_childStyleFns$_style;(_childStyleFns$_style=childStyleFns[_style$selector2=style2.selector])!=null||(childStyleFns[_style$selector2]=[]),childStyleFns[style2.selector].push(signal)}else style2.outerPositioning?instance4.edit_mode()?outerStyleFns.push(signal):(!instance4.thumbnail_mode()||instance4.parent()!=null)&&styleFns.push(signal):styleFns.push(signal)}let appliedStyle=()=>Object.assign({},baseStyle,...styleFns.map(fn=>fn())),childStyles={};for(let selector in childStyleFns)Object.defineProperty(childStyles,selector,{get:()=>Object.assign({},baseChildStyles[selector],...childStyleFns[selector].map(fn=>fn()))});let legacyApps=instance4.element.get_property_applications().filter(pApp=>pApp.no_solid_support);legacyApps.length>0&&onMount(()=>{if(!instance4.is_destroyed())for(let pApp of legacyApps){let props2;instance4.element.E.additional_uses_properties?props2=pApp.uses_properties.concat(instance4.element.E.additional_uses_properties):props2=pApp.uses_properties;let _first_time=!0;on_property_change(instance4,props2,values=>{pApp.apply(Object.assign(values,{_first_time}),instance4.canvas,instance4),_first_time=!1})}}),onMount(()=>{instance4.mark_drawn(),instance4.element.draws_own_children()||instance4.get_children_drawn_key().turn()});function innerElement(classList2,wrapper){return createComponent(Component,mergeProps(preCached,baseProps,builtins,newProps,props,{ref(r$){var _ref$=createCanvasRef(instance4);typeof _ref$=="function"&&_ref$(r$)},classList:classList2,get style(){return appliedStyle()},childStyles,wrapper,get children(){return instance4.element.type()==="CustomElement"&&instance4.is_self_nested_custom()?"This is a circular Reusable Element... Reusable Elements cannot contain themselves (or other Reusable Elements that contain them).":props.children}}))}if(instance4.edit_mode()){let classList2={"inner-element":!0},renderedElement=children(()=>{var _useContext;if(instance4.destroy_started())return null;let outerStyle=createMemo(()=>Object.assign({},...outerStyleFns.map(fn=>fn()))),EditWrapper=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.wrapper;if(EditWrapper==null)throw new UnexpectedError("Edit-mode should define the context");return instance4.element.E.manual_wrapper?(0,import_autorun5.autorun_top)(()=>innerElement(classList2,props2=>createComponent(EditWrapper,{instance:instance4,get style(){return{...outerStyle(),...props2.style}},get children(){return props2.children}}))):createComponent(EditWrapper,{instance:instance4,get style(){return outerStyle()},get children(){return(0,import_autorun5.autorun_top)(()=>innerElement(classList2))}})});return createComponent(Show,{get when(){return instance4.attach_to_body()},get fallback(){return renderedElement()},get children(){return createComponent(BodyPortal,{get children(){return renderedElement()}})}})}else{let classList2={"bubble-element":!0,[element.type()]:!0,[toClass(element.ssr_key())]:!0};return instance4.attach_to_body()&&!instance4.thumbnail_mode()?createComponent(BodyPortal,{get children(){return innerElement(classList2)}}):innerElement(classList2)}}},component:Component,preCompute,listProperties}}var createElement_default=createElement2;init_element_styles();init_define_process_env();init_shim();var import_web_dom_collections_iterator195=__toESM(require_web_dom_collections_iterator());init_b_window();init_b_ui();init_mode_check();init_lodash();init_define_process_env();init_shim();var import_web_dom_collections_iterator194=__toESM(require_web_dom_collections_iterator()),autorun13=__toESM(require_autorun());init_mode_check();init_solid();init_define_process_env();init_shim();init_solid();var TestContext=createContext(),TestContext_default=TestContext;init_errors();function onAfterMount(fn,inputs){createEffect(()=>{var _inputs$map;let owner=getOwner(),cleanupFn,destroyed=!1,evaluated=(_inputs$map=inputs==null?void 0:inputs.map(f=>f()))!=null?_inputs$map:[];if(running_test()){let testContext=useContext(TestContext_default);if(testContext==null)throw new UnexpectedError("Invalid test state while running solid test");testContext.afterMounts.push(()=>{runWithOwner(owner,()=>{cleanupFn=fn(...evaluated)})})}else Promise.resolve().then(()=>{destroyed||(cleanupFn=fn(...evaluated))});onCleanup(()=>{var _cleanupFn;(_cleanupFn=cleanupFn)==null||_cleanupFn(),destroyed=!0})})}function createAutorun(fn){onAfterMount(()=>{let ar=autorun13.autorun(fn);return()=>ar.destroy()})}function createWatcher(fn,options){let[value,setValue]=createSignal(options==null?void 0:options.fallback);return onAfterMount(function(){for(var _len=arguments.length,inputs=new Array(_len),_key=0;_key<_len;_key++)inputs[_key]=arguments[_key];let watcher=autorun13.Watcher(()=>fn(...inputs));return watcher.on_value(setValue),()=>watcher.destroy()},options==null?void 0:options.inputs),value}init_solid();init_runmode();init_lib();init_logger();function defaultEventHandlers(el,accessor){let instance4=accessor(),canvas=$(el);instance4.run_mode()&&!instance4.element.E.dont_add_hover_pressed&&(is_on_mobile_or_tablet()?canvas.on("touchstart",()=>{instance4.state("is_pressed",!0),$(document).one("touchend",()=>{let remove_pressed_timeout=instance4.setTimeout(()=>{instance4.state("is_pressed",!1)},100);$(document).one("scroll",()=>{instance4.state("is_pressed",!1),instance4.clearTimeout(remove_pressed_timeout)})})}):(queueMicrotask(()=>instance4.state("is_hovered",setup_hover,!0)),canvas.mousedown(()=>{instance4.state("is_pressed",!0),$(document).one("mouseup",()=>{instance4.state("is_pressed",!1)})})));let hasClick=instance4.run_mode()&&instance4.element.get_related_workflows("ButtonClicked").length;hasClick&&instance4.element.E.change_cursor_style_if_clickable&&canvas.addClass(CLICKABLE_ELEMENT),hasClick&&(canvas.focus(()=>{canvas.addClass("show-outline")}),canvas.blur(()=>{canvas.removeClass("show-outline")}),instance4.element.E.specific_click_handler||canvas.click(e=>{let debug2=lib_default().workflow.debugger,stop_workflows=!1;debug2&&(stop_workflows=debug2.element_clicked(instance4,instance4.get_partial())),stop_workflows||run_element_workflow(instance4,"ButtonClicked",e)}))}function inputChangeKeyupHandlers(el,accessor){let[instance4,getValue2]=accessor(),canvas=$(el);on_phonegap()&&canvas.css("-webkit-user-select","text");let timeout=null,hasChanged=!1,inputEventHandler=()=>{hasChanged=!0,timeout&&instance4.clearTimeout(timeout);let timeoutLength;if(instance4.get_static_property("content_format")==="geographic_address")timeoutLength=3e3;else{let val=instance4.canvas.val();!val||val.length===1?timeoutLength=0:timeoutLength=1500}return timeout=instance4.setTimeout(function(){instance4.message("user_change",getValue2()),timeout=null},timeoutLength),!0};canvas.on("input",inputEventHandler),canvas.on("paste",inputEventHandler),canvas.on("keydown",inputEventHandler),canvas.on("keydown",e=>{let is_multiline_input=canvas.hasClass("MultiLineInput");e.keyCode!==13||is_multiline_input||canvas.blur()});let changeHandler=function(){instance4.message("user_submit",getValue2())};canvas.focus(()=>{instance4.state("is_focused",!0)});let changeDebouncer=debounce_default(changeHandler,50);canvas.blur(()=>{instance4.state("is_focused",!1),hasChanged&&(hasChanged=!1,changeHandler()),changeDebouncer.flush(),timeout!=null&&(instance4.message("user_change",getValue2()),instance4.clearTimeout(timeout),timeout=null)}),canvas.change(()=>running_test()?changeHandler():changeDebouncer())}function enterHandler(el,accessor){let canvas=$(el),instance4=accessor()[0],foundButton=createWatcher(()=>{var _instance$element$get,_instance$element$get2,_instance$element;let foundButton2=null,possiblyRelatedWorkflows=(_instance$element$get=(_instance$element$get2=(_instance$element=instance4.element).get_visible_workflows)==null?void 0:_instance$element$get2.call(_instance$element))!=null?_instance$element$get:[],id=instance4.element_id();for(let wf of possiblyRelatedWorkflows){var _wf$element_id;if(wf.find_expressions(`GetElement.element_id=${id}`).length<1)continue;let button=instance4.find_instance_by_id((_wf$element_id=wf.element_id)==null?void 0:_wf$element_id.call(wf));if(button!=null&&button.is_visible()){var _foundButton;if((_foundButton=foundButton2)!=null||(foundButton2=button),button!==foundButton2){foundButton2=null;break}}}return foundButton2});createEffect(()=>{foundButton()&&(canvas.on("keydown.click_the_button",event=>{if(event.shiftKey||accessor()[1]&&!meta(event))return;let enterKeyCode=13;if(event.keyCode===enterKeyCode){canvas.hasClass("MultiLineInput")||canvas.blur();let buttonCanvas=foundButton().canvas;buttonCanvas.is(":visible")&&(trigger_blur(canvas),buttonCanvas.click())}}),onCleanup(()=>{canvas.off("keydown.click_the_button")}))})}function UNMANGLED_html_wrap2(fn){return fn()}function jqueryHTML(el,accessor){let canvas=$(el);createEffect(prev=>{let v=accessor();if(!sharedConfig.context&&prev!==v)try{UNMANGLED_html_wrap2(()=>{canvas.html(v)})}catch(err){owner_only_error("html bug",{display:`Bug in custom html:
`+err.stack,prop_name:"html",element:canvas[0].outerHTML})}return v},void 0)}init_properties();init_element_eval();init_element_props();var _tmpl$=template("<div>");function AlertComponent(props){let instance4=props.instance,[displayed,setDisplayed]=createSignal(null);onMount(()=>{if(instance4.run_mode()){instance4.canvas.css("display","none");let displayed_count=0;instance4.on_message("do_show_alert",function(properties){var _properties$fin_start;let my_count=++displayed_count;setDisplayed(properties.message),instance4._display_me(),instance4._is_visible_me=!0,instance4._update_visible();let canvas=instance4.canvas;canvas.css({display:"",opacity:(_properties$fin_start=properties.fin_starting_opacity)!=null?_properties$fin_start:0}),!running_test()&&velocity(canvas,{opacity:1},{duration:properties.fade_in,complete_cb:()=>{instance4.setTimeout(()=>{var _properties$fout_star;canvas.css("opacity",(_properties$fout_star=properties.fout_starting_opacity)!=null?_properties$fout_star:1),velocity(canvas,{opacity:0},{duration:properties.fade_out,complete_cb:()=>{canvas.css("display","none"),instance4._hide_me(),instance4._is_visible_me=!1,instance4._update_visible(),my_count===displayed_count&&setDisplayed(null)},display:""})},properties.hold)}})}),instance4.manual_position=!1,instance4.on_message("position_element",position=>{instance4.manual_position=!0,instance4.state("manual_position",{top:`${position.Y}px`,left:`${position.X}px`,position:position.position})})}});let html=()=>{var _displayed;let html2=bbcode_to_html((_displayed=displayed())!=null?_displayed:props.text);return props.verticalCenter?`<div>${html2}</div>`:html2};return(()=>{var _el$=_tmpl$();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,"bubble-r-vertical-center":props.verticalCenter},_v$4=html();return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_v$4!==_p$.o&&(_el$.innerHTML=_p$.o=_v$4),_p$},{e:void 0,t:void 0,a:void 0,o:void 0}),_el$})()}var AlertComponent_default=createElement2(AlertComponent,element=>({attachToTop:element.get_static_property("at_to_top")}),(element,_ref)=>{let{attachToTop}=_ref;return{properties:{text:new Property(instance4=>evaluate_property(instance4,"text")),verticalCenter:new Property(instance4=>evaluate_property(instance4,"vertical_centering"))},styles:attachToTop?[new Style(instance4=>{let props={position:instance4.run_mode()?"fixed":"absolute","margin-left":"auto","margin-right":"auto","margin-top":"","margin-bottom":"","min-width":min_width_css(instance4),"min-height":min_height_css(instance4),"max-height":max_height_css(instance4),"z-index":2e4};for(let side of["left","right","top","bottom"])props[side]=evaluate_property(instance4,`margin_${side}`);let max_width=max_width_css(instance4);if(element.fit_width()){props.width="auto";let bounded_width=`calc(100% - ${props.left+props.right}px)`;max_width!=null?props["max-width"]=[`min(${max_width}, ${bounded_width})`,max_width]:props["max-width"]=bounded_width}else props.width="initial",props["max-width"]=max_width;return element.fit_height()?(props.bottom="unset",props.height="auto"):props.height="initial",props},{outerPositioning:!0}),new Style(instance4=>{var _instance$state;return(_instance$state=instance4.state("manual_position"))!=null?_instance$state:{}},{alwaysDynamic:!0}),...basicStyling(element)]:placedStyling(element)}});var element_optional_utils_exports={};__export(element_optional_utils_exports,{google_map_styles:()=>google_map_styles,optional_modules:()=>optional_modules});init_define_process_env();init_shim();var optional_modules={},google_map_styles={};init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator197=__toESM(require_web_dom_collections_iterator());init_element_styles();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_define_process_env();init_shim();init_solid();function OptimizedShow(props){return props.isStatic?props.when?()=>props.children:()=>props.fallback:Show(props)}init_properties();init_responsive_evaluation();init_responsive_layout();var _tmpl$2=template("<div>"),BASE_CONTAINER_CLASS="bubble-r-container",SUB_CONTAINER_SELECTOR=`> .${BASE_CONTAINER_CLASS}`;function containerStyling(shouldAddWrapper){return[new Style(instance4=>containerLayoutStyling(instance4),{selector:shouldAddWrapper?SUB_CONTAINER_SELECTOR:void 0})]}function containerProperties(shouldAddWrapper){return shouldAddWrapper?{containerClass:new Property(instance4=>"bubble-r-container-wrapper",{noWaitVisible:!0,fallback:""}),wrappedClass:new Property(instance4=>`${BASE_CONTAINER_CLASS} ${LAYOUT_PROPERTIES[instance4.element.container_layout()].classes}`,{noWaitVisible:!0})}:{containerClass:new Property(instance4=>{var _instance$element$E$u,_instance$element$E;return instance4.edit_mode()&&(_instance$element$E$u=(_instance$element$E=instance4.element.E).use_legacy_in_editor)!=null&&_instance$element$E$u.call(_instance$element$E,instance4.element)?"":`${BASE_CONTAINER_CLASS} ${LAYOUT_PROPERTIES[instance4.element.container_layout()].classes}`},{noWaitVisible:!0,fallback:""})}}function ChildWrapper(props){return createComponent(OptimizedShow,{get when(){return props.shouldAddWrapper},get fallback(){return props.children},get isStatic(){return props.instance.run_mode()},get children(){var _el$=_tmpl$2();return insert(_el$,()=>props.children),createRenderEffect(_p$=>{var _props$wrappedClass,_v$={[(_props$wrappedClass=props.wrappedClass)!=null?_props$wrappedClass:""]:!0},_v$2=props.childStyles[SUB_CONTAINER_SELECTOR];return _p$.e=classList(_el$,_v$,_p$.e),_p$.t=style(_el$,_v$2,_p$.t),_p$},{e:void 0,t:void 0}),_el$}})}init_solid();var _tmpl$3=template("<div>");function LegacyContainerComponent(props){return onMount(()=>{var _props$instance$eleme,_props$instance$eleme2;return(_props$instance$eleme=(_props$instance$eleme2=props.instance.element.E).legacy_container_mount)==null?void 0:_props$instance$eleme.call(_props$instance$eleme2,props.instance)}),(()=>{var _el$=_tmpl$3();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var LegacyContainerComponent_default=createElement_default(LegacyContainerComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[...containerStyling(shouldAddWrapper),...placedStyling(element)]}});make_element("Alert",{category:"visual elements",glyph_id:"alert",list_order:6,keyboard_shortcut:null,defaults:{font_color:"#947739",background_style:"bgcolor",bgcolor:"#FFF6B2",border_style:"none",border_width:1,border_color:"#FFDFC2",boxshadow_style:"none",padding_vertical:10,padding_horizontal:0,font_alignment:"center",width:200,height:37,fixed_width:!0},updated_default_sizing:{width:280,height:48},field_names:{text:{default:"...edit me..."},at_to_top:{no_states:!0,default:!1}},properties_for_new:{fit_width:!0,single_width:!1,min_width_css:"96px"},condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},property_applications:[new property_applications_default.Dimensions,new property_applications_default.PaddingText,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,no_vertical_if_legacy_center:!0,allow_legacy:!0}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Font,new property_applications_default.FontShadow,new property_applications_default.FontSpacing,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:AlertComponent_default,can_fit_width:!0,can_fit_height:!0,get_html(instance4){return"<div></div>"},can_defer_drawing(){return!0},get_messages(element){return["show_alert"]},register(instance4){instance4.on_message("show_alert",properties=>{if(instance4.run_mode()&&instance4.ensure_drawn(),instance4.is_drawn){instance4.message("do_show_alert",properties);return}instance4.state("pending_alert",{orig_props:properties,start_time:Date.now()})})},initialize(instance4){let canvas=instance4.get_canvas(),do_collapse=()=>instance4.get_static_property("at_to_top")||instance4.element.collapse_when_hidden();instance4.edit_mode()?canvas.css("visibility","hidden"):(instance4.run_mode()||instance4.responsive_mode())&&(instance4._hide_me(),do_collapse()&&canvas.css("display","none"),instance4.responsive_mode()&&(instance4._has_been_hidden=!0));let content_div=null;instance4.autorun(()=>{let html=bbcode_to_html(evaluate_property(instance4,"text"));evaluate_property(instance4,"vertical_centering")?(content_div==null&&(canvas.empty(),content_div=div("",canvas)),content_div.html(html)):(content_div=null,canvas.html(html))}),instance4.on_message("do_show_alert",properties=>{var _content_div,_properties$fin_start;((_content_div=content_div)!=null?_content_div:canvas).html(bbcode_to_html(properties.message)),instance4._display_me(),instance4._is_visible_me=!0,instance4._update_visible(),canvas.css({display:"",opacity:(_properties$fin_start=properties.fin_starting_opacity)!=null?_properties$fin_start:0}),velocity(canvas,{opacity:1},{duration:properties.fade_in,complete_cb:()=>{instance4.setTimeout(()=>{var _properties$fout_star;canvas.css("opacity",(_properties$fout_star=properties.fout_starting_opacity)!=null?_properties$fout_star:1),velocity(canvas,{opacity:0},{duration:properties.fade_out,complete_cb:()=>{do_collapse()&&canvas.css("display","none"),instance4._hide_me(),instance4._is_visible_me=!1,instance4._update_visible()},display:""})},properties.hold)}})});let pending_alert=instance4.state("pending_alert");pending_alert&&instance4.message("do_show_alert",this._convert_pending_alert(pending_alert))},starts_hidden:!0,manual_position:!1,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!1,contains_group_data:!1,get_min_width(element){return 0},position_canvas(to_position,instance4){let{element}=instance4;instance4.get_static_property("at_to_top")?(instance4.autorun(()=>{var _element_props$max_he;let props={position:instance4.run_mode()?"fixed":"absolute","margin-left":"auto","margin-right":"auto","margin-top":"","margin-bottom":"","min-width":min_width_css(instance4),"min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:"","z-index":2e4},max_width=max_width_css(instance4);for(let side of["left","right","top","bottom"])props[side]=evaluate_property(instance4,`margin_${side}`);if(element.fit_width()){props.width="auto";let bounded_width=`calc(100% - ${props.left+props.right}px)`;max_width!=null?props["max-width"]=apply_css_fallbacks("max-width",[`min(${max_width}, ${bounded_width})`,max_width]):props["max-width"]=bounded_width}else props.width="initial",props["max-width"]=max_width!=null?max_width:"";element.fit_height()?(props.bottom="unset",props.height="auto"):props.height="initial",to_position.css(props)}),instance4.run_mode()?$("body").append(to_position):instance4.edit_mode()?(instance4.container.setup_margins(instance4),$(".canvas").append(to_position)):instance4.container.container_canvas.append(to_position)):instance4.container.add(instance4)},added_to_container(element){return!element.get_static_property("at_to_top")},goes_on_document(element){var _element$root;return element==null?!1:((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>0&&element.get_static_property("at_to_top")},not_draggable(element){return this.goes_on_document(element)},hidden_on_editor_load(){return!0},_convert_pending_alert(_ref){let{start_time,orig_props}=_ref,clamp=num=>Math.min(Math.max(num,0),1),cur_time=Date.now(),in_progress=clamp((cur_time-start_time)/orig_props.fade_in),end_in=start_time+orig_props.fade_in,hold_progress=clamp((cur_time-end_in)/orig_props.hold),end_hold=end_in+orig_props.hold,out_progress=clamp((cur_time-end_hold)/orig_props.fade_out);return extend(orig_props,{fin_starting_opacity:in_progress,fade_in:orig_props.fade_in*(1-in_progress),hold:orig_props.hold*(1-hold_progress),fout_starting_opacity:1-out_progress,fade_out:orig_props.fade_out*(1-out_progress)})},get_private_messages(){return["do_show_alert","position_element"]},update_show(properties){}});init_define_process_env();init_shim();init_colors();init_fonts();init_mobile();init_responsive_layout();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator200=__toESM(require_web_dom_collections_iterator());init_solid();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_solid();init_appquery();init_element_eval();init_define_process_env();init_shim();var import_web_dom_collections_iterator199=__toESM(require_web_dom_collections_iterator()),import_es_string_match_all=__toESM(require_es_string_match_all());var ICON_SETS={fa:{name:"Font Awesome v4",variants:void 0,url:"/static/icon_libraries/fontawesome-4.7.0",defaults:{inactive:"fa-star-o",active:"fa-star",checked:"fa-check-square",unchecked:"fa-square-o"}},material:{name:"Material",variants:["outlined","filled","rounded","two-tone","sharp"],url:"/static/icon_libraries/material-icons-4.0.0",defaults:{inactive:"star_border",active:"star",checked:["filled","check_box"],unchecked:"square"}},phosphor:{name:"Phosphor",variants:["regular","fill","thin","light","bold","duotone"],url:"/static/icon_libraries/phosphor-2.1.0",defaults:{inactive:"star",active:["fill","star"],checked:["fill","check-square"],unchecked:"square"}},bootstrap:{name:"Bootstrap Icons",variants:void 0,url:"/static/icon_libraries/bootstrap-icons-1.11.3",defaults:{inactive:"star",active:"star-fill",checked:"check-square-fill",unchecked:"square"}},ionic:{name:"Ionic",variants:["outline","filled","sharp"],url:"/static/icon_libraries/ionicons-7.1.0",defaults:{inactive:"star",active:["filled","star"],checked:["filled","checkbox"],unchecked:"square"}},"fontawesome-6":{name:"Font Awesome v6",variants:["regular","solid","brands"],url:"/static/icon_libraries/fontawesome-6.5.2",defaults:{inactive:"star",active:["solid","star"],checked:["solid","square-check"],unchecked:"square"}},feather:{name:"Feather",variants:void 0,url:"/static/icon_libraries/feather-4.29.0",defaults:{inactive:"star",active:"star",checked:"square",unchecked:"square"}}};function getDefaultIcon(set2){var _ICON_SETS$set2;let type=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"inactive",def=(_ICON_SETS$set2=ICON_SETS[set2])==null?void 0:_ICON_SETS$set2.defaults[type];if(Array.isArray(def)){let[variant,icon]=def;return{set:set2,variant,icon}}else return{set:set2,icon:def}}function parse_icon(icon_str){if(!icon_str)return;let[set2,variantOrIcon="",icon]=icon_str.split(" ");if(set2 in ICON_SETS){let iconSet=ICON_SETS[set2];return iconSet.variants!=null&&icon!=null?{set:set2,variant:iconSet.variants.includes(variantOrIcon)?variantOrIcon:iconSet.variants[0],icon}:{set:set2,icon:variantOrIcon}}else return}function to_icon_string(icon){let iconSet=ICON_SETS[icon.set];if(iconSet.variants!=null){var _icon$variant;let variant=(_icon$variant=icon.variant)!=null?_icon$variant:iconSet.variants[0];return`${icon.set} ${variant} ${icon.icon}`}else return`${icon.set} ${icon.icon}`}function get_icon_set_url(set_name,variant){let set2=ICON_SETS[set_name],variantStr="";return set2.variants!=null&&(variantStr=`-${variant!=null&&set2.variants.includes(variant)?variant:set2.variants[0]}`),`${set2.url}${variantStr}.svg`}function get_svg_symbol_url(icon){return`${get_icon_set_url(icon.set,icon.variant)}#${icon.icon}`}init_define_process_env();init_shim();init_web();init_web();init_web();var _tmpl$4=template('<svg viewBox="0 0 32 32"><use width=32 height=32>'),IconItemComponent=props=>(()=>{var _el$=_tmpl$4(),_el$2=_el$.firstChild;return _el$.style.setProperty("width","100%"),_el$.style.setProperty("height","100%"),createRenderEffect(_p$=>{var _props$icon,_v$=(_props$icon=props.icon)==null?void 0:_props$icon.set,_v$2=props.icon?get_svg_symbol_url(props.icon):"";return _v$!==_p$.e&&setAttribute(_el$,"data-icon-set",_p$.e=_v$),_v$2!==_p$.t&&setAttribute(_el$2,"href",_p$.t=_v$2),_p$},{e:void 0,t:void 0}),_el$})();init_properties();var _tmpl$5=template("<span class=icon-item>"),_tmpl$22=template("<span class=label-item>"),DEFAULT_ICON_SIZE=16,ICON_CLASS="icon-item",ICON_SELECTOR=` .${ICON_CLASS}`,LABEL_CLASS="label-item",LABEL_SELECTOR=` .${LABEL_CLASS}`;function buttonProperties(element,forcedType){function buttonType(instance4){var _ref;return(_ref=forcedType!=null?forcedType:evaluate_property(instance4,"button_type"))!=null?_ref:"label"}return{properties:{buttonType:new Property(buttonType,{fallback:"label"}),text:new Property(instance4=>{let textPreview=evaluate_property(instance4,"editor_preview_button"),text2=evaluate_property(instance4,"text");return!instance4.run_mode()&&textPreview&&!instance4.element.property("text").is_static()&&appquery_default.get_public_setting("bubble_version")>=21?textPreview:text2},{fallback:""}),iconPlacement:new Property(instance4=>evaluate_property(instance4,"icon_placement"),{fallback:"left"}),icon:new Property(instance4=>{let icon=evaluate_property(instance4,"icon");return parse_icon(icon)})},styles:[new Style(instance4=>evaluate_property(instance4,"background_style")==="none"?{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","user-select":"none"}:{}),new Style(instance4=>{var _evaluate_property,_evaluate_property2,_ref2,_evaluate_property3;return{width:`${(_evaluate_property=evaluate_property(instance4,"icon_size"))!=null?_evaluate_property:DEFAULT_ICON_SIZE}px`,height:`${(_evaluate_property2=evaluate_property(instance4,"icon_size"))!=null?_evaluate_property2:DEFAULT_ICON_SIZE}px`,color:(_ref2=(_evaluate_property3=evaluate_property(instance4,"icon_color"))!=null?_evaluate_property3:evaluate_property(instance4,"font_color"))!=null?_ref2:"var(--color_primary_contrast_default)","flex-shrink":"0","font-size":"0px"}},{selector:ICON_SELECTOR}),new Style(instance4=>({"min-width":"0px","overflow-wrap":"break-word","text-align":evaluate_property(instance4,"font_alignment")}),{selector:LABEL_SELECTOR}),new Style(instance4=>{var _evaluate_property4,_evaluate_property5,_evaluate_property6;let isSwipeAction=instance4.element.type()==="SwipeAction";if(buttonType(instance4)==="label"&&!isSwipeAction)return{};let justifyContent;return isSwipeAction?justifyContent=evaluate_property(instance4,["icon","label"].includes(buttonType(instance4))?"button_single_item_vert_alignment":"button_vert_alignment"):buttonType(instance4)==="icon"?justifyContent="center":["left","right"].includes((_evaluate_property4=evaluate_property(instance4,"icon_placement"))!=null?_evaluate_property4:"")?justifyContent=evaluate_property(instance4,"button_horiz_alignment"):justifyContent=evaluate_property(instance4,"button_vert_alignment"),{"flex-direction":["top","bottom"].includes((_evaluate_property5=evaluate_property(instance4,"icon_placement"))!=null?_evaluate_property5:"")?"column":"row","justify-content":justifyContent,gap:`${(_evaluate_property6=evaluate_property(instance4,"button_gap"))!=null?_evaluate_property6:0}px`,"align-items":"center"}})]}}function ButtonInternals(props){function icon(){return(()=>{var _el$=_tmpl$5();return insert(_el$,createComponent(IconItemComponent,{get icon(){return props.icon}})),createRenderEffect(_$p=>style(_el$,props.childStyles[ICON_SELECTOR],_$p)),_el$})()}return[createComponent(Show,{get when(){return createMemo(()=>props.buttonType!=="label")()&&["left","top"].includes(props.iconPlacement)},get children(){return icon()}}),createComponent(Show,{get when(){return props.buttonType!=="icon"},get children(){return createComponent(Show,{get when(){return props.buttonType==="label_icon"},get fallback(){return props.text},get children(){var _el$2=_tmpl$22();return insert(_el$2,()=>props.text),createRenderEffect(_$p=>style(_el$2,props.childStyles[LABEL_SELECTOR],_$p)),_el$2}})}}),createComponent(Show,{get when(){return createMemo(()=>props.buttonType!=="label")()&&["right","bottom"].includes(props.iconPlacement)},get children(){return icon()}})]}init_element_styles();var _tmpl$6=template("<button>"),AppBarButtonComponent_default=createElement_default(AppBarButtonComponent,void 0,element=>{let props=buttonProperties(element);return{properties:{...props.properties},styles:[...props.styles,...placedStyling(element)]}});function AppBarButtonComponent(props){return(()=>{var _el$=_tmpl$6();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ButtonInternals,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,"flex-aligned-button":props.buttonType!=="label",[props.instance.get_static_property("app_bar_button_type")]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator201=__toESM(require_web_dom_collections_iterator());init_solid();init_colors();init_mobile();init_element_eval();init_define_process_env();init_shim();init_mobile();function toDeviceName(){let possibleName=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DEFAULT_MOBILE_DEVICE;return possibleName in MOBILE_DEVICES?possibleName:DEFAULT_MOBILE_DEVICE}function getDefaultDevice(){let device=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DEFAULT_MOBILE_DEVICE;return MOBILE_DEVICES[toDeviceName(device)]}init_element_styles();init_properties();var _tmpl$7=template('<div class=app-bar-buttons-tray><div class="app-bar-buttons left"></div><div class="app-bar-buttons right">'),_tmpl$23=template('<div class="app-bar-buttons right">'),_tmpl$32=template("<div><span class=app-bar-title>"),_tmpl$42=template('<div class="app-bar-buttons left">'),TITLE_CLASS="app-bar-title",TITLE_SELECTOR=` .${TITLE_CLASS}`,AppBarComponent_default=createElement_default(AppBarComponent,void 0,element=>({properties:{title:new Property(instance4=>evaluate_property(instance4,"title"),{fallback:""}),titleStyle:new Property(instance4=>{var _instance$parent;let deviceName=(_instance$parent=instance4.parent())==null?void 0:_instance$parent.element.get_static_property("default_view_size");return getDefaultDevice(deviceName).os==="ios"?evaluate_property(instance4,"title_style_ios"):evaluate_property(instance4,"title_style_android")},{fallback:"center"})},styles:[...basicStyling(element),new Style(instance4=>{var _evaluate_property;return{color:(_evaluate_property=evaluate_property(instance4,"title_color"))!=null?_evaluate_property:TEXT_DEFAULT}},{selector:TITLE_SELECTOR}),new Style(instance4=>({"border-bottom":evaluate_property(instance4,"show_bottom_border")&&evaluate_property(instance4,"background_style")!=="none"?"1px solid #d8d8d8":"none"}))]}));function AppBarComponent(props){let buttons=children(()=>props.children),getButtons=side=>buttons.toArray().filter(el=>el instanceof Element&&el.querySelector(`.${side}`)!=null);return(()=>{var _el$=_tmpl$32(),_el$5=_el$.firstChild;use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(Show,{get when(){return props.titleStyle==="large"},get fallback(){return(()=>{var _el$7=_tmpl$42();return insert(_el$7,()=>getButtons("leading")),_el$7})()},get children(){var _el$2=_tmpl$7(),_el$3=_el$2.firstChild,_el$4=_el$3.nextSibling;return insert(_el$3,()=>getButtons("leading")),insert(_el$4,()=>getButtons("trailing")),_el$2}}),_el$5),insert(_el$5,()=>props.title),insert(_el$,createComponent(Show,{get when(){return props.titleStyle!=="large"},get children(){var _el$6=_tmpl$23();return insert(_el$6,()=>getButtons("trailing")),_el$6}}),null),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,"padding-top":`${SAFE_AREA_TOP}px`},_v$3={...props.classList,[props.titleStyle]:!0},_v$4=props.childStyles[TITLE_SELECTOR];return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$.o=style(_el$5,_v$4,_p$.o),_p$},{e:void 0,t:void 0,a:void 0,o:void 0}),_el$})()}init_define_process_env();init_shim();function buttonFieldNames(props){var _props$default_type;return{button_type:{default:(_props$default_type=props==null?void 0:props.default_type)!=null?_props$default_type:"label",no_states:!0,only_edit_mode:!0},text:{default:"...edit me..."},icon_placement:{default:"left"},icon:{default:"fa fa-square-o"},icon_size:{default:24,in_style:!0},icon_color:{default:"var(--color_primary_contrast_default)",in_style:!0},button_horiz_alignment:{default:"center"},button_vert_alignment:{default:"center"},button_gap:{default:8,in_style:!0},editor_preview_button:{no_states:!0,only_edit_mode:!0}}}function buttonPropertiesForName(element){return element.get_static_property("button_type")==="icon"?["icon"]:["text"]}var icons_exports2={};__export(icons_exports2,{ICON_SIZE:()=>ICON_SIZE,get_default_icon:()=>get_default_icon,get_default_icon_for_parent:()=>get_default_icon_for_parent,get_icon_svg:()=>get_icon_svg,get_static_icon:()=>get_static_icon,get_svg_canvas:()=>get_svg_canvas});init_define_process_env();init_shim();var import_es_string_replace46=__toESM(require_es_string_replace());init_define_process_env();init_shim();var icons={"fa-superscript":"\uF12B","fa-delicious":"\uF1A5","fa-bathtub":"\uF2CD","fa-s15":"\uF2CD","fa-bath":"\uF2CD","fa-podcast":"\uF2CE","fa-hdd-o":"\uF0A0","fa-vcard-o":"\uF2BC","fa-address-card-o":"\uF2BC","fa-odnoklassniki":"\uF263","fa-openid":"\uF19B","fa-joomla":"\uF1AA","fa-neuter":"\uF22C","fa-angle-double-up":"\uF102","fa-deviantart":"\uF1BD","fa-sliders":"\uF1DE","fa-viadeo-square":"\uF2AA","fa-lock":"\uF023","fa-quora":"\uF2C4","fa-safari":"\uF267","fa-drivers-license":"\uF2C2","fa-id-card":"\uF2C2","fa-circle":"\uF111","fa-bus":"\uF207","fa-glide":"\uF2A5","fa-bold":"\uF032","fa-flag":"\uF024","fa-search-plus":"\uF00E","fa-hotel":"\uF236","fa-bed":"\uF236","fa-linode":"\uF2B8","fa-trash":"\uF1F8","fa-snapchat-ghost":"\uF2AC","fa-cny":"\uF157","fa-rmb":"\uF157","fa-yen":"\uF157","fa-jpy":"\uF157","fa-subscript":"\uF12C","fa-battery-4":"\uF240","fa-battery":"\uF240","fa-battery-full":"\uF240","fa-thumbs-o-up":"\uF087","fa-tint":"\uF043","fa-user-md":"\uF0F0","fa-tripadvisor":"\uF262","fa-bitcoin":"\uF15A","fa-btc":"\uF15A","fa-file-word-o":"\uF1C2","fa-refresh":"\uF021","fa-cc-diners-club":"\uF24C","fa-sort-alpha-desc":"\uF15E","fa-mortar-board":"\uF19D","fa-graduation-cap":"\uF19D","fa-mars-double":"\uF227","fa-text-width":"\uF035","fa-shopping-cart":"\uF07A","fa-minus-circle":"\uF056","fa-compass":"\uF14E","fa-twitter-square":"\uF081","fa-genderless":"\uF22D","fa-leaf":"\uF06C","fa-arrows-h":"\uF07E","fa-window-maximize":"\uF2D0","fa-hand-o-down":"\uF0A7","fa-free-code-camp":"\uF2C5","fa-arrow-circle-o-down":"\uF01A","fa-hand-lizard-o":"\uF258","fa-asterisk":"\uF069","fa-modx":"\uF285","fa-pie-chart":"\uF200","fa-square-o":"\uF096","fa-magic":"\uF0D0","fa-qrcode":"\uF029","fa-yahoo":"\uF19E","fa-gears":"\uF085","fa-cogs":"\uF085","fa-spotify":"\uF1BC","fa-bullseye":"\uF140","fa-twitch":"\uF1E8","fa-signal":"\uF012","fa-user-secret":"\uF21B","fa-check-square":"\uF14A","fa-spoon":"\uF1B1","fa-cloud":"\uF0C2","fa-calculator":"\uF1EC","fa-camera":"\uF030","fa-video-camera":"\uF03D","fa-gift":"\uF06B","fa-hourglass-2":"\uF252","fa-hourglass-half":"\uF252","fa-mercury":"\uF223","fa-street-view":"\uF21D","fa-chevron-circle-left":"\uF137","fa-edit":"\uF044","fa-pencil-square-o":"\uF044","fa-terminal":"\uF120","fa-dashcube":"\uF210","fa-github-alt":"\uF113","fa-volume-off":"\uF026","fa-headphones":"\uF025","fa-hourglass-o":"\uF250","fa-train":"\uF238","fa-send-o":"\uF1D9","fa-paper-plane-o":"\uF1D9","fa-subway":"\uF239","fa-500px":"\uF26E","fa-random":"\uF074","fa-expand":"\uF065","fa-beer":"\uF0FC","fa-thumb-tack":"\uF08D","fa-shirtsinbulk":"\uF214","fa-map-o":"\uF278","fa-fa":"\uF2B4","fa-font-awesome":"\uF2B4","fa-chevron-left":"\uF053","fa-hand-grab-o":"\uF255","fa-hand-rock-o":"\uF255","fa-slideshare":"\uF1E7","fa-cc-stripe":"\uF1F5","fa-play-circle":"\uF144","fa-eercast":"\uF2DA","fa-wheelchair":"\uF193","fa-slack":"\uF198","fa-automobile":"\uF1B9","fa-car":"\uF1B9","fa-opencart":"\uF23D","fa-scribd":"\uF28A","fa-remove":"\uF00D","fa-close":"\uF00D","fa-times":"\uF00D","fa-object-group":"\uF247","fa-lastfm":"\uF202","fa-smile-o":"\uF118","fa-object-ungroup":"\uF248","fa-cloud-upload":"\uF0EE","fa-align-right":"\uF038","fa-i-cursor":"\uF246","fa-circle-thin":"\uF1DB","fa-comment":"\uF075","fa-recycle":"\uF1B8","fa-wikipedia-w":"\uF266","fa-soccer-ball-o":"\uF1E3","fa-futbol-o":"\uF1E3","fa-cc-paypal":"\uF1F4","fa-arrows-alt":"\uF0B2","fa-turkish-lira":"\uF195","fa-try":"\uF195","fa-venus":"\uF221","fa-chevron-up":"\uF077","fa-map":"\uF279","fa-flickr":"\uF16E","fa-bookmark-o":"\uF097","fa-user":"\uF007","fa-handshake-o":"\uF2B5","fa-y-combinator-square":"\uF1D4","fa-yc-square":"\uF1D4","fa-hacker-news":"\uF1D4","fa-arrow-circle-up":"\uF0AA","fa-angle-left":"\uF104","fa-hand-peace-o":"\uF25B","fa-building":"\uF1AD","fa-envelope-open":"\uF2B6","fa-legal":"\uF0E3","fa-gavel":"\uF0E3","fa-moon-o":"\uF186","fa-play-circle-o":"\uF01D","fa-thermometer-1":"\uF2CA","fa-thermometer-quarter":"\uF2CA","fa-level-up":"\uF148","fa-mail-reply-all":"\uF122","fa-reply-all":"\uF122","fa-folder":"\uF07B","fa-copy":"\uF0C5","fa-files-o":"\uF0C5","fa-mouse-pointer":"\uF245","fa-paperclip":"\uF0C6","fa-hand-o-left":"\uF0A5","fa-github":"\uF09B","fa-exclamation":"\uF12A","fa-yc":"\uF23B","fa-y-combinator":"\uF23B","fa-flask":"\uF0C3","fa-eject":"\uF052","fa-forumbee":"\uF211","fa-hand-pointer-o":"\uF25A","fa-stumbleupon-circle":"\uF1A3","fa-calendar-o":"\uF133","fa-stop-circle-o":"\uF28E","fa-sort-amount-desc":"\uF161","fa-windows":"\uF17A","fa-meh-o":"\uF11A","fa-toggle-off":"\uF204","fa-xing":"\uF168","fa-server":"\uF233","fa-creative-commons":"\uF25E","fa-toggle-down":"\uF150","fa-caret-square-o-down":"\uF150","fa-yoast":"\uF2B1","fa-toggle-up":"\uF151","fa-caret-square-o-up":"\uF151","fa-arrows-v":"\uF07D","fa-gbp":"\uF154","fa-chevron-down":"\uF078","fa-underline":"\uF0CD","fa-print":"\uF02F","fa-vimeo":"\uF27D","fa-flag-o":"\uF11D","fa-pagelines":"\uF18C","fa-vcard":"\uF2BB","fa-address-card":"\uF2BB","fa-exclamation-circle":"\uF06A","fa-user-plus":"\uF234","fa-cc-visa":"\uF1F0","fa-folder-open-o":"\uF115","fa-file-zip-o":"\uF1C6","fa-file-archive-o":"\uF1C6","fa-wpbeginner":"\uF297","fa-paypal":"\uF1ED","fa-newspaper-o":"\uF1EA","fa-sign-out":"\uF08B","fa-bitbucket-square":"\uF172","fa-text-height":"\uF034","fa-align-center":"\uF037","fa-google-wallet":"\uF1EE","fa-plus-circle":"\uF055","fa-angle-double-left":"\uF100","fa-whatsapp":"\uF232","fa-question":"\uF128","fa-italic":"\uF033","fa-git-square":"\uF1D2","fa-opera":"\uF26A","fa-arrow-circle-left":"\uF0A8","fa-anchor":"\uF13D","fa-plug":"\uF1E6","fa-cubes":"\uF1B3","fa-yelp":"\uF1E9","fa-list-ul":"\uF0CA","fa-list-ol":"\uF0CB","fa-thumbs-up":"\uF164","fa-arrow-circle-o-up":"\uF01B","fa-phone-square":"\uF098","fa-adjust":"\uF042","fa-volume-up":"\uF028","fa-unlock":"\uF09C","fa-step-forward":"\uF051","fa-header":"\uF1DC","fa-drupal":"\uF1A9","fa-comments":"\uF086","fa-amazon":"\uF270","fa-caret-up":"\uF0D8","fa-fire-extinguisher":"\uF134","fa-film":"\uF008","fa-dropbox":"\uF16B","fa-comment-o":"\uF0E5","fa-tencent-weibo":"\uF1D5","fa-internet-explorer":"\uF26B","fa-medium":"\uF23A","fa-arrow-right":"\uF061","fa-lastfm-square":"\uF203","fa-drivers-license-o":"\uF2C3","fa-id-card-o":"\uF2C3","fa-hand-o-up":"\uF0A6","fa-facebook-f":"\uF09A","fa-facebook":"\uF09A","fa-bell":"\uF0F3","fa-gear":"\uF013","fa-cog":"\uF013","fa-minus":"\uF068","fa-globe":"\uF0AC","fa-retweet":"\uF079","fa-bullhorn":"\uF0A1","fa-mobile-phone":"\uF10B","fa-mobile":"\uF10B","fa-snapchat":"\uF2AB","fa-sort-alpha-asc":"\uF15D","fa-css3":"\uF13C","fa-envira":"\uF299","fa-leanpub":"\uF212","fa-align-justify":"\uF039","fa-code-fork":"\uF126","fa-angle-double-right":"\uF101","fa-xing-square":"\uF169","fa-bookmark":"\uF02E","fa-vine":"\uF1CA","fa-square":"\uF0C8","fa-stack-exchange":"\uF18D","fa-houzz":"\uF27C","fa-user-times":"\uF235","fa-get-pocket":"\uF265","fa-envelope":"\uF0E0","fa-qq":"\uF1D6","fa-linkedin":"\uF0E1","fa-glide-g":"\uF2A6","fa-deafness":"\uF2A4","fa-hard-of-hearing":"\uF2A4","fa-deaf":"\uF2A4","fa-life-bouy":"\uF1CD","fa-life-buoy":"\uF1CD","fa-life-saver":"\uF1CD","fa-support":"\uF1CD","fa-life-ring":"\uF1CD","fa-digg":"\uF1A6","fa-keyboard-o":"\uF11C","fa-snowflake-o":"\uF2DC","fa-suitcase":"\uF0F2","fa-tty":"\uF1E4","fa-balance-scale":"\uF24E","fa-ellipsis-h":"\uF141","fa-battery-3":"\uF241","fa-battery-three-quarters":"\uF241","fa-file-pdf-o":"\uF1C1","fa-circle-o":"\uF10C","fa-pause-circle":"\uF28B","fa-flag-checkered":"\uF11E","fa-rotate-left":"\uF0E2","fa-undo":"\uF0E2","fa-send":"\uF1D8","fa-paper-plane":"\uF1D8","fa-cc-amex":"\uF1F3","fa-contao":"\uF26D","fa-star-half":"\uF089","fa-google-plus-square":"\uF0D4","fa-indent":"\uF03C","fa-angellist":"\uF209","fa-trash-o":"\uF014","fa-cart-arrow-down":"\uF218","fa-wpexplorer":"\uF2DE","fa-bandcamp":"\uF2D5","fa-music":"\uF001","fa-skype":"\uF17E","fa-trello":"\uF181","fa-black-tie":"\uF27E","fa-long-arrow-down":"\uF175","fa-google":"\uF1A0","fa-stethoscope":"\uF0F1","fa-caret-down":"\uF0D7","fa-battery-2":"\uF242","fa-battery-half":"\uF242","fa-cab":"\uF1BA","fa-taxi":"\uF1BA","fa-cc":"\uF20A","fa-cc-mastercard":"\uF1F1","fa-commenting-o":"\uF27B","fa-hashtag":"\uF292","fa-gitlab":"\uF296","fa-cc-jcb":"\uF24B","fa-check":"\uF00C","fa-user-circle-o":"\uF2BE","fa-history":"\uF1DA","fa-times-circle-o":"\uF05C","fa-bar-chart-o":"\uF080","fa-bar-chart":"\uF080","fa-bell-slash":"\uF1F6","fa-clone":"\uF24D","fa-briefcase":"\uF0B1","fa-glass":"\uF000","fa-calendar-minus-o":"\uF272","fa-arrow-left":"\uF060","fa-pencil-square":"\uF14B","fa-money":"\uF0D6","fa-fast-forward":"\uF050","fa-bicycle":"\uF206","fa-fighter-jet":"\uF0FB","fa-download":"\uF019","fa-ticket":"\uF145","fa-exchange":"\uF0EC","fa-user-circle":"\uF2BD","fa-map-pin":"\uF276","fa-mars-stroke-v":"\uF22A","fa-key":"\uF084","fa-imdb":"\uF2D8","fa-calendar-times-o":"\uF273","fa-simplybuilt":"\uF215","fa-battery-0":"\uF244","fa-battery-empty":"\uF244","fa-arrow-up":"\uF062","fa-maxcdn":"\uF136","fa-pied-piper-pp":"\uF1A7","fa-check-circle-o":"\uF05D","fa-chevron-right":"\uF054","fa-heart":"\uF004","fa-eye":"\uF06E","fa-cut":"\uF0C4","fa-scissors":"\uF0C4","fa-quote-right":"\uF10E","fa-sellsy":"\uF213","fa-wechat":"\uF1D7","fa-weixin":"\uF1D7","fa-search":"\uF002","fa-comments-o":"\uF0E6","fa-wordpress":"\uF19A","fa-sort-numeric-desc":"\uF163","fa-hand-spock-o":"\uF259","fa-gamepad":"\uF11B","fa-fax":"\uF1AC","fa-list-alt":"\uF022","fa-youtube":"\uF167","fa-sticky-note-o":"\uF24A","fa-ge":"\uF1D1","fa-empire":"\uF1D1","fa-gittip":"\uF184","fa-gratipay":"\uF184","fa-toggle-left":"\uF191","fa-caret-square-o-left":"\uF191","fa-tumblr":"\uF173","fa-stumbleupon":"\uF1A4","fa-tv":"\uF26C","fa-television":"\uF26C","fa-bell-o":"\uF0A2","fa-wifi":"\uF1EB","fa-inbox":"\uF01C","fa-eyedropper":"\uF1FB","fa-hospital-o":"\uF0F8","fa-ravelry":"\uF2D9","fa-building-o":"\uF0F7","fa-fort-awesome":"\uF286","fa-shopping-bag":"\uF290","fa-address-book":"\uF2B9","fa-fonticons":"\uF280","fa-feed":"\uF09E","fa-rss":"\uF09E","fa-toggle-right":"\uF152","fa-caret-square-o-right":"\uF152","fa-microphone-slash":"\uF131","fa-git":"\uF1D3","fa-medkit":"\uF0FA","fa-line-chart":"\uF201","fa-shopping-basket":"\uF291","fa-external-link-square":"\uF14C","fa-times-rectangle":"\uF2D3","fa-window-close":"\uF2D3","fa-book":"\uF02D","fa-rocket":"\uF135","fa-caret-left":"\uF0D9","fa-wpforms":"\uF298","fa-chain":"\uF0C1","fa-link":"\uF0C1","fa-ioxhost":"\uF208","fa-quote-left":"\uF10D","fa-github-square":"\uF092","fa-ban":"\uF05E","fa-universal-access":"\uF29A","fa-credit-card":"\uF09D","fa-steam-square":"\uF1B7","fa-id-badge":"\uF2C1","fa-html5":"\uF13B","fa-envelope-open-o":"\uF2B7","fa-file-code-o":"\uF1C9","fa-mail-reply":"\uF112","fa-reply":"\uF112","fa-google-plus":"\uF0D5","fa-youtube-play":"\uF16A","fa-venus-double":"\uF226","fa-stop":"\uF04D","fa-phone":"\uF095","fa-reddit-square":"\uF1A2","fa-reddit-alien":"\uF281","fa-product-hunt":"\uF288","fa-star-half-empty":"\uF123","fa-star-half-full":"\uF123","fa-star-half-o":"\uF123","fa-long-arrow-up":"\uF176","fa-ambulance":"\uF0F9","fa-won":"\uF159","fa-krw":"\uF159","fa-heartbeat":"\uF21E","fa-sign-in":"\uF090","fa-caret-right":"\uF0DA","fa-chrome":"\uF268","fa-save":"\uF0C7","fa-floppy-o":"\uF0C7","fa-female":"\uF182","fa-braille":"\uF2A1","fa-pinterest-square":"\uF0D3","fa-paragraph":"\uF1DD","fa-folder-open":"\uF07C","fa-envelope-square":"\uF199","fa-codiepie":"\uF284","fa-birthday-cake":"\uF1FD","fa-dot-circle-o":"\uF192","fa-sort-down":"\uF0DD","fa-sort-desc":"\uF0DD","fa-signing":"\uF2A7","fa-sign-language":"\uF2A7","fa-frown-o":"\uF119","fa-angle-right":"\uF105","fa-star-o":"\uF006","fa-angle-down":"\uF107","fa-space-shuttle":"\uF197","fa-arrow-circle-down":"\uF0AB","fa-arrow-circle-right":"\uF0A9","fa-soundcloud":"\uF1BE","fa-pause":"\uF04C","fa-truck":"\uF0D1","fa-hand-stop-o":"\uF256","fa-hand-paper-o":"\uF256","fa-credit-card-alt":"\uF283","fa-file-photo-o":"\uF1C5","fa-file-picture-o":"\uF1C5","fa-file-image-o":"\uF1C5","fa-level-down":"\uF149","fa-backward":"\uF04A","fa-eye-slash":"\uF070","fa-euro":"\uF153","fa-eur":"\uF153","fa-behance":"\uF1B4","fa-crosshairs":"\uF05B","fa-certificate":"\uF0A3","fa-copyright":"\uF1F9","fa-meetup":"\uF2E0","fa-thumbs-o-down":"\uF088","fa-thermometer-0":"\uF2CB","fa-thermometer-empty":"\uF2CB","fa-meanpath":"\uF20C","fa-arrows":"\uF047","fa-fast-backward":"\uF049","fa-vk":"\uF189","fa-map-marker":"\uF041","fa-bell-slash-o":"\uF1F7","fa-venus-mars":"\uF228","fa-map-signs":"\uF277","fa-filter":"\uF0B0","fa-calendar-plus-o":"\uF271","fa-language":"\uF1AB","fa-warning":"\uF071","fa-exclamation-triangle":"\uF071","fa-bluetooth-b":"\uF294","fa-minus-square-o":"\uF147","fa-home":"\uF015","fa-plane":"\uF072","fa-chevron-circle-up":"\uF139","fa-android":"\uF17B","fa-volume-down":"\uF027","fa-institution":"\uF19C","fa-bank":"\uF19C","fa-university":"\uF19C","fa-sort-amount-asc":"\uF160","fa-tumblr-square":"\uF174","fa-odnoklassniki-square":"\uF264","fa-bluetooth":"\uF293","fa-tag":"\uF02B","fa-th":"\uF00A","fa-ellipsis-v":"\uF142","fa-percent":"\uF295","fa-adn":"\uF170","fa-shekel":"\uF20B","fa-sheqel":"\uF20B","fa-ils":"\uF20B","fa-weibo":"\uF18A","fa-chevron-circle-down":"\uF13A","fa-mars":"\uF222","fa-share-square":"\uF14D","fa-search-minus":"\uF010","fa-child":"\uF1AE","fa-ruble":"\uF158","fa-rouble":"\uF158","fa-rub":"\uF158","fa-compress":"\uF066","fa-thumbs-down":"\uF165","fa-check-circle":"\uF058","fa-heart-o":"\uF08A","fa-tags":"\uF02C","fa-facebook-square":"\uF082","fa-asl-interpreting":"\uF2A3","fa-american-sign-language-interpreting":"\uF2A3","fa-motorcycle":"\uF21C","fa-paste":"\uF0EA","fa-clipboard":"\uF0EA","fa-question-circle":"\uF059","fa-cutlery":"\uF0F5","fa-hourglass-3":"\uF253","fa-hourglass-end":"\uF253","fa-clock-o":"\uF017","fa-archive":"\uF187","fa-times-rectangle-o":"\uF2D4","fa-window-close-o":"\uF2D4","fa-bug":"\uF188","fa-codepen":"\uF1CB","fa-mail-forward":"\uF064","fa-share":"\uF064","fa-mars-stroke":"\uF229","fa-file-excel-o":"\uF1C3","fa-commenting":"\uF27A","fa-behance-square":"\uF1B5","fa-folder-o":"\uF114","fa-microphone":"\uF130","fa-h-square":"\uF0FD","fa-etsy":"\uF2D7","fa-vimeo-square":"\uF194","fa-ship":"\uF21A","fa-google-plus-circle":"\uF2B3","fa-google-plus-official":"\uF2B3","fa-info-circle":"\uF05A","fa-table":"\uF0CE","fa-shower":"\uF2CC","fa-buysellads":"\uF20D","fa-dollar":"\uF155","fa-usd":"\uF155","fa-themeisle":"\uF2B2","fa-user-o":"\uF2C0","fa-columns":"\uF0DB","fa-camera-retro":"\uF083","fa-star":"\uF005","fa-edge":"\uF282","fa-file-text-o":"\uF0F6","fa-rss-square":"\uF143","fa-laptop":"\uF109","fa-calendar-check-o":"\uF274","fa-area-chart":"\uF1FE","fa-pinterest":"\uF0D2","fa-plus-square":"\uF0FE","fa-envelope-o":"\uF003","fa-window-restore":"\uF2D2","fa-eraser":"\uF12D","fa-trophy":"\uF091","fa-battery-1":"\uF243","fa-battery-quarter":"\uF243","fa-arrow-circle-o-left":"\uF190","fa-foursquare":"\uF180","fa-sitemap":"\uF0E8","fa-hourglass-1":"\uF251","fa-hourglass-start":"\uF251","fa-desktop":"\uF108","fa-gg":"\uF260","fa-rotate-right":"\uF01E","fa-repeat":"\uF01E","fa-calendar":"\uF073","fa-stop-circle":"\uF28D","fa-intersex":"\uF224","fa-transgender":"\uF224","fa-firefox":"\uF269","fa-file-text":"\uF15C","fa-coffee":"\uF0F4","fa-sort-up":"\uF0DE","fa-sort-asc":"\uF0DE","fa-steam":"\uF1B6","fa-hourglass":"\uF254","fa-road":"\uF018","fa-mixcloud":"\uF289","fa-lightbulb-o":"\uF0EB","fa-arrow-circle-o-right":"\uF18E","fa-flash":"\uF0E7","fa-bolt":"\uF0E7","fa-hand-scissors-o":"\uF257","fa-tree":"\uF1BB","fa-ra":"\uF1D0","fa-resistance":"\uF1D0","fa-rebel":"\uF1D0","fa-audio-description":"\uF29E","fa-spinner":"\uF110","fa-optin-monster":"\uF23C","fa-facebook-official":"\uF230","fa-jsfiddle":"\uF1CC","fa-tablet":"\uF10A","fa-navicon":"\uF0C9","fa-reorder":"\uF0C9","fa-bars":"\uF0C9","fa-long-arrow-left":"\uF177","fa-dribbble":"\uF17D","fa-volume-control-phone":"\uF2A0","fa-diamond":"\uF219","fa-group":"\uF0C0","fa-users":"\uF0C0","fa-youtube-square":"\uF166","fa-usb":"\uF287","fa-minus-square":"\uF146","fa-first-order":"\uF2B0","fa-sticky-note":"\uF249","fa-upload":"\uF093","fa-thermometer-3":"\uF2C8","fa-thermometer-three-quarters":"\uF2C8","fa-renren":"\uF18B","fa-times-circle":"\uF057","fa-pinterest-p":"\uF231","fa-linkedin-square":"\uF08C","fa-cloud-download":"\uF0ED","fa-wrench":"\uF0AD","fa-file-sound-o":"\uF1C7","fa-file-audio-o":"\uF1C7","fa-linux":"\uF17C","fa-instagram":"\uF16D","fa-snapchat-square":"\uF2AD","fa-apple":"\uF179","fa-bitbucket":"\uF171","fa-align-left":"\uF036","fa-viacoin":"\uF237","fa-long-arrow-right":"\uF178","fa-share-alt-square":"\uF1E1","fa-fire":"\uF06D","fa-font":"\uF031","fa-twitter":"\uF099","fa-circle-o-notch":"\uF1CE","fa-angle-up":"\uF106","fa-th-list":"\uF00B","fa-list":"\uF03A","fa-location-arrow":"\uF124","fa-hand-o-right":"\uF0A4","fa-plus-square-o":"\uF196","fa-toggle-on":"\uF205","fa-crop":"\uF125","fa-paw":"\uF1B0","fa-file-movie-o":"\uF1C8","fa-file-video-o":"\uF1C8","fa-dashboard":"\uF0E4","fa-tachometer":"\uF0E4","fa-at":"\uF1FA","fa-male":"\uF183","fa-th-large":"\uF009","fa-sun-o":"\uF185","fa-address-book-o":"\uF2BA","fa-window-minimize":"\uF2D1","fa-forward":"\uF04E","fa-pied-piper":"\uF2AE","fa-code":"\uF121","fa-thermometer-4":"\uF2C7","fa-thermometer":"\uF2C7","fa-thermometer-full":"\uF2C7","fa-registered":"\uF25D","fa-connectdevelop":"\uF20E","fa-share-square-o":"\uF045","fa-expeditedssl":"\uF23E","fa-barcode":"\uF02A","fa-external-link":"\uF08E","fa-check-square-o":"\uF046","fa-pause-circle-o":"\uF28C","fa-question-circle-o":"\uF29C","fa-industry":"\uF275","fa-chevron-circle-right":"\uF138","fa-transgender-alt":"\uF225","fa-thermometer-2":"\uF2C9","fa-thermometer-half":"\uF2C9","fa-grav":"\uF2D6","fa-paint-brush":"\uF1FC","fa-pencil":"\uF040","fa-skyatlas":"\uF216","fa-trademark":"\uF25C","fa-lemon-o":"\uF094","fa-assistive-listening-systems":"\uF2A2","fa-sort-numeric-asc":"\uF162","fa-pied-piper-alt":"\uF1A8","fa-power-off":"\uF011","fa-cube":"\uF1B2","fa-telegram":"\uF2C6","fa-umbrella":"\uF0E9","fa-viadeo":"\uF2A9","fa-file-o":"\uF016","fa-file-powerpoint-o":"\uF1C4","fa-angle-double-down":"\uF103","fa-plus":"\uF067","fa-database":"\uF1C0","fa-arrow-down":"\uF063","fa-microchip":"\uF2DB","fa-unsorted":"\uF0DC","fa-sort":"\uF0DC","fa-photo":"\uF03E","fa-image":"\uF03E","fa-picture-o":"\uF03E","fa-wheelchair-alt":"\uF29B","fa-mars-stroke-h":"\uF22B","fa-magnet":"\uF076","fa-file":"\uF15B","fa-step-backward":"\uF048","fa-unlink":"\uF127","fa-chain-broken":"\uF127","fa-strikethrough":"\uF0CC","fa-reddit":"\uF1A1","fa-superpowers":"\uF2DD","fa-bomb":"\uF1E2","fa-cart-plus":"\uF217","fa-cc-discover":"\uF1F2","fa-gg-circle":"\uF261","fa-share-alt":"\uF1E0","fa-stack-overflow":"\uF16C","fa-unlock-alt":"\uF13E","fa-play":"\uF04B","fa-low-vision":"\uF2A8","fa-binoculars":"\uF1E5","fa-puzzle-piece":"\uF12E","fa-blind":"\uF29D","fa-dedent":"\uF03B","fa-outdent":"\uF03B","fa-shield":"\uF132","fa-info":"\uF129","fa-tasks":"\uF0AE","fa-rupee":"\uF156","fa-inr":"\uF156"},ICONS_CONTENT=icons;init_appquery();function get_icon_element(){let element=$("#bubble-icon-retriever")[0];return element!=null||(element=$('<div id="bubble-icon-retriever" style="display: none; position: absolute;"></div>')[0],document.body.appendChild(element)),element}var orig_get_computed_style;function retrieve_get_computed_style(){let temp_iframe=document.createElement("iframe");document.body.appendChild(temp_iframe);let gcs=temp_iframe.contentWindow.getComputedStyle;return temp_iframe.remove(),gcs}var getComputedStyle2=function(){var _orig_get_computed_st;(_orig_get_computed_st=orig_get_computed_style)!=null||(orig_get_computed_style=retrieve_get_computed_style());for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return orig_get_computed_style.apply(window,args)};function get_icon_content(icon_class){let icon_info_element=get_icon_element();return icon_info_element.setAttribute("class",icon_class),getComputedStyle2(icon_info_element,":before").content.replace(/"/g,"")}function get_static_icon(icon){return ICONS_CONTENT[icon]}var _cached_icons={},ICON_SIZE=50;function get_icon_svg(base_class,icon_class){var _cached_icons$icon_cl;let icon_content=(_cached_icons$icon_cl=_cached_icons[icon_class])!=null?_cached_icons$icon_cl:_cached_icons[icon_class]=get_icon_content(icon_class);return get_svg_canvas(base_class,icon_content)}function get_svg_canvas(base_class,icon_content){let offset_x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,offset_y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-18,text_anchor=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"middle",svg_canvas=$(`<svg viewbox="${offset_x} ${offset_y} ${ICON_SIZE} ${ICON_SIZE}">
    <text class="${base_class}" x="50%" y="50%" text-anchor="${text_anchor}" style="font-size: 50px;fill: currentColor;">
        ${icon_content}
    </text>
</svg>`);return svg_canvas.css({width:"100%",height:"100%"}),svg_canvas}function get_default_icon_for_parent(parent){let root2=parent==null?void 0:parent.root();return root2==null||root2.is_mobile()?get_default_icon():root2.get_responsive_version()<1||appquery_default.get_public_setting("bubble_version")<21?to_icon_string(getDefaultIcon("fa")):get_default_icon()}function get_default_icon(){var _appquery$get_public_;let type=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"inactive",last_used_set=(_appquery$get_public_=appquery_default.get_public_setting("default_icon_set"))!=null?_appquery$get_public_:"material";return to_icon_string(getDefaultIcon(last_used_set,type))}make_element("AppBar",{display:"App Bar",category:"containers",glyph_id:"table",list_order:1,keyboard_shortcut:null,defaults:{width:100,height:100},field_names:{title_style_ios:{default:"center"},title_style_android:{default:"left"},title:{default:""},title_color:{default:TEXT_DEFAULT},show_bottom_border:{no_states:!0},show_back_button:{no_states:!0},override_back_label:{default:!1,no_states:!0},back_label:{default:""}},uses_css_responsive:!0,is_pseudo:!0,is_restricted_container:!0,cant_delete(){return!0},always_visible:!0,solid_component:AppBarComponent_default,can_fit_width:!0,can_fit_height:!0,no_margins(){return!0},not_draggable(){return!0},goes_on_document(){return!0},added_to_container(){return!1},attach_to_body(){return!1},draws_own_children(){return!0},property_applications:[new property_applications_default.Background],change_cursor_style_if_clickable:!0,padding_display(instance4,side){return side==="top"?SAFE_AREA_TOP:0},standard_container_layout:"app_bar",generate_name(element){return"App Bar"},can_defer_drawing(){return!0},get_min_width(){return 0},register(instance4){},get_html(instance4){return"<div></div>"},initialize(instance4){},is_input:!1,contains_group_data:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},events:[],add_an_invisible_div_on_the_top:!1});make_element("AppBarButton",{display:"App Bar Button",category:"visual elements",glyph_id:"button",list_order:3,keyboard_shortcut:null,defaults:{width:50,height:40,background_style:"none",border_style:"none",button_gap:8,title:"",icon:"fa fa-square-o",icon_placement:"left",icon_size:24,icon_color:PRIMARY_DEFAULT,button_vert_alignment:"center",font_family:DEFAULT_CSS_TOKEN,font_weight:"400",font_size:16,font_color:PRIMARY_DEFAULT,text_align:"center",line_height:1.5},field_names:{app_bar_button_type:{default:"leading",no_states:!0},...buttonFieldNames(),...start_workflow_field_names},properties_for_new:{icon:()=>get_default_icon()},properties_for_name:buttonPropertiesForName,extra_layout_props:BUTTON_PROPERTIES,uses_css_responsive:!0,is_pseudo:!0,generate_name(element){var _element$parent$eleme,_element$parent;return`${element.get_static_property("app_bar_button_type")==="leading"?"Leading":"Trailing"} Button ${((_element$parent$eleme=(_element$parent=element.parent())==null?void 0:_element$parent.elements().filter(other=>other.get_static_property("app_bar_button_type")===element.get_static_property("app_bar_button_type")&&other.get_static_property("order")<element.get_static_property("order")).length)!=null?_element$parent$eleme:0)+1}`},solid_component:AppBarButtonComponent_default,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.FontSpacing,new property_applications_default.Border,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},get_min_width(){return 0},register(instance4){},get_html(instance4){return"<div></div>"},initialize(instance4){},is_input:!1,contains_group_data:!1,events:["ButtonClicked","ElementPressed"],add_an_invisible_div_on_the_top:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator202=__toESM(require_web_dom_collections_iterator());init_lodash();init_u2();init_hydrate();init_mode_check();init_lib();init_property_applications();init_btypes();init_b_location();init_location_lookups();init_languages();init_logger();init_webfonts();init_element_utils();init_page_state();init_element_eval();init_element_props();init_elements();init_color_tokens();make_element("AutocompleteDropdown",{category:"input forms",display:"Search Box",glyph_id:"search",list_order:5,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:extend({},default_for_inputs,{width:400,height:45,use_max_width:!0,max_width:150}),updated_default_sizing:{width:250,height:48},default_states:void 0,properties_for_new:{no_language:!0},field_names:extend({placeholder:{default:"Start typing..."},choices_style:{default:"dynamic",no_states:!0},choices:{no_states:!0},data_source:{no_states:!0},field_to_search:{no_states:!0},no_language:{no_states:!0},location:{optional:!0},radius:{optional:!0},default:{optional:!0},allow_not_in_list:{no_states:!0},mandatory:{},ac_list_max:{default:10}},get_disabled_field_name,get_auto_binding_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background("input:first-of-type"),new property_applications_default.Border("input"),new property_applications_default.BoxShadow("input:first-of-type"),new property_applications_default.Font("input"),new property_applications_default.FontSpacing("input",["line_height"]),new property_applications_default.InputPadding("input"),new property_applications_default.PaddingFields({selector:"input",minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.PlaceholderColor("input"),new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,get_html(instance4){return"<div></div>"},get_min_width(element){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{var _instance$element$roo;let canvas=instance4.get_canvas(),input_div=$('<input type="text"></input>');reset_input_div(input_div),input_div[0].style["box-sizing"]="border-box",canvas.append(input_div),canvas[0].style.overflow="visible",((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())>0?input_div.css({height:"100%",width:"100%"}):(pre_cache(instance4,["height","width"]),instance4.autorun(()=>{let changes={};for(let prop of["height","width"])changes[prop]=evaluate_property(instance4,prop);canvas.find("input").css({height:changes.height,width:changes.width})}),register_tab_index_listener(instance4,tabindex=>{input_div.attr("tabindex",tabindex)}));let object_value_matcher={},text_match_to_field_name={},choices_style=instance4.get_static_property("choices_style"),field_to_search=instance4.get_static_property("field_to_search"),field_to_display=instance4.get_static_property("field_to_display"),google_place_id_store={},google_place_id_to_name_store={},val_to_text=(val,searched_field)=>{if(val==null)return"";if(choices_style==="geographic_places")return instance4.edit_mode()&&!instance4.element.property("default").is_static()?instance4.element.property("default").get_tree_display():get5("geographic_address").runmode_display(val);if(choices_style==="dynamic"){let text2=val.child(field_to_search).get();if(object_value_matcher[text2]!=null&&object_value_matcher[text2]!==val){let found=!1,similar_entries=0;for(let[t,v]of Object.entries(object_value_matcher))if((t===text2||t.indexOf(text2+" (")===0)&&(similar_entries++,isEqual_default(dehydrate_tree(val),dehydrate_tree(v)))){text2=t,found=!0;break}found||(text2=text2+" ("+similar_entries+")")}return object_value_matcher[text2]=val,text2}else return choices_style==="algolia_search"?val.child(searched_field!=null?searched_field:field_to_display).get():val},text_to_value=text2=>{if(choices_style=instance4.get_static_property("choices_style"),choices_style==="geographic_places"){let fn,place_id=google_place_id_store[text2];return place_id?(fn=function(){let place_name=google_place_id_to_name_store[place_id],place=from_place_id(place_id);return place&&(place.name=place_name),place},fn.toUniqueString=()=>place_id):(fn=()=>from_address(text2),fn.toUniqueString=()=>text2),fn}else return["dynamic","algolia_search"].includes(choices_style)?object_value_matcher[text2]:this._get_static_choices(instance4).includes(text2)?text2:null};if(instance4.autorun(()=>{input_div.focus(()=>{input_focused(!0)}),input_div.blur(()=>{input_focused(!1)}),input_div.attr("placeholder",evaluate_property(instance4,"placeholder"))}),instance4.autorun(()=>{is_rtl(lib_default().app_language())?canvas.find("input").attr("dir","rtl"):canvas.find("input").attr("dir","ltr")}),instance4.run_mode()){let clear_input2=function(){instance4.get_static_property("allow_not_in_list")||input_div.typeahead("val","")},submit_current_text2=function(){let text2=input_div.typeahead("val");if(!text2){u_exports2.run_once(10,()=>({existing_val:instance4.state("value"),typed_content:instance4.state("typed_content")}),(err,res)=>{if(err){log(err);return}let{existing_val,typed_content}=res;(existing_val||typed_content)&&submit2(null)});return}let val=text_to_value(text2);val==null?(clear_input2(),submit2(null)):submit2(val)},submit2=function(val){["dynamic","static","algolia_search"].includes(choices_style)&&!val&&instance4.get_static_property("allow_not_in_list")?instance4.state("typed_content")!==input_div.typeahead("val")&&(instance4.state("typed_content",input_div.typeahead("val")),instance4.state("has_been_changed",!0),instance4.state("value",null),run_element_workflow(instance4,"InputChanged")):(instance4.state("typed_content",null),instance4.message("user_submit",val))};var clear_input=clear_input2,submit_current_text=submit_current_text2,submit=submit2,_instance$element$roo2;let source;switch(choices_style=instance4.get_static_property("choices_style"),choices_style){case"static":{let my_choices=this._get_static_choices(instance4).map(c=>({value:c}));source=function(q,cb){let matches=my_choices.filter(entry=>entry.value.toLowerCase().indexOf(q.trim().toLowerCase())!==-1);return cb(matches)};break}case"dynamic":{source=(q,cb)=>{if(!field_to_search){cb([]);return}u_exports2.run_once(30,()=>{let data_source=evaluate_property(instance4,"data_source");if(!data_source)return[];let new_contraint={constraint_type:/[^a-zA-Z0-9]/.exec(q)!=null?"match_phrase_prefix":"prefix_search",key:field_to_search,value:q.trim().toLowerCase(),opts:{no_language:instance4.get_static_property("no_language")}},current_eval_node2=data_source._creation_eval_node,search2=data_source.filter([new_contraint]);return search2._creation_eval_node=current_eval_node2,search2.get_children(0,evaluate_property(instance4,"ac_list_max")).map(entry=>({value:val_to_text(entry)}))},(err,matches)=>{if(err){log(err);return}return cb(matches)})};break}case"geographic_places":{load_google_map_api(),source=(q,cb)=>u_exports2.run_once(30,()=>({location:evaluate_property(instance4,"location"),radius:evaluate_property(instance4,"radius")}),(err,_ref)=>{let{location:location2,radius}=_ref;return google_place_id_store={},google_place_id_to_name_store={},get_address_place_autocomplete({input:q,location:location2,radius},entries=>{for(let entry of entries)google_place_id_store[entry.description]=entry.place_id,google_place_id_to_name_store[entry.place_id]=entry.structured_formatting.main_text;return cb(entries.map(entry=>({value:entry.description})))})});break}case"algolia_search":{let algolia_source=instance4.element.property("algolia_source"),type_to_find=algolia_source.property("type_to_find").get_static();if(field_to_search=algolia_source.property("field_to_search").get_static(),optional_modules.algolia_autocomplete_source==null)throw new UnexpectedError("Missing algolia autocomplete source");source=(query,cb)=>optional_modules.algolia_autocomplete_source({query,type_to_find,field_to_display,field_to_search,cb,cache_text_to_object:object_value_matcher,cache_text_to_field_name:text_match_to_field_name});break}default:throw new UnexpectedError("Invalid choices_style property in Autocomplete Dropdown",{choices_style})}let use_hint=evaluate_property(instance4,"font_alignment")==="left",limited_source=(q,cb)=>source(q,results=>{var _element_eval$evaluat;let sanitized_results=results.slice(0,(_element_eval$evaluat=evaluate_property(instance4,"ac_list_max"))!=null?_element_eval$evaluat:void 0);return cb(sanitized_results),style_dropdown()});input_div.typeahead({minLength:2,highlight:!0,hint:use_hint},{source:limited_source,templates:{suggestion(entry){return`<p>${escape_default(entry.value)}</p>`}}}),((_instance$element$roo2=instance4.element.root())==null?void 0:_instance$element$roo2.get_responsive_version())>0&&canvas.find(".twitter-typeahead").css("height","100%"),register_focus(instance4,input_div),canvas.find("input:first-of-type").css("border-radius",evaluate_property(instance4,"border_roundness")),instance4.on_message("set_focus",()=>input_div.focus());let dropdown_div=null,style_dropdown=()=>u_exports2.run_once(30,()=>({font_color:evaluate_property(instance4,"font_color"),font_face:get_font_face(instance4),font_size:evaluate_property(instance4,"font_size"),width:evaluate_property(instance4,"width"),border_radius:evaluate_property(instance4,"border_roundness"),is_rtl:is_rtl(lib_default().app_language())}),(err,data)=>{if(err){log(err);return}let lighter_color=lighten_color(rgb_to_hex(color_property_to_rgba(data.font_color)).code,.5);canvas.find(".tt-hint").css("color",lighter_color);let{left:left2,top:top2}=canvas.offset();is_fixed(input_div)?top2=top2+canvas.height()-1-$(window).scrollTop():top2=top2+canvas.height()-1;let options={"font-family":get_face_and_variant(data.font_face).font_family,"font-size":data.font_size+"px","min-width":data.width+"px","border-radius":data.border_radius+"px",top:top2+"px",left:left2+"px",right:"initial","z-index":1e4,position:is_fixed(canvas)?"fixed":"absolute","text-align":data.is_rtl?"right":"left"};property_applications_default.apply_css_style(dropdown_div,options),is_on_mobile_or_tablet()&&(dropdown_div.off("touchend"),dropdown_div.on("click",evt=>{var _input_div$typeahead3;evt.stopPropagation();let target=$(evt.target),text_match=target.prop("tagName")==="STRONG"?target.parent().text():target.text(),val=text_to_value(text_match);if(val)if(submit2(val),choices_style==="geographic_places"){var _input_div$typeahead;(_input_div$typeahead=input_div.typeahead)==null||_input_div$typeahead.call(input_div,"val",text_match)}else u_exports2.run_once(30,()=>val_to_text(val,text_match_to_field_name[text_match]),(err2,text2)=>{var _input_div$typeahead2;if(err2){log(err2);return}(_input_div$typeahead2=input_div.typeahead)==null||_input_div$typeahead2.call(input_div,"val",text2)});else clear_input2(),submit2(null);return(_input_div$typeahead3=input_div.typeahead)==null?void 0:_input_div$typeahead3.call(input_div,"close")}))});if(instance4.wait_for_visible(()=>{dropdown_div=canvas.find(".tt-dropdown-menu"),dropdown_div.detach(),$("body").append(dropdown_div),style_dropdown()}),input_div.on("typeahead:opened touchstart",()=>style_dropdown()),instance4.on_message("reset_input",()=>{instance4.get_static_property("allow_not_in_list")&&instance4.state("typed_content",null)}),is_on_mobile_or_tablet())input_div.on("blur",()=>{submit_current_text2()});else{let last_submit=Date.now();input_div.on("typeahead:closed",()=>{(Date.now()-last_submit>200||running_test())&&(last_submit=Date.now(),submit_current_text2())}),input_div.on("blur.autocomplete",()=>{(Date.now()-last_submit>200||running_test())&&(last_submit=Date.now(),submit_current_text2())})}if(input_div.on("keydown",e=>{e.keyCode===13&&input_div.blur()}),instance4.autorun(()=>{let needs_meta_key_pressed=evaluate_property(instance4,"not_submit_on_enter");assign_enter_handler_in_input(instance4,needs_meta_key_pressed)}),choices_style==="dynamic"){let bad_value_watcher=u_exports2.Watcher(()=>{if(!instance4.state("has_been_changed"))return!1;let val=instance4.state("value");if(val==null)return!1;let dynamic_list=evaluate_property(instance4,"data_source");if(!dynamic_list)return!0;let btype=get5(instance4.element.property("data_source").property("type_to_find").json.get());return!dynamic_list.contains(val,btype)});instance4.on_destroy(()=>bad_value_watcher.destroy()),bad_value_watcher.on_value(is_bad=>{is_bad&&instance4.message("reset_input")})}instance4.on_destroy(()=>{var _input_div$typeahead4;return(_input_div$typeahead4=input_div.typeahead)==null?void 0:_input_div$typeahead4.call(input_div,"destroy")}),on_property_change(instance4,"disabled",value=>input_div[0].disabled=value)}input_change_autorun(instance4,val=>{let text2=val_to_text(val);if(instance4.run_mode()){var _input_div$typeahead5;(_input_div$typeahead5=input_div.typeahead)==null||_input_div$typeahead5.call(input_div,"val",text2)}else input_div.val(text2)})})},_get_static_choices(instance4){let choices=instance4.get_static_property("choices");return typeof choices!="string"&&(choices=""),choices.split(`
`).map(c=>c.trim())},get_starting_content(instance4){let starting_value;if(instance4.run_mode()&&instance4.get_static_property("auto_binding")?starting_value=get_input_autobind_thing_field(instance4):starting_value=evaluate_property(instance4,"default"),starting_value==null)return null;let choices_style=instance4.get_static_property("choices_style");if(choices_style==="geographic_places"){if(!instance4.run_mode()&&!instance4.element.property("default").is_static()&&(starting_value={address:starting_value}),!get5("geographic_address").runmode_display(starting_value)&&(starting_value=from_address(starting_value),!get5("geographic_address").runmode_display(starting_value)))return null}else if(choices_style==="static"){if(this._get_static_choices(instance4).indexOf(starting_value)===-1)return null}else{let choice_list=evaluate_property(instance4,"data_source"),btype=get5(instance4.element.property("data_source").property("type_to_find").get_static());if(!choice_list||!choice_list.contains(starting_value,btype))return null}return starting_value},content_validated(val,instance4){if(!evaluate_property(instance4,"mandatory")||val!=null)return!0;if(instance4.get_static_property("allow_not_in_list"))return instance4.state("typed_content")!=null},get_state_value(element,name){var _element$property$pro,_element$property$pro2;if(name==="value")switch(element.get_static_property("choices_style")){case"static":return"text";case"geographic_places":return"geographic_address";case"dynamic":return(_element$property$pro=element.property("data_source").property("type_to_find").json.get())!=null?_element$property$pro:"text";case"algolia_search":return(_element$property$pro2=element.property("algolia_source").property("type_to_find").json.get())!=null?_element$property$pro2:"text"}else if(name==="typed_content")return"text"},get_states(element){return["typed_content"]},add_specific_messages(messages,element){if(element.get_static_property("choices_style")!=="geographic_places"&&extend(messages,{get_typed_content:{description:"'s typed text",is_client_state(){return!0},section:"States",ret_btype:"text",fn(a,b,properties,_raw3,context){var _a$state;return(_a$state=a==null?void 0:a.state("typed_content"))!=null?_a$state:this.ret_btype_null()}}}),element.get_static_property("choices_style")==="geographic_places")return extend(messages,{get_place_name:{description:"'s place name",is_client_state(){return!0},section:"States",ret_btype:"text",fn(a,b,properties,_raw3,context){var _a$state$name;return(a==null?void 0:a.state("value"))?(_a$state$name=a==null?void 0:a.state("value").name)!=null?_a$state$name:this.ret_btype_null():this.ret_btype_null()}}})},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!0,contains_group_data:!1,only_send_to_client_in_runmode:!0,jquery_plugins(){return["jquery_plugins/typeahead.jquery.min"]},css_files:["css/optional/typeahead.css"]});init_define_process_env();init_shim();init_element_eval();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator203=__toESM(require_web_dom_collections_iterator());init_solid();init_elements();init_appquery();init_element_styles();init_u2();var _tmpl$8=template("<button>"),ButtonComponent_default=createElement_default(ButtonComponent,void 0,element=>{var _element$root,_element$json$path;let props=buttonProperties(element,(_element$root=element.root())!=null&&_element$root.is_mobile()?void 0:(_element$json$path=element.json.path())!=null&&_element$json$path.startsWith("styles.")?"label_icon":!is_edit_mode()&&appquery_default.app().id()!=="test_app"&&element.element_version()<NEW_BUTTON_VERSION?"label":void 0);return{properties:{...props.properties},styles:[...placedStyling(element),...props.styles]}});function ButtonComponent(props){return(()=>{var _el$=_tmpl$8();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ButtonInternals,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={"flex-aligned-button":props.buttonType!=="label",...props.classList};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}init_responsive_layout();make_element("Button",{category:"visual elements",glyph_id:"button",list_order:2,keyboard_shortcut:null,defaults:{font_alignment:"center",font_color:"#FFFFFF",background_style:"bgcolor",bgcolor:"#7F95EB",border_style:"none",border_roundness:3,border_width:1,border_color:"#7F95EB",boxshadow_style:"none",border_style_top:"none",border_roundness_top:3,border_width_top:1,border_color_top:"#7F95EB",border_style_left:"none",border_roundness_left:3,border_width_left:1,border_color_left:"#7F95EB",border_style_bottom:"none",border_roundness_bottom:3,border_width_bottom:1,border_color_bottom:"#7F95EB",border_style_right:"none",border_roundness_right:3,border_width_right:1,border_color_right:"#7F95EB",width:150,height:44,use_max_width:!0,max_width:100,min_width:50},field_names:{...buttonFieldNames(),...start_workflow_field_names},properties_for_new:{icon:()=>get_default_icon(),single_width:!1,fit_width:!0,min_width_css:"60px"},properties_for_mobile:{min_width_css:"0px",fit_width:!1,min_height_css:"45px"},properties_for_name:buttonPropertiesForName,extra_layout_props:BUTTON_PROPERTIES,uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font(null,null,null,{condition:instance4=>instance4.get_static_property("button_type")!=="icon"}),new property_applications_default.FontShadow(null,null,null,{condition:instance4=>instance4.get_static_property("button_type")!=="icon"}),new property_applications_default.FontSpacing(null,null,null,{condition:instance4=>instance4.get_static_property("button_type")!=="icon"}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.Rotation,new property_applications_default.PaddingFields,new property_applications_default.Opacity],get_html(instance4){return"<button></button>"},change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},initialize(instance4){let canvas=instance4.get_canvas();property_applications_default.apply_css_style(canvas,{padding:"0px",cursor:"inherit",background:"none",border:"none","text-align":"left"}),instance4.wait_for_visible_lite(()=>{if(on_property_change(instance4,["text","background_style"],_ref=>{let{text:text2,background_style}=_ref;canvas.text(text2),background_style==="none"&&new property_applications_default.NoSelect()._apply(!0,canvas)}),instance4.edit_mode()&&["label_icon","icon"].includes(evaluate_property(instance4,"button_type"))&&evaluate_property(instance4,"icon_color")==null){let font_color=evaluate_property(instance4,"font_color");instance4.element.set_property("icon_color",font_color)}})},is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,events:["ButtonClicked","ElementPressed"],get_min_width(element){return 0},css_files:["css/optional/font-awesome.min.css"],solid_component:ButtonComponent_default});init_define_process_env();init_shim();init_u2();init_property_applications();init_runmode();init_element_eval();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator204=__toESM(require_web_dom_collections_iterator());init_uuid();init_runmode();init_element_styles();init_properties();init_solid();init_define_process_env();init_shim();init_solid();function createInputChange(instance4,fn){onMount(()=>{let autorun29=instance4.autorun(()=>{instance4.state("has_been_changed")||fn(instance4.state("value"))});onCleanup(()=>{autorun29.destroy()})})}init_element_eval();var _tmpl$9=template("<span class=icon-item>"),_tmpl$24=template("<label>"),_tmpl$33=template("<div><input type=checkbox>"),INPUT_SELECTOR=" input",LABEL_SELECTOR2=" label",DEFAULT_ICON_SIZE2=24,ICON_CLASS2="icon-item",ICON_SELECTOR2=` .${ICON_CLASS2}`,CheckboxComponent_default=createElement2(CheckboxComponent,null,element=>({properties:{isDisabled:new Property(instance4=>evaluate_property(instance4,"disabled")),inputType:new Property(instance4=>evaluate_property(instance4,"input_type")),label:new Property(instance4=>evaluate_property(instance4,"label")),icon:new Property(instance4=>{let icon=evaluate_property(instance4,"icon");return parse_icon(icon)}),iconPlacement:new Property(instance4=>evaluate_property(instance4,"icon_placement"))},styles:[...placedStyling(element),new Style(instance4=>{var _instance$element$roo,_instance$element$roo2,_element_eval$evaluat,_element_eval$evaluat2,_ref,_element_eval$evaluat3;return(_instance$element$roo=instance4.element.root())!=null&&(_instance$element$roo2=_instance$element$roo.is_mobile)!=null&&_instance$element$roo2.call(_instance$element$roo)?{width:`${(_element_eval$evaluat=evaluate_property(instance4,"icon_size"))!=null?_element_eval$evaluat:DEFAULT_ICON_SIZE2}px`,height:`${(_element_eval$evaluat2=evaluate_property(instance4,"icon_size"))!=null?_element_eval$evaluat2:DEFAULT_ICON_SIZE2}px`,color:(_ref=(_element_eval$evaluat3=evaluate_property(instance4,"icon_color"))!=null?_element_eval$evaluat3:evaluate_property(instance4,"font_color"))!=null?_ref:"var(--color_text_default)","flex-shrink":"0","font-size":"0px"}:{}},{selector:ICON_SELECTOR2}),new Style(instance4=>{var _instance$element$roo3,_instance$element$roo4;return(_instance$element$roo3=instance4.element.root())!=null&&(_instance$element$roo4=_instance$element$roo3.is_mobile)!=null&&_instance$element$roo4.call(_instance$element$roo3)?{display:"flex",width:"100%","align-items":evaluate_property(instance4,"checkbox_vert_alignment"),"justify-content":evaluate_property(instance4,"checkbox_horiz_alignment"),"column-gap":`${evaluate_property(instance4,"checkbox_gap")}px`}:{}},{selector:LABEL_SELECTOR2})]}));function CheckboxComponent(props){let runMode=props.instance.run_mode(),innerId=String(LUID()),inputRef;onMount(()=>{runMode&&$(inputRef).change(event=>{var _event$target$checked;props.instance.message("user_submit",(_event$target$checked=event.target.checked)!=null?_event$target$checked:!1)})}),createInputChange(props.instance,val=>{typeof val=="string"&&["false","no","null","none","undefined"].includes(val.toLowerCase())&&(val=!1),inputRef.checked=!!val});let getIcon=()=>(()=>{var _el$=_tmpl$9();return insert(_el$,createComponent(IconItemComponent,{get icon(){return props.icon}})),createRenderEffect(_$p=>style(_el$,props.childStyles[ICON_SELECTOR2],_$p)),_el$})();return(()=>{var _el$2=_tmpl$33(),_el$3=_el$2.firstChild;use(defaultEventHandlers,_el$2,()=>props.instance);var _ref$=props.ref;typeof _ref$=="function"?use(_ref$,_el$2):props.ref=_el$2;var _ref$2=inputRef;return typeof _ref$2=="function"?use(_ref$2,_el$3):inputRef=_el$3,setAttribute(_el$3,"id",innerId),insert(_el$2,createComponent(Show,{get when(){var _props$instance$eleme,_props$instance$eleme2;return(_props$instance$eleme=props.instance.element.root())==null||(_props$instance$eleme2=_props$instance$eleme.is_mobile)==null?void 0:_props$instance$eleme2.call(_props$instance$eleme)},get fallback(){return(()=>{var _el$5=_tmpl$24();return setAttribute(_el$5,"for",innerId),insert(_el$5,()=>props.label),_el$5})()},get children(){var _el$4=_tmpl$24();return setAttribute(_el$4,"for",innerId),insert(_el$4,createComponent(Show,{get when(){return props.iconPlacement==="left"},get children(){return getIcon()}}),null),insert(_el$4,createComponent(Show,{get when(){return props.inputType==="icon_label"},get children(){return props.label}}),null),insert(_el$4,createComponent(Show,{get when(){return props.iconPlacement==="right"},get children(){return getIcon()}}),null),createRenderEffect(_$p=>style(_el$4,{...props.childStyles[LABEL_SELECTOR2]},_$p)),_el$4}}),null),createRenderEffect(_p$=>{var _props$instance$eleme3,_props$instance$eleme4,_props$instance$eleme5,_props$instance$eleme6,_v$=props.id,_v$2={...props.style,display:(_props$instance$eleme3=props.instance.element.root())!=null&&(_props$instance$eleme4=_props$instance$eleme3.is_mobile)!=null&&_props$instance$eleme4.call(_props$instance$eleme3)?"flex":""},_v$3={...props.classList,[CLICKABLE_ELEMENT]:runMode},_v$4={display:(_props$instance$eleme5=props.instance.element.root())!=null&&(_props$instance$eleme6=_props$instance$eleme5.is_mobile)!=null&&_props$instance$eleme6.call(_props$instance$eleme5)?"none":"",...props.childStyles[INPUT_SELECTOR],"background-color":"white"},_v$5=runMode&&props.isDisabled;return _v$!==_p$.e&&setAttribute(_el$2,"id",_p$.e=_v$),_p$.t=style(_el$2,_v$2,_p$.t),_p$.a=classList(_el$2,_v$3,_p$.a),_p$.o=style(_el$3,_v$4,_p$.o),_v$5!==_p$.i&&(_el$3.disabled=_p$.i=_v$5),_p$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),_el$2})()}make_element("Checkbox",{category:"input forms",glyph_id:"checkbox",list_order:3,keyboard_shortcut:null,defaults:{width:180,height:20,min_width:50},generate_element_states(root2){var _root$is_mobile;return root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2)?[{condition:{type:"ThisElement",next:{type:"Message",name:"get_data"}},properties:{icon:get_default_icon("checked")}}]:[]},field_names:extend({input_type:{default:"icon_label",no_states:!0,only_edit_mode:!0},label:{default:"...edit me...",optional:!0},icon:{default:"fa fa-square-o"},icon_size:{default:24},icon_color:{default:"#525252"},icon_placement:{default:"left"},contents:{default:"unchecked"},checkbox_gap:{default:4},checkbox_horiz_alignment:{default:"flex-start"},checkbox_vert_alignment:{default:"center"},dynamic:{},mandatory:{}},get_disabled_field_name,get_auto_binding_field_names),properties_for_new:{icon:()=>get_default_icon("unchecked")},updated_default_sizing:{height:36},properties_for_name:()=>[],property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.FontShadow,new property_applications_default.FontSpacing,new property_applications_default.BoxShadow("input"),new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity,new property_applications_default.Border],uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,can_defer_drawing(){return!0},solid_component:CheckboxComponent_default,use_legacy_in_editor(root2){var _root$is_mobile2;return!(root2!=null&&(_root$is_mobile2=root2.is_mobile)!=null&&_root$is_mobile2.call(root2))},use_legacy_in_thumbnail:!0,get_html(instance4){return"<div></div>"},get_min_width(element){return 0},initialize(instance4){return instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();canvas[0].style.overflow="visible";let inner_id=LUID(),ip=$(`<input type="checkbox" id="${inner_id}" style="background-color: white;"></input>`),label_div=$(`<label for="${inner_id}"></label>`);canvas.append(ip),canvas.append(label_div),register_focus(instance4,ip),instance4.on_message("set_focus",()=>ip.focus()),instance4.run_mode()&&(canvas.addClass(CLICKABLE_ELEMENT),ip.change(()=>{var _ip$0$checked;return instance4.message("user_submit",(_ip$0$checked=ip[0].checked)!=null?_ip$0$checked:!1),!0}),on_property_change(instance4,"disabled",value=>{ip[0].disabled=value})),on_property_change(instance4,"label",label=>{label_div.text(label)}),input_change_autorun(instance4,val=>{typeof val=="string"&&["false","no","null","none","undefined"].includes(val.toLowerCase())&&(val=!1),val?ip[0].checked=!0:ip[0].checked=!1})})},get_starting_content(instance4){if(instance4.run_mode()&&instance4.get_static_property("auto_binding"))return get_input_autobind_thing_field(instance4);let content=evaluate_property(instance4,"contents");return content==="checked"?!0:content==="unchecked"?!1:evaluate_property(instance4,"dynamic")},get_state_value(element,name){if(name==="value")return"sys.bool"},content_validated(val,instance4){return!(!val&&evaluate_property(instance4,"mandatory"))},add_specific_messages(messages,element){var _element$root;(_element$root=element.root())!=null&&_element$root.is_mobile()&&(messages.get_checkbox_label={description:"'s label",is_client_state(){return!0},section:"States",ret_btype:"text",fn(a,b){return evaluate_property(a,"label")}})},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!0,is_checkbox:!0,contains_group_data:!1,events:["ButtonClicked","ElementPressed"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator205=__toESM(require_web_dom_collections_iterator());init_appquery();init_btypes();init_languages();init_lib();init_logger();init_property_applications();init_runmode();init_define_process_env();init_shim();var datepickerTranslationsList_default={ar:["ar"],bg:["bg_BG"],bs:["bs_BA"],ca:["ca_ES"],cs:["cs_CZ"],da:["da_DK"],de:["de_DE"],el:["el_GR"],es:["es_ES"],et:["et_EE"],eu:["eu_ES"],fa:["fa_ir"],fi:["fi_FI"],fr:["fr_FR"],gl:["gl_ES"],he:["he_IL"],hi:["hi_IN"],hr:["hr_HR"],hu:["hu_HU"],id:["id_ID"],is:["is_IS"],it:["it_IT"],ja:["ja_JP"],ko:["ko_KR"],lt:["lt_LT"],lv:["lv_LV"],nb:["nb_NO"],ne:["ne_NP"],nl:["nl_NL"],no:["no_NO"],pl:["pl_PL"],pt:["pt_PT","pt_BR"],ro:["ro_RO"],ru:["ru_RU"],sk:["sk_SK"],sl:["sl_SI"],sv:["sv_SE"],th:["th_TH"],tr:["tr_TR"],uk:["uk_UA"],vi:["vi_VN"],zh:["zh_CN","zh_TW"]};init_elements();init_u2();init_b_date();init_webfonts();init_element_eval();init_element_props();var moment7=require_moment2();function _bind_date(instance4,val){if(val==null)return val;let min_date=evaluate_property(instance4,"min_date"),max_date=evaluate_property(instance4,"max_date");return min_date!=null&&val<min_date?min_date:max_date!=null&&val>max_date?max_date>=min_date?max_date:min_date!=null?min_date:val:val}function _get_array_from_date2(instance4,val){if(!val)return;let date=get5("date").cast(val);if(!date)return;let tz2=get_timezone(instance4),m=moment7(date).tz(tz2);return[m.year(),m.month(),m.date()]}function get_dateFormat_fmt_string2(instance4,val){let res="";switch(val){case"number1":res+="d/mm/yyyy";break;case"number2":res+="m/dd/yyyy";break;case"alpha":res+="d mmmm, yyyy";break;case"alphalong":res+="dddd, d mmmm, yyyy";break;case"alphashort":res+="d-mmm-yyyy";break;case"us_short":res+="mmmm d, yyyy";break;case"us_long":res+="dddd, mmmm d, yyyy";break;case"custom":res+=instance4.get_static_property("custom_format");break}return res}make_element("DateInput",{display:"Date/Time Picker",category:"input forms",glyph_id:"datetime",list_order:8,keyboard_shortcut:null,defaults:{font_size:14,font_color:"#3D3D3D",background_style:"bgcolor",border_style:"solid",border_color:"#BDBDBD",border_roundness:3,border_width:1,border_roundness_top:3,border_style_left:"solid",border_width_left:1,border_color_left:"#BDBDBD",border_roundness_left:3,border_style_bottom:"solid",border_width_bottom:1,border_color_bottom:"#BDBDBD",border_roundness_bottom:3,border_style_right:"solid",border_width_right:1,border_color_right:"#BDBDBD",border_roundness_right:3,padding_horizontal:4,padding_vertical:0,width:250,height:45,use_max_width:!0,max_width:150},updated_default_sizing:{height:48},default_states:void 0,field_names:extend({input_type:{default:"date",no_states:!0},content:{},overwrite_placeholder:{no_states:!0},placeholder:{optional:!0},date_format:{default:"number2",no_states:!0,in_style:!0},custom_format:{default:"ddd, m/dd/yy, mmmm (mmm) dS, yyyy",no_states:!0,in_style:!0},start_monday:{no_states:!0},time_interval:{default:30,no_states:!0},time_format:{default:"full",no_states:!0},min_date:{},max_date:{},min_hour:{},max_hour:{},show_month_year_picker:{no_states:!0},mandatory:{}},get_disabled_field_name,get_auto_binding_field_names,custom_tz_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background("input"),new property_applications_default.Border("input"),new property_applications_default.BoxShadow("input"),new property_applications_default.Font("input"),new property_applications_default.FontSpacing("input",["line_height"]),new property_applications_default.InputPadding("input"),new property_applications_default.PaddingFields({selector:"input",minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.PlaceholderColor("input"),new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,additional_uses_properties:["input_type"],get_html(instance4){return"<div></div>"},get_min_width(){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let date_picker,time_picker,canvas=instance4.get_canvas();canvas.addClass("date_picker_element"),canvas[0].style.overflow="visible";let date_input=$('<input type="text" class="date_div"></input>');reset_input_div(date_input),canvas.append(date_input);let time_input=$('<input type="text" class="time_div"></input>');if(reset_input_div(time_input),on_property_change(instance4,"input_type",input_type=>{input_type==="date_time"?canvas.append(time_input):time_input.detach()}),on_property_change(instance4,"disabled",value=>{property_applications_default.apply_css_style(date_input,{cursor:value?"default":"pointer"}),property_applications_default.apply_css_style(time_input,{cursor:value?"default":"pointer"})}),pre_cache(instance4,["input_type","padding_horizontal","date_format","time_format","placeholder","overwrite_placeholder"]),instance4.autorun(()=>{let placeholder,time_placeholder,changes={};for(let prop of["input_type","padding_horizontal","date_format","time_format","placeholder","overwrite_placeholder","padding_top","padding_bottom","padding_left","padding_right"])changes[prop]=evaluate_property(instance4,prop);let border_height=property_applications_default.calculate_border_height(instance4),border_width=property_applications_default.calculate_border_width(instance4),horizontal_padding=instance4.element.element_version(!0)<PADDING_VERSION?2*changes.padding_horizontal:changes.padding_left+changes.padding_right,vertical_padding=instance4.element.element_version(!0)<PADDING_VERSION?0:changes.padding_top+changes.padding_bottom,bv_check=appquery_default.get_public_setting("bubble_version")<18,date_input_height=bv_check?`calc(100% - ${border_height}px)`:`calc(100% - ${vertical_padding+border_height}px)`;if(property_applications_default.apply_css_style(date_input,{height:date_input_height,"box-sizing":"content-box"}),changes.input_type==="date_time"){let time_input_width=bv_check?70:72,gap_spacing=bv_check?5:8;property_applications_default.apply_css_style(date_input,{width:`calc(100% - ${2*horizontal_padding+2*border_width}px - ${time_input_width+gap_spacing}px)`,float:"left"}),property_applications_default.apply_css_style(time_input,{width:`${time_input_width}px`,float:"right",height:`calc(100% - ${vertical_padding+border_height}px)`,"box-sizing":"content-box"})}else date_input[0].style.width=`calc(100% - ${horizontal_padding+border_width}px)`;if(changes.input_type==="date"&&changes.overwrite_placeholder)placeholder=changes.placeholder;else{let placeholder_date;if(appquery_default.app().id()==="test_app"){var _inputs$get_timezone;let tz2=(_inputs$get_timezone=get_timezone(instance4))!=null?_inputs$get_timezone:lib_default().current_timezone();placeholder_date=moment7.tz("1/15/2013",tz2).toDate()}else placeholder_date=new Date;let fmt_str=get_dateFormat_fmt_string2(instance4,changes.date_format);placeholder=format_date(placeholder_date,fmt_str,lib_default().get_text("BUILT_IN","DATE_FORMAT"),get_timezone(instance4))}switch(date_input.attr("placeholder",placeholder),changes.time_format){case"full":time_placeholder="12:00";break;case"ampm":time_placeholder="12:00 AM";break}return time_input==null?void 0:time_input.attr("placeholder",time_placeholder)}),instance4.run_mode()){let get_datepicker_val2=function(){var _date_picker;if((_date_picker=date_picker)!=null&&_date_picker.get()){let date_only=date_picker.get("select"),full_date={year:date_only.year,month:date_only.month,day:date_only.date};if(instance4.get_static_property("input_type")==="date_time"){let time_only=time_picker.get("select");if(time_only){var _time_only$hour,_time_only$mins;full_date.hour=(_time_only$hour=time_only==null?void 0:time_only.hour)!=null?_time_only$hour:"",full_date.minute=(_time_only$mins=time_only==null?void 0:time_only.mins)!=null?_time_only$mins:""}else return}return moment7.tz(full_date,get_timezone(instance4)).toDate()}else return null},onclose_handler2=function(){return this.$holder.blur(),instance4.state("has_been_changed",!0),u_exports2.run_once(30,get_datepicker_val2,(_,val)=>{instance4.state("is_focused",!1),val!==void 0&&instance4.message("user_submit",val)}),!0},position_function2=function(_ref){let{$holder,$root}=_ref;$holder.css("transition","0.05s ease-in-out"),$holder.position({my:"left top",at:"left bottom",of:instance4.get_canvas(),collision:"fit flip"}),lib_default().bubble_version()<19&&$root.addClass("datepicker-legacy-font")},onrender_handler2=function(){return position_function2(this)},run_positioning2=function(data){queueMicrotask(()=>{position_function2(data),instance4.setTimeout(()=>position_function2(data),100)}),$(window).on("resize",()=>position_function2(data));let parent=instance4.get_canvas();u_exports2.run_once(30,()=>({width:parent.width(),"font-family":get_face_and_variant(get_font_face(instance4)).font_family,top:0}),(err,location_info)=>{var _time_picker;err&&log(err),date_picker.$root.css(location_info),(_time_picker=time_picker)==null||_time_picker.$root.css(location_info)})},onopen_handler2=function(){instance4.state("is_focused",!0),run_positioning2(this)},_get_array_from_hour2=function(raw){if(!raw)return!1;let hour=Math.floor(raw),minute=Math.round((raw-hour)*60);return[hour,minute]};var get_datepicker_val=get_datepicker_val2,onclose_handler=onclose_handler2,position_function=position_function2,onrender_handler=onrender_handler2,run_positioning=run_positioning2,onopen_handler=onopen_handler2,_get_array_from_hour=_get_array_from_hour2;canvas.addClass(CLICKABLE_ELEMENT);let should_show_month_year=instance4.get_static_property("show_month_year_picker");date_input.pickadate({container:"html",firstDay:instance4.get_static_property("start_monday"),selectMonths:should_show_month_year,selectYears:should_show_month_year&&200,onOpen:onopen_handler2,onClose:onclose_handler2,format:get_dateFormat_fmt_string2(instance4,instance4.get_static_property("date_format"))}),date_picker=date_input.pickadate("picker"),instance4.wait_for_visible(()=>{run_positioning2(date_picker),instance4.setTimeout(()=>run_positioning2(date_picker),100)});let is_time_picker=!1,time_option={};if(instance4.get_static_property("input_type")==="date_time"){switch(is_time_picker=!0,time_option.container="html",time_option.interval=instance4.get_static_property("time_interval"),instance4.get_static_property("time_format")){case"full":time_option.format="H:i";break;case"ampm":time_option.format="h:i A";break}time_option.onClose=onclose_handler2,time_option.onOpen=onopen_handler2,time_option.onRender=onrender_handler2,time_input.pickatime(time_option),time_picker=time_input.pickatime("picker")}instance4.autorun(()=>{var _get_array_from_date22,_get_array_from_date3;let min_date=evaluate_property(instance4,"min_date"),max_date=evaluate_property(instance4,"max_date");if(date_picker.set({min:(_get_array_from_date22=_get_array_from_date2(instance4,min_date))!=null?_get_array_from_date22:-1/0,max:(_get_array_from_date3=_get_array_from_date2(instance4,max_date))!=null?_get_array_from_date3:1/0}),is_time_picker){let min_hour=evaluate_property(instance4,"min_hour"),max_hour=evaluate_property(instance4,"max_hour");time_picker.set({min:_get_array_from_hour2(min_hour),max:_get_array_from_hour2(max_hour)})}let prev_tz;instance4.autorun(()=>{let current_tz=get_timezone(instance4);if(instance4.state("has_been_changed")&&current_tz===prev_tz)return;prev_tz=current_tz;let val=instance4.state("value");if(!u_exports2.autorun_top(()=>instance4.state("is_focused")))if(val){if(date_picker.set("select",_get_array_from_date2(instance4,val)),is_time_picker){let tz2=get_timezone(instance4),m=moment7(val).tz(tz2);time_picker.set("select",[m.hours(),m.minutes()])}}else date_picker.clear(),is_time_picker&&time_picker.clear()})}),instance4.autorun(()=>{let val=instance4.state("value",void 0,!0);if(typeof val!="function"&&date_picker.get("select")){let bound_val=_bind_date(instance4,val);bound_val!==val&&(date_picker.set("select",_get_array_from_date2(instance4,bound_val)),instance4.state("value",bound_val))}}),instance4.autorun(()=>{date_picker.$root.css({"margin-top":instance4.current_height(),"max-width":instance4.current_width()}),instance4.get_static_property("input_type")==="date_time"&&time_picker.$root.css({"margin-top":instance4.current_height(),"max-width":instance4.current_width()})}),on_property_change(instance4,"disabled",value=>{date_input[0].disabled=value,time_input!=null&&(time_input[0].disabled=value)})}register_focus(instance4,canvas.find("input")),instance4.on_message("set_focus",()=>{date_input[0].disabled||date_picker.open()}),instance4.run_mode()||(date_input.attr("readonly","true"),time_input==null||time_input.attr("readonly","true"))})},get_starting_content(instance4){return instance4.run_mode()&&instance4.get_static_property("auto_binding")?_bind_date(instance4,get_input_autobind_thing_field(instance4)):_bind_date(instance4,evaluate_property(instance4,"content"))},content_validated(val,instance4){return val||!evaluate_property(instance4,"mandatory")},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!0,contains_group_data:!1,get_state_value(element,name){if(name==="value")return"date"},jquery_plugins(appname,app_version,app_language2){let files=["jquery_plugins/datepicker/picker","jquery_plugins/datepicker/picker.date","jquery_plugins/datepicker/picker.time","jquery_plugins/jquery-ui.position.min"];if(typeof lib_default().appname=="function"){var _lang_file$split;let lang_file=get_iso_code(app_language2),language=(_lang_file$split=lang_file.split(/[-_]/))==null?void 0:_lang_file$split[0];if(language==="en")return files;let relevant_translations=datepickerTranslationsList_default[language];if(relevant_translations==null)return warn("Missing datepicker translation",{lang_file}),files;relevant_translations.includes(lang_file)||(lang_file=relevant_translations[0]),files.push(`jquery_plugins/datepicker/${lang_file}`)}return files},css_files:["css/optional/datepicker.css"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator206=__toESM(require_web_dom_collections_iterator());init_u2();init_hydrate();init_lib();init_appquery();init_property_applications();var import_spark_md52=__toESM(require_spark_md5());init_logger();init_btypes();init_element_utils();init_element_eval();var BLANK="BLANK_1427118194589",PLACEHOLDER="PLACEHOLDER_1427118222253",MAX_DROPDOWN=5e3;make_element("Dropdown",{category:"input forms",glyph_id:"dropdown",list_order:4,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{font_size:14,background_style:"bgcolor",bgcolor:"#E6E6E6",border_style:"solid",border_width:1,border_color:"#858585",border_roundness:3,border_style_top:"solid",border_width_top:1,border_color_top:"#858585",border_roundness_top:3,border_style_left:"solid",border_width_left:1,border_color_left:"#858585",border_roundness_left:3,border_style_bottom:"solid",border_width_bottom:1,border_color_bottom:"#858585",border_roundness_bottom:3,border_style_right:"solid",border_width_right:1,border_color_right:"#858585",border_roundness_right:3,width:250,height:45,placeholder:"Choose an option...",use_max_width:!0,max_width:150,placeholder_color:"#9C9C9C",padding_left:5,padding_right:15},updated_default_sizing:{height:48},default_states:void 0,field_names:extend({placeholder:{},choices_style:{default:"static",no_states:!0},choices:{},dynamic_type:{no_states:!0},data_source:{},option_display_expression:{},default:{},mandatory:{},placeholder_color:{in_style:!0},computed_value:{optional:!0,no_states:!0}},get_disabled_field_name,get_auto_binding_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font(null,null,["font_color"]),new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.FontSpacing(null,["line_height"]),new property_applications_default.PaddingFields,new property_applications_default.Opacity],get_html(instance4){return"<select></select>"},get_min_width(element){return 0},_get_display_option,can_defer_drawing(){return!0},register(instance4){let bad_value_watcher=u_exports2.Watcher(()=>{if(!instance4.state("has_been_changed"))return!1;let val=instance4.state("value");return val==null?!1:!this._choice_list_contains(instance4,val)});instance4.on_destroy(()=>bad_value_watcher.destroy()),bad_value_watcher.on_value(is_bad=>{if(is_bad)return instance4.message("reset_input")})},initialize(instance4){return instance4.wait_for_visible_lite(()=>{var _instance$element$roo;let canvas=instance4.get_canvas();appquery_default.get_public_setting("bubble_version")>=16&&canvas.addClass("dropdown-chevron"),((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())>0?canvas.css("display","block"):(canvas.css({"padding-left":5,"padding-right":15}),instance4.run_mode()&&register_tab_index_listener(instance4,tabindex=>{canvas.attr("tabindex",tabindex)})),reset_input_div(canvas);let choice_list=[],our_color=null;function get_value_key(value){return typeof value=="object"?import_spark_md52.default.hash(JSON.stringify(value)):value}let choices_cache=null;function create_option(c){let choice=$('<option class="dropdown-choice"></option>');choice.text(c.display);let safe_val=c.value,dehydrated_value=dehydrate_tree(safe_val);return choice.attr("value",JSON.stringify(dehydrated_value)),our_color!=null&&(choice[0].style.color=our_color),choice}let is_placeholder_selected=u_exports2.Box();if(u_exports2.autorun(()=>{our_color=evaluate_property(instance4,"font_color"),is_placeholder_selected()?canvas[0].style.color=evaluate_property(instance4,"placeholder_color"):canvas[0].style.color=our_color,canvas.find("option").css("color",our_color)}),instance4.run_mode()){let val_to_text2=function(val){return val==null&&(evaluate_property(instance4,"mandatory")||!instance4.state("has_been_changed")?val=PLACEHOLDER:val=BLANK),JSON.stringify(dehydrate_tree(val))},select_value2=function(val){return current_displayed_value=val,update_displayed_value2(val)},update_displayed_value2=function(val){let text2=val_to_text2(val),placeholder_element=canvas.find(".dropdown-placeholder")[0];return text2===JSON.stringify(PLACEHOLDER)?(is_placeholder_selected(!0),placeholder_element!=null&&(placeholder_element.disabled=!1)):(is_placeholder_selected(!1),placeholder_element!=null&&(placeholder_element.disabled=!0)),canvas.val(text2)},get_placeholder_div2=function(){let placeholder_div=canvas.find(".dropdown-placeholder");return placeholder_div.length===0&&(placeholder_div=create_option({display:"",value:PLACEHOLDER}),placeholder_div.addClass("dropdown-placeholder"),placeholder_div[0].style.display="none",canvas.prepend(placeholder_div)),placeholder_div};var val_to_text=val_to_text2,select_value=select_value2,update_displayed_value=update_displayed_value2,get_placeholder_div=get_placeholder_div2;switch_disabled_or_not(instance4),canvas.on("click",evt=>evt.stopPropagation());let get_choice_list=()=>{let raw_choices=this._get_raw_choice_list(instance4),get_display=this._get_display_option(instance4),raw_choice_list=raw_choices.get_children(0,MAX_DROPDOWN);u_exports2.run_once(30,()=>raw_choice_list.map(raw_choice=>get_display(raw_choice))),choice_list=[];for(let raw_choice of raw_choice_list)choice_list.push({display:get_display(raw_choice),value:raw_choice});return evaluate_property(instance4,"mandatory")||(choice_list=[{display:"",value:BLANK}].concat(choice_list)),choice_list},current_displayed_value=null;instance4.autorun(()=>{if(evaluate_property(instance4,"choices_style")!=="static")return get_property_watcher(instance4,"data_source").on_not_ready(()=>u_exports2.run_once(30,()=>lib_default().get_text("CORE","LOADING"),(err,loading_message)=>(err&&log(err),get_placeholder_div2().text(loading_message!=null?loading_message:""),update_displayed_value2(PLACEHOLDER))))});let update_choice_list=()=>{choice_list=get_choice_list();let placeholder_text=evaluate_property(instance4,"placeholder"),new_choices=[];for(let entry of choice_list){let safe_val=entry.value,dehydrated_value=dehydrate_tree(safe_val),value_key=get_value_key(dehydrated_value);new_choices.push([value_key,entry.display])}let placeholder_div;if(choices_cache!=null&&compare(new_choices,choices_cache)){placeholder_div=get_placeholder_div2(),placeholder_div.text(placeholder_text);return}else choices_cache=new_choices;canvas.empty(),placeholder_div=get_placeholder_div2(),placeholder_div.text(placeholder_text);let previous_div=placeholder_div,dedupe_record={};for(let c of choice_list){let value_key=get_value_key(dehydrate_tree(c.value));if(dedupe_record[value_key])continue;dedupe_record[value_key]=!0;let div2=create_option(c);previous_div.after(div2),previous_div=div2}return select_value2(current_displayed_value)};canvas.change(()=>{let new_val=rehydrate_dropdown_value(JSON.parse(canvas.find("option:selected").attr("value")));return[PLACEHOLDER,BLANK].includes(new_val)&&(new_val=null),instance4.message("user_submit",new_val),select_value2(new_val)}),input_change_autorun(instance4,val=>select_value2(val));let is_dropdown_focused=u_exports2.Box(!1);canvas.on("focus",()=>is_dropdown_focused(!0)),canvas.on("blur",()=>is_dropdown_focused(!1)),register_focus(instance4,canvas);let succesfully_updated_once=u_exports2.Box(!1);instance4.autorun(()=>{if(instance4.is_visible()&&(!succesfully_updated_once()||!is_dropdown_focused()))return update_choice_list(),succesfully_updated_once(!0)}),instance4.on_message("set_focus",()=>canvas.focus())}})},_get_raw_btype(element){return _get_raw_btype_dropdown(element)},_get_raw_choice_list(instance4){return _get_raw_choice_list_dropdown(instance4,this)},_choice_list_contains(instance4,val){let V=get5(this._get_raw_btype(instance4.element));return this._get_raw_choice_list(instance4).contains(val,V)},get_starting_content(instance4){let starting_content;return instance4.run_mode()&&instance4.get_static_property("auto_binding")?starting_content=get_input_autobind_thing_field(instance4):starting_content=evaluate_property(instance4,"default"),typeof starting_content=="string"&&this._get_raw_btype(instance4.element)==="number"&&(starting_content=lib_default().locale().parse_float(starting_content)),starting_content==null||!this._choice_list_contains(instance4,starting_content)?null:starting_content},get_state_value(element,name){if(name==="value")return this._get_raw_btype(element)},get_injected_btype(element){return element.get_static_property("dynamic_type")},get_injected_display(){return"Current option"},use_injected_datasource(node){return(void 0)("option_display_expression",node)},content_validated(val,instance4){return val!=null||!evaluate_property(instance4,"mandatory")},uses_css_responsive:!0,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!0,contains_group_data:!1});init_define_process_env();init_shim();init_u2();init_property_applications();init_runmode();init_workflow();var widgets_exports={};__export(widgets_exports,{ImageUploader:()=>ImageUploader,MakeImageUploader:()=>MakeImageUploader,Widget:()=>Widget_default,get_uploaded_file_endpoint:()=>get_uploaded_file_endpoint,get_uploaded_file_id:()=>get_uploaded_file_id,upload_file:()=>upload_file});init_define_process_env();init_shim();init_u2();init_logger();init_define_process_env();init_shim();function browser_handles_orientation(){return $("body").css("imageOrientation")==="from-image"}function reorient_image(_ref){let{orientation,canvas,context}=_ref;if(!browser_handles_orientation()){if(orientation>4){let{width:width2,height:height2}=canvas;canvas.width=height2,canvas.height=width2}switch(orientation){case 2:context.translate(canvas.width,0),context.scale(-1,1);break;case 3:context.translate(canvas.width,canvas.height),context.rotate(Math.PI);break;case 4:context.translate(0,canvas.height),context.scale(1,-1);break;case 5:context.rotate(.5*Math.PI),context.scale(1,-1);break;case 6:context.rotate(.5*Math.PI),context.translate(0,-canvas.width);break;case 7:context.rotate(.5*Math.PI),context.translate(canvas.height,-canvas.width),context.scale(-1,1);break;case 8:context.rotate(-.5*Math.PI),context.translate(-canvas.height,0);break}}}function get_orientation(_ref2){let{image_url,file,_cb}=_ref2,reader=new FileReader;reader.onload=function(e){let view=new window.DataView(e.target.result);if(view.getUint16(0,!1)!==65496){_cb(-2);return}let length=view.byteLength,offset=2;for(;offset<length;){let marker=view.getUint16(offset,!1);if(offset+=2,marker===65505){if(view.getUint32(offset+=2,!1)!==1165519206){_cb(-1);return}let little=view.getUint16(offset+=6,!1)===18761;offset+=view.getUint32(offset+4,little);let tags=view.getUint16(offset,little);offset+=2;for(let i=0,end2=tags,asc=end2>=0;asc?i<end2:i>end2;asc?i++:i--)if(view.getUint16(offset+i*12,little)===274){_cb(view.getUint16(offset+i*12+8,little));return}}else{if((marker&65280)!==65280)break;offset+=view.getUint16(offset,!1)}}_cb(-1)},reader.readAsArrayBuffer(file)}var PREVIEW_MAX_SIZE={WIDTH:800,HEIGHT:600};function image_processor_default(_ref3){let{file,image_url,extension,success_callback,fail_callback,progress_bar_hide_fn}=_ref3,mimetype=extension==="png"?"image/png":"image/jpeg",img2=document.createElement("img");img2.src=image_url,img2.onerror=function(){progress_bar_hide_fn(),fail_callback==null||fail_callback()},img2.onload=function(){let canvas=document.createElement("canvas"),{width:width2}=img2,{height:height2}=img2;width2>height2?width2>PREVIEW_MAX_SIZE.WIDTH&&(height2*=PREVIEW_MAX_SIZE.WIDTH/width2,width2=PREVIEW_MAX_SIZE.WIDTH):height2>PREVIEW_MAX_SIZE.HEIGHT&&(width2*=PREVIEW_MAX_SIZE.HEIGHT/height2,height2=PREVIEW_MAX_SIZE.HEIGHT),get_orientation({file,_cb(orientation){let context=canvas.getContext("2d");canvas.width=width2,canvas.height=height2,reorient_image({orientation,canvas,context}),context.drawImage(img2,0,0,width2,height2),file.contents=canvas.toDataURL(mimetype,.8).split(",")[1],success_callback()}})}}init_define_process_env();init_shim();var events3=__toESM(require_events()),Widget=class extends events3.EventEmitter{get_canvas(){return this.canvas}},Widget_default=Widget;init_b_file_shared();init_lib();init_status_bar();init_client_config2();init_appquery();function get_uploaded_file_id(filename,uid){let id="f"+(uid!=null?uid:UUID())+"/"+filename;return client_config_default2.is_dedicated&&(id=client_config_default2.environment_name+"/"+id),id}function get_uploaded_file_endpoint(_ref){let{key,with_protocol,appname}=_ref,without_protocol=`//${get_file_cdn_url(appname)}${key}`;return with_protocol?`https:${without_protocol}`:without_protocol}function NO_DATA(cb){return cb(null,{})}function upload_file(file,text2,get_additional_data,cb_success,cb_start,cb_fail,limit_size,file_name){var _get_additional_data;(_get_additional_data=get_additional_data)!=null||(get_additional_data=NO_DATA);let upload_url=lib_default().location.get_server_base()+"fileupload";function upload_content(fr,contents){var _ref2,_file;let status;cb_start==null||cb_start(),lib_default().is_edit_mode()?(void 0)(text2):status=show_progress_line("image uploader");function hide_progress_bar(){lib_default().is_edit_mode()?(void 0)():status()}function do_it2(){let request_data={success(url9){hide_progress_bar(),cb_success(url9)},error(xhr){var _err;let err;hide_progress_bar(),xhr.status>=400&&xhr.status<=499&&xhr.responseText.indexOf("Error parsing request body: request entity too large")!==-1&&(err=new UserError("FILE_TOO_LARGE")),(_err=err)!=null||(err=lib_default().location.response_to_error(xhr)),cb_fail==null||cb_fail(err)},processData:!1,type:"post"};get_additional_data((err,data)=>{if(err)window.alert(human_friendly(err)),request_data.success(null);else{var _data_object$name;lib_default().is_edit_mode()&&extend(data,{appname:appquery_default.appname(),app_version:appquery_default.app_version()});let data_object=extend(data,file);(_data_object$name=data_object.name)!=null||(data_object.name=file_name),request_data.data=JSON.stringify(data_object),request_data.contentType="application/json",$.ajax(upload_url,request_data)}})}let extension=(_ref2=file_name||((_file=file)==null?void 0:_file.name))==null?void 0:_ref2.toLowerCase().split(".").pop();if(limit_size&&extension!=="svg")image_processor_default({file,image_url:fr.result,extension,success_callback(){return do_it2()},fail_callback(){return cb_fail==null?void 0:cb_fail()},progress_bar_hide_fn(){return hide_progress_bar()}});else{if(contents)file={contents,name:file_name};else{var _fr$result$split$;file.contents=(_fr$result$split$=fr.result.split(",")[1])!=null?_fr$result$split$:""}do_it2()}}if(file.contents)upload_content(void 0,file.contents);else{let fr=new FileReader;fr.onload=()=>upload_content(fr),fr.readAsDataURL(file)}}function MakeImageUploader(_ref3){var _text,_get_additional_data2;let{input:input2,text:text2,get_additional_data,cb_success,cb_start,cb_fail,limit_size,max_file_size_fn}=_ref3;(_text=text2)!=null||(text2="We're uploading your image..."),(_get_additional_data2=get_additional_data)!=null||(get_additional_data=NO_DATA),input2.change(()=>{let{files}=input2[0];if(files.length<1)return;let file=files[0];u_exports2.run_once(30,()=>max_file_size_fn==null?void 0:max_file_size_fn(),(_,max_file_size)=>{if(max_file_size&&file.size>max_file_size){let err=new UserError("FILE_TOO_LARGE");cb_fail==null||cb_fail(err)}else upload_file(file,text2,get_additional_data,cb_success,cb_start,cb_fail,limit_size)})})}var ImageUploader=class extends Widget_default{get get_class(){return"image-uploader"}constructor(file_cb){super(),this.file_cb=file_cb,this.canvas=input(void 0,void 0,"file"),MakeImageUploader({input:this.canvas,get_additional_data:null,cb_success:this.file_cb,max_file_size_fn:()=>MAX_FILE_COMPOSER_SIZE})}};init_define_process_env();init_shim();init_lib();init_status_bar();init_appquery();init_define_process_env();init_shim();init_uuid();var b_async9=__toESM(require_b_async());init_page_state();init_FrozenState();init_hydrate();init_lib();function serialize_context(context,current_eval_node2){context={...context},context.duplicated_from_context=context.object_id,context.object_id=UUID(),context.duplicated_at="context_serializer.serialize_context",context.frozen_state||(context.frozen_state=new FrozenState(context));let promise;return current_eval_node2!=null?promise=context.frozen_state.freeze_node(current_eval_node2):promise=b_async9.Promise(),promise.then(()=>{var _context$element,_context$event;return{client_state:context.frozen_state.get_client_state(),element_id:(_context$element=context.element)==null?void 0:_context$element.element_id(),uid_generator:context.uid_generator,random_seed:context.random_seed,current_date_time:get_page_data("Current Date/Time",context).getTime(),timezone_offset:new Date().getTimezoneOffset(),timezone_string:lib_default().current_timezone(),inputs_must_be_valid:context.inputs_must_be_valid,advanced_search:context.advanced_search,constraint_messsage:context.constraint_messsage,current_wf_params:dehydrate_wf_params(context,value=>dehydrate_tree(value)),event_id:(_context$event=context.event)==null?void 0:_context$event.id()}})}init_page_state();init_u2();init_logger();init_byte();function upload_file2(file,instance4,get_additional_data,cb_success,cb_start,cb_fail,cb_progress){appquery_default.get_public_setting("bubble_version")<29&&(cb_start==null||cb_start());let cancelled=!1,xhr=null;function cb(err,data){if(!cancelled)if(err!=null)cb_fail==null||cb_fail(err);else{if(data==null){cb_success==null||cb_success(null);return}let form_data=new FormData;for(let key in data.fields){let value=data.fields[key];form_data.append(key,value)}form_data.append("file",file),xhr=new XMLHttpRequest,xhr.onload=function(){if(xhr.status===204)cb_success==null||cb_success(data.file_url);else{var _err;xhr.status>=400&&xhr.status<=499&&xhr.responseText.indexOf("EntityTooLarge")!==-1&&(err=new UserError("FILE_TOO_LARGE")),(_err=err)!=null||(err=lib_default().location.response_to_error(xhr)),cb_fail==null||cb_fail(err)}},xhr.onerror=function(){err=lib_default().location.response_to_error(xhr),cb_fail==null||cb_fail(err)},xhr.upload.onprogress=function(e){if(e.lengthComputable){let amount=Math.min(e.loaded/file.size,1);cb_progress==null||cb_progress(amount)}},xhr.open("POST",data.url,!0),xhr.send(form_data)}}return get_additional_data((err,data)=>{if(err)appquery_default.get_public_setting("bubble_version")>=29&&(cb_start==null||cb_start()),window.alert(human_friendly(err)),cb(null,null);else{lib_default().is_edit_mode()&&extend(data,{appname:appquery_default.appname(),app_version:appquery_default.app_version()});let context={element:instance4,inputs_must_be_valid:!1,datasources:get_basic_datasources(instance4.element.root())};return serialize_context(context,instance4.element).then(serialized_context=>{extend(data,{timezone_string:serialized_context.timezone_string,serialized_context,name:file.name,size:file.size,content_type:file.type}),lib_default().location.post("server://fileupload/geturl",data,cb),appquery_default.get_public_setting("bubble_version")>=29&&(cb_start==null||cb_start())})}}),function(){var _xhr;return cancelled=!0,(_xhr=xhr)==null?void 0:_xhr.abort()}}function make_presigned_uploader(_ref){let{instance:instance4,input:input2,get_additional_data,cb_success,cb_start,cb_fail,cb_progress,max_file_size_fn}=_ref,cancel_upload_fn=null,status=null;return input2.change(()=>{let{files}=input2[0];if(files.length<1)return;let file=files[0];file.size>2*1073741824&&warn("very large file upload could crash browser from new memory overhead",{size:file.size}),file.arrayBuffer().then(buffer2=>{let clone=new File([buffer2],file.name,{type:file.type});u_exports2.run_once(30,()=>max_file_size_fn==null?void 0:max_file_size_fn(),(_,max_file_size)=>{if(max_file_size&&clone.size>max_file_size){let err=new UserError("FILE_TOO_LARGE");cb_fail==null||cb_fail(err)}else status=show_progress_line("image uploader"),cancel_upload_fn=upload_file2(clone,instance4,get_additional_data,res=>{status(),cb_success==null||cb_success(res)},cb_start,err=>{status(),cb_fail==null||cb_fail(err)},amount=>{status(amount),cb_progress==null||cb_progress(amount)})})})}),function(){var _cancel_upload_fn,_status;(_cancel_upload_fn=cancel_upload_fn)==null||_cancel_upload_fn(),(_status=status)==null||_status(),status=null,cancel_upload_fn=null}}init_element_utils();var sliderinputs_exports={};__export(sliderinputs_exports,{show_message_for_ios_8_upload_bug:()=>show_message_for_ios_8_upload_bug});init_define_process_env();init_shim();init_u2();var message_for_ios_8_shown_once=!1;function show_message_for_ios_8_upload_bug(){var _navigator;!message_for_ios_8_shown_once&&safe_contains((_navigator=navigator)==null?void 0:_navigator.userAgent,"12A365")&&(message_for_ios_8_shown_once=!0,alert("The iOS version you're using prevents you from uploading files, please upgrade your system and try again."))}var pictureinputs_exports={};__export(pictureinputs_exports,{file_inputs_additional_messages:()=>file_inputs_additional_messages,process_upload_security:()=>process_upload_security});init_define_process_env();init_shim();var import_web_dom_collections_iterator207=__toESM(require_web_dom_collections_iterator());init_plugin_registry();init_element_eval();var file_inputs_additional_messages={get_loading_status:{description:" is loading",is_client_state(){return!0},ret_btype:"boolean",fn(a,b){return a==null?void 0:a.state("loading")}},get_file_size:{description:"'s file size",is_client_state(){return!0},ret_btype:"number",fn(a,b){return a==null?void 0:a.state("file_size")}}};function process_upload_security(instance4){let data={};if(instance4.get_static_property("private")){var _element_eval$evaluat,_element_eval$evaluat2;data.attach_to=(_element_eval$evaluat=evaluate_property(instance4,"attach_to"))==null||(_element_eval$evaluat2=_element_eval$evaluat._id)==null?void 0:_element_eval$evaluat2.call(_element_eval$evaluat)}else data.public=!0;return add_storage_plugin_data(instance4,data),data}function add_storage_plugin_data(instance4,data){var _instance$get_static_;let plugin_name=(_instance$get_static_=instance4.get_static_property("service"))!=null?_instance$get_static_:"bubble";if(data.service=plugin_name,plugin_name!=="bubble"&&is_installed(plugin_name)){let plugin2=plugin_registry_default.get_hardcoded_plugin(plugin_name);for(let field_data of plugin2.file_upload.fields)data[field_data.name]=evaluate_property(instance4,field_data.name)}}init_logger();init_element_eval();init_elements();init_appquery();make_element("FileInput",{display:"File Uploader",category:"input forms",glyph_id:"file_uploader",list_order:10,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{font_size:14,font_color:"#3D3D3D",background_style:"bgcolor",border_style:"solid",border_color:"#BDBDBD",border_roundness:3,border_style_top:"solid",border_width_top:1,border_color_top:"#BDBDBD",border_roundness_top:3,border_style_left:"solid",border_width_left:1,border_color_left:"#BDBDBD",border_roundness_left:3,border_style_bottom:"solid",border_width_bottom:1,border_color_bottom:"#BDBDBD",border_roundness_bottom:3,border_style_right:"solid",border_width_right:1,border_color_right:"#BDBDBD",border_roundness_right:3,border_width:1,font_alignment:"center",padding_horizontal:0,padding_vertical:15,width:200,height:45,use_max_width:!0,max_width:150},updated_default_sizing:{height:48},default_states:void 0,field_names:extend({src:{},placeholder:{default:"Click to upload a file"},mandatory:{},private:{no_states:!0},attach_to:{},service:{no_states:!0},destination:{}},get_disabled_field_name,get_auto_binding_field_names,get_max_file_size_field_name),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Font(".file-input-text"),new property_applications_default.FontSpacing(".file-input-text"),new property_applications_default.PaddingText(".file-input-text"),new property_applications_default.PaddingFields({selector:".file-input-text",minimum_element_version:PADDING_VERSION,no_vertical_if_legacy_center:!0,allow_legacy:!0}),new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,get_html(instance4){return"<div></div>"},get_min_width(){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{show_message_for_ios_8_upload_bug();let canvas=instance4.get_canvas(),text2=$('<div class="file-input-text"></div>');property_applications_default.apply_css_style(text2,{"-moz-box-sizing":"border-box",position:"absolute",top:"0px",overflow:"hidden",width:"100%",height:"100%"}),canvas.append(text2);let placeholder_on=u_exports2.Box(),input2=null;function display_file_name(url9){var _input2;if(!url9){var _input;placeholder_on(!0),(_input=input2)==null||_input.attr("title",null);return}placeholder_on(!1);let url_parts=url9.split("/"),filename=url_parts[-1+url_parts.length];text2.text(filename),(_input2=input2)==null||_input2.attr("title",filename)}if(u_exports2.autorun(()=>{placeholder_on()&&text2.text(evaluate_property(instance4,"placeholder"))}),input_change_autorun(instance4,url9=>{display_file_name(url9)}),instance4.run_mode()){let get_additional_data2=function(cb){u_exports2.run_once(30,()=>process_upload_security(instance4),(err,data)=>{err?cb(err):!data.public&&!data.attach_to?cb(new UserError("PRIVATE_FILE")):cb(null,data)})},cb_start2=function(){instance4.state("loading",!0),instance4.state("upload_percent",0)},cb_success2=function(url9){var _input$0$files$;instance4.state("file_size",(_input$0$files$=input2[0].files[0])==null?void 0:_input$0$files$.size),instance4.state("loading",!1),instance4.state("upload_percent",100),display_file_name(url9),instance4.message("user_submit",url9),input2[0].value=null},cb_fail2=function(err){core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT,cb(err2){err2&&window.alert(human_friendly(err2)),instance4.state("loading",!1),instance4.state("upload_percent",0)}})},cb_progress2=function(value){instance4.state("upload_percent",Math.min(Math.round(value*1e4)/100,100))},get_max_file_size_in_bytes2=function(){var _element_eval$evaluat;return((_element_eval$evaluat=evaluate_property(instance4,"max_size"))!=null?_element_eval$evaluat:0)*1e3*1e3},cancel_upload2=function(){var _cancel_upload_fn;(_cancel_upload_fn=cancel_upload_fn)==null||_cancel_upload_fn(),instance4.state("loading",!1),instance4.state("upload_percent",0),input2[0].value=null};var get_additional_data=get_additional_data2,cb_start=cb_start2,cb_success=cb_success2,cb_fail=cb_fail2,cb_progress=cb_progress2,get_max_file_size_in_bytes=get_max_file_size_in_bytes2,cancel_upload=cancel_upload2,_instance$element$roo;let cancel_upload_fn;input2=$('<input type="file"></input>'),canvas.addClass(CLICKABLE_ELEMENT),canvas.append(input2),property_applications_default.apply_css_style(input2,{opacity:0,position:"absolute","z-index":1+text2.css("z-index"),top:"0px",width:"100%",height:"100%","font-size":0});let service=instance4.get_static_property("service");service&&service!=="bubble"?MakeImageUploader({input:input2,get_additional_data:get_additional_data2,cb_success:cb_success2,cb_start:cb_start2,cb_fail:cb_fail2,max_file_size_fn:get_max_file_size_in_bytes2}):cancel_upload_fn=make_presigned_uploader({instance:instance4,input:input2,get_additional_data:get_additional_data2,cb_success:cb_success2,cb_start:cb_start2,cb_fail:cb_fail2,cb_progress:cb_progress2,max_file_size_fn:get_max_file_size_in_bytes2}),((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())===0&&register_tab_index_listener(instance4,tab_index=>{input2.attr("tabindex",tab_index)}),on_property_change(instance4,"disabled",value=>{input2[0].disabled=value,property_applications_default.apply_css_style(input2,{cursor:value?"default":"pointer"}),property_applications_default.apply_css_style(text2,{cursor:value?"default":"pointer"}),appquery_default.get_public_setting("bubble_version")<29&&instance4.state("loading")&&value&&cancel_upload2()}),register_focus(instance4,input2),instance4.on_message("set_focus",()=>input2.focus()),instance4.on_message("cancel_upload",()=>{cancel_upload2()})}on_property_change(instance4,"placeholder",placeholder=>{var _input3;((_input3=input2)==null?void 0:_input3.val())==null&&text2.text(placeholder)})})},get_starting_content(instance4){return instance4.run_mode()&&instance4.get_static_property("auto_binding")?get_input_autobind_thing_field(instance4):evaluate_property(instance4,"src")},get_state_value(element,name){if(name==="value")return"file"},get_states(element){return["loading","file_size","upload_percent"]},add_specific_messages(messages,element){extend(messages,file_inputs_additional_messages,{get_upload_percent:{description:"'s upload percentage",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a,_b){return a==null?void 0:a.state("upload_percent")}}})},need_to_wait_before_checking_validity:!0,content_validated(val,instance4){return val||!evaluate_property(instance4,"mandatory")},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!0,is_file_uploader:!0,contains_group_data:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator210=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();init_runmode();var groups_exports2={};__export(groups_exports2,{container_field_names:()=>container_field_names,group_element_definition:()=>group_element_definition,group_field_names:()=>group_field_names,state_value_helper_for_group:()=>state_value_helper_for_group});init_define_process_env();init_shim();var import_web_dom_collections_iterator208=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_property_applications();init_containers();var container_field_names={group_type:{no_states:!0},data_source:{}};function state_value_helper_for_group(element,name){if(name==="group_data")return element.get_static_property("group_type")}var group_field_names={collapse_animation:{no_states:!0,default:!1},animation_type:{no_states:!0,default:"slide"},overflow_scroll:{no_states:!0,default:!1}},group_element_definition={category:"containers",defaults:{bgcolor:"#FFFFFF",background_style:"bgcolor",width:400,height:250},properties_for_new:{container_layout:"column",min_height_css:"40px",min_width_css:"40px",single_width:!1,fit_width:!1},updated_default_sizing:{width:280,height:280},field_names:extend({collapse_when_hidden:{no_states:!0,default:!1}},group_field_names,start_workflow_field_names,container_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveContainer,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity],get_html(instance4){return"<div></div>"},change_cursor_style_if_clickable:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},contains_group_data:!0,get_state_value(element,name){return state_value_helper_for_group(element,name)},notify_width(instance4,width2){u_exports2.WaitFor(instance4.get_children_drawn_key(),()=>{resize_container_width(instance4,width2)})},get_min_width(element){return 0},events:["ButtonClicked","ElementPressed"],is_input:!1,add_an_invisible_div_on_the_top:!1};init_define_process_env();init_shim();init_lib();var floating_field_names={floating_reference:{default:"top",no_states:!0},floating_reference_horizontal:{default:"none",no_states:!0},floating_reference_horizontal_resp:{default:"left",no_states:!0},safe_area_behavior:{default:"none"},avoid_keyboard:{default:!0,no_states:!0},float_zindex:{default:"front",no_states:!0},parallax:{default:1,no_states:!0}};function check_error_floating_group(element,report){var _element$parent,_element$parent$is_mo;if(!["Page","CustomDefinition"].includes(element.parent().type())){let caption;switch(element.parent().type()){case"Page":(_element$parent=element.parent())!=null&&(_element$parent$is_mo=_element$parent.is_mobile)!=null&&_element$parent$is_mo.call(_element$parent)?caption="mobile view":caption="page";break;case"CustomDefinition":caption="reusable element";break}report(element.display()+": Floating Group must be right under the "+caption+". Instead it is under "+element.parent().display()),(void 0)(element,"get_group_data",report)}}init_element_eval();init_element_props();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_es_string_replace47=__toESM(require_es_string_replace()),import_web_dom_collections_iterator209=__toESM(require_web_dom_collections_iterator());init_solid();init_runmode();init_element_eval();init_element_props();init_property_applications();init_element_styles();init_properties();init_define_process_env();init_shim();init_lib();init_define_process_env();init_shim();init_analytics();init_segment_events();init_appquery();init_u2();function getAppBar(view){let element=view.elements().find(element2=>element2.type()==="AppBar");return element!=null&&element.soft_deleted()?void 0:element}init_define_process_env();init_shim();init_appquery();init_analytics();init_segment_events();init_lib();var DEFAULT_TAB_BAR_HEIGHT=49,DEFAULT_TAB_ITEM_HEIGHT=48;function getGlobalTabBar(){var _appquery$element;let id=appquery_default.get_public_setting("global_tab_bar");if(!(id==null||!((_appquery$element=appquery_default.element(id))!=null&&_appquery$element.exists())))return appquery_default.element(id)}function findTabItem(tabBar,targetView){return tabBar.elements().find(element=>element.get_static_property("target_view")===targetView)}function getPageTabBar(element){let tabBar=getGlobalTabBar();return tabBar==null||tabBar.elements().length===0?null:findTabItem(tabBar,element.id())!=null||element.get_static_property("show_tab_bar")?tabBar:null}function getOverlayInsets(element){let root2=element.root();if(!(root2!=null&&root2.is_mobile()))return{};let insets={},tab_bar=getPageTabBar(root2);if(tab_bar!=null){var _Lib$or_throw$visual_,_Lib$or_throw$visual_2;insets.bottom=(_Lib$or_throw$visual_=(_Lib$or_throw$visual_2=lib_default.or_throw().visual_edit.get_instance(tab_bar))==null?void 0:_Lib$or_throw$visual_2.current_height())!=null?_Lib$or_throw$visual_:0}let app_bar=getAppBar(root2);if(app_bar!=null){var _Lib$or_throw$visual_3,_Lib$or_throw$visual_4;insets.top=(_Lib$or_throw$visual_3=(_Lib$or_throw$visual_4=lib_default.or_throw().visual_edit.get_instance(app_bar))==null?void 0:_Lib$or_throw$visual_4.current_height())!=null?_Lib$or_throw$visual_3:0}return insets}init_mobile();init_define_process_env();init_shim();init_element_props();function getSafeAreaSides(instance4){let horizontalAlignment=instance4.get_static_property("floating_reference_horizontal_resp"),verticalAlignment=instance4.get_static_property("floating_reference"),sides=[];switch(horizontalAlignment){case"left":sides.push("left");break;case"right":sides.push("right");break;case"center":sides.push("left","right");break}switch(verticalAlignment){case"top":sides.push("top");break;case"bottom":sides.push("bottom");break;case"both":is_fitting_height(instance4)||sides.push("top","bottom");break;case"none":sides.push("top");break}return sides}var _tmpl$10=template("<div>"),PRESUMED_GRAYOUT_ZINDEX2=2002-1,SIDES=["left","right","top","bottom"];function FloatingGroupComponent(props){let instance4=props.instance;return onMount(()=>{if(instance4.run_mode()){let parallaxFactor=instance4.get_static_property("parallax");parallaxFactor!=null&&parallaxFactor!==1&&$(window).on("scroll",function(){window.requestAnimationFrame(function(){property_applications_default.apply_css_style(instance4.canvas,{transform:`translate3d(0,${(1-parallaxFactor)*$(window).scrollTop()}px, 0)`})})}),instance4.on_message("position_element",position=>{instance4.state("manual_position",{top:`${position.Y}px`,left:`${position.X}px`,position:position.position})})}}),(()=>{var _el$=_tmpl$10();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,"floating-group":!0,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var FloatingGroupComponent_default=createElement2(FloatingGroupComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;function getZIndex(){if(element.get_static_property("float_zindex")==="back")return 0;var _element$get_zindex;return PRESUMED_GRAYOUT_ZINDEX2-500+((_element$get_zindex=element.get_zindex())!=null?_element$get_zindex:0)}let parent=element.parent();return{properties:containerProperties(shouldAddWrapper),styles:[new Style(instance4=>{var _instance$element$roo,_element_eval$evaluat,_element_eval$evaluat2,_element_eval$evaluat3;let overlayInsets=getOverlayInsets(instance4.element),safeAreaBehavior=(_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.is_mobile()&&(_element_eval$evaluat=evaluate_property(instance4,"safe_area_behavior"))!=null?_element_eval$evaluat:"none",page_padding_left=(_element_eval$evaluat2=evaluate_property(instance4.root_instance(),"padding_left"))!=null?_element_eval$evaluat2:0,page_padding_right=(_element_eval$evaluat3=evaluate_property(instance4.root_instance(),"padding_right"))!=null?_element_eval$evaluat3:0,page_padding_sum=0;instance4.edit_mode()&&(page_padding_left||page_padding_right)&&evaluate_property(instance4.root_instance(),"container_layout")==="relative"&&(page_padding_sum=Math.max(page_padding_left,0)+Math.max(page_padding_right,0));let calc_width=width2=>width2.includes("%")?`calc(${parseInt(width2.replace("%",""))/100} * calc(100% + ${page_padding_sum}px))`:width2,is_padded_percentage_width=page_padding_sum!==0&&min_width_css(instance4).includes("%"),props={width:is_padded_percentage_width?"0px":"initial","min-width":is_padded_percentage_width?calc_width(min_width_css(instance4)):min_width_css(instance4),"min-height":min_height_css(instance4)},maxWidth=max_width_css(instance4);page_padding_sum&&maxWidth!=null&&(maxWidth=calc_width(maxWidth));let maxHeight=max_height_css(instance4),margins=Object.fromEntries(SIDES.map(side=>{var _element_eval$evaluat4;let margin=(_element_eval$evaluat4=evaluate_property(instance4,`margin_${side}`))!=null?_element_eval$evaluat4:0,overlayInset=overlayInsets[side];return overlayInset!=null?margin+=overlayInset:safeAreaBehavior==="outer"&&(margin+=STANDARD_SAFE_AREA_INSETS[side]),[side,margin]}));for(let side of SIDES)props[side]=`${margins[side]}px`;if(element.fit_width()){props.width="max-content";let boundedWidth=`calc(${calc_width("100%")} - ${margins.left+margins.right}px)`;maxWidth!=null?props["max-width"]=[`min(${maxWidth}, ${boundedWidth})`,maxWidth]:props["max-width"]=boundedWidth}else props.width=instance4.edit_mode()?`calc(${calc_width("100%")} - ${margins.left+margins.right}px)`:"initial",props["max-width"]=maxWidth;if(element.fit_height()){var _element$root;props.height=(_element$root=element.root())!=null&&_element$root.is_mobile()?"max-content":"auto";let boundedHeight=`calc(100% - ${margins.top+margins.bottom}px)`;maxHeight!=null?instance4.run_mode()?props["max-height"]=[`min(${maxHeight}, ${boundedHeight})`,maxHeight]:props["max-height"]=maxHeight:instance4.run_mode()&&(props["max-height"]=boundedHeight)}else props.height="initial",props["max-height"]=maxHeight;switch(element.get_static_property("floating_reference_horizontal_resp")){case"left":element.fit_width()?props.right="unset":props["margin-right"]="auto",instance4.edit_mode()&&evaluate_property(instance4.root_instance(),"container_layout")==="relative"&&(props["margin-left"]=`-${page_padding_left}px`);break;case"right":element.fit_width()?props.left="unset":props["margin-left"]="auto",instance4.edit_mode()&&evaluate_property(instance4.root_instance(),"container_layout")==="relative"&&(props["margin-right"]=`-${page_padding_right}px`);break;case"center":props["margin-left"]=props["margin-right"]="auto";break}let floatingRefVert=element.get_static_property("floating_reference");switch(props.position=floatingRefVert==="none"||!instance4.run_mode()||(parent==null?void 0:parent.type())!=="Page"?"absolute":"fixed",floatingRefVert){case"top":element.fit_height()&&(props.bottom="unset");break;case"bottom":element.fit_height()?props.top="unset":(parent==null?void 0:parent.type())==="Page"?(props.height=`calc(100${instance4.run_mode()?"vh":"%"} - ${margins.top+margins.bottom}px)`,props.top="unset"):props["margin-top"]="auto";break;case"both":(parent==null?void 0:parent.type())==="Page"&&(props["margin-top"]=props["margin-bottom"]="auto"),instance4.run_mode()&&(props["overflow-y"]="auto");break;case"none":props.bottom="unset"}return props["z-index"]=getZIndex(),props},{outerPositioning:!0,noWaitVisible:!0}),new Style(instance4=>{var _instance$state;return(_instance$state=instance4.state("manual_position"))!=null?_instance$state:{}},{alwaysDynamic:!0}),new Style(instance4=>instance4.is_visible()?{}:{display:"none"},{alwaysDynamic:!0,noWaitVisible:!0,notInStylesheet:!0,outerPositioning:!0}),...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>{var _instance$element$roo2,_element_eval$evaluat5;let style2={},overlayInsets=getOverlayInsets(instance4.element),safeAreaBehavior=(_instance$element$roo2=instance4.element.root())!=null&&_instance$element$roo2.is_mobile()&&(_element_eval$evaluat5=evaluate_property(instance4,"safe_area_behavior"))!=null?_element_eval$evaluat5:"none",safeAreaSides=getSafeAreaSides(instance4);for(let side of safeAreaSides)if(safeAreaBehavior==="inner"&&overlayInsets[side]==null){var _element_eval$evaluat6,_element_eval$evaluat7;style2[`padding-${side}`]=`${((_element_eval$evaluat6=evaluate_property(instance4,`padding_${side}`))!=null?_element_eval$evaluat6:0)+Math.max(STANDARD_SAFE_AREA_INSETS[side]-((_element_eval$evaluat7=evaluate_property(instance4,`margin_${side}`))!=null?_element_eval$evaluat7:0),0)}px`}return style2})]}});var PRESUMED_GRAYOUT_ZINDEX3=2002-1;make_element("FloatingGroup",{display:"Floating Group",category:"containers",glyph_id:"floating_group",list_order:5,keyboard_shortcut:null,defaults:{floating_reference:"top",width:400,height:250},updated_default_sizing:{width:320},properties_for_new:{container_layout:"column"},field_names:extend({},floating_field_names,start_workflow_field_names,container_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveContainer,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:FloatingGroupComponent_default,attach_to_body(instance4){return instance4.run_mode()&&!this.added_to_container(instance4.element)},can_fit_width:!0,can_fit_height:!0,added_to_container(element){var _element$parent;return((_element$parent=element.parent())==null?void 0:_element$parent.type())!=="Page"},not_draggable(element){var _element$root;return((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>0},goes_on_document(element){return element==null||element.root()==null?!0:this.not_draggable(element)},get_min_width(){return 0},goes_on_document_for_drawing(){return!0},position_canvas(to_position,instance4){let{element}=instance4,parent=instance4.element.parent();function get_zindex(){if(element.get_static_property("float_zindex")==="back")return 0;{let zindex,greyout_element=$(".greyout");return greyout_element.length===0?zindex=PRESUMED_GRAYOUT_ZINDEX3-500:zindex=greyout_element.css("z-index")-500,(!zindex||zindex<=0)&&(zindex=2),zindex+instance4.element.get_zindex()}}instance4.wait_for_visible_lite(()=>{if(instance4.autorun(()=>{let props={"margin-left":"","margin-right":"","margin-top":"","margin-bottom":"",width:"initial","min-width":min_width_css(instance4),"min-height":min_height_css(instance4)},max_width=max_width_css(instance4),max_height=max_height_css(instance4);for(let side of["left","right","top","bottom"])props[side]=evaluate_property(instance4,`margin_${side}`);if(element.fit_width()){props.width="auto";let bounded_width=`calc(100% - ${props.left+props.right}px)`;max_width!=null?props["max-width"]=apply_css_fallbacks("max-width",[`min(${max_width}, ${bounded_width})`,max_width]):props["max-width"]=bounded_width}else props.width="initial",props["max-width"]=max_width!=null?max_width:"";if(element.fit_height()){props.height="auto";let bounded_height=`calc(100% - ${props.top+props.bottom}px)`;max_height!=null?props["max-height"]=apply_css_fallbacks("max-height",[`min(${max_height}, ${bounded_height})`,max_height]):props["max-height"]=bounded_height}else props.height="initial",props["max-height"]=max_height!=null?max_height:"";switch(element.get_static_property("floating_reference_horizontal_resp")){case"left":element.fit_width()?props.right="unset":props["margin-right"]="auto";break;case"right":element.fit_width()?props.left="unset":props["margin-left"]="auto";break}let floating_reference_vert=element.get_static_property("floating_reference");props.position=floating_reference_vert==="none"||!instance4.run_mode()||parent.type()!=="Page"?"absolute":"fixed";let overflow_y="";switch(floating_reference_vert){case"top":element.fit_height()&&(props.bottom="unset");break;case"bottom":element.fit_height()?props.top="unset":parent.type()==="Page"?(props.height=`calc(100${instance4.run_mode()?"vh":"%"} - ${props.top+props.bottom}px)`,props.top="unset"):props["margin-top"]="auto";break;case"both":parent.type()==="Page"&&(props["margin-top"]=props["margin-bottom"]="auto"),overflow_y="auto";break;case"none":props.bottom="unset";break}instance4.run_mode()&&to_position.css("overflow-y",overflow_y),props["z-index"]=get_zindex(),to_position.css(props)}),!instance4.run_mode()||parent.type()!=="Page"?(instance4.container.container_canvas.append(to_position),instance4.edit_mode()&&(instance4.container.setup_margins(instance4),instance4.container.setup_padding(instance4))):$("body").append(to_position),to_position.addClass("floating-group"),instance4.run_mode()){let parallax_factor=instance4.get_static_property("parallax");[null,void 0,1].includes(parallax_factor)||$(window).on("scroll",()=>{window.requestAnimationFrame(()=>{property_applications_default.apply_css_style(to_position,{transform:"translate3d(0,"+(1-parallax_factor)*$(window).scrollTop()+"px, 0)"})})})}})},can_defer_drawing(){return!0},register(instance4){},initialize(instance4){},check_for_errors(element,report){return check_error_floating_group(element,report)},is_input:!1,contains_group_data:!0,uses_inset_instead_of_margin:!0,add_an_invisible_div_on_the_top:!1,get_html(instance4){return"<div></div>"},change_cursor_style_if_clickable:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},get_state_value(element,name){return state_value_helper_for_group(element,name)},get_private_messages(){return["child_movement","position_element"]},events:["ButtonClicked","ElementPressed"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator211=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();init_b_location();init_geolocation();init_logger();init_lib();init_appquery();init_btypes();init_element_utils();init_lodash();init_apps_utilities();init_image_utils();init_element_eval();init_elements();init_define_process_env();init_shim();init_geolocation();init_b_location();init_location_lookups();init_appquery();init_btypes();init_element_eval();init_apps_utilities();init_u2();var DEFAULT_CENTER=SAMPLE_VALUE,DEFAULT_ZOOM=10;function getLocation(coordinates){return coordinates=get5("geographic_address").cast(coordinates),ensure_valid_location(coordinates)?ensure_valid_location(coordinates,!0):void 0}function getBackupCenter(){let tryCurrentGeo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(is_test2(appquery_default.app().id()))return getLocation(DEFAULT_CENTER);let currentPosition=SAMPLE_VALUE;if(tryCurrentGeo)try{currentPosition=get_current_geographic_position()}catch{currentPosition=SAMPLE_VALUE}return getLocation(currentPosition||DEFAULT_CENTER)}function getCenterAndZoom(instance4){let center;if(instance4.state("manual_setting")){var _center;return center=getLocation(instance4.state("center")),(_center=center)!=null||(center=getBackupCenter(!1)),{center,zoom:instance4.state("initial_zoom"),recenter_ui:!0}}let marker_type=evaluate_property(instance4,"marker_type"),default_to_user_loc=marker_type==="none"||instance4.edit_mode(),initial_position;if(marker_type==="none"||marker_type==="single"){var _initial_position;initial_position=getLocation(instance4.state("marker_data")),(_initial_position=initial_position)!=null||(initial_position=getBackupCenter(default_to_user_loc));let initial_zoom=instance4.get_static_property("initial_zoom");return{center:initial_position,zoom:initial_zoom,recenter_ui:!0}}else{let processed_markers=instance4.state("processed_markers");if(processed_markers==null||is_empty(processed_markers))return initial_position=getBackupCenter(default_to_user_loc),{center:initial_position,zoom:DEFAULT_ZOOM,recenter_ui:!instance4.draw_the_list_once};{var _initial_position2;let key=Object.keys(processed_markers)[0];initial_position=processed_markers[key].position,initial_position&&(initial_position=from_address({lat:initial_position.lat,lng:initial_position.lng})),(_initial_position2=initial_position)!=null||(initial_position=getBackupCenter(default_to_user_loc));let do_recenter=!1,zoom=null;return Object.keys(processed_markers).length===1&&(do_recenter=!0,zoom=DEFAULT_ZOOM),{center:initial_position,zoom,recenter_ui:do_recenter}}}}var _map_loaded_already=!1,deleted_maps=[],USE_EVALED_PROPS="use_evaled_props";function to_gmaps_location(coordinates){if(coordinates==null)return;let{lat,lng}=coordinates;if(lat!=null&&lng!=null)return new window.google.maps.LatLng(lat,lng)}function hash_marker(_ref){let{position,id,icon}=_ref;return(position!=null?`(${position.lat}, ${position.lng})`:"undefined")+(id!=null?id:"")+(icon!=null?icon:"")}make_element("GoogleMap",{display:"Map",category:"visual elements",glyph_id:"map",list_order:9,keyboard_shortcut:null,defaults:{width:450,height:350,collapse_margin:500},field_names:{marker_type:{default:"single",no_states:!0},marker_data_type:{no_states:!0},data_source:{no_states:!0},location_field:{no_states:!0},show_info_window:{default:"no",no_states:!0},marker_caption_expression:{},autoclose:{no_states:!0},map_type:{default:"ROADMAP",no_states:!0,in_style:!0},map_style:{default:"normal",in_style:!0},custom_style:{in_style:!0},allow_zoom_drag:{default:!0},disable_zoom_scroll:{default:!1,no_states:!0},manual_setting:{default:!1,no_states:!0},center:{no_states:!0},initial_zoom:{default:10,no_states:!0},use_customized_marker_icon:{default:!1,no_states:!0},use_customized_marker_icon_for_list:{default:"no",no_states:!0},custom_marker_icon:{no_states:!0},custom_marker_field:{no_states:!0},custom_selected_icon:{no_states:!0,default:"no"},custom_selected_icon_image:{no_states:!0},custom_selected_icon_field:{no_states:!0},keep_proportion_resize:{no_states:!0},ios_use_apple_maps:{default:!1,no_states:!0}},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Padding,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],properties_for_mobile:{min_width_css:"0px"},updated_default_sizing:{height:320},uses_css_responsive:!0,can_fix_aspect_ratio(){return!0},get_html(instance4){return"<div></div>"},get_min_width(){return 0},can_defer_drawing(){return!0},register(instance4){let google_map_api_loaded2;on_react_native()?google_map_api_loaded2=u_exports2.FakeKey():google_map_api_loaded2=load_google_map_api(),instance4.currently_displayed_markers={},instance4.draw_the_list_once=!1,instance4.run_mode()&&(instance4.on_message("set_marker_data",new_list=>{instance4.state("datasource_changed_by_workflow_action",!0),instance4.draw_the_list_once=!1,instance4.state("marker_data",new_list)}),instance4.on_message("clear_marker_data",()=>{instance4.state("datasource_changed_by_workflow_action",!1),instance4.draw_the_list_once=!1}),instance4.autorun(()=>{if(!instance4.state("datasource_changed_by_workflow_action")){let data_source;if(instance4.run_mode()){var _element_eval$evaluat;data_source=(_element_eval$evaluat=evaluate_property(instance4,"data_source"))!=null?_element_eval$evaluat:null}else if(instance4.element.property("data_source").is_static()){var _element_eval$evaluat2;data_source=(_element_eval$evaluat2=evaluate_property(instance4,"data_source"))!=null?_element_eval$evaluat2:null}instance4.state("marker_data",data_source)}}),on_property_change(instance4,"use_customized_marker_icon_for_list",val=>{val==="upload"&&evaluate_property(instance4,"custom_marker_icon")}),on_property_change(instance4,"custom_selected_icon",val=>{val==="upload"&&evaluate_property(instance4,"custom_selected_icon_image")}),instance4.state(USE_EVALED_PROPS,!0),instance4.on_message("map_adjust_zoom",props=>{props.manual_setting?(instance4.state(USE_EVALED_PROPS,!1),instance4.state("manual_setting",null),instance4.state("manual_setting",!0),instance4.state("initial_zoom",props.initial_zoom),instance4.state("center",props.center)):instance4.state(USE_EVALED_PROPS,!0)}),instance4.autorun(()=>{if(!instance4.state(USE_EVALED_PROPS))return;let manual_setting=evaluate_property(instance4,"manual_setting"),initial_zoom=evaluate_property(instance4,"initial_zoom"),center=evaluate_property(instance4,"center");instance4.draw_the_list_once=!1,instance4.state("manual_setting",null),instance4.state("manual_setting",manual_setting),instance4.state("initial_zoom",initial_zoom),instance4.state("center",center)}),u_exports2.WaitFor(google_map_api_loaded2,()=>{instance4.autorun(()=>{this._process_markers(instance4)}),instance4.original_state_saver=instance4.autorun(()=>{let{center,zoom}=getCenterAndZoom(instance4);instance4.state("map_center_address",center),instance4.state("zoom_level",zoom)})}),instance4.on_message("set_marker_selection",to_select=>{instance4.state("currently_selected_marker",to_select)}))},initialize(instance4){instance4.wait_for_visible_lite(()=>{var _instance$currently_d;let google_map_api_loaded2=load_google_map_api();(_instance$currently_d=instance4.currently_displayed_markers)!=null||(instance4.currently_displayed_markers={});let canvas=instance4.get_canvas();if(instance4.thumbnail_mode()){canvas.css({"background-color":"#E6E6E6"});return}let map2=null;u_exports2.WaitFor(google_map_api_loaded2,()=>{let build=()=>{map2=this._get_map(instance4,{height:"100%",width:"100%",position:"absolute",top:0,left:0,right:0,bottom:0}),instance4.edit_mode()&&(void 0)(instance4);let size_observer=new ResizeObserver(entries=>window.google.maps.event.trigger(map2,"resize"));size_observer.observe(canvas[0]),instance4.on_destroy(()=>size_observer.disconnect());let aspect_ratio_canvas=null;instance4.autorun(()=>{if(instance4.element.has_fixed_aspect_ratio()){var _aspect_ratio_canvas;(_aspect_ratio_canvas=aspect_ratio_canvas)!=null||(aspect_ratio_canvas=div("",canvas)),aspect_ratio_canvas.css("height",0),instance4.autorun(()=>{let ratio=instance4.element.get_static_property("aspect_ratio_height")/instance4.element.get_static_property("aspect_ratio_width");aspect_ratio_canvas.css("padding-top",`${ratio*100}%`)})}else{var _aspect_ratio_canvas2;(_aspect_ratio_canvas2=aspect_ratio_canvas)==null||_aspect_ratio_canvas2.remove(),aspect_ratio_canvas=null}}),pre_cache(instance4,["four_border_style","border_width","border_style","padding_vertical","padding_horizontal"]),instance4.autorun(()=>{this._refresh_border(instance4,map2)}),on_property_change(instance4,["allow_zoom_drag","map_style","custom_style","disable_zoom_scroll"],props=>{this._handle_map_option_change(map2,props)}),on_property_change(instance4,"map_type",map_type=>{map2.setMapTypeId(window.google.maps.MapTypeId[map_type])}),instance4.autorun(()=>{this._render_markers(instance4,map2)}),instance4.autorun(()=>{this._set_center_and_zoom(instance4,map2)})};instance4.wait_for_visible(()=>{instance4.setTimeout(build,1)})})})},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!1,contains_group_data:!1,events:["MapMarkerClicked"],get_states(element){return["currently_selected_marker","map_center_address","zoom_level"]},add_specific_messages(messages,element){let marker=element.get_state_value("currently_selected_marker");marker&&extend(messages,{get_currently_selected_marker:{description:"'s current marker",is_client_state(){return!0},section:"States",ret_btype:marker,fn(a,b){var _a$state;return(_a$state=a==null?void 0:a.state("currently_selected_marker"))!=null?_a$state:this.ret_btype_null()}}}),extend(messages,{get_map_center_address:{description:"'s center address",is_client_state(){return!0},section:"States",ret_btype:"geographic_address",fn(a,b){var _a$state2;return(_a$state2=a==null?void 0:a.state("map_center_address"))!=null?_a$state2:this.ret_btype_null()}},get_zoom_level:{description:"'s zoom level",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a,b){var _a$state3;return(_a$state3=a==null?void 0:a.state("zoom_level"))!=null?_a$state3:this.ret_btype_null()}}})},get_messages(element){return["set_marker_data","clear_marker_data","map_adjust_zoom","set_marker_selection"]},get_state_value(element,name){switch(name){case"currently_selected_marker":return element.get_static_property("marker_data_type");case"map_center_address":return"geographic_address";case"get_zoom_level":return"number"}},get_injected_btype(element){return element.get_static_property("marker_data_type")},get_injected_display(){return"Current marker"},use_injected_datasource(node){return(void 0)("marker_caption_expression",node)},check_for_errors(element,report){if(element.get_static_property("map_style",!0)==="_custom"&&element.get_static_property("custom_style",!0)!=null)try{return json_parse(element.get_static_property("custom_style",!0))}catch{return report(element.display()+": the custom style cannot be parsed as a JSON object")}},jquery_plugins(){return["google_map_styles.js"]},_refresh_border(instance4,map2){for(let prop of["four_border_style","border_width","border_style","padding_vertical","padding_horizontal"])evaluate_property(instance4,prop);for(let border_location of["_top","_right","_bottom","_left"])evaluate_property(instance4,"border_style"+border_location),evaluate_property(instance4,"border_width"+border_location);return window.google.maps.event.trigger(map2,"resize")},_handle_map_option_change(map2,_ref2){let{allow_zoom_drag,disable_zoom_scroll,map_style,custom_style}=_ref2,mapOptions={};if(map_style&&!["normal","_custom"].includes(map_style))mapOptions.styles=google_map_styles[map_style].data;else if(map_style==="_custom")try{mapOptions.styles=json_parse(custom_style)}catch{mapOptions.styles=null}else mapOptions.styles=null;return mapOptions.disableDefaultUI=!allow_zoom_drag,mapOptions.scrollwheel=allow_zoom_drag&&!disable_zoom_scroll,mapOptions.draggable=allow_zoom_drag,mapOptions.disableDoubleClickZoom=!allow_zoom_drag,map2.setOptions(mapOptions)},_get_map(instance4,map_css){let map_wrapper,{canvas}=instance4,map2=null;if(deleted_maps.length){let deleted_map=deleted_maps.pop();map2=deleted_map.map,map_wrapper=deleted_map.map_wrapper,canvas.append(map_wrapper)}else{let create_map2=function(){map_wrapper=div("map-wrapper",canvas),property_applications_default.apply_css_style(map_wrapper,map_css),map2=new window.google.maps.Map(map_wrapper[0],{streetViewControl:!1})};var create_map=create_map2;if(using_bubble_key()){if(window.glrl_key_status){owner_error(void 0);return}create_map2(),lib_default().location.post("server://user/m/gmap",{appname:lib_default().appname(),mode:is_edit_mode()?"edit":"run",first:_map_loaded_already?"no":"yes"},(err,ret)=>{if(err)return log(err);ret||(window.glrl_key_status=!0)}),_map_loaded_already=!0}else create_map2()}map_wrapper[0].id=instance4.element_id()+"_"+LUID()+"_map_wrapper_"+instance4.responsive_mode();function update_map_center(map3,instance5){let center=map3.getCenter();if(center){let wrapped_center=new window.google.maps.LatLng(center.lat(),center.lng(),!1);return instance5.state("map_center_address",()=>from_address({lat:wrapped_center.lat(),lng:wrapped_center.lng()}))}}let debounce_update_map_center=debounce_default(update_map_center,300);if(instance4.run_mode()){var _instance$original_st;(_instance$original_st=instance4.original_state_saver)==null||_instance$original_st.destroy(),window.google.maps.event.addListener(map2,"click",()=>instance4.state("currently_selected_marker",null)),window.google.maps.event.addListener(map2,"idle",()=>debounce_update_map_center(map2,instance4)),window.google.maps.event.addListener(map2,"center_changed",()=>debounce_update_map_center(map2,instance4)),window.google.maps.event.addListener(map2,"zoom_changed",()=>instance4.state("zoom_level",map2.getZoom()))}return instance4.on_destroy(()=>deleted_maps.push({map:map2,map_wrapper})),map2},_set_center_and_zoom(instance4,map2){let{center,zoom,recenter_ui}=getCenterAndZoom(instance4);if(recenter_ui){let gmaps_center=to_gmaps_location(center);gmaps_center!=null&&(map2.getCenter()?map2.panTo(gmaps_center):map2.setCenter(gmaps_center)),map2.setZoom(zoom)}else if(instance4.get_static_property("marker_type")==="list"){let manual_setting=evaluate_property(instance4,"manual_setting"),bounds=instance4.state("bounds");!manual_setting&&!instance4.draw_the_list_once&&(instance4.draw_the_list_once=!0,map2.fitBounds(bounds),map2.getZoom()>18&&map2.setZoom(16))}window.google.maps.event.trigger(map2,"center_changed"),window.google.maps.event.trigger(map2,"zoom_changed")},_process_markers(instance4){let marker_data_type=evaluate_property(instance4,"marker_data_type"),custom_btype=get5(marker_data_type),get_location_fn,icon_message,selected_icon_message;if(marker_data_type==="geographic_address")get_location_fn=x=>custom_btype.cast(x);else{let location_field=evaluate_property(instance4,"location_field");if(location_field){let location_message=custom_btype.get_message(location_field);get_location_fn=location_message==null?void 0:location_message.evaluate}icon_message=custom_btype.get_message(evaluate_property(instance4,"custom_marker_field")),selected_icon_message=custom_btype.get_message(evaluate_property(instance4,"custom_selected_icon_field"))}let markers_data=instance4.state("marker_data"),processed_markers={};if(get_location_fn!=null)for(let bubble_marker_object of(_markers_data$all=markers_data==null||(_markers_data$all2=markers_data.all)==null?void 0:_markers_data$all2.call(markers_data))!=null?_markers_data$all:[]){var _markers_data$all,_markers_data$all2;let coordinates=get_location_fn(bubble_marker_object);if(coordinates){var _bubble_marker_object;let processed_marker={position:getLocation(coordinates),bubble_object:bubble_marker_object,id:(_bubble_marker_object=bubble_marker_object._id)==null?void 0:_bubble_marker_object.call(bubble_marker_object),bubble_marker_equals:other=>custom_btype.equals(bubble_marker_object,other)};if(!processed_marker.position)continue;if(marker_data_type!=="geographic_address"&&["on_click","always"].includes(instance4.get_static_property("show_info_window"))){let context=instance4.get_injected_context(bubble_marker_object,this.get_injected_btype(instance4.element));processed_marker.title=eval_property_with_states(instance4.element,"marker_caption_expression",context)}instance4.get_static_property("use_customized_marker_icon_for_list")==="upload"?processed_marker.icon=evaluate_property(instance4,"custom_marker_icon"):instance4.get_static_property("use_customized_marker_icon_for_list")==="field"&&marker_data_type!=="geographic_address"&&(processed_marker.icon=optimize_image(icon_message.evaluate(bubble_marker_object),30,30,{},!1,!0)),instance4.get_static_property("custom_selected_icon")==="upload"?processed_marker.selected_icon=evaluate_property(instance4,"custom_selected_icon_image"):instance4.get_static_property("custom_selected_icon")==="field"&&marker_data_type!=="geographic_address"?processed_marker.selected_icon=optimize_image(selected_icon_message.evaluate(bubble_marker_object),30,30,{},!1,!0):processed_marker.selected_icon=null,processed_markers[hash_marker(processed_marker)]=processed_marker}}instance4.state("processed_markers",processed_markers)},_add_marker(instance4,map2,marker_data,display_options){let{position:marker_position,icon}=marker_data,position=to_gmaps_location(marker_position),{animation,add_event_listener}=display_options,options={position,map:map2};animation&&!is_test2(appquery_default.app().id())&&(options.animation=window.google.maps.Animation.DROP),icon&&(options.icon=icon);let marker=new window.google.maps.Marker(options),hash2=hash_marker(marker_data);if(instance4.currently_displayed_markers[hash2]={marker},add_event_listener){var _instance$currently_d2,_instance$currently_d3;let infowindow=null;if(marker_data!=null&&marker_data.title){instance4.currently_displayed_markers[hash2].infowindow?infowindow=instance4.currently_displayed_markers[hash2].infowindow:(infowindow=new window.google.maps.InfoWindow,instance4.currently_displayed_markers[hash2].infowindow=infowindow);let title_div=div("infowindow-content");title_div.text(marker_data.title),title_div[0].style.padding="3px",title_div[0].style["font-family"]="Lato",title_div[0].style.color="rgb(39, 39, 39)",infowindow.setContent(title_div[0]);let show_info_window=instance4.get_static_property("show_info_window"),autoclose=instance4.get_static_property("autoclose");show_info_window==="always"&&infowindow.open(map2,marker),u_exports2.autorun_top(()=>{instance4.currently_displayed_markers[hash2].infowindow_ar=instance4.autorun(()=>{marker_data.bubble_marker_equals(instance4.state("currently_selected_marker"))?show_info_window!=="no"&&infowindow.open(map2,marker):show_info_window==="on_click"&&autoclose&&infowindow!=null&&infowindow.close()})})}(_instance$currently_d3=(_instance$currently_d2=instance4.currently_displayed_markers[hash2]).event_listener)!=null||(_instance$currently_d2.event_listener=window.google.maps.event.addListener(marker,"click",()=>{instance4.state("currently_selected_marker",marker_data.bubble_object),infowindow&&infowindow.open(map2,marker),run_element_workflow(instance4,"MapMarkerClicked")}))}return marker},_remove_markers(instance4,list4){for(let hash2 in list4){var _instance$currently_d4;let data=list4[hash2];data.marker.setMap(null),data.event_listener&&window.google.maps.event.removeListener(data.event_listener),(_instance$currently_d4=instance4.currently_displayed_markers[hash2].infowindow_ar)==null||_instance$currently_d4.destroy(),delete instance4.currently_displayed_markers[hash2]}},_render_markers(instance4,map2){let marker_type=evaluate_property(instance4,"marker_type");marker_type==="none"&&this._remove_markers(instance4.currently_displayed_markers);let custom_marker_icon;if(marker_type==="single"){this._remove_markers(instance4,instance4.currently_displayed_markers);let marker_location=getLocation(instance4.state("marker_data"));instance4.get_static_property("use_customized_marker_icon")&&(custom_marker_icon=evaluate_property(instance4,"custom_marker_icon")),marker_location?this._add_marker(instance4,map2,{position:marker_location,icon:custom_marker_icon},{animation:!1,add_event_listener:!0}):instance4.edit_mode()&&this._add_marker(instance4,map2,{position:getBackupCenter(!0),icon:custom_marker_icon},{animation:!0})}if(marker_type==="list")if(instance4.run_mode()){let processed_markers=instance4.state("processed_markers"),markers_to_delete={};for(let hash2 in instance4.currently_displayed_markers){let marker=instance4.currently_displayed_markers[hash2];processed_markers[hash2]||(markers_to_delete[hash2]=marker)}this._remove_markers(instance4,markers_to_delete);let bounds=new window.google.maps.LatLngBounds;for(let hash2 in processed_markers){let processed_marker=processed_markers[hash2],marker;if(instance4.currently_displayed_markers[hash2]?marker=instance4.currently_displayed_markers[hash2].marker:marker=this._add_marker(instance4,map2,processed_marker,{animation:!1,add_event_listener:!0}),bounds.extend(marker.position),processed_marker.selected_icon!=null){let _showing_selected=!1;instance4.autorun(()=>{processed_marker.bubble_marker_equals(instance4.state("currently_selected_marker"))?_showing_selected||(_showing_selected=!0,marker.setIcon(processed_marker.selected_icon)):_showing_selected&&(_showing_selected=!1,marker.setIcon(processed_marker.icon))})}}instance4.state("bounds",bounds)}else this._remove_markers(instance4,instance4.currently_displayed_markers),instance4.get_static_property("use_customized_marker_icon_for_list")==="upload"&&(custom_marker_icon=evaluate_property(instance4,"custom_marker_icon")),this._add_marker(instance4,map2,{position:getBackupCenter(!0),icon:custom_marker_icon},{animation:!0})}});init_define_process_env();init_shim();init_u2();init_elements2();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator212=__toESM(require_web_dom_collections_iterator());init_element_styles();init_properties();init_element_eval();var _tmpl$11=template("<div>");function GroupComponent(props){return(()=>{var _el$=_tmpl$11();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var GroupComponent_default=createElement_default(GroupComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[new Style(instance4=>({overflow:instance4.state("collapsing")?"hidden":evaluate_property(instance4,"overflow_scroll")?instance4.run_mode()?"hidden auto":"hidden":"visible"})),...containerStyling(shouldAddWrapper),...placedStyling(element)]}});init_elements_utils();init_element_props();init_define_process_env();init_shim();var import_web_dom_collections_iterator214=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_elements2();init_property_applications();init_element_eval();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_solid();init_define_process_env();init_shim();init_solid();init_languages();init_lib();function isRtl(){return is_rtl(lib_default.or_throw().app_language())}function createBorderStyle(props){return createMemo(()=>{let borderStyle={};return props.hasTopBorder&&(borderStyle["border-top-width"]=`${props.separatorWidth}px`,borderStyle["border-top-color"]=props.separatorColor,borderStyle["border-top-style"]=props.separatorStyle,props.includeMargin&&(borderStyle["margin-top"]=`${-props.separatorWidth}px`)),props.hasLeftBorder&&(isRtl()?(borderStyle["border-right-width"]=`${props.separatorWidth}px`,borderStyle["border-right-color"]=props.separatorColor,borderStyle["border-right-style"]=props.separatorStyle,props.includeMargin&&(borderStyle["margin-right"]=`${-props.separatorWidth}px`)):(borderStyle["border-left-width"]=`${props.separatorWidth}px`,borderStyle["border-left-color"]=props.separatorColor,borderStyle["border-left-style"]=props.separatorStyle,props.includeMargin&&(borderStyle["margin-left"]=`${-props.separatorWidth}px`))),props.hasBottomBorder&&(borderStyle["border-bottom-width"]=`${props.separatorWidth}px`,borderStyle["border-bottom-color"]=props.separatorColor,borderStyle["border-bottom-style"]=props.separatorStyle),props.hasRightBorder&&(borderStyle["border-right-width"]=`${props.separatorWidth}px`,borderStyle["border-right-color"]=props.separatorColor,borderStyle["border-right-style"]=props.separatorStyle),props.firstRow&&(borderStyle["padding-top"]="0px"),borderStyle})}init_mode_check();init_define_process_env();init_shim();var import_web_dom_collections_iterator213=__toESM(require_web_dom_collections_iterator()),import_web_immediate10=__toESM(require_web_immediate());init_u2();init_elements2();init_elements();init_property_applications();init_lib();init_languages();init_status_bar();init_logger();init_sample();init_btypes();init_element_utils();init_epoch2();var events4=__toESM(require_events());init_epoch();init_responsive_layout();init_responsive_css();init_element_eval();init_b_object();init_element_props();var DEFAULT_SEPARATOR_WIDTH=1,BORDER_BOX_COLOR2="#CCCCCC",MAX_NUMBER_OF_CELLS2=5e3,display_data_span2=SPANS.rg_display_data_in_cells,add_cells_span2=SPANS.rg_add_cells;function create_resize_observer(canvas,options){let resize_observer,dependency3=u_exports2.Dependency();return typeof ResizeObserver<"u"&&(resize_observer=new ResizeObserver(entries=>{dependency3.invalidate()}),resize_observer.observe(canvas[0],options)),{register(){return dependency3.register()},disconnect(){var _resize_observer;return(_resize_observer=resize_observer)==null?void 0:_resize_observer.disconnect()}}}var RepeatingGroupContainer=class extends events4.EventEmitter{constructor(owner_instance,container_canvas){super(),this.owner_instance=owner_instance,this.container_canvas=container_canvas,this.children=[]}destroy(){for(let child of this.children)child.destroy();this.children=[]}resize_width(){}add_to_instances(instance4){}ready_key(){return this.flow_created}get_canvas(){return this.container_canvas}get_owner(){return this.owner_instance}render(html){let canvas=$(html);return canvas.addClass("bubble-element"),canvas}to_canvas(instance4){}set_height(instance4,height2){instance4.canvas.css("height",height2)}add(instance4){this.container_canvas.append(instance4.get_canvas())}create_child(owner_instance,container_canvas){let c=this.owner_instance.container.create_child(owner_instance,container_canvas);return this.children.push(c),c}initialize(){}detach(instance4){}},RepeatingGroupLayoutStyle=class{constructor(_ref){let{instance:instance4}=_ref;this.type="RepeatingGroup",instance4.repeating_layout_type="RepeatingGroup",this.instance=instance4,this.mode=this.instance.mode,this.has_written_a_list=!1,this.max_index=this.add_cells=null,this.previous_search=null,this.started_adding_cells=!1,this.spinner=null,this.list_item=null,this.old_max_index=0,this.last_cell_add_timeout=null,this.first_unused_cell=null,this.finished_loading_switch=u_exports2.MakeSwitch(null,"loading_switch"),this.extra_fields=[]}instance_children(){return this.instance.children}is_on_window(){var _window5,_window$BrowserDetect;return((_window5=window)==null||(_window$BrowserDetect=_window5.BrowserDetect)==null?void 0:_window$BrowserDetect.OS)==="Windows"}is_rtl(){return is_rtl(lib_default().app_language())}separator_width(){return this.instance.get_static_property("separator_width")}separator_style(){return this.instance.get_static_property("separator_style")}separator_color(){return this.instance.get_static_property("separator_color")}is_fixed_width(){return this.instance.get_static_property("fixed_width")}stable_pagination(){return this.instance.get_static_property("stable_pagination")}group_type(){return this.instance.get_static_property("group_type")}show_all_items(){return this.instance.get_static_property("show_all_items")}auto_fit_row(){return this.instance.get_static_property("auto_fit_row")}auto_fit_column(){return this.instance.get_static_property("auto_fit_column")}scroll_direction(){return!this.fixed_rows()&&!this.fixed_columns()?this.instance.get_static_property("scroll_direction"):this.fixed_columns()?"vertical":"horizontal"}is_rg_flex(){return this.scroll_direction()==="flex_row"}is_masonry(){return!this.fixed_rows()&&this.scroll_direction()==="vertical"&&!this.instance.get_static_property("auto_fit_row")&&!!this.instance.get_static_property("masonry")}row_cell_gap(){return evaluate_property(this.instance,"row_cell_gap")}column_cell_gap(){return evaluate_property(this.instance,"column_cell_gap")}fixed_rows(){return this.instance.get_static_property("fixed_rows")}fixed_columns(){return this.instance.get_static_property("fixed_columns")}fixed_list(){return this.fixed_rows()&&this.fixed_columns()}columns(){var _this$_column_watcher;return(_this$_column_watcher=this._column_watcher)!=null||(this._column_watcher=u_exports2.Watcher(()=>this.fixed_columns()?evaluate_property(this.instance,"columns"):(this.register_resize(),evaluate_property(this.instance,"cell_min_width_css"),this.instance.get_static_property("scroll_direction"),this.instance.canvas.css("grid-template-columns").split(" ").length))),this._column_watcher.get()}rows(){var _this$_row_watcher;return(_this$_row_watcher=this._row_watcher)!=null||(this._row_watcher=u_exports2.Watcher(()=>this.fixed_rows()?evaluate_property(this.instance,"rows"):(this.register_resize(),evaluate_property(this.instance,"cell_min_height_css"),this.instance.get_static_property("scroll_direction"),this.instance.canvas.css("grid-template-rows").split(" ").length))),this._row_watcher.get()}estimate_one_row(){let scroll_direction=this.scroll_direction();if(scroll_direction==="vertical")return this.columns();if(scroll_direction==="horizontal")return this.rows();{let estimated_cell_width=this.instance_children()[0].canvas.width();return Math.ceil(this.instance.canvas.width()/estimated_cell_width)}}data_source(){return evaluate_property(this.instance,"data_source")}total_number_of_cells(){return this.rows()*this.columns()}guess_number_of_cells(){if(this.fixed_list())return this.total_number_of_cells();let guess_dimension=dimension=>{let min_cell_size=evaluate_property(this.instance,`cell_min_${dimension}_css`);if(this.instance.run_mode()&&min_cell_size.indexOf("%")!==-1){let percentage=Math.max(parseInt(min_cell_size),1);return Math.max(Math.ceil(100/percentage),1)}else{let pixels;if(!this.instance.run_mode())this.register_first_cell_resize(),pixels=this.list_item[dimension]();else{let first_cell=this.instance_children()[0];if(!first_cell)pixels=parseInt(min_cell_size);else{let dummies=[];if(dimension==="height"&&this.auto_fit_row()||dimension==="width"&&this.auto_fit_column()){let dummy=document.createElement("div");for(let i=0;i<50;i++)dummies.push(dummy.cloneNode());this.instance.canvas[0].append(...dummies)}let is_hidden=!first_cell.is_visible();first_cell.do_show(),dimension==="height"?pixels=first_cell.canvas.outerHeight():pixels=first_cell.canvas.outerWidth(),is_hidden&&first_cell.do_hide();for(let dummy of dummies)this.instance.canvas[0].removeChild(dummy)}}pixels=Math.max(pixels,1),this.register_resize();let rg_size=0;if(dimension==="height"?(this.instance.run_mode()&&is_fitting_height(this.instance)&&(rg_size=Math.max(window.innerHeight-this.instance.canvas[0].getBoundingClientRect().top,0)),rg_size=Math.max(rg_size,this.instance.canvas.innerHeight()),min_height_css(this.instance)):(this.instance.run_mode()&&is_fitting_width(this.instance)&&(rg_size=Math.max(window.innerWidth-this.instance.canvas[0].getBoundingClientRect().left,0)),rg_size=Math.max(rg_size,this.instance.canvas.innerWidth()),min_width_css(this.instance)),this.instance.run_mode())return Math.max(Math.ceil(rg_size/pixels),1);{let separator_size;return this.is_rg_flex()?dimension==="width"?separator_size=this.column_cell_gap():separator_size=this.row_cell_gap():separator_size=this.separator_width(),Math.max(Math.floor((rg_size+separator_size)/(pixels+separator_size)),1)}}};if(this.scroll_direction()==="vertical"){let guessed_rows;return this.fixed_rows()?guessed_rows=this.rows():guessed_rows=guess_dimension("height"),this.columns()*guessed_rows}else if(this.scroll_direction()==="horizontal"){let guessed_columns;return this.fixed_columns()?guessed_columns=this.columns():guessed_columns=guess_dimension("width"),this.rows()*guessed_columns}else return guess_dimension("width")*guess_dimension("height")}btype_id(){var _this$group_type;return(_this$group_type=this.group_type())!=null?_this$group_type:"user"}floating_group_parents(){return this.instance.element.parents("FloatingGroup")}show_range(){return this.instance.state("show_range")}list_data(){return this.instance.state("list_data")}loading(){return this.instance.state("loading")}set_list_data(data){this.instance.state("list_data",data)}set_show_range(data){this.instance.state("show_range",data)}set_loading(data){this.instance.state("loading",data),data?this.finished_loading_switch.turn_off():this.finished_loading_switch.turn_on()}register_resize(){var _this$_rg_resize_obse;(_this$_rg_resize_obse=this._rg_resize_observer)!=null||(this._rg_resize_observer=create_resize_observer(this.instance.canvas)),this._rg_resize_observer.register()}num_to_row(num){return this.scroll_direction()==="vertical"?Math.floor((num-1)/this.columns())+1:(num-1)%this.rows()+1}num_to_col(num){return this.scroll_direction()==="vertical"?(num-1)%this.columns()+1:Math.floor((num-1)/this.rows())+1}has_top_border(num){return this.is_rg_flex()?!1:this.num_to_row(num)>1}has_left_border(num){return this.is_rg_flex()?!1:this.num_to_col(num)>1}cell_width_px(){var _this$_cell_width_wat;return(_this$_cell_width_wat=this._cell_width_watcher)!=null||(this._cell_width_watcher=u_exports2.Watcher(()=>{let cell_min_width=evaluate_property(this.instance,"cell_min_width_css");if(cell_min_width.indexOf("%")!==-1){if(is_fitting_width(this.instance))return"";let percentage=Math.max(parseInt(cell_min_width),1);return this.register_resize(),`${Math.floor(this.instance.canvas.width()*percentage/100)}px`}else return cell_min_width})),this._cell_width_watcher.get()}cell_height_px(){var _this$_cell_height_wa;return(_this$_cell_height_wa=this._cell_height_watcher)!=null||(this._cell_height_watcher=u_exports2.Watcher(()=>{let cell_min_height=evaluate_property(this.instance,"cell_min_height_css");if(cell_min_height.indexOf("%")!==-1){if(is_fitting_height(this.instance))return"";let percentage=Math.max(parseInt(cell_min_height),1);return this.register_resize(),`${Math.floor(this.instance.canvas.height()*percentage/100)}px`}else return cell_min_height})),this._cell_height_watcher.get()}cell_sizing(cell_canvas){on_property_change(this.instance,"container_layout",layout=>{layout==="fixed"?cell_canvas.addClass("fixed"):cell_canvas.removeClass("fixed")}),this.instance.autorun(()=>{this.is_rg_flex()?cell_canvas.css({"box-sizing":"border-box","min-width":evaluate_property(this.instance,"cell_min_width_css"),"min-height":evaluate_property(this.instance,"cell_min_height_css"),"flex-grow":this.auto_fit_column()?1:0}):cell_canvas.css({"box-sizing":"content-box","min-width":this.fixed_columns()||this.scroll_direction()!=="horizontal"?"":this.cell_width_px(),"min-height":this.fixed_rows()||this.scroll_direction()!=="vertical"?"":this.cell_height_px()})})}observe_masonry_cell(div2){var _this$_masonry_resize;let observer_callback=entries=>{for(let entry of entries){let size;entry.borderBoxSize&&entry.borderBoxSize.length>0?size=entry.borderBoxSize[0].blockSize:size=entry.target.offsetHeight;let grid_row_end_value=`span ${Math.ceil(size)}`;entry.target.style.setProperty("grid-row-end",grid_row_end_value)}};(_this$_masonry_resize=this._masonry_resize_observer)!=null||(this._masonry_resize_observer=new ResizeObserver(observer_callback)),this._masonry_resize_observer.observe(div2,{box:"border-box"})}create_cell(num,cells_canvas){let group_item=new GroupItem(this.instance,0,num),child=elements_default.ElementInstance(group_item,this.instance.mode);child.message("set_group_data",STATE_NOT_READY),child.drawn_key=u_exports2.MakeKey(null,"cell_drawn"),group_item.instance=child,this.instance_children().push(child),child.state("cell_index",num),child._is_visible_me=!1,child.register(this.instance),child.create_skeleton(this.container),child.start_draw_tree(),this.cell_sizing(child.canvas),this.add_sep(num,child.canvas),child.do_hide(),child.drawn_key.turn(),this.instance.run_mode()&&this.is_masonry()&&this.observe_masonry_cell(child.canvas[0])}add_spinner(){if(!this.instance.is_visible()){var _this$spinner;(_this$spinner=this.spinner)==null||_this$spinner.call(this);return}this.spinner||(this.spinner=spinner(this.instance))}remove_spinner(){var _this$spinner2;(_this$spinner2=this.spinner)==null||_this$spinner2.call(this),this.spinner=null}init_raw_list_watcher(start_fn,end_fn){var _this$_raw_list_data_;(_this$_raw_list_data_=this._raw_list_data_watcher)==null||_this$_raw_list_data_.destroy(),this._raw_list_data_watcher=u_exports2.Watcher(()=>{var _this$list_data$with_,_this$list_data,_this$list_data$with_2,_this$list_data$with_3,_this$list_data$with_4;let start_index=start_fn(),last_index=end_fn();return(_this$list_data$with_=(_this$list_data=this.list_data())==null||(_this$list_data$with_2=_this$list_data.with_extra_fields)==null||(_this$list_data$with_3=(_this$list_data$with_4=_this$list_data$with_2.call(_this$list_data,this.extra_fields)).get_children)==null?void 0:_this$list_data$with_3.call(_this$list_data$with_4,start_index,last_index))!=null?_this$list_data$with_:[]});let prev;this._raw_list_data_watcher.on_value(new_val=>{this.set_loading(!compare(new_val,prev)),prev=new_val})}raw_list_data(){var _this$_raw_list_data_2;return(_this$_raw_list_data_2=this._raw_list_data_watcher)==null?void 0:_this$_raw_list_data_2.get()}send_data_to_children(){this.add_spinner();let list4=this.raw_list_data();this.remove_spinner(),this.mode!=="responsive"&&(list4=list4.filter(item=>item!=null));for(let n=0;n<list4.length;n++){let item=list4[n];this.instance_children()[n]==null&&u_exports2.autorun_top(()=>{this.create_cell(n+1,this.instance.canvas)});let child=this.instance_children()[n];u_exports2.WaitFor(page_loaded_key,()=>child.can_register_workflows().turn()),child.message("set_group_data",item),child.do_show()}return this.first_unused_cell=list4.length,this.instance.last_cell=list4.length,list4.length}hide_unused_cells(){this.instance.autorun(()=>{let children2=this.instance_children();for(let m=this.first_unused_cell;m<children2.length;m++){var _children$m;(_children$m=children2[m])==null||_children$m.do_hide()}})}end_of_list(){if(this.list_data()!=null&&this.fixed_list()&&this.columns()===1&&this.rows()===1){var _this$list_data2;this.show_range()===((_this$list_data2=this.list_data())==null?void 0:_this$list_data2.length())&&this.list_data().length()>1&&this.set_show_range(this.list_data().length()-1)}}display_data_in_cells(watch_cell){traceSpan2(display_data_span2.name,display_data_span2.type,()=>{this.instance.autorun(()=>{if(!this.instance.is_visible())return;this.set_loading(!0);let scrolling_canvas,scroll_top;is_on_mobile_or_tablet()||(scrolling_canvas=$("html"),scroll_top=scrolling_canvas[0].scrollTop);let n=this.send_data_to_children();is_on_mobile_or_tablet()||scrolling_canvas.scrollTop(scroll_top),this.hide_unused_cells(),this.end_of_list(),this.has_written_a_list&&u_exports2.wait_for_updates(()=>{this.instance.mark_children_registered(),this.instance.get_children_drawn_key().turn()}),u_exports2.wait_for_updates(()=>{let[error2,ready]=this._raw_list_data_watcher.get_current_status_array();this.set_loading(!ready||error2!=null),watch_cell&&this.watch_lazy_loader(n-1)})})})}show_border_outline(){return this.mode==="edit"&&this.instance.state("show_borders")&&(this.separator_width()===0||this.separator_style()==="none")}get_separator_width(){return this.show_border_outline()?DEFAULT_SEPARATOR_WIDTH:_get_separator_width(this.instance.element)}add_sep(num,div2){this.instance.autorun(()=>{div2.css({"border-top-style":"none","margin-top":""}),this.has_top_border(num)&&(this.is_masonry()?this.instance.run_mode()&&div2.css({"padding-top":`${this.row_cell_gap()}px`}):div2.css({"border-top-width":this.get_separator_width()+"px","border-top-color":this.show_border_outline()?BORDER_BOX_COLOR2:this.separator_color(),"border-top-style":this.show_border_outline()?"solid":this.separator_style(),"margin-top":-this.get_separator_width()+"px"}))}),this.instance.autorun(()=>{if(!this.is_masonry()&&this.has_left_border(num)){let opts;this.is_rtl()?opts={"border-right":this.get_separator_width()+"px","border-right-color":this.show_border_outline()?BORDER_BOX_COLOR2:this.separator_color(),"border-right-style":this.show_border_outline()?"solid":this.separator_style(),"margin-right":-this.get_separator_width()+"px"}:opts={"border-left":this.get_separator_width()+"px","border-left-color":this.show_border_outline()?BORDER_BOX_COLOR2:this.separator_color(),"border-left-style":this.show_border_outline()?"solid":this.separator_style(),"margin-left":-this.get_separator_width()+"px"},property_applications_default.apply_css_style(div2,opts)}else this.is_rtl()?div2.css({"border-right-style":"none","margin-right":""}):div2.css({"border-left-style":"none","margin-left":""})})}get_edit_mode_dummies(){let canvas=this.instance.get_canvas();return $("> .list-dummy",canvas)}setup_grid_css(){let canvas=this.instance.get_canvas();this.instance.autorun(()=>{canvas.removeClass("bubble-rg bubble-rg-flex-row"),this.is_rg_flex()?(canvas.addClass("bubble-rg-flex-row"),this.instance.autorun(()=>{canvas.css({"row-gap":`${this.row_cell_gap()}px`,"column-gap":`${this.column_cell_gap()}px`,"align-content":this.auto_fit_row()?"stretch":"flex-start"})})):(canvas.addClass("bubble-rg"),this.instance.autorun(()=>{canvas.toggleClass("masonry",this.is_masonry()),this.is_masonry()?canvas.css({"column-gap":`${this.column_cell_gap()}px`,"row-gap":this.instance.run_mode()?"":`${this.row_cell_gap()}px`}):canvas.css({gap:this.get_separator_width()});let auto_size_row=this.auto_fit_row()?"auto-fit":"auto-fill",auto_size_column=this.auto_fit_column()?"auto-fit":"auto-fill";this.fixed_rows()?is_fitting_height(this.instance)?canvas.css({"grid-template-rows":`repeat(${this.rows()}, minmax(max-content, auto))`,"grid-auto-rows":""}):canvas.css({"grid-template-rows":`repeat(${this.rows()}, minmax(0, 1fr))`,"grid-auto-rows":""}):this.scroll_direction()==="vertical"?this.auto_fit_row()?canvas.css({"grid-template-rows":"","grid-auto-rows":"minmax(max-content, 1fr)"}):canvas.css({"grid-template-rows":"","grid-auto-rows":this.is_masonry()&&this.instance.run_mode()?"max-content":`minmax(max-content, ${evaluate_property(this.instance,"cell_min_height_css")})`}):canvas.css({"grid-template-rows":`repeat(${auto_size_row}, minmax(${evaluate_property(this.instance,"cell_min_height_css")}, 1fr))`,"grid-auto-rows":""}),this.fixed_columns()?is_fitting_width(this.instance)?canvas.css({"grid-template-columns":`repeat(${this.columns()}, max-content)`,"grid-auto-columns":""}):canvas.css({"grid-template-columns":`repeat(${this.columns()}, minmax(0, 1fr))`,"grid-auto-columns":""}):this.scroll_direction()==="horizontal"?this.auto_fit_column()?canvas.css({"grid-template-columns":"","grid-auto-columns":"minmax(max-content, 1fr)"}):canvas.css({"grid-template-columns":"","grid-auto-columns":`minmax(max-content, ${evaluate_property(this.instance,"cell_min_width_css")})`}):canvas.css({"grid-template-columns":`repeat(${auto_size_column}, minmax(${evaluate_property(this.instance,"cell_min_width_css")}, 1fr))`,"grid-auto-columns":""}),canvas.css({"grid-auto-flow":this.scroll_direction()==="vertical"?"row":"column"})}))})}create_provisional_cell(){this.instance.autorun(()=>{let canvas=this.instance.get_canvas();this.mode!=="run"&&(canvas.find(".list-item").length===0?this.list_item=div("list-item",canvas):this.list_item=canvas.find(".list-item"))})}setup_scrolling(){this.instance.get_canvas().css({overflow:"auto","overflow-scrolling":"touch","-webkit-overflow-scrolling":"touch"})}add_cells_cb(additional_to_add,cb_no){var _additional_to_add;(_additional_to_add=additional_to_add)!=null||(additional_to_add=1),this.started_adding_cells=!0,u_exports2.run_once(30,()=>{var _this$list_data$with_5,_this$list_data3,_this$list_data3$with;return(_this$list_data$with_5=(_this$list_data3=this.list_data())==null||(_this$list_data3$with=_this$list_data3.with_extra_fields)==null?void 0:_this$list_data3$with.call(_this$list_data3,this.extra_fields).get_children(this.max_index(),additional_to_add))!=null?_this$list_data$with_5:[]},(err,last_entry)=>{if(err){log(err),this.started_adding_cells=!1;return}if(last_entry.length){let to_add=Math.min(last_entry.length,additional_to_add),offset=this.estimate_one_row();this.add_cells(this.max_index()+to_add+offset),this.max_index(this.max_index()+to_add+offset-1),u_exports2.wait_for_updates(()=>{this.started_adding_cells=!1})}else this.started_adding_cells=!1,cb_no==null||cb_no()})}full_display_add_cells(){this.max_index=u_exports2.Box(null,!0),this.init_raw_list_watcher(()=>0,()=>this.max_index()),this.display_data_in_cells(),this.instance.autorun(()=>{var _this$list_data$lengt,_this$list_data4;let n=Math.min((_this$list_data$lengt=(_this$list_data4=this.list_data())==null?void 0:_this$list_data4.length())!=null?_this$list_data$lengt:0,MAX_NUMBER_OF_CELLS2);n>100&&owner_warn(new OwnerError("repeating group showing more than 100 items",{display:"This repeating group is showing more than 100 items, which can considerably slow down your page. You should consider not showing all items at once",element_instance:this.instance})),u_exports2.autorun_top(()=>{this.add_cells(n),this.max_index(n)})})}page_style_add_cells(){let total_cells=this.total_number_of_cells();for(let num=1;num<=total_cells;num++)this.create_cell(num,this.instance.canvas);this.init_raw_list_watcher(()=>this.show_range(),()=>this.total_number_of_cells()),this.display_data_in_cells()}load_more_cells(from_root){let columns,rows2;if(this.scroll_direction()!=="horizontal"){columns=this.estimate_one_row();let distance_to_bottom;from_root?distance_to_bottom=window.innerHeight*3-this.instance.canvas[0].getBoundingClientRect().bottom:distance_to_bottom=this.instance.canvas[0].clientHeight*3-(this.instance.canvas[0].scrollHeight-this.instance.canvas[0].scrollTop);let estimated_cell_height=this.instance_children()[0].canvas.height();rows2=Math.ceil(Math.max(distance_to_bottom/estimated_cell_height,1))+2}else{rows2=this.rows();let distance_to_right;from_root?distance_to_right=window.innerWidth*2-this.instance.canvas[0].getBoundingClientRect().right:distance_to_right=this.instance.canvas[0].clientWidth*3-(this.instance.canvas[0].scrollWidth-this.instance.canvas[0].scrollLeft);let estimated_cell_width=this.instance_children()[0].canvas.width();columns=Math.ceil(Math.max(distance_to_right/estimated_cell_width,1))+2}this.add_cells_cb(rows2*columns)}watch_lazy_loader(watch_index){var _this$_root_intersect,_this$_canvas_interse,_this$instance_childr;(_this$_root_intersect=this._root_intersection_observer)==null||_this$_root_intersect.disconnect(),(_this$_canvas_interse=this._canvas_intersection_observer)==null||_this$_canvas_interse.disconnect();let can_scroll;this.scroll_direction()!=="horizontal"?can_scroll=this.instance.canvas[0].scrollHeight>this.instance.canvas[0].clientHeight&&this.instance.canvas[0].clientHeight<window.innerHeight:can_scroll=this.instance.canvas[0].scrollWidth>this.instance.canvas[0].clientWidth&&this.instance.canvas[0].clientWidth<window.innerWidth;let observer2;if(can_scroll){var _this$_canvas_interse2;observer2=(_this$_canvas_interse2=this._canvas_intersection_observer)!=null?_this$_canvas_interse2:this._canvas_intersection_observer=new IntersectionObserver(entries=>{!this.started_adding_cells&&entries[0].isIntersecting&&this.load_more_cells()},{root:this.instance.canvas[0],rootMargin:"100%"})}else{var _this$_root_intersect2;observer2=(_this$_root_intersect2=this._root_intersection_observer)!=null?_this$_root_intersect2:this._root_intersection_observer=new IntersectionObserver(entries=>{!this.started_adding_cells&&entries[0].isIntersecting&&this.load_more_cells(!0)},{rootMargin:"100%"})}let canvas_to_watch=(_this$instance_childr=this.instance_children()[watch_index])==null?void 0:_this$instance_childr.canvas;canvas_to_watch!=null&&observer2.observe(canvas_to_watch[0])}populate_data(){u_exports2.autorun_once(()=>{this.setup_scrolling(),this.fixed_list()?this.page_style_add_cells():this.show_all_items()?this.full_display_add_cells():(this.started_adding_cells=!1,this.add_cells(1),this.max_index=u_exports2.Box(Math.min(this.guess_number_of_cells(),100)),this.add_cells(this.max_index()+1),this.init_raw_list_watcher(()=>0,()=>this.max_index()+1),this.display_data_in_cells(!0))})}do_scroll(index,properties){let child=this.instance_children()[index];if(this.scroll_direction()==="horizontal"){let scrolling_canvas=this.instance.get_canvas();for(;scrolling_canvas.css("position")!=="fixed"&&scrolling_canvas.length&&(scrolling_canvas[0].scrollWidth<=scrolling_canvas[0].clientWidth||["hidden","visible"].includes(scrolling_canvas.css("overflow-x")))&&(scrolling_canvas=scrolling_canvas.parent(),!scrolling_canvas.is("body")););let scroll_position;scrolling_canvas.length===0||scrolling_canvas.is("body")?(scrolling_canvas=$("html"),scroll_position=child.get_canvas().offset().left+properties.offset):scroll_position=child.get_canvas().offset().left-scrolling_canvas.offset().left+scrolling_canvas[0].scrollLeft+properties.offset,properties.animate?scrolling_canvas.animate({scrollLeft:scroll_position},300):scrolling_canvas.scrollLeft(scroll_position)}else{let scrolling_canvas=this.instance.get_canvas();for(;scrolling_canvas.css("position")!=="fixed"&&scrolling_canvas.length&&(scrolling_canvas[0].scrollHeight<=scrolling_canvas[0].clientHeight||["hidden","visible"].includes(scrolling_canvas.css("overflow-y")))&&(scrolling_canvas=scrolling_canvas.parent(),!scrolling_canvas.is("body")););let scroll_position;scrolling_canvas.length===0||scrolling_canvas.is("body")?(scrolling_canvas=$("html"),scroll_position=child.get_canvas().offset().top+properties.offset):scroll_position=child.get_canvas().offset().top-scrolling_canvas.offset().top+scrolling_canvas[0].scrollTop+properties.offset,properties.animate?scrolling_canvas.animate({scrollTop:scroll_position},300):scrolling_canvas.scrollTop(scroll_position)}}setup_messages(){this.set_list_data(STATE_NOT_READY);let used_data_sources_cache=new Map;lib_default().bubble_version()<29?this.instance.autorun(()=>{if(!this.instance.state("datasource_changed_by_workflow_action")){let data_source=this.data_source();check_astable_loop(this.instance,data_source,used_data_sources_cache),queueMicrotask(()=>this.write_data(data_source))}}):(this.instance.state("list_data",()=>this.instance.state("datasource_changed_by_workflow_action")?this.instance.state("overridden_list_data"):this.data_source()),this.instance.autorun(()=>{this.instance.state("datasource_changed_by_workflow_action")||check_astable_loop(this.instance,this.data_source(),used_data_sources_cache)}),this.instance.autorun(()=>{let new_data=this.instance.state("list_data");new_data!==void 0&&(this.has_written_a_list=!0);let dehydrated;new_data&&new_data.dehydrate?dehydrated=new_data.dehydrate():(dehydrated="no data",new_data=null),dehydrated!==this.previous_search&&(this.previous_search=dehydrated,this.set_show_range(0))})),this.instance.on_message("set_list_data",new_list=>{this.instance.state("datasource_changed_by_workflow_action",!0),this.write_data(new_list)}),this.instance.on_message("clear_list",()=>{if(this.instance.state("datasource_changed_by_workflow_action",!1),this.fixed_list())this.set_show_range(0);else{var _this$instance$get_ca,_this$instance$get_ca2;(_this$instance$get_ca=this.instance.get_canvas())==null||_this$instance$get_ca.scrollLeft(0),(_this$instance$get_ca2=this.instance.get_canvas())==null||_this$instance$get_ca2.scrollTop(0)}for(let child of(_this$instance_childr2=this.instance_children())!=null?_this$instance_childr2:[]){var _this$instance_childr2;reset_inputs_and_groups(child)}}),this.instance.on_message("show_next",wrap_to_beginning=>{var _wrap_to_beginning;(_wrap_to_beginning=wrap_to_beginning)!=null||(wrap_to_beginning=!1),u_exports2.run_once(30,()=>{var _this$list_data5;return(_this$list_data5=this.list_data())==null?void 0:_this$list_data5.length()},(err,length)=>{if(err){log(err);return}let to_show=this.show_range();if(to_show+=this.total_number_of_cells(),this.stable_pagination()){let is_last_page=to_show>=length;if(is_last_page&&wrap_to_beginning)to_show=0;else if(is_last_page)return}else{let is_last_page=to_show===length,is_filler_last_page=to_show+this.total_number_of_cells()>length;is_last_page&&wrap_to_beginning?to_show=0:is_filler_last_page&&(to_show=Math.max(length-this.total_number_of_cells(),0))}this.set_show_range(to_show)})}),this.instance.on_message("show_previous",wrap_to_end=>{var _wrap_to_end;(_wrap_to_end=wrap_to_end)!=null||(wrap_to_end=!1),u_exports2.run_once(30,()=>{var _this$list_data6;return(_this$list_data6=this.list_data())==null?void 0:_this$list_data6.length()},(err,length)=>{if(err){log(err);return}let to_show=this.show_range();to_show===0&&wrap_to_end?this.stable_pagination()?to_show=Math.max(length-this.total_number_of_cells()+length%this.total_number_of_cells(),0):to_show=Math.max(length-this.total_number_of_cells(),0):to_show=Math.max(to_show-this.total_number_of_cells(),0),this.set_show_range(to_show)})}),this.instance.on_message("go_to_page",val=>{u_exports2.run_once(30,()=>{var _this$list_data7;return(_this$list_data7=this.list_data())==null?void 0:_this$list_data7.length()},(err,length)=>{if(err){log(err);return}let to_show=(val-1)*this.total_number_of_cells();to_show+this.total_number_of_cells()>length&&!this.stable_pagination()&&(to_show=Math.max(0,length-this.total_number_of_cells())),this.set_show_range(to_show)})}),this.instance.on_message("scroll_to",properties=>{this.fixed_list()||u_exports2.WaitFor(this.instance.get_children_drawn_key(),()=>{u_exports2.run_once(30,()=>{var _this$list_data8;return this.list_data()==null&&!this.loading()?-1:(_this$list_data8=this.list_data())==null?void 0:_this$list_data8.position(properties.entry,get5(this.group_type()))},(err,index)=>{var _this$instance_childr3,_this$instance_childr4;if(err){log(err);return}index!==-1&&((_this$instance_childr3=this.instance_children())!=null&&(_this$instance_childr4=_this$instance_childr3[index])!=null&&_this$instance_childr4.is_visible()?this.do_scroll(index,properties):u_exports2.wait_for_updates(()=>{this.instance.message("draw_till",index);let wait=()=>{this.instance.setTimeout(()=>{var _this$instance_childr5,_this$instance_childr6,_this$instance_childr7;(_this$instance_childr5=this.instance_children())!=null&&(_this$instance_childr6=_this$instance_childr5[index])!=null&&_this$instance_childr6.is_visible()&&(_this$instance_childr7=this.instance_children())!=null&&_this$instance_childr7[index].canvas.is(":visible")?this.do_scroll(index,properties):wait()},50)};wait()}))})})})}populate_sample_list(){setImmediate(()=>{this.write_data(lib_default().db_instance().static_list(this.btype_id(),[new SampleObject(this.btype_id())]))})}write_data(new_data){if(lib_default().bubble_version()>=29){this.instance.state("overridden_list_data",new_data);return}new_data!==void 0&&(this.has_written_a_list=!0);let dehydrated;new_data&&new_data.dehydrate?dehydrated=new_data.dehydrate():(dehydrated="no data",new_data=null),dehydrated!==this.previous_search&&(this.previous_search=dehydrated,this.set_list_data(new_data),this.set_show_range(0))}reset_class_data(){let canvas=this.instance.get_canvas();this.instance.children=[],this.add_cells=last_cell=>{traceSpan2(add_cells_span2.name,add_cells_span2.type,()=>{for(let num=this.old_max_index+1;num<=last_cell;num++)this.create_cell(num,canvas);this.old_max_index<last_cell&&(this.old_max_index=last_cell,this.instance.last_cell=this.old_max_index)})}}do_register(){this.mode==="run"&&this.setup_messages()}do_create_container(){this.container=new RepeatingGroupContainer(this.instance,this.instance.canvas)}compute_extra_fields(){this.extra_fields=evaluate_extra_fields(this.instance.element)}do_initialize(){this.instance.on_message("draw_till",index=>{this.scroll_style==="none"||!this.max_index||this.max_index()>index||(this.add_cells(index+1),this.max_index(index))}),this.reset_class_data(),this.setup_grid_css(),this.create_provisional_cell(),this.instance.wait_for_visible_lite(()=>{this.instance.run_mode()&&this.compute_extra_fields(),["run","responsive"].includes(this.mode)?this.populate_data():this.thumbnail_and_edit_mode_logic()})}destroy(){var _this$_root_intersect3,_this$_canvas_interse3,_this$_rg_resize_obse2,_this$_cell_resize_ob2,_this$_masonry_resize2,_this$_row_watcher2,_this$_column_watcher2,_this$_cell_width_wat2,_this$_cell_height_wa2,_this$_item_watcher2,_this$container;(_this$_root_intersect3=this._root_intersection_observer)==null||_this$_root_intersect3.disconnect(),(_this$_canvas_interse3=this._canvas_intersection_observer)==null||_this$_canvas_interse3.disconnect(),(_this$_rg_resize_obse2=this._rg_resize_observer)==null||_this$_rg_resize_obse2.disconnect(),(_this$_cell_resize_ob2=this._cell_resize_observer)==null||_this$_cell_resize_ob2.disconnect(),(_this$_masonry_resize2=this._masonry_resize_observer)==null||_this$_masonry_resize2.disconnect(),(_this$_row_watcher2=this._row_watcher)==null||_this$_row_watcher2.destroy(),(_this$_column_watcher2=this._column_watcher)==null||_this$_column_watcher2.destroy(),(_this$_cell_width_wat2=this._cell_width_watcher)==null||_this$_cell_width_wat2.destroy(),(_this$_cell_height_wa2=this._cell_height_watcher)==null||_this$_cell_height_wa2.destroy(),(_this$_item_watcher2=this._item_watcher)==null||_this$_item_watcher2.destroy(),(_this$container=this.container)==null||_this$container.destroy()}};init_u2();init_properties();init_table_element();var _tmpl$12=template("<div>");function GroupItemComponent(props){var _data_instance;let instance4=props.instance,isTable=instance4.element.repeating_instance.repeating_layout_type==="Table",layout=isTable?(_data_instance=instance4.element.data_instance)==null?void 0:_data_instance.table_element_layout:instance4.element.repeating_instance.repeating_group_layout;if(!layout)throw new UnexpectedError("Layout not found");let indexClass=createWatcher(()=>`entry-${instance4.state("cell_index")}`,{fallback:""}),borderStyle=createBorderStyle(mergeProps({includeMargin:!isTable},props)),baseStyle=()=>({display:props.hidden?"none":""});return createEffect(()=>{on_server()?props.hidden?instance4.do_hide():instance4.do_show():props.hidden?queueMicrotask(()=>instance4.do_hide()):queueMicrotask(()=>instance4.do_show())}),instance4.parent().add_to_namespace(instance4),createEffect(()=>{let io=props.intersectionObserver;io!=null&&(io.observe(instance4.canvas[0]),onCleanup(()=>{io.unobserve(instance4.canvas[0])}))}),onMount(()=>{var _layout$is_masonry;if(instance4.run_mode()&&layout instanceof RepeatingGroupLayoutStyle&&(_layout$is_masonry=layout.is_masonry)!=null&&_layout$is_masonry.call(layout)){var _layout$observe_mason;(_layout$observe_mason=layout.observe_masonry_cell)==null||_layout$observe_mason.call(layout,instance4.canvas[0])}}),(()=>{var _el$=_tmpl$12();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$={...baseStyle(),...props.cellSizing,...borderStyle(),...props.style,[isTable&&layout.table_direction()==="vertical"?"min-width":isTable?"min-height":"null"]:"fit-content"},_v$2={"bubble-element":!0,"group-item":!0,[indexClass()]:!0,[props.containerClass]:!0};return _p$.e=style(_el$,_v$,_p$.e),_p$.t=classList(_el$,_v$2,_p$.t),_p$},{e:void 0,t:void 0}),_el$})()}var GroupItemComponent_default=createElement2(GroupItemComponent,element=>({shouldAddWrapper:element.repeating_layout==="Table"&&element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return element.repeating_layout==="Table"?{properties:{containerClass:new Property(()=>"bubble-cross-axis",{fallback:"bubble-cross-axis"})},styles:crossAxisStyling(element)}:{properties:containerProperties(shouldAddWrapper),styles:containerStyling(shouldAddWrapper)}});var cells_height_cache={},rows_height_cache={};make_element("GroupItem",{get_html(){return"<div></div>"},default_group_data(){return STATE_NOT_READY2},can_register_workflows(instance4){var _instance$_can_regist;return(_instance$_can_regist=instance4._can_register_workflow_key)!=null||(instance4._can_register_workflow_key=u_exports2.MakeKey(null,"_can_register_workflow_key")),instance4._can_register_workflow_key},uses_css_responsive:!0,always_visible:!0,solid_component:GroupItemComponent_default,register(instance4){instance4.split_namespace(),instance4.autorun(()=>{let element_id=instance4.element_id();instance4.parent().add_to_namespace(instance4),element_id&&instance4.canvas&&(instance4.canvas[0].key=element_id)})},initialize(instance4){var _repeating_instance$e;instance4.canvas.addClass("group-item entry-"+instance4.element.num+" ");let repeating_instance=instance4.element.repeating_instance;if(((_repeating_instance$e=repeating_instance.element.root())==null?void 0:_repeating_instance$e.get_responsive_version())<1){let number_of_columns2=function(){if(repeating_instance.columns!=null)return repeating_instance.columns;if(layout_style==="show_all"&&repeating_instance.children.length>0&&repeating_instance.children[0].canvas.width()>0){let canvas_width=repeating_instance.canvas.width(),cell_width=repeating_instance.children[0].canvas.width();return Math.floor(canvas_width/cell_width)||1}return evaluate_property(repeating_instance,"columns")},top_separator_width2=function(row){if(row>1){let width2=repeating_instance.get_static_property("separator_width",!0),style2=repeating_instance.get_static_property("separator_style",!0);return[void 0,null,"none"].includes(style2)?0:width2}else return 0},current_row2=function(){return layout_style==="horizontal_scroll"?1:Math.floor((num-1)/number_of_columns2())+1},get_total_rows2=function(){if(layout_style==="limit_items")return evaluate_property(repeating_instance,"rows");if(["show_all","vertical_extendable"].includes(layout_style))return Math.ceil(repeating_instance.last_cell/number_of_columns2());if(layout_style==="horizontal_scroll")return 1};var number_of_columns=number_of_columns2,top_separator_width=top_separator_width2,current_row=current_row2,get_total_rows=get_total_rows2;let layout_style=repeating_instance.get_static_property("layout_style"),{num}=instance4.element,rg_id=null;instance4.autorun(()=>{var _rg_id,_rows_height_cache$_r;rg_id=repeating_instance.toUniqueString(),(_rows_height_cache$_r=rows_height_cache[_rg_id=rg_id])!=null||(rows_height_cache[_rg_id]={});let current_row_val=current_row2();if(instance4.is_visible()&&!rows_height_cache[rg_id][current_row_val]){var _rows_height_cache$rg;rows_height_cache[rg_id][current_row_val]=Math.max((_rows_height_cache$rg=rows_height_cache[rg_id][current_row_val])!=null?_rows_height_cache$rg:0,instance4.get_canvas().height())}});let get_total_rg_height=()=>u_exports2.run_once(30,()=>{let number_of_rows=get_total_rows2();if(!number_of_rows)return 0;let total_rg_height=0;for(let row=1;row<=number_of_rows;row++){var _rows_height_cache$rg2;let separator_height=top_separator_width2(row),row_height=((_rows_height_cache$rg2=rows_height_cache[rg_id])==null?void 0:_rows_height_cache$rg2[row])||instance4.element.get_height();total_rg_height+=separator_height+row_height}return total_rg_height+property_applications_default.calculate_border_height(repeating_instance,!0)},(err,res)=>{err&&log(err),repeating_instance.set_height(res)}),_last_max_delta=null;instance4.on_message("child_movement",max_delta=>(_last_max_delta=max_delta,u_exports2.WaitFor(instance4.drawn_key,()=>instance4.wait_for_visible(()=>{var _rg_id2,_cells_height_cache$_;let element_id=instance4.element_id();(_cells_height_cache$_=cells_height_cache[_rg_id2=rg_id])!=null||(cells_height_cache[_rg_id2]={});let new_height;_last_max_delta==null?new_height=cells_height_cache[rg_id][element_id]:(new_height=instance4.element.get_height()+_last_max_delta,instance4.get_canvas().height(new_height),cells_height_cache[rg_id][element_id]=new_height),instance4.get_canvas()[0].key=element_id;let first_item_of_rows=(current_row2()-1)*number_of_columns2()+1,last_item_of_rows=layout_style==="horizontal_scroll"?repeating_instance.last_cell:first_item_of_rows+number_of_columns2()-1,cells_to_resize=[],max_height=new_height-top_separator_width2(current_row2());for(let i=first_item_of_rows;i<=last_item_of_rows;i++){var _repeating_instance$c;let div2=(_repeating_instance$c=repeating_instance.children[i-1])==null?void 0:_repeating_instance$c.canvas;if(div2){cells_to_resize.push(div2);let height2=cells_height_cache[rg_id][div2[0].key];height2&&height2>max_height&&(max_height=height2)}}for(let div2 of cells_to_resize)div2.height(max_height);if(layout_style!=="infinite_scroll")return rows_height_cache[rg_id][current_row2()]=max_height,get_total_rg_height()})))),instance4.on_message("child_shown",()=>{if(layout_style!=="infinite_scroll")return get_total_rg_height()}),instance4.on_resize(window_width=>{if(layout_style==="show_all")return get_total_rg_height()})}},do_show(instance4,properties,options,animated){instance4.canvas.show(),instance4._is_visible_me=!0,instance4._update_visible()},do_hide(instance4,properties,options,animated){instance4._is_visible_me=!1,instance4._update_visible(),instance4.canvas.hide()},position_canvas(to_position,instance4){return instance4.container.get_canvas().append(to_position)},added_to_container(){return!0},contains_group_data:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},get_private_messages(){return["child_movement","child_shown"]},is_input:!1,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,property_applications:[]});var COLLAPSE_ANIMATION_LENGTH2=15;make_element("Group",extend({},group_element_definition,{glyph_id:"group",list_order:1,keyboard_shortcut:"G",get_private_messages(element){return["child_movement"]},uses_css_responsive:!0,solid_component:GroupComponent_default,can_fit_width:!0,can_fit_height:!0,starts_variable_width:!0,can_defer_drawing(){return!0},register(instance4){instance4.state("collapsing",!1)},attempt_size_only_draw(instance4){return instance4.element.no_size_when_hidden()},initialize(instance4){let canvas=instance4.get_canvas();instance4.autorun(()=>{instance4.state("collapsing")?canvas.css("overflow","hidden"):instance4.get_static_property("overflow_scroll")?instance4.run_mode()?canvas.css({"overflow-x":"hidden","overflow-y":"auto"}):canvas.css({overflow:"hidden"}):canvas.css({overflow:"visible"})})},check_for_errors(element,report){return(void 0)(element,"get_group_data",report)},can_animate(element){return!0},do_show(instance4,properties,options,animated,first_show){if(instance4._is_visible_me=!0,instance4._update_visible(),!on_react_native()){if(!instance4.run_mode()){instance4._display_me();return}instance4.with_canvas(canvas=>{var _canvas$velocity;instance4._display_me(),(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop"),instance4.group_slide_timeout!=null&&(instance4.clearTimeout(instance4.group_slide_timeout),instance4.group_slide_timeout=void 0);let collapse_when_hidden=instance4.get_static_property("collapse_when_hidden");if(canvas.css("display",""),collapse_when_hidden&&!animated){if(instance4.get_static_property("collapse_animation")&&!first_show)switch(instance4.set_animating(!0),instance4.state("collapsing",!0),instance4.get_static_property("animation_type")){case"slide":{let increase_size2=function(old_height){if(!instance4._is_visible_me)return;if(old_height>=instance_height_constant){u_exports2.autorun_once(()=>{var _element_props$max_he;canvas.css({"min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:""})}),instance4.state("collapsing",!1),instance4.set_animating(!1),instance4.group_slide_timeout=void 0;return}let new_height=old_height+pixels_per_ms;canvas.css({"min-height":new_height,"max-height":new_height}),instance4.group_slide_timeout=instance4.setTimeout(()=>increase_size2(new_height),1)};var increase_size=increase_size2;let instance_height_constant=canvas.height(),pixels_per_ms=instance_height_constant/COLLAPSE_ANIMATION_LENGTH2;canvas.css({"min-height":0,"max-height":0}),increase_size2(0);break}case"slide_horiz":{let increase_size2=function(old_width){if(!instance4._is_visible_me)return;if(old_width>=instance_width_constant){u_exports2.autorun_once(()=>{var _element_props$max_wi,_element_props$max_he2;canvas.css({"min-width":min_width_css(instance4),"max-width":(_element_props$max_wi=max_width_css(instance4))!=null?_element_props$max_wi:"","max-height":(_element_props$max_he2=max_height_css(instance4))!=null?_element_props$max_he2:""})}),instance4.state("collapsing",!1),instance4.set_animating(!1),instance4.group_slide_timeout=void 0;return}let new_width=old_width+pixels_per_ms;canvas.css({"min-width":new_width,"max-width":new_width,"max-height":max_height}),instance4.group_slide_timeout=instance4.setTimeout(()=>increase_size2(new_width),1)};var increase_size=increase_size2;let instance_width_constant=canvas.width(),pixels_per_ms=instance_width_constant/COLLAPSE_ANIMATION_LENGTH2,max_height=canvas.height();canvas.css({"min-width":0,"max-width":0}),increase_size2(0);break}case"fade":{canvas.css({opacity:0}),velocity(canvas,"fadeIn",{duration:400,complete_cb(){instance4.state("collapsing",!1),instance4.set_animating(!1)},display:""});break}default:instance4.set_animating(!1)}}else animated&&perform_animate_in2(instance4,properties,options)})}},do_hide(instance4,properties,options,animated,first_hide){if(instance4._is_visible_me=!1,on_react_native()){instance4._update_visible();return}if(!instance4.run_mode()){instance4._hide_me(),instance4._update_visible();return}instance4.with_canvas(canvas=>{var _canvas$velocity2;if((_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop"),instance4.group_slide_timeout!=null&&(instance4.clearTimeout(instance4.group_slide_timeout),instance4.group_slide_timeout=void 0),instance4.get_static_property("collapse_when_hidden")&&!animated)if(instance4.get_static_property("collapse_animation")&&!first_hide)switch(instance4.set_animating(!0),instance4.state("collapsing",!0),instance4.get_static_property("animation_type")){case"slide":{let reduce_size2=function(old_size){if(instance4._is_visible_me)return;if(old_size<=0){instance4._hide_me(),u_exports2.autorun_once(()=>{var _element_props$max_he3;canvas.css({"min-height":min_height_css(instance4),"max-height":(_element_props$max_he3=max_height_css(instance4))!=null?_element_props$max_he3:""})}),canvas.css("display","none"),instance4.set_animating(!1),instance4.state("collapsing",!1),instance4.group_slide_timeout=void 0;return}let new_size=old_size-pixels_per_ms;canvas.css({"min-height":new_size,"max-height":new_size}),instance4.group_slide_timeout=instance4.setTimeout(()=>reduce_size2(new_size),1)};var reduce_size=reduce_size2;let initial_size=canvas.height(),pixels_per_ms=initial_size/COLLAPSE_ANIMATION_LENGTH2;reduce_size2(initial_size);break}case"slide_horiz":{let reduce_size2=function(old_size){if(instance4._is_visible_me)return;if(old_size<=0){instance4._hide_me(),u_exports2.autorun_once(()=>{var _element_props$max_wi2,_element_props$max_he4;canvas.css({"min-width":min_width_css(instance4),"max-width":(_element_props$max_wi2=max_width_css(instance4))!=null?_element_props$max_wi2:"","max-height":(_element_props$max_he4=max_height_css(instance4))!=null?_element_props$max_he4:""})}),canvas.css("display","none"),instance4.set_animating(!1),instance4.state("collapsing",!1),instance4.group_slide_timeout=void 0;return}let new_size=old_size-pixels_per_ms;canvas.css({"min-width":new_size,"max-width":new_size,"max-height":max_height}),instance4.group_slide_timeout=instance4.setTimeout(()=>reduce_size2(new_size),1)};var reduce_size=reduce_size2;let initial_size=canvas.width(),pixels_per_ms=initial_size/COLLAPSE_ANIMATION_LENGTH2,max_height=canvas.height();reduce_size2(initial_size);break}case"fade":{velocity(canvas,"fadeOut",{duration:400,complete_cb(){instance4.state("collapsing",!1),instance4._hide_me(),instance4.set_animating(!1)},display:"none"});break}}else instance4._hide_me();else animated?perform_animate_out(instance4,properties,options):instance4._hide_me()}),instance4._update_visible()}}));init_define_process_env();init_shim();init_u2();init_property_applications();init_lib();init_appquery();init_elements2();init_elements_utils();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator215=__toESM(require_web_dom_collections_iterator());init_solid();init_lib();init_appquery();init_b_ui();var b_async10=__toESM(require_b_async());init_uuid();init_element_styles();init_properties();init_element_props();init_mode_check();var _tmpl$13=template("<div>"),GROUP_FOCUS_MARGIN=20;function GroupFocusComponent(props){let instance4=props.instance;return onMount(()=>{instance4.thumbnail_mode()||instance4.do_hide()}),onAfterMount(()=>{let positionedCanvas=instance4.canvas,parentCanvas=positionedCanvas.parent();instance4.edit_mode()&&(parentCanvas=parentCanvas.parent());let about_to_hide=!1,addClickListener=null,removeClickListener=null;if(instance4.run_mode()){let eventName=`click.groupfocus${LUID()}`;addClickListener=()=>{$("body").on(eventName,evt=>{var _$$attr;let searchbox_dropdown=$(".tt-dropdown-menu"),searchbox_dropdown_in_target=()=>{for(let i=0;i<searchbox_dropdown.length;i++)if($.contains(searchbox_dropdown[i],evt.target))return!0;return!1};instance4.is_visible()&&!positionedCanvas.data("GroupWithFocus_loading")&&positionedCanvas[0]!==evt.target&&!$.contains(positionedCanvas[0],evt.target)&&!((_$$attr=$(evt.target).attr("class"))!=null&&_$$attr.match(/\bselect2-/))&&!searchbox_dropdown_in_target()&&(running_test()?instance4.do_hide():(about_to_hide=!0,instance4.setTimeout(()=>{b_async10.WaitFor(lib_default().workflow.everything_done_key(),()=>{about_to_hide=!1,instance4.do_hide()})},10)))})},removeClickListener=()=>{$("body").off(eventName)}}let resizeEvent=`resize.groupfocus${LUID()}`,intersectionObserver=null,resizeObserver=null,reference=null;function destroyObserver(){var _intersectionObserver,_resizeObserver;(_intersectionObserver=intersectionObserver)==null||_intersectionObserver.disconnect(),(_resizeObserver=resizeObserver)==null||_resizeObserver.disconnect(),$(window).off(resizeEvent),intersectionObserver=null,resizeObserver=null,reference=null}instance4.autorun(()=>{if(!instance4.is_visible()){var _removeClickListener;(_removeClickListener=removeClickListener)==null||_removeClickListener(),destroyObserver();return}instance4.autorun(()=>{var _addClickListener,_reference2;let offsetLeft=instance4.get_static_property("offset_left"),offsetTop=instance4.get_static_property("offset_top");function watchChanges2(){var _reference;if(instance4.manual_position)return;if(!((_reference=reference)!=null&&_reference.is(":visible"))){about_to_hide||instance4.state("gf_reference_position",{position:"absolute",top:"0px",left:"0px"}),destroyObserver();return}let isFixed=instance4.run_mode()&&is_fixed(reference),observedPos=reference.offset(),parentOffset=parentCanvas.offset(),observedLeft=observedPos.left-parentOffset.left,observedTop=observedPos.top-parentOffset.top;isFixed&&(observedLeft-=window.scrollX,observedTop-=window.scrollY);let should_include_padding=appquery_default.get_public_setting("bubble_version")>=20,observedHeight=should_include_padding?reference.outerHeight():reference.height(),observedWidth=should_include_padding?reference.outerWidth():reference.width(),left2=observedLeft+offsetLeft,top2=observedTop+offsetTop+observedHeight;instance4.state("gf_reference_position",{position:isFixed?"fixed":"absolute",left:`${left2}px`,top:`${top2}px`});let marginTop=-observedTop,marginLeft=-observedLeft,marginBottom=observedTop-parentCanvas.height()+observedHeight,marginRight=observedLeft-parentCanvas.width()+observedWidth;if(typeof IntersectionObserver<"u"){var _intersectionObserver2;(_intersectionObserver2=intersectionObserver)==null||_intersectionObserver2.disconnect(),intersectionObserver=new IntersectionObserver(entries=>{entries[0].intersectionRatio<1&&watchChanges2()},{root:isFixed?null:parentCanvas[0],rootMargin:`${marginTop}px ${marginRight}px ${marginBottom}px ${marginLeft}px`,threshold:1}),intersectionObserver.observe(reference[0])}}let referenceId=instance4.get_static_property("reference");if(instance4.edit_mode())reference=lib_default().visual_edit.current_editor_canvas.getWrapper(referenceId);else{var _instance$find_instan;reference=(_instance$find_instan=instance4.find_instance_by_id(referenceId))==null?void 0:_instance$find_instan.canvas}if((_addClickListener=addClickListener)==null||_addClickListener(),!((_reference2=reference)!=null&&_reference2.is(":visible"))){instance4.state("gf_reference_position",{position:"absolute",top:"0px",left:"0px"}),destroyObserver();return}if(watchChanges2(),$(window).off(resizeEvent),$(window).on(resizeEvent,()=>{watchChanges2()}),typeof ResizeObserver<"u"){var _resizeObserver2;(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=new ResizeObserver(entries=>{watchChanges2()}),resizeObserver.observe(reference[0],{box:"border-box"})}})},()=>{var _removeClickListener2;destroyObserver(),(_removeClickListener2=removeClickListener)==null||_removeClickListener2()}).set_run_immediately(!0)}),onMount(()=>{instance4.manual_position=!1,instance4.on_message("position_element",position=>{instance4.manual_position=!0,instance4.state("gf_reference_position",{top:`${position.Y}px`,left:`${position.X}px`,position:position.position})})}),(()=>{var _el$=_tmpl$13();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var GroupFocusComponent_default=createElement2(GroupFocusComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[new Style(instance4=>{var _element_props$max_wi,_element_props$max_he;return{"min-width":min_width_css(instance4),"max-width":(_element_props$max_wi=max_width_css(instance4))!=null?_element_props$max_wi:"","min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:"",height:instance4.element.fit_height()?"auto":"initial",right:GROUP_FOCUS_MARGIN,bottom:instance4.element.fit_height()?"unset":GROUP_FOCUS_MARGIN,"z-index":lib_default().bv().MAX_POPUP_ZINDEX+instance4.element.get_zindex(),"margin-right":instance4.run_mode()?"auto":void 0,"overflow-y":instance4.run_mode()?"auto":"hidden"}},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>{var _instance$state;return(_instance$state=instance4.state("gf_reference_position"))!=null?_instance$state:{position:"absolute"}},{alwaysDynamic:!0,outerPositioning:!0}),...containerStyling(shouldAddWrapper),...basicStyling(element)]}});init_element_props();init_mode_check();var GROUP_FOCUS_MARGIN2=20;make_element("GroupFocus",extend({},group_element_definition,{display:"Group Focus",glyph_id:"group_focus",list_order:6,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},field_names:extend({},container_field_names,{reference:{no_states:!0},offset_left:{no_states:!0,default:0},offset_top:{no_states:!0,default:0},fixed_width:{no_states:!0,default:!0}}),defaults:{bgcolor:"#E8E8E8",background_style:"bgcolor",width:250,height:100},properties_for_new:{container_layout:"column",single_width:!1,single_height:!1,min_height_css:"120px",min_width_css:"60px",max_width_css:"280px"},styleable_properties:{offset_top:!1,offset_left:!1},get_private_messages(element){return["child_movement","position_element"]},can_animate(element){return!0},workflow_show(instance4,properties,options,animated){instance4.ensure_drawn(),instance4.get_canvas().data("GroupWithFocus_loading",!0),instance4.setTimeout(()=>instance4.get_canvas().data("GroupWithFocus_loading",!1),1),instance4.do_show(properties,options,animated)},workflow_hide(instance4,properties,options,animated){instance4.do_hide(properties,options,animated)},check_for_errors(element,report){(void 0)(element,"get_group_data",report)},can_defer_drawing(){return!0},register(instance4){instance4.state("manual_position",null),instance4.on_message("position_element",position=>instance4.state("manual_position",{top:position.Y+"px",left:position.X+"px",position:position.position}))},initialize(instance4){instance4.wait_for_visible_lite(()=>{let positioned_canvas=instance4.get_canvas();instance4.edit_mode()&&(positioned_canvas=positioned_canvas.parent());let parent_canvas=positioned_canvas.parent(),add_click_listener,remove_click_listener,about_to_hide=!1;if(instance4.run_mode()){let event_name;is_on_mobile_or_tablet()?event_name=`touchend.groupfocus${LUID()}`:event_name=`click.groupfocus${LUID()}`,add_click_listener=function(){$("body").on(event_name,evt=>{var _$$attr;let searchbox_dropdown=$(".tt-dropdown-menu"),searchbox_dropdown_in_target=()=>{for(let i=0;i<searchbox_dropdown.length;i++)if($.contains(searchbox_dropdown[i],evt.target))return!0;return!1};instance4.is_visible()&&!positioned_canvas.data("GroupWithFocus_loading")&&positioned_canvas[0]!==evt.target&&!$.contains(positioned_canvas[0],evt.target)&&!((_$$attr=$(evt.target).attr("class"))!=null&&_$$attr.match(/\bselect2-/))&&!searchbox_dropdown_in_target()&&(running_test()?instance4.do_hide():(about_to_hide=!0,instance4.setTimeout(()=>{u_exports2.WaitFor(lib_default().workflow.everything_done_key(),()=>{about_to_hide=!1,instance4.do_hide()})},10)))})},remove_click_listener=function(){$("body").off(event_name)}}let resize_event=`resize.groupfocus${instance4.toUniqueString()}`,intersection_observer=null,resize_observer=null,reference=null;function destroy_observer(){var _intersection_observe,_resize_observer;(_intersection_observe=intersection_observer)==null||_intersection_observe.disconnect(),(_resize_observer=resize_observer)==null||_resize_observer.disconnect(),$(window).off(resize_event),intersection_observer=null,resize_observer=null,reference=null}instance4.autorun(()=>{if(!instance4.is_visible()){var _remove_click_listene;(_remove_click_listene=remove_click_listener)==null||_remove_click_listene(),destroy_observer();return}instance4.autorun(()=>{var _add_click_listener;let offset_left2=instance4.get_static_property("offset_left"),offset_top2=instance4.get_static_property("offset_top");function watch_changes(){var _reference;if(instance4.state("manual_position"))return;if(!((_reference=reference)!=null&&_reference.is(":visible"))){var _intersection_observe2;about_to_hide||positioned_canvas.css({top:0,left:0}),(_intersection_observe2=intersection_observer)==null||_intersection_observe2.disconnect(),intersection_observer=null;return}let is_fixed2=instance4.run_mode()&&is_fixed(reference),observed_pos=reference.offset(),parent_offset=parent_canvas.offset(),observed_left=observed_pos.left-parent_offset.left,observed_top=observed_pos.top-parent_offset.top;is_fixed2&&(observed_left-=window.scrollX,observed_top-=window.scrollY);let should_include_padding=appquery_default.get_public_setting("bubble_version")>=20,observed_height=should_include_padding?reference.outerHeight():reference.height(),observed_width=should_include_padding?reference.outerWidth():reference.height(),left2=observed_left+offset_left2,top2=observed_top+offset_top2+observed_height;positioned_canvas.css({position:is_fixed2?"fixed":"absolute",left:left2,top:top2});let margin_top=-observed_top,margin_left=-observed_left,margin_bottom=observed_top-parent_canvas.height()+observed_height,margin_right=observed_left-parent_canvas.width()+observed_width;if(typeof IntersectionObserver<"u"&&IntersectionObserver!==null){var _intersection_observe3;(_intersection_observe3=intersection_observer)==null||_intersection_observe3.disconnect(),intersection_observer=new IntersectionObserver(entries=>{entries[0].intersectionRatio<1&&watch_changes()},{root:is_fixed2?null:parent_canvas[0],rootMargin:`${margin_top}px ${margin_right}px ${margin_bottom}px ${margin_left}px`,threshold:1}),intersection_observer.observe(reference[0])}}let reference_id=instance4.get_static_property("reference");if(instance4.edit_mode())reference=lib_default.or_throw().visual_edit.current_editor_canvas.getWrapper(reference_id);else{var _instance$find_instan;reference=(_instance$find_instan=instance4.find_instance_by_id(reference_id))==null?void 0:_instance$find_instan.canvas}if((_add_click_listener=add_click_listener)==null||_add_click_listener(),reference==null){positioned_canvas.css({top:0,left:0}),destroy_observer();return}if(watch_changes(),$(window).off(resize_event),$(window).on(resize_event,()=>{watch_changes()}),typeof ResizeObserver<"u"&&ResizeObserver!==null){var _resize_observer2;(_resize_observer2=resize_observer)==null||_resize_observer2.disconnect(),resize_observer=new ResizeObserver(entries=>{watch_changes()}),resize_observer.observe(reference[0],{box:"border-box"})}})},()=>{var _remove_click_listene2;destroy_observer(),(_remove_click_listene2=remove_click_listener)==null||_remove_click_listene2()}).set_run_immediately(!0),instance4.autorun(()=>{let manual_position=instance4.state("manual_position");manual_position&&property_applications_default.apply_css_style(instance4.get_canvas(),manual_position)})})},property_applications:[new property_applications_default.ShortDimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer,new property_applications_default.PaddingFields],uses_css_responsive:!0,solid_component:GroupFocusComponent_default,can_fit_height:!0,no_margins(){return!0},not_draggable(){return!0},goes_on_document(){return!0},hidden_on_editor_load(){return!0},starts_hidden:!0,not_max_adjustable_legacy:!0,must_be_fixed_size(element){var _element$root;return((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())<0},manual_position:!1,position_canvas(to_position,instance4){let parent_canvas;instance4.edit_mode()?parent_canvas=$(".canvas"):(parent_canvas=$("body"),to_position.css("display","none")),parent_canvas.append(to_position),instance4.autorun(()=>{var _element_props$max_wi,_element_props$max_he;to_position.css({position:"absolute","min-width":min_width_css(instance4),"max-width":(_element_props$max_wi=max_width_css(instance4))!=null?_element_props$max_wi:"","min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:"",height:instance4.element.fit_height()?"auto":"initial",right:GROUP_FOCUS_MARGIN2,bottom:instance4.element.fit_height()?"unset":GROUP_FOCUS_MARGIN2,"z-index":lib_default().bv().MAX_POPUP_ZINDEX+instance4.element.get_zindex()})}),instance4.edit_mode()&&instance4.container.setup_padding(instance4),instance4.run_mode()?(to_position.css("margin-right","auto"),to_position.css("overflow-y","auto")):to_position.css("overflow","hidden")},do_show(instance4,properties,options,animated){instance4._is_visible_me=!0,instance4._update_visible(),instance4.with_canvas(canvas=>{var _canvas$velocity;(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop",!0),canvas.css("display",""),animated?perform_animate_in2(instance4,properties,options):instance4._display_me()})},do_hide(instance4,properties,options,animated){if(!instance4.is_drawn){if(!animated){instance4._is_visible_me=!1,instance4._update_visible();return}instance4.ensure_drawn()}instance4._is_visible_me=!1,instance4._update_visible(),instance4.with_canvas(canvas=>{var _canvas$velocity2;(_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop",!0),animated?(options.display="none",perform_animate_out(instance4,properties,options)):(instance4._hide_me(),canvas.css("display","none"))})}}));init_define_process_env();init_shim();init_u2();make_element("GroupWithFocus",extend({},group_element_definition,{display:"Group Focus (old)",field_names:extend({},group_element_definition.field_names,{information:{no_states:!0}}),workflow_show(instance4,properties,options,animated){instance4.get_canvas().data("GroupWithFocus_loading",!0),instance4.setTimeout(()=>instance4.get_canvas().data("GroupWithFocus_loading",!1),1),instance4.do_show(properties,options,animated)},workflow_hide(instance4,properties,options,animated){instance4.do_hide(properties,options,animated)},check_for_errors(element,report){(void 0)(element,"get_group_data",report)},get_private_messages(element){return["child_movement","position_element"]},starts_hidden:!0,initialize(instance4){throw new OwnerError("Old Group Focus is not supported in new responsive engine")}}));init_define_process_env();init_shim();var import_web_dom_collections_iterator217=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();init_logger();init_element_utils();init_element_eval();init_elements();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator216=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();init_web();init_element_eval();init_mode_check();var _tmpl$14=template("<iframe src=about:blank>"),_tmpl$25=template("<div>"),HTMLComponent_default=createElement2(HTMLComponent,element=>({deferDrawing:element.get_static_property("defer_drawing")}),(element,_ref)=>{let{deferDrawing}=_ref;return{properties:{html:new Property(instance4=>evaluate_property(instance4,"html"),{noWaitVisible:!deferDrawing}),useIframe:new Property(instance4=>evaluate_property(instance4,"useiframe"),{noWaitVisible:!0})},styles:placedStyling(element)}});function HTMLComponent(props){let html=()=>props.html;if(props.deferDrawing){let[s,signal]=createSignal(!1);onMount(()=>{props.instance.wait_for_visible_lite(()=>{signal(!0)})}),html=()=>s()?props.html:""}function HTMLIframe(){let ref,htmlTimeout,setHTML=html2=>{ref.contentWindow?(ref.contentWindow.contents=html2,running_test()&&(ref.contents=html2),ref.src='javascript:window["contents"]'):htmlTimeout=props.instance.setTimeout(()=>setHTML(html2),100)};return createEffect(()=>{setHTML(html()),onCleanup(()=>props.instance.clearTimeout(htmlTimeout))}),(()=>{var _el$=_tmpl$14(),_ref$=ref;return typeof _ref$=="function"?use(_ref$,_el$):ref=_el$,_el$.style.setProperty("width","100%"),_el$.style.setProperty("height","100%"),createRenderEffect(()=>setAttribute(_el$,"sandbox",should_block_cookies()?"allow-scripts allow-same-origin":void 0)),_el$})()}return props.instance.run_mode()&&window.bubble_safe_mode?(()=>{var _el$2=_tmpl$25();use(defaultEventHandlers,_el$2,()=>props.instance);var _ref$2=props.ref;return typeof _ref$2=="function"?use(_ref$2,_el$2):props.ref=_el$2,createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3=props.classList;return _v$!==_p$.e&&setAttribute(_el$2,"id",_p$.e=_v$),_p$.t=style(_el$2,_v$2,_p$.t),_p$.a=classList(_el$2,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$2})():createComponent(Show,{get when(){return props.useIframe},get fallback(){return(()=>{var _el$4=_tmpl$25();use(jqueryHTML,_el$4,()=>html()),use(defaultEventHandlers,_el$4,()=>props.instance);var _ref$4=props.ref;return typeof _ref$4=="function"?use(_ref$4,_el$4):props.ref=_el$4,createRenderEffect(_p$=>{var _v$7=props.id,_v$8=props.style,_v$9=props.classList,_v$10=isServer?props.html:void 0;return _v$7!==_p$.e&&setAttribute(_el$4,"id",_p$.e=_v$7),_p$.t=style(_el$4,_v$8,_p$.t),_p$.a=classList(_el$4,_v$9,_p$.a),_v$10!==_p$.o&&(_el$4.innerHTML=_p$.o=_v$10),_p$},{e:void 0,t:void 0,a:void 0,o:void 0}),_el$4})()},get children(){var _el$3=_tmpl$25();use(defaultEventHandlers,_el$3,()=>props.instance);var _ref$3=props.ref;return typeof _ref$3=="function"?use(_ref$3,_el$3):props.ref=_el$3,insert(_el$3,createComponent(HTMLIframe,{})),createRenderEffect(_p$=>{var _v$4=props.id,_v$5=props.style,_v$6=props.classList;return _v$4!==_p$.e&&setAttribute(_el$3,"id",_p$.e=_v$4),_p$.t=style(_el$3,_v$5,_p$.t),_p$.a=classList(_el$3,_v$6,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$3}})}function UNMANGLED_html_wrap3(fn){return fn()}make_element("HTML",{category:"visual elements",glyph_id:"html",list_order:8,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{border_style:"none",border_color:"#6B6B6B",border_width:0,padding_vertical:2,padding_horizontal:2,width:200,height:100},updated_default_sizing:{width:280,height:150},field_names:{html:{default:"<i>edit me...</i>"},useiframe:{default:!1},stretch_to_fit:{default:!1,no_states:!0},keep_proportion_resize:{no_states:!0},defer_drawing:{no_states:!0}},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Padding,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:HTMLComponent_default,use_legacy_in_editor(){return!0},use_legacy_in_thumbnail:!0,get_html(){return"<div></div>"},wrapped_canvas_append(parent,child){return UNMANGLED_html_wrap3(()=>parent.append(child))},get_min_width(){return 0},can_fit_width(element){return!element.get_static_property("useiframe",!0)},can_fit_height(element){return!element.get_static_property("useiframe",!0)},add_an_invisible_div_on_the_top:!0,change_cursor_style_if_clickable:!1,can_defer_drawing(element){return element.get_static_property("defer_drawing")},register(instance4){var _window5;if(instance4.run_mode()&&(_window5=window)!=null&&_window5.bubble_safe_mode)return owner_warn(new OwnerError("This HTML element is not rendered in safe mode",{element_instance:instance4}))},initialize(instance4){function do_initialize(){if(instance4.run_mode()&&window.bubble_safe_mode)return;let canvas=instance4.get_canvas(),scheduled_time_out_call_for_html_iframe=null,iframe=null,_content_window_ready=()=>iframe[0].contentWindow,last_html=!1;pre_cache(instance4,["html","useiframe"]),instance4.autorun(()=>{var _html;let props={};for(let prop of["html","useiframe"])props[prop]=evaluate_property(instance4,prop);let{html,useiframe}=props;if((_html=html)!=null||(html=""),instance4.run_mode())if(useiframe){let set_html=html_aux=>{instance4.clearTimeout(scheduled_time_out_call_for_html_iframe),iframe||(iframe=$('<iframe src="about:blank"></iframe>'),should_block_cookies()&&iframe.attr("sandbox","allow-scripts allow-same-origin"),canvas.append(iframe)),iframe[0].style.width="100%",iframe[0].style.height="100%",_content_window_ready()?(last_html!==html_aux&&(iframe[0].contentWindow.contents=html_aux,last_html=html_aux),iframe[0].src='javascript:window["contents"]'):scheduled_time_out_call_for_html_iframe=instance4.setTimeout(()=>set_html(html_aux),100)};set_html(html),canvas.css("height",instance4.element.get_height())}else try{last_html!==html&&(UNMANGLED_html_wrap3(()=>canvas.html(html)),last_html=html)}catch(error2){owner_only_error("html bug",{display:`Bug in custom html:
`+error2.stack,element_instance:instance4,prop_name:"html"})}else{canvas.empty();let iframe2=$(`          <iframe
              sandbox="allow-scripts"
              id='user_preview_iframe'
              width="100%"
              height="100%"
          >
              (this browser does not support HTML element preview rendering)
          </iframe>          `);iframe2[0].srcdoc=html,canvas.append(iframe2),(void 0)(instance4)}})}instance4.get_static_property("defer_drawing")?instance4.wait_for_visible_lite(do_initialize):do_initialize()},is_input:!1,contains_group_data:!1});init_define_process_env();init_shim();init_u2();init_property_applications();init_element_eval();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator218=__toESM(require_web_dom_collections_iterator());init_element_styles();init_properties();init_element_eval();var _tmpl$15=template("<button>");function IconComponent(props){return(()=>{var _el$=_tmpl$15();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(IconItemComponent,{get icon(){return props.icon},get iconUrl(){return props.iconUrl}})),createRenderEffect(_p$=>{var _v$=props.id,_v$2={display:"flex",...props.style},_v$3={...props.classList,"fa-spin":props.spin},_v$4=props.tabIndex;return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_v$4!==_p$.o&&setAttribute(_el$,"tabindex",_p$.o=_v$4),_p$},{e:void 0,t:void 0,a:void 0,o:void 0}),_el$})()}var IconComponent_default=createElement2(IconComponent,null,element=>({properties:{icon:new Property(instance4=>{let icon=evaluate_property(instance4,"icon");return parse_icon(icon)}),spin:new Property(instance4=>evaluate_property(instance4,"spin_icon")),tabIndex:new Property(instance4=>evaluate_property(instance4,"button_disabled")?"-1":"")},styles:[new Style(instance4=>({color:evaluate_property(instance4,"icon_color")})),...placedStyling(element)]}));make_element("Icon",{category:"visual elements",glyph_id:"icon",list_order:3,keyboard_shortcut:"I",defaults:{font_alignment:"center",color:"#6676F2",background_style:"none",border_style:"none",border_roundness:4,border_width:2,border_color:"#6B6B6B",boxshadow_style:"none",width:80,height:80},updated_default_sizing:{width:30,height:30},default_states:[],properties_for_new:{icon:get_default_icon_for_parent},field_names:extend({icon:{default:"fa fa-flag-checkered"},icon_color:{default:"#6676F2",in_style:!0},spin_icon:{}},start_workflow_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.FontShadow,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.PaddingFields,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:IconComponent_default,get_html(instance4){return"<button></button>"},get_min_width(element){return 0},change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();property_applications_default.patch_user_agent_styles(canvas),canvas.css("display","flex"),$(document).ready(()=>{instance4.autorun(()=>{canvas.empty();let icon=evaluate_property(instance4,"icon");canvas.append(get_icon_svg("fa",icon)),evaluate_property(instance4,"button_disabled")&&canvas.attr("tabindex","-1")})}),on_property_change(instance4,"icon_color",icon_color=>{canvas[0].style.color=icon_color}),on_property_change(instance4,"spin_icon",spin_icon=>{spin_icon||(spin_icon=!1),canvas.toggleClass("fa-spin",spin_icon)})})},transition_properties:{icon_color:"color"},is_input:!1,contains_group_data:!1,events:["ButtonClicked","ElementPressed"],add_an_invisible_div_on_the_top:!1,css_files:["css/optional/font-awesome.min.css"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator220=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();init_apps_utilities();init_appquery();init_image_utils();init_define_process_env();init_shim();init_b_ui();function structure_fixed_aspect_ratio(instance4,append_to){let aspect_ratio_div=div("",append_to);instance4.autorun(()=>{if(instance4.element.has_fixed_aspect_ratio()){let ratio=instance4.element.get_static_property("aspect_ratio_height")/instance4.element.get_static_property("aspect_ratio_width");aspect_ratio_div.css({position:"relative","padding-top":ratio*100+"%"}),aspect_ratio_div.show()}else aspect_ratio_div.hide()})}function element_css(fixed_ratio_conditions){return{position:fixed_ratio_conditions?"absolute":"relative",top:0,left:0,display:"block","margin-top":"","margin-left":"",width:"100%",height:"100%"}}init_element_eval();init_element_props();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator219=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();init_image_utils();init_b_object();init_apps_utilities();init_appquery();init_element_eval();init_element_props();var _tmpl$16=template("<div class=aspect-ratio>"),_tmpl$26=template("<div><img>"),ASPECT_RATIO_CLASS="aspect-ratio",ASPECT_RATIO_SELECTOR=` .${ASPECT_RATIO_CLASS}`,IMAGE_SELECTOR=" img";function isSrcStatic(element){let prop=element.property("src");return!prop.is_empty()&&prop.is_static()&&element.get_static_property("src",!0)!==""}function ImageComponent(props){let instance4=props.instance,[src,setSrc]=createSignal(transparent_image()),width2=createWatcher(()=>instance4.current_width()),height2=createWatcher(()=>instance4.current_height()),fittingHeight=createWatcher(()=>is_fitting_height(instance4)),currentDownload=null;createEffect(lastSource=>{if(width2()==null||height2()==null)return;let originalSource;if(instance4.run_mode()||!props.editorPreviewImage||!props.src?originalSource=props.src:originalSource=props.editorPreviewImage,!originalSource||is_empty(originalSource))return setSrc(transparent_image()),null;function assignImage(source,width3,height3,imgixOptions){let optimizedSource=optimize_image(source,width3,height3,imgixOptions);function beginDownload(){currentDownload=optimizedSource,download_image(optimizedSource,instance4,newSrc=>{currentDownload===optimizedSource&&setSrc(newSrc)})}if(source===lastSource&&!downloaded_images[optimizedSource]&&!is_test2(appquery_default.appname())){let timeout=instance4.setTimeout(beginDownload,300);onCleanup(()=>{instance4.clearTimeout(timeout)})}else beginDownload()}if(props.isStatic)assignImage(originalSource,width2(),height2(),{});else{if(fittingHeight()==null)return;!props.useAspectRatio&&fittingHeight()?assignImage(originalSource,width2()):assignImage(originalSource,width2(),height2())}return originalSource},null);let cropStyle=createMemo(()=>props.isStatic&&props.cropData?{"margin-top":`${props.cropData.top_offset*height2()}px`}:{});return(()=>{var _el$=_tmpl$26(),_el$3=_el$.firstChild;use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(Show,{get when(){return props.useAspectRatio},get children(){var _el$2=_tmpl$16();return createRenderEffect(_$p=>style(_el$2,props.childStyles[ASPECT_RATIO_SELECTOR],_$p)),_el$2}}),_el$3),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3=props.classList,_v$4=src(),_v$5=props.altTag,_v$6={...props.childStyles[IMAGE_SELECTOR],...cropStyle()};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_v$4!==_p$.o&&setAttribute(_el$3,"src",_p$.o=_v$4),_v$5!==_p$.i&&setAttribute(_el$3,"alt",_p$.i=_v$5),_p$.n=style(_el$3,_v$6,_p$.n),_p$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),_el$})()}var ImageComponent_default=createElement2(ImageComponent,element=>({isStatic:isSrcStatic(element),useAspectRatio:element.has_fixed_aspect_ratio()}),(element,_ref)=>{let{isStatic,useAspectRatio}=_ref;return{properties:{altTag:new Property(instance4=>evaluate_property(instance4,"alt_tag")),src:new Property(instance4=>evaluate_property(instance4,"src")),cropData:new Property(instance4=>evaluate_property(instance4,"crop_data")),editorPreviewImage:new Property(instance4=>evaluate_property(instance4,"editor_preview_image"))},styles:[new Style(instance4=>{let style2={top:"0px",left:"0px",display:"block",width:"100%",height:"100%"};if(isStatic){style2.position="absolute";let cropData=evaluate_property(instance4,"crop_data");if(cropData!=null){let makeCssPercentage2=function(num){return`${Math.floor(num*100)}%`};var makeCssPercentage=makeCssPercentage2;Object.assign(style2,{width:makeCssPercentage2(cropData.width_factor),height:makeCssPercentage2(cropData.height_factor),"margin-left":makeCssPercentage2(cropData.left_offset)})}}else{let objectFits={rescale:"contain",adjust_height:"contain",stretch:"fill",zoom:"cover"},stretchOrScale=evaluate_property(instance4,"stretch_or_rescale");style2["object-fit"]=objectFits[stretchOrScale],!useAspectRatio&&is_fitting_height(instance4)?(style2.position="relative",style2.height="auto"):style2.position="absolute"}return style2},{selector:IMAGE_SELECTOR}),new Style(instance4=>{if(evaluate_property(instance4,"four_border_style")){let style2={};for(let side in["top","right","bottom","left"])style2[`border-radius-${side}`]=`${evaluate_property(instance4,`border_roundness_${side}`)}px`}else return{"border-radius":`${evaluate_property(instance4,"border_roundness")}px`}},{selector:IMAGE_SELECTOR}),new Style(instance4=>useAspectRatio?{position:"relative",height:0,"padding-top":`${instance4.get_static_property("aspect_ratio_height")/instance4.get_static_property("aspect_ratio_width")*100}%`}:{},{selector:ASPECT_RATIO_SELECTOR}),...placedStyling(element)]}});function is_src_static2(element){let prop=element.property("src");if(!prop.is_empty()&&prop.is_static()&&element.get_static_property("src",!0)!=="")return!0}make_element("Image",{category:"visual elements",glyph_id:"image",list_order:4,keyboard_shortcut:null,defaults:{width:320,height:240},collapse_margin:500,keep_proportion_resize:!0,field_names:extend({src:{},stretch_or_rescale:{default:"rescale",no_states:!0},crop_data:{no_states:!0},keep_proportion_resize:{no_states:!0},alt_tag:{},editor_preview_image:{no_states:!0,only_edit_mode:!0}},start_workflow_field_names),uses_css_responsive:!0,solid_component:ImageComponent_default,use_legacy_in_editor(){return!0},can_fix_aspect_ratio(){return!0},can_fit_height(element){var _element$root;return!is_src_static2(element)||((_element$root=element.root())==null?void 0:_element$root.is_mobile())},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.Rotation,new property_applications_default.Opacity],get_html(){return"<div></div>"},can_defer_drawing(){return!0},initialize(instance4){let canvas=instance4.get_canvas();instance4.wait_for_visible_lite(()=>{let display_text,img2=img(void 0,canvas);instance4.run_mode()||(display_text=div("display_text",canvas));let _last_autorun_execution=null,_last_saved_source=null;instance4.run_mode()&&on_property_change(instance4,"alt_tag",val=>{img2[0].alt=val!=null?val:""}),pre_cache(instance4,["src","stretch_or_rescale","crop_data","editor_preview_image"]),structure_fixed_aspect_ratio(instance4,canvas);let width_box=null,height_box=null;if(instance4.autorun(()=>{var _instance$element$roo,_width_box,_height_box;let properties={};for(let prop of["src","stretch_or_rescale","crop_data","keep_proportion_resize","editor_preview_image"])properties[prop]=evaluate_property(instance4,prop);let is_static3=is_src_static2(instance4.element),use_cropping=is_static3&&!((_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.is_mobile());if(img2.css(element_css(use_cropping||instance4.element.has_fixed_aspect_ratio()||!is_fitting_height(instance4))),!instance4.run_mode())if(!is_static3&&!properties.editor_preview_image){var _properties$src;display_text.html((_properties$src=properties.src)!=null?_properties$src:""),display_text.show(),display_text.css({display:"block",overflow:"hidden",width:"100%",color:"grey",position:"absolute"}),canvas.css("overflow","hidden"),img2.hide();return}else display_text.hide(),img2.show();(_width_box=width_box)!=null||(width_box=u_exports2.Box(canvas.width())),(_height_box=height_box)!=null||(height_box=u_exports2.Box(canvas.height()));function assign_image_to_element(source,width2,height2,imgix_options){let current_autorun_execution;_last_autorun_execution=current_autorun_execution=LUID();function begin_download(optimized_source2){_last_autorun_execution===current_autorun_execution&&download_image(optimized_source2,instance4,new_src=>{_last_autorun_execution===current_autorun_execution&&(_last_saved_source=source,img2[0].src=new_src)})}let optimized_source=optimize_image(source,width2,height2,imgix_options),delay2=source===_last_saved_source&&!downloaded_images[optimized_source];delay2&&is_test2(appquery_default.appname())&&(delay2=!1),delay2?instance4.setTimeout(begin_download.bind(null,optimized_source),300):begin_download(optimized_source)}if(!instance4.run_mode()&&properties.editor_preview_image&&properties.src)instance4.autorun(()=>{assign_image_to_element(properties.editor_preview_image,width_box(),height_box())});else if(properties.src&&!is_empty(properties.src))if(img2[0].src||(img2[0].src=transparent_image(),reset_img_settings(img2)),reset_img_settings(img2),use_cropping){let imgix_responsive_options;if(properties.keep_proportion_resize?imgix_responsive_options={fit:"crop"}:imgix_responsive_options={},properties.crop_data!=null){let make_css_percentage=num=>`${Math.floor(num*100)}%`;img2.css({width:make_css_percentage(properties.crop_data.width_factor),height:make_css_percentage(properties.crop_data.height_factor),"margin-left":make_css_percentage(properties.crop_data.left_offset)})}instance4.autorun(()=>{assign_image_to_element(properties.src,width_box(),height_box(),imgix_responsive_options),properties.crop_data!=null&&img2.css("margin-top",properties.crop_data.top_offset*height_box())})}else{let object_fits={rescale:"contain",adjust_height:"contain",stretch:"fill",zoom:"cover"};img2.css({"object-fit":object_fits[properties.stretch_or_rescale]}),!instance4.element.has_fixed_aspect_ratio()&&is_fitting_height(instance4)?(img2.css("height","auto"),instance4.autorun(()=>{assign_image_to_element(properties.src,width_box())})):instance4.autorun(()=>{assign_image_to_element(properties.src,width_box(),height_box())})}else img2[0].src=transparent_image(),_last_saved_source=null,reset_img_settings(img2)}),typeof ResizeObserver<"u"&&ResizeObserver!==null&&!instance4.thumbnail_mode()){let resize_observer=new ResizeObserver(entries=>{var _width_box2,_height_box2;(_width_box2=width_box)==null||_width_box2(entries[0].contentRect.width),(_height_box2=height_box)==null||_height_box2(entries[0].contentRect.height)});resize_observer.observe(canvas[0]),instance4.on_destroy(()=>resize_observer.disconnect())}instance4.autorun(()=>{if(evaluate_property(instance4,"four_border_style"))for(let border_location of["top","right","bottom","left"])img2[0].style[`border-radius-${border_location}`]=evaluate_property(instance4,"border_roundness_"+border_location)+"px";else img2[0].style["border-radius"]=evaluate_property(instance4,"border_roundness")+"px"})})},get_min_width(element){return 0},change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,is_input:!1,contains_group_data:!1,events:["ButtonClicked","ElementPressed"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator222=__toESM(require_web_dom_collections_iterator());init_u2();init_b_location();init_property_applications();init_btypes();init_domain_utilities();init_define_process_env();init_shim();var import_web_dom_collections_iterator221=__toESM(require_web_dom_collections_iterator());init_u2();init_state_keys();init_client_config2();init_lib();init_appquery();init_multiple_live_versions();function get_iframe_for_cookie_phonegap(){if(on_phonegap()){let appname=appquery_default.appname(),hook;client_config_default2.apps_domain?hook="https://"+appname+"."+client_config_default2.apps_domain:hook=lib_default().location.get_base_for_meta()+"/site/"+appname,hook+="/version-"+appquery_default.app_version()+"/user/hi";let phonegap_user_iframe=$(`<iframe src="${hook}"></iframe>`);phonegap_user_iframe.load(()=>{phonegap_user_iframe.remove()}),$("body").append(phonegap_user_iframe)}}function refresh_current_user(){let d={};d[state_keys_default.CurrentUser()]=null;let current_user5=lib_default().current_user();d[state_keys_default.Message({prev:current_user5,message:"email",prior_btype_id:"user"})]=null;for(let oauth_provider of appquery_default.get_oauth_providers())d[state_keys_default.Message({prev:current_user5,message:oauth_provider,prior_btype_id:"user"})]=null;return d}var get_remember_email_key=()=>"_bubble_saved_email_"+lib_default().appname()+"_"+canonicalizeLiveVersion(lib_default().app_version());init_lib();init_element_utils();init_page_state();init_elements();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_b_ui();var autorun17=__toESM(require_autorun());init_page_state();init_btypes();init_lib();init_element_eval();init_element_styles();init_properties();init_solid();var _tmpl$17=template("<input>");function InputComponent(props){let instance4=props.instance,val_not_null=createWatcher(()=>instance4.state("value")!=null);function getInputMaskOptions(contentFormat){let options={clearMaskOnLostFocus:!0,showMaskOnHover:!1,greedy:!1,rightAlign:!1,inputEventOnly:!0};if(contentFormat==="currency"&&(options.prefix=evaluate_property(instance4,"currency_symbol"),instance4.get_static_property("always_show_decimals")?(options.digitsOptional=!1,options.placeholder="0"):(options.digitsOptional=!0,options.placeholder="")),contentFormat==="float_number"||contentFormat==="percentage"){let digits=instance4.get_static_property("decimal_place");digits!=null&&digits>=0&&(options.digits=digits,options.digitsOptional=!1,options.placeholder="0",options._radixDance=!0,options.inputEventOnly=!1,val_not_null()&&(options.clearMaskOnLostFocus=!1)),contentFormat==="float_number"&&!instance4.get_static_property("show_thousands")&&(options.autoGroup=!1,options.groupSeparator="")}return is_datelike_format(contentFormat)&&(options.timezone=get_timezone(instance4)),options}let showThousands=()=>instance4.get_static_property("show_thousands"),forceDigits=()=>instance4.get_static_property("decimal_place")!=null;function usingInputMask(format8){return format8 in masks?format8==="int_number"?showThousands():format8==="float_number"?showThousands()||forceDigits():!0:!1}onMount(()=>{let autorun29=instance4.autorun(()=>{let contentFormat=instance4.get_static_property("content_format"),current_tz=instance4.state("current_tz");if(instance4.state("has_been_changed")&&current_tz===void 0||instance4.state("is_focused"))return;let val=instance4.state("value");contentFormat==="geographic_address"?val=get5("geographic_address").runmode_display(val):instance4.run_mode()&&(usingInputMask(contentFormat)?val=masks[contentFormat].format_val(val,getInputMaskOptions(contentFormat)):typeof val=="number"&&(contentFormat==="int_number"?val=parseInt(val).toString():contentFormat==="float_number"&&(val=lib_default().locale().format_decimal(val)))),instance4.canvas.val(val!=null?val:"")});onCleanup(()=>{autorun29.destroy()})});function getValue2(){let contentFormat=instance4.get_static_property("content_format");if(contentFormat in masks){let options={};return is_datelike_format(contentFormat)&&(options.timezone=instance4.state("current_tz")),masks[contentFormat].get_val(instance4.get_canvas(),options)}else return format_input_content(instance4,instance4.get_canvas().val())}return onAfterMount(()=>{if(instance4.run_mode()){instance4.on_message("set_focus",()=>{instance4.canvas.focus()});let contentFormat=instance4.get_static_property("content_format");if(is_datelike_format(contentFormat)){let tz_ar=instance4.autorun(()=>{instance4.state("current_tz",get_timezone(instance4))});onCleanup(()=>{tz_ar.destroy()})}if(contentFormat==="password"&&instance4.canvas.passMeter({events:"keyup input change",afterTest:score=>{score===0&&instance4.canvas.val()===""&&(score=null),instance4.state("pw_strength",score)}}),contentFormat==="int_number"&&!showThousands())make_numeric(instance4.canvas,!0);else if(contentFormat==="float_number"&&!showThousands()&&!forceDigits())make_numeric(instance4.canvas);else if(contentFormat in masks){let ar=autorun17.autorun(function(){let options=masks[contentFormat].get_mask(getInputMaskOptions(contentFormat));instance4.canvas.inputmask(options),instance4.canvas.off("click.inputmask"),instance4.canvas.on("click.inputmask",evt=>{$(evt.target).trigger("inputmaskclick")})});onCleanup(()=>{ar.destroy()})}}}),onMount(()=>{instance4.canvas.blur(()=>{input_focused(!1)}),instance4.canvas.focus(()=>{input_focused(!0)})}),(()=>{var _el$=_tmpl$17();use(enterHandler,_el$,()=>[instance4,props.needsMetaKey]),use(inputChangeKeyupHandlers,_el$,()=>[instance4,getValue2]),use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3=props.classList,_v$4=props.type==="number"?"input":props.type,_v$5=props.placeholder,_v$6=!instance4.run_mode(),_v$7=props.maxlength,_v$8=props.disabled,_v$9=props.type==="number"?"decimal":void 0,_v$10=props.type==="password"?"new-password":void 0;return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_v$4!==_p$.o&&setAttribute(_el$,"type",_p$.o=_v$4),_v$5!==_p$.i&&setAttribute(_el$,"placeholder",_p$.i=_v$5),_v$6!==_p$.n&&(_el$.readOnly=_p$.n=_v$6),_v$7!==_p$.s&&setAttribute(_el$,"maxlength",_p$.s=_v$7),_v$8!==_p$.h&&(_el$.disabled=_p$.h=_v$8),_v$9!==_p$.r&&setAttribute(_el$,"inputmode",_p$.r=_v$9),_v$10!==_p$.d&&setAttribute(_el$,"autocomplete",_p$.d=_v$10),_p$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),_el$})()}var InputComponent_default=createElement2(InputComponent,null,element=>({properties:{type:new Property(instance4=>format_to_type(instance4.get_static_property("content_format")),{alwaysDynamic:!0}),placeholder:new Property(instance4=>evaluate_property(instance4,"placeholder")),maxlength:new Property(instance4=>{if(instance4.get_static_property("limit_number_of_characters")){let characterLimit=evaluate_property(instance4,"character_limit"),contentFormat=evaluate_property(instance4,"content_format");if(characterLimit&&[null,void 0,"text","numerical_ref"].includes(contentFormat))return characterLimit}return null}),disabled:new Property(instance4=>evaluate_property(instance4,"disabled")),needsMetaKey:new Property(instance4=>evaluate_property(instance4,"not_submit_on_enter")),tz_dynamic:new Property(instance4=>evaluate_property(instance4,"tz_dynamic"))},styles:placedStyling(element)}));init_element_eval();make_element("Input",{category:"input forms",glyph_id:"text_input",list_order:1,keyboard_shortcut:null,defaults:extend({},default_for_inputs,{width:250,height:45,use_max_width:!0,max_width:150}),updated_default_sizing:{height:48},default_states:void 0,field_names:extend({placeholder:{default:"Type here..."},content:{},content_format:{default:"text",no_states:!0},currency_symbol:{default:"$"},show_thousands:{no_states:!0},always_show_decimals:{no_states:!0},decimal_place:{no_states:!0},have_a_numerical_range:{no_states:!0},min_range_value:{},max_range_value:{},check_password_policy:{no_states:!0}},additional_field_names_for_text_inputs,custom_tz_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Font,new property_applications_default.FontSpacing(null,["line_height"]),new property_applications_default.InputPadding,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.PlaceholderColor,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],properties_for_mobile:{min_width_css:"0px",min_height_css:"45px"},uses_css_responsive:!0,solid_component:InputComponent_default,use_legacy_in_editor(){return!0},use_legacy_in_thumbnail:!0,can_defer_drawing(){return!0},get_html(instance4){let type=format_to_type(instance4.get_static_property("content_format"));return type==="number"?'<input type="input" inputmode="decimal"></input>':type==="password"?'<input type="'+type+'" autocomplete="new-password"></input>':'<input type="'+type+'"></input>'},get_min_width(element){return 0},is_secure(instance4){return["password","us_ssn","bank_routing_number","credit_card_number","credit_card_cvc","credit_card_exp_month","credit_card_exp_year"].includes(instance4.get_static_property("content_format"))},initialize(instance4){instance4.wait_for_visible_lite(()=>{var _instance$element$roo,_instance$element$roo2;let canvas=instance4.get_canvas();reset_input_div(canvas),canvas.focus(()=>{input_focused(!0)}),canvas.on("blur",()=>{input_focused(!1)}),((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())===0&&register_tab_index_listener(instance4,tabindex=>{canvas.attr("tabindex",tabindex)});function get_input_mask_options(content_format){let options={clearMaskOnLostFocus:!0,showMaskOnHover:!1,greedy:!1,rightAlign:!1,inputEventOnly:!0};if(content_format==="currency"&&(options.prefix=evaluate_property(instance4,"currency_symbol"),instance4.get_static_property("always_show_decimals")?(options.digitsOptional=!1,options.placeholder="0"):(options.digitsOptional=!0,options.placeholder="")),["float_number","percentage"].includes(content_format)){let digits=instance4.get_static_property("decimal_place");digits!=null&&digits>=0&&(options.digits=digits,options.digitsOptional=!1,options.placeholder="0",options._radixDance=!0,options.inputEventOnly=!1)}return["float_number","int_number"].includes(content_format)&&!instance4.get_static_property("show_thousands")&&(options.autoGroup=!1,options.groupSeparator=""),is_datelike_format(content_format)&&(options.timezone=get_timezone(instance4)),options}let using_input_mask=format8=>format8 in masks;instance4.autorun(()=>{let new_placeholder=evaluate_property(instance4,"placeholder");canvas.attr("placeholder",new_placeholder),canvas.get()[0].inputmask!=null&&(canvas.get()[0].inputmask.originalPlaceholder=new_placeholder)}),set_character_limit_on_input(instance4),instance4.run_mode()||canvas.attr("readonly","true");let prev_tz;if(instance4.autorun(()=>{var _val;let content_format_on_input_change=instance4.get_static_property("content_format"),current_tz=instance4.state("current_tz");if(instance4.state("has_been_changed")&&current_tz===prev_tz||(prev_tz=current_tz,instance4.state("is_focused")))return;let val=instance4.state("value");content_format_on_input_change==="geographic_address"?val=get5("geographic_address").runmode_display(val):instance4.run_mode()&&using_input_mask(content_format_on_input_change)&&(val=masks[content_format_on_input_change].format_val(val,get_input_mask_options(content_format_on_input_change))),instance4.get_canvas().val((_val=val)!=null?_val:"")}),instance4.run_mode()){let get_value2=function(){if(run_mode_content_format in masks){let options={};return is_datelike_format(run_mode_content_format)&&(options.timezone=instance4.state("current_tz")),masks[run_mode_content_format].get_val(instance4.get_canvas(),options)}else return format_input_content(instance4,instance4.get_canvas().val())};var get_value=get_value2;instance4.on_message("set_focus",()=>canvas.focus());let run_mode_content_format=instance4.get_static_property("content_format");is_datelike_format(run_mode_content_format)&&instance4.autorun(()=>{instance4.state("current_tz",get_timezone(instance4))}),assign_change_keyup_handlers(instance4,get_value2),switch_disabled_or_not(instance4),instance4.autorun(()=>{let needs_meta_key_pressed=evaluate_property(instance4,"not_submit_on_enter");return assign_enter_handler_in_input(instance4,needs_meta_key_pressed)}),run_mode_content_format==="password"&&canvas.passMeter({events:"keyup input change",afterTest:score=>{score===0&&canvas.val()===""&&(score=null),instance4.state("pw_strength",score)}}),run_mode_content_format in masks&&u_exports2.autorun(()=>{let options=masks[run_mode_content_format].get_mask(get_input_mask_options(run_mode_content_format));canvas.inputmask(options),canvas.off("click.inputmask"),canvas.on("click.inputmask",evt=>$(evt.target).trigger("inputmaskclick"))})}})},content_validated(val,instance4){var _val$trim;let content_format=instance4.get_static_property("content_format");function make_sure_is_in_range(val2){var _element_eval$evaluat,_element_eval$evaluat2;if(!instance4.get_static_property("have_a_numerical_range"))return!0;let min=(_element_eval$evaluat=evaluate_property(instance4,"min_range_value"))!=null?_element_eval$evaluat:-1/0,max=(_element_eval$evaluat2=evaluate_property(instance4,"max_range_value"))!=null?_element_eval$evaluat2:1/0;return max<min?!0:min<=val2&&val2<=max}if(["",null,void 0].includes(val)||(val==null||(_val$trim=val.trim)==null?void 0:_val$trim.call(val))==="")return!evaluate_property(instance4,"mandatory");switch(content_format){case"email":return is_email(val);case"geographic_address":return from_address(val)!=null;case"password":return instance4.get_static_property("check_password_policy")?is_pw_valid(val):!0;case"appname_validate":return is_appname_valid(val==null?void 0:val.toLowerCase());default:if(content_format in masks){let mask=masks[content_format];if(typeof val=="string"&&!mask.is_valid_text(val)||mask.btype==="date"&&isNaN(Date.parse(val)))return!1;if(mask.btype==="number"){if(typeof val=="number")return make_sure_is_in_range(val);let parsed=mask.parse_val(val);return parsed!=null?make_sure_is_in_range(parsed):!1}else return!0}else return!0}},get_starting_content(instance4){if(instance4.run_mode()&&instance4.get_static_property("auto_binding")){let{type,thing}=get_input_autobind_thing(instance4),bind_field=instance4.get_static_property("bind_field"),val=format_input_content(instance4,get5(type).get_message(bind_field).evaluate(thing));return typeof val=="function"?val():val}else{let content_format=instance4.get_static_property("content_format"),val;if(instance4.run_mode()?val=format_input_content(instance4,evaluate_property(instance4,"content")):instance4.get_static_property("auto_binding")?val="":content_format==="geographic_address"&&!instance4.element.property("content").is_static()?val={address:evaluate_property(instance4,"content")}:val=evaluate_property(instance4,"content"),typeof val=="function")return val();if(instance4.run_mode()&&!val&&content_format==="email"){var _u$local_storage_get;let saved_email=(_u$local_storage_get=local_storage_get(get_remember_email_key()))==null?void 0:_u$local_storage_get.email;if(saved_email&&!lib_default().current_user().is_logged_in())for(let e of(_instance$element$get=(_instance$element$get2=(_instance$element=instance4.element).get_visible_workflows)==null?void 0:_instance$element$get2.call(_instance$element))!=null?_instance$element$get:[]){var _instance$element$get,_instance$element$get2,_instance$element;let a,has_a_login=!1;for(a of e.actions())if(a.type()==="LogIn"){has_a_login=!0;break}if(has_a_login&&a.find_my_expressions("GetElement.element_id="+instance4.element_id()).length)return saved_email}}return val}},get_state_value(element,name){if(name==="value"){let content_format=element.get_static_property("content_format");return content_format in masks?masks[content_format].btype:content_format==="geographic_address"?"geographic_address":"text"}if(name==="pw_strength"&&element.get_static_property("content_format")==="password")return"number"},add_specific_messages(messages,element){element.get_static_property("content_format")==="password"&&extend(messages,{get_pw_strength:{description:"'s password strength",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a){var _a$state;return(_a$state=a==null?void 0:a.state("pw_strength"))!=null?_a$state:this.ret_btype_null()}}})},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!0,contains_group_data:!1,jquery_plugins(){return["jquery_plugins/pass-meter.min"]},only_send_to_client_in_runmode:!0});init_define_process_env();init_shim();var import_web_dom_collections_iterator224=__toESM(require_web_dom_collections_iterator());init_u2();init_property_applications();init_runmode();init_appquery();init_lang();init_evaluate();init_eval_node_state();init_lib();var querystring7=__toESM(require_querystring());init_element_utils();init_text_elements();init_element_eval();init_elements();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator223=__toESM(require_web_dom_collections_iterator());init_solid();init_runmode();init_element_eval();init_b_ui();init_mode_check();init_text_elements();init_element_styles();init_properties();var _tmpl$18=template("<a>");function LinkComponent(props){let instance4=props.instance;createEffect(()=>{!props.showIcon&&props.backgroundStyle!=="image"&&props.useDotDotDot&&(apply_dotdotdot(instance4,instance4.edit_mode()?"letter":"words"),onCleanup(()=>remove_dotdotdot(instance4)))});let wrapHtml=html=>props.verticalCenter||instance4.run_mode()&&props.useDotDotDot?`<div>${html}</div>`:html;createEffect(()=>{let canvas=instance4.canvas;if(props.backgroundStyle==="image"){canvas.text("");return}if(props.showIcon){canvas.empty();let icon=div(props.icon+" inner-element");icon.css({"font-family":"FontAwesome","padding-left":"3px"}),canvas.append(icon)}else!instance4.run_mode()&&props.editor_preview_link&&!instance4.element.property("text").is_static()?canvas.html(wrapHtml(bbcode_to_html(props.editor_preview_link,!0).trim())):canvas.html(wrapHtml(bbcode_to_html(props.text,!0).trim()));instance4.canvas[0].addEventListener("click",e=>{internal_navigation_handler(e)})});let link=createWatcher(()=>getLink(instance4));return instance4.run_mode()&&(onMount(()=>{on_property_change(instance4,"link_disabled",disabled=>{instance4.state("link_disabled",disabled)})}),onMount(()=>{on_phonegap()&&(instance4.canvas.on("touchend",()=>{window.open(link(),"_blank","location=yes,enableViewportScale=yes")}),instance4.canvas.on("click",e=>(e.preventDefault(),!1)))})),(()=>{var _el$=_tmpl$18();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[CLICKABLE_ELEMENT]:!0,"bubble-r-vertical-center":props.verticalCenter},_v$4=props.target,_v$5=props.rel,_v$6=link();return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_v$4!==_p$.o&&setAttribute(_el$,"target",_p$.o=_v$4),_v$5!==_p$.i&&setAttribute(_el$,"rel",_p$.i=_v$5),_v$6!==_p$.n&&setAttribute(_el$,"href",_p$.n=_v$6),_p$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),_el$})()}var LinkComponent_default=createElement2(LinkComponent,element=>({showIcon:element.get_styleable_static_property("show_icon")}),(element,_ref)=>{let{showIcon}=_ref;return{properties:{...showIcon?{icon:new Property(instance4=>evaluate_property(instance4,"icon"))}:{text:new Property(instance4=>evaluate_property(instance4,"text")),useDotDotDot:new Property(could_clip),noHtml:new Property(instance4=>evaluate_property(instance4,"no_html")),editor_preview_link:new Property(instance4=>{evaluate_property(instance4,"editor_preview_link")})},backgroundStyle:new Property(instance4=>evaluate_property(instance4,"background_style")),verticalCenter:new Property(instance4=>evaluate_property(instance4,"vertical_centering")),target:new Property(instance4=>evaluate_property(instance4,"open_in_new_tab")?"_blank":"_self"),rel:new Property(instance4=>evaluate_property(instance4,"nofollow")?"nofollow":null)},styles:[new Style(instance4=>({"word-break":"break-word",...evaluate_property(instance4,"background_style")==="none"?{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","user-select":"none"}:{}})),new Style(instance4=>evaluate_property(instance4,"link_disabled")?{cursor:"not-allowed","pointer-events":"none"}:{cursor:"pointer","pointer-events":"auto"}),...placedStyling(element)]}});make_element("Link",{category:"visual elements",glyph_id:"link",keyboard_shortcut:"L",condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{font_alignment:"left",font_color:"#4083a9",width:150,height:20,min_width:80,use_max_width:!0,max_width:120},properties_for_new:{fit_width:!0,single_width:!1,min_width_css:"60px"},field_names:{text:{default:"...edit me..."},show_icon:{no_states:!0,in_style:!0},icon:{default:"fa fa-facebook-official"},editor_preview_link:{no_states:!0,only_edit_mode:!0},linktype:{default:"pagelink",no_states:!0},page:{default:"index",no_states:!0},data_to_send:{no_states:!0},url:{},link_disabled:{default:!1},open_in_new_tab:{default:!1},add_parameters:{no_states:!0},url_parameters:{optional:!0,no_states:!0},keep_current_page_params:{no_states:!0},wrap_when_squizzed:{no_states:!0,default:!0},no_html:{no_states:!0},nofollow:{no_states:!0}},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.FontShadow,new property_applications_default.FontSpacing,new property_applications_default.PaddingText,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,no_vertical_if_legacy_center:!0,allow_legacy:!0}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.Opacity],solid_component:LinkComponent_default,use_legacy_in_editor(){return!0},use_legacy_in_thumbnail:!0,uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,change_cursor_style_if_clickable:!1,get_min_width(element){return 0},get_html(instance4){return instance4.run_mode()?"<a></a>":"<div></div>"},can_defer_drawing(){return!0},initialize(instance4){let canvas=instance4.get_canvas();instance4.wait_for_visible_lite(()=>{canvas.addClass(CLICKABLE_ELEMENT),property_applications_default.apply_css_style(canvas,{"white-space":"pre-wrap","text-decoration":"none","word-break":"break-word"});let dotdotdot_initialized=!1;pre_cache(instance4,["text","font_size","icon","show_icon","background_style","no_html","editor_preview_link"]),instance4.autorun(()=>{let props={};for(let prop of["text","font_size","icon","show_icon","background_style","no_html","editor_preview_link"])props[prop]=evaluate_property(instance4,prop);let{text:text2,icon,show_icon,background_style,editor_preview_link}=props;if(background_style==="image")canvas.text("");else if(show_icon){var _canvas$trigger;dotdotdot_initialized=!1,remove_dotdotdot(instance4),(_canvas$trigger=canvas.trigger)==null||_canvas$trigger.call(canvas,"destroy"),canvas.empty();let icon_div=div(icon+" inner-element");property_applications_default.apply_css_style(icon_div,{"font-family":"FontAwesome","padding-left":"3px"}),canvas.append(icon_div)}else{let apply_html2=function(html){evaluate_property(instance4,"vertical_centering")||instance4.run_mode()&&could_clip(instance4)?canvas.html(`<div>${html}</div>`):canvas.html(html)};var apply_html=apply_html2;!instance4.run_mode()&&editor_preview_link&&!instance4.element.property("text").is_static()?apply_html2(bbcode_to_html(editor_preview_link,!0).trim()):apply_html2(bbcode_to_html(text2,!0).trim()),!dotdotdot_initialized&&could_clip(instance4)&&(dotdotdot_initialized=!0,apply_dotdotdot(instance4,instance4.edit_mode()?"letter":"words")),instance4.run_mode()||(void 0)(instance4)}if(background_style==="none")return new property_applications_default.NoSelect()._apply(!0,canvas)}),instance4.run_mode()&&(on_property_change(instance4,"open_in_new_tab",open_in_new_tab=>{open_in_new_tab?canvas[0].target="_blank":canvas[0].target="_self"}),on_property_change(instance4,"link_disabled",link_disabled=>{instance4.state("link_disabled",link_disabled),link_disabled?(instance4.get_canvas()[0].style.cursor="not-allowed",instance4.get_canvas()[0].style["pointer-events"]="none"):(instance4.get_canvas()[0].style.cursor="pointer",instance4.get_canvas()[0].style["pointer-events"]="auto")}),on_property_change(instance4,"nofollow",nofollow=>{nofollow&&(canvas[0].rel="nofollow")}),instance4.canvas[0].addEventListener("click",e=>{internal_navigation_handler(e)}),instance4.autorun(()=>{function get_page_name(page2){var _name,_appquery$get_page_by;let name=page_id_to_name2(page2);return(_name=name)!=null||(name=(_appquery$get_page_by=appquery_default.get_page_by_name(page2))==null?void 0:_appquery$get_page_by.name()),name}let linktype=evaluate_property(instance4,"linktype"),link;if(linktype==="pagelink"){var _get_page_name;let page2=evaluate_property(instance4,"page"),page_name=(_get_page_name=get_page_name(page2))!=null?_get_page_name:"",data_to_send=evaluate_property(instance4,"data_to_send");if(data_to_send){let page_element=appquery_default.get_page_by_name(page_name);page_element!=null&&(data_to_send=get_data_to_send(data_to_send,page_element.get_static_property("readable_field")),data_to_send&&(page_name+="/"+data_to_send))}let params={};if(instance4.get_static_property("keep_current_page_params")&&extend(params,lib_default().location.get_query()),is_debug_mode()&&(params.debug_mode=!0),evaluate_property(instance4,"add_parameters")){let param_nodes=instance4.element.property("url_parameters");with_eval_node(param_nodes,()=>{let url_parameters=evaluate_properties(param_nodes.json._raw(),instance4.prop_eval_context(),DETECT_FIELD_NAMES);for(let{key,value}of Object.values(url_parameters))forbidden_url_keys.includes(key)||(params[key]=value)})}page_name==="index"&&(page_name=""),link=lib_default().location.get_server_base()+page_name,is_empty(params)||(link+="?"+querystring7.stringify(params))}else{var _link;link=evaluate_property(instance4,"url"),((_link=link)==null?void 0:_link.indexOf("//"))===-1&&!href_attributes.includes(link.split(":")[0])&&link[0]!=="#"&&(link="//"+link)}canvas[0].href=link,on_phonegap()&&(canvas.on("touchend",()=>window.open(link,"_blank","location=yes,enableViewportScale=yes")),canvas.on("click",e=>(e.preventDefault(),!1)))})),instance4.on_destroy(()=>{remove_dotdotdot(instance4)})})},is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,css_files:["css/optional/font-awesome.min.css"]});init_define_process_env();init_shim();init_property_applications();init_define_process_env();init_shim();init_web();init_web();var import_web_dom_collections_iterator226=__toESM(require_web_dom_collections_iterator());init_element_eval();init_element_styles();init_properties();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator225=__toESM(require_web_dom_collections_iterator());init_solid();init_define_process_env();init_shim();init_element_eval();function getSeparatorDiv(listInstance,isFirst){var _evaluate_property,_evaluate_property2,_evaluate_property3,_evaluate_property4;let view=listInstance==null?void 0:listInstance.element.root();if(view==null||listInstance==null)return{width:"100%",height:"0.3px"};let defaultViewSize=view.get_static_property("default_view_size"),hairlineWidth=getDefaultDevice(defaultViewSize).os==="ios"?"0.3px":"0.5px",separatorWidth=(_evaluate_property=evaluate_property(listInstance,"separator_width"))!=null?_evaluate_property:"hairline",separators=(_evaluate_property2=evaluate_property(listInstance,"separators"))!=null?_evaluate_property2:"full",separatorColor=(_evaluate_property3=evaluate_property(listInstance,"separator_color"))!=null?_evaluate_property3:"#969696",divThickness=separatorWidth==="hairline"?hairlineWidth:`${separatorWidth}px`,separatorInset=(_evaluate_property4=evaluate_property(listInstance,"separator_inset"))!=null?_evaluate_property4:"16px",res={height:divThickness.toString(),"flex-shrink":0,"flex-grow":0,"background-color":separatorColor};return isFirst&&(res={...res,width:"100%",position:"absolute"}),separators==="inset"&&separatorInset!=null&&(res={...res,"margin-left":`${separatorInset}px`},isFirst&&(res.width=`calc(100% - ${separatorInset}px`)),res}function getItemGap(instance4){var _evaluate_property5;return`${evaluate_property(instance4,"use_item_gap")&&(_evaluate_property5=evaluate_property(instance4,"item_row_gap"))!=null?_evaluate_property5:0}px`}var _tmpl$19=template("<div>"),ORDER_ABOVE="-3000000",ORDER_BELOW="30000000";function ListComponent(props){var _props$instance$get_c,_useContext,_useContext2,_useContext3;(_props$instance$get_c=props.instance.get_children_drawn_key())==null||_props$instance$get_c.turn();let[shouldShowHeader,setShouldShowHeader]=createSignal(!1),[shouldShowFooter,setShouldShowFooter]=createSignal(!1),listInfo=createMemo(()=>{var _ref,_sectionHeader$get_st,_listItem$get_static_;let listItem=props.instance.children.find(child=>child.element.type()==="VerticalListItem"),sectionHeader=props.instance.children.find(child=>child.element.type()==="SectionHeader"),sectionHeaderOrder=(_ref=(_sectionHeader$get_st=sectionHeader==null?void 0:sectionHeader.get_static_property("order"))!=null?_sectionHeader$get_st:listItem==null?void 0:listItem.get_static_property("order"))!=null?_ref:0,listItemOrder=(_listItem$get_static_=listItem==null?void 0:listItem.get_static_property("order"))!=null?_listItem$get_static_:0,hasHeader=props.instance.children.some(child=>child.get_static_property("order")<sectionHeaderOrder),hasFooter=props.instance.children.some(child=>child.get_static_property("order")>listItemOrder);return{listItem,sectionHeader,hasHeader,hasFooter}}),EditRepeatingList=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.editRepeatingList,AddDropSectionComponent=(_useContext2=useContext(EditorContext_default))==null?void 0:_useContext2.addDropSectionComponent,DropSectionComponent=(_useContext3=useContext(EditorContext_default))==null?void 0:_useContext3.dropSectionComponent;return[createMemo(()=>createMemo(()=>!!(props.instance.edit_mode()&&AddDropSectionComponent!==void 0))()&&createComponent(Show,{get when(){return!listInfo().hasHeader},get children(){return createComponent(AddDropSectionComponent,{get condition(){return shouldShowHeader()},onToggle:val=>setShouldShowHeader(val),style:{top:"-20px"}})}})),(()=>{var _el$=_tmpl$19();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(Show,{get when(){return createMemo(()=>!!shouldShowHeader())()&&!listInfo().hasHeader},get children(){return createMemo(()=>!!(props.instance.edit_mode()&&DropSectionComponent!==void 0))()&&createComponent(DropSectionComponent,{style:{order:ORDER_ABOVE}})}}),null),insert(_el$,()=>props.children,null),insert(_el$,(()=>{var _c$=createMemo(()=>!!(props.instance.edit_mode()&&EditRepeatingList!==void 0));return()=>_c$()&&createComponent(EditRepeatingList,{get order(){var _listInfo$listItem;return(_listInfo$listItem=listInfo().listItem)==null?void 0:_listInfo$listItem.get_static_property("order")},get toCopyInstance(){return listInfo().listItem},get separatorStyle(){return getSeparatorDiv(props.instance)},get firstSeparatorStyle(){return getSeparatorDiv(props.instance,!0)},get itemGap(){return getItemGap(props.instance)},get toCopyHeaderInstance(){return createMemo(()=>!!props.isSectionList)()?listInfo().sectionHeader:void 0},get isSectionList(){return props.isSectionList}})})(),null),insert(_el$,createComponent(Show,{get when(){return createMemo(()=>!!shouldShowFooter())()&&!listInfo().hasFooter},get children(){return createMemo(()=>!!(props.instance.edit_mode()&&DropSectionComponent!==void 0))()&&createComponent(DropSectionComponent,{style:{order:ORDER_BELOW}})}}),null),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,overflow:"visible"},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})(),createMemo(()=>createMemo(()=>!!(props.instance.edit_mode()&&AddDropSectionComponent!==void 0))()&&createComponent(Show,{get when(){return!listInfo().hasFooter},get children(){return createComponent(AddDropSectionComponent,{get condition(){return shouldShowFooter()},onToggle:val=>setShouldShowFooter(val),style:{bottom:"-20px"},isFooter:!0})}}))]}init_solid();var VerticalListComponent_default=createElement_default(VerticalListComponent,void 0,element=>({properties:{viewMinHeight:new Property(instance4=>evaluate_property(instance4.root_instance(),"min_height_px"),{fallback:5}),...containerProperties(!1)},styles:[...basicStyling(element),new Style(instance4=>{var _instance$element$get;return{"z-index":(_instance$element$get=instance4.element.get_zindex())!=null?_instance$element$get:void 0}},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>({width:"100%",overflow:"visible",height:"max-content","min-height":0,"flex-shrink":1,"flex-grow":1,order:instance4.get_static_property("order")}),{outerPositioning:!0})]}));function VerticalListComponent(props){return createComponent(ListComponent,mergeProps(props,{isSectionList:!1}))}init_btype_ids();init_u2();init_element_eval();init_appquery();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator227=__toESM(require_web_dom_collections_iterator());init_element_styles();init_solid();init_properties();init_element_eval();var _tmpl$20=template("<div>");function VerticalListItemComponent(props){let elementChildren=children(()=>props.children),editorContext=useContext(EditorContext_default),SwipeActionContainerComponent=editorContext==null?void 0:editorContext.swipeActionContainerComponent,filterChildren=filter=>{var _elementChildren$toAr;return elementChildren==null||(_elementChildren$toAr=elementChildren.toArray())==null?void 0:_elementChildren$toAr.filter(el=>el instanceof Element?filter==="leadingSwipeActions"?el.querySelector(".swipe-action-leading")!=null:filter==="trailingSwipeActions"?el.querySelector(".swipe-action-trailing")!=null:!el.classList.contains("SwipeAction"):!1)};return[SwipeActionContainerComponent&&createComponent(SwipeActionContainerComponent,{side:"leading",get instance(){return props.instance},get id(){return props.id},get children(){return filterChildren("leadingSwipeActions")}}),(()=>{var _el$=_tmpl$20();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,mergeProps(props,{get children(){return filterChildren("listItemChildren")}}))),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})(),SwipeActionContainerComponent&&createComponent(SwipeActionContainerComponent,{side:"trailing",get instance(){return props.instance},get id(){return props.id},get children(){return filterChildren("trailingSwipeActions")}})]}var VerticalListItemComponent_default=createElement_default(VerticalListItemComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:{...containerProperties(shouldAddWrapper)},styles:[...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>({order:instance4.get_static_property("order"),...getHeightAndWidth(instance4)}),{outerPositioning:!0})]}});function getHeightAndWidth(instance4){var _evaluate_property;return{width:"100%",height:instance4.get_static_property("single_height")?(_evaluate_property=evaluate_property(instance4,"min_height_css"))!=null?_evaluate_property:"160px":"fit-content"}}init_define_process_env();init_shim();init_web();init_web();var import_web_dom_collections_iterator228=__toESM(require_web_dom_collections_iterator());init_element_eval();init_element_styles();init_properties();var SectionListComponent_default=createElement_default(SectionListComponent,void 0,element=>({properties:{viewMinHeight:new Property(instance4=>evaluate_property(instance4.root_instance(),"min_height_px"),{fallback:5}),...containerProperties(!1)},styles:[...basicStyling(element),new Style(instance4=>{var _instance$element$get;return{"z-index":(_instance$element$get=instance4.element.get_zindex())!=null?_instance$element$get:void 0}},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>({width:"100%",overflow:"visible",height:"max-content","min-height":0,"flex-shrink":1,"flex-grow":1,order:instance4.get_static_property("order")}),{outerPositioning:!0})]}));function SectionListComponent(props){return createComponent(ListComponent,mergeProps(props,{isSectionList:!0}))}init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator229=__toESM(require_web_dom_collections_iterator());init_solid();init_element_eval();init_element_styles();init_properties();var _tmpl$21=template("<div>");function HorizontalListItemComponent(props){return(()=>{var _el$=_tmpl$21();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var HorizontalListItemComponent_default=createElement_default(HorizontalListItemComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>({order:instance4.get_static_property("order"),"align-self":evaluate_property(instance4,"vert_alignment"),...getHeightAndWidth2(instance4)}),{outerPositioning:!0})]}});function getHeightAndWidth2(instance4){var _evaluate_property,_evaluate_property2;let isFixedWidth=instance4.get_static_property("single_width"),isFixedHeight=instance4.get_static_property("single_height");return{width:isFixedWidth?(_evaluate_property=evaluate_property(instance4,"min_width_css"))!=null?_evaluate_property:"160px":"max-content",height:isFixedHeight?(_evaluate_property2=evaluate_property(instance4,"min_height_css"))!=null?_evaluate_property2:"160px":"100%","flex-shrink":0}}init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator230=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();var _tmpl$27=template("<div>");function HorizontalListComponent(props){var _useContext;onAfterMount(()=>{var _props$instance$get_c;(_props$instance$get_c=props.instance.get_children_drawn_key())==null||_props$instance$get_c.turn()});let EditRepeatingList=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.editRepeatingList;return(()=>{var _el$=_tmpl$27();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,()=>props.children,null),insert(_el$,(()=>{var _c$=createMemo(()=>!!(props.instance.edit_mode()&&EditRepeatingList!==void 0));return()=>_c$()&&createComponent(EditRepeatingList,{get toCopyInstance(){return props.instance.children[0]},get itemGap(){return getItemGap(props.instance)},get order(){var _props$instance$child;return(_props$instance$child=props.instance.children[0])==null?void 0:_props$instance$child.get_static_property("order")},isHorizontal:!0})})(),null),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,overflow:"hidden","flex-wrap":"nowrap"},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var HorizontalListComponent_default=createElement_default(HorizontalListComponent,void 0,element=>({properties:{...containerProperties(!1)},styles:[...placedStyling(element)]}));init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator231=__toESM(require_web_dom_collections_iterator());init_element_styles();init_solid();init_properties();init_element_eval();var _tmpl$28=template("<div>");function SectionHeaderComponent(props){return(()=>{var _el$=_tmpl$28();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var SectionHeaderComponent_default=createElement_default(SectionHeaderComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:{...containerProperties(shouldAddWrapper)},styles:[...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>({order:instance4.get_static_property("order"),...getHeightAndWidth3(instance4)}),{outerPositioning:!0})]}});function getHeightAndWidth3(instance4){var _evaluate_property,_evaluate_property2;let isFixedWidth=instance4.get_static_property("single_width"),isFixedHeight=instance4.get_static_property("single_height");return{width:isFixedWidth?(_evaluate_property=evaluate_property(instance4,"min_width_css"))!=null?_evaluate_property:"160px":"100%",height:isFixedHeight?(_evaluate_property2=evaluate_property(instance4,"min_height_css"))!=null?_evaluate_property2:"160px":"fit-content"}}init_StaticList();make_element("VerticalList",{condition(root2){var _ref,_root$is_mobile;return(_ref=mobileEnabled()&&(root2==null||(_root$is_mobile=root2.is_mobile)==null?void 0:_root$is_mobile.call(root2))&&(root2==null?void 0:root2.get_static_property("view_type"))==="vertical_list")!=null?_ref:!1},...getListInfo(),display:"Vertical List",solid_component:VerticalListComponent_default});make_element("SectionList",{condition(root2){var _ref2,_root$is_mobile2;return(_ref2=mobileEnabled()&&(root2==null||(_root$is_mobile2=root2.is_mobile)==null?void 0:_root$is_mobile2.call(root2))&&(root2==null?void 0:root2.get_static_property("view_type"))==="section_list")!=null?_ref2:!1},...getListInfo(),display:"Section List",solid_component:SectionListComponent_default});function get_state_value(element,name){if(name==="list_data"){let btype_id=element.get_static_property("group_type");return btype_id?list_type(btype_id):"null"}}function add_specific_messages(messages,element){let list_btype=element.get_state_value("list_data");list_btype!=null&&extend(messages,{get_list_data:{description:"'s "+list_btype.display(),is_client_state(){return!0},section:"States",ret_btype:list_btype,fn(a){var _a$state$list_cast,_a$state,_list_btype$inner,_list_btype$inner2;return(_a$state$list_cast=a==null||(_a$state=a.state("list_data"))==null?void 0:_a$state.list_cast((_list_btype$inner=list_btype.inner())==null?void 0:_list_btype$inner.id()))!=null?_a$state$list_cast:new StaticList_default([],null,(_list_btype$inner2=list_btype.inner())==null?void 0:_list_btype$inner2.id())}},get_loading_status:{description:" is loading",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a){var _ref3;return(_ref3=a==null?void 0:a.state("loading"))!=null?_ref3:this.ret_btype_null()}}})}function getListInfo(){return{field_names:{separators:{in_style:!0,default:"full"},separator_width:{in_style:!0,default:"hairline"},separator_color:{in_style:!0,default:"#969696"},separator_inset:{in_style:!0,default:16},use_item_gap:{default:!1,no_states:!0},item_row_gap:{default:0}},uses_css_responsive:!0,property_applications:[new property_applications_default.PaddingFields],change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},cant_delete(){return!0},is_pseudo:!0,not_draggable(){return!0},not_resizable(){return!0},get_min_width(){return 0},get_states(element){return["list_data"]},goes_on_document(){return!0},register(instance4){instance4.state("list_data",()=>evaluate_property(instance4,"data_source"))},standard_container_layout:"column",get_html(instance4){return"<div></div>"},initialize(instance4){},draws_own_children(){return!0},is_input:!1,contains_group_data:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},events:[],add_an_invisible_div_on_the_top:!1,get_state_value,add_specific_messages}}make_element("HorizontalList",{display:"Horizontal List",condition(root2){var _ref4,_root$is_mobile3;return(_ref4=mobileEnabled()&&(root2==null||(_root$is_mobile3=root2.is_mobile)==null?void 0:_root$is_mobile3.call(root2)))!=null?_ref4:!1},properties_for_new:{single_width:!1,min_width_css:"0px",single_height:!0,min_height_css:"150px",padding_left:16,padding_right:16,use_item_gap:!0,item_row_gap:6},field_names:{},uses_css_responsive:!0,solid_component:HorizontalListComponent_default,property_applications:[new property_applications_default.PaddingFields,new property_applications_default.ResponsiveElement,new property_applications_default.Dimensions,new property_applications_default.Opacity,new property_applications_default.Background,new property_applications_default.Border],change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},get_min_width(){return 0},get_states(element){return["list_data"]},is_restricted_container:!0,generate_default_children(){return{[appquery_default.uid()]:{id:appquery_default.uid(),type:"HorizontalListItem",default_name:"List Item",properties:{container_layout:"column",use_gap:"true",row_gap:4,single_width:!0,min_width_css:"160px",border_style:"solid",border_roundness:10,border_color:"#999999",padding_top:12,padding_bottom:16,padding_left:16,padding_right:16},elements:{[appquery_default.uid()]:{id:appquery_default.uid(),type:"Text",properties:{text:"List Item",fit_height:!0,font_size:16,line_height:1.5},default_name:"Text"},[appquery_default.uid()]:{id:appquery_default.uid(),type:"Text",properties:{text:"This is an example of some supporting text. You can add/delete elements to design this card however you\u2019d like.",fit_height:!0,line_height:1.3,font_color:"#999999",font_size:12},default_name:"Text"}}}}},register(instance4){instance4.state("list_data",()=>evaluate_property(instance4,"data_source"))},standard_container_layout:"row",get_html(instance4){return"<div></div>"},initialize(instance4){},draws_own_children(){return!0},is_input:!1,contains_group_data:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},events:[],add_an_invisible_div_on_the_top:!1,get_state_value,add_specific_messages});make_element("SectionHeader",{display:"Section Header",...getListIteminfo(),contains_group_data:!0,solid_component:SectionHeaderComponent_default,only_fixed_or_fit_height:!0,no_width:!0});make_element("VerticalListItem",{display:"List Item",...getListIteminfo(),contains_group_data:!1,solid_component:VerticalListItemComponent_default,only_fixed_or_fit_height:!0,no_width:!0,field_names:{allow_leading_full_swipe:{default:!0},allow_trailing_full_swipe:{default:!0}},elements_tree_subsection_sort_fn(element){if(element.type()==="SwipeAction")return element.get_static_property("swipe_action_side")==="leading"?{label:"Leading Swipe Actions",sort_property:"order",order:0}:{label:"Trailing Swipe Actions",sort_property:"order",reverse_sort:!0,order:-1}}});make_element("HorizontalListItem",{display:"List Item",...getListIteminfo(),contains_group_data:!1,solid_component:HorizontalListItemComponent_default,only_fixed_or_fill_height:!0,only_fixed_or_fit_width:!0});function getListIteminfo(){return{condition(root2){var _ref5,_root$is_mobile4;return(_ref5=mobileEnabled()&&(root2==null||(_root$is_mobile4=root2.is_mobile)==null?void 0:_root$is_mobile4.call(root2)))!=null?_ref5:!1},field_names:{...start_workflow_field_names},uses_css_responsive:!0,change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},cant_delete(){return!0},is_pseudo:!0,is_repeating(){return!0},not_draggable(){return!0},get_min_width(){return 0},get_html(instance4){return"<div></div>"},initialize(instance4){},is_input:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},events:["ButtonClicked","ElementPressed"],add_an_invisible_div_on_the_top:!1,property_applications:[new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.Dimensions,new property_applications_default.PaddingFields,new property_applications_default.Opacity,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer],register(instance4){instance4.repeating_layout_type="List"}}}init_define_process_env();init_shim();init_u2();init_property_applications();init_lib();init_page_state();init_btypes();init_element_eval();init_element_props();init_elements();make_element("MultiLineInput",{display:"Multiline Input",category:"input forms",glyph_id:"multiline_input",list_order:2,keyboard_shortcut:null,defaults:{font_size:14,font_color:"#3D3D3D",background_style:"bgcolor",border_style:"solid",border_width:1,border_color:"#BDBDBD",border_roundness:3,border_style_top:"solid",border_width_top:1,border_color_top:"#BDBDBD",border_roundness_top:3,border_style_left:"solid",border_width_left:1,border_color_left:"#BDBDBD",border_roundness_left:3,border_style_bottom:"solid",border_width_bottom:1,border_color_bottom:"#BDBDBD",border_roundness_bottom:3,border_style_right:"solid",border_width_right:1,border_color_right:"#BDBDBD",border_roundness_right:3,padding_horizontal:4,padding_vertical:4,width:300,height:100},properties_for_mobile:{min_width_css:"0px"},updated_default_sizing:{width:226},default_states:void 0,field_names:extend({placeholder:{default:"Type here..."},content:{},stretch_to_fit:{default:!1,no_states:!0}},additional_field_names_for_text_inputs),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Font,new property_applications_default.FontSpacing,new property_applications_default.Padding,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.PlaceholderColor,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,can_fit_height:!0,get_html(instance4){return"<textarea></textarea>"},get_min_width(element){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas();reset_input_div(canvas),canvas.focus(()=>{input_focused(!0)}),canvas.on("blur",()=>{input_focused(!1)}),canvas.attr("data-gramm_editor","false"),instance4.run_mode()||(canvas.attr("readonly","true"),canvas[0].style.resize="none"),set_character_limit_on_input(instance4),instance4.autorun(()=>{assign_enter_handler_in_input(instance4,!0)});let autosize_enabled=!1,old_style="";function update_autosize(){window.optional_modules.autosize.update(canvas),old_style=canvas[0].style.cssText}instance4.autorun(()=>{canvas.attr("placeholder",evaluate_property(instance4,"placeholder")),update_autosize()});let override_disable=u_exports2.Box(0);if(input_change_autorun(instance4,val=>{instance4.state("is_focused")||(canvas.val(val!=null?val:""),autosize_enabled&&(canvas[0].disabled?(override_disable(override_disable.dangerously_peek()+1),instance4.setTimeout(()=>{update_autosize(),override_disable(override_disable.dangerously_peek()-1)},5)):update_autosize()))}),instance4.run_mode()){instance4.on_message("set_focus",()=>canvas.focus()),assign_change_keyup_handlers(instance4,()=>instance4.get_canvas().val()),instance4.autorun(()=>{override_disable()>0?canvas[0].disabled=!1:canvas[0].disabled=evaluate_property(instance4,"disabled")}),switch_disabled_or_not(instance4);let mutation_observer=null;instance4.autorun(()=>{is_fitting_height(instance4)?(autosize_enabled||(lib_default().bubble_version()>=8&&canvas.attr("rows",1),window.optional_modules.autosize(canvas),instance4.wait_for_visible(update_autosize),mutation_observer=new MutationObserver(()=>{old_style!==canvas[0].style.cssText&&update_autosize()}),mutation_observer.observe(canvas[0],{attributes:!0,attributeFilter:["style"]}),autosize_enabled=!0),instance4.autorun(()=>{instance4.current_width(),update_autosize()})):autosize_enabled&&(window.optional_modules.autosize.destroy(canvas),mutation_observer.disconnect(),autosize_enabled=!1)}),instance4.on_destroy(()=>{var _mutation_observer;window.optional_modules.autosize.destroy(canvas),(_mutation_observer=mutation_observer)==null||_mutation_observer.disconnect()}),canvas.on("blur",()=>{instance4.setTimeout(()=>{update_autosize()},20)})}})},content_validated(val,instance4){return!(!val&&evaluate_property(instance4,"mandatory"))},get_starting_content(instance4){if(instance4.get_static_property("auto_binding")){if(instance4.run_mode())return get_input_autobind_thing_field(instance4);{let{type}=get_input_autobind_thing(instance4,!0),bind_field=instance4.get_static_property("bind_field");if(type==null||bind_field==null)return"Parent Thing's field";let custom_type2=get5(type).custom_type();if(custom_type2==null)return"Cannot autobind on parent Thing";let field=custom_type2.field(bind_field);return`Parent ${custom_type2.display()}'s ${field.display()}`}}return evaluate_property(instance4,"content")},get_state_value(element,name){if(name==="value")return"text"},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!0,contains_group_data:!1,jquery_plugins(){return["jquery_plugins/autosize.min"]},only_send_to_client_in_runmode:!0});init_define_process_env();init_shim();var import_web_dom_collections_iterator234=__toESM(require_web_dom_collections_iterator());init_color_tokens();init_element_eval();init_page_state();init_font_tokens();init_u2();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator232=__toESM(require_web_dom_collections_iterator());init_solid();init_web();init_mobile();init_server_rendering();init_element_eval();init_page_state();init_font_tokens();init_lib();init_b_window();init_color();init_mode_check();init_image_utils();init_element_styles();init_properties();var _tmpl$29=template("<div>"),BODY_SELECTOR=`${AT_ROOT} body`,propertiesToLoad=["background_style","bgcolor","background_gradient_direction","background_gradient_from","background_gradient_mid","background_gradient_to","background_image","center_background","crop_responsive","background_size_cover","repeat_background_vertical","repeat_background_horizontal","background_color_if_empty_image","background_gradient_style","background_radial_gradient_shape","background_radial_gradient_size","background_radial_gradient_xpos","background_radial_gradient_ypos","background_gradient_custom_angle"],backdropBackgroundData=instance4=>{let props={};for(let p of propertiesToLoad)props[p]=evaluate_property(instance4,`backdrop_${p}`);return instance4.run_mode()&&(props.backdrop_paralax_speed=evaluate_property(instance4,"backdrop_paralax_speed"),props.backdrop_image_paralax=evaluate_property(instance4,"backdrop_image_paralax")),{is_backdrop:!0,...props}},createRepeatKey=data=>data.repeat_background_vertical&&data.repeat_background_horizontal?"repeat":data.repeat_background_vertical?"repeat-y":data.repeat_background_horizontal?"repeat-x":"no-repeat",isLinear=data=>[null,void 0,"linear"].includes(data.background_gradient_style),computeGradientValues=data=>{var _data$background_grad,_data$background_grad2;let c1,c2,msDirection;c1=(_data$background_grad=data.background_gradient_from)!=null?_data$background_grad:"",c2=(_data$background_grad2=data.background_gradient_to)!=null?_data$background_grad2:"";let direction;if(isLinear(data))if(data.background_gradient_direction==="custom"){var _data$background_grad3;direction=`${(_data$background_grad3=data.background_gradient_custom_angle)!=null?_data$background_grad3:45}deg`}else{var _data$background_grad4;if(direction=(_data$background_grad4=data.background_gradient_direction)!=null?_data$background_grad4:"top",direction==="top"||direction==="bottom"){if(msDirection=0,direction==="bottom"){let aux=c1;c1=c2,c2=aux,direction="top"}}else if((direction==="left"||direction==="right")&&(msDirection=1,direction==="right")){let aux=c1;c1=c2,c2=aux,direction="left"}}return[c1,c2,msDirection,direction]},PageComponent_default=createElement2(PageComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:{title:new Property(instance4=>evaluate_property(instance4,"title"),{mayContainDynamic:!0}),backdropBackgroundData:new Property(instance4=>backdropBackgroundData(instance4),{fallback:{}}),...containerProperties(shouldAddWrapper)},styles:[new Style(instance4=>{let data=backdropBackgroundData(instance4);if(data.background_style!=="video"){let options={};return data.background_style==="bgcolor"?options["background-color"]=data.bgcolor:data.background_style==="none"?options["background-color"]="transparent":data.background_style==="image"&&(data.backdrop_image_paralax||(options["background-color"]=data.background_color_if_empty_image),data.background_image&&(options["background-repeat"]=createRepeatKey(data),data.center_background?data.is_backdrop?options["background-position"]="center top":options["background-position"]="center":options["background-position"]="",data.background_size_cover||data.crop_responsive?(options["background-size"]="cover",options["-webkit-background-size"]="cover",options["-moz-background-size"]="cover",options["-o-background-size"]="cover"):options["background-size"]="",data.backdrop_image_paralax&&(is_on_mobile_or_tablet()||(options["background-image"]="none")))),options}else return{}}),new Style(instance4=>{let data=backdropBackgroundData(instance4);if(data.background_style==="gradient"){let[c1,c2,msDirection,direction]=computeGradientValues(data),cMid=data.background_gradient_mid,code,cssLine,browserPrefixes=["-webkit-","-moz-","-o-","-ms-",""];if(cMid?code=`${c1} 0%, ${cMid} 50%, ${c2} 100%`:code=`${c1} 0%, ${c2} 100%`,isLinear(data))cssLine=`linear-gradient(${direction}, ${code})`;else{var _data$background_radi,_data$background_radi2,_data$background_radi3,_data$background_radi4;browserPrefixes=["","-webkit-","-moz-","-o-","-ms-"],(_data$background_radi=data.background_radial_gradient_shape)!=null||(data.background_radial_gradient_shape="ellipse"),(_data$background_radi2=data.background_radial_gradient_size)!=null||(data.background_radial_gradient_size="farthest-corner"),(_data$background_radi3=data.background_radial_gradient_xpos)!=null||(data.background_radial_gradient_xpos=10),(_data$background_radi4=data.background_radial_gradient_ypos)!=null||(data.background_radial_gradient_ypos=10),cssLine=`radial-gradient(${data.background_radial_gradient_shape} ${data.background_radial_gradient_size} at ${data.background_radial_gradient_xpos}% ${data.background_radial_gradient_ypos}%, ${code})`}let bgs=[];for(let i of browserPrefixes)bgs.push(i+cssLine);bgs.push(c1);let msC1=RGBA_to_ARGB(c1),msC2=RGBA_to_ARGB(c2);return{background:bgs,filter:`progid:DXImageTransform.Microsoft.gradient( startColorstr='${msC1}', endColorstr='${msC2}',GradientType=${msDirection})`}}else return{}}),new Style(instance4=>{let root_max_width=element.root_max_width(),root_max_height=element.root_max_height(),styling={"min-width":`${element.root_min_width()}px`,"max-width":root_max_width!=null?`${root_max_width}px`:"","min-height":`${element.root_min_height()}px`,"max-height":root_max_height!=null?`${root_max_height}px`:""};if(instance4.run_mode()){let minPageHeight=instance4.element.root_min_height();Object.assign(styling,{width:instance4.element.container_layout()==="fixed"?`${instance4.element.get_width()}px`:"100%","min-height":[`max(${minPageHeight}px, 100%)`,"100%"],"margin-right":"auto","margin-left":"auto",position:"relative","z-index":2}),instance4.element.container_layout()==="column"&&(styling.height="max-content",styling["flex-shrink"]=0)}else styling.width=`${lib_default.or_throw().visual_edit.root_width()}px`;return styling},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>{if(instance4.run_mode()){let styling={height:"100%"};return instance4.element.container_layout()==="column"&&(styling.display="flex",styling["flex-direction"]="column"),styling}else return{}},{noWaitVisible:!0,selector:BODY_SELECTOR}),tokenStyling(),...containerStyling(shouldAddWrapper),...basicStyling(element)]}});function PageComponent(props){var _useContext;let instance4=props.instance,FixedElements=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.pageFixedElements,[backgroundImageSrc,setBackgroundImageSrc]=createSignal(""),applyImageSrc=(canvas,src,instance5)=>{canvas.data("_last_downloaded_image",src),download_image(src,instance5,()=>{src===canvas.data("_last_downloaded_image")&&setBackgroundImageSrc(`url("${src}")`)}),canvas.css("background-image",backgroundImageSrc())};onMount(()=>{instance4.run_mode()&&(instance4.register_workflows(instance4.element.events()),page_width($(window).width()),$(window).on("resize",()=>{page_width($(window).width())}),page_current_scroll_position($(window).scrollTop()),$(window).on("scroll wheel touchmove",()=>{page_current_scroll_position($(window).scrollTop())}))}),createEffect(()=>{instance4.run_mode()&&props.title&&(window.document.title=props.title)});let conditionalStyling=()=>{let style2={};if(is_debug_mode())instance4.element.container_layout()==="fixed"?style2.height=`${instance4.element.get_height()+300}px`:style2["padding-bottom"]="300px";else if(instance4.edit_mode()&&instance4.element.is_mobile()){let overlay_insets=getOverlayInsets(instance4.element),show_safe_area=evaluate_property(instance4,"show_safe_area"),padding_bottom=0;overlay_insets.bottom!=null?padding_bottom=overlay_insets.bottom:show_safe_area&&(padding_bottom=SAFE_AREA_BOTTOM),style2["padding-bottom"]=`${padding_bottom}px`;let padding_top=0;overlay_insets.top!=null?padding_top=overlay_insets.top:show_safe_area&&(padding_top=SAFE_AREA_TOP),style2["padding-top"]=`${padding_top}px`}return style2},backgroundVideo=createWatcher(()=>evaluate_property(instance4,"backdrop_video_source")),imageFallback=createWatcher(()=>evaluate_property(instance4,"backdrop_video_image_fallback")),BV;return createEffect(()=>{if(props.backdropBackgroundData.background_style==="video")if(instance4.run_mode()&&!is_on_mobile_or_tablet()){BV||(BV=new $.BigVideo,BV.init()),$("#big-video-wrap").css("background","black");let videoContainer=$("#big-video-wrap video");videoContainer.attr("muted","");let videoUrl=optimize_image(backgroundVideo(),void 0,void 0,void 0,!0);Promise.resolve().then(()=>{BV.show(videoUrl,{forceAutoplay:!0,doLoop:!0,ambient:!0})});let ar=instance4.autorun(function(){evaluate_property(instance4,"backdrop_video_silence")?(videoContainer.attr("muted",""),BV.getPlayer().muted(!0)):(BV.getPlayer().volume(.8),videoContainer.removeAttr("muted"),BV.getPlayer().muted(!1))});onCleanup(()=>{ar.destroy()})}else{let backgroundDiv=instance4.get_canvas();backgroundDiv.css("background","black"),imageFallback()&&backgroundDiv.css({"background-image":`url(${optimize_image(imageFallback(),backgroundDiv.width())})`,"background-position":"center top"})}}),createEffect(()=>{let canvas=instance4.canvas,element=instance4.element;if(props.backdropBackgroundData.background_style==="image"&&props.backdropBackgroundData.background_image){if(props.backdropBackgroundData.background_size_cover){if(!props.backdropBackgroundData.backdrop_image_paralax){let src=optimize_image(props.backdropBackgroundData.background_image,canvas.width());applyImageSrc(canvas,src,instance4)}}else if(props.backdropBackgroundData.crop_responsive){if(instance4.run_mode()){let toLoad,lastSource,ar=instance4.autorun(function(){let width2=evaluate_property(instance4,"width"),height2=evaluate_property(instance4,"height"),currentImage=evaluate_property(instance4,"backdrop_background_image"),isFirstLoadResponsiveMode=instance4.responsive_mode()&&width2===element.get_width();function do_it2(){let src=optimize_image(currentImage,width2,height2,{fit:"crop"});applyImageSrc(canvas,src,instance4)}toLoad=optimize_image(currentImage,width2,height2),currentImage===lastSource&&!downloaded_images[toLoad]||isFirstLoadResponsiveMode?instance4.setTimeout(()=>{toLoad===optimize_image(currentImage,width2,height2)&&do_it2()},300):(lastSource=currentImage,do_it2())});onCleanup(()=>{ar.destroy()})}}else if(!props.backdropBackgroundData.backdrop_image_paralax){let src=optimize_image(props.backdropBackgroundData.background_image);applyImageSrc(canvas,src,instance4)}if(props.backdropBackgroundData.backdrop_image_paralax)if(is_on_mobile_or_tablet())applyImageSrc(canvas,optimize_image(props.backdropBackgroundData.background_image),instance4);else{let backgroundSrc=optimize_image(props.backdropBackgroundData.background_image,canvas.width());canvas.parallax({imageSrc:backgroundSrc,speed:props.backdropBackgroundData.backdrop_paralax_speed}),$(".parallax-slider").attr({src:backgroundSrc})}}}),onMount(()=>{instance4.run_mode()&&$("html, body").css("height","100%")}),instance4.edit_mode()&&createAutorun(()=>{load_font_tokens_default(),load_font_tokens_user()}),createEffect(prev=>{let toApply=props.childStyles[BODY_SELECTOR];return style(document.body,toApply,prev),toApply}),createEffect(prev=>{let toApply=props.childStyles[AT_ROOT];return style(document.documentElement,toApply,prev),toApply}),(()=>{var _el$=_tmpl$29();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,mergeProps(props,{get children(){return props.children}})),null),insert(_el$,FixedElements&&createComponent(FixedElements,{get instance(){return props.instance}}),null),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,...conditionalStyling()},_v$3={...props.classList,[props.containerClass]:!0,"main-page":!0,"page-element":instance4.edit_mode()};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}init_image_utils();init_define_process_env();init_shim();var import_web_dom_collections_iterator233=__toESM(require_web_dom_collections_iterator());init_colors();init_custom_elements();init_btype_ids();init_btypes();init_color_tokens();init_eval_node_state();init_types2();init_evaluate();init_LiveExpression();init_shrink();init_lib();init_logger();init_color();init_b_string();function normalizeColor(color){var _color$includes,_color$includes2;if((_color$includes=color.includes)!=null&&_color$includes.call(color,VAR_IDENTIFIER)){let token_variant=variable_to_token_variant(color);if(token_variant!=null){let{token_set,variant}=token_variant,{rgba}=token_variant_to_properties(token_set,variant);return rgb_to_hex(rgba).code.toUpperCase()}}else if((_color$includes2=color.includes)!=null&&_color$includes2.call(color,"rgb"))return rgb_to_hex(color).code.toUpperCase();return color}function customParameterMessages(definition,options){var _definition$property$,_definition$property$2,_definition$property;let entries=(_definition$property$=(_definition$property$2=(_definition$property=definition.property("parameters")).entries)==null?void 0:_definition$property$2.call(_definition$property))!=null?_definition$property$:[],messages={};for(let entry of entries){var _property$btype_id;let property2=entry.raw(),ret_btype=(_property$btype_id=property2.btype_id)!=null?_property$btype_id:property2.editor_type==="Checkbox"?"boolean":"text";property2.is_list&&(ret_btype=list_type(ret_btype));let param_key=`${CUSTOM_PROP_IDENTIFIER}${property2.param_id}`;messages[param_key]={description:()=>"'s "+entry.raw().param_name,is_client_state(){return!0},section:"Properties",ret_btype,get caption(){if(!(options!=null&&options.isDefinition))return;let caption=entry.property("default_value").get_tree_display();return caption&&property2.editor_type==="Color"&&(caption=normalizeColor(caption)),caption},fn(a){var _ref;let value=a.state(param_key);return options!=null&&options.isDefinition?(_ref=value!=null?value:a.run_mode()?null:evaluate(shrink_object(property2.default_value),a.prop_eval_context())[0])!=null?_ref:get5(ret_btype).get_bubble_null():value},filter_context(context){let parent=context.node,custom_param_name="";for(;parent!=null;){if(options!=null&&options.isDefinition){var _parent$json$parent,_parent$json$parent2;if(((_parent$json$parent=parent.json.parent())==null?void 0:_parent$json$parent.child("param_id").get())!=null&&((_parent$json$parent2=parent.json.parent())==null?void 0:_parent$json$parent2.child("param_name").get())!=null){var _parent$json$parent3;custom_param_name=`${CUSTOM_PROP_IDENTIFIER}${(_parent$json$parent3=parent.json.parent())==null?void 0:_parent$json$parent3.child("param_id").get()}`;break}}else if(parent.node_name().includes(CUSTOM_PROP_IDENTIFIER)){custom_param_name=parent.node_name();break}parent=parent.parent_expression()}return custom_param_name!==param_key},filter_context_new(context){return context.custom_param_name!==param_key}}}return messages}function registerCustomParameterStates(instance4,definition,evaluateParameter){var _definition$property2,_definition$property3;(_definition$property2=definition.property("parameters"))==null||(_definition$property3=_definition$property2.entries)==null||_definition$property3.call(_definition$property2).forEach(propertyNode=>{let property2=propertyNode.raw(),check_for_circulars=!1;instance4.state(`${CUSTOM_PROP_IDENTIFIER}${property2.param_id}`,instance5=>{if(check_for_circulars)return owner_error(`Property ${property2.param_name} contains circular reference`,{element_name:instance5.element.get_name(),element_id:instance5.element_id(),prop_name:`${CUSTOM_PROP_IDENTIFIER}${property2.param_id}`}),null;try{check_for_circulars=!0;let context=instance5.prop_eval_context();return with_eval_node(propertyNode,()=>{var _evaluateParameter;return(_evaluateParameter=evaluateParameter==null?void 0:evaluateParameter(property2.param_id))!=null?_evaluateParameter:evaluate(shrink_object(property2.default_value),context)[0]})}finally{check_for_circulars=!1}})})}make_element("Page",{can_have_children(){return!0},get_navigation_elements(element){let elements2=[];if(element.is_mobile()){let app_bar=getAppBar(element);app_bar!=null&&elements2.push(app_bar);let global_tab_bar=getPageTabBar(element);global_tab_bar!=null&&elements2.push(global_tab_bar)}return elements2},get_children_canvas(instance4){return instance4.get_canvas()},is_restricted_container(element){let view_type=element.get_static_property("view_type");return view_type==="vertical_list"||view_type==="section_list"},field_names:{page_item_type:{no_states:!0},readable_field:{no_states:!0},title:{default:"My Page"},native_app:{no_states:!0},native_app_name:{no_states:!0,default:"App"},mobile_page:{no_states:!0},delete_page:{no_states:!0},meta_title:{in_pageservice:!0,no_states:!0},meta_description:{in_pageservice:!0,no_states:!0},meta_image:{in_pageservice:!0,no_states:!0},backdrop_background_style:{default:"bgcolor",no_states:!0,in_style:!0},backdrop_bgcolor:{default:"#FFFFFF",in_style:!0},backdrop_background_gradient_direction:{default:"top",in_style:!0},backdrop_background_gradient_custom_angle:{default:45,in_style:!0},backdrop_background_gradient_from:{default:"#FFFFFF",in_style:!0},backdrop_background_gradient_to:{default:"#AAAAAA",in_style:!0},backdrop_background_gradient_mid:{in_style:!0,optional:!0},backdrop_background_gradient_style:{in_style:!0,default:"linear"},backdrop_background_radial_gradient_shape:{in_style:!0,default:"ellipse"},backdrop_background_radial_gradient_size:{in_style:!0,default:"farthest-corner"},backdrop_background_radial_gradient_xpos:{in_style:!0,default:10},backdrop_background_radial_gradient_ypos:{in_style:!0,default:10},backdrop_background_image:{in_style:!0},backdrop_center_background:{in_style:!0},backdrop_background_size_cover:{in_style:!0},backdrop_repeat_background_vertical:{in_style:!0},backdrop_repeat_background_horizontal:{in_style:!0},backdrop_image_paralax:{no_states:!0,default:!1,in_style:!0},backdrop_paralax_speed:{no_states:!0,default:.2,in_style:!0},backdrop_background_color_if_empty_image:{default:"rgba(255, 255, 255, 0.0)",no_states:!0,in_style:!0},backdrop_video_source:{default:"http://vjs.zencdn.net/v/oceans.mp4",in_style:!0},backdrop_video_image_fallback:{in_style:!0},backdrop_video_silence:{default:!0,in_style:!0},stripes:{no_states:!0,in_style:!0},preset_width:{no_states:!0,default:"custom",in_style:!1},html_header:{no_states:!0,in_pageservice:!0},new_responsive:{no_states:!0},responsive_version:{no_states:!0},element_version:{default:0,no_states:!0},upgrade_responsive_version:{no_states:!0},fixed_width:{no_states:!0,default:!1},min_width:{default:0,no_states:!0},backdrop_crop_responsive:{no_states:!0},page_folder:{optional:!0,no_states:!0,only_edit_mode:!0},tz_type:{no_states:!0},tz_static:{no_states:!0},tz_type_overridden:{no_states:!0},tz_static_overridden:{no_states:!0},show_safe_area:{default:!0},show_status_bar:{default:!0},show_app_bar:{no_states:!0,only_edit_mode:!0},show_tab_bar:{no_states:!0,default:!1},include_as_tab_item:{no_states:!0,only_edit_mode:!0},parameters:{only_edit_mode:!0},view_type:{no_states:!0,default:"scrollable"}},always_visible:!0,uses_css_responsive:!0,solid_component:PageComponent_default,attach_to_body:()=>!1,property_applications:[new property_applications_default.Padding,new property_applications_default.PaddingFields({disable_vertical_padding:!0}),new property_applications_default.RootSizing,new property_applications_default.ShortDimensions,new property_applications_default.ResponsiveContainer,new property_applications_default.Opacity],get_html(instance4){return'<div class="main-page"></div>'},position_canvas(to_position,instance4){if(instance4.run_mode()){property_applications_default.apply_css_style(to_position,{width:instance4.element.container_layout()==="fixed"?`${instance4.element.get_width()}px`:"100%","margin-right":"auto","margin-left":"auto",position:"relative","z-index":2}),$("html, body").css("height","100%"),$(window.document.body).append(to_position);let min_page_height=instance4.element.root_min_height();to_position[0].style["min-height"]=`max(${min_page_height}px, 100%)`,instance4.element.container_layout()==="column"&&($("body").css({display:"flex","flex-direction":"column"}),to_position.css({height:"max-content","flex-shrink":0}))}else $(".canvas").append(to_position)},transition_properties:{backdrop_background_style:"background"},get_min_width(){return 0},not_max_adjustable:!0,can_register_workflows(){return u_exports2.FakeKey()},register(instance4){instance4.run_mode()&&instance4.element.is_mobile()&&registerCustomParameterStates(instance4,instance4.element)},initialize(instance4){instance4.run_mode()&&instance4.register_workflows(instance4.element.events()),on_property_change(instance4,"title",title=>{instance4.edit_mode()?$(".edit-date").text(title):instance4.run_mode()&&$(document).ready(()=>window.document.title=title)});function set_preset_width(instance5,width2){let preset_width=instance5.get_static_property("preset_width");for(let preset_name in void 0){let data=(void 0)[preset_name];if(width2===data.width){preset_width!==preset_name&&instance5.element.set_property("preset_width",preset_name);return}}preset_width!=="custom"&&instance5.element.set_property("preset_width","custom")}let root2=document.documentElement;instance4.edit_mode()&&(instance4.autorun(()=>{load_font_tokens_default(),load_font_tokens_user()}),on_property_change(instance4,"preset_width",val=>{(void 0)[val].width!=null&&(instance4.element.set_property("width",(void 0)[val].width),instance4.element.set_property("default_width",(void 0)[val].width),instance4.element.commit_merge())}),on_property_change(instance4,["width","default_width"],_ref=>{let{width:width2,default_width}=_ref;instance4.element.get_responsive_version()<1||instance4.element.container_layout()==="fixed"?set_preset_width(instance4,width2):set_preset_width(instance4,default_width),instance4.element.commit_merge()})),instance4.autorun(()=>{let object2=default_color_tokens_to_property();for(let property2 in object2){let value=object2[property2];root2.style.setProperty(property2,value)}}),instance4.autorun(()=>{let object2=user_color_tokens_to_property();for(let property2 in object2){let value=object2[property2];root2.style.setProperty(property2,value)}}),instance4.autorun(()=>{let object2=default_font_tokens_to_property();for(let property2 in object2){let value=object2[property2];root2.style.setProperty(property2,value)}}),instance4.autorun(()=>{let object2=user_font_tokens_to_property();for(let property2 in object2){let value=object2[property2];root2.style.setProperty(property2,value)}}),instance4.run_mode()&&(page_width($(window).width()),$(window).on("resize",()=>page_width($(window).width())),page_current_scroll_position($(window).scrollTop()),$(window).on("scroll wheel touchmove",()=>page_current_scroll_position($(window).scrollTop())));let properties_to_load=["background_style","bgcolor","background_gradient_direction","background_gradient_from","background_gradient_mid","background_gradient_to","background_image","center_background","background_size_cover","repeat_background_vertical","repeat_background_horizontal","background_color_if_empty_image","background_gradient_style","background_radial_gradient_shape","background_radial_gradient_size","background_radial_gradient_xpos","background_radial_gradient_ypos","background_gradient_custom_angle"];function style_page(){let background_div=instance4.get_canvas();instance4.thumbnail_mode()?background_div.css({"z-index":1,position:"absolute",top:0,width:instance4.element.get_width(),height:instance4.element.get_height(),overflow:"hidden"}):property_applications_default.apply_css_style(background_div,{"z-index":1});let BV=null;pre_cache(instance4,properties_to_load.map(property2=>`backdrop_${property2}`)),pre_cache(instance4,["backdrop_paralax_speed","backdrop_image_paralax"]),instance4.autorun(()=>{let prop,backdrop_background_data={is_backdrop:!0};for(prop of properties_to_load)backdrop_background_data[prop]=evaluate_property(instance4,"backdrop_"+prop);if(instance4.run_mode())for(prop of["backdrop_paralax_speed","backdrop_image_paralax"])backdrop_background_data[prop]=evaluate_property(instance4,prop);if(backdrop_background_data.background_style==="video")if(instance4.run_mode()&&!is_on_mobile_or_tablet()){BV==null&&(BV=new $.BigVideo,BV.init()),$("#big-video-wrap").css("background","black");let video_container=$("#big-video-wrap video");video_container.attr("muted","");let video_url=optimize_image(evaluate_property(instance4,"backdrop_video_source"),void 0,void 0,void 0,!0);BV.show(video_url,{forceAutoplay:!0,doLoop:!0,ambient:!0}),instance4.autorun(()=>evaluate_property(instance4,"backdrop_video_silence")?(video_container.attr("muted",""),BV.getPlayer().muted(!0)):(BV.getPlayer().volume(.8),video_container.removeAttr("muted"),BV.getPlayer().muted(!1)))}else{background_div.css("background","black");let image_fallback=evaluate_property(instance4,"backdrop_video_image_fallback");image_fallback&&background_div.css({"background-image":`url(${optimize_image(image_fallback,background_div.width())})`,"background-position":"center top"})}else new property_applications_default.Background()._apply(backdrop_background_data,background_div)})}instance4.edit_mode()?(pre_cache(instance4,properties_to_load),instance4.autorun(()=>{instance4.autorun(()=>{if(!instance4.is_destroyed()){let props={};for(let prop of properties_to_load)props[prop]=evaluate_property(instance4,prop);new property_applications_default.Background()._apply(props,instance4.get_canvas())}}),style_page()})):instance4.thumbnail_mode()?instance4.autorun(style_page):style_page()},is_input:!1,contains_group_data:!1,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,get_messages(){return["push_page","set_view_props","navigate_to_tab","go_back","scroll_to_element","open_url","show_update_app_view","request_push_notification_permissions","push_notification_permissions_result"]},get_private_messages(){return["movement_in_stripe","child_movement","announce_page_event"]},add_specific_messages(messages,element){extend(messages,customParameterMessages(element,{isDefinition:!0}))},not_draggable(){return!0}});init_define_process_env();init_shim();init_u2();init_logger();init_property_applications();init_runmode();init_workflow();init_element_utils();init_image_utils();init_element_eval();init_lib();var _Lib;make_element("PictureInput",{display:"Picture Uploader",category:"input forms",glyph_id:"picture_uploader",list_order:9,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{font_size:14,bold:!0,background_style:"bgcolor",border_style:"solid",border_width:1,border_roundness:0,border_color:"#A6A6A6",border_style_top:"solid",border_width_top:1,border_roundness_top:0,border_color_top:"#A6A6A6",border_style_left:"solid",border_width_left:1,border_roundness_left:0,border_color_left:"#A6A6A6",border_style_bottom:"solid",border_width_bottom:1,border_roundness_bottom:0,border_color_bottom:"#A6A6A6",border_style_right:"solid",border_width_right:1,border_roundness_right:0,border_color_right:"#A6A6A6",padding_horizontal:0,padding_vertical:0,bgcolor:"#EBEBEB",font_alignment:"center",width:130,height:140},updated_default_sizing:{width:150,height:150},default_states:void 0,field_names:extend({src:{},placeholder:{default:"Click to upload an image"},mandatory:{},private:{no_states:!0},attach_to:{},service:{no_states:!0},destination:{},keep_proportion_resize:{no_states:!0},limit_image_width:{no_states:!0}},get_disabled_field_name,get_auto_binding_field_names),property_applications:[new property_applications_default.Font(".button_for_file_uploader"),new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.Background(".button_for_file_uploader"),new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.FontSpacing(".button_for_file_uploader",["line_height"]),new property_applications_default.PaddingFields(((_Lib=lib_default())==null?void 0:_Lib.app().get_public_setting("bubble_version"))<18?{}:{selector:"button,img"}),new property_applications_default.Opacity],get_html(instance4){return"<div></div>"},get_min_width(){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{var _instance$element$roo;show_message_for_ios_8_upload_bug(),instance4.state("src_version",0);let IZDX=5,canvas=instance4.get_canvas(),img2=img(void 0,canvas),img_css={width:"100%",height:"100%","z-index":IZDX,position:"absolute"};property_applications_default.apply_css_style(img2,img_css),((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())>0&&img2.css({"object-fit":"contain"}),canvas.append(img2);let placeholder_div=$('<button class="button_for_file_uploader"></button>');reset_input_div(placeholder_div);let placeholder_css={"z-index":IZDX-1,position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%"};property_applications_default.apply_css_style(placeholder_div,placeholder_css),canvas.append(placeholder_div),on_property_change(instance4,"width",val=>{val<80&&property_applications_default.apply_css_style(placeholder_div,{padding:0})});function resize_url(url9){return url9?optimize_image(url9,evaluate_property(instance4,"width"),evaluate_property(instance4,"height")):null}let input2=null;function display_url(url9){if(url9){var _instance$element$roo2,_input2;((_instance$element$roo2=instance4.element.root())==null?void 0:_instance$element$roo2.get_responsive_version())>0?download_image(url9,instance4,url_or_transparent_image=>{img2[0].src=url_or_transparent_image}):instance4.autorun(()=>{let src_version=u_exports2.autorun_top(()=>instance4.state("src_version"));src_version+=1,instance4.state("src_version",src_version),rescale_image({src:url9,img:img2,instance:instance4,ref_version:src_version,cb(){img2[0].src=url9}})});let url_parts=url9.split("%2F"),filename=url_parts[-1+url_parts.length].split("?w=")[0];(_input2=input2)==null||_input2.attr("title",filename),placeholder_div.css("opacity",0),img2.css("opacity",1)}else{var _input;img2[0].src=transparent_image(),placeholder_div.css("opacity",1),img2.css("opacity",0),(_input=input2)==null||_input.attr("title",null)}}if(instance4.run_mode()){let get_additional_data2=function(cb){u_exports2.run_once(30,()=>process_upload_security(instance4),(err,data)=>{err?cb(err):cb(null,data)})},cb_start2=function(){instance4.state("loading",!0)},cb_fail2=function(err){core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT,cb(err2){err2&&window.alert(human_friendly(err2)),instance4.state("loading",!1)}})};var get_additional_data=get_additional_data2,cb_start=cb_start2,cb_fail=cb_fail2,_instance$element$roo3;canvas.addClass(CLICKABLE_ELEMENT),input2=$('<input type="file" accept="image/*"></input>'),canvas.append(input2),property_applications_default.apply_css_style(input2,{opacity:0,position:"absolute","z-index":1+img2.css("z-index"),left:"0px",width:"100%",height:"100%","font-size":0}),MakeImageUploader({input:input2,get_additional_data:get_additional_data2,cb_success:url9=>{var _input$0$files$0$size,_input$0$files$;instance4.state("file_size",(_input$0$files$0$size=(_input$0$files$=input2[0].files[0])==null?void 0:_input$0$files$.size)!=null?_input$0$files$0$size:null),instance4.state("loading",!1),display_url(resize_url(url9)),instance4.message("user_submit",url9),input2[0].value=null},cb_start:cb_start2,cb_fail:cb_fail2,limit_size:instance4.get_static_property("limit_image_width")}),((_instance$element$roo3=instance4.element.root())==null?void 0:_instance$element$roo3.get_responsive_version())===0&&register_tab_index_listener(instance4,tabindex=>{input2.attr("tabindex",tabindex)}),on_property_change(instance4,"disabled",value=>{input2[0].disabled=value,property_applications_default.apply_css_style(input2,{cursor:value?"default":"pointer"}),property_applications_default.apply_css_style(placeholder_div,{cursor:value?"default":"pointer"})}),register_focus(instance4,input2),instance4.on_message("set_focus",()=>input2.focus())}on_property_change(instance4,"placeholder",placeholder=>{placeholder_div.text(placeholder)}),input_change_autorun(instance4,url9=>{var _input$0$files$0$size2,_input3,_input3$,_input3$$files$;!instance4.run_mode()&&!instance4.element.property("src").is_static()?url9="":url9=resize_url(url9),display_url(url9),instance4.state("file_size",(_input$0$files$0$size2=(_input3=input2)==null||(_input3$=_input3[0])==null||(_input3$$files$=_input3$.files[0])==null?void 0:_input3$$files$.size)!=null?_input$0$files$0$size2:null)})})},get_starting_content(instance4){return instance4.run_mode()&&instance4.get_static_property("auto_binding")?get_input_autobind_thing_field(instance4):evaluate_property(instance4,"src")},get_state_value(element,name){if(name==="value")return"image"},get_states(element){return["loading","file_size"]},uses_css_responsive:!0,add_specific_messages(messages,element){return extend(messages,file_inputs_additional_messages)},need_to_wait_before_checking_validity:!0,content_validated(val,instance4){return val||!evaluate_property(instance4,"mandatory")},change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,is_input:!0,contains_group_data:!1});init_define_process_env();init_shim();var import_web_immediate11=__toESM(require_web_immediate()),import_web_dom_collections_iterator236=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_lib();init_elements2();init_property_applications();init_status_bar();init_workflow();init_runmode();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator235=__toESM(require_web_dom_collections_iterator());init_element_styles();init_properties();init_define_process_env();init_shim();init_runmode();var autorun20=__toESM(require_autorun());init_server_css();init_element_eval();init_element_props();init_solid();var _tmpl$30=template("<div class=greyout>"),_tmpl$210=template("<div>"),GREYOUT_CLASS="greyout",GREYOUT_SELECTOR=`.${GREYOUT_CLASS}`;function PopupComponent(props){let instance4=props.instance;onMount(()=>{if(instance4.run_mode())instance4.canvas.css({display:"none",top:20,position:"fixed"}),instance4.manual_position=!1,instance4.on_message("position_element",position=>{instance4.manual_position=!0,instance4.state("manual_position",{top:`${position.Y}px`,left:`${position.X}px`,position:position.position})});else if(!instance4.thumbnail_mode()){let wrapper=instance4.canvas;instance4.edit_mode()&&(wrapper=wrapper.parent()),wrapper.css({top:20,position:"absolute"})}instance4.state("greyout").css("display","none")}),onCleanup(()=>{instance4.canvas!=="destroyed"&&remove_blur_effect_to_greyout(instance4)}),instance4.run_mode()&&(createAutorun(()=>{if(instance4.is_visible()){let height2=instance4.current_height();autorun20.autorun_top(()=>get_popup_positioning(instance4,height2))}}),onAfterMount(()=>{let lastScreenHeight=null;return $(window).on("resize.popup_"+instance4.element_id(),()=>{let screenHeight=window.innerHeight;lastScreenHeight!==screenHeight&&(lastScreenHeight=screenHeight,get_popup_positioning(instance4))}),()=>{$(window).off("resize.popup_"+instance4.element_id())}}));let greyout=()=>(()=>{var _el$=_tmpl$30();return use(node=>instance4.state("greyout",$(node)),_el$),createRenderEffect(_p$=>{var _v$={[toClass(instance4.element.ssr_key())]:!0},_v$2=props.childStyles[GREYOUT_SELECTOR];return _p$.e=classList(_el$,_v$,_p$.e),_p$.t=style(_el$,_v$2,_p$.t),_p$},{e:void 0,t:void 0}),_el$})(),popup=()=>(()=>{var _el$2=_tmpl$210();use(defaultEventHandlers,_el$2,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$2):props.ref=_el$2,insert(_el$2,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$3=props.id,_v$4=props.style,_v$5={...props.classList,[props.containerClass]:!0};return _v$3!==_p$.e&&setAttribute(_el$2,"id",_p$.e=_v$3),_p$.t=style(_el$2,_v$4,_p$.t),_p$.a=classList(_el$2,_v$5,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$2})();return instance4.edit_mode()?[createComponent(BodyPortal,{get children(){return greyout()}}),createMemo(popup)]:[createMemo(greyout),createMemo(popup)]}var PopupComponent_default=createElement2(PopupComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>{var _instance$state;return{left:0,right:0,"z-index":2002+((_instance$state=instance4.state("popup_zindex"))!=null?_instance$state:0),"margin-left":"auto","margin-right":"auto",width:instance4.element.fit_width()?"fit-content":`calc(100% - ${10*2}px)`,height:instance4.element.fit_height()?"auto":"initial",bottom:instance4.element.fit_height()?"":50,"overflow-y":"auto","grid-template-rows":instance4.element.fit_height()?"minmax(100%, max-content)":void 0}},{noWaitVisible:!0,outerPositioning:!0}),new Style(instance4=>{var _element_props$max_wi,_element_props$max_he;return{"min-width":min_width_css(instance4),"max-width":(_element_props$max_wi=max_width_css(instance4))!=null?_element_props$max_wi:"","min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:""}},{outerPositioning:!0}),new Style(instance4=>{var _instance$state2;return(_instance$state2=instance4.state("manual_position"))!=null?_instance$state2:{}},{alwaysDynamic:!0}),new Style(instance4=>{var _instance$state3;return{position:instance4.run_mode()?"fixed":"absolute",top:"0px",left:"0px",width:"100%",height:"100%","background-color":evaluate_property(instance4,"greyout_color"),"z-index":instance4.run_mode()?2002+((_instance$state3=instance4.state("popup_zindex"))!=null?_instance$state3:0):2002-1}},{selector:GREYOUT_SELECTOR})]}});init_element_eval();init_element_props();init_elements_utils();make_element("Popup",{category:"containers",glyph_id:"popup",list_order:4,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{bgcolor:"#FFFFFF",background_style:"bgcolor",border_style:"none",border_roundness:3,boxshadow_style:"outset",boxshadow_horizontal:2,boxshadow_vertical:2,boxshadow_blur:4,boxshadow_color:"#000000",width:500,height:350},updated_default_sizing:{width:320,height:320},properties_for_new:{container_layout:"column",single_width:!1,fit_width:!0,min_width_css:"296px",min_height_css:"296px"},field_names:extend({},start_workflow_field_names,greyout_field_names,container_field_names),not_draggable(){return!0},property_applications:[new property_applications_default.ShortDimensions,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer,new property_applications_default.PaddingFields,new property_applications_default.Opacity],get_min_width(){return 0},not_max_adjustable_legacy:!0,uses_css_responsive:!0,no_margins(){return!0},can_fit_height:!0,can_fit_width:!0,get_html(instance4){return"<div></div>"},change_cursor_style_if_clickable:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},goes_on_document(){return!0},hidden_on_editor_load(){return!0},can_animate(element){return!0},can_defer_drawing(){return!0},solid_component:PopupComponent_default,register(instance4){function run_popup_workflow(event_type){instance4.start_child_drawing();let to_run2=instance4.element.get_related_workflows(event_type),context={element:instance4},promise=lib_default().workflow.run_workflows(context,to_run2,!0),status=show_progress_line(promise);promise.then(()=>status(),err=>{status(),core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT_WORKFLOW,cb(err2){err2&&window.alert(human_friendly(err2))}})})}instance4.on_message("popup_closed",()=>run_popup_workflow("PopupClosed")),instance4.on_message("popup_opened",()=>run_popup_workflow("PopupOpened")),instance4._has_been_hidden=!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{on_property_change(instance4,"greyout_color",greyout_color=>apply_greyout_color(instance4,greyout_color)),on_property_change(instance4,"greyout_blur",greyout_blur=>{[null,void 0,0].includes(greyout_blur)||instance4.wait_for_visible(()=>{apply_blur_effect_to_greyout(instance4,greyout_blur)})}),instance4.on_destroy(()=>{(![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&remove_blur_effect_to_greyout(instance4)})})},check_for_errors(element,report){return(void 0)(element,"get_group_data",report)},is_input:!1,contains_group_data:!0,add_an_invisible_div_on_the_top:!1,events:["ButtonClicked","PopupClosed","PopupOpened","ElementPressed"],get_state_value(element,name){return state_value_helper_for_group(element,name)},position_canvas(to_position,instance4){let position;if(instance4.edit_mode()?($(".canvas").append(to_position),position="absolute"):($(window.document.body).append(to_position),position="fixed"),to_position.css({top:20,left:0,right:0,position,"margin-left":"auto","margin-right":"auto"}),instance4.autorun(()=>{var _element_props$max_wi,_element_props$max_he,_instance$state;to_position.css({width:`calc(100% - ${10*2}px)`,"min-width":min_width_css(instance4),"max-width":(_element_props$max_wi=max_width_css(instance4))!=null?_element_props$max_wi:"","min-height":min_height_css(instance4),"max-height":(_element_props$max_he=max_height_css(instance4))!=null?_element_props$max_he:"",height:instance4.element.fit_height()?"auto":"initial",bottom:instance4.element.fit_height()?"":50,"overflow-y":"auto","z-index":2002+((_instance$state=instance4.state("popup_zindex"))!=null?_instance$state:0)})}),instance4.edit_mode()&&instance4.container.setup_padding(instance4),instance4.run_mode()){to_position.css("display","none");let last_screen_height=null;$(window).on("resize.popup_"+instance4.element_id(),()=>{let screen_height=$(window).height();last_screen_height!==screen_height&&(last_screen_height=screen_height,get_popup_positioning(instance4))});let last_height=null;queueMicrotask(()=>{instance4.autorun(()=>{let height2=instance4.current_height();height2!==last_height&&(last_height=height2,get_popup_positioning(instance4,height2))})}),instance4.on_destroy(()=>{$(window).off("resize.popup_"+instance4.element_id())})}},do_show(instance4,properties,options,animated){instance4.with_canvas(canvas=>{instance4.state("has_been_absolutely_positioned",null),add_layer(instance4);let grey_out=get_greyout(instance4);if(instance4.run_mode()){var _instance$state2;grey_out.css("z-index",2002+((_instance$state2=instance4.state("popup_zindex"))!=null?_instance$state2:0))}if((![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&apply_blur_effect_to_greyout(instance4,instance4.get_static_property("greyout_blur")),instance4.run_mode()){var _canvas$velocity,_grey_out$velocity;get_popup_positioning(instance4),canvas.css({"-webkit-filter":"none",filter:"none"}),(_canvas$velocity=canvas.velocity)==null||_canvas$velocity.call(canvas,"stop"),(_grey_out$velocity=grey_out.velocity)==null||_grey_out$velocity.call(grey_out,"stop"),canvas.css("display",""),animated?(perform_animate_in2(instance4,properties,options),setImmediate(()=>{resize_popup_if_legacy(instance4,canvas.innerWidth())})):(properties={animation:"transition.fadeIn"},options={duration:300},perform_animate_in2(instance4,properties,options),setImmediate(()=>{resize_popup_if_legacy(instance4,canvas.innerWidth())})),grey_out.css("opacity",0),grey_out.show(),velocity(grey_out,"fadeIn",{duration:300,complete_cb(){return grey_out[0].style.top="-1px",instance4.setTimeout(()=>grey_out[0].style.top="0px",151)}}),instance4.setTimeout(()=>{let focusable_children=[],dont_do_it=!1;function find_focusable_children(parent){for(let child of(_parent$children=parent.children)!=null?_parent$children:[]){var _parent$children;if(child.element.get_messages().includes("set_focus")){if(!child.get_canvas())continue;if(child.get_canvas().is(":focus")){dont_do_it=!0;return}focusable_children.push(child)}find_focusable_children(child)}}if(find_focusable_children(instance4),!dont_do_it){focusable_children=focusable_children.filter(a=>a.state("tab_index")&&a.is_visible()),focusable_children.sort((a,b)=>a.state("tab_index")<=b.state("tab_index")?-1:1);for(let a of focusable_children)if(a.is_visible()){a.element.type()!=="DateInput"&&a.message("set_focus");break}}},400),instance4.get_static_property("prevent_user_from_closing_through_esc")||($(document).off("keydown.escape"),$(document).on("keydown.escape",event=>{event.keyCode===27&&(instance4.do_hide(),$(document).off("keydown.escape"))}),grey_out.off("click"),grey_out.on("click",()=>instance4.do_hide())),instance4.message("popup_opened")}else canvas.css("display",""),instance4._display_me(),instance4._is_visible_me=!0,instance4._update_visible(),instance4.thumbnail_mode()||grey_out.show()})},do_hide(instance4,properties,options,animated){var _canvas$velocity2,_grey_out$velocity2;if(!instance4.is_drawn)return;instance4.set_animating(!0),on_phonegap()&&$(window).off("touchmove.popup_opened");let canvas=instance4.get_canvas(),grey_out=get_greyout(instance4);if((![null,void 0,0].includes(instance4.get_static_property("greyout_blur"))||instance4.edit_mode())&&remove_blur_effect_to_greyout(instance4),(_canvas$velocity2=canvas.velocity)==null||_canvas$velocity2.call(canvas,"stop"),(_grey_out$velocity2=grey_out.velocity)==null||_grey_out$velocity2.call(grey_out,"stop",!0),instance4.run_mode()&&canvas.is(":visible")&&canvas.css("visibility")!=="hidden")if(animated)options.transform="",perform_animate_out(instance4,properties,options),velocity(grey_out,"fadeOut",{duration:300,complete_cb(){grey_out.hide()}}),instance4.message("popup_closed");else{instance4.set_animating(!0);let duration=300;properties={animation:"transition.fadeOut"},options={duration},perform_animate_out(instance4,properties,options,()=>{canvas.css("display","none")}),velocity(grey_out,"fadeOut",{duration,complete_cb(){grey_out.hide()}}),instance4.message("popup_closed")}else canvas.css("display","none"),grey_out.hide(),instance4.set_animating(!1);instance4._is_visible_me=!1,instance4._update_visible(),remove_layer(instance4),set_body_overflow()},get_private_messages(element){return["popup_opened","popup_closed","child_movement","position_element"]},starts_hidden:!0,modal(){return!0}});init_define_process_env();init_shim();init_u2();init_property_applications();init_element_eval();make_element("PoweredByBubble",{category:"visual elements",display:"Built on Bubble",glyph_id:"bubble_logo",list_order:10,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{width:79,height:42},field_names:{element_type:{default:"image_black",no_states:!0},add_border:{in_style:!0,no_states:!0},text_color:{default:"#C9C9C9",in_style:!0,no_states:!0}},property_applications:[new property_applications_default.PositionOnly,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,get_html(instance4){return instance4.run_mode()?"<a></a>":"<div></div>"},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let{element}=instance4,canvas=instance4.get_canvas(),inner_canvas=div("powered-by-bubble",canvas);instance4.run_mode()&&(canvas[0].href="https://bubble.io?utm_source=user_icon",canvas[0].target="_blank");let image_colors={image_blue:"#0205D3",image_white:"#FFFFFF",image_grey:"#C9C9C9",image_black:"#000000"},images_list=[];for(let a in image_colors)images_list.push(a);let image_svg=color=>`<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 width="71px" height="100px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve">
<path fill="${color}" d="M298.97,123.2c-12.343,0-24.549,5.294-33.832,15.747V87.511h-18.395v86.608l0,0
c0,28.125,22.795,50.92,50.92,50.92s50.919-22.795,50.919-50.92C348.583,145.995,327.095,123.2,298.97,123.2z M297.629,205.407
c-17.294,0-31.288-14.028-31.288-31.288s14.028-31.288,31.288-31.288c17.293,0,31.288,14.028,31.288,31.288
S314.924,205.407,297.629,205.407z"/>
<path fill="${color}" d="M413.016,123.2c-12.344,0-24.549,5.294-33.832,15.747V87.511h-18.395v86.608l0,0
c0,28.125,22.795,50.92,50.92,50.92c28.124,0,50.92-22.795,50.92-50.92C462.629,145.995,441.105,123.2,413.016,123.2z
 M411.675,205.407c-17.295,0-31.288-14.028-31.288-31.288s14.028-31.288,31.288-31.288c17.294,0,31.287,14.028,31.287,31.288
S428.969,205.407,411.675,205.407z"/>
<path fill="${color}" d="M143.185,183.024V125.95h19.735v56.902c0,14.543,8.424,23.861,22.624,23.861
c14.372,0,22.623-8.974,22.623-23.861V125.95h19.907v57.074c0,26.371-15.987,41.98-42.53,41.98
C159.688,225.039,143.185,208.88,143.185,183.024z"/>
<path fill="${color}" d="M498.214,222.701h-19.735V87.511h19.735V222.701z"/>
<path fill="${color}" d="M609.955,181.958h-75.537c2.889,15.06,13.443,25.306,32.113,25.306c10.934,0,24.239-4.126,32.835-10.418
l8.251,14.544c-9.867,7.357-25.477,13.443-41.809,13.443c-36.238,0-51.848-25.306-51.848-50.782c0-14.544,4.47-26.543,13.649-36.067
c9.146-9.524,21.18-14.372,35.723-14.372c13.822,0,25.306,4.298,34.107,13.1s13.271,20.629,13.271,35.723
C610.644,175.15,610.472,178.383,609.955,181.958z M534.384,165.799h56.353c-1.616-15.266-12.928-25.133-27.472-25.133
C548.377,140.666,537.271,150.74,534.384,165.799z"/>
<path fill="${color}" d="M80.507,123.2c-12.343,0-24.549,5.294-33.832,15.747V87.511H28.246v86.608l0,0
c0,28.125,22.795,50.92,50.92,50.92s50.919-22.795,50.919-50.92C130.085,145.995,108.597,123.2,80.507,123.2z M79.166,205.407
c-17.294,0-31.288-14.028-31.288-31.288s14.028-31.288,31.288-31.288c17.294,0,31.288,14.028,31.288,31.288
S96.46,205.407,79.166,205.407z"/>
<g>
<ellipse fill="${color==="#000000"?"#0205D3":color}" cx="14.872" cy="212.421" rx="12.584" ry="12.584"/>
</g>
<rect x="6.206" y="4.5" fill="none" width="602" height="63"/>
<text transform="matrix(1 0 0 1 15.8643 58.4595)" fill="${color}" font-family="Arial" font-size="76">Built without code</text>
</svg>`;return on_property_change(instance4,["element_type","add_border","text_color"],_ref=>{let{element_type,add_border,text_color}=_ref;inner_canvas.empty();let css_opts={"border-radius":"3px",padding:"3px",height:"100%",width:"100%","text-align":"center"};switch(element_type){case"text":inner_canvas.text("Built without code on Bubble"),css_opts["font-family"]="Arial",css_opts["font-size"]=10,css_opts.color=text_color;break;default:images_list.includes(element_type)&&inner_canvas.html(image_svg(image_colors[element_type]))}if(add_border){let color;switch(element_type){case"text":color=text_color;break;default:images_list.includes(element_type)&&(color=image_colors[element_type])}css_opts.border="1px solid "+color}else css_opts.border="1px solid transparent";return inner_canvas.css(css_opts)})})},is_input:!1,contains_group_data:!1,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,not_resizable(){return!0}});init_define_process_env();init_shim();var import_web_dom_collections_iterator237=__toESM(require_web_dom_collections_iterator());init_uuid();var autorun21=__toESM(require_autorun());init_property_applications();init_runmode();init_hydrate();init_btypes();init_element_eval();var MAX_RADIO_OPTIONS2=50,RADIO_BUTTON_WIDTH=20,MIN_COLUMN_WIDTH=20;make_element("RadioButtons",{category:"input forms",display:"Radio Buttons",glyph_id:"radio_buttons",list_order:6,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{width:200,height:75},field_names:{choices_style:{default:"static",no_states:!0},choices:{no_states:!0,default:"Choice 1"},dynamic_type:{no_states:!0},data_source:{},option_display_expression:{},default:{},mandatory:{},columns:{no_states:!0,default:1},use_dynamic_columns:{default:!1,no_states:!0},min_column_width_px:{no_states:!0,default:100},color:{default:"black",in_style:!0},computed_value:{optional:!0,no_states:!0},...get_disabled_field_name,...get_auto_binding_field_names},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.FontSpacing(null,["line_height"]),new property_applications_default.Opacity],can_fit_width:!0,can_fit_height:!0,get_html(instance4){return"<div></div>"},get_min_width(element){return 0},_get_display_option,can_defer_drawing(){return!0},register(instance4){let bad_value_watcher=autorun21.Watcher(()=>{if(!instance4.state("has_been_changed"))return!1;let val=instance4.state("value");return val==null?!1:!this._choice_list_contains(instance4,val)});instance4.on_destroy(()=>bad_value_watcher.destroy()),bad_value_watcher.on_value(is_bad=>{is_bad&&instance4.message("reset_input")})},initialize(instance4){instance4.wait_for_visible_lite(()=>{let inner_id=LUID(),canvas=instance4.get_canvas();canvas.addClass("radio"),instance4.autorun(()=>{if(instance4.get_static_property("use_dynamic_columns")){let column_width=Math.max(MIN_COLUMN_WIDTH,instance4.get_static_property("min_column_width_px")-RADIO_BUTTON_WIDTH);canvas.css("grid-template-columns",`repeat(auto-fill, minmax(${column_width}px, 1fr))`)}else canvas.css("grid-template-columns",`repeat(${instance4.get_static_property("columns")}, 1fr)`)}),instance4.run_mode()&&canvas.addClass(CLICKABLE_ELEMENT),instance4.on_message("set_focus",()=>canvas.find("input:first").focus()),on_property_change(instance4,"color",value=>{for(let class_name of bootstrap_colors)canvas.removeClass(`radio-${class_name}`);canvas.addClass(`radio-${value}`)});let options_div_mapping={};function create_option(c,i){let dehydrated_value=dehydrate_tree_to_string_safe(c.value),choice=$(`<input type="radio" value="${dehydrated_value}" name="${inner_id}" id="${inner_id}_option_${i}"><label for="${inner_id}_option_${i}">${c.display}</label>`);return choice.data("bubble_val",dehydrated_value),options_div_mapping[dehydrated_value]=choice,choice}let get_choice_list=()=>{if(instance4.edit_mode()&&evaluate_property(instance4,"choices_style")==="dynamic"){let raw_choices2=["Dynamic choice 1","Dynamic choice 2","Dynamic choice 3","Dynamic choice 4"];return instance4.get_canvas().data("Dynamic choice 1"),raw_choices2.map(a=>({display:a,value:a}))}let raw_choices=this._get_raw_choice_list(instance4),get_display=this._get_display_option(instance4),raw_choice_list=raw_choices.get_children(0,MAX_RADIO_OPTIONS2);return autorun21.run_once(30,()=>raw_choice_list.map(raw_choice=>get_display(raw_choice))),raw_choice_list.map(raw_choice=>({display:get_display(raw_choice),value:raw_choice}))},current_displayed_value=null;function select_value(val){var _options_div_mapping3,_options_div_mapping4;if(current_displayed_value=val,options_div_mapping=canvas.data("options_div_mapping"),!val)if(instance4.edit_mode())for(let div2 of Object.values((_options_div_mapping=options_div_mapping)!=null?_options_div_mapping:{})){var _options_div_mapping;div2[0].checked=!0;return}else for(let div2 of Object.values((_options_div_mapping2=options_div_mapping)!=null?_options_div_mapping2:{})){var _options_div_mapping2;div2[0].checked=!1}let dehydrated_value=dehydrate_tree_to_string_safe(val),selected_div=(_options_div_mapping3=options_div_mapping)==null||(_options_div_mapping4=_options_div_mapping3[dehydrated_value])==null?void 0:_options_div_mapping4[0];selected_div!=null&&(selected_div.checked=!0)}let update_choice_list=()=>{canvas.empty(),options_div_mapping={},get_choice_list().forEach((c,i)=>{let input2=create_option(c,i);canvas.append(input2)}),canvas.data("options_div_mapping",options_div_mapping),canvas.find("input[type=radio]").on("change",function(){let val=rehydrate_dropdown_value($(this).data("bubble_val"));instance4.message("user_submit",val),select_value(val)}),select_value(current_displayed_value);let value=evaluate_property(instance4,"disabled");for(let div2 of Object.values((_options_div_mapping5=options_div_mapping)!=null?_options_div_mapping5:{})){var _options_div_mapping5;div2[0].disabled=value}};input_change_autorun(instance4,val=>select_value(val)),instance4.autorun(()=>{let value=evaluate_property(instance4,"disabled");for(let div2 of Object.values((_options_div_mapping6=options_div_mapping)!=null?_options_div_mapping6:{})){var _options_div_mapping6;div2[0].disabled=value}}),instance4.autorun(()=>{instance4.is_visible()&&update_choice_list()})})},_get_raw_btype(element){return _get_raw_btype_dropdown(element)},_get_raw_choice_list(instance4){return _get_raw_choice_list_dropdown(instance4,this)},_choice_list_contains(instance4,val){let V=get5(this._get_raw_btype(instance4.element));return this._get_raw_choice_list(instance4).contains(val,V)},get_starting_content(instance4){let starting_content;return instance4.run_mode()&&instance4.get_static_property("auto_binding")?starting_content=get_input_autobind_thing_field(instance4):starting_content=evaluate_property(instance4,"default"),starting_content==null||!this._choice_list_contains(instance4,starting_content)?null:starting_content},get_state_value(element,name){if(name==="value")return this._get_raw_btype(element)},get_injected_btype(element){return element.get_static_property("dynamic_type")},get_injected_display(){return"Current option"},use_injected_datasource(node){return(void 0)("option_display_expression",node)},content_validated(val,instance4){return val!=null||!evaluate_property(instance4,"mandatory")},css_files:["css/optional/radio.css"],uses_css_responsive:!0,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!0,contains_group_data:!1,no_is_focused:!0});init_define_process_env();init_shim();init_u2();init_property_applications();init_StaticList();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator243=__toESM(require_web_dom_collections_iterator());init_responsive_layout();init_element_styles();init_properties();init_element_props();init_element_eval();init_solid();init_define_process_env();init_shim();init_web();init_web();init_define_process_env();init_shim();init_web();init_web();init_web();var import_web_dom_collections_iterator242=__toESM(require_web_dom_collections_iterator());init_solid();init_elements2();init_mode_check();init_logger();init_web();init_errors();var import_autorun7=__toESM(require_autorun()),import_b_async6=__toESM(require_b_async());init_b_ui();var import_dependency6=__toESM(require_dependency());init_define_process_env();init_shim();init_web();init_web();var import_web_dom_collections_iterator241=__toESM(require_web_dom_collections_iterator());init_solid();init_logger();init_define_process_env();init_shim();init_web();var import_es_string_replace48=__toESM(require_es_string_replace());init_solid();init_responsive_css();init_define_process_env();init_shim();var import_web_dom_collections_iterator240=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_responsive_css();init_responsive_layout();init_define_process_env();init_shim();var import_web_dom_collections_iterator239=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();var events5=__toESM(require_events());init_define_process_env();init_shim();var import_web_dom_collections_iterator238=__toESM(require_web_dom_collections_iterator()),j=1,tab_container=instance4=>{instance4.wait_for_visible_lite(()=>{let focusable_children=[];for(let child of instance4.children)(child.element.get_messages().includes("set_focus")||child.element.get_related_workflows("ButtonClicked").length)&&focusable_children.push(child);let children_on_page_to_process=focusable_children.filter(e=>!e.state("tab_index"));children_on_page_to_process.sort((a,b)=>a.element.get_top()-b.element.get_top());function in_line(line,child){return Math.max(...line.map(e=>e.element.get_top()+e.element.get_height()))>=child.element.get_top()}let all_lines=[],current_line=[];for(let child of children_on_page_to_process)current_line.length===0||in_line(current_line,child)?current_line.push(child):(all_lines.push(current_line),current_line=[child]);all_lines.push(current_line);for(let line of all_lines){line.sort((a,b)=>a.element.get_left()-b.element.get_left());for(let child of line)child.message("add_tab_index",j),j++}})};init_lib();var ResponsiveV1Container=null,OldContainer=class _OldContainer{constructor(owner_instance,container_canvas){var _this$info;if(this.owner_instance=owner_instance,this.container_canvas=container_canvas,this.container_canvas.css("box-sizing","border-box"),this.owner_instance){let{element}=this.owner_instance;this.info=json_deep_copy(element.get_responsive_data())}(_this$info=this.info)!=null||(this.info={}),this.is_initialized=u_exports2.MakeKey(null,"container initialized")}destroy(){var _this$owner_instance;(_this$owner_instance=this.owner_instance)==null||_this$owner_instance.destroy(),this.owner_instance=null}resize_width(){}add_to_instances(){}ready_key(){return this.is_initialized}get_canvas(){return this.container_canvas}get_owner(){return this.owner_instance}render(html){let canvas=$(html);return canvas.addClass("bubble-element"),canvas}recalculate(id){var _info$pushed_by;let info2=this.info[id];(_info$pushed_by=info2.pushed_by)!=null||(info2.pushed_by=[]);let deltas=Object.values(info2.pushed_by).map(pusher=>this.info[pusher].height_delta+this.info[pusher].top_delta),new_top_delta=Math.max(...deltas);new_top_delta!==info2.top_delta&&(info2.top_delta=new_top_delta,info2.instance.canvas.css("top",info2.top_delta+info2.it),this.calculate_children(id),this.recalculate_stripe(id))}calculate_children(id){var _info$pushes;let info2=this.info[id];if((_info$pushes=info2.pushes)!=null||(info2.pushes=[]),is_empty(info2.pushes))this.recalculate_container(id);else for(let idx in info2.pushes){let child=info2.pushes[idx];this.recalculate(child)}}recalculate_container(id){let max_delta;for(let idx in this.info.container_bottoms){let element_id=this.info.container_bottoms[idx],info2=this.info[element_id];max_delta==null?max_delta=info2.height_delta+info2.top_delta:max_delta=Math.max(max_delta,info2.height_delta+info2.top_delta)}this.owner_instance.supports_message("child_movement")&&this.owner_instance.message("child_movement",max_delta)}recalculate_stripe(id){if(!this.owner_instance.supports_message("movement_in_stripe")||this.info[id].pushes_stripe==null)return;let current_stripe=this.info[id].pushes_stripe,max_delta;for(let element_id in this.info){let info2=this.info[element_id];info2.pushes_stripe===current_stripe&&(max_delta==null?max_delta=info2.height_delta+info2.top_delta:max_delta=Math.max(max_delta,info2.height_delta+info2.top_delta))}this.owner_instance.message("movement_in_stripe",current_stripe,max_delta)}set_height(instance4,height2,options){var _options;(_options=options)!=null||(options={}),u_exports2.WaitFor(this.is_initialized,()=>{let id=instance4.element_id();if(this.info[id].current_height===height2)return;this.info[id].current_height=height2,options.no_css_update||instance4.canvas.css("height",height2);let delta=height2-this.info[id].ih;delta!==this.info[id].height_delta&&(this.info[id].height_delta=delta,this.calculate_children(id),this.recalculate_stripe(id))})}add(instance4,force){let{element}=instance4,id=element.id(),info2=this.info[id];if(info2==null){force&&instance4.wait_for_visible_lite(()=>{let{style:style2}=instance4.canvas[0];style2.boxSizing="border-box",style2.position="absolute",style2.zIndex=instance4.element.get_zindex(),style2.left=instance4.element.get_left()+"px",style2.top=instance4.element.get_top()+"px",style2.width=instance4.element.get_width()+"px",style2.height=instance4.element.get_height()+"px"});return}extend(info2,{current_height:info2.ih,top_delta:0,height_delta:0,instance:instance4}),instance4.wait_for_visible_lite(()=>{let{style:style2}=instance4.canvas[0];return style2.boxSizing="border-box",style2.position="absolute",style2.zIndex=info2.iz,style2.left=info2.il+"px",style2.top=info2.it+info2.top_delta+"px",style2.width=info2.iw+"px",style2.height=info2.current_height+"px",instance4.notify_width(info2.iw)}),this.container_canvas.append(instance4.canvas)}create_child(owner_instance,container_canvas){let{custom_definition}=owner_instance.element.E;if(custom_definition){let c;return custom_definition().get_responsive_version()>0?new ResponsiveV1Container(owner_instance,container_canvas):(custom_definition().use_responsive_algorithm()?c=new Container(owner_instance,container_canvas,owner_instance.element.get_responsive_data()):c=new _OldContainer(owner_instance,container_canvas),c.resize_width(real_inner_width(container_canvas)),c)}else return new _OldContainer(owner_instance,container_canvas)}initialize(){tab_container(this.owner_instance),this.is_initialized.turn()}detach(instance4){instance4.canvas.detach()}},Container=class _Container extends events5.EventEmitter{constructor(owner_instance,container_canvas,responsive_data,owner){var _this$elements,_this$boxes,_this$lines,_this$lines_length,_this$lines2;super(),this.owner_instance=owner_instance,this.container_canvas=container_canvas,this.owner=owner,this.container_canvas[0].style["box-sizing"]="border-box",this.owner_instance&&({elements:this.elements,boxes:this.boxes,lines:this.lines,lines_length:this.lines_length}=json_deep_copy(responsive_data!=null?responsive_data:{})),(_this$elements=this.elements)!=null||(this.elements={}),(_this$boxes=this.boxes)!=null||(this.boxes={}),(_this$lines=this.lines)!=null||(this.lines={}),(_this$lines_length=this.lines_length)!=null||(this.lines_length=0),this.instances={},this.instances_keys={},(_this$lines2=this.lines)!=null||(this.lines={}),this.child_containers=[],this.flow_created=u_exports2.MakeKey(null,"flow created")}destroy(){var _this$owner_instance2,_this$instances;this.destroyed=!0,(_this$owner_instance2=this.owner_instance)==null||_this$owner_instance2.destroy(),this.owner_instance=null;let object2=(_this$instances=this.instances)!=null?_this$instances:{};for(let k in object2)object2[k].destroy();this.instances=null;for(let container of this.child_containers)container.destroy();this.elements=this.boxes=this.lines=this.lines_length=this.instance_keys=this.flow_created=null}ready_key(){return this.flow_created}get_canvas(){return this.container_canvas}get_owner(){return this.owner_instance}render(html){let canvas=$(html);return canvas.addClass("bubble-element"),canvas}_show_line(idx){var _this$_lines,_this$_lines2,_this$_lines2$idx,_this$_num_lines;return(_this$_lines=this._lines)!=null||(this._lines={}),(_this$_lines2$idx=(_this$_lines2=this._lines)[idx])!=null||(_this$_lines2[idx]=div("bubble-r-line",this.container_canvas)),this._lines[idx].show(),this._num_lines=Math.max((_this$_num_lines=this._num_lines)!=null?_this$_num_lines:0,parseInt(idx)+1),this._lines[idx]}_hide_lines(idx){this.last_display_line=idx-1;for(let i=idx;i<this._num_lines;i++)this._lines[i].hide()}_get_box(box_id){var _this$_boxes;return(_this$_boxes=this._boxes)!=null||(this._boxes={}),this._boxes[box_id]||(this._boxes[box_id]=div("bubble-r-box"),this.recalculate_box_height(box_id),this._boxes[box_id][0].box_debugging_metadata=this.boxes[box_id]),this._boxes[box_id]}recalculate_box_height(box_id){let box=this.boxes[box_id],max_delta=null;for(let idx in box.bottoms){var _data$top_delta;let element_id=box.bottoms[idx],data=this.elements[element_id],element_delta=this._get_height_delta(element_id)+((_data$top_delta=data.top_delta)!=null?_data$top_delta:0);max_delta==null?max_delta=element_delta:max_delta=Math.max(max_delta,element_delta)}let new_height=max_delta+(box.ih-box.line_gap);if(new_height!==box.height){var _this$box_to_display_;box.height=new_height,this._get_box(box_id)[0].style.height=Math.max(new_height,0)+"px";let display_line=(_this$box_to_display_=this.box_to_display_line)==null?void 0:_this$box_to_display_[box_id];display_line&&this.update_display_line_height(display_line)}}update_display_line_height(display_line){var _this$_lines$display_;let line_element=(_this$_lines$display_=this._lines[display_line.idx])==null?void 0:_this$_lines$display_[0];line_element&&(line_element.style.height=Math.max(this.get_display_line_height(display_line),0)+"px")}_update_instance(id,fn){if(this.instances[id])this.instances[id].wait_for_visible_lite(fn);else{var _this$instances_keys,_this$instances_keys$;(_this$instances_keys$=(_this$instances_keys=this.instances_keys)[id])!=null||(_this$instances_keys[id]=u_exports2.MakeKey(null,"waiting for instance for "+id)),u_exports2.WaitFor(this.instances_keys[id],this._update_instance.bind(this,id,fn))}}_wait_for_instance_added(id,fn){if(this.instances[id])fn();else{var _this$instances_keys2,_this$instances_keys3;(_this$instances_keys3=(_this$instances_keys2=this.instances_keys)[id])!=null||(_this$instances_keys2[id]=u_exports2.MakeKey(null,"waiting for instance for "+id)),u_exports2.WaitFor(this.instances_keys[id],this._wait_for_instance_added.bind(this,id,fn))}}_set_element_width(id,width2,left2){let data=this.elements[id];data.width=width2,data.left=left2,this._update_instance(id,()=>{this.to_canvas(this.instances[id])[0].style.width=data.width+"px",this.to_canvas(this.instances[id])[0].style.left=data.left+"px",this.instances[id].notify_width(data.width)})}get_display_line_top(display_line){let top2=0;for(let i=0;i<display_line.idx;i++){let dline=this.display_lines[i];top2+=dline.top_margin,top2+=this.get_display_line_height(dline)}return top2+display_line.top_margin}get_display_line_height(display_line){return Math.max(...display_line.boxes.map(box=>box.height))}get_hidden_elements(){var _this$_visibility_rul;return[].concat((_this$_visibility_rul=this._visibility_rules)!=null?_this$_visibility_rul:[]).concat(...this.child_containers.map(c=>c.get_hidden_elements()))}get_all_instances(){let res=Object.values(this.instances);for(let child_container of this.child_containers)res.push(...child_container.get_all_instances());return res}get_element_box(element_id,need_instance){let container=this.search_for_element(element_id);if(!container)return null;if(need_instance)return container.instances[element_id];{let box_id=container.elements[element_id].box;return container.boxes[box_id]}}search_for_element(element_id){if(this.destroyed)return null;if(!this.elements[element_id]){for(let child_container of this.child_containers){let res=child_container.search_for_element(element_id);if(res!=null)return res}return null}return this}get_margin_info(element_id){var _container$owner_inst;let container=this.search_for_element(element_id);if(!container||container.elements[element_id].box==null)return null;if(((_container$owner_inst=container.owner_instance)==null?void 0:_container$owner_inst.element.type())==="RepeatingGroup"){var _container$child_cont;return(_container$child_cont=container.child_containers)==null?void 0:_container$child_cont[0].get_margin_info(element_id)}else return container.margin_debugging[container.elements[element_id].box]}resize_width(container_width){var _this$display_lines;if(this.container_width===container_width||this.destroyed)return;this.container_width=container_width,this._visibility_rules=[],this.margin_debugging={};let get_left_margin=(box,box_idx)=>{if(box_idx===0){let original_line=this.lines[box.line_idx],original_box=this.boxes[original_line.boxes[0]];return this.margin_debugging[box.box_id].left.from_element=original_box.leftmost,this.margin_debugging[box.box_id].left.from_dir="left",this.margin_debugging[box.box_id].left.original=original_box.left_margin,original_box.left_margin}else return this.margin_debugging[box.box_id].left.from_element=box.leftmost,this.margin_debugging[box.box_id].left.from_dir="left",this.margin_debugging[box.box_id].left.original=box.left_margin,box.left_margin},get_right_margin=box=>{let original_line=this.lines[box.line_idx],original_box=this.boxes[original_line.boxes[original_line.boxes_length-1]];return this.margin_debugging[box.box_id].right.from_element=original_box.rightmost,this.margin_debugging[box.box_id].right.from_dir="right",this.margin_debugging[box.box_id].right.original=original_box.right_margin,original_box.right_margin},should_show_element=data=>lib_default().bubble_version()>=2&&this.owner_instance.get_static_property("fixed_width")?!0:data.rs==="<="&&container_width<=data.rsw?!1:!(data.rs===">"&&container_width>data.rsw);this.box_to_display_line={},this.display_lines=[];let min_width2,d_line=null;for(let i=0;i<this.lines_length;i++){let line=this.lines[i];this.elements[this.boxes[line.boxes[0]].first].wtp||(d_line=null);for(let idx=0;idx<line.boxes_length;idx++){var _d_line$boxes$length,_d_line;let box_id=line.boxes[idx],box=this.boxes[box_id],box_min_width=0,max_width=-1/0,found_visible=!1;for(let idx2 in box.contains){let id=box.contains[idx2];if(should_show_element(this.elements[id])){found_visible=!0,box_min_width=Math.max(box_min_width,this.elements[id].mw);let{maxw}=this.elements[id];maxw!=null?(maxw=maxw/this.elements[id].iw*box.iw,max_width=Math.max(max_width,maxw)):max_width=1/0}}if(!found_visible){this._get_box(box.box_id).hide(),this._visibility_rules.push(...Object.values(box.contains));continue}isFinite(max_width)&&(box.max_width=max_width),box.min_width=Math.min(container_width,box_min_width);let new_idx=(_d_line$boxes$length=(_d_line=d_line)==null?void 0:_d_line.boxes.length)!=null?_d_line$boxes$length:0,requires=box.min_width;this.margin_debugging[box_id]={right:{},left:{}},box.align!=="right"||new_idx!==0&&d_line.boxes[new_idx-1].align!=="left"?(requires+=get_left_margin(box,new_idx),this.margin_debugging[box_id].left.break_first=!0):this.margin_debugging[box_id].left.break_first=!1,box.align!=="left"?(requires+=get_right_margin(box),this.margin_debugging[box_id].right.break_first=!0):this.margin_debugging[box_id].right.break_first=!1,d_line==null?(d_line={boxes:[box],top_margin:line.top_margin,idx:this.display_lines.length,topmost:line.topmost},this.display_lines.push(d_line),min_width2=0):min_width2+requires<=container_width?d_line.boxes.push(box):(d_line={boxes:[box],top_margin:line.top_margin,idx:this.display_lines.length,topmost:line.topmost},this.display_lines.push(d_line),min_width2=0,new_idx=0),min_width2+=box.min_width+get_left_margin(box,new_idx),this.box_to_display_line[box_id]=d_line}}let iterable=(_this$display_lines=this.display_lines)!=null?_this$display_lines:[],line_idx,collapse_margin_mode;for(line_idx=0;line_idx<iterable.length;line_idx++){var _line$boxes;let line=iterable[line_idx],preferred_width=0,fat=0,max_fat=0,margin=0,adjustable_margins=0;(_line$boxes=line.boxes)!=null||(line.boxes=[]);let is_left_margin_adjustable=(box,idx)=>{if(box.align==="left")return this.margin_debugging[box.box_id].left.fixed=box.contains[0],this.margin_debugging[box.box_id].left.fixed_dir="left",!1;let r_box=line.boxes[idx-1];return(r_box==null?void 0:r_box.align)==="right"?(this.margin_debugging[box.box_id].left.fixed=r_box.contains[0],this.margin_debugging[box.box_id].left.fixed_dir="right",!1):(this.margin_debugging[box.box_id].left.fixed=null,!0)};for(let idx=0;idx<line.boxes.length;idx++){let box=line.boxes[idx];fat+=box.iw-box.min_width,box.max_width?max_fat+=box.max_width-box.min_width:box.iw!==box.min_width&&(max_fat=1/0);let left_margin=get_left_margin(box,idx);if(preferred_width+=box.iw+left_margin,is_left_margin_adjustable(box,idx)&&(margin+=left_margin,adjustable_margins++),idx===line.boxes.length-1){let right_margin=get_right_margin(box);preferred_width+=right_margin,box.align!=="right"?(this.margin_debugging[box.box_id].right.fixed=null,margin+=right_margin,adjustable_margins++):(this.margin_debugging[box.box_id].right.fixed=box.contains[0],this.margin_debugging[box.box_id].right.fixed_dir="right")}}let shrink_amount=preferred_width-container_width,shrink_fraction;fat===0?shrink_fraction=1:(line.boxes.length===1&&line.boxes[0].collapse_margin!=null&&line.boxes[0].collapse_margin>=container_width?(collapse_margin_mode=!0,shrink_amount-=margin):collapse_margin_mode=!1,fat>=shrink_amount?fat-shrink_amount>max_fat?(shrink_fraction=max_fat/fat,shrink_amount+=max_fat-fat):(shrink_fraction=(fat-shrink_amount)/fat,shrink_amount=0):(shrink_fraction=0,shrink_amount-=fat));let margin_fraction;margin===0?margin_fraction=1:collapse_margin_mode?margin_fraction=0:(margin_fraction=(margin-shrink_amount)/margin,shrink_amount=0);let margin_adjustment=shrink_amount/-adjustable_margins,box_widths=new Array(line.boxes.length),extra=0,relative_speeds=0;for(let idx=0;idx<line.boxes.length;idx++){let box=line.boxes[idx],box_width=box.min_width+(box.iw-box.min_width)*shrink_fraction;box.max_width&&box_width>box.max_width?(extra+=box_width-box.max_width,box_widths[idx]=box.max_width):(relative_speeds+=box.iw-box.min_width,box_widths[idx]=box_width)}for(;extra>0;){let new_relative=0,extra_used=0;for(let idx=0;idx<line.boxes.length;idx++){let box=line.boxes[idx];if(!box.max_width||box_widths[idx]<box.max_width){let box_width=box_widths[idx]+extra*(box.iw-box.min_width)/relative_speeds;box.max_width&&box_width>box.max_width?(extra_used+=box.max_width-box_widths[idx],box_widths[idx]=box.max_width):(extra_used+=box_width-box_widths[idx],new_relative+=box.iw-box.min_width,box_widths[idx]=box_width)}}extra-=extra_used,extra<1&&(extra=0),relative_speeds=new_relative}let line_div=this._show_line(line_idx);line_div[0].style["margin-top"]=line.top_margin+"px";let box_right=0;for(let idx=0;idx<line.boxes.length;idx++){var _box$contains;let box=line.boxes[idx],box_div=this._get_box(box.box_id);box_div.show(),line_div[0].lastChild!==box_div[0]&&line_div.append(box_div);let left_margin;is_left_margin_adjustable(box,idx)?left_margin=get_left_margin(box,idx)*margin_fraction+margin_adjustment:left_margin=get_left_margin(box,idx);let box_width=box_widths[idx];box_div[0].style.left=box_right+left_margin+"px",box_right+=left_margin+box_width,box_div[0].style.width=box_width+"px";let element_fraction=box_width/box.iw;this.margin_debugging[box.box_id].left.actual=left_margin,idx===line.boxes.length-1&&(this.margin_debugging[box.box_id].right.actual=container_width-box_right),this.margin_debugging[box.box_id].left.collapsed=collapse_margin_mode&&this.margin_debugging[box.box_id].left.fixed_dir!=="left",this.margin_debugging[box.box_id].right.collapsed=collapse_margin_mode&&this.margin_debugging[box.box_id].right.fixed_dir!=="right";let stretched=margin_fraction>1||margin_adjustment>0,squeezed=margin_fraction<1||margin_adjustment<0;this.margin_debugging[box.box_id].left.stretched=stretched,this.margin_debugging[box.box_id].right.stretched=stretched,this.margin_debugging[box.box_id].left.squeezed=squeezed,this.margin_debugging[box.box_id].right.squeezed=squeezed,this.margin_debugging[box.box_id].left.things_to_break=line.boxes.length>1,this.margin_debugging[box.box_id].right.things_to_break=line.boxes.length>1,this.margin_debugging[box.box_id].top={actual:line.top_margin,from_element:line.topmost},idx>0&&(this.margin_debugging[line.boxes[idx-1].box_id].right=this.margin_debugging[box.box_id].left);let object2=(_box$contains=box.contains)!=null?_box$contains:{};for(let idx2 in object2){let id=object2[idx2],min_width3=Math.min(this.elements[id].mw,container_width),element_width=Math.max(min_width3,this.elements[id].iw*element_fraction);this.elements[id].maxw&&element_width>this.elements[id].maxw&&(element_width=this.elements[id].maxw);let total_margin=box_width-element_width,left2;box.iw-this.elements[id].iw===0?left2=total_margin/2:left2=this.elements[id].il/(box.iw-this.elements[id].iw)*total_margin;let should_attach=should_show_element(this.elements[id]);if(should_attach&&!this.elements[id].is_attached){this.elements[id].is_attached=!0,this.calculate_children(id);let DEFAULT_CANVAS_APPEND=(parent,child)=>parent.append(child);this._wait_for_instance_added(id,()=>{var _instance$element$E$w;((_instance$element$E$w=this.instances[id].element.E.wrapped_canvas_append)!=null?_instance$element$E$w:DEFAULT_CANVAS_APPEND)(box_div,this.to_canvas(this.instances[id]))})}else this.elements[id].is_attached!==!1&&!should_attach&&(this.elements[id].is_attached=!1,this.calculate_children(id),this._wait_for_instance_added(id,()=>{this.to_canvas(this.instances[id]).detach()}));should_attach&&this._set_element_width(id,element_width,left2),this.elements[id].is_attached||this._visibility_rules.push(id)}}this.update_display_line_height(line)}this._hide_lines(line_idx),this.recalculate_container(),this.flow_created.turn(),this.emit("resize_width",container_width)}recalculate_container(){u_exports2.WaitFor(this.flow_created,()=>{if(this.owner_instance.supports_message("child_movement")&&this.lines_length>0){let initial_bottom=this.lines[this.lines_length-1].bottom,total_height=0;for(let line of(_this$display_lines2=this.display_lines)!=null?_this$display_lines2:[]){var _this$display_lines2;let max_height=0;for(let box of line.boxes)max_height=Math.max(max_height,box.height);total_height+=max_height+line.top_margin}let delta=total_height-initial_bottom;this.owner_instance.message("child_movement",delta)}})}set_height(instance4,height2,options){var _options2,_this$elements$id;(_options2=options)!=null||(options={});let id=instance4.element_id(),data=(_this$elements$id=this.elements[id])!=null?_this$elements$id:{};if(data.height===height2)return;data.height=height2,options.no_css_update||this._update_instance(id,()=>{this.to_canvas(instance4)[0].style.height=data.height+"px"});let delta=height2-data.ih;delta!==data.height_delta&&(data.height_delta=delta,this.calculate_children(id))}calculate_children(id){let data=this.elements[id];if(data==null){let display2,element=appquery_default.by_id(id),element_name=element==null?void 0:element.display();if(element_name!=null){let root_name=element.root().display();display2=`Could not draw element ${element_name} on ${root_name}, please make some changes to it or recreate it in the editor and retry`}else display2="Could not draw an element on the page, please ask the Bubble team for guidance";throw new OwnerError("Missing responsive index",{display:display2,element_id:id,tags:{user_level:"owner_error"}})}if(!data.pushes)this.recalculate_box_height(data.box),this.recalculate_container();else for(let idx in data.pushes){let child=data.pushes[idx];this.recalculate(child)}}_get_height_delta(id){if(this.elements[id].is_attached){var _this$elements$id$hei;return(_this$elements$id$hei=this.elements[id].height_delta)!=null?_this$elements$id$hei:0}else{var _this$elements$id$ih;return(_this$elements$id$ih=-this.elements[id].ih)!=null?_this$elements$id$ih:0}}recalculate(id){let new_top_delta,data=this.elements[id];if(!data.pushed_by)new_top_delta=0;else{let deltas=Object.values(data.pushed_by).map(pusher=>{var _this$elements$pusher;return this._get_height_delta(pusher)+((_this$elements$pusher=this.elements[pusher].top_delta)!=null?_this$elements$pusher:0)});new_top_delta=Math.max(...deltas)}if(new_top_delta!==data.top_delta){data.top_delta=new_top_delta;let new_top=data.top_delta+data.it;data.top!==new_top&&(data.top=new_top,this._update_instance(id,()=>{this.to_canvas(this.instances[id])[0].style.top=data.top+"px"})),this.calculate_children(id)}}to_canvas(instance4){return instance4.canvas}add_to_instances(instance4){var _this$elements2,_instance$element_id,_this$elements2$_inst;(_this$elements2$_inst=(_this$elements2=this.elements)[_instance$element_id=instance4.element_id()])!=null||(_this$elements2[_instance$element_id]={}),this.instances[instance4.element_id()]=instance4}add(instance4){let{element}=instance4,canvas=this.to_canvas(instance4);if(element instanceof lang_default.Root){this.container_canvas.append(canvas),canvas[0].style["z-index"]=2,canvas[0].style.position="absolute";return}let id=element.id(),data=this.elements[id];data!=null&&(this.instances[id]=instance4,this.instances_keys[id]&&(this.instances_keys[id].turn(),this.instances_keys[id]=null),instance4.wait_for_visible_lite(()=>{let{style:style2}=canvas[0];style2.position="absolute",style2.boxSizing="border-box",style2.zIndex=data.iz,data.height==null&&(data.height=data.ih,style2.height=data.height+"px"),data.width==null&&(data.width=data.iw,style2.width=data.width+"px"),data.left==null&&(data.left=data.il,style2.left=data.left+"px"),data.top==null&&(data.top=data.it,style2.top=data.top+"px")}))}create_child(owner_instance,container_canvas){let{custom_definition}=owner_instance.element.E;if(custom_definition)return custom_definition().get_responsive_version()>0?new ResponsiveV1Container(owner_instance,container_canvas):custom_definition().use_responsive_algorithm()?new _Container(owner_instance,container_canvas,owner_instance.element.get_responsive_data()):new OldContainer(owner_instance,container_canvas);{let c=new this.constructor(owner_instance,container_canvas,owner_instance.element.get_responsive_data(),this.owner);return this.child_containers.push(c),c}}initialize(){tab_container(this.owner_instance)}detach(instance4){this.to_canvas(instance4).detach()}};function set_responsive_container(responsive_container_ref){ResponsiveV1Container=responsive_container_ref}init_responsive_evaluation();var ResponsiveContainer2=class _ResponsiveContainer{constructor(owner_instance,container_canvas){this.owner_instance=owner_instance,this.container_canvas=container_canvas,this._destroy_fns=[],this.instances={},this.element_autoruns={},this.child_containers=[],this.flow_created=u_exports2.MakeKey(null,"flow created"),this.dependency=u_exports2.Dependency(),this.owner_instance!=null&&this.container_canvas!=null&&(this.owner_instance.run_mode()&&this.handle_extra_wrapper(),this.container_canvas.addClass("bubble-r-container"),this.owner_instance.element.type()==="Page"&&is_debug_mode()&&(this.owner_instance.element.container_layout()==="fixed"?this.container_canvas.css("height",this.container_canvas.height()+300):this.container_canvas.css("padding-bottom",300)),this.autorun(()=>{let layout=this.layout();this.container_canvas.removeClass(CONTAINER_CLASSES),this.container_canvas.addClass(layout.classes),this.container_canvas.css(containerLayoutStyling(this.owner_instance))}))}destroy(){var _this$owner_instance;if(!this.destroyed){this.destroyed=!0,(_this$owner_instance=this.owner_instance)==null||_this$owner_instance.destroy(),this.owner_instance=null;for(let container of(_this$child_container=this.child_containers)!=null?_this$child_container:[]){var _this$child_container;container.destroy()}for(let fn of this._destroy_fns)fn();this._destroy_fns=void 0}}on_destroy(fn){this.destroyed?fn():this._destroy_fns.push(fn)}autorun(fn,cleanup){let ar=u_exports2.autorun(()=>{this.destroyed||fn()},cleanup);return this.on_destroy(()=>ar.destroy()),ar}handle_extra_wrapper(){this.owner_instance.element.should_add_extra_wrapper()&&(this.container_canvas.addClass("bubble-r-container-wrapper"),this.container_canvas=div("",this.container_canvas))}layout_type(){var _this$owner_instance$,_this$owner_instance2;return(_this$owner_instance$=(_this$owner_instance2=this.owner_instance)==null?void 0:_this$owner_instance2.element.container_layout())!=null?_this$owner_instance$:"fixed"}layout(){return LAYOUT_PROPERTIES[this.layout_type()]}resize_width(){}add_to_instances(instance4){this.instances[instance4.element_id()]=instance4}remove_from_instances(instance4){delete this.instances[instance4.element_id()]}ready_key(){return this.flow_created}get_canvas(){return this.container_canvas}get_owner(){return this.owner_instance}render(html){let canvas=$(html);return canvas.addClass("bubble-element"),canvas}to_canvas(instance4){return instance4.canvas}set_height(instance4,height2){instance4.canvas.css("height",height2)}setup_element(instance4){let canvas=this.to_canvas(instance4),{element}=instance4;instance4.autorun(()=>{canvas.css("z-index",element.get_zindex())}),instance4.autorun(()=>{this.autorun(()=>{canvas.css(element_reset),canvas.css(layoutStyling(instance4))}),this.autorun(()=>{instance4.element.collapse_when_hidden()?this.autorun(()=>{instance4.should_collapse()?canvas.hide():canvas.show()}).set_run_immediately(!0):canvas.show()})})}root_css(instance4){var _element$root_max_wid,_element$root_max_hei;let{element}=instance4;return{width:instance4.run_mode()?"100%":lib_default().visual_edit.root_width(),"min-width":element.root_min_width(),"max-width":(_element$root_max_wid=element.root_max_width())!=null?_element$root_max_wid:"","min-height":element.root_min_height(),"max-height":(_element$root_max_hei=element.root_max_height())!=null?_element$root_max_hei:""}}setup_root(instance4){let canvas=this.to_canvas(instance4);canvas.css({"z-index":2,position:"relative"}),this.autorun(()=>{canvas.css(this.root_css(instance4))})}add(instance4){let{element}=instance4,canvas=this.to_canvas(instance4);if(element instanceof lang_default.Root){this.autorun(()=>{this.setup_root(instance4)}),this.container_canvas.append(canvas);return}else if(!element.added_to_container())return;let id=instance4.element.id();this.instances[id]=instance4,this.element_autoruns[id]=this.autorun(()=>{this.setup_element(instance4)}),this.container_canvas.append(canvas)}create_child(owner_instance,container_canvas){let custom_definition=owner_instance.element.E.custom_definition;if(custom_definition)return custom_definition().get_responsive_version()>0?new _ResponsiveContainer(owner_instance,container_canvas):custom_definition().use_responsive_algorithm()?new Container(owner_instance,container_canvas,owner_instance.element.get_responsive_data()):new OldContainer(owner_instance,container_canvas);{let c=new _ResponsiveContainer(owner_instance,container_canvas);return this.child_containers.push(c),c}}initialize(){this.flow_created.turn()}detach(instance4){this.to_canvas(instance4).detach()}};init_responsive_evaluation();function LegacyComponent(props){let instance4=props.instance;if(instance4.edit_mode()){let componentBuilder=instance4.element.E.edit_fallback_component;if(componentBuilder!=null){let el=Object.create(instance4.element);el.should_add_extra_wrapper=()=>!1;let Component=componentBuilder.buildComponent(el,void 0);return onMount(()=>{instance4.is_drawn||(instance4.mark_skeleton_ready(),instance4.initialize_canvas())}),createComponent(Component,{instance:instance4})}}let addedToContainer=instance4.element.added_to_container();if(instance4.canvas==null){let className2=instance4.edit_mode()?"inner-element":`bubble-element ${instance4.element.type()}`,html=instance4.get_html();instance4.canvas=$(html),instance4.canvas.addClass(className2),instance4.edit_mode()&&instance4.canvas.attr("id",instance4.element_id().replace(/[^a-zA-Z0-9]/g,"_")),instance4.canvas[0].bubble_data={bubble_instance:instance4},instance4._observe_canvas()}if(onAfterMount(()=>{let canvas=instance4.canvas;if(!addedToContainer&&!instance4.thumbnail_mode()&&instance4.position_canvas(canvas),!instance4.has_skeleton){let container=new ResponsiveContainer2;instance4.container=container,instance4.create_child_skeletons(container)}let ars=[];return!instance4.edit_mode()&&addedToContainer&&ars.push(instance4.autorun(()=>{canvas.css(element_reset),canvas.css(layoutStyling(instance4))}),instance4.autorun(()=>{canvas.css("z-index",instance4.element.get_zindex())}),instance4.autorun(()=>{instance4.element.collapse_when_hidden()?instance4.autorun(()=>{instance4.should_collapse()?canvas.css("display","none"):canvas.css("display","")}).set_run_immediately(!0):canvas.css("display","")})),instance4.edit_mode()&&!instance4._is_visible_me&&instance4._hide_me(),instance4.mark_skeleton_ready(),instance4.is_drawn||instance4.initialize_canvas(),instance4.get_children_drawn_key().turn(),()=>{ars.forEach(ar=>{ar.destroy()})}}),instance4.edit_mode()){let editStyle=createMemo(()=>{var _instance$element$get;return{...layoutStyling(instance4),"z-index":(_instance$element$get=instance4.element.get_zindex())!=null?_instance$element$get:void 0,display:instance4.element.collapse_when_hidden()&&instance4.should_collapse()?"none":""}}),EditWrapper=useContext(EditorContext).wrapper;return createComponent(EditWrapper,{instance:instance4,get style(){return editStyle()},get children(){return instance4.canvas[0]}})}else return addedToContainer?instance4.canvas[0]:document.createTextNode("")}var import_autorun6=__toESM(require_autorun());function RenderElement(props){var _instance$element$sol;let instance4=props.instance;if(!instance4.is_solid_initialized){warn(`Attempting to render an element which doesn't have solid initialized. ${instance4.toUniqueString()}`);return}(instance4.element.solid_component!=null||instance4.children.length===0)&&onAfterMount(()=>instance4.mark_skeleton_ready());let SolidComponent=(_instance$element$sol=instance4.element.solid_component)!=null?_instance$element$sol:LegacyComponent,renderComponent=()=>instance4.element.can_have_children()&&!instance4.element.draws_own_children()?createComponent(SolidComponent,mergeProps(props,{get children(){return instance4.children.map(child=>createComponent(RenderElement,{instance:child}))}})):createComponent(SolidComponent,props);if(instance4.thumbnail_mode()){let[ready]=createResource(async()=>await(0,import_autorun6.run_once)(30,()=>{var _instance$element$E$c,_instance$element$E;return instance4.element.raw(),(_instance$element$E$c=(_instance$element$E=instance4.element.E).custom_definition)==null||_instance$element$E$c.call(_instance$element$E).raw(),!0}));return instance4.element.E.use_legacy_in_thumbnail&&(renderComponent=()=>createComponent(LegacyComponent,props)),createComponent(Show,{get when(){return ready()},get children(){return renderComponent()}})}return untrack(()=>instance4.draw_signal.get())?renderComponent():createComponent(Show,{get when(){return instance4.draw_signal.get()},get children(){return renderComponent()}})}var MAX_NUMBER_OF_CELLS3=5e3;function RunRepeatingComponent(props){var _props$dataInstance,_props$dataInstance2;let instance4=props.instance,dataInstance=(_props$dataInstance=props.dataInstance)!=null?_props$dataInstance:instance4,layout=props.layout,data_instance=(_props$dataInstance2=props.dataInstance)!=null?_props$dataInstance2:instance4,startIndex=()=>{if(props.fixedList){var _instance$state;return(_instance$state=instance4.state("show_range"))!=null?_instance$state:0}else return 0},listLength=()=>{if(props.fixedList)return props.totalCells;{var _instance$state2;let maxIndex=(_instance$state2=instance4.state("max_index"))!=null?_instance$state2:0;return props.showAllItems?maxIndex:maxIndex+1}},[listInitialized,setListInitialized]=createSignal(!1),raw_list_dependency=(0,import_dependency6.Dependency)();createEffect(()=>{if(!props.turnedVisible)return;instance4.run_mode()&&layout.compute_extra_fields();let setup_cells=()=>{let ar=instance4.autorun(()=>{if(!props.fixedList)if(props.showAllItems){var _data_instance$state;let length=(_data_instance$state=data_instance.state("list_data"))==null?void 0:_data_instance$state.length(),n=Math.min(length!=null?length:0,MAX_NUMBER_OF_CELLS3);instance4.state("max_index",n)}else queueMicrotask(()=>{(0,import_autorun7.autorun_once)(()=>{instance4.state("max_index",Math.min(layout.guess_number_of_cells(instance4)*2,100))})})});layout.init_raw_list_watcher(()=>startIndex(),()=>listLength()),raw_list_dependency.invalidate();let visibleWaiter=instance4.autorun(()=>{data_instance.state("list_data")!==void 0&&((0,import_autorun7.wait_for_updates)(()=>{instance4.mark_children_registered(),instance4.get_children_drawn_key().turn()}),instance4.setTimeout(()=>visibleWaiter.destroy()))}),spinner2=instance4.autorun(()=>{layout.add_spinner(),layout.raw_list_data(),layout.remove_spinner()});onCleanup(()=>{ar.destroy(),visibleWaiter.destroy(),spinner2.destroy()}),setListInitialized(!0)};on_server()?setup_cells():queueMicrotask(setup_cells)});let listData=createWatcher(()=>{var _layout$raw_list_data,_layout$raw_list_data2;return raw_list_dependency.register(),(_layout$raw_list_data=(_layout$raw_list_data2=layout.raw_list_data())==null?void 0:_layout$raw_list_data2.filter(item=>item!=null))!=null?_layout$raw_list_data:[]},{fallback:[]});instance4.children=[];let instanceChildren=()=>{if(!listInitialized())return!props.fixedList&&!props.showAllItems&&(instance4.children.length<1&&addChild(),instance4.children[0].message("set_group_data",STATE_NOT_READY2)),instance4.children;function addChild(){let index=instance4.children.length,groupItem=new GroupItem(instance4,0,index,props.dataInstance),childInstance;isServer?childInstance=elements_default.ServerElementInstance(groupItem):childInstance=elements_default.ElementInstance(groupItem,instance4.mode),childInstance._is_visible_me=!0,groupItem.instance=childInstance,instance4.children.push(childInstance),childInstance.state("cell_index",index+1),childInstance.register(data_instance),childInstance.create_draw_signals(),childInstance.start_draw_tree()}for(layout.set_loading(!0),(0,import_autorun7.wait_for_updates)(()=>{let[error2,ready]=layout._raw_list_data_watcher.get_current_status_array();layout.set_loading(!ready||error2!=null)});instance4.children.length<listData().length;)addChild();return listData().forEach((item,index)=>{let child=instance4.children[index];on_client()&&(0,import_b_async6.WaitFor)(page_loaded_key,()=>{var _child$can_register_w;return(_child$can_register_w=child.can_register_workflows())==null?void 0:_child$can_register_w.turn()}),child.message("set_group_data",item)}),instance4.children};function addCells(numToAdd){let maxIndex=instance4.state("max_index");instance4.state("loading_cells",!0),(0,import_autorun7.run_once)(30,()=>{var _data_instance$state$,_data_instance$state2,_data_instance$state3;return(_data_instance$state$=(_data_instance$state2=data_instance.state("list_data"))==null||(_data_instance$state3=_data_instance$state2.with_extra_fields)==null?void 0:_data_instance$state3.call(_data_instance$state2,layout.extra_fields).get_children(maxIndex,numToAdd))!=null?_data_instance$state$:[]},(err,lastEntry)=>{if(err){log(ensure_bubble_error(err)),instance4.state("loading_cells",!1);return}if(lastEntry!=null&&lastEntry.length){let toAdd=Math.min(lastEntry.length,numToAdd);instance4.state("max_index",maxIndex+toAdd),(0,import_autorun7.wait_for_updates)(()=>{instance4.state("loading_cells",!1)})}else instance4.state("loading_cells",!1)})}function loadMoreCells(fromRoot){if(instance4.state("loading_cells"))return;let numRows,numColumns;if(props.scrollDirection!=="horizontal"){numColumns=layout.estimate_one_row();let distanceToBottom;fromRoot?distanceToBottom=window.innerHeight*3-dataInstance.canvas[0].getBoundingClientRect().bottom:distanceToBottom=dataInstance.canvas[0].clientHeight*3-(dataInstance.canvas[0].scrollHeight-dataInstance.canvas[0].scrollTop);let estimatedCellHeight=instance4.children[0].canvas.height();numRows=Math.ceil(Math.max(distanceToBottom/estimatedCellHeight,1))+2}else{numRows=props.rows;let distanceToRight;fromRoot?distanceToRight=window.innerWidth*2-dataInstance.canvas[0].getBoundingClientRect().right:distanceToRight=dataInstance.canvas[0].clientWidth*3-(dataInstance.canvas[0].scrollWidth-dataInstance.canvas[0].scrollLeft);let estimatedCellWidth=instance4.children[0].canvas.width();numColumns=Math.ceil(Math.max(distanceToRight/estimatedCellWidth,1))+2}let numToAdd=numRows*numColumns;addCells(numToAdd)}let intersectionObserver=()=>null;if(!isServer){let observerKind=createMemo(()=>{if(!instance4.run_mode()||listData().length===0||props.fixedList||props.showAllItems)return null;let canScroll;return props.scrollDirection!=="horizontal"?canScroll=dataInstance.canvas[0].scrollHeight>dataInstance.canvas[0].clientHeight:canScroll=dataInstance.canvas[0].scrollWidth>dataInstance.canvas[0].clientWidth,canScroll?"self":"root"});intersectionObserver=createMemo(()=>observerKind()==null?null:observerKind()==="self"?new IntersectionObserver(entries=>{entries[0].isIntersecting&&loadMoreCells()},{root:dataInstance.canvas[0],rootMargin:"100%"}):new IntersectionObserver(entries=>{entries[0].isIntersecting&&loadMoreCells(!0)},{rootMargin:"100%"}))}onAfterMount(()=>{instance4.on_message("draw_till",index=>{props.fixedList||instance4.state("max_index")>index||addCells(index+1-instance4.state("max_index"))})});let sendObserver=createWatcher(()=>!instance4.state("loading_cells"));return createComponent(For,{get each(){return instanceChildren()},children:(child,index)=>{let{output:output3,disposer}=createRoot(disposer2=>(child.on_destroy(disposer2),{disposer:disposer2,output:createComponent(RenderElement,mergeProps({instance:child},()=>{var _props$childProps;return(_props$childProps=props.childProps)==null?void 0:_props$childProps.call(props,index)},{get cellSizing(){return props.cellSizing},get hidden(){return index()>=listData().length},get intersectionObserver(){return createMemo(()=>!!(sendObserver()&&index()===listData().length-1))()?intersectionObserver():null}}))}));return onCleanup(()=>disposer()),output3}})}init_define_process_env();init_shim();function createIndexFns(props){return createWatcher(()=>{if(props.scrollDirection==="vertical"){let numColumns=props.columns;return{indexToRow:index=>Math.floor(index/numColumns),indexToColumn:index=>index%numColumns}}else if(props.scrollDirection==="horizontal"){let numRows=props.rows;return{indexToRow:index=>index%numRows,indexToColumn:index=>Math.floor(index/numRows)}}else return{indexToRow:()=>0,indexToColumn:()=>0}},{fallback:{indexToRow:index=>0,indexToColumn:index=>0}})}function RunRepeatingGroup(props){let instance4=props.instance,layout=instance4.repeating_group_layout;if(!layout)return[];let fixedList=()=>layout.fixed_list(),showAllItems=()=>instance4.get_static_property("show_all_items"),isMasonry=()=>layout.is_masonry(),scrollDirection=()=>layout.scroll_direction(),columns=()=>layout.columns(),rows2=()=>layout.rows(),totalCells=()=>layout.total_number_of_cells(),indexFns=createIndexFns({get rows(){return rows2()},get columns(){return columns()},get scrollDirection(){return scrollDirection()}});return createComponent(RunRepeatingComponent,mergeProps(props,{layout,get fixedList(){return fixedList()},get showAllItems(){return showAllItems()},get scrollDirection(){return scrollDirection()},get rows(){return rows2()},get totalCells(){return totalCells()},childProps:index=>({get hasTopBorder(){return!isMasonry()&&indexFns().indexToRow(index())>0},get hasLeftBorder(){return!isMasonry()&&indexFns().indexToColumn(index())>0},get firstRow(){return isMasonry()&&indexFns().indexToRow(index())===0},get cellSizing(){return props.cellSizing},separatorStyle:props.separatorStyle,separatorWidth:props.separatorWidth,separatorColor:props.separatorColor})}))}init_ServerElementInstance();init_u2();init_define_process_env();init_shim();init_solid();var ThumbnailContext=createContext(),ThumbnailContext_default=ThumbnailContext;var _tmpl$31=template("<div>"),GROUP_ITEM_SELECTOR="> .group-item";function RepeatingGroupComponent(props){var _ref,_useContext$repeating,_useContext,_useContext2;let instance4=props.instance,layout=instance4.repeating_group_layout;if(!layout)throw new UnexpectedError("Repeating group layout not found");let isRgFlex=()=>layout.is_rg_flex(),isMasonry=()=>layout.is_masonry(),RepeatingGroupImplementation=(_ref=(_useContext$repeating=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.repeatingGroupImplementation)!=null?_useContext$repeating:(_useContext2=useContext(ThumbnailContext_default))==null?void 0:_useContext2.repeatingGroupImplementation)!=null?_ref:RunRepeatingGroup;return(()=>{var _el$=_tmpl$31();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(RepeatingGroupImplementation,mergeProps(props,{get cellSizing(){return props.childStyles[GROUP_ITEM_SELECTOR]},get children(){return props.children}}))),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.classList,"bubble-rg":!isRgFlex(),"bubble-rg-flex-row":isRgFlex(),masonry:isMasonry()},_v$3={overflow:instance4.run_mode()?"auto":void 0,"-webkit-overflow-scrolling":instance4.run_mode()?"auto":void 0,...props.style};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=classList(_el$,_v$2,_p$.t),_p$.a=style(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var RepeatingGroupComponent_default=createElement2(RepeatingGroupComponent,void 0,element=>({properties:{separatorWidth:new Property(instance4=>_get_separator_width(instance4.element),{fallback:0}),separatorColor:new Property(instance4=>instance4.get_static_property("separator_color"),{fallback:""}),separatorStyle:new Property(instance4=>instance4.get_static_property("separator_style"),{fallback:"none"})},styles:[new Style(instance4=>{let fixedRows=instance4.get_static_property("fixed_rows"),fixedColumns=instance4.get_static_property("fixed_columns"),scrollDirection=!fixedRows&&!fixedColumns?instance4.get_static_property("scroll_direction"):fixedColumns?"vertical":"horizontal",autoFitRow=instance4.get_static_property("auto_fit_row"),autoFitColumn=instance4.get_static_property("auto_fit_column"),autoSizeRow=autoFitRow?"auto-fit":"auto-fill",autoSizeColumn=autoFitColumn?"auto-fit":"auto-fill",isRgFlex=scrollDirection==="flex_row",isMasonry=!fixedRows&&scrollDirection==="vertical"&&!instance4.get_static_property("auto_fit_row")&&instance4.get_static_property("masonry"),style2={};if(isRgFlex||isMasonry){var _element_eval$evaluat;if(style2["column-gap"]=`${(_element_eval$evaluat=evaluate_property(instance4,"column_cell_gap"))!=null?_element_eval$evaluat:0}px`,!(isMasonry&&instance4.run_mode())){var _element_eval$evaluat2;style2["row-gap"]=`${(_element_eval$evaluat2=evaluate_property(instance4,"row_cell_gap"))!=null?_element_eval$evaluat2:0}px`}if(isRgFlex)return style2["align-content"]=autoFitRow?"stretch":"flex-start",style2}else style2.gap=`${_get_separator_width(instance4.element)}px`;if(fixedRows){var _element_eval$evaluat3;let numRows=(_element_eval$evaluat3=evaluate_property(instance4,"rows"))!=null?_element_eval$evaluat3:0;is_fitting_height(instance4)?style2["grid-template-rows"]=`repeat(${numRows}, minmax(max-content, auto))`:style2["grid-template-rows"]=`repeat(${numRows}, minmax(0, 1fr))`}else if(scrollDirection==="vertical")if(autoFitRow)style2["grid-auto-rows"]="minmax(max-content, 1fr)";else{var _element_eval$evaluat4;style2["grid-auto-rows"]=isMasonry&&instance4.run_mode()?"max-content":`minmax(max-content, ${(_element_eval$evaluat4=evaluate_property(instance4,"cell_min_height_css"))!=null?_element_eval$evaluat4:"0px"})`}else{var _element_eval$evaluat5;style2["grid-template-rows"]=`repeat(${autoSizeRow}, minmax(${(_element_eval$evaluat5=evaluate_property(instance4,"cell_min_height_css"))!=null?_element_eval$evaluat5:"1fr"}, 1fr))`}if(fixedColumns){var _element_eval$evaluat6;let numColumns=(_element_eval$evaluat6=evaluate_property(instance4,"columns"))!=null?_element_eval$evaluat6:0;is_fitting_width(instance4)?style2["grid-template-columns"]=`repeat(${numColumns}, minmax(max-content, auto))`:style2["grid-template-columns"]=`repeat(${numColumns}, minmax(0, 1fr))`}else if(scrollDirection==="horizontal")if(instance4.element.container_layout()===FIXED_LAYOUT)style2["grid-auto-columns"]=evaluate_property(instance4,"cell_min_width_css");else if(autoFitColumn)style2["grid-auto-columns"]="minmax(max-content, 1fr)";else{var _element_eval$evaluat7;style2["grid-auto-columns"]=`minmax(max-content, ${(_element_eval$evaluat7=evaluate_property(instance4,"cell_min_width_css"))!=null?_element_eval$evaluat7:"0px"})`}else{var _element_eval$evaluat8;style2["grid-template-columns"]=`repeat(${autoSizeColumn}, minmax(${(_element_eval$evaluat8=evaluate_property(instance4,"cell_min_width_css"))!=null?_element_eval$evaluat8:"1fr"}, 1fr))`}return style2["grid-auto-flow"]=scrollDirection==="vertical"?"row":"column",style2}),new Style(instance4=>{var _element_eval$evaluat10;let fixedRows=instance4.get_static_property("fixed_rows"),fixedColumns=instance4.get_static_property("fixed_columns"),scrollDirection=!fixedRows&&!fixedColumns?instance4.get_static_property("scroll_direction"):fixedColumns?"vertical":"horizontal",isRgFlex=scrollDirection==="flex_row",isMasonry=!fixedRows&&scrollDirection==="vertical"&&!instance4.get_static_property("auto_fit_row")&&instance4.get_static_property("masonry"),cellMinWidth=()=>{if(fixedColumns||scrollDirection==="vertical")return"";let minWidthCSS=evaluate_property(instance4,"cell_min_width_css");if(isRgFlex)return minWidthCSS;if(minWidthCSS!=null&&minWidthCSS.includes("%")){if(is_fitting_width(instance4))return"";let percentage=Math.max(parseInt(minWidthCSS),1),rgWidth;if(instance4 instanceof ServerElementInstance){instance4.dynamic_catcher=!0;let w=min_width_css(instance4);if(w.includes("px"))rgWidth=parseInt(w);else return""}else{var _instance$repeating_g,_instance$canvas$widt,_instance$canvas;(_instance$repeating_g=instance4.repeating_group_layout)==null||_instance$repeating_g.register_resize(),rgWidth=(_instance$canvas$widt=(_instance$canvas=instance4.canvas)==null?void 0:_instance$canvas.width())!=null?_instance$canvas$widt:0}return`${Math.floor(rgWidth*percentage/100)}px`}else return minWidthCSS},cellMinHeight=()=>{var _element_eval$evaluat9;if(fixedRows||scrollDirection==="horizontal")return"";let minHeightCSS=(_element_eval$evaluat9=evaluate_property(instance4,"cell_min_height_css"))!=null?_element_eval$evaluat9:"";if(isRgFlex)return minHeightCSS;if(minHeightCSS!=null&&minHeightCSS.includes("%")){if(is_fitting_height(instance4))return"";let percentage=Math.max(parseInt(minHeightCSS),1),rgHeight;if(instance4 instanceof ServerElementInstance){instance4.dynamic_catcher=!0;let h=min_height_css(instance4);if(h.includes("px"))rgHeight=parseInt(h);else return""}else{var _instance$repeating_g2,_instance$canvas$heig,_instance$canvas2;(_instance$repeating_g2=instance4.repeating_group_layout)==null||_instance$repeating_g2.register_resize(),rgHeight=(_instance$canvas$heig=(_instance$canvas2=instance4.canvas)==null?void 0:_instance$canvas2.height())!=null?_instance$canvas$heig:0}return`${Math.floor(rgHeight*percentage/100)}px`}else return minHeightCSS};return{"min-width":cellMinWidth(),"min-height":cellMinHeight(),"padding-top":isMasonry?`${(_element_eval$evaluat10=evaluate_property(instance4,"row_cell_gap"))!=null?_element_eval$evaluat10:0}px`:void 0,"box-sizing":isRgFlex?"border-box":"content-box","flex-grow":isRgFlex?instance4.get_static_property("auto_fit_column")?1:0:void 0}},{selector:GROUP_ITEM_SELECTOR,alwaysDynamic:!0}),...placedStyling(element)]}));init_element_eval();init_ElementInstance();init_btype_ids();make_element("RepeatingGroup",{display:"Repeating Group",category:"containers",glyph_id:"repeating_group",list_order:2,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{width:300,height:350,fixed_columns:!0,fixed_rows:!0},properties_for_new:{container_layout:"column",min_height_css:"232px",single_width:!1,min_width_css:"140px",fit_width:!0,cell_min_height_css:"56px"},updated_default_sizing:{width:280},field_names:{group_type:{no_states:!0},data_source:{},rows:{default:4},columns:{default:1},separator_style:{default:"dashed",no_states:!0,in_style:!0},separator_width:{default:1,no_states:!0,in_style:!0},separator_color:{default:"#969696",no_states:!0,in_style:!0},row_cell_gap:{default:0},column_cell_gap:{default:0},layout_style:{default:"infinite_scroll",no_states:!0},cell_min_width:{no_states:!0,default:100},fixed_width:{no_states:!0},use_max_width:{no_states:!0,default:!1},max_width:{default:100,optional:!0,no_states:!0},allow_more_than_one_colum:{default:!1,no_states:!0},responsive_alignment:{default:"center",no_states:!0},fixed_columns:{default:!1,no_states:!0},fixed_rows:{default:!1,no_states:!0},cell_min_width_css:{default:"100px"},cell_min_height_css:{default:"100px"},auto_fit_row:{default:!1,no_states:!0},auto_fit_column:{default:!1,no_states:!0},scroll_direction:{default:"vertical",no_states:!0},show_all_items:{default:!1,no_states:!0},masonry:{default:!1,no_states:!0}},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:RepeatingGroupComponent_default,no_fixed_sizing:!0,can_fit_width(element){return element.get_static_property("fixed_columns")||element.get_static_property("fixed_rows")||element.get_static_property("scroll_direction")!=="vertical"},can_fit_height(element){return element.get_static_property("fixed_columns")||element.get_static_property("fixed_rows")||element.get_static_property("scroll_direction")!=="horizontal"},get_html(instance4){return"<div></div>"},change_cursor_style_if_clickable:!0,is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,show_overflow_on_drag:!0,get_states(element){return["list_data","show_range","loading"]},new_namespace:!0,use_element_search_data(){},show_borders(instance4){return instance4.state("show_borders",!0)},hide_borders(instance4){return instance4.state("show_borders",!1)},is_list:!0,can_have_children(){return!0},register_children(instance4){},create_child_skeletons(instance4){var _instance$repeating_g;(_instance$repeating_g=instance4.repeating_group_layout)==null||_instance$repeating_g.do_create_container()},draws_own_children(){return!0},is_repeating(){return!0},draw_children(instance4){},can_defer_drawing(){return!0},register(instance4){instance4.repeating_group_layout=new RepeatingGroupLayoutStyle({instance:instance4}),instance4.repeating_group_layout.do_register(),instance4.repeating_layout_type="RepeatingGroup",instance4.on_destroy(()=>{var _instance$repeating_g2;(_instance$repeating_g2=instance4.repeating_group_layout)==null||_instance$repeating_g2.destroy()})},initialize(instance4){instance4.repeating_group_layout.do_initialize()},get_children_canvas(instance4){return $("> .list-item",instance4.get_canvas())},get_min_width(element){if(element.get_static_property("fixed_width"))return element.get_width();{var _cell_min_width;let val=element.get_static_property((_cell_min_width="cell_min_width")!=null?_cell_min_width:0),iwidth=_get_cell_width(element);return val>iwidth?iwidth:val}},get_state_value(element,name){if(name==="list_data"){let btype_id=element.get_static_property("group_type");return btype_id?list_type(btype_id):"null"}},check_for_errors(element,report){var _element$root;if(((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())<1&&element.get_static_property("layout_style")==="vertical_extendable"){let make_sure_not_in_another_ext_scroll_rg_recursive2=function(previous_gen){var _parent$type,_parent$type2;let parent=previous_gen.parent();parent==null||((_parent$type=parent.type)==null?void 0:_parent$type.call(parent))==="Page"||(((_parent$type2=parent.type)==null?void 0:_parent$type2.call(parent))==="RepeatingGroup"?parent.get_static_property("layout_style")==="vertical_extendable"&&report(element.get_name()+": extendible vertical scrolling repeating group cannot be nested"):make_sure_not_in_another_ext_scroll_rg_recursive2(parent))};var make_sure_not_in_another_ext_scroll_rg_recursive=make_sure_not_in_another_ext_scroll_rg_recursive2;make_sure_not_in_another_ext_scroll_rg_recursive2(element)}(void 0)(element,"get_list_data",report)},add_specific_messages(messages,element){if(element.E.get_state_value(element,"list_data")!=null){let split_into_array=element.E.get_state_value(element,"list_data").split(".");if(split_into_array[split_into_array.length-1]===element.id())return messages}let list_btype=element.get_state_value("list_data");if(list_btype){var _element$root2;extend(messages,{get_list_data:{description:"'s "+list_btype.display(),is_client_state(){return!0},section:"States",ret_btype:list_btype,fn(a,b){var _a$state$list_cast,_a$state,_list_btype$inner,_list_btype$inner2;return(_a$state$list_cast=a==null||(_a$state=a.state("list_data"))==null?void 0:_a$state.list_cast((_list_btype$inner=list_btype.inner())==null?void 0:_list_btype$inner.id()))!=null?_a$state$list_cast:new StaticList_default([],null,(_list_btype$inner2=list_btype.inner())==null?void 0:_list_btype$inner2.id())}},get_loading_status:{description:" is loading",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a,b){var _a$state2;return(_a$state2=a==null?void 0:a.state("loading"))!=null?_a$state2:this.ret_btype_null()}}}),((_element$root2=element.root())==null?void 0:_element$root2.get_responsive_version(!0))>0?element.get_static_property("fixed_rows")&&element.get_static_property("fixed_columns")&&extend(messages,{page_number:{description:"'s page number",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a){let columns,rows2,cursor=a==null?void 0:a.state("show_range");a instanceof ElementInstance_default?(rows2=evaluate_property(a,"rows"),columns=evaluate_property(a,"columns")):(rows2=element.get_static_property("rows",!0),columns=element.get_static_property("columns",!0));let window_size=rows2*columns;return cursor==null||rows2==null||columns==null?null:Math.ceil(cursor/window_size)+1}},is_first_page:{description:" is on the first page",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a,b){return(a==null?void 0:a.state("show_range"))===0}},is_last_page:{description:" is on the last page",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a){var _a$state3;let cursor=a==null?void 0:a.state("show_range"),window_size=evaluate_property(a,"rows")*evaluate_property(a,"columns"),length=a==null||(_a$state3=a.state("list_data"))==null?void 0:_a$state3.length();return window_size+cursor>=length}}}):element.get_static_property("layout_style")==="limit_items"&&extend(messages,{page_number:{description:"'s page number",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a){let cursor=a==null?void 0:a.state("show_range");if(cursor==null)return null;let window_size=evaluate_property(a,"rows")*get_fixed_cell_rg_column_count(a,1);return Math.ceil(cursor/window_size+1)}},is_first_page:{description:" is on the first page",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a,b){var _ref;return(_ref=(a==null?void 0:a.state("show_range"))===0)!=null?_ref:this.ret_btype_null()}},is_last_page:{description:" is on the last page",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a){var _element$get_static_p,_a$state4,_ref2;let rows2=(_element$get_static_p=element.get_static_property("rows",!0))!=null?_element$get_static_p:1,cursor=a==null?void 0:a.state("show_range"),window_size=rows2*get_fixed_cell_rg_column_count(a,1),length=a==null||(_a$state4=a.state("list_data"))==null?void 0:_a$state4.length();return(_ref2=window_size+cursor>=length)!=null?_ref2:this.ret_btype_null()}}})}},get_messages(element){return["set_list_data","clear_list","show_previous","show_next","draw_till","scroll_to","go_to_page","resize_cell","resize_dummies"]}});init_define_process_env();init_shim();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator244=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();var _tmpl$34=template("<div>"),GROUP_ITEM_SELECTOR2="> .SelectableListItem";function SelectableListComponent(props){var _useContext;let RepeatingGroupImplementation=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.repeatingGroupImplementation;return(()=>{var _el$=_tmpl$34();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,RepeatingGroupImplementation&&createComponent(RepeatingGroupImplementation,mergeProps(props,{get cellSizing(){return props.childStyles[GROUP_ITEM_SELECTOR2]},get children(){return props.children}}))),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,overflow:"hidden","flex-wrap":"nowrap"},_v$3={...props.classList};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var selectableListComponent=createElement_default(SelectableListComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:{...containerProperties(shouldAddWrapper),separatorWidth:new Property(instance4=>_get_separator_width(instance4.element),{fallback:0}),separatorColor:new Property(instance4=>instance4.get_static_property("separator_color"),{fallback:""}),separatorStyle:new Property(instance4=>instance4.get_static_property("separator_style"),{fallback:"none"})},styles:[...placedStyling(element)]}});init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator245=__toESM(require_web_dom_collections_iterator());init_solid();init_element_eval();init_element_styles();init_properties();var _tmpl$35=template("<div>");function SelectableListItemComponent(props){return(()=>{var _el$=_tmpl$35();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var selectableListItemComponent=createElement_default(SelectableListItemComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[...containerStyling(shouldAddWrapper),...basicStyling(element),new Style(instance4=>({order:instance4.get_static_property("order"),"align-self":evaluate_property(instance4,"vert_alignment"),...getHeightAndWidth4(instance4)}),{outerPositioning:!0})]}});function getHeightAndWidth4(instance4){let isFixedWidth=instance4.get_static_property("single_width"),isFixedHeight=instance4.get_static_property("single_height"),minWidth=evaluate_property(instance4,"min_width_css"),minHeight=evaluate_property(instance4,"min_height_css");return{width:isFixedWidth?parseInt(minWidth!=null?minWidth:"0")!==0?minWidth:"100%":"max-content",height:isFixedHeight&&parseInt(minHeight!=null?minHeight:"0")!==0?minHeight:"100%","flex-shrink":0}}init_btype_ids();init_appquery();init_element_eval();init_u2();init_StaticList();var DEFAULT_NUM_COLUMNS=1,DEFAULT_NUM_ROWS=4;make_element("SelectableList",{display:"Selectable List",category:"containers",keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))&&selectableListEnabled()},defaults:{width:360,height:200,container_layout:"column",fixed_columns:!0,fixed_rows:!0,rows:DEFAULT_NUM_ROWS,columns:DEFAULT_NUM_COLUMNS,padding_bottom:8,padding_top:8,padding_left:8,padding_right:8},field_names:{group_type:{no_states:!0},data_source:{},fixed_columns:{default:!0,no_states:!0},fixed_rows:{default:!0,no_states:!0},rows:{default:DEFAULT_NUM_ROWS},columns:{default:DEFAULT_NUM_COLUMNS},...start_workflow_field_names},property_applications:[new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer,new property_applications_default.PaddingFields,new property_applications_default.Opacity],uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,solid_component:selectableListComponent,get_html(instance4){return"<div></div>"},get_min_width(){return 0},generate_default_children(){return{[appquery_default.uid()]:{id:appquery_default.uid(),type:"SelectableListItem",default_name:"Select Item",properties:{container_layout:"row",use_gap:"true",gap:4,single_width:!0,single_height:!0,min_height_css:"40px"},elements:{[appquery_default.uid()]:{id:appquery_default.uid(),type:"Text",properties:{text:"item 1",fit_height:!0,font_size:16,line_height:1.5,fit_width:!0},default_name:"Text"}}}}},change_cursor_style_if_clickable:!0,is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},draws_own_children(){return!0},can_defer_drawing(){return!0},register(instance4){instance4.repeating_group_layout=new RepeatingGroupLayoutStyle({instance:instance4}),instance4.repeating_group_layout.do_register(),instance4.repeating_layout_type="List",instance4.on_destroy(()=>{var _instance$repeating_g;(_instance$repeating_g=instance4.repeating_group_layout)==null||_instance$repeating_g.destroy()}),instance4.state("list_data",()=>evaluate_property(instance4,"data_source"))},initialize(instance4){},get_state_value(element,name){if(name==="list_data"){let btype_id=element.get_static_property("group_type");return btype_id?list_type(btype_id):"null"}},add_specific_messages(messages,element){let list_btype=element.get_state_value("list_data");list_btype!=null&&extend(messages,{get_list_data:{description:"'s "+list_btype.display(),is_client_state(){return!0},section:"States",ret_btype:list_btype,fn(a){var _a$state$list_cast,_a$state,_list_btype$inner,_list_btype$inner2;return(_a$state$list_cast=a==null||(_a$state=a.state("list_data"))==null?void 0:_a$state.list_cast((_list_btype$inner=list_btype.inner())==null?void 0:_list_btype$inner.id()))!=null?_a$state$list_cast:new StaticList_default([],null,(_list_btype$inner2=list_btype.inner())==null?void 0:_list_btype$inner2.id())}},get_loading_status:{description:" is loading",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a){var _ref;return(_ref=a==null?void 0:a.state("loading"))!=null?_ref:this.ret_btype_null()}}})},get_messages(element){return[]}});make_element("SelectableListItem",{display:"Select Item",defaults:{border_style:"solid",border_width:1,border_roundness:4,border_color:"#E6E6E6",padding_top:12,padding_bottom:12,padding_left:12,padding_right:12},field_names:{...start_workflow_field_names},property_applications:[new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.Dimensions,new property_applications_default.PaddingFields,new property_applications_default.Opacity,new property_applications_default.ResponsiveElement,new property_applications_default.ResponsiveContainer],uses_css_responsive:!0,is_input:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},get_min_width(){return 0},not_draggable(){return!0},is_pseudo:!0,is_repeating(){return!0},cant_delete(){return!0},change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,contains_group_data:!1,can_fit_height:!0,can_fit_width:!0,get_html(instance4){return"<div></div>"},register(instance4){instance4.repeating_layout_type="List"},initialize(instance4){},solid_component:selectableListItemComponent});init_define_process_env();init_shim();init_u2();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator246=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();var _tmpl$36=template("<div class=aspect-ratio>"),_tmpl$211=template("<div>"),ASPECT_RATIO_CLASS2="aspect-ratio",ASPECT_RATIO_SELECTOR2=` .${ASPECT_RATIO_CLASS2}`,ShapeComponent=props=>(()=>{var _el$=_tmpl$211();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(Show,{get when(){return props.useAspectRatio},get children(){var _el$2=_tmpl$36();return createRenderEffect(_$p=>style(_el$2,props.childStyles[ASPECT_RATIO_SELECTOR2],_$p)),_el$2}})),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3=props.classList;return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})(),ShapeComponent_default=createElement_default(ShapeComponent,void 0,element=>({properties:{useAspectRatio:new Property(instance4=>instance4.element.has_fixed_aspect_ratio(),{fallback:!1})},styles:[new Style(instance4=>instance4.element.has_fixed_aspect_ratio()?{height:0,"padding-top":`${instance4.get_static_property("aspect_ratio_height")/instance4.get_static_property("aspect_ratio_width")*100}%`}:{},{selector:ASPECT_RATIO_SELECTOR2}),...placedStyling(element)]}));make_element("Shape",{category:"visual elements",glyph_id:"rectangle",list_order:5,keyboard_shortcut:"R",defaults:{bgcolor:"#DEDEDE",background_style:"bgcolor",width:150,height:150},field_names:extend({keep_proportion_resize:{no_states:!0}},start_workflow_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Rotation,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,can_fix_aspect_ratio(){return!0},solid_component:ShapeComponent_default,change_cursor_style_if_clickable:!0,get_min_width(element){return 0},get_html(instance4){return"<div></div>"},can_defer_drawing(){return!0},initialize(instance4){structure_fixed_aspect_ratio(instance4,instance4.canvas)},is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,events:["ButtonClicked","ElementPressed"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator248=__toESM(require_web_dom_collections_iterator());init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator247=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();init_element_eval();init_responsive_evaluation();init_mobile();var _tmpl$37=template("<div class=sheet-backdrop>"),_tmpl$212=template("<div class=drag-handle-wrapper><div class=drag-handle>"),_tmpl$38=template("<div><div>"),BACKDROP_CLASS="sheet-backdrop",BACKDROP_SELECTOR=` .${BACKDROP_CLASS}`,SHEET_CLASS="sheet",SHEET_SELECTOR=` .${SHEET_CLASS}`,sheetComponent=createElement_default(SheetComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:{...containerProperties(shouldAddWrapper),dragHandle:new Property(instance4=>evaluate_property(instance4,"drag_handle"),{fallback:!0})},styles:[...basicStyling(element),new Style(instance4=>{let bgColor=evaluate_property(instance4,"bgcolor");return evaluate_property(instance4,"background_style")==="none"&&(bgColor="transparent"),{"background-color":bgColor,overflow:instance4.get_static_property("view_type")==="vertical_list"||instance4.get_static_property("view_type")==="section_list"?"visible":void 0}}),new Style(instance4=>{var _evaluate_property,_evaluate_property2,_evaluate_property3,_instance$root_instan,_instance$root_instan2;let height2,snapLayout=(_evaluate_property=evaluate_property(instance4,"default_snap_layout"))!=null?_evaluate_property:"";if(SNAP_PRESETS.includes(snapLayout))height2=`${SNAP_PRESETS_TO_VALUE[snapLayout]}%`;else switch(snapLayout){case"pixel":height2=`${(_evaluate_property2=evaluate_property(instance4,"default_snap_value"))!=null?_evaluate_property2:300}px`;break;case"percent":height2=`${(_evaluate_property3=evaluate_property(instance4,"default_snap_value"))!=null?_evaluate_property3:25}%`;break;default:height2="max-content";break}return{width:`${(_instance$root_instan=(_instance$root_instan2=instance4.root_instance())==null?void 0:_instance$root_instan2.current_width())!=null?_instance$root_instan:0}px`,height:height2,"min-height":"200px"}},{outerPositioning:!0}),new Style(instance4=>{var _evaluate_property4;return{width:"100%",height:"100%",position:"absolute",top:0,"background-color":evaluate_property(instance4,"modality")?(_evaluate_property4=evaluate_property(instance4,"backdrop_color"))!=null?_evaluate_property4:"rgba(0, 0, 0, 0.1)":"transparent"}},{selector:BACKDROP_SELECTOR}),new Style(instance4=>{var _evaluate_property5,_evaluate_property6,_evaluate_property7,_evaluate_property8;return{...containerLayoutStyling(instance4),"padding-top":`${(_evaluate_property5=evaluate_property(instance4,"padding_top"))!=null?_evaluate_property5:0}px`,"padding-right":`${(_evaluate_property6=evaluate_property(instance4,"padding_right"))!=null?_evaluate_property6:0}px`,"padding-bottom":`${(_evaluate_property7=evaluate_property(instance4,"padding_bottom"))!=null?_evaluate_property7:0}px`,"padding-left":`${(_evaluate_property8=evaluate_property(instance4,"padding_left"))!=null?_evaluate_property8:0}px`,height:evaluate_property(instance4,"default_snap_layout")==="fit_content"?"max-content":void 0}},{selector:SHEET_SELECTOR})]}});function SheetComponent(props){let instance4=props.instance;return onMount(()=>{var _instance$state;(_instance$state=instance4.state("greyout"))==null||_instance$state.css("display","none")}),[createComponent(BodyPortal,{get children(){var _el$=_tmpl$37();return use(node=>instance4.state("greyout",$(node)),_el$),createRenderEffect(_$p=>style(_el$,props.childStyles[BACKDROP_SELECTOR],_$p)),_el$}}),(()=>{var _el$2=_tmpl$38(),_el$4=_el$2.firstChild,_ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$2):props.ref=_el$2,insert(_el$2,createComponent(Show,{get when(){return props.dragHandle},get children(){return _tmpl$212()}}),_el$4),use(defaultEventHandlers,_el$4,()=>props.instance),insert(_el$4,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$={...props.style,padding:"0px","justify-content":""},_v$2=props.classList,_v$3=props.id,_v$4={[props.containerClass]:!0,[SHEET_CLASS]:!0},_v$5=props.childStyles[SHEET_SELECTOR];return _p$.e=style(_el$2,_v$,_p$.e),_p$.t=classList(_el$2,_v$2,_p$.t),_v$3!==_p$.a&&setAttribute(_el$2,"id",_p$.a=_v$3),_p$.o=classList(_el$4,_v$4,_p$.o),_p$.i=style(_el$4,_v$5,_p$.i),_p$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),_el$2})()]}init_lib();init_element_eval();init_mode_check();init_margins();init_colors();init_mobile();init_u2();make_element("Sheet",{display:"Sheet",category:"containers",keyboard_shortcut:null,condition(root2){var _root$is_mobile,_root$is_mobile2;return(_root$is_mobile=root2==null||(_root$is_mobile2=root2.is_mobile)==null?void 0:_root$is_mobile2.call(root2))!=null?_root$is_mobile:!1},defaults:{four_border_style:!0,border_roundness_top:10,border_roundness_right:10,background_style:"bgcolor",bgcolor:SURFACE_DEFAULT,container_layout:"column"},field_names:{...get_margin_properties(),swipe_to_close:{default:!0,no_states:!0},modality:{default:!0,no_states:!0},backdrop_color:{default:"rgba(0,0,0,0.1)",in_style:!0},backdrop_blur:{default:0,in_style:!0},drag_handle:{default:!0,no_states:!0},default_snap_value:{no_states:!0},default_snap_layout:{default:DEFAULT_SNAP_POINT,no_states:!0},snap_points:{no_states:!0},view_type:{no_states:!0,default:"scrollable"}},uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.PaddingFields,new property_applications_default.ResponsiveContainer,new property_applications_default.Opacity],not_draggable(){return!0},can_defer_drawing(){return!0},get_messages(){return["show_sheet","hide_sheet"]},add_specific_messages(messages,element){var _element$property$ent,_element$property$ent2,_element$property;let snap_points=(_element$property$ent=(_element$property$ent2=(_element$property=element.property("snap_points")).entries)==null?void 0:_element$property$ent2.call(_element$property))!=null?_element$property$ent:[],calc_snap_val=(instance4,snap_point)=>{var _instance$state;let screenHeight=(_instance$state=instance4.state("screen_height"))!=null?_instance$state:0;return SNAP_PRESETS.includes(snap_point.snap_layout)?SNAP_PRESETS_TO_VALUE[snap_point.snap_layout]/100*screenHeight:snap_point.snap_layout==="fit_content"?instance4.state("content_height"):snap_point.snap_layout==="percent"?snap_point.snap_value/100*screenHeight:snap_point.snap_value};messages.snap_current={description:"'s current snap point",is_client_state(){return!0},section:"Snap Points",ret_btype:"number",fn(a,b){return a.state("snap_position")}},messages.snap_default={description:"'s default snap point",is_client_state(){return!0},section:"Snap Points",ret_btype:"number",fn(a,b){let default_snap_layout=element.get_static_property("default_snap_layout"),default_snap_value=element.get_static_property("default_snap_value");return calc_snap_val(a,{snap_layout:default_snap_layout,snap_value:default_snap_value})}};for(let entry of snap_points){let snap_point=entry.raw();if(!snap_point.snap_id)return;let snap_key=`snap_${snap_point.snap_id}`;messages[snap_key]={description(){let snap_value;if(SNAP_PRESETS.includes(snap_point.snap_layout))snap_value=FirstLetterCapitalize(snap_point.snap_layout);else if(snap_point.snap_layout==="fit_content")snap_value="Fit to content";else{let layout=snap_point.snap_layout==="percent"?"%":" px";snap_value=`${snap_point.snap_value}${layout}`}return`'s snap point (${snap_value})`},is_client_state(){return!0},section:"Snap Points",ret_btype:"number",fn(a,b){return calc_snap_val(a,snap_point)}}}},get_min_width(){return 0},is_restricted_container(element){let view_type=element.get_static_property("view_type");return view_type==="vertical_list"||view_type==="section_list"},get_children_canvas(instance4){return instance4.get_canvas()},goes_on_document(){return!0},get_html(instance4){return"<div></div>"},register(instance4){instance4._has_been_hidden=!0},initialize(instance4){on_property_change(instance4,"backdrop_blur",backdrop_blur=>{[null,void 0,0].includes(backdrop_blur)||instance4.wait_for_visible(()=>{apply_blur_effect_to_greyout(instance4,backdrop_blur)})}),instance4.on_destroy(()=>{remove_blur_effect_to_greyout(instance4)})},get_state_value(element,name){return state_value_helper_for_group(element,name)},position_canvas(to_position,instance4){to_position.css("display","none"),$(".canvas").append(to_position)},do_show(instance4){if(instance4._is_visible_me=!0,instance4._update_visible(),on_react_native()){instance4.message("show_sheet");return}instance4.with_canvas(canvas=>{instance4._display_me(),apply_blur_effect_to_greyout(instance4,instance4.get_static_property("backdrop_blur",!0));let backdrop=instance4.state("greyout");backdrop&&(instance4.thumbnail_mode()||backdrop.show(),backdrop.click(()=>{lib_default.or_throw().visual_edit.turn_element_on(instance4.element_id(),!1)}))})},do_hide(instance4){if(instance4._is_visible_me=!1,instance4._update_visible(),on_react_native()){instance4.message("hide_sheet");return}instance4._hide_me(),remove_blur_effect_to_greyout(instance4);let backdrop=instance4.state("greyout");backdrop==null||backdrop.hide()},is_input:!1,can_have_children(){return!0},contains_group_data:!0,events:[],change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,modal(){return!0},solid_component:sheetComponent,starts_hidden:!0,render_when_invisible:!0});init_define_process_env();init_shim();var import_web_dom_collections_iterator249=__toESM(require_web_dom_collections_iterator()),import_web_immediate12=__toESM(require_web_immediate()),b_async11=__toESM(require_b_async());init_b_ui();init_property_applications();init_runmode();init_element_eval();make_element("SliderInput",{display:"Slider Input",category:"input forms",glyph_id:"slider",list_order:7,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{width:200,height:45},field_names:{min_value:{default:0},max_value:{default:10},step:{default:1},range_type:{default:"simple",no_states:!0,in_style:!0},content:{},orientation:{no_states:!0,default:"horizontal"},border_color:{default:"#aaa",in_style:!0},background_color:{default:"#fff",in_style:!0},handle_color:{default:"#e6e6e6",in_style:!0},range_area_color:{default:"#cccccc",in_style:!0},...get_disabled_field_name,...get_auto_binding_field_names},property_applications:[new property_applications_default.Dimensions,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],get_html(instance4){return"<div></div>"},get_min_width(element){return 0},can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let canvas=instance4.get_canvas(),slider_init=b_async11.MakeKey(null,"slider_init"),slider=div("",canvas);slider.slider(),canvas.css("padding",8);let is_slider_initialized=()=>slider.slider("instance");instance4.on_destroy(()=>{is_slider_initialized()&&slider.slider("destroy")}),instance4.run_mode()||slider.off(),instance4.run_mode()&&(canvas.addClass(CLICKABLE_ELEMENT),instance4.wait_for_visible(()=>{b_async11.WaitFor(slider_init,()=>{on_property_change(instance4,"disabled",value=>{slider.slider("option","disabled",value)}),instance4.on_message("set_focus",()=>canvas.find(".ui-slider-handle").focus())})})),pre_cache(instance4,["min_value","max_value","step","range_type","orientation","handle_color","range_area_color","border_color","background_color"]),instance4.autorun(()=>{var _props$min_value,_props$max_value;let slider_value_property;instance4.element.get_styleable_static_property("range_type")==="range"?slider_value_property="values":slider_value_property="value";let props={};for(let prop of["min_value","max_value","step","range_type","orientation","handle_color","range_area_color","border_color","background_color"])props[prop]=evaluate_property(instance4,prop);let options={min:(_props$min_value=props.min_value)!=null?_props$min_value:0,max:(_props$max_value=props.max_value)!=null?_props$max_value:9,step:props.step,range:props.range_type==="range",orientation:props.orientation,slide:(event,ui)=>(setImmediate(()=>{instance4.message("user_change",slider.slider(slider_value_property))}),!0),stop:(event,ui)=>(setImmediate(()=>{instance4.message("user_submit",slider.slider(slider_value_property))}),!0)};if(!instance4.thumbnail_mode()||is_slider_initialized())for(let[k,v]of Object.entries(options))slider.slider("option",k,v);let slider_css_options={"margin-left":3,"margin-right":3,cursor:evaluate_property(instance4,"disabled")?"default":"pointer",background:props.background_color,"border-color":props.border_color},handle_css_options={cursor:evaluate_property(instance4,"disabled")?"default":"pointer",outline:"none","border-color":props.border_color};props.orientation==="horizontal"?(slider_css_options.height="100%",slider_css_options.width="calc(100% - 7px)",handle_css_options.top=-8,handle_css_options.height="calc(100% + 16px)",handle_css_options.width=19,slider.find(".ui-slider-range").css({height:"100%"})):(slider_css_options.width="calc(100% - 6px)",slider_css_options.height="calc(100% - 2px)",handle_css_options.width="calc(100% + 11px)",handle_css_options.height=19,slider.find(".ui-slider-range").css({width:"100%"})),handle_css_options.background=props.handle_color,props.range_type==="range"&&slider.find(".ui-slider-range").css({background:props.range_area_color}),slider.css(slider_css_options),slider.find(".ui-slider-handle").css(handle_css_options),slider_init.turn(),!(instance4.thumbnail_mode()&&!is_slider_initialized())&&input_change_autorun(instance4,val=>{slider_value_property==="values"&&val==null&&(val=[]),slider.slider(slider_value_property,val)})})})},get_starting_content(instance4){let val;if(instance4.run_mode()&&instance4.get_static_property("auto_binding")?val=get_input_autobind_thing_field(instance4):val=evaluate_property(instance4,"content"),instance4.element.get_styleable_static_property("range_type")==="range"){var _val$all,_val,_val$all2,_val2,_element_eval$evaluat,_element_eval$evaluat2;if(val=(_val$all=(_val=val)==null||(_val$all2=_val.all)==null?void 0:_val$all2.call(_val))!=null?_val$all:val,(_val2=val)!=null&&_val2.length)return val;let min=(_element_eval$evaluat=evaluate_property(instance4,"min_value"))!=null?_element_eval$evaluat:0,max=(_element_eval$evaluat2=evaluate_property(instance4,"max_value"))!=null?_element_eval$evaluat2:9;return[min,max]}else{var _ref,_val3;return(_ref=(_val3=val)!=null?_val3:evaluate_property(instance4,"min_value"))!=null?_ref:0}},get_state_value(element,name){if(name==="value")return element.get_styleable_static_property("range_type")==="range"?"number_range":"number"},uses_css_responsive:!0,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!0,is_input:!0,contains_group_data:!1,jquery_plugins(){return["jquery_plugins/jquery-ui-slider-draggable.min","jquery_plugins/jquery.ui.touch-punch.min.js"]},css_files:["css/optional/jquery-ui.slider.css"],only_send_to_client_in_runmode:!0});init_define_process_env();init_shim();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator250=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_element_eval();init_properties();var _tmpl$39=template("<div class=overflow-container><button>"),SwipeActionComponent_default=createElement_default(SwipeActionComponent,void 0,element=>{let props=buttonProperties(element);return{properties:{...props.properties},styles:[...props.styles,...placedStyling(element),new Style(instance4=>({height:"100%",width:"max-content","max-width":"none",order:evaluate_property(instance4,"order"),left:"","min-height":"","min-width":""}),{noWaitVisible:!0,outerPositioning:!0})]}});function SwipeActionComponent(props){let editorContext=useContext(EditorContext_default),parentFocused=()=>{var _props$instance$paren,_editorContext$state$,_editorContext$state$2,_editorContext$state$3;let parentID=(_props$instance$paren=props.instance.parent())==null?void 0:_props$instance$paren.element.id();return parentID?((_editorContext$state$=editorContext==null||(_editorContext$state$2=editorContext.state.hoverState[parentID])==null?void 0:_editorContext$state$2.hovered)!=null?_editorContext$state$:!1)||((_editorContext$state$3=editorContext==null?void 0:editorContext.state.descendantSelected(parentID))!=null?_editorContext$state$3:!1):!1};return(()=>{var _el$=_tmpl$39(),_el$2=_el$.firstChild;use(defaultEventHandlers,_el$2,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$2):props.ref=_el$2,insert(_el$2,createComponent(ButtonInternals,props)),createRenderEffect(_p$=>{var _v$=!!parentFocused(),_v$2=props.id,_v$3={...props.style,border:"none"},_v$4={"flex-aligned-button":!0,"swipe-action-leading":evaluate_property(props.instance,"swipe_action_side")==="leading","swipe-action-trailing":evaluate_property(props.instance,"swipe_action_side")==="trailing",...props.classList};return _v$!==_p$.e&&_el$.classList.toggle("SwipeActionFocused",_p$.e=_v$),_v$2!==_p$.t&&setAttribute(_el$2,"id",_p$.t=_v$2),_p$.a=style(_el$2,_v$3,_p$.a),_p$.o=classList(_el$2,_v$4,_p$.o),_p$},{e:void 0,t:void 0,a:void 0,o:void 0}),_el$})()}init_responsive_layout();init_colors();make_element("SwipeAction",{category:"visual elements",glyph_id:"button",list_order:2,keyboard_shortcut:null,defaults:{font_alignment:"center",font_size:12,button_vert_alignment:"center",button_single_item_vert_alignment:"center",font_color:"#FFFFFF",background_style:"bgcolor",bgcolor:DESTRUCTIVE_DEFAULT,width:0,min_width:0,icon_placement:"top",padding_left:20,padding_right:20,text:"Delete"},display:"Swipe Action",field_names:{...buttonFieldNames({default_type:"icon"}),...start_workflow_field_names,collapse_when_hidden:{no_states:!0,default:!1},button_single_item_vert_alignment:{default:"center"}},properties_for_new:{icon:()=>to_icon_string({set:"fontawesome-6",icon:"trash-can"}),fit_width:!0,fixed_width:!1,single_width:!1,min_width:0,swipe_action_side:"leading"},properties_for_name:()=>[],extra_layout_props:BUTTON_PROPERTIES,uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Font(null,null,null,{condition:instance4=>instance4.get_static_property("button_type")!=="icon"}),new property_applications_default.FontSpacing(null,null,null,{condition:instance4=>instance4.get_static_property("button_type")!=="icon"}),new property_applications_default.Background,new property_applications_default.PaddingFields,new property_applications_default.Opacity],get_html(instance4){return"<button></button>"},change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},initialize(instance4){},not_draggable(){return!0},is_draggable_within_parent:!0,is_pseudo:!0,is_input:!1,always_visible:!0,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,hide_style_section:!0,events:["ButtonClicked","ElementPressed"],get_min_width(element){return 0},css_files:["css/optional/font-awesome.min.css"],solid_component:SwipeActionComponent_default});init_define_process_env();init_shim();init_colors();init_fonts();init_mobile();init_element_eval();init_responsive_layout();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator251=__toESM(require_web_dom_collections_iterator());init_properties();init_element_styles();init_element_eval();init_element_props();init_mobile();var _tmpl$40=template("<div>"),TabBarComponent_default=createElement_default(TabBarComponent,void 0,element=>({properties:containerProperties(!1),styles:[...basicStyling(element),...containerStyling(!1),new Style(instance4=>{var _evaluate_property;return{"padding-bottom":`${((_evaluate_property=evaluate_property(instance4,"padding_bottom"))!=null?_evaluate_property:0)+SAFE_AREA_BOTTOM}px`}}),new Style(instance4=>{var _evaluate_property2,_evaluate_property3,_evaluate_property4,_evaluate_property5;let marginLeft=(_evaluate_property2=evaluate_property(instance4,"margin_left"))!=null?_evaluate_property2:0,marginRight=(_evaluate_property3=evaluate_property(instance4,"margin_right"))!=null?_evaluate_property3:0,marginTop=(_evaluate_property4=evaluate_property(instance4,"margin_top"))!=null?_evaluate_property4:0,marginBottom=(_evaluate_property5=evaluate_property(instance4,"margin_bottom"))!=null?_evaluate_property5:0;return{"min-height":min_height_css(instance4),"max-height":max_height_css(instance4),"min-width":min_width_css(instance4),"max-width":max_width_css(instance4),height:instance4.element.fit_height()?"max-content":`calc(100% - ${marginTop+marginBottom}px)`,"margin-left":`${marginLeft}px`,"margin-right":`${marginRight}px`,"margin-top":`${marginTop}px`,"margin-bottom":`${marginBottom}px`}},{noWaitVisible:!0,outerPositioning:!0})]}));function TabBarComponent(props){return(()=>{var _el$=_tmpl$40();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,()=>props.children),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator252=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();var _tmpl$41=template("<button>"),TabItemComponent_default=createElement_default(TabItemComponent,void 0,element=>{let props=buttonProperties(element,"label_icon");return{properties:{...props.properties},styles:[...props.styles,...placedStyling(element)]}});function TabItemComponent(props){return(()=>{var _el$=_tmpl$41();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ButtonInternals,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={"flex-aligned-button":props.buttonType!=="label",...props.classList};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}make_element("TabBar",{display:"Tab Bar",category:"visual elements",glyph_id:"table",list_order:3,keyboard_shortcut:null,defaults:{bgcolor:SURFACE_DEFAULT,background_style:"bgcolor",width:300,height:DEFAULT_TAB_BAR_HEIGHT},field_names:{tab_items:{only_edit_mode:!0,no_states:!0}},uses_css_responsive:!0,is_pseudo:!0,is_restricted_container:!0,cant_delete(){return!0},always_visible:!0,solid_component:TabBarComponent_default,can_fit_width:!1,can_fit_height:!0,not_draggable(){return!0},goes_on_document(){return!0},standard_container_layout:"row",property_applications:[new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.Background,new property_applications_default.Opacity,new property_applications_default.ResponsiveContainer,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields],change_cursor_style_if_clickable:!0,padding_display(instance4,side){var _evaluate_property;return((_evaluate_property=evaluate_property(instance4,`padding_${side}`))!=null?_evaluate_property:0)+(side==="bottom"?SAFE_AREA_BOTTOM:0)},generate_name(element){return"Tab Bar"},can_defer_drawing(){return!0},get_min_width(){return 0},register(instance4){},get_html(instance4){return"<div></div>"},initialize(instance4){},is_input:!1,contains_group_data:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},events:[],add_an_invisible_div_on_the_top:!1});make_element("TabItem",{display:"Tab Item",category:"visual elements",glyph_id:"button",list_order:3,keyboard_shortcut:null,defaults:{width:100,height:DEFAULT_TAB_ITEM_HEIGHT,background_style:"none",border_style:"none",button_gap:8,title:"",icon:"fa fa-star-o",icon_placement:"top",icon_size:24,icon_color:"#999999",button_vert_alignment:"center",font_family:DEFAULT_CSS_TOKEN,font_weight:"500",font_size:10,font_color:"#999999",text_align:"center",line_height:1.2},field_names:{target_view:{no_states:!0},...buttonFieldNames()},properties_for_new:{icon:()=>get_default_icon()},extra_layout_props:BUTTON_PROPERTIES,uses_css_responsive:!0,is_pseudo:!0,is_draggable_within_parent:!0,always_visible:!0,solid_component:TabItemComponent_default,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.FontSpacing,new property_applications_default.Border,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity],change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},get_min_width(){return 0},register(instance4){},get_html(instance4){return"<div></div>"},initialize(instance4){},is_input:!1,contains_group_data:!1,events:[],get_state_value(element,name){if(name==="tab_item_selected")return"sys.bool"},add_specific_messages(messages,element){messages.get_tab_item_selected={description:" is selected",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("tab_item_selected")}}},add_an_invisible_div_on_the_top:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator258=__toESM(require_web_dom_collections_iterator());init_appquery();init_property_applications();init_u2();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator253=__toESM(require_web_dom_collections_iterator());init_solid();init_table_element();init_element_styles();init_properties();init_element_eval();init_u2();var _tmpl$43=template("<div>");function TableMainAxisComponent(props){var _props$wrapper,_useContext;let tableContext=useContext(TableContext);if(tableContext==null)throw new UnexpectedError("Table Component outside of a Table",{axisId:props.instance.element_id()});let instance4=props.instance,visible=createWatcher(()=>instance4.is_visible_me(),{fallback:!0}),myStyling=tableContext.registerMainAxis(instance4.element_id(),{get index(){return props.index},get minLength(){return props.minLength},get maxLength(){return props.maxLength},get mode(){return props.mode},get visible(){return visible()}});onCleanup(()=>{tableContext.deregisterMainAxis(instance4.element_id())});let placementStyling=createMemo(()=>({"z-index":MAIN_AXIS_ZINDEX,position:"absolute",display:visible()?"":"none",...myStyling()})),Wrapper=(_props$wrapper=props.wrapper)!=null?_props$wrapper:props2=>props2.children,EditDividersComponent=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.tableMainAxisDividers,editorDividers=()=>EditDividersComponent!==void 0?createComponent(EditDividersComponent,{get tableElement(){return instance4.element.parent()},get id(){return props.id},get placementStyling(){return placementStyling()},elementInstance:instance4}):[];return[createComponent(Wrapper,{get style(){return{...placementStyling()}},get children(){var _el$=_tmpl$43();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style,...instance4.edit_mode()?{}:placementStyling()},_v$3=props.classList;return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$}}),editorDividers]}var TableMainAxisComponent_default=createElement_default(TableMainAxisComponent,void 0,element=>{let dim=()=>isTableDirectionHorizontal(element.parent())?"height":"width";return{properties:{minLength:new Property(instance4=>{let propName=dim()==="height"?"min_height_css":"min_width_css";return evaluate_property(instance4,propName)},{fallback:"0px"}),maxLength:new Property(instance4=>{var _evaluate_property;let propName=dim()==="height"?"max_height_css":"max_width_css";return(_evaluate_property=evaluate_property(instance4,propName))!=null?_evaluate_property:null},{fallback:null}),mode:new Property(instance4=>element.get_static_property(`single_${dim()}`)?"fixed":element.get_static_property(`fit_${dim()}`)?"fit":"stretch",{fallback:"fixed",noWaitVisible:!0}),index:new Property(instance4=>evaluate_property(instance4,"axis_index"),{fallback:0,noWaitVisible:!0})},styles:[...basicStyling(element)]}});init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator254=__toESM(require_web_dom_collections_iterator());init_solid();init_table_element();init_element_styles();var _tmpl$44=template("<div>");function TableCellComponent(props){var _props$wrapper;let context=useContext(TableContext);if(context==null)return(()=>{var _el$=_tmpl$44(),_ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$=props.id,_v$2={...props.style},_v$3={...props.classList,[props.containerClass]:!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})();let instance4=props.instance;onMount(()=>{context.registerTableCell(instance4),onCleanup(()=>{context.deregisterTableCell(instance4)})});let placementStyling=createMemo(()=>{let mainAxisBorderName=`border-${context.direction==="horizontal"?"bottom":"right"}`;return{position:"relative","box-sizing":"border-box",display:props.hidden?"none":"",[mainAxisBorderName]:context.lastMainAxis===props.mainAxisId?"none":context.mainAxesSeparator.css,"z-index":CELL_ZINDEX,...context.mainAxisSizingStyling(props.mainAxisId),...context.tableCellSizing(props.instance)}}),Wrapper=(_props$wrapper=props.wrapper)!=null?_props$wrapper:props2=>props2.children;return createComponent(Wrapper,{get style(){return{...placementStyling()}},get children(){var _el$2=_tmpl$44();use(defaultEventHandlers,_el$2,()=>instance4);var _ref$2=props.ref;return typeof _ref$2=="function"?use(_ref$2,_el$2):props.ref=_el$2,insert(_el$2,createComponent(ChildWrapper,props)),createRenderEffect(_p$=>{var _v$4=props.id,_v$5={...props.style,...instance4.edit_mode()?{}:{...placementStyling()}},_v$6={...props.classList,[props.containerClass]:!0};return _v$4!==_p$.e&&setAttribute(_el$2,"id",_p$.e=_v$4),_p$.t=style(_el$2,_v$5,_p$.t),_p$.a=classList(_el$2,_v$6,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$2}})}var TableCellComponent_default=createElement_default(TableCellComponent,element=>{var _element$parent$id,_element$parent;return{shouldAddWrapper:element.should_add_extra_wrapper(),mainAxisId:element.get_static_property("cell_main_axis_id"),crossAxisId:(_element$parent$id=(_element$parent=element.parent())==null?void 0:_element$parent.id())!=null?_element$parent$id:"auto"}},(element,_ref)=>{let{shouldAddWrapper}=_ref;return{properties:containerProperties(shouldAddWrapper),styles:[...containerStyling(shouldAddWrapper),...basicStyling(element)]}});init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator255=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_properties();init_table_element();init_store();init_appquery();init_element_eval();var _tmpl$45=template("<div>");function TableElementComponent(props){var _useContext,_useContext2;let[mainAxes,setMainAxes]=createSignal({}),[mainAxesSizes,setMainAxesSizes]=createStore({}),[crossAxes,setCrossAxes]=createSignal({}),[leaderCells,setLeaderCells]=createStore({}),editorContext=useContext(EditorContext_default);function accountForBorder(size,mainAxisId){return size==null?"":lastMainAxis()===mainAxisId?size:`calc(${size} + ${props.direction==="vertical"?verticalSeparator.width:horizontalSeparator.width}px)`}function mainAxisSizingStyling(id){let sizing=mainAxes()[id];if(sizing==null||!sizing.visible)return{display:"none"};let dimension=mainAxisDimension(),min=accountForBorder(sizing.minLength,id);return{[`min-${dimension}`]:min,[`max-${dimension}`]:sizing.mode==="fixed"?min:accountForBorder(sizing.maxLength,id),[dimension]:sizing.mode==="fit"?"max-content":min,"flex-grow":sizing.mode==="stretch"?1:0,"flex-shrink":0}}function shouldShowIndexMarkers(){var _editorContext$state$,_editorContext$state$2,_editorContext$state$3,_editorContext$state$4,_editorContext$state$5;if(!props.instance.edit_mode())return!1;let isHovered=(_editorContext$state$=editorContext==null||(_editorContext$state$2=editorContext.state.hoverState[props.id])==null?void 0:_editorContext$state$2.hovered)!=null?_editorContext$state$:!1,isDescendantSelected=(_editorContext$state$3=editorContext==null?void 0:editorContext.state.descendantSelected(props.id))!=null?_editorContext$state$3:!1,isTableCellDraggedOver=(_editorContext$state$4=editorContext==null||(_editorContext$state$5=editorContext.state.elements[props.id])==null?void 0:_editorContext$state$5.descendantDraggedOver())!=null?_editorContext$state$4:!1;return isHovered||isDescendantSelected||isTableCellDraggedOver}let verticalSeparatorCss=createMemo(()=>`${props.verticalSeparatorStyle} ${props.verticalSeparatorWidth}px ${props.verticalSeparatorColor}`),horizontalSeparatorCss=createMemo(()=>`${props.horizontalSeparatorStyle} ${props.horizontalSeparatorWidth}px ${props.horizontalSeparatorColor}`),verticalSeparator={get css(){return verticalSeparatorCss()},get width(){return props.verticalSeparatorWidth},get color(){return props.verticalSeparatorColor},get style(){return props.verticalSeparatorStyle}},horizontalSeparator={get css(){return horizontalSeparatorCss()},get width(){return props.horizontalSeparatorWidth},get color(){return props.horizontalSeparatorColor},get style(){return props.horizontalSeparatorStyle}},[shouldShowDivider,setShouldShowDivider]=createStore({[FIRST_DIVIDER]:{show:!1,type:"DraggingIndicator"}}),mainAxisDragging=!1,onMouseMove=evt=>{if(!mainAxisDragging)for(let id of Object.keys(mainAxes())){var _editorContext$state$6,_editorContext$state$7,_props$instance,_props$instance$canva;let axis_div=editorContext==null||(_editorContext$state$6=editorContext.state.elements[id].instance)==null||(_editorContext$state$7=_editorContext$state$6.canvas)==null?void 0:_editorContext$state$7[0],table_div=(_props$instance=props.instance)==null||(_props$instance$canva=_props$instance.canvas)==null?void 0:_props$instance$canva[0];if(axis_div===void 0||table_div===void 0)return;let tableSelected=editorContext==null?void 0:editorContext.state.descendantSelected(props.id);if(props.direction==="horizontal"){let bottom_edge=axis_div.getBoundingClientRect().bottom,left_edge=table_div.getBoundingClientRect().left-40;tableSelected&&evt.clientX>left_edge&&evt.clientY>bottom_edge-10&&evt.clientY<bottom_edge+10?setShouldShowDivider({[id]:{show:!0,type:"AddDivider"}}):setShouldShowDivider({[id]:{show:!1,type:"AddDivider"}})}else{let right_edge=axis_div.getBoundingClientRect().right,top_edge=table_div.getBoundingClientRect().top-40;tableSelected&&evt.clientY>top_edge&&evt.clientX>right_edge-10&&evt.clientX<right_edge+10?setShouldShowDivider({[id]:{show:!0,type:"AddDivider"}}):setShouldShowDivider({[id]:{show:!1,type:"AddDivider"}})}}};onMount(()=>{if(props.instance.edit_mode()){var _props$instance$canva2,_props$instance$canva3;(_props$instance$canva2=props.instance.canvas)==null||(_props$instance$canva3=_props$instance$canva2[0])==null||_props$instance$canva3.addEventListener("mousemove",onMouseMove),onCleanup(()=>{var _props$instance$canva4,_props$instance$canva5;(_props$instance$canva4=props.instance.canvas)==null||(_props$instance$canva5=_props$instance$canva4[0])==null||_props$instance$canva5.removeEventListener("mousemove",onMouseMove)})}});let EditDividersComponent=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.tableMainAxisDividers,EditIndexMarkerComponent=(_useContext2=useContext(EditorContext_default))==null?void 0:_useContext2.tableIndexMarkers,previousHoverSet=[];function mainAxisDimension(){return props.direction==="horizontal"?"height":"width"}let cellToAxis=new Map;function resizeAxes(toResize){let dimension=mainAxisDimension(),maximums={};for(let[cell,axisId]of cellToAxis.entries())if(toResize==null||toResize.has(axisId)){let cellSize=cell.getBoundingClientRect()[dimension];(maximums[axisId]==null||Math.floor(maximums[axisId].max*100)<cellSize*100)&&(maximums[axisId]={max:cellSize,cell})}for(let[axisId,maximum]of Object.entries(maximums))setMainAxesSizes(axisId,maximum.max),setLeaderCells(axisId,maximum.cell)}let cellResizeObserver=new ResizeObserver(entries=>{let dimension=mainAxisDimension(),toResize=new Set;batch(()=>{for(let entry of entries){let axisId=cellToAxis.get(entry.target);if(axisId==null||toResize.has(axisId))continue;let cellSize=entry.target.getBoundingClientRect()[dimension],axis=mainAxes()[axisId];if((axis==null?void 0:axis.mode)==="fit"){var _mainAxesSizes$axisId;let currentSize=(_mainAxesSizes$axisId=mainAxesSizes[axisId])!=null?_mainAxesSizes$axisId:0;(entry.target===leaderCells[axisId]||Math.floor(cellSize*100)>currentSize*100)&&(setMainAxesSizes(axisId,cellSize),setLeaderCells(axisId,entry.target),cellSize<currentSize&&toResize.add(axisId))}else entry.target.offsetParent!=null&&(setMainAxesSizes(axisId,cellSize),setLeaderCells(axisId,entry.target))}}),toResize.size>0&&resizeAxes(toResize)});props.instance.edit_mode()&&createEffect(()=>{let dimension=mainAxisDimension();Object.keys(mainAxes()).forEach(id=>{appquery_default.element(id).get_static_property(`fit_${dimension}`)}),resizeAxes()});let[mainAxesCells,setMainAxesCells]=createStore({}),sortedMainAxes=createMemo(()=>Object.entries(mainAxes()).sort((a,b)=>a[1].index-b[1].index)),sortedCrossAxes=createMemo(()=>Object.entries(crossAxes()).sort((a,b)=>a[1].index-b[1].index)),lastMainAxis=createMemo(()=>{let axes=sortedMainAxes();for(let i=axes.length-1;i>=0;i--){let[id,axis]=axes[i];if(axis.visible)return id}}),lastCrossAxis=createMemo(()=>{let axes=sortedCrossAxes();for(let i=axes.length-1;i>=0;i--){let[id,axis]=axes[i];if(axis.visible&&axis.count>0)return id}});return createComponent(TableContext.Provider,{value:{get direction(){return props.direction},get shouldShowDivider(){return shouldShowDivider},setShouldShowDivider,registerMainAxis(id,sizing){return setMainAxes(axes=>({...axes,[id]:sizing})),()=>{var _mainAxesSizes$id2;let separatorWidth=props.direction==="vertical"?props.verticalSeparatorWidth:props.horizontalSeparatorWidth,coord=Object.entries(mainAxes()).filter(_ref=>{let[,a]=_ref;return a.index<sizing.index}).reduce((acc,_ref2)=>{var _mainAxesSizes$id;let[id2]=_ref2;return acc+((_mainAxesSizes$id=mainAxesSizes[id2])!=null?_mainAxesSizes$id:separatorWidth)},0),size=((_mainAxesSizes$id2=mainAxesSizes[id])!=null?_mainAxesSizes$id2:separatorWidth)-(id!==lastMainAxis()?separatorWidth:0);return props.direction==="horizontal"?{top:`${coord+props.paddingTop}px`,height:`${size}px`,width:`calc(100% - ${props.paddingLeft+props.paddingRight}px)`}:{left:`${coord+props.paddingLeft}px`,width:`${size}px`,height:`calc(100% - ${props.paddingTop+props.paddingBottom}px)`}}},deregisterMainAxis(id){setMainAxes(axes=>Object.fromEntries(Object.entries(axes).filter(a=>a[0]!==id)))},get mainAxes(){return mainAxes()},registerTableCell(instance4){let div2=instance4.get_outer_canvas()[0],mainAxisId=instance4.get_static_property("cell_main_axis_id");cellToAxis.set(div2,mainAxisId),cellResizeObserver.observe(div2,{box:"border-box"}),EditIndexMarkerComponent!=null&&setMainAxesCells(mainAxisId,{[instance4.element_id()]:instance4})},deregisterTableCell(instance4){let div2=instance4.get_outer_canvas()[0];cellResizeObserver.unobserve(div2),cellToAxis.delete(div2),setMainAxesCells(instance4.get_static_property("cell_main_axis_id"),{[instance4.element_id()]:void 0})},tableCellSizing(instance4){var _mainAxes$mainAxisId;let mainAxisId=instance4.get_static_property("cell_main_axis_id"),outerCanvas=instance4.get_outer_canvas();return((_mainAxes$mainAxisId=mainAxes()[mainAxisId])==null?void 0:_mainAxes$mainAxisId.mode)!=="fit"||outerCanvas!=null&&leaderCells[mainAxisId]===outerCanvas[0]||mainAxesSizes[mainAxisId]==null?{}:{[`min-${mainAxisDimension()}`]:`max(${accountForBorder(mainAxes()[mainAxisId].minLength,mainAxisId)}, ${mainAxesSizes[mainAxisId]}px)`}},registerCrossAxis(id,info2){setCrossAxes(axes=>({...axes,[id]:info2}))},setMainAxisDragging(dragging){mainAxisDragging=dragging},deregisterCrossAxis(id){setCrossAxes(axes=>Object.fromEntries(Object.entries(axes).filter(_ref3=>{let[axisId]=_ref3;return axisId!==id})))},mainAxisSizingStyling,get mainAxesSeparator(){return props.direction==="vertical"?verticalSeparator:horizontalSeparator},get crossAxesSeparator(){return props.direction==="vertical"?horizontalSeparator:verticalSeparator},get lastMainAxis(){return lastMainAxis()},get lastCrossAxis(){return lastCrossAxis()}},get children(){var _el$=_tmpl$45();_el$.$$mousemove=evt=>{if(props.instance.run_mode()){let currentSet=document.elementsFromPoint(evt.clientX,evt.clientY).filter(el=>el.classList.contains("TableMainAxis"));for(let el of previousHoverSet)currentSet.includes(el)||$(el).mouseleave();for(let el of currentSet)previousHoverSet.includes(el)||$(el).mouseenter();previousHoverSet=currentSet}},use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(Show,{get when(){return shouldShowIndexMarkers()},get children(){return EditIndexMarkerComponent!==void 0&&createComponent(EditIndexMarkerComponent,{mainAxesSizes,mainAxesCells,get sortedMainAxes(){return sortedMainAxes()},get sortedCrossAxes(){return sortedCrossAxes()},get tableInstance(){return props.instance}})}}),null),insert(_el$,(()=>{var _c$=createMemo(()=>!!(props.instance.edit_mode()&&EditDividersComponent!==void 0));return()=>_c$()&&createComponent(EditDividersComponent,{id:FIRST_DIVIDER,get tableElement(){return props.instance.element},get placementStyling(){return{position:"absolute",left:"0px",top:"0px",[props.direction==="horizontal"?"width":"height"]:"100%"}}})})(),null),insert(_el$,()=>props.children,null),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,"bubble-table":!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$}})}var TableElementComponent_default=createElement_default(TableElementComponent,void 0,element=>({properties:{direction:new Property(instance4=>instance4.get_static_property("table_direction"),{fallback:"vertical"}),verticalSeparatorStyle:new Property(instance4=>instance4.get_static_property("vertical_separator_style"),{fallback:"none"}),verticalSeparatorWidth:new Property(instance4=>instance4.get_static_property("vertical_separator_width"),{fallback:0}),verticalSeparatorColor:new Property(instance4=>instance4.get_static_property("vertical_separator_color"),{fallback:"black"}),horizontalSeparatorStyle:new Property(instance4=>instance4.get_static_property("horizontal_separator_style"),{fallback:"none"}),horizontalSeparatorWidth:new Property(instance4=>instance4.get_static_property("horizontal_separator_width"),{fallback:0}),horizontalSeparatorColor:new Property(instance4=>instance4.get_static_property("horizontal_separator_color"),{fallback:"black"}),paddingLeft:new Property(instance4=>evaluate_property(instance4,"padding_left"),{fallback:0}),paddingRight:new Property(instance4=>evaluate_property(instance4,"padding_right"),{fallback:0}),paddingTop:new Property(instance4=>evaluate_property(instance4,"padding_top"),{fallback:0}),paddingBottom:new Property(instance4=>evaluate_property(instance4,"padding_bottom"),{fallback:0})},styles:[...placedStyling(element),new Style(instance4=>({"flex-direction":isTableDirectionHorizontal(element)?"row":"column"}))]}));delegateEvents(["mousemove"]);init_btype_ids();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator256=__toESM(require_web_dom_collections_iterator());init_solid();init_table_element();init_properties();init_define_process_env();init_shim();init_web();init_web();init_solid();init_table_element();init_element_eval();function RunRepeatingTable(props){var _table_instance$canva;let table_instance=props.instance.parent(),context=useContext(TableContext);if(!table_instance||!context)return[];(_table_instance$canva=table_instance.canvas)==null||_table_instance$canva.css({overflow:"auto","overflow-scrolling":"touch","-webkit-overflow-scrolling":"touch"});let layout=table_instance.table_element_layout;if(!layout)return[];let fixedList=()=>props.instance.get_static_property("fixed_number_repeating_axis"),totalCells=()=>{var _evaluate_property;return(_evaluate_property=evaluate_property(props.instance,"fixed_number_repeating_axis_count"))!=null?_evaluate_property:0};return createComponent(RunRepeatingComponent,mergeProps(props,{layout,get fixedList(){return fixedList()},showAllItems:!1,get scrollDirection(){return context.direction},rows:1,get totalCells(){return totalCells()},dataInstance:table_instance,childProps:index=>({get hasTopBorder(){return context.direction==="vertical"&&index()>0},get hasLeftBorder(){return context.direction==="horizontal"&&index()>0},get firstRow(){return index()===0},get cellIndex(){return index()},separatorStyle:props.separatorStyle,separatorWidth:props.separatorWidth,separatorColor:props.separatorColor})}))}init_errors();var _tmpl$46=template("<div>");function TableCrossAxisComponent(props){var _props$wrapper,_useContext$editRepea,_useContext,_useContext2;let context=useContext(TableContext);if(context==null)throw new UnexpectedError("Table Component outside of a Table",{axisId:props.instance.element_id()});let instance4=props.instance,[repeatingCount,setRepeatingCount]=createSignal(1);onMount(()=>{context.registerCrossAxis(instance4.element_id(),{get size(){return instance4[`current_${context.direction==="horizontal"?"width":"height"}`]()},get index(){return props.index},get repeating(){return props.repeating},get count(){return props.repeating?repeatingCount():1},get visible(){return instance4.is_visible_me()}}),onCleanup(()=>{context.deregisterCrossAxis(instance4.element_id())})});let borderStyle=createMemo(()=>({[`border-${context.direction==="vertical"?"bottom":"right"}`]:context.lastCrossAxis===instance4.element_id()&&repeatingCount()===1?"none":context.crossAxesSeparator.css})),stickyStyling=createMemo(()=>props.stickyAxis?{position:"sticky",[context.direction==="vertical"?"top":"left"]:"0px","z-index":CELL_ZINDEX+1}:{}),Wrapper=(_props$wrapper=props.wrapper)!=null?_props$wrapper:props2=>props2.children,EditRepeatingTable=(_useContext$editRepea=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.editRepeatingTable)!=null?_useContext$editRepea:(_useContext2=useContext(ThumbnailContext_default))==null?void 0:_useContext2.editRepeatingTable,hasDummies=EditRepeatingTable!=null,createStyling=(instance5,outer)=>{let watchers2=crossAxisStyling(props.instance.element).filter(style2=>instance5.run_mode()||outer==null||style2.outerPositioning===outer).map(style2=>style2.createClientWatcher(instance5,void 0,{turnedVisible:!0}));return()=>Object.assign({},...watchers2.map(watcher=>watcher()))},wrapperStyling=createStyling(props.instance,!0),innerStyling=createStyling(props.instance,instance4.edit_mode()?!1:void 0);return[createComponent(Wrapper,{get style(){return{...borderStyle(),...props.repeating?wrapperStyling():{},"box-sizing":"content-box"}},get children(){var _el$=_tmpl$46();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,()=>!props.repeating||hasDummies?props.children:void 0),createRenderEffect(_p$=>{var _v$=props.id,_v$2={position:"relative",...props.style,...!props.instance.edit_mode()&&(hasDummies||!props.repeating)?borderStyle():{},...hasDummies&&props.repeating?innerStyling():!props.instance.edit_mode()&&!props.repeating?stickyStyling():{},[context.direction==="vertical"?"min-width":"min-height"]:"fit-content"},_v$3={...props.classList,"bubble-cross-axis":!0};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$}}),createMemo(()=>createMemo(()=>!!props.repeating)()?EditRepeatingTable!=null?createComponent(EditRepeatingTable,mergeProps({get dummySeparatorCss(){return context.mainAxesSeparator.css},get separatorStyle(){return context.crossAxesSeparator.style},get separatorColor(){return context.crossAxesSeparator.color},get separatorWidth(){return context.crossAxesSeparator.width},get cellSizing(){return{...wrapperStyling(),...innerStyling()}},setNumDummies:num=>setRepeatingCount(num+1)},props)):createComponent(RunRepeatingTable,{get instance(){return props.instance},get separatorStyle(){return context.crossAxesSeparator.style},get separatorColor(){return context.crossAxesSeparator.color},get separatorWidth(){return context.crossAxesSeparator.width},get turnedVisible(){return props.turnedVisible},cellSizing:{}}):void 0)]}var TableCrossAxisComponent_default=createElement_default(TableCrossAxisComponent,void 0,element=>{let repeating=element.get_static_property("cross_axis_repeat");return{properties:{index:new Property(instance4=>element.get_static_property("axis_index"),{fallback:0,noWaitVisible:!0}),repeating:new Property(instance4=>repeating,{fallback:!1,noWaitVisible:!0}),stickyAxis:new Property(instance4=>element.get_static_property("make_sticky"),{fallback:!1})},styles:repeating?[]:crossAxisStyling(element)}});init_table_element();init_define_process_env();init_shim();var import_web_dom_collections_iterator257=__toESM(require_web_dom_collections_iterator()),import_autorun8=__toESM(require_autorun());init_element_eval();init_elements2();init_element_props();init_status_bar();init_u2();init_b_object();init_lib();var TableLayout=class{constructor(instance4){this.instance=void 0,this._raw_list_data_watcher=void 0,this.extra_fields=void 0,this.previous_search=void 0,this.type=void 0,this.spinner=void 0,this.finished_loading_switch=void 0,this.type="Table",this.instance=instance4,instance4.repeating_layout_type="Table",this.finished_loading_switch=(0,u_exports2.MakeSwitch)(void 0,"loading_switch"),this.extra_fields=[],this.spinner=null,this.setup_messages()}add_spinner(){if(!this.instance.is_visible()){var _this$spinner;(_this$spinner=this.spinner)==null||_this$spinner.call(this);return}this.spinner||(this.spinner=spinner(this.instance))}remove_spinner(){var _this$spinner2;(_this$spinner2=this.spinner)==null||_this$spinner2.call(this),this.spinner=null}estimate_one_row(){return 1}compute_extra_fields(){this.extra_fields=[]}set_loading(data){this.instance.state("loading",data),data?this.finished_loading_switch.turn_off():this.finished_loading_switch.turn_on()}columns(){return 1}table_direction(){return this.instance.get_static_property("table_direction")}guess_number_of_cells(cross_axis_instance){let guess_dimension=dimension=>{var _element_eval$evaluat2;let container_size;if(dimension==="height"){var _this$instance$canvas,_this$instance$canvas2;container_size=(_this$instance$canvas=(_this$instance$canvas2=this.instance.canvas)==null?void 0:_this$instance$canvas2.innerHeight())!=null?_this$instance$canvas:0}else{var _this$instance$canvas3,_this$instance$canvas4;container_size=(_this$instance$canvas3=(_this$instance$canvas4=this.instance.canvas)==null?void 0:_this$instance$canvas4.innerWidth())!=null?_this$instance$canvas3:0}let axis_coord=0;for(let cross_axis of this.instance.children)if(cross_axis.element.type()==="TableCrossAxis"&&cross_axis!==cross_axis_instance&&cross_axis.is_visible_me())if(cross_axis.get_static_property(`single_${dimension}`)||!cross_axis.get_static_property(`fit_${dimension}`)){var _element_eval$evaluat;let size=(_element_eval$evaluat=evaluate_property(cross_axis,`min_${dimension}_css`))!=null?_element_eval$evaluat:"0px";if(size.includes("%")){let percentage=parseInt(size);axis_coord+=percentage/100*container_size}else axis_coord+=parseInt(size)}else{var _cross_axis$canvas$ou,_cross_axis$canvas;axis_coord+=(_cross_axis$canvas$ou=(_cross_axis$canvas=cross_axis.canvas)==null?void 0:_cross_axis$canvas.outerHeight())!=null?_cross_axis$canvas$ou:0}let first_cell=this.instance.edit_mode()?cross_axis_instance:cross_axis_instance.children[0],min_cell_size=(_element_eval$evaluat2=evaluate_property(cross_axis_instance,`min_${dimension}_css`))!=null?_element_eval$evaluat2:"100%";if(this.instance.run_mode()&&min_cell_size.includes("%")){let percentage=Math.max(parseInt(min_cell_size),1);return Math.max(Math.ceil(100-axis_coord/container_size*100/percentage),1)}else{var _pixels;let pixels;if(cross_axis_instance.get_static_property(`single_${dimension}`))pixels=parseInt(min_cell_size);else if(first_cell==null||!cross_axis_instance.get_static_property(`fit_${dimension}`))pixels=parseInt(min_cell_size);else{let is_hidden=!first_cell.is_visible();if(first_cell.do_show(),dimension==="height"){var _first_cell$canvas;pixels=(_first_cell$canvas=first_cell.canvas)==null?void 0:_first_cell$canvas.outerHeight()}else{var _first_cell$canvas2;pixels=(_first_cell$canvas2=first_cell.canvas)==null?void 0:_first_cell$canvas2.outerWidth()}is_hidden&&first_cell.do_hide()}pixels=Math.max((_pixels=pixels)!=null?_pixels:1,1);let repeating_size=0;if(dimension==="height"){if(this.instance.run_mode()&&is_fitting_height(this.instance)){var _cross_axis_instance$,_cross_axis_instance$2;repeating_size=Math.max(window.innerHeight-((_cross_axis_instance$=(_cross_axis_instance$2=cross_axis_instance.canvas)==null?void 0:_cross_axis_instance$2[0].getBoundingClientRect().top)!=null?_cross_axis_instance$:0),0)}min_height_css(this.instance)}else{if(this.instance.run_mode()&&is_fitting_width(this.instance)){var _cross_axis_instance$3,_cross_axis_instance$4;repeating_size=Math.max(window.innerWidth-((_cross_axis_instance$3=(_cross_axis_instance$4=cross_axis_instance.canvas)==null?void 0:_cross_axis_instance$4[0].getBoundingClientRect().left)!=null?_cross_axis_instance$3:0),0)}min_width_css(this.instance)}if(repeating_size=Math.max(repeating_size,container_size-axis_coord),this.instance.run_mode())return Math.max(Math.ceil(repeating_size/pixels),1);{var _element_eval$evaluat3;let separator_name=dimension==="height"?"horizontal_separator":"vertical_separator",separator_size=evaluate_property(this.instance,`${separator_name}_style`)==="none"?0:(_element_eval$evaluat3=evaluate_property(this.instance,`${separator_name}_width`))!=null?_element_eval$evaluat3:0;return Math.max(Math.floor((repeating_size+separator_size)/(pixels+separator_size)),1)}}};return cross_axis_instance.is_visible()?this.table_direction()==="vertical"?guess_dimension("height"):guess_dimension("width"):0}data_source(){return evaluate_property(this.instance,"data_source")}set_list_data(data){this.instance.state("list_data",data)}set_show_range(data){this.instance.state("show_range",data)}write_data(new_data){var _new_data;if(lib_default.or_throw().bubble_version()>=29){this.instance.state("overridden_list_data",new_data);return}let dehydrated;(_new_data=new_data)!=null&&_new_data.dehydrate?dehydrated=new_data.dehydrate():(dehydrated="no data",new_data=null),dehydrated!==this.previous_search&&(this.previous_search=dehydrated,this.set_list_data(new_data),this.set_show_range(0))}setup_messages(){this.set_list_data(STATE_NOT_READY2),lib_default.or_throw().bubble_version()<29?this.instance.autorun(()=>{this.instance.state("datasource_changed_by_workflow_action")||this.write_data(this.data_source())}):(this.instance.state("list_data",()=>this.instance.state("datasource_changed_by_workflow_action")?this.instance.state("overridden_list_data"):this.data_source()),this.instance.autorun(()=>{var _new_data2;let new_data=this.instance.state("list_data"),dehydrated;(_new_data2=new_data)!=null&&_new_data2.dehydrate?dehydrated=new_data.dehydrate():(dehydrated="no data",new_data=null),dehydrated!==this.previous_search&&(this.previous_search=dehydrated,this.set_show_range(0))})),this.instance.on_message("set_list_data",new_list=>{this.instance.state("datasource_changed_by_workflow_action",!0),this.write_data(new_list)})}list_data(){return this.instance.state("list_data")}init_raw_list_watcher(start_fn,end_fn){var _this$_raw_list_data_;(_this$_raw_list_data_=this._raw_list_data_watcher)==null||_this$_raw_list_data_.destroy(),this._raw_list_data_watcher=(0,import_autorun8.Watcher)(()=>{var _this$instance$state$,_this$instance$state,_this$instance$state$2,_this$instance$state$3,_this$instance$state$4;let start_index=start_fn(),last_index=end_fn();return(_this$instance$state$=(_this$instance$state=this.instance.state("list_data"))==null||(_this$instance$state$2=_this$instance$state.with_extra_fields)==null||(_this$instance$state$3=(_this$instance$state$4=_this$instance$state$2.call(_this$instance$state,this.extra_fields)).get_children)==null?void 0:_this$instance$state$3.call(_this$instance$state$4,start_index,last_index))!=null?_this$instance$state$:[]});let prev;return this._raw_list_data_watcher.on_value(new_val=>{this.set_loading(!compare(new_val,prev)),prev=new_val}),this._raw_list_data_watcher}raw_list_data(){var _this$_raw_list_data_2;return(_this$_raw_list_data_2=this._raw_list_data_watcher)==null?void 0:_this$_raw_list_data_2.get()}};init_StaticList();function makeName(table,element){return table==null?element.get_name():`${table.get_name()}'s ${element.get_name()}`}make_element("Table",{display:"Table",category:"containers",glyph_id:"table",list_order:3,keyboard_shortcut:null,condition(root2){var _ref,_root$get_responsive_,_root$is_mobile;return((_ref=appquery_default.get_public_setting("bubble_version")>=21||appquery_default.get_public_setting("bubble_version")===20&&(root2==null?void 0:root2.get_static_property("page_version_21_upgrade")))!=null?_ref:!1)&&root2!=null&&((_root$get_responsive_=root2.get_responsive_version)==null?void 0:_root$get_responsive_.call(root2))>0&&!((_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},properties_for_new:{fit_width:!0,single_width:!1,min_width_css:"296px",min_height_css:"296px"},defaults:{width:NUM_DEFAULT_COLUMNS*DEFAULT_COLUMN_WIDTH,height:NUM_DEFAULT_ROWS_EDITOR*DEFAULT_REPEATING_ROW_HEIGHT+DEFAULT_HEADER_ROW_HEIGHT},generate_default_children(){function gen_column(id,index,name){return{id,type:"TableMainAxis",properties:{axis_index:index},default_name:name}}let columnIds=Array.from({length:NUM_DEFAULT_COLUMNS},()=>appquery_default.uid());function gen_row(index,repeating,name){let repeatingDefaultProperties={fixed_number_repeating_axis:!0,fixed_number_repeating_axis_count:NUM_DEFAULT_ROWS_EDITOR};return{id:appquery_default.uid(),type:"TableCrossAxis",properties:{axis_index:index,cross_axis_repeat:repeating,min_height_css:`${repeating?DEFAULT_REPEATING_ROW_HEIGHT:DEFAULT_HEADER_ROW_HEIGHT}px`,...repeating?repeatingDefaultProperties:{},min_width_css:`${repeating?DEFAULT_REPEATING_ROW_HEIGHT:DEFAULT_HEADER_ROW_HEIGHT}px`},default_name:name,elements:Object.fromEntries(columnIds.map(id=>[appquery_default.uid(),{id:appquery_default.uid(),type:"TableCell",properties:{cell_main_axis_id:id,container_layout:"row"},default_name:"Cell"}]))}}return{...Object.fromEntries(columnIds.map((id,index)=>[appquery_default.uid(),gen_column(id,index,`Column ${getLetterIndex(index)}`)])),[appquery_default.uid()]:gen_row(0,!1,"Row 0"),[appquery_default.uid()]:gen_row(1,!0,"Row 1 (Repeating)")}},standard_container_layout:"table",field_names:{table_direction:{no_states:!0,default:"vertical"},group_type:{no_states:!0},data_source:{},vertical_separator_style:{no_states:!0,default:"solid",in_style:!0},vertical_separator_width:{default:1,in_style:!0,no_states:!0},vertical_separator_color:{default:"#ECECEC",in_style:!0,no_states:!0},horizontal_separator_style:{default:"solid",in_style:!0,no_states:!0},horizontal_separator_width:{default:1,in_style:!0,no_states:!0},horizontal_separator_color:{default:"#ECECEC",in_style:!0,no_states:!0}},uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,property_applications:[new property_applications_default.Dimensions,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity],change_cursor_style_if_clickable:!0,can_defer_drawing(){return!0},get_min_width(){return 0},get_state_value(element,name){if(name==="list_data"){let btype_id=element.get_static_property("group_type");return btype_id?list_type(btype_id):"null"}},add_specific_messages(messages,element){let list_btype=element.get_state_value("list_data");list_btype!=null&&extend(messages,{get_list_data:{description:"'s "+list_btype.display(),is_client_state(){return!0},section:"States",ret_btype:list_btype,fn(a){var _a$state$list_cast,_a$state,_list_btype$inner,_list_btype$inner2;return(_a$state$list_cast=a==null||(_a$state=a.state("list_data"))==null?void 0:_a$state.list_cast((_list_btype$inner=list_btype.inner())==null?void 0:_list_btype$inner.id()))!=null?_a$state$list_cast:new StaticList_default([],null,(_list_btype$inner2=list_btype.inner())==null?void 0:_list_btype$inner2.id())}},get_loading_status:{description:" is loading",is_client_state(){return!0},section:"States",ret_btype:"boolean",fn(a){var _a$state2;return(_a$state2=a==null?void 0:a.state("loading"))!=null?_a$state2:this.ret_btype_null()}}})},register(instance4){instance4.table_element_layout=new TableLayout(instance4)},get_html(instance4){return"<div></div>"},initialize(instance4){let canvas=instance4.canvas;canvas.addClass("bubble-legacy-table"),canvas.append('<span class="incompatible-message">Incompatible: Table Element</span>')},contains_group_data:!1,is_restricted_container:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},is_input:!1,add_an_invisible_div_on_the_top:!1,solid_component:TableElementComponent_default});make_element("TableMainAxis",{field_names:{axis_index:{no_states:!0}},property_applications:[new property_applications_default.ResponsiveElement],uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,is_input:!1,contains_group_data:!1,should_not_be_brought_to_front_when_selected:!0,hide_from_elements_tree:!0,get_min_width(){return 0},not_draggable(){return!0},no_margins(){return!0},is_pseudo:!0,no_thumbnail:!0,cant_delete(element){return getAxes(element.parent(),"TableMainAxis").length<=1},generate_name(element){let index=getRelativeIndex(element);return`${isTableDirectionHorizontal(element.parent())?"Row":"Column"} ${getLetterIndex(index)}`},name_for_datasource(element){return makeName(element.parent(),element)},get_type_display(element){return isTableDirectionHorizontal(element.parent())?"Row":"Column"},manual_wrapper:!0,change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,get_html(instance4){return"<div></div>"},initialize(instance4){},compute_initial_properties(data,container_element,additional_options){if((additional_options==null?void 0:additional_options.neighborId)!==void 0){let type=appquery_default.element(additional_options.neighborId).type();data.properties.axis_index=updateIndicesOnCreate(additional_options.neighborId,type,additional_options.direction)}},solid_component:TableMainAxisComponent_default});make_element("TableCrossAxis",{field_names:{axis_index:{no_states:!0},cross_axis_repeat:{no_states:!0,default:!1},fixed_number_repeating_axis:{no_states:!0,default:!1},fixed_number_repeating_axis_count:{default:1}},property_applications:[new property_applications_default.ResponsiveElement,new property_applications_default.Opacity,new property_applications_default.Background],no_margins(){return!0},get_states(){return["list_data"]},register(instance4){instance4.repeating_layout_type="Table"},uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,is_input:!1,contains_group_data:!0,is_restricted_container:!0,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},get_min_width(){return 0},not_draggable(){return!0},is_pseudo:!0,no_thumbnail:!0,cant_delete(element){return element.get_static_property("cross_axis_repeat")},generate_name(element){let index=getRelativeIndex(element),axisDisplay=isTableDirectionHorizontal(element.parent())?"Column":"Row",repeating=element.get_static_property("cross_axis_repeat")?" (Repeating)":"";return`${axisDisplay} ${index}${repeating}`},name_for_datasource(element){return makeName(element.parent(),element)},get_type_display(element){return isTableDirectionHorizontal(element.parent())?"Column":"Row"},manual_wrapper:!0,standard_container_layout:"table_cross_axis",change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,can_reference(element){return!element.get_static_property("cross_axis_repeat")},register_children(instance4){instance4.get_static_property("cross_axis_repeat")&&instance4.run_mode()||instance4._default_register_children(instance4.element.elements())},draws_own_children(element){return element.get_static_property("cross_axis_repeat")},is_repeating(element){return element.get_static_property("cross_axis_repeat")},draw_children(instance4){},get_html(instance4){return"<div></div>"},initialize(instance4){},solid_component:TableCrossAxisComponent_default,get_messages(element){return["draw_till"]}});make_element("TableCell",{display:"Cell",field_names:{cell_main_axis_id:{no_states:!0}},property_applications:[new property_applications_default.ResponsiveContainer,new property_applications_default.PaddingFields,new property_applications_default.Opacity,new property_applications_default.Background],uses_css_responsive:!0,always_visible:!0,is_input:!1,contains_group_data:!1,can_have_children(){return!0},get_children_canvas(instance4){return instance4.get_canvas()},get_min_width(){return 0},not_draggable(){return!0},show_overflow_on_drag:!0,not_resizable(){return!0},no_margins(){return!0},is_pseudo:!0,cant_delete(){return!0},generate_name(element){let crossAxis=element.parent();if(crossAxis==null)return"Cell";let crossAxisIndex=getRelativeIndex(crossAxis),mainAxis=element.get_static_property("cell_main_axis_id"),mainAxisIndex=getRelativeIndex(appquery_default.element(mainAxis));return`Cell ${crossAxisIndex}${getLetterIndex(mainAxisIndex)}`},name_for_datasource(element){var _element$parent2;return makeName((_element$parent2=element.parent())==null?void 0:_element$parent2.parent(),element)},manual_wrapper:!0,change_cursor_style_if_clickable:!0,add_an_invisible_div_on_the_top:!1,can_fit_height:!0,can_fit_width:!0,get_html(instance4){return"<div></div>"},initialize(instance4){},solid_component:TableCellComponent_default});init_define_process_env();init_shim();var import_web_dom_collections_iterator260=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_property_applications();init_element_utils();init_text_elements();init_element_eval();init_elements();init_define_process_env();init_shim();init_web();init_web();var import_web_dom_collections_iterator259=__toESM(require_web_dom_collections_iterator());init_appquery();init_b_ui();init_text_elements();init_solid();init_define_process_env();init_shim();init_web();function ServerHTML(props){return ssr(props.html)}var ServerHTML_default=ServerHTML;init_element_styles();init_properties();init_web();init_element_eval();function computeText(instance4){let is_pre_wrap=appquery_default.get_public_setting("bubble_version")>=10,recognize_links=instance4.get_static_property("recognize_links"),no_bbcode=instance4.get_static_property("no_bbcode"),props={};for(let prop of["text","editor_preview_text","link_color","nofollow"])props[prop]=evaluate_property(instance4,prop);let text2;if(instance4.run_mode()||!props.editor_preview_text||!props.text||instance4.element.property("text").is_static()?text2=props.text:text2=props.editor_preview_text,no_bbcode)return recognize_links&&!has_bbcode(text2)?{html:bbcode_to_html(replace_links_emails(instance4,props),is_pre_wrap)}:{text:text2,cssStyle:{"white-space":"pre-wrap"}};{let modified_text=text2;return recognize_links&&(modified_text=replace_links_emails(instance4,props)),{html:bbcode_to_html(modified_text,is_pre_wrap)}}}function TextComponent(props){var _props$tagName;let instance4=props.instance;createEffect(()=>{props.useDotDotDot&&(apply_dotdotdot(instance4,instance4.edit_mode()?"letter":"words"),onCleanup(()=>remove_dotdotdot(instance4)))});let html=()=>props.verticalCenter||instance4.run_mode()&&props.useDotDotDot?`<div>${props.textData.html}</div>`:props.textData.html;createEffect(()=>{if(props.textData.html!=null)instance4.canvas.html(html()),add_internal_navigation_handlers(instance4.canvas[0]);else if(instance4.run_mode()&&props.useDotDotDot){let div2=document.createElement("div");div2.innerText=props.textData.text,instance4.canvas.html(div2.outerHTML)}else instance4.canvas.text(props.textData.text)});let tagName=instance4.edit_mode()?"div":(_props$tagName=props.tagName)!=null?_props$tagName:null;onMount(()=>{defaultEventHandlers(instance4.canvas[0],()=>instance4)});let classList2=()=>({...props.classList,"bubble-r-vertical-center":props.verticalCenter});return isServer?createComponent(Dynamic,{get id(){return props.id},component:tagName,get style(){return{...props.style,...props.textData.cssStyle}},get classList(){return classList2()},get children(){return createMemo(()=>!!props.textData.html)()?createComponent(ServerHTML_default,{get html(){return html()}}):props.textData.text}}):createComponent(Dynamic,{get id(){return props.id},component:tagName,ref(r$){var _ref$=props.ref;typeof _ref$=="function"?_ref$(r$):props.ref=r$},get style(){return{...props.style,...props.textData.cssStyle}},get classList(){return classList2()}})}var TextComponent_default=createElement2(TextComponent,element=>{let tagType=element.get_styleable_static_property("tag_type");return{tagName:tagType==="normal"||!appquery_default.get_public_setting("expose_text_tags")||tagType==null?"div":tagType}},element=>({properties:{textData:new Property(computeText,{fallback:{text:""}}),useDotDotDot:new Property(could_clip),verticalCenter:new Property(instance4=>evaluate_property(instance4,"vertical_centering"))},styles:[new Style(instance4=>({"white-space":appquery_default.get_public_setting("bubble_version")>=10?"pre-wrap":"",overflow:instance4.edit_mode()?"hidden":"visible"})),...placedStyling(element)]}));make_element("Text",{category:"visual elements",glyph_id:"type",list_order:1,keyboard_shortcut:"T",defaults:{width:100,height:36},properties_for_new:{single_width:!1,fit_width:!0,min_height_css:"0px",min_width_css:"0px"},properties_for_mobile:{min_height_css:"45px"},field_names:extend({text:{default:"...edit me..."},editor_preview_text:{no_states:!0,only_edit_mode:!0},stretch_to_fit:{default:!1,no_states:!0},cut_off_content:{no_states:!0},shrink_if_less_high:{no_states:!0},tag_type:{no_states:!0,default:"normal",in_style:!0},recognize_links:{no_states:!0},link_color:{optional:!0,no_states:!0},nofollow:{no_states:!0},no_bbcode:{no_states:!0}},start_workflow_field_names),property_applications:[new property_applications_default.Dimensions,new property_applications_default.Font,new property_applications_default.FontShadow,new property_applications_default.FontSpacing,new property_applications_default.PaddingText,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,no_vertical_if_legacy_center:!0,allow_legacy:!0}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Background,new property_applications_default.ResponsiveElement,new property_applications_default.ToolTip,new property_applications_default.Rotation,new property_applications_default.Opacity],uses_css_responsive:!0,can_fit_width:!0,can_fit_height:!0,solid_component:TextComponent_default,change_cursor_style_if_clickable:!0,get_html(instance4){if(!instance4.run_mode()||instance4.get_static_property("tag_type")==="normal"||!appquery_default.get_public_setting("expose_text_tags"))return"<div></div>";{let type=instance4.get_static_property("tag_type");return"<"+type+"></"+type+">"}},get_min_width(element){return 0},can_defer_drawing(){return!0},register(){},attempt_size_only_draw(instance4){return instance4.element.no_size_when_hidden()},initialize(instance4){let canvas=instance4.get_canvas();instance4.autorun(()=>{appquery_default.get_public_setting("bubble_version")>=10?property_applications_default.apply_css_style(canvas,{"white-space":"pre-wrap"}):property_applications_default.apply_css_style(canvas,{"white-space":""})}),instance4.wait_for_visible_lite(()=>{let wrap2;instance4.edit_mode()?(wrap2="letter",canvas[0].style.overflow="hidden"):(wrap2="words",canvas[0].style.overflow="visible"),pre_cache(instance4,["text","font_size","padding_vertical","line_height","word_spacing","letter_spacing","rotation_angle","vertical_centering","editor_preview_text"]),apply_responsive_dynamic_properties_text(instance4),instance4.autorun(()=>{could_clip(instance4)?apply_dotdotdot(instance4,wrap2):remove_dotdotdot(instance4)}),instance4.on_destroy(()=>{remove_dotdotdot(instance4)})})},is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,events:["ButtonClicked","ElementPressed"],css_files:["css/optional/font-awesome.min.css"]});function apply_responsive_dynamic_properties_text(instance4){let canvas=instance4.get_canvas();instance4.autorun(()=>{let props_to_evaluate=["text","font_size","font_face","padding_vertical","line_height","link_color","nofollow","vertical_centering","editor_preview_text"],props={};for(let prop of props_to_evaluate)props[prop]=evaluate_property(instance4,prop);if(!instance4.is_animating())if(instance4.run_mode()){if(instance4.element.element_version(!0)<PADDING_VERSION){var _props$padding_vertic;canvas[0].style["padding-bottom"]=((_props$padding_vertic=props.padding_vertical)!=null?_props$padding_vertic:0)+"px"}if(!instance4.is_visible())return;property_applications_default.apply_css_style(canvas,{"word-break":"break-word"}),apply_text(instance4,canvas,props)}else apply_text(instance4,canvas,props),(void 0)(instance4)})}init_define_process_env();init_shim();var import_web_dom_collections_iterator261=__toESM(require_web_dom_collections_iterator()),import_es_string_replace49=__toESM(require_es_string_replace());init_color();init_known_plugins();var b_async12=__toESM(require_b_async());init_b_ui();init_property_applications();init_plugin_registry();init_image_utils();init_elements();init_element_eval();init_u2();init_lib();init_analytics();init_segment_events();var YOUTUBE_IFRAME_API_URL="https://www.youtube.com/iframe_api",prev_key2=b_async12.MakeKey(null,"always turned");prev_key2.turn();function video_queue2(cb,instance4){let new_key=b_async12.MakeKey(null,"next video");b_async12.WaitFor(prev_key2,()=>setTimeout(()=>{instance4!=null&&instance4.is_destroyed()||cb(),new_key.turn()},10)),prev_key2=new_key}make_element("Video",{category:"visual elements",glyph_id:"video",list_order:7,keyboard_shortcut:null,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},defaults:{width:320,height:240,collapse_margin:500,use_max_width:!0,max_width:100},field_names:{video_source:{default:"youtube",no_states:!0},video_id:{},auth_token:{optional:!0,no_states:!0},autoplay:{default:!1,no_states:!0},loop:{default:!1,no_states:!0},control_color_vimeo:{default:"#00adef",no_states:!0,in_style:!0}},can_fix_aspect_ratio(){return!0},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Padding,new property_applications_default.PaddingFields({minimum_element_version:PADDING_VERSION,allow_legacy:!0}),new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.ResponsiveElement,new property_applications_default.Opacity],uses_css_responsive:!0,get_html(instance4){return"<div></div>"},get_min_width(){return 0},notify_width(instance4,width2){return keep_proportions(instance4,width2,!0)},add_an_invisible_div_on_the_top:!0,change_cursor_style_if_clickable:!1,can_defer_drawing(){return!0},initialize(instance4){instance4.wait_for_visible_lite(()=>{let iframe_id="youtube_uuid_"+LUID(),canvas=instance4.get_canvas();instance4.setTimeout(()=>{pre_cache(instance4,["video_source","video_id","autoplay","control_color_vimeo","padding_horizontal","padding_vertical","loop","auth_token"]);let current_properties={};instance4.autorun(()=>{let actual_changes={},changes={};for(let prop of["video_source","video_id","autoplay","control_color_vimeo","padding_horizontal","padding_vertical","loop","auth_token"])changes[prop]=evaluate_property(instance4,prop),changes[prop]!==current_properties[prop]&&(actual_changes[prop]=changes[prop],current_properties[prop]=changes[prop]);changes.width_to_subtract=2*changes.padding_horizontal+property_applications_default.calculate_border_width(instance4),changes.height_to_subtract=2*changes.padding_vertical+property_applications_default.calculate_border_height(instance4);for(let prop of["width_to_subtract","height_to_subtract"])changes[prop]!==current_properties[prop]&&(actual_changes[prop]=changes[prop],current_properties[prop]=changes[prop]);let html=`<iframe allow="autoplay; fullscreen" width="100% - ${changes.width_to_subtract}" height=" 100% - ${changes.height_to_subtract}" `;should_block_cookies()&&(html+=' sandbox="allow-same-origin allow-presentation allow-scripts" ');let video_src;if(changes.video_source==="youtube"){var _changes$video_id;html+=`id = ${iframe_id} `,((_changes$video_id=changes.video_id)==null?void 0:_changes$video_id.indexOf)!=null&&changes.video_id.indexOf("watch?v=")!==-1&&(changes.video_id=changes.video_id.split("watch?v=")[1]),video_src=`//www.youtube.com/embed/${changes.video_id}?rel=0`,video_src+="&enablejsapi=1",changes.autoplay&&instance4.run_mode()&&(video_src+="&autoplay=1"),changes.loop&&instance4.run_mode()&&(video_src+="&loop=1&playlist="+changes.video_id),html+=' frameborder="0" allowfullscreen modestbranding="1" autohide="1"'}if(changes.video_source==="vimeo"){var _changes$video_id2;((_changes$video_id2=changes.video_id)==null?void 0:_changes$video_id2.indexOf)!=null&&changes.video_id.indexOf("https://vimeo.com/")!==-1&&(changes.video_id=changes.video_id.split("https://vimeo.com/")[1]);let color=rgb_to_hex(changes.control_color_vimeo).code.slice(1);video_src="//player.vimeo.com/video/"+changes.video_id+"?title=0&byline=0&portrait=0&color="+color,changes.autoplay&&instance4.run_mode()&&(video_src+="&autoplay=1"),changes.loop&&instance4.run_mode()&&(video_src+="&loop=1"),html+=' frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'}let html_as_jquery_element,token;if(changes.video_source===ZIGGEO){let service=plugin_registry_default.get_hardcoded_plugin(ZIGGEO);if(token=changes.auth_token||(service==null?void 0:service.get_key(service.key_for_html_header)),token){var _changes$video_id3,_changes$autoplay,_changes$loop;html_as_jquery_element=$("<ziggeoplayer/>"),html_as_jquery_element.attr({video:(_changes$video_id3=changes.video_id)!=null?_changes$video_id3:"no_video",application:token,auth:"true",width:"100%",height:"100%",autoplay:(_changes$autoplay=changes.autoplay)!=null?_changes$autoplay:"false",loop:(_changes$loop=changes.loop)!=null?_changes$loop:"false",theme:"modern"});let ziggeo_html=html_as_jquery_element[0].outerHTML.replace(/"/g,"'");html+=` frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen
style='overflow:hidden'
srcdoc="
<html style='overflow:hidden'>
<head style='overflow:hidden'>
    <meta http-equiv='Content-Security-Policy' content='upgrade-insecure-requests'>
    <link rel='stylesheet' href='https://assets.ziggeo.com/v2-stable/ziggeo.css' />
    <script src='https://assets.ziggeo.com/v2-stable/ziggeo.js'><\/script>
</head>
<body style='margin:0px'>
    ${ziggeo_html}
</body>
</html>
"`}else video_src=`https://ziggeo.io/p/${changes.video_id}`,html+=`height="100%"
frameborder="0"
scrolling="no"
referrerpolicy="no-referrer"
allowspeakers ${changes.autoplay?"allowautoplay":""} allowfullscreen
allow="${changes.autoplay?"autoplay *; ":""}  fullscreen *"
style="width:100%;height:100%" `}html+="></iframe>",(changes.video_source!=="ziggeo"||!token)&&(html_as_jquery_element=$(html),html_as_jquery_element.attr("src",video_src));let only_has_dimension_changes=changes.video_source!=="ziggeo",dim_only_changes={width_to_subtract:!0,height_to_subtract:!0};for(let change in actual_changes)if(!dim_only_changes[change]){only_has_dimension_changes=!1;break}let video_fixed_aspect_condition=instance4.element.has_fixed_aspect_ratio();if(instance4.run_mode()){if(only_has_dimension_changes){structure_fixed_aspect_ratio(instance4,canvas),canvas.children().attr(element_css(video_fixed_aspect_condition));return}changes.video_id?video_queue2(()=>{canvas.empty(),html_as_jquery_element.css(element_css(video_fixed_aspect_condition)),html_as_jquery_element.css("position","absolute"),structure_fixed_aspect_ratio(instance4,canvas),canvas.append(html_as_jquery_element)},instance4):(canvas.empty(),structure_fixed_aspect_ratio(instance4,canvas))}else canvas.empty(),img("",canvas,"//s3.amazonaws.com/appforest_uf/f1665093563671x395094029933674050/video.png").css(element_css(video_fixed_aspect_condition)),structure_fixed_aspect_ratio(instance4,canvas);lib_default().appname()==="meta"&&changes.video_source==="youtube"&&instance4.run_mode()&&inject_youtube_tracking(instance4,iframe_id,changes.video_id)})},20)})},is_input:!1,contains_group_data:!1});function inject_script(src){return new Promise((resolve,reject)=>{let script=document.createElement("script");script.src=src,script.addEventListener("load",resolve),script.addEventListener("error",e=>reject(e.error)),document.head.appendChild(script)})}function inject_youtube_tracking(instance4,iframe_id,video_id){inject_script(YOUTUBE_IFRAME_API_URL).then(()=>{let player;window.YT.ready(function(){onYouTubeIframeAPIReady()});function onYouTubeIframeAPIReady(){player=new window.YT.Player(iframe_id,{videoId:video_id,events:{onStateChange,onPlaybackQualityChange,onPlaybackRateChange}})}function onPlaybackQualityChange(event){let payload=build_segment_payload(video_id,player,"onPlaybackQualityChange");track(YOUTUBE_VIDEO_QUALITY_CHANGED,payload)}function onPlaybackRateChange(event){let payload=build_segment_payload(video_id,player,"onPlaybackRateChange");track(YOUTUBE_VIDEO_RATE_CHANGED,payload)}function onStateChange(event){let payload=build_segment_payload(video_id,player,"onStateChange"),segment_event_to_track=get_segment_event_to_track(event.data);track(segment_event_to_track,payload)}}).catch(error2=>{console.error(error2)})}var YOUTUBE_PLAYBACK_EVENTS_TRANSLATION={"-1":"unstarted",0:"ended",1:"playing",2:"paused",3:"buffering",5:"video cued"},get_segment_event_to_track=function(event_data){switch(translate_youtube_event(event_data)){case"ended":return YOUTUBE_VIDEO_ENDED;case"playing":return YOUTUBE_VIDEO_PLAYING;case"paused":return YOUTUBE_VIDEO_PAUSED;case"buffering":return YOUTUBE_VIDEO_BUFFER;case"video cued":return YOUTUBE_VIDEO_CUED;default:return`Youtube video: unknown event ${event_data}`}};function build_segment_payload(video_id,youtubePlayer,event_name){return{video_id,video_title:youtubePlayer.videoTitle,video_timestamp_in_secs:youtubePlayer.getCurrentTime(),video_total_duration:youtubePlayer.getDuration(),video_playback_rate:youtubePlayer.getPlaybackRate(),video_playback_quality:youtubePlayer.getPlaybackQuality(),event_name,current_user_id:lib_default().current_user()._id(),current_user_email:lib_default().current_user().get_email()}}var translate_youtube_event=function(event_data){return YOUTUBE_PLAYBACK_EVENTS_TRANSLATION[event_data==null?void 0:event_data.toString()]};init_define_process_env();init_shim();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator262=__toESM(require_web_dom_collections_iterator());init_solid();init_element_styles();init_u2();init_properties();init_appquery();var _tmpl$47=template("<div>"),WebViewComponent=props=>{var _useContext$webViewPr,_useContext,_useContext2;let WebViewPreviewComponent=(_useContext$webViewPr=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.webViewPreviewComponent)!=null?_useContext$webViewPr:(_useContext2=useContext(ThumbnailContext_default))==null?void 0:_useContext2.webViewPreviewComponent;if(!WebViewPreviewComponent)throw new UnexpectedError("Missing WebView preview element");return(()=>{var _el$=_tmpl$47();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(WebViewPreviewComponent,{get instance(){return props.instance},get page(){return createMemo(()=>!!props.pageName)()?appquery_default.get_page_by_name(props.pageName):void 0}})),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3=props.classList;return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()},WebViewComponent_default=createElement_default(WebViewComponent,void 0,element=>({properties:{pageName:new Property(instance4=>getPageName(instance4))},styles:[...placedStyling(element)]}));make_element("WebView",{display:"Web View",category:"visual elements",glyph_id:"rectangle",list_order:1,keyboard_shortcut:null,defaults:{width:150,height:150},field_names:{page:{default:"index",no_states:!0},data_to_send:{no_states:!0},add_parameters:{no_states:!0},url_parameters:{no_states:!0}},condition(root2){var _root$is_mobile;return!!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},property_applications:[new property_applications_default.Dimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.Rotation,new property_applications_default.ResponsiveElement,new property_applications_default.PaddingFields,new property_applications_default.Opacity],properties_for_new:{min_width_css:"0px",min_height_css:"100%"},updated_default_layout:{horiz_alignment:"center"},uses_css_responsive:!0,solid_component:WebViewComponent_default,get_min_width(element){return 0},get_html(instance4){return"<div></div>"},can_defer_drawing(){return!0},initialize(instance4){},is_input:!1,contains_group_data:!1,add_an_invisible_div_on_the_top:!1,events:["ButtonClicked","ElementPressed"]});init_define_process_env();init_shim();var import_web_dom_collections_iterator264=__toESM(require_web_dom_collections_iterator());init_custom_elements();init_color_tokens();init_element_eval();init_font_tokens();init_logger();init_u2();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();init_web();var import_web_dom_collections_iterator263=__toESM(require_web_dom_collections_iterator());init_solid();init_web();init_server_rendering();init_lib();init_element_styles();init_properties();init_font_tokens();init_element_eval();var import_autorun9=__toESM(require_autorun());init_appquery();init_logger();init_errors();var _tmpl$48=template("<div>");function CustomDefinitionComponent(props){let instance4=props.instance;return createEffect(prev=>{let toApply=props.childStyles[AT_ROOT];return style(document.documentElement,toApply,prev),toApply}),(()=>{var _el$=_tmpl$48();use(defaultEventHandlers,_el$,()=>props.instance);var _ref$=props.ref;return typeof _ref$=="function"?use(_ref$,_el$):props.ref=_el$,insert(_el$,createComponent(ChildWrapper,mergeProps(props,{get children(){return props.children}}))),createRenderEffect(_p$=>{var _v$=props.id,_v$2=props.style,_v$3={...props.classList,[props.containerClass]:!0,"page-element":instance4.edit_mode()};return _v$!==_p$.e&&setAttribute(_el$,"id",_p$.e=_v$),_p$.t=style(_el$,_v$2,_p$.t),_p$.a=classList(_el$,_v$3,_p$.a),_p$},{e:void 0,t:void 0,a:void 0}),_el$})()}var CustomDefinitionComponent_default=createElement2(CustomDefinitionComponent,element=>({shouldAddWrapper:element.should_add_extra_wrapper()}),(element,_ref2)=>{let{shouldAddWrapper}=_ref2;return{properties:containerProperties(shouldAddWrapper),styles:[new Style(instance4=>{let maxWidth=element.root_max_width(),maxHeight=element.root_max_height(),styling={"min-width":`${element.root_min_width()}px`,"max-width":maxWidth!=null?`${maxWidth}px`:"","min-height":`${element.root_min_height()}px`,"max-height":maxHeight!=null?`${maxHeight}px`:""};return styling.width=`${lib_default.or_throw().visual_edit.root_width()}px`,styling},{noWaitVisible:!0,outerPositioning:!0}),tokenStyling(),...containerStyling(shouldAddWrapper),...basicStyling(element)]}});init_lib();init_appquery();var plugin=transform_element("Custom Element",{field_names:extend({element_type:{default:"Group",no_states:!0},group_type:{no_states:!0},delete_custom_definition:{no_states:!0},new_responsive:{no_states:!0},responsive_version:{no_states:!0},upgrade_responsive_version:{no_states:!0,only_edit_mode:!0},element_version:{default:0,no_states:!0},min_width:{no_states:!0,default:0,optional:!0},use_max_width:{no_states:!0},max_width:{no_states:!0,default:100,optional:!0},page_folder:{optional:!0,no_states:!0,only_edit_mode:!0}},floating_field_names),can_defer_drawing(){return!0},initialize(instance4){},property_applications:[new property_applications_default.ShortDimensions,new property_applications_default.Background,new property_applications_default.Border,new property_applications_default.BoxShadow,new property_applications_default.RootSizing,new property_applications_default.ResponsiveContainer,new property_applications_default.PaddingFields,new property_applications_default.Opacity],uses_css_responsive:!0,solid_component:CustomDefinitionComponent_default,attach_to_body(){return!1},no_margins(){return!0},defaults:{bgcolor:"#FFFFFF",background_style:"bgcolor"},get_html(){return"<div></div>"},get_min_width(element){return 0},position_canvas(to_position,instance4){if(instance4.responsive_mode()){instance4.container.add(instance4);return}if($(".canvas").append(to_position),instance4.element.get_responsive_version()<1)return to_position.css({"margin-right":"auto","margin-left":"auto",position:"relative"})},always_visible:!0,can_have_children(){return!0},add_specific_messages(messages,element){extend(messages,customParameterMessages(element,{isDefinition:!0}))},get_children_canvas(instance4){return instance4.get_canvas()},get_state_value(element,name){return state_value_helper_for_group(element,name)},is_input:!1,contains_group_data:!0,change_cursor_style_if_clickable:!1,add_an_invisible_div_on_the_top:!1,not_draggable(){return!0}});registered_elements.CustomDefinition=plugin;init_define_process_env();init_shim();var import_web_dom_collections_iterator339=__toESM(require_web_dom_collections_iterator());init_define_process_env();init_shim();var assert_exports={};__export(assert_exports,{assert:()=>assert,fail:()=>fail});init_define_process_env();init_shim();var import_es_error_cause18=__toESM(require_es_error_cause());function assert(bool,msg){console.log(`Asserting true: ${bool}`),bool||fail(msg!=null?msg:"expected true, got: "+bool)}function fail(msg){throw new Error(msg)}var box_exports={};__export(box_exports,{bottom:()=>bottom,dim_props:()=>dim_props,get:()=>get7,get_dim:()=>get_dim,height:()=>height,inner_bottom:()=>inner_bottom,inner_height:()=>inner_height,inner_left:()=>inner_left,inner_right:()=>inner_right,inner_top:()=>inner_top,inner_width:()=>inner_width,left:()=>left,min_height:()=>min_height,min_width:()=>min_width,offset_bottom:()=>offset_bottom,offset_left:()=>offset_left,offset_right:()=>offset_right,offset_top:()=>offset_top,right:()=>right,set:()=>set,top:()=>top,transform_dim:()=>transform_dim,width:()=>width});init_define_process_env();init_shim();var import_web_dom_collections_iterator265=__toESM(require_web_dom_collections_iterator());init_u2();var left=(div2,val)=>get_set(div2,"left",val),top=(div2,val)=>get_set(div2,"top",val),offset_left=div2=>div2.offset().left,offset_top=div2=>div2.offset().top,right=div2=>left(div2)+width(div2),bottom=div2=>top(div2)+height(div2),width=(div2,val)=>get_set(div2,"width",val),height=(div2,val)=>get_set(div2,"height",val),inner_left=div2=>left(div2)+get_set(div2,"border-left-width"),inner_top=div2=>top(div2)+get_set(div2,"border-top-width"),inner_right=div2=>right(div2)-get_set(div2,"border-right-width"),inner_bottom=div2=>bottom(div2)-get_set(div2,"border-bottom-width"),inner_width=div2=>inner_right(div2)-inner_left(div2),inner_height=div2=>inner_bottom(div2)-inner_top(div2),offset_bottom=div2=>offset_top(div2)+height(div2),offset_right=div2=>offset_left(div2)+width(div2),min_width=div2=>get_set(div2,"border-left-width")+get_set(div2,"border-right-width")+get_set(div2,"padding-left")+get_set(div2,"padding-right"),min_height=div2=>get_set(div2,"border-top-width")+get_set(div2,"border-bottom-width")+get_set(div2,"padding-top")+get_set(div2,"padding-bottom");function get_dim(props){let res=properties_dim[create_key(props)];if(!res)throw new UnexpectedError("unrecognized: "+create_key(props));return res}var dim_props=dim=>dim_properties[dim];function transform_dim(dim,props){let new_props=extend({},dim_properties[dim],props);return get_dim(new_props)}var all_box={left,top,offset_left,offset_top,right,bottom,width,height,inner_left,inner_top,inner_right,inner_bottom,inner_width,inner_height,offset_right,offset_bottom,min_width,min_height,get_dim,dim_props,transform_dim},get7=(div2,dim)=>all_box[dim](div2),set=(div2,dim,val)=>all_box[dim](div2,val),all_dims=["width","left","right","inner_left","inner_right","inner_width","height","top","bottom","inner_top","inner_bottom","inner_height"],dim_properties={},properties_dim={};function create_key(props){return props.axis+props.type+props.edge+props.rank}function set_prop(dim,prop,value){dim_properties[dim]||(dim_properties[dim]={}),dim_properties[dim][prop]=value}function contains3(name,keys2){for(let key of keys2)if(name.indexOf(key)!==-1)return!0;return!1}for(let dim of all_dims)contains3(dim,["width","left","right"])?set_prop(dim,"axis","x"):set_prop(dim,"axis","y"),contains3(dim,["inner"])?set_prop(dim,"edge","inner"):set_prop(dim,"edge","outer"),contains3(dim,["width","height"])?set_prop(dim,"rank","span"):contains3(dim,["left","top"])?set_prop(dim,"rank","near"):set_prop(dim,"rank","far"),properties_dim[create_key(dim_properties[dim])]=dim;function get_set(div2,prop,val){return val==null?(val=Math.round(parseFloat(div2.css(prop))),isNaN(val)?0:val):div2.css(prop,val+"px")}init_client_config2();init_languages();init_locations2();init_logger();init_util();init_webfonts();var apiconnectorbase_exports2={};__export(apiconnectorbase_exports2,{APIConnectorBaseJWT:()=>APIConnectorBaseJWT2,APIConnectorBaseOauth2:()=>APIConnectorBaseOauth22,APIConnectorBaseOauth2Custom:()=>APIConnectorBaseOauth2Custom2,APIConnectorBaseOauth2PWFlow:()=>APIConnectorBaseOauth2PWFlow2,APIConnectorBasePrivateKey:()=>APIConnectorBasePrivateKey2,APIConnectorBaseSSLProtocol:()=>APIConnectorBaseSSLProtocol2,APIConnectorBasicAuth:()=>APIConnectorBasicAuth2,APIConnectorStructValue:()=>APIConnectorStructValue,BaseAPIConnector:()=>BaseAPIConnector,add_shared_params_and_headers:()=>add_shared_params_and_headers2,can_be_in_browser:()=>can_be_in_browser2,find_between_characters:()=>find_between_characters2,generate_request_from_call_data:()=>generate_request_from_call_data2,get_btypes_from_call:()=>get_btypes_from_call2,get_call_from_raw:()=>get_call_from_raw2,get_error_message:()=>get_error_message2,get_jwt_auth_params:()=>get_jwt_auth_params,get_oauth2_pw_auth_params:()=>get_oauth2_pw_auth_params,get_oauth2_user_auth_params:()=>get_oauth2_user_auth_params,get_private_key_auth_params:()=>get_private_key_auth_params,is_call_initialized:()=>is_call_initialized2,method_uses_body:()=>method_uses_body2,methods:()=>methods2,sanitize_url:()=>sanitize_url3,user_friendly_parameter_names:()=>user_friendly_parameter_names2,validate_header_name:()=>validate_header_name2,validate_header_value:()=>validate_header_value2,xml_to_json:()=>xml_to_json4});init_define_process_env();init_shim();var import_web_dom_collections_iterator278=__toESM(require_web_dom_collections_iterator());init_define_process_env();init_shim();var import_web_dom_collections_iterator266=__toESM(require_web_dom_collections_iterator());init_b_array();var bracket_regex=/\[([^\]]+)]/g,less_than_regex=/<[^>]+>/g;function find_between_characters(string,type){let char,regex,list4=[];if(!string)return list4;switch(type){case"bracket":regex=bracket_regex,char="[";break;case"less_than":regex=less_than_regex,char="<";break;default:char=type;for(let special_char of["\\",".","^","$","*","+","?"])type=type.split(special_char).join("\\"+special_char);regex=new RegExp(type+"(.*?)"+type,"g")}let items=string.match(regex);for(let a of items!=null?items:[])["bracket","less_than"].includes(type)?a.slice(1).indexOf(char)===-1&&list4.push(a.slice(1,-1)):list4.push(a.slice(char.length,-char.length));return unique(list4)}init_define_process_env();init_shim();var import_web_dom_collections_iterator270=__toESM(require_web_dom_collections_iterator()),import_es_string_replace51=__toESM(require_es_string_replace()),import_es_string_replace_all=__toESM(require_es_string_replace_all());init_u2();init_logger();init_lib();init_time();init_apiconnectorbase();init_btype_ids();init_btypes();init_appquery();init_define_process_env();init_shim();var import_web_dom_collections_iterator267=__toESM(require_web_dom_collections_iterator()),querystring8=__toESM(require_querystring());init_u2();var b_async13=__toESM(require_b_async());init_b_fiber();init_b_number();init_b_object();init_mode_check();init_logger();init_errors();init_hydrate();init_async_state3();init_incremental();var dependency=__toESM(require_dependency());init_btype_ids();init_define_process_env();init_shim();init_errors();function not_critical_retry_failure(display2,reason){return new OwnerError("service unavailable",{display:"Sorry, "+display2+" is temporarily unavailable",reason})}init_db2();init_lib();init_appquery();init_btypes();init_eval_node_state();init_define_process_env();init_shim();init_b_string();var TCP_FAILURE="Failed to establish a connection";function is_retryable(err,response,custom_retry_handler,body_sent){if(custom_retry_handler&&custom_retry_handler(response,err))return!0;if(err){var _err$args;if(string_contains(err.message,TCP_FAILURE))return!0;switch((_err$args=err.args)==null?void 0:_err$args.code){case"ESOCKETTIMEDOUT":if(!body_sent)return!0;break;case"ECONNRESET":case"ECONNREFUSED":case"ETIMEDOUT":case"EHOSTUNREACH":case"ENETUNREACH":case"EPROTO":return!0}if(string_contains(err.message,"socket hang up")||string_contains(err.message,"SSL3_GET_RECORD:decryption failed or bad record mac"))return!0}return!!(response&&[429,502,503,504].includes(response.statusCode))}init_client_config2();var _get_keys={},_call_hash_dependencies={},_get_cache_client_props={},_get_cache_server_props={},_get_errors={},_get_cache_retries={},page_load_time=Date.now();function is_get_or_delete_request(req){var _req$method;return!req.method||["get","delete"].includes((_req$method=req.method)==null?void 0:_req$method.toLowerCase())}function build_full_url(req){return is_get_or_delete_request(req)&&req.data?req.url.indexOf("?")===-1?req.url+"?"+querystring8.stringify(req.data):req.url+"&"+querystring8.stringify(req.data):req.url}var optional_call_properties={data_type_for_ajax_call:!0,skip_property_security:!0},ExternalCall=class{constructor(_service){this.allow_apiservice=!0,this._execute_built_request=this._execute_built_request.bind(this),this._service=_service}static invalidate_client_side_calls(hashes){var _hashes;(_hashes=hashes)!=null||(hashes=[]);for(let hash2 of hashes){var _get_keys$hash,_call_hash_dependenci;(_get_keys$hash=_get_keys[hash2])==null||_get_keys$hash.turn(),delete _get_keys[hash2],delete _get_cache_server_props[hash2],delete _get_cache_client_props[hash2],(_call_hash_dependenci=_call_hash_dependencies[hash2])==null||_call_hash_dependenci.invalidate()}}service(){return this._service}display(){return this.human}get_btype_id(){return this.is_list?list_type(this.btype_id):this.btype_id}get_value_bubble_null(){return get5(this.get_btype_id()).get_bubble_null()}get_authenticator(){return this.service().get_authenticator()}is_authenticated(){return this.get_authenticator().is_authenticated()}must_proxy(){var _this$_must_proxy;return(_this$_must_proxy=this._must_proxy)!=null?_this$_must_proxy:this.get_authenticator().must_proxy()}get_key(name,override_version,miss_ok){var _this$override_key$na,_this$override_key;return(_this$override_key$na=(_this$override_key=this.override_key)==null?void 0:_this$override_key[name])!=null?_this$override_key$na:this.service().get_key(name,override_version,miss_ok)}get_property(name,fail_okay){let obj,res;if(this[name])res=this[name],obj=this;else{let service=this.service();service[name]&&(res=service[name],obj=service)}if(!res&&!optional_call_properties[name]){if(fail_okay)return null;throw new UnexpectedError("call "+this.human+" missing property "+name)}return typeof res=="function"&&(res=res.call(obj)),res}execute(prev,properties,authentication,_raw3,context){var _async_state$CurrentN;let current_eval_node2=get_current_eval_node();current_eval_node2==null&&on_client()&&!is_edit_mode()&&this.service_name==="apiconnector2"&&warn("oddly missing current_eval_node in call.execute",{_raw:_raw3});let call_location={current_eval_node:current_eval_node2,_raw:_raw3},fetch2=this._execute_async.bind(this,prev,properties,authentication,call_location,context);if(((_async_state$CurrentN=async_state_default3.CurrentNotReadyCatcher)==null?void 0:_async_state$CurrentN.length)>0)return null;if(on_server())return fetch2().block().ret;{var _call_hash_dependenci2,_this$service$notify_,_this$service;let hash2=json_stringify(dehydrate_tree({full_name:this.full_name,prev,properties,authentication}));if((_call_hash_dependenci2=_call_hash_dependencies[hash2])!=null||(_call_hash_dependencies[hash2]=dependency.Dependency()),_call_hash_dependencies[hash2].register(),(_this$service$notify_=(_this$service=this.service()).notify_call_was_hashed)==null||_this$service$notify_.call(_this$service,hash2,properties),!_get_keys[hash2]){_get_keys[hash2]=b_async13.MakeKey(null,"Call.execute key for "+hash2);let promise=fetch2();_get_keys[hash2].name=promise.toString.bind(promise),promise.callback((err,response)=>{var _get_keys$hash3,_get_keys$server_hash;if(err){var _get_keys$hash2;_get_errors[hash2]=err,(_get_keys$hash2=_get_keys[hash2])==null||_get_keys$hash2.turn();return}let{ret,properties:server_props}=response,server_hash=json_stringify(dehydrate_tree({full_name:this.full_name,prev,properties:server_props,authentication}));if(_get_cache_client_props[hash2]=ret,_get_cache_server_props[server_hash]=ret,(_get_keys$hash3=_get_keys[hash2])==null||_get_keys$hash3.turn(),(_get_keys$server_hash=_get_keys[server_hash])!=null||(_get_keys[server_hash]=b_async13.MakeKey(null,"Call.execute server_hash")),_get_keys[server_hash].turn(),server_hash!==hash2){var _get_cache_retries$ha;(_get_cache_retries$ha=_get_cache_retries[hash2])!=null||(_get_cache_retries[hash2]=0),_get_cache_retries[hash2]++,setTimeout(()=>{delete _get_cache_client_props[hash2],_get_cache_server_props[hash2]||delete _get_keys[hash2]},_get_cache_retries[hash2]===1?1:Math.pow(2,_get_cache_retries[hash2])*5e3)}})}if(b_async13.ensure_ready(_get_keys[hash2]),_get_errors[hash2])throw _get_errors[hash2];var _get_cache_server_pro;return(_get_cache_server_pro=_get_cache_server_props[hash2])!=null?_get_cache_server_pro:_get_cache_client_props[hash2]}}execute_async(prev,properties,authentication,call_location,context){return this._execute_async(prev,properties,authentication,call_location,context).then(_ref=>{let{ret}=_ref;return ret})}_execute_async(prev,properties,authentication,call_location,context){if(!on_server()&&this.must_proxy())return this.proxy_request(prev,properties,authentication,call_location,context).then(results=>(this.notify_value(results.ret),results));let test_info={prev,properties},req=this.build_request(prev,properties,authentication),promise=this._execute_built_request({req,test_info,prev,properties,authentication}),handler;return this.service().handle_request_failures?handler=this.service().handle_request_failures:handler=err=>{if(err.statusCode)return err;if(this.service().not_production_critical&&is_retryable(err))return not_critical_retry_failure(this.service().display(),err);{if(err.message===QUEUE_TIMEOUT)return err;let service=this.service();return new UnexpectedError("execute_async error",{err,prev,properties,authentication,service_display:service.display(),service_name:service.name})}},promise.then(results=>({ret:results,properties}),handler)}_execute_built_request(_ref2){let{req,test_info,prev,properties,authentication}=_ref2;if(req.dont_do_call)if(this.service().get_action_calls().includes(this.name)&&!req.no_error||req.force_error_message){var _req$message;throw new UserError("MISSING_INFO",(_req$message=req.message)!=null?_req$message:lib_default().get_text("CORE","MISSING_INFO")+this.human)}else return b_async13.Promise(null);return req.override_output?(this.notify_value(req.results),b_async13.Promise(req.results)):u_exports2.Promise(req).block_promise(12e5).then(req2=>(round_all(req2),req2)).then(req2=>lib_default().http_request(req2).block_promise(12e5).then(response=>{var _this$modify_and_retr;let modify_and_retry=(_this$modify_and_retr=this.modify_and_retry)==null?void 0:_this$modify_and_retr.call(this,req2,response);if(modify_and_retry)return req2=modify_and_retry,this._execute_built_request({req:req2,test_info,prev,properties,authentication});let data=this.service().response_to_data(req2,response,this.get_property("return_type",!0),this);optional_pause("response to data finished"),test_info.result_call=data;let results=this.extract_data(data,properties,response,req2);return optional_pause("extract data finished"),test_info.result_processed=results,this.notify_value(results),optional_pause("notify value finished"),results}))}build_request(prev,properties,authentication){var _req$method2,_auth$add_shared_para;let req=this.build(prev,properties);if(lib_default().bubble_version()>=25&&!req.no_user_agent&&on_server()){var _req$headers;(_req$headers=req.headers)!=null||(req.headers={}),"User-Agent"in req.headers||(req.headers["User-Agent"]="Bubble")}if(req.dont_do_call||req.override_output)return req;let dataType=this.get_property("data_type_for_ajax_call");dataType&&(req.dataType=dataType);let custom_retry_handler=this.get_property("custom_retry_handler",!0);if(custom_retry_handler&&(req.custom_retry_handler=custom_retry_handler),this.get_property("return_type",!0)==="raw"&&(req.encoding=null),(_req$method2=req.method)!=null||(req.method="get"),req.method=req.method.toLowerCase(),req.url&&req.path)throw new UnexpectedError("call "+this.name+" @build() call returned an object with both a url and a path: do one or the other");if(!req.url){var _req$path;req.url=this.get_property("base_url")+((_req$path=req.path)!=null?_req$path:""),delete req.path}let auth=this.get_authenticator();return(_auth$add_shared_para=auth.add_shared_params_and_headers)==null||_auth$add_shared_para.call(auth,req),b_async13.Promise(auth.add_authentication(req,authentication)).block_promise().then(req2=>(is_get_or_delete_request(req2)&&(req2.url=build_full_url(req2),delete req2.data),req2))}proxy_request(prev,properties,authentication,call_location,context){var _call_location;let serialization_promise,{_raw:_raw3,current_eval_node:current_eval_node2}=(_call_location=call_location)!=null?_call_location:{};if(prev=dehydrate_tree(prev),properties=dehydrate_tree(properties),this.get_property("skip_property_security"))serialization_promise=b_async13.Promise({skip_property_security:!0});else if(typeof this.generate_server_properties=="function")serialization_promise=b_async13.Promise({skip_property_security:!0});else{if(_raw3==null&&!(context!=null&&context.constraint_messsage))throw new UnexpectedError("Missing _raw in proxy_request",{current_eval_node:current_eval_node2});serialization_promise=serialize_context(context,current_eval_node2)}return serialization_promise.then(serialized_context=>{var _serialized_context,_current_eval_node,_context$element,_context$element$root;return(_serialized_context=serialized_context)!=null||(serialized_context={error_serializing_context:!0}),current_eval_node2=(_current_eval_node=current_eval_node2)==null?void 0:_current_eval_node.json._path(),call_location={_raw:_raw3,current_eval_node:current_eval_node2,page_name:lib_default().location.get_underlying_page(),page_id:context==null||(_context$element=context.element)==null||(_context$element$root=_context$element.root_instance)==null?void 0:_context$element$root.call(_context$element).element_id()},lib_default().location.post("server://apiservice/doapicallfromserver",{timezone_string:lib_default().current_timezone(),service_name:this.service().name,version:this.service().version,call_name:this.name,prev,properties,authentication,call_location,serialized_context,page_load_time,app_last_change:is_edit_mode()||is_plugin_edit_mode()?"edit":appquery_default.last_change(),ret_properties:!0}).then(result=>{var _result$ret,_result$ret2;return(result==null||(_result$ret=result.ret)==null?void 0:_result$ret.__bubble_tz_string_in_body)===!1&&info("doapicall request made attempting to pass in tz string and failed!",{appname:appquery_default.appname(),attempted_request:{timezone_string:lib_default().current_timezone(),service_name:this.service().name,version:this.service().version,call_name:this.name,prev,properties,authentication,call_location,serialized_context,page_load_time,app_last_change:is_edit_mode()||is_plugin_edit_mode()?"edit":appquery_default.last_change(),ret_properties:!0}}),result==null||(_result$ret2=result.ret)==null||delete _result$ret2.__bubble_tz_string_in_body,result})})}extract_data(data,properties,raw_response,raw_request){optional_pause(),this.post_processing&&(data=this.post_processing(data,properties,raw_response,raw_request));let data_to_process;this.data_container?data_to_process=extract_from_object(data,this.data_container):data_to_process=data,optional_pause();let result_value=get5(this.btype_id);optional_pause();let process_individual_entry=entry=>{var _result_value$plugin$,_result_value$plugin$2,_result_value$plugin;return(_result_value$plugin$=(_result_value$plugin$2=(_result_value$plugin=result_value.plugin).extract)==null?void 0:_result_value$plugin$2.call(_result_value$plugin,entry))!=null?_result_value$plugin$:entry};return Array.isArray(data_to_process)?incremental_map(5,data_to_process,process_individual_entry):process_individual_entry(data_to_process)}notify_value(results){if(!results)return;let result_value=get5(this.btype_id);typeof result_value.plugin.notify=="function"&&(Array.isArray(results)?incremental_for_each(5,results,r2=>{result_value.plugin.notify(r2,this)}):result_value.plugin.notify(results,this))}get_doc_link(){return this.doc_link}};init_define_process_env();init_shim();var import_web_dom_collections_iterator268=__toESM(require_web_dom_collections_iterator()),url5=__toESM(require_url());init_u2();function apply_template_params(body,delimiter,base_param_list,get_param_fn){let open_delimiter,close_delimiter;switch(delimiter){case"bracket":open_delimiter="[",close_delimiter="]";break;case"less_than":open_delimiter="<",close_delimiter=">";break;default:open_delimiter=delimiter,close_delimiter=delimiter}let computed_params=find_between_characters(body,delimiter);for(let[param_id,param]of Object.entries(base_param_list!=null?base_param_list:{}))computed_params.includes(param.key)&&(body=replace_all(body,open_delimiter+param.key+close_delimiter,get_param_fn(param_id,param)));return body}init_define_process_env();init_shim();var import_es_string_replace50=__toESM(require_es_string_replace()),import_web_dom_collections_iterator269=__toESM(require_web_dom_collections_iterator()),import_web_url4=__toESM(require_web_url()),import_web_url_search_params5=__toESM(require_web_url_search_params());init_u2();init_lib();init_define_process_env();init_shim();init_u2();init_lib();init_b_fiber();init_incremental();function post_processing(properties,raw_response,raw_request,scope_data,initialize_mode){let call_real_post_processing=()=>real_post_processing(properties,raw_response,raw_request,scope_data,initialize_mode);return on_server()?activityApm.traceSpan("post processing",{},_ref=>{var _raw_request$body$len,_raw_request$body,_raw_response$body$le,_raw_response$body;let{recordActivity}=_ref;return recordActivity("api_outbound",{count:1,request_bytes:(_raw_request$body$len=(_raw_request$body=raw_request.body)==null?void 0:_raw_request$body.length)!=null?_raw_request$body$len:0,response_bytes:(_raw_response$body$le=(_raw_response$body=raw_response.body)==null?void 0:_raw_response$body.length)!=null?_raw_response$body$le:0}),call_real_post_processing()}):call_real_post_processing()}function real_post_processing(properties,raw_response,raw_request,scope_data,initialize_mode){var _properties$appname,_properties$app_versi,_raw_response$headers;let body,error2,response,url_filename,{data_type,passed_url,api_human,name,get_headers}=scope_data,appname=(_properties$appname=properties.appname)!=null?_properties$appname:lib_default().appname(),app_version=(_properties$app_versi=properties.app_version)!=null?_properties$app_versi:lib_default().app_version(),wrap_the_error_in_response=scope_data.wrap_error,content_disposition=(_raw_response$headers=raw_response.headers)==null?void 0:_raw_response$headers["content-disposition"];if(/filename/.test(content_disposition)&&(content_disposition=content_disposition.replace(/;$/,""),url_filename=extract_filename_from_content_disposition(content_disposition)),!url_filename){let pathname;try{({pathname}=new URL(raw_request.url))}catch{pathname=passed_url}url_filename=pathname.split("/").filter(Boolean).pop()||"root_file"}if(data_type==="XML")try{body=(void 0)(raw_response.body.toString("utf8"))}catch{if(wrap_the_error_in_response)scope_data.returned_an_error=!0,raw_response.statusCode=400,raw_response.statusMessage="Issue Parsing XML",raw_response.body="There was an issue parsing the XML body for the call "+api_human+" - "+name;else throw new OwnerError("issue parsing XML",{display:"There was an issue parsing the XML body for the call "+api_human+" - "+name})}else if(["image","file"].includes(data_type)){let string=String(raw_response.body);try{JSON.parse(string),error2=!0}catch{}if(error2)if(wrap_the_error_in_response)scope_data.returned_an_error=!0,raw_response.statusCode=400,raw_response.statusMessage="Issue Getting File For Call",raw_response.body="There was an issue getting the file for the call "+api_human+" - "+name+". See the response "+string;else throw new OwnerError("Issue getting file for call",{display:"There was an issue getting the file for the call "+api_human+" - "+name+". See the response "+string});else{let filename;initialize_mode?filename="api_initialize_"+data_type:filename=url_filename,body=fileupload.save_to_s3(raw_response.body,filename,raw_response.headers["content-type"],void 0,void 0,appname,app_version)}}else if(["text","number"].includes(data_type))body=raw_response.body.toString("utf8");else if(data_type==="empty")body=null;else{let body_string=raw_response.body;if(raw_response.statusCode===202){var _body_string;(_body_string=body_string)!=null||(body_string="{}")}body_string!=null&&typeof body_string=="string"&&(body_string=body_string.trim());try{body=JSON.parse(body_string)}catch(error1){if(error2=error1,initialize_mode&&(!get_headers||!wrap_the_error_in_response))throw raw_response.body?new OwnerError("The API call returns a non-object and you picked JSON. Please check.",{original:error2}):new OwnerError("The API call returns an empty body and you picked JSON. Please check.",{original:error2});body={}}}if(get_headers||wrap_the_error_in_response){if(response={body},wrap_the_error_in_response){var _scope_data$returned_;if(initialize_mode||scope_data.returned_an_error){let wrapped_error={status_code:raw_response.statusCode,status_message:raw_response.statusMessage,body:JSON.stringify(raw_response.body)};response.error=wrapped_error}response.returned_an_error=(_scope_data$returned_=scope_data.returned_an_error)!=null?_scope_data$returned_:!1}get_headers&&(response.headers=raw_response.headers)}else response=body;return response}var methods={get:"GET",post:"POST",put:"PUT",patch:"PATCH",delete_method:"DELETE"};function method_uses_body(method){return["PUT","PATCH","POST","DELETE_METHOD"].includes(method==null?void 0:method.toUpperCase())}var BROWSER_CALL_AJAX_DATATYPES={none:"text",text:"text",number:"text",JSON:"json",null:"json",undefined:"json"},CALL_PARAMETER_KEYS=["url_params","headers","params","body_params","shared_headers","shared_params"],BROWSER_COMPATIBLE_API_TYPES={none:!0,text:!0,number:!0,JSON:!0,null:!0,undefined:!0},user_friendly_parameter_names={headers:"(header)",params:"(param.)",url_params:"(path)",body_params:"(body)",shared_headers:"(shared headers)",shared_params:"(shared param.)"};function _is_body_dynamic(call_data){return!call_data.body_params||is_empty(call_data.body_params)}var is_call_initialized=call_data=>call_data.initialized||call_data.no_types;function sanitize_body(call,body){var _call$get_values_to_s,_call$get_values_to_s2;let values_to_sanitize=(_call$get_values_to_s=call==null||(_call$get_values_to_s2=call.get_values_to_sanitize)==null?void 0:_call$get_values_to_s2.call(call))!=null?_call$get_values_to_s:[];for(let value of values_to_sanitize)(value==null?void 0:value.length)>0&&(body=body.replaceAll(escape3(value),`sanitized${value.length}`));return body}function get_error_message(response,call,is_plugin){var _call$display,_call$display2;let display2=(_call$display=call==null||(_call$display2=call.display)==null?void 0:_call$display2.call(call))!=null?_call$display:"this service";if(response.statusCode>=400&&response.statusCode<=499){let r2="The service "+display2+" just returned an error (HTTP "+response.statusCode+"). ";return is_plugin?r2+="Please contact the plugin author directly for feedback.":r2+="Please consult their documentation to ensure your call is setup properly.",r2+=` Raw error:

${sanitize_body(call,escape3(response.body))}`,r2}else{if(response.statusCode>=500&&response.statusCode<=599)return"Temporary error connecting to "+display2+" (raw message: "+sanitize_body(call,escape3(response.body))+")";if(response.statusCode<200||response.statusCode>299)return"Error connecting to "+display2+": expected a 2XX statusCode but got "+response.statusCode}}function can_be_in_browser(api_data,call_data){if(!call_data||!BROWSER_COMPATIBLE_API_TYPES[call_data.data_type]||call_data.get_headers||call_data.publish_as==="action"||call_data.url_private)return!1;for(let key of CALL_PARAMETER_KEYS)for(let param of Object.values((_call_data$key=call_data[key])!=null?_call_data$key:{})){var _call_data$key;if(key==="headers"){for(let header in call_data[key])if(Object.keys(call_data[key][header]).length!==0)return!1}if(param!=null&&param.private)return!1}if(api_data==null)return!0;if(api_data.auth!=null&&api_data.auth!=="none")return!1;for(let key of CALL_PARAMETER_KEYS)for(let param of Object.values((_api_data$key=api_data[key])!=null?_api_data$key:{})){var _api_data$key;if(key==="shared_headers"||param!=null&&param.private)return!1}return!0}function get_call_from_raw(call_id,call_data,plugin_name,BASE){var _call_data$ret_btype,_btype_id;let btype_id,data_type_for_ajax_call,name;if(!call_data)return;(_call_data$ret_btype=call_data.ret_btype)!=null||(call_data.ret_btype=call_data.ret_value),BASE?name=call_data.api_id+"."+call_id:name=call_id;let parameters={};(!call_data.url_params||is_empty(call_data.url_params))&&!call_data.url_private&&BASE&&!call_data.url_cant_be_private&&(parameters.url={display:"Call endpoint - URL",editor:"LongText",no_enter:!0,no_rich_text_editing:!0,default:call_data.url});function get_params(type){let params=call_data[type];for(let _ in params){let param=params[_];if(param!=null&&param.key&&(BASE&&!param.private||!BASE&&[void 0,"public"].includes(param.visibility))){let editor;call_data.body_type==="form_data"&&param.binary_file?editor="DynamicFile":param.long_text?editor="LongText":editor="ShortText",parameters[encode_key(type+"_"+param.key)]={display:(user_friendly_parameter_names==null?void 0:user_friendly_parameter_names[type])+" "+param.key,editor,default:param.allow_blank?null:param.value,optional:param.optional||param.allow_blank,doc:param.doc}}}}let allowed_params=["url_params","headers","shared_headers","shared_params"];call_data.body_type!=="plain_text"&&allowed_params.push("params");for(let i of allowed_params)get_params(i);if(call_data.body&&method_uses_body(call_data.method)&&(_is_body_dynamic(call_data)?parameters.body={display:"Body (JSON object)",editor:"LongText",no_rich_text_editing:!0,default:call_data.body}:get_params("body_params")),call_data.no_types)["image","text","number","file"].includes(call_data.data_type)&&(btype_id=call_data.data_type);else if(call_data.ret_btype===IGNORE_FIELD)btype_id="null";else{let ret_btype=get5(call_data.ret_btype);!ret_btype.is_missing()&&ret_btype.plugin.is_simple?btype_id=call_data.ret_btype:BASE?btype_id=api_type(BASE+"."+name):btype_id=api_type(call_data.api_id+".plugin_api."+name)}(_btype_id=btype_id)!=null||(btype_id="null");let _can_be_in_browser=can_be_in_browser(null,call_data),try_do_in_browser=call_data.in_browser&&_can_be_in_browser;return on_client()&&try_do_in_browser&&(data_type_for_ajax_call=BROWSER_CALL_AJAX_DATATYPES[call_data.data_type]),class extends ExternalCall{get human(){return call_data.api_human+" - "+call_data.name}get _must_proxy(){return!try_do_in_browser}get btype_id(){return btype_id}get doc_link(){return call_data.doc_link}get is_list(){return call_data.is_list&&btype_id!=="null"}get category(){return"plugins"}get parameters(){return parameters}get get_headers(){return call_data.get_headers}get return_type(){return call_data.no_types||["XML","image","file","text","number"].includes(call_data.data_type)?"raw":"json"}get data_type_for_ajax_call(){return data_type_for_ajax_call}get wrap_error(){return call_data.wrap_error}get can_be_used_as_action(){return call_data.publish_as==="action"}get_values_to_sanitize(){let values=this.get_authenticator().get_values_to_sanitize();for(let key of CALL_PARAMETER_KEYS)for(let param of Object.values((_call_data$key2=call_data[key])!=null?_call_data$key2:{})){var _call_data$key2;param!=null&&param.private&&values.push(param.value)}return values}get_authenticator(){return this.service().get_authenticator(call_data.api_id)}build(prev,properties){return generate_request_from_call_data(call_data,properties,plugin_name,_ref=>{let{param_id,type,miss_ok=!1}=_ref;if(!BASE)return["shared_headers","shared_params"].includes(type)?this.get_key(type+"_"+param_id,void 0,miss_ok):this.get_key(call_id+"_"+type+"_"+param_id,void 0,miss_ok)})}post_processing(response,properties,raw_response,raw_request){var _response$body;let scope_data={data_type:call_data.data_type,passed_url:call_data.url,api_human:call_data.api_human,name:call_data.name,get_headers:this.get_headers,wrap_error:this.wrap_error,returned_an_error:response==null||(_response$body=response.body)==null?void 0:_response$body.returned_an_error};return post_processing(properties,raw_response,raw_request,scope_data)}}}var new_line_regex2=/\n/g,BODY_UNUSED="BODY UNUSED",INITIAL_API_CONNECTOR_REQUEST_TIMEOUT=2.5*6e4,API_CONNECTOR_MAX_RETRIES=4;function get_timeout_and_retries(){return{timeout:INITIAL_API_CONNECTOR_REQUEST_TIMEOUT,max_retries:API_CONNECTOR_MAX_RETRIES}}function generate_request_from_call_data(call_data,properties,plugin_name,get_key_fn,api_shared_headers){var _properties,_properties$url,_call_data$body;(_properties=properties)!=null||(properties={});let method=methods[call_data.method],body_type=method_uses_body(call_data.method)?call_data.body_type:BODY_UNUSED,path=(_properties$url=properties.url)!=null?_properties$url:call_data.url,is_initialize_mode=properties==null;function get_param_val(type,param_id,raw){var _properties2;let properties_key=encode_key(`${type}_${raw.key}`),value_from_properties=(_properties2=properties)==null?void 0:_properties2[properties_key],default_value=raw.value;if(raw.optional&&!is_initialize_mode)if(is_empty(properties))warn("inconsistent blank api optional param autofilled",{default_value,param_id,type,raw});else return value_from_properties;if(value_from_properties===""&&![null,void 0,""].includes(default_value)&&(value_from_properties=void 0),raw.allow_blank&&!call_data.initialize_mode){var _value_from_propertie;return(_value_from_propertie=value_from_properties)!=null?_value_from_propertie:get_key_fn==null?void 0:get_key_fn({param_id,type,miss_ok:!0})}else{var _ref2,_value_from_propertie2;return(_ref2=(_value_from_propertie2=value_from_properties)!=null?_value_from_propertie2:default_value)!=null?_ref2:get_key_fn==null?void 0:get_key_fn({param_id,type,miss_ok:!1})}}call_data.url_params&&(path=apply_template_params(path,"bracket",call_data.url_params,get_param_val.bind(null,"url_params"))),on_server()&&(path=(void 0)(path,call_data));let headers;if(call_data.headers!=null){headers={};for(let header_id in call_data.headers){let header=call_data.headers[header_id];if(!validate_header_name(header.key))throw new OwnerError("Header name is not correct",{display:call_data.api_human+" error: this header name is not correct "+header.key});let set_val=get_param_val("headers",header_id,header);if(!header.optional||header.optional&&![null,void 0,""].includes(set_val)){if(!validate_header_value(set_val))throw new OwnerError("header value is not correct",{display:call_data.api_human+" error: this header value for "+header.key+" is not correct "+set_val});headers[header.key.trim()]=set_val}if(!header.optional&&[null,void 0,""].includes(set_val))return{dont_do_call:!0,message:call_data.api_human+" error: the header "+header.key+" is empty and is mandatory"}}}if(appquery_default.get_public_setting("bubble_version")>=28&&[void 0,null,"json"].includes(body_type)){let api_call_has_content_type_header=headers!=null&&Object.keys(headers).some(header_key=>(header_key==null?void 0:header_key.toLowerCase())==="content-type"),api_shared_header_has_content_type_header=api_shared_headers!=null&&api_shared_headers.some(shared_header=>{var _shared_header$key;return(shared_header==null||(_shared_header$key=shared_header.key)==null?void 0:_shared_header$key.toLowerCase())==="content-type"});if(!api_call_has_content_type_header&&!api_shared_header_has_content_type_header){var _headers;(_headers=headers)!=null||(headers={}),headers["content-type"]="application/json"}}let body;if(body_type!==BODY_UNUSED&&body_type!=="form_data"&&![null,void 0,""].includes((_call_data$body=call_data.body)==null?void 0:_call_data$body.trim()))if(!_is_body_dynamic(call_data)||properties.body==null){if(body=call_data.body,call_data.body_params){let get_body_param2=function(param_id,body_param){let v=get_param_val("body_params",param_id,body_param);return[null,void 0,""].includes(v)?"null":v};var get_body_param=get_body_param2;call_data.data_type==="XML"||body_type==="plain_text"?body=apply_template_params(body,"_*_",call_data.body_params,get_body_param2):body=apply_template_params(body,"less_than",call_data.body_params,(param_id,body_param)=>get_body_param2(param_id,body_param).replace(new_line_regex2,"\\n"))}}else body=properties.body;let is_raw_body=body_type==="plain_text",data,qs;if(call_data.params!=null){data={},qs={};for(let param_id in call_data.params){let param=call_data.params[param_id];if(param.key!=null){let set_val=get_param_val("params",param_id,param),key=param.key.trim(),use_qs=body_type===BODY_UNUSED||param.querystring&&body_type!=="form_data",val_absent=[null,void 0,""].includes(set_val),val_optional=param.optional||use_qs&&!param.binary_file;if(val_absent&&!val_optional)return{dont_do_call:!0,message:`${call_data.api_human} error: the parameter ${key} cannot be empty`};if(val_absent)continue;if(use_qs)qs[key]=set_val;else if(param.binary_file){set_val.slice(0,2)==="//"&&(set_val="http:"+set_val);let filename=decodeURIComponent(set_val.split("/").pop()),response;try{response=lib_default().http_request({uri:set_val,encoding:null}).block()}catch(e){return{dont_do_call:!0,message:`Error trying to fetch file at URL '${set_val}': ${e.message}`}}if(response.statusCode!==200)return{dont_do_call:!0,message:plugin_name+" error: the parameter "+key+" is not a valid file"};data[key]={value:response.body,options:{filename}}}else data[key]=set_val}}if(qs!=null&&is_empty(qs)&&(qs=void 0),data!=null&&!is_raw_body){if(is_empty(data))data=void 0;else if(body!=null){try{body=json_parse(body)}catch{throw new OwnerError("Body could not be parsed",{display:call_data.api_human+" error: this body could not be parsed as JSON "+body})}extend(body,data),data=void 0}}}is_raw_body&&(data=void 0);let encoding;["image","file"].includes(call_data.data_type)&&(encoding=null);let{timeout,max_retries}=get_timeout_and_retries(),obj={method,path,headers,encoding,timeout,max_retries};if(body_type==="form_data")obj.formData=data;else if(body_type===BODY_UNUSED){var _qs;obj.qs=(_qs=qs)!=null?_qs:{}}else obj.body=body,obj.data=data,obj.qs=qs;return obj}function validate_header_name(val){if(typeof val!="string"||!(val!=null&&val.length))return!1;for(let i=0;i<val.length;i++){let ch=val.charCodeAt(i);if(!(ch>=65&&ch<=90)&&!(ch>=97&&ch<=122)&&![94,95,96,124,126].includes(ch)&&![48,49,50,51,52,53,54,55,56].includes(ch)){if(ch>=33&&ch<=46){if([34,40,41,44].includes(ch))return!1;continue}return!1}}return!0}function validate_header_value(val){if(val==null||(val=""+val,!val.length))return!1;for(let i=0;i<val.length;i++){let ch=val.charCodeAt(i);if(ch!==9&&(ch<=31||ch>255||ch===127))return!1}return!0}function add_shared_params_and_headers(api_data,req,name,get_header_fn,get_param_fn){let set_val;if(api_data.shared_headers!=null){var _req$headers;(_req$headers=req.headers)!=null||(req.headers={});for(let header_id in api_data.shared_headers){let header=api_data.shared_headers[header_id];if(req.headers[header.key]==null&&header.key){if(!validate_header_name(header.key)){var _api_data$human;throw new OwnerError("Header name is not correct",{display:((_api_data$human=api_data.human)!=null?_api_data$human:name)+" error: this header name is not correct "+header.key})}if(set_val=get_header_fn(header_id,header),!validate_header_value(set_val)){var _api_data$human2;throw new OwnerError("Header Value not correct",{display:((_api_data$human2=api_data.human)!=null?_api_data$human2:name)+" error: this header value for "+header.key+" is not correct "+set_val})}req.headers[header.key]=set_val}}}if(api_data.shared_params!=null){var _ref3,_ref4,_req$data;let req_contents=(_ref3=(_ref4=(_req$data=req.data)!=null?_req$data:req.body)!=null?_ref4:req.formData)!=null?_ref3:req.qs,to_modify=req_contents!=null?req_contents:{};for(let param_id in api_data.shared_params){let param=api_data.shared_params[param_id];typeof to_modify=="object"&&to_modify[param.key]==null&&param.key&&(set_val=get_param_fn(param_id,param),to_modify[param.key]=set_val)}req_contents||(req.body=to_modify)}}init_define_process_env();init_shim();init_lib();init_db2();init_appquery();init_define_process_env();init_shim();init_define_process_env();init_shim();var import_web_dom_collections_iterator271=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_decaf();init_appquery();init_apps_utilities();init_client_config2();var configuration2=client_config_default2,MISSING_ACCESS_TOKEN="missing access_token getting data",PLUGIN_OAUTH_REDIRECT="sys/pluginoauth",SERVER_OAUTH_REDIRECT="oauth_redirect";function get_redirect_url(){let app_version;is_local_editable(appquery_default.appname())?app_version="live":app_version=appquery_default.app_version();let domain;return(configuration2.env!=="local"||appquery_default.appname()==="meta")&&(domain=appquery_default.domain()),lib_default().location.format_pieces({domain,appname:appquery_default.appname(),path:["api","1.1",SERVER_OAUTH_REDIRECT],app_version},{protocol:"https:"})}function add_basic_authentication(req,authentication,authenticator){var _req$headers;let pw,user;authentication?(user=authentication.user,pw=authentication.pw):(user=authenticator.get_public_key(),pw=authenticator.get_secret_key());let authorization=base642(user+":"+pw);(_req$headers=req.headers)!=null||(req.headers={}),req.headers.Authorization="Basic "+authenticator.redacted(authorization)}function kv_hash(keys2){return object_entries(keys2).map(_ref=>{let[k,v]=_ref;return`${k}:${v}`}).join(",")}init_define_process_env();init_shim();var import_web_dom_collections_iterator272=__toESM(require_web_dom_collections_iterator());init_lib();init_decaf();init_errors();init_appquery();var optional_auth_properties={access_type:!0,scope:!0,user_scope:!0,data_type:!0,prompt:!0,additional_query_url_to_delete:!0,add_to_url:!0,add_to_header:!0,header_key:!0,expires_in:!0,add_basic_authentication:!0,key_prefix:!0,grant_type:!0,use_cliend_id_secret:!0,use_username_password:!0,server_redirect:!0},Authenticator=class{constructor(params){this.params=params,this.redacted_values=new Set}redacted(value){if(value&&lib_default()){var _Lib2,_Lib$bad_values_in_lo;(_Lib$bad_values_in_lo=(_Lib2=lib_default()).bad_values_in_logs)!=null||(_Lib2.bad_values_in_logs=[]),this.redacted_values.has(value)||(this.redacted_values.add(value),lib_default().bad_values_in_logs.push(value))}return value}id(){return this.service_name()}get_values_to_sanitize(){return[this.get_secret_key()]}get_property(name,fail_okay){var _this$params$name,_this$params;let res=(_this$params$name=(_this$params=this.params)==null?void 0:_this$params[name])!=null?_this$params$name:this.service()[name];if(!res&&!optional_auth_properties[name]){if(fail_okay)return null;throw new UnexpectedError("could not find property "+name+" for authenticator of service "+this.id()+", and property "+name+" is not set as optional")}return typeof res=="function"&&(res=res(this)),res}display(){var _this$_display;return(_this$_display=this._display)!=null?_this$_display:(void 0)(this.service_name()).display()}service(){if(!this._service)throw new UnexpectedError("this authenticator doesnt have @_service set.  should set it in add_service in services.coffee");return this._service}is_user_credentials(){return!1}service_name(){return this.service().name}edit_mode_login(){return!1}_get_key(name,override_version,miss_ok){return this.service().get_key(name,override_version,miss_ok)}get_key(name,override_version,miss_ok){return this.redacted(this._get_key(name,override_version,miss_ok))}get_public_key(){return this.service().get_public_key()}_get_secret_key(){return this.service().get_secret_key()}get_secret_key(){return this.redacted(this._get_secret_key())}get_user_authentication_node(user){return user.child("authentication").child(this.id())}get_service_id(user){return this.get_user_authentication_node(user).child("id").get()}are_keys_missing(){for(let[name,data]of object_entries(this.service().get_keys()))if(data.editor!=="Checkbox"){let key_val;if(data.type==="secure"?key_val=appquery_default.get_private_setting(this.service().name+"_"+name):key_val=appquery_default.get_public_setting(this.service().name+"_"+name),!key_val&&!data.optional)return!0}return!1}};init_define_process_env();init_shim();var BasicAuth=class extends Authenticator{must_proxy(){return!0}add_authentication(req,authentication){return add_basic_authentication(req,authentication,this),req}is_authenticated(){return!0}},BasicAuth_default=BasicAuth;init_define_process_env();init_shim();var import_web_dom_collections_iterator273=__toESM(require_web_dom_collections_iterator());init_mode_check();init_known_plugins();init_errors();init_uuid();init_lib();init_plugin_registry();var BoxAuthentication=class extends Authenticator{must_proxy(){return!0}build_token(keys2){let hash2=kv_hash(keys2),enterprise=!keys2.user_id;if(!_box_token_cache[hash2]||running_test()){let header={typ:"JWT",alg:"RS256",kid:keys2.public_key_id},claims={iss:keys2.apikey,sub:enterprise?keys2.enterprise_id:keys2.user_id,box_sub_type:enterprise?"enterprise":"user",aud:this.get_property("claims_aud"),jti:UUID(),exp:Math.floor(Date.now()/1e3+55)},jwt=token_utilities.generate_jws(header,claims),form={client_id:keys2.appid,client_secret:keys2.appsecret,grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:jwt},post_options={method:"POST",url:this.get_property("generate_token_from_code_uri"),form},response=this.service().error_wrapper(()=>lib_default().http_request(post_options).block()),result=this.service().response_to_data(post_options,response);_box_token_cache[hash2]=result.access_token,setTimeout(()=>_box_token_cache[hash2]=null,result.expires_in*1e3)}return _box_token_cache[hash2]}get_token(){let keys2={};for(let name in this.service().keys)if(keys2[name]=this.get_key(name),!keys2[name]&&name!=="user_id")throw new OwnerError("App missing credential",{display:"Sorry, it looks like this is app is missing a "+this.service().display()+" credential: "+this.service().keys[name].caption});if(!keys2.user_id){let enterprise_token=this.build_token(keys2),new_user_id=plugin_registry_default.get_hardcoded_plugin(BOX).get_call("create_user").execute(null,null,enterprise_token).id;lib_default().app().get_private_setting_node(this.service().name+"_user_id").json.set(new_user_id,{name:"CreateBoxAuthToken"}),keys2.user_id=new_user_id}return this.build_token(keys2)}add_authentication(req,authentication){var _req$headers;let token=authentication!=null?authentication:this.get_token();return(_req$headers=req.headers)!=null||(req.headers={}),req.headers.Authorization="Bearer "+this.redacted(token),req}};init_define_process_env();init_shim();init_errors();init_define_process_env();init_shim();init_errors();init_define_process_env();init_shim();var INSTANCE_NAMES=function(INSTANCE_NAMES2){return INSTANCE_NAMES2.SMALL="small",INSTANCE_NAMES2.WORKFLOW="workflow",INSTANCE_NAMES2.BIG="big",INSTANCE_NAMES2.ELASTICSEARCH="elasticsearch",INSTANCE_NAMES2.CACHE="cache",INSTANCE_NAMES2}({});init_lib();var Oauth2PWFlow=class extends Authenticator{must_proxy(){return!0}add_authentication(req,authentication){var _req$headers;let token=authentication!=null?authentication:this.get_token();return(_req$headers=req.headers)!=null||(req.headers={}),req.headers.Authorization="Bearer "+this.redacted(token),req}is_authenticated(){return!0}},Oauth2PWFlow_default=Oauth2PWFlow;var JWT=class extends Oauth2PWFlow_default{anti_babel_function(){}},JWT_default=JWT;init_define_process_env();init_shim();var NoAuth=class extends Authenticator{must_proxy(){return!1}add_authentication(req){return req}is_authenticated(){return!0}is_user_credentials(){return!0}get_values_to_sanitize(){return[]}},NoAuth_default=NoAuth;init_define_process_env();init_shim();init_logger();init_b_object();var autorun23=__toESM(require_autorun());init_define_process_env();init_shim();init_logger();init_lib();var OauthBase=class extends Authenticator{get_oauth_user_data_call(){return this.service().get_call("oauth_user_data_call")}get_oauth_user_data(login_data){let token_data=this.get_token_data(login_data),user_data=this.get_oauth_user_data_call(login_data).execute(null,null,token_data);return user_data.id!=null&&(user_data.id=String(user_data.id)),(login_data==null?void 0:login_data.oauth_provider)==="linkedin_with_open_id"&&!user_data.id&&user_data._id&&(user_data.id=String(user_data._id)),{...user_data!=null?user_data:{},...token_data!=null?token_data:{}}}build_validity_request(validity){return this.get_oauth_user_data_call().build_request(null,null,validity)}is_still_valid(validity){let user_data_request=this.build_validity_request(validity),err,response;try{response=lib_default().http_request(user_data_request).block(),err=null}catch(error2){err=error2,response=null}if(response&&response.statusCode>=200&&response.statusCode<300)return!0;if(is_retryable(err,response)){let reason;return err?reason=err:reason=response.statusCode+": "+response.body,warn("Temporarily unable to validate Oauth connection",{service:this.service().display(),reason}),!0}return!1}_get_user_id(){return this.get_service_id(lib_default().current_user())}tested(){return!0}},OauthBase_default=OauthBase;init_lib();var node_url=__toESM(require_url());init_appquery();var querystring9=__toESM(require_querystring()),Oauth1=class extends OauthBase_default{oauth_version(){return"1"}must_proxy(){return!0}get_oauth_user_data(login_data){let token_data=this.get_token_data(login_data),user_data=this.get_oauth_user_data_call().execute(null,token_data,token_data);return user_data.id=String(token_data.user_id),{...user_data!=null?user_data:{},...token_data!=null?token_data:{}}}is_user_credentials(){return!0}login(context,action,oauth_token){let authorize_url=this.get_property("authorize_url"),token={};return token[this.get_property("token_param_name")]=oauth_token,lib_default().workflow.make_resume_key(context,action),lib_default().workflow.wait_for_safe(context,()=>{document.location.href=authorize_url+"?"+querystring9.stringify(token)})}add_authentication(req,authentication){if(req.headers)return req;let oauth_token_secret=authentication==null?void 0:authentication.oauth_token_secret,oauth_token=authentication==null?void 0:authentication.oauth_token;return oauth_token_secret!=null&&oauth_token!=null?(this.add_auth_header(req,oauth_token,oauth_token_secret),req):(oauth_token_secret=autorun23.run_once(30,()=>({oauth_token_secret:this._get_oauth_token_secret(),oauth_token:this._get_oauth_token()})),oauth_token_secret.then(_ref=>{let{oauth_token_secret:oauth_token_secret2,oauth_token:oauth_token2}=_ref;return!oauth_token_secret2||!oauth_token2||this.add_auth_header(req,oauth_token2,oauth_token_secret2),req}))}get_data_for_login(_ref2){let{oauth_token,oauth_verifier}=_ref2;return typeof oauth_token!="string"||typeof oauth_verifier!="string"?(warn("odd OAuth1 params after redirection, clearing",{oauth_token,oauth_verifier}),{oauth_provider:this.id(),oauth_token:"",oauth_verifier:""}):{oauth_provider:this.id(),oauth_token:oauth_token!=null?oauth_token:"",oauth_verifier:oauth_verifier!=null?oauth_verifier:""}}get_token_data(login_data){let access_token_url=this.get_property("access_token_url"),data_type=this.get_property("data_type"),req={url:access_token_url,method:"POST",data:login_data};this.add_auth_header(req,login_data.oauth_token,lib_default().KeyValueDB().get(INSTANCE_NAMES.SMALL,login_data.oauth_token));let response=this.service().error_wrapper(()=>lib_default().http_request(req).block());return this.service().response_to_data(req,response,data_type)}_get_oauth_token_secret(){return this.get_user_authentication_node(lib_default().current_user()).child("oauth_token_secret").get()}_get_oauth_token(){return this.get_user_authentication_node(lib_default().current_user()).child("oauth_token").get()}is_authenticated(){return this._get_oauth_token()!=null&&this._get_oauth_token_secret()!=null&&this._get_user_id()!=null}generate_validity_object(user_info){return{oauth_token:user_info.oauth_token,oauth_token_secret:user_info.oauth_token_secret,provider_user_id:user_info.user_id}}build_validity_request(validity){return this.get_oauth_user_data_call().build_request(null,{user_id:validity.provider_user_id},validity)}};init_define_process_env();init_shim();var import_web_dom_collections_iterator274=__toESM(require_web_dom_collections_iterator());init_b_object();init_b_string();init_errors();init_uuid();var autorun24=__toESM(require_autorun());init_mode_check();init_node_eval();init_lib();var node_url2=__toESM(require_url()),querystring10=__toESM(require_querystring());init_logger();var Oauth2=class extends OauthBase_default{oauth_version(){return"2"}get_additional_fields(){var _this$get_property;let url_params=(_this$get_property=this.get_property("auth_url_params",!0))!=null?_this$get_property:{};return Object.entries(url_params).map(_ref=>{let[id,param]=_ref;return{name:id,caption:`${param.key} (Login Redirect)`,editor:"ShortText",default:param.allow_blank?null:param.value,optional:param.optional||param.allow_blank}})}must_proxy(){return!1}_get_access_token(){return this.get_user_authentication_node(lib_default().current_user()).child("access_token").get()}is_authenticated(){return this._get_access_token()!=null&&this._get_user_id()!=null}is_user_credentials(){return!0}add_authentication(req,authentication){var _authentication$acces,_req$data;let token_param_name=this.get_property("token_param_name"),access_token=(_authentication$acces=authentication==null?void 0:authentication.access_token)!=null?_authentication$acces:(_req$data=req.data)==null?void 0:_req$data[token_param_name],add_token=token=>{if(this.redacted(token),this.get_property("add_to_url"))req.url.includes("?")?req.url+="&":req.url.endsWith("?")||(req.url+="?"),req.url+=token_param_name+"="+token;else if(this.get_property("add_to_header")){var _req$headers;(_req$headers=req.headers)!=null||(req.headers={});let header_key=this.get_property("header_key");if(header_key){let[key,pre_val]=header_key.split(":");pre_val!=null?req.headers[key.trim()]=pre_val.trim()+" "+token:req.headers[key.trim()]=token}else req.headers.Authorization="Bearer "+token}else{var _req$data2;(_req$data2=req.data)!=null||(req.data={}),req.data[token_param_name]=token}return req};return access_token!=null?add_token(access_token):(access_token=autorun24.run_once(30,()=>this._get_access_token()),access_token.then(access_token2=>add_token(access_token2)))}add_generic_authenticator_keys(keys2){keys2.server_redirect={type:"client_safe",editor:"Checkbox"},lib_default().is_edit_mode()&&(keys2.server_redirect.caption="Use a generic redirect URL ("+get_redirect_url()+")")}use_server_side_redirect(){return this.get_key("server_redirect")}login(context,action,remove_querystrings,cb){var _this$get_property2;let api_data={client_id:this.get_public_key(),response_type:"code"},expires_in=this.get_property("expires_in");expires_in&&(api_data.expires_in=expires_in);let access_type=this.get_property("access_type");access_type&&(api_data.access_type=access_type);let prompt=this.get_property("prompt");prompt&&(api_data.prompt=prompt);let scope=this.get_property("scope");scope&&(api_data.scope=scope);let authentication_url=apply_template_params(this.get_property("authentication_url"),"bracket",(_this$get_property2=this.get_property("auth_url_params",!0))!=null?_this$get_property2:{},(param_id,param)=>action?eval_property(action,param_id,context,null,param.value):param.value);if(on_react_native()){cb("aborted"),lib_default().native_bridge.oauthLogin(authentication_url,api_data,{useServerSideRedirect:this.use_server_side_redirect()}).then(result=>{lib_default().workflow.resume_local(context,action,result!=null?{...result,oauth_provider:this.id()}:{aborted:!0})},err=>{log(ensure_bubble_error(err))});return}let redirect_uri=document.location.href;redirect_uri[redirect_uri.length-1]==="?"&&(redirect_uri=redirect_uri.slice(0,redirect_uri.length-1));let api_call_url,parsed_redirect;remove_querystrings&&(parsed_redirect=node_url2.parse(redirect_uri),delete parsed_redirect.search,delete parsed_redirect.hash,delete parsed_redirect.query,redirect_uri=node_url2.format(parsed_redirect));let state_raw=node_url2.parse(document.location.href,!0).query;state_raw.oauth_provider=this.id(),context&&action&&(state_raw.resume_key=lib_default().workflow.make_resume_key(context,action)),state_raw.used_redirect_url=redirect_uri,this.use_server_side_redirect()&&(redirect_uri=get_redirect_url(),lib_default().location.get_page()==="index"&&starts_with(lib_default().location.get_server_base(),state_raw.used_redirect_url)&&(parsed_redirect=node_url2.parse(state_raw.used_redirect_url),parsed_redirect.path==="/"&&state_raw.used_redirect_url.slice(-1)!=="/"&&(state_raw.used_redirect_url=state_raw.used_redirect_url+"/")),state_raw.redirect_unique_id=UUID());let stringified_state=fixedEncodeURIComponent(json_stringify(state_raw));return api_data.redirect_uri=redirect_uri,api_data.state=stringified_state,authentication_url.includes("?")?api_call_url=authentication_url+"&"+querystring10.stringify(api_data):api_call_url=authentication_url+"?"+querystring10.stringify(api_data),lib_default().workflow.wait_for_safe(context,()=>document.location.href=api_call_url)}get_data_for_login(data){var _data$code;let redirect_uri;if(this.use_server_side_redirect())redirect_uri=get_redirect_url();else{var _data$used_redirect_u;redirect_uri=(_data$used_redirect_u=data.used_redirect_url)!=null?_data$used_redirect_u:""}return{oauth_provider:this.id(),code:(_data$code=data.code)!=null?_data$code:"",redirect_uri}}};init_define_process_env();init_shim();init_b_object();var Oauth2Custom=class extends Oauth2PWFlow_default{_get_token_request(){return this.service().get_call("token_call").build()}},Oauth2Custom_default=Oauth2Custom;init_define_process_env();init_shim();init_errors();var PrivateKey=class extends Authenticator{must_proxy(){return!0}add_authentication(req,authentication){var _authentication;if((_authentication=authentication)!=null||(authentication=this.get_secret_key()),this.params.key_prefix&&(authentication=this.params.key_prefix+authentication),!this.params.token_param_name)throw new UnexpectedError("PrivateKey authenticator missing token_param_name");if(this.params.add_to_url)req.url.includes("?")||(req.url+="?"),req.url[req.url.length-1]!=="?"&&(req.url+="&"),req.url+=this.params.token_param_name+"="+authentication;else if(this.params.add_to_header){var _req$headers;(_req$headers=req.headers)!=null||(req.headers={}),req.headers[this.params.token_param_name]=authentication}else{var _req$data;(_req$data=req.data)!=null||(req.data={}),req.data[this.params.token_param_name]=authentication}return req}is_authenticated(){return!0}},PrivateKey_default=PrivateKey;init_define_process_env();init_shim();var SSLProtocol=class extends BasicAuth_default{add_authentication(req,authentication){return Object.assign(req,{cert:this.get_key("cert_file"),key:this.get_key("key_file")}),req}},SSLProtocol_default=SSLProtocol;var MISSING_ACCESS_TOKEN2=MISSING_ACCESS_TOKEN,PLUGIN_OAUTH_REDIRECT2=PLUGIN_OAUTH_REDIRECT,SERVER_OAUTH_REDIRECT2=SERVER_OAUTH_REDIRECT,get_redirect_url2=get_redirect_url;init_multiple_live_versions();function _get_api_key(api_obj,key_name){if(api_obj){if(isLiveVersion(appquery_default.app_version()))return api_obj[key_name];var _api_obj;return(_api_obj=api_obj[key_name+"_test"])!=null?_api_obj:api_obj[key_name]}}var APIConnectorBasePrivateKey=class extends PrivateKey_default{constructor(params){super(params);let api_obj=this._get_api();this.params.token_param_name||(api_obj.auth==="private_key_url"?this.params.token_param_name="private_key":api_obj.auth==="private_key_header"&&(this.params.token_param_name="Authorization"))}_get_secret_key(){return _get_api_key(this._get_api(),"private_key")}},APIConnectorBasicAuth=class extends BasicAuth_default{_get_secret_key(){var _this$_get_api;return(_this$_get_api=this._get_api())==null?void 0:_this$_get_api.password}get_public_key(){var _this$_get_api2;return(_this$_get_api2=this._get_api())==null?void 0:_this$_get_api2.username}},APIConnectorBaseSSLProtocol=class extends SSLProtocol_default{_get_key(name){var _this$_get_api3;return(_this$_get_api3=this._get_api())==null?void 0:_this$_get_api3[name]}},APIConnectorBaseOauth2PWFlow=class extends Oauth2PWFlow_default{_get_secret_key(){var _this$_get_api4;return(_this$_get_api4=this._get_api())==null?void 0:_this$_get_api4.password}get_public_key(){var _this$_get_api5;return(_this$_get_api5=this._get_api())==null?void 0:_this$_get_api5.username}},APIConnectorBaseOauth2Custom=class extends Oauth2Custom_default{_get_token_request(){return this.service().get_call(this.params.call_id+".token_call").build()}},APIConnectorBaseJWT=class extends JWT_default{_get_key(name){var _this$_get_api6;return name==="iss"?this.get_property("iss"):(_this$_get_api6=this._get_api())==null?void 0:_this$_get_api6[name]}},APIConnectorBaseOauth2=class extends Oauth2{_get_secret_key(){return _get_api_key(this._get_api(),"appsecret")}get_public_key(){return _get_api_key(this._get_api(),"appid")}get_oauth_user_data_call(){return this.service().get_call(this.params.api_id+"_oauth_user_data_call")}get_user_authentication_node(user){return lib_default().is_edit_mode()?new db_default.StaticNode(this.get_owner_token_data(),null,"sys.json"):super.get_user_authentication_node(user)}tested(){return this._get_api().tested}has_token_data(){return this._get_api().has_token_data}get_owner_token_data(){return this._get_api().token_data}};init_call_btypes();init_APIConnectorStructValue();init_define_process_env();init_shim();var import_web_dom_collections_iterator277=__toESM(require_web_dom_collections_iterator());init_lodash();init_u2();init_lib();init_caching();init_plugin();var external_api_utilities_exports={};__export(external_api_utilities_exports,{handle_request_failures:()=>handle_request_failures});init_define_process_env();init_shim();var import_es_string_replace52=__toESM(require_es_string_replace());init_errors();var handle_request_failures=err=>{let err_message=String(err.message);return err_message.indexOf("ENOTFOUND")!==-1?new OwnerError("Could not find domain",{display:"Could not find domain:"+err_message.replace("ENOTFOUND","")}):err_message.indexOf("Failed to establish a connection after")!==-1?new OwnerError("Failed to establish a connection",{display:err_message}):err_message.indexOf("ESOCKETTIMEDOUT")!==-1||err_message.indexOf("ETIMEDOUT")!==-1?new OwnerError("Could not connect to remote server"):err_message.indexOf("certificate has expired")!==-1?new OwnerError("The remote server's SSL certificate has expired"):err_message.indexOf("certificate not trusted")!==-1?new OwnerError("There is an issue with the remote server's SSL certificate"):err_message.indexOf("self signed certificate")!==-1?new OwnerError("The remote server's SSL certificate is self-signed"):err_message.indexOf("Invalid protocol")!==-1?new OwnerError("The request protocol is invalid, it should only be 'http' or 'https'"):err_message.indexOf("unable to verify the first certificate")!==-1?new OwnerError("There is an issue with the remote server's SSL certificate"):err_message.indexOf("Hostname/IP doesn't match certificate's altnames")!==-1?new OwnerError("SSL Cert mismatch",{display:err_message}):err_message.indexOf("Hostname/IP does not match certificate's altnames")!==-1?new OwnerError("SSL Cert mismatch",{display:err_message}):err_message.indexOf("Exceeded maxRedirects")!==-1?new OwnerError("request maxRedirects",{display:err_message}):is_retryable(err)?new OwnerError("Could not connect to the remote server"):err};init_btype_ids();init_define_process_env();init_shim();var import_web_dom_collections_iterator276=__toESM(require_web_dom_collections_iterator()),import_es_error_cause19=__toESM(require_es_error_cause());init_lodash();var querystring11=__toESM(require_querystring());init_logger();init_lib();init_appquery();init_u2();init_b_fiber();init_b_object();init_decaf();init_errors();init_server_errors();init_incremental();init_lang();init_multiple_live_versions();init_plugin();init_environment_utilities();init_style_properties();init_caching();init_btype_ids();init_btypes();init_service_type_parser();var editor_utils_exports={};__export(editor_utils_exports,{enter_your_api_key_button_field_names:()=>enter_your_api_key_button_field_names});init_define_process_env();init_shim();var import_web_dom_collections_iterator275=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_css();init_plugin_getter();var enter_your_api_key_button_field_names={key_info:{no_states:!0}};var _dec12,_class59;function _applyDecoratedDescriptor11(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var LRU2,plugins_thing_cache,created_plugins_thing=function(){return plugins_thing_cache||(on_server()?plugins_thing_cache=new LRU2({max:500,length(){return 1}}):plugins_thing_cache=new Map,plugins_thing_cache)};function create_external_action(service_name,call_name,call_instance){var _call_instance$catego;function fields(action2){let field_array;return call_instance.fields?field_array=call_instance.fields(action2):field_array=(void 0)(call_instance.parameters,[]),(void 0)(service_name,field_array),field_array}let action={display(action2){return call_instance.human},category:(_call_instance$catego=call_instance.category)!=null?_call_instance$catego:"plugins",fields,field_names:DETECT_FIELD_NAMES,data_to_refresh:null,return_btype(action2){return action2!=null&&call_instance.return_btype!=null?(call_instance.btype_id=call_instance.return_btype(action2),call_instance.btype_id):call_instance.get_btype_id()},get_doc_link(){return call_instance.get_doc_link()},call:call_instance,check_for_errors(action2,report){if(call_instance.can_be_used_as_action===!1&&!call_instance.must_proxy())return report(`${action2.display()}: You're using this API connector call as an action but it is currently set up as a Data source`)}};return call_instance.must_proxy()?(action.run=(action2,properties,context,cb)=>{context.get_server_outcome(action2,(err,res)=>{if(err)cb(err);else{var _ref,_call_instance$btype_,_call_instance$return,_btypes$get$plugin$no,_btypes$get$plugin;let call_btype_id=(_ref=(_call_instance$btype_=call_instance.btype_id)!=null?_call_instance$btype_:(_call_instance$return=call_instance.return_btype)==null?void 0:_call_instance$return.call(call_instance,action2))!=null?_ref:null,call_hashes=call_instance.service().get_calls_to_refresh(call_instance,action2);ExternalCall.invalidate_client_side_calls(call_hashes),(_btypes$get$plugin$no=(_btypes$get$plugin=get5(call_btype_id).plugin).notify_server_action)==null||_btypes$get$plugin$no.call(_btypes$get$plugin,res,call_instance),cb(null,res)}})},action.server_method="external_call_server_action"):action.run=function(){throw new OwnerError("Invalid action - this call cannot be set up as an action.")},action}var ExternalService=(_dec12=cached({type:AUTORUN,compare_fn:(a,b)=>a!=null&&a.call_raw_data&&b!=null&&b.call_raw_data?isEqual_default(a.call_raw_data,b.call_raw_data):compare(a,b)}),_class59=class{display(){return this.human}toUniqueString(){return"service_"+this.name+"_"+this.version}get_authenticator(name,force){return typeof this.authenticator=="function"?this.authenticator(name,force):this.authenticator}get_calls_to_refresh(call_instance,action){return[]}error_wrapper(fn){if(!this.handle_request_failures)return fn();try{return fn()}catch(err){let transformed=this.handle_request_failures(err);throw transformed==null?new UnexpectedError("handle_request_failures should return the original error or a transformed one",{original:err}):transformed}}get_key(name,override_version,miss_ok){let keys2=this.get_keys();if(!keys2[name]){if(name==="server_redirect"||miss_ok)return null;throw new ClientError2("missing key for service",{key_name:name,service_name:this.name,human:this.human})}let current_version=override_version!=null?override_version:appquery_default.app_version(),test_mode=!isLiveVersion(current_version)||!is_production(),app=appquery_default.app();function get_setting(path){return keys2[name].type==="client_safe"?app.get_public_setting(path):app.get_private_setting(path)}let live_key2=get_setting(`${this.name}_${name}`);if(!test_mode)return live_key2;let test_key=get_setting(`${this.name}_${name}_test`);return test_key!=null?test_key:live_key2}get_key_names(){if(typeof this.key_names=="function"){var _this$get_authenticat,_this$get_authenticat2;let auth_keys={};return(_this$get_authenticat=(_this$get_authenticat2=this.get_authenticator()).add_generic_authenticator_keys)==null||_this$get_authenticat.call(_this$get_authenticat2,auth_keys),[...this.key_names(),...Object.keys(auth_keys)]}else return Object.keys(this.get_keys())}get_keys(){var _this$_get_raw_list,_this$get_authenticat3,_this$get_authenticat4;let k=(_this$_get_raw_list=this._get_raw_list("keys"))!=null?_this$_get_raw_list:{};return(_this$get_authenticat3=(_this$get_authenticat4=this.get_authenticator()).add_generic_authenticator_keys)==null||_this$get_authenticat3.call(_this$get_authenticat4,k),k}has_keys(){return Object.keys(this.get_keys()).length>0}get_public_key(){return this.get_key("appid")}get_secret_key(){return this.get_key("appsecret")}_get_raw_list(thing){return typeof this[thing]=="function"?this[thing]():this[thing]}get_btypes(){var _this$_get_raw_list2;let btypes_obj=(_this$_get_raw_list2=this._get_raw_list("values"))!=null?_this$_get_raw_list2:{};for(let[btype_name,btype]of Object.entries(btypes_obj))btype.name=btype_name,btype.full_name=api_type(`${this.name}.${btype_name}`),btype._service=this;return btypes_obj}get_call_class(call_name){return this._get_raw_list("calls")[call_name]}get_calls(){var _this$_get_raw_list3;return Object.keys((_this$_get_raw_list3=this._get_raw_list("calls"))!=null?_this$_get_raw_list3:{})}get_call(call_name){return this._instantiate_call(call_name,this.get_call_class(call_name))}_instantiate_call(call_name,Call_cls){if(typeof Call_cls!="function"){if(this.dynamic_calls)return;if(lib_default().is_edit_mode()){error("call is not a class",{call_name,name:this.name});return}else{var _this$display;throw new OwnerError("The call "+call_name+" on "+((_this$display=this.display())!=null?_this$display:this.name)+" is not defined")}}let call_instance=new Call_cls(this),full_name=this.name+PLUGIN_SEPARATOR+call_name;return call_instance.name=call_name,call_instance.full_name=full_name,call_instance.service_name=this.name,call_instance}get_action(type){var _action2,_action2$category;let action_name=get_plugin_and_type(type)[1],hard_coded_actions=this._get_raw_list("actions"),action;if(hard_coded_actions!=null&&hard_coded_actions[action_name]){var _action,_action$fields;action=hard_coded_actions[action_name],(_action$fields=(_action=action).fields)!=null||(_action.fields=act=>{let f=action._fields(act);return(void 0)(this.name,f),f})}else if(this.get_calls().includes(action_name)){let call_instance=this.get_call(action_name);action=create_external_action(this.name,action_name,call_instance)}return action?(action.is_plugin=!0,action.service=this.name,(_action2$category=(_action2=action).category)!=null||(_action2.category="plugins"),action):null}get_local_cache_key(type){return`${this.toUniqueString()}-${type}`}get_event(type){let local_cache_key=this.get_local_cache_key(type);if(!created_plugins_thing().has(local_cache_key)){var _this$_get_raw_list6;let event_name=get_plugin_and_type(type)[1],event=((_this$_get_raw_list6=this._get_raw_list("events"))!=null?_this$_get_raw_list6:{})[event_name];if(!event)return null;if(event.element_name){var _this$is_testing;core_events_default.make_element_event(type,event,!0,(_this$is_testing=this.is_testing)==null?void 0:_this$is_testing.call(this))}else core_events_default.make_gen_event(type,event);event.is_plugin=!0,event.service=this.name,created_plugins_thing().set(local_cache_key,event)}return created_plugins_thing().get(local_cache_key)}get_element(type,no_cache){var _no_cache;(_no_cache=no_cache)!=null||(no_cache=!1);let local_cache_key=this.get_local_cache_key(type);if(!created_plugins_thing().has(local_cache_key)||no_cache){let element_name=get_plugin_and_type(type)[1],plugin_elements=this._get_raw_list("elements"),element=plugin_elements==null?void 0:plugin_elements[element_name];if(!element)return null;if(element.is_plugin=!0,element.service=this.name,make_element(type,element,!0),!element.is_non_hardcoded_plugin)for(let[prop_name,prop_data]of object_entries(element.field_names))prop_data.in_style&&register_style_property(prop_name);created_plugins_thing().set(local_cache_key,element)}return created_plugins_thing().get(local_cache_key)}get_public_btypes(){var _this$_get_raw_list7;let public_btypes=(_this$_get_raw_list7=this._get_raw_list("public_values"))!=null?_this$_get_raw_list7:[],instance_btypes=this.get_btypes();for(let value_name of public_btypes)if(!instance_btypes[value_name])throw new UnexpectedError("Could not find value "+value_name+" in "+this.name);return public_btypes}get_public_calls(){let public_calls=this._get_raw_list("public_calls");return public_calls!=null?public_calls:[]}get_user_calls(){let user_calls=this._get_raw_list("user_calls");return user_calls!=null?user_calls:[]}get_action_calls(){let action_calls=this._get_raw_list("action_calls");return action_calls!=null?action_calls:[]}get_server_actions(){var _this$server_actions;return(_this$server_actions=this.server_actions)!=null?_this$server_actions:[]}get_oauth_providers(){var _this$_get_raw_list8;return(_this$_get_raw_list8=this._get_raw_list("oauth_providers"))!=null?_this$_get_raw_list8:[]}get_oauth_providers_simple(){return this.get_oauth_providers().map(a=>{var _a$id;return(_a$id=a.id)!=null?_a$id:a})}is_oauth_provider(){return this.get_oauth_providers().length>0}is_storage_provider(){return this.file_upload!=null}is_video_service(){return this._is_video_service}response_to_data(_ref3,response,data_type,call,wrap_error){var _data_type;let{path,url:url9,uri,method,data,headers}=_ref3;(_data_type=data_type)!=null||(data_type="json");let wrapping_error=!1,wrapped_error={};if(response.statusCode<200||response.statusCode>299||this.errors_on_200)if(wrap_error)wrapping_error=!0,wrapped_error={status_code:response.statusCode,status_message:response.statusMessage,body:JSON.stringify(response.body)};else{var _this$get_error_messa;let nice_message=(_this$get_error_messa=this.get_error_message)==null?void 0:_this$get_error_messa.call(this,response,call);if(nice_message){let error2=new OwnerError("Received error from api",{display:nice_message});throw error2.statusCode=response.statusCode,error2}else if(!this.errors_on_200){var _this$display2;if(this.not_production_critical&&is_retryable(null,response))throw not_critical_retry_failure(this.display(),response.statusCode+": "+response.body);let msg=`Error connecting to ${(_this$display2=this.display())!=null?_this$display2:this.name} (${response.statusCode})`;throw data={body:response.body.slice(0,1e4),path,method,data,url:url9,uri,headers},new UnexpectedError(msg,data)}}if(!response.body)return null;if(!["json","querystring","raw"].includes(data_type.toLowerCase()))throw new UnexpectedError("unrecognized data_type:"+data_type);if(response.body instanceof Error)throw new UnexpectedError("Error executing call",{inner_message:response.body.message,inner_stack:response.body.stack});try{optional_pause("about to parse api response");let ret;if(wrapping_error)ret={body:response.body,statusCode:response.statusCode,statusMessage:response.statusMessage,error:wrapped_error};else switch(data_type.toLowerCase()){case"json":{var _response$body$trim,_response$body,_response$body$trim2;let to_parse=(_response$body$trim=(_response$body=response.body)==null||(_response$body$trim2=_response$body.trim)==null?void 0:_response$body$trim2.call(_response$body))!=null?_response$body$trim:response.body;ret=incremental_json_parse(to_parse);break}case"querystring":ret=querystring11.parse(response.body);break;case"raw":ret=response.body;break}return wrap_error&&typeof ret=="object"&&(ret.returned_an_error=Object.keys(wrapped_error).length>0),optional_pause("finished parsing api response"),ret}catch{var _JSON$stringify$slice,_JSON$stringify,_this$display3;let status_message="Error parsing response data",truncated_response_body=(_JSON$stringify$slice=(_JSON$stringify=JSON.stringify(response.body)).slice)==null?void 0:_JSON$stringify$slice.call(_JSON$stringify,0,1e4),error_description=`Error parsing data from ${(_this$display3=this.display())!=null?_this$display3:this.name}: ${truncated_response_body}`;if(!wrap_error)throw new OwnerError(status_message,{display:error_description});let status_code=500;return wrapped_error={status_code,status_message,body:error_description},{body:truncated_response_body,statusCode:status_code,statusMessage:status_message,error:wrapped_error,returned_an_error:!0}}}},_applyDecoratedDescriptor11(_class59.prototype,"get_call",[_dec12],Object.getOwnPropertyDescriptor(_class59.prototype,"get_call"),_class59.prototype),_class59);init_StructValue();init_call_btypes();var _dec13,_dec25,_dec34,_dec43,_dec53,_dec63,_dec73,_dec82,_dec92,_class60;function _applyDecoratedDescriptor12(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var BaseAPIConnector=(_dec13=cached({type:AUTORUN}),_dec25=cached({type:AUTORUN}),_dec34=cached({type:AUTORUN}),_dec43=cached({type:AUTORUN}),_dec53=cached({type:AUTORUN}),_dec63=cached({type:AUTORUN}),_dec73=cached({type:AUTORUN}),_dec82=cached({type:AUTORUN,compare_fn(a,b){return a!=null&&a.call_raw_data&&b!=null&&b.call_raw_data?isEqual_default(a.call_raw_data,b.call_raw_data):compare(a,b)}}),_dec92=cached({type:AUTORUN}),_class60=class extends ExternalService{get dynamic_calls(){return!0}public_values(){let res=[],object2=this.get_all_apis();for(let api_id in object2){let api_data=object2[api_id];for(let call_id in api_data.calls){let call_data=api_data.calls[call_id];if(call_data.initialized){if(call_data.no_types)continue;for(let val_name in call_data.types)res.push(val_name)}}}return res}values(){let vals={},object2=this.get_all_apis();for(let api_id in object2){let api_data=object2[api_id];api_data.auth==="oauth2_user"&&(vals[api_id+"_oauth_profile"]=new StructValue("Profile "+api_data.human,{id:{path:api_data.id_path!=null?api_data.id_path.split("."):void 0},email:{path:api_data.email_path!=null?api_data.email_path.split("."):void 0}})),get_btypes_from_call(api_id,api_data,vals,this.key_prefix)}return vals}public_calls(){return this._get_sorted_list("data")}action_calls(){return this._get_sorted_list("action")}user_calls(){let res=[],object2=this.get_all_apis();for(let api_id in object2)object2[api_id].auth==="oauth2_user"&&res.push(api_id+"_oauth_user_data_call");return res}oauth_providers(){let res=[],object2=this.get_all_apis();for(let api_id in object2){let api_data=object2[api_id];api_data.auth==="oauth2_user"&&res.push({id:this.BASE+PLUGIN_SEPARATOR+api_id,display:"API - "+api_data.human})}return res}get do_not_report_error(){return!0}get_call_class(call_name){let obj=this.calls()[call_name];if(obj!=null)return call_name.indexOf("_oauth_user_data_call")!==-1||call_name==="TestAPICall"?obj:get_call_from_raw(call_name.split(".")[1],obj,this.plugin_name,this.BASE)}get_call(call_name){let call_data=this._instantiate_call(call_name,this.get_call_class(call_name));if(!call_data&&!lib_default().is_edit_mode()&&call_name.indexOf("_oauth_user_data_call")===-1)throw new OwnerError("missing call",{display:this.plugin_name+" error: the call "+call_name+" is missing, please reinitialize your calls."});return call_data}calls(){let calls={},{BASE}=this,{plugin_name}=this,object2=this.get_all_apis();for(let api_id in object2){let api_data=object2[api_id];if(api_data.auth==="oauth2_user"){let call_name=api_id+"_oauth_user_data_call";calls[call_name]=class extends ExternalCall{get human(){return api_data.human}get _must_proxy(){return!0}get btype_id(){return api_type(BASE+"."+api_id+"_oauth_profile")}build(prev,properties){return api_data.oauth_user_data_call?{path:api_data.oauth_user_data_call}:{dont_do_call:!0,message:plugin_name+" error: the User profile endpoint is missing, please check your configuration.",force_error_message:!0}}get_authenticator(){return this.service().get_authenticator(api_id)}}}for(let call_id in api_data.calls){let call_data=api_data.calls[call_id];call_data.api_human=api_data.human,call_data.api_id=api_id,calls[api_id+"."+call_id]=call_data}}return calls}constructor(){super(),this.keys={}}handle_request_failures(error2){return handle_request_failures(error2)}_get_sorted_list(type){let sorted_list=[],r2=0,object2=this.get_all_apis();for(let api_id in object2){let api_data=object2[api_id];for(let call_id in api_data.calls){var _call_data$publish_as,_call_data$rank;let call_data=api_data.calls[call_id];(_call_data$publish_as=call_data.publish_as)!=null||(call_data.publish_as="data"),!(call_data.publish_as!==type||!is_call_initialized(call_data))&&(sorted_list.push({id:api_id+"."+call_id,rank:(_call_data$rank=call_data.rank)!=null?_call_data$rank:r2}),r2++)}}return sorted_list.sort((a,b)=>a.rank<b.rank?-1:1),sorted_list.map(a=>a.id)}base_url(){return""}response_to_data(data,response,data_type,call){let body=super.response_to_data(data,response,data_type,call,call==null?void 0:call.wrap_error);if(call!=null&&call.get_headers||call!=null&&call.wrap_error){let{headers}=response;return{body,headers}}return body}get_error_message(response,call){return get_error_message(response,call)}},_applyDecoratedDescriptor12(_class60.prototype,"public_values",[_dec13],Object.getOwnPropertyDescriptor(_class60.prototype,"public_values"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"values",[_dec25],Object.getOwnPropertyDescriptor(_class60.prototype,"values"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"public_calls",[_dec34],Object.getOwnPropertyDescriptor(_class60.prototype,"public_calls"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"action_calls",[_dec43],Object.getOwnPropertyDescriptor(_class60.prototype,"action_calls"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"user_calls",[_dec53],Object.getOwnPropertyDescriptor(_class60.prototype,"user_calls"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"oauth_providers",[_dec63],Object.getOwnPropertyDescriptor(_class60.prototype,"oauth_providers"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"get_call_class",[_dec73],Object.getOwnPropertyDescriptor(_class60.prototype,"get_call_class"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"get_call",[_dec82],Object.getOwnPropertyDescriptor(_class60.prototype,"get_call"),_class60.prototype),_applyDecoratedDescriptor12(_class60.prototype,"calls",[_dec92],Object.getOwnPropertyDescriptor(_class60.prototype,"calls"),_class60.prototype),_class60);var find_between_characters2=find_between_characters,methods2=methods,method_uses_body2=method_uses_body,user_friendly_parameter_names2=user_friendly_parameter_names,can_be_in_browser2=can_be_in_browser,get_call_from_raw2=get_call_from_raw,sanitize_url3=void 0,generate_request_from_call_data2=generate_request_from_call_data,validate_header_name2=validate_header_name,validate_header_value2=validate_header_value,add_shared_params_and_headers2=add_shared_params_and_headers,is_call_initialized2=is_call_initialized,get_error_message2=get_error_message,APIConnectorBasePrivateKey2=APIConnectorBasePrivateKey,APIConnectorBasicAuth2=APIConnectorBasicAuth,APIConnectorBaseSSLProtocol2=APIConnectorBaseSSLProtocol,APIConnectorBaseOauth2PWFlow2=APIConnectorBaseOauth2PWFlow,APIConnectorBaseOauth2Custom2=APIConnectorBaseOauth2Custom,APIConnectorBaseJWT2=APIConnectorBaseJWT,APIConnectorBaseOauth22=APIConnectorBaseOauth2,xml_to_json4=void 0;function get_btypes_from_call2(){return get_btypes_from_call(...arguments)}var get_private_key_auth_params=api_data=>({token_param_name:api_data.token_param_name,add_to_header:api_data.auth==="private_key_header",add_to_url:api_data.auth==="private_key_url"}),get_oauth2_user_auth_params=api_data=>{var _api_data$token_param,_api_data$auth_url_pa;return{token_param_name:(_api_data$token_param=api_data.token_param_name)!=null?_api_data$token_param:"access_token",header_key:api_data.header_key,scope:api_data.scope,authentication_url:api_data.authentication_url,generate_token_from_code_uri:api_data.generate_token_from_code_uri,add_to_header:api_data.add_to_header,auth_url_params:(_api_data$auth_url_pa=api_data.auth_url_params)!=null?_api_data$auth_url_pa:{},add_to_url:!api_data.add_to_header,add_basic_authentication:api_data.add_basic_authentication,data_type:api_data.token_data_type?"querystring":void 0,access_type:api_data.add_offline?"offline":void 0,prompt:api_data.add_offline?"consent":void 0,server_redirect:api_data.server_redirect}},get_oauth2_pw_auth_params=api_data=>({generate_token_from_code_uri:api_data.token_endpoint,grant_type:"password",use_username_password:!0}),get_jwt_auth_params=api_data=>({iss:api_data.iss,scope:api_data.scope,generate_token_from_code_uri:api_data.generate_token_from_code_uri});init_analytics();init_apiconnectorbase();init_app_json();init_auth();var composer_exports={};__export(composer_exports,{COMPOSER_INPUT_TYPES:()=>COMPOSER_INPUT_TYPES,COMPOSER_INPUT_TYPES_WITH_TYPEAHEAD:()=>COMPOSER_INPUT_TYPES_WITH_TYPEAHEAD,DEEP_COMPOSERS:()=>DEEP_COMPOSERS,FINITE_OPTION_INPUT_TYPES:()=>FINITE_OPTION_INPUT_TYPES,ICON_DYNAMIC_DATA_BTN_WIDTH:()=>ICON_DYNAMIC_DATA_BTN_WIDTH,RELEASED_COMPOSERS:()=>RELEASED_COMPOSERS});init_define_process_env();init_shim();var import_web_dom_collections_iterator279=__toESM(require_web_dom_collections_iterator()),COMPOSER_INPUT_TYPES=function(COMPOSER_INPUT_TYPES2){return COMPOSER_INPUT_TYPES2.REAL_TIME_SEARCH="real_time_search",COMPOSER_INPUT_TYPES2.BOOLEAN="boolean",COMPOSER_INPUT_TYPES2.NUMBER="number",COMPOSER_INPUT_TYPES2.INTEGER="integer",COMPOSER_INPUT_TYPES2.TEXT="text",COMPOSER_INPUT_TYPES2.KEY_COMBINATION="key_combination",COMPOSER_INPUT_TYPES2.GEOGRAPHIC_ADDRESS="geographic_address",COMPOSER_INPUT_TYPES2.ENUMERATED="enumerated",COMPOSER_INPUT_TYPES2}({}),COMPOSER_INPUT_TYPES_WITH_TYPEAHEAD=new Set([COMPOSER_INPUT_TYPES.REAL_TIME_SEARCH,COMPOSER_INPUT_TYPES.BOOLEAN,COMPOSER_INPUT_TYPES.NUMBER,COMPOSER_INPUT_TYPES.INTEGER,COMPOSER_INPUT_TYPES.TEXT]),FINITE_OPTION_INPUT_TYPES=new Set([COMPOSER_INPUT_TYPES.ENUMERATED,COMPOSER_INPUT_TYPES.REAL_TIME_SEARCH]),ICON_DYNAMIC_DATA_BTN_WIDTH=32,RELEASED_COMPOSERS=["Checkbox","TextBox","MultilineTextBox"],DEEP_COMPOSERS=["Checkbox","TextBox","MultilineTextBox","NumberBox","DateBox","GeographicBox"].filter(comp=>RELEASED_COMPOSERS.includes(comp));init_core();init_db();init_domain();init_elements();init_fonts();init_known_plugins();init_locations();init_plugin();init_runmode();init_special_keys();var subscriptions_exports={};__export(subscriptions_exports,{AdjustCapacity:()=>AdjustCapacity,BillingFrequency:()=>BillingFrequency,BillingFrequencyDisplay:()=>BillingFrequencyDisplay,CANCELED_STATUS:()=>CANCELED_STATUS,CancelationMode:()=>CancelationMode,FREE_TRIAL_DAYS:()=>FREE_TRIAL_DAYS,FREE_TRIAL_TEXT:()=>FREE_TRIAL_TEXT,IMMEDIATE_INVOICE_THRESHOLD:()=>IMMEDIATE_INVOICE_THRESHOLD,LEGACY_CREATION_DATE_CUTOFF:()=>LEGACY_CREATION_DATE_CUTOFF,LEGACY_END_DATE:()=>LEGACY_END_DATE,MAX_FREE_TRIAL_DAYS:()=>MAX_FREE_TRIAL_DAYS,SOURCE_EDITOR:()=>SOURCE_EDITOR,SOURCE_EDITOR_ANNUAL_CTA:()=>SOURCE_EDITOR_ANNUAL_CTA,SOURCE_EDITOR_PAYWALL:()=>SOURCE_EDITOR_PAYWALL,SOURCE_EDITOR_PRICING_TABLE:()=>SOURCE_EDITOR_PRICING_TABLE,SOURCE_EDITOR_WORKLOAD_TIER_SIDEPANEL:()=>SOURCE_EDITOR_WORKLOAD_TIER_SIDEPANEL,SOURCE_WORKLOAD_PLAN_TABLE:()=>SOURCE_WORKLOAD_PLAN_TABLE,STRIPE_PLUGIN_ID_PREFIX:()=>STRIPE_PLUGIN_ID_PREFIX,TRIAL_END_NOW:()=>TRIAL_END_NOW});init_define_process_env();init_shim();var FREE_TRIAL_DAYS=14,FREE_TRIAL_TEXT="2-week",TRIAL_END_NOW="now",IMMEDIATE_INVOICE_THRESHOLD=40,LEGACY_CREATION_DATE_CUTOFF=1565886001e3,LEGACY_END_DATE=1629044401e3,MAX_FREE_TRIAL_DAYS=31,STRIPE_PLUGIN_ID_PREFIX="plugin_",SOURCE_EDITOR="editor",SOURCE_EDITOR_ANNUAL_CTA="editor_switch_annual_cta",SOURCE_EDITOR_PAYWALL="editor_paywall",SOURCE_EDITOR_PRICING_TABLE="editor_pricing_table",SOURCE_EDITOR_WORKLOAD_TIER_SIDEPANEL="editor_workload_tier_sidepanel",SOURCE_WORKLOAD_PLAN_TABLE="workload_plan_table",BillingFrequency=function(BillingFrequency2){return BillingFrequency2.Month="month",BillingFrequency2.Year="year",BillingFrequency2}({}),AdjustCapacity=function(AdjustCapacity2){return AdjustCapacity2.Capacity="capacity",AdjustCapacity2.Storage="storage",AdjustCapacity2.UsagePlan="usage_plan",AdjustCapacity2}({}),BillingFrequencyDisplay={[BillingFrequency.Month]:"monthly",[BillingFrequency.Year]:"annually"},CANCELED_STATUS="canceled",CancelationMode=function(CancelationMode2){return CancelationMode2.Immediate="immediate",CancelationMode2.Prorate="prorate",CancelationMode2.EndOfCycle="end_of_cycle",CancelationMode2}({});init_test_apps();init_time();init_workflow();var shared_fields_exports={};init_define_process_env();init_shim();var import_web_dom_collections_iterator282=__toESM(require_web_dom_collections_iterator());init_btypes();init_lib();init_btype_ids();init_define_process_env();init_shim();var import_web_dom_collections_iterator281=__toESM(require_web_dom_collections_iterator());init_solid();init_lodash();init_logger();init_loggable();init_u2();init_define_process_env();init_shim();var import_web_dom_collections_iterator280=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_status_bar();init_define_process_env();init_shim();var import_web_dom_collections_iterator292=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_appquery();init_service_type_parser();init_plugin_getter();init_define_process_env();init_shim();init_u2();init_generic_actions_utilities();init_eval();init_lib();var exported5={field_names:{email:{},password:{},password2:{},require_confirm:{},send_confirm_email:{},page:{},remember_email:{optional:!0},...change_field_names(EVAL_TYPE.value)},run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{if(get_iframe_for_cookie_phonegap(),err){cb(err);return}if(lib_default().current_user().flush(),properties.remember_email===!0)try{local_storage_put(get_remember_email_key(),{email:properties.email})}catch{}cb(err,res)})},server_method:"sign_up",data_to_refresh:refresh_current_user,preprocess_properties(properties){let thing_btype_id="user",prop_name="changes";return properties=pre_process_properties({properties,prop_name,thing_btype_id}),properties=apply_default_fields(prop_name,thing_btype_id,properties),properties},requires_cookies:!0},SignUp_default=exported5;init_define_process_env();init_shim();var services_exports={};__export(services_exports,{_last_date_generated:()=>_last_date_generated,get_api_calls:()=>get_api_calls,get_api_calls_ids:()=>get_api_calls_ids,get_btype_ids:()=>get_btype_ids,get_oauth_authenticator:()=>get_oauth_authenticator,get_user_calls:()=>get_user_calls,log_plugin_element_init:()=>log_plugin_element_init});init_define_process_env();init_shim();var import_web_dom_collections_iterator283=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_plugin();init_logger();init_lodash();init_service_type_parser();init_plugin_getter();var b_fiber4,plugin_elements_logged={};function plugin_data_id(plugin_data){return JSON.stringify(plugin_data)}function log_plugin_element_init(plugin_data){let key=plugin_data_id(plugin_data);plugin_elements_logged[key]||(verbose("plugin initialized",plugin_data),plugin_elements_logged[key]=!0)}function get_oauth_authenticator(oauth_provider){if(!oauth_provider)return null;if(oauth_provider.indexOf(PLUGIN_SEPARATOR)===-1){var _plugin_getter$get_pl;return(_plugin_getter$get_pl=get_plugin(oauth_provider))==null?void 0:_plugin_getter$get_pl.get_authenticator()}else{var _plugin_getter$get_pl2;let[plugin_name,type]=get_plugin_and_type(oauth_provider,"oauth");return(_plugin_getter$get_pl2=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl2.get_authenticator(type,"oauth")}}var get_api_calls=autorun_cache(()=>{let res={};for(let plugin_id of appquery_default.list_plugins()){let service=get_plugin(plugin_id),public_calls=service==null?void 0:service.get_public_calls();for(let call_name of public_calls!=null?public_calls:[]){let name=plugin_id+"."+call_name,call=service.get_call(call_name);call?res[name]=call:error("could not find call",{name})}}return res}),get_api_calls_ids=autorun_cache({fn(){return new Set(Object.keys(get_api_calls()))},compare_fn:isEqual_default});function get_user_calls(){var _b_fiber,_b_fiber3;let res={};(_b_fiber=b_fiber4)==null||_b_fiber.optional_pause();for(let id of appquery_default.get_user_calls()){var _b_fiber2;(_b_fiber2=b_fiber4)==null||_b_fiber2.optional_pause();let[plugin_id,call_name]=get_plugin_and_type(id),plugin2=get_plugin(plugin_id);if(plugin2==null)continue;let call=plugin2==null?void 0:plugin2.get_call(call_name);call&&(res[call_name]=call)}return(_b_fiber3=b_fiber4)==null||_b_fiber3.optional_pause(),res}var get_btype_ids=autorun_cache(()=>{let res=[];for(let plugin_id of appquery_default.list_plugins()){let service=get_plugin(plugin_id);if(service){let public_values=service.get_public_btypes();if(public_values.length>0){let values=service.get_btypes();for(let value_name of public_values)res.push(values[value_name].full_name)}}}return res}),_last_date_generated=null;init_lang();var OAuthLogin={field_names:DETECT_FIELD_NAMES,not_api:!0,run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{if(err){cb(err);return}let{oauth_provider}=properties,authenticator=get_oauth_authenticator(oauth_provider);if(!authenticator||!authenticator.login){oauth_provider?window.alert("Undefined oauth provider: "+oauth_provider):window.alert("Oops, please fill out the social network for this action"),cb("aborted");return}authenticator.login(context,action,res,cb)})},resume(action,context,cb){context.get_server_outcome(action,cb)},server_method:"oauth_login",server_method_resume:"oauth_login_resume",data_to_refresh:refresh_current_user,requires_cookies:!0},OAuthLogin_default=OAuthLogin;init_define_process_env();init_shim();init_lib();init_logger();init_u2();var WebBrowserLogin={field_names:{element_id:{},stay_logged_in:{default:!0}},not_api:!0,run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{if(err){cb(err);return}cb("aborted"),lib_default().native_bridge.browserLogin(res).then(token=>{lib_default().workflow.resume_local(context,action,{code:token})},err2=>{log(ensure_bubble_error(err2))})})},resume(action,context,cb){context.get_server_outcome(action,cb)},server_method:"web_browser_login",server_method_resume:"web_browser_login_resume",data_to_refresh:refresh_current_user,requires_cookies:!0},WebBrowserLogin_default=WebBrowserLogin;init_define_process_env();init_shim();init_u2();init_appquery();var Login={field_names:{email:{},password:{},stay_logged_in:{default:!0},remember_email:{optional:!0}},run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{if(properties.remember_email)try{local_storage_put(get_remember_email_key(),{email:properties.email})}catch{}get_iframe_for_cookie_phonegap(),cb(err,res)})},server_method:"log_in",data_to_refresh:refresh_current_user,requires_cookies:!0},LogIn_default=Login;init_define_process_env();init_shim();var exported6={field_names:{},run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{get_iframe_for_cookie_phonegap(),cb(err,res)})},server_method:"log_out",requires_cookies:!0,data_to_refresh:refresh_current_user},LogOut_default=exported6;init_define_process_env();init_shim();var CookieOptIn={field_names:{},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"cookie_opt_in",requires_cookies:!0,data_to_refresh:refresh_current_user},CookieOptIn_default=CookieOptIn;init_define_process_env();init_shim();var CookieOptOut={field_names:{},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"cookie_opt_out",requires_cookies:!0,data_to_refresh:refresh_current_user},CookieOptOut_default=CookieOptOut;init_define_process_env();init_shim();init_state_keys();init_lib();var exported7={field_names:{old_password:{},change_email:{},email:{},change_password:{},password:{},require_confirm:{},password2:{},do_not_show_success_alert:{},send_confirm_email:{},page:{default:"index"}},run(action,properties,context,cb){context.get_server_outcome(action,err=>{lib_default().current_user().flush(),err?cb(err):(properties.do_not_show_success_alert||alert(lib_default().get_text("CORE","UPDATE_CREDENTIAL_SUCCESS")),cb())})},server_method:"update_credentials",data_to_refresh(action,properties,element_instance){let d={};if(properties.change_email){let user=lib_default().current_user();d[state_keys_default.Message({prev:user,message:"email",prior_btype_id:"user"})]=properties.email}return d}},UpdateCredentials_default=exported7;init_define_process_env();init_shim();init_state_keys();var exported8={field_names:{user:{},new_email:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"change_email_for_another_user",data_to_refresh(action,properties,element_instance){let d={},{user}=properties;return user!=null&&(d[state_keys_default.Message({prev:user,message:"email",prior_btype_id:"user"})]=properties.new_email),d}},ChangeEmailForAnotherUser_default=exported8;init_define_process_env();init_shim();init_u2();init_db();init_generic_actions_utilities();init_eval();init_lib();var exported9={field_names:{...change_field_names(EVAL_TYPE.value)},run(action,properties,context,cb){if(properties.changes&&!is_empty(properties.changes)){let current_user5=lib_default().current_user();update_thing(current_user5,properties.changes).callback(cb)}else cb()},data_to_refresh(action,properties,element_instance){return get_data_to_refresh_for_change_action({to_change:lib_default().current_user(),to_change_btype_id:"user",changes:properties.changes})},return_btype(){return null},server_method:"change_current_user",preprocess_properties:make_pre_process_properties({prop_name:"changes",thing_btype_id:"user"}),fall_back_to_server:!0,requires_server(){return!(on_client()&&lib_default().current_user()._id()===NO_USER)}},MakeChangeCurrentUser_default=exported9;init_define_process_env();init_shim();init_btypes();var exported10={field_names:{to:{},subject:{default:"Your password reset request"},body:{default:`Hello,

Someone (hopefully you!) submitted a request to reset your password. If it wasn't you, please ignore this message. If it was you, you can reset your password at the below link.

The Team

`},just_make_token:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"send_password_reset_email",return_btype(action){return action.get_static_property("just_make_token")?get5("text"):null},check_use_visible:!0,data_to_refresh:null,do_not_send_result_to_client:!0},SendPasswordResetEmail_default=exported10;init_define_process_env();init_shim();init_btypes();var exported11={field_names:{email:{},subject:{default:"Your magic link"},body:{default:`Hello,

You requested a magic link to login to your account. Please note that
this link can only be used to login once and lasts for one hour.

The Team

`},link_text:{default:"Login here"},valid_link_time_frame:{default:null,validation_fn(valid_link_time_frame){return valid_link_time_frame<=24&&valid_link_time_frame>0}},stay_logged_in:{default:!0},success_page:{},success_customize:{},failure_customize:{},data_to_send_success:{},data_to_send_failure:{},add_parameters_success:{},add_parameters_failure:{},url_parameters_success:{},url_parameters_failure:{},keep_current_page_params_success:{},keep_current_page_params_failure:{},failure_page:{},just_make_link:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"send_magic_link_email",return_btype(action){return action.get_static_property("just_make_link")?get5("text"):null},check_use_visible:!0,data_to_refresh:null,do_not_send_result_to_client:!0},SendMagicLink_default=exported11;init_define_process_env();init_shim();init_btypes();var exported12={field_names:{page:{},just_make_token:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"send_confirmation_email",return_btype(action){return action.get_static_property("just_make_token")?get5("text"):null},data_to_refresh:null,check_use_visible:!0,do_not_send_result_to_client:!0},SendConfirmationEmail_default=exported12;init_define_process_env();init_shim();var ResetPassword_default={field_names:{new_password:{},new_password_again:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"reset_password",data_to_refresh:null};init_define_process_env();init_shim();init_mode_check();init_b_object();init_generic_actions_utilities();init_eval();init_btypes();var exported13={field_names:extend({email:{},password:{},return_user_if_already_exists:{}},change_field_names(EVAL_TYPE.value)),run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"create_user_account",data_to_refresh:null,return_btype(){return get5("user")},preprocess_properties(properties){let thing_btype_id="user",prop_name="changes";return properties=pre_process_properties({properties,prop_name,thing_btype_id}),typeof properties.email=="string"&&!on_server()&&(properties=apply_default_fields(prop_name,thing_btype_id,properties)),properties}},CreateUserAccount_default=exported13;init_define_process_env();init_shim();var CheckUserPassword_default={field_names:{password:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"check_user_password",data_to_refresh:null};init_define_process_env();init_shim();init_btypes();var exported14={field_names:{user:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"set_temporary_password",do_not_log_result:!0,data_to_refresh:null,return_btype(){return get5("text")}},SetTemporaryPassword_default=exported14;init_define_process_env();init_shim();var LogOutOtherSessions_default={field_names:{},server_method:"log_out_other_sessions",data_to_refresh:null};init_define_process_env();init_shim();init_btypes();var exported15={field_names:{password:{}},do_not_log_result:!0,run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"generate_2fa_qr_code",data_to_refresh:null,return_btype(){return get5("image")}},Generate2FAQRCode_default=exported15;init_define_process_env();init_shim();init_state_keys();init_lib();var exported16={field_names:{token:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"validate_2fa_token",data_to_refresh(action,properties,element_instance){let d={};return d[state_keys_default.Message({prev:lib_default().current_user(),message:"uses_2fa",prior_btype_id:"user"})]=!0,d}},Validate2FAToken_default=exported16;init_define_process_env();init_shim();var Check2FAToken_default={field_names:{token:{},valid_30_days:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"check_2fa_token",data_to_refresh:null};init_define_process_env();init_shim();init_state_keys();init_lib();var exported17={field_names:{token:{},password:{}},run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"disable_2fa",data_to_refresh(action,properties,element_instance){let d={};return d[state_keys_default.Message({prev:lib_default().current_user(),message:"uses_2fa",prior_btype_id:"user"})]=!1,d}},Disable2FA_default=exported17;init_define_process_env();init_shim();init_state_keys();init_btype_ids();init_lib();init_btypes();var exported18={field_names:{token:{},password:{},number_of_codes:{default:10}},do_not_log_result:!0,run(action,properties,context,cb){context.get_server_outcome(action,cb)},server_method:"generate_one_time_codes",data_to_refresh(action,properties,element_instance){let d={};return d[state_keys_default.Message({prev:lib_default().current_user(),message:"has_codes",prior_btype_id:"user"})]=!0,d},return_btype(){return get5(list_type("text"))}},GenerateOneTimeCodes_default=exported18;init_define_process_env();init_shim();init_define_process_env();init_shim();init_btype_ids();init_lib();init_u2();init_btypes();init_logger();var CameraBaseAction={field_names:{type_num_photos:{default:"single_photo"},private:{},attach_to:{},save_to_lib:{default:!1}},resume(action,context,cb){return context.get_server_outcome(action,cb)},server_method_resume:"camera_base_resume",server_method:"camera_base",not_api:!0,condition(page2){var _page$is_mobile;return(_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2)},return_btype(action){return action.get_static_property("type_num_photos")==="single_photo"?get5("image"):get5(list_type("image"))},data_to_refresh:null};function getRunMethod(actionType){let native_bridge=lib_default.or_throw().native_bridge;if(native_bridge==null)throw new OwnerError("Action only supported on mobile views");let cameraMethod=actionType==="LaunchCamera"?native_bridge.launchCamera:native_bridge.launchImageLibrary;function run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{var _properties$attach_to,_properties$attach_to2;if(err){cb(err);return}let allowMultiple=properties.type_num_photos!=="single_photo",attachToId=properties.private?(_properties$attach_to=properties.attach_to)==null||(_properties$attach_to2=_properties$attach_to._id)==null?void 0:_properties$attach_to2.call(_properties$attach_to):void 0;cb("aborted"),cameraMethod({appname:lib_default.or_throw().appname(),appVersion:lib_default.or_throw().app_version(),allowMultiple,attachToId,saveToLib:properties.save_to_lib,token:res}).then(res2=>{let data_to_send={file_urls:res2};lib_default.or_throw().workflow.resume_local(context,action,data_to_send)}).catch(err2=>error(err2))})}return run}var LaunchImageLibrary={...CameraBaseAction,run:(action,properties,context,cb)=>getRunMethod("LaunchImageLibrary")(action,properties,context,cb)},LaunchImageLibrary_default=LaunchImageLibrary;init_define_process_env();init_shim();var LaunchCamera={...CameraBaseAction,run:(action,properties,context,cb)=>getRunMethod("LaunchCamera")(action,properties,context,cb)},LaunchCamera_default=LaunchCamera;init_define_process_env();init_shim();var import_web_dom_collections_iterator284=__toESM(require_web_dom_collections_iterator());init_u2();init_define_process_env();init_shim();init_lib();init_u2();function build_page_url_for_action(data_to_send,add_params,url_params,current_params,pg_name,pg,page_thing_id){let data_for_link={},page_thing="";page_thing_id&&(page_thing=page_thing_id),is_debug_mode()&&(data_for_link.debug_mode=!0);let params_to_add={};if(add_params){let object2=url_params!=null?url_params:{};for(let index in object2){let param=object2[index];params_to_add[param.key]=param.value}}current_params&&(params_to_add=extend(lib_default().location.get_query(),params_to_add));for(let key in params_to_add){let value=params_to_add[key];forbidden_url_keys.includes(key)||(data_for_link[key]=value)}return{pg_thing:page_thing,data_fr_link:data_for_link}}init_generic_actions_utilities();init_logger();init_appquery();init_lib();init_languages();var ChangePage={field_names:{element_id:{},data_to_send:{},dynamic_page_name:{},open_in_new_tab:{},add_parameters:{},url_parameters:{},keep_current_page_params:{},replace_history:{}},run(action,properties,context,cb){function continue_redirect(action2,properties2,context2,cb2){let page2;switch(properties2.element_id){case"Current page":page2=appquery_default.get_page_by_name(lib_default().location.get_page());break;case"Dynamic page":page2=appquery_default.get_page_by_name(properties2.dynamic_page_name);break;default:page2=get_page(properties2.element_id)}if(!page2){console.log("not changing page because page not found"),cb2();return}if(on_phonegap()){window.alert("Native apps should be built in a single page, you can't use a change action here");return}let page_name=page2.name();u_exports2.run_once(30,()=>{let data_to_send;switch(properties2.element_id){case"Current page":data_to_send=lib_default().pageparam.get();break;case"Dynamic page":data_to_send="";break;default:data_to_send=properties2.data_to_send}return get_data_to_send(data_to_send,page2.get_static_property("readable_field"))},(err,page_thing)=>{err&&log(err);let change_page_obj=build_page_url_for_action(properties2.data_to_send,properties2.add_parameters,properties2.url_parameters,properties2.keep_current_page_params,page_name,page2,page_thing),data_for_link=change_page_obj.data_fr_link;change_page_obj.pg_thing&&(page_name+="/"+change_page_obj.pg_thing);let future_language=data_for_link.lang,past_language=app_language(),should_refresh_for_language=future_language&&past_language!==future_language.toLowerCase();if(properties2.open_in_new_tab){window.open(lib_default().location.get_page_url(page_name,data_for_link),"_blank"),window.focus(),cb2();return}if(page2.name()===lib_default().location.get_page()&&!should_refresh_for_language){let new_url=lib_default().location.get_page_url(page_name,data_for_link);new_url!==lib_default().location.my_location()&&(lib_default().location.set_url_without_refresh({url:new_url,push_state:!properties2.replace_history}),lib_default().pageparam.invalidate()),context2!=null&&(context2.__investigate_post_changed_page_url_reads=!0),cb2();return}let resume_key=lib_default().workflow.make_resume_key(context2,action2);resume_key&&(data_for_link.resume=resume_key),lib_default().workflow.wait_for_safe(context2,()=>{resume_key||cb2("aborted"),context2.__investigate_post_changed_page_url_reads=!0,should_refresh_for_language&&(document.location.href=void 0),navigate_to_page(page_name,data_for_link)})})}lib_default().location.get_query().on_login!=null?u_exports2.run_once(15,()=>lib_default().user.has_changed(),(err,has_changed)=>{err&&log(err),has_changed||continue_redirect(action,properties,context,cb)}):continue_redirect(action,properties,context,cb)},not_api:!0,condition(page2){var _page$is_mobile;return!(page2!=null&&(_page$is_mobile=page2.is_mobile)!=null&&_page$is_mobile.call(page2))},data_to_refresh:null},ChangePage_default=ChangePage;init_define_process_env();init_shim();init_generic_actions_utilities();init_lib();var exported19={field_names:{},run(action,properties,context,cb){lib_default().workflow.wait_for_safe(context,()=>{document.location.href=get_resume_url(context,action)})},condition(node){var _node$is_mobile;return!(node!=null&&(_node$is_mobile=node.is_mobile)!=null&&_node$is_mobile.call(node))},not_api:!0,data_to_refresh:null},RefreshPage_default=exported19;init_define_process_env();init_shim();init_lib();init_u2();var exported20={field_names:{},run(action,properties,context,cb){if(on_react_native()){context.element.root_instance().message("go_back"),cb();return}lib_default().workflow.wait_for_safe(context,()=>{window.history.back(),cb()})},not_api:!0,data_to_refresh:null},GoPrevious_default=exported20;init_define_process_env();init_shim();init_u2();init_lib();init_u2();var OpenURL={field_names:{url:{},open_in_new_tab:{}},run(action,properties,context,cb){let link=properties.url;if(link&&!link.includes("//")&&!href_attributes.includes(link.split(":")[0])&&(link="//"+link),on_react_native()){var _context$element$root,_context$element$root2;(_context$element$root=context.element.root_instance())==null||(_context$element$root2=_context$element$root.message)==null||_context$element$root2.call(_context$element$root,"open_url",link);return}if(on_phonegap()){window.open(link,"_blank","location=yes,enableViewportScale=yes"),cb();return}properties.open_in_new_tab?(window.open(link,"_blank"),window.focus(),cb()):lib_default().workflow.wait_for_safe(context,()=>{cb("aborted"),document.location.href=link})},not_api:!0,data_to_refresh:null},OpenURL_default=OpenURL;init_define_process_env();init_shim();init_define_process_env();init_shim();init_custom_elements();init_appquery();init_ElementInstance();init_logger();init_u2();function navigateTo(properties,context,cb,forcedNavigationType){var _properties$param_val;let mobileView=appquery_default.page(properties.element_id);if(mobileView==null){owner_error("Missing mobile view"),cb(new OwnerError("Missing mobile view"));return}if(context.element==null||!(context.element instanceof ElementInstance_default)){owner_error("Missing element"),cb(new OwnerError("Missing element"));return}let page_instance=context.element.root_instance(),navigationType=forcedNavigationType!=null?forcedNavigationType:properties.navigation_type;page_instance.message(navigationType==="tab"?"navigate_to_tab":"push_page",mobileView.id(),{...navigationType!=="tab"&&{type:navigationType},data:Object.fromEntries(Object.values((_properties$param_val=properties.param_values)!=null?_properties$param_val:{}).map(param=>[`${CUSTOM_PROP_IDENTIFIER}${param.param_id}`,param.param_value])),cb})}var MobileNavigate={field_names:{navigation_type:{default:"stack"},element_id:{},param_values:{}},run(action,properties,context,cb){navigateTo(properties,context,cb)},not_api:!0,condition(page2){var _page$is_mobile;return(_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2)},data_to_refresh:null},MobileNavigate_default=MobileNavigate;init_define_process_env();init_shim();var MobileNavigateToTab={field_names:{element_id:{},param_values:{}},run(action,properties,context,cb){navigateTo(properties,context,cb,"tab")},not_api:!0,condition(page2){var _page$is_mobile;return(_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2)},data_to_refresh:null},MobileNavigateToTab_default=MobileNavigateToTab;init_define_process_env();init_shim();init_appquery();init_lib();init_errors();var RunInnerApp={field_names:{appname:{},app_version:{}},run(action,properties,context,cb){let native_bridge=lib_default.or_throw().native_bridge;if(native_bridge==null)throw new OwnerError("Action only supported on mobile views");native_bridge.loadInnerApp(properties.appname,properties.app_version).then(()=>cb(),err=>cb(err))},not_api:!0,condition(page2){var _page$is_mobile;return appquery_default.appname()==="meta"&&((_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2))},data_to_refresh:null},RunInnerApp_default=RunInnerApp;init_define_process_env();init_shim();init_u2();init_logger();init_appquery();var isTopLevelContainer=canvas=>{var _canvas$parent;return canvas.length&&((_canvas$parent=canvas.parent())==null?void 0:_canvas$parent[0])===document.body},exported21={field_names:{element_id:{},offset:{optional:!0,default:0}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{if(err&&log(err),instance4){if(on_react_native()){instance4.message("scroll_to_self",properties.offset),cb();return}instance4.with_canvas(canvas=>{var _Math$min;if(canvas[0].ownerDocument==null)return;let scrolling_canvas=canvas;for(;!isTopLevelContainer(scrolling_canvas)&&scrolling_canvas.css("position")!=="fixed"&&scrolling_canvas.length;)scrolling_canvas=scrolling_canvas.parent();velocity(canvas,"scroll",{duration:300,offset:(_Math$min=Math.min(properties.offset,scrolling_canvas.innerHeight()-canvas.offset().top-window.innerHeight+canvas[0].getBoundingClientRect().top+document.documentElement.scrollTop))!=null?_Math$min:0,complete_cb:()=>{var _window$BrowserDetect,_window$BrowserDetect2;if(((_window$BrowserDetect=window.BrowserDetect)==null?void 0:_window$BrowserDetect.OS)==="iPhone/iPod"&&((_window$BrowserDetect2=window.BrowserDetect)==null?void 0:_window$BrowserDetect2.browser)==="Safari"){let anchor=document.elementFromPoint(0,0),offset=anchor.getBoundingClientRect().top;velocity($(anchor.tagName==="HTML"?document.body:anchor),"scroll",{duration:301,offset:anchor.tagName==="HTML"?0:-offset})}}})})}cb()})},not_api:!0,condition(page2){var _page$is_mobile,_page$is_mobile2,_page$get_static_prop;return page2!=null&&(_page$is_mobile=page2.is_mobile)!=null&&_page$is_mobile.call(page2)?((_page$is_mobile2=page2.is_mobile)==null?void 0:_page$is_mobile2.call(page2))&&((_page$get_static_prop=page2.get_static_property)==null?void 0:_page$get_static_prop.call(page2,"view_type"))==="scrollable":!0},check_for_errors(action,report){var _element$root,_element$root2;let element=appquery_default.element(action==null?void 0:action.element_id()),isMobile=element==null||(_element$root=element.root())==null?void 0:_element$root.is_mobile(),isScrollable=(element==null||(_element$root2=element.root())==null?void 0:_element$root2.get_static_property("view_type"))==="scrollable";if(isMobile&&!isScrollable)return report("Scroll to: cannot use this action on a view that is not scrollable"),!1},data_to_refresh:null},ScrollToElement_default=exported21;init_define_process_env();init_shim();init_u2();init_logger();init_generic_actions_utilities();var exported22={field_names:{element_id:{},animation:{default:"callout.bounce"},customize_duration:{},duration:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{err&&log(err),instance4&&properties.animation&&instance4.with_canvas(canvas=>{let duration;if(properties.customize_duration){var _properties$duration;duration=(_properties$duration=properties.duration)!=null?_properties$duration:get_velocity_animation_duration(properties.animation)}else duration=get_velocity_animation_duration(properties.animation);let options={duration};properties.animation.indexOf("transition.")===0?properties.animation.indexOf("Out")!==-1?instance4.workflow_hide(properties,options,!0):properties.animation.indexOf("In")!==-1&&instance4.workflow_show(properties,options,!0):instance4.setTimeout(()=>{var _document2;((_document2=document)==null?void 0:_document2.hidden)===!1&&velocity(canvas,properties.animation,options)},20)}),cb()})},not_api:!0,data_to_refresh:null},AnimateElement_default=exported22;init_define_process_env();init_shim();init_u2();init_logger();init_define_process_env();init_shim();init_state_keys();init_hydrate();init_eval();init_core_ds_element_utilities();init_appquery();var field_names_for_show_hide_action={element_id:{}};function _get_data_to_refresh_for_group_actions(action,properties,element_instance,new_value){var _appquery$element,_core_ds_element_util;if(!((_appquery$element=appquery_default.element(properties.element_id))!=null&&_appquery$element.exists()))return{};let instance4=element_instance.find_instance_by_id(properties.element_id);if(!instance4)return{};let instance_id=dehydrate_tree(instance4),res={};return res[state_keys_default.Message({prev:instance4,message:"get_group_data",prior_btype_id:instance4.element.get_btype_id()})]=new_value,res[ESTATE_PREFIX+instance_id]={group_data:new_value},(instance4==null?void 0:instance4.element.id())===((_core_ds_element_util=get_element_parent(action))==null?void 0:_core_ds_element_util.id())&&(res[state_keys_default.ElementParent()]=new_value),res}var field_names_show_previous_next={element_id:{},wrap_around:{default:!1}};function is_fixed_rg(element){var _element$root;return((_element$root=element.root())==null?void 0:_element$root.get_responsive_version())>0?element.get_static_property("fixed_rows")&&element.get_static_property("fixed_columns"):element.get_static_property("layout_style")==="limit_items"}function _get_data_to_refresh_for_repeating_group_actions(action,properties,element_instance,new_value){let instance4=element_instance.find_instance_by_id(properties.element_id);if(instance4==null)return{};let instance_id=dehydrate_tree(instance4),d={};return d[state_keys_default.Message({prev:instance4,message:"get_list_data",prior_btype_id:instance4.element.get_btype_id()})]=new_value,d[ESTATE_PREFIX+instance_id]={list_data:new_value},d}function clear_rg_pagination_frozen_states(action,properties,element_instance){var _appquery$element2;if(!((_appquery$element2=appquery_default.element(properties.element_id))!=null&&_appquery$element2.exists()))return{};let instance4=element_instance.find_instance_by_id(properties.element_id);if(!instance4)return{};let res={},prior_btype_id=instance4.element.get_btype_id();return res[state_keys_default.Message({prev:instance4,message:"is_last_page",prior_btype_id})]=null,res[state_keys_default.Message({prev:instance4,message:"is_first_page",prior_btype_id})]=null,res[state_keys_default.Message({prev:instance4,message:"page_number",prior_btype_id})]=null,res}var exported23={field_names:{element_id:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),function(err,element){err&&log(err),element&&element.wait_for_visible(function(){u_exports2.wait_for_updates(function(){let canvas=element.get_canvas();canvas&&!isScrolledIntoView(canvas).status&&canvas.add(canvas.parents()).filter(function(){return $(this).css("position")==="fixed"}).length===0&&velocity(canvas,"scroll",{duration:300,offset:-100}),element.message("set_focus")})}),cb()})},not_api:!0,data_to_refresh:null,check_for_errors:void 0},SetFocusToElement_default=exported23;init_define_process_env();init_shim();init_generic_actions_utilities();init_lib();init_btypes();var exported24={field_names:{thing_type:{},initial_values:{}},run(action,properties,context,cb){let new_id=context.UUID_SEED.UUID(),new_thing=lib_default().db_instance().create(properties.thing_type,null,new_id);update_thing(new_thing,properties.initial_values).callback(err=>{cb(err,new_thing)})},data_to_refresh:null,return_btype(action){var _action$get_static_pr;return get5((_action$get_static_pr=action.get_static_property("thing_type"))!=null?_action$get_static_pr:"null")},server_method:"new_thing",preprocess_properties(properties){let thing_btype_id=properties.thing_type,prop_name="initial_values";return pre_process_properties({properties,prop_name,thing_btype_id}),properties=apply_default_fields(prop_name,thing_btype_id,properties),properties},fall_back_to_server:!0,is_mergeable:!0},NewThing_default=exported24;init_define_process_env();init_shim();init_u2();init_logger();init_shared();init_generic_actions_utilities();init_eval();init_eval_node_state();init_lib();var exported25={field_names:{to_change:{},create_if_missing:{},...change_field_names(EVAL_TYPE.thunk)},run(action,properties,context,cb){let{to_change}=properties;if(to_change!=null)update_thing(to_change,properties.changes).callback(err=>{cb(err,to_change)});else if(properties.create_if_missing){var _this$_get_type;let type_to_create=(_this$_get_type=this._get_type(action))==null?void 0:_this$_get_type.id(),new_id=context.UUID_SEED.UUID();if(type_to_create){let new_thing=lib_default().db_instance().create(type_to_create,null,new_id);update_thing(new_thing,properties.changes).callback(err=>{cb(err,new_thing)})}else cb()}else cb()},use_injected_datasource(action,node){return(void 0)(action,node)},_get_type(action){return action.property("to_change").get_eval_value()},get_injected_btype(action,node){return this._get_type(action)},get_injected_display(action,node){var _this$_get_type2;return"This "+((_this$_get_type2=this._get_type(action))==null?void 0:_this$_get_type2.display())},server_method:"change_thing",data_to_refresh(action,properties,element_instance){var _this$_get_type3;return get_data_to_refresh_for_change_action({to_change:properties.to_change,to_change_btype_id:(_this$_get_type3=this._get_type(action))==null?void 0:_this$_get_type3.id(),changes:properties.changes})},return_btype(action){return this._get_type(action)},preprocess_properties(properties,action,context){var _this$_get_type4;context=extend({},context),context.duplicated_from_context=context.object_id,context.object_id=UUID(),context.duplicated_at="ChangeThing::preprocess_properties";let thing_btype_id=(_this$_get_type4=this._get_type(action))==null?void 0:_this$_get_type4.id(),{to_change}=properties;context.datasources.injected_value_btype=()=>thing_btype_id,context.datasources.injected_value=()=>to_change;let prop_name="changes",property_node=action.property(prop_name);properties.changes=with_eval_node(property_node,()=>properties.changes(context));let investigating=action_update_thing.active(),changes_pre_evaluation={};return investigating&&(changes_pre_evaluation.from_json=extend({},properties.changes)),properties=pre_process_properties({properties,prop_name,thing_btype_id}),investigating&&(changes_pre_evaluation.pre_processed=extend({},properties.changes)),to_change==null&&properties.create_if_missing&&thing_btype_id&&(properties=apply_default_fields(prop_name,thing_btype_id,properties),investigating&&(changes_pre_evaluation.with_defaults=extend({},properties.changes))),investigating&&debug("change_thing pre_evaluation",changes_pre_evaluation),properties},fall_back_to_server:!0,is_mergeable:!0},ChangeThing_default=exported25;init_define_process_env();init_shim();var import_web_dom_collections_iterator285=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_eval_node_state();init_generic_actions_utilities();init_eval();init_btype_ids();init_StaticList();init_btypes();var exported26={field_names:{type_to_change:{},to_change:{},...change_field_names(EVAL_TYPE.thunk)},use_injected_datasource(action,node){return(void 0)(action,node)},get_injected_btype(action,node){return action.get_static_property("type_to_change")},get_injected_display(action,node){return"This "+get5(action.get_static_property("type_to_change")).display()},preprocess_properties(properties,action,context){var _properties$to_change;if(optional_pause(),context=extend({},context),context.duplicated_from_context=context.object_id,context.object_id=UUID(),context.duplicated_at="ChangeListOfThings::preprocess_properties",!is_custom_type2(properties.type_to_change))return{changes:null};context.datasources.injected_value_btype=()=>properties.type_to_change;let to_change=(_properties$to_change=properties.to_change)!=null?_properties$to_change:new StaticList_default([],null,properties.type_to_change);delete properties.to_change;let get_changes=properties.changes;properties.changes=[];let property_node=action.property("changes");return with_eval_node(property_node,()=>{var _to_change$all_iterat;(_to_change$all_iterat=to_change.all_iteratively)==null||_to_change$all_iterat.call(to_change,batch3=>{let items=batch3.filter(item=>(item==null?void 0:item._id)!=null);items.forEach(item=>{var _item$precache;return(_item$precache=item.precache)==null?void 0:_item$precache.call(item)}),optional_pause();for(let item of items){context.datasources.injected_value=()=>item;let changes=get_changes(context),thing_btype_id=properties.type_to_change,prop_name="changes";properties.changes.push(pre_process_properties({properties:{item,changes},prop_name,thing_btype_id})),optional_pause()}}),optional_pause()}),properties},run(action,properties,context,cb){if(!properties.changes){cb(null,null);return}let change_promises=properties.changes.map(_ref=>{let{item,changes}=_ref;return update_thing(item,changes,properties.type_to_change)});u_exports2.promise_array(change_promises).callback(err=>{if(!is_custom_type2(properties.type_to_change)){cb(null,null);return}cb(err,new StaticList_default(properties.changes.map(_ref2=>{let{item}=_ref2;return item}),null,properties.type_to_change))})},data_to_refresh(action,properties,element_instance){let to_refresh={};if(!properties.changes)return to_refresh;for(let{item,changes}of Object.values(properties.changes)){let individual_data_to_refresh=get_data_to_refresh_for_change_action({to_change:item,to_change_btype_id:properties.type_to_change,changes});extend(to_refresh,individual_data_to_refresh)}return to_refresh},return_btype(action){let type=action.get_static_property("type_to_change");return type?list_type(type):"null"},server_method:"change_list_of_things",fall_back_to_server:!0},ChangeListOfThings_default=exported26;init_define_process_env();init_shim();var DeleteThing_default={field_names:{to_delete:{}},run(action,properties,context,cb){var _to_delete$delete;let{to_delete}=properties;to_delete==null||(_to_delete$delete=to_delete.delete)==null||_to_delete$delete.call(to_delete),cb()},data_to_refresh:null,return_btype(action){return null},server_method:"delete_thing",fall_back_to_server:!0,is_mergeable:!0};init_define_process_env();init_shim();var import_web_dom_collections_iterator286=__toESM(require_web_dom_collections_iterator()),DeleteListOfThings_default={field_names:{type_to_delete:{},to_delete:{}},preprocess_properties(properties){var _properties$to_delete,_properties$to_delete2,_properties$to_delete3;return properties.to_delete=(_properties$to_delete=(_properties$to_delete2=properties.to_delete)==null||(_properties$to_delete3=_properties$to_delete2.all)==null?void 0:_properties$to_delete3.call(_properties$to_delete2))!=null?_properties$to_delete:[],properties},run(action,properties,context,cb){var _properties$to_delete4;let to_delete=((_properties$to_delete4=properties.to_delete)!=null?_properties$to_delete4:[]).filter(thing=>(thing==null?void 0:thing._id)!=null);for(let thing of to_delete){var _thing$delete;(_thing$delete=thing.delete)==null||_thing$delete.call(thing)}cb()},data_to_refresh:null,return_btype(action){return null},server_method:"delete_list_of_things",fall_back_to_server:!0};init_define_process_env();init_shim();init_u2();init_logger();init_client_config2();init_generic_actions_utilities();init_btype_ids();init_lib();init_StaticList();init_btypes();var exported27={field_names:{type_to_copy:{},to_copy:{},information:{}},preprocess_properties(properties){var _properties$to_copy;if(typeof((_properties$to_copy=properties.to_copy)==null?void 0:_properties$to_copy.length)!="function"||properties.to_copy.length()>client_config_default2.max_new_list_length)properties.to_copy=[];else{var _properties$to_copy$a,_properties$to_copy2,_properties$to_copy2$;properties.to_copy=(_properties$to_copy$a=(_properties$to_copy2=properties.to_copy)==null||(_properties$to_copy2$=_properties$to_copy2.all)==null?void 0:_properties$to_copy2$.call(_properties$to_copy2))!=null?_properties$to_copy$a:[]}return properties},run(action,properties,context,cb){var _properties$to_copy3;if(!is_custom_type2(properties.type_to_copy)){cb(null,null);return}let to_copy=((_properties$to_copy3=properties.to_copy)!=null?_properties$to_copy3:[]).filter(thing=>(thing==null?void 0:thing._id)!=null);return u_exports2.run_once(30,()=>to_copy.map(thing=>thing.raw()),(err,result)=>{if(err){log(err);return}let new_list=result.map(old=>{let new_id=context.UUID_SEED.UUID(),raw=prepare_raw_thing_to_copy(old);return lib_default().db_instance().create(properties.type_to_copy,raw,new_id)});cb(void 0,new StaticList_default(new_list,null,properties.type_to_copy))})},data_to_refresh:null,return_btype(action){let type=action.get_static_property("type_to_copy");return type?list_type(type):"null"},server_method:"copy_list_of_things",fall_back_to_server:!0},CopyListOfThings_default=exported27;init_define_process_env();init_shim();init_u2();init_generic_actions_utilities();var exported28={field_names:extend({to_change:{},slug:{default:""}}),server_method:"set_slug",data_to_refresh(action,properties){var _action$property$get_;return get_data_to_refresh_for_change_action({to_change:properties.to_change,to_change_btype_id:(_action$property$get_=action.property("to_change").get_eval_value())==null?void 0:_action$property$get_.id(),changes:[{key:"Slug",value:null}]})},run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{(res==null?void 0:res.thing)!=null&&res.thing.child("Slug").set(res.slug),cb(err,res)})}},SetSlug_default=exported28;init_define_process_env();init_shim();var import_web_dom_collections_iterator287=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_lib();init_StaticList();init_btypes();function _get_printable_value(ret_btype,val,date_formatting){return val==null?"":ret_btype.has_export_to_string()?ret_btype.export_to_string(val,{option_show_if_deleted:!1,custom_use_primary_field:!1,booleans_yes_no:!1,always_return_text:!0,date_formatting}):(error("Tried to display a value in DownloadAsCSV but no export_to_string for this value",{ret_btype_id:ret_btype.id()}),"")}function _get_printable_object(objects_array,data_type,date_formatting,hidden_fields,use_captions){var _hidden_fields;(_hidden_fields=hidden_fields)!=null||(hidden_fields=[]);let res=[],value=get5(data_type),fields=[];value.custom_type()?(fields.push(...value.custom_type().fields().filter(field=>!field.deleted()).map(field=>field.name())),fields.push("Created Date","Modified Date","_id","Slug"),data_type==="user"?fields.push("email"):fields.push("Created By")):fields.push(...value.get_messages(!0).map(m=>m.name()));for(let entry of objects_array){let converted_entry={};for(let field of fields)if(!hidden_fields.includes(field)){let message=value.get_message(field),ret_btype=message.ret_btype(),val=message.evaluate(entry),formatted_val=_get_printable_value(ret_btype,val,date_formatting),header=use_captions?message.description(void 0,!0):message.name();if(converted_entry[header]=formatted_val,field==="Created By"&&formatted_val){var _value$get_message$ev;converted_entry["Created By - email"]=(_value$get_message$ev=value.get_message("Created By").evaluate(entry).get_email())!=null?_value$get_message$ev:""}}res.push(converted_entry)}return res}var exported29={not_api:!0,field_names:{data_type:{},data_source:{},file_name:{default:"data_export.csv"},date_formatting:{default:"spreadsheet_compatible"},custom_format:{default:"ddd, m/dd/yy, mmmm (mmm) dS, yyyy, h:MM tt, HH:MM:ss.L"},separator:{default:"comma"},show_labels:{default:!0},use_quotes:{default:!0},use_caption_labels:{default:!1},hide_some_fields:{optional:!0}},run(action,properties,context,cb){var _properties$data_sour;if(!lib_default().app_plan().import_export_csv){cb(new OwnerError("Exporting CSV data is not possible under this plan."));return}properties.data_type||cb(null,"Must set a type of thing");let separator;if(properties.separator==="tab")separator="	";else{var _core_actions_consts$;separator=(_core_actions_consts$=core_actions_consts_default.csv_separators[properties.separator])!=null?_core_actions_consts$:","}let date_formatting=properties.date_formatting==="custom"?properties.custom_format:properties.date_formatting,current_list=(_properties$data_sour=properties.data_source)!=null?_properties$data_sour:new StaticList_default([],null,properties.data_type);u_exports2.run_once(120,()=>{current_list.all();let current_list_length=current_list.length(),chunks=100,promises=[];for(let i=0;i<current_list_length;i+=chunks)promises.push(u_exports2.run_once(10*60*1e3,()=>{var _current_list$get_chi,_properties$hide_some;let current_chunk=(_current_list$get_chi=current_list.get_children(i,chunks))!=null?_current_list$get_chi:[];return _get_printable_object(current_chunk,properties.data_type,date_formatting,json_parse((_properties$hide_some=properties.hide_some_fields)!=null?_properties$hide_some:"[]"),properties.use_caption_labels)}));return promises}).then(promises=>u_exports2.promise_array(promises).callback((err,data_to_convert)=>{let{file_name}=properties;file_name.indexOf(".csv")!==file_name.length-4&&(file_name=file_name+".csv");let converted_string;if(err)log(err),converted_string="Error exporting data... please try again in a bit";else{let data=[];for(let set2 of data_to_convert)data=data.concat(set2);converted_string=json_to_csv(data,separator,properties.show_labels,properties.use_quotes)}csv_to_downloadable_file(file_name,converted_string),cb(null,converted_string)}))},data_to_refresh:null},DownloadDataAsCSV_default=exported29;init_define_process_env();init_shim();init_btype_ids();var exported30={field_names:{data_type:{},file:{},separator:{default:"comma"}},run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>cb(err,res))},data_to_refresh:null,return_btype(action){let type=action.get_static_property("data_type");return type?list_type(type):"null"},server_method:"upload_csv_data"},UploadCSVData_default=exported30;init_define_process_env();init_shim();var APIReturnData_default={api_only:!0,field_names:{return_plain_text:{},custom_content_type:{},text:{},custom_text:{},parameters_actions:{}},run(action,properties,context,cb){},server_method:"api_return_data",check_for_errors(action,report){return action.event().actions("APIReturnData").filter(action2=>{var _action$property,_action$property$call,_action$property$call2;return((_action$property=action2.property)==null||(_action$property$call=_action$property.call(action2,"condition"))==null||(_action$property$call2=_action$property$call.json)==null?void 0:_action$property$call2.raw())==null}).length>1&&report("You should use only one 'Return data from API' action per API workflow"),!1}};init_define_process_env();init_shim();var DeleteUploadedFile_default={field_names:{url_to_delete:{}},data_to_refresh:null,server_method:"delete_upload_file",run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>cb(err,res))}};init_define_process_env();init_shim();init_appquery();init_btypes();var TriggerCustomEvent_default={field_names:{custom_event:{},workflow_thing:{legacy:!0},arguments:{}},check_for_errors(action,report,compute_cross_page){return!1},return_btype(action){var _event$returnValueBty;let event=appquery_default.event(action.get_static_property("custom_event"));return(_event$returnValueBty=event==null?void 0:event.returnValueBtype())!=null?_event$returnValueBty:get5("null")}};init_define_process_env();init_shim();init_appquery();init_btypes();var TriggerCustomEventFromReusable_default={field_names:{element_id:{},custom_event:{},workflow_thing:{legacy:!0},arguments:{}},not_api:!0,check_for_errors(action,report,compute_cross_page){return compute_cross_page?!1:(report(void 0,void 0,action.id()),!0)},return_btype(action){var _event$returnValueBty;let event=appquery_default.event(action.get_static_property("custom_event"));return(_event$returnValueBty=event==null?void 0:event.returnValueBtype())!=null?_event$returnValueBty:get5("null")}};init_define_process_env();init_shim();init_u2();init_page_state();init_lodash();init_core();init_lib();init_appquery();init_btypes();var exported31={field_names:{custom_event:{},workflow_thing:{},field:{}},check_for_errors(action,report){let custom_event_id=action.get_static_property("custom_event");if(custom_event_id){var _appquery$event;((_appquery$event=appquery_default.event(custom_event_id))==null?void 0:_appquery$event.get_custom_parameters().length)!==1&&report(this.display(action)+" - can only be used with custom events that take exactly one argument")}return!1},run(action,properties,context,cb){let{workflow_thing,field}=properties,custom_event=appquery_default.event(properties.custom_event);if(workflow_thing==null||field==null||!(custom_event!=null&&custom_event.exists())){console.log("Skipping trigger custom event on change, missing data"),cb();return}let{element}=context,workflow_engine=lib_default().workflow;u_exports2.run_once(30,()=>field==="email_confirmed"?get5("user").get_message("email_confirmed").evaluate(workflow_thing):workflow_thing.child(field).raw(),(err,initial)=>{if(err){cb(err);return}cb(),workflow_thing.poll(5e3,600);let _changed=!1,watcher=u_exports2.Watcher({fn(){return workflow_thing.child(field).raw()},compare:isEqual_default});watcher.on_value(val=>{if(!_changed&&!compare(initial,val)){var _custom_event$get_cus,_custom_event$get_cus2;_changed=!0,watcher.destroy();let param_id=(_custom_event$get_cus=(_custom_event$get_cus2=custom_event.get_custom_parameters()[0])==null?void 0:_custom_event$get_cus2.param_id)!=null?_custom_event$get_cus:LEGACY_PARAM_ID,call_params={};call_params[param_id]=workflow_thing;let inner_context=build_duplicate_per_item_context({element},call_params);inner_context.datasources=get_basic_datasources(inner_context.element.element.root(),inner_context.datasources),console.log(Object.keys(inner_context.datasources.get_wf_param({param_id:"__ALL__"}))),workflow_engine.run_workflows(inner_context,[custom_event],!0)}})})},not_api:!0},TriggerCustomOnChange_default=exported31;init_define_process_env();init_shim();init_page_state();init_u2();init_logger();init_workflow();init_lib();init_appquery();var _schedule_count=0,exported32={field_names:{custom_event:{},workflow_thing:{legacy:!0},arguments:{},delay:{}},run(action,properties,context,cb){var _properties$delay;let call_args=wf_params_from_properties(properties),custom_event=appquery_default.event(properties.custom_event);if(!(custom_event!=null&&custom_event.exists())){console.log("Skipping trigger custom event on change, event does not exist"),cb();return}let{element}=context,workflow_engine=lib_default().workflow,rate_limit_factor=0;custom_event.actions().some(action2=>action2.requires_server())&&(_schedule_count++,setTimeout(()=>_schedule_count--,30*1e3),_schedule_count>10&&(rate_limit_factor=(_schedule_count-10)*30*1e3));let timeout=((_properties$delay=properties.delay)!=null?_properties$delay:1)*1e3+rate_limit_factor;timeout>2147483647&&(timeout=2147483647,owner_warn(new OwnerError("max_timeout",{action,display:"Timeout is above the maximum of 2,147,483 seconds; shortening to 2,147,483"}))),setTimeout(()=>{let inner_context=build_duplicate_per_item_context({element},call_args);inner_context.datasources=get_basic_datasources(inner_context.element.element.root(),inner_context.datasources),workflow_engine.run_workflows(inner_context,[custom_event],!0).callback(err=>core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.GENERAL_WORKFLOW,cb(){}}))},timeout),cb()},not_api:!0},ScheduleCustom_default=exported32;init_define_process_env();init_shim();init_lang();init_btypes();var ScheduleAPIEvent={field_names:DETECT_FIELD_NAMES,server_method:"schedule_api_event",check_for_errors(action,report,compute_cross_page){return _api_event_schedule_check_for_error(action,report,compute_cross_page)},return_btype(){return get5("text")},run(action,properties,context,cb){context.get_server_outcome(action,cb)},fall_back_to_server:!0},ScheduleAPIEvent_default=ScheduleAPIEvent;init_define_process_env();init_shim();init_lang();init_generic_actions_utilities();init_btype_ids();init_btypes();var ScheduleAPIEventOnList={field_names:DETECT_FIELD_NAMES,server_method:"schedule_api_event_on_list",use_injected_datasource(action,node){return[node.safe_search_upwards(search_node=>search_node.node_name().startsWith(APIEvent_param_prefix)),!0]},get_injected_btype(action,node){return action.get_static_property("type_of_list")},get_injected_display(action,node){return"This "+get5(action.get_static_property("type_of_list")).display()},check_for_errors(action,report,compute_cross_page){return _api_event_schedule_check_for_error(action,report,compute_cross_page)},return_btype(){return get5(list_type("text"))},run(action,properties,context,cb){context.get_server_outcome(action,cb)},fall_back_to_server:!0},ScheduleAPIEventOnList_default=ScheduleAPIEventOnList;init_define_process_env();init_shim();init_StaticObject();init_logger();function getValues(return_values,return_btype){return return_values==null?null:new StaticObject(Object.fromEntries(Object.values(return_values).map(value=>[value.return_id,value.return_value])),null,return_btype)}var TerminateWorkflow_default={field_names:{return_values:{}},handle_condition_internally:!0,run(action,properties,context,cb){if(properties.condition){var _action$event;context.return_values=getValues(properties.return_values,(_action$event=action.event())==null?void 0:_action$event.returnValueBtype().id()),cb("aborted")}else context.is_running_on_server?context.get_server_outcome(action,(err,res)=>{if(err)cb(err);else if(res==="aborted"){var _action$event2;context.return_values=getValues(properties.return_values,(_action$event2=action.event())==null?void 0:_action$event2.returnValueBtype().id()),cb("aborted")}else cb()}):cb()},check_for_errors(action,report){var _action$property,_action$property$call,_action$property$call2;if(!(((_action$property=action.property)==null||(_action$property$call=_action$property.call(action,"condition"))==null||(_action$property$call2=_action$property$call.json)==null?void 0:_action$property$call2.raw())!=null)&&action.next()!=null){var _action$event$returnF,_action$event3;if(((_action$event$returnF=(_action$event3=action.event())==null?void 0:_action$event3.returnFields().length)!=null?_action$event$returnF:0)===0){var _action$event4;return info("TerminateWorkflow action not at end",{action_id:action.id(),event_id:(_action$event4=action.event())==null?void 0:_action$event4.id(),index:action.path().split(".").pop()}),!1}report("Unconditional 'Return Data' actions must be at the end of the workflow")}return!1}};init_define_process_env();init_shim();init_logger();function _is_id_formatted_like_list(id){return id==null||id.split==null?!1:id.split(",").every(id_member=>{let converted_id=Number(id_member);return!Number.isNaN(converted_id)&&parseInt(converted_id)===converted_id})}var exported33={field_names:{scheduled_id:{}},server_method:"cancel_scheduled_api_event",run(action,properties,context,cb){context.get_server_outcome(action,(err,res)=>{if(err){let reason=`The id ${properties.scheduled_id} is not correctly formatted. `;_is_id_formatted_like_list(properties.scheduled_id)?reason+="It is formatted as a list of ids. Consider using the 'Cancel a list of scheduled API Workflows' action.":reason="It should be a single numerical ID in a text expression.",owner_error("Invalid API workflow id",{display:"Invalid API workflow id: "+reason})}cb(err,res)})}},CancelScheduledAPIEvent_default=exported33;init_define_process_env();init_shim();var CancelListScheduledAPIEvent_default={field_names:{scheduled_ids:{}},server_method:"cancel_list_scheduled_api_events"};init_define_process_env();init_shim();var SetRecurringEvent_default={field_names:{recurring_event:{},workflow_thing:{},frequency:{},start_date:{}},server_method:"set_recurring_event"};init_define_process_env();init_shim();init_status_bar();var exported34={field_names:{length:{default:1e3},hide_status_bar:{}},run(action,properties,context,cb){if((!properties.length||properties.length<=0)&&(properties.length=0),properties.hide_status_bar){let check_if_visible2=function(){bar_visible()?hide_run_mode():setTimeout(check_if_visible2,100)};var check_if_visible=check_if_visible2;check_if_visible2()}setTimeout(()=>{properties.hide_status_bar&&show_run_mode(),cb()},properties.length)},not_api:!0,data_to_refresh:null},PauseWFClient_default=exported34;init_define_process_env();init_shim();init_ElementInstance();init_lib();init_btypes();var RequestPushNotificationPermissions={field_names:{},run(action,properties,context,cb){context.element==null||!(context.element instanceof ElementInstance_default)||context.get_server_outcome(action,()=>{let page_instance=context.element.root_instance();page_instance.message("request_push_notification_permissions"),page_instance.on_message("push_notification_permissions_result",(device_type,token)=>{var _Lib$or_throw$current,_Lib$or_throw$current2;if(!device_type||!token){cb(null,!1);return}let data_to_send={user_id:(_Lib$or_throw$current=(_Lib$or_throw$current2=lib_default.or_throw().current_user())==null?void 0:_Lib$or_throw$current2._id())!=null?_Lib$or_throw$current:null,appname:lib_default.or_throw().appname(),app_version:lib_default.or_throw().app_version(),token,device_type};return cb("aborted"),lib_default.or_throw().workflow.resume_local(context,action,data_to_send),null})})},resume(action,context,cb){return context.get_server_outcome(action,cb)},server_method:"request_push_notification_permissions",server_method_resume:"request_push_notification_permissions_resume",not_api:!0,condition(page2){var _page$is_mobile;return pushNotificationsEnabled()&&((_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2))},return_btype(){return get5("boolean")},data_to_refresh:null},RequestPushNotificationPermissions_default=RequestPushNotificationPermissions;init_define_process_env();init_shim();var SendEmail_default={field_names:{to:{},different_reply_to:{},replyTo:{},sender_name:{},cc:{},bcc:{},subject:{},body:{},ignore_template:{},unsubscribe_group_id:{},list_of_attachments:{}},server_method:"send_email",data_to_refresh:null,run(action,properties,context,cb){context.get_server_outcome(action,cb)},check_use_visible:!0};init_define_process_env();init_shim();var SendICSFileEmail_default={field_names:{to:{},sender_name:{},start:{},end:{},specify_length:{},event_length:{},summary:{},event_description:{},location:{},change_body:{},SEQUENCE:{},UID:{},METHOD:{},ORGANIZER:{},STATUS:{},body:{default:"Open the attached ICS to put the appointment in your calendar."},ignore_template:{}},server_method:"send_ical_by_email",data_to_refresh:null,check_use_visible:!0};init_define_process_env();init_shim();var SendPushNotification={field_names:{title:{},subtitle:{},body:{},devices:{}},server_method:"send_push_notification",data_to_refresh:null,condition(){return pushNotificationsEnabled()},run(action,properties,context,cb){context.get_server_outcome(action,cb)}},SendPushNotification_default=SendPushNotification;init_define_process_env();init_shim();init_u2();init_logger();var exported35={field_names:extend({},field_names_for_show_hide_action),run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{if(err&&log(err),instance4.element.added_to_container()&&instance4.parent()&&!instance4.parent()._has_become_visible.is_turned()){cb();return}instance4==null||instance4.workflow_show(),cb()})},data_to_refresh:null},ShowElement_default=exported35;init_define_process_env();init_shim();init_u2();init_logger();var exported36={field_names:extend({animation:{no_states:!0,default:"none"},direction:{no_states:!0,default:"left"}},field_names_for_show_hide_action),run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{if(err&&log(err),instance4.element.added_to_container()&&instance4.parent()&&!instance4.parent()._has_become_visible.is_turned()){cb();return}instance4==null||instance4.workflow_hide(),cb()})},data_to_refresh:null},HideElement_default=exported36;init_define_process_env();init_shim();init_logger();init_u2();var exported37={field_names:extend({},field_names_for_show_hide_action),run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{if(err&&log(err),instance4){if(instance4.element.added_to_container()&&instance4.parent()&&!instance4.parent()._has_become_visible.is_turned()){cb();return}instance4.is_visible()?instance4.workflow_hide():instance4.workflow_show()}cb()})},data_to_refresh:null},ToggleElement_default=exported37;init_define_process_env();init_shim();var import_web_dom_collections_iterator288=__toESM(require_web_dom_collections_iterator());init_state_keys();init_u2();init_eval();init_decaf();init_appquery();var exported38={field_names:extend({value:{optional:!0},custom_state:{},custom_states_values:{optional:!0}},field_names_for_show_hide_action),run(action,properties,context,cb){u_exports2.run_once(30,()=>{var _properties$value,_properties$value$mak;let instance4=context.element.find_instance_by_id(properties.element_id),res={instance:instance4,custom_states:[],values:[]};if(instance4==null)return res;res.custom_states.push(properties.custom_state);let make_static=instance4.element.element_custom_state(properties.custom_state).make_static();if(make_static&&(_properties$value=properties.value)!=null&&(_properties$value$mak=_properties$value.make_static)!=null&&_properties$value$mak.call(_properties$value)?res.values.push(properties.value.make_static()):res.values.push(properties.value),properties.custom_states_values!=null)for(let node_idx in properties.custom_states_values){var _sub_node$value,_sub_node$value$make_,_sub_node$value2;let sub_node=properties.custom_states_values[node_idx];res.custom_states.push(sub_node.custom_state),make_static=instance4.element.element_custom_state(sub_node.custom_state).make_static(),make_static&&(_sub_node$value=sub_node.value)!=null&&(_sub_node$value$make_=(_sub_node$value2=_sub_node$value).make_static)!=null&&_sub_node$value$make_.call(_sub_node$value2)?res.values.push(sub_node.value.make_static()):res.values.push(sub_node.value)}return res},(err,res)=>{if(err){cb(err);return}let{instance:instance4,custom_states,values}=res;if(!instance4){cb();return}for(let index=0;index<values.length;index++){let val=values[index];instance4.state(custom_states[index],val!=null?val:null)}cb()})},data_to_refresh(action,properties,element_instance){var _appquery$element;if(!((_appquery$element=appquery_default.element(properties.element_id))!=null&&_appquery$element.exists()))return{};let instance4=element_instance.find_instance_by_id(properties.element_id);if(instance4==null)return{};let prior_btype_id=instance4.element.get_btype_id(),res={};if(properties.custom_state){var _properties$value2,_val;let custom_state=instance4.element.element_custom_state(properties.custom_state),val;custom_state.make_static()&&((_properties$value2=properties.value)==null?void 0:_properties$value2.all)!=null?val=properties.value.make_static():val=properties.value,res[state_keys_default.Message({prev:instance4,message:custom_state.name(),prior_btype_id})]=(_val=val)!=null?_val:NULL_VALUE_TO_REGISTER}if(properties.custom_states_values)for(let sub_node of object_values(properties.custom_states_values)){var _sub_node$value3,_val2;let custom_state=instance4.element.element_custom_state(sub_node.custom_state),val;custom_state.make_static()&&((_sub_node$value3=sub_node.value)==null?void 0:_sub_node$value3.all)!=null?val=sub_node.value.make_static():val=sub_node.value,res[state_keys_default.Message({prev:instance4,message:custom_state.name(),prior_btype_id})]=(_val2=val)!=null?_val2:NULL_VALUE_TO_REGISTER}return res}},SetCustomState_default=exported38;init_define_process_env();init_shim();init_u2();init_appquery();init_state_keys();var exported39={field_names:extend({state:{},dynamic:{optional:!0}},field_names_for_show_hide_action),condition(node){return node==null?void 0:node.is_mobile()},run(action,properties,context,cb){u_exports2.run_once(30,()=>{let instance4=context.element.find_instance_by_id(properties.element_id),state4=properties.state,value;return state4==="checked"?value=!0:state4==="unchecked"&&(value=!1),state4==="dynamic_state"&&(value=!!properties.dynamic),{instance:instance4,value}},(err,res)=>{if(err)cb(err);else{let{instance:instance4,value}=res;if(!instance4){cb();return}instance4.message("user_submit",value),cb()}})},data_to_refresh(action,properties,element_instance){var _appquery$element;if(!((_appquery$element=appquery_default.element(properties.element_id))!=null&&_appquery$element.exists()))return{};let instance4=element_instance.find_instance_by_id(properties.element_id);if(instance4==null)return{};let prior_btype_id=instance4.element.get_btype_id(),res={};if(properties.state){let state4=properties.state,value;state4==="checked"?value=!0:state4==="unchecked"&&(value=!1),state4==="dynamic_state"&&(value=!!properties.dynamic),res[state_keys_default.Message({prev:instance4,message:"get_data",prior_btype_id})]=value,res[state_keys_default.Message({prev:instance4,message:"get_not_data",prior_btype_id})]=!value}return res}},SetCheckboxState_default=exported39;init_define_process_env();init_shim();var import_web_dom_collections_iterator289=__toESM(require_web_dom_collections_iterator());init_u2();var exported40={not_api:!0,field_names:{},run(action,properties,context,cb){u_exports2.run_once(30,()=>{let current_workflow=action.event(),referenced_elements=unique(current_workflow.find_expressions("GetElement").element_id()),current_element_id=context.element.element_id();return current_workflow.find_expressions("ThisElement").length&&!referenced_elements.includes(current_element_id)&&referenced_elements.push(current_element_id),referenced_elements.map(id=>context.element.find_instance_by_id(id)).filter(e=>e&&e.get_messages().includes("reset_input"))},(err,referenced_inputs)=>{if(err)cb(err);else{for(let input2 of referenced_inputs)input2.message("reset_input");cb()}})},data_to_refresh:null},ResetInputs_default=exported40;init_define_process_env();init_shim();init_u2();var exported41={field_names:{element_id:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("cancel_upload"),cb())})},data_to_refresh:null,check_for_errors:void 0},CancelUpload_default=exported41;init_define_process_env();init_shim();init_u2();var exported42={field_names:{element_id:{},data_source:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("set_group_data",properties.data_source),cb())})},data_to_refresh(action,properties,element_instance){return _get_data_to_refresh_for_group_actions(action,properties,element_instance,properties.data_source)},check_for_errors:void 0},DisplayGroupData_default=exported42;init_define_process_env();init_shim();init_u2();var exported43={field_names:{element_id:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("reset_group"),cb())})},data_to_refresh(action,properties,element_instance){return _get_data_to_refresh_for_group_actions(action,properties,element_instance,null)},check_for_errors:void 0},ResetGroup_default=exported43;init_define_process_env();init_shim();init_u2();var exported44={field_names:{element_id:{},data_source:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("set_list_data",properties.data_source),cb(null,null))})},data_to_refresh(action,properties,element_instance){return _get_data_to_refresh_for_repeating_group_actions(action,properties,element_instance,properties.data_source)},check_for_errors:void 0},DisplayListData_default=exported44;init_define_process_env();init_shim();init_u2();var exported45={field_names:{element_id:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("clear_list"),cb())})},data_to_refresh(action,properties,element_instance){return _get_data_to_refresh_for_repeating_group_actions(action,properties,element_instance)},check_for_errors:void 0},ListClear_default=exported45;init_define_process_env();init_shim();init_u2();var exported46={field_names:extend({},field_names_show_previous_next),run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("show_next",properties.wrap_around),cb())})},data_to_refresh:clear_rg_pagination_frozen_states,check_for_errors(action,report){return(void 0)(action,report),(void 0)(action,report,this.display)}},ListShowNext_default=exported46;init_define_process_env();init_shim();init_u2();var exported47={field_names:extend({},field_names_show_previous_next),run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("show_previous",properties.wrap_around),cb())})},data_to_refresh:clear_rg_pagination_frozen_states,check_for_errors(action,report){return(void 0)(action,report),(void 0)(action,report,this.display)}},ListShowPrevious_default=exported47;init_define_process_env();init_shim();init_u2();var exported48={field_names:{element_id:{},page:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("go_to_page",properties.page),cb())})},data_to_refresh:clear_rg_pagination_frozen_states,check_for_errors(action,report){return(void 0)(action,report),(void 0)(action,report,this.display)}},ListGoToPage_default=exported48;init_define_process_env();init_shim();init_u2();init_appquery();var exported49={field_names:{element_id:{},entry:{},animate:{},offset:{default:0}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,instance4)=>{err?cb(err):(instance4&&properties.entry!=null&&instance4.setTimeout(()=>instance4.message("scroll_to",properties),100),cb())})},data_to_refresh:null,check_for_errors(action,report){(void 0)(action,report);let element=appquery_default.element(action==null?void 0:action.element_id());return element&&is_fixed_rg(element)&&report(this.display(action)+": "+element.get_name()+" has a 'Fixed number of cells' layout and can't be scrolled to."),!1}},ScrollToListEntry_default=exported49;init_define_process_env();init_shim();var import_web_dom_collections_iterator290=__toESM(require_web_dom_collections_iterator());init_u2();init_element_eval();var AlertShowMessage={field_names:{element_id:{},fade_in:{default:500},hold:{default:2e3},fade_out:{default:500},change_message:{},message:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>{let alert_instance=context.element.find_instance_by_id(properties.element_id),element_text;return properties.change_message?element_text=void 0:element_text=evaluate_property(alert_instance,"text"),[element_text,alert_instance]},(err,res)=>{if(err)cb(err);else{let[element_text,alert_instance]=res;element_text&&(properties.message=element_text),alert_instance==null||alert_instance.message("show_alert",properties),cb()}})},data_to_refresh:null,check_for_errors:void 0},AlertShowMessage_default=AlertShowMessage;init_define_process_env();init_shim();init_u2();var exported50={field_names:{element_id:{},data_source:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("set_marker_data",properties.data_source),cb())})},data_to_refresh:null,check_for_errors:void 0},DisplayMapMarkerData_default=exported50;init_define_process_env();init_shim();init_u2();var exported51={field_names:{element_id:{},to_select:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("set_marker_selection",properties.to_select),cb())})},data_to_refresh:null,check_for_errors:void 0},SetCurrentMapMarker_default=exported51;init_define_process_env();init_shim();init_u2();var exported52={field_names:{element_id:{}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err?cb(err):(element==null||element.message("clear_marker_data"),cb())})},data_to_refresh:null,check_for_errors:void 0},ClearMapMarkers_default=exported52;init_define_process_env();init_shim();init_u2();init_logger();var exported53={field_names:{element_id:{},manual_setting:{},center:{},initial_zoom:{default:10}},run(action,properties,context,cb){u_exports2.run_once(30,()=>context.element.find_instance_by_id(properties.element_id),(err,element)=>{err&&log(err),element==null||element.message("map_adjust_zoom",properties),cb()})},data_to_refresh:null,check_for_errors:void 0},MapAdjustZoom_default=exported53;init_define_process_env();init_shim();var import_web_dom_collections_iterator291=__toESM(require_web_dom_collections_iterator());init_custom_elements();init_ElementInstance();init_logger();init_u2();var SetViewProperty={field_names:{property:{},value:{optional:!0},custom_property_values:{optional:!0}},run(action,properties,context,cb){if(context.element==null||!(context.element instanceof ElementInstance_default)){owner_error("Missing element"),cb(new OwnerError("Missing element"));return}let mobileView=context.element.root_instance(),paramsToUpdate={};if(paramsToUpdate[`${CUSTOM_PROP_IDENTIFIER}${properties.property}`]=properties.value,properties.custom_property_values!=null)for(let obj of Object.values(properties.custom_property_values))paramsToUpdate[`${CUSTOM_PROP_IDENTIFIER}${obj.property}`]=obj.value;mobileView.message("set_view_props",{data:paramsToUpdate,cb})},not_api:!0,condition(page2){var _page$is_mobile;return(_page$is_mobile=page2.is_mobile)==null?void 0:_page$is_mobile.call(page2)},data_to_refresh:null},SetViewProperty_default=SetViewProperty;init_flagCheck();var core_actions={SignUp:SignUp_default,OAuthLogin:OAuthLogin_default,WebBrowserLogin:WebBrowserLogin_default,LogIn:LogIn_default,LogOut:LogOut_default,CookieOptIn:CookieOptIn_default,CookieOptOut:CookieOptOut_default,UpdateCredentials:UpdateCredentials_default,ChangeEmailForAnotherUser:ChangeEmailForAnotherUser_default,MakeChangeCurrentUser:MakeChangeCurrentUser_default,SendPasswordResetEmail:SendPasswordResetEmail_default,SendMagicLink:SendMagicLink_default,SendConfirmationEmail:SendConfirmationEmail_default,ResetPassword:ResetPassword_default,CreateUserAccount:CreateUserAccount_default,CheckUserPassword:CheckUserPassword_default,SetTemporaryPassword:SetTemporaryPassword_default,LogOutOtherSessions:LogOutOtherSessions_default,Generate2FAQRCode:Generate2FAQRCode_default,Validate2FAToken:Validate2FAToken_default,Check2FAToken:Check2FAToken_default,Disable2FA:Disable2FA_default,GenerateOneTimeCodes:GenerateOneTimeCodes_default,LaunchImageLibrary:LaunchImageLibrary_default,LaunchCamera:LaunchCamera_default,ChangePage:ChangePage_default,RefreshPage:RefreshPage_default,GoPrevious:GoPrevious_default,OpenURL:OpenURL_default,MobileNavigate:MobileNavigate_default,MobileNavigateToTab:MobileNavigateToTab_default,RunInnerApp:RunInnerApp_default,ScrollToElement:ScrollToElement_default,AnimateElement:AnimateElement_default,SetFocusToElement:SetFocusToElement_default,NewThing:NewThing_default,ChangeThing:ChangeThing_default,ChangeListOfThings:ChangeListOfThings_default,DeleteThing:DeleteThing_default,DeleteListOfThings:DeleteListOfThings_default,CopyListOfThings:CopyListOfThings_default,SetSlug:SetSlug_default,DownloadDataAsCSV:DownloadDataAsCSV_default,UploadCSVData:UploadCSVData_default,APIReturnData:APIReturnData_default,DeleteUploadedFile:DeleteUploadedFile_default,TriggerCustomEvent:TriggerCustomEvent_default,TriggerCustomEventFromReusable:TriggerCustomEventFromReusable_default,TriggerCustomOnChange:TriggerCustomOnChange_default,ScheduleCustom:ScheduleCustom_default,ScheduleAPIEvent:ScheduleAPIEvent_default,ScheduleAPIEventOnList:ScheduleAPIEventOnList_default,TerminateWorkflow:TerminateWorkflow_default,CancelScheduledAPIEvent:CancelScheduledAPIEvent_default,CancelListScheduledAPIEvent:CancelListScheduledAPIEvent_default,SetRecurringEvent:SetRecurringEvent_default,PauseWFClient:PauseWFClient_default,RequestPushNotificationPermissions:RequestPushNotificationPermissions_default,SendEmail:SendEmail_default,SendICSFileEmail:SendICSFileEmail_default,SendPushNotification:SendPushNotification_default,ShowElement:ShowElement_default,HideElement:HideElement_default,ToggleElement:ToggleElement_default,SetCustomState:SetCustomState_default,ResetInputs:ResetInputs_default,SetCheckboxState:SetCheckboxState_default,CancelUpload:CancelUpload_default,DisplayGroupData:DisplayGroupData_default,ResetGroup:ResetGroup_default,DisplayListData:DisplayListData_default,ListClear:ListClear_default,ListShowNext:ListShowNext_default,ListShowPrevious:ListShowPrevious_default,ListGoToPage:ListGoToPage_default,ScrollToListEntry:ScrollToListEntry_default,AlertShowMessage:AlertShowMessage_default,DisplayMapMarkerData:DisplayMapMarkerData_default,SetCurrentMapMarker:SetCurrentMapMarker_default,ClearMapMarkers:ClearMapMarkers_default,MapAdjustZoom:MapAdjustZoom_default,SetViewProperty:SetViewProperty_default,get_action_object,get_element_id_field,get_root_actions:void 0,get_all_actions:void 0,get_full_list_actions:void 0,init_plugin_actions:void 0};function get_action_object(type){if(core_actions[type])return core_actions[type];{var _plugin_getter$get_pl;let[plugin_name]=get_plugin_and_type(type);return(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_action(type)}}function get_element_id_field(action,include_self,set_filter_fn){var _element_types;let element_types=core_actions_consts_default.action_element_mapping[action.type()];((_element_types=element_types)==null?void 0:_element_types[0])==="All elements"&&(element_types=void 0);let set2=lib_default().sets.get_set("PageElementsByType")(action,element_types,include_self),filtered_set=set_filter_fn?lib_default().sets.get_set("Filtered")(set2,option=>set_filter_fn(option)):void 0;return[{name:"element_id",caption:"Element",editor:"Dropdown",set:filtered_set!=null?filtered_set:set2}]}var core_actions_default=core_actions;init_generic_actions_utilities();var numeric_format_utilities_exports={};__export(numeric_format_utilities_exports,{decimal_separators:()=>decimal_separators,format_number_fields:()=>format_number_fields,format_number_names:()=>format_number_names,thousand_separators:()=>thousand_separators});init_define_process_env();init_shim();init_define_process_env();init_shim();var import_web_dom_collections_iterator293=__toESM(require_web_dom_collections_iterator()),legacy_currency_symbols={dollar:"$",euro:"\u20AC",pound:"\xA3",yen:"\xA5",rand:"R",naira:"\u20A6",won:"\u20A9",peso:"\u20B1",bgn:"\u041B\u0432"},suffix_currency_symbols=["\u0631.\u0633","\u062F.\u0625"],currency_symbols=[...Object.values(legacy_currency_symbols),...suffix_currency_symbols,"kr","\u20B9"];init_lib();var thousand_separators={comma:",",space:"Space",dot:"."},decimal_separators={point:".",comma:","},format_number_names={formatting_type:{default:"number",no_states:!0},decimal_place:{},decimal_separator:{default:"point"},thousand_separator:{},currency_symbol:{},negative_parenthese:{}},format_number_fields;init_define_process_env();init_shim();init_define_process_env();init_shim();var import_web_dom_collections_iterator294=__toESM(require_web_dom_collections_iterator());init_lib();init_btype_ids();init_logger();var exported54={field_names:{parameter_name:{},type:{default:"parameter"},value:{default:"text"}},is_client_state(){return!0},get_btype(static_property){let btype=static_property("value");return static_property("type")==="path_segment"?list_type(btype):btype},get_runmode_btype(_raw3){var _raw$P$V,_raw$P,_raw$P2;let btype=(_raw$P$V=(_raw$P=_raw3["%p"])==null?void 0:_raw$P["%v"])!=null?_raw$P$V:"text";return((_raw$P2=_raw3["%p"])==null?void 0:_raw$P2["%x"])==="path_segment"?list_type(btype):btype},evaluate(properties,context,ret_btype){if(context!=null&&context.__investigate_post_changed_page_url_reads){var _context$element,_context$element$id;warn("url data read after a change page",{properties,element:(_context$element=context.element)==null||(_context$element$id=_context$element.id)==null?void 0:_context$element$id.call(_context$element)}),delete context.__investigate_post_changed_page_url_reads}lib_default().pageparam._dependency.register();let r2;properties.type==="path"?r2=lib_default().location.get_pieces().path[1]:properties.type==="path_segment"?r2=lib_default().location.get_pieces().path:r2=lib_default().location.get_query()[properties.parameter_name];function recursive_convert(btype,x){if(btype.custom_type()!=null)return typeof x!="string"||!x?btype.get_bubble_null():lib_default().db_instance().get(x);if(btype.option_set()!=null)return btype.from_human(x);if(btype.is_list()){let res=Array.isArray(x)?x.map(e=>recursive_convert(btype.inner(),e)):[];return lib_default().db_instance().static_list(btype.inner().id(),res)}else return btype.cast(x)}return recursive_convert(ret_btype,r2)},get_unique_string(properties,element_instance){}},get_param_from_url_default=exported54;init_define_process_env();init_shim();init_state_keys();var exported55={field_names:{},light_evaluation:!0,allowed_when_restricted:!1,allowed_on_element:!0,allowed_on_client_wf:!0,allowed_on_server_wf:!0,allowed_on_privacy_role:!0,allowed_in_style_conditionals:()=>!0,fields(static_property){return[]},get_btype(static_property){return"user"},get_unique_string(properties,element_instance){return state_keys_default.CurrentUser()},display(){return"Current User"},context_key:"current_user",evaluate(properties,context,btype){var _context$datasources$,_context$datasources;return btype.cast((_context$datasources$=(_context$datasources=context.datasources).current_user)==null?void 0:_context$datasources$.call(_context$datasources,properties,context))},get_runmode_btype(){return"user"}},current_user_default=exported55;init_define_process_env();init_shim();var import_es_string_replace53=__toESM(require_es_string_replace());init_b_string();init_page_state();init_state_keys();init_appquery();var exported56={field_names:{name:{}},is_client_state(){return!0},get_btype(static_property){var _page_state$get_page_;return(_page_state$get_page_=get_page_data_type(static_property("name")))!=null?_page_state$get_page_:"null"},context_key:"page_data",evaluate(properties,context,btype){var _context$datasources$,_context$datasources;return btype.cast((_context$datasources$=(_context$datasources=context.datasources).page_data)==null?void 0:_context$datasources$.call(_context$datasources,properties,context))},get_runmode_btype(_raw3,context,properties){var _context$datasources$2,_context$datasources$3,_context$datasources2;return(_context$datasources$2=(_context$datasources$3=(_context$datasources2=context.datasources).page_data_btype)==null?void 0:_context$datasources$3.call(_context$datasources2,properties,context))!=null?_context$datasources$2:"null"},get_unique_string(properties,element_instance){return state_keys_default.PageData(properties.name)}},page_data_default=exported56;init_define_process_env();init_shim();init_btypes();init_state_keys();init_lib();var exported57={field_names:{},is_client_state(){return!0},light_evaluation:!1,allowed_when_restricted:!1,allowed_on_element:!0,allowed_on_client_wf:!0,allowed_on_server_wf:!1,allowed_in_style_conditionals:()=>!0,additional_context_filter(raw_data_source,context){var _raw_data_source$prop;if(((_raw_data_source$prop=raw_data_source.properties)==null?void 0:_raw_data_source$prop.element_id)==null)return context.owner_type==="State";var _context$owner_node$c;return context.owner_type==="Workflow"&&((_context$owner_node$c=context.owner_node.context_element())==null?void 0:_context$owner_node$c.id())===raw_data_source.properties.element_id},get_unique_string(){return state_keys_default.ThisElement()},get_btype(static_property,datasource){var _datasource$context_e5,_datasource$context_e6,_datasource$context_e7;return get5((_datasource$context_e5=(_datasource$context_e6=(_datasource$context_e7=datasource.context_element()).get_btype_id)==null?void 0:_datasource$context_e6.call(_datasource$context_e7))!=null?_datasource$context_e5:"null")},evaluate(properties,context,ret_btype){var _Lib$is_api,_Lib2;return(_Lib$is_api=(_Lib2=lib_default()).is_api)!=null&&_Lib$is_api.call(_Lib2)?ret_btype.get_bubble_null():context.element},get_runmode_btype(_raw3,context){var _context$element$elem,_context$element$elem2,_context$element$elem3;return(_context$element$elem=(_context$element$elem2=(_context$element$elem3=context.element.element).get_btype_id)==null?void 0:_context$element$elem2.call(_context$element$elem3))!=null?_context$element$elem:"null"}},this_element_default=exported57;init_define_process_env();init_shim();init_btypes();init_state_keys();function get_current_page_item_btype(node){var _node$owner$root$get_,_node$owner$root,_node$owner,_node$owner$root$call;return get5((_node$owner$root$get_=(_node$owner$root=(_node$owner=node.owner).root)==null||(_node$owner$root$call=_node$owner$root.call(_node$owner))==null?void 0:_node$owner$root$call.get_static_property("page_item_type"))!=null?_node$owner$root$get_:"null")}var exported58={field_names:{},context_key:"current_page_item",is_client_state(){return!0},evaluate(properties,context,btype){var _context$datasources$,_context$datasources;return btype.cast((_context$datasources$=(_context$datasources=context.datasources).current_page_item)==null?void 0:_context$datasources$.call(_context$datasources,properties,context))},get_runmode_btype(_raw3,context,properties){var _context$datasources$2,_context$datasources$3,_context$datasources2;return(_context$datasources$2=(_context$datasources$3=(_context$datasources2=context.datasources).current_page_item_btype)==null?void 0:_context$datasources$3.call(_context$datasources2,properties,context))!=null?_context$datasources$2:"null"},get_btype(static_property,datasource){return get_current_page_item_btype(datasource)},get_unique_string(properties,element_instance){return state_keys_default.CurrentPageItem()}},current_page_item_default=exported58;init_define_process_env();init_shim();var import_web_dom_collections_iterator295=__toESM(require_web_dom_collections_iterator());init_btypes();init_core();init_appquery();init_logger();function get_event_param_btype(event,current_key){var _event$get_custom_par,_event$get_custom_par2;let parameters=(_event$get_custom_par=event==null||(_event$get_custom_par2=event.get_custom_parameters)==null?void 0:_event$get_custom_par2.call(event))!=null?_event$get_custom_par:[];for(let{param_id,btype_id}of parameters)if(param_id===current_key)return btype_id;return"null"}function get_wf_item_btype_with_backup(event,current_key){if(["OnError","OnPageError"].includes(event==null?void 0:event.type()))return"sys.error";let btype_id=get_event_param_btype(event,current_key);if(btype_id==="null"){var _event$get_static_pro;btype_id=(_event$get_static_pro=event==null?void 0:event.get_static_property("custom_event_data_type"))!=null?_event$get_static_pro:"null"}return btype_id}var exported59={field_names:{param_id:{default:LEGACY_PARAM_ID}},get_btype(static_property,datasource){var _datasource$owner$eve,_datasource$owner;let event=(_datasource$owner$eve=(_datasource$owner=datasource.owner).event)==null?void 0:_datasource$owner$eve.call(_datasource$owner),param_id=static_property("param_id");return get5(get_wf_item_btype_with_backup(event,param_id))},evaluate(properties,context,ret_btype){var _context$datasources$,_context$datasources;return ret_btype.cast((_context$datasources$=(_context$datasources=context.datasources).get_wf_param)==null?void 0:_context$datasources$.call(_context$datasources,properties))},get_runmode_btype(_raw3,context,properties){var _context$event;if(!context.event_id&&!context.event)return"null";context.event||verbose("Missing event!!",{event_id:context.event_id});let event=(_context$event=context.event)!=null?_context$event:appquery_default.workflow_item(context.event_id);return get_wf_item_btype_with_backup(event,properties.param_id)},get_unique_string(properties,element_instance){}},current_workflow_item_default=exported59;init_define_process_env();init_shim();init_btypes();var exported60={field_names:{},get_btype(static_property,datasource){var _datasource$owner$eve,_datasource$owner,_btype_id;let event=(_datasource$owner$eve=(_datasource$owner=datasource.owner).event)==null?void 0:_datasource$owner$eve.call(_datasource$owner),btype_id=event?["OnError","OnPageError"].includes(event.type())?"sys.error":event.get_static_property("data_trigger_type"):void 0;return(_btype_id=btype_id)!=null||(btype_id="null"),get5(btype_id)},context_key:"current_data_item",evaluate(properties,context,btype){var _context$datasources$,_context$datasources;return btype.cast((_context$datasources$=(_context$datasources=context.datasources).current_data_item)==null?void 0:_context$datasources$.call(_context$datasources,properties,context))},get_runmode_btype(_raw3,context,properties){var _context$datasources$2,_context$datasources$3,_context$datasources2;return(_context$datasources$2=(_context$datasources$3=(_context$datasources2=context.datasources).current_data_item_btype)==null?void 0:_context$datasources$3.call(_context$datasources2,properties,context))!=null?_context$datasources$2:"null"},get_unique_string(){}},current_data_item_default=exported60;init_define_process_env();init_shim();init_btypes();var exported61={field_names:{},get_btype(static_property,datasource){var _datasource$owner$eve,_datasource$owner;let event=(_datasource$owner$eve=(_datasource$owner=datasource.owner).event)==null?void 0:_datasource$owner$eve.call(_datasource$owner),btype_id=event?["OnError","OnPageError"].includes(event.type())?"sys.error":event.get_static_property("data_trigger_type"):void 0;return get5(btype_id!=null?btype_id:"null")},context_key:"old_data_item",evaluate(properties,context,btype){var _context$datasources$,_context$datasources;return btype.cast((_context$datasources$=(_context$datasources=context.datasources).old_data_item)==null?void 0:_context$datasources$.call(_context$datasources,properties,context))},get_runmode_btype(_raw3,context,properties){var _context$datasources$2,_context$datasources$3,_context$datasources2;return(_context$datasources$2=(_context$datasources$3=(_context$datasources2=context.datasources).old_data_item_btype)==null?void 0:_context$datasources$3.call(_context$datasources2,properties,context))!=null?_context$datasources$2:"null"},get_unique_string(properties,element_instance){}},old_data_item_default=exported61;init_define_process_env();init_shim();var import_web_dom_collections_iterator296=__toESM(require_web_dom_collections_iterator());init_state_keys();init_appquery();function get_event_param_btype2(event,current_key){var _event$get_custom_par,_event$get_custom_par2;let parameters=(_event$get_custom_par=event==null||(_event$get_custom_par2=event.get_custom_parameters)==null?void 0:_event$get_custom_par2.call(event))!=null?_event$get_custom_par:[];for(let{param_id,btype_id}of parameters)if(param_id===current_key)return btype_id;return"null"}var exported62={field_names:{param_id:{},key:{}},get_btype(static_property,datasource){var _static_property,_datasource$owner$eve,_datasource$owner;let current_key=(_static_property=static_property("param_id"))!=null?_static_property:static_property("key"),event=(_datasource$owner$eve=(_datasource$owner=datasource.owner).event)==null?void 0:_datasource$owner$eve.call(_datasource$owner);return get_event_param_btype2(event,current_key)},evaluate(properties,context,ret_btype){var _properties$param_id,_context$call_paramet;let param_id=(_properties$param_id=properties.param_id)!=null?_properties$param_id:properties.key,pre_cast=(_context$call_paramet=context.call_parameters)==null?void 0:_context$call_paramet[param_id];return ret_btype.cast(pre_cast)},get_runmode_btype(_raw3,context,properties){var _properties$param_id2;if(!context.event_id)return"null";let event=appquery_default.workflow_item(context.event_id),param_id=(_properties$param_id2=properties.param_id)!=null?_properties$param_id2:properties.key;return get_event_param_btype2(event,param_id)},get_unique_string(properties,element_instance){var _properties$param_id3;return state_keys_default.APIEventParameter((_properties$param_id3=properties.param_id)!=null?_properties$param_id3:properties.key)}},api_event_parameter_default=exported62;init_define_process_env();init_shim();var import_web_dom_collections_iterator298=__toESM(require_web_dom_collections_iterator());var core_ds_field_names_exports={};__export(core_ds_field_names_exports,{constraints_field_names:()=>constraints_field_names,sorting_field_names:()=>sorting_field_names});init_define_process_env();init_shim();var constraints_field_names={constraints:{}},sorting_field_names={sort_field:{},dynamic_sort_field:{},geo_reference:{},descending:{optional:!0},additional_sort_fields:{optional:!0}};init_define_process_env();init_shim();var import_web_dom_collections_iterator297=__toESM(require_web_dom_collections_iterator());init_core_ds_db_ops_utilities();init_core_ds_db_ops_utilities();init_btypes();init_lib();init_special_keys();init_state_keys();init_btype_ids();function search_btype_from_type_to_find(to_find){return to_find?list_type(to_find):"null"}var exported63={field_names:{type_to_find:{},ignore_empty_constraints:{},...constraints_field_names,...sorting_field_names},get_btype(static_property){return search_btype_from_type_to_find(static_property("type_to_find"))},get_runmode_btype(_raw3,context,properties){return search_btype_from_type_to_find(properties.type_to_find)},get_unique_string(properties,element_instance){let{type_to_find,constraints}=properties;return state_keys_default.Search(type_to_find,constraints,get_sorts_list(properties,!0))},evaluate(properties,context,ret_btype){let{type_to_find,constraints,ignore_empty_constraints}=properties;if(lib_default().is_edit_mode())return ret_btype.get_bubble_null();let null_not_dropped=!ignore_empty_constraints,processed_constraints=lib_default().bv().resolve_constraints(constraints,null_not_dropped),custom_type2=get5(type_to_find).custom_type();if(!(custom_type2!=null&&custom_type2.exists()))return ret_btype.get_bubble_null();processed_constraints=processed_constraints.filter(c=>is_field_okay(c.key,type_to_find));let sorts_list=get_sorts_list(properties,!0),searched_id=null;for(let c of processed_constraints){if(c.key===UNIQUE_ID&&c.constraint_type==="equals"){if(searched_id==null)searched_id=c.value;else if(searched_id!==c.value)return ret_btype.get_bubble_null()}if(c.constraint_type==="return_empty_set")return lib_default().db_instance().static_list(type_to_find,[])}if(searched_id==null||typeof searched_id!="string"||searched_id==="")return lib_default().db_instance().find(type_to_find,processed_constraints,sorts_list);{var _thing$_type;let thing=lib_default().db_instance().get(searched_id);return!thing.exists()||((_thing$_type=thing._type)==null?void 0:_thing$_type.call(thing))!==type_to_find?ret_btype.get_bubble_null():lib_default().db_instance().static_list(type_to_find,[thing]).filter(processed_constraints)}}},search_default=exported63;init_define_process_env();init_shim();var import_web_dom_collections_iterator300=__toESM(require_web_dom_collections_iterator());init_lib();init_btypes();init_define_process_env();init_shim();var import_web_dom_collections_iterator299=__toESM(require_web_dom_collections_iterator()),import_es_string_replace54=__toESM(require_es_string_replace());init_appquery();init_app_json();init_btype_ids();function get_safe_id(display2,options){var _options,_options$reserved,_options$exists;(_options=options)!=null||(options={});let reserved=(_options$reserved=options.reserved)!=null?_options$reserved:[],existence=(_options$exists=options.exists)!=null?_options$exists:()=>!1,base=get_safe_base(display2);function test_id(id){return PROTECTED_KEYS.has(id)||BUBBLE_RESERVED_KEYS.has(id)?!0:reserved.includes(id)||existence(id)}let result=base,num=0;for(;test_id(result);)result=base+num,num++;return result}function get_safe_base(display2){let base=display2.replace(/[^a-zA-Z0-9]/g,"_").toLowerCase();return/^\d+$/.test(base)?`${base}_`:base}var sort_options_fn=(a,b)=>a.sort_factor()-b.sort_factor();init_btype_ids();var exported64={field_names:{option_set:{},option_value:{}},get_btype(static_property){let option_set=static_property("option_set");return option_set!=null?static_property("option_value")===ALL_OPTIONS?list_type(option_set):option_set:"null"},get_runmode_btype(_raw3,context,properties){let{option_set}=properties;return option_set!=null?properties.option_value===ALL_OPTIONS?list_type(option_set):option_set:"null"},get_unique_string(properties,element_instance){return null},evaluate(properties,context,ret_btype){if(properties.option_value===ALL_OPTIONS){let option_set=get5(properties.option_set).option_set();if(option_set!=null&&option_set.exists()){let option_btypes=option_set.values().sort(sort_options_fn).filter(value=>!value.deleted()).map(value=>value.name());return lib_default().db_instance().static_list(properties.option_set,option_btypes)}else if(properties.option_value===ALL_OPTIONS)return lib_default().db_instance().static_list(properties.option_set,[])}return properties.option_value}},option_value_default=exported64;init_define_process_env();init_shim();init_state_keys();var exported65={field_names:{arbitrary_text:{}},get_btype(){return"text"},get_runmode_btype(_raw3,context,properties){return"text"},get_unique_string(properties,element_instance){return state_keys_default.ArbitraryText(properties)},evaluate(properties,context,ret_btype){var _properties$arbitrary;return(_properties$arbitrary=properties.arbitrary_text)!=null?_properties$arbitrary:""}},arbitrary_text_default=exported65;init_define_process_env();init_shim();var arbitrary_datetime_default={field_names:{parsed_date:{}},get_btype(static_property){return"date"},get_runmode_btype(_raw3,context,properties){return"date"},get_unique_string(properties,element_instance){},evaluate(properties,context,ret_btype){return ret_btype.cast(properties.parsed_date)}};init_define_process_env();init_shim();init_btypes();init_btype_ids();var exported66={field_names:{option_set:{},option_value:{}},get_btype(static_property){let option_set=static_property("option_set");return option_set!=null?option_set:"null"},get_runmode_btype(_raw3,context,properties){let{option_set}=properties;return option_set!=null?option_set:"null"},get_unique_string(){return null},evaluate(properties){return properties.option_value}},one_optionvalue_default=exported66;init_define_process_env();init_shim();var import_web_dom_collections_iterator301=__toESM(require_web_dom_collections_iterator());init_btypes();init_lib();init_btype_ids();var exported67={field_names:{option_set:{}},get_btype(static_property){let option_set=static_property("option_set");return option_set!=null?list_type(option_set):"null"},get_runmode_btype(_raw3,context,properties){let{option_set}=properties;return option_set!=null?list_type(option_set):"null"},get_unique_string(properties,element_instance){return null},evaluate(properties,context,ret_btype){let option_set=get5(properties.option_set).option_set();return option_set!=null&&option_set.exists()?lib_default().db_instance().static_list(properties.option_set,option_set.values().sort(sort_options_fn).filter(value=>!value.deleted()).map(value=>value.name())):null}},all_optionvalue_default=exported67;init_define_process_env();init_shim();init_btypes();init_shrink();var exported68={field_names:{btype:{},value:{}},get_btype(static_property){return static_property("btype")},get_runmode_btype(_raw3){var _raw$btype,_raw$S$properties;return(_raw$btype=_raw3.btype)!=null?_raw$btype:(_raw$S$properties=_raw3[S.properties])==null?void 0:_raw$S$properties.btype},get_unique_string(properties){return String(properties.value)},evaluate(properties){return properties.value}},primitive_literal_default=exported68;init_define_process_env();init_shim();init_core_ds_db_ops_utilities();init_define_process_env();init_shim();init_plugin_getter();function get_call(provider){var _plugin_getter$get_pl;if(!provider)return;let plugin_name=provider.split(".")[0],call_name=provider.split(".").slice(1).join(".");return(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_call(call_name)}function get_api_btype_from_provider(provider){let call=get_call(provider);return call?call.get_btype_id():"null"}init_lang();init_lib();init_state_keys();var exported69={field_names:DETECT_FIELD_NAMES,evaluate(properties,context,ret_btype,_raw3){let call=get_call(properties.provider);if(!call||context.responsive_mode)return ret_btype.get_bubble_null();if(call.is_authenticated()){let result=call.execute(null,properties,null,_raw3,context);return convert_api_call_to_db_object(result,call)}},get_btype(static_property){return get_api_btype_from_provider(static_property("provider"))},get_runmode_btype(_raw3,context,properties){return get_api_btype_from_provider(properties.provider)},get_unique_string(properties,element_instance){return state_keys_default.GetDataFromAPI(properties)}},get_data_from_api_default=exported69;init_define_process_env();init_shim();init_core_ds_db_ops_utilities();var exported70={field_names:{},is_client_state(){return!0},evaluate(properties,context,ret_btype,_raw3){let call=get_call("interactions.get_mouse_data");if(!call)return ret_btype.get_bubble_null();if(call.is_authenticated()){let result=call.execute(null,properties,null,_raw3,context);return convert_api_call_to_db_object(result,call)}},get_btype(){return get_api_btype_from_provider("interactions.get_mouse_data")},get_runmode_btype(){return get_api_btype_from_provider("interactions.get_mouse_data")},get_unique_string(properties,element_instance){}},get_mouse_data_default=exported70;init_define_process_env();init_shim();init_core_ds_element_utilities();init_state_keys();init_mobile();var exported71={field_names:{},is_client_state(){return!0},get_runmode_btype(_raw3,context){return context_parent_btype(context.element.element)},evaluate(properties,context,ret_btype){let targ=get_runtime_parent(context);return targ?ret_btype.cast(targ.state("group_data")):ret_btype.get_bubble_null()},get_btype(static_property,datasource){return element_parent_btype(static_property,datasource)},get_unique_string(properties,element_instance){return state_keys_default.ElementParent()}},element_parent_default=exported71;init_define_process_env();init_shim();init_core_ds_element_utilities();init_state_keys();init_mobile();var exported72={field_names:{},is_client_state(){return!0},get_btype(){return"number"},get_runmode_btype(){return"number"},evaluate(properties,context,ret_btype){let targ=get_runtime_parent(context);if(targ){for(var _targ$state,_targ2;targ!=null&&targ.element.type()!=="GroupItem";){var _targ$parent,_targ;targ=(_targ$parent=(_targ=targ).parent)==null?void 0:_targ$parent.call(_targ)}return(_targ$state=(_targ2=targ)==null?void 0:_targ2.state("cell_index"))!=null?_targ$state:ret_btype.get_bubble_null()}else return ret_btype.get_bubble_null()},get_unique_string(){return state_keys_default.CurrentCellsIndex()},check_for_errors(static_property,datasource){let context_element=datasource.context_element();if(context_element.parents==null||context_element.parents("RepeatingGroup").length===0&&context_element.parents("TableCrossAxis").length===0&&LIST_TYPES.filter(listType=>context_element.parents(listType).length===0).length===LIST_TYPES.length)return"You are trying to get the cell index, but this is not in the context of a repeating group, table, or list"}},current_cells_index_default=exported72;init_define_process_env();init_shim();init_appquery();init_state_keys();function get_action(static_property,datasource){let action=appquery_default.action(static_property("action_id"));if(!action||!action.exists())return null;let next_action=action.next();for(;next_action;){if(datasource.owner.id()===next_action.id())return action;next_action=next_action.next()}return null}var exported73={field_names:{action_id:{}},light_evaluation:!1,allowed_when_restricted:!1,allowed_on_element:!1,allowed_on_client_wf:!0,allowed_on_server_wf:!0,get_required_visible_id(raw_data_source){return raw_data_source.properties.action_id},get_runmode_btype(_raw3,context,properties){let{action_id}=properties;return context.frozen_state.get(this.get_unique_string({action_id})+"_btype")},evaluate(properties,context,ret_btype){var _context$frozen_state;return(_context$frozen_state=context.frozen_state.get(this.get_unique_string(properties)))!=null?_context$frozen_state:ret_btype.get_bubble_null()},get_btype(static_property,datasource){var _get_action$return_bt,_get_action;return(_get_action$return_bt=(_get_action=get_action(static_property,datasource))==null?void 0:_get_action.return_btype())!=null?_get_action$return_bt:"null"},get_unique_string(properties){return state_keys_default.PreviousStep(properties.action_id)}},previous_step_default=exported73;init_define_process_env();init_shim();init_appquery();init_core_ds_element_utilities();function get_element2(static_property,datasource){var _datasource$context_e,_datasource$context_e2,_datasource$context_e3,_element$root;let element=appquery_default.element(static_property("element_id"));return(_datasource$context_e=datasource.context_element())!=null&&(_datasource$context_e2=_datasource$context_e.root)!=null&&(_datasource$context_e3=_datasource$context_e2.call(_datasource$context_e))!=null&&_datasource$context_e3.id()&&(element==null||(_element$root=element.root())==null?void 0:_element$root.id())!==datasource.context_element().root().id()||!is_element_visible(element,datasource.context_element())?null:element}var exported74={field_names:{element_id:{}},is_client_state(){return!0},get_btype(static_property,datasource){var _get_element;let id=(_get_element=get_element2(static_property,datasource))==null?void 0:_get_element.id();return id?"element."+id:"null"},get_runmode_btype(_raw3,context,properties){var _context$element$find,_context$element;let element_instance=(_context$element$find=(_context$element=context.element).find_instance_by_id)==null?void 0:_context$element$find.call(_context$element,properties.element_id);return element_instance==null?"null":element_instance.element.get_btype_id()},evaluate(properties,context,ret_btype){var _context$element$find2,_context$element$find3,_context$element2;return(_context$element$find2=(_context$element$find3=(_context$element2=context.element).find_instance_by_id)==null?void 0:_context$element$find3.call(_context$element2,properties.element_id))!=null?_context$element$find2:ret_btype.get_bubble_null()},get_unique_string(properties,element_instance){return null}},get_element_default=exported74;init_define_process_env();init_shim();init_btypes();init_state_keys();init_core_ds_element_utilities();init_mobile();init_plan_utils();var exported75={field_names:{fetch_data:{},ancestor_type:{}},is_client_state(){return!0},_get_btype_for_element(element){var _element$get_static_p;return get5((_element$get_static_p=element==null?void 0:element.get_static_property("group_type"))!=null?_element$get_static_p:"null")},get_btype(static_property,datasource){var _element$get_btype_id,_element$get_btype_id2;let element=get_ancestor_element(static_property("ancestor_type"),datasource);if(static_property("fetch_data")){if((element==null?void 0:element.type())==="TableCrossAxis"||LIST_ITEMS.includes(element==null?void 0:element.type()))return this._get_btype_for_element(element.parent());if((element==null?void 0:element.type())==="SectionHeader"){let fn=element.get_static_property("fn"),message=element.get_static_property("message"),groupings=[{fn,message}],aggregations=[],btype=element==null?void 0:element.parent().get_static_property("group_type");return get5(get_group_by_btype_id(btype,groupings,aggregations))}return this._get_btype_for_element(element)}return get5((_element$get_btype_id=element==null||(_element$get_btype_id2=element.get_btype_id)==null?void 0:_element$get_btype_id2.call(element))!=null?_element$get_btype_id:"null")},get_runmode_btype(_raw3,context,properties){var _element_ancestor$ele,_element_ancestor$ele2;let element_instance=context.element;if(properties.fetch_data){var _value_instance$get_s;let type;if(properties.ancestor_type==="TableCrossAxis"?type="Table":LIST_ITEMS.includes(properties.ancestor_type)||properties.ancestor_type==="SectionHeader"?type=LIST_TYPES:type=properties.ancestor_type,properties.ancestor_type==="TableCrossAxis"&&element_instance.element.type()==="Table"){var _element_instance$par,_element_instance;element_instance=(_element_instance$par=(_element_instance=element_instance).parent)==null?void 0:_element_instance$par.call(_element_instance)}if(LIST_ITEMS.includes(properties.ancestor_type)&&LIST_TYPES.includes(element_instance.element.type())){var _element_instance$par2,_element_instance2;element_instance=(_element_instance$par2=(_element_instance2=element_instance).parent)==null?void 0:_element_instance$par2.call(_element_instance2)}let value_instance=get_runmode_element_ancestor_instance(type,element_instance);if(properties.ancestor_type==="SectionHeader"){let section_header_instance=value_instance.state("section_header_instance"),fn=section_header_instance.get_static_property("fn"),message=section_header_instance.get_static_property("message"),groupings=[{fn,message}],aggregations=[],btype=section_header_instance==null?void 0:section_header_instance.parent().get_static_property("group_type");return get_group_by_btype_id(btype,groupings,aggregations)}return(_value_instance$get_s=value_instance==null?void 0:value_instance.get_static_property("group_type"))!=null?_value_instance$get_s:null}let element_ancestor=get_runmode_element_ancestor_instance(properties.ancestor_type,element_instance);return(_element_ancestor$ele=element_ancestor==null||(_element_ancestor$ele2=element_ancestor.element)==null?void 0:_element_ancestor$ele2.get_btype_id())!=null?_element_ancestor$ele:null},evaluate(properties,context,ret_btype){let target_instance=context.element;if(properties.fetch_data){for(var _target_instance$stat,_target_instance2;target_instance!=null&&target_instance.element.type()!=="GroupItem";){var _target_instance$pare,_target_instance;target_instance=(_target_instance$pare=(_target_instance=target_instance).parent)==null?void 0:_target_instance$pare.call(_target_instance)}return(_target_instance$stat=(_target_instance2=target_instance)==null?void 0:_target_instance2.state("group_data"))!=null?_target_instance$stat:ret_btype.get_bubble_null()}return target_instance=get_runmode_element_ancestor_instance(properties.ancestor_type,context.element),target_instance||ret_btype.get_bubble_null()},get_unique_string(properties,element_instance){return state_keys_default.ElementAncestor()+properties.ancestor_type}},element_ancestor_default=exported75;init_define_process_env();init_shim();init_hydrate();init_lib();var exported76={field_names:{val:{},value_id:{}},get_btype(static_property){return static_property("value_id")},get_runmode_btype(_raw3,context,properties){return properties.value_id},evaluate(properties,context,ret_btype){return ret_btype.cast(rehydrate_tree(lib_default().db_instance(),properties.val))},get_unique_string(){return null}},dehydrated_default=exported76;init_define_process_env();init_shim();init_logger();function _extract_btype_from_parent(datasource){let expressions_with_injected_value=["filtered","format_as_text"],parent=datasource;for(;(_parent=parent)!=null&&_parent.exists()&&parent.path().indexOf(".")!==-1;){var _parent;if(parent.json.name()==="properties"){var _next_parent$name;let next_parent=parent.parent_expression();if(expressions_with_injected_value.includes(next_parent==null||(_next_parent$name=next_parent.name)==null?void 0:_next_parent$name.call(next_parent)))return next_parent.parent_expression().get_btype().inner()}parent=parent.parent_expression()}return null}var exported77={field_names:{},get_btype(static_property,datasource){var _extract_btype_from_p,_datasource$owner,_datasource$owner$E$g,_datasource$owner2,_datasource$owner2$E,_datasource$owner2$E$;let btype=(_extract_btype_from_p=_extract_btype_from_parent(datasource))==null?void 0:_extract_btype_from_p.id();if(btype)return btype;if(typeof(datasource==null||(_datasource$owner=datasource.owner)==null?void 0:_datasource$owner.get_injected_btype)=="function"){let owner_btype=datasource.owner.get_injected_btype(datasource);if(owner_btype)return owner_btype}return(_datasource$owner$E$g=datasource==null||(_datasource$owner2=datasource.owner)==null||(_datasource$owner2$E=_datasource$owner2.E)==null||(_datasource$owner2$E$=_datasource$owner2$E.get_injected_btype)==null?void 0:_datasource$owner2$E$.call(_datasource$owner2$E,datasource.owner))!=null?_datasource$owner$E$g:"null"},context_key:"injected_value",evaluate(properties,context,btype){return typeof context.datasources.injected_value!="function"?(info("non-null injected_value passed through",{injected_value_string:String(context.datasources.injected_value)}),btype.cast(null)):btype.cast(context.datasources.injected_value(properties,context))},get_runmode_btype(_raw3,context,properties){var _context$datasources$,_context$datasources$2,_context$datasources;return(_context$datasources$=(_context$datasources$2=(_context$datasources=context.datasources).injected_value_btype)==null?void 0:_context$datasources$2.call(_context$datasources,properties,context))!=null?_context$datasources$:"null"},get_unique_string(properties,element_instance){return null}},injected_value_default=exported77;init_define_process_env();init_shim();var import_web_dom_collections_iterator302=__toESM(require_web_dom_collections_iterator());init_shrink();init_generic_actions_utilities();init_define_process_env();init_shim();init_u2();init_b_fiber();init_logger();init_core();init_btype_ids();var list_of_formulas={},all2={},core_formulas={list_of_formulas,all:all2};function add3(name,data){core_formulas[name]=data,core_formulas.list_of_formulas[name]=data.display,core_formulas.all[name]=data}add3("PMT",{display:"Loan Payment",fields:{rate:{content_format:"percentage"},nper:{},pv:{}},evaluate(_ref){let{rate,nper,pv}=_ref,fv=0,type=0;if(rate===0)return to_num(-(pv+fv)/nper);let pvif=Math.pow(1+rate,nper),pmt=rate/(pvif-1)*-(pv*pvif+fv);return type===1&&(pmt/=1+rate),to_num(pmt)},testing:{properties:{rate:.1,nper:10,pv:1e3},result:-162.74539488251153}});add3("CoordToAddress",{display:"Coordinates to Address",fields:{latitude:{},longitude:{}},ret_btype:"geographic_address",evaluate(val){return{lat:val.latitude,lng:val.longitude}},testing:{ignore:!0}});add3("RandomString",{display:"Generate random string",fields:{length:{default:6,caption:"Length of characters"},letters:{default:!0,editor:"Checkbox",caption:"Use letters"},non_cap:{default:!0,editor:"Checkbox",caption:"Use non capitalized letters"},numbers:{default:!1,editor:"Checkbox",caption:"Use numbers"},special_chars:{default:!1,editor:"Checkbox",caption:"Use special characters"}},ret_btype:"text",evaluate(val,context){if(!val)return"";if(context.is_in_partial)return"not available in debugger";let{length,letters,non_cap,numbers,special_chars}=val,possible_chars="";letters&&(possible_chars+="ASDFGHJKLZXCVBNMQWERTYUIOP"),non_cap&&(possible_chars+="qwertyuiopasdfghjklzxcvbnm"),numbers&&(possible_chars+="1234567890"),special_chars&&(possible_chars+="{}[];:/<>?_+~!@#");let get_random;context!=null&&context.random_generator?get_random=max=>context.random_generator.random(0,max):get_random=max=>Math.random()*max;let res="";length>1e5&&owner_warn("Probably slow random generation",{display:"Generating a random string > 100,000 characters can slow down workflows and time out, consider using a smaller random string"});for(let i=0;i<Math.abs(length);i++)i%1e3===0&&optional_pause(),res+=possible_chars.charAt(Math.floor(get_random(possible_chars.length)));return res},testing:{ignore:!0}});add3("SumProduct",{display:"Calculate sumproduct",fields:{list_1:{btype:list_type("number"),caption:"List 1"},list_2:{btype:list_type("number"),caption:"List 2"}},evaluate(val,context){if(!val)return 0;let _get_list=a=>{var _a$all,_a$all2;return(_a$all=a==null||(_a$all2=a.all)==null?void 0:_a$all2.call(a))!=null?_a$all:a},list_1=_get_list(val.list_1),list_2=_get_list(val.list_2);if(!(list_1!=null&&list_1.length)||!(list_2!=null&&list_2.length))return 0;let min_length=Math.min(list_1.length,list_2.length),res=0;for(let a=0;a<min_length;a++)res+=list_1[a]*list_2[a];return res},testing:{ignore:!0}});var core_formulas_default=core_formulas;init_lib();init_lang();init_decaf();var exported78={get_btype(static_property){var _core_formulas$formul,_core_formulas$formul2;let formula=static_property("formula_type");return(_core_formulas$formul=(_core_formulas$formul2=core_formulas_default[formula])==null?void 0:_core_formulas$formul2.ret_btype)!=null?_core_formulas$formul:"number"},field_names:DETECT_FIELD_NAMES,get_runmode_btype(_raw3,context,properties){var _core_formulas$formul3,_core_formulas$formul4;let formula=properties.formula_type;return(_core_formulas$formul3=(_core_formulas$formul4=core_formulas_default[formula])==null?void 0:_core_formulas$formul4.ret_btype)!=null?_core_formulas$formul3:"number"},get_unique_string(properties,element_instance){},evaluate(properties,context,ret_btype){var _formula_data$evaluat;let formula_data=core_formulas_default[properties.formula_type];return(_formula_data$evaluat=formula_data==null?void 0:formula_data.evaluate(properties,context))!=null?_formula_data$evaluat:ret_btype.get_bubble_null()}},formulas_datasource_default=exported78;init_define_process_env();init_shim();init_b_object();init_apps_utilities();init_appquery();var app_setting={},app_setting_default=app_setting;init_define_process_env();init_shim();init_lib();init_appquery();init_css();var exported79={field_names:{text_id:{},information:{}},get_btype(static_property){return"text"},get_runmode_btype(_raw3,context,properties){return"text"},get_unique_string(properties,element_instance){},evaluate(properties,context,ret_btype){var _Lib$get_text;return properties.text_id&&(_Lib$get_text=lib_default().get_text("USER_TEXTS",properties.text_id))!=null?_Lib$get_text:ret_btype.get_bubble_null()}},app_text_default=exported79;init_define_process_env();init_shim();var import_web_dom_collections_iterator303=__toESM(require_web_dom_collections_iterator());init_appquery();init_lib();var exported80={field_names:{breakpoint_id:{}},get_btype(static_property,datasource){return this.breakpoint_in_app(static_property,datasource)?"number":"null"},get_runmode_btype(_raw3){return"number"},evaluate(properties,context,ret_btype){var _breakpoint$size;let breakpoint=appquery_default.app_breakpoints()[properties.breakpoint_id];return(_breakpoint$size=breakpoint==null?void 0:breakpoint.size)!=null?_breakpoint$size:ret_btype.get_bubble_null()},get_unique_string(properties,element_instance){}},breakpoint_default=exported80;init_define_process_env();init_shim();var default_breakpoint_default={field_names:{},get_btype(static_property,datasource){return"number"},get_runmode_btype(_raw3){return"number"},evaluate(properties,context,ret_btype){var _context$element,_context$element$elem,_context$element$elem2;return(_context$element=context.element)==null||(_context$element$elem=_context$element.element)==null||(_context$element$elem2=_context$element$elem.root())==null?void 0:_context$element$elem2.get_static_property("default_width")},get_unique_string(properties,element_instance){}};var core_datasources_default={GetParamFromUrl:get_param_from_url_default,CurrentUser:current_user_default,PageData:page_data_default,ThisElement:this_element_default,CurrentPageItem:current_page_item_default,CurrentWorkflowItem:current_workflow_item_default,CurrentDataItem:current_data_item_default,OldDataItem:old_data_item_default,APIEventParameter:api_event_parameter_default,Search:search_default,OptionValue:option_value_default,ArbitraryText:arbitrary_text_default,DateTime:arbitrary_datetime_default,OneOptionValue:one_optionvalue_default,AllOptionValue:all_optionvalue_default,PrimitiveLiteral:primitive_literal_default,GetDataFromAPI:get_data_from_api_default,GetMouseData:get_mouse_data_default,ElementParent:element_parent_default,CurrentCellsIndex:current_cells_index_default,PreviousStep:previous_step_default,GetElement:get_element_default,ElementAncestor:element_ancestor_default,Dehydrated:dehydrated_default,InjectedValue:injected_value_default,Formulas:formulas_datasource_default,AppSetting:app_setting_default,AppText:app_text_default,Breakpoint:breakpoint_default,DefaultBreakpoint:default_breakpoint_default};init_core_ds_db_ops_utilities();init_element_utils();init_image_utils();init_property_applications();init_db2();init_hydrate();init_db_values();init_StaticObject();init_css();var external_exports={};__export(external_exports,{APIValue:()=>APIValue,Authenticator:()=>Authenticator2,BasicAuth:()=>BasicAuth2,BoxAuthentication:()=>BoxAuthentication2,Call:()=>Call,ExternalValue:()=>ExternalValue,JWT:()=>JWT2,MISSING_ACCESS_TOKEN:()=>MISSING_ACCESS_TOKEN3,NoAuth:()=>NoAuth2,Oauth1:()=>Oauth12,Oauth2:()=>Oauth22,Oauth2Custom:()=>Oauth2Custom2,Oauth2PWFlow:()=>Oauth2PWFlow2,PLUGIN_OAUTH_REDIRECT:()=>PLUGIN_OAUTH_REDIRECT3,PassThroughValue:()=>PassThroughValue,PrivateKey:()=>PrivateKey2,SERVER_OAUTH_REDIRECT:()=>SERVER_OAUTH_REDIRECT3,SSLProtocol:()=>SSLProtocol2,Service:()=>Service,StructValue:()=>StructValue,get_redirect_url:()=>get_redirect_url3,make_call_fn:()=>make_call_fn});init_define_process_env();init_shim();init_ExternalValue();init_StructValue();init_define_process_env();init_shim();var import_web_dom_collections_iterator304=__toESM(require_web_dom_collections_iterator());init_lib();init_mode_check();init_logger();var b_async14=__toESM(require_b_async()),dependency2=__toESM(require_dependency());init_eval_node_state();init_ExternalValue();var DEFAULT_APIVALUE_CACHE_TIME=2*60*1e3,_api_value_data={},_api_value_expires={},_api_value_cleanup_scheduled=!1,_api_value_dependency={},_api_value_full_switches={};function does_x_contain_y(x,y){for(let k in y){let y_v=y[k],x_v=x[k];if(x_v&&y_v&&typeof x_v=="function"&&typeof y_v=="function"){if(!does_x_contain_y(x_v,y_v))return!1}else if(x_v!==y_v)return!1}return!0}function _init_switch(key){var _api_value_full_switc,_api_value_full_switc2;return(_api_value_full_switc2=(_api_value_full_switc=_api_value_full_switches)[key])!=null?_api_value_full_switc2:_api_value_full_switc[key]=b_async14.MakeSwitch(null,"api data loaded for "+key)}function api_value_set(full_name,uid,data,expires){var _api_value_dependency2;if(data.partial){let current=api_value_get(full_name,uid);if(current&&!current.partial&&!current.err&&does_x_contain_y(current.data,data.data))return}let key=full_name+"_"+uid;_api_value_expires[key]=expires,_api_value_data[key]=data,(_api_value_dependency2=_api_value_dependency[key])==null||_api_value_dependency2.invalidate(),_init_switch(key),data.partial?_api_value_full_switches[key].turn_off():_api_value_full_switches[key].turn_on(),on_server()&&(_api_value_cleanup_scheduled||(_api_value_cleanup_scheduled=!0,setTimeout(api_value_cleanup,DEFAULT_APIVALUE_CACHE_TIME)))}function api_value_ensure_full(full_name,uid){api_value_get(full_name,uid);let key=full_name+"_"+uid;return _init_switch(key),b_async14.ensure_ready(_api_value_full_switches[key])}function api_value_get_key(full_name,uid){let key=full_name+"_"+uid;return _init_switch(key),_api_value_full_switches[key]}function api_value_clear(full_name,uid){var _api_value_dependency3,_api_value_full_switc3;let key=full_name+"_"+uid;_api_value_data[key]=null,(_api_value_dependency3=_api_value_dependency[key])==null||_api_value_dependency3.invalidate(),(_api_value_full_switc3=_api_value_full_switches[key])==null||_api_value_full_switc3.turn_off()}function api_value_cleanup(){_api_value_cleanup_scheduled=!1;let now2=Date.now(),preserved_data={},preserved_expires={},preserved_dependency={},preserved_switches={};for(let[key,expires]of Object.entries(_api_value_expires))if(now2<expires)preserved_expires[key]=expires,preserved_data[key]=_api_value_data[key],preserved_dependency[key]=_api_value_dependency[key],preserved_switches[key]=_api_value_full_switches[key];else{var _api_value_dependency4,_api_value_full_switc4;(_api_value_dependency4=_api_value_dependency[key])==null||_api_value_dependency4.invalidate(),(_api_value_full_switc4=_api_value_full_switches[key])==null||_api_value_full_switc4.turn_on()}_api_value_data=preserved_data,_api_value_expires=preserved_expires,_api_value_dependency=preserved_dependency,_api_value_full_switches=preserved_switches}function api_value_get(full_name,uid){var _api_value_dependency5,_api_value_dependency6;let key=full_name+"_"+uid,val=_api_value_data[key];if(val!=null&&Date.now()>_api_value_expires[key]){var _api_value_full_switc5;return(_api_value_full_switc5=_api_value_full_switches[key])==null||_api_value_full_switc5.turn_off(),_api_value_data[key]=null,null}if((_api_value_dependency6=(_api_value_dependency5=_api_value_dependency)[key])!=null||(_api_value_dependency5[key]=dependency2.Dependency()),_api_value_dependency[key].register(),val!=null&&val.err)throw val.err;return val}var APIValue=class extends ExternalValue{constructor(_ref){var _this$cache_time;let{human,uid_field,build_call_from_uid,data_container,fields,cache_time}=_ref;super(),this.storable=!0,this.bindable=!0,this.human=human,this.uid_field=uid_field,this.build_call_from_uid=build_call_from_uid,this.data_container=data_container,this.fields=fields,this.cache_time=cache_time,(_this$cache_time=this.cache_time)!=null||(this.cache_time=DEFAULT_APIVALUE_CACHE_TIME),this._is_executing={}}convert_to_bubble_instance(result){function to_string(x){return x!=null?String(x):x}return Array.isArray(result)?lib_default().db_instance().static_list(this.full_name,result.map(r2=>to_string(r2==null?void 0:r2[this.uid_field]))):to_string(result==null?void 0:result[this.uid_field])}execute_my_call(uid,_raw3,context){if(this._is_executing[uid])return;this._is_executing[uid]=!0;let{name,prev,properties}=this.build_call_from_uid(uid),_returned=null,too_long=setTimeout(()=>{warn("APIValue took too long too load",{uid,_returned,call_name:name,human:this.human})},29*1e3);b_async14.WaitFor(api_value_get_key(this.full_name,uid),()=>clearTimeout(too_long));let current_eval_node2=get_current_eval_node();return this._service.get_call(name).execute_async(prev,properties,null,{current_eval_node:current_eval_node2,_raw:_raw3},context).callback((err,value)=>{if(this._is_executing[uid]=!1,_returned={err,value},err)return api_value_set(this.full_name,uid,{err},Date.now()+this.cache_time)}),null}lookup_fn(name){let that=this;return function(a,b,properties,_raw3,context){var _a$_id,_a$_id2,_cached_data;if(!a)return this.ret_btype().cast(null);let id=(_a$_id=(_a$_id2=a._id)==null?void 0:_a$_id2.call(a))!=null?_a$_id:a;if(that.uid_field===name)return this.ret_btype().cast(id);let cached_data=api_value_get(that.full_name,id);return cached_data&&(cached_data.data[name]!=null||!cached_data.partial)?this.ret_btype().cast(cached_data.data[name]):(that.execute_my_call(id,_raw3,context),api_value_ensure_full(that.full_name,id),cached_data=api_value_get(that.full_name,id),this.ret_btype().cast((_cached_data=cached_data)==null?void 0:_cached_data.data[name]))}}get_basic_message(name,message_definition){var _message_definition$f;let fn=(_message_definition$f=message_definition.fn)!=null?_message_definition$f:this.lookup_fn(name);return{...super.get_basic_message(name,message_definition),fn,is_lookup:!1}}display(){return this.human}editable(){return!1}service(){return this._service}short_id(){return this.name}export_to_string(val){return`(Data with ID "${val}" from an API)`}debugging_display(val){return`(Data with ID "${val}" from an API)`}equals(a,b){return String(a)===String(b)}get_sample(){return null}cast(val){return typeof val=="number"?String(val):val}extract(raw){return this.flatten_raw(raw)}notify(data,call){let uid=data==null?void 0:data[this.uid_field];if(uid!=null)if(call.invalidate)api_value_clear(this.full_name,uid);else{let to_set;call.partial?to_set={data,partial:!0}:to_set={data},api_value_set(this.full_name,uid,to_set,Date.now()+this.cache_time)}}notify_server_action(res,call){let invalidate=id=>{if(["string","number"].includes(typeof id)){let fake_data={};fake_data[this.uid_field]=id;let fake_call={invalidate:!0};return this.notify(fake_data,fake_call)}};if(typeof(res==null?void 0:res.all)=="function")for(let id of res.all())invalidate(id);else invalidate(res)}get_JS_object(id){return id}JS_to_bubble(id){return id}};init_make_call_fn();var PassThroughValue=class{display(){return"Pass Through"}extract(raw){return raw}},Authenticator2=Authenticator,BasicAuth2=BasicAuth_default,BoxAuthentication2=BoxAuthentication,JWT2=JWT_default,NoAuth2=NoAuth_default,Oauth12=Oauth1,Oauth22=Oauth2,Oauth2Custom2=Oauth2Custom_default,Oauth2PWFlow2=Oauth2PWFlow_default,PrivateKey2=PrivateKey_default,SSLProtocol2=SSLProtocol_default,MISSING_ACCESS_TOKEN3=MISSING_ACCESS_TOKEN2,PLUGIN_OAUTH_REDIRECT3=PLUGIN_OAUTH_REDIRECT2,SERVER_OAUTH_REDIRECT3=SERVER_OAUTH_REDIRECT2,get_redirect_url3=get_redirect_url2,Call=ExternalCall,Service=ExternalService;init_b_location();init_appquery();init_btype_ids();init_btypes();init_color_tokens();init_element_edit_eval();init_element_eval();init_element_props();init_eval_node_state();init_node_eval();init_page_state();init_state_keys();init_lib();init_apm();init_internal_service_registry();init_plugin_getter();init_plugin_registry();init_domain_utilities();init_environment_utilities();var payment_converter_exports={};__export(payment_converter_exports,{bubble_amount:()=>bubble_amount,get_bubble_corrected_amount:()=>get_bubble_corrected_amount,get_service_corrected_amount:()=>get_service_corrected_amount,is_zero_decimal_currency:()=>is_zero_decimal_currency,stripe_amount:()=>stripe_amount});init_define_process_env();init_shim();init_errors();init_lib();function stripe_amount(amount,in_cents){return parseInt(in_cents?(100*amount).toFixed():amount.toFixed())}function bubble_amount(amount,in_cents){return in_cents?parseFloat(String(amount/100)):parseInt(amount.toFixed())}var bubble_to_service_amount={stripe(bubble_amount2,currency,only_after_bv14){if(bubble_amount2==null)return null;let currency_stored_in_cents;return only_after_bv14&&lib_default.or_throw().bubble_version()<14?currency_stored_in_cents=!0:currency_stored_in_cents=!is_zero_decimal_currency(currency),stripe_amount(bubble_amount2,currency_stored_in_cents)},braintree(bubble_amount2){return parseFloat(bubble_amount2.toFixed(2))}},get_service_corrected_amount=function(_ref){let{service_name,bubble_amount:bubble_amount2,currency,only_after_bv14}=_ref;if(bubble_to_service_amount[service_name]==null)throw new UnexpectedError("unsupported service",{service_name});return bubble_to_service_amount[service_name](bubble_amount2,currency,only_after_bv14)},get_bubble_corrected_amount=function(amount,currency,only_after_bv14){if(amount==null)return null;let currency_stored_in_cents;return only_after_bv14&&lib_default.or_throw().bubble_version()<14?currency_stored_in_cents=!0:currency_stored_in_cents=!is_zero_decimal_currency(currency),bubble_amount(amount,currency_stored_in_cents)},is_zero_decimal_currency=function(currency){return currency==null?!1:["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"].includes(currency.toUpperCase())};init_decaf();init_b_fiber();var b_async15=__toESM(require_b_async()),import_client_db=__toESM(require_client_db()),autorun25=__toESM(require_autorun());var memory_exports={};__export(memory_exports,{getMemoryInfo:()=>getMemoryInfo});init_define_process_env();init_shim();var getMemoryInfo=()=>{let memoryObject=performance.memory;if(!memoryObject)return null;let ratioUsedJSHeapSize=memoryObject.usedJSHeapSize/memoryObject.jsHeapSizeLimit,sessionLifetime=window.render_end_timestamp?Date.now()-window.render_end_timestamp:void 0;return{jsHeapSizeLimit:memoryObject.jsHeapSizeLimit,totalJSHeapSize:memoryObject.totalJSHeapSize,usedJSHeapSize:memoryObject.usedJSHeapSize,ratioUsedJSHeapSize,sessionLifetime}};var trial_utilities_exports={};__export(trial_utilities_exports,{get_count_of_editor_visit_days:()=>get_count_of_editor_visit_days,get_trial_info:()=>get_trial_info});init_define_process_env();init_shim();init_time();function get_trial_info(trial_end){let trialing=!!trial_end,trial_start_timestamp=trial_end?trial_end-14*864e5:null,trial_day=trial_start_timestamp?Math.floor((Date.now()-trial_start_timestamp)/864e5):null;return{trialing,trial_day,trial_start_timestamp}}function get_count_of_editor_visit_days(appCreationDate){if(!appCreationDate)return;let time_from_creation_date=Date.now()-appCreationDate;return Math.floor(time_from_creation_date/864e5)}var stripe_utilities_exports={};__export(stripe_utilities_exports,{currency_list:()=>currency_list,stripeToBubbleDate:()=>stripeToBubbleDate});init_define_process_env();init_shim();var currency_list=["USD","EUR","CAD","GBP","AUD","CHF","JPY","CNY"].concat(["SEK","KRW","RUB","SAR","AED","NOK","HUF","CZK","HKD","ZAR","NZD","SGD","TWD","MXN","DKK","BRL","NGN","ILS","PHP","INR","VND","PLN"].sort()),stripeToBubbleDate=value=>value?value*1e3:null;init_context();init_multiple_live_versions();var algolia_client_exports={};__export(algolia_client_exports,{get_admin_client:()=>get_admin_client,get_search_client:()=>get_search_client});init_define_process_env();init_shim();var import_algoliasearch=__toESM(require_algoliasearch());init_appquery();var admin_clients={},search_clients={};function get_admin_client(force_refresh){var _force_refresh;(_force_refresh=force_refresh)!=null||(force_refresh=!0);let appname=appquery_default.appname(),client=admin_clients[appname];if(client!=null&&!force_refresh)return client;let algolia_application_id=appquery_default.get_public_setting("general_keys.algolia_application_id"),admin_key=appquery_default.get_private_setting("general_keys.algolia_admin_key");return admin_clients[appname]=(0,import_algoliasearch.default)(algolia_application_id,admin_key),admin_clients[appname]}function get_search_client(force_refresh){let appname=appquery_default.appname(),client=search_clients[appname];return client!=null&&!force_refresh?client:(search_clients[appname]=(0,import_algoliasearch.default)(appquery_default.get_public_setting("general_keys.algolia_application_id"),appquery_default.get_public_setting("general_keys.algolia_search_key")),search_clients[appname])}init_workflow_utils();safe_register("./assert",assert_exports);safe_register("./box",box_exports);safe_register("./client_config",client_config_default2);safe_register("./languages",languages_exports);safe_register("./locations",locations_exports2);safe_register("./logger",logger_exports);safe_register("./util",util_exports);safe_register("./webfonts",webfonts_exports);safe_register("./apiconnectorbase",apiconnectorbase_exports2);safe_register("./client/analytics",analytics_exports);safe_register("./constants/apiconnectorbase",apiconnectorbase_exports);safe_register("./constants/app_json",app_json_exports);safe_register("./constants/auth",auth_exports);safe_register("./constants/composer",composer_exports);safe_register("./constants/core",core_exports);safe_register("./constants/db",db_exports);safe_register("./constants/domain",domain_exports);safe_register("./constants/elements",elements_exports);safe_register("./constants/fonts",fonts_exports);safe_register("./constants/known_plugins",known_plugins_exports);safe_register("./constants/locations",locations_exports);safe_register("./constants/plugin",plugin_exports);safe_register("./constants/runmode",runmode_exports);safe_register("./constants/special_keys",special_keys_exports);safe_register("./constants/subscriptions",subscriptions_exports);safe_register("./constants/test_apps",test_apps_exports);safe_register("./constants/time",time_exports);safe_register("./constants/workflow",workflow_exports);safe_register("./core/shared_fields",shared_fields_exports);safe_register("./core/status_bar",status_bar_exports);safe_register("./core/core_actions",core_actions_default);safe_register("./core/core_actions/utilities/core_actions_consts",core_actions_consts_default);safe_register("./core/core_actions/utilities/generic_actions_utilities",generic_actions_utilities_exports);safe_register("./core/core_btypes/utilities/numeric_format_utilities",numeric_format_utilities_exports);safe_register("./core/core_datasources",core_datasources_default);safe_register("./core/core_datasources/utilities/core_ds_db_ops_utilities",core_ds_db_ops_utilities_exports);safe_register("./core/core_datasources/utilities/core_ds_field_names",core_ds_field_names_exports);safe_register("./core/core_datasources/utilities/core_ds_workflow_utilities",core_ds_workflow_utilities_exports);safe_register("./core/core_elements/components/LegacyContainerComponent",LegacyContainerComponent_default);safe_register("./core/core_elements/core_elements_utilities/element_optional_utils",element_optional_utils_exports);safe_register("./core/core_elements/core_elements_utilities/element_registry",element_registry_exports);safe_register("./core/core_elements/core_elements_utilities/element_transformer",element_transformer_exports);safe_register("./core/core_elements/core_elements_utilities/element_utils",element_utils_exports);safe_register("./core/core_elements/core_elements_utilities/element_workflows",element_workflows_exports);safe_register("./core/core_elements/legacy/responsive_v0/element_modifications",element_modifications_exports);safe_register("./core/core_elements/legacy/responsive_v0/shared/icons",icons_exports);safe_register("./core/core_elements/shared/dropdowns",dropdowns_exports);safe_register("./core/core_elements/shared/groups",groups_exports2);safe_register("./core/core_elements/shared/icons",icons_exports2);safe_register("./core/core_elements/shared/image_utils",image_utils_exports);safe_register("./core/core_elements/shared/inputs",inputs_exports);safe_register("./core/core_elements/shared/pictureinputs",pictureinputs_exports);safe_register("./core/core_elements/shared/sliderinputs",sliderinputs_exports);safe_register("./core/core_events/event_element_mapping",event_element_mapping_exports);safe_register("./core/core_events",core_events_default);safe_register("./core/property_applications",property_applications_default);safe_register("./core/widgets",widgets_exports);safe_register("./db/db",db_default);safe_register("./db/hydrate",hydrate_exports);safe_register("./db/values/db_values",db_values_default);safe_register("./db/values/StaticObject",StaticObject);safe_register("./editor/css",css_exports);safe_register("./external",external_exports);safe_register("./geolocation/b_location",b_location_exports);safe_register("./lang/appquery",appquery_default);safe_register("./lang/btype_ids",btype_ids_exports);safe_register("./lang/btypes",btypes_exports);safe_register("./lang/color_tokens",color_tokens_exports);safe_register("./lang/lang",lang_default);safe_register("./lang/plugins",plugins_exports);safe_register("./lang/evaluation/element_edit_eval",element_edit_eval_exports);safe_register("./lang/evaluation/element_eval",element_eval_exports);safe_register("./lang/evaluation/element_props",element_props_exports);safe_register("./lang/evaluation/eval_node_state",eval_node_state_exports);safe_register("./lang/evaluation/node_eval",node_eval_exports);safe_register("./lang/evaluation/page_state",page_state_exports);safe_register("./lang/evaluation/state_keys",state_keys_default);safe_register("./lib",lib_default);safe_register("./monitoring/apm",apm_exports);safe_register("./services",services_exports);safe_register("./services/client/editor_utils",editor_utils_exports);safe_register("./services/shared/internal_service_registry",internal_service_registry_exports);safe_register("./services/shared/plugin_getter",plugin_getter_exports);safe_register("./services/shared/plugin_registry",plugin_registry_default);safe_register("./shared/domain_utilities",domain_utilities_exports);safe_register("./shared/environment_utilities",environment_utilities_exports);safe_register("./shared/external_api_utilities",external_api_utilities_exports);safe_register("./shared/payment_converter",payment_converter_exports);safe_register("./u/shared/decaf",decaf_exports);safe_register("./u/shared/async/b_fiber",b_fiber_exports);safe_register("./db/client_db",import_client_db.default);safe_register("./u/shared/async/autorun",autorun25);safe_register("./u/shared/async/b_async",b_async15);safe_register("./monitoring/utilities/memory",memory_exports);safe_register("./shared/trial_utilities",trial_utilities_exports);safe_register("./shared/stripe_utilities",stripe_utilities_exports);safe_register("./lang/evaluation/context",context_exports);safe_register("./shared/version_control/multiple_live_versions",multiple_live_versions_exports);safe_register("./shared/algolia_client",algolia_client_exports);safe_register("./lang/workflow/workflow_utils",workflow_utils_exports);if(typeof window<"u"){let moment11=require_moment_timezone_min();safe_register("moment",moment11)}init_u2();init_appquery();init_define_process_env();init_shim();init_define_process_env();init_shim();init_lib();init_define_process_env();init_shim();var import_web_dom_collections_iterator305=__toESM(require_web_dom_collections_iterator()),import_es_error_cause20=__toESM(require_es_error_cause()),LibFactory=class{constructor(){this._libCreators=new Map,this._libExtenders=new Map}registerLibCreator(libName,libCreator,libExtender){this._libCreators.set(libName,libCreator),libExtender&&this.registerLibExtender(libName,libExtender)}registerLibExtender(libName,libExtender){this._libExtenders.set(libName,libExtender)}_unpackAppname(libParams){if(libParams&&libParams.appname!=null&&typeof libParams.appname=="object"){let{appname,app_version,temp_db}=libParams.appname;libParams.appname=appname,libParams.app_version=app_version,libParams.temp_db=temp_db}return libParams}getLib(libName,libParams){let libCreator=this._libCreators.get(libName);if(libCreator)return libParams=this._unpackAppname(libParams),libCreator(libParams);throw new Error(`No lib creator registered for ${libName}`)}getPartialLib(libName,libParams){let libExtender=this._libExtenders.get(libName);if(libExtender)return libParams=this._unpackAppname(libParams),libExtender(libParams);throw new Error(`No lib extender registered for ${libName}`)}libCaller(params){return"wither"in params?params.wither(this.getLib(params.libName,params.libParams),params.fn):params.extender(this.getPartialLib(params.libName,params.libParams),params.fn)}},libFactory;function getLibFactory(){var _libFactory;return(_libFactory=libFactory)!=null||(libFactory=new LibFactory),libFactory}var LibContext=class{constructor(_libName){this._libName=_libName}get(){return getLibFactory().getLib(this._libName)}with(libParamsOrFn,fn){return getLibFactory().libCaller({libName:this._libName,libParams:fn?libParamsOrFn:void 0,fn:fn!=null?fn:libParamsOrFn,wither:lib_default.with_lib})}extend(libParamsOrFn,fn){return getLibFactory().libCaller({libName:this._libName,libParams:fn?libParamsOrFn:void 0,fn:fn!=null?fn:libParamsOrFn,extender:lib_default.extend})}ensure(libParamsOrFn,fn){return lib_default()?getLibFactory().libCaller({libName:this._libName,libParams:fn?libParamsOrFn:void 0,fn:fn!=null?fn:libParamsOrFn,extender:lib_default.extend}):getLibFactory().libCaller({libName:this._libName,libParams:fn?libParamsOrFn:void 0,fn:fn!=null?fn:libParamsOrFn,wither:lib_default.with_lib})}};var DefaultLib=new LibContext("default");init_epoch();init_lib();init_define_process_env();init_shim();var import_es_string_replace55=__toESM(require_es_string_replace()),import_web_dom_collections_iterator306=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_workflow();init_lib();init_appquery();var url6=__toESM(require_url());init_multiple_live_versions();var _status_messages={invalid:"Invalid login link.",user:"User attempting to login does not exist.",expired:"This link is expired or has already been used. Please request another.",robot:"Incompatible browser."};function valid_oauth2_state(state4){if(!state4)return!1;try{return json_parse(state4).oauth_provider}catch{return!1}}function valid_magic_link_state(state4){if(!state4)return!1;try{return json_parse(state4).magic_link_status}catch{return!1}}function onload(cb){var _query$state;let parsed_url=url6.parse(document.location.href,!0),{query}=parsed_url,original_query=json_deep_copy(query);if((_query$state=query.state)!=null&&_query$state.replace){let regex=/&#34;/g;query.state=query.state.replace(regex,'"')}query.state=decodeURIComponent(query.state);let data,run_id;if(query.oauth_provider)data=json_deep_copy(query),{run_id}=data,delete query.oauth_provider,delete query.run_id;else if(valid_oauth2_state(query.state)){var _data,_data$code;data=json_parse(query.state),(_data$code=(_data=data).code)!=null||(_data.code=query.code),delete query.state}else if(valid_magic_link_state(query.state)){var _status_messages$data;data=json_parse(query.state),delete query.state,delete parsed_url.search,lib_default().location.set_url_without_refresh({url:url6.format(parsed_url)});let alert_message=(_status_messages$data=_status_messages[data.magic_link_status])!=null?_status_messages$data:"Invalid login link.";core_events_default.handle_uncaught_error({original_error:new OwnerError(alert_message),caught_from:ERROR_SOURCES.ELEMENT_WORKFLOW,cb(err){err&&window.alert(alert_message)}}),cb==null||cb();return}else{cb==null||cb();return}let authenticator=get_oauth_authenticator(data.oauth_provider);if(authenticator==null){window.alert(lib_default().get_text("CORE","OAUTH_ISSUE")),cb==null||cb();return}for(let key of(_authenticator$get_pr=authenticator.get_property("additional_query_url_to_delete"))!=null?_authenticator$get_pr:[]){var _authenticator$get_pr;delete query[key]}delete query.code,delete query.resume_key,delete parsed_url.search,delete parsed_url.hash,lib_default().location.set_url_without_refresh({url:url6.format(parsed_url)});let resume_key=run_id||data.resume_key;if(!data.code&&!data.oauth_token){error("oauth login failed",{service_name:authenticator.id(),original_query});let error_message=lib_default().get_text("CORE","OAUTH_ISSUE")+authenticator.id()+". "+lib_default().get_text("CORE","TRY_AGAIN"),error2=new OwnerError(error_message);core_events_default.handle_uncaught_error({original_error:error2,caught_from:ERROR_SOURCES.ELEMENT_WORKFLOW,cb(err){err&&window.alert(human_friendly(err))}}),cb==null||cb();return}let data_for_login=authenticator.get_data_for_login(data);lib_default().workflow.resume(resume_key,data_for_login).callback(err=>{if(err&&core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.ELEMENT_WORKFLOW,cb(err2){err2&&window.alert(human_friendly(err2))}}),cb==null||cb(),!err&&data.oauth_provider.indexOf("apiconnector")===0&&is_debug_mode()&&!isLiveVersion(appquery_default.app_version())&&!authenticator.has_token_data()){let data_to_send_for_api_connector={api_id:data.oauth_provider,current_user_id:lib_default().current_user()._id(),appname:appquery_default.appname(),plugin:data.oauth_provider.indexOf("apiconnector2")===0?"apiconnector2":"apiconnector"};lib_default().location.post("server://api/1.1/u/save_owner_oauth_token",data_to_send_for_api_connector).callback(ignoreError(res=>{res===!0&&window.alert(`You have successfully initialized the OAuth2 connection for ${authenticator.display()}. You can go back to the Editor and keep building!`)}))}})}init_define_process_env();init_shim();var import_web_dom_collections_iterator307=__toESM(require_web_dom_collections_iterator());init_epoch2();init_epoch();init_db2();var render_start_timestamp,render_span;function render_start(epoch_name){if(render_start_timestamp=Date.now(),epoch_name){start(epoch_name);let span_details=SPANS.render;render_span=startSpan2(span_details.name,span_details.type,span_details.sync)}}var render_end_timestamp;function render_end(){endSpan2(render_span),render_end_timestamp=Date.now(),window.render_end_timestamp=render_end_timestamp}var fully_loaded_timestamp;function fully_loaded(){var _window$performance2,_window$performance$t,_window$performance22,_window$performance2$;fully_loaded_timestamp=Date.now(),end();let page_data=global_data_items_loaded,start_time=(_window$performance2=window.performance)==null||(_window$performance$t=_window$performance2.timing)==null?void 0:_window$performance$t.fetchStart,html_loaded=(_window$performance22=window.performance)==null||(_window$performance2$=_window$performance22.timing)==null?void 0:_window$performance2$.responseEnd;if(!start_time||!html_loaded)return;let page_html=html_loaded-start_time,page_render_start=render_start_timestamp-start_time,page_render=render_end_timestamp-start_time,page_full=fully_loaded_timestamp-start_time;if(window._bubble_page_load_data==null)return;let{pre_run_js,run_js_start,post_run_js,static_js_start,dynamic_js_start,pre_static_js,pre_dynamic_js}=window._bubble_page_load_data,run_js_perf,run_js_page_perf,packager_size,run_js_size;for(let entry of(_window$performance$g=(_window$performance$g2=(_window$performance3=window.performance).getEntriesByType)==null?void 0:_window$performance$g2.call(_window$performance3,"resource"))!=null?_window$performance$g:[]){var _window$performance$g,_window$performance$g2,_window$performance3;let performanceResourceTiming=entry;if(performanceResourceTiming.name.includes("/package/run_js/")){var _run_js_perf,_run_js_size;(_run_js_perf=run_js_perf)!=null||(run_js_perf=[]),(_run_js_size=run_js_size)!=null||(run_js_size=0),run_js_perf.push(performanceResourceTiming),run_js_size+=performanceResourceTiming.encodedBodySize}else performanceResourceTiming.name.includes("/package/run_js_page/")&&(run_js_page_perf=performanceResourceTiming);if(performanceResourceTiming.name.includes("/package/run_js/")){var _packager_size;(_packager_size=packager_size)!=null||(packager_size=0),packager_size+=performanceResourceTiming.encodedBodySize}}let total=page_full,to_percent=x=>Math.round(x*1e3/total)/10;function add_request_info(breakdown,start3,perf_object){if(typeof performance.now!="function"||perf_object==null)return;let start_timestamp=start3-window.performance.timing.fetchStart,request=0,download=0,perf_objects=Array.isArray(perf_object)?perf_object:[perf_object];for(let entry of perf_objects)request=Math.max(request,entry.responseStart-start_timestamp),download=Math.max(download,entry.responseEnd-Math.max(start_timestamp,entry.responseStart));breakdown.request=to_percent(request),breakdown.download=to_percent(download)}let run_js_dl_total=run_js_start-pre_run_js,runjs_download_and_parse={total:to_percent(run_js_dl_total)};add_request_info(runjs_download_and_parse,pre_run_js,run_js_perf);let static_js_dl_total=static_js_start-pre_static_js,dynamic_js_dl_total=dynamic_js_start-pre_dynamic_js,staticjs_download_and_parse={total:to_percent(static_js_dl_total)},dynamicjs_download_and_parse={total:to_percent(dynamic_js_dl_total)};add_request_info(staticjs_download_and_parse,post_run_js,run_js_page_perf),add_request_info(dynamicjs_download_and_parse,post_run_js,run_js_page_perf);let measures={page_data,page_html,page_render_start,page_render,page_full};return packager_size!=null&&(measures.packager_size=packager_size),run_js_size!=null&&(measures.run_js_size=run_js_size),measures}init_define_process_env();init_shim();init_u2();init_btypes();init_appquery();init_apps_utilities();var client_db5=__toESM(require_client_db());init_define_process_env();init_shim();init_define_process_env();init_shim();var import_web_dom_collections_iterator308=__toESM(require_web_dom_collections_iterator()),import_es_error_cause21=__toESM(require_es_error_cause()),initialize_globals=function(){if(typeof window>"u")return;let to_define=["window","document","navigator"];for(let name of to_define){var _global3,_global$name;(_global$name=(_global3=window)[name])!=null||(_global3[name]=void 0)}},initialize2=function(){Error.stackTraceLimit=50,initialize_globals()};init_logger();var logging_medium_exports={};__export(logging_medium_exports,{fiber_wrapper:()=>fiber_wrapper,is_ignorable_error:()=>is_ignorable_error,is_test_failure:()=>is_test_failure,log:()=>log2});init_define_process_env();init_shim();var import_es_error_cause22=__toESM(require_es_error_cause());init_lib();init_client_config2();init_async_state3();init_b_object();init_errors();init_define_process_env();init_shim();var import_web_dom_collections_iterator309=__toESM(require_web_dom_collections_iterator()),import_es_array_at3=__toESM(require_es_array_at()),import_es_string_at_alternative3=__toESM(require_es_string_at_alternative()),import_es_string_replace56=__toESM(require_es_string_replace()),util4=__toESM(require_util());init_errors();init_logging();function level_gte(l1,l2){return LEVEL_SEVERITY[l1]>=LEVEL_SEVERITY[l2]}init_mode_check();init_test_state();init_uuid();init_appquery();init_u2();init_feature_check();var page_load_time2=Date.now(),MAPPING={debug:"debug",verbose:"debug",info:"info",warn:"warn",error:"error",fatal:"error"},USER_TO_OWNER={user_error:"info",owner_warn:"warn",owner_error:"error"},messages_count={},total_messages=0,session_count=0,debugger_unexpected=!1,rate_limited=!1;function rl_message(){rate_limited||(rate_limited=!0,console.warn("Note: we are hiding further messages to avoid excess logging"))}var fiber_wrapper=fn=>fn;function is_ignorable_error(){return!1}function is_test_failure(message,level){return level_gte(level,"error")&&(message instanceof Error||typeof message=="string")}function log2(level,message,data){var _messages_count$messa,_data$tags,_data,_data$code,_Lib$location,_Lib$location$my_loca;if((_messages_count$messa=messages_count[message])!=null||(messages_count[message]=0),messages_count[message]>=5){rl_message();return}if(total_messages>=20){rl_message();return}messages_count[message]++,total_messages++;let user_level=USER_TO_OWNER[(_data$tags=data.tags)==null?void 0:_data$tags.user_level];if((_data$code=(_data=data).code)!=null||(_data.code=UUID()),user_level||level_gte(level,client_config_default2.browser_console_log_level)){var _console$MAPPING$cons,_console$MAPPING$cons2,_navigator;let console_level=user_level!=null?user_level:level,log_fn=(_console$MAPPING$cons=(_console$MAPPING$cons2=console[MAPPING[console_level]])==null?void 0:_console$MAPPING$cons2.bind(console))!=null?_console$MAPPING$cons:console.log.bind(console),to_log;if(user_level){var _data$display;data.element_instance!=null?to_log=`Element ${data.element_instance.element.get_name()} - `:data.event?to_log=`Event ${data.event.display()} - `:data.action?to_log=`Action ${data.action.display()} - `:to_log="",data.prop_name&&(to_log+=data.prop_name+" "),to_log+=(_data$display=data.display)!=null?_data$display:message}else message!=null?(to_log=message,typeof data.stack=="string"&&(to_log=[to_log].concat(data.stack.split(`
`).slice(1)).join(`
`)+`
`)):to_log=data.stack;let data_to_log=extend({},data);delete data_to_log.stack,delete data_to_log.tags,delete data_to_log.display,/Bubble Tests/.test((_navigator=navigator)==null?void 0:_navigator.userAgent)&&(data_to_log.bubble_level=level),to_log[-1]!==`
`&&(to_log+=`
`),log_fn(to_log,data_to_log)}if(level_gte(level,"warn")&&all_page_errors.push({message,stack:data.stack,data,level}),lib_default().workflow.debugger&&level_gte(user_level,"warn")){var _data$action,_Lib$workflow$debugge;let debugger_message,type;if(user_level){var _data$display2;debugger_message=(_data$display2=data.display)!=null?_data$display2:message}else{if(debugger_unexpected)return;debugger_unexpected=!0,debugger_message=`Sorry, we have encountered an unexpected error. Please <a href='https://bubble.io/bug-report?app=${appquery_default.appname()}&fiber=${data.code}' class="click-for-bug-report" target="_blank">click here to file a bug report</a>, including error code ${data.code} and a step-by-step explanation of how to reproduce this issue.`}data.event?type="workflow":data.action?type="action":data.element_instance?type="element":level_gte(user_level!=null?user_level:level,"error")?type="general":type="warning";let instance4=(_data$action=data.action)!=null?_data$action:data.element_instance,{event}=data,{prop_name}=data,error2={message:debugger_message};(_Lib$workflow$debugge=lib_default().workflow.debugger)==null||_Lib$workflow$debugge.report_error({type,instance:instance4,event,prop_name,error:error2})}if(data.server_generated||!level_gte(level,"info"))return;data=clean_args({args:data});let mode;is_edit_mode()?mode=is_plugin_edit_mode()?"plugin":"edit":mode="run";let body={level,message,data,server_connection_problems:async_state_default3.server_connection_problems,session_count,js_user_agent:window.navigator.userAgent,page_load_time:page_load_time2,client_commit_sha:client_config_default2.commit_sha,client_commit_timestamp:client_config_default2.commit_timestamp,client_page_url:(_Lib$location=lib_default().location)==null||(_Lib$location$my_loca=_Lib$location.my_location)==null?void 0:_Lib$location$my_loca.call(_Lib$location),client_app_version:lib_default().app_version(),mode};level_gte(level,"error")&&session_count++;function cb(err){if(err){if(offlineSupportEnabled()&&err instanceof OfflineError)return;console.error(err)}}lib_default().location.request("server-canonical://bug/client_log","POST",body,cb,null,data.code)}init_define_process_env();init_shim();init_lib();init_time();init_clientApm();var APM_FLUSH_INTERVAL=1e3*2;function start2(){flushApmData()}function flushApmData(){let completedTransactions=getCompletedTransactions();completedTransactions.length&&(lib_default().location.post("server://user/apm",{completedTransactions,apm:!0}),clearCompletedTransactions()),setTimeout(flushApmData,APM_FLUSH_INTERVAL)}init_define_process_env();init_shim();init_web();var import_web_dom_collections_iterator310=__toESM(require_web_dom_collections_iterator()),events6=__toESM(require_events());init_web();init_epoch();init_server_rendering();init_appquery();init_ElementInstance();init_rendering_perf();init_lib();init_drawstate();init_u2();init_epoch2();function initialize3(){set_responsive_container(ResponsiveContainer2)}var ElementService=class extends events6.EventEmitter{constructor(ready_checker){super(),this.ready_key=void 0,this.ready_checker=void 0,this._page=void 0,this.new_rendering=!1,this.ready_key=u_exports2.MakeKey(void 0,"ElementService ready"),this.ready_checker=ready_checker}display(page_element){let responsive_version=page_element.get_responsive_version();addEpochLabels({responsive_version});let root_container;responsive_version>0?root_container=new ResponsiveContainer2(null,$("body")):page_element.use_responsive_algorithm()?root_container=new Container(null,$("body")):root_container=new OldContainer(null,$("body")),checkNonDeferrable(page_element);let page_instance=new ElementInstance_default(page_element,ElementInstance_default.modes.RUN);page_instance.split_namespace(),page_instance.register(),this._page=page_instance;let span2=SPANS.page_draw,perf_labels=measure_initial_draw({deferred_drawing_enabled:!0},()=>traceSpan2(span2.name,span2.type,()=>{if((appquery_default.has_feature_enabled("react_upgrade")||appquery_default.get_public_setting("bubble_version")>=21||appquery_default.get_public_setting("bubble_version")===20&&page_instance.get_static_property("page_version_21_upgrade")===!0||lib_default.or_throw().location.get_query().new_elements_rendering)&&typeof render=="function")if(this.new_rendering=!0,getComputedStyle(document.body).getPropertyValue(CSS_FLAG)?window._bubble_watcher_cache!=null&&document.documentElement.classList.add(ROOT_CLASS):delete window._bubble_watcher_cache,responsive_version>0){page_instance.create_draw_signals();let cleanup=render(()=>createComponent(RenderElement,{instance:page_instance}),document.body);page_instance.on_destroy(cleanup)}else page_instance.create_skeleton(root_container);else page_instance.create_skeleton(root_container);page_instance.start_draw_tree(),page_instance.ensure_drawn()}));addEpochLabels(perf_labels),setTimeout(()=>{this.ready_key.turn()})}render_new_reusable(instance4,container_canvas){render(()=>instance4.children.map(child=>createComponent(RenderElement,{instance:child})),container_canvas[0])}_loading_key(entire_page){return entire_page?"page_done_loading_entire":"page_done_loading"}on_page_done_loading(entire_page,fn){let watcher=u_exports2.Watcher(()=>this.page_done_loading(this._page,entire_page));watcher.on_value(val=>{val&&(fn(),watcher.destroy())})}page_done_loading(page_instance,entire_page){let key=this._loading_key(entire_page),result=page_instance.state(key);return result!=null?result:(page_instance.state(key,!1),this._check_if_page_is_done(page_instance,entire_page,!0))}_check_if_page_is_done(page_instance,entire_page,first_time){let is_finished=instance4=>{if(this.ready_checker.shouldSkip(instance4,entire_page))return null;for(let v of Object.values((_instance$_watchers=instance4._watchers)!=null?_instance$_watchers:{})){var _instance$_watchers;if(v==null)continue;let watcher_status=v.get_current_status();if(watcher_status.status==="not_ready"&&watcher_status.ready_keys!=null)return watcher_status.ready_keys}let has_children=instance4.element.can_have_children();if(instance4.is_ready&&!has_children)return null;let children_key=instance4.get_children_drawn_key();if(!children_key.is_turned())return children_key;for(let child of instance4.current_children){let key=is_finished(child);if(key)return key}return null},do_check=()=>{let key=is_finished(page_instance);return key==null?(page_instance.state(this._loading_key(entire_page),!0),!0):(u_exports2.WaitFor(key,this._check_if_page_is_done.bind(this,page_instance,entire_page)),!1)};return first_time&&this.ready_key.is_turned()&&page_instance.get_skeleton_ready_key().is_turned()?do_check():(u_exports2.WaitFor(this.ready_key,page_instance.get_skeleton_ready_key(),()=>{setTimeout(do_check,100)}),!1)}get_page(){return this._page}};init_auth();init_define_process_env();init_shim();var import_web_dom_collections_iterator325=__toESM(require_web_dom_collections_iterator());init_define_process_env();init_shim();var import_web_dom_collections_iterator311=__toESM(require_web_dom_collections_iterator());init_u2();init_plugin2();init_service_type_parser();init_plugin_getter();init_errors();var all_plugins=null,by_type={element:{},event:{},action:{},btype:{},datasource:{}},type_to_prefix={element:"Element",event:"Event",action:"Action",btype:"Btype",datasource:"Datasource",module:"Module"},prefix_to_type={};for(let[type,prefix]of Object.entries(type_to_prefix))prefix_to_type[prefix]=type;function load_plugin(name,miss_okay,no_cache){var _miss_okay;if((_miss_okay=miss_okay)!=null||(miss_okay=!1),!all_plugins)throw new UnexpectedError("Loading a plugin before the loader was initialized");if(name.slice(0,7)===type_to_prefix.module+":")return load_module(name.slice(7));let p=all_plugins[name];if(!p){let[prefix,...rest]=name.split(":"),suffix=rest.join(":"),type=prefix_to_type[prefix];if(type){var _by_type$type;p=(_by_type$type=by_type[type])==null?void 0:_by_type$type[suffix],p&&(all_plugins[name]=p)}}if(!p){let el_prefix=type_to_prefix.element+":",act_prefix=type_to_prefix.action+":",evt_prefix=type_to_prefix.event+":";if(name.startsWith(el_prefix)){let element_type=name.split(el_prefix)[1],[plugin_name,element_name]=get_plugin_and_type(element_type);if(element_name){var _plugin_getter$get_pl;p=(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_element(element_type,no_cache)}}else if(name.startsWith(act_prefix)){let action_type=name.split(act_prefix)[1],[plugin_name,action_name]=get_plugin_and_type(action_type);if(action_name){var _plugin_getter$get_pl2;p=(_plugin_getter$get_pl2=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl2.get_action(action_type)}}else if(name.startsWith(evt_prefix)){let event_type=name.split(evt_prefix)[1],[plugin_name]=get_plugin_and_type(event_type);if(event_type){var _plugin_getter$get_pl3;p=(_plugin_getter$get_pl3=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl3.get_event(event_type)}}}if(!p){if(miss_okay)return null;throw new UnexpectedError(MISSING_PLUGIN+" "+name)}return p.plugin_retrieved_name=name,p}function inject_dependencies(_by_type){if(!all_plugins){by_type=_by_type,all_plugins={};for(let[type,core_module]of Object.entries(by_type)){let prefix=type_to_prefix[type];for(let[k,v]of Object.entries(core_module))all_plugins[`${prefix}:${k}`]=v}}}function load_module(name){return safe_require("./optional/"+name)}init_define_process_env();init_shim();var import_web_dom_collections_iterator324=__toESM(require_web_dom_collections_iterator());init_builtins();init_btypes_registry();init_define_process_env();init_shim();var import_es_string_replace59=__toESM(require_es_string_replace()),import_web_dom_collections_iterator315=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_btype_ids();init_eval();init_logger();init_define_process_env();init_shim();init_lib();var autorun26=__toESM(require_autorun());init_btypes();init_uuid();init_regexUtilities();var MAX_SLUG_LENGTH=250,looks_like_id=re`^(.*-)?${contains_uuid_regexp}$`;function bad_slug_formatting_message(slug_value){if(slug_value.length>MAX_SLUG_LENGTH)return`The slug value that you have entered contains more than ${MAX_SLUG_LENGTH} characters. A slug should have less than ${MAX_SLUG_LENGTH} characters.`;if(slug_value.match(looks_like_id))return"The slug value that you have entered is not correctly formatted. A slug can't end with a Thing's unique ID.";let canonical_slug_value=make_URL_friendly_string(slug_value,MAX_SLUG_LENGTH);return slug_value!==canonical_slug_value?"The slug value that you have entered is not correctly formatted. A slug should be composed of only lowercase letters, digits, or hyphens.":null}function get_thing_from_slug(_ref){let{appname,app_version,type,slug_value,ignore_privacy_rules}=_ref;return type==null||slug_value==null?null:lib_default.extend({appname,app_version,ignore_privacy_rules},()=>{var _value$custom_type,_found_thing_with_slu;let value=get5(type);if(!(value!=null&&(_value$custom_type=value.custom_type())!=null&&_value$custom_type.exists()))return null;let found_thing_with_slug=lib_default().db_instance().find(type,[{key:"Slug",constraint_type:"equals",value:slug_value}]).get_children(0,1);return(_found_thing_with_slu=found_thing_with_slug==null?void 0:found_thing_with_slug[0])!=null?_found_thing_with_slu:null})}function get_thing_id_from_slug(_ref2){let{appname,app_version,type,slug_value,ignore_privacy_rules}=_ref2,found_thing_with_slug=get_thing_from_slug({appname,app_version,type,slug_value,ignore_privacy_rules});if(found_thing_with_slug!=null)return found_thing_with_slug.id;let sample=get5(type).get_sample();return slug_value===(sample==null?void 0:sample.child("Slug").get())?sample._id():null}function is_slug_unique(_ref3){let{appname,app_version,type,slug_value,thing,ignore_privacy_rules}=_ref3;if(slug_value==null||slug_value==="")return!0;let thing_id_from_slug=get_thing_id_from_slug({appname,app_version,type,slug_value,ignore_privacy_rules});return thing_id_from_slug!=null?(thing==null?void 0:thing._id())===thing_id_from_slug:!0}function is_slug_valid(appname,app_version,type,slug_value,thing){return slug_value==null||slug_value===""?!0:bad_slug_formatting_message(slug_value)!=null?!1:is_slug_unique({appname,app_version,type,slug_value,thing})}function create_slug_watcher(){let page_thing_watcher=autorun26.Watcher(()=>lib_default().pageparam.get()),watching_id=null,slug_watcher=null;page_thing_watcher.on_value(thing=>{var _slug_watcher;(_slug_watcher=slug_watcher)==null||_slug_watcher.destroy(),thing!=null&&lib_default().location.get_slug_in_url()!=null?(watching_id=thing.id,slug_watcher=autorun26.Watcher(()=>thing.child("Slug").get()),slug_watcher.on_value(slug_value=>{let new_identifier;if(watching_id!==thing.id)return;if(slug_value!=null&&slug_value!=="")new_identifier=slug_value;else{var _slug_watcher2;let page_name=lib_default().location.get_underlying_page(),page2=lib_default().app().get_page_by_name(page_name);new_identifier=get_data_to_send(thing,page2.get_static_property("readable_field")),(_slug_watcher2=slug_watcher)==null||_slug_watcher2.destroy(),watching_id=null,slug_watcher=null}let pieces=lib_default().location.get_pieces();if(pieces.path[1]!==new_identifier){pieces.path[1]=new_identifier;let new_url=lib_default().location.format_pieces(pieces);lib_default().location.set_url_without_refresh({url:new_url})}})):(watching_id=null,slug_watcher=null)})}init_btypes();init_lib();init_sample();init_hydrate();init_list_utilities();init_mode_check();init_postgres_constraints();init_define_process_env();init_shim();var import_web_dom_collections_iterator313=__toESM(require_web_dom_collections_iterator()),import_es_string_replace58=__toESM(require_es_string_replace());init_u2();init_b_object();init_errors();init_mode_check();var b_async16=__toESM(require_b_async()),autorun27=__toESM(require_autorun());init_b_ui();init_incremental();init_caching();init_lib();init_appquery();init_define_process_env();init_shim();init_u2();init_define_process_env();init_shim();var import_web_dom_collections_iterator312=__toESM(require_web_dom_collections_iterator()),import_es_string_replace57=__toESM(require_es_string_replace()),__default={message:"Initial API Version",changelog:[],date:1477087595e3,fix_server_dates:!1,fix_server_field_types:function(types){Object.entries(types).forEach(_ref=>{let[field,type]=_ref;types[field]=type.replace("Date","String")})},old_server_list:!0};init_define_process_env();init_shim();var __default2={message:"Updated server-side actions API to match client-side one",changelog:["Changed List.get() for server-side actions to be (start, length), just like client-side actions, instead of (start, end)","Dates now get correctly passed in as Javascript Date objects on the server, instead of Strings"],date:1598479637e3,bubble_props_as_functions:!1};init_define_process_env();init_shim();var __default3={message:"Changed properties object from static properties to functions",changelog:["Changed properties object from static properties to get functions; this allows plugin elements ","to be defined with conditional properties that depend on the element's own states","state without throwing a recursion error."],date:1605784035408,responsive_version:0};init_define_process_env();init_shim();var __default4={message:"Updated plugin editor to the new responsive engine",changelog:["Changed the properties exposed on properties.bubble to the new responsive properties","Added options for elements to fit width or fit height","Can still access width/height to re-run update function on resize","On legacy engine, plugin elements should still work"],date:1648335983613};init_define_process_env();init_shim();var alpha_default={message:"Updated plugins to run on node 18",changelog:["Moved context.request and context.async to context.v3 and they now return promises","Modified .get and .length to return promises","Added a utility method getAll() and a field id","Made lists implement AsyncIterable interface","Addded isBubbleThing and isBubbleList in place of single_api and list_api. single_api and list_api are still present","Added getThingById and getThingsById to the context object","See forum post here: https://forum.bubble.io/t/alpha-invite-for-plugin-developers-bubble-plugin-api-version-4/262297"],date:1680546487e3};init_define_process_env();init_shim();var __default5={message:"Updated plugins to run on node 18",changelog:["Moved context.request and context.async to context.v3 and they now return promises","Modified .get and .length to return promises","Added a utility method getAll() and a field id","Made lists implement AsyncIterable interface","Addded isBubbleThing and isBubbleList in place of single_api and list_api. single_api and list_api are still present","Added getThingById and getThingsById to the context object"],date:1686667570313};var _versions=null,plugin_versions=["0","1","2","3","4_alpha","4"];function to_name(i){return plugin_versions[i]}var _raw={};_raw[0]=__default;_raw[1]=__default2;_raw[2]=__default3;_raw[3]=__default4;_raw["4_alpha"]=alpha_default;_raw[4]=__default5;function get_pv(version2){return _versions||init2(),_versions[version2!=null?version2:"0"]}function _get_pv(i){return _raw[i]}function init2(){let processing=(init_latest(),__toCommonJS(latest_exports)).default;_versions={};for(let i=plugin_versions.length;i>=0;i--)processing=_versions[to_name(i)]=extend({},processing,_get_pv(to_name(i)))}init_property_applications();init_btypes();init_b_location();init_service_type_parser();init_logger();init_plugin();init_responsive_layout();init_element_eval();init_element_props();init_decaf();init_btype_ids();init_color_tokens();init_mode_check();var _dec14,_dec26,_class61;function _applyDecoratedDescriptor13(target,property2,decorators,descriptor,context){var desc={};return Object.keys(descriptor).forEach(function(key){desc[key]=descriptor[key]}),desc.enumerable=!!desc.enumerable,desc.configurable=!!desc.configurable,("value"in desc||desc.initializer)&&(desc.writable=!0),desc=decorators.slice().reverse().reduce(function(desc2,decorator){return decorator(target,property2,desc2)||desc2},desc),context&&desc.initializer!==void 0&&(desc.value=desc.initializer?desc.initializer.call(context):void 0,desc.initializer=void 0),desc.initializer===void 0&&(Object.defineProperty(target,property2,desc),desc=null),desc}var PREDEFINED_BTYPE_TYPES=["text","number","number_range","boolean","image","file","geographic_address","date","date_range","user"],plugin_execution_time={};function get_plugin_execution_time(){return plugin_execution_time}function can_use_message(btype_id,_message_name){let m=get5(btype_id).get_message(_message_name);return(m.is_lookup()||m.public_for_plugins())&&!m.is_not_found()}function get_ListProperties(btype_id){return get5(btype_id).plugin.get_message_names().filter(with_pause_tick(msg=>can_use_message(btype_id,msg)),5)}var EDITORS_WITH_DEFAULTS={StaticText:!0,StaticNumber:!0,Checkbox:!0,Color:!0,Dropdown:!0,Image:!0,key_value_list:!1},BTYPES_WITH_DEFAULTS={text:!0,number:!0,boolean:!0,image:!0,file:!0,geographic_address:!1};function property_uses_default(editor_type,btype,is_list2){var _BTYPES_WITH_DEFAULTS;return EDITORS_WITH_DEFAULTS[editor_type]!=null?EDITORS_WITH_DEFAULTS[editor_type]:is_list2?!1:(_BTYPES_WITH_DEFAULTS=BTYPES_WITH_DEFAULTS[btype])!=null?_BTYPES_WITH_DEFAULTS:!1}var function_regex=PLUGIN_FUNCTION_REGEX;function extract_code(string,source_name){var _string,_string$match,_string2;string=(_string=string)==null?void 0:_string.trim();let[fn_name,vars]=(_string$match=(_string2=string)==null?void 0:_string2.match(function_regex))!=null?_string$match:[],code=string.split(fn_name).slice(1).join(fn_name);return code=code.split("{").slice(1).join("{").split("}").slice(0,-1).join("}"),code+=`
`,code+=`//# sourceURL=${PLUGIN_CODE_SRC_PREFIX}${source_name.replace(/[^\w/]/g,"-")}.js`,{vars,code}}function create_code(string,source_name,cb,code_modif_fn){let build_code_start=Date.now();try{var _plugin_execution_tim;let{vars,code}=extract_code(string,source_name);code_modif_fn&&(code=code_modif_fn(code));let func=new Function(vars,code),build_code_end=Date.now();return plugin_execution_time[`${source_name}`]=(_plugin_execution_tim=plugin_execution_time[`${source_name}`])!=null?_plugin_execution_tim:0,plugin_execution_time[`${source_name}`]+=build_code_end-build_code_start,function(){let run_code_start=Date.now();try{return func(...arguments)}finally{let run_code_end=Date.now();plugin_execution_time[`${source_name}`]+=run_code_end-run_code_start}}}catch(error2){return cb(error2),null}}function get_keys(api_data,html_header,shared_keys){let keys2={};switch(api_data==null?void 0:api_data.auth){case"private_key_url":case"private_key_header":Object.assign(keys2,{appsecret:{caption:"API Key",type:"secure"}});break;case"oauth2_pw":case"basic_auth":Object.assign(keys2,{appid:{caption:"Username",type:"client_safe"},appsecret:{caption:"Password",type:"secure"}});break;case"jwt":Object.assign(keys2,{iss:{caption:"Iss (account email)",type:"client_safe"},private_key:{caption:"Private key (between -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----)",type:"secure",editor:"MultilineTextBox"}});break;case"cert_key":Object.assign(keys2,{cert_file:{caption:"Certificate file content",type:"secure",editor:"MultilineTextBox"},key_file:{caption:"Key file content",type:"secure",editor:"MultilineTextBox"}});break;case"oauth2_custom":{for(let type of["body_params","headers"])for(let id in(_api_data$calls=api_data.calls)==null||(_api_data$calls$token=_api_data$calls.token_call)==null?void 0:_api_data$calls$token[type]){var _api_data$calls,_api_data$calls$token,_api_data$calls2,_api_data$calls2$toke;let{key,visibility}=(_api_data$calls2=api_data.calls)==null||(_api_data$calls2$toke=_api_data$calls2.token_call)==null?void 0:_api_data$calls2$toke[type][id];if(key!=null&&visibility==="secret"){let param_name=user_friendly_parameter_names2[type];Object.assign(keys2,{[`token_call_${type}_${id}`]:{caption:`${key} ${param_name} (token call)`,type:"secure"}})}}break}case"oauth2_user":Object.assign(keys2,{appid:{caption:"App ID/API Key",type:"client_safe"},appsecret:{caption:"App Secret",type:"secure"}});break}for(let id in html_header==null?void 0:html_header.params){let{key}=html_header==null?void 0:html_header.params[id];Object.assign(keys2,{[`header_${id}`]:{caption:key+" (headers)",type:"client_safe"}})}Object.assign(keys2,shared_keys);for(let type of["shared_headers","shared_params"])for(let param_id in api_data==null?void 0:api_data[type]){let param_data=api_data==null?void 0:api_data[type][param_id];(param_data==null?void 0:param_data.visibility)==="secret"&&param_data.key&&(keys2[type+"_"+param_id]={caption:param_data.key+" "+user_friendly_parameter_names2[type],type:"secure"})}for(let call_id in api_data==null?void 0:api_data.calls){let call_data=api_data==null?void 0:api_data.calls[call_id];if(call_data.initialized&&call_id!=="token_call")for(let type of["url_params","headers","params","body_params"])for(let param_id in call_data[type]){let param_data=call_data[type][param_id];(param_data==null?void 0:param_data.visibility)==="secret"&&param_data.key&&(keys2[call_id+"_"+type+"_"+param_id]={caption:call_data.name+" - "+param_data.key+" "+user_friendly_parameter_names2[type],type:"secure"})}}return keys2}var can_use_original=!1;function get_original(obj){try{var _obj$__original;return can_use_original=!0,obj==null||(_obj$__original=obj.__original)==null?void 0:_obj$__original.call(obj)}finally{can_use_original=!1}}var api_key_prefix="_p_",_uploaded_files={},_upload_file_queues={},_currently_uploading={};function calculate_file_hash(_ref){var _get_original,_get_original$_id;let{file,fileName,contents,attach_to}=_ref;return(file?file.name+"_"+file.lastModified:fileName+"_"+contents)+"_"+((_get_original=get_original(attach_to))==null||(_get_original$_id=_get_original._id)==null?void 0:_get_original$_id.call(_get_original))}function add_to_upload_queue(plugin_name,data){var _upload_file_queues$p;let hash2=plugin_name+"_"+calculate_file_hash(data);if(_uploaded_files[hash2]){var _data$callback;(_data$callback=data.callback)==null||_data$callback.call(data,null,_uploaded_files[hash2]);return}(_upload_file_queues$p=_upload_file_queues[plugin_name])!=null||(_upload_file_queues[plugin_name]=[]),_upload_file_queues[plugin_name].push(data),check_if_we_can_upload_and_do_it(plugin_name)}function check_if_we_can_upload_and_do_it(plugin_name){if(!_currently_uploading[plugin_name]&&_upload_file_queues[plugin_name].length){let do_next2=function(){_upload_file_queues[plugin_name]=_upload_file_queues[plugin_name].slice(1),_upload_file_queues[plugin_name].length<50?(_currently_uploading[plugin_name]=!1,check_if_we_can_upload_and_do_it(plugin_name)):setTimeout(()=>{_currently_uploading[plugin_name]=!1,check_if_we_can_upload_and_do_it(plugin_name)},1e3*_upload_file_queues[plugin_name].length*100)};var do_next=do_next2;let data=_upload_file_queues[plugin_name][0],{file,fileName,contents,callback,attach_to,callback_progress,instance:instance4}=data,hash2=plugin_name+"_"+calculate_file_hash(data);if(_uploaded_files[hash2])callback==null||callback(null,_uploaded_files[hash2]),do_next2();else{let get_additional_data2=function(cb){if(attach_to){var _get_original2,_get_original2$_id;let thing_id=(_get_original2=get_original(attach_to))==null||(_get_original2$_id=_get_original2._id)==null?void 0:_get_original2$_id.call(_get_original2);if(thing_id)cb(null,{attach_to:thing_id});else{let err=new UnexpectedError("Trying to attach an upload to a non Bubble thing");throw cb(err),err}}else cb(null,{})},cb_success2=function(uploaded_url){_uploaded_files[plugin_name+"_"+fileName+"+"+contents]=uploaded_url,callback==null||callback(null,uploaded_url),do_next2()},cb_fail2=function(err){callback==null||callback(err),do_next2()};var get_additional_data=get_additional_data2,cb_success=cb_success2,cb_fail=cb_fail2;_currently_uploading[plugin_name]=!0;let cb_start=void 0;file?upload_file2(file,instance4,get_additional_data2,cb_success2,cb_start,cb_fail2,progress=>callback_progress==null?void 0:callback_progress(progress)):upload_file({contents},void 0,get_additional_data2,cb_success2,cb_start,cb_fail2,void 0,fileName)}}}var ThirdPartyPluginWrapper=(_dec14=cached({type:AUTORUN}),_dec26=cached({type:AUTORUN}),_class61=class extends Service{calls(){let calls={},api_data=this.get_api(),{name}=this;api_data.auth==="oauth2_user"&&(calls.oauth_user_data_call=class extends Call{get human(){return api_data.human}get _must_proxy(){return!0}get btype_id(){return api_type(`${name}.oauth_profile`)}build(prev,properties){return{path:api_data.oauth_user_data_call}}});for(let call_id in api_data.calls){let call_data=api_data.calls[call_id];calls[call_id]=call_data,this.is_testing()?calls[call_id].api_human=api_data.human+" (testing)":calls[call_id].api_human=api_data.human,calls[call_id].api_id=this.name}return calls}get_call_class(call_name){let call_data=this.calls()[call_name];return call_name==="oauth_user_data_call"?call_data:get_call_from_raw2(call_name,call_data)}handle_request_failures(error2){return handle_request_failures(error2)}get_error_message(response,call){return get_error_message2(response,call,!0)}get dynamic_calls(){return!0}constructor(name,version2,raw){var _this$raw$human;super(),this.name=name,this.version=version2,this.raw=raw,this.human=(_this$raw$human=this.raw.human)!=null?_this$raw$human:this.get_api().human,this.is_testing()&&(this.human+=" (testing)"),this.pv=get_pv(this.get_plugin_api_version())}get_plugin_api_version(){var _this$raw$dependencie;let plugin_version=(_this$raw$dependencie=this.raw.dependencies)==null?void 0:_this$raw$dependencie.plugin_api_version;return plugin_version?String(plugin_version):"0"}is_testing(){return this.version==="current"}response_to_data(data,response,data_type,call){var _data_type;(_data_type=data_type)!=null||(data_type="json");let body=super.response_to_data(data,response,data_type,call,call==null?void 0:call.wrap_error);if(call!=null&&call.get_headers||call!=null&&call.wrap_error){let{headers}=response;return{body,headers}}return body}get_api(){if(!this._processed_raw_api){var _this$raw$plugin_api;this._processed_raw_api=deep_copy((_this$raw$plugin_api=this.raw.plugin_api)!=null?_this$raw$plugin_api:{});let id=get_plugin_id(this.name),regex=new RegExp(id,"g");for(let call_id in this._processed_raw_api.calls){let call=this._processed_raw_api.calls[call_id];for(let thing of["types","data_container"])call[thing]&&typeof call[thing]=="string"&&(this.is_testing()&&thing==="types"&&(call[thing]=call[thing].replace(regex,this.name)),call[thing]=json_parse(call[thing]))}}return this._processed_raw_api}has_html_header(){var _this$get_html_header,_this$get_html_header2;return((_this$get_html_header=(_this$get_html_header2=this.get_html_header())==null?void 0:_this$get_html_header2.snippet)!=null?_this$get_html_header:"")!==""}get_html_header(){return this.raw.html_header}get_keys(){var _this$get_authenticat,_this$get_authenticat2;let k=get_keys(this.get_api(),this.get_html_header(),this.raw.shared_keys);return(_this$get_authenticat=(_this$get_authenticat2=this.get_authenticator()).add_generic_authenticator_keys)==null||_this$get_authenticat.call(_this$get_authenticat2,k),k}get_keys_for_context(){let keys2={},object2=this.get_keys();for(let key_id in object2){let{caption}=object2[key_id],val=this.get_key(key_id);val!=null&&(keys2[caption]=val)}return keys2}authenticator(){let api_data=this.get_api(),auth;switch(api_data.auth){case null:case void 0:case"none":auth=new NoAuth2;break;case"private_key_url":case"private_key_header":api_data.token_param_name||(api_data.auth==="private_key_url"?api_data.token_param_name="private_key":api_data.token_param_name="Authorization"),auth=new PrivateKey2(get_private_key_auth_params(api_data));break;case"basic_auth":auth=new BasicAuth2;break;case"oauth2_pw":auth=new Oauth2PWFlow2(get_oauth2_pw_auth_params(api_data));break;case"oauth2_custom":auth=new Oauth2Custom2;break;case"jwt":auth=new JWT2(get_jwt_auth_params(api_data));break;case"cert_key":auth=new SSLProtocol2;break;case"oauth2_user":{let auth_params={...get_oauth2_user_auth_params(api_data),_id:this.name};auth=new Oauth22(auth_params)}}return auth._service=this,auth._display=api_data.human,auth.add_shared_params_and_headers=req=>{add_shared_params_and_headers2(api_data,req,this.name,(header_id,header)=>header.visibility==="secret"?this.get_key("shared_headers_"+header_id):header.value,(param_id,param)=>param.visibility==="secret"?this.get_key("shared_params_"+param_id):param.value)},auth}public_values(){return object_values(this.get_api().calls).filter(data=>data.publish_as==="data"&&data.initialized).flatMap(data=>object_keys(data.types))}values(){let vals={},api_data=this.get_api();api_data.auth==="oauth2_user"&&(vals.oauth_profile=new StructValue("Profile "+api_data.human,{id:{path:api_data.id_path!=null?api_data.id_path.split("."):void 0},email:{path:api_data.email_path!=null?api_data.email_path.split("."):void 0}})),get_btypes_from_call2(this.name,api_data,vals,api_key_prefix);for(let v of Object.values(vals))v.human+=" ("+api_data.human+")";return vals}_get_sorted_list(type){return object_entries(this.get_api().calls).filter(_ref2=>{let[_,call_data]=_ref2;return call_data.publish_as===type&&is_call_initialized2(call_data)}).map((_ref3,index)=>{var _call_data$rank;let[call_id,call_data]=_ref3;return{call_id,rank:(_call_data$rank=call_data.rank)!=null?_call_data$rank:index}}).sort((a,b)=>a.rank-b.rank).map(_ref4=>{let{call_id}=_ref4;return call_id})}public_calls(){return this._get_sorted_list("data")}action_calls(){return this._get_sorted_list("action")}user_calls(){return this.get_api().auth==="oauth2_user"?["oauth_user_data_call"]:[]}oauth_providers(){let api_data=this.get_api();return api_data.auth==="oauth2_user"?[{id:this.name,display:api_data.human}]:[]}base_url(){return""}_get_processed_elements_raw(){return this._processed_raw_elements||(this._processed_raw_elements=this._interpret_raw_plugin_def()),this._processed_raw_elements}actions(){return this._get_processed_elements_raw().actions}elements(){return this._get_processed_elements_raw().elements}events(){return this._get_processed_elements_raw().events}_interpret_raw_plugin_def(){var _this$raw$dependencie2;let elements2={},events7={},actions2={},plugin_version=this.version,plugin_name=this.name,plugin_human=this.human,pv=this.pv;function get_btype2(node,plugin_type,is_list2){var _plugin_type;let val;if((_plugin_type=plugin_type)!=null||(plugin_type="null"),plugin_type.startsWith("custom_data_"))if(plugin_type.startsWith("custom_data_element_")){let element_node=appquery_default.element(node.get_static_property("element_id"));element_node!=null&&element_node.exists()&&(val=element_node.get_static_property(plugin_type.split("custom_data_element_")[1]))}else val=node.get_static_property(plugin_type.split("custom_data_")[1]);else{if(plugin_type==="_any_thing")return is_list2?"list*":any;if(plugin_type==="_any_thing_bindable")return is_list2?"list*bindable":compound;val=plugin_type}return typeof val!="string"?"null":is_list2?list_type(val):val}function get_field_names(element_definition,is_action){let{fields,support_autobinding,autobinding_value,add_large_file_upload_properties}=element_definition,res={};is_action&&(res.element_id={});for(let field_id in fields){let field_object=fields[field_id],{caption,editor,optional,in_style,value,is_list:is_list2}=field_object,{default_val}=field_object;property_uses_default(editor,value,is_list2)||(default_val=null),caption&&editor&&(res[field_id]={},optional&&(res[field_id].optional=optional),default_val!=null&&(res[field_id].default=default_val),(["custom_type","Label"].includes(editor)||editor.indexOf("custom_field_")===0)&&(res[field_id].no_states=!0),["StaticText","StaticNumber","Checkbox","Color","Dropdown","Image"].includes(editor)&&in_style&&(res[field_id].in_style=!0))}return support_autobinding&&autobinding_value&&Object.assign(res,get_auto_binding_field_names),add_large_file_upload_properties&&(Object.assign(res,get_max_file_size_field_name),Object.assign(res,get_file_upload_condition_field_name)),res}let create_run_mode_code=(_ref9,fn_name)=>{let{fn,add_debugger}=_ref9;if(lib_default().is_edit_mode())throw new UnexpectedError("running plugin code in edit mode!!!!");if(on_server())throw new UnexpectedError("running plugin code on the server!!!! TO REMOVE WHEN WE HAVE SERVER ACTIONS");return create_code(fn,`${plugin_name}/${plugin_human} ${fn_name}`,original_error=>{let trimmed_display=("WARNING: Error parsing plugin code for "+fn_name+`. Please check 
`+(fn!=null?fn:"missing function")).slice(0,8191);owner_error("error parsing plugin code",{display:trimmed_display,original_error})},code=>(plugin_version==="current"&&add_debugger&&(code=`  debugger; // Debugger entry point for Bubble Plugin // 
`+code),code))},run_with_error=(node,fn,type,fail_cb)=>{try{return fn()}catch(err){var _node$element,_node$element$E,_node$A,_node$A$display,_ref10,_err$stack;if(err instanceof NotReadyError)throw err;let display2="The plugin "+this.display();if(type==="element"&&((_node$element=node.element)==null||(_node$element$E=_node$element.E)==null?void 0:_node$element$E.display)!=null){var _node$element2,_node$element2$E;display2+=" / element "+((_node$element2=node.element)==null||(_node$element2$E=_node$element2.E)==null?void 0:_node$element2$E.display)}else if(type==="action"&&((_node$A=node.A)==null||(_node$A$display=_node$A.display)==null?void 0:_node$A$display.call(_node$A))!=null){var _node$A2,_node$A2$display;display2+=" / action "+((_node$A2=node.A)==null||(_node$A2$display=_node$A2.display)==null?void 0:_node$A2$display.call(_node$A2))}display2+=" threw the following error: ",display2+=((_ref10=(_err$stack=err.stack)!=null?_err$stack:err.message)!=null?_ref10:"").split(`
`).slice(0,3).join(`
`),plugin_version==="current"?display2+=" (please check your plugin's code)":display2+=" (please report this to the plugin author)";let ownerr=new OwnerError("plugin evaluation error",{display:display2,original_error:err,element_instance:type==="element"?node:null,action:type==="action"?node:null});log(ownerr),fail_cb==null||fail_cb(ownerr)}};function _get_public_value(_thing,_btype_id,server_side){if(_thing==null)return null;let _guess_thing_type=__thing=>{var _thing$_type;if(__thing==null)return null;if((_thing$_type=__thing._type)!=null&&_thing$_type.call(__thing)){var _thing$_type2;return(_thing$_type2=__thing._type)==null?void 0:_thing$_type2.call(__thing)}else{if(__thing.getTime!=null)return"date";if(ensure_valid_location(__thing))return"geographic_address";if(Array.isArray(__thing)){if(typeof __thing[0]=="number")return"number_range";if(__thing[0].getTime!=null)return"date_range"}else switch(typeof __thing){case"string":return"text";case"number":return"number";case"boolean":return"boolean"}}};if(typeof _btype_id=="function")_btype_id=_guess_thing_type(_thing);else if(["list*","list*bindable"].includes(_btype_id)){var _thing$all,_thing$all2;let raw_list=(_thing$all=(_thing$all2=_thing.all)==null?void 0:_thing$all2.call(_thing))!=null?_thing$all:[];if(raw_list.length===0)return{length(){return 0},get(){return[]}};let _first_thing_non_null;for(let a of raw_list)if(a!=null){_first_thing_non_null=a;break}let thing_btype_id=_guess_thing_type(_first_thing_non_null);if(!thing_btype_id)return null;_btype_id=list_type(thing_btype_id)}if(!_btype_id)return null;let btype_obj=get5(_btype_id);if(PREDEFINED_BTYPE_TYPES.includes(_btype_id)&&_btype_id!=="user"){if(server_side&&pv.fix_server_dates){if(_btype_id==="date"){var _btype_obj$get_JS_obj;return{date:!0,val:(_btype_obj$get_JS_obj=btype_obj.get_JS_object(_thing))==null?void 0:_btype_obj$get_JS_obj.getTime()}}else if(_btype_id==="date_range"){var _btype_obj$get_JS_obj2;return{date_range:!0,val:(_btype_obj$get_JS_obj2=btype_obj.get_JS_object(_thing))==null?void 0:_btype_obj$get_JS_obj2.map(date=>date.getTime())}}}return btype_obj.get_JS_object(_thing)}if(server_side)if(is_list(_btype_id)){let inner=btype_obj.inner();return{list:!0,val:_thing.all().map(a=>_get_public_value(a,inner.id(),!0))}}else return is_option_set(_btype_id)?btype_obj.get_JS_object(_thing):{object:!0,type:_btype_id,val:btype_obj.get_JS_object(_thing)};else return is_list(_btype_id)?{length(){return _thing.length()},get(from,length){if(from==null)throw new UnexpectedError("Invalid from: "+from);if(length==null)throw new UnexpectedError("Invalid from: "+length);return _thing.get_children(from,length).map(t=>_get_public_value(t,btype_obj.inner().id()))}}:{get(field_name){if(!field_name)throw new UnexpectedError("Invalid fieldName: "+field_name);let message=btype_obj.get_message(field_name);if(!can_use_message(_btype_id,field_name))throw new UnexpectedError("This fieldName does not exist: "+field_name);return _get_public_value(message.evaluate(_thing),message.ret_btype_id())},listProperties(){return get_ListProperties(_btype_id)},__original(){if(!can_use_original)throw new UnexpectedError("Forbidden function");return _thing}}}function get_property_public_value(thing,node,editor,value,is_list2,server_side){if(!value)return editor==="Color"?color_property_to_rgba(thing):thing;if(editor==="custom_type")return get5(thing).display();if(editor!=null&&editor.indexOf("custom_field_")===0){let value_name=node.get_static_property(editor.split("custom_field_")[1]),message=get5(value_name).get_message(thing);return message.is_not_found()?null:message.name()}return editor==="key_value_list"?object_values(thing).map(entry=>(delete entry.action,entry.value=_get_public_value(entry.value,value,server_side),entry)):_get_public_value(thing,get_btype2(node,value,is_list2),server_side)}function get_action_properties_with_custom_keys(action,original_properties,fields,is_server){let properties={};for(let field_id in fields){let{name,value,is_list:is_list2,editor}=fields[field_id];properties[name]=get_property_public_value(original_properties[field_id],action,editor,value,is_list2,is_server)}return properties}let use_jquery=(_this$raw$dependencie2=this.raw.dependencies)==null?void 0:_this$raw$dependencie2.use_jquery,async_keys={},async_errors={},async_vals={},get_context_object=_ref11=>{let{instance:instance4,action,bubble_context}=_ref11,res={currentUser:get_property_public_value(lib_default().current_user(),void 0,void 0,"user")};return use_jquery&&(res.jQuery=$),res.uploadContent=(fileName,contents,callback,attach_to)=>(contents&&add_to_upload_queue(plugin_name,{fileName,contents,callback,attach_to}),null),res.keys=this.get_keys_for_context(),res.async=function(fn){var _instance$toUniqueStr,_async_errors$hash;let hash2=fn.toString()+((_instance$toUniqueStr=instance4==null?void 0:instance4.toUniqueString())!=null?_instance$toUniqueStr:bubble_context==null?void 0:bubble_context.run_id);return async_keys[hash2]==null&&(async_keys[hash2]=b_async16.MakeKey(null,"Pluginservice.context.async "+hash2),fn((err,res2)=>(err?async_errors[hash2]=err:async_vals[hash2]=res2,async_keys[hash2].turn()))),b_async16.ensure_ready(async_keys[hash2]),(_async_errors$hash=async_errors[hash2])!=null?_async_errors$hash:async_vals[hash2]},res.onCookieOptIn=function(fn){if(typeof fn!="function"){owner_error("Calling onCookieOptIn without a function");return}return lib_default().user.on_cookie_opt_in(()=>run_with_error(void 0,fn,"general"))},res.reportDebugger=message=>owner_error("plugin reported a message",{display:String(message),element_instance:instance4,action}),res},current_service=this;for(let element_id in this.raw.plugin_elements){let find_id_from_name2=function(search_name,type,raw_data){for(let id in raw_data[type]){let{name}=raw_data[type][id];if(name===search_name)return id}},convert_from_js_to_bubble2=function(_ref12){let{thing,node,value,is_list:is_list2}=_ref12;if(thing==null)return null;let actual_btype=get_btype2(node,value,is_list2);if(is_list(actual_btype)){Array.isArray(thing)||owner_error("Trying to send an invalid array to Bubble",{array_sent:thing,element_instance:node});let inner_btype=get5(actual_btype).inner().id();return thing.map(entry=>convert_from_js_to_bubble2({thing:entry,node,value:inner_btype}))}let btype_obj=get5(actual_btype);if(thing.__original!=null)return get_original(thing);if(btype_obj.can_JS_to_bubble())return btype_obj.JS_to_bubble(thing);owner_error("Trying to convert an invalid object to Bubble",{object_sent:thing,element_instance:node})},display_for_action2=function(action,caption){let target=appquery_default.element(action==null?void 0:action.element_id()),name=target?target.get_name():`a ${element_raw.display}`;return`${caption} ${name}${current_service.is_testing()?" (testing)":""}`};var find_id_from_name=find_id_from_name2,convert_from_js_to_bubble=convert_from_js_to_bubble2,display_for_action=display_for_action2,_current_service$is_t,_element_raw$property,_element_raw$property2,_element_raw$property3,_element_raw$headers$,_element_raw$headers,_element_raw$headers$2;let element_raw=this.raw.plugin_elements[element_id],element={is_non_hardcoded_plugin:!0,display:element_raw.display+`${(_current_service$is_t=current_service.is_testing)!=null&&_current_service$is_t.call(current_service)?" (testing)":""}`,category:element_raw.category,icon:element_raw.icon,condition(root2){var _root$is_mobile;return!(root2!=null&&(_root$is_mobile=root2.is_mobile)!=null&&_root$is_mobile.call(root2))},get_html(){return"<div></div>"},add_an_invisible_div_on_the_top:!0,is_input:!1,contains_group_data:!1,change_cursor_style_if_clickable:!1,mandatory_sections(){return["PluginElement"]},defaults:element_raw.default_dim,uses_css_responsive:pv.responsive_version>0,can_fit_width:element_raw.can_fit_width,can_fit_height:element_raw.can_fit_height};element.field_names=get_field_names(element_raw),element.styleable_properties={};for(let prop_name in element.field_names)element.field_names[prop_name].in_style&&(element.styleable_properties[prop_name]=!0);element._fields=element2=>get_fields(element2,element_raw);let p_apps=[];for(let property_application in element_raw.property_applications)element_raw.property_applications[property_application]&&!["resizable","Font"].includes(property_application)&&p_apps.push(new property_applications_default[property_application]);(_element_raw$property=element_raw.property_applications)!=null&&_element_raw$property.resizable?p_apps.push(new property_applications_default.Dimensions):(p_apps.push(new property_applications_default.PositionOnly),element.not_resizable=()=>!0),(_element_raw$property2=element_raw.property_applications)!=null&&_element_raw$property2.Font&&p_apps.push(new property_applications_default.Font),pv.responsive_version>0&&p_apps.push(new property_applications_default.ResponsiveElement),element.property_applications=p_apps,(_element_raw$property3=element_raw.property_applications)!=null&&_element_raw$property3.MinWidth&&(element.get_min_width=()=>0),element.dont_add_hover_pressed=!element_raw.add_hover_pressed,element.starts_hidden=!element_raw.add_is_visible;let header_snippet=(_element_raw$headers$=(_element_raw$headers=element_raw.headers)==null||(_element_raw$headers$2=_element_raw$headers.snippet)==null?void 0:_element_raw$headers$2.trim())!=null?_element_raw$headers$:"";header_snippet!==""&&(element.element_html_header=function(){return header_snippet.replace(/\r?\n|\r/g,"")}),element.get_states=()=>{var _element_raw$states;return Object.keys((_element_raw$states=element_raw.states)!=null?_element_raw$states:{})},element.add_specific_messages=function(messages,element2){for(let state_id in element_raw.states){let state_data=element_raw.states[state_id];state_data.value!=null&&Object.assign(messages,{[`get_${state_id}`]:{description:"'s "+state_data.caption,section:"States",is_client_state(){return!0},ret_btype:get_btype2(element2,state_data.value,state_data.is_list),fn(a,b){return this.ret_btype().cast(a==null?void 0:a.state(state_id))}}})}},element.get_state_value=function(element2,name){for(let state_id in element_raw.states){let state_data=element_raw.states[state_id];if(state_data.value!=null&&state_data.caption===name)return get_btype2(element2,state_data.value,state_data.is_list)}};let element_instance_compatible_messages=[],has_input_reset=element_raw.has_reset_fn&&element_raw.code.reset;has_input_reset&&element_instance_compatible_messages.push("reset_input"),element.get_messages=()=>element_instance_compatible_messages;let get_instance_object=original_instance=>{var _original_instance$_p;let res={};return use_jquery?(res.canvas=original_instance.get_canvas(),res.jQuery=$):res.canvas=original_instance.get_canvas()[0],res.publishState=function(state_name,val){let state_id=find_id_from_name2(state_name,"states",element_raw);if(state_id){if(!element_raw.states[state_id].value){owner_error("state does not have defined value",{display:"State "+state_name+" does not have a defined value",element_instance:original_instance});return}return run_with_error(original_instance,()=>{let parsed_contents=convert_from_js_to_bubble2({thing:val,node:original_instance,value:element_raw.states[state_id].value,is_list:element_raw.states[state_id].is_list});return original_instance.state(state_id,parsed_contents)},"element")}else return owner_error("state is not defined in the plugin",{display:"State "+state_name+" is not defined in the plugin",element_instance:original_instance})},res.triggerEvent=(event_name,cb)=>{let event=find_id_from_name2(event_name,"events",element_raw);if(event){let promise=run_element_workflow(original_instance,plugin_name+"-"+event,void 0,void 0,void 0,!0);if(cb!=null)return promise==null?void 0:promise.callback(cb)}else return owner_error("event is not defined in the plugin",{display:"Event "+event_name+" is not defined in the plugin",element_instance:original_instance})},pv.responsive_version===0&&(res.setHeight=function(height2){if(typeof height2!="number"||height2<0||isNaN(height2)){owner_error("Trying to set a negative or non-number height",{display:"Trying to set a negative or non-number height: "+height2,element_instance:original_instance});return}return original_instance.set_height(height2)}),element_raw.add_is_visible||(res.show=function(){return original_instance.canvas[0].style.display="block",original_instance._is_visible_me=!0,original_instance._update_visible()},res.hide=function(){return original_instance.canvas[0].style.display="none",original_instance._is_visible_me=!1,original_instance._update_visible()}),(_original_instance$_p=original_instance._plugin_data)!=null||(original_instance._plugin_data={}),res.data=original_instance._plugin_data,element_raw.support_autobinding&&element_raw.autobinding_value&&(res.publishAutobinding=function(val){let parsed_value=convert_from_js_to_bubble2({thing:val,node:original_instance,value:element_raw.autobinding_value,is_list:element_raw.autobinding_is_list});return run_auto_binding(original_instance,parsed_value,!0)}),element_raw.add_large_file_upload_properties&&(res.uploadFile=(file,callback,attach_to,callback_progress)=>(file&&add_to_upload_queue(plugin_name,{instance:original_instance,file,callback,attach_to,callback_progress}),null),res.canUploadFile=function(file){return file&&evaluate_property(original_instance,"file_upload_condition")&&file.size<=evaluate_property(original_instance,"max_size")*1e3*1e3||!1}),res},get_properties_object=(original_instance,param)=>{var _param;(_param=param)!=null||(param={});let{recursion_checker,no_sizing_props}=param;function _cached_function_getter(field_name){return _properties.bubble[field_name].exists||(_properties.bubble[field_name].exists=!0,_properties.bubble[field_name].cache=eval_prop(field_name)),_properties.bubble[field_name].cache}let bubble_proprty_getter=field_name=>no_sizing_props&&["width","height"].includes(field_name)?0:lib_default().is_edit_mode()||!pv.bubble_props_as_functions?eval_prop(field_name):()=>_cached_function_getter(field_name),is_in_fixed=instance4=>{var _instance$element$par;return((_instance$element$par=instance4.element.parent())==null?void 0:_instance$element$par.container_layout())===FIXED_LAYOUT},is_legacy=instance4=>{var _instance$element$roo;return((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())===0},special_property_handling={min_width_css(instance4){return is_legacy(instance4)?`${instance4.element.get_min_width()}px`:is_in_fixed(instance4)?`${instance4.element.get_width()}px`:min_width_css(instance4)},max_width_css(instance4){if(is_legacy(instance4)){let max_width=instance4.element.get_max_width();return max_width!=null?`${max_width}px`:null}return is_in_fixed(instance4)?`${instance4.element.get_width()}px`:max_width_css(instance4)},fit_width(instance4){return is_legacy(instance4)?!1:is_fitting_width(instance4)},min_height_css(instance4){return is_legacy(instance4)?"0px":is_in_fixed(instance4)?`${instance4.element.get_height()}px`:min_height_css(instance4)},max_height_css(instance4){return is_legacy(instance4)?null:is_in_fixed(instance4)?`${instance4.element.get_height()}px`:max_height_css(instance4)},fit_height(instance4){return is_legacy(instance4)?!0:is_fitting_height(instance4)},font_face(instance4){return get_font_face(instance4)}},_eval_prop=id=>{var _special_property_han,_special_property_han2;return(_special_property_han=(_special_property_han2=special_property_handling[id])==null?void 0:_special_property_han2.call(special_property_handling,original_instance))!=null?_special_property_han:evaluate_property(original_instance,id)};function eval_prop(id){if(!recursion_checker)return _eval_prop(id);if(recursion_checker[id])return owner_error("Property contains circular reference to this element",{element_instance:original_instance,prop_name:id}),null;try{return recursion_checker[id]=!0,_eval_prop(id)}finally{delete recursion_checker[id]}}let _properties={bubble:{}};for(let field_id in element_raw.fields){let{name,editor,value,is_list:is_list2}=element_raw.fields[field_id],raw=eval_prop(field_id);_properties[name]=get_property_public_value(raw,original_instance,editor,value,is_list2)}if(element_raw.support_autobinding&&element_raw.autobinding_value){let autobinding_raw_val=get_input_autobind_thing_field(original_instance);_properties.autobinding=get_property_public_value(autobinding_raw_val,original_instance,void 0,element_raw.autobinding_value,element_raw.autobinding_is_list)}let object2=original_instance.element.field_names();for(let field_name in object2){var _element_raw$fields;let field_data=object2[field_name];if(((_element_raw$fields=element_raw.fields)==null?void 0:_element_raw$fields[field_name])==null&&!field_data.only_edit_mode){if(field_name==="font_family"&&(field_name="font_face"),field_name==="font_weight")continue;_properties.bubble[field_name]=bubble_proprty_getter(field_name)}}return _properties};element.can_defer_drawing=()=>!0,element.register=instance4=>{if(instance4.is_getting_property={},!instance4.run_mode())return;instance4.initialize_fn=create_run_mode_code(element_raw.code.initialize,"initialize ("+element_raw.display+")"),has_input_reset&&(instance4.reset_fn=create_run_mode_code(element_raw.code.reset,"reset ("+element_raw.display+")"));let context=get_context_object({instance:instance4});for(let state_id in element_raw.states){let{caption,initialization_code}=element_raw.states[state_id];if((initialization_code==null?void 0:initialization_code.fn)!=null&&caption!=null){let initialize_state_fn2=function(){let inner_fn=create_run_mode_code(initialization_code,"initializeState_"+caption+"("+element_raw.display+")"),props=get_properties_object(instance4,{recursion_checker:instance4.is_getting_property});return inner_fn==null?void 0:inner_fn(props,context)};var initialize_state_fn=initialize_state_fn2;instance4.state(state_id,()=>run_with_error(instance4,initialize_state_fn2,"element"))}}},element.initialize=instance4=>{let canvas=instance4.get_canvas(),instance_object=get_instance_object(instance4),context=get_context_object({instance:instance4});has_input_reset&&instance4.on_message("reset_input",()=>run_with_error(instance4,()=>instance4.reset_fn(instance_object,context))),instance4.wait_for_visible(()=>{var _instance$element$roo4;let new_in_legacy=pv.responsive_version>0&&((_instance$element$roo4=instance4.element.root())==null?void 0:_instance$element$roo4.get_responsive_version())===0;new_in_legacy&&element_raw.can_fit_height&&canvas.css("height","max-content"),run_with_error(instance4,()=>{var _instance$initialize_;(_instance$initialize_=instance4.initialize_fn)==null||_instance$initialize_.call(instance4,instance_object,context)},"element");let update_fn=create_run_mode_code(element_raw.code.update,"update ("+element_raw.display+")");instance4.autorun(()=>{let properties=get_properties_object(instance4);if(pv.bubble_props_as_functions)for(let key in properties.bubble)properties.bubble[key]();instance_object=get_instance_object(instance4),context=get_context_object({instance:instance4}),b_async16.run_without_catching_not_ready(()=>run_with_error(instance4,()=>update_fn==null?void 0:update_fn(instance_object,properties,context),"element"))}),new_in_legacy&&element_raw.can_fit_height&&instance4.autorun(()=>{let height2=instance4.current_height();instance4.set_height(height2,{no_css_update:!0}),instance4.canvas.css("height","max-content")})})};for(let i of["events","actions"]){var _element_raw$i;element[i]=Object.keys((_element_raw$i=element_raw[i])!=null?_element_raw$i:{}).map(id=>`${plugin_name}-${id}`)}for(let event_id in element_raw.events){let event_data=element_raw.events[event_id];events7[event_id]={_display(){return" "+event_data.caption},eventType:"Element Event",defaultWorkflowName(){return" "+event_data.caption},element_name:"A "+element_raw.display}}for(let action_id in element_raw.actions){let element_action_raw=element_raw.actions[action_id],element_action_code;!lib_default().is_edit_mode()&&!on_server()&&(element_action_code=create_run_mode_code(element_action_raw.code,"element_action ("+element_raw.display+"-"+element_action_raw.caption+")")),actions2[action_id]={category:"Element Actions",display(action){return display_for_action2(action,element_action_raw.caption)},field_names:get_field_names(element_action_raw,!0),fields(action){return core_actions_default.get_element_id_field(action).concat(get_fields(action,element_action_raw,!0))},run(action,original_properties,bubble_context,cb){return autorun27.run_once(30,()=>{let properties=get_action_properties_with_custom_keys(action,original_properties,element_action_raw.fields),instance4=bubble_context.element.find_instance_by_id(original_properties.element_id);return{properties,instance:instance4}},(err,res)=>{if(err){cb(err);return}let{properties,instance:instance4}=res;instance4.with_canvas(canvas=>{let instance_object=get_instance_object(instance4),context=get_context_object({instance:instance4,action,bubble_context});return autorun27.run_once(30,()=>b_async16.run_without_catching_not_ready(()=>run_with_error(action,()=>{var _element_action_code;return(_element_action_code=element_action_code)==null?void 0:_element_action_code(instance_object,properties,context)},"action",_err=>cb(_err))),cb)})})}}}elements2[element_id]=element}for(let action_id in this.raw.plugin_actions){var _action_raw$category;let action_raw=this.raw.plugin_actions[action_id],is_server=action_raw.type==="server_side",action_def={display(){return action_raw.display+`${current_service.is_testing()?" (testing)":""}`},category:(_action_raw$category=action_raw.category)!=null?_action_raw$category:"plugins",data_to_refresh:null,not_api:action_raw.type==="client_side"};if(action_def.field_names=get_field_names(action_raw,!0),action_def._fields=action=>get_fields(action,action_raw,!0),is_server){var _action_raw$code,_action_raw$code2,_action_raw$code4,_action_raw$code4$ser,_action_raw$code5,_action_raw$code5$pac,_this$raw$meta_data,_action_raw$return_bt;let package_used=action_raw==null||(_action_raw$code=action_raw.code)==null?void 0:_action_raw$code.package_used;(action_raw==null||(_action_raw$code2=action_raw.code)==null?void 0:_action_raw$code2.package_status)==="empty"&&(package_used=!1);let package_hash;if(package_used){var _action_raw$code3;package_hash=action_raw==null||(_action_raw$code3=action_raw.code)==null?void 0:_action_raw$code3.package_hash}action_def.server_method="custom_plugin_code",action_def.code=action_raw==null||(_action_raw$code4=action_raw.code)==null||(_action_raw$code4$ser=_action_raw$code4.server)==null?void 0:_action_raw$code4$ser.fn,action_def.package=action_raw==null||(_action_raw$code5=action_raw.code)==null||(_action_raw$code5$pac=_action_raw$code5.package)==null?void 0:_action_raw$code5$pac.fn,action_def.package_used=package_used,action_def.package_hash=package_hash,action_def.node_version=(_this$raw$meta_data=this.raw.meta_data)==null?void 0:_this$raw$meta_data.sa_node_version,action_def.plugin_api_version=this.get_plugin_api_version(),action_def._transform_properties=(original_properties,action)=>get_action_properties_with_custom_keys(action,original_properties,action_raw.fields,is_server),(_action_raw$return_bt=action_raw.return_btype)!=null||(action_raw.return_btype=action_raw.return_value),action_def.return_btype=function(action){if(not_empty(action_raw.return_btype)){let struct_vals={};return object_entries(action_raw.return_btype).map((_ref14,idx)=>{var _key_data$rank;let[key_id,key_data]=_ref14;return{key_id,key_data,rank:(_key_data$rank=key_data.rank)!=null?_key_data$rank:idx}}).sort((a,b)=>a.rank-b.rank).forEach(_ref15=>{let{key_data}=_ref15;struct_vals[key_data.name]=[key_data.caption,get_btype2(action,key_data.value,key_data.is_list),!0]}),get5("struct."+base642(JSON.stringify({definition:struct_vals,caption:action.display()})))}else return get5("null")},action_def.run=(action,original_properties,bubble_context,cb)=>bubble_context.get_server_outcome(action,(err,res)=>{if(err&&(err.pluginservice_action=action_raw.display,err=ensure_bubble_error(err).extend({action})),cb(err,res),plugin_version==="current"&&res){console.log("Result of "+action_raw.display);let value=action_def.return_btype(action);autorun27.run_once(30,()=>{var _value$get_JS_object;return{val:(_value$get_JS_object=value==null?void 0:value.get_JS_object(res))!=null?_value$get_JS_object:res}},(err2,res2)=>{if(err2){log(err2);return}console.log(res2)})}})}else{let action_code;!lib_default().is_edit_mode()&&!on_server()&&(action_code=create_run_mode_code(action_raw.code.client,"action ("+action_raw.display+")")),action_def.run=function(action,original_properties,bubble_context,cb){let context=get_context_object({action,bubble_context});autorun27.run_once(30,()=>b_async16.run_without_catching_not_ready(()=>{let properties=get_action_properties_with_custom_keys(action,original_properties,action_raw.fields,is_server);run_with_error(action,()=>{var _action_code;return(_action_code=action_code)==null?void 0:_action_code(properties,context)},"action",_err=>cb(_err))}),cb)}}actions2[action_id]=action_def}return{elements:elements2,events:events7,actions:actions2}}},_applyDecoratedDescriptor13(_class61.prototype,"calls",[_dec14],Object.getOwnPropertyDescriptor(_class61.prototype,"calls"),_class61.prototype),_applyDecoratedDescriptor13(_class61.prototype,"get_call_class",[_dec26],Object.getOwnPropertyDescriptor(_class61.prototype,"get_call_class"),_class61.prototype),_class61);var documentation_id_getter_exports={};init_define_process_env();init_shim();var import_web_dom_collections_iterator314=__toESM(require_web_dom_collections_iterator());init_u2();var documentation_id_getter={for_value_messages:()=>"",for_value_messages_custom_types:()=>""};documentation_id_getter=documentation_id_getter_exports;var add_basic_displays=function(definition){return"export_to_string"in definition||(definition.export_to_string=definition.runmode_display),"debugging_display"in definition||(definition.debugging_display=definition.runmode_display),definition},build_simple=function(btype_name,btype_data){var _btype_data$is_simple,_btype_data$get_bubbl;let{messages}=btype_data,btype_id=btype_name;return btype_id==="bool"&&(btype_id="sys.bool"),["null","geographic_address","key_combination"].includes(btype_id)||(messages.is_contained_by_list=build_is_contained_by_list(btype_id),messages.is_not_contained_by_list=build_is_not_contained_by_list(btype_id)),delete btype_data.messages,btype_data.get_message_names=()=>Object.keys(messages),btype_data.get_message=name=>messages[name],btype_data.name=btype_name,(_btype_data$is_simple=btype_data.is_simple)!=null||(btype_data.is_simple=!0),(_btype_data$get_bubbl=btype_data.get_bubble_null)!=null||(btype_data.get_bubble_null=()=>null),add_basic_displays(btype_data),btype_data};function _extract_id(a){if(typeof(a==null?void 0:a._id)=="function")return a._id();if(typeof(a==null?void 0:a.get)=="function"){let v=a.get();if(typeof(v==null?void 0:v.replace)=="function")return v.replace(HYDRATE_STRING,"")}else return}function custom_equals(a,b){return _extract_id(a)===_extract_id(b)}function add_documentation_ids(full_id,messages){let name=full_id==="user"?"user":"custom"}function generate_shared_messages(full_id){return{"Created By":{description:"'s Creator",ret_btype:"user",section:"Data Fields",is_lookup:!0},Slug:{description:"'s Slug",ret_btype:"text",section:"Data Fields",is_lookup:!0},equals:{description:" is ",ret_btype:"sys.bool",section:"Operators",arg_btype:full_id,fn(a,b){return custom_equals(a,b)},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",ret_btype:"sys.bool",section:"Operators",arg_btype:full_id,fn(a,b){return!custom_equals(a,b)},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},is_empty:{description:" is empty",ret_btype:"sys.bool",section:"Other Operators",fn(a,b){var _a$exists;return!(a!=null&&(_a$exists=a.exists)!=null&&_a$exists.call(a))},build_pg_constraint:is_empty2},is_not_empty:{description:" is not empty",section:"Other Operators",ret_btype:"sys.bool",fn(a,b){var _a$exists2,_a$exists3;return(_a$exists2=a==null||(_a$exists3=a.exists)==null?void 0:_a$exists3.call(a))!=null?_a$exists2:!1},build_pg_constraint:is_not_empty},slug_can_be:{description:" can have the slug value ",section:"Other Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){var _a$exists4;if(a!=null&&(_a$exists4=a.exists)!=null&&_a$exists4.call(a))return is_slug_valid(lib_default().appname(),lib_default().app_version(),a._type(),b,a)}},slug_cannot_be:{description:" cannot have the slug value ",section:"Other Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){var _a$exists5;if(a!=null&&(_a$exists5=a.exists)!=null&&_a$exists5.call(a))return!is_slug_valid(lib_default().appname(),lib_default().app_version(),a._type(),b,a)}},"Created Date":{description:"'s Creation Date",section:"Data Fields",ret_btype:"date",is_lookup:!0,privacy_condition_okay:!1},"Modified Date":{description:"'s Modified Date",section:"Data Fields",ret_btype:"date",is_lookup:!0,privacy_condition_okay:!1},_id:{description:"'s unique id",section:"Data Fields",public_for_plugins:!0,ret_btype:"text",fn(a,b){var _a$exists6;if(a!=null&&(_a$exists6=a.exists)!=null&&_a$exists6.call(a)){var _a$_id;return a==null||(_a$_id=a._id)==null?void 0:_a$_id.call(a)}else return""}},id_link:{ret_btype:"text",section:"Data Fields",field_names:{element_id:{}},spot_data:"SlidableAtom",description:"'s link",fn(a,b,properties){var _a$_id2;if(!(a==null||(_a$_id2=a._id)==null?void 0:_a$_id2.call(a)))return this.ret_btype_null();let page2=appquery_default.element(properties.element_id);if(!page2||page2.name==null)return this.ret_btype_null();let readable_field=page2.get_static_property("readable_field"),data_for_link=get_data_to_send(a,readable_field);return lib_default().location.get_page_url(page2.name()+"/"+data_for_link)}},convert_to_list:{description:":converted to list",section:"Other Operators",ret_btype:list_type(full_id),fn(a,b,properties){return a=get5(full_id).cast(a),a==null?lib_default().db_instance().static_list(full_id,[]):lib_default().db_instance().static_list(full_id,[a])}}}}function generate_special_messages(additional_messages,remove_messages,full_id,skip_created_fields){let messages,message_order=[],special_messages={};if(additional_messages&&([messages,message_order]=additional_messages(),extend(special_messages,messages)),skip_created_fields||extend(special_messages,generate_shared_messages(full_id)),remove_messages)for(let msg_name of remove_messages())delete special_messages[msg_name];return add_documentation_ids(full_id,special_messages),{special_messages,message_order}}var create_custom_btype=function(full_id,node,additional_messages,remove_messages,skip_created_fields){let _generated_messages;function get_generated_messages(){return _generated_messages==null&&(_generated_messages=generate_special_messages(additional_messages,remove_messages,full_id,skip_created_fields)),_generated_messages}on_client()&&get_generated_messages();function display2(){if(!node.exists()&&is_custom_type(full_id))return`[missing type: ${full_id.slice(7)}]`;if(node.display()==null){var _node$name;return((_node$name=node.name)==null?void 0:_node$name.call(node))==="box_file"?"Box File":`[Type with missing display: ${full_id.slice(7)}]`}return node.display()}let debugging_display=null;!node.exists()&&is_custom_type(full_id)&&(debugging_display=val=>`(Value is of an unknown type ${display2()} and cannot be displayed)`);function get_message(name){var _field_node$btype,_btypes$get,_btypes$get$custom_ty,_btypes$get$custom_ty2,_field_node$btype2,_ref;let special=get_generated_messages().special_messages[name];if(special)return special;let field_node=node.field(name);if(!field_node)return{description:"[missing: "+name+"]",ret_btype:"null",fn(){}};let deleted_type_helper="",type_list_agnostic=(_field_node$btype=field_node.btype())==null?void 0:_field_node$btype.replace(/^list\./,"");type_list_agnostic&&(_btypes$get=get5(type_list_agnostic))!=null&&(_btypes$get$custom_ty=_btypes$get.custom_type)!=null&&(_btypes$get$custom_ty2=_btypes$get$custom_ty.call(_btypes$get))!=null&&_btypes$get$custom_ty2.deleted()&&(deleted_type_helper=" (deleted)");let ret_btype=(_field_node$btype2=field_node.btype())!=null?_field_node$btype2:"null";return{description:(_ref="'s "+field_node.display()+deleted_type_helper)!=null?_ref:name,section:"Data Fields",ret_btype,is_lookup:!0,delete_cb(){window.confirm("Delete field "+field_node.display()+"?")&&field_node.set_deleted(!0)}}}return{get_message_names(){let names=node.fields().filter(field=>!field.deleted()).map(field=>field.name());if(node.no_special_messages)return names;let{special_messages,message_order}=get_generated_messages();return["equals","not_equals",...names,...message_order.filter(name=>name.high_priority).map(name=>name.value),"Created By","Slug","Created Date","Modified Date","_id","id_link",...message_order.filter(name=>!name.high_priority).map(name=>name.value),"is_empty","is_not_empty","slug_can_be","slug_cannot_be","convert_to_list"].filter(msg=>names.includes(msg)||Object.keys(special_messages).includes(msg))},get_message,display:display2,custom_type(){return node},equals:custom_equals,from_human(val){return this.JS_to_bubble(val)},get_sample(){return new SampleObject(full_id)},get_bubble_null(){return null},storable:!0,bindable:!0,debugging_display,export_to_string(val,context){var _context$visited_fiel,_val$exists;if(!context.custom_use_primary_field)return full_id==="user"||val!=null&&val.exists()?val==null?void 0:val._id():"";if((_context$visited_fiel=context.visited_field_types)!=null||(context.visited_field_types=new Map),full_id==="user"){var _Lib$app_owners,_Lib2;let db_instance=lib_default().db_instance(appquery_default.appname(),appquery_default.app_version());if(val.id===db_instance.get_admin_user_id()||(_Lib$app_owners=(_Lib2=lib_default()).app_owners)!=null&&_Lib$app_owners.call(_Lib2)[val.id])return"(App admin)"}if(!(val!=null&&(_val$exists=val.exists)!=null&&_val$exists.call(val)))return"(deleted thing)";let primary_field=context.get_primary_field(full_id),message=new Message(primary_field,get_message(primary_field),full_id),sub_object_btype=message.ret_btype();if(context.visited_field_types.get(full_id)){let top_level_field_type=context.visited_field_types.keys().next().value;return`(Circular reference between primary fields for ${get5(top_level_field_type).display()} and ${get5(full_id).display()}. Change primary fields)`}else return context.visited_field_types.set(full_id,!0),sub_object_btype.export_to_string(message.evaluate(val),context)},get_JS_object(val){if(val==null)return null;if(typeof val=="string")return starts_with(val,HYDRATE_STRING)&&(val=val.replace(HYDRATE_STRING,"")),val;let res={};for(let message_name of this.get_message_names())if(can_use_message(full_id,message_name)){let message=new Message(message_name,this.get_message(message_name),full_id),message_result=message.evaluate_without_cast(val);if(message_result){let ret_val=message.ret_btype();ret_val.is_missing()?res[message_name]=null:ret_val.custom_type()?res[message_name]=message_result._id():ret_val.is_list()&&ret_val.inner().custom_type()?res[message_name]=message_result.all().map(a=>a._id()):res[message_name]=get5(ret_val).get_JS_object(message_result)}}return res._type=full_id,res},JS_to_bubble(id){return typeof id=="string"&&id!==""?lib_default().db_instance().get(id):null},cast(val){return typeof(val==null?void 0:val.child)=="function"?val:typeof val=="string"&&starts_with(val,HYDRATE_STRING)?(error("Got dehydrated object in cast; should probably be hydrated here",{val}),this.cast(rehydrate_tree(lib_default().db_instance(),val))):null}}};init_define_process_env();init_shim();init_postgres_constraints();init_lib();init_define_process_env();init_shim();init_lib();var format_boolean_message={section:"Other Operators",ret_btype:"text",arg_btype:null,fn(a,b,properties){if(a){var _properties$formattin;return(_properties$formattin=properties.formatting_for_true)!=null?_properties$formattin:""}else{var _properties$formattin2;return(_properties$formattin2=properties.formatting_for_false)!=null?_properties$formattin2:""}},spot_data:"SlidableAtom",description(node){return":formatted as text"},field_names:{formatting_for_true:{default:"yes"},formatting_for_false:{default:"no"}}},format_boolean_number_message={section:"Other Operators",ret_btype:"number",arg_btype:null,fn(a,b,properties){if(a){var _properties$formattin3;return(_properties$formattin3=properties.formatting_for_true)!=null?_properties$formattin3:0}else{var _properties$formattin4;return(_properties$formattin4=properties.formatting_for_false)!=null?_properties$formattin4:0}},spot_data:"SlidableAtom",description(node){return":formatted as number"},field_names:{formatting_for_true:{default:1},formatting_for_false:{default:0}}},to_bool=function(val){return typeof val=="boolean"?val:typeof val=="string"?(val=val.toLowerCase(),val==="yes"||val==="true"?!0:val==="no"||val==="false"?!1:null):null},render_bool=function(val){return val=to_bool(val),val==null?"":val?lib_default().get_text("BUILT_IN","YES"):lib_default().get_text("BUILT_IN","NO")},bool_equals=(a,b)=>to_bool(a)===to_bool(b);init_define_process_env();init_shim();var import_es_string_replace60=__toESM(require_es_string_replace()),import_web_dom_collections_iterator316=__toESM(require_web_dom_collections_iterator());init_u2();init_client_config2();init_mode_check();init_b_string();init_b_file_shared();init_postgres_constraints();init_btypes();init_lib();init_FrozenState();init_page_state();init_element_eval();var generate_JS_to_bubble_error=function(type,val){throw new UnexpectedError(`Expected a ${type}, but got a `+typeof val+" (original data: "+json_stringify(val,!0)+")")},get_json_encode_msg=btype_name=>({description:":formatted as JSON-safe",section:"Other Operators",ret_btype:"text",fn(a){var _casted_a;let casted_a=get5(btype_name).cast(a);return(_casted_a=casted_a)!=null||(casted_a=null),json_stringify(casted_a)}}),get_file_messages=function(val){return{is_empty:{description:" is empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_empty2,fn(a,b){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_not_empty,fn(a,b){return a!=null&&a!==""}},file_name:{description:"'s file name",section:"Operators",ret_btype:"text",arg_btype:null,fn(a,b){if(!(a!=null&&a.split))return this.ret_btype_null();let splitted=a.split("/");return decodeURIComponent(splitted[splitted.length-1])}},url:{description:"'s URL",section:"Operators",ret_btype:"text",arg_btype:null,fn(a,b){return cast_to_string(a)}},saved_s3:{description:":saved to Bubble Storage",section:"Other Operators",ret_btype:val,arg_btype:null,spot_data:"SlidableAtom",field_names:{file_name_override:{optional:!0}},filter_context(context){return context.owner_type==="Workflow"||context.owner_type==="BackendWorkflow"},fn(a,b,properties){if(a==null||!a.split)return this.ret_btype_null();if(a=a.replace("/../","/"),a.indexOf(client_config_default2.user_file_url)!==-1||a.includes(get_file_cdn_url(lib_default().appname())))return a;if(!is_url(a))return this.ret_btype_null();if(a.indexOf("blob:")===0)return this.ret_btype_null();if(!on_server()||running_test())return a;let saved_val=lib_default().KeyValueDB().get(INSTANCE_NAMES.SMALL,a);if(saved_val!=null)return saved_val;let filename;properties.file_name_override?filename=properties.file_name_override.split("/").pop():filename=a.split("/").pop();let data={file_url:a,filename,appname:lib_default().appname(),app_version:lib_default().app_version()},res=fileupload.upload_by_url(data);return lib_default().KeyValueDB().put(INSTANCE_NAMES.SMALL,a,res,5*60),res}},to_base64:{description:":encoded in base64",section:"Other Operators",ret_btype:"text",arg_btype:null,filter_context(context){return context.owner_type==="Workflow"||context.owner_type==="BackendWorkflow"},fn(a,b){if(a==null||!a.split)return this.ret_btype_null();if(!on_server())return this.ret_btype_null();if(a.slice(0,2)==="//"&&(a="http:"+a),a.indexOf("http")!==0)return this.ret_btype_null();let data=lib_default().http_request({url:a,encoding:null}).block().body;return base642(data)}},not_equals:{description:" is not ",section:"Other Operators",ret_btype:"sys.bool",arg_btype:"date",no_composer(){return!0},fn(a,b){return a!==b}}}},_cached_related_workflows={},_isnt_clickable_seen={},add_basic_element_messages=function(states,messages,should_add_non_clickable){if(should_add_non_clickable){let get_related_workflows2=function(instance4){return _cached_related_workflows[instance4.element_id()]||(_cached_related_workflows[instance4.element_id()]=instance4.element.get_related_workflows("ButtonClicked")),_cached_related_workflows[instance4.element_id()]};var get_related_workflows=get_related_workflows2;extend(messages,{isnt_clickable:{description:" isn't clickable",section:"States",ret_btype:"boolean",is_client_state(){return!0},fn(a,b){if(!a)return this.ret_btype_null();if(on_server())return a.state("client_eval_isnt_clickable");function _eval(){if(evaluate_property(a,"button_disabled"))return!0;{let ignore_event_condition=!1,unique_string=a.toUniqueString();_isnt_clickable_seen[unique_string]&&(delete _isnt_clickable_seen[unique_string],ignore_event_condition=!0),_isnt_clickable_seen[unique_string]=!0;let context={element:a,datasources:get_basic_datasources(a.element.root())},events7=get_related_workflows2(a),inputs_to_check=find_inputs_to_check(a,events7,context,ignore_event_condition);for(let input_instance of inputs_to_check.input_instances)if(input_instance.element.get_states().includes("is_invalid")&&input_instance.state("is_invalid"))return!0;return!1}}let evaluation=_eval();if(!a.is_fake_instance){var _FrozenState$dehydrat,_FrozenState$dehydrat2;(_FrozenState$dehydrat=FrozenState.dehydrate_context)==null||(_FrozenState$dehydrat2=_FrozenState$dehydrat.save_to_state)==null||_FrozenState$dehydrat2.call(_FrozenState$dehydrat,a,"client_eval_isnt_clickable",evaluation)}return evaluation},filter_context(context){return context.owner_type==="State"||(context.owner_type==="Workflow"||context.owner_type==="BackendWorkflow")&&context.in_event_condition}}})}if(states.includes("is_link_disabled")&&extend(messages,{is_clickable:{description:" is clickable",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return!(a!=null&&a.state("link_disabled"))}},isnt_clickable:{description:" isn't clickable",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("link_disabled")}}}),states.includes("display_invalid")&&extend(messages,{is_valid:{description:" is valid",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return!(a!=null&&a.state("display_invalid"))}},isnt_valid:{description:" isn't valid",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("display_invalid")}}}),extend(messages,{get_width:{description:"'s width",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a,b){return a==null?void 0:a.state("current_width")}},get_height:{description:"'s height",is_client_state(){return!0},section:"States",ret_btype:"number",fn(a,b){return a==null?void 0:a.state("current_height")}}}),states.includes("is_hovered")&&extend(messages,{is_hovered:{description:" is hovered",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("is_hovered")},filter_context(context){if(context.owner_type==="State")return!0;let events7=["ConditionTrue","DoInterval","interactions-PageScrolled"];return context.owner_type==="Workflow"&&context.in_event_condition&&events7.includes(context.owner_node.type())}},isnt_hovered:{description:" isn't hovered",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return!(a!=null&&a.state("is_hovered"))},filter_context(context){if(context.owner_type==="State")return!0;let events7=["ConditionTrue","DoInterval","interactions-PageScrolled"];return context.owner_type==="Workflow"&&context.in_event_condition&&events7.includes(context.owner_node.type())}},is_pressed:{description:" is pressed",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("is_pressed")},filter_context(context){return context.owner_type==="State"}},isnt_pressed:{description:" isn't pressed",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return!(a!=null&&a.state("is_pressed"))},filter_context(context){return context.owner_type==="State"}}}),states.includes("is_focused"))return extend(messages,{is_focused:{description:" is focused",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.state("is_focused")},filter_context(context){return context.owner_type==="State"}},isnt_focused:{description:" isn't focused",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return!(a!=null&&a.state("is_focused"))},filter_context(context){return context.owner_type==="State"}}})};var boolean_default=build_simple("boolean",{messages:{is_true:{description:" is yes",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_true,fn(a,b){return to_bool(a)}},is_false:{description:" is no",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_false,fn(a,b){return!to_bool(a)}},and_:{description:" and ",section:"Operators",no_composer:()=>!0,ret_btype:"sys.bool",arg_btype:"sys.bool",fn(a,b){return to_bool(a)&&to_bool(b)}},or_:{description:" or ",section:"Operators",no_composer:()=>!0,ret_btype:"sys.bool",arg_btype:"sys.bool",fn(a,b){return to_bool(a)||to_bool(b)}},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"sys.bool",fn(a,b){return a!==b}},format_boolean:format_boolean_message,format_boolean_number:format_boolean_number_message,format_json_encode:get_json_encode_msg("boolean")},display(){return"yes / no"},composer_input_type:COMPOSER_INPUT_TYPES.BOOLEAN,runmode_display:render_bool,export_to_string(val,context){return context.booleans_yes_no?render_bool(val):val!=null?val:!1},equals:bool_equals,get_sample(){return!0},from_human(val){if(typeof val=="string")switch(val.toLowerCase()){case lib_default().get_text("BUILT_IN","YES").toLowerCase():return!0;case lib_default().get_text("BUILT_IN","NO").toLowerCase():return!1;default:return to_bool(val)}else return to_bool(val)},cast(val){return to_bool(val)},get_JS_object(val){var _this$cast;return(_this$cast=this.cast(val))!=null?_this$cast:!1},JS_to_bubble(val){return val=this.cast(val),val===void 0&&generate_JS_to_bubble_error("boolean",val),val},convert_to_bubble_instance:to_bool,storable:!0,bindable:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator317=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_postgres_constraints();init_b_date();init_timezone_override_settings();init_mode_check();init_lib();var moment8=require_moment2();function date_rounded_down(_ref){let{date,properties,context}=_ref,tz2;has_rounding_operator_timezone_controls_on()||running_test()?tz2=get_custom_tz({static_eval:prop=>properties[prop]}):tz2=lib_default().current_timezone();let m=to_moment(date,tz2);return m.isValid()?m.clone().startOf(properties.component_to_extract).toDate():null}function date_equals(a,b){var _b_date$mk_date,_b_date$mk_date2;return((_b_date$mk_date=mk_date(a))==null?void 0:_b_date$mk_date.valueOf())===((_b_date$mk_date2=mk_date(b))==null?void 0:_b_date$mk_date2.valueOf())}var date_default=build_simple("date",{messages:{equals:{description:" is ",section:"Operators",ret_btype:"sys.bool",arg_btype:"date",no_composer:()=>!0,fn(a,b){return date_equals(a,b)},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"date",no_composer:()=>!0,fn(a,b){return!date_equals(a,b)},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},format_date:{section:"Operators",ret_btype:"text",arg_btype:null,field_names:{formatting_type:{default:"m/dd/yy"},custom_format:{default:"ddd, m/dd/yy, mmmm (mmm) dS, yyyy, h:MM tt, HH:MM:ss.L"},...custom_tz_field_names},spot_data:"SlidableAtom",description(node){var _node$property$raw;let properties={formatting_type:(_node$property$raw=node==null?void 0:node.property("formatting_type").raw())!=null?_node$property$raw:"m/dd/yy",custom_format:node==null?void 0:node.property("custom_format").raw()},rest;return properties?rest=" "+this.fn(new Date,void 0,properties):rest="...",":formatted as"+rest},fn(a,b,properties,_raw3,context){let formatting_type=properties==null?void 0:properties.formatting_type;if(formatting_type==="custom"&&(formatting_type=properties.custom_format),a=mk_date(a),a){let tz2=get_custom_tz({static_eval:prop=>properties[prop],not_overridden:!0}),tz_name;return tz2&&moment8.tz.zone(tz2)?tz_name=tz2:tz_name=moment8.tz.guess(),formatting_type==="iso_date"?a.toISOString():format_date(a,formatting_type,lib_default().get_text("BUILT_IN","DATE_FORMAT"),tz_name)}else return""}},greater_than:{description:" > ",section:"Operators",ret_btype:"sys.bool",arg_btype:"date",fn(a,b){return mk_date(a)>mk_date(b)}},less_than:{description:" < ",section:"Operators",ret_btype:"sys.bool",arg_btype:"date",fn(a,b){return mk_date(a)<mk_date(b)}},minus:{description:" - ",section:"Operators",ret_btype:"dateinterval",arg_btype:"date",fn(a,b){return mk_date(a)-mk_date(b)}},to_range:{description:"<- range ->",section:"Other Operators",arg_btype:"date",ret_btype:"date_range",fn(a,b){return a=mk_date(a),b=mk_date(b),!a||!b?[]:[mk_date(Math.min(a,b)),mk_date(Math.max(a,b))]}},max:{description:" <- max -> ",section:"Other Operators",ret_btype:"date",arg_btype:"date",fn(a,b){var _a,_a$getTime,_b,_b$getTime;return a=mk_date(a),b=mk_date(b),((_a=a)==null||(_a$getTime=_a.getTime)==null?void 0:_a$getTime.call(_a))>=((_b=b)==null||(_b$getTime=_b.getTime)==null?void 0:_b$getTime.call(_b))||!b?a:b}},min:{description:" <- min -> ",section:"Other Operators",ret_btype:"date",arg_btype:"date",fn(a,b){var _a2,_a2$getTime,_b2,_b2$getTime;return a=mk_date(a),b=mk_date(b),((_a2=a)==null||(_a2$getTime=_a2.getTime)==null?void 0:_a2$getTime.call(_a2))<=((_b2=b)==null||(_b2$getTime=_b2.getTime)==null?void 0:_b2$getTime.call(_b2))||!b?a:b}},plus_seconds:{description:"+ seconds: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_seconds(a,b,properties,_raw3,context)}},plus_minutes:{description:"+ minutes: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_minutes(a,b,properties,_raw3,context)}},plus_hours:{description:"+ hours: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_hours(a,b,properties,_raw3,context)}},plus_days:{description:"+ days: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_days(a,b,properties,_raw3,context)}},plus_months:{description:"+ months: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_months(a,b,properties,_raw3,context)}},plus_years:{description:"+ years: ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.plus_years(a,b,properties,_raw3,context)}},change_seconds:{description:" change seconds to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_seconds(a,b,properties,_raw3,context)}},change_minutes:{description:" change minutes to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_minutes(a,b,properties,_raw3,context)}},change_hours:{description:" change hours to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_hours(a,b,properties,_raw3,context)}},change_date:{description:" change date to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_date(a,b,properties,_raw3,context)}},change_month:{description:" change month to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_month(a,b,properties,_raw3,context)}},change_years:{description:" change years to ",section:"Other Operators",ret_btype:"date",arg_btype:"number",fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.change_years(a,b,properties,_raw3,context)}},extract_from_date:{ret_btype:"number",section:"Other Operators",field_names:{component_to_extract:{},...custom_tz_field_names},spot_data:"SlidableAtom",description(node){let component=node==null?void 0:node.property("component_to_extract"),rest;return component&&!component.is_empty()?rest=" "+component.get_static():rest="...",":extract"+rest},fn(a,b,properties,_raw3,context){return lib_default().bv().date_code.extract_from_date(a,b,properties,_raw3,context)}},rounded_down:{ret_btype:"date",section:"Other Operators",field_names:extend({component_to_extract:{}},custom_tz_field_names),spot_data:"SlidableAtom",description(node){let component=node==null?void 0:node.property("component_to_extract"),rest;return component&&!component.is_empty()?rest=" "+component.get_static():rest="...",":rounded down to"+rest+" "},fn(a,b,properties,_raw3,context){return date_rounded_down({date:a,properties,context})}},equals_rounded_down:{ret_btype:"sys.bool",section:"Other Operators",arg_btype:"date",field_names:extend({component_to_extract:{}},custom_tz_field_names),spot_data:"SlidableAtom",description(node){let component=node==null?void 0:node.property("component_to_extract"),rest;return component&&!component.is_empty()?rest=" "+component.get_static():rest="...",`equals rounded down to ${rest} `},fn(a,b,properties,_raw3,context){return a=date_rounded_down({date:a,properties,context}),b=date_rounded_down({date:b,properties,context}),date_equals(a,b)}},is_empty:{description:" is empty",section:"Other Operators",ret_btype:"sys.bool",build_pg_constraint:is_empty2,fn(a,b){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Other Operators",ret_btype:"sys.bool",build_pg_constraint:is_not_empty,fn(a,b){return a!=null&&a!==""}},format_json_encode:get_json_encode_msg("date")},display(){return"date"},runmode_display(val,context){return format_date(mk_date(val),"mmm d, yyyy h:MM tt",null,lib_default().current_timezone())},export_to_string(val,context){return!context.date_formatting||context.date_formatting==="spreadsheet_compatible"?format_date(mk_date(val),"mmm d, yyyy h:MM tt",null,lib_default().current_timezone()):context.date_formatting==="universal"?mk_date(val):format_date(mk_date(val),context.date_formatting)},equals(a,b){var _b_date$mk_date3,_b_date$mk_date4;return((_b_date$mk_date3=mk_date(a))==null?void 0:_b_date$mk_date3.valueOf())===((_b_date$mk_date4=mk_date(b))==null?void 0:_b_date$mk_date4.valueOf())},get_sample(){return new Date},cast(val){return mk_date(val)},from_human(string,context){return string===""?this.get_bubble_null():mk_date(string,lib_default().current_timezone())},get_JS_object(val){var _Lib$api_version,_Lib2;return((_Lib$api_version=(_Lib2=lib_default()).api_version)==null?void 0:_Lib$api_version.call(_Lib2))===1?val:mk_date(val)},JS_to_bubble(val){if(val==null)return this.get_bubble_null();let v=this.cast(val);return v||generate_JS_to_bubble_error("date",val),v},convert_to_bubble_instance:mk_date,can_sort:!0,storable:!0,bindable:!1,synonyms:["date_unix"]});init_define_process_env();init_shim();init_u2();init_b_number();var dateinterval_default=build_simple("dateinterval",{messages:{to_days:{description:"formatted as days",ret_btype:"number",section:"Other Operators",arg_btype:null,fn(a,b){return format_date_interval(a,"days")}},to_hours:{description:"formatted as hours",ret_btype:"number",section:"Other Operators",arg_btype:null,fn(a,b){return format_date_interval(a,"hours")}},to_minutes:{description:"formatted as minutes",ret_btype:"number",section:"Other Operators",arg_btype:null,fn(a,b){return format_date_interval(a,"minutes")}},to_seconds:{description:"formatted as seconds",ret_btype:"number",section:"Other Operators",arg_btype:null,fn(a,b){return format_date_interval(a,"seconds")}}},display(){return"date interval"},runmode_display:null,export_to_string(val){return print_date_interval(val)},debugging_display(val){return print_date_interval(val)},equals:num_equals,get_sample(){return 252e8},cast(val){return to_num(val)},get_JS_object(val){return this.cast(val)},JS_to_bubble(val){return val==null?this.get_bubble_null():(typeof val!="number"&&generate_JS_to_bubble_error("date interval",val),val)},storable:!0,bindable:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator318=__toESM(require_web_dom_collections_iterator());init_u2();init_define_process_env();init_shim();init_constraint_defs();init_btypes();function get_array_from_range(a){return a==null?null:a.all?a.all():a.length===0?[]:[a[0],a[1]]}function create_range_btype_messages(base_btype,to_num_fn,cast_fn){let full_btype=base_btype+"_range",m={equals:{description:" is ",ret_btype:"sys.bool",arg_btype:base_btype,no_composer:()=>!0,fn(a,b){return get5(full_btype).equals(a,b)}},not_equals:{description:" is not ",ret_btype:"sys.bool",arg_btype:base_btype,no_composer:()=>!0,fn(a,b){return!get5(full_btype).equals(a,b)}},min:{description:base_btype==="date"?":start":":min",ret_btype:base_btype,fn(a,b){if(a)return a=get_array_from_range(a),cast_fn(Math.min(to_num_fn(a[0]),to_num_fn(a[1])))}},max:{description:base_btype==="date"?":end":":max",ret_btype:base_btype,fn(a,b){if(a)return a=get_array_from_range(a),cast_fn(Math.max(to_num_fn(a[0]),to_num_fn(a[1])))}},average:{description:base_btype==="date"?":center":":average",ret_btype:base_btype,fn:(a,b)=>{if(a)return a=get_array_from_range(a),cast_fn((to_num_fn(a[0])+to_num_fn(a[1]))/2)}},is_empty:{description:" is empty",ret_btype:"sys.bool",fn(a,b){return a=get_array_from_range(a),a==null||a.length===0}},is_not_empty:{description:" is not empty",ret_btype:"sys.bool",fn(a,b){return a=get_array_from_range(a),a!=null&&a.length!==0}}},greater,smaller;base_btype==="date"?(smaller="before",greater="after"):(smaller="smaller than",greater="greater than");let range_constraints_data={range_contains:{description:" contains range "},range_contains_point:{description:` contains ${base_btype} `},range_contained_by:{description:" is contained by "},range_overlaps:{description:" overlaps with "},range_greater_than:{description:` is ${greater} range `},range_greater_than_point:{description:` is ${greater} ${base_btype} `},range_less_than:{description:` is ${smaller} range `},range_less_than_point:{description:` is ${smaller} ${base_btype} `}};for(let constraint_name in range_constraints_data){let constraint_data=range_constraints_data[constraint_name],is_point=constraint_name.endsWith("_point");m[constraint_name]={description:constraint_data.description,ret_btype:"sys.bool",arg_btype:is_point?base_btype:base_btype+"_range",fn:(a,b)=>{if(!a)return!1;a=get_array_from_range(a);function get_sorted_range(range2){let x=to_num_fn(range2==null?void 0:range2[0]),y=to_num_fn(range2==null?void 0:range2[1]);return[Math.min(x,y),Math.max(x,y)]}let expected=get_sorted_range(a),actual;return is_point?actual=to_num_fn(b):(b=get_array_from_range(b),actual=get_sorted_range(b)),all_search_constraints[constraint_name](actual,expected)}}}return m}init_lib();init_b_date();function date_to_num(a){var _b_date$mk_date;return(_b_date$mk_date=mk_date(a))==null?void 0:_b_date$mk_date.getTime()}function format_for_debugging(date){return format_date(date,"mmm d, yyyy h:MM tt",null,lib_default().current_timezone())}var date_range_default=build_simple("date_range",{messages:create_range_btype_messages("date",date_to_num,mk_date),display(){return"date range"},runmode_display:null,export_to_string(val){let[start3,end2]=this.cast(val);return JSON.stringify([format_for_debugging(start3),format_for_debugging(end2)])},debugging_display(val){let[start3,end2]=this.cast(val);return"("+format_for_debugging(start3)+" -> "+format_for_debugging(end2)+")"},equals(a,b){var _a,_a2,_b,_b2;a=get_array_from_range(a),b=get_array_from_range(b);let x=date_to_num(mk_date((_a=a)==null?void 0:_a[0])),y=date_to_num(mk_date((_a2=a)==null?void 0:_a2[1])),z=date_to_num(mk_date((_b=b)==null?void 0:_b[0])),t=date_to_num(mk_date((_b2=b)==null?void 0:_b2[1])),sorted_a=[x,y].sort(),sorted_b=[z,t].sort();return(sorted_a==null?void 0:sorted_a[0])===(sorted_b==null?void 0:sorted_b[0])&&(sorted_a==null?void 0:sorted_a[1])===(sorted_b==null?void 0:sorted_b[1])},get_sample(){let a=new Date,b=new Date().setDate(a.getDate()-2);return[a,b]},get_bubble_null(){return[]},cast(val){if(!val)return this.get_bubble_null();val=get_array_from_range(val);let a=date_to_num(mk_date(val[0])),b=date_to_num(mk_date(val[1]));return a==null||b==null?this.get_bubble_null():[mk_date(Math.min(a,b)),mk_date(Math.max(a,b))]},get_JS_object(val){var _Lib$api_version,_Lib2;return val?((_Lib$api_version=(_Lib2=lib_default()).api_version)==null?void 0:_Lib$api_version.call(_Lib2))===1?get_array_from_range(val):this.cast(val):null},JS_to_bubble(val){return val==null?this.get_bubble_null():((!Array.isArray(val)||mk_date(val[0])==null||mk_date(val[1])==null)&&generate_JS_to_bubble_error("date range",val),this.cast(val))},storable:!0,bindable:!1});init_define_process_env();init_shim();init_b_string();var file_default=build_simple("file",{messages:get_file_messages("file"),display(){return"file"},equals(a,b){return a===b},get_sample(){return"file_name.png"},get_bubble_null(){return""},cast:cast_to_string,runmode_display:cast_to_string,get_JS_object(val){return val?cast_to_string(val):null},JS_to_bubble(val){return val?(typeof val!="string"&&generate_JS_to_bubble_error("file url as a string",val),val):this.get_bubble_null()},convert_to_bubble_instance:cast_to_string,composer_input_type:COMPOSER_INPUT_TYPES.TEXT,synonyms:["text","image"],storable:!0,bindable:!1,can_sort:!0});init_define_process_env();init_shim();var import_es_string_replace61=__toESM(require_es_string_replace());init_u2();init_mode_check();init_geolocation();init_lib();init_b_location();init_b_location_utils();init_location_lookups();var empty_geo_address=null;function get_formatted_address(a){return a=ensure_valid_location(a),a?get_address(a):empty_geo_address}function get_latitude(a){return a=ensure_valid_location(a),a?a.lat:empty_geo_address}function get_longitude(a){return a=ensure_valid_location(a),a?a.lng:empty_geo_address}var geographic_address_default=build_simple("geographic_address",{display(){return"geographic address"},equals(a,b){return a===b||is_equal(a,b)},get_bubble_null(){return empty_geo_address},messages:{formatted_address:{description:"'s formatted address",section:"Operators",ret_btype:"text",fn:get_formatted_address},google_map_link:{description:"'s link to Google Maps",section:"Operators",ret_btype:"text",fn(a,b){if(a=ensure_valid_location(a),!a)return empty_geo_address;let BASE_MAPS_PLACE_URL="https://www.google.com/maps/place";if(a.placeId!=null)return`${BASE_MAPS_PLACE_URL}/?q=place_id:${a.placeId}`;let coordinates=`${a.lat},${a.lng}`;if(a.address!=null){let address=a.address.split(" ").join("+").replace(",","");return`${BASE_MAPS_PLACE_URL}/${address}/@${coordinates},15z`}else return`${BASE_MAPS_PLACE_URL}/${coordinates}`}},distance_from:{ret_btype:"number",section:"Operators",arg_btype:null,field_names:{origin_address:{},unit:{default:"miles"}},spot_data:"SlidableAtom",description(node){let rest,origin_address=node==null?void 0:node.property("origin_address");return origin_address&&!origin_address.is_empty()?rest=" "+origin_address.get_tree_display():rest="..."," distance from"+rest},fn(a,b,properties){if(a=ensure_valid_location(a),!a||(properties.origin_address=ensure_valid_location(properties.origin_address),!properties.origin_address))return empty_geo_address;let origin_address_coordinates={lat:properties.origin_address.lat,lng:properties.origin_address.lng},actual_coordinates={lat:a.lat,lng:a.lng};return!a||!properties.origin_address?empty_geo_address:geographic_distance(actual_coordinates,origin_address_coordinates,properties.unit)}},equals:{description:" is ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return is_equal(a,b)}},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return!is_equal(a,b)}},extract_from_address:{ret_btype:"text",section:"Other Operators",arg_btype:null,field_names:{component_to_extract:{}},spot_data:"SlidableAtom",description(node){let rest,component=node==null?void 0:node.property("component_to_extract");return component&&!component.is_empty()?rest=" "+component.get_static():rest="...",":extract"+rest},fn(a,b,properties){var _components$propertie;if(a=ensure_valid_location(a),!a)return empty_geo_address;let components=get_components(a);return(_components$propertie=components==null?void 0:components[properties.component_to_extract])!=null?_components$propertie:""}},latitude:{description:"'s latitude",section:"Other Operators",ret_btype:"number",fn:get_latitude},longitude:{description:"'s longitude",section:"Other Operators",ret_btype:"number",fn:get_longitude},timezone:{description:"'s time zone ID",section:"Other Operators",ret_btype:"text",fn(a,b){var _location_lookups$get;return a?((_location_lookups$get=get_timezone_for_location(a))==null?void 0:_location_lookups$get.timeZoneId)||"":empty_geo_address}},timezone_name:{description:"'s time zone name",section:"Other Operators",ret_btype:"text",fn(a,b){var _location_lookups$get2;return a=ensure_valid_location(a),a?((_location_lookups$get2=get_timezone_for_location(a))==null?void 0:_location_lookups$get2.timeZoneName)||"":empty_geo_address}},daysaving_offset:{description:"'s daylight saving time offset",section:"Other Operators",ret_btype:"number",fn(a,b){var _location_lookups$get3;return a=ensure_valid_location(a),a?(_location_lookups$get3=get_timezone_for_location(a))==null?void 0:_location_lookups$get3.dstOffset:empty_geo_address}},raw_offset:{description:"'s offset from UTC",section:"Other Operators",ret_btype:"number",fn(a,b){var _location_lookups$get4;if(a=ensure_valid_location(a),!a)return empty_geo_address;let r2=(_location_lookups$get4=get_timezone_for_location(a))==null?void 0:_location_lookups$get4.rawOffset;return r2?r2/60:empty_geo_address}},is_empty:{description:" is empty",section:"Other Operators",ret_btype:"sys.bool",fn(a,b){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Other Operators",ret_btype:"sys.bool",fn(a,b){return a!=null&&a!==""}}},cast(val){var _val;return((_val=val)==null?void 0:_val.raw)!=null&&(val=val.raw()),typeof val=="function"&&(val=val()),from_address(val)},runmode_display(val){if(val){var _val2;return((_val2=val)==null?void 0:_val2.raw)!=null&&(val=val.raw()),get_address(val)}else return""},get_JS_object(val){var _Lib$api_version,_Lib2;return val?((_Lib$api_version=(_Lib2=lib_default()).api_version)==null?void 0:_Lib$api_version.call(_Lib2))===1?convert_to_old_format(val):{address:get_formatted_address(val),lat:get_latitude(val),lng:get_longitude(val)}:null},JS_to_bubble(val){if(val==null)return this.get_bubble_null();let r2;if(typeof val=="string")r2=()=>from_address(val);else if(typeof val=="object"){if(typeof val.address=="string")r2=()=>from_address(val.address);else if(typeof val.lat=="number"&&typeof val.lng=="number"){if(to_num(val.lat)==null||to_num(val.lng)==null)return this.get_bubble_nul();r2=()=>from_address({lat:val.lat,lng:val.lng})}else if(val.lat==null||val.lng==null)return this.get_bubble_null()}return r2!=null?on_server()?r2():r2:generate_JS_to_bubble_error("geographic address as either a string or an object with lat and lng",val)},get_sample(){return SAMPLE_VALUE},synonyms:["text"],composer_input_type:COMPOSER_INPUT_TYPES.GEOGRAPHIC_ADDRESS,can_sort:!1,storable:!0,bindable:!1});init_define_process_env();init_shim();init_u2();init_b_string();init_lib();init_imgix();var image_default=build_simple("image",{messages:{...get_file_messages("file"),imgix_treatment:{ret_btype:"image",arg_btype:null,field_names:{auto_enhance:{},q:{default:75,optional:!0},fm:{optional:!0},extract_face:{default:!1},facepad:{default:!1},crop_to_fit:{default:!1},red_eye:{default:!1},blur:{default:!1},blur_level:{default:100},mask:{default:!1},pixel:{default:!1},pixel_level:{default:10},sepia:{default:!1},sepia_level:{default:50},mono:{default:!1},mono_level:{default:"#3498db"}},spot_data:"SlidableAtom",description(node){return":processed with Imgix"},fn(a,b,properties){return!a||typeof a!="string"?this.ret_btype_null():ignore_imgix_fn(a)?a:add_processing_options(a,properties)}}},display(){return"image"},equals(a,b){return a===b},get_sample(){return"image_name.png"},get_bubble_null(){return""},cast:cast_to_string,runmode_display:cast_to_string,export_to_string(val,context){return!context.always_return_text&&val?img("img-preview",void 0,context.optimize_image(val,30,30)):cast_to_string(val)},get_JS_object(val){return val?cast_to_string(val):null},JS_to_bubble(val){return val==null?this.get_bubble_null():(typeof val!="string"&&generate_JS_to_bubble_error("image url as a string",val),val)},convert_to_bubble_instance:cast_to_string,composer_input_type:COMPOSER_INPUT_TYPES.TEXT,synonyms:["text"],storable:!0,bindable:!1});init_define_process_env();init_shim();init_b_string();var key_combination_default=build_simple("key_combination",{messages:{equals:{description:" is ",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return a===b}}},display(){return"keyboard shortcut"},equals(a,b){return a===b},cast:cast_to_string,runmode_display:cast_to_string,get_sample(){return"Shift"},composer_input_type:COMPOSER_INPUT_TYPES.KEY_COMBINATION,synonyms:["text"]});init_define_process_env();init_shim();var null_default=build_simple("null",{messages:{},runmode_display:null,export_to_string(val){return""},debugging_display(val){return"(null)"},get_sample(){return null},equals(a,b){return a!=null==(b!=null)},cast(val){return val},display(){return""},get_JS_object(val){return null},JS_to_bubble(val){return null},storable:!1,bindable:!1,convert_to_bubble_instance(){return null}});init_define_process_env();init_shim();init_u2();var number_range_default=build_simple("number_range",{messages:create_range_btype_messages("number",to_num,x=>x),display(){return"numeric range"},runmode_display:null,export_to_string(val){return JSON.stringify(this.cast(val))},debugging_display(val){return JSON.stringify(this.cast(val))},equals(a,b){var _a,_a$sort,_b,_b$sort;a=get_array_from_range(a),b=get_array_from_range(b);let sorted_a=(_a=a)==null||(_a$sort=_a.sort)==null?void 0:_a$sort.call(_a),sorted_b=(_b=b)==null||(_b$sort=_b.sort)==null?void 0:_b$sort.call(_b);return(sorted_a==null?void 0:sorted_a[0])===(sorted_b==null?void 0:sorted_b[0])&&(sorted_a==null?void 0:sorted_a[1])===(sorted_b==null?void 0:sorted_b[1])},get_sample(){return[1,30]},get_bubble_null(){return[]},cast(val){if(!val)return this.get_bubble_null();val=get_array_from_range(val);let a=to_num(val[0]),b=to_num(val[1]);return a==null||b==null?this.get_bubble_null():[Math.min(a,b),Math.max(a,b)]},get_JS_object(val){return val?this.cast(val):null},JS_to_bubble(val){return val?((!Array.isArray(val)||typeof val[0]!="number"||typeof val[1]!="number")&&generate_JS_to_bubble_error("number range",val),this.cast(val)):this.get_bubble_null()},storable:!0,bindable:!1});init_define_process_env();init_shim();var import_es_string_replace62=__toESM(require_es_string_replace());init_u2();init_postgres_constraints();init_lib();init_b_number();init_node_eval();var MAX_PRECISION=30,MIN_PRECISION=-30,MAX_NUMBER=1e30;function round(input_number,to_digits){let effective_input_number=Math.min(MAX_NUMBER,Math.max(-MAX_NUMBER,input_number)),effective_to_digits=Math.min(MAX_PRECISION,Math.max(MIN_PRECISION,to_digits));return Math.round(effective_input_number*Math.pow(10,effective_to_digits))/Math.pow(10,effective_to_digits)}var number_default=build_simple("number",{messages:{format_number:{ret_btype:"text",fn(a,b,properties){if(a=to_num(a),a==null)return this.ret_btype_null();let get_property=name=>properties[name];get_property("formatting_type")==="percentage"&&(a=a*100);let do_neg_parens=get_property("negative_parenthese")&&a<0,a_with_correct_sign=do_neg_parens?Math.abs(a):a,decimal_places=get_property("decimal_place"),formatted_a;decimal_places!=null?(decimal_places=Math.max(Math.min(decimal_places,100),0),formatted_a=(lib_default().bubble_version()>=28?round(a_with_correct_sign,decimal_places):a_with_correct_sign).toFixed(decimal_places)):formatted_a=dec_to_string(a_with_correct_sign);let decimal_separator=decimal_separators[get_property("decimal_separator")];if(formatted_a=formatted_a.replace(".",decimal_separator),get_property("thousand_separator")){let separator=thousand_separators[get_property("thousand_separator")];separator==="Space"&&(separator=" ");let splitted=formatted_a.split(decimal_separator);splitted[0]=add_thousand_sep(splitted[0],separator),formatted_a=splitted.join(decimal_separator)}if(get_property("formatting_type")==="percentage"&&(formatted_a=formatted_a+"%"),do_neg_parens&&(formatted_a="("+formatted_a+")"),get_property("formatting_type")==="currency"&&get_property("currency_symbol")){let symbol=get_property("currency_symbol"),override=legacy_currency_symbols[symbol];override&&(symbol=override),a<0&&!do_neg_parens?formatted_a="-"+symbol+formatted_a.replace("-",""):formatted_a=symbol+formatted_a}return formatted_a},spot_data:"SlidableAtom",description(node){let rest,properties=evaluate_properties2(node);return properties?rest=" "+this.fn("1028.58",void 0,properties):rest="...",":formatted as"+rest},field_names:format_number_names},equals:{description:" is ",section:"Operators",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return num_equals(a,b)},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return!num_equals(a,b)},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},greater_than:{description:" > ",section:"Operators",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return!num_equals(a,b)&&to_num(a)>to_num(b)}},greater_or_equal_than:{section:"Operators",description:" \u2265 ",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return num_equals(a,b)||to_num(a)>=to_num(b)}},less_than:{section:"Operators",description:" < ",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return!num_equals(a,b)&&to_num(a)<to_num(b)}},less_or_equal_than:{section:"Operators",description:" \u2264 ",ret_btype:"sys.bool",arg_btype:"number",fn(a,b){return num_equals(a,b)||to_num(a)<=to_num(b)}},plus:{description:" + ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(to_num(a)+to_num(b))}},minus:{description:" - ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(to_num(a)-to_num(b))}},times:{description:" * ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(to_num(a)*to_num(b))}},divide:{description:" / ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(to_num(a)/to_num(b))}},power:{description:" ^ ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(Math.pow(to_num(a),to_num(b)))}},round:{description:" rounded to ",section:"Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(round(to_num(a),to_num(b)))},editor:{static:!0,default:1}},floor:{description:":floor ",section:"Operators",ret_btype:"number",fn(a,b){return Math.floor(to_num(a))}},ceil:{description:":ceiling ",section:"Operators",ret_btype:"number",fn(a,b){return Math.ceil(to_num(a))}},to_range:{description:"<- range ->",section:"Other Operators",arg_btype:"number",ret_btype:"number_range",fn(a,b){return a=to_num(a),b=to_num(b),a==null||b==null?[]:[Math.min(a,b),Math.max(a,b)]}},max:{description:" <- max -> ",section:"Other Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return Math.max(to_num(a),to_num(b))}},min:{description:" <- min -> ",section:"Other Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return Math.min(to_num(a),to_num(b))}},modulo:{description:" <- modulo -> ",section:"Other Operators",ret_btype:"number",arg_btype:"number",fn(a,b){return to_num(to_num(a)%to_num(b))}},is_empty:{description:" is empty",section:"Other Operators",ret_btype:"sys.bool",build_pg_constraint:is_empty2,fn(a,b){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Other Operators",ret_btype:"sys.bool",build_pg_constraint:is_not_empty,fn(a,b){return a!=null&&a!==""}}},composer_input_type:COMPOSER_INPUT_TYPES.NUMBER,display(){return"number"},runmode_display(val){return val=to_num(val),val===null?"":lib_default().locale().format_decimal(val)},export_to_string(val,context){return context.preserve_numbers?val:(val=to_num(val),val===null?"":lib_default().locale().format_decimal(val))},equals:num_equals,get_sample(){return 42},cast(val){return to_num(val)},get_JS_object(val){return to_num(val)},JS_to_bubble(val){if(val==null)return this.get_bubble_null();let cast_val=to_num(val);return typeof cast_val!="number"&&generate_JS_to_bubble_error("number",val),cast_val},convert_to_bubble_instance:to_num,can_sort:!0,storable:!0,bindable:!1});init_define_process_env();init_shim();var import_es_string_replace63=__toESM(require_es_string_replace());init_u2();init_lib();init_btypes();init_btype_ids();init_mode_check();init_postgres_constraints();init_b_string();var crypto,safe_regex,text_default=build_simple("text",{messages:{equals:{description:" is ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return a===b},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return a!==b},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},contains:{description:" contains ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){var _a$includes,_a$includes2;return(_a$includes=a==null||(_a$includes2=a.includes)==null?void 0:_a$includes2.call(a,b))!=null?_a$includes:!1}},not_contains:{description:" doesn't contain ",ret_btype:"sys.bool",section:"Operators",arg_btype:"text",fn(a,b){var _a$includes3,_a$includes4;return(_a$includes3=!(a!=null&&(_a$includes4=a.includes)!=null&&_a$includes4.call(a,b)))!=null?_a$includes3:!0}},is_empty:{description:" is empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_empty2,fn(a){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_not_empty,fn(a,b){return a!=null&&a!==""}},to_capitalized_words:{description:":capitalized words",section:"Other Operators",ret_btype:"text",fn(a){var _u$toTitleCase$toStri,_u$toTitleCase;return(_u$toTitleCase$toStri=(_u$toTitleCase=toTitleCase(a,!0))==null?void 0:_u$toTitleCase.toString())!=null?_u$toTitleCase$toStri:this.ret_btype_null()}},to_uppercase:{description:":uppercase",section:"Other Operators",ret_btype:"text",fn(a){var _a$toUpperCase,_a$toUpperCase2;return(_a$toUpperCase=a==null||(_a$toUpperCase2=a.toUpperCase)==null?void 0:_a$toUpperCase2.call(a))!=null?_a$toUpperCase:this.ret_btype_null()}},to_lowercase:{description:":lowercase",section:"Other Operators",ret_btype:"text",fn(a){var _a$toLowerCase,_a$toLowerCase2;return(_a$toLowerCase=a==null||(_a$toLowerCase2=a.toLowerCase)==null?void 0:_a$toLowerCase2.call(a))!=null?_a$toLowerCase:this.ret_btype_null()}},format_text:{section:"Other Operators",ret_btype:"text",field_names:{formatting_type:{},replace_space:{default:!0},hmac_key:{},encode_b64:{}},spot_data:"SlidableAtom",description(node){let formatting_type=node==null?void 0:node.get_static_property("formatting_type"),rest;if(formatting_type!=null)switch(formatting_type){case"url_encode":rest=" URL";break;case"md5_hash":rest=" MD5 hash";break;case"hmac":rest=" HMAC SHA256 digest";break;case"hmac_sha1":rest=" HMAC SHA1 digest";break;default:rest=" "+masks[formatting_type].caption}else rest="...";return":formatted as"+rest},fn(a,b,properties){let{formatting_type}=properties;if(a==null)return this.ret_btype_null();if(formatting_type==="us_phone"){let first_digit;if(a.length===11?(first_digit=a[0],a=a.slice(1)):first_digit=null,a.length===10){let res="("+a.slice(0,3)+") "+a.slice(3,6)+"-"+a.slice(6);return first_digit&&(res=first_digit+" "+res),res}else return a}else{if(formatting_type==="us_ssn")return a.length===9?a.slice(0,3)+"-"+a.slice(3,5)+"-"+a.slice(5):a;if(formatting_type==="url_encode")return properties.replace_space?encodeURIComponent(a.replace(/\s/g,"+")):encodeURIComponent(a);if(formatting_type==="md5_hash")return digest(a);if(["hmac","hmac_sha1"].includes(formatting_type)){let algo;if(!on_server())return"HMAC Digest computation on the client";if(!properties.hmac_key)return"HMAC Secret missing";formatting_type==="hmac"?algo="SHA256":algo="SHA1";let hmac2=crypto.createHmac(algo,properties.hmac_key).update(a);return properties.encode_b64?hmac2.digest("base64"):hmac2.digest("hex")}else return"unrecognized format type: "+formatting_type}}},use_text_as:{section:"Other Operators",ret_btype(_raw3){var _raw22,_raw$P$data_type,_raw$P;return(_raw22=_raw3)!=null||(_raw3={}),(_raw$P$data_type=(_raw$P=_raw3["%p"])==null?void 0:_raw$P.data_type)!=null?_raw$P$data_type:"text"},field_names:{data_type:{}},spot_data:"SlidableAtom",description(node){let rest,data_type=node==null?void 0:node.get_static_property("data_type");if(data_type!=null)switch(data_type){case"file":rest=" a file";break;case"image":rest=" an image";break;default:rest=" [invalid type]"}else rest="...";return":used as"+rest},fn(a,b,properties){var _btypes$get$cast,_btypes$get;return(_btypes$get$cast=(_btypes$get=get5(properties.data_type))==null?void 0:_btypes$get.cast(a))!=null?_btypes$get$cast:a}},trimmed:{description:":trimmed",section:"Other Operators",ret_btype:"text",arg_btype:null,fn(a,b){var _a$trim,_a$trim2;return(_a$trim=a==null||(_a$trim2=a.trim)==null?void 0:_a$trim2.call(a))!=null?_a$trim:this.ret_btype_null()}},length:{description:":number of characters",section:"Other Operators",ret_btype:"number",arg_btype:null,fn(a,b){return a?a.length:0}},extract_from_text:{ret_btype:"text",section:"Other Operators",field_names:{text_type:{},component_to_extract:{}},spot_data:"SlidableAtom",description(node){let rest,component=node==null?void 0:node.property("component_to_extract");return component&&!component.is_empty()?rest=" "+component.get_static():rest="...",":extract"+rest},fn(a,b,properties){if(!a)return this.ret_btype_null();switch(properties.text_type){case"email":if(is_email(a))switch(properties.component_to_extract){case"domain":return a.split("@")[1];case"alias":return a.split("@")[0];case"top domain":{let splitted=a.split("@")[1].split("."),{length}=splitted;return splitted[length-2]+"."+splitted[length-1]}}else return this.ret_btype_null();break;default:return this.ret_btype_null()}}},convert_to_number:{description:":converted to number",section:"Other Operators",ret_btype:"number",arg_btype:null,fn(a){var _Lib$browser_locale;let invalid_removed=remove_invalid_from_num(cast_to_string(a)),parsed_float=((_Lib$browser_locale=lib_default().browser_locale())!=null?_Lib$browser_locale:lib_default().locale()).parse_float(invalid_removed);return to_num(parsed_float)}},split_by:{ret_btype:list_type("text"),section:"Other Operators",field_names:{separator:{}},spot_data:"SlidableAtom",description(node){let preview,separator=node==null?void 0:node.property("separator").get_tree_display();return separator?separator.length>5?preview=` (${separator.slice(0,5)}\u2026)`:preview=` (${separator})`:preview="...",":split by"+preview},fn(a,b,properties){if(!a||a.split==null)return lib_default().db_instance().static_list("text",[]);let{separator}=properties;return[void 0,null,""].includes(separator)?lib_default().db_instance().static_list("text",a.split(`
`)):lib_default().db_instance().static_list("text",a.split(separator))}},find_replace:{ret_btype:"text",section:"Other Operators",field_names:{find:{},use_regex:{default:!1},replace:{optional:!0}},spot_data:"SlidableAtom",description:":find & replace",fn(a,b,properties){var _properties$replace;if(!a||a.split==null)return this.ret_btype_null();let{find}=properties;if([void 0,null,""].includes(find))return a;let replace=(_properties$replace=properties.replace)!=null?_properties$replace:"";if(properties.use_regex){let regex;try{regex=new RegExp(find,"g")}catch(err){throw new OwnerError("Bad regex format",{display:"Bad Regex format: "+err.message})}return on_server()?safe_regex.replace({regex_string:find,string:a,replace_with:replace}):a.replace(regex,replace)}else return a.split(find).join(replace)}},extract_regex:{ret_btype:list_type("text"),section:"Other Operators",field_names:{regex:{}},spot_data:"SlidableAtom",description:":extract with Regex",fn(a,b,properties){if(!a||typeof a!="string"||[void 0,null,""].includes(properties.regex))return lib_default().db_instance().static_list("text",[]);let regex;try{regex=new RegExp(properties.regex,"g")}catch(err){throw new OwnerError("Bad regex format",{display:"Bad Regex format: "+err.message})}let matches=on_server()?safe_regex.match({regex_string:properties.regex,string:a}):a.match(regex);return lib_default().db_instance().static_list("text",matches)}},append:{description:" append ",section:"Other Operators",ret_btype:"text",arg_btype:"text",fn(a,b){return[a,b].map(s=>cast_to_string(s)).join("")}},defaulting_to:{description:" defaulting to ",section:"Other Operators",ret_btype:"text",arg_btype:"text",fn(a,b){return a||(b!=null?b:"")}},truncated:{description:" truncated to ",section:"Other Operators",ret_btype:"text",arg_btype:"number",fn(a,b){return typeof a!="string"?this.ret_btype_null():b?a.slice(0,to_num(b)):a}},truncated_right:{description:" truncated from end to ",section:"Other Operators",ret_btype:"text",arg_btype:"number",fn(a,b){if(typeof a!="string")return this.ret_btype_null();if(b){let start3=a.length-to_num(b);return start3<0&&(start3=0),a.slice(start3)}else return a}},format_json_encode:get_json_encode_msg("text")},display(){return"text"},equals(a,b){return a===b},get_sample(){return"Lorem ipsum..."},get_bubble_null(){return""},cast:cast_to_string,runmode_display:cast_to_string,export_to_string:cast_to_string,debugging_display:cast_to_string,get_JS_object(val){return val?cast_to_string(val):null},JS_to_bubble(val){return val==null?this.get_bubble_null():(typeof val!="string"&&generate_JS_to_bubble_error("string",val),val)},can_sort:!0,composer_input_type:COMPOSER_INPUT_TYPES.TEXT,convert_to_bubble_instance:cast_to_string,storable:!0,bindable:!1});init_define_process_env();init_shim();var import_web_dom_collections_iterator319=__toESM(require_web_dom_collections_iterator());init_u2();init_b_fiber();init_appquery();init_db();init_lib();init_btype_ids();function user_remove_messages(){return["Created By"]}function user_additional_messages(){let high_priority_messages=["email"],additional_messages={email:{description:"'s email",section:"Data Fields",ret_btype:"text",public_for_plugins:!0,fn(a,b){if(a){var _a$get_email,_a$get_email2;return(_a$get_email=(_a$get_email2=a.get_email)==null?void 0:_a$get_email2.call(a))!=null?_a$get_email:""}else return""}},logged_in:{description(node,options){var _options,_node$parent_expressi,_node$parent_expressi2,_node$parent_expressi3,_parent_node$type,_parent_node$json,_parent_node$json$raw,_parent_node$json$raw2;(_options=options)!=null||(options={});let{parent_node}=options,check_node_before_when_selection_made=(node==null||(_node$parent_expressi=node.parent_expression)==null||(_node$parent_expressi2=(_node$parent_expressi3=_node$parent_expressi.call(node)).type)==null?void 0:_node$parent_expressi2.call(_node$parent_expressi3))==="CurrentUser",check_node_before_in_dropdown_outside_privacy_rules=(parent_node==null||(_parent_node$type=parent_node.type)==null?void 0:_parent_node$type.call(parent_node))==="CurrentUser",privacy_rule_expression_root=parent_node==null||(_parent_node$json=parent_node.json)==null||(_parent_node$json$raw=_parent_node$json.raw)==null||(_parent_node$json$raw2=_parent_node$json$raw.call(_parent_node$json))==null?void 0:_parent_node$json$raw2.condition,check_node_before_in_dropdown_in_privacy_rules=!1;return privacy_rule_expression_root&&(privacy_rule_expression_root.next!=null?check_node_before_in_dropdown_in_privacy_rules=get_last_node_in_privacy_rule(privacy_rule_expression_root)==="CurrentUser":check_node_before_in_dropdown_in_privacy_rules=privacy_rule_expression_root.type==="CurrentUser"),check_node_before_when_selection_made||check_node_before_in_dropdown_outside_privacy_rules||check_node_before_in_dropdown_in_privacy_rules?" is logged in":" has an account"},section:"Other Operators",ret_btype:"sys.bool",fn(a,b){if(a){var _a$is_logged_in;return(_a$is_logged_in=a.is_logged_in)==null?void 0:_a$is_logged_in.call(a)}else return this.ret_btype_null()},is_lookup:"user_signed_up"},not_logged_in:{description(node,options){var _options2,_node$parent_expressi4,_node$parent_expressi5,_node$parent_expressi6,_parent_node$type2;(_options2=options)!=null||(options={});let{parent_node}=options,check_node_before_when_selection_made=(node==null||(_node$parent_expressi4=node.parent_expression)==null||(_node$parent_expressi5=(_node$parent_expressi6=_node$parent_expressi4.call(node)).type)==null?void 0:_node$parent_expressi5.call(_node$parent_expressi6))==="CurrentUser",check_node_before_in_dropdown_outside_privacy_rules=(parent_node==null||(_parent_node$type2=parent_node.type)==null?void 0:_parent_node$type2.call(parent_node))==="CurrentUser";return check_node_before_when_selection_made||check_node_before_in_dropdown_outside_privacy_rules?" is logged out":" doesn't have an account"},section:"Other Operators",ret_btype:"sys.bool",fn(a,b){if(a){var _a$is_logged_in2;return!((_a$is_logged_in2=a.is_logged_in)!=null&&_a$is_logged_in2.call(a))}else return this.ret_btype_null()}}};function get_last_node_in_privacy_rule(top_node){var _node_iterator$args,_node_iterator$args2;let node_iterator=top_node;for(;node_iterator.next!=null;)node_iterator=node_iterator.next;return((_node_iterator$args=node_iterator.args)==null?void 0:_node_iterator$args.next)!=null?get_last_node_in_privacy_rule(node_iterator.args):((_node_iterator$args2=node_iterator.args)==null?void 0:_node_iterator$args2.type)!=null?node_iterator.args.type:null}function add_oauth_message(call_name,call,hidden){var _ref,_call$fields;additional_messages[call_name]={ret_btype:call.get_btype_id(),hidden,no_composer(parent_node){return parent_node.type()!=="CurrentUser"&&call.is_reflective},fn:make_call_fn(call),field_names:extend({},call.parameters,{element_id:{}}),description:(_ref="'s "+call.display())!=null?_ref:toTitleCase(call_name),section:"Data Fields"},high_priority_messages.push(call_name)}optional_pause();let user_calls=get_user_calls();for(let call_name in user_calls){let call=user_calls[call_name];add_oauth_message(call_name,call),optional_pause("add_oauth_message "+call_name)}extend(additional_messages,{email_confirmed:{description:"'s email confirmed",ret_btype:"boolean",section:"Data Fields",fn(a,b){if(a){var _a$child;return[!0,"true"].includes((_a$child=a.child)==null?void 0:_a$child.call(a,"authentication").child("email").child("email_confirmed").get())}else return this.ret_btype_null()}},uses_pw:{description:" uses password",ret_btype:"boolean",section:"Other Operators",fn(a,b){if(a){var _a$child2;return((_a$child2=a.child)==null?void 0:_a$child2.call(a,"authentication").child("email").child("email").get())!=null}else return this.ret_btype_null()}},uses_2fa:{description:" uses 2FA",ret_btype:"boolean",section:"Other Operators",no_composer:()=>!appquery_default.get_public_setting("twofa_auth"),fn(a,b){if(!a||a._id()===NO_USER)return this.ret_btype_null();var _a$child3,_a$child3$call,_a$child3$call$child,_a$child3$call$child$;return((_a$child3=a.child)==null||(_a$child3$call=_a$child3.call(a,"authentication"))==null||(_a$child3$call$child=_a$child3$call.child("2fa"))==null||(_a$child3$call$child$=_a$child3$call$child.child("uses_2fa"))==null?void 0:_a$child3$call$child$.get())==="true"}},has_2fa_backup:{description:" has 2FA backup codes",ret_btype:"boolean",section:"Other Operators",no_composer:()=>!appquery_default.get_public_setting("twofa_auth"),fn(a,b){if(!a||a._id()===NO_USER)return this.ret_btype_null();var _a$child4,_a$child4$call,_a$child4$call$child,_a$child4$call$child$;return((_a$child4=a.child)==null||(_a$child4$call=_a$child4.call(a,"authentication"))==null||(_a$child4$call$child=_a$child4$call.child("2fa"))==null||(_a$child4$call$child$=_a$child4$call$child.child("has_codes"))==null?void 0:_a$child4$call$child$.get())==="true"}},is_using_cookies:{description:" is using cookies",ret_btype:"boolean",section:"Other Operators",no_composer:()=>!appquery_default.get_public_setting("cookie_opt_in"),fn(a,b){if(a){var _a$_id;return((_a$_id=a._id)==null?void 0:_a$_id.call(a))!==NO_USER}else return this.ret_btype_null()}}}),extend(additional_messages,{devices:{description:"'s devices",ret_btype:list_type(readonly_type("device")),section:"Data Fields",fn(a,b){if(!a)return this.ret_btype_null();let user_devices=lib_default().db_instance().find(readonly_type("user_device"),[{key:"user",value:a,constraint_type:"equals"}],[],"<no node>").all();return user_devices?user_devices.map(user_device=>user_device.child("device").get()):this.ret_btype_null()}}});let message_order=[...high_priority_messages.map(value=>({value,high_priority:!0})),{value:"email_confirmed",high_priority:!1},{value:"logged_in",high_priority:!1},{value:"not_logged_in",high_priority:!1},{value:"uses_pw",high_priority:!1},{value:"uses_2fa",high_priority:!1},{value:"has_2fa_backup",high_priority:!1},{value:"is_using_cookies",high_priority:!1}];return pushNotificationsEnabled()&&message_order.push({value:"devices",high_priority:!1}),[additional_messages,message_order]}function user_default(){let node=appquery_default.custom_type("user");return create_custom_btype("user",node,user_additional_messages,user_remove_messages,!1)}init_define_process_env();init_shim();init_appquery();var exported81={get(id){let event_id=id.split(".")[0],event=appquery_default.workflow_item(event_id);return event!=null&&event.exists()?event.get_btype()[id]:null},list(){return[]},display(){return"API Event data"}},api_wf_data_default=exported81;init_define_process_env();init_shim();var import_es_string_replace64=__toESM(require_es_string_replace());init_plugin_getter();var exported82={get(api_reference){var _plugin_getter$get_pl;let plugin_name=api_reference.split(".")[0],btype_name=api_reference.split(".").slice(1).join(".");return(_plugin_getter$get_pl=get_plugin(plugin_name))==null?void 0:_plugin_getter$get_pl.get_btypes()[btype_name]},list(){return get_btype_ids().map(id=>id.replace("api.",""))},display(){return"external data"}},api_default=exported82;init_define_process_env();init_shim();init_u2();init_btype_ids();init_appquery();var exported83={get(id){if(!id)throw new UnexpectedError("custom btype created without id.  Namespace: custom");let node=appquery_default.custom_type(id),full_id=custom_type(id);return create_custom_btype(full_id,node)},list(){return appquery_default.custom_types(void 0,void 0,!0).filter(type=>type.id()!=="user").map(type=>type.id())},display(){return"custom type"}},custom_default=exported83;init_define_process_env();init_shim();var import_web_dom_collections_iterator320=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_btype_ids();var exported84={get(element_id){let element=appquery_default.element(element_id),messages={};if(element!=null&&element.exists()){let states=element.get_states();element.add_specific_messages(messages),add_basic_element_messages(states,messages,has_event("ButtonClicked",element.type())),extend(messages,{is_visible:{description:" is visible",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a,b){return a==null?void 0:a.is_visible()},filter_context(context){return context.owner_type==="State"||(context.owner_type==="Workflow"||context.owner_type==="BackendWorkflow")&&context.in_event_condition}},isnt_visible:{description:" isn't visible",is_client_state(){return!0},section:"States",ret_btype:"sys.bool",fn(a){return!(a!=null&&a.is_visible())},filter_context(context){return context.owner_type==="State"||(context.owner_type==="Workflow"||context.owner_type==="BackendWorkflow")&&context.in_event_condition}}});for(let custom_state of element.element_custom_states())messages[custom_state.name()]={description:"'s "+custom_state.display(),section:"Custom States",is_client_state(){return!0},ret_btype:custom_state.btype(),fn(a){var _a$state;return a==null?this.ret_btype().get_bubble_null():this.ret_btype().cast((_a$state=a.state(custom_state.name()))!=null?_a$state:custom_state.default_val())},delete_cb(){if(window.confirm(`Delete custom state ${custom_state.display()}?`))return custom_state.delete()}}}for(let message_name in messages){let message=messages[message_name];is_custom_type(message_name)?message.documentation_id="Documentation.Elements.GeneralConcepts.States.CustomStates":message.documentation_id="Documentation.Elements.GeneralConcepts.States."+message_name}return{display(){return"element"},get_message_names(){return Object.keys(messages)},get_message(name){return messages[name]},cast(val){return val},get_bubble_null(){return null},storable:!1,bindable:!1}},list(){return[]},display(){return"element"}},element_default=exported84;init_define_process_env();init_shim();var import_web_dom_collections_iterator322=__toESM(require_web_dom_collections_iterator());init_u2();init_logger();init_incremental();init_db();init_special_keys();init_postgres_constraints();init_list_utilities();init_core();init_db_values();init_eval();init_btype_ids();init_db_utils();init_TransformList();init_IntersectList();init_ConcatList();init_UniqueList();init_SortedList();init_btypes();init_lib();init_sample();init_shrink();init_evaluate();init_decaf();init_core_ds_db_ops_utilities();init_lang();init_define_process_env();init_shim();init_ListWrapper();init_lib();init_hydrate();init_db_utils();var getEmptyList=(db3,btype_id)=>db3.static_list(lang_btypes().get(btype_id).inner().id(),[]),MinusList=class _MinusList extends ListWrapper{constructor(source){var _lists$0$db,_lists$,_lists$0$query,_lists$2,_lists$1$query,_lists$3;let lists=source.all().filter(list4=>list4!==null),db3=(_lists$0$db=(_lists$=lists[0])==null?void 0:_lists$.db)!=null?_lists$0$db:lib_default.or_throw().db_instance();super(db3,{t:"Difference",prevs:[(_lists$0$query=(_lists$2=lists[0])==null?void 0:_lists$2.query)!=null?_lists$0$query:getEmptyList(db3,source.get_item_btype_id()).query,(_lists$1$query=(_lists$3=lists[1])==null?void 0:_lists$3.query)!=null?_lists$1$query:getEmptyList(db3,source.get_item_btype_id()).query]})}static rehydrate(my_db,key){return new _MinusList(rehydrate(my_db,key))}};init_define_process_env();init_shim();var import_web_dom_collections_iterator321=__toESM(require_web_dom_collections_iterator());init_decaf();init_db();init_lib();init_db_utils();var create_group_by_data=(btype_id,properties)=>{for(let grouping of object_values(properties.groupings))CALENDAR_GROUPINGS.includes(grouping.fn)?(grouping.timezone_string=lib_default.or_throw().current_timezone(),typeof grouping.start!="number"&&!(grouping.start instanceof Date)&&(grouping.end!=null?grouping.start=grouping.end-1:grouping.start=Date.now()),(typeof grouping.interval!="number"||grouping.interval<1)&&(grouping.interval=1)):grouping.fn==="bucket"&&typeof grouping.start!="number"&&(grouping.start=0,(typeof grouping.interval!="number"||grouping.interval<=0)&&(grouping.interval=1));let agg_list=object_values(properties.aggregations);for(let aggregation of agg_list)can_aggregate_on(aggregation.fn,btype_id).includes(aggregation.message)||delete aggregation.message;let allowed_groupings=can_group_on(btype_id);return{groupings:object_values(properties.groupings).filter(grouping=>allowed_groupings.includes(grouping.message)),aggregations:agg_list}};var{S:S17}=shrink_exports,COMPARISON_OPERATORS=["greater_or_equal_than","greater_than","less_or_equal_than","less_than","not_equals","equals"];function _join_using(render_fn,val,separator){var _val$all,_val$all2;let pieces=((_val$all=val==null||(_val$all2=val.all)==null?void 0:_val$all2.call(val))!=null?_val$all:[]).map(item=>(optional_pause_tick(10),render_fn(item)));return separator==="line_break"&&(separator=`
`),pieces.join(separator)}function get_messages(btype){let btype_id=btype.id(),allowed_messages=null,all_messages={[LIST_OPERATOR_NAMES.Count]:{description:":count",section:"Operators",can_be_cached:!0,ret_btype:"number",fn:(a,b,properties,_raw3,context,options)=>count_fn(a,b,properties,_raw3,options),message_cache_id:_ref=>{let{raw}=_ref;return count_message_cache_id(raw)}},[LIST_OPERATOR_NAMES.Contains]:{description:" contains ",section:"Operators",ret_btype:"sys.bool",arg_btype:btype_id,build_pg_constraint:contains2,build_pg_r_constraint:in_array,build_pg_relationship:contains_both,fn:(a,b)=>{var _a$contains;return a?(_a$contains=a.contains)==null?void 0:_a$contains.call(a,b,btype):!1}},[LIST_OPERATOR_NAMES.NotContains]:{description:" doesn't contain ",section:"Operators",ret_btype:"sys.bool",arg_btype:btype_id,build_pg_constraint:not_contains,build_pg_r_constraint:not_in,build_pg_relationship:not_contains_both,fn:(a,b)=>{var _a$contains2;return a?!((_a$contains2=a.contains)!=null&&_a$contains2.call(a,b,btype)):!0}},[LIST_OPERATOR_NAMES.FirstElement]:{description:":first item",section:"Operators",ret_btype:btype_id,fn(a){var _a$get_children$;return a!=null&&a.get_children?(_a$get_children$=a.get_children(0,1)[0])!=null?_a$get_children$:this.ret_btype_null():this.ret_btype_null()}},[LIST_OPERATOR_NAMES.LastElement]:{description:":last item",section:"Operators",ret_btype:btype_id,fn(a){var _a$get_children$2;if(!(a!=null&&a.get_children))return this.ret_btype_null();let list_length=a.length();return list_length?(_a$get_children$2=a.get_children(list_length-1,1)[0])!=null?_a$get_children$2:this.ret_btype_null():this.ret_btype_null()}},[LIST_OPERATOR_NAMES.RandomElement]:{description:":random item",section:"Operators",ret_btype:btype_id,fn(a,b,properties,_raw3,context){var _a$get_children$3;if(!(a!=null&&a.get_children)||!a.length())return this.ret_btype_null();let length=a.length(),get_random;context!=null&&context.random_generator?get_random=max=>context.random_generator.random(0,length):get_random=max=>Math.random()*length;let random_number=Math.floor(get_random());return(_a$get_children$3=a.get_children(random_number,1)[0])!=null?_a$get_children$3:this.ret_btype_null()}},[LIST_OPERATOR_NAMES.SpecificItem]:{description:":item #",section:"Operators",ret_btype:btype_id,arg_btype:"number",fn(a,b,properties,_raw3){var _a$get_children$4;if(!(a!=null&&a.get_children)||!b||b<1)return this.ret_btype_null();let offset=Math.ceil(b-1);return offset!==b-1&&verbose("user trying to offset list from decimal value",{b,b_string:String(b),_raw:_raw3}),(_a$get_children$4=a.get_children(offset,1)[0])!=null?_a$get_children$4:this.ret_btype_null()}},[LIST_OPERATOR_NAMES.LimitTo]:{description:":items until #",section:"Operators",ret_btype:list_type(btype_id),arg_btype:"number",fn(a,b,properties,_raw3){if(!(a!=null&&a.get_children)||b==null)return lib_default().db_instance().static_list(btype_id,[]);let capped_at=Math.floor(b);return capped_at!==b&&verbose("user trying to cap list at decimal value",{b,b_string:String(b),_raw:_raw3}),a.capped(capped_at)}},[LIST_OPERATOR_NAMES.ListFrom]:{section:"Operators",description:":items from #",ret_btype:list_type(btype_id),arg_btype:"number",fn(a,b,properties,_raw3){if(!(a!=null&&a.get_children)||b==null)return lib_default().db_instance().static_list(btype_id,[]);let offset=Math.ceil(b-1);return offset!==b-1&&verbose("user trying to offset list from decimal value",{b,b_string:String(b),_raw:_raw3}),a.offset(offset)}},[LIST_OPERATOR_NAMES.ContainsList]:{description:" contains list ",section:"Operators",ret_btype:"sys.bool",arg_btype:list_type(btype_id),fn:(a,b)=>{for(let item of(_b$all=b==null||(_b$all2=b.all)==null?void 0:_b$all2.call(b))!=null?_b$all:[]){var _b$all,_b$all2,_a$contains3;if(!(a!=null&&(_a$contains3=a.contains)!=null&&_a$contains3.call(a,item,btype)))return!1}return!0}},[LIST_OPERATOR_NAMES.Join]:{description:" join with ",section:"Operators",ret_btype:"text",arg_btype:"text",should_include:btype.has_runmode_display(),fn:(a,b)=>(db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),_join_using(el=>btype.runmode_display(el),a,b)),editor:{static:!0,default:", "}},[LIST_OPERATOR_NAMES.Sum]:{description:":sum",section:"Operators",can_be_cached:!0,ret_btype:"number",should_include:btype.matches("number"),fn:(a,b,properties,_raw3,context,options)=>(db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),a.sum(options))},[LIST_OPERATOR_NAMES.Product]:{description:":product",section:"Operators",can_be_cached:!0,ret_btype:"number",should_include:btype.matches("number"),fn:(a,b,properties,_raw3,context,options)=>(db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),a.product(options))},[LIST_OPERATOR_NAMES.Average]:{description:":average",section:"Operators",can_be_cached:!0,should_include:btype.matches("number")||btype.matches("date"),ret_btype:btype.matches("number")?"number":"date",fn:(a,b,properties,_raw3,context,options)=>{db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[0]));let average=a.average(options);return average!=null?average:a.length()===0?0:average}},[LIST_OPERATOR_NAMES.Median]:{description:":median",section:"Operators",can_be_cached:!0,should_include:btype.matches("number")||btype.matches("date"),ret_btype:btype.matches("number")?"number":"date",fn:(a,b,properties,_raw3,context,options)=>{db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[0]));let median2=a.median(options);return median2!=null?median2:a.length()===0?0:median2}},[LIST_OPERATOR_NAMES.Min]:{description:":min",section:"Operators",can_be_cached:!0,should_include:btype.matches("number")||btype.matches("date"),ret_btype:btype.matches("number")?"number":"date",fn:(a,b,properties,_raw3,context,options)=>{db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[0]));let min=a.min(options);return min!=null?min:a.length()===0?0:min}},[LIST_OPERATOR_NAMES.Max]:{description:":max",section:"Operators",can_be_cached:!0,should_include:btype.matches("number")||btype.matches("date"),ret_btype:btype.matches("number")?"number":"date",fn:(a,b,properties,_raw3,context,options)=>{db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[0]));let max=a.max(options);return max!=null?max:a.length()===0?0:max}},...Object.fromEntries(btype.get_messages().filter(message=>{let UNSUPPORTED_RETURN_TYPES=["function","object"],null_or_empty=[null,[]];return!message.M.arg_btype&&(!UNSUPPORTED_RETURN_TYPES.includes(typeof message.M.ret_btype)||null_or_empty.includes(typeof message.M.ret_btype))}).map(message=>{let HIDDEN_MESSAGE_NAMES={convert_to_list:!0},LIST_MAP_DESCRIPTION_PREFIX=":each item",no_composer=()=>HIDDEN_MESSAGE_NAMES[message.name()],calculated_ret_btype;is_list(message.M.ret_btype)?calculated_ret_btype=message.M.ret_btype:calculated_ret_btype=list_type(message.M.ret_btype);let resulting_message={description(node,options){var _options,_options$parent_node;if((_options=options)!=null||(options={}),options.for_consumer===DROPDOWN_DESCRIPTION_CONTEXT)return LIST_MAP_DESCRIPTION_PREFIX+message.description(node);let parent_node=(_options$parent_node=options.parent_node)!=null?_options$parent_node:node==null?void 0:node.prior();return parent_node instanceof lang_default.DataSource||!(parent_node!=null&&parent_node.prior().get_btype().is_list())?LIST_MAP_DESCRIPTION_PREFIX+message.description(node):message.description(node)},ret_btype:calculated_ret_btype,spot_data:message.M.spot_data,description_for_sliding_palette:message.M.description_for_sliding_palette,field_names:message.M.field_names,section:message.M.section,fields:message.M.fields,compound_message:!0,no_composer,arg_btype:null,fn:(a,b,properties,_raw3)=>{db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[]));let transformed_list=new TransformList_default(a,{btype_id,message:message.name(),properties,_raw:_raw3,arg:b});return is_list(message.M.ret_btype)&&(transformed_list=transformed_list.flatten()),transformed_list}};return[message.name(),resulting_message]})),[LIST_OPERATOR_NAMES.PlusElement]:{description:":plus item ",ret_btype:list_type(btype_id),section:"Other Operators",arg_btype:btype_id,fn(a,b){return db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),b=btype.cast(b),b==null?b=lib_default().db_instance().static_list(btype_id,[]):b=lib_default().db_instance().static_list(btype_id,[b]),new UniqueList_default(new ConcatList_default(lib_default().db_instance().static_list(list_type(btype_id),[a,b])))}},[LIST_OPERATOR_NAMES.MinusElement]:{description:":minus item ",section:"Other Operators",should_include:btype_id!=="geographic_address",ret_btype:list_type(btype_id),arg_btype:btype_id,fn(a,b){if(db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),b=btype.cast(b),b==null)return a;let constraint;if(b._id!=null)constraint=[{key:UNIQUE_ID,constraint_type:"not equal",value:b._id()}];else{let has_not_equals=!btype.get_message("not_equals").is_not_found(),is_uid=typeof b=="string"&&btype.plugin.uid_field!=null;if(!has_not_equals&&!is_uid)throw new UnexpectedError("minus_element called on a btype that doesn't have not_equals: "+btype_id);constraint=[{key:ADVANCED_SEARCH_CONSTRAINT,value:{"%x":"InjectedValue","%n":{"%nm":"not_equals","%a":b,"%x":"Message"}},self:has_not_equals?btype_id:"text"}]}return a.filter(constraint)}},[LIST_OPERATOR_NAMES.MinusList]:{description:":minus list ",section:"Other Operators",should_include:btype_id!=="geographic_address",ret_btype:list_type(btype_id),arg_btype:list_type(btype_id),fn(a,b){return a=process_list_arg(btype_id,a),b=process_list_arg(btype_id,b),new UniqueList_default(new MinusList(lib_default().db_instance().static_list(list_type(btype_id),[a,b])))}},[LIST_OPERATOR_NAMES.MergedWith]:{description:" merged with ",section:"Other Operators",ret_btype:list_type(btype_id),arg_btype:list_type(btype_id),fn(a,b){return db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),db_values_default.registry.is(b,db_values_default.LIST_WRAPPER)||(b=lib_default().db_instance().static_list(btype_id,[])),new UniqueList_default(new ConcatList_default(lib_default().db_instance().static_list(list_type(btype_id),[a,b])))}},[LIST_OPERATOR_NAMES.IntersectWith]:{description:" intersect with ",section:"Other Operators",ret_btype:list_type(btype_id),arg_btype:list_type(btype_id),fn(a,b){return db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),db_values_default.registry.is(b,db_values_default.LIST_WRAPPER)||(b=lib_default().db_instance().static_list(btype_id,[])),new IntersectList_default(lib_default().db_instance().static_list(list_type(btype_id),[a,b]))}},[LIST_OPERATOR_NAMES.GroupBy]:{should_include:btype.matches(compound),ret_btype(_raw3){var _raw22;(_raw22=_raw3)!=null||(_raw3={}),_raw3=json_deep_copy(_raw3);for(let i of["groupings","aggregations"])for(let thing_key in(_raw$P=_raw3["%p"])==null?void 0:_raw$P[i]){var _raw$P,_raw$P2;let data=(_raw$P2=_raw3["%p"])==null?void 0:_raw$P2[i][thing_key];for(let k in data)data[k]["%x"]==="Empty"&&delete data[k];is_empty(data)&&delete _raw3["%p"][i][thing_key]}try{var _raw$P3;let list4=this.fn(void 0,void 0,(_raw$P3=_raw3["%p"])!=null?_raw$P3:{});return list_type(list4.get_item_btype_id())}catch{return"list.null"}},field_names:{groupings:{},aggregations:{}},spot_data:"SlidableAtom",description(node){var _node$property$raw;return node==null?":group by... ":":grouped by "+Object.values((_node$property$raw=node.property("groupings").raw())!=null?_node$property$raw:{}).map(grouping=>grouping.message).map(msg_name=>btype.get_message(msg_name).description(void 0,!0)).join(", ")},section:"Other Operators",fn(a,b,properties,_raw3){db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[]));let data=create_group_by_data(btype_id,properties);return a.group_by(data)}},[LIST_OPERATOR_NAMES.Filtered]:{ret_btype:list_type(btype_id),field_names:extend({ignore_empty_constraints:{}},constraints_field_names,sorting_field_names),spot_data:"SlidableAtom",description:":filtered",section:"Other Operators",fn(a,b,properties,_raw3,context){db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),properties.type_to_find=btype_id;let null_not_dropped=!properties.ignore_empty_constraints,constraints=object_values(properties.constraints).map((constraint,idx)=>{if(constraint.key===ADVANCED_SEARCH_CONSTRAINT){let constraint_raw=_raw3[S17.properties][S17.constraints][idx][S17.value];constraint.value=reduce(constraint_raw,context),btype.matches(compound)||(constraint.self=btype_id)}return constraint});return a.filter(constraints,null_not_dropped).sort(get_sorts_list(properties))},no_frozen_state:!0,properties_for_pre_evaluation(_ref2){let{_properties}=_ref2;if(!(_properties!=null&&_properties[S17.constraints]))return _properties;let resulting_properties=extend({},_properties);resulting_properties[S17.constraints]={};for(let index in _properties[S17.constraints]){let constraint=_properties[S17.constraints][index];constraint!=null&&(typeof constraint!="object"?resulting_properties[S17.constraints][index]=constraint:(resulting_properties[S17.constraints][index]=extend({},constraint),constraint[S17.key]===ADVANCED_SEARCH_CONSTRAINT&&(resulting_properties[S17.constraints][index][S17.value]=null)))}return resulting_properties}},[LIST_OPERATOR_NAMES.Sorted]:{should_include:btype.matches(compound)||btype.option_set()!=null||btype.can_sort(),ret_btype:list_type(btype_id),field_names:btype.matches(compound)||btype.option_set()!=null?{...sorting_field_names}:{random:{},descending:{optional:!0}},spot_data:"SlidableAtom",description(node){let sort_field=node==null?void 0:node.property("sort_field").raw(),result=":sorted";if(sort_field===DYNAMIC_SORTING_FIELD)result+=" by dynamic field";else if(sort_field===RANDOM_SORTING)result+=" randomly";else if(sort_field){var _sort_field_fancy;let val=get5(btype_id),sort_field_fancy;if(val.custom_type()!=null)sort_field_fancy=val.custom_type().field(sort_field).display();else if(val.option_set()!=null)sort_field_fancy=val.option_set().attribute(sort_field).display();else{var _val$get_message,_val$get_message$desc;sort_field_fancy=(_val$get_message=val.get_message(sort_field))==null||(_val$get_message$desc=_val$get_message.description)==null?void 0:_val$get_message$desc.call(_val$get_message,void 0,!0)}result+=" by "+((_sort_field_fancy=sort_field_fancy)!=null?_sort_field_fancy:sort_field)}return result},section:"Other Operators",fn(a,b,properties){if(Array.isArray(a))a=array_to_static_list(btype_id,a);else if(!a||!a.all)return lib_default().db_instance().static_list(btype_id,[]);if(btype.matches(compound)||btype.option_set()!=null){properties.type_to_find=btype_id;let sorts_list=get_sorts_list(properties);return new SortedList_default(a,{sorts_list})}else{var _properties2;return(_properties2=properties)!=null||(properties={}),properties.sorts_list=[{sort_field:properties.random?RANDOM_SORTING:void 0,descending:properties.descending,self:!0}],new SortedList_default(a,properties)}}},[LIST_OPERATOR_NAMES.RankedBy]:{should_include:btype.matches(compound)||btype.option_set()!=null,ret_btype:list_type(btype_id),field_names:{target_item:{},method:{}},spot_data:"SlidableAtom",description(node){let target_item=node==null?void 0:node.property("target_item"),method=node==null?void 0:node.get_static_property("method"),message=":ranked by";return method?(message+=" ",method==="similar"?message+="numerical similarity to ":method==="different"&&(message+="numerical difference from "),target_item!=null&&target_item.exists()?message+=target_item.get_tree_display():message+="..."):message+="...",message},section:"Other Operators",fn(a,b,properties){var _a$all,_a$all2;let results=(_a$all=a==null||(_a$all2=a.all)==null?void 0:_a$all2.call(a))!=null?_a$all:[];if(db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)&&a.get_item_btype_id()!==btype_id)return[];let option_set=get5(btype_id).option_set();if(properties.target_item!=null&&(option_set||properties.target_item.child)){let score2=function(item){if(item==null||option_set==null&&!item.child)return 1/0;let ret=0;for(let message of messages){var _option_set$value$att,_item$child;let name=message.name(),diff=(_option_set$value$att=option_set==null?void 0:option_set.value(item).attr(name))!=null?_option_set$value$att:item==null||(_item$child=item.child)==null?void 0:_item$child.call(item,name).get();if(diff!=null)ret+=Math.pow(target[name]-diff,2);else return 1/0}return ret};var score=score2;let messages=get5(btype_id).get_messages().filter(message=>message.ret_btype().matches("number")),target={};for(let message of messages){let name=message.name();option_set?target[name]=option_set.value(properties.target_item).attr(name):target[name]=properties.target_item.child(name).get()}let modifier=properties.method==="different"?-1:1;results.sort((a2,b2)=>(score2(a2)-score2(b2))*modifier)}return lib_default().db_instance().static_list(btype_id,results)}},[LIST_OPERATOR_NAMES.Unique]:{description:":unique elements",section:"Other Operators",ret_btype:list_type(btype_id),fn(a,b){return db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||(a=lib_default().db_instance().static_list(btype_id,[])),new UniqueList_default(a)}},[LIST_OPERATOR_NAMES.ApproximateCount]:{description:":approximate count",section:"Other Operators",can_be_cached:!0,ret_btype:"number",fn:(a,b,properties,_raw3,context,options)=>count_fn(a,b,properties,_raw3,extend({should_approx:!0},options)),message_cache_id:_ref3=>{let{raw}=_ref3;return count_message_cache_id(raw)}},[LIST_OPERATOR_NAMES.CachedAggregation]:{description(node){let operation=node==null?void 0:node.get_static_property("operation");return":cached "+(operation!=null?operation:"aggregation")},section:"Other Operators",field_names:{operation:{}},spot_data:"SlidableAtom",ret_btype:function(message_raw){var _allowed_messages$mes,_message_raw$S$proper,_ref4;let ret=(_allowed_messages$mes=allowed_messages[message_raw==null||(_message_raw$S$proper=message_raw[S17.properties])==null?void 0:_message_raw$S$proper.operation])==null?void 0:_allowed_messages$mes.ret_btype;return(_ref4=typeof ret=="function"?ret():ret)!=null?_ref4:"null"},fn(a,b,properties,_raw3,context){var _allowed_messages$ope;let operation=properties.operation;return(_allowed_messages$ope=allowed_messages[operation])==null?void 0:_allowed_messages$ope.fn(a,b,properties,_raw3,context,{cacheable:!0})},message_cache_id:_ref8=>{var _allowed_messages$pro,_allowed_messages$pro2;let{raw,properties}=_ref8;return(_allowed_messages$pro=allowed_messages[properties.operation])==null||(_allowed_messages$pro2=_allowed_messages$pro.message_cache_id)==null?void 0:_allowed_messages$pro2.call(_allowed_messages$pro,{raw})}},[LIST_OPERATOR_NAMES.FormatAsText]:{description:":format as text",section:"Other Operators",spot_data:"SlidableAtom",ret_btype:"text",field_names:{content:{prop_type:EVAL_TYPE.thunk},delimiter:{prop_type:EVAL_TYPE.thunk}},fn(a,b,properties,_raw3,context){if(!(a!=null&&a.get_children)||!a.length()||_raw3==null)return this.ret_btype_null();let formatted_text="",list_length=a.length();return a.all().forEach((item,idx)=>{var _a$get_item_btype_id,_raw$S$properties;let new_context=extend({},context);new_context.datasources=extend({},new_context.datasources),new_context.datasources.injected_value=()=>item;let type=(_a$get_item_btype_id=a.get_item_btype_id())!=null?_a$get_item_btype_id:"text";new_context.datasources.injected_value_btype=()=>type;let eval_content=properties.content(new_context),raw_delimiter=(_raw$S$properties=_raw3[S17.properties])==null?void 0:_raw$S$properties.delimiter,eval_delimiter;idx===list_length-1||!raw_delimiter?eval_delimiter="":eval_delimiter=properties.delimiter(new_context),formatted_text+=eval_content+eval_delimiter}),formatted_text},no_frozen_state:!0},[LIST_OPERATOR_NAMES.MakeStatic]:{description:":make static ",section:"Other Operators",ret_btype:list_type(btype_id),fn(a,b){return(!db_values_default.registry.is(a,db_values_default.LIST_WRAPPER)||!get5(a.get_item_btype_id()).matches(btype_id))&&(a=lib_default().db_instance().static_list(btype_id,[])),lib_default().db_instance().static_list(btype_id,a.all())}}},message_list=Object.entries(all_messages).filter(_ref9=>{var _message$should_inclu;let[_,message]=_ref9;return(_message$should_inclu=message.should_include)!=null?_message$should_inclu:!0});return message_list.forEach(_ref10=>{let[message_name,message]=_ref10;message.compound_message||(message.documentation_id="Documentation.Data.Messages.list."+message_name),delete message.should_include}),allowed_messages=Object.fromEntries(message_list),allowed_messages}var exported85={list(){},display(){return"list"},get(btype_id){let btype=get5(btype_id),runmode_display=null;btype.has_runmode_display()&&(runmode_display=val=>_join_using(el=>btype.runmode_display(el),val,", "));let export_to_string=null;btype.has_export_to_string()&&(export_to_string=function(val,context){var _val$all3,_val$all4;return context.always_return_text=!0,((_val$all3=val==null||(_val$all4=val.all)==null?void 0:_val$all4.call(val))!=null?_val$all3:[]).map(item=>{let visited_fields_copy=new Map(context.visited_field_types),context_copy=extend({},context,{visited_field_types:visited_fields_copy});return btype.export_to_string(item,context_copy)}).join(" , ")});let debugging_display=null;btype.has_debugging_display()&&(debugging_display=val=>_join_using(el=>btype.debugging_display(el),val,", "));let m=get_messages(btype);return{get_message_names:()=>Object.keys(m),get_message(name){return m[name]},display(){var _display;let display2=btype.display();return((_display=display2)==null?void 0:_display.slice(-1))==="s"?display2+="es":display2+="s","List of "+display2},inner(){return btype},is_list:!0,equals(a,b){return!1},get_sample(){return new SampleList(btype_id)},get_bubble_null:list_get_bubble_null,cast(v){return cast_to_list(btype_id,v)},storable:!1,bindable:!1,runmode_display,export_to_string,debugging_display,get_JS_object(val){let raw;return Array.isArray(val)?raw=val:(val==null?void 0:val.all)!=null?raw=val.all():raw=[],raw.map(a=>btype.get_JS_object(a))},JS_to_bubble(val){let res=[];for(let v of array_from(val)){optional_pause_tick(10);let bubble_v=btype.JS_to_bubble(v);bubble_v!=null&&res.push(bubble_v)}return lib_default().db_instance().static_list(btype_id,res)}}}},list_default=exported85;function count_fn(a,b,properties,_raw3,options){var _raw$N,_a$length;if(typeof(a==null?void 0:a.length)!="function")return 0;let next_message=_raw3==null||(_raw$N=_raw3["%n"])==null?void 0:_raw$N["%nm"];if(COMPARISON_OPERATORS.includes(next_message)){var _raw$N2;let btype_to_compare_to=(_raw$N2=_raw3["%n"])==null?void 0:_raw$N2["%a"];if(typeof btype_to_compare_to=="number"){let result=a==null?void 0:a["length_"+next_message](btype_to_compare_to,options),comparison_offsets={greater_than:{true:1,false:-1},greater_or_equal_than:{true:1,false:-1},less_than:{true:-1,false:1},less_or_equal_than:{true:-1,false:1},equals:{true:0,false:-1},not_equals:{true:-1,false:0}};return result?btype_to_compare_to+comparison_offsets[next_message].true:btype_to_compare_to+comparison_offsets[next_message].false}}return(_a$length=a.length(options))!=null?_a$length:0}function count_message_cache_id(raw){let next=raw["%n"],next_name=next==null?void 0:next["%nm"],next_args=next==null?void 0:next["%a"];return COMPARISON_OPERATORS.includes(next_name)&&typeof next_args=="number"?`${next_args}_${next_name}`:""}init_define_process_env();init_shim();var import_web_dom_collections_iterator323=__toESM(require_web_dom_collections_iterator());init_u2();init_appquery();init_btype_ids();init_postgres_constraints();init_logger();init_list_utilities();init_btypes();init_lib();var documentation_id_getter2={for_value_messages_option_sets:()=>""};documentation_id_getter2=documentation_id_getter_exports;function create_option_set(id){if(!id)throw new UnexpectedError("custom option set created without id.");let full_id=option_set_type(id),node=appquery_default.option_set(id);return _create_option_set_btype(full_id,node)}function _create_option_set_btype(full_id,node){let special_messages={};return extend(special_messages,{display:{description:"'s Display",section:"Attributes",public_for_plugins:!0,ret_btype:"text",fn(a,b){var _node$value$display,_node$value;return a&&(_node$value$display=(_node$value=node.value(a))==null?void 0:_node$value.display())!=null?_node$value$display:""}},equals:{description:" is ",ret_btype:"sys.bool",section:"Operators",arg_btype:full_id,fn(a,b){return option_equals(a,b)},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:full_id,fn(a,b){return!option_equals(a,b)},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},is_empty:{description:" is empty",section:"Operators",ret_btype:"sys.bool",fn(a,b){return!a},build_pg_constraint:is_empty2},is_not_empty:{description:" is not empty",section:"Operators",ret_btype:"sys.bool",fn(a,b){return!!a},build_pg_constraint:is_not_empty},defaulting_to:{description:":defaulting to ",section:"Operators",ret_btype:full_id,arg_btype:full_id,fn(a,b){return a||b}},is_contained_by_list:build_is_contained_by_list(full_id),is_not_contained_by_list:build_is_not_contained_by_list(full_id),convert_to_list:{description:":converted to list",section:"Operators",ret_btype:list_type(full_id),fn(a,b,properties){return a=get5(full_id).cast(a),a==null||a===""?lib_default().db_instance().static_list(full_id,[]):lib_default().db_instance().static_list(full_id,[a])}}}),{get_message_names(){let special_names=Object.entries(special_messages).filter(_ref=>{let[name,message]=_ref;return!message.hidden&&name!=="display"}).map(_ref2=>{let[name,_]=_ref2;return name});return["display",...node.attributes().filter(attr=>!attr.deleted()).map(attr=>attr.name()),...special_names]},get_message(name){var _attr_node$btype,_ref3;let special=special_messages[name];if(special)return special;let attr_node=node.attribute(name);if(!attr_node)return{description:"[missing: "+name+"]",ret_btype:"null",fn(){}};let ret_btype_id=(_attr_node$btype=attr_node.btype())!=null?_attr_node$btype:"null",bubble_null_set=!1,bubble_null2=null;return{description:(_ref3="'s "+attr_node.display())!=null?_ref3:name,section:"Attributes",ret_btype:ret_btype_id,public_for_plugins:!0,fn(a,b){var _node$value2,_node$value2$attr;let results=(_node$value2=node.value(a))==null||(_node$value2$attr=_node$value2.attr)==null?void 0:_node$value2$attr.call(_node$value2,name);if(is_list(ret_btype_id)){let inner_btype_id=list_element_type(ret_btype_id);return lib_default().db_instance().static_list(inner_btype_id,results!=null?results:[])}let ret_btype_object=get5(ret_btype_id);return ret_btype_object?results!=null?ret_btype_object.cast(results):(bubble_null_set||(bubble_null2=ret_btype_object.get_bubble_null(),bubble_null_set=!0),bubble_null2):(owner_error("Missing field on option set",{display:"Missing field in Option Set used for dynamic property"}),results!=null?results:null)},delete_cb(){if(window.confirm("Delete attribute "+attr_node.display()+"?"))return attr_node.set_deleted(!0)}}},display(){return node.display()},debugging_display(val){if(val=this.cast(val),val){var _full_btype$deleted,_full_btype$display;let full_btype=node.value(val);if(full_btype!=null&&(_full_btype$deleted=full_btype.deleted)!=null&&_full_btype$deleted.call(full_btype))return`(Deleted Option with ID: "${val}")`;if(full_btype!=null&&(_full_btype$display=full_btype.display)!=null&&_full_btype$display.call(full_btype)){var _full_btype$display2;return full_btype==null||(_full_btype$display2=full_btype.display)==null?void 0:_full_btype$display2.call(full_btype)}else return`(Option with invalid id "${val}" for option set "${node.display()}")`}else return""},option_set(){return node},is_option_set:!0,equals:option_equals,from_human(val){return this.JS_to_bubble(val)},get_sample(){var _node$values$0$name,_node$values$;return(_node$values$0$name=(_node$values$=node.values()[0])==null?void 0:_node$values$.name())!=null?_node$values$0$name:null},get_bubble_null(){return null},storable:!0,bindable:!1,export_to_string(val,context){let sub_btype=node.value(val);return sub_btype!=null&&sub_btype.deleted()&&context.option_show_if_deleted?"(deleted option)":sub_btype==null?void 0:sub_btype.display()},get_JS_object(val){var _node$value$display2,_node$value3,_node$value3$display;return typeof val!="string"||val===""?null:(_node$value$display2=(_node$value3=node.value(val))==null||(_node$value3$display=_node$value3.display)==null?void 0:_node$value3$display.call(_node$value3))!=null?_node$value$display2:null},JS_to_bubble(id){if(typeof id!="string"||id==="")return null;for(let val of node.values())if(val.display()===id&&!val.deleted())return val.id();return null},cast(val){if(val==null)return null;if(typeof val=="string"){var _node$value4;return(_node$value4=node.value(val))!=null&&_node$value4.exists()?val:get_safe_id(val,{reserved:node.reserved_values()})}else return null}}}var option_default={get:create_option_set,list(){return appquery_default.option_sets(void 0,!0).map(optset=>optset.name())},display(){return"option set"}};function option_equals(a,b){return a===b}init_define_process_env();init_shim();init_u2();init_list_utilities();init_hydrate();init_StaticObject();init_btypes();init_lib();init_decaf();var exported86={list(){},display(){return"struct"},get(string_def){let{caption,definition}=JSON.parse(base64decode2(string_def)),my_btype_id="struct."+string_def;if(typeof definition!="object")throw new UnexpectedError("Bad struct val: "+string_def);let reverse2={};for(let k in definition){let v=definition[k];reverse2[v[0]]=k}return{get_message_names(){return object_keys(definition)},get_message(name){var _ref,_definition$name,_definition$name$,_definition$name2;return{description:(_ref="'s "+((_definition$name=definition[name])==null?void 0:_definition$name[0]))!=null?_ref:"[Missing: "+name,section:"Field Data",ret_btype:(_definition$name$=(_definition$name2=definition[name])==null?void 0:_definition$name2[1])!=null?_definition$name$:"null",is_lookup:!0}},display(){return caption},equals(a,b){for(let k in definition){let v=definition[k],ak=a.child(k).get(),bk=b.child(k).get();if(!get5(v[1]).equals(ak,bk))return!1}return!0},is_contained_by_list:build_is_contained_by_list(my_btype_id),is_not_contained_by_list:build_is_not_contained_by_list(my_btype_id),get_sample(){let res={};for(let k in definition){let v=definition[k];res[k]=get5(v[1]).get_sample()}return new StaticObject(res,null,my_btype_id)},get_bubble_null(){return null},cast(val){if(typeof val!="object"||!val)return this.get_bubble_null();if(typeof val.raw=="function")return val.btype_id===my_btype_id?val:new StaticObject(val,val.db,my_btype_id);try{return new StaticObject(JSON.parse(JSON.stringify(val)),null,my_btype_id)}catch{return this.get_bubble_null()}},storable:!1,bindable:!0,is_aggregate:caption==="Grouping",get_JS_object(val){if(typeof(val==null?void 0:val.raw)!="function")return null;let raw=val.raw();if(typeof raw!="object")return null;let result={};for(let k in definition){let v=definition[k],rehydrated=rehydrate_tree(lib_default().db_instance(),raw[k]);result[v[0]]=get5(v[1]).get_JS_object(rehydrated)}return result},JS_to_bubble(val){if(val==null)return this.get_bubble_null();typeof val!="object"&&generate_JS_to_bubble_error(this.display(),val);let result={};for(let k in val){let v=val[k];if(!definition[k])throw new UnexpectedError("the key "+k+" is not part of the btype definition");result[k]=get5(definition[k][1]).JS_to_bubble(v)}return new StaticObject(result,null,my_btype_id)}}}},struct_default=exported86;init_define_process_env();init_shim();var exported87={get(element_type){let messages={},element_object=get_element_object(element_type);element_object!=null&&add_basic_element_messages(element_object.get_states(),messages,has_event("ButtonClicked",element_type));for(let message_name in messages){let message=messages[message_name];message.documentation_id="Documentation.Elements.GeneralConcepts.States."+message_name}return{display(){return"style"},get_message_names(){return Object.keys(messages)},get_message(name){return messages[name]},cast(val){return val},storable:!1,bindable:!1}},list(){return[]},display(){return"style"}},style_default=exported87;init_define_process_env();init_shim();init_u2();init_postgres_constraints();init_b_string();init_StaticObject();var exported88={get(id){if(id==="error")return build_simple(id,{messages:{code:{description:"'s code",section:"Data Fields",ret_btype:"text",fn(a,b){return a==null?void 0:a.child("code").get()}},message:{description:"'s message",section:"Data Fields",ret_btype:"text",fn(a,b){return a==null?void 0:a.child("message").get()}}},display(){return"Error"},runmode_display(a){return a==null?void 0:a.child("message").get()},equals(){return!1},storable:!1,bindable:!1,get_sample(){return new StaticObject({code:"SAMPLE",message:"THIS IS A SAMPLE"},null,"sys.error")},convert_to_bubble_instance(val){return val},cast(val){return val}});if(id==="json")return build_simple(id,{display(){return"json"},runmode_display(json){return JSON.stringify(json)},equals(a,b){return JSON.stringify(a)===JSON.stringify(b)},storable:!1,bindable:!1,get_sample(){return{}},cast(x){return x},messages:{}});if(id==="bool")return build_simple(id,{messages:{and_:{description:" and ",section:"Operators",ret_btype:"sys.bool",arg_btype:"sys.bool",fn(a,b){return to_bool(a)&&to_bool(b)},can_shortcircuit_args(a){var _to_bool;return((_to_bool=to_bool(a))!=null?_to_bool:!1)===!1}},or_:{description:" or ",section:"Operators",ret_btype:"sys.bool",arg_btype:"sys.bool",fn(a,b){return to_bool(a)||to_bool(b)},can_shortcircuit_args(a){return to_bool(a)===!0}},format_boolean:format_boolean_message,format_boolean_number:format_boolean_number_message},display(){return"yes / no"},composer_input_type:COMPOSER_INPUT_TYPES.BOOLEAN,runmode_display:render_bool,export_to_string(val,context){return context.booleans_yes_no?render_bool(val):val!=null?val:!1},equals:bool_equals,storable:!1,bindable:!1,synonyms:["boolean"],get_sample(){return!0},convert_to_bubble_instance:to_bool,cast(val){return to_bool(val)},get_JS_object(val){var _this$cast;return(_this$cast=this.cast(val))!=null?_this$cast:!1}});if(id==="uid")return build_simple(id,{display(){return"unique identifier"},composer_input_type:COMPOSER_INPUT_TYPES.TEXT,equals(a,b){return a===b},storable:!1,bindable:!1,synonyms:["text"],get_sample(){return"asdf234sdz"},cast:cast_to_string,runmode_display:cast_to_string,messages:{equals:{description:" is ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return a===b},build_pg_constraint:equals,build_pg_r_constraint:equals,build_pg_relationship:equals_both},not_equals:{description:" is not ",section:"Operators",ret_btype:"sys.bool",arg_btype:"text",fn(a,b){return a!==b},build_pg_constraint:not_equals,build_pg_r_constraint:not_equals,build_pg_relationship:not_equals_both},is_empty:{description:" is empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_empty2,fn(a,b){return a==null||a===""}},is_not_empty:{description:" is not empty",section:"Operators",ret_btype:"sys.bool",build_pg_constraint:is_not_empty,fn(a,b){return a!=null&&a!==""}},trimmed:{description:":trimmed",section:"Other Operators",ret_btype:"text",arg_btype:null,fn(a,b){var _a$trim;return a==null||(_a$trim=a.trim)==null?void 0:_a$trim.call(a)}},length:{description:":number of characters",section:"Other Operators",ret_btype:"number",arg_btype:null,fn(a,b){return a?a.length:0}},truncated:{description:"truncated to ",section:"Other Operators",ret_btype:"text",arg_btype:"number",fn(a,b){return typeof a!="string"?this.ret_btype_null():b?a.slice(0,to_num(b)):a}},truncated_right:{description:"truncated from end to ",section:"Other Operators",ret_btype:"text",arg_btype:"number",fn(a,b){if(typeof a!="string")return this.ret_btype_null();if(b){let start3=a.length-to_num(b);return start3<0&&(start3=0),a.slice(start3)}else return a}}}})},list(){return[]},display(){return"sys"}},sys_default=exported88;var plugins6={};plugins6.boolean=boolean_default;plugins6.date=date_default;plugins6.dateinterval=dateinterval_default;plugins6.date_range=date_range_default;plugins6.file=file_default;plugins6.geographic_address=geographic_address_default;plugins6.image=image_default;plugins6.key_combination=key_combination_default;plugins6.null=null_default;plugins6.number_range=number_range_default;plugins6.number=number_default;plugins6.text=text_default;plugins6.user=user_default;var providers2={};providers2.api_wf_data=api_wf_data_default;providers2.api=api_default;providers2.custom=custom_default;providers2.element=element_default;providers2.list=list_default;providers2.option=option_default;providers2.struct=struct_default;providers2.style=style_default;providers2.sys=sys_default;for(let special_type of SPECIAL_TYPES){let name=special_type.name(),fn=()=>create_custom_btype(name,special_type,void 0,void 0,!0);fn.dont_list=!0,plugins6[name]=fn}var _plugins_sort_order=["text","number","number_range","null","date","date_range","dateinterval","boolean","file","image","geographic_address","key_combination","user",...SPECIAL_TYPES.map(v=>v.name())],_providers_sort_order=["sys","element","style","struct","list","custom","api","api_wf_data","option"],all3={};for(let plugin_name of _plugins_sort_order)plugins.add(plugin_name,plugins6[plugin_name]),all3[plugin_name]=plugins6[plugin_name];for(let provider_name of _providers_sort_order)providers.add(provider_name,providers2[provider_name]),all3[provider_name]=providers2[provider_name];var SERVER_SIDE_OPTIONAL_SERVICES=["algolia_search_engine"];function initialize4(){if(typeof window>"u"||window===null)for(let optional_service of SERVER_SIDE_OPTIONAL_SERVICES)safe_require(`./optional/services/${optional_service}`);inject_dependencies({element:registered_elements,event:core_events_default,action:core_actions_default,btype:all3,datasource:core_datasources_default})}init_define_process_env();init_shim();init_registry2();init_value_types();init_db2();init_Dynamic();init_StaticNode();init_StaticObject();init_ListWrapper();init_NodeBase();init_StaticList();init_TransformList();init_ConcatList();init_IntersectList();init_UniqueList();init_SortedList();init_NodeList2();init_ClientDBNode();init_ClientDBObject();db_default.ClientDBNode=ClientDBNode;function register_values(){add2(value_types_default.DYNAMIC,Dynamic_default),add2(value_types_default.LIST_WRAPPER,ListWrapper),add2(value_types_default.NODE_BASE,NodeBase),add2(value_types_default.STATIC_NODE,StaticNode),add2(value_types_default.STATIC_OBJECT,StaticObject),add2(value_types_default.STATIC_LIST,StaticList_default),add2(value_types_default.TRANSFORM_LIST,TransformList_default),add2(value_types_default.CONCAT_LIST,ConcatList_default),add2(value_types_default.INTERSECT_LIST,IntersectList_default),add2(value_types_default.MINUS_LIST,MinusList),add2(value_types_default.UNIQUE_LIST,UniqueList_default),add2(value_types_default.SORTED_LIST,SortedList_default),add2(value_types_default.NODE_LIST,NodeList_default2),add2(value_types_default.CLIENT_DB_NODE,ClientDBNode),add2(value_types_default.CLIENT_DB_OBJECT,ClientDBObject_default)}init_define_process_env();init_shim();var b_async17=__toESM(require_b_async());init_b_object();init_b_location_utils();init_logger();init_core2();init_b_date();var address_timezone_keys={},tz_cache={};function make_tz_cache_key(data){return data={...data},data.timestamp=require_moment2(data.timestamp*1e3).utc().startOf("day").valueOf(),JSON.stringify(data)}function request_timezone_impl(data){let hash2=make_tz_cache_key(data);return address_timezone_keys[hash2]||(address_timezone_keys[hash2]=b_async17.MakeKey(null,"address_timezone_key"),proxy_geolocation_request(data,hash2,(res,_hash)=>{(res==null?void 0:res.status)==="OK"?tz_cache[_hash]=res:error("Timezone fetching issue",{res}),address_timezone_keys[_hash].turn()})),b_async17.ensure_ready(address_timezone_keys[hash2]),tz_cache[hash2]}var places_autocomplete_cache={};function request_autocomplete_impl(request,cb){let location_hash,{input:input2,location:location2,radius}=request;is_b_location(location2)&&radius?location_hash=location2.lat+","+location2.lng:location_hash=null;let hash2=input2+radius+location_hash;if(places_autocomplete_cache[hash2]){cb(places_autocomplete_cache[hash2]);return}if(using_bubble_key())proxy_geolocation_request({input:input2,radius,location:location_hash,request_type:"autocomplete"},hash2,(results,_hash)=>{!results||results.status!=="OK"?cb([]):(places_autocomplete_cache[_hash]=results.predictions,cb(results.predictions))});else{var _google,_google$maps,_google$maps$places;(typeof google>"u"||((_google=google)==null||(_google$maps=_google.maps)==null||(_google$maps$places=_google$maps.places)==null?void 0:_google$maps$places.AutocompleteService)==null)&&load_google_map_api(),b_async17.WaitFor(load_google_map_api(),()=>{let AutocompleteService=new window.google.maps.places.AutocompleteService,data={input:input2};location_hash&&extend(data,{location:new google.maps.LatLng(location2),radius}),AutocompleteService.getQueryPredictions(data,(results,status)=>{status===google.maps.places.PlacesServiceStatus.OK?(places_autocomplete_cache[hash2]=results,cb(results)):cb([])})})}}var address_localization_keys={};function request_geocode_impl(data,raw_response_to_obj,result_cb,extra_args){let hash2=json_stringify(data),{alert_on_failure,throw_not_ready:throw_not_ready5}=extra_args;if(!address_localization_keys[hash2]){let fail_cb2=function(status,_hash,_alert_on_failure){result_cb(null),address_localization_keys[_hash].turn(),_alert_on_failure&&alert("There was an error converting the address "+_hash+" into a geographic location. Error message: "+status)},success_cb2=function(result,_hash){result_cb(raw_response_to_obj(result)),address_localization_keys[_hash].turn()};var fail_cb=fail_cb2,success_cb=success_cb2;if(address_localization_keys[hash2]=b_async17.MakeKey(null,"address_localization_keys"),using_bubble_key())proxy_geolocation_request(data,hash2,(response,_hash)=>{!response||response.status!=="OK"?fail_cb2(response==null?void 0:response.status,_hash,alert_on_failure):success_cb2(response.results[0],_hash)});else{var _google2,_google2$maps;(typeof google>"u"||((_google2=google)==null||(_google2$maps=_google2.maps)==null?void 0:_google2$maps.Geocoder)==null)&&load_google_map_api(),b_async17.WaitFor(load_google_map_api(),()=>{let geocoder=new window.google.maps.Geocoder,MAX_RETRIES=5,retries2=MAX_RETRIES;function call_api(_hash,_retries){let data_to_send;data.place_id!=null?data_to_send={placeId:data.place_id}:data.address!=null?data_to_send={address:data.address}:data.lat!=null&&data.lng!=null&&(data_to_send={latLng:new window.google.maps.LatLng(data.lat,data.lng)});let CALLBACK_NOT_FIRED_FALLBACK_AFTER_MS=5e3,missing_callback_failure_handled=!1,timeout_id=setTimeout(()=>{owner_error("Probably invalid Geocoding API key",{display:"Geocoding Service: cannot connect to the service, please check the Geocode API key"}),missing_callback_failure_handled=!0,fail_cb2(google.maps.GeocoderStatus.REQUEST_DENIED,hash2,alert_on_failure)},CALLBACK_NOT_FIRED_FALLBACK_AFTER_MS);geocoder.geocode(data_to_send,(results,status)=>{if(clearTimeout(timeout_id),!missing_callback_failure_handled)if(status===google.maps.GeocoderStatus.OK)success_cb2(results[0],_hash);else if(status===google.maps.GeocoderStatus.OVER_QUERY_LIMIT&&_retries>0){let retries_remaining=_retries-1;setTimeout(()=>{call_api(_hash,retries_remaining)},(MAX_RETRIES-retries_remaining)*(MAX_RETRIES-retries_remaining)*1e3)}else status===google.maps.GeocoderStatus.REQUEST_DENIED&&owner_error("Unauthorized Geocoding API key",{display:"Geocoding Service: This API project is not authorized to use this API.  For more information on authentication and Google Maps JavaScript API services check https://developers.google.com/maps/documentation/javascript/get-api-key"}),fail_cb2(status,_hash,alert_on_failure)})}call_api(hash2,retries2)})}}b_async17.ensure_ready(address_localization_keys[hash2],!throw_not_ready5)}var init3=()=>{init("client",{request_timezone:request_timezone_impl,request_geocode:request_geocode_impl,request_autocomplete:request_autocomplete_impl,localization_hasher:json_stringify})};init_decaf();init_define_process_env();init_shim();var import_web_dom_collections_iterator330=__toESM(require_web_dom_collections_iterator()),import_web_url5=__toESM(require_web_url()),import_web_url_search_params6=__toESM(require_web_url_search_params()),import_seedrandom2=__toESM(require_seedrandom2()),b_async18=__toESM(require_b_async());init_b_fiber();init_b_string();init_b_object();init_errors();init_mode_check();init_incremental();init_define_process_env();init_shim();var import_web_dom_collections_iterator326=__toESM(require_web_dom_collections_iterator()),import_es_string_replace65=__toESM(require_es_string_replace());init_errors();init_b_string();init_b_number();init_mode_check();var MAX_FORMATTED_DECIMALS=20,LOCALE_CACHE={posix:{},ietf:{}};function cached2(flavor,code,fn){if(on_server())return fn();let hit=LOCALE_CACHE[flavor][code];return hit!=null?hit:LOCALE_CACHE[flavor][code]=fn()}var Locale=class _Locale{constructor(locale_code){let{posix_code,ietf_code}=locale_code;if(this.posix_code=posix_code,this.ietf_code=ietf_code,this.posix_code&&this.ietf_code)throw new UnexpectedError("Can't provide two codes for a Locale");if(this.posix_code)this.ietf_code=_Locale.posix_to_ietf(this.posix_code);else if(this.ietf_code)this.posix_code=_Locale.ietf_to_posix(this.ietf_code);else throw new UnexpectedError("Must provide a code to construct a Locale")}static from_posix(posix_code){return cached2("posix",posix_code,()=>new _Locale({posix_code}))}static from_ietf(ietf_code){return cached2("ietf",ietf_code,()=>new _Locale({ietf_code}))}static posix_to_ietf(posix){let[lang4,variant]=posix.split("_");return lang4&&variant?`${lang4}-${variant.toUpperCase()}`:lang4}static ietf_to_posix(ietf){let[lang4,variant]=ietf.split("-");return lang4&&variant?`${lang4}_${variant.toLowerCase()}`:lang4}get_regional_separators(){if(this.decimal_separator==null||this.group_separator==null||this.decimal_digits==null){let numberString=this.format_number(1111111111111111e-7),one_char=numberString[0];for(let i=numberString.length-1;i>=0;i--){let char=numberString.charAt(i);if(char!==one_char){this.decimal_separator=char,this.decimal_digits=numberString.length-i-1;break}}for(let i=0;i<numberString.length;i++){let char=numberString.charAt(i);if(char!=="1"&&char!==this.decimal_separator){this.group_separator=char;break}this.group_separator=""}}return{decimal_separator:this.decimal_separator,group_separator:this.group_separator,decimal_digits:this.decimal_digits}}format_number(val,decimal_places){let number_format,options;if(decimal_places!=null&&(decimal_places=Math.max(0,Math.min(MAX_FORMATTED_DECIMALS,decimal_places))),typeof Intl>"u"||Intl===null)return decimal_places!=null?val.toFixed(decimal_places):val.toString();decimal_places!=null?options={maximumFractionDigits:decimal_places,minimumFractionDigits:decimal_places}:options={maximumFractionDigits:MAX_FORMATTED_DECIMALS};try{number_format=new Intl.NumberFormat(this.ietf_code+"-u-nu-latn",options)}catch{number_format=new Intl.NumberFormat(this.ietf_code,options)}return number_format.format(val)}format_decimal(val){let{decimal_separator}=this.get_regional_separators();return dec_to_string(val).replace(".",decimal_separator)}parse_float(str){if(typeof str!="string")return parseFloat(str);str=str.trim();let{decimal_separator,group_separator}=infer_separators_from_number(str,this.get_regional_separators());group_separator!=null&&group_separator.charCodeAt(0)===160&&(str=replace_all(str,group_separator," "),group_separator=" ");let common_separators=[",","."," "];for(let sep of common_separators)if(sep!==decimal_separator&&sep!==group_separator&&safe_contains(str,sep))return NaN;let decimal_found=!1;for(let i=str.length-1;i>=0;i--){let char=str.charAt(i);if(decimal_found){if(char===decimal_separator)return NaN}else(char===group_separator||char===decimal_separator)&&(decimal_found=!0)}return str=replace_all(str,group_separator,""),decimal_separator!=="."&&(str=replace_all(str,decimal_separator,".")),parseFloat(str)}};function interpret_separators(str){let interpreted_decimal_separator=null,interpreted_group_separator=null,common_separators=[",","."],decimal_idx=str.length-1;for(;decimal_idx>=0;){let char=str.charAt(decimal_idx);if(common_separators.includes(char)){interpreted_decimal_separator=char;break}decimal_idx-=1}for(let i=0;i<decimal_idx;i++){let char=str.charAt(i);if(char===interpreted_decimal_separator){interpreted_group_separator=char,interpreted_decimal_separator=null;break}else if(common_separators.includes(char)){interpreted_group_separator=char;break}interpreted_group_separator=null}return{interpreted_decimal_separator,interpreted_group_separator}}function is_group_valid(str,separator){if(str.charAt(0)===separator)return!1;let previous_instance_idx=null,current_char_idx=0;for(;current_char_idx<str.length;){if(str.charAt(current_char_idx)!==separator){current_char_idx+=1;continue}if(previous_instance_idx==null&&current_char_idx>3||previous_instance_idx!=null&&current_char_idx-previous_instance_idx!==4)return!1;previous_instance_idx=current_char_idx,current_char_idx+=1}return!(previous_instance_idx==null||current_char_idx-previous_instance_idx!==4)}function infer_separators_from_number(str,regional_separators){let{decimal_separator,group_separator}=regional_separators,lang_decimal_separator=decimal_separator,lang_group_separator=group_separator,{interpreted_decimal_separator,interpreted_group_separator}=interpret_separators(str);return interpreted_decimal_separator!=null&&interpreted_group_separator!=null?{decimal_separator:interpreted_decimal_separator,group_separator:interpreted_group_separator}:interpreted_decimal_separator==null&&interpreted_group_separator==null?{decimal_separator:lang_decimal_separator,group_separator:lang_group_separator}:is_group_valid(str,interpreted_group_separator)?{decimal_separator:interpreted_decimal_separator,group_separator:interpreted_group_separator}:is_group_valid(str,lang_group_separator)&&interpreted_decimal_separator===lang_group_separator?{decimal_separator:lang_decimal_separator,group_separator:lang_group_separator}:{decimal_separator:interpreted_decimal_separator,group_separator:null}}init_logger();init_time();init_b_date();init_define_process_env();init_shim();init_lib();init_u2();init_define_process_env();init_shim();init_lib();init_uuid();var get_page_thing_id=location2=>{var _location$get_query;let unique_id=location2.get_unique_id_in_url();if(unique_id!=null)return unique_id;let slug_id=get_unique_id_from_slug_in_url(location2);if(slug_id!=null)return slug_id;let{path}=location2.get_pieces();if(path&&path[1]!=null)return path[1];let id_from_query=String((_location$get_query=location2.get_query())==null?void 0:_location$get_query.id);return is_UUID(id_from_query)||id_from_query.startsWith("sample:")?id_from_query:null};var get_unique_id_from_slug_in_url=location2=>{let possible_slug=location2.get_slug_in_url();if(possible_slug!=null){var _Lib$app$get_page_by_,_slug$get_thing_id_fr;let type=(_Lib$app$get_page_by_=lib_default().app().get_page_by_name(location2.get_underlying_page()))==null?void 0:_Lib$app$get_page_by_.get_static_property("page_item_type");return(_slug$get_thing_id_fr=get_thing_id_from_slug({appname:lib_default().appname(),app_version:lib_default().app_version(),type,slug_value:possible_slug}))!=null?_slug$get_thing_id_fr:null}return null},get_page_thing=location2=>lib_default().db_instance().get(get_page_thing_id(location2));var PageParamService=class{constructor(){this._dependency=u_exports2.Dependency()}invalidate(){on_phonegap()||(lib_default().location.base_url=document.location.href),lib_default().element.get_page().message("announce_page_event","PageLoaded"),this._dependency.invalidate()}get(){if(get_page_thing_id(lib_default().location)!=null?this.exists=!0:this.exists=!1,this._dependency.register(),this.exists)return get_page_thing(lib_default().location);var _Lib$element,_Lib$element$get_page,_Lib$element$get_page2;return((_Lib$element=lib_default().element)==null||(_Lib$element$get_page=_Lib$element.get_page())==null||(_Lib$element$get_page2=_Lib$element$get_page.element)==null?void 0:_Lib$element$get_page2.get_static_property("page_item_type"))!=null&&console.log("warning: no id specified.  this page expects an id"),null}};init_define_process_env();init_shim();var import_web_dom_collections_iterator328=__toESM(require_web_dom_collections_iterator()),import_web_immediate13=__toESM(require_web_immediate()),import_es_error_cause23=__toESM(require_es_error_cause());init_u2();init_hydrate();init_mode_check();var url7=__toESM(require_url());init_client_config2();init_db();init_node_eval();init_FrozenState();init_page_state();init_logger();init_lib();init_appquery();init_expressions();init_locations2();init_status_bar();init_loggable();init_define_process_env();init_shim();init_lib();init_appquery();var ResumedElementInstance=class{constructor(instance_id,_element_id){this.element=void 0,this.instance_id=instance_id,this._element_id=_element_id,this.element=appquery_default().element(this._element_id)}dehydrate(){return this.instance_id}element_id(){return this._element_id}find_instance_by_id(element_id){return null}root_instance(){var _Lib$or_throw$element;return(_Lib$or_throw$element=lib_default.or_throw().element.get_page())!=null?_Lib$or_throw$element:lib_default.or_throw().native_bridge.currentView}};init_define_process_env();init_shim();var import_web_dom_collections_iterator327=__toESM(require_web_dom_collections_iterator()),import_es_string_replace66=__toESM(require_es_string_replace());init_notifier_topics();init_client();init_lib();init_appquery();init_locations();init_client_config2();init_logger();init_u2();function watchChanges(handler,badRevision){let forcedRefresh=!1,changePromise=null;function getChanges(){if(forcedRefresh){badRevision();return}changePromise=lib_default.or_throw().location.post("server://user/app_changes",{last_change:appquery_default.last_change()}).then(res=>{if(changePromise=null,!(res!=null&&res.length))return;if(res.some(change=>change.action==="overwrite")){forcedRefresh=!0,badRevision();return}let byPath=new Map;for(let{path,data}of res){let joined=path.join(".");if(byPath.has(joined))byPath.set(joined,{path,data});else{let found=!1,toRemove=[];for(let[p,toWrite]of byPath.entries())if(p.indexOf(joined+".")===0)toRemove.push(p);else if(joined.indexOf(p+".")===0){found=!0;let pieces=joined.replace(p+".","").split(".");(toWrite.data==null||typeof toWrite.data!="object")&&(toWrite.data={});let targ=toWrite.data;for(let piece of pieces.slice(0,pieces.length-1))(targ[piece]==null||typeof targ[piece]!="object")&&(targ[piece]={}),targ=targ[piece];targ[pieces[pieces.length-1]]=data}for(let p of toRemove)byPath.delete(p);found||byPath.set(joined,{path,data})}}for(let{path,data}of byPath.values())if(handler!=null&&!handler.can_process(path,data)){forcedRefresh=!0,badRevision();return}let{last_change,last_change_date}=res[res.length-1];appquery_default.app().json.child("last_change").set(String(last_change)),appquery_default.app().json.child("last_change_date").set(last_change_date);for(let{path,data}of byPath.values())appquery_default.app().json.by_path(path.join("."))._set(data),handler!=null&&handler.process(path,data)},err=>{changePromise=null,error(ensure_bubble_error(err)),forcedRefresh=!0,badRevision()})}function scheduleChanges(){changePromise!=null?changePromise.then(getChanges):getChanges()}watch([LastChangeTopic,lib_default.or_throw().appname(),lib_default.or_throw().app_version()],()=>appquery_default.app().json.child("last_change_as_of").get(),_ref=>{let{message}=_ref;if(message!=null&&message!==appquery_default.last_change()){if(handler!=null&&!forcedRefresh){scheduleChanges();return}console.log("PLEASE REFRESH:","last change",message,appquery_default.last_change()),badRevision()}}),watch([BREAKING_REVISION_TOPIC],()=>client_config_default2.breaking_revision,_ref2=>{let{version:version2}=_ref2;version2!=null&&version2!==client_config_default2.breaking_revision&&(console.log("BREAKING REVISION:","breaking revision",version2,client_config_default2.breaking_revision),badRevision())})}init_StaticObject();init_workflow();init_define_process_env();init_shim();var DESIGN_TAB="tabs-1",WORKFLOW_TAB2="tabs-2",DATA_TAB4="tabs-3",STYLES_TAB2="tabs-4",PLUGIN_TAB4="tabs-5",SETTINGS_TAB4="tabs-6",LOGS_TAB2="tabs-7",TEMPLATE_TAB2="tabs-8",DWD_TAB_NAMES=function(DWD_TAB_NAMES2){return DWD_TAB_NAMES2.DESIGN="Design",DWD_TAB_NAMES2.WORKFLOW="Workflow",DWD_TAB_NAMES2.DATA="Data",DWD_TAB_NAMES2}({}),FURTHER_TAB_NAMES=function(FURTHER_TAB_NAMES2){return FURTHER_TAB_NAMES2.STYLES="Styles",FURTHER_TAB_NAMES2.PLUGIN="Plugins",FURTHER_TAB_NAMES2.SETTINGS="Settings",FURTHER_TAB_NAMES2.LOGS="Logs",FURTHER_TAB_NAMES2.TEMPLATE="Template",FURTHER_TAB_NAMES2}(FURTHER_TAB_NAMES||{}),EDITOR_TAB_NAMES={...DWD_TAB_NAMES,...FURTHER_TAB_NAMES},TAB_TO_TAB_NAME={[DESIGN_TAB]:DWD_TAB_NAMES.DESIGN,[WORKFLOW_TAB2]:DWD_TAB_NAMES.WORKFLOW,[DATA_TAB4]:DWD_TAB_NAMES.DATA,[STYLES_TAB2]:FURTHER_TAB_NAMES.STYLES,[PLUGIN_TAB4]:FURTHER_TAB_NAMES.PLUGIN,[SETTINGS_TAB4]:FURTHER_TAB_NAMES.SETTINGS,[LOGS_TAB2]:FURTHER_TAB_NAMES.LOGS,[TEMPLATE_TAB2]:FURTHER_TAB_NAMES.TEMPLATE};var WorkflowEngine=class{constructor(){this.debugger=void 0,this.bad_revision=void 0,this._initialized=void 0,this.open_server_actions=void 0,this.all_sent_to_server=void 0,this.all_client_completed=void 0,this.all_server_completed=void 0,this.everything_completed=void 0,this.debug_queue=void 0,this.disabled=void 0,this.warn_on_page_change=void 0,this.about_to_change_page=void 0,this.page_context_id=void 0,this.db_limit_reached=void 0,this.app_limit_reached=void 0,this._debugger_waiting=void 0,this._current_debug_run=void 0,this._was_debugging=void 0,this._initialized=u_exports2.MakeKey(void 0,"workflow engine initialized"),this.open_server_actions=[],this.all_sent_to_server=u_exports2.MakeKeyList(),this.all_client_completed=u_exports2.MakeKeyList(),this.all_server_completed=u_exports2.MakeKeyList(),this.everything_completed=u_exports2.MakeKeyList([this.all_client_completed,this.all_server_completed]),this.debug_queue=[],this.disabled=u_exports2.Box(!1),this.about_to_change_page=!1,this.page_context_id=0,running_test()||setTimeout(()=>{if(lib_default()&&!lib_default.or_throw().is_edit_mode()&&(typeof window<"u"&&window!==null&&!["tour","learn"].includes(lib_default.or_throw().appname())&&(window.onbeforeunload=()=>{if(this.warn_on_page_change&&!this.about_to_change_page&&!this.can_change_page())return lib_default.or_throw().get_text("CORE","STILL_CHANGING")}),typeof window<"u"&&window!==null)){if(is_hardcode(lib_default.or_throw().appname(),lib_default.or_throw().app_version()))return;on_react_native()||watchChanges(null,()=>this.show_bad_revision())}},1e3)}everything_done_key(){return this.everything_completed}can_change_page(){return this.all_client_completed.is_turned()&&this.all_sent_to_server.is_turned()}prompt_to_leave_page(){return!!(!this.warn_on_page_change||this.about_to_change_page||this.can_change_page()||window.confirm(lib_default.or_throw().get_text("CORE","NAVIGATION_CONFIRMATION")))}show_bad_revision(){if(on_react_native()||this.bad_revision)return;this.bad_revision=!0;let bad_rev_div=div("bad-revision",$("body"));on_phonegap()||is_on_mobile_or_tablet()?(bad_rev_div.html(lib_default.or_throw().get_text("CORE","BAD_REVISION_PHONE")),bad_rev_div.css("font-size","16px")):bad_rev_div.append(lib_default.or_throw().get_text("CORE","BAD_REVISION")),bad_rev_div.on("click",()=>{on_phonegap()&&navigator.splashscreen.show(),window.location.reload(!0)})}trigger_update_app_view(pageInstance,can_update_via_refresh){pageInstance==null||pageInstance.message("show_update_app_view",can_update_via_refresh)}show_db_limit_reached(){if(this.db_limit_reached)return;this.db_limit_reached=!0;let db_limit_reached_div=div("db-limit-reached",$("body"));db_limit_reached_div.append(lib_default.or_throw().get_text("CORE","DB_LIMIT_REACHED")),is_debug_mode()&&(db_limit_reached_div.css("cursor","pointer"),db_limit_reached_div.on("click",()=>{let settings_tab_link=`${appquery_default().get_editor_link()}&tab=${SETTINGS_TAB4}&subtab=Plan`;window.open(settings_tab_link)}))}show_app_limit_reached(){if(this.app_limit_reached)return;this.app_limit_reached=!0;let app_limit_reached_div=div("app-limit-reached",$("body"));app_limit_reached_div.append(lib_default.or_throw().get_text("CORE","APP_LIMIT_REACHED")),is_debug_mode()&&(app_limit_reached_div.css("cursor","pointer"),app_limit_reached_div.on("click",()=>{let settings_tab_link=`${appquery_default().get_editor_link()}&tab=${SETTINGS_TAB4}&subtab=Plan`;window.open(settings_tab_link)}))}toggle(){this.disabled(!this.disabled())}set_debugger(debugger1){this.debugger=debugger1}debug(item,properties_promise,context){if(this.debugger==null||item.get_static_property("workflow_disabled"))return u_exports2.Promise(!0);let promise=u_exports2.Promise(null,"waiting for debugger to finish with "+item.id()),next=()=>{promise.resolve(void 0),this._debugger_send_next_item(!0)};return this.debug_queue.push({item,context,next,properties_promise}),this._debugger_send_next_item(),promise}_debugger_send_next_item(ready){if(ready&&(this._debugger_waiting=!1),this._debugger_waiting)return;let entry;if(this._current_debug_run==null)entry=this.debug_queue.shift();else{entry=null;for(let e of this.debug_queue)if(e.context.run_id===this._current_debug_run){entry=e,array_remove(this.debug_queue,entry);break}}if(entry!=null){this._debugger_waiting=!0,this._was_debugging=!0;let{item,context,next,properties_promise}=entry;this._current_debug_run=context.run_id,properties_promise.callback((err,properties)=>{if(err)this._debugger_waiting=!1,next();else{let partial=make_partial_expression_evaluator2(context);this.debugger.highlight(item,properties,partial,context,next)}})}}debug_done(run_id){this._current_debug_run===run_id&&(this._current_debug_run=null),setImmediate(()=>{if(this.debug_queue.length===0&&this._was_debugging&&!this._debugger_waiting){var _this$debugger;(_this$debugger=this.debugger)==null||_this$debugger.all_finished(()=>this.debug_queue.length===0&&!this._debugger_waiting),this._was_debugging=!1}else this._debugger_send_next_item()})}abort_server_calls(){return this.bad_revision?new UserError("BAD_REVISION"):this.db_limit_reached?new UserError("DB_LIMIT_REACHED"):this.app_limit_reached?new UserError("APP_LIMIT_REACHED"):null}run_workflows(context,events7,warn_on_page_change){var _context$datasources;let promise=u_exports2.Promise(null,"running workflows");if((_context$datasources=context.datasources)!=null||(context.datasources=get_basic_datasources(context.element.element.root())),context.page_context_id=this.page_context_id,!context.element)throw new UnexpectedError("context must contain an element");context.frozen_state||new FrozenState(context);let frozen_key=this.all_sent_to_server.make(30,"freezing workflows"),workflows_started=this.all_client_completed.make(30,"starting workflows");if(warn_on_page_change){this.warn_on_page_change=!0;let try_turn_off_warning=()=>{this.can_change_page()?this.warn_on_page_change=!1:u_exports2.WaitFor(this.all_client_completed,this.all_sent_to_server,()=>{setTimeout(try_turn_off_warning,100)})};try_turn_off_warning()}return context.frozen_state.freeze_workflows(events7,err=>{if(err)frozen_key.turn(),workflows_started.turn(),promise.reject(err);else{let events_and_contexts=events7.map(event=>({event,context:this.create_context(context,event)}));promise.resolve(this.should_events_run(events_and_contexts).then(filtered=>this.refreeze_states(filtered).then(filtered2=>{try{filtered2=this.filter_invalid_states(filtered2),this._start_workflows_on_server(filtered2),frozen_key.turn();let workflow_results=u_exports2.Promise(!0);for(let entry of filtered2)workflow_results=workflow_results.then(()=>this._run_workflow(entry.context,entry.event));return workflow_results.then(()=>filtered2.map(entry=>entry.event))}finally{frozen_key.turn(),workflows_started.turn()}}),err2=>(frozen_key.turn(),err2)))}}),promise}cancel_all_workflows(){this.page_context_id+=1,force_done()}filter_invalid_states(filtered){let results=[];for(let{event,context}of filtered)if(context.frozen_state.has_invalid_state()){let err=new OwnerError("Cannot run workflow -- relies on invalid inputs");this.report_error(err,context)}else results.push({event,context});return results}refreeze_states(filtered){let promises=[];for(let{event,context}of filtered){let promise=u_exports2.Promise(null,"refreezing");promises.push(promise),context.frozen_state.freeze_workflows([event],err=>{err?promise.reject(err):promise.resolve({event,context})})}return u_exports2.promise_array(promises)}_start_workflows_on_server(events_and_contexts){let needs_call=[],abort_err=this.abort_server_calls();for(let{context,event}of events_and_contexts){if(!cookies_enabled()&&this.uses_cookies(event))throw new UserError(null,"Oops! Your browser seems to have cookies disabled. Make sure cookies are enabled.");if(this.uses_server(event)){if(abort_err)throw abort_err;needs_call.push({context,item:event}),context.is_running_on_server=!0}else context.server_completion_promise=u_exports2.Promise(!0),context.server_initiation_promise=u_exports2.Promise(!0)}this.start_server_call(needs_call)}start_server_call(items_and_contexts){if(items_and_contexts.length===0)return;for(let call_info of items_and_contexts)call_info.context.server_initiation_promise=u_exports2.Promise(null,"server call initiated for "+call_info.item.id()),call_info.context.server_completion_promise=u_exports2.Promise(null,"server call completed for "+call_info.item.id()),call_info.server_call_id=UUID(),call_info.context.server_call_id=call_info.server_call_id,call_info.context.server_call_context="",call_info.context.server_initiation_promise.callback(err=>{err&&call_info.context.server_completion_promise.reject(err)}),this.all_server_completed.add_promise(call_info.context.server_completion_promise);let initiated_key=this.all_sent_to_server.make(30,"start_server_call");u_exports2.run_once(30,()=>{let no_user_data,current_user5=lib_default.or_throw().current_user(),current_user_id=current_user5._id();current_user_id===NO_USER?no_user_data=current_user5.raw():no_user_data=void 0;let data={wait_for:json_deep_copy(this.open_server_actions),app_last_change:appquery_default().last_change(),client_breaking_revision:client_config_default2.breaking_revision,calls:[],timezone_offset:new Date().getTimezoneOffset(),timezone_string:lib_default.or_throw().current_timezone(),user_id:current_user_id,no_user_data};for(let{context,item,send_to_server,server_call_id}of items_and_contexts)data.calls.push({client_state:context.frozen_state.get_client_state(),run_id:context.run_id,server_call_id,item_id:item.id(),element_id:context.element.element_id(),page_id:context.element.root_instance().element_id(),additional_parameters:send_to_server,uid_generator:context.uid_generator,random_seed:context.random_seed,current_date_time:get_page_data("Current Date/Time",context).getTime(),current_wf_params:dehydrate_wf_params(context,value=>dehydrate_tree(value))});return data},(err,data)=>{if(err){for(let{context}of items_and_contexts)context.server_completion_promise.reject(err),context.server_initiation_promise.reject(err);initiated_key.turn();return}lib_default.or_throw().location.post("server://workflow/start",data).callback((err2,res)=>{if(err2)if(err2.message==="BAD_REVISION")console.log("PLEASE REFRESH:","workflow",JSON.stringify(data)),this.show_bad_revision();else if(err2.message==="DB_LIMIT_REACHED")this.show_db_limit_reached();else if(err2.message==="APP_LIMIT_REACHED")this.show_app_limit_reached();else if(err2 instanceof DeprecatedVersionError){var _Lib2;let pageInstance=(_Lib2=lib_default())==null?void 0:_Lib2.native_bridge.currentView;this.trigger_update_app_view(pageInstance,err2.args.can_update_via_refresh)}else log(err2);else lib_default.or_throw().db_instance().ensure_object_updates(res.object_updates);for(let{context,server_call_id}of items_and_contexts)if(err2)context.server_completion_promise.reject(err2);else{res=res;let outcome=res[server_call_id];if(!outcome)context.server_completion_promise.reject(new UnexpectedError("missing outcome",{res:res,server_call_id}));else if(outcome.outcome==="error")err2=errors_exports.from_json_client(outcome.error),context.server_completion_promise.reject(err2);else if(outcome.outcome==="event_failed")context.server_completion_promise.reject(new UserError(null,WORKFLOW_FAILED_SERVERSIDE));else if(outcome.outcome==="redirect"){context.server_completion_promise.resolve(outcome);let parsed=url7.parse(lib_default.or_throw().location.base_url,!0),queryParam=typeof parsed.query.on_login=="string"?`?on_login=${parsed.query.on_login}`:"",redirectUrl=outcome.next_url+queryParam;this.wait_for_safe(context,()=>document.location.href=redirectUrl)}else outcome.outcome!=="success"?context.server_completion_promise.reject(new UnexpectedError("non-success workflow outcome: "+JSON.stringify(outcome))):context.server_completion_promise.resolve(outcome)}}),setTimeout(()=>initiated_key.turn(),200);for(let{context,server_call_id}of items_and_contexts){context.server_initiation_promise.resolve(void 0);let done=()=>{this.open_server_actions=this.open_server_actions.filter(action=>action.server_call_id!==server_call_id)};context.server_completion_promise.callback(done),setTimeout(()=>{let old=this.open_server_actions;if(done(),old.length!==this.open_server_actions.length){let promise_state=context.server_completion_promise.inspect().state,removed=old.filter(entry=>!this.open_server_actions.includes(entry));error("MANUALLY REMOVING SERVER_CALL_ID",{server_call_id,removed,promise_state})}},5*60*1e3)}})}should_events_run(events_and_contexts){let promises=[];for(let{event,context}of events_and_contexts){let promise=u_exports2.Promise(null,"should event run: "+event.id());promises.push(promise),u_exports2.run_once(30,()=>this.should_workflow_run(context,event),(err,should_run)=>{err?promise.reject(err):should_run?promise.resolve(!0):promise.resolve(this.debug(event,u_exports2.Promise(null),context).then(()=>(this.debug_done(context.run_id),!1)))})}return u_exports2.promise_array(promises).then(event_results=>{let filtered=[];for(let idx=0;idx<event_results.length;idx++)event_results[idx]&&filtered.push(events_and_contexts[idx]);return filtered})}_run_workflow(context,event){if(this.disabled()||context.page_context_id<this.page_context_id)return u_exports2.Promise(!0);let client_promise=this.debug(event,u_exports2.Promise(null),context).then(()=>this.run_subsequent_actions(context,event));this.all_client_completed.add_promise(client_promise);let result_promise=client_promise.then(()=>context.server_initiation_promise);return this.add_error_handling(context,result_promise),result_promise}create_context(base_context,event){var _base_context$uid_gen,_base_context$random_,_base_context$datasou,_base_context$run_id;let seed=get_random_seed(),uid_generator=(_base_context$uid_gen=base_context.uid_generator)!=null?_base_context$uid_gen:{timestamp:Date.now(),seed},random_seed=(_base_context$random_=base_context.random_seed)!=null?_base_context$random_:Math.random(),_log2=[],context=extend({},base_context,{recursive_depth:0,inputs_must_be_valid:!0,datasources:(_base_context$datasou=base_context.datasources)!=null?_base_context$datasou:get_basic_datasources(base_context.element.element.root()),event,uid_generator,UUID_SEED:get_uuid_seed(uid_generator),random_seed,random_generator:new Random(random_seed),log:msg=>_log2.push(msg),dump_log:()=>_log2,run_id:(_base_context$run_id=base_context.run_id)!=null?_base_context$run_id:UUID(),get_server_outcome:(item,cb)=>context.server_completion_promise.callback((err,res)=>{if(context.server_workflow_completed=!0,err)cb(err);else{res=res;let{return_value,random_interations,UUID_iterations}=res.step_results[item.id()];UUID_iterations&&UUID_iterations!==context.UUID_SEED.iterations&&(context.UUID_SEED=get_uuid_seed({seed:context.UUID_SEED.seed,timestamp:context.UUID_SEED.timestamp,iterations:UUID_iterations})),random_interations&&random_interations!==context.random_generator.iterations&&(context.random_generator=new Random(context.random_generator.seed,random_interations)),cb(null,rehydrate_tree(lib_default.or_throw().db_instance(),return_value))}}),update_from_action:function(item,properties_promise,result){var _this$original_contex;return((_this$original_contex=this.original_context)!=null?_this$original_contex:this).server_workflow_completed&&item.can_fall_back_to_server()?this._fetch_updates(item).then(updates=>{for(let key in updates){let v=updates[key];v.x?this.frozen_state.clear(key):this.frozen_state.set(key,v.v)}return null}):this.frozen_state.update_from_action(item,result,properties_promise,this)},_fetch_updates:item=>context.server_completion_promise.then(res=>{var _state_changes$item$i;let rehydrated=rehydrate_tree(lib_default.or_throw().db_instance(),(_state_changes$item$i=res.state_changes[item.id()])!=null?_state_changes$item$i:{});return rehydrated==null&&error("unexpected null _fetch_updates result",{res:res,item_id:item.id()}),rehydrated!=null?rehydrated:{}})});return delete context.frozen_state,base_context.frozen_state.clone(context),context}resume_action(context,item){let promise=u_exports2.Promise(null,"Resuming "+item.id());return context.log("about to resume "+item.type()+" "+item.id()),item.resume(context,(err,result)=>{if(err)promise.reject(err);else{context.log("successfully resumed "+item.type()+" with result "+String(result));let properties_promise=evaluate_action_clientside(item,context);promise.resolve(context.update_from_action(item,properties_promise,result).then(()=>this.run_subsequent_actions(context,item)))}}),promise}run_subsequent_actions(context,item){if(context.page_context_id<this.page_context_id)return u_exports2.Promise(!0);let next=item.next();if(next==null)return context.log("workflow is finished"),u_exports2.Promise(!0);let properties_promise=evaluate_action_clientside(next,context);return this.debug(next,properties_promise,context).then(()=>{var _ref;let promise=u_exports2.Promise(null,(_ref="Running action "+(next==null?void 0:next.id()))!=null?_ref:"<done>");return context.log("about to run "+next.type()+" "+next.id()),["TriggerCustomEvent","TriggerCustomEventFromReusable"].includes(next.type())?promise.resolve(this.start_custom_workflow(context,next)):next.run(context,properties_promise,(err,result)=>{err?err==="aborted"?promise.resolve(void 0):promise.reject(err):(context.log("successfully ran "+next.type()+" "+next.id()+" with result "+String(result)),context.update_from_action(next,properties_promise,result).callback(err2=>{if(err2){promise.reject(err2);return}if(next.requires_server()&&context.server_completion_promise.inspect().state==="pending"){if(!context.server_call_id)throw new Error("could not find our server call");let action_id=context.server_call_context+next.id();this.open_server_actions.push({server_call_id:context.server_call_id,action_id})}next.type()==="DisplayGroupData"?setTimeout(()=>{promise.resolve(this.run_subsequent_actions(context,next))},0):promise.resolve(this.run_subsequent_actions(context,next))}))}),promise})}start_custom_workflow(context,to_run2){let custom_event=appquery_default().event(to_run2.get_static_property("custom_event")),continuation_promise=()=>this.run_subsequent_actions(context,to_run2);return evaluate_wf_properties(to_run2,context).then(properties=>{let custom_context,should_run;if(!properties.condition)should_run=u_exports2.Promise(!1);else{var _context$original_con;let call_args=wf_params_from_properties(properties);if(custom_context=build_duplicate_per_item_context(context,call_args),custom_context.event=custom_event,context._previously_run_custom_events?custom_context._previously_run_custom_events=extend({},context._previously_run_custom_events):custom_context._previously_run_custom_events={},custom_context._previously_run_custom_events[to_run2.id()])throw new OwnerError("Circular custom workflow -- custom workflows cannot call themselves (either directly or indirectly)");custom_context._previously_run_custom_events[to_run2.id()]=!0,custom_context.original_context=(_context$original_con=context.original_context)!=null?_context$original_con:context,to_run2.type()==="TriggerCustomEventFromReusable"?custom_context.element=context.element.find_instance_by_id(to_run2.get_static_property("element_id")):custom_context.element=context.element.find_instance_by_id(to_run2.root().id()),custom_context.server_call_context+=to_run2.id()+".",custom_context.get_server_outcome=(item,cb)=>context.get_server_outcome(to_run2,(err,_res)=>{if(custom_context.server_workflow_completed=!0,err){cb(err);return}let res=_res;if(!(item.id()in res)){err=new UnexpectedError("Error Getting Server Outcome",{outcome_for:item.id(),have_outcomes:Object.keys(res)}),cb(err);return}let{return_value,random_interations,UUID_iterations}=res[item.id()];UUID_iterations&&UUID_iterations!==context.UUID_SEED.iterations&&(context.UUID_SEED=get_uuid_seed({seed:context.UUID_SEED.seed,timestamp:context.UUID_SEED.timestamp,iterations:UUID_iterations})),random_interations&&random_interations!==context.random_generator.iterations&&(context.random_generator=new Random(context.random_generator.seed,random_interations)),cb(null,return_value)}),custom_context._fetch_updates=item=>context._fetch_updates(to_run2).then(res=>res[item.id()]),should_run=u_exports2.run_once(30,()=>this.should_workflow_run(custom_context,custom_event))}return should_run.then(should_run2=>{if(should_run2)return this._run_workflow(custom_context,custom_event).then(()=>{if(custom_context.return_values){let fake_properties=u_exports2.Promise(null,"fake_properties");context.update_from_action(to_run2,fake_properties,custom_context.return_values)}return continuation_promise()});{var _custom_event$json,_custom_event$json$ra,_custom_event$json$ra2,_custom_event$json$ra3;let return_types=custom_event==null||(_custom_event$json=custom_event.json)==null||(_custom_event$json$ra=_custom_event$json.raw)==null||(_custom_event$json$ra2=_custom_event$json$ra.call(_custom_event$json))==null||(_custom_event$json$ra3=_custom_event$json$ra2.properties)==null?void 0:_custom_event$json$ra3.return_types;return return_types&&context.update_from_action(to_run2,u_exports2.Promise(null,"fake_properties"),new StaticObject(Object.fromEntries(Object.values(return_types!=null?return_types:{}).map(return_type=>[return_type.return_id,null])),null,custom_event.returnValueBtype().id())),continuation_promise()}})})}_uses(event,thing){for(let action of event.actions())if(action[`requires_${thing}`]())return!0;return!1}uses_server(event){return this._uses(event,"server")}uses_cookies(event){return this._uses(event,"cookies")}should_workflow_run(context,event){var _context$log,_context$log2;(_context$log=context.log)==null||_context$log.call(context,"in should_workflow run for "+event.id());let res=evaluate_event_condition(event,context);return(_context$log2=context.log)==null||_context$log2.call(context,"should_workflow_run: "+String(res)),res}add_error_handling(context,promise){promise.callback(err=>{if(this.debug_done(context.run_id),err){var _message,_context$event$isUser,_context$event;let message=(_message=err.message)!=null?_message:err.translation;(!ALLOWED_WORKFLOW_FAILURES.includes(message)||((_context$event$isUser=(_context$event=context.event)==null?void 0:_context$event.isUserAction())==null||_context$event$isUser))&&this.report_error(err,context)}})}report_error(err,context){ensure_bubble_error(err).extend({event:context.event,element_instance:context==null?void 0:context.element,log:context==null?void 0:context.dump_log()}),log(err)}wait_for_server(cb){this.all_server_completed.is_turned()?cb():u_exports2.WaitFor(this.all_server_completed,()=>{setTimeout(()=>{this.wait_for_server(cb)},10)})}wait_for_safe(context,cb){this.debug_done(context.run_id),this.all_sent_to_server.is_turned()&&this.all_server_completed.is_turned()?(this.about_to_change_page=!0,cb()):u_exports2.WaitFor(this.all_sent_to_server,this.all_server_completed,()=>{setTimeout(()=>{this.wait_for_safe(context,cb)},100)})}initialize(){let parsed=url7.parse(lib_default.or_throw().location.base_url,!0),resume_key=parsed.query.resume;if(resume_key){delete parsed.query.resume;let clean_query={};for(let k in parsed.query){let v=parsed.query[k];v!=null&&(clean_query[k]=v)}parsed.query=clean_query,delete parsed.search,lib_default.or_throw().location.set_url_without_refresh({url:url7.format(parsed)}),this.resume(resume_key)}this._initialized.turn()}initialize_key(){return this._initialized}resume_uses_server(to_resume,server_workflow_terminated){return server_workflow_terminated||to_resume.terminate_server_workflow()}make_resume_key(context,to_resume,server_workflow_terminated){if(to_resume.next()!=null||this.resume_uses_server(to_resume,server_workflow_terminated)){let current_wf_params=dehydrate_wf_params(context,value=>(value==null?void 0:value.dehydrate)!=null?value.dehydrate():value),promise_state=context.server_completion_promise.inspect(),server_outcome_value;promise_state.state!=="fulfilled"?warn("bad server outcome before navigation",promise_state):server_outcome_value=promise_state.value;let resume_data={element_instance:context.element.dehydrate(),element_id:context.element.element_id(),current_wf_params,to_resume:to_resume.id(),frozen_state:context.frozen_state.serialize(),run_id:context.run_id,server_workflow_terminated,uid_generator:context.uid_generator,server_outcome_value};resume_data.uid_generator!=null&&(resume_data.uid_generator.iterations=context.UUID_SEED.iterations);let resume_key=context.run_id;return local_storage_put(resume_key,resume_data,!0),resume_key}else return}resume(resume_key,send_to_server){let resume_data=local_data_retrieve(resume_key);if(!resume_data)return error("Could not resume workflow, was not able to retrieve data",{resume_key}),u_exports2.Promise(!1);let to_resume=appquery_default().action(resume_data.to_resume),promise=u_exports2.Promise(null,"finished resuming workflow");return u_exports2.run_once(30,()=>{lib_default.or_throw().app_language();let cur=resume_data.element_instance,prefix="",group_item_regex=/(.*?:[a-zA-Z]+)_group_item_.*?_(\d+):/,match=cur.match(group_item_regex);for(;match!=null;){let repeating_instance=rehydrate_tree(lib_default.or_throw().db_instance(),prefix+match[1]),repeating_index=match[2];repeating_instance.message("draw_till",repeating_index);let layout=repeating_instance.repeating_layout_type==="Table"?repeating_instance.parent().table_element_layout:repeating_instance.repeating_group_layout;layout.raw_list_data(),u_exports2.ensure_ready(layout.finished_loading_switch),cur=cur.substring(match[0].length),prefix+=match[0],match=cur.match(group_item_regex)}return{element:rehydrate_tree(lib_default.or_throw().db_instance(),resume_data.element_instance)}},(err,res)=>{if(err){promise.reject(err);return}let{element}=res;element||(element=new ResumedElementInstance(resume_data.element_instance,resume_data.element_id));let base_context={element,run_id:resume_data.run_id,uid_generator:resume_data.uid_generator},frozen_state=FrozenState.deserialize(base_context,resume_data.frozen_state);base_context.frozen_state=frozen_state;let context=this.create_context(base_context,to_resume.event());context.datasources.get_wf_param=generate_wf_param_datasource(resume_data.current_wf_params),context.log("resuming workflow at action "+to_resume.id()+" "+to_resume.type()),this.resume_uses_server(to_resume,resume_data.server_workflow_terminated)?this.start_server_call([{context,item:to_resume,send_to_server}]):(context.server_completion_promise=u_exports2.Promise(resume_data.server_outcome_value),context.server_initiation_promise=u_exports2.Promise(!0));let client_promise=this.resume_action(context,to_resume);promise.resolve(client_promise.then(()=>context.server_initiation_promise)),this.add_error_handling(context,promise)}),promise}resume_local(context,action,send_to_server){let promise=u_exports2.Promise(null,"finished resuming workflow");context.log(`resuming workflow at action ${action.id()} ${action.type()}`),this.start_server_call([{context,item:action,send_to_server}]);let client_promise=this.resume_action(context,action);return promise.resolve(client_promise.then(()=>context.server_initiation_promise)),this.add_error_handling(context,promise),promise}};init_languages();init_lib();init_define_process_env();init_shim();init_u2();var LATEST_VERSION=29,_versions2=null;function get_bv(version2){return _versions2||init4(),_versions2[version2]}var r=__require,_raw2={};function register(num,data){_raw2[num]=data}function _get_bv(i){var _raw$i;return(_raw$i=_raw2[i])!=null?_raw$i:r("./"+String(i))}function init4(){let start3;if(on_client()){var _window$bubble_versio;start3=(_window$bubble_versio=window.bubble_version)!=null?_window$bubble_versio:LATEST_VERSION}else start3=0;let processing=(init_latest2(),__toCommonJS(latest_exports2)),obj={};for(let i=LATEST_VERSION;i>=start3;i--)processing=obj[i]=extend({},processing,_get_bv(i));_versions2=obj}init_define_process_env();init_shim();var import_web_dom_collections_iterator329=__toESM(require_web_dom_collections_iterator());init_custom_elements();init_editor_settings();init_appquery();init_ElementInstance();init_ServerElementInstance();init_Transition();init_allow_overrides_check();init_element_eval();init_element_props();init_nodes();init_lib();init_logger();init_u2();init_decaf();init_element_meta_actions();init_property_applications();init_define_process_env();init_shim();init_web();init_web();init_solid();init_element_eval();init_element_props();function wrapComponentBuilder(builder){let Component=builder.component;return createElement2(props=>{var _useContext;let CustomElementChildrenComponent=(_useContext=useContext(EditorContext_default))==null?void 0:_useContext.customElementChildrenComponent;return CustomElementChildrenComponent!=null?createComponent(Component,mergeProps(props,{shouldAddWrapper:!1,containerClass:"",get style(){return{height:props.instance.get_static_property("overflow_scroll")&&is_fitting_height(props.instance)&&(evaluate_property(props.instance,"vert_alignment")||evaluate_property(props.instance,"horiz_alignment"))?"100%":void 0,transform:props.instance.get_static_property("overflow_scroll")?"rotate(0)":void 0}},get children(){return createComponent(CustomElementChildrenComponent,props)}})):createComponent(Component,props)},builder.preCompute,builder.listProperties)}init_built_in_reusables();var MissingDef={missing:!0,get_static_property(){},get_default(){},events(){return[]},property(name){return nodes_default.new_expression(EmptyJSON(appquery_default.app().json,null,"property on missing def"),this)},id(){return"missing"},can_have_children(){return!1},toUniqueString(){return"MissingDef"},get_style_if_exists(){},element_custom_states(){return[]},element_custom_state(){return null},add_specific_messages(){},get_responsive_version(){return 0},raw(){return{}}};function CustomMissing(id){return{get_html(){return"<div>Deleted reusable element</div>"},initialize(){},get_messages(){return[]},get_states(){return[]},get_private_messages(){return[]},can_have_children(){return!1},is_visible_on_page_load(){return!0},add_specific_messages(){},property_applications:[]}}function CustomDefinition2(id){let custom_id=id,def=appquery_default.custom_definition(custom_id);return def!=null&&def.exists()?def:MissingDef}function BasePlugin(id,def){var _def,_def$property$get_sta;if((_def=def)!=null||(def=CustomDefinition2(id)),def.missing)return CustomMissing(id);let type=(_def$property$get_sta=def.property("element_type").get_static())!=null?_def$property$get_sta:"Group";return lib_default().load_plugin(lib_default().plugin_prefixes.element+type)}function custom_exists_according_to_derived(id){let custom_by_name=lib_default().derived("CustomByName").content();return object_values(custom_by_name).some(id_and_path=>id_and_path.id===id)}function _load_custom(id){var _definition$property$,_definition$property;let definition=CustomDefinition2(id),base=BasePlugin(id,definition);definition.missing&&custom_exists_according_to_derived(id)&&error("custom element exists but not found while rendering. possible id_to_path issue",{custom_id:id,id_to_path_keys:lib_default().app().json.child("_index").child("id_to_path").child_names(),element_definitions_keys:lib_default().app().json.child("element_definitions").child_names(),app_json_asset_generation_fiber_id:lib_default().app().json.child("generation_fiber_id").get()});let element_type=definition.property("element_type").get_static(),isnt_popup=element_type!=="Popup",is_floating_group=element_type==="FloatingGroup",is_group=element_type==="Group",field_names={data_source:{},edit_custom_definition:{only_edit_mode:!0},min_width:{default:30,no_states:!0},fixed_width:{no_states:!0,default:!1},responsive_alignment:{default:"center",no_states:!0},use_max_width:{no_states:!0,default:!1},max_width:{default:100,optional:!0,no_states:!0},collapse_margin:{default:0,optional:!0,no_states:!0},delete_element:{no_states:!0,only_edit_mode:!0},select_parent:{no_states:!0,only_edit_mode:!0},reveal_in_tree:{no_states:!0,only_edit_mode:!0},lock_in_editor:{no_states:!0,only_edit_mode:!0}},custom_params_array=Object.values((_definition$property$=(_definition$property=definition.property("parameters"))==null?void 0:_definition$property.raw())!=null?_definition$property$:{}).filter(Boolean);custom_params_array.filter(param=>!param).length>0&&info("Custom element's parameters have null objects",{definition:definition.id()});for(let custom_param of custom_params_array)field_names={...field_names,[`${CUSTOM_PROP_IDENTIFIER}${custom_param.param_id}`]:{no_states:!1,only_edit_mode:!0,optional:custom_param.optional}};isnt_popup?extend(field_names,new property_applications_default.PositionOnly().field_names,visibility_field_names,new property_applications_default.Dimensions().field_names,{use_max_width:{no_states:!0,default:!1},max_width:{optional:!0,no_states:!0,default:100},collapse_margin:{default:375,optional:!0,no_states:!0}}):extend(field_names,greyout_field_names,new property_applications_default.ShortDimensions().field_names),is_floating_group&&extend(field_names,floating_field_names),extend(field_names,new property_applications_default.ResponsiveElement().field_names),is_group&&extend(field_names,group_field_names);let Plugin={base_name:base.plugin_retrieved_name,property_transformer(element,property2){return function(name){return ON_ELEMENT.includes(name)?["height","width"].includes(name)&&element.not_resizable()?definition.property(name):property2(name):element.get_styleable_properties()[name]&&definition.get_style_if_exists()&&(!allow_overrides_check(element,name,definition.field_names())||definition.property(name).raw()==null)?definition.get_style().property(name):definition.property(name)}},get_static_property_transformer(element,get_static_property){return function(name,suppress_warning){if(ON_ELEMENT.includes(name))if(["height","width"].includes(name)){if(element.not_resizable())return definition.get_static_property(name,suppress_warning);var _get_static_property;return(_get_static_property=get_static_property(name,suppress_warning))!=null?_get_static_property:definition.get_static_property(name,suppress_warning)}else return get_static_property(name,suppress_warning);return element.get_styleable_properties()[name]&&definition.get_style_if_exists()&&(!allow_overrides_check(element,name,definition.field_names())||definition.property(name).raw()==null)?definition.get_style().get_static_property(name,suppress_warning):definition.get_static_property(name,suppress_warning)}},get_style_if_exists_transformer(){return()=>definition.get_style_if_exists()},default_transformer(element,get_default2){return function(name){return ON_ELEMENT.includes(name)?get_default2(name):element.get_styleable_properties()[name]&&definition.get_style_if_exists()&&(!allow_overrides_check(element,name,definition.field_names())||definition.property(name).raw()==null)?definition.get_style().get_default(name):definition.get_default(name)}},states_transformer(element){return()=>{var _definition$states,_definition$states2;return(_definition$states=(_definition$states2=definition.states)==null?void 0:_definition$states2.call(definition))!=null?_definition$states:[]}},primary_field(element){},field_names,styleable_properties:{greyout_color:!1,greyout_blur:!1},property_applications:base==null?void 0:base.property_applications,custom_states(){var _definition$states3,_definition$states4;return(_definition$states3=(_definition$states4=definition.states)==null?void 0:_definition$states4.call(definition))!=null?_definition$states3:nodes_default.enhance_array([])},element_custom_states(){return definition.element_custom_states()},element_custom_state(name){return definition.element_custom_state(name)},get_default(){},transition(prop_name,element){let element_transition=element.json.child("transitions").child(prop_name);if(element_transition.exists())return new Transition2(element_transition,element);let definition_transition=definition.transition(prop_name);if(definition_transition)return definition_transition;let style2=definition.get_style_if_exists();if(style2)return style2.transition(prop_name)},get_messages(element){return base.get_messages(element)},get_states(element){return base.get_states(element)},add_specific_messages(messages,element){let definition2=element.E.custom_definition();return definition2!=null&&extend(messages,customParameterMessages(definition2)),base.add_specific_messages(messages,element)},get_state_value(element,name){return base.get_state_value(element,name)},get_private_messages(element){return base.get_private_messages(element)},mandatory_sections(element){return["GroupType","Background"]},get_html(instance4){return base.get_html(instance4)},is_popup(element){return!isnt_popup},not_max_adjustable:base.not_max_adjustable,property_supports_states:!0,property_supports_transitions:!1,can_copy_style:!1,uses_css_responsive:definition.get_responsive_version()>0,can_fit_width:!0,can_fit_height:!0,solid_component:definition.get_responsive_version()>0?wrapComponentBuilder(base.solid_component):void 0,use_legacy_in_editor(){return definition.get_responsive_version()<1},edit_fallback_component:base.solid_component,change_cursor_style_if_clickable:!0,is_restricted_container:!0,register(instance4){var _base$register;instance4.is_self_nested_custom()||(instance4.split_namespace(),instance4.add_to_namespace(instance4,definition.id()),instance4.run_mode()&&(u_exports2.WaitFor(instance4.can_register_workflows(),()=>instance4.register_workflows(definition.events())),registerCustomParameterStates(instance4,definition,param_id=>evaluate_property(instance4,`${CUSTOM_PROP_IDENTIFIER}${param_id}`))),(_base$register=base.register)==null||_base$register.call(base,instance4))},register_children(instance4){instance4.is_self_nested_custom()||!base.can_have_children()||(base.register_children?base.register_children(instance4):instance4._default_register_children(definition.elements()))},can_defer_drawing(instance4){var _base$can_defer_drawi,_base$can_defer_drawi2;return(_base$can_defer_drawi=(_base$can_defer_drawi2=base.can_defer_drawing)==null?void 0:_base$can_defer_drawi2.call(base,instance4))!=null?_base$can_defer_drawi:!1},initialize(instance4){if(base.initialize(instance4),instance4.responsive_mode()||instance4.run_mode()){var _instance$element$roo;definition.get_responsive_version()>0&&((_instance$element$roo=instance4.element.root())==null?void 0:_instance$element$roo.get_responsive_version())<1&&(instance4.canvas.css({height:"max-content","grid-template-rows":"max-content"}),instance4.element.added_to_container()&&instance4.autorun(()=>{let height2=instance4.current_height();instance4.set_height(height2,{no_css_update:!0}),instance4.canvas.css("height","max-content")}))}if(instance4.is_self_nested_custom()){instance4.canvas.text("This is a circular Reusable Element... Reusable Elements cannot contain themselves (or other Reusable Elements that contain them).");return}},can_have_children(element){return base.can_have_children(element)},get_children_canvas(instance4){return base.get_children_canvas(instance4)},create_server_children(instance4){incremental_for_each(definition.elements(),element=>{element.exists()&&instance4.children.push(new ServerElementInstance(element,instance4))})},attach_to_body(instance4){var _base$attach_to_body;return(_base$attach_to_body=base.attach_to_body)==null?void 0:_base$attach_to_body.call(base,instance4)},goes_on_document(element){var _base$goes_on_documen,_base$goes_on_documen2;return(_base$goes_on_documen=(_base$goes_on_documen2=base.goes_on_document)==null?void 0:_base$goes_on_documen2.call(base,element))!=null?_base$goes_on_documen:!1},goes_on_document_for_drawing(element){var _base$goes_on_documen3,_base$goes_on_documen4;return(_base$goes_on_documen3=(_base$goes_on_documen4=base.goes_on_document_for_drawing)==null?void 0:_base$goes_on_documen4.call(base,element))!=null?_base$goes_on_documen3:this.goes_on_document(element)},no_edit_draw_children(){return!0},is_visible_on_page_load(element){var _element$default_name;return(_element$default_name=element.default_name())!=null&&_element$default_name.includes(OFFLINE_BANNER_NAME)?!1:base.is_visible_on_page_load(element)},not_resizable(element){var _element$root2,_definition$use_respo;return!((_element$root2=element.root())!=null&&_element$root2.use_responsive_algorithm())||!((_definition$use_respo=definition.use_responsive_algorithm)!=null&&_definition$use_respo.call(definition))?!0:definition.get_responsive_version()>0&&definition.container_layout()==="fixed"},not_draggable(element){var _base$not_draggable,_base$not_draggable2;return(_base$not_draggable=(_base$not_draggable2=base.not_draggable)==null?void 0:_base$not_draggable2.call(base,element))!=null?_base$not_draggable:!1},modal(element){var _base$modal;return(_base$modal=base.modal)==null?void 0:_base$modal.call(base,element)},get_definition_workflows(element){return definition.events()},get_visible_workflows(element){return nodes_default.enhance_array([...element.parents().events(),...this.get_definition_workflows(element)])},get_related_workflows(element){return function(event_type){let page_workflows=element.parents().events(),definition_workflows=definition.events(),relevant_to_id=id2=>event=>event.element_id()===id2&&event.type()===event_type;return nodes_default.enhance_array([...page_workflows.filter(relevant_to_id(element.id())),...definition_workflows.filter(relevant_to_id(definition.id()))])}},custom_definition(){return definition}};return base.can_animate&&(Plugin.can_animate=element=>base.can_animate(element)),base.position_canvas&&(Plugin.position_canvas=base.position_canvas),base.do_show&&(Plugin.do_show=base.do_show),base.do_hide&&(Plugin.do_hide=base.do_hide),base.notify_width&&(Plugin.notify_width=base.notify_width),base.get_min_width&&definition.use_responsive_algorithm()&&(Plugin.get_min_width=base.get_min_width),base.uses_inset_instead_of_margin&&(Plugin.uses_inset_instead_of_margin=!0),Plugin}var load_custom=autorun_cache(_load_custom);var moment9=require_moment2();var CANT_DEEP_COPY=["body","custom_form","formData","custom_retry_handler","__original_request"],DEFAULT_REQUEST_TIMEOUT=3e4;function pre_process_request(req){var _req,_req$method,_req2,_req2$timeout;let no_deep_copy={},deep_copy2={};for(let key in req){let value=req[key];CANT_DEEP_COPY.includes(key)?no_deep_copy[key]=value:deep_copy2[key]=value}req=json_deep_copy(deep_copy2);for(let k in no_deep_copy){let v=no_deep_copy[k];req[k]=v}return(_req$method=(_req=req).method)!=null||(_req.method="get"),(_req2$timeout=(_req2=req).timeout)!=null||(_req2.timeout=DEFAULT_REQUEST_TIMEOUT),req.gzip=!0,req}function do_request_client(req){return $.ajax(req)}function http_request_client(req){return b_async18.Promise(req).then(req2=>{var _req3,_req3$dataType;req2=pre_process_request(req2);let my_promise=b_async18.Promise(null,"default_lib.http_request "+req2.url);if(req2.type=req2.method.toUpperCase(),delete req2.method,(_req3$dataType=(_req3=req2).dataType)!=null||(_req3.dataType="jsonp"),req2.data!=null){var _req$headers,_req$type;let content_type=(_req$headers=req2.headers)==null?void 0:_req$headers["Content-Type"],non_json_content_type=content_type!=null&&!starts_with(content_type,"application/json");if(!["GET","HEAD"].includes((_req$type=req2.type)!=null?_req$type:"GET")&&!non_json_content_type){var _req4,_req4$headers,_req$headers2,_ContentType,_req$headers2$_Conten;(_req4$headers=(_req4=req2).headers)!=null||(_req4.headers={}),(_req$headers2$_Conten=(_req$headers2=req2.headers)[_ContentType="Content-Type"])!=null||(_req$headers2[_ContentType]="application/json"),req2.processData=!1,req2.data=json_stringify(req2.data)}}else if(req2.body!=null)req2.data=req2.body,req2.contentType=!1,req2.processData=!1,delete req2.body;else if(req2.formData){req2.contentType=!1,req2.processData=!1;let form_data=new FormData;for(let key in req2.formData){let value=req2.formData[key];form_data.append(key,value)}req2.data=form_data,delete req2.formData}if(req2.qs){let url9=new URL(req2.url);for(let[key,value]of Object.entries(req2.qs))url9.searchParams.append(key,value);req2.url=url9.toString(),delete req2.qs}let ajax_request=do_request_client(req2);return ajax_request.done((data,textStatus,jqXHR)=>my_promise.resolve({statusCode:jqXHR.status,body:json_stringify(data)})),ajax_request.fail((jqXHR,textStatus,errorThrown)=>{var _jqXHR$responseText;return my_promise.resolve({statusCode:jqXHR.status,body:(_jqXHR$responseText=jqXHR.responseText)!=null?_jqXHR$responseText:errorThrown})}),my_promise})}function get8(){let plugin_prefixes={};for(let k in type_to_prefix){let v=type_to_prefix[k];plugin_prefixes[k]=v+":"}return{bubble_version(){var _ref,_window$bubble_versio,_window5;return(_ref=(_window$bubble_versio=(_window5=window)==null?void 0:_window5.bubble_version)!=null?_window$bubble_versio:this.app().get_public_setting("bubble_version"))!=null?_ref:0},bv(){return get_bv(this.bubble_version())},load_plugin,plugin_prefixes,load_custom,current_timezone(){return moment9.tz.guess()},log,workflow:new WorkflowEngine,pageparam:new PageParamService,app_language,get_text,locale(){return Locale.from_posix(lib_default().app_language())},browser_locale(){var _navigator;if(((_navigator=navigator)==null?void 0:_navigator.language)!=null)return Locale.from_ietf(navigator.language)},test_prod:!1,ip:"",app_indicator(appname_or_indicator,app_version,temp_db){var _appname_or_indicator,_appname_or_indicator2,_appname_or_indicator3;if(typeof appname_or_indicator=="string"||appname_or_indicator==null){var _this$appname;return{appname:appname_or_indicator!=null?appname_or_indicator:(_this$appname=this.appname)==null?void 0:_this$appname.call(this),app_version:app_version!=null?app_version:this.app_version(),temp_db:temp_db!=null?temp_db:this.temp_db()}}return(_appname_or_indicator=appname_or_indicator.appname)!=null||(appname_or_indicator.appname=domain_editor.get_appname_from_domain(appname_or_indicator.domain)),(_appname_or_indicator2=appname_or_indicator.app_version)!=null||(appname_or_indicator.app_version=this.app_version()),(_appname_or_indicator3=appname_or_indicator.temp_db)!=null||(appname_or_indicator.temp_db=this.temp_db()),appname_or_indicator},temp_db:null,http_request(req){return on_server()?http_request_server(req):http_request_client(req)},experiment(name,num_groups){let current_user5=this.current_user();if(!current_user5)return-1;let uid=current_user5._id(),rng=(0,import_seedrandom2.default)(name+uid);return Math.floor(rng()*num_groups)}}}function register2(){getLibFactory().registerLibCreator("default",get8)}function initialize5(){initialize2(),register2(),polyfill_browsers(),register_logger(logging_medium_exports),start2(),initialize4(),register_values(),init3(),initialize3()}function polyfill_browsers(){var _Math$log;(_Math$log=Math.log2)!=null||(Math.log2=x=>Math.log(x)*Math.LOG2E)}init_domain_utilities();init_lib();init_define_process_env();init_shim();var import_web_dom_collections_iterator331=__toESM(require_web_dom_collections_iterator());init_async_state3();init_locations2();init_lib();init_logger();init_mode_check();init_feature_check();var autorun28=__toESM(require_autorun()),b_async19=__toESM(require_b_async());init_b_object();init_errors();init_uuid();init_analytics();init_client_storage();var client_db3=__toESM(require_client_db());init_client_config2();init_define_process_env();init_shim();var HttpStatusCode=function(HttpStatusCode2){return HttpStatusCode2[HttpStatusCode2.OK=200]="OK",HttpStatusCode2[HttpStatusCode2.BadRequest=400]="BadRequest",HttpStatusCode2[HttpStatusCode2.NotFound=404]="NotFound",HttpStatusCode2[HttpStatusCode2.TooManyRequests=429]="TooManyRequests",HttpStatusCode2[HttpStatusCode2.BadGateway=502]="BadGateway",HttpStatusCode2[HttpStatusCode2.ServiceUnavailable=503]="ServiceUnavailable",HttpStatusCode2[HttpStatusCode2.GatewayTimeout=504]="GatewayTimeout",HttpStatusCode2[HttpStatusCode2.ServerError=500]="ServerError",HttpStatusCode2[HttpStatusCode2.UserSideNetworkError_0=0]="UserSideNetworkError_0",HttpStatusCode2[HttpStatusCode2.UserSideNetworkError_12017=12017]="UserSideNetworkError_12017",HttpStatusCode2}({}),HttpHeaderName=function(HttpHeaderName2){return HttpHeaderName2.RetryAfter="Retry-After",HttpHeaderName2}({});init_time();init_session();var _window3,request_cache={},_bubble_page_load_id=(_window3=window)==null?void 0:_window3.bubble_page_load_id,URIS_THAT_UPDATE_UID={"server://workflow/start":!0,"server://user/hi":!0};function _can_return_updated_uid(uri){return URIS_THAT_UPDATE_UID[uri]}function _save_session_uid(res){res!=null&&updateSessionUID(res.bubble_session_uid)}function _save_cookies_for_phonegap(request){if(on_phonegap()){let cookies_string=request.getResponseHeader("Set-Cookie");if(cookies_string){let processed_list=[],splitted_array=cookies_string.split(","),entry=splitted_array[0],i=0;for(;entry;)entry=splitted_array[i],entry.indexOf("expires=")!==-1&&(entry=entry+","+splitted_array[i+1],i++),processed_list.push(entry),i++,entry=splitted_array[i];for(let cookie of processed_list){let splitted=cookie.split("="),name=splitted[0].trim(),val=splitted[1].split(";")[0];createCookie(name,val)}}}}var LocationService=class extends Location{constructor(base_url,options){var _window23,_window2$addEventList,_window32,_window3$addEventList;super(base_url,options),this.open_requests=b_async19.MakeKeyList(),this.online_box=autorun28.Box(!0),this.can_reach_server=autorun28.Box(!0),this.online_callbacks=[],(_window23=window)==null||(_window2$addEventList=_window23.addEventListener)==null||_window2$addEventList.call(_window23,"online",()=>{if(!this.online_box()){for(let cb of this.online_callbacks)cb();this.online_callbacks=[]}this.online_box(!0)}),(_window32=window)==null||(_window3$addEventList=_window32.addEventListener)==null||_window3$addEventList.call(_window32,"offline",()=>{this.online_box(!1)})}is_online(){return this.online_box()&&this.can_reach_server()}once_online(cb){this.online_callbacks.push(cb)}change_page(page2,query,hash2){document.location.href=this.get_page_url(page2,query,hash2)}reload_page(){return document.location.reload()}set_url_without_refresh(_ref){let{url:url9,push_state}=_ref;push_state?window.history.pushState({},document.title,url9):window.history.replaceState({},document.title,url9),this.base_url=url9}get(uri,cb){return this.request(uri,"get",null,cb)}post(uri,data,cb){return this.request(uri,"post",data,cb)}put(uri,data,cb){return this.request(uri,"put",data,cb)}delete(uri,cb){return this.request(uri,"delete",null,cb)}request(uri,method,data,cb,timeout,fiber_id,start_time){var _timeout,_start_time,_fiber_id,_request_data$xhrFiel,_request_data$headers;if((_timeout=timeout)!=null||(timeout=500),(_start_time=start_time)!=null||(start_time=Date.now()),Date.now()-start_time>client_config_default2.REQUEST_TTL*2/3&&!offlineSupportEnabled())throw new OwnerError("Could not reach server");let promise=b_async19.Promise(null,method+" "+uri);(_fiber_id=fiber_id)!=null||(fiber_id=UUID()),cb&&promise.callback(cb);let original_uri=uri;uri=uri.toLowerCase();let is_bubble=!1,is_meta=!1;if(uri.indexOf("server://")!==-1)uri=this.get_server_base()+uri.split("server://")[1],is_bubble=!0;else if(uri.startsWith("server-canonical://"))uri=this.get_server_base({canonicalizeLiveVersion:!0})+uri.split("server-canonical://")[1],is_bubble=!0;else if(uri.indexOf("meta://")!==-1){let options={};document.location.href.startsWith(lib_default().location.get_base_for_meta())||(options.protocol="HTTPS:"),uri=this.get_base_for_meta(options)+"/"+uri.split("meta://")[1],is_bubble=!0,is_meta=!0}else uri.indexOf("bubble:")===0?(is_bubble=!0,uri=uri.slice(7)):(is_bubble=!1,warn('Using Lib().location.request to hit a non-Bubble server. Use Lib().http_request instead! If this actually is bubble, prefix url with "server://"',{uri}));let request_data={processData:!1,type:method,dataType:"json"};if((_request_data$xhrFiel=request_data.xhrFields)!=null||(request_data.xhrFields={}),(_request_data$headers=request_data.headers)!=null||(request_data.headers={}),(is_meta||on_phonegap())&&(request_data.xhrFields.withCredentials=!0),on_phonegap()){var _data;(_data=data)!=null||(data={}),data.headers_for_phonegap=lib_default().location.base_url}if(method!=="get"&&method!=="delete"){try{var _data2;request_data.data=JSON.stringify((_data2=data)!=null?_data2:{})}catch{var _data3;let new_data={},object2=(_data3=data)!=null?_data3:{};for(let k in object2){let v=object2[k];try{new_data[k]=JSON.stringify(v)}catch{}}request_data.data=JSON.stringify(new_data)}request_data.contentType="application/json",request_data.headers["cache-control"]="no-cache"}if(is_bubble){var _window42,_window4$read_url,_bubble_page_load_id2;let appname=(_window42=window)==null||(_window4$read_url=_window42.read_url)==null?void 0:_window4$read_url.call(_window42).app_id;is_edit_mode()&&appname?request_data.headers["X-Bubble-Appname"]=appname:is_plugin_edit_mode()&&(request_data.headers["X-Bubble-Appname"]="meta"),window.react_native_temp_db&&(request_data.headers["X-Bubble-Temp-DB"]=window.react_native_temp_db),request_data.headers["X-Bubble-Breaking-Revision"]=client_config_default2.breaking_revision,request_data.headers["X-Bubble-R"]=encodeURI(this.base_url),(_bubble_page_load_id2=_bubble_page_load_id)!=null||(_bubble_page_load_id=LUID()),request_data.headers["X-Bubble-PL"]=_bubble_page_load_id;let active_epoch=get_active_epoch();active_epoch&&(request_data.headers["X-Bubble-Epoch-ID"]=active_epoch.id,request_data.headers["X-Bubble-Epoch-Name"]=active_epoch.name),request_data.headers["X-Bubble-Fiber-ID"]=fiber_id;let utm_data=package_utm_data();utm_data&&(request_data.headers["X-Bubble-UTM-Data"]=utm_data),request_data.headers["X-Bubble-Client-Version"]=client_config_default2.commit_sha,request_data.headers["X-Bubble-Client-Commit-Timestamp"]=client_config_default2.commit_timestamp}let request=$.ajax(uri,request_data);return request.done((res,_,xhr)=>{if(is_bubble&&(async_state_default3.server_connection_problems=!1,this.can_reach_server(!0)),window.start_debugger!=null&&lib_default().workflow.debugger!=null){let num=parseInt(xhr.getResponseHeader("X-Bubble-Capacity-Limit"));isNaN(num)||lib_default().workflow.debugger.report_capacity_if_exposed_by_plan(num),lib_default().workflow.debugger.get_request_size(uri)}return _save_cookies_for_phonegap(request),_can_return_updated_uid(original_uri)&&_save_session_uid(res),rebuild_cookies(),client_db3.recheck_uid(()=>promise.resolve(res),original_uri)}),request.fail((xhr,text_status,err_string)=>{var _xhr$responseText,_xhr$responseText$ind;let bubble_change_page_header=xhr.getResponseHeader("x-bubble-change-page");if(bubble_change_page_header){let full_url=document.location.href,additional_query_params={referrer:encodeURIComponent(full_url)},query_params=extend({},lib_default().location.get_query(),additional_query_params);this.change_page(bubble_change_page_header,query_params);return}if(_save_cookies_for_phonegap(request),rebuild_cookies(),client_db3.recheck_uid(),is_bubble&&(xhr.status>=400&&xhr.status<=599?(async_state_default3.server_connection_problems=!1,this.can_reach_server(!0)):(async_state_default3.server_connection_problems=!0,this.can_reach_server(!1))),should_retry(xhr,is_bubble)){xhr.status===HttpStatusCode.UserSideNetworkError_0&&err_string!=null&&warn(new UnexpectedError("Bad request not sent",{status:err_string}));let retry_after_millisecond=get_retry_after_millisecond(xhr,timeout);setTimeout(()=>promise.resolve(this.request(original_uri,method,data,null,retry_after_millisecond*2,fiber_id,start_time)),retry_after_millisecond);return}if((((_xhr$responseText=xhr.responseText)==null||(_xhr$responseText$ind=_xhr$responseText.indexOf)==null?void 0:_xhr$responseText$ind.call(_xhr$responseText,"Chrome Data Compression Proxy"))!==-1||[12019,524].includes(xhr.status))&&timeout<2e3){setTimeout(()=>promise.resolve(this.request(original_uri,method,data,null,timeout*2,fiber_id,start_time)),timeout);return}if(!is_bubble){let response;try{response=json_parse(xhr.responseText)}catch{response=xhr.responseText}promise.reject(new UnexpectedError(response));return}promise.reject(this.response_to_error(xhr,{uri,request_data,method,fiber_id}))}),this.open_requests.add_key(promise.ready_key()),promise}response_to_error(xhr,data){let{uri,request_data,method,fiber_id}=data!=null?data:{},body=null;if(xhr.responseText&&xhr.getResponseHeader("Content-Type")==="application/json")try{body=JSON.parse(xhr.responseText)}catch{}let headers_string=xhr.getAllResponseHeaders();if(offlineSupportEnabled()&&!this.is_online())return new OfflineError("device is offline",{statusCode:xhr.status,response_body:xhr.responseText,uri,request_data,method,headers_string,code:fiber_id});if(body==null||!body.error_class)return new UnexpectedError("unexpected server response",{statusCode:xhr.status,response_body:xhr.responseText,uri,request_data,method,headers_string,code:fiber_id});let error2=from_json_client(body);return error2 instanceof UnexpectedError&&error2.extend({uri,request_data,method}),error2}request_synchronous(uri,method,data){var _request_cache$hash;function handle_complete_request(_ref2){let{response,error:error2,cache_status:cache_status2,current_version}=_ref2;cache_status2.version===current_version&&(cache_status2.response=response,cache_status2.error=error2,cache_status2.keys.map(key=>key.turn()),cache_status2.version+=1,cache_status2.state="complete")}let hash2=json_stringify({uri,method,data});(_request_cache$hash=request_cache[hash2])!=null||(request_cache[hash2]={state:"invalidated",version:0});let cache_status=request_cache[hash2];if(cache_status.state==="invalidated"){var _cache_status$keys;let current_version=cache_status.version;cache_status.state="pending",(_cache_status$keys=cache_status.keys)!=null||(cache_status.keys=[]),cache_status.keys.push(b_async19.MakeKey(null,"request_synchronous "+uri)),this.request(uri,method,data).then(response=>{handle_complete_request({response,cache_status,current_version})},error2=>{handle_complete_request({error:error2,cache_status,current_version})})}if(b_async19.ensure_ready(cache_status.keys[cache_status.keys.length-1]),cache_status.error)throw cache_status.error;return cache_status.response}wipe_request_cache(uri,method,data){let hash2=json_stringify({uri,method,data});request_cache[hash2]!=null&&(request_cache[hash2].state="invalidated",request_cache[hash2].version+=1,delete request_cache[hash2].response,delete request_cache[hash2].error)}},should_retry=(xhr,is_bubble)=>[HttpStatusCode.TooManyRequests,HttpStatusCode.ServiceUnavailable,HttpStatusCode.UserSideNetworkError_0,HttpStatusCode.UserSideNetworkError_12017].includes(xhr.status)||is_bubble&&[HttpStatusCode.BadGateway,HttpStatusCode.GatewayTimeout].includes(xhr.status),get_retry_after_millisecond=(xhr,timeout)=>{let retry_after=xhr.getResponseHeader(HttpHeaderName.RetryAfter);if(retry_after){let retry_after_seconds=Number(retry_after);if(Number.isFinite(retry_after_seconds))return retry_after_seconds*1e3;{let delta=new Date(retry_after).getTime()-Date.now();if(delta>=0)return delta}}return timeout};init_logger();init_b_date();init_plugin_getter();init_define_process_env();init_shim();init_u2();init_client_config2();init_logger();init_define_process_env();init_shim();init_client_config2();function get_error_message3(data,actual_id){var _data$caption,_data$caption2,_data$caption3,_data$caption4;switch(data.forbidden){case"NOT_PAID":return"The plugin "+((_data$caption=data.caption)!=null?_data$caption:actual_id)+" is published under a commercial license and this app does not have a subscription. Please subscribe in the editor.";case"BLOCKED":return"The plugin "+((_data$caption2=data.caption)!=null?_data$caption2:actual_id)+" is blocked by Bubble.";case"NOT_AUTHORIZED":return"The plugin "+((_data$caption3=data.caption)!=null?_data$caption3:actual_id)+" is published under a private license and this app is not authorized.";case"NOT_TEST_APP":return"The plugin "+((_data$caption4=data.caption)!=null?_data$caption4:actual_id)+" is in test mode and the current app is not the registered test app.";case"ISSUE":{var _data$caption5;let display2="The plugin "+((_data$caption5=data.caption)!=null?_data$caption5:actual_id)+" could not be retrieved for this app. ";return client_config_default2.is_dedicated?display2+="Please upgrade your Dedicated Cluster and try again.":display2+="Please make sure it exists.",display2}}}var _reported_bubble_no_third_party_plugin_once=!1,_shown_warning=!1,TESTING_PLUGIN_WARN_MSG="Using plugins in testing mode can considerably slow down your application as they are not cached. You should only use a test app to test plugins.",TESTING_PLUGIN_WARN_DEDICATED_MSG="Testing plugins should not be done with an application in a dedicated cluster. Please test your plugin with an app on the main cluster.";function runmode_pluginservice_getter(plugin_id,actual_id,version2){var _window5,_window$plugins;let data=(_window5=window)==null||(_window$plugins=_window5.plugins)==null?void 0:_window$plugins[actual_id];if(typeof data=="string"&&(data=json_parse(data)),pluginLoadingDisabled(data)){reportPluginsDisabled(actual_id,data);return}return version2==="current"&&(_shown_warning||(owner_warn(TESTING_PLUGIN_WARN_MSG),client_config_default2.is_dedicated&&owner_warn(TESTING_PLUGIN_WARN_DEDICATED_MSG),_shown_warning=!0)),new ThirdPartyPluginWrapper(actual_id,version2,data)}function pluginLoadingDisabled(data){return data==null||is_empty(data)||data.forbidden}function reportPluginsDisabled(actual_id,data){if(data==null)if(window.bubble_no_third_party_plugin){if(_reported_bubble_no_third_party_plugin_once)return;owner_warn("Community plugins are not loaded in safe mode."),_reported_bubble_no_third_party_plugin_once=!0}else owner_error("Plugin could not be loaded",{display:`The plugin ${actual_id} could not be loaded. Please check it exists.`});else data.forbidden&&owner_error(data.forbidden,{display:get_error_message3(data,actual_id)})}init_define_process_env();init_shim();init_u2();function get9(function_name){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];let key=JSON.stringify({function_name,args});if(window.bubble_run_derived[key])return new RunDerived(window.bubble_run_derived[key]);throw new UnexpectedError("Derived not included in package",{function_name,args})}var RunDerived=class{constructor(_content){this._content=_content}content(){return this._content}set_app(app){}};init_define_process_env();init_shim();var import_web_dom_collections_iterator332=__toESM(require_web_dom_collections_iterator());init_u2();init_test_state();init_status_bar();init_webfonts();var import_fast_deep_equal3=__toESM(require_fast_deep_equal());init_domain_utilities();var Lib31=safe_require("./lib"),initialize6=function(){let everything_ready=u_exports2.MakeKeyList([Lib31().workflow.everything_done_key(),server_running_key,Lib31().location.open_requests,u_exports2.scheduled_key,u_exports2.no_outstanding_run_once,no_status_bar,active_key]);window.everything_ready=()=>everything_ready,window.wait_for_everything=cb=>setTimeout(()=>everything_ready.is_turned()?cb():window.wait_for_everything(cb),100)},fail2=fail,assert2=assert,assert_equals=function(expected,actual,msg){console.log(`Asserting equals: ${expected}, ${actual}`),expected!==actual&&fail2(msg!=null?msg:`expected:
${expected}
but got:
${actual}`)},assert_deep_equals=function(expected,actual,msg){(0,import_fast_deep_equal3.default)(expected,actual)||fail2(msg!=null?msg:`expected:
${JSON.stringify(expected)}
but got:
${JSON.stringify(actual)}`)},assert_set_equals=function(expected,actual,base_msg){console.log(`Asserting set equals: [${expected.join(", ")}], [${actual.join(", ")}]`);let missing=[];for(let item of expected)actual.includes(item)||missing.push(item);let extra=[];for(let item of actual)expected.includes(item)||extra.push(item);if(missing.length!==0||extra.length!==0){let msg=(base_msg!=null?base_msg:"Sets are not equal")+`
`;msg+="Expected: "+expected.join(", ")+`
`,msg+="Got: "+actual.join(", ")+`
`,missing.length!==0&&(msg+="Missing Items: "+missing.join(", ")+`
`),extra.length!==0&&(msg+="Extra Items: "+extra.join(", ")+`
`),fail2(msg)}},assert_contains=function(expected,actual,msg){console.log(`Asserting contains: ${expected}, ${actual}`),actual.indexOf(expected)===-1&&fail2(msg!=null?msg:`expected it to contain ${expected} but got ${actual}`)},assert_error=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];let adjustedLength=Math.max(args.length,1),error_class=args.slice(0,adjustedLength-1),fn=args[adjustedLength-1];console.log("asserting there is an error...");let no_error=!1;try{fn(),no_error=!0}catch(err){if(error_class[0]&&!(err instanceof error_class[0])){var _err$constructor;console.log(err.stack),fail2(`Expected an instance of ${error_class[0].prototype.error_class} but got ${err==null||(_err$constructor=err.constructor)==null?void 0:_err$constructor.name}`)}return err}no_error&&fail2("Expected an error but did not get one")},wait_for=function(condition,cb){let wait_for2=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e4,interval=setInterval(()=>{condition()&&(clearInterval(interval),clearTimeout(timeout),cb())},500),timeout=setTimeout(()=>{throw clearInterval(interval),new UnexpectedError("Timed out after 30 seconds of waiting for: "+condition)},wait_for2)},DOMAIN,DOMAIN_PREFIX,DOMAIN_PREFIX_DIRECT,set_domain=function(domain){DOMAIN=domain;let proto=is_host_aws(domain)?"http":"https";DOMAIN_PREFIX=`${proto}://${DOMAIN}/`,DOMAIN_PREFIX_DIRECT=`${proto}://${DOMAIN}`},_log=[],log3=msg=>_log.push(msg),get_log=function(){let ret=_log;return _log=[],ret};function check_for_errors(){if(all_page_errors.length>0){var _err$stacktrace;let err=all_page_errors[0];return all_page_errors.length=0,(_err$stacktrace=err.stacktrace)!=null?_err$stacktrace:JSON.stringify(err)}return null}var my_interval=null;function set_global_handler(cb){clearInterval(my_interval),my_interval=setInterval(()=>{let err=check_for_errors();err&&(cb(err),clearInterval(my_interval))},1e3)}var SimpleTest=class{constructor(_name,fn,setup){this._name=_name,this.fn=fn,this.setup=setup}name(){return this._name}run(cb){set_global_handler(cb);try{return this.fn(err=>cb(err!=null?err:check_for_errors()))}catch(error2){return cb(error2)}}},testing={initialize:initialize6,fail:fail2,assert:assert2,assert_equals,assert_deep_equals,assert_set_equals,assert_contains,assert_error,wait_for,set_domain,DOMAIN,DOMAIN_PREFIX,DOMAIN_PREFIX_DIRECT,log:log3,get_log,SimpleTest},server_running_key;typeof window<"u"&&window!==null&&(window.testing=testing,server_running_key=u_exports2.MakeSwitch(null,"server_running_key"),server_running_key.turn_on(),$(document).ajaxStart(()=>server_running_key.turn_off()),$(document).ajaxStop(()=>server_running_key.turn_on()));safe_register("./test_utilities/testing",testing);var url_lib=__toESM(require_url());init_define_process_env();init_shim();var import_web_dom_collections_iterator333=__toESM(require_web_dom_collections_iterator()),import_es_string_replace67=__toESM(require_es_string_replace());init_lodash();init_u2();var evts=__toESM(require_events()),url8=__toESM(require_url());init_lib();init_logger();var client_db4=__toESM(require_client_db());init_db2();init_db();init_workflow();typeof window<"u"&&window!==null&&(window.authenticate_as=user_id=>lib_default().location.post("server://user/auth_as/"+user_id,{},(err,res)=>{err?console.log("Authentication failed"):(console.log("Authentication succeeded.  Refreshing..."),setTimeout(()=>window.document.location.reload(),1e3))}));var UserService=class extends evts.EventEmitter{constructor(){super(),this.ready_key=u_exports2.MakeKey(null,"user_service"),this.has_changed_flag=!1,this.heartbeat_interval=null,this.logged_in_watchers=new Set}initialize(){let heartbeat=()=>{this.heartbeat_interval=setInterval(()=>lib_default().location.post("server://user/hi",null),3e5)};this.heartbeat_interval==null&&lib_default().location.post("server://user/hi",null,heartbeat),this.user_watcher=u_exports2.Watcher({fn:()=>{var _Lib$pageparam$get,_Lib$pageparam$get$_i;let user=client_db4.current_user(),logged_in=user.is_logged_in(),id=user._id(),page_param=(_Lib$pageparam$get=lib_default().pageparam.get())==null||(_Lib$pageparam$get$_i=_Lib$pageparam$get._id)==null?void 0:_Lib$pageparam$get$_i.call(_Lib$pageparam$get);return{logged_in,id,page_param}},compare:isEqual_default}),this.user_watcher.on_value(v=>{let logged_in=v.logged_in;lib_default().current_user()._id()!==NO_USER&&(wipe_no_user(),this.emit("cookie_opt_in"));let{on_login}=lib_default().location.get_query();if(logged_in&&on_login){this.has_changed_flag=!0,lib_default().workflow.about_to_change_page=!0;let redirect_to=lib_default().location.get_server_base()+"api/1.1/util/rr/"+on_login;window.location.replace(redirect_to)}for(let cb of this.logged_in_watchers)cb(logged_in)})}on_logged_in_status(cb){this.logged_in_watchers.add(cb)}off_logged_in_status(cb){this.logged_in_watchers.delete(cb)}get_logged_in_status(){var _this$user_watcher;let watcher_status=(_this$user_watcher=this.user_watcher)==null?void 0:_this$user_watcher.get_current_status();if((watcher_status==null?void 0:watcher_status.status)==="ready")return{loggedIn:watcher_status.value.logged_in}}on_cookie_opt_in(cb){lib_default().current_user()._id()!==NO_USER?cb():this.once("cookie_opt_in",cb)}is_cookie_opt_in(){return lib_default().current_user()._id()!==NO_USER}has_changed(){if(lib_default().current_user().is_logged_in())return this.has_changed_flag}ready(){error("Deprecated call to userservice.ready"),this.ready_key.turn()}on_page_load_for_confirmation_email(){$(document).ready(()=>{let parsed_url=url8.parse(lib_default().location.base_url,!0),transmitted_data=parsed_url.query;transmitted_data.confirmation_email&&lib_default().location.post("server://user/confirm_email",{confirmation_email_id:transmitted_data.confirmation_email}).then(()=>{lib_default().current_user().flush(),delete transmitted_data.confirmation_email,delete parsed_url.search,delete parsed_url.hash,lib_default().location.set_url_without_refresh({url:url8.format(parsed_url)})},err=>{core_events_default.handle_uncaught_error({original_error:err,caught_from:ERROR_SOURCES.GENERAL_WORKFLOW,cb(err2){err2&&window.alert(human_friendly(err2))}})})})}};init_webfonts();var moment10=require_moment2(),BENIGN_ERROR_MESSAGES=["ResizeObserver loop limit exceeded"];function install_test_gap_error_handler(){if(window.load_error_log!=null){let bad_errors=window.load_error_log.filter(e=>!BENIGN_ERROR_MESSAGES.includes(e.msg));bad_errors.length>0&&(window.captured_test_errors=bad_errors.map(e=>({msg:e.msg,url:e.error_url,line:e.line,col:e.col})))}let listener=event=>{let url9=event.filename,line=event.lineno,msg=event.message;if(!BENIGN_ERROR_MESSAGES.includes(msg)){var _window$captured_test;window.captured_test_errors=(_window$captured_test=window.captured_test_errors)!=null?_window$captured_test:[],window.captured_test_errors.push({msg,url:url9,line})}console.error(msg)};window.addEventListener("error",listener),window.gapListener=listener}function make_document_ready(){typeof document<"u"&&document!==null&&(window.document_ready_key=u_exports2.MakeKey(null,"window.document_ready_key"),$(()=>window.document_ready_key.turn()),initialize5(),install_test_gap_error_handler(),install_browser_error_handler({Lib:lib_default}),initialize(runmode_pluginservice_getter),validate_temp_db())}function create_location_service(){let location2;if(on_phonegap()){if(!window.web_url_equivalent_for_phonegap)throw new UnexpectedError("missing web_url_equivalent_for_phonegap for phonegap app. Should be set in index.html when generating the phonegap build");location2=new LocationService(window.web_url_equivalent_for_phonegap)}else location2=new LocationService(document.location.href,{normalizeUnicode:!0});return location2}function create_lib(app,page_id){let p=json_parse(window._p);return{app:make_run_app(app,app._id,app.app_version),is_edit_mode:!1,appname(){return app._id},app_version(){return app.app_version},db_instance:client_db5.instance,current_user:client_db5.current_user,location:create_location_service(),user:new UserService,element:new ElementService({shouldSkip(instance4,entire_page){let canvas=instance4.get_canvas();return!!(!canvas||canvas.is(":hidden")||canvas.css("visibility")==="hidden"||!entire_page&&$(window).height()<canvas.offset().top)}}),ignore_privacy_rules(){return!1},app_plan(){return p},derived:get9,current_timezone(){return appquery_default.has_advanced_feature_enabled("timezone_controls_page")?appquery_default.get_page_by_name(page_id).get_page_timezone():moment10.tz.guess()}}}function set_up_debugger(){if(url_lib.parse(document.location.href,!0).query.debug_mode)if(window.start_debugger!=null)window.start_debugger();else{let parsed=url_lib.parse(document.location.href,!0);delete parsed.query.debug_mode,delete parsed.search,lib_default().location.set_url_without_refresh({url:url_lib.format(parsed)})}}function set_webfonts_key(){u_exports2.WaitFor(active_key,fontface_key,()=>{var _window$performance2,_window$performance$m;(_window$performance2=window.performance)==null||(_window$performance$m=_window$performance2.mark)==null||_window$performance$m.call(_window$performance2,"webfonts active")})}function initialize_tests(){initialize6(),is_test2(lib_default().appname())&&lib_default().load_plugin(lib_default().plugin_prefixes.module+"runmode_tests").initialize()}function validate_temp_db(){let parsed=url_lib.parse(document.location.href,!0);readCookie("temp_db")&&(is_hostname_bubble(parsed.host)?eraseCookie("temp_db"):console.log("TEMP DB IS SET!!!"))}init_define_process_env();init_shim();var import_web_dom_collections_iterator334=__toESM(require_web_dom_collections_iterator());init_u2();init_lib();init_logger();function snapshot_page_when_stable(){let cancelled=!1;return setTimeout(()=>{u_exports2.WaitFor(lib_default.or_throw().workflow.everything_done_key(),()=>{cancelled||do_it()})},3e3),function(){cancelled=!0}}function do_it(){on_phonegap()||u_exports2.run_once(30,()=>lib_default().current_user().is_logged_in(),(err,is_logged_in)=>{if(err){log(err);return}is_logged_in||lib_default().location.post("server://frg",{action:"ask",url:document.location.href}).then(result=>{if(result){let html=document.documentElement.outerHTML,[first,second]=html.split('<meta charset="utf-8">');html=first+'<script type="text/javascript">window.dont_call_page_display = true;<\/script><meta charset="utf-8">'+second,lib_default().location.post("server://frg",{action:"set",html,url:document.location.href})}})})}init_webfonts();init_define_process_env();init_shim();var import_web_dom_collections_iterator335=__toESM(require_web_dom_collections_iterator());init_errors();var StateMachine=class{constructor(){this.currentState=void 0,this.inTransition=!1,this.exitCallbacks=void 0}start(){var _states$initialState,_states$initialState$,_states$initialState$2;if(this.currentState)throw new UnexpectedError("State machine already started",{currentState:this.currentState});let{initialState,states}=this.definition;return this.currentState=initialState,(_states$initialState=states[initialState])==null||(_states$initialState$=_states$initialState.actions)==null||(_states$initialState$2=_states$initialState$.onEnter)==null||_states$initialState$2.call(this),this}transition(eventLike){var _states$this$currentS,_states$this$currentS2,_currentStateDefiniti,_currentStateDefiniti2,_this$exitCallbacks,_eventDefinition$acti,_targetStateDefinitio,_targetStateDefinitio2,_targetStateDefinitio3;let event=typeof eventLike=="object"?eventLike:{type:eventLike};if(!this.currentState)throw new UnexpectedError("State machine not started",{eventType:event.type});if(this.inTransition)throw new UnexpectedError("State machine already transitioning",{currentState:this.currentState,eventType:event.type});let{states,onTransition}=this.definition,eventDefinition=(_states$this$currentS=states[this.currentState])==null||(_states$this$currentS2=_states$this$currentS.events)==null?void 0:_states$this$currentS2[event.type];if(!eventDefinition)throw new UnexpectedError("Invalid state machine transition",{currentState:this.currentState,eventType:event.type});this.inTransition=!0;let targetState=eventDefinition.target,targetStateDefinition=states[targetState],currentStateDefinition=states[this.currentState];currentStateDefinition==null||(_currentStateDefiniti=currentStateDefinition.actions)==null||(_currentStateDefiniti2=_currentStateDefiniti.onExit)==null||_currentStateDefiniti2.call(this),(_this$exitCallbacks=this.exitCallbacks)==null||_this$exitCallbacks.forEach(cb=>cb()),this.exitCallbacks=void 0,eventDefinition==null||(_eventDefinition$acti=eventDefinition.action)==null||_eventDefinition$acti.call(this,event);let previousState=this.currentState;this.currentState=targetState,onTransition==null||onTransition.call(this,previousState,targetState,event),targetStateDefinition==null||(_targetStateDefinitio=targetStateDefinition.actions)==null||(_targetStateDefinitio2=_targetStateDefinitio.onEnter)==null||_targetStateDefinitio2.call(this),this.inTransition=!1,targetStateDefinition!=null&&(_targetStateDefinitio3=targetStateDefinition.events)!=null&&_targetStateDefinitio3.always&&this.transition({type:"always"})}queueTransition(eventLike){queueMicrotask(()=>this.transition(eventLike))}onceExit(fn){var _this$exitCallbacks2;(_this$exitCallbacks2=this.exitCallbacks)!=null||(this.exitCallbacks=[]),this.exitCallbacks.push(fn)}ifStateUnchanged(fn){let cancelled=!1;return this.onceExit(()=>{cancelled=!0}),function(){return cancelled?void 0:fn(...arguments)}}delayedTransition(eventLike){return this.ifStateUnchanged(()=>{this.queueTransition(eventLike)})}canTransition(event){if(!this.currentState||this.inTransition)return!1;{var _this$definition$stat,_this$definition$stat2;let eventType=event.type;return((_this$definition$stat=this.definition.states[this.currentState])==null||(_this$definition$stat2=_this$definition$stat.events)==null?void 0:_this$definition$stat2[eventType])!=null}}};init_define_process_env();init_shim();var _window4,_window$performance,_window22,_window2$performance,enabled=((_window4=window)==null||(_window$performance=_window4.performance)==null?void 0:_window$performance.measure)!=null&&((_window22=window)==null||(_window2$performance=_window22.performance)==null?void 0:_window2$performance.mark)!=null;function startMeasure(name){if(!enabled)return()=>{};let startMark=mark(`${name}_start`);return function(detail){let endMark=mark(`${name}_end`);typeof(startMark==null?void 0:startMark.startTime)!="number"||typeof(endMark==null?void 0:endMark.startTime)!="number"||measure(name,{start:startMark.startTime,end:endMark.startTime,detail})}}function mark(name,options){try{return performance.mark(name,options)}catch{return}}function measure(name,options){try{return performance.measure(name,options)}catch{return}}init_define_process_env();init_shim();var import_web_dom_collections_iterator336=__toESM(require_web_dom_collections_iterator());init_errors();var LoadingStatus=function(LoadingStatus2){return LoadingStatus2.NOT_LOADED="NOT_LOADED",LoadingStatus2.LOADING="LOADING",LoadingStatus2.LOADED="LOADED",LoadingStatus2.LOAD_FAILED="LOAD_FAILED",LoadingStatus2}({}),AssetLoaderType=function(AssetLoaderType2){return AssetLoaderType2.PRE_LOADED_JS="PRE_LOADED_JS",AssetLoaderType2.URL_LOAD_JS="URL_LOAD_JS",AssetLoaderType2.CSS="CSS",AssetLoaderType2}({}),AssetLoader=class{},PreloadedJSAssetLoader=class extends AssetLoader{async loadAsset(_assetIdentifier){var _window$preloaded;let asset={lineItems:Object.keys((_window$preloaded=window.preloaded)!=null?_window$preloaded:{})};return await Promise.resolve(asset)}},URLloadJSAssetLoader=class extends AssetLoader{async loadAsset(url9){return await new Promise((resolve,reject)=>{let script=document.createElement("script");script.src=url9,script.crossOrigin="anonymous",script.async=!0,script.charset="utf-8",document.head.appendChild(script),script.addEventListener("load",()=>resolve({lineItems:[]})),script.addEventListener("error",e=>reject(e.error))})}},CSSAssetLoader=class extends AssetLoader{async loadAsset(url9){return await new Promise((resolve,reject)=>{let link=document.createElement("link");link.rel="stylesheet",link.href=url9,link.addEventListener("load",()=>resolve({lineItems:[]})),link.addEventListener("error",e=>reject(e.error)),document.head.appendChild(link)})}},LoadCoordinator=class{constructor(){this.lineItemsStatus=void 0,this.assetsStatus=void 0,this.loaderMap=void 0,this.lineItemsStatus=new Map,this.assetsStatus=new Map,this.loaderMap=new Map([[AssetLoaderType.PRE_LOADED_JS,new PreloadedJSAssetLoader],[AssetLoaderType.URL_LOAD_JS,new URLloadJSAssetLoader],[AssetLoaderType.CSS,new CSSAssetLoader]])}getAssetStatus(assetIdentifier){let status=this.assetsStatus.get(assetIdentifier);return status||(this.assetsStatus.set(assetIdentifier,LoadingStatus.NOT_LOADED),LoadingStatus.NOT_LOADED)}async loadAsset(assetIdentifier){let{type,id}=assetIdentifier,assetLoader=this.loaderMap.get(type);if(assetLoader==null)throw new UnexpectedError("Unknown assetIdentifier type",{});this.assetsStatus.set(id,LoadingStatus.LOADING);try{let asset=await assetLoader.loadAsset(assetIdentifier.id);return this.assetsStatus.set(id,LoadingStatus.LOADED),asset}catch(err){throw this.assetsStatus.set(id,LoadingStatus.LOAD_FAILED),err}}};init_define_process_env();init_shim();var import_web_dom_collections_iterator338=__toESM(require_web_dom_collections_iterator()),import_es_string_replace68=__toESM(require_es_string_replace()),import_web_url_search_params7=__toESM(require_web_url_search_params());init_rendering_perf();init_lib();init_client_config2();init_define_process_env();init_shim();var import_web_dom_collections_iterator337=__toESM(require_web_dom_collections_iterator());init_appquery();init_lib();init_logger();function copyFullyLoaded(data,fullyLoadedEvent){return fullyLoadedEvent!==void 0&&(fullyLoadedEvent.page_data!=null&&(data.page_data=fullyLoadedEvent.page_data),fullyLoadedEvent.page_html!=null&&(data.page_html=fullyLoadedEvent.page_html),fullyLoadedEvent.page_render_start!=null&&(data.page_render_start=fullyLoadedEvent.page_render_start),fullyLoadedEvent.page_render!=null&&(data.page_render=fullyLoadedEvent.page_render),fullyLoadedEvent.page_full!=null&&(data.page_full=fullyLoadedEvent.page_full),fullyLoadedEvent.packager_size!=null&&typeof fullyLoadedEvent.packager_size=="number"&&(data.packager_size=fullyLoadedEvent.packager_size)),data}function shared_page_load_metrics(){let{dns_time,redirect_time,tcp_time}=calculateNavigationTiming(),timestamp2=Date.now(),url9=window.location.href,appname=appquery_default.appname(),app_version=appquery_default.app_version(),bundle_type=window.bubble_bundle_name,browser=getBrowserData(),user_agent;return browser!=null&&browser.brands||(user_agent=window.navigator.userAgent),{timestamp:timestamp2,url:url9,appname,app_version,bundle_type,dns_time,redirect_time,tcp_time,browser,user_agent,token:window.bubble_plp_token}}function send_page_load_performance_metrics(data){lib_default.or_throw().location.post("server://user/m",data,err=>{err&&log(err)})}function calculateNavigationTiming(){let dns_time,redirect_time,tcp_time;for(let entry of window.performance.getEntries()){let resourceTimingEntry=entry;if(!Number.isNaN(resourceTimingEntry.domainLookupEnd-resourceTimingEntry.domainLookupStart)){var _dns_time;(_dns_time=dns_time)!=null||(dns_time=0),dns_time+=resourceTimingEntry.domainLookupEnd-resourceTimingEntry.domainLookupStart}if(!Number.isNaN(resourceTimingEntry.redirectEnd-resourceTimingEntry.redirectStart)){var _redirect_time;(_redirect_time=redirect_time)!=null||(redirect_time=0),redirect_time+=resourceTimingEntry.redirectEnd-resourceTimingEntry.redirectStart}if(!Number.isNaN(resourceTimingEntry.connectEnd-resourceTimingEntry.connectStart)){var _tcp_time;(_tcp_time=tcp_time)!=null||(tcp_time=0),tcp_time+=resourceTimingEntry.connectEnd-resourceTimingEntry.connectStart}}return{dns_time,redirect_time,tcp_time}}function getBrowserData(){let userAgentData=window.navigator.userAgentData;return userAgentData?{brands:`[${userAgentData.brands.map(brand=>`${brand.brand} ${brand.version}`).join(", ")}]`,platform:userAgentData.platform,mobile:userAgentData.mobile,language:window.navigator.language}:{language:window.navigator.language}}function get_settings(page_id){let responsive_version,old_responsive_elements,experimental_features={};for(let experiment in PUBLIC_ACTIVE_EXPERIMENTS)appquery_default.has_feature_enabled(experiment)&&(experimental_features[experiment]=!0);if(page_id){let page2=appquery_default.get_page_by_name(page_id);responsive_version=page2==null?void 0:page2.get_responsive_version();let reusable_elements=appquery_default.custom_definitions();for(let element of reusable_elements)element.get_responsive_version()===0&&(old_responsive_elements=!0)}return{bubble_version:window.bubble_version,experimental_features,responsive_version,old_responsive_elements}}var FIRST_PARTY_ASSETS=function(FIRST_PARTY_ASSETS2){return FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.dynamic_js=0]="dynamic_js",FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.early_js=1]="early_js",FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.edit_js=2]="edit_js",FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.run_debug_js=3]="run_debug_js",FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.static_js=4]="static_js",FIRST_PARTY_ASSETS2[FIRST_PARTY_ASSETS2.run_css=5]="run_css",FIRST_PARTY_ASSETS2}(FIRST_PARTY_ASSETS||{});function get_plugin_information(){let third_party_plugin_count,third_party_plugin_code_string_length;if(window.plugins!=null){third_party_plugin_count=Object.keys(window.plugins).length;for(let plugin2 in window._bubble_page_load_data.plugins_size){var _third_party_plugin_c;(_third_party_plugin_c=third_party_plugin_code_string_length)!=null||(third_party_plugin_code_string_length=0),third_party_plugin_code_string_length+=window._bubble_page_load_data.plugins_size[plugin2]}}let third_party_plugin_js_execution_time_ms,code_timing,plugin_timings=get_plugin_execution_time();for(let plugin2 in plugin_timings){var _code_timing;(_code_timing=code_timing)!=null||(code_timing=0),code_timing+=plugin_timings[plugin2]}let js_timings=window._bubble_page_load_data.js_execution_timings;if(js_timings.plugin_js_end_execution&&js_timings.plugin_js_start_execution&&(third_party_plugin_js_execution_time_ms=js_timings.plugin_js_end_execution-js_timings.plugin_js_start_execution),js_timings.deferred_plugin_js_end_execution&&js_timings.deferred_plugin_js_start_execution){var _third_party_plugin_j;third_party_plugin_js_execution_time_ms=((_third_party_plugin_j=third_party_plugin_js_execution_time_ms)!=null?_third_party_plugin_j:0)+js_timings.deferred_plugin_js_end_execution-js_timings.deferred_plugin_js_start_execution}code_timing&&third_party_plugin_js_execution_time_ms?third_party_plugin_js_execution_time_ms+=code_timing:code_timing&&(third_party_plugin_js_execution_time_ms=code_timing);let hardcoded_plugins,hardcoded_plugin_count;return window._bubble_page_load_data.hardcoded_plugins!=null&&(hardcoded_plugins=window._bubble_page_load_data.hardcoded_plugins,hardcoded_plugin_count=Object.keys(hardcoded_plugins).length),{third_party_plugin_count,third_party_plugin_js_execution_time_ms,third_party_plugin_code_string_length,hardcoded_plugin_count,hardcoded_plugins}}function get_total_module_elapsed_time(perfList){if(perfList.length===0)return 0;let records=perfList.map(a=>{let timingRecord=a;return{startTime:timingRecord.startTime,responseEnd:timingRecord.responseEnd}}).sort((a,b)=>a.startTime-b.startTime),merged=[],currentRecord=records[0];for(let i=1;i<records.length;i++)records[i].startTime<=currentRecord.responseEnd?currentRecord.responseEnd=Math.max(currentRecord.responseEnd,records[i].responseEnd):(merged.push(currentRecord),currentRecord=records[i]);return merged.push(currentRecord),merged.map(a=>a.responseEnd-a.startTime).reduce(sum)}function get_asset_metrics(){let resources=window.performance.getEntriesByType("resource"),temp_obj={},module_stats={compressed_size_bytes:[],uncompressed_size_bytes:[],download_time_ms:[]},module_records=[];for(let resource of resources){var _temp_obj$third_party;let name=resource.name,perf_resource=resource;(_temp_obj$third_party=temp_obj.third_party_assets_count)!=null||(temp_obj.third_party_assets_count=0);let classification=classify_resource(perf_resource);if(classification.first_party)if(is_module(perf_resource)&&classification.file_type==="js")module_records.push(perf_resource),module_event(perf_resource,module_stats);else{let fileName=name.substring(name.lastIndexOf("/")+1,name.length).replace(".","_");first_party_event(perf_resource,temp_obj,fileName),classification.file_type==="js"&&blocking_event(temp_obj,fileName)}else third_party_event(perf_resource,temp_obj)}return record_module_stats(module_stats,temp_obj),temp_obj.module_total_download_time_ms=get_total_module_elapsed_time(module_records),temp_obj}function is_module(resource){return resource.name.includes("run_js")||resource.name.includes("run_lean_js")}function classify_resource(resource){let first_party=!1,file_type=resource.name.substring(resource.name.lastIndexOf(".")+1).toLowerCase();return resource.name.includes("package")&&(first_party=!0),{first_party,file_type}}function first_party_event(resource,temp_obj,fileName){if(Object.values(FIRST_PARTY_ASSETS).includes(fileName))temp_obj[`${fileName}_uncompressed_size_bytes`]=resource.decodedBodySize,temp_obj[`${fileName}_compressed_size_bytes`]=resource.encodedBodySize,resource.duration>=0&&(temp_obj[`${fileName}_download_time_ms`]=resource.duration);else{var _temp_obj$other_asset;(_temp_obj$other_asset=temp_obj.other_assets_count)!=null||(temp_obj.other_assets_count=0),temp_obj.other_assets_count+=1}return temp_obj}function blocking_event(temp_obj,fileName){let js_timings=window._bubble_page_load_data.js_execution_timings;return temp_obj[`${fileName}_start_execution_ms`]=js_timings[`${fileName}_start_execution`],Number.isNaN(js_timings[`${fileName}_end_execution`]-js_timings[`${fileName}_start_execution`])||(temp_obj[`${fileName}_execution_time_ms`]=js_timings[`${fileName}_end_execution`]-js_timings[`${fileName}_start_execution`]),temp_obj[`pre_${fileName}_ms`]=js_timings[`pre_${fileName}`],temp_obj[`post_${fileName}_ms`]=js_timings[`post_${fileName}`],temp_obj}function third_party_event(resource,temp_obj){if(temp_obj.third_party_assets_count+=1,resource.decodedBodySize){var _temp_obj$third_party2;(_temp_obj$third_party2=temp_obj.third_party_assets_uncompressed_size_bytes)!=null||(temp_obj.third_party_assets_uncompressed_size_bytes=0),temp_obj.third_party_assets_uncompressed_size_bytes+=resource.decodedBodySize}if(resource.encodedBodySize){var _temp_obj$third_party3;(_temp_obj$third_party3=temp_obj.third_party_assets_compressed_size_bytes)!=null||(temp_obj.third_party_assets_compressed_size_bytes=0),temp_obj.third_party_assets_compressed_size_bytes+=resource.encodedBodySize}return temp_obj}function module_event(resource,module_stats){module_stats.compressed_size_bytes.push(resource.encodedBodySize),module_stats.uncompressed_size_bytes.push(resource.decodedBodySize),module_stats.download_time_ms.push(resource.duration)}function median(values){if(values.length===0)return 0;values.sort((a,b)=>a-b);let half=Math.floor(values.length/2);return values.length%2?values[half]:(values[half-1]+values[half])/2}function sum(a,b){return a+b}function record_module_stats(module_stats,temp_obj){if(module_stats.compressed_size_bytes.length>0){temp_obj.module_count=module_stats.compressed_size_bytes.length,temp_obj.module_total_compressed_size_bytes=module_stats.compressed_size_bytes.reduce(sum),temp_obj.module_total_uncompressed_size_bytes=module_stats.uncompressed_size_bytes.reduce(sum),temp_obj.module_median_compressed_size_bytes=median(module_stats.compressed_size_bytes),temp_obj.module_median_uncompressed_size_bytes=median(module_stats.uncompressed_size_bytes),temp_obj.module_median_download_time_ms=median(module_stats.download_time_ms);let module_timings=window._bubble_page_load_data.js_execution_timings.module_execution_timings;Array.isArray(module_timings)&&(temp_obj.module_total_execution_ms=module_timings.reduce(sum),temp_obj.module_median_execution_ms=median(module_timings),temp_obj.module_start_execution_ms=window._bubble_page_load_data.js_execution_timings.module_first_execution)}}function internal_nav_explanation(){let searchParams2=new URLSearchParams(window.location.search),referrer_hostname=window.document.referrer.split("/")[2];if(!window.document.referrer||referrer_hostname!==window.location.hostname)return"NOT_INTERNAL_NAV";if(searchParams2.get(EXPERIMENT_PARAM)==="false"){searchParams2.delete(EXPERIMENT_PARAM);let url9=lib_default.or_throw().location.get_page();return url9&&window.history.replaceState(null,"",`${url9}?${searchParams2.toString()}`),"RAN_PERFORMANCE_EXPERIMENT"}else{if(lib_default.or_throw().location.get_pieces().use_site_path)return"UNKNOWN";if(referrer_hostname===window.location.hostname)return"SAME_APP"}}function runmode_page_load_performance_metrics(fullyLoadedEvent,page_id){if(!client_config_default2.page_speed_metrics_on)return;let{third_party_plugin_count,third_party_plugin_js_execution_time_ms,third_party_plugin_code_string_length,hardcoded_plugin_count,hardcoded_plugins}=get_plugin_information(),shared_data=shared_page_load_metrics(),{bubble_version,experimental_features,responsive_version,old_responsive_elements}=get_settings(page_id),loadData=copyFullyLoaded({...shared_data,bundle_type:window.bubble_bundle_name},fullyLoadedEvent);(fullyLoadedEvent==null?void 0:fullyLoadedEvent.run_js_size)!=null&&(loadData.run_js_size=fullyLoadedEvent.run_js_size);let data={...loadData,internal_nav_explanation:internal_nav_explanation(),asset_info:get_asset_metrics(),bubble_version,experimental_features,responsive_version,old_responsive_elements,third_party_plugin_count,third_party_plugin_js_execution_time_ms,third_party_plugin_code_string_length,hardcoded_plugin_count,hardcoded_plugins,json_info:window._bubble_page_load_data.json_info,element_counts:window._bubble_page_load_data.element_counts,element_instances_count:element_counts.element_instances.total};window.bubble_is_leanjs!=null&&(data.is_leanjs=window.bubble_is_leanjs,data.shim_modules=window.bubble_shim_modules),send_page_load_performance_metrics(data)}init_btypes();var loadCoordinator=new LoadCoordinator,internal_navigation_events={navigate_to:{target:"NAVIGATE_PRELOADING",action(_ref){let{target_page_id,navigation_cb}=_ref;this.target_page_id=target_page_id,this.navigation_cb=navigation_cb}}},PageStateMachine=class extends StateMachine{constructor(){super(...arguments),this.page_id=void 0,this.target_page_id=void 0,this.navigation_cb=void 0,this.finalize_state_measure=void 0,this.definition={initialState:"WAIT_FOR_DISPLAY_PAGE_CALL",onTransition:(previousState,nextState)=>{var _this$finalize_state_;previousState==="DONE"&&(this.finalize_state_measure=void 0),(_this$finalize_state_=this.finalize_state_measure)==null||_this$finalize_state_.call(this),this.finalize_state_measure=startMeasure(nextState)},states:{WAIT_FOR_DISPLAY_PAGE_CALL:{actions:{onEnter(){make_document_ready()}},events:{display_page_called:{target:"WAIT_FOR_DOCUMENT_READY",action(event){var _window$Lib_post_load,_window5;let{page_id,app}=event;this.page_id=page_id,window.Lib=lib_default;let l=DefaultLib.get();Object.assign(l,create_lib(app,page_id)),lib_default.set_global_lib(l),(_window$Lib_post_load=(_window5=window).Lib_post_load)==null||_window$Lib_post_load.call(_window5),initialize_tests()}}}},WAIT_FOR_DOCUMENT_READY:{actions:{onEnter(){let next=window.dont_call_page_display?"document_is_ready_dont_display_page":"document_is_ready_display_page";u_exports2.WaitFor(window.document_ready_key,this.delayedTransition(next))}},events:{document_is_ready_display_page:{target:"RENDER_PAGE"},document_is_ready_dont_display_page:{target:"DONE"}}},RENDER_PAGE:{actions:{onEnter(){render_start(EPOCHS.load_runmode.name);let page_id=this.page_id,page2;if(page_id&&(page2=appquery_default.get_page_by_name(page_id)),set_webfonts_key(),set_up_debugger(),page2==null)throw new UnexpectedError("Missing page");lib_default.or_throw().element.display(page2),create_slug_watcher(),render_end(),stop_count(),add_popstate_handler(),lib_default.or_throw().element.on_page_done_loading(!1,()=>runmode_page_load_performance_metrics(fully_loaded(),this.page_id))}},events:{always:{target:"WAIT_FOR_USER_OAUTH"}}},WAIT_FOR_USER_OAUTH:{actions:{onEnter(){onload(this.delayedTransition("user_successful_oauth"))}},events:{user_successful_oauth:{target:"START_PAGE_LOAD_WORKFLOWS"}}},START_PAGE_LOAD_WORKFLOWS:{actions:{onEnter(){var _lib$element$get_page;let lib=lib_default.or_throw();lib.workflow.initialize(),(_lib$element$get_page=lib.element.get_page())==null||_lib$element$get_page.message("announce_page_event","PageLoaded"),lib.user.on_logged_in_status(logged_in=>{var _lib$element$get_page2;(_lib$element$get_page2=lib.element.get_page())==null||_lib$element$get_page2.message("announce_page_event",logged_in?"LoggedIn":"LoggedOut")}),lib.user.initialize(),lib.user.on_page_load_for_confirmation_email()}},events:{always:{target:"WAIT_FOR_WEBFONTS"}}},WAIT_FOR_WEBFONTS:{actions:{onEnter(){u_exports2.WaitFor(active_key,fontface_key,this.delayedTransition("webfonts_ready"))}},events:{...internal_navigation_events,webfonts_ready:{target:"LOAD_ELEMENTS"}}},LOAD_ELEMENTS:{actions:{onEnter(){var _u$page_is_loaded;(_u$page_is_loaded=page_is_loaded)==null||_u$page_is_loaded.call(u_exports2),add_bubble_marketing(this.page_id),lib_default.or_throw().element.on_page_done_loading(!1,this.delayedTransition("elements_done_loading"))}},events:{...internal_navigation_events,elements_done_loading:{target:"DONE"}}},DONE:{actions:{onEnter(){let cancel_seo_runner=snapshot_page_when_stable();this.onceExit(cancel_seo_runner)}},events:{...internal_navigation_events}},NAVIGATE_PRELOADING:{actions:{onEnter(){let finished=this.delayedTransition("preloading_finished");if(!this.target_page_id)throw new UnexpectedError("No target page ID set for NAVIGATE_PRELOADING state");let target_page_url=lib_default.or_throw().location.get_page_url(this.target_page_id);fetch(target_page_url,{headers:{Accept:"application/json"}}).then(async response=>{let data=await response.json(),page_js_identifier={id:data.assets.js.find(asset=>asset.endsWith("page.js")),type:AssetLoaderType.URL_LOAD_JS},css_identifier={id:data.assets.css.find(asset=>asset.endsWith("run.css")),type:AssetLoaderType.CSS};await Promise.all([loadCoordinator.loadAsset(page_js_identifier),loadCoordinator.loadAsset(css_identifier)]),lib_default.or_throw().app().json.reset_children(),lib_default.or_throw().app().json.clear_smart_cache(),finished()}).catch(error2=>{throw new UnexpectedError("Error fetching page manifest",error2)})}},events:{...internal_navigation_events,preloading_finished:{target:"NAVIGATE_UNLOADING"}}},NAVIGATE_UNLOADING:{actions:{onEnter(){unload_page(),this.page_id=this.target_page_id,this.navigation_cb&&this.navigation_cb(),this.target_page_id=void 0,this.navigation_cb=void 0}},events:{always:{target:"RENDER_PAGE"}}}}}}};if(typeof window<"u"&&window!==null){let stateMachine=new PageStateMachine;stateMachine.start(),window.display_page=function(app,page_id){let PreloadedAssetIdentifier={id:page_id!=null?page_id:"",type:AssetLoaderType.PRE_LOADED_JS};loadCoordinator.loadAsset(PreloadedAssetIdentifier).then(()=>{stateMachine.transition({type:"display_page_called",app,page_id}),push_initial_browser_state(page_id)})},window.switch_page=function(target_page_id,navigation_cb){let event={type:"navigate_to",target_page_id,navigation_cb};return stateMachine.canTransition(event)?(stateMachine.transition(event),!0):!1}}init_define_process_env();init_shim();init_time();var bv={};bv.message="Bubble status quo as of rolling out this versioning system";bv.link="https://forum.bubble.io/t/important-new-tab-in-editor/27047";function _fix_timezone_offset(a,context){var _context$timezone_off;return a.setHours(a.getHours()-((_context$timezone_off=context==null?void 0:context.timezone_offset)!=null?_context$timezone_off:0)/60)}function to_num2(n){let ret=parseFloat(n);return isFinite(ret)?ret:null}function mk_date2(d){let ret;return d instanceof Date?ret=d:typeof d=="number"?ret=new Date(d):typeof d=="string"?String(parseFloat(d))===d?ret=new Date(parseFloat(d)):ret=new Date(Date.parse(d)):ret=new Date(NaN),isNaN(ret.valueOf())?null:ret}bv.date={plus_seconds(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setSeconds(res.getSeconds()+b),res)},plus_minutes(a,b){let res=new Date(mk_date2(a));if(a===null)return null;{let minutes_to_add=6e4*b;return res.setTime(res.getTime()+minutes_to_add),res}},plus_hours(a,b){let res=new Date(mk_date2(a));if(a===null)return null;{let hours_to_add=36e5*b;return res.setTime(res.getTime()+hours_to_add),res}},plus_days(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setDate(res.getDate()+b),res)},plus_months(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setMonth(res.getMonth()+b),res)},plus_years(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setFullYear(res.getFullYear()+b),res)},change_seconds(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setSeconds(to_num2(b)),res.setMilliseconds(0),res)},change_minutes(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setMinutes(to_num2(b)),res)},change_hours(a,b,properties,_raw3,context){let res=new Date(mk_date2(a));if(_fix_timezone_offset(res,context),a===null)return null;var _context$timezone_off2;return res.setHours(to_num2(b)+((_context$timezone_off2=context==null?void 0:context.timezone_offset)!=null?_context$timezone_off2:0)/60),res},change_date(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setDate(to_num2(b)),res)},change_month(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setMonth(to_num2(b)-1),res)},change_years(a,b){let res=new Date(mk_date2(a));return a===null?null:(res.setFullYear(to_num2(b)),res)},extract_from_date(a,b,properties,_raw3,context){if(a=mk_date2(a),!a)return"";properties.component_to_extract!=="UNIX"&&_fix_timezone_offset(a,context);function getWeek(raw_date){let date=new Date(raw_date.getTime());date.setHours(0,0,0,0),date.setDate(date.getDate()+3-(date.getDay()+6)%7);let week1=new Date(date.getFullYear(),0,4);return 1+Math.round(((date.getTime()-week1.getTime())/864e5-3+(week1.getDay()+6)%7)/7)}switch(properties.component_to_extract){case"minute":return a.getMinutes();case"hour":return a.getHours();case"day":return a.getDay();case"date":return a.getDate();case"week":return getWeek(a);case"month":return a.getMonth()+1;case"year":return a.getYear()+1900;case"UNIX":return a.getTime()}}};register(0,bv);init_define_process_env();init_shim();var bv2={};bv2.message="Changes to date manipulation functions";bv2.link="https://forum.bubble.io/t/changes-to-date-manipulation-functions/27046";bv2.date=1522863076584;register(1,bv2);init_define_process_env();init_shim();var bv3={};bv3.message="Bux fix to the responsive engine";bv3.link="https://forum.bubble.io/t/new-breaking-change-responsive-engine/28927";bv3.date=1525714293007;register(2,bv3);init_define_process_env();init_shim();var import_es_string_replace69=__toESM(require_es_string_replace()),import_web_dom_collections_iterator340=__toESM(require_web_dom_collections_iterator());init_u2();init_elements2();init_element_utils();init_u2();init_property_applications();init_element_eval();var bv4={};bv4.message="Change to custom HTML headers rendering";bv4.link="https://forum.bubble.io/t/new-breaking-change-custom-html-header/29375";bv4.date=1526335265254;bv4.apply_dynamic_properties_text=instance4=>{let canvas=instance4.get_canvas(),stretch=instance4.get_static_property("stretch_to_fit"),cut_off_content=instance4.get_static_property("cut_off_content"),shrink_if_less_high=instance4.get_static_property("shrink_if_less_high"),last_props=null,applied_props=null,last_visible_status=null,regex_for_links2=/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/gim,regex_for_emails2=/([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gim,{apply_css_style:apply_css_style4}=property_applications_default;function replace_links_emails2(txt){if(typeof txt=="string"&&instance4.run_mode()){let apply_link_color2=function(t){let link_color=evaluate_property(instance4,"link_color");return link_color!=null?"[color="+rgb_to_hex(link_color).code+"]"+t+"[/color]":t};var apply_link_color=apply_link_color2;let nofollow=evaluate_property(instance4,"nofollow");txt=txt.replace(regex_for_links2,(str,p1,offset,s)=>{let link;str.indexOf("http")===-1?link="http://"+str:link=str;let r2="[url="+link;return nofollow&&(r2+=" nofollow=true"),r2+="]"+str+"[/url]",apply_link_color2(r2)}),txt=txt.replace(regex_for_emails2,(str,p1,offset,s)=>apply_link_color2("[email="+str+"]"+str+"[/email]"))}return txt}function apply_text2(div2,txt){let recognize_links=instance4.get_static_property("recognize_links");instance4.get_static_property("no_bbcode")?has_bbcode(txt)?(div2.text(txt),apply_css_style4(canvas,{"white-space":"pre-wrap"})):(recognize_links?txt=bbcode_to_html(replace_links_emails2(txt)):txt=bbcode_to_html(txt),div2.html(txt)):(recognize_links&&(txt=replace_links_emails2(txt)),div2.html(bbcode_to_html(txt)))}instance4.autorun(()=>{instance4.state("notify_width");let props={};for(let prop of["text","font_size","padding_vertical","line_height","rotation_angle"])props[prop]=evaluate_property(instance4,prop);if(props.notify_width=instance4.state("notify_width"),instance4.run_mode()||instance4.responsive_mode()){var _instance$element$roo,_instance$element$roo2,_instance$element$roo3;if((_instance$element$roo=instance4.element.root())!=null&&_instance$element$roo.use_responsive_algorithm()){var _props$padding_vertic;canvas[0].style["padding-bottom"]=((_props$padding_vertic=props.padding_vertical)!=null?_props$padding_vertic:0)+"px"}if((_instance$element$roo2=instance4.element.root())!=null&&_instance$element$roo2.use_responsive_algorithm()&&!cut_off_content||!((_instance$element$roo3=instance4.element.root())!=null&&_instance$element$roo3.use_responsive_algorithm())&&stretch){if(JSON.stringify(props)===applied_props)return;if(last_props=props,(instance4.is_visible()||last_visible_status)&&!instance4.is_animating()){let adjust_height2=function(cb){var _last_props$text;if(instance4.is_animating(!0)){cb();return}let is_visible=instance4.is_visible(!0);if(!is_visible&&!last_visible_status){cb();return}last_visible_status=is_visible,((_last_props$text=last_props.text)==null?void 0:_last_props$text.indexOf(" "))===-1&&(canvas[0].style["word-break"]="break-word"),instance4.is_visible()&&(applied_props=JSON.stringify(last_props)),apply_text2(content,last_props.text);let border_margin_dif=canvas.outerHeight()-canvas.height();if(props.rotation_angle!=null&&![0,180].includes(props.rotation_angle)){cb();return}let inner_height2=parseInt(content.css("height").replace("px","")),min_height2=instance4.element.get_height();shrink_if_less_high?instance4.set_height(inner_height2+border_margin_dif):instance4.set_height(Math.max(min_height2,inner_height2+border_margin_dif)),cb()};var adjust_height=adjust_height2;let content=canvas.find(".content");content.length===0&&(content=div("content",canvas));let key=add_layout_resizing_key2();u_exports2.wait_for_updates(()=>adjust_height2(()=>key.turn()))}}else if(instance4.is_visible()){var _canvas$trigger;apply_text2(canvas,props.text),(_canvas$trigger=canvas.trigger)==null||_canvas$trigger.call(canvas,"update.dot")}}else{var _canvas$trigger2;apply_text2(canvas,props.text),(_canvas$trigger2=canvas.trigger)==null||_canvas$trigger2.call(canvas,"update.dot"),(void 0)(instance4)}})};register(3,bv4);init_define_process_env();init_shim();init_special_keys();init_core_ds_db_ops_utilities();init_b_location();var bv5={};bv5.message="Invisible text elements now have zero height.";bv5.link="https://forum.bubble.io/t/breaking-change-invisible-text-elements-now-collapse/38334";bv5.date=1537371411459;bv5.resolve_constraints=constraints=>{let processed_constraints=[],object2=constraints!=null?constraints:[];for(let idx in object2){let entry=object2[idx];if(entry){if(entry.constraint_type||entry.key===UNIQUE_ID){if(entry.key===UNIQUE_ID){var _entry$constraint_typ;(_entry$constraint_typ=entry.constraint_type)!=null||(entry.constraint_type="equals")}if(["in","not in"].includes(entry.constraint_type)){var _entry$value$all,_entry$value,_entry$value$all2,_entry$value2;let value=Array.isArray(entry.value)?entry.value:(_entry$value$all=(_entry$value=entry.value)==null||(_entry$value$all2=(_entry$value2=_entry$value).all)==null?void 0:_entry$value$all2.call(_entry$value2))!=null?_entry$value$all:[];processed_constraints.push({key:entry.key,constraint_type:entry.constraint_type,value})}else if(["range_contains","range_contained_by","range_overlaps","range_greater_than","range_less_than"].includes(entry.constraint_type)){var _entry$value$all3,_entry$value3,_entry$value3$all,_entry$value4;let value=Array.isArray(entry.value)?entry.value:(_entry$value$all3=(_entry$value3=entry.value)==null||(_entry$value3$all=(_entry$value4=_entry$value3).all)==null?void 0:_entry$value3$all.call(_entry$value4))!=null?_entry$value$all3:[];value.length&&processed_constraints.push({key:entry.key,constraint_type:entry.constraint_type,value})}else constraints_without_values.includes(entry.constraint_type)||entry.constraint_type!=="geographic_search"&&entry.value!=null&&entry.value!==""?processed_constraints.push(entry):entry.constraint_type==="geographic_search"&&entry.value.origin_address!=null&&entry.value.origin_address!==""&&(entry.value.origin_address=from_address(entry.value.origin_address),processed_constraints.push(entry))}entry.key===ADVANCED_SEARCH_CONSTRAINT&&processed_constraints.push(entry)}}return processed_constraints};register(4,bv5);init_define_process_env();init_shim();var bv6={};bv6.message="Null parameters not dropped by default in search/filter.";bv6.link="https://forum.bubble.io/t/new-feature-breaking-change-null-search-filter-parameters-no-longer-dropped-by-default/40545";bv6.date=1537371411459;bv6.fileupload_too_large=size=>size>50*1e3*1e3;register(5,bv6);init_define_process_env();init_shim();init_u2();init_special_keys();init_core_ds_db_ops_utilities();init_b_location();var bv7={};bv7.message="File Upload element now allows files of up to 5 GB, rather than the old limit of 50 MB. File requests now redirect to download directly from amazon, rather than proxying the files.";bv7.link="https://forum.bubble.io/t/new-feature-beta-large-file-uploads/84395";bv7.date=158577093e4;function handle_null_constraints(constraints){if(!constraints)return constraints;let output_constraints={},object2=constraints!=null?constraints:[];for(let index in object2){let entry=object2[index];if(entry){let new_entry=extend({},entry);[null,""].includes(new_entry.value)&&(new_entry.constraint_type==="equals"&&(new_entry.constraint_type="is_empty"),constraints_without_values.includes(new_entry.constraint_type)||(new_entry.constraint_type="return_empty_set")),new_entry.constraint_type==="geographic_search"&&!new_entry.value.origin_address&&(new_entry.constraint_type="return_empty_set"),output_constraints[index]=new_entry}}return output_constraints}bv7.resolve_constraints=(constraints,null_not_dropped)=>{var _constraints;null_not_dropped&&(constraints=handle_null_constraints(constraints));let processed_constraints=[],object2=(_constraints=constraints)!=null?_constraints:[];for(let idx in object2){let entry=object2[idx];if(entry!=null){if(entry.constraint_type||entry.key===UNIQUE_ID){if(entry.key===UNIQUE_ID){var _entry$constraint_typ;(_entry$constraint_typ=entry.constraint_type)!=null||(entry.constraint_type="equals")}if(["in","not in"].includes(entry.constraint_type)){var _entry$value$all,_entry$value,_entry$value$all2,_entry$value2;let value=Array.isArray(entry.value)?entry.value:(_entry$value$all=(_entry$value=entry.value)==null||(_entry$value$all2=(_entry$value2=_entry$value).all)==null?void 0:_entry$value$all2.call(_entry$value2))!=null?_entry$value$all:[];processed_constraints.push(extend({},entry,{value}))}else if(["range_contains","range_contained_by","range_overlaps","range_greater_than","range_less_than"].includes(entry.constraint_type)){var _entry$value$all3,_entry$value3,_entry$value3$all,_entry$value4;let value=Array.isArray(entry.value)?entry.value:(_entry$value$all3=(_entry$value3=entry.value)==null||(_entry$value3$all=(_entry$value4=_entry$value3).all)==null?void 0:_entry$value3$all.call(_entry$value4))!=null?_entry$value$all3:[];value.length&&processed_constraints.push(extend({},entry,{value}))}else constraints_without_values.includes(entry.constraint_type)?processed_constraints.push({key:entry.key,constraint_type:entry.constraint_type,self:entry.self}):entry.constraint_type!=="geographic_search"&&entry.value!=null&&entry.value!==""?processed_constraints.push(entry):entry.constraint_type==="geographic_search"&&entry.value.origin_address!=null&&entry.value.origin_address!==""?(entry.value.origin_address=from_address(entry.value.origin_address),processed_constraints.push(entry)):entry.constraint_type==="return_empty_set"&&processed_constraints.push(entry)}entry.key===ADVANCED_SEARCH_CONSTRAINT&&processed_constraints.push(entry)}}return processed_constraints};register(6,bv7);init_define_process_env();init_shim();var bv8={};bv8.message='"Ignore empty constraints" is now applied to empty lists used as the value of "in" and "not in" constraints.';bv8.link="https://forum.bubble.io/t/new-feature-changing-how-constraints-work-with-empty-lists/93286";bv8.date=159052358e4;register(7,bv8);init_define_process_env();init_shim();var bv9={};bv9.message="Mutliline Inputs with stretched to fit content selected now default to one row instead of two";bv9.link="https://forum.bubble.io/t/new-feature-version-8-multiline-input-stretched-defaults-to-one-line/105091";bv9.date=159672112e4;register(8,bv9);init_define_process_env();init_shim();var bv10={};bv10.message="Results of step (...) of a Change Thing action do not store fields and values that would have been changed by the action";bv10.link="https://forum.bubble.io/t/new-feature-version-9-update-thing-actions-that-did-not-change-a-thing-dont-store-updated-fields-in-results-of-step-thing/113607";bv10.date=1601129650137;register(9,bv10);init_define_process_env();init_shim();var bv11={};bv11.message="Text elements now consistently display leading whitespace";bv11.link="https://forum.bubble.io/t/new-feature-breaking-change-text-elements-always-handle-leading-whitespace/122509";bv11.date=1605895717933;register(10,bv11);init_define_process_env();init_shim();var bv12={};bv12.message="Workflows with consecutive database update actions (e.g. create a new thing, update a thing, delete a thing) are batched together.";bv12.link="https://forum.bubble.io/t/new-feature-workflow-performance-improvements/127002/";bv12.date=16109568e5;register(11,bv12);init_define_process_env();init_shim();init_auth();var bv13={};bv13.message="Inputs with a number content format now require an initial content of type number, not text.";bv13.link="https://forum.bubble.io/t/breaking-change-inputs-with-a-number-format-now-take-a-number-as-initial-content/139711";bv13.date=1614958909e3;bv13.NO_SUCH_USER=NO_SUCH_USER;bv13.WRONG_PASSWORD=WRONG_PASSWORD;bv13.wrong_password_msg="Sorry, that's not the right password";bv13.throw_on_failed_pwd_reset=!0;register(12,bv13);init_define_process_env();init_shim();var bv14={};bv14.message="Only show one message on login failure, and silently fail on password reset for non-existent email";bv14.link="https://forum.bubble.io/t/breaking-change-login-failure-messages/151087";bv14.date=1620413682153;register(13,bv14);init_define_process_env();init_shim();var bv15={};bv15.message='Fix amounts used by zero-decimal currencies for Stripe actions "Create an invoice item", "Adjust a user balance", "Create a Stripe coupon", "Create payout" and "Transfer to seller"';bv15.link="https://forum.bubble.io/t/announcements-breaking-version-14-fix-zero-decimal-currency-amounts-for-some-stripe-actions/156627";bv15.date=1624281552106;register(14,bv15);init_define_process_env();init_shim();var bv16={};bv16.message="Fix the way we store conditions to always respect the order as list length grows or condition moved up/down";bv16.link="https://forum.bubble.io/t/announcements-breaking-version-15-fix-the-way-we-store-conditions-to-always-respect-the-order-as-list-length-grows-or-condition-moved-up-down/166467";bv16.date=1629989931728;register(15,bv16);init_define_process_env();init_shim();var bv17={};bv17.message="Dropdowns are now cross-browser compatible";bv17.link="https://forum.bubble.io/t/breaking-change-dropdown-browser-compatibility/207363";bv17.date=1652972216e3;register(16,bv17);init_define_process_env();init_shim();var bv18={};bv18.message="Date parsing now consistently uses client timezone rather than UTC serverside";bv18.link="https://forum.bubble.io/t/breaking-change-date-parsing-on-the-server/210557";bv18.date=1654802861961;register(17,bv18);init_define_process_env();init_shim();init_runmode();var bv19={};bv19.message="Date/Time Picker and Picture Uploader padding now consistent with other input elements + Increase spacing between date/time inputs in Date/Time Picker";bv19.link="https://forum.bubble.io/t/breaking-change-small-ui-updates-for-date-time-picker-and-picture-uploader/227112";bv19.date=1664383262e3;bv19.MAX_POPUP_ZINDEX=2002+1;register(18,bv19);init_define_process_env();init_shim();var bv20={};bv20.message="Popups now have a z-index assigned based on order being shown. Date/time input uses selected font in calendar buttons";bv20.link="https://forum.bubble.io/t/breaking-change-popup-ordering-date-picker-font/232977";bv20.date=1668709780446;register(19,bv20);init_define_process_env();init_shim();var bv21={};bv21.message=`You can now change the timezone that is used at input to generate a new absolute time that is stored in your database (through Date-Time Picker or Input). Group Focus is now positioned relative to the reference element including padding and border, rather than overlapping with padding as it did previously -- no change will be observed if the reference element has no padding.

Note: the experimental feature "Overriding timezones more broadly" will be deprecated with this version.`;bv21.link="https://forum.bubble.io/t/breaking-change-overriding-timezones-group-focus-element-positioning/235726";bv21.date=167026396e4;register(20,bv21);init_define_process_env();init_shim();var bv22={};bv22.message="This feature enables a new experimental rendering pipeline which more optimally renders any elements you have on the page. It does so by precomputing a lot of the properties on the server beforehand, and shipping a static CSS file to the client to avoid repeated work";bv22.link="https://forum.bubble.io/t/upgrade-to-bubble-version-21-improved-runtime-performance/240651";bv22.date=1673288443e3;register(21,bv22);init_define_process_env();init_shim();var bv23={};bv23.message="Adds a new section for \u201CAdvanced options\u201D in settings to enable more advanced timezones overriding features. Optionally transitions over users who have had these features toggled on previously as part of the experimental feature.";bv23.link="https://forum.bubble.io/t/new-feature-advanced-options-including-advanced-timezone-controls/258429";bv23.date=1681935138e3;register(22,bv23);init_define_process_env();init_shim();var bv24={};bv24.message="Bug fix for permissions on server side workflows";bv24.link="https://forum.bubble.io/t/upgrade-to-bubble-version-23-privacy-rules-tweak/264611";bv24.date=1684949231611;register(23,bv24);init_define_process_env();init_shim();var bv25={};bv25.message='Bug fix for correctly returning the empty status in dynamic expressions for API calls that return structs (i.e. "<API return value> is empty")';bv25.link="https://forum.bubble.io/t/upgrade-to-bubble-version-24-correctly-get-is-empty-status-for-api-call-results/271159";bv25.date=168798975e4;register(24,bv25);init_define_process_env();init_shim();var bv26={};bv26.message="Giving all external API calls a default user agent if they don't already have one set";bv26.link="https://forum.bubble.io/t/upgrade-to-bubble-version-25-giving-all-external-api-calls-a-default-user-agent-if-they-dont-already-have-one-set/271309";bv26.date=1688634e6;register(25,bv26);init_define_process_env();init_shim();var bv27={};bv27.message="Conditional statement from a style will now be applied over a style override";bv27.link="https://forum.bubble.io/t/upgrade-to-bubble-version-26-adjustment-to-style-overrides-behavior-with-style-conditionals/283323";bv27.date=1694714312e3;register(26,bv27);init_define_process_env();init_shim();var bv28={};bv28.message="Data Triggers initiated by autobinding inherit timezone information from the browser";bv28.link="https://forum.bubble.io/t/upgrade-to-bubble-version-27-data-triggers-initiated-by-autobinding-inherit-timezone-information-from-the-browser/289117";bv28.date=1697740086364;register(27,bv28);init_define_process_env();init_shim();var bv29={};bv29.message="Specify JSON content type when relevant in API Connector calls and rounding fix for the formatted as operator";bv29.link="https://forum.bubble.io/t/upgrade-to-bubble-version-28-specify-json-content-type-when-relevant-in-api-connector-calls-and-rounding-fix-for-the-formatted-as-operator/295773";bv29.date=17014392e5;register(28,bv29);init_define_process_env();init_shim();var bv30={};bv30.message="Fix for file uploader getting disabled while loading and improve repeating group evaluation behavior in workflows";bv30.link="https://forum.bubble.io/t/upgrade-to-bubble-version-29-file-uploader-and-clear-list-fixes/307875";bv30.date=1708100839e3;register(29,bv30);})();
/*! VelocityJS.org (1.4.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
 * @license MIT */
/*! Bundled license information:

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

lodash-es/lodash.js:
  (**
   * @license
   * Lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="es" -o ./`
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   *)

moment/moment.js:
  (*! moment.js *)
  (*! version : 2.30.1 *)
  (*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
  (*! license : MIT *)
  (*! momentjs.com *)

punycode/punycode.js:
  (*! https://mths.be/punycode v1.3.2 by @mathias *)

@noble/ciphers/esm/utils.js:
  (*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)

@noble/hashes/esm/utils.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)

es6-promise/dist/es6-promise.js:
  (*!
   * @overview es6-promise - a tiny implementation of Promises/A+.
   * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
   * @license   Licensed under MIT license
   *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
   * @version   v4.2.8+1e68dce6
   *)
*/
window._bubble_page_load_data.js_execution_timings.module_execution_timings.push(Date.now()-window._bubble_page_load_data.js_execution_timings.module_start_execution);