@coasys/ad4m-connect 0.8.0-fix

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web.js ADDED
@@ -0,0 +1,1701 @@
1
+ var Af=Object.defineProperty;var If=Object.getOwnPropertyDescriptor;var Pe=(r,e,t,n)=>{for(var i=n>1?void 0:n?If(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Af(e,t,i),i};var ye=(r,e,t)=>new Promise((n,i)=>{var a=u=>{try{s(t.next(u))}catch(l){i(l)}},o=u=>{try{s(t.throw(u))}catch(l){i(l)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);s((t=t.apply(r,e)).next())});var Ai=window,Ii=Ai.ShadowRoot&&(Ai.ShadyCSS===void 0||Ai.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,to=Symbol(),Sc=new WeakMap,Dn=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==to)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ii&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=Sc.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Sc.set(t,e))}return e}toString(){return this.cssText}},wc=r=>new Dn(typeof r=="string"?r:r+"",void 0,to),ro=(r,...e)=>{let t=r.length===1?r[0]:e.reduce((n,i,a)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[a+1],r[0]);return new Dn(t,r,to)},no=(r,e)=>{Ii?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{let n=document.createElement("style"),i=Ai.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)})},ki=Ii?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return wc(t)})(r):r;var io,Di=window,_c=Di.trustedTypes,kf=_c?_c.emptyScript:"",Ec=Di.reactiveElementPolyfillSupport,oo={toAttribute(r,e){switch(e){case Boolean:r=r?kf:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},xc=(r,e)=>e!==r&&(e==e||r==r),ao={attribute:!0,type:String,converter:oo,reflect:!1,hasChanged:xc},so="finalized",kt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((t,n)=>{let i=this._$Ep(n,t);i!==void 0&&(this._$Ev.set(i,n),e.push(i))}),e}static createProperty(e,t=ao){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){let n=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){let a=this[e];this[t]=i,this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||ao}static finalize(){if(this.hasOwnProperty(so))return!1;this[so]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(let i of n)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)t.unshift(ki(i))}else e!==void 0&&t.push(ki(e));return t}static _$Ep(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;let t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return no(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=ao){var i;let a=this.constructor._$Ep(e,n);if(a!==void 0&&n.reflect===!0){let o=(((i=n.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?n.converter:oo).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(a):this.setAttribute(a,o),this._$El=null}}_$AK(e,t){var n;let i=this.constructor,a=i._$Ev.get(e);if(a!==void 0&&this._$El!==a){let o=i.getPropertyOptions(a),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:oo;this._$El=a,this[a]=s.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||xc)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,a)=>this[a]=i),this._$Ei=void 0);let t=!1,n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var a;return(a=i.hostUpdate)===null||a===void 0?void 0:a.call(i)}),this.update(n)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostUpdated)===null||i===void 0?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};kt[so]=!0,kt.elementProperties=new Map,kt.elementStyles=[],kt.shadowRootOptions={mode:"open"},Ec?.({ReactiveElement:kt}),((io=Di.reactiveElementVersions)!==null&&io!==void 0?io:Di.reactiveElementVersions=[]).push("1.6.3");var co,Ni=window,Hr=Ni.trustedTypes,Oc=Hr?Hr.createPolicy("lit-html",{createHTML:r=>r}):void 0,lo="$lit$",qt=`lit$${(Math.random()+"").slice(9)}$`,Pc="?"+qt,Df=`<${Pc}>`,dr=document,Pn=()=>dr.createComment(""),Rn=r=>r===null||typeof r!="object"&&typeof r!="function",Rc=Array.isArray,Nf=r=>Rc(r)||typeof r?.[Symbol.iterator]=="function",uo=`[
2
+ \f\r]`,Nn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tc=/-->/g,Ac=/>/g,fr=RegExp(`>|${uo}(?:([^\\s"'>=/]+)(${uo}*=${uo}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ic=/'/g,kc=/"/g,Lc=/^(?:script|style|textarea|title)$/i,Fc=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Y=Fc(1),th=Fc(2),hr=Symbol.for("lit-noChange"),Ae=Symbol.for("lit-nothing"),Dc=new WeakMap,pr=dr.createTreeWalker(dr,129,null,!1);function $c(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oc!==void 0?Oc.createHTML(e):e}var Pf=(r,e)=>{let t=r.length-1,n=[],i,a=e===2?"<svg>":"",o=Nn;for(let s=0;s<t;s++){let u=r[s],l,f,p=-1,h=0;for(;h<u.length&&(o.lastIndex=h,f=o.exec(u),f!==null);)h=o.lastIndex,o===Nn?f[1]==="!--"?o=Tc:f[1]!==void 0?o=Ac:f[2]!==void 0?(Lc.test(f[2])&&(i=RegExp("</"+f[2],"g")),o=fr):f[3]!==void 0&&(o=fr):o===fr?f[0]===">"?(o=i??Nn,p=-1):f[1]===void 0?p=-2:(p=o.lastIndex-f[2].length,l=f[1],o=f[3]===void 0?fr:f[3]==='"'?kc:Ic):o===kc||o===Ic?o=fr:o===Tc||o===Ac?o=Nn:(o=fr,i=void 0);let d=o===fr&&r[s+1].startsWith("/>")?" ":"";a+=o===Nn?u+Df:p>=0?(n.push(l),u.slice(0,p)+lo+u.slice(p)+qt+d):u+qt+(p===-2?(n.push(void 0),s):d)}return[$c(r,a+(r[t]||"<?>")+(e===2?"</svg>":"")),n]},mr=class{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let a=0,o=0,s=e.length-1,u=this.parts,[l,f]=Pf(e,t);if(this.el=mr.createElement(l,n),pr.currentNode=this.el.content,t===2){let p=this.el.content,h=p.firstChild;h.remove(),p.append(...h.childNodes)}for(;(i=pr.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes()){let p=[];for(let h of i.getAttributeNames())if(h.endsWith(lo)||h.startsWith(qt)){let d=f[o++];if(p.push(h),d!==void 0){let y=i.getAttribute(d.toLowerCase()+lo).split(qt),g=/([.?@])?(.*)/.exec(d);u.push({type:1,index:a,name:g[2],strings:y,ctor:g[1]==="."?po:g[1]==="?"?ho:g[1]==="@"?mo:Yr})}else u.push({type:6,index:a})}for(let h of p)i.removeAttribute(h)}if(Lc.test(i.tagName)){let p=i.textContent.split(qt),h=p.length-1;if(h>0){i.textContent=Hr?Hr.emptyScript:"";for(let d=0;d<h;d++)i.append(p[d],Pn()),pr.nextNode(),u.push({type:2,index:++a});i.append(p[h],Pn())}}}else if(i.nodeType===8)if(i.data===Pc)u.push({type:2,index:a});else{let p=-1;for(;(p=i.data.indexOf(qt,p+1))!==-1;)u.push({type:7,index:a}),p+=qt.length-1}a++}}static createElement(e,t){let n=dr.createElement("template");return n.innerHTML=e,n}};function Jr(r,e,t=r,n){var i,a,o,s;if(e===hr)return e;let u=n!==void 0?(i=t._$Co)===null||i===void 0?void 0:i[n]:t._$Cl,l=Rn(e)?void 0:e._$litDirective$;return u?.constructor!==l&&((a=u?._$AO)===null||a===void 0||a.call(u,!1),l===void 0?u=void 0:(u=new l(r),u._$AT(r,t,n)),n!==void 0?((o=(s=t)._$Co)!==null&&o!==void 0?o:s._$Co=[])[n]=u:t._$Cl=u),u!==void 0&&(e=Jr(r,u._$AS(r,e.values),u,n)),e}var fo=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;let{el:{content:n},parts:i}=this._$AD,a=((t=e?.creationScope)!==null&&t!==void 0?t:dr).importNode(n,!0);pr.currentNode=a;let o=pr.nextNode(),s=0,u=0,l=i[0];for(;l!==void 0;){if(s===l.index){let f;l.type===2?f=new yr(o,o.nextSibling,this,e):l.type===1?f=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(f=new yo(o,this,e)),this._$AV.push(f),l=i[++u]}s!==l?.index&&(o=pr.nextNode(),s++)}return pr.currentNode=dr,a}v(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},yr=class{constructor(e,t,n,i){var a;this.type=2,this._$AH=Ae,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cp=(a=i?.isConnected)===null||a===void 0||a}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Jr(this,e,t),Rn(e)?e===Ae||e==null||e===""?(this._$AH!==Ae&&this._$AR(),this._$AH=Ae):e!==this._$AH&&e!==hr&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Nf(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Ae&&Rn(this._$AH)?this._$AA.nextSibling.data=e:this.$(dr.createTextNode(e)),this._$AH=e}g(e){var t;let{values:n,_$litType$:i}=e,a=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=mr.createElement($c(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===a)this._$AH.v(n);else{let o=new fo(a,this),s=o.u(this.options);o.v(n),this.$(s),this._$AH=o}}_$AC(e){let t=Dc.get(e.strings);return t===void 0&&Dc.set(e.strings,t=new mr(e)),t}T(e){Rc(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,i=0;for(let a of e)i===t.length?t.push(n=new yr(this.k(Pn()),this.k(Pn()),this,this.options)):n=t[i],n._$AI(a),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){let i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},Yr=class{constructor(e,t,n,i,a){this.type=1,this._$AH=Ae,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=a,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Ae}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){let a=this.strings,o=!1;if(a===void 0)e=Jr(this,e,t,0),o=!Rn(e)||e!==this._$AH&&e!==hr,o&&(this._$AH=e);else{let s=e,u,l;for(e=a[0],u=0;u<a.length-1;u++)l=Jr(this,s[n+u],t,u),l===hr&&(l=this._$AH[u]),o||(o=!Rn(l)||l!==this._$AH[u]),l===Ae?e=Ae:e!==Ae&&(e+=(l??"")+a[u+1]),this._$AH[u]=l}o&&!i&&this.j(e)}j(e){e===Ae?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},po=class extends Yr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ae?void 0:e}},Rf=Hr?Hr.emptyScript:"",ho=class extends Yr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Ae?this.element.setAttribute(this.name,Rf):this.element.removeAttribute(this.name)}},mo=class extends Yr{constructor(e,t,n,i,a){super(e,t,n,i,a),this.type=5}_$AI(e,t=this){var n;if((e=(n=Jr(this,e,t,0))!==null&&n!==void 0?n:Ae)===hr)return;let i=this._$AH,a=e===Ae&&i!==Ae||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==Ae&&(i===Ae||a);a&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}},yo=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Jr(this,e)}};var Nc=Ni.litHtmlPolyfillSupport;Nc?.(mr,yr),((co=Ni.litHtmlVersions)!==null&&co!==void 0?co:Ni.litHtmlVersions=[]).push("2.8.0");var Mc=(r,e,t)=>{var n,i;let a=(n=t?.renderBefore)!==null&&n!==void 0?n:e,o=a._$litPart$;if(o===void 0){let s=(i=t?.renderBefore)!==null&&i!==void 0?i:null;a._$litPart$=o=new yr(e.insertBefore(Pn(),s),s,void 0,t??{})}return o._$AI(r),o};var go,vo;var Bt=class extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;let n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Mc(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return hr}};Bt.finalized=!0,Bt._$litElement$=!0,(go=globalThis.litElementHydrateSupport)===null||go===void 0||go.call(globalThis,{LitElement:Bt});var jc=globalThis.litElementPolyfillSupport;jc?.({LitElement:Bt});((vo=globalThis.litElementVersions)!==null&&vo!==void 0?vo:globalThis.litElementVersions=[]).push("3.3.3");var Uc=r=>e=>typeof e=="function"?((t,n)=>(customElements.define(t,n),n))(r,e):((t,n)=>{let{kind:i,elements:a}=n;return{kind:i,elements:a,finisher(o){customElements.define(t,o)}}})(r,e);var Lf=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},Ff=(r,e,t)=>{e.constructor.createProperty(t,r)};function ft(r){return(e,t)=>t!==void 0?Ff(r,e,t):Lf(r,e)}function Vt(r){return ft({...r,state:!0})}var bo,Ah=((bo=window.HTMLSlotElement)===null||bo===void 0?void 0:bo.prototype.assignedElements)!=null?(r,e)=>r.assignedElements(e):(r,e)=>r.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);import{ZBarSymbolType as X,ZBarConfigType as Bc,scanRGBABuffer as $f,getDefaultScanner as Mf}from"https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.9.15/dist/main.js";function jf(r,e,t,n){return new(t||(t=Promise))(function(i,a){function o(l){try{u(n.next(l))}catch(f){a(f)}}function s(l){try{u(n.throw(l))}catch(f){a(f)}}function u(l){var f;l.done?i(l.value):(f=l.value,f instanceof t?f:new t(function(p){p(f)})).then(o,s)}u((n=n.apply(r,e||[])).next())})}var D=class{constructor(e,t=Bc.ZBAR_CFG_ENABLE,n=1){this.symbolType=e,this.configType=t,this.number=n,this.configSteps=[this]}static register(e,t,n=t.symbolType){return D.formatsToConfigs[e]=t,D.typesToFormats[n]=D.typesToFormats[n]||e,t}static formats(){return Object.keys(D.formatsToConfigs)}static toFormat(e){return D.typesToFormats[e]}static configure(e,t){var n;(n=D.formatsToConfigs[t])===null||n===void 0||n.configSteps.forEach(i=>e.setConfig(i.symbolType,i.configType,i.number))}add(e){return this.configSteps.push(e),this}},qc;D.formatsToConfigs={},D.typesToFormats={},D.register("codabar",new D(X.ZBAR_CODABAR)),D.register("code_39",new D(X.ZBAR_CODE39)),D.register("code_93",new D(X.ZBAR_CODE93)),D.register("code_128",new D(X.ZBAR_CODE128)),D.register("databar",new D(X.ZBAR_DATABAR)),D.register("databar_exp",new D(X.ZBAR_DATABAR_EXP)),D.register("ean_2",new D(X.ZBAR_EAN2)),D.register("ean_5",new D(X.ZBAR_EAN5)),D.register("ean_8",new D(X.ZBAR_EAN8)),D.register("ean_13",new D(X.ZBAR_EAN13)),D.register("ean_13+2",new D(X.ZBAR_EAN13)).add(new D(X.ZBAR_EAN2)),D.register("ean_13+5",new D(X.ZBAR_EAN13)).add(new D(X.ZBAR_EAN5)),D.register("isbn_10",new D(X.ZBAR_ISBN10)).add(new D(X.ZBAR_EAN13)),D.register("isbn_13",new D(X.ZBAR_ISBN13)).add(new D(X.ZBAR_EAN13)),D.register("isbn_13+2",new D(X.ZBAR_ISBN13)).add(new D(X.ZBAR_EAN13)).add(new D(X.ZBAR_EAN2)),D.register("isbn_13+5",new D(X.ZBAR_ISBN13)).add(new D(X.ZBAR_EAN13)).add(new D(X.ZBAR_EAN5)),D.register("itf",new D(X.ZBAR_I25)),D.register("qr_code",new D(X.ZBAR_QRCODE)),D.register("sq_code",new D(X.ZBAR_SQCODE)),D.register("upc_a",new D(X.ZBAR_UPCA)).add(new D(X.ZBAR_EAN13)),D.register("upc_e",new D(X.ZBAR_UPCE)).add(new D(X.ZBAR_EAN13)),function(r){r[r.UNKNOWN=-1]="UNKNOWN",r[r.UPRIGHT=0]="UPRIGHT",r[r.ROTATED_RIGHT=1]="ROTATED_RIGHT",r[r.UPSIDE_DOWN=2]="UPSIDE_DOWN",r[r.ROTATED_LEFT=3]="ROTATED_LEFT"}(qc||(qc={}));var Co=class{},Uf=(()=>{try{return new OffscreenCanvas(1,1).getContext("2d")instanceof OffscreenCanvasRenderingContext2D}catch{return!1}})(),Qt=class{constructor(e={}){if(e.formats!==void 0){if(!Array.isArray(e.formats)||!e.formats.length)throw new TypeError(`Barcode formats should be a non-empty array of strings but are: ${JSON.stringify(e)}`);let t=e.formats.filter(n=>!D.formats().includes(n));if(t.length)throw new TypeError(`Unsupported barcode format(s): ${t.join(", ")}`)}this.formats=e.formats||D.formats(),this.zbarConfig=e.zbar||new Co}static getSupportedFormats(){return Promise.resolve(D.formats())}detect(e){if(!Qt.isImageBitmapSource(e))throw new TypeError("BarcodeDetector.detect() argument is not an ImageBitmapSource");let t=Qt.intrinsicDimensions(e);if(t.width===0||t.height===0)return Promise.resolve([]);try{return Promise.all([this.toImageData(e),this.getScanner()]).then(n=>{let i=n[0],a=n[1];return this.zbarConfig.enableCache!==void 0&&a.enableCache(this.zbarConfig.enableCache),$f(i.data,i.width,i.height,a)}).then(n=>n.map(i=>this.toBarcodeDetectorResult(i)))}catch(n){return Promise.reject(n)}}getScanner(){return new Promise((e,t)=>jf(this,void 0,void 0,function*(){if(!this.scanner){let n=yield Mf();this.formats.length>0&&(n.setConfig(X.ZBAR_NONE,Bc.ZBAR_CFG_ENABLE,0),this.formats.forEach(i=>D.configure(n,i))),this.scanner=n}e(this.scanner)}))}toImageData(e){let t=n=>{let i=Qt.intrinsicDimensions(n);this.canvas&&this.canvas.width===i.width&&this.canvas.height===i.height||(this.canvas=function(s,u){if(Uf)return new OffscreenCanvas(s,u);{let l=document.createElement("canvas");return l.width=s,l.height=u,l}}(i.width,i.height));let a=this.canvas,o=a.getContext("2d");return o.drawImage(n,0,0),o.getImageData(0,0,a.width,a.height)};if(e instanceof ImageData)return Promise.resolve(e);if(e instanceof Blob){let n=document.createElement("img");return n.src=URL.createObjectURL(e),n.decode().then(()=>t(n)).finally(()=>URL.revokeObjectURL(n.src))}return e instanceof CanvasRenderingContext2D?Promise.resolve(e.getImageData(0,0,e.canvas.width,e.canvas.height)):Promise.resolve(t(e))}toBarcodeDetectorResult(e){let t={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};return e.points.forEach(n=>{t.minX=Math.min(t.minX,n.x),t.maxX=Math.max(t.maxX,n.x),t.minY=Math.min(t.minY,n.y),t.maxY=Math.max(t.maxY,n.y)}),{format:D.toFormat(e.type),rawValue:e.decode(this.zbarConfig.encoding),orientation:e.orientation,quality:e.quality,boundingBox:DOMRectReadOnly.fromRect({x:t.minX,y:t.minY,width:t.maxX-t.minX,height:t.maxY-t.minY}),cornerPoints:[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}]}}static isImageBitmapSource(e){return e instanceof HTMLImageElement||e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof Blob||e instanceof ImageData||e instanceof CanvasRenderingContext2D||e instanceof ImageBitmap||e&&e.width==0||e&&e.height==0}static intrinsicDimensions(e){return{width:Number(e.naturalWidth||e.videoWidth||e.width),height:Number(e.naturalHeight||e.videoHeight||e.height)}}};var So=function(r,e){return So=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},So(r,e)};function ge(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");So(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var m=function(){return m=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(this,arguments)};function _t(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}function pt(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(f){try{l(n.next(f))}catch(p){o(p)}}function u(f){try{l(n.throw(f))}catch(p){o(p)}}function l(f){f.done?a(f.value):i(f.value).then(s,u)}l((n=n.apply(r,e||[])).next())})}function dt(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(f){return u([l,f])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(t=0)),t;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1],a=l;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(l);break}a[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(f){l=[6,f],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Wt(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var wo="Invariant Violation",Vc=Object.setPrototypeOf,qf=Vc===void 0?function(r,e){return r.__proto__=e,r}:Vc,U=function(r){ge(e,r);function e(t){t===void 0&&(t=wo);var n=r.call(this,typeof t=="number"?wo+": "+t+" (see https://github.com/apollographql/invariant-packages)":t)||this;return n.framesToPop=1,n.name=wo,qf(n,e.prototype),n}return e}(Error);function T(r,e){if(!r)throw new U(e)}var Ri=["debug","log","warn","error","silent"],_o=Ri.indexOf("log");function Pi(r){return function(){if(Ri.indexOf(r)>=_o){var e=console[r]||console.log;return e.apply(console,arguments)}}}(function(r){r.debug=Pi("debug"),r.log=Pi("log"),r.warn=Pi("warn"),r.error=Pi("error")})(T||(T={}));function Qc(r){var e=Ri[_o];return _o=Math.max(0,Ri.indexOf(r)),e}function Ie(r){try{return r()}catch{}}var Li=Ie(function(){return globalThis})||Ie(function(){return window})||Ie(function(){return self})||Ie(function(){return global})||Ie(function(){return Ie.constructor("return this")()});var Wc="__",Gc=[Wc,Wc].join("DEV");function Bf(){try{return Boolean(__DEV__)}catch{return Object.defineProperty(Li,Gc,{value:Ie(function(){return"production"})!=="production",enumerable:!1,configurable:!0,writable:!0}),Li[Gc]}}var gr=Bf();function Gt(r){try{return r()}catch{}}var Eo=Gt(function(){return globalThis})||Gt(function(){return window})||Gt(function(){return self})||Gt(function(){return global})||Gt(function(){return Gt.constructor("return this")()}),xo=!1;function Vf(){Eo&&!Gt(function(){return"production"})&&!Gt(function(){return process})&&(Object.defineProperty(Eo,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),xo=!0)}Vf();function Oo(){xo&&(delete Eo.process,xo=!1)}var r2=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",n2=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator",Kc=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";var we=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function To(r,e){var t=Boolean(r);if(!t)throw new Error(e??"Unexpected invariant triggered.")}var Qf=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Fn=Qf;function Fi(r){var e=r.prototype.toJSON;typeof e=="function"||To(0),r.prototype.inspect=e,Fn&&(r.prototype[Fn]=e)}var zc=function(){function r(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}var e=r.prototype;return e.toJSON=function(){return{start:this.start,end:this.end}},r}();Fi(zc);var Hc=function(){function r(t,n,i,a,o,s,u){this.kind=t,this.start=n,this.end=i,this.line=a,this.column=o,this.value=u,this.prev=s,this.next=null}var e=r.prototype;return e.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},r}();Fi(Hc);function Ao(r){return r!=null&&typeof r.kind=="string"}function $i(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$i=function(t){return typeof t}:$i=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$i(r)}var Wf=10,Jc=2;function $n(r){return Mi(r,[])}function Mi(r,e){switch($i(r)){case"string":return JSON.stringify(r);case"function":return r.name?"[function ".concat(r.name,"]"):"[function]";case"object":return r===null?"null":Gf(r,e);default:return String(r)}}function Gf(r,e){if(e.indexOf(r)!==-1)return"[Circular]";var t=[].concat(e,[r]),n=Hf(r);if(n!==void 0){var i=n.call(r);if(i!==r)return typeof i=="string"?i:Mi(i,t)}else if(Array.isArray(r))return zf(r,t);return Kf(r,t)}function Kf(r,e){var t=Object.keys(r);if(t.length===0)return"{}";if(e.length>Jc)return"["+Jf(r)+"]";var n=t.map(function(i){var a=Mi(r[i],e);return i+": "+a});return"{ "+n.join(", ")+" }"}function zf(r,e){if(r.length===0)return"[]";if(e.length>Jc)return"[Array]";for(var t=Math.min(Wf,r.length),n=r.length-t,i=[],a=0;a<t;++a)i.push(Mi(r[a],e));return n===1?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}function Hf(r){var e=r[String(Fn)];if(typeof e=="function")return e;if(typeof r.inspect=="function")return r.inspect}function Jf(r){var e=Object.prototype.toString.call(r).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof r.constructor=="function"){var t=r.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}function Mn(r,e){var t=Boolean(r);if(!t)throw new Error(e)}function Yc(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Yf(r,e,t){return e&&Yc(r.prototype,e),t&&Yc(r,t),r}var ji=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||Mn(0,"Body must be a string. Received: ".concat($n(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Mn(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Mn(0,"column in locationOffset is 1-indexed and must be positive.")}return Yf(r,[{key:Kc,get:function(){return"Source"}}]),r}();function Xc(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=r.indexOf(`
4
+ `)===-1,i=r[0]===" "||r[0]===" ",a=r[r.length-1]==='"',o=r[r.length-1]==="\\",s=!n||a||o||t,u="";return s&&!(n&&i)&&(u+=`
5
+ `+e),u+=e?r.replace(/\n/g,`
6
+ `+e):r,s&&(u+=`
7
+ `),'"""'+u.replace(/"""/g,'\\"""')+'"""'}var Xf={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},vr=Object.freeze({});function Me(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xf,n=void 0,i=Array.isArray(r),a=[r],o=-1,s=[],u=void 0,l=void 0,f=void 0,p=[],h=[],d=r;do{o++;var y=o===a.length,g=y&&s.length!==0;if(y){if(l=h.length===0?void 0:p[p.length-1],u=f,f=h.pop(),g){if(i)u=u.slice();else{for(var C={},_=0,b=Object.keys(u);_<b.length;_++){var S=b[_];C[S]=u[S]}u=C}for(var O=0,k=0;k<s.length;k++){var N=s[k][0],I=s[k][1];i&&(N-=O),i&&I===null?(u.splice(N,1),O++):u[N]=I}}o=n.index,a=n.keys,s=n.edits,i=n.inArray,n=n.prev}else{if(l=f?i?o:a[o]:void 0,u=f?f[l]:d,u==null)continue;f&&p.push(l)}var R=void 0;if(!Array.isArray(u)){if(!Ao(u))throw new Error("Invalid AST Node: ".concat($n(u),"."));var re=Io(e,u.kind,y);if(re){if(R=re.call(e,u,l,f,p,h),R===vr)break;if(R===!1){if(!y){p.pop();continue}}else if(R!==void 0&&(s.push([l,R]),!y))if(Ao(R))u=R;else{p.pop();continue}}}if(R===void 0&&g&&s.push([l,u]),y)p.pop();else{var ee;n={inArray:i,index:o,keys:a,edits:s,prev:n},i=Array.isArray(u),a=i?u:(ee=t[u.kind])!==null&&ee!==void 0?ee:[],o=-1,s=[],f&&h.push(f),f=u}}while(n!==void 0);return s.length!==0&&(d=s[s.length-1][1]),d}function Io(r,e,t){var n=r[e];if(n){if(!t&&typeof n=="function")return n;var i=t?n.leave:n.enter;if(typeof i=="function")return i}else{var a=t?r.leave:r.enter;if(a){if(typeof a=="function")return a;var o=a[e];if(typeof o=="function")return o}}}function Xr(r){return Me(r,{leave:ep})}var Zf=80,ep={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return P(e.definitions,`
8
+
9
+ `)+`
10
+ `},OperationDefinition:function(e){var t=e.operation,n=e.name,i=pe("(",P(e.variableDefinitions,", "),")"),a=P(e.directives," "),o=e.selectionSet;return!n&&!a&&!i&&t==="query"?o:P([t,P([n,i]),a,o]," ")},VariableDefinition:function(e){var t=e.variable,n=e.type,i=e.defaultValue,a=e.directives;return t+": "+n+pe(" = ",i)+pe(" ",P(a," "))},SelectionSet:function(e){var t=e.selections;return mt(t)},Field:function(e){var t=e.alias,n=e.name,i=e.arguments,a=e.directives,o=e.selectionSet,s=pe("",t,": ")+n,u=s+pe("(",P(i,", "),")");return u.length>Zf&&(u=s+pe(`(
11
+ `,Ui(P(i,`
12
+ `)),`
13
+ )`)),P([u,P(a," "),o]," ")},Argument:function(e){var t=e.name,n=e.value;return t+": "+n},FragmentSpread:function(e){var t=e.name,n=e.directives;return"..."+t+pe(" ",P(n," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,i=e.selectionSet;return P(["...",pe("on ",t),P(n," "),i]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,i=e.variableDefinitions,a=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(pe("(",P(i,", "),")")," ")+"on ".concat(n," ").concat(pe("",P(a," ")," "))+o},IntValue:function(e){var t=e.value;return t},FloatValue:function(e){var t=e.value;return t},StringValue:function(e,t){var n=e.value,i=e.block;return i?Xc(n,t==="description"?"":" "):JSON.stringify(n)},BooleanValue:function(e){var t=e.value;return t?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){var t=e.value;return t},ListValue:function(e){var t=e.values;return"["+P(t,", ")+"]"},ObjectValue:function(e){var t=e.fields;return"{"+P(t,", ")+"}"},ObjectField:function(e){var t=e.name,n=e.value;return t+": "+n},Directive:function(e){var t=e.name,n=e.arguments;return"@"+t+pe("(",P(n,", "),")")},NamedType:function(e){var t=e.name;return t},ListType:function(e){var t=e.type;return"["+t+"]"},NonNullType:function(e){var t=e.type;return t+"!"},SchemaDefinition:ht(function(r){var e=r.directives,t=r.operationTypes;return P(["schema",P(e," "),mt(t)]," ")}),OperationTypeDefinition:function(e){var t=e.operation,n=e.type;return t+": "+n},ScalarTypeDefinition:ht(function(r){var e=r.name,t=r.directives;return P(["scalar",e,P(t," ")]," ")}),ObjectTypeDefinition:ht(function(r){var e=r.name,t=r.interfaces,n=r.directives,i=r.fields;return P(["type",e,pe("implements ",P(t," & ")),P(n," "),mt(i)]," ")}),FieldDefinition:ht(function(r){var e=r.name,t=r.arguments,n=r.type,i=r.directives;return e+(Zc(t)?pe(`(
14
+ `,Ui(P(t,`
15
+ `)),`
16
+ )`):pe("(",P(t,", "),")"))+": "+n+pe(" ",P(i," "))}),InputValueDefinition:ht(function(r){var e=r.name,t=r.type,n=r.defaultValue,i=r.directives;return P([e+": "+t,pe("= ",n),P(i," ")]," ")}),InterfaceTypeDefinition:ht(function(r){var e=r.name,t=r.interfaces,n=r.directives,i=r.fields;return P(["interface",e,pe("implements ",P(t," & ")),P(n," "),mt(i)]," ")}),UnionTypeDefinition:ht(function(r){var e=r.name,t=r.directives,n=r.types;return P(["union",e,P(t," "),n&&n.length!==0?"= "+P(n," | "):""]," ")}),EnumTypeDefinition:ht(function(r){var e=r.name,t=r.directives,n=r.values;return P(["enum",e,P(t," "),mt(n)]," ")}),EnumValueDefinition:ht(function(r){var e=r.name,t=r.directives;return P([e,P(t," ")]," ")}),InputObjectTypeDefinition:ht(function(r){var e=r.name,t=r.directives,n=r.fields;return P(["input",e,P(t," "),mt(n)]," ")}),DirectiveDefinition:ht(function(r){var e=r.name,t=r.arguments,n=r.repeatable,i=r.locations;return"directive @"+e+(Zc(t)?pe(`(
17
+ `,Ui(P(t,`
18
+ `)),`
19
+ )`):pe("(",P(t,", "),")"))+(n?" repeatable":"")+" on "+P(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return P(["extend schema",P(t," "),mt(n)]," ")},ScalarTypeExtension:function(e){var t=e.name,n=e.directives;return P(["extend scalar",t,P(n," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,i=e.directives,a=e.fields;return P(["extend type",t,pe("implements ",P(n," & ")),P(i," "),mt(a)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,i=e.directives,a=e.fields;return P(["extend interface",t,pe("implements ",P(n," & ")),P(i," "),mt(a)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,i=e.types;return P(["extend union",t,P(n," "),i&&i.length!==0?"= "+P(i," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,i=e.values;return P(["extend enum",t,P(n," "),mt(i)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,i=e.fields;return P(["extend input",t,P(n," "),mt(i)]," ")}};function ht(r){return function(e){return P([e.description,r(e)],`
20
+ `)}}function P(r){var e,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(e=r?.filter(function(n){return n}).join(t))!==null&&e!==void 0?e:""}function mt(r){return pe(`{
21
+ `,Ui(P(r,`
22
+ `)),`
23
+ }`)}function pe(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return e!=null&&e!==""?r+e+t:""}function Ui(r){return pe(" ",r.replace(/\n/g,`
24
+ `))}function tp(r){return r.indexOf(`
25
+ `)!==-1}function Zc(r){return r!=null&&r.some(tp)}function jn(r){return r.kind===we.FIELD||r.kind===we.FRAGMENT_SPREAD||r.kind===we.INLINE_FRAGMENT}function eu(){return typeof ji=="function"?Oo():Oo()}function fp(){__DEV__?T(typeof gr=="boolean",gr):T(typeof gr=="boolean",39)}eu();fp();function Dt(r,e){var t=r.directives;return!t||!t.length?!0:tu(t).every(function(n){var i=n.directive,a=n.ifArgument,o=!1;return a.value.kind==="Variable"?(o=e&&e[a.value.name.value],__DEV__?T(o!==void 0,"Invalid variable referenced in @".concat(i.name.value," directive.")):T(o!==void 0,40)):o=a.value.value,i.name.value==="skip"?!o:o})}function Zr(r,e,t){var n=new Set(r),i=n.size;return Me(e,{Directive:function(a){if(n.delete(a.name.value)&&(!t||!n.size))return vr}}),t?!n.size:n.size<i}function ko(r){return r&&Zr(["client","export"],r,!0)}function pp(r){var e=r.name.value;return e==="skip"||e==="include"}function tu(r){var e=[];return r&&r.length&&r.forEach(function(t){if(!!pp(t)){var n=t.arguments,i=t.name.value;__DEV__?T(n&&n.length===1,"Incorrect number of arguments for the @".concat(i," directive.")):T(n&&n.length===1,41);var a=n[0];__DEV__?T(a.name&&a.name.value==="if","Invalid argument for the @".concat(i," directive.")):T(a.name&&a.name.value==="if",42);var o=a.value;__DEV__?T(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),"Argument for the @".concat(i," directive must be a variable or a boolean value.")):T(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),43),e.push({directive:t,ifArgument:a})}}),e}function Do(r,e){var t=e,n=[];r.definitions.forEach(function(a){if(a.kind==="OperationDefinition")throw __DEV__?new U("Found a ".concat(a.operation," operation").concat(a.name?" named '".concat(a.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new U(44);a.kind==="FragmentDefinition"&&n.push(a)}),typeof t>"u"&&(__DEV__?T(n.length===1,"Found ".concat(n.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):T(n.length===1,45),t=n[0].name.value);var i=m(m({},r),{definitions:Wt([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],r.definitions,!0)});return i}function br(r){r===void 0&&(r=[]);var e={};return r.forEach(function(t){e[t.name.value]=t}),e}function Cr(r,e){switch(r.kind){case"InlineFragment":return r;case"FragmentSpread":{var t=r.name.value;if(typeof e=="function")return e(t);var n=e&&e[t];return __DEV__?T(n,"No fragment named ".concat(t)):T(n,46),n||null}default:return null}}function z(r){return r!==null&&typeof r=="object"}function Et(r){return{__ref:String(r)}}function W(r){return Boolean(r&&typeof r=="object"&&typeof r.__ref=="string")}function No(r){return z(r)&&r.kind==="Document"&&Array.isArray(r.definitions)}function dp(r){return r.kind==="StringValue"}function hp(r){return r.kind==="BooleanValue"}function mp(r){return r.kind==="IntValue"}function yp(r){return r.kind==="FloatValue"}function gp(r){return r.kind==="Variable"}function vp(r){return r.kind==="ObjectValue"}function bp(r){return r.kind==="ListValue"}function Cp(r){return r.kind==="EnumValue"}function Sp(r){return r.kind==="NullValue"}function Kt(r,e,t,n){if(mp(t)||yp(t))r[e.value]=Number(t.value);else if(hp(t)||dp(t))r[e.value]=t.value;else if(vp(t)){var i={};t.fields.map(function(o){return Kt(i,o.name,o.value,n)}),r[e.value]=i}else if(gp(t)){var a=(n||{})[t.name.value];r[e.value]=a}else if(bp(t))r[e.value]=t.values.map(function(o){var s={};return Kt(s,e,o,n),s[e.value]});else if(Cp(t))r[e.value]=t.value;else if(Sp(t))r[e.value]=null;else throw __DEV__?new U('The inline argument "'.concat(e.value,'" of kind "').concat(t.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new U(55)}function Po(r,e){var t=null;r.directives&&(t={},r.directives.forEach(function(i){t[i.name.value]={},i.arguments&&i.arguments.forEach(function(a){var o=a.name,s=a.value;return Kt(t[i.name.value],o,s,e)})}));var n=null;return r.arguments&&r.arguments.length&&(n={},r.arguments.forEach(function(i){var a=i.name,o=i.value;return Kt(n,a,o,e)})),qn(r.name.value,n,t)}var wp=["connection","include","skip","client","rest","export"],qn=Object.assign(function(r,e,t){if(e&&t&&t.connection&&t.connection.key)if(t.connection.filter&&t.connection.filter.length>0){var n=t.connection.filter?t.connection.filter:[];n.sort();var i={};return n.forEach(function(s){i[s]=e[s]}),"".concat(t.connection.key,"(").concat(Un(i),")")}else return t.connection.key;var a=r;if(e){var o=Un(e);a+="(".concat(o,")")}return t&&Object.keys(t).forEach(function(s){wp.indexOf(s)===-1&&(t[s]&&Object.keys(t[s]).length?a+="@".concat(s,"(").concat(Un(t[s]),")"):a+="@".concat(s))}),a},{setStringify:function(r){var e=Un;return Un=r,e}}),Un=function(e){return JSON.stringify(e,_p)};function _p(r,e){return z(e)&&!Array.isArray(e)&&(e=Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{})),e}function Nt(r,e){if(r.arguments&&r.arguments.length){var t={};return r.arguments.forEach(function(n){var i=n.name,a=n.value;return Kt(t,i,a,e)}),t}return null}function at(r){return r.alias?r.alias.value:r.name.value}function Bn(r,e,t){if(typeof r.__typename=="string")return r.__typename;for(var n=0,i=e.selections;n<i.length;n++){var a=i[n];if(et(a)){if(a.name.value==="__typename")return r[at(a)]}else{var o=Bn(r,Cr(a,t).selectionSet,t);if(typeof o=="string")return o}}}function et(r){return r.kind==="Field"}function Ro(r){return r.kind==="InlineFragment"}function en(r){__DEV__?T(r&&r.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):T(r&&r.kind==="Document",47);var e=r.definitions.filter(function(t){return t.kind!=="FragmentDefinition"}).map(function(t){if(t.kind!=="OperationDefinition")throw __DEV__?new U('Schema type definitions not allowed in queries. Found: "'.concat(t.kind,'"')):new U(48);return t});return __DEV__?T(e.length<=1,"Ambiguous GraphQL document: contains ".concat(e.length," operations")):T(e.length<=1,49),r}function xt(r){return en(r),r.definitions.filter(function(e){return e.kind==="OperationDefinition"})[0]}function tn(r){return r.definitions.filter(function(e){return e.kind==="OperationDefinition"&&!!e.name}).map(function(e){return e.name.value})[0]||null}function Sr(r){return r.definitions.filter(function(e){return e.kind==="FragmentDefinition"})}function Vn(r){var e=xt(r);return __DEV__?T(e&&e.operation==="query","Must contain a query definition."):T(e&&e.operation==="query",50),e}function Lo(r){__DEV__?T(r.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):T(r.kind==="Document",51),__DEV__?T(r.definitions.length<=1,"Fragment must have exactly one definition."):T(r.definitions.length<=1,52);var e=r.definitions[0];return __DEV__?T(e.kind==="FragmentDefinition","Must be a fragment definition."):T(e.kind==="FragmentDefinition",53),e}function wr(r){en(r);for(var e,t=0,n=r.definitions;t<n.length;t++){var i=n[t];if(i.kind==="OperationDefinition"){var a=i.operation;if(a==="query"||a==="mutation"||a==="subscription")return i}i.kind==="FragmentDefinition"&&!e&&(e=i)}if(e)return e;throw __DEV__?new U("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new U(54)}function _r(r){var e=Object.create(null),t=r&&r.variableDefinitions;return t&&t.length&&t.forEach(function(n){n.defaultValue&&Kt(e,n.variable.name,n.defaultValue)}),e}var ne=Array.isArray;function xe(r){return Array.isArray(r)&&r.length>0}var ru={kind:we.FIELD,name:{kind:we.NAME,value:"__typename"}};function iu(r,e){return!r||r.selectionSet.selections.every(function(t){return t.kind===we.FRAGMENT_SPREAD&&iu(e[t.name.value],e)})}function Ep(r){return iu(xt(r)||Lo(r),br(Sr(r)))?null:r}function xp(r){var e=new Set,t=[];return r.forEach(function(n){n.name?e.add(n.name):n.test&&t.push(n.test)}),function(n){return e.has(n.name.value)||t.some(function(i){return i(n)})}}function nu(r){var e=new Map;return function(n){n===void 0&&(n=r);var i=e.get(n);return i||e.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function Fo(r,e){for(var t=nu(""),n=nu(""),i=function(b){for(var S=0,O=void 0;S<b.length&&(O=b[S]);++S)if(!ne(O)){if(O.kind===we.OPERATION_DEFINITION)return t(O.name&&O.name.value);if(O.kind===we.FRAGMENT_DEFINITION)return n(O.name.value)}return __DEV__&&T.error("Could not find operation or fragment"),null},a=0,o=e.definitions.length-1;o>=0;--o)e.definitions[o].kind===we.OPERATION_DEFINITION&&++a;var s=xp(r),u=r.some(function(b){return b.remove}),l=function(b){return u&&b&&b.some(s)},f=new Map,p=!1,h={enter:function(b){if(l(b.directives))return p=!0,null}},d=Me(e,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(b,S,O,k,N){var I=i(N);I&&I.variables.add(b.name.value)}},FragmentSpread:{enter:function(b,S,O,k,N){if(l(b.directives))return p=!0,null;var I=i(N);I&&I.fragmentSpreads.add(b.name.value)}},FragmentDefinition:{enter:function(b,S,O,k){f.set(JSON.stringify(k),b)},leave:function(b,S,O,k){var N=f.get(JSON.stringify(k));if(b===N)return b;if(a>0&&b.selectionSet.selections.every(function(I){return I.kind===we.FIELD&&I.name.value==="__typename"}))return n(b.name.value).removed=!0,p=!0,null}},Directive:{leave:function(b){if(s(b))return p=!0,null}}});if(!p)return e;var y=function(b){return b.transitiveVars||(b.transitiveVars=new Set(b.variables),b.removed||b.fragmentSpreads.forEach(function(S){y(n(S)).transitiveVars.forEach(function(O){b.transitiveVars.add(O)})})),b},g=new Set;d.definitions.forEach(function(b){b.kind===we.OPERATION_DEFINITION?y(t(b.name&&b.name.value)).fragmentSpreads.forEach(function(S){g.add(S)}):b.kind===we.FRAGMENT_DEFINITION&&a===0&&!n(b.name.value).removed&&g.add(b.name.value)}),g.forEach(function(b){y(n(b)).fragmentSpreads.forEach(function(S){g.add(S)})});var C=function(b){return!!(!g.has(b)||n(b).removed)},_={enter:function(b){if(C(b.name.value))return null}};return Ep(Me(d,{FragmentSpread:_,FragmentDefinition:_,OperationDefinition:{leave:function(b){if(b.variableDefinitions){var S=y(t(b.name&&b.name.value)).transitiveVars;if(S.size<b.variableDefinitions.length)return m(m({},b),{variableDefinitions:b.variableDefinitions.filter(function(O){return S.has(O.variable.name.value)})})}}}}))}var Er=Object.assign(function(r){return Me(r,{SelectionSet:{enter:function(e,t,n){if(!(n&&n.kind===we.OPERATION_DEFINITION)){var i=e.selections;if(!!i){var a=i.some(function(s){return et(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!a){var o=n;if(!(et(o)&&o.directives&&o.directives.some(function(s){return s.name.value==="export"})))return m(m({},e),{selections:Wt(Wt([],i,!0),[ru],!1)})}}}}}})},{added:function(r){return r===ru}}),Op={test:function(r){var e=r.name.value==="connection";return e&&(!r.arguments||!r.arguments.some(function(t){return t.name.value==="key"}))&&__DEV__&&T.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),e}};function $o(r){return Fo([Op],en(r))}function Mo(r){var e=wr(r),t=e.operation;if(t==="query")return r;var n=Me(r,{OperationDefinition:{enter:function(i){return m(m({},i),{operation:"query"})}}});return n}function jo(r){en(r);var e=Fo([{test:function(t){return t.name.value==="client"},remove:!0}],r);return e}var Tp=Object.prototype.hasOwnProperty;function Uo(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Qn(r)}function Qn(r){var e=r[0]||{},t=r.length;if(t>1)for(var n=new ze,i=1;i<t;++i)e=n.merge(e,r[i]);return e}var Ap=function(r,e,t){return this.merge(r[t],e[t])},ze=function(){function r(e){e===void 0&&(e=Ap),this.reconciler=e,this.isObject=z,this.pastCopies=new Set}return r.prototype.merge=function(e,t){for(var n=this,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return z(t)&&z(e)?(Object.keys(t).forEach(function(o){if(Tp.call(e,o)){var s=e[o];if(t[o]!==s){var u=n.reconciler.apply(n,Wt([e,t,o],i,!1));u!==s&&(e=n.shallowCopyForMerge(e),e[o]=u)}}else e=n.shallowCopyForMerge(e),e[o]=t[o]}),e):t},r.prototype.shallowCopyForMerge=function(e){return z(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e=m({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},r}();function Ip(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=kp(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kp(r,e){if(!!r){if(typeof r=="string")return au(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return au(r,e)}}function au(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function ou(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Qo(r,e,t){return e&&ou(r.prototype,e),t&&ou(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}var Wo=function(){return typeof Symbol=="function"},Go=function(r){return Wo()&&Boolean(Symbol[r])},Ko=function(r){return Go(r)?Symbol[r]:"@@"+r};Wo()&&!Go("observable")&&(Symbol.observable=Symbol("observable"));var Dp=Ko("iterator"),Bo=Ko("observable"),su=Ko("species");function Bi(r,e){var t=r[e];if(t!=null){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}function Wn(r){var e=r.constructor;return e!==void 0&&(e=e[su],e===null&&(e=void 0)),e!==void 0?e:Q}function Np(r){return r instanceof Q}function rn(r){rn.log?rn.log(r):setTimeout(function(){throw r})}function qi(r){Promise.resolve().then(function(){try{r()}catch(e){rn(e)}})}function cu(r){var e=r._cleanup;if(e!==void 0&&(r._cleanup=void 0,!!e))try{if(typeof e=="function")e();else{var t=Bi(e,"unsubscribe");t&&t.call(e)}}catch(n){rn(n)}}function Vo(r){r._observer=void 0,r._queue=void 0,r._state="closed"}function Pp(r){var e=r._queue;if(!!e){r._queue=void 0,r._state="ready";for(var t=0;t<e.length&&(uu(r,e[t].type,e[t].value),r._state!=="closed");++t);}}function uu(r,e,t){r._state="running";var n=r._observer;try{var i=Bi(n,e);switch(e){case"next":i&&i.call(n,t);break;case"error":if(Vo(r),i)i.call(n,t);else throw t;break;case"complete":Vo(r),i&&i.call(n);break}}catch(a){rn(a)}r._state==="closed"?cu(r):r._state==="running"&&(r._state="ready")}function qo(r,e,t){if(r._state!=="closed"){if(r._state==="buffering"){r._queue.push({type:e,value:t});return}if(r._state!=="ready"){r._state="buffering",r._queue=[{type:e,value:t}],qi(function(){return Pp(r)});return}uu(r,e,t)}}var Rp=function(){function r(t,n){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new Lp(this);try{this._cleanup=n.call(void 0,i)}catch(a){i.error(a)}this._state==="initializing"&&(this._state="ready")}var e=r.prototype;return e.unsubscribe=function(){this._state!=="closed"&&(Vo(this),cu(this))},Qo(r,[{key:"closed",get:function(){return this._state==="closed"}}]),r}(),Lp=function(){function r(t){this._subscription=t}var e=r.prototype;return e.next=function(n){qo(this._subscription,"next",n)},e.error=function(n){qo(this._subscription,"error",n)},e.complete=function(){qo(this._subscription,"complete")},Qo(r,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),r}(),Q=function(){function r(t){if(!(this instanceof r))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}var e=r.prototype;return e.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new Rp(n,this._subscriber)},e.forEach=function(n){var i=this;return new Promise(function(a,o){if(typeof n!="function"){o(new TypeError(n+" is not a function"));return}function s(){u.unsubscribe(),a()}var u=i.subscribe({next:function(l){try{n(l,s)}catch(f){o(f),u.unsubscribe()}},error:o,complete:a})})},e.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=Wn(this);return new a(function(o){return i.subscribe({next:function(s){try{s=n(s)}catch(u){return o.error(u)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},e.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=Wn(this);return new a(function(o){return i.subscribe({next:function(s){try{if(!n(s))return}catch(u){return o.error(u)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},e.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=Wn(this),o=arguments.length>1,s=!1,u=arguments[1],l=u;return new a(function(f){return i.subscribe({next:function(p){var h=!s;if(s=!0,!h||o)try{l=n(l,p)}catch(d){return f.error(d)}else l=p},error:function(p){f.error(p)},complete:function(){if(!s&&!o)return f.error(new TypeError("Cannot reduce an empty sequence"));f.next(l),f.complete()}})})},e.concat=function(){for(var n=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Wn(this);return new s(function(u){var l,f=0;function p(h){l=h.subscribe({next:function(d){u.next(d)},error:function(d){u.error(d)},complete:function(){f===a.length?(l=void 0,u.complete()):p(s.from(a[f++]))}})}return p(n),function(){l&&(l.unsubscribe(),l=void 0)}})},e.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=Wn(this);return new a(function(o){var s=[],u=i.subscribe({next:function(f){if(n)try{f=n(f)}catch(h){return o.error(h)}var p=a.from(f).subscribe({next:function(h){o.next(h)},error:function(h){o.error(h)},complete:function(){var h=s.indexOf(p);h>=0&&s.splice(h,1),l()}});s.push(p)},error:function(f){o.error(f)},complete:function(){l()}});function l(){u.closed&&s.length===0&&o.complete()}return function(){s.forEach(function(f){return f.unsubscribe()}),u.unsubscribe()}})},e[Bo]=function(){return this},r.from=function(n){var i=typeof this=="function"?this:r;if(n==null)throw new TypeError(n+" is not an object");var a=Bi(n,Bo);if(a){var o=a.call(n);if(Object(o)!==o)throw new TypeError(o+" is not an object");return Np(o)&&o.constructor===i?o:new i(function(s){return o.subscribe(s)})}if(Go("iterator")&&(a=Bi(n,Dp),a))return new i(function(s){qi(function(){if(!s.closed){for(var u=Ip(a.call(n)),l;!(l=u()).done;){var f=l.value;if(s.next(f),s.closed)return}s.complete()}})});if(Array.isArray(n))return new i(function(s){qi(function(){if(!s.closed){for(var u=0;u<n.length;++u)if(s.next(n[u]),s.closed)return;s.complete()}})});throw new TypeError(n+" is not observable")},r.of=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=typeof this=="function"?this:r;return new o(function(s){qi(function(){if(!s.closed){for(var u=0;u<i.length;++u)if(s.next(i[u]),s.closed)return;s.complete()}})})},Qo(r,null,[{key:su,get:function(){return this}}]),r}();Wo()&&Object.defineProperty(Q,Symbol("extensions"),{value:{symbol:Bo,hostReportError:rn},configurable:!0});function zo(r){var e,t=r.Symbol;if(typeof t=="function")if(t.observable)e=t.observable;else{typeof t.for=="function"?e=t.for("https://github.com/benlesh/symbol-observable"):e=t("https://github.com/benlesh/symbol-observable");try{t.observable=e}catch{}}else e="@@observable";return e}var nn;typeof self<"u"?nn=self:typeof window<"u"?nn=window:typeof global<"u"?nn=global:typeof module<"u"?nn=module:nn=Function("return this")();var k3=zo(nn);var lu=Q.prototype,fu="@@observable";lu[fu]||(lu[fu]=function(){return this});var Fp=Object.prototype.toString;function Vi(r){return Ho(r)}function Ho(r,e){switch(Fp.call(r)){case"[object Array]":{if(e=e||new Map,e.has(r))return e.get(r);var t=r.slice(0);return e.set(r,t),t.forEach(function(i,a){t[a]=Ho(i,e)}),t}case"[object Object]":{if(e=e||new Map,e.has(r))return e.get(r);var n=Object.create(Object.getPrototypeOf(r));return e.set(r,n),Object.keys(r).forEach(function(i){n[i]=Ho(r[i],e)}),n}default:return r}}function $p(r){var e=new Set([r]);return e.forEach(function(t){z(t)&&Mp(t)===t&&Object.getOwnPropertyNames(t).forEach(function(n){z(t[n])&&e.add(t[n])})}),r}function Mp(r){if(__DEV__&&!Object.isFrozen(r))try{Object.freeze(r)}catch(e){if(e instanceof TypeError)return null;throw e}return r}function Gn(r){return __DEV__&&$p(r),r}function xr(r,e,t){var n=[];r.forEach(function(i){return i[e]&&n.push(i)}),n.forEach(function(i){return i[e](t)})}function Qi(r,e,t){return new Q(function(n){var i=n.next,a=n.error,o=n.complete,s=0,u=!1,l={then:function(d){return new Promise(function(y){return y(d())})}};function f(d,y){return d?function(g){++s;var C=function(){return d(g)};l=l.then(C,C).then(function(_){--s,i&&i.call(n,_),u&&p.complete()},function(_){throw--s,_}).catch(function(_){a&&a.call(n,_)})}:function(g){return y&&y.call(n,g)}}var p={next:f(e,i),error:f(t,a),complete:function(){u=!0,s||o&&o.call(n)}},h=r.subscribe(p);return function(){return h.unsubscribe()}})}var ot=typeof WeakMap=="function"&&Ie(function(){return navigator.product})!=="ReactNative",pu=typeof WeakSet=="function",Jo=typeof Symbol=="function"&&typeof Symbol.for=="function",zt=Jo&&Symbol.asyncIterator,V3=typeof Ie(function(){return window.document.createElement})=="function",Q3=Ie(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1;function Wi(r){function e(t){Object.defineProperty(r,t,{value:Q})}return Jo&&Symbol.species&&e(Symbol.species),e("@@species"),r}function du(r){return r&&typeof r.then=="function"}var an=function(r){ge(e,r);function e(t){var n=r.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,a){n.resolve=i,n.reject=a}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),xr(n.observers,"next",i))},error:function(i){var a=n.sub;a!==null&&(a&&setTimeout(function(){return a.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),xr(n.observers,"error",i))},complete:function(){var i=n,a=i.sub,o=i.sources,s=o===void 0?[]:o;if(a!==null){var u=s.shift();u?du(u)?u.then(function(l){return n.sub=l.subscribe(n.handlers)}):n.sub=u.subscribe(n.handlers):(a&&setTimeout(function(){return a.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),xr(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.complete()},n.promise.catch(function(i){}),typeof t=="function"&&(t=[new Q(t)]),du(t)?t.then(function(i){return n.start(i)},n.handlers.error):n.start(t),n}return e.prototype.start=function(t){this.sub===void 0&&(this.sources=Array.from(t),this.handlers.complete())},e.prototype.deliverLastMessage=function(t){if(this.latest){var n=this.latest[0],i=t[n];i&&i.call(t,this.latest[1]),this.sub===null&&n==="next"&&t.complete&&t.complete()}},e.prototype.addObserver=function(t){this.observers.has(t)||(this.deliverLastMessage(t),this.observers.add(t))},e.prototype.removeObserver=function(t){this.observers.delete(t)&&this.observers.size<1&&this.handlers.complete()},e.prototype.notify=function(t,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(a){return a(t,n)}))},e.prototype.beforeNext=function(t){var n=!1;this.nextResultListeners.add(function(i,a){n||(n=!0,t(i,a))})},e}(Q);Wi(an);function Ht(r){return"incremental"in r}function jp(r){return"hasNext"in r&&"data"in r}function hu(r){return Ht(r)||jp(r)}function Gi(r,e){var t=r,n=new ze;return Ht(e)&&xe(e.incremental)&&e.incremental.forEach(function(i){for(var a=i.data,o=i.path,s=o.length-1;s>=0;--s){var u=o[s],l=!isNaN(+u),f=l?[]:{};f[u]=a,a=f}t=n.merge(t,a)}),t}function on(r){var e=Ki(r);return xe(e)}function Ki(r){var e=xe(r.errors)?r.errors.slice(0):[];return Ht(r)&&xe(r.incremental)&&r.incremental.forEach(function(t){t.errors&&e.push.apply(e,t.errors)}),e}function Jt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Object.create(null);return r.forEach(function(n){!n||Object.keys(n).forEach(function(i){var a=n[i];a!==void 0&&(t[i]=a)})}),t}var mu=new Map;function Kn(r){var e=mu.get(r)||1;return mu.set(r,e+1),"".concat(r,":").concat(e,":").concat(Math.random().toString(36).slice(2))}function yu(r){var e=Kn("stringifyForDisplay");return JSON.stringify(r,function(t,n){return n===void 0?e:n}).split(JSON.stringify(e)).join("<undefined>")}function zn(r,e){return Jt(r,e,e.variables&&{variables:m(m({},r&&r.variables),e.variables)})}function zi(r){return new Q(function(e){e.error(r)})}var Hn=function(r,e,t){var n=new Error(t);throw n.name="ServerError",n.response=r,n.statusCode=r.status,n.result=e,n};function Yo(r){for(var e=["query","operationName","variables","extensions","context"],t=0,n=Object.keys(r);t<n.length;t++){var i=n[t];if(e.indexOf(i)<0)throw __DEV__?new U("illegal argument: ".concat(i)):new U(27)}return r}function Xo(r,e){var t=m({},r),n=function(a){typeof a=="function"?t=m(m({},t),a(t)):t=m(m({},t),a)},i=function(){return m({},t)};return Object.defineProperty(e,"setContext",{enumerable:!1,value:n}),Object.defineProperty(e,"getContext",{enumerable:!1,value:i}),e}function Zo(r){var e={variables:r.variables||{},extensions:r.extensions||{},operationName:r.operationName,query:r.query};return e.operationName||(e.operationName=typeof e.query!="string"?tn(e.query)||void 0:""),e}function gu(r,e){return e?e(r):Q.of()}function Jn(r){return typeof r=="function"?new st(r):r}function Hi(r){return r.request.length<=1}var Up=function(r){ge(e,r);function e(t,n){var i=r.call(this,t)||this;return i.link=n,i}return e}(Error),st=function(){function r(e){e&&(this.request=e)}return r.empty=function(){return new r(function(){return Q.of()})},r.from=function(e){return e.length===0?r.empty():e.map(Jn).reduce(function(t,n){return t.concat(n)})},r.split=function(e,t,n){var i=Jn(t),a=Jn(n||new r(gu));return Hi(i)&&Hi(a)?new r(function(o){return e(o)?i.request(o)||Q.of():a.request(o)||Q.of()}):new r(function(o,s){return e(o)?i.request(o,s)||Q.of():a.request(o,s)||Q.of()})},r.execute=function(e,t){return e.request(Xo(t.context,Zo(Yo(t))))||Q.of()},r.concat=function(e,t){var n=Jn(e);if(Hi(n))return __DEV__&&T.warn(new Up("You are calling concat on a terminating link, which will have no effect",n)),n;var i=Jn(t);return Hi(i)?new r(function(a){return n.request(a,function(o){return i.request(o)||Q.of()})||Q.of()}):new r(function(a,o){return n.request(a,function(s){return i.request(s,o)||Q.of()})||Q.of()})},r.prototype.split=function(e,t,n){return this.concat(r.split(e,t,n||new r(gu)))},r.prototype.concat=function(e){return r.concat(this,e)},r.prototype.request=function(e,t){throw __DEV__?new U("request is not implemented"):new U(22)},r.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},r.prototype.setOnError=function(e){return this.onError=e,this},r}();var sn=st.execute;var vu="3.7.10";function bu(r){return!!r.body}function Cu(r){return!!r.getReader}function Su(r){return!!(zt&&r[Symbol.asyncIterator])}function wu(r){return!!r.stream}function _u(r){return!!r.arrayBuffer}function Eu(r){return!!r.pipe}function es(r){var e,t=r[Symbol.asyncIterator]();return e={next:function(){return t.next()}},e[Symbol.asyncIterator]=function(){return this},e}function ts(r){var e=null,t=null,n=!1,i=[],a=[];function o(p){if(!t){if(a.length){var h=a.shift();if(Array.isArray(h)&&h[0])return h[0]({value:p,done:!1})}i.push(p)}}function s(p){t=p;var h=a.slice();h.forEach(function(d){d[1](p)}),!e||e()}function u(){n=!0;var p=a.slice();p.forEach(function(h){h[0]({value:void 0,done:!0})}),!e||e()}e=function(){e=null,r.removeListener("data",o),r.removeListener("error",s),r.removeListener("end",u),r.removeListener("finish",u),r.removeListener("close",u)},r.on("data",o),r.on("error",s),r.on("end",u),r.on("finish",u),r.on("close",u);function l(){return new Promise(function(p,h){if(t)return h(t);if(i.length)return p({value:i.shift(),done:!1});if(n)return p({value:void 0,done:!0});a.push([p,h])})}var f={next:function(){return l()}};return zt&&(f[Symbol.asyncIterator]=function(){return this}),f}function rs(r){var e=!1,t={next:function(){return e?Promise.resolve({value:void 0,done:!0}):(e=!0,new Promise(function(n,i){r.then(function(a){n({value:a,done:!1})}).catch(i)}))}};return zt&&(t[Symbol.asyncIterator]=function(){return this}),t}function Ji(r){var e={next:function(){return r.read()}};return zt&&(e[Symbol.asyncIterator]=function(){return this}),e}function xu(r){var e=r;if(bu(r)&&(e=r.body),Su(e))return es(e);if(Cu(e))return Ji(e.getReader());if(wu(e))return Ji(e.stream().getReader());if(_u(e))return rs(e.arrayBuffer());if(Eu(e))return ts(e);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var Ou=Object.prototype.hasOwnProperty;function Tu(r,e){var t,n,i;return pt(this,void 0,void 0,function(){var a,o,s,u,l,f,p,h,d,y,g,C,_,b,S,O,k,N,I,R;return dt(this,function(re){switch(re.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");a=new TextDecoder("utf-8"),o=(t=r.headers)===null||t===void 0?void 0:t.get("content-type"),s="boundary=",u=o?.includes(s)?o?.substring(o?.indexOf(s)+s.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(u),f="",p=xu(r),h=!0,re.label=1;case 1:return h?[4,p.next()]:[3,3];case 2:for(d=re.sent(),y=d.value,g=d.done,C=typeof y=="string"?y:a.decode(y),h=!g,f+=C,_=f.indexOf(l);_>-1;){if(b=void 0,R=[f.slice(0,_),f.slice(_+l.length)],b=R[0],f=R[1],b.trim()){if(S=b.indexOf(`\r
27
+ \r
28
+ `),O=qp(b.slice(0,S)),k=O["content-type"],k&&k.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");N=b.slice(S);try{I=Au(r,N.replace(`\r
29
+ `,"")),(Object.keys(I).length>1||"data"in I||"incremental"in I||"errors"in I)&&((n=e.next)===null||n===void 0||n.call(e,I))}catch(ee){Yi(ee,e)}}_=f.indexOf(l)}return[3,1];case 3:return(i=e.complete)===null||i===void 0||i.call(e),[2]}})})}function qp(r){var e={};return r.split(`
30
+ `).forEach(function(t){var n=t.indexOf(":");if(n>-1){var i=t.slice(0,n).trim().toLowerCase(),a=t.slice(n+1).trim();e[i]=a}}),e}function Au(r,e){if(r.status>=300){var t=function(){try{return JSON.parse(e)}catch{return e}};Hn(r,t(),"Response not successful: Received status code ".concat(r.status))}try{return JSON.parse(e)}catch(i){var n=i;throw n.name="ServerParseError",n.response=r,n.statusCode=r.status,n.bodyText=e,n}}function Yi(r,e){var t,n;r.name!=="AbortError"&&(r.result&&r.result.errors&&r.result.data&&((t=e.next)===null||t===void 0||t.call(e,r.result)),(n=e.error)===null||n===void 0||n.call(e,r))}function Iu(r,e,t){Bp(e)(r).then(function(n){var i,a;(i=t.next)===null||i===void 0||i.call(t,n),(a=t.complete)===null||a===void 0||a.call(t)}).catch(function(n){return Yi(n,t)})}function Bp(r){return function(e){return e.text().then(function(t){return Au(e,t)}).then(function(t){return e.status>=300&&Hn(e,t,"Response not successful: Received status code ".concat(e.status)),!Array.isArray(t)&&!Ou.call(t,"data")&&!Ou.call(t,"errors")&&Hn(e,t,"Server response was missing for query '".concat(Array.isArray(r)?r.map(function(n){return n.operationName}):r.operationName,"'.")),t})}}var Yn=function(r,e){var t;try{t=JSON.stringify(r)}catch(i){var n=__DEV__?new U("Network request failed. ".concat(e," is not serializable: ").concat(i.message)):new U(24);throw n.parseError=i,n}return t};var Vp={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},Qp={accept:"*/*","content-type":"application/json"},Wp={method:"POST"},ku={http:Vp,headers:Qp,options:Wp},Du=function(r,e){return e(r)};function Nu(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i={},a={};t.forEach(function(p){i=m(m(m({},i),p.options),{headers:m(m({},i.headers),p.headers)}),p.credentials&&(i.credentials=p.credentials),a=m(m({},a),p.http)}),i.headers&&(i.headers=Gp(i.headers,a.preserveHeaderCase));var o=r.operationName,s=r.extensions,u=r.variables,l=r.query,f={operationName:o,variables:u};return a.includeExtensions&&(f.extensions=s),a.includeQuery&&(f.query=e(l,Xr)),{options:i,body:f}}function Gp(r,e){if(!e){var t=Object.create(null);return Object.keys(Object(r)).forEach(function(a){t[a.toLowerCase()]=r[a]}),t}var n=Object.create(null);Object.keys(Object(r)).forEach(function(a){n[a.toLowerCase()]={originalName:a,value:r[a]}});var i=Object.create(null);return Object.keys(n).forEach(function(a){i[n[a].originalName]=n[a].value}),i}var Pu=function(r){if(!r&&typeof fetch>"u")throw __DEV__?new U(`
31
+ "fetch" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:
32
+
33
+ import fetch from 'cross-fetch';
34
+ import { ApolloClient, HttpLink } from '@apollo/client';
35
+ const client = new ApolloClient({
36
+ link: new HttpLink({ uri: '/graphql', fetch })
37
+ });
38
+ `):new U(23)};var Ru=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var r=new AbortController,e=r.signal;return{controller:r,signal:e}};var Lu=function(r,e){var t=r.getContext(),n=t.uri;return n||(typeof e=="function"?e(r):e||"/graphql")};function Fu(r,e){var t=[],n=function(p,h){t.push("".concat(p,"=").concat(encodeURIComponent(h)))};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){var i=void 0;try{i=Yn(e.variables,"Variables map")}catch(p){return{parseError:p}}n("variables",i)}if(e.extensions){var a=void 0;try{a=Yn(e.extensions,"Extensions map")}catch(p){return{parseError:p}}n("extensions",a)}var o="",s=r,u=r.indexOf("#");u!==-1&&(o=r.substr(u),s=r.substr(0,u));var l=s.indexOf("?")===-1?"?":"&",f=s+l+t.join("&")+o;return{newURI:f}}var $u=Ie(function(){return fetch}),Mu=function(r){r===void 0&&(r={});var e=r.uri,t=e===void 0?"/graphql":e,n=r.fetch,i=r.print,a=i===void 0?Du:i,o=r.includeExtensions,s=r.preserveHeaderCase,u=r.useGETForQueries,l=r.includeUnusedVariables,f=l===void 0?!1:l,p=_t(r,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&Pu(n||$u);var h={http:{includeExtensions:o,preserveHeaderCase:s},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new st(function(d){var y=Lu(d,t),g=d.getContext(),C={};if(g.clientAwareness){var _=g.clientAwareness,b=_.name,S=_.version;b&&(C["apollographql-client-name"]=b),S&&(C["apollographql-client-version"]=S)}var O=m(m({},C),g.headers),k={http:g.http,options:g.fetchOptions,credentials:g.credentials,headers:O},N=Nu(d,a,ku,h,k),I=N.options,R=N.body;if(R.variables&&!f){var re=new Set(Object.keys(R.variables));Me(d.query,{Variable:function(K,St,V){V&&V.kind!=="VariableDefinition"&&re.delete(K.name.value)}}),re.size&&(R.variables=m({},R.variables),re.forEach(function(K){delete R.variables[K]}))}var ee;if(!I.signal){var Ct=Ru(),It=Ct.controller,ke=Ct.signal;ee=It,ee&&(I.signal=ke)}var B=function(K){return K.kind==="OperationDefinition"&&K.operation==="mutation"};if(u&&!d.query.definitions.some(B)&&(I.method="GET"),Zr(["defer"],d.query)&&(I.headers=I.headers||{},I.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),I.method==="GET"){var me=Fu(y,R),oe=me.newURI,G=me.parseError;if(G)return zi(G);y=oe}else try{I.body=Yn(R,"Payload")}catch(K){return zi(K)}return new Q(function(K){var St=n||Ie(function(){return fetch})||$u;return St(y,I).then(function(V){var wt;d.setContext({response:V});var Ut=(wt=V.headers)===null||wt===void 0?void 0:wt.get("content-type");return Ut!==null&&/^multipart\/mixed/i.test(Ut)?Tu(V,K):Iu(V,d,K)}).catch(function(V){return Yi(V,K)}),function(){ee&&ee.abort()}})})};var ns=function(r){ge(e,r);function e(t){t===void 0&&(t={});var n=r.call(this,Mu(t).request)||this;return n.options=t,n}return e}(st);var{toString:ju,hasOwnProperty:Kp}=Object.prototype,Uu=Function.prototype.toString,is=new Map;function ue(r,e){try{return as(r,e)}finally{is.clear()}}function as(r,e){if(r===e)return!0;let t=ju.call(r),n=ju.call(e);if(t!==n)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(Bu(r,e))return!0;let i=qu(r),a=qu(e),o=i.length;if(o!==a.length)return!1;for(let s=0;s<o;++s)if(!Kp.call(e,i[s]))return!1;for(let s=0;s<o;++s){let u=i[s];if(!as(r[u],e[u]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(Bu(r,e))return!0;let i=r.entries(),a=t==="[object Map]";for(;;){let o=i.next();if(o.done)break;let[s,u]=o.value;if(!e.has(s)||a&&!as(u,e.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let i=r.byteLength;if(i===e.byteLength)for(;i--&&r[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{let i=Uu.call(r);return i!==Uu.call(e)?!1:!Jp(i,Hp)}}return!1}function qu(r){return Object.keys(r).filter(zp,r)}function zp(r){return this[r]!==void 0}var Hp="{ [native code] }";function Jp(r,e){let t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function Bu(r,e){let t=is.get(r);if(t){if(t.has(e))return!0}else is.set(r,t=new Set);return t.add(e),!1}var Yp=function(){return Object.create(null)},Vu=Array.prototype,Xp=Vu.forEach,Zp=Vu.slice,Ot=function(){function r(e,t){e===void 0&&(e=!0),t===void 0&&(t=Yp),this.weakness=e,this.makeData=t}return r.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},r.prototype.lookupArray=function(e){var t=this;return Xp.call(e,function(n){return t=t.getChildTrie(n)}),t.data||(t.data=this.makeData(Zp.call(e)))},r.prototype.getChildTrie=function(e){var t=this.weakness&&ed(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=t.get(e);return n||t.set(e,n=new r(this.weakness,this.makeData)),n},r}();function ed(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}var Re=null,Qu={},td=1,rd=()=>class{constructor(){this.id=["slot",td++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=Re;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===Qu)break;return e!==Re&&(Re.slots[this.id]=t),!0}return Re&&(Re.slots[this.id]=Qu),!1}getValue(){if(this.hasValue())return Re.slots[this.id]}withValue(e,t,n,i){let a={__proto__:null,[this.id]:e},o=Re;Re={parent:o,slots:a};try{return t.apply(i,n)}finally{Re=o}}static bind(e){let t=Re;return function(){let n=Re;try{return Re=t,e.apply(this,arguments)}finally{Re=n}}}static noContext(e,t,n){if(Re){let i=Re;try{return Re=null,e.apply(n,t)}finally{Re=i}}else return e.apply(n,t)}};function Wu(r){try{return r()}catch{}}var os="@wry/context:Slot",nd=Wu(()=>globalThis)||Wu(()=>global)||Object.create(null),Gu=nd,cn=Gu[os]||Array[os]||function(r){try{Object.defineProperty(Gu,os,{value:r,enumerable:!1,writable:!1,configurable:!0})}finally{return r}}(rd());var{bind:ad,noContext:od}=cn;function sd(){}var cd=function(){function r(e,t){e===void 0&&(e=1/0),t===void 0&&(t=sd),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return r.prototype.has=function(e){return this.map.has(e)},r.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},r.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,i=t.newer;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t},r.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},r.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},r.prototype.delete=function(e){var t=this.map.get(e);return t?(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0):!1},r}(),Zi=new cn,ss,ud=Object.prototype.hasOwnProperty,us=(ss=Array.from,ss===void 0?function(r){var e=[];return r.forEach(function(t){return e.push(t)}),e}:ss);function Xi(r){var e=r.unsubscribe;typeof e=="function"&&(r.unsubscribe=void 0,e())}var Xn=[],ld=100;function un(r,e){if(!r)throw new Error(e||"assertion failure")}function fd(r,e){var t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function zu(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function pd(r){return r.slice(0)}var dd=function(){function r(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++r.count}return r.prototype.peek=function(){if(this.value.length===1&&!Yt(this))return Ku(this),this.value[0]},r.prototype.recompute=function(e){return un(!this.recomputing,"already recomputing"),Ku(this),Yt(this)?hd(this,e):zu(this.value)},r.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Hu(this),Xi(this))},r.prototype.dispose=function(){var e=this;this.setDirty(),el(this),ls(this,function(t,n){t.setDirty(),tl(t,e)})},r.prototype.forget=function(){this.dispose()},r.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Xn.pop()||new Set),this.deps.add(e)},r.prototype.forgetDeps=function(){var e=this;this.deps&&(us(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),Xn.push(this.deps),this.deps=null)},r.count=0,r}();function Ku(r){var e=Zi.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),Yt(r)?Yu(e,r):Xu(e,r),e}function hd(r,e){return el(r),Zi.withValue(r,md,[r,e]),gd(r,e)&&yd(r),zu(r.value)}function md(r,e){r.recomputing=!0,r.value.length=0;try{r.value[0]=r.fn.apply(null,e)}catch(t){r.value[1]=t}r.recomputing=!1}function Yt(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function yd(r){r.dirty=!1,!Yt(r)&&Ju(r)}function Hu(r){ls(r,Yu)}function Ju(r){ls(r,Xu)}function ls(r,e){var t=r.parents.size;if(t)for(var n=us(r.parents),i=0;i<t;++i)e(n[i],r)}function Yu(r,e){un(r.childValues.has(e)),un(Yt(e));var t=!Yt(r);if(!r.dirtyChildren)r.dirtyChildren=Xn.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),t&&Hu(r)}function Xu(r,e){un(r.childValues.has(e)),un(!Yt(e));var t=r.childValues.get(e);t.length===0?r.childValues.set(e,pd(e.value)):fd(t,e.value)||r.setDirty(),Zu(r,e),!Yt(r)&&Ju(r)}function Zu(r,e){var t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(Xn.length<ld&&Xn.push(t),r.dirtyChildren=null))}function el(r){r.childValues.size>0&&r.childValues.forEach(function(e,t){tl(r,t)}),r.forgetDeps(),un(r.dirtyChildren===null)}function tl(r,e){e.parents.delete(r),r.childValues.delete(e),Zu(r,e)}function gd(r,e){if(typeof r.subscribe=="function")try{Xi(r),r.unsubscribe=r.subscribe.apply(null,e)}catch{return r.setDirty(),!1}return!0}var vd={setDirty:!0,dispose:!0,forget:!0};function ea(r){var e=new Map,t=r&&r.subscribe;function n(i){var a=Zi.getValue();if(a){var o=e.get(i);o||e.set(i,o=new Set),a.dependOn(o),typeof t=="function"&&(Xi(o),o.unsubscribe=t(i))}}return n.dirty=function(a,o){var s=e.get(a);if(s){var u=o&&ud.call(vd,o)?o:"setDirty";us(s).forEach(function(l){return l[u]()}),e.delete(a),Xi(s)}},n}function rl(){var r=new Ot(typeof WeakMap=="function");return function(){return r.lookupArray(arguments)}}var x4=rl(),cs=new Set;function Or(r,e){e===void 0&&(e=Object.create(null));var t=new cd(e.max||Math.pow(2,16),function(l){return l.dispose()}),n=e.keyArgs,i=e.makeCacheKey||rl(),a=function(){var l=i.apply(null,n?n.apply(null,arguments):arguments);if(l===void 0)return r.apply(null,arguments);var f=t.get(l);f||(t.set(l,f=new dd(r)),f.subscribe=e.subscribe,f.forget=function(){return t.delete(l)});var p=f.recompute(Array.prototype.slice.call(arguments));return t.set(l,f),cs.add(t),Zi.hasValue()||(cs.forEach(function(h){return h.clean()}),cs.clear()),p};Object.defineProperty(a,"size",{get:function(){return t.map.size},configurable:!1,enumerable:!1});function o(l){var f=t.get(l);f&&f.setDirty()}a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))};function s(l){var f=t.get(l);if(f)return f.peek()}a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))};function u(l){return t.delete(l)}return a.forgetKey=u,a.forget=function(){return u(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(a)}var fs=function(){function r(){this.getFragmentDoc=Or(Do)}return r.prototype.batch=function(e){var t=this,n=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=e.update(t)},n),i},r.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},r.prototype.transformDocument=function(e){return e},r.prototype.transformForLink=function(e){return e},r.prototype.identify=function(e){},r.prototype.gc=function(){return[]},r.prototype.modify=function(e){return!1},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(m(m({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(m(m({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},r.prototype.writeQuery=function(e){var t=e.id,n=e.data,i=_t(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))},r.prototype.writeFragment=function(e){var t=e.id,n=e.data,i=e.fragment,a=e.fragmentName,o=_t(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(i,a),dataId:t,result:n}))},r.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var i=n.readQuery(e),a=t(i);return a==null?i:(n.writeQuery(m(m({},e),{data:a})),a)}})},r.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var i=n.readFragment(e),a=t(i);return a==null?i:(n.writeFragment(m(m({},e),{data:a})),a)}})},r}();var Zn=function(r){ge(e,r);function e(t,n,i,a){var o,s=r.call(this,t)||this;if(s.message=t,s.path=n,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=(o={},o[s.path[u]]=s.missing,o)}else s.missing=s.path;return s.__proto__=e.prototype,s}return e}(Error);var ve=Object.prototype.hasOwnProperty;function ei(r){return r==null}function ra(r,e){var t=r.__typename,n=r.id,i=r._id;if(typeof t=="string"&&(e&&(e.keyObject=ei(n)?ei(i)?void 0:{_id:i}:{id:n}),ei(n)&&!ei(i)&&(n=i),!ei(n)))return"".concat(t,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var nl={dataIdFromObject:ra,addTypename:!0,resultCaching:!0,canonizeResults:!1};function il(r){return Jt(nl,r)}function na(r){var e=r.canonizeResults;return e===void 0?nl.canonizeResults:e}function al(r,e){return W(e)?r.get(e.__ref,"__typename"):e&&e.__typename}var ps=/^[_a-z][_0-9a-z]*/i;function yt(r){var e=r.match(ps);return e?e[0]:r}function ta(r,e,t){return z(e)?ne(e)?e.every(function(n){return ta(r,n,t)}):r.selections.every(function(n){if(et(n)&&Dt(n,t)){var i=at(n);return ve.call(e,i)&&(!n.selectionSet||ta(n.selectionSet,e[i],t))}return!0}):!1}function Xt(r){return z(r)&&!W(r)&&!ne(r)}function ol(){return new ze}function ia(r,e){var t=br(Sr(r));return{fragmentMap:t,lookupFragment:function(n){var i=t[n];return!i&&e&&(i=e.lookup(n)),i||null}}}var aa=Object.create(null),ds=function(){return aa},sl=Object.create(null),ln=function(){function r(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return Gn(W(i)?n.get(i.__ref,a):i&&i[a])},this.canRead=function(i){return W(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return Et(i);if(W(i))return i;var o=n.policies.identify(i)[0];if(o){var s=Et(o);return a&&n.merge(o,i),s}}}return r.prototype.toObject=function(){return m({},this.data)},r.prototype.has=function(e){return this.lookup(e,!0)!==void 0},r.prototype.get=function(e,t){if(this.group.depend(e,t),ve.call(this.data,e)){var n=this.data[e];if(n&&ve.call(n,t))return n[t]}if(t==="__typename"&&ve.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof Zt)return this.parent.get(e,t)},r.prototype.lookup=function(e,t){if(t&&this.group.depend(e,"__exists"),ve.call(this.data,e))return this.data[e];if(this instanceof Zt)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return Object.create(null)},r.prototype.merge=function(e,t){var n=this,i;W(e)&&(e=e.__ref),W(t)&&(t=t.__ref);var a=typeof e=="string"?this.lookup(i=e):e,o=typeof t=="string"?this.lookup(i=t):t;if(!!o){__DEV__?T(typeof i=="string","store.merge expects a string ID"):T(typeof i=="string",1);var s=new ze(Cd).merge(a,o);if(this.data[i]=s,s!==a&&(delete this.refs[i],this.group.caching)){var u=Object.create(null);a||(u.__exists=1),Object.keys(o).forEach(function(l){if(!a||a[l]!==s[l]){u[l]=1;var f=yt(l);f!==l&&!n.policies.hasKeyArgs(s.__typename,f)&&(u[f]=1),s[l]===void 0&&!(n instanceof Zt)&&delete s[l]}}),u.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete u.__typename,Object.keys(u).forEach(function(l){return n.group.dirty(i,l)})}}},r.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var a=Object.create(null),o=!1,s=!0,u={DELETE:aa,INVALIDATE:sl,isReference:W,toReference:this.toReference,canRead:this.canRead,readField:function(l,f){return n.policies.readField(typeof l=="string"?{fieldName:l,from:f||Et(e)}:l,{store:n})}};if(Object.keys(i).forEach(function(l){var f=yt(l),p=i[l];if(p!==void 0){var h=typeof t=="function"?t:t[l]||t[f];if(h){var d=h===ds?aa:h(Gn(p),m(m({},u),{fieldName:f,storeFieldName:l,storage:n.getStorage(e,l)}));d===sl?n.group.dirty(e,l):(d===aa&&(d=void 0),d!==p&&(a[l]=d,o=!0,p=d))}p!==void 0&&(s=!1)}}),o)return this.merge(e,a),s&&(this instanceof Zt?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},r.prototype.delete=function(e,t,n){var i,a=this.lookup(e);if(a){var o=this.getFieldValue(a,"__typename"),s=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,s?(i={},i[s]=ds,i):ds)}return!1},r.prototype.evict=function(e,t){var n=!1;return e.id&&(ve.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Zt&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},r.prototype.clear=function(){this.replace(null)},r.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){ve.call(e.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},r.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(a){e&&ve.call(e,a)||t.delete(a)}),e){var n=e.__META,i=_t(e,["__META"]);Object.keys(i).forEach(function(a){t.merge(a,i[a])}),n&&n.extraRootIds.forEach(this.retain,this)}},r.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},r.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},r.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Zt?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},r.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(o){ve.call(n,o)&&(Object.keys(e.findChildRefIds(o)).forEach(t.add,t),delete n[o])});var i=Object.keys(n);if(i.length){for(var a=this;a instanceof Zt;)a=a.parent;i.forEach(function(o){return a.delete(o)})}return i},r.prototype.findChildRefIds=function(e){if(!ve.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var i=new Set([n]);i.forEach(function(a){W(a)&&(t[a.__ref]=!0),z(a)&&Object.keys(a).forEach(function(o){var s=a[o];z(s)&&i.add(s)})})}return this.refs[e]},r.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},r}();var cl=function(){function r(e,t){t===void 0&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return r.prototype.resetCaching=function(){this.d=this.caching?ea():null,this.keyMaker=new Ot(ot)},r.prototype.depend=function(e,t){if(this.d){this.d(hs(e,t));var n=yt(t);n!==t&&this.d(hs(e,n)),this.parent&&this.parent.depend(e,t)}},r.prototype.dirty=function(e,t){this.d&&this.d.dirty(hs(e,t),t==="__exists"?"forget":"setDirty")},r}();function hs(r,e){return e+"#"+r}function ms(r,e){Tr(r)&&r.group.depend(e,"__exists")}(function(r){var e=function(t){ge(n,t);function n(i){var a=i.policies,o=i.resultCaching,s=o===void 0?!0:o,u=i.seed,l=t.call(this,a,new cl(s))||this;return l.stump=new bd(l),l.storageTrie=new Ot(ot),u&&l.replace(u),l}return n.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(r);r.Root=e})(ln||(ln={}));var Zt=function(r){ge(e,r);function e(t,n,i,a){var o=r.call(this,n.policies,a)||this;return o.id=t,o.parent=n,o.replay=i,o.group=a,i(o),o}return e.prototype.addLayer=function(t,n){return new e(t,this,n,this.group)},e.prototype.removeLayer=function(t){var n=this,i=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var o=n.data[a],s=i.lookup(a);s?o?o!==s&&Object.keys(o).forEach(function(u){ue(o[u],s[u])||n.group.dirty(a,u)}):(n.group.dirty(a,"__exists"),Object.keys(s).forEach(function(u){n.group.dirty(a,u)})):n.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return m(m({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ve.call(this.data,t)?m(m({},n),r.prototype.findChildRefIds.call(this,t)):n},e.prototype.getStorage=function(){for(var t=this.parent;t.parent;)t=t.parent;return t.getStorage.apply(t,arguments)},e}(ln),bd=function(r){ge(e,r);function e(t){return r.call(this,"EntityStore.Stump",t,function(){},new cl(t.group.caching,t.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},e}(Zt);function Cd(r,e,t){var n=r[t],i=e[t];return ue(n,i)?n:i}function Tr(r){return!!(r instanceof ln&&r.group.caching)}function Sd(r){return z(r)?ne(r)?r.slice(0):m({__proto__:Object.getPrototypeOf(r)},r):r}var oa=function(){function r(){this.known=new(pu?WeakSet:Set),this.pool=new Ot(ot),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return r.prototype.isKnown=function(e){return z(e)&&this.known.has(e)},r.prototype.pass=function(e){if(z(e)){var t=Sd(e);return this.passes.set(t,e),t}return e},r.prototype.admit=function(e){var t=this;if(z(e)){var n=this.passes.get(e);if(n)return n;var i=Object.getPrototypeOf(e);switch(i){case Array.prototype:{if(this.known.has(e))return e;var a=e.map(this.admit,this),o=this.pool.lookupArray(a);return o.array||(this.known.add(o.array=a),__DEV__&&Object.freeze(a)),o.array}case null:case Object.prototype:{if(this.known.has(e))return e;var s=Object.getPrototypeOf(e),u=[s],l=this.sortedKeys(e);u.push(l.json);var f=u.length;l.sorted.forEach(function(d){u.push(t.admit(e[d]))});var o=this.pool.lookupArray(u);if(!o.object){var p=o.object=Object.create(s);this.known.add(p),l.sorted.forEach(function(d,y){p[d]=u[f+y]}),__DEV__&&Object.freeze(p)}return o.object}}}return e},r.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var i=JSON.stringify(t);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:t,json:i})}return n.keys},r}();var tt=Object.assign(function(r){if(z(r)){ys===void 0&&ul();var e=ys.admit(r),t=gs.get(e);return t===void 0&&gs.set(e,t=JSON.stringify(e)),t}return JSON.stringify(r)},{reset:ul}),ys,gs;function ul(){ys=new oa,gs=new(ot?WeakMap:Map)}function ll(r){return[r.selectionSet,r.objectOrReference,r.context,r.context.canonizeResults]}var fl=function(){function r(e){var t=this;this.knownResults=new(ot?WeakMap:Map),this.config=Jt(e,{addTypename:e.addTypename!==!1,canonizeResults:na(e)}),this.canon=e.canon||new oa,this.executeSelectionSet=Or(function(n){var i,a=n.context.canonizeResults,o=ll(n);o[3]=!a;var s=(i=t.executeSelectionSet).peek.apply(i,o);return s?a?m(m({},s),{result:t.canon.admit(s.result)}):s:(ms(n.context.store,n.enclosingRef.__ref),t.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize,keyArgs:ll,makeCacheKey:function(n,i,a,o){if(Tr(a.store))return a.store.makeCacheKey(n,W(i)?i.__ref:i,a.varString,o)}}),this.executeSubSelectedArray=Or(function(n){return ms(n.context.store,n.enclosingRef.__ref),t.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(n){var i=n.field,a=n.array,o=n.context;if(Tr(o.store))return o.store.makeCacheKey(i,a,o.varString)}})}return r.prototype.resetCanon=function(){this.canon=new oa},r.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.rootId,a=i===void 0?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,u=s===void 0?!0:s,l=e.canonizeResults,f=l===void 0?this.config.canonizeResults:l,p=this.config.cache.policies;o=m(m({},_r(Vn(n))),o);var h=Et(a),d=this.executeSelectionSet({selectionSet:wr(n).selectionSet,objectOrReference:h,enclosingRef:h,context:m({store:t,query:n,policies:p,variables:o,varString:tt(o),canonizeResults:f},ia(n,this.config.fragments))}),y;if(d.missing&&(y=[new Zn(wd(d.missing),d.missing,n,o)],!u))throw y[0];return{result:d.result,complete:!y,missing:y}},r.prototype.isFresh=function(e,t,n,i){if(Tr(i.store)&&this.knownResults.get(e)===n){var a=this.executeSelectionSet.peek(n,t,i,this.canon.isKnown(e));if(a&&e===a.result)return!0}return!1},r.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,o=e.context;if(W(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,u=o.policies,l=o.store,f=l.getFieldValue(i,"__typename"),p=[],h,d=new ze;this.config.addTypename&&typeof f=="string"&&!u.rootIdsByTypename[f]&&p.push({__typename:f});function y(S,O){var k;return S.missing&&(h=d.merge(h,(k={},k[O]=S.missing,k))),S.result}var g=new Set(n.selections);g.forEach(function(S){var O,k;if(!!Dt(S,s))if(et(S)){var N=u.readField({fieldName:S.name.value,field:S,variables:o.variables,from:i},o),I=at(S);N===void 0?Er.added(S)||(h=d.merge(h,(O={},O[I]="Can't find field '".concat(S.name.value,"' on ").concat(W(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),O))):ne(N)?N=y(t.executeSubSelectedArray({field:S,array:N,enclosingRef:a,context:o}),I):S.selectionSet?N!=null&&(N=y(t.executeSelectionSet({selectionSet:S.selectionSet,objectOrReference:N,enclosingRef:W(N)?N:a,context:o}),I)):o.canonizeResults&&(N=t.canon.pass(N)),N!==void 0&&p.push((k={},k[I]=N,k))}else{var R=Cr(S,o.lookupFragment);if(!R&&S.kind===we.FRAGMENT_SPREAD)throw __DEV__?new U("No fragment named ".concat(S.name.value)):new U(5);R&&u.fragmentMatches(R,f)&&R.selectionSet.selections.forEach(g.add,g)}});var C=Qn(p),_={result:C,missing:h},b=o.canonizeResults?this.canon.admit(_):Gn(_);return b.result&&this.knownResults.set(b.result,n),b},r.prototype.execSubSelectedArrayImpl=function(e){var t=this,n=e.field,i=e.array,a=e.enclosingRef,o=e.context,s,u=new ze;function l(f,p){var h;return f.missing&&(s=u.merge(s,(h={},h[p]=f.missing,h))),f.result}return n.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(f,p){return f===null?null:ne(f)?l(t.executeSubSelectedArray({field:n,array:f,enclosingRef:a,context:o}),p):n.selectionSet?l(t.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:f,enclosingRef:W(f)?f:a,context:o}),p):(__DEV__&&_d(o.store,n,f),f)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:s}},r}();function wd(r){try{JSON.stringify(r,function(e,t){if(typeof t=="string")throw t;return t})}catch(e){return e}}function _d(r,e,t){if(!e.selectionSet){var n=new Set([t]);n.forEach(function(i){z(i)&&(__DEV__?T(!W(i),"Missing selection set for object of type ".concat(al(r,i)," returned for query field ").concat(e.name.value)):T(!W(i),6),Object.values(i).forEach(n.add,n))})}}var fn=new cn,pl=new WeakMap;function ti(r){var e=pl.get(r);return e||pl.set(r,e={vars:new Set,dep:ea()}),e}function vs(r){ti(r).vars.forEach(function(e){return e.forgetCache(r)})}function dl(r){ti(r).vars.forEach(function(e){return e.attachCache(r)})}function sa(r){var e=new Set,t=new Set,n=function(a){if(arguments.length>0){if(r!==a){r=a,e.forEach(function(u){ti(u).dep.dirty(n),Ed(u)});var o=Array.from(t);t.clear(),o.forEach(function(u){return u(r)})}}else{var s=fn.getValue();s&&(i(s),ti(s).dep(n))}return r};n.onNextChange=function(a){return t.add(a),function(){t.delete(a)}};var i=n.attachCache=function(a){return e.add(a),ti(a).vars.add(n),n};return n.forgetCache=function(a){return e.delete(a)},n}function Ed(r){r.broadcastWatches&&r.broadcastWatches()}var hl=Object.create(null);function bs(r){var e=JSON.stringify(r);return hl[e]||(hl[e]=Object.create(null))}function Cs(r){var e=bs(r);return e.keyFieldsFn||(e.keyFieldsFn=function(t,n){var i=function(o,s){return n.readField(s,o)},a=n.keyObject=ws(r,function(o){var s=pn(n.storeObject,o,i);return s===void 0&&t!==n.storeObject&&ve.call(t,o[0])&&(s=pn(t,o,yl)),__DEV__?T(s!==void 0,"Missing field '".concat(o.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):T(s!==void 0,2),s});return"".concat(n.typename,":").concat(JSON.stringify(a))})}function Ss(r){var e=bs(r);return e.keyArgsFn||(e.keyArgsFn=function(t,n){var i=n.field,a=n.variables,o=n.fieldName,s=ws(r,function(l){var f=l[0],p=f.charAt(0);if(p==="@"){if(i&&xe(i.directives)){var h=f.slice(1),d=i.directives.find(function(_){return _.name.value===h}),y=d&&Nt(d,a);return y&&pn(y,l.slice(1))}return}if(p==="$"){var g=f.slice(1);if(a&&ve.call(a,g)){var C=l.slice(0);return C[0]=g,pn(a,C)}return}if(t)return pn(t,l)}),u=JSON.stringify(s);return(t||u!=="{}")&&(o+=":"+u),o})}function ws(r,e){var t=new ze;return ml(r).reduce(function(n,i){var a,o=e(i);if(o!==void 0){for(var s=i.length-1;s>=0;--s)o=(a={},a[i[s]]=o,a);n=t.merge(n,o)}return n},Object.create(null))}function ml(r){var e=bs(r);if(!e.paths){var t=e.paths=[],n=[];r.forEach(function(i,a){ne(i)?(ml(i).forEach(function(o){return t.push(n.concat(o))}),n.length=0):(n.push(i),ne(r[a+1])||(t.push(n.slice(0)),n.length=0))})}return e.paths}function yl(r,e){return r[e]}function pn(r,e,t){return t=t||yl,gl(e.reduce(function n(i,a){return ne(i)?i.map(function(o){return n(o,a)}):i&&t(i,a)},r))}function gl(r){return z(r)?ne(r)?r.map(gl):ws(Object.keys(r).sort(),function(e){return pn(r,e)}):r}qn.setStringify(tt);function _s(r){return r.args!==void 0?r.args:r.field?Nt(r.field,r.variables):null}var xd=function(){},vl=function(r,e){return e.fieldName},bl=function(r,e,t){var n=t.mergeObjects;return n(r,e)},Cl=function(r,e){return e},wl=function(){function r(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=m({dataIdFromObject:ra},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return r.prototype.identify=function(e,t){var n,i=this,a=t&&(t.typename||((n=t.storeObject)===null||n===void 0?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=t&&t.storeObject||e,s=m(m({},t),{typename:a,storeObject:o,readField:t&&t.readField||function(){var h=ca(arguments,o);return i.readField(h,{store:i.cache.data,variables:h.variables})}}),u,l=a&&this.getTypePolicy(a),f=l&&l.keyFn||this.config.dataIdFromObject;f;){var p=f(e,s);if(ne(p))f=Cs(p);else{u=p;break}}return u=u?String(u):void 0,s.keyObject?[u,s.keyObject]:[u]},r.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var i=e[n],a=i.queryType,o=i.mutationType,s=i.subscriptionType,u=_t(i,["queryType","mutationType","subscriptionType"]);a&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),s&&t.setRootTypename("Subscription",n),ve.call(t.toBeAdded,n)?t.toBeAdded[n].push(u):t.toBeAdded[n]=[u]})},r.prototype.updateTypePolicy=function(e,t){var n=this,i=this.getTypePolicy(e),a=t.keyFields,o=t.fields;function s(u,l){u.merge=typeof l=="function"?l:l===!0?bl:l===!1?Cl:u.merge}s(i,t.merge),i.keyFn=a===!1?xd:ne(a)?Cs(a):typeof a=="function"?a:i.keyFn,o&&Object.keys(o).forEach(function(u){var l=n.getFieldPolicy(e,u,!0),f=o[u];if(typeof f=="function")l.read=f;else{var p=f.keyArgs,h=f.read,d=f.merge;l.keyFn=p===!1?vl:ne(p)?Ss(p):typeof p=="function"?p:l.keyFn,typeof h=="function"&&(l.read=h),s(l,d)}l.read&&l.merge&&(l.keyFn=l.keyFn||vl)})},r.prototype.setRootTypename=function(e,t){t===void 0&&(t=e);var n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(__DEV__?T(!i||i===e,"Cannot change root ".concat(e," __typename more than once")):T(!i||i===e,3),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},r.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(i){t.getSupertypeSet(i,!0).add(n);var a=i.match(ps);(!a||a[0]!==i)&&t.fuzzySubtypes.set(i,new RegExp(i))})})},r.prototype.getTypePolicy=function(e){var t=this;if(!ve.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach(function(o){var s=t.getTypePolicy(o),u=s.fields,l=_t(s,["fields"]);Object.assign(n,l),Object.assign(n.fields,u)})}var a=this.toBeAdded[e];return a&&a.length&&a.splice(0).forEach(function(o){t.updateTypePolicy(e,o)}),this.typePolicies[e]},r.prototype.getFieldPolicy=function(e,t,n){if(e){var i=this.getTypePolicy(e).fields;return i[t]||n&&(i[t]=Object.create(null))}},r.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},r.prototype.fragmentMatches=function(e,t,n,i){var a=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),u=[s],l=function(y){var g=a.getSupertypeSet(y,!1);g&&g.size&&u.indexOf(g)<0&&u.push(g)},f=!!(n&&this.fuzzySubtypes.size),p=!1,h=0;h<u.length;++h){var d=u[h];if(d.has(o))return s.has(o)||(p&&__DEV__&&T.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(l),f&&h===u.length-1&&ta(e.selectionSet,n,i)&&(f=!1,p=!0,this.fuzzySubtypes.forEach(function(y,g){var C=t.match(y);C&&C[0]===t&&l(g)}))}return!1},r.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},r.prototype.getStoreFieldName=function(e){var t=e.typename,n=e.fieldName,i=this.getFieldPolicy(t,n,!1),a,o=i&&i.keyFn;if(o&&t)for(var s={typename:t,fieldName:n,field:e.field||null,variables:e.variables},u=_s(e);o;){var l=o(u,s);if(ne(l))o=Ss(l);else{a=l||n;break}}return a===void 0&&(a=e.field?Po(e.field,e.variables):qn(n,_s(e))),a===!1?n:n===yt(a)?a:n+":"+a},r.prototype.readField=function(e,t){var n=e.from;if(!!n){var i=e.field||e.fieldName;if(!!i){if(e.typename===void 0){var a=t.store.getFieldValue(n,"__typename");a&&(e.typename=a)}var o=this.getStoreFieldName(e),s=yt(o),u=t.store.getFieldValue(n,o),l=this.getFieldPolicy(e.typename,s,!1),f=l&&l.read;if(f){var p=Sl(this,n,e,t,t.store.getStorage(W(n)?n.__ref:n,o));return fn.withValue(this.cache,f,[u,p])}return u}}},r.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},r.prototype.getMergeFunction=function(e,t,n){var i=this.getFieldPolicy(e,t,!1),a=i&&i.merge;return!a&&n&&(i=this.getTypePolicy(n),a=i&&i.merge),a},r.prototype.runMergeFunction=function(e,t,n,i,a){var o=n.field,s=n.typename,u=n.merge;return u===bl?_l(i.store)(e,t):u===Cl?t:(i.overwrite&&(e=void 0),u(e,t,Sl(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:i.variables},i,a||Object.create(null))))},r}();function Sl(r,e,t,n,i){var a=r.getStoreFieldName(t),o=yt(a),s=t.variables||n.variables,u=n.store,l=u.toReference,f=u.canRead;return{args:_s(t),field:t.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:W,toReference:l,storage:i,cache:r.cache,canRead:f,readField:function(){return r.readField(ca(arguments,e,s),n)},mergeObjects:_l(n.store)}}function ca(r,e,t){var n=r[0],i=r[1],a=r.length,o;return typeof n=="string"?o={fieldName:n,from:a>1?i:e}:(o=m({},n),ve.call(o,"from")||(o.from=e)),__DEV__&&o.from===void 0&&__DEV__&&T.warn("Undefined 'from' passed to readField with arguments ".concat(yu(Array.from(r)))),o.variables===void 0&&(o.variables=t),o}function _l(r){return function(t,n){if(ne(t)||ne(n))throw __DEV__?new U("Cannot automatically merge arrays"):new U(4);if(z(t)&&z(n)){var i=r.getFieldValue(t,"__typename"),a=r.getFieldValue(n,"__typename"),o=i&&a&&i!==a;if(o)return n;if(W(t)&&Xt(n))return r.merge(t.__ref,n),t;if(Xt(t)&&W(n))return r.merge(t,n.__ref),n;if(Xt(t)&&Xt(n))return m(m({},t),n)}return n}}function Es(r,e,t){var n="".concat(e).concat(t),i=r.flavors.get(n);return i||r.flavors.set(n,i=r.clientOnly===e&&r.deferred===t?r:m(m({},r),{clientOnly:e,deferred:t})),i}var Tl=function(){function r(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return r.prototype.writeToStore=function(e,t){var n=this,i=t.query,a=t.result,o=t.dataId,s=t.variables,u=t.overwrite,l=xt(i),f=ol();s=m(m({},_r(l)),s);var p=m(m({store:e,written:Object.create(null),merge:function(d,y){return f.merge(d,y)},variables:s,varString:tt(s)},ia(i,this.fragments)),{overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:a||Object.create(null),dataId:o,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:p});if(!W(h))throw __DEV__?new U("Could not identify object ".concat(JSON.stringify(a))):new U(7);return p.incomingById.forEach(function(d,y){var g=d.storeObject,C=d.mergeTree,_=d.fieldNodeSet,b=Et(y);if(C&&C.map.size){var S=n.applyMerges(C,b,g,p);if(W(S))return;g=S}if(__DEV__&&!p.overwrite){var O=Object.create(null);_.forEach(function(I){I.selectionSet&&(O[I.name.value]=!0)});var k=function(I){return O[yt(I)]===!0},N=function(I){var R=C&&C.map.get(I);return Boolean(R&&R.info&&R.info.merge)};Object.keys(g).forEach(function(I){k(I)&&!N(I)&&Od(b,g,I,p.store)})}e.merge(y,g)}),e.retain(h.__ref),h},r.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,a=e.selectionSet,o=e.context,s=e.mergeTree,u=this.cache.policies,l=Object.create(null),f=n&&u.rootTypenamesById[n]||Bn(i,a,o.fragmentMap)||n&&o.store.get(n,"__typename");typeof f=="string"&&(l.__typename=f);var p=function(){var S=ca(arguments,l,o.variables);if(W(S.from)){var O=o.incomingById.get(S.from.__ref);if(O){var k=u.readField(m(m({},S),{from:O.storeObject}),o);if(k!==void 0)return k}}return u.readField(S,o)},h=new Set;this.flattenFields(a,i,o,f).forEach(function(S,O){var k,N=at(O),I=i[N];if(h.add(O),I!==void 0){var R=u.getStoreFieldName({typename:f,fieldName:O.name.value,field:O,variables:S.variables}),re=El(s,R),ee=t.processFieldValue(I,O,O.selectionSet?Es(S,!1,!1):S,re),Ct=void 0;O.selectionSet&&(W(ee)||Xt(ee))&&(Ct=p("__typename",ee));var It=u.getMergeFunction(f,O.name.value,Ct);It?re.info={field:O,typename:f,merge:It}:xl(s,R),l=S.merge(l,(k={},k[R]=ee,k))}else __DEV__&&!S.clientOnly&&!S.deferred&&!Er.added(O)&&!u.getReadFunction(f,O.name.value)&&__DEV__&&T.error("Missing field '".concat(at(O),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))});try{var d=u.identify(i,{typename:f,selectionSet:a,fragmentMap:o.fragmentMap,storeObject:l,readField:p}),y=d[0],g=d[1];n=n||y,g&&(l=o.merge(l,g))}catch(S){if(!n)throw S}if(typeof n=="string"){var C=Et(n),_=o.written[n]||(o.written[n]=[]);if(_.indexOf(a)>=0||(_.push(a),this.reader&&this.reader.isFresh(i,C,a,o)))return C;var b=o.incomingById.get(n);return b?(b.storeObject=o.merge(b.storeObject,l),b.mergeTree=xs(b.mergeTree,s),h.forEach(function(S){return b.fieldNodeSet.add(S)})):o.incomingById.set(n,{storeObject:l,mergeTree:ua(s)?void 0:s,fieldNodeSet:h}),C}return l},r.prototype.processFieldValue=function(e,t,n,i){var a=this;return!t.selectionSet||e===null?__DEV__?Vi(e):e:ne(e)?e.map(function(o,s){var u=a.processFieldValue(o,t,n,El(i,s));return xl(i,s),u}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i})},r.prototype.flattenFields=function(e,t,n,i){i===void 0&&(i=Bn(t,e,n.fragmentMap));var a=new Map,o=this.cache.policies,s=new Ot(!1);return function u(l,f){var p=s.lookup(l,f.clientOnly,f.deferred);p.visited||(p.visited=!0,l.selections.forEach(function(h){if(!!Dt(h,n.variables)){var d=f.clientOnly,y=f.deferred;if(!(d&&y)&&xe(h.directives)&&h.directives.forEach(function(_){var b=_.name.value;if(b==="client"&&(d=!0),b==="defer"){var S=Nt(_,n.variables);(!S||S.if!==!1)&&(y=!0)}}),et(h)){var g=a.get(h);g&&(d=d&&g.clientOnly,y=y&&g.deferred),a.set(h,Es(n,d,y))}else{var C=Cr(h,n.lookupFragment);if(!C&&h.kind===we.FRAGMENT_SPREAD)throw __DEV__?new U("No fragment named ".concat(h.name.value)):new U(8);C&&o.fragmentMatches(C,i,t,n.variables)&&u(C.selectionSet,Es(n,d,y))}}}))}(e,n),a},r.prototype.applyMerges=function(e,t,n,i,a){var o,s=this;if(e.map.size&&!W(n)){var u=!ne(n)&&(W(t)||Xt(t))?t:void 0,l=n;u&&!a&&(a=[W(u)?u.__ref:u]);var f,p=function(h,d){return ne(h)?typeof d=="number"?h[d]:void 0:i.store.getFieldValue(h,String(d))};e.map.forEach(function(h,d){var y=p(u,d),g=p(l,d);if(g!==void 0){a&&a.push(d);var C=s.applyMerges(h,y,g,i,a);C!==g&&(f=f||new Map,f.set(d,C)),a&&T(a.pop()===d)}}),f&&(n=ne(l)?l.slice(0):m({},l),f.forEach(function(h,d){n[d]=h}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,a&&(o=i.store).getStorage.apply(o,a)):n},r}();var Al=[];function El(r,e){var t=r.map;return t.has(e)||t.set(e,Al.pop()||{map:new Map}),t.get(e)}function xs(r,e){if(r===e||!e||ua(e))return r;if(!r||ua(r))return e;var t=r.info&&e.info?m(m({},r.info),e.info):r.info||e.info,n=r.map.size&&e.map.size,i=n?new Map:r.map.size?r.map:e.map,a={info:t,map:i};if(n){var o=new Set(e.map.keys());r.map.forEach(function(s,u){a.map.set(u,xs(s,e.map.get(u))),o.delete(u)}),o.forEach(function(s){a.map.set(s,xs(e.map.get(s),r.map.get(s)))})}return a}function ua(r){return!r||!(r.info||r.map.size)}function xl(r,e){var t=r.map,n=t.get(e);n&&ua(n)&&(Al.push(n),t.delete(e))}var Ol=new Set;function Od(r,e,t,n){var i=function(p){var h=n.getFieldValue(p,t);return typeof h=="object"&&h},a=i(r);if(!!a){var o=i(e);if(!!o&&!W(a)&&!ue(a,o)&&!Object.keys(a).every(function(p){return n.getFieldValue(o,p)!==void 0})){var s=n.getFieldValue(r,"__typename")||n.getFieldValue(e,"__typename"),u=yt(t),l="".concat(s,".").concat(u);if(!Ol.has(l)){Ol.add(l);var f=[];!ne(a)&&!ne(o)&&[a,o].forEach(function(p){var h=n.getFieldValue(p,"__typename");typeof h=="string"&&!f.includes(h)&&f.push(h)}),__DEV__&&T.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s,` object.
39
+
40
+ To address this problem (which is not a bug in Apollo Client), `).concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l,` field, so InMemoryCache can safely merge these objects:
41
+
42
+ existing: `).concat(JSON.stringify(a).slice(0,1e3),`
43
+ incoming: `).concat(JSON.stringify(o).slice(0,1e3),`
44
+
45
+ For more information about these options, please refer to the documentation:
46
+
47
+ * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers
48
+ * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects
49
+ `))}}}}var la=function(r){ge(e,r);function e(t){t===void 0&&(t={});var n=r.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=sa,n.txCount=0,n.config=il(t),n.addTypename=!!n.config.addTypename,n.policies=new wl({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return e.prototype.init=function(){var t=this.data=new ln.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()},e.prototype.resetResultCache=function(t){var n=this,i=this.storeReader,a=this.config.fragments;this.storeWriter=new Tl(this,this.storeReader=new fl({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:na(this.config),canon:t?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Or(function(o,s){return n.broadcastWatch(o,s)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(o){var s=o.optimistic?n.optimisticData:n.data;if(Tr(s)){var u=o.optimistic,l=o.id,f=o.variables;return s.makeCacheKey(o.query,o.callback,tt({optimistic:u,id:l,variables:f}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(o){return o.resetCaching()})},e.prototype.restore=function(t){return this.init(),t&&this.data.replace(t),this},e.prototype.extract=function(t){return t===void 0&&(t=!1),(t?this.optimisticData:this.data).extract()},e.prototype.read=function(t){var n=t.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(m(m({},t),{store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof Zn)return null;throw a}},e.prototype.write=function(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(t){if(ve.call(t,"id")&&!t.id)return!1;var n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(t){return this.storeReader.diffQueryAgainstStore(m(m({},t),{store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(t){var n=this;return this.watches.size||dl(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),function(){n.watches.delete(t)&&!n.watches.size&&vs(n),n.maybeBroadcastWatch.forget(t)}},e.prototype.gc=function(t){tt.reset();var n=this.optimisticData.gc();return t&&!this.txCount&&(t.resetResultCache?this.resetResultCache(t.resetResultIdentities):t.resetResultIdentities&&this.storeReader.resetCanon()),n},e.prototype.retain=function(t,n){return(n?this.optimisticData:this.data).retain(t)},e.prototype.release=function(t,n){return(n?this.optimisticData:this.data).release(t)},e.prototype.identify=function(t){if(W(t))return t.__ref;try{return this.policies.identify(t)[0]}catch(n){__DEV__&&T.warn(n)}},e.prototype.evict=function(t){if(!t.id){if(ve.call(t,"id"))return!1;t=m(m({},t),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(t){var n=this;return this.init(),tt.reset(),t&&t.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),vs(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(t){var n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},e.prototype.batch=function(t){var n=this,i=t.update,a=t.optimistic,o=a===void 0?!0:a,s=t.removeOptimistic,u=t.onWatchUpdated,l,f=function(h){var d=n,y=d.data,g=d.optimisticData;++n.txCount,h&&(n.data=n.optimisticData=h);try{return l=i(n)}finally{--n.txCount,n.data=y,n.optimisticData=g}},p=new Set;return u&&!this.txCount&&this.broadcastWatches(m(m({},t),{onWatchUpdated:function(h){return p.add(h),!1}})),typeof o=="string"?this.optimisticData=this.optimisticData.addLayer(o,f):o===!1?f(this.data):f(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),u&&p.size?(this.broadcastWatches(m(m({},t),{onWatchUpdated:function(h,d){var y=u.call(this,h,d);return y!==!1&&p.delete(h),y}})),p.size&&p.forEach(function(h){return n.maybeBroadcastWatch.dirty(h)})):this.broadcastWatches(t),l},e.prototype.performTransaction=function(t,n){return this.batch({update:t,optimistic:n||n!==null})},e.prototype.transformDocument=function(t){if(this.addTypename){var n=this.typenameDocumentCache.get(t);return n||(n=Er(t),this.typenameDocumentCache.set(t,n),this.typenameDocumentCache.set(n,n)),n}return t},e.prototype.transformForLink=function(t){var n=this.config.fragments;return n?n.transform(t):t},e.prototype.broadcastWatches=function(t){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,t)})},e.prototype.broadcastWatch=function(t,n){var i=t.lastDiff,a=this.diff(t);n&&(t.optimistic&&typeof n.optimistic=="string"&&(a.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,t,a,i)===!1)||(!i||!ue(i.result,a.result))&&t.callback(t.lastDiff=a,i)},e}(fs);function Il(r){return r.hasOwnProperty("graphQLErrors")}var Td=function(r){var e="";if(xe(r.graphQLErrors)||xe(r.clientErrors)){var t=(r.graphQLErrors||[]).concat(r.clientErrors||[]);t.forEach(function(n){var i=n?n.message:"Error message not found.";e+="".concat(i,`
50
+ `)})}return r.networkError&&(e+="".concat(r.networkError.message,`
51
+ `)),e=e.replace(/\n$/,""),e},Pt=function(r){ge(e,r);function e(t){var n=t.graphQLErrors,i=t.clientErrors,a=t.networkError,o=t.errorMessage,s=t.extraInfo,u=r.call(this,o)||this;return u.name="ApolloError",u.graphQLErrors=n||[],u.clientErrors=i||[],u.networkError=a||null,u.message=o||Td(u),u.extraInfo=s,u.__proto__=e.prototype,u}return e}(Error);var te;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error"})(te||(te={}));function er(r){return r?r<7:!1}var Ad=Object.assign,Id=Object.hasOwnProperty,fa=function(r){ge(e,r);function e(t){var n=t.queryManager,i=t.queryInfo,a=t.options,o=r.call(this,function(C){try{var _=C._subscription._observer;_&&!_.error&&(_.error=kd)}catch{}var b=!o.observers.size;o.observers.add(C);var S=o.last;return S&&S.error?C.error&&C.error(S.error):S&&S.result&&C.next&&C.next(S.result),b&&o.reobserve().catch(function(){}),function(){o.observers.delete(C)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=i,o.queryManager=n,o.isTornDown=!1;var s=n.defaultOptions.watchQuery,u=s===void 0?{}:s,l=u.fetchPolicy,f=l===void 0?"cache-first":l,p=a.fetchPolicy,h=p===void 0?f:p,d=a.initialFetchPolicy,y=d===void 0?h==="standby"?f:h:d;o.options=m(m({},a),{initialFetchPolicy:y,fetchPolicy:h}),o.queryId=i.queryId||n.generateQueryId();var g=xt(o.query);return o.queryName=g&&g.name&&g.name.value,o}return Object.defineProperty(e.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var t=this;return new Promise(function(n,i){var a={next:function(s){n(s),t.observers.delete(a),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout(function(){o.unsubscribe()},0)},error:i},o=t.subscribe(a)})},e.prototype.getCurrentResult=function(t){t===void 0&&(t=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||te.ready,a=m(m({},n),{loading:er(i),networkStatus:i}),o=this.options.fetchPolicy,s=o===void 0?"cache-first":o;if(!(s==="network-only"||s==="no-cache"||s==="standby"||this.queryManager.transform(this.options.query).hasForcedResolvers)){var u=this.queryInfo.getDiff();(u.complete||this.options.returnPartialData)&&(a.data=u.result),ue(a.data,{})&&(a.data=void 0),u.complete?(delete a.partial,u.complete&&a.networkStatus===te.loading&&(s==="cache-first"||s==="cache-only")&&(a.networkStatus=te.ready,a.loading=!1)):a.partial=!0,__DEV__&&!u.complete&&!this.options.partialRefetch&&!a.loading&&!a.data&&!a.error&&Ts(u.missing)}return t&&this.updateLastResult(a),a},e.prototype.isDifferentFromLastResult=function(t,n){return!this.last||!ue(this.last.result,t)||n&&!ue(this.last.variables,n)},e.prototype.getLast=function(t,n){var i=this.last;if(i&&i[t]&&(!n||ue(i.variables,this.variables)))return i[t]},e.prototype.getLastResult=function(t){return this.getLast("result",t)},e.prototype.getLastError=function(t){return this.getLast("error",t)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(t){var n,i={pollInterval:0},a=this.options.fetchPolicy;if(a==="cache-and-network"?i.fetchPolicy=a:a==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",__DEV__&&t&&Id.call(t,"variables")){var o=Vn(this.query),s=o.variableDefinitions;(!s||!s.some(function(u){return u.variable.name.value==="variables"}))&&__DEV__&&T.warn("Called refetch(".concat(JSON.stringify(t),") for query ").concat(((n=o.name)===null||n===void 0?void 0:n.value)||JSON.stringify(o),`, which does not declare a $variables variable.
52
+ Did you mean to call refetch(variables) instead of refetch({ variables })?`))}return t&&!ue(this.options.variables,t)&&(i.variables=this.options.variables=m(m({},this.options.variables),t)),this.queryInfo.resetLastWrite(),this.reobserve(i,te.refetch)},e.prototype.fetchMore=function(t){var n=this,i=m(m({},t.query?t:m(m(m(m({},this.options),{query:this.query}),t),{variables:m(m({},this.options.variables),t.variables)})),{fetchPolicy:"no-cache"}),a=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=te.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var u=new Set;return this.queryManager.fetchQuery(a,i,te.fetchMore).then(function(l){return n.queryManager.removeQuery(a),o.networkStatus===te.fetchMore&&(o.networkStatus=s),n.queryManager.cache.batch({update:function(f){var p=t.updateQuery;p?f.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(h){return p(h,{fetchMoreResult:l.data,variables:i.variables})}):f.writeQuery({query:i.query,variables:i.variables,data:l.data})},onWatchUpdated:function(f){u.add(f.query)}}),l}).finally(function(){u.has(n.query)||Os(n)})},e.prototype.subscribeToMore=function(t){var n=this,i=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:function(a){var o=t.updateQuery;o&&n.updateQuery(function(s,u){var l=u.variables;return o(s,{subscriptionData:a,variables:l})})},error:function(a){if(t.onError){t.onError(a);return}__DEV__&&T.error("Unhandled GraphQL subscription error",a)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},e.prototype.setOptions=function(t){return this.reobserve(t)},e.prototype.setVariables=function(t){return ue(this.variables,t)?this.observers.size?this.result():Promise.resolve():(this.options.variables=t,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:t},te.setVariables):Promise.resolve())},e.prototype.updateQuery=function(t){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,a=t(i,{variables:this.variables});a&&(n.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),n.broadcastQueries())},e.prototype.startPolling=function(t){this.options.pollInterval=t,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(t,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,a=i===void 0?"cache-first":i,o=n.initialFetchPolicy,s=o===void 0?a:o;a==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(a,{reason:t,options:n,observable:this,initialFetchPolicy:s}):t==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},e.prototype.fetch=function(t,n){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,t,n)},e.prototype.updatePolling=function(){var t=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,a=n.options.pollInterval;if(!a){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){__DEV__?T(a,"Attempted to start a polling query without a polling interval."):T(a,13);var o=i||(this.pollingInfo={});o.interval=a;var s=function(){t.pollingInfo&&(er(t.queryInfo.networkStatus)?u():t.reobserve({fetchPolicy:t.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},te.poll).then(u,u))},u=function(){var l=t.pollingInfo;l&&(clearTimeout(l.timeout),l.timeout=setTimeout(s,l.interval))};u()}}},e.prototype.updateLastResult=function(t,n){return n===void 0&&(n=this.variables),this.last=m(m({},this.last),{result:this.queryManager.assumeImmutableResults?t:Vi(t),variables:n}),xe(t.errors)||delete this.last.error,this.last},e.prototype.reobserve=function(t,n){var i=this;this.isTornDown=!1;var a=n===te.refetch||n===te.fetchMore||n===te.poll,o=this.options.variables,s=this.options.fetchPolicy,u=Jt(this.options,t||{}),l=a?u:Ad(this.options,u);a||(this.updatePolling(),t&&t.variables&&!ue(t.variables,o)&&l.fetchPolicy!=="standby"&&l.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",l),n===void 0&&(n=te.setVariables)));var f=l.variables&&m({},l.variables),p=this.fetch(l,n),h={next:function(d){i.reportResult(d,f)},error:function(d){i.reportError(d,f)}};return a||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=p,this.observer=h),p.addObserver(h),p.promise},e.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},e.prototype.reportResult=function(t,n){var i=this.getLastError();(i||this.isDifferentFromLastResult(t,n))&&((i||!t.partial||this.options.returnPartialData)&&this.updateLastResult(t,n),xr(this.observers,"next",t))},e.prototype.reportError=function(t,n){var i=m(m({},this.getLastResult()),{error:t,errors:t.graphQLErrors,networkStatus:te.error,loading:!1});this.updateLastResult(i,n),xr(this.observers,"error",this.last.error=t)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e}(Q);Wi(fa);function Os(r){var e=r.options,t=e.fetchPolicy,n=e.nextFetchPolicy;return t==="cache-and-network"||t==="network-only"?r.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,typeof n=="function"?n.apply(this,arguments):t}}):r.reobserve()}function kd(r){__DEV__&&T.error("Unhandled error",r.message,r.stack)}function Ts(r){__DEV__&&r&&__DEV__&&T.debug("Missing cache result fields: ".concat(JSON.stringify(r)),r)}var pa=function(){function r(e){var t=e.cache,n=e.client,i=e.resolvers,a=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return r.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(n){t.resolvers=Uo(t.resolvers,n)}):this.resolvers=Uo(this.resolvers,e)},r.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},r.prototype.getResolvers=function(){return this.resolvers||{}},r.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,i=e.context,a=e.variables,o=e.onlyRunForcedResolvers,s=o===void 0?!1:o;return pt(this,void 0,void 0,function(){return dt(this,function(u){return t?[2,this.resolveDocument(t,n.data,i,a,this.fragmentMatcher,s).then(function(l){return m(m({},n),{data:l.result})})]:[2,n]})})},r.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},r.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},r.prototype.clientQuery=function(e){return Zr(["client"],e)&&this.resolvers?e:null},r.prototype.serverQuery=function(e){return jo(e)},r.prototype.prepareContext=function(e){var t=this.cache;return m(m({},e),{cache:t,getCacheKey:function(n){return t.identify(n)}})},r.prototype.addExportedVariables=function(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),pt(this,void 0,void 0,function(){return dt(this,function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(a){return m(m({},t),a.exportedVariables)})]:[2,m({},t)]})})},r.prototype.shouldForceResolvers=function(e){var t=!1;return Me(e,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(t=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),t))return vr}}}),t},r.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Mo(e),variables:t,returnPartialData:!0,optimistic:!1}).result},r.prototype.resolveDocument=function(e,t,n,i,a,o){return n===void 0&&(n={}),i===void 0&&(i={}),a===void 0&&(a=function(){return!0}),o===void 0&&(o=!1),pt(this,void 0,void 0,function(){var s,u,l,f,p,h,d,y,g,C,_;return dt(this,function(b){return s=wr(e),u=Sr(e),l=br(u),f=this.collectSelectionsToResolve(s,l),p=s.operation,h=p?p.charAt(0).toUpperCase()+p.slice(1):"Query",d=this,y=d.cache,g=d.client,C={fragmentMap:l,context:m(m({},n),{cache:y,client:g}),variables:i,fragmentMatcher:a,defaultOperationType:h,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:o},_=!1,[2,this.resolveSelectionSet(s.selectionSet,_,t,C).then(function(S){return{result:S,exportedVariables:C.exportedVariables}})]})})},r.prototype.resolveSelectionSet=function(e,t,n,i){return pt(this,void 0,void 0,function(){var a,o,s,u,l,f=this;return dt(this,function(p){return a=i.fragmentMap,o=i.context,s=i.variables,u=[n],l=function(h){return pt(f,void 0,void 0,function(){var d,y;return dt(this,function(g){return!t&&!i.selectionsToResolve.has(h)?[2]:Dt(h,s)?et(h)?[2,this.resolveField(h,t,n,i).then(function(C){var _;typeof C<"u"&&u.push((_={},_[at(h)]=C,_))})]:(Ro(h)?d=h:(d=a[h.name.value],__DEV__?T(d,"No fragment named ".concat(h.name.value)):T(d,11)),d&&d.typeCondition&&(y=d.typeCondition.name.value,i.fragmentMatcher(n,y,o))?[2,this.resolveSelectionSet(d.selectionSet,t,n,i).then(function(C){u.push(C)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(l)).then(function(){return Qn(u)})]})})},r.prototype.resolveField=function(e,t,n,i){return pt(this,void 0,void 0,function(){var a,o,s,u,l,f,p,h,d,y=this;return dt(this,function(g){return n?(a=i.variables,o=e.name.value,s=at(e),u=o!==s,l=n[s]||n[o],f=Promise.resolve(l),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(p=n.__typename||i.defaultOperationType,h=this.resolvers&&this.resolvers[p],h&&(d=h[u?o:s],d&&(f=Promise.resolve(fn.withValue(this.cache,d,[n,Nt(e,a),i.context,{field:e,fragmentMap:i.fragmentMap}]))))),[2,f.then(function(C){var _,b;if(C===void 0&&(C=l),e.directives&&e.directives.forEach(function(O){O.name.value==="export"&&O.arguments&&O.arguments.forEach(function(k){k.name.value==="as"&&k.value.kind==="StringValue"&&(i.exportedVariables[k.value.value]=C)})}),!e.selectionSet||C==null)return C;var S=(b=(_=e.directives)===null||_===void 0?void 0:_.some(function(O){return O.name.value==="client"}))!==null&&b!==void 0?b:!1;if(Array.isArray(C))return y.resolveSubSelectedArray(e,t||S,C,i);if(e.selectionSet)return y.resolveSelectionSet(e.selectionSet,t||S,C,i)})]):[2,null]})})},r.prototype.resolveSubSelectedArray=function(e,t,n,i){var a=this;return Promise.all(n.map(function(o){if(o===null)return null;if(Array.isArray(o))return a.resolveSubSelectedArray(e,t,o,i);if(e.selectionSet)return a.resolveSelectionSet(e.selectionSet,t,o,i)}))},r.prototype.collectSelectionsToResolve=function(e,t){var n=function(o){return!Array.isArray(o)},i=this.selectionsToResolveCache;function a(o){if(!i.has(o)){var s=new Set;i.set(o,s),Me(o,{Directive:function(u,l,f,p,h){u.name.value==="client"&&h.forEach(function(d){n(d)&&jn(d)&&s.add(d)})},FragmentSpread:function(u,l,f,p,h){var d=t[u.name.value];__DEV__?T(d,"No fragment named ".concat(u.name.value)):T(d,12);var y=a(d);y.size>0&&(h.forEach(function(g){n(g)&&jn(g)&&s.add(g)}),s.add(u),y.forEach(function(g){s.add(g)}))}})}return i.get(o)}return a(e)},r}();var dn=new(ot?WeakMap:Map);function As(r,e){var t=r[e];typeof t=="function"&&(r[e]=function(){return dn.set(r,(dn.get(r)+1)%1e15),t.apply(this,arguments)})}function kl(r){r.notifyTimeout&&(clearTimeout(r.notifyTimeout),r.notifyTimeout=void 0)}var da=function(){function r(e,t){t===void 0&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;dn.has(n)||(dn.set(n,0),As(n,"evict"),As(n,"modify"),As(n,"reset"))}return r.prototype.init=function(e){var t=e.networkStatus||te.loading;return this.variables&&this.networkStatus!==te.loading&&!ue(this.variables,e.variables)&&(t=te.setVariables),ue(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},r.prototype.reset=function(){kl(this),this.dirty=!1},r.prototype.getDiff=function(e){e===void 0&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&ue(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var i=this.cache.diff(t);return this.updateLastDiff(i,t),i},r.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},r.prototype.getDiffOptions=function(e){var t;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(t=this.observableQuery)===null||t===void 0?void 0:t.options.canonizeResults}},r.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),!this.dirty&&!ue(n&&n.result,e&&e.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},r.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=t.getDiff();n.fromOptimisticTransaction?e.observe():Os(e)})):delete this.oqListener)},r.prototype.notify=function(){var e=this;kl(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},r.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(er(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if(e!=="cache-only"&&e!=="cache-and-network")return!1}return!0},r.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=r.prototype.cancel,this.subscriptions.forEach(function(t){return t.unsubscribe()});var e=this.observableQuery;e&&e.stopPolling()}},r.prototype.cancel=function(){},r.prototype.updateWatch=function(e){var t=this;e===void 0&&(e=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=m(m({},this.getDiffOptions(e)),{watcher:this,callback:function(a){return t.setDiff(a)}});(!this.lastWatch||!ue(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},r.prototype.resetLastWrite=function(){this.lastWrite=void 0},r.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===dn.get(this.cache)&&ue(t,n.variables)&&ue(e.data,n.result.data))},r.prototype.markResult=function(e,t,n,i){var a=this,o=new ze,s=xe(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&xe(e.incremental)){var u=Gi(this.getDiff().result,e);e.data=u}else if("hasNext"in e&&e.hasNext){var l=this.getDiff();e.data=o.merge(l.result,e.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(ha(e,n.errorPolicy)?this.cache.performTransaction(function(f){if(a.shouldWrite(e,n.variables))f.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:i===1}),a.lastWrite={result:e,variables:n.variables,dmCount:dn.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){e.data=a.lastDiff.diff.result;return}var p=a.getDiffOptions(n.variables),h=f.diff(p);a.stopped||a.updateWatch(n.variables),a.updateLastDiff(h,p),h.complete&&(e.data=h.result)}):this.lastWrite=void 0)},r.prototype.markReady=function(){return this.networkError=null,this.networkStatus=te.ready},r.prototype.markError=function(e){return this.networkStatus=te.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},r}();function ha(r,e){e===void 0&&(e="none");var t=e==="ignore"||e==="all",n=!on(r);return!n&&t&&r.data&&(n=!0),n}var Dd=Object.prototype.hasOwnProperty,Dl=function(){function r(e){var t=e.cache,n=e.link,i=e.defaultOptions,a=e.queryDeduplication,o=a===void 0?!1:a,s=e.onBroadcast,u=e.ssrMode,l=u===void 0?!1:u,f=e.clientAwareness,p=f===void 0?{}:f,h=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(ot?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=o,this.clientAwareness=p,this.localState=h||new pa({cache:t}),this.ssrMode=l,this.assumeImmutableResults=!!d,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return r.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new U("QueryManager stopped while query was in flight"):new U(14))},r.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},r.prototype.mutate=function(e){var t,n,i=e.mutation,a=e.variables,o=e.optimisticResponse,s=e.updateQueries,u=e.refetchQueries,l=u===void 0?[]:u,f=e.awaitRefetchQueries,p=f===void 0?!1:f,h=e.update,d=e.onQueryUpdated,y=e.fetchPolicy,g=y===void 0?((t=this.defaultOptions.mutate)===null||t===void 0?void 0:t.fetchPolicy)||"network-only":y,C=e.errorPolicy,_=C===void 0?((n=this.defaultOptions.mutate)===null||n===void 0?void 0:n.errorPolicy)||"none":C,b=e.keepRootFields,S=e.context;return pt(this,void 0,void 0,function(){var O,k,N,I,R,re;return dt(this,function(ee){switch(ee.label){case 0:return __DEV__?T(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):T(i,15),__DEV__?T(g==="network-only"||g==="no-cache","Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):T(g==="network-only"||g==="no-cache",16),O=this.generateMutationId(),k=this.transform(i),N=k.document,I=k.hasClientExports,i=this.cache.transformForLink(N),a=this.getVariables(i,a),I?[4,this.localState.addExportedVariables(i,a,S)]:[3,2];case 1:a=ee.sent(),ee.label=2;case 2:return R=this.mutationStore&&(this.mutationStore[O]={mutation:i,variables:a,loading:!0,error:null}),o&&this.markMutationOptimistic(o,{mutationId:O,document:i,variables:a,fetchPolicy:g,errorPolicy:_,context:S,updateQueries:s,update:h,keepRootFields:b}),this.broadcastQueries(),re=this,[2,new Promise(function(Ct,It){return Qi(re.getObservableFromLink(i,m(m({},S),{optimisticResponse:o}),a,!1),function(ke){if(on(ke)&&_==="none")throw new Pt({graphQLErrors:Ki(ke)});R&&(R.loading=!1,R.error=null);var B=m({},ke);return typeof l=="function"&&(l=l(B)),_==="ignore"&&on(B)&&delete B.errors,re.markMutationResult({mutationId:O,result:B,document:i,variables:a,fetchPolicy:g,errorPolicy:_,context:S,update:h,updateQueries:s,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:o?O:void 0,onQueryUpdated:d,keepRootFields:b})}).subscribe({next:function(ke){re.broadcastQueries(),(!("hasNext"in ke)||ke.hasNext===!1)&&Ct(ke)},error:function(ke){R&&(R.loading=!1,R.error=ke),o&&re.cache.removeOptimistic(O),re.broadcastQueries(),It(ke instanceof Pt?ke:new Pt({networkError:ke}))}})})]}})})},r.prototype.markMutationResult=function(e,t){var n=this;t===void 0&&(t=this.cache);var i=e.result,a=[],o=e.fetchPolicy==="no-cache";if(!o&&ha(i,e.errorPolicy)){if(Ht(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Ht(i)&&xe(i.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;s.result&&(u=Gi(s.result,i)),typeof u<"u"&&(i.data=u,a.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var l=e.updateQueries;l&&this.queries.forEach(function(p,h){var d=p.observableQuery,y=d&&d.queryName;if(!(!y||!Dd.call(l,y))){var g=l[y],C=n.queries.get(h),_=C.document,b=C.variables,S=t.diff({query:_,variables:b,returnPartialData:!0,optimistic:!1}),O=S.result,k=S.complete;if(k&&O){var N=g(O,{mutationResult:i,queryName:_&&tn(_)||void 0,queryVariables:b});N&&a.push({result:N,dataId:"ROOT_QUERY",query:_,variables:b})}}})}if(a.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var f=[];if(this.refetchQueries({updateCache:function(p){o||a.forEach(function(g){return p.write(g)});var h=e.update,d=!hu(i)||Ht(i)&&!i.hasNext;if(h){if(!o){var y=p.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});y.complete&&(i=m(m({},i),{data:y.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}d&&h(p,i,{context:e.context,variables:e.variables})}!o&&!e.keepRootFields&&d&&p.modify({id:"ROOT_MUTATION",fields:function(g,C){var _=C.fieldName,b=C.DELETE;return _==="__typename"?g:b}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(p){return f.push(p)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(f).then(function(){return i})}return Promise.resolve(i)},r.prototype.markMutationOptimistic=function(e,t){var n=this,i=typeof e=="function"?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(a){try{n.markMutationResult(m(m({},t),{result:{data:i}}),a)}catch(o){__DEV__&&T.error(o)}},t.mutationId)},r.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},r.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},r.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},r.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),i=$o(n),a=this.localState.clientQuery(n),o=i&&this.localState.serverQuery(i),s={document:n,hasClientExports:ko(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:a,serverQuery:o,defaultVars:_r(xt(n)),asQuery:m(m({},n),{definitions:n.definitions.map(function(l){return l.kind==="OperationDefinition"&&l.operation!=="query"?m(m({},l),{operation:"query"}):l})})},u=function(l){l&&!t.has(l)&&t.set(l,s)};u(e),u(n),u(a),u(o)}return t.get(e)},r.prototype.getVariables=function(e,t){return m(m({},this.transform(e).defaultVars),t)},r.prototype.watchQuery=function(e){e=m(m({},e),{variables:this.getVariables(e.query,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var t=new da(this),n=new fa({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},r.prototype.query=function(e,t){var n=this;return t===void 0&&(t=this.generateQueryId()),__DEV__?T(e.query,"query option is required. You must specify your GraphQL document in the query option."):T(e.query,17),__DEV__?T(e.query.kind==="Document",'You must wrap the query string in a "gql" tag.'):T(e.query.kind==="Document",18),__DEV__?T(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):T(!e.returnPartialData,19),__DEV__?T(!e.pollInterval,"pollInterval option only supported on watchQuery."):T(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},r.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},r.prototype.generateRequestId=function(){return this.requestIdCounter++},r.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},r.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},r.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new U("Store reset while query was in flight (not completed in link chain)"):new U(21)),this.queries.forEach(function(t){t.observableQuery?t.networkStatus=te.loading:t.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},r.prototype.getObservableQueries=function(e){var t=this;e===void 0&&(e="active");var n=new Map,i=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(o){typeof o=="string"?i.set(o,!1):No(o)?i.set(t.transform(o).document,!1):z(o)&&o.query&&a.add(o)}),this.queries.forEach(function(o,s){var u=o.observableQuery,l=o.document;if(u){if(e==="all"){n.set(s,u);return}var f=u.queryName,p=u.options.fetchPolicy;if(p==="standby"||e==="active"&&!u.hasObservers())return;(e==="active"||f&&i.has(f)||l&&i.has(l))&&(n.set(s,u),f&&i.set(f,!0),l&&i.set(l,!0))}}),a.size&&a.forEach(function(o){var s=Kn("legacyOneTimeQuery"),u=t.getQuery(s).init({document:o.query,variables:o.variables}),l=new fa({queryManager:t,queryInfo:u,options:m(m({},o),{fetchPolicy:"network-only"})});T(l.queryId===s),u.setObservableQuery(l),n.set(s,l)}),__DEV__&&i.size&&i.forEach(function(o,s){o||__DEV__&&T.warn("Unknown query ".concat(typeof s=="string"?"named ":"").concat(JSON.stringify(s,null,2)," requested in refetchQueries options.include array"))}),n},r.prototype.reFetchObservableQueries=function(e){var t=this;e===void 0&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(i,a){var o=i.options.fetchPolicy;i.resetLastResults(),(e||o!=="standby"&&o!=="cache-only")&&n.push(i.refetch()),t.getQuery(a).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},r.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},r.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,i=e.fetchPolicy,a=e.errorPolicy,o=e.variables,s=e.context,u=s===void 0?{}:s;n=this.transform(n).document,o=this.getVariables(n,o);var l=function(p){return t.getObservableFromLink(n,u,p).map(function(h){if(i!=="no-cache"&&(ha(h,a)&&t.cache.write({query:n,result:h.data,dataId:"ROOT_SUBSCRIPTION",variables:p}),t.broadcastQueries()),on(h))throw new Pt({graphQLErrors:h.errors});return h})};if(this.transform(n).hasClientExports){var f=this.localState.addExportedVariables(n,o,u).then(l);return new Q(function(p){var h=null;return f.then(function(d){return h=d.subscribe(p)},p.error),function(){return h&&h.unsubscribe()}})}return l(o)},r.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},r.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},r.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},r.prototype.getLocalState=function(){return this.localState},r.prototype.getObservableFromLink=function(e,t,n,i){var a=this,o;i===void 0&&(i=(o=t?.queryDeduplication)!==null&&o!==void 0?o:this.queryDeduplication);var s,u=this.transform(e).serverQuery;if(u){var l=this,f=l.inFlightLinkObservables,p=l.link,h={query:u,variables:n,operationName:tn(u)||void 0,context:this.prepareContext(m(m({},t),{forceFetch:!i}))};if(t=h.context,i){var d=f.get(u)||new Map;f.set(u,d);var y=tt(n);if(s=d.get(y),!s){var g=new an([sn(p,h)]);d.set(y,s=g),g.beforeNext(function(){d.delete(y)&&d.size<1&&f.delete(u)})}}else s=new an([sn(p,h)])}else s=new an([Q.of({data:{}})]),t=this.prepareContext(t);var C=this.transform(e).clientQuery;return C&&(s=Qi(s,function(_){return a.localState.runResolvers({document:C,remoteResult:_,context:t,variables:n})})),s},r.prototype.getResultsFromLink=function(e,t,n){var i=e.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(this.transform(e.document).document);return Qi(this.getObservableFromLink(a,n.context,n.variables),function(o){var s=Ki(o),u=s.length>0;if(i>=e.lastRequestId){if(u&&n.errorPolicy==="none")throw e.markError(new Pt({graphQLErrors:s}));e.markResult(o,a,n,t),e.markReady()}var l={data:o.data,loading:!1,networkStatus:te.ready};return u&&n.errorPolicy!=="ignore"&&(l.errors=s,l.networkStatus=te.error),l},function(o){var s=Il(o)?o:new Pt({networkError:o});throw i>=e.lastRequestId&&e.markError(s),s})},r.prototype.fetchQueryObservable=function(e,t,n){var i=this;n===void 0&&(n=te.loading);var a=this.transform(t.query).document,o=this.getVariables(a,t.variables),s=this.getQuery(e),u=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=l===void 0?u&&u.fetchPolicy||"cache-first":l,p=t.errorPolicy,h=p===void 0?u&&u.errorPolicy||"none":p,d=t.returnPartialData,y=d===void 0?!1:d,g=t.notifyOnNetworkStatusChange,C=g===void 0?!1:g,_=t.context,b=_===void 0?{}:_,S=Object.assign({},t,{query:a,variables:o,fetchPolicy:f,errorPolicy:h,returnPartialData:y,notifyOnNetworkStatusChange:C,context:b}),O=function(I){S.variables=I;var R=i.fetchQueryByPolicy(s,S,n);return S.fetchPolicy!=="standby"&&R.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),R},k=function(){return i.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(I){k(),setTimeout(function(){return N.cancel(I)})});var N=new an(this.transform(S.query).hasClientExports?this.localState.addExportedVariables(S.query,S.variables,S.context).then(O):O(S.variables));return N.promise.then(k,k),N},r.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,i=e.include,a=e.optimistic,o=a===void 0?!1:a,s=e.removeOptimistic,u=s===void 0?o?Kn("refetchQueries"):void 0:s,l=e.onQueryUpdated,f=new Map;i&&this.getObservableQueries(i).forEach(function(h,d){f.set(d,{oq:h,lastDiff:t.getQuery(d).getDiff()})});var p=new Map;return n&&this.cache.batch({update:n,optimistic:o&&u||!1,removeOptimistic:u,onWatchUpdated:function(h,d,y){var g=h.watcher instanceof da&&h.watcher.observableQuery;if(g){if(l){f.delete(g.queryId);var C=l(g,d,y);return C===!0&&(C=g.refetch()),C!==!1&&p.set(g,C),C}l!==null&&f.set(g.queryId,{oq:g,lastDiff:y,diff:d})}}}),f.size&&f.forEach(function(h,d){var y=h.oq,g=h.lastDiff,C=h.diff,_;if(l){if(!C){var b=y.queryInfo;b.reset(),C=b.getDiff()}_=l(y,C,g)}(!l||_===!0)&&(_=y.refetch()),_!==!1&&p.set(y,_),d.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(d)}),u&&this.cache.removeOptimistic(u),p},r.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,a=t.query,o=t.variables,s=t.fetchPolicy,u=t.refetchWritePolicy,l=t.errorPolicy,f=t.returnPartialData,p=t.context,h=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(a).document,variables:o,networkStatus:n});var y=function(){return e.getDiff(o)},g=function(O,k){k===void 0&&(k=e.networkStatus||te.loading);var N=O.result;__DEV__&&!f&&!ue(N,{})&&Ts(O.missing);var I=function(R){return Q.of(m({data:R,loading:er(k),networkStatus:k},O.complete?null:{partial:!0}))};return N&&i.transform(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:N},context:p,variables:o,onlyRunForcedResolvers:!0}).then(function(R){return I(R.data||void 0)}):l==="none"&&k===te.refetch&&Array.isArray(O.missing)?I(void 0):I(N)},C=s==="no-cache"?0:n===te.refetch&&u!=="merge"?1:2,_=function(){return i.getResultsFromLink(e,C,{variables:o,context:p,fetchPolicy:s,errorPolicy:l})},b=h&&typeof d=="number"&&d!==n&&er(n);switch(s){default:case"cache-first":{var S=y();return S.complete?[g(S,e.markReady())]:f||b?[g(S),_()]:[_()]}case"cache-and-network":{var S=y();return S.complete||f||b?[g(S),_()]:[_()]}case"cache-only":return[g(y(),e.markReady())];case"network-only":return b?[g(y()),_()]:[_()];case"no-cache":return b?[g(e.getDiff()),_()]:[_()];case"standby":return[]}},r.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new da(this,e)),this.queries.get(e)},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.localState.prepareContext(e);return m(m({},t),{clientAwareness:this.clientAwareness})},r}();var Nl=!1;var Is=function(){function r(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,i=e.credentials,a=e.headers,o=e.cache,s=e.ssrMode,u=s===void 0?!1:s,l=e.ssrForceFetchDelay,f=l===void 0?0:l,p=e.connectToDevTools,h=p===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&__DEV__:p,d=e.queryDeduplication,y=d===void 0?!0:d,g=e.defaultOptions,C=e.assumeImmutableResults,_=C===void 0?!1:C,b=e.resolvers,S=e.typeDefs,O=e.fragmentMatcher,k=e.name,N=e.version,I=e.link;if(I||(I=n?new ns({uri:n,credentials:i,headers:a}):st.empty()),!o)throw __DEV__?new U(`To initialize Apollo Client, you must specify a 'cache' property in the options object.
53
+ For more information, please visit: https://go.apollo.dev/c/docs`):new U(9);if(this.link=I,this.cache=o,this.disableNetworkFetches=u||f>0,this.queryDeduplication=y,this.defaultOptions=g||Object.create(null),this.typeDefs=S,f&&setTimeout(function(){return t.disableNetworkFetches=!1},f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),h&&typeof window=="object"&&(window.__APOLLO_CLIENT__=this),!Nl&&h&&__DEV__&&(Nl=!0,typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var R=window.navigator,re=R&&R.userAgent,ee=void 0;typeof re=="string"&&(re.indexOf("Chrome/")>-1?ee="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":re.indexOf("Firefox/")>-1&&(ee="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),ee&&__DEV__&&T.log("Download the Apollo DevTools for a better development experience: "+ee)}this.version=vu,this.localState=new pa({cache:o,client:this,resolvers:b,fragmentMatcher:O}),this.queryManager=new Dl({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:u,clientAwareness:{name:k,version:N},localState:this.localState,assumeImmutableResults:_,onBroadcast:h?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return r.prototype.stop=function(){this.queryManager.stop()},r.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=zn(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=m(m({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},r.prototype.query=function(e){return this.defaultOptions.query&&(e=zn(this.defaultOptions.query,e)),__DEV__?T(e.fetchPolicy!=="cache-and-network","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):T(e.fetchPolicy!=="cache-and-network",10),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=m(m({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},r.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=zn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},r.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.cache.readQuery(e,t)},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.cache.readFragment(e,t)},r.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},r.prototype.__requestRaw=function(e){return sn(this.link,e)},r.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(t){return t()}))}).then(function(){return e.reFetchObservableQueries()})},r.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(t){return t()}))})},r.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},r.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach(function(o,s){n.push(s),i.push(o)});var a=Promise.all(i);return a.queries=n,a.results=i,a.catch(function(o){__DEV__&&T.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(o))}),a},r.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},r.prototype.extract=function(e){return this.cache.extract(e)},r.prototype.restore=function(e){return this.cache.restore(e)},r.prototype.addResolvers=function(e){this.localState.addResolvers(e)},r.prototype.setResolvers=function(e){this.localState.setResolvers(e)},r.prototype.getResolvers=function(){return this.localState.getResolvers()},r.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},r.prototype.setLink=function(e){this.link=this.queryManager.link=e},r}();Qc(gr?"log":"silent");function qe(r){return r===null?"null":Array.isArray(r)?"array":typeof r}function Rt(r){return qe(r)==="object"}function Pl(r){return Array.isArray(r)&&r.length>0&&r.every(e=>"message"in e)}function ks(r,e){return r.length<124?r:e}var Rl="graphql-transport-ws";var He;(function(r){r[r.InternalServerError=4500]="InternalServerError",r[r.InternalClientError=4005]="InternalClientError",r[r.BadRequest=4400]="BadRequest",r[r.BadResponse=4004]="BadResponse",r[r.Unauthorized=4401]="Unauthorized",r[r.Forbidden=4403]="Forbidden",r[r.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",r[r.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",r[r.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",r[r.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",r[r.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(He||(He={}));var be;(function(r){r.ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete"})(be||(be={}));function Ll(r){if(!Rt(r))throw new Error(`Message is expected to be an object, but got ${qe(r)}`);if(!r.type)throw new Error("Message is missing the 'type' property");if(typeof r.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${qe(r.type)}`);switch(r.type){case be.ConnectionInit:case be.ConnectionAck:case be.Ping:case be.Pong:{if(r.payload!=null&&!Rt(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${r.payload}"`);break}case be.Subscribe:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${qe(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Rt(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${qe(r.payload)}`);if(typeof r.payload.query!="string")throw new Error(`"${r.type}" message payload expects the 'query' property to be a string, but got ${qe(r.payload.query)}`);if(r.payload.variables!=null&&!Rt(r.payload.variables))throw new Error(`"${r.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${qe(r.payload.variables)}`);if(r.payload.operationName!=null&&qe(r.payload.operationName)!=="string")throw new Error(`"${r.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${qe(r.payload.operationName)}`);if(r.payload.extensions!=null&&!Rt(r.payload.extensions))throw new Error(`"${r.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${qe(r.payload.extensions)}`);break}case be.Next:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${qe(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Rt(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${qe(r.payload)}`);break}case be.Error:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${qe(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Pl(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(r.payload)}`);break}case be.Complete:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${qe(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${r.type}"`)}return r}function Fl(r,e){return Ll(typeof r=="string"?JSON.parse(r,e):r)}function hn(r,e){return Ll(r),JSON.stringify(r,e)}function $l(r){let{url:e,connectionParams:t,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:o=0,disablePong:s,connectionAckWaitTimeout:u=0,retryAttempts:l=5,retryWait:f=async function(me){let oe=1e3;for(let G=0;G<me;G++)oe*=2;await new Promise(G=>setTimeout(G,oe+Math.floor(Math.random()*(3e3-300)+300)))},shouldRetry:p=ma,isFatalConnectionProblem:h,on:d,webSocketImpl:y,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,me=>{let oe=Math.random()*16|0;return(me=="x"?oe:oe&3|8).toString(16)})},jsonMessageReplacer:C,jsonMessageReviver:_}=r,b;if(y){if(!Pd(y))throw new Error("Invalid WebSocket implementation provided");b=y}else typeof WebSocket<"u"?b=WebSocket:typeof global<"u"?b=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(b=window.WebSocket||window.MozWebSocket);if(!b)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let S=b,O=(()=>{let B=(()=>{let oe={};return{on(G,K){return oe[G]=K,()=>{delete oe[G]}},emit(G){var K;"id"in G&&((K=oe[G.id])===null||K===void 0||K.call(oe,G))}}})(),me={connecting:d?.connecting?[d.connecting]:[],opened:d?.opened?[d.opened]:[],connected:d?.connected?[d.connected]:[],ping:d?.ping?[d.ping]:[],pong:d?.pong?[d.pong]:[],message:d?.message?[B.emit,d.message]:[B.emit],closed:d?.closed?[d.closed]:[],error:d?.error?[d.error]:[]};return{onMessage:B.on,on(oe,G){let K=me[oe];return K.push(G),()=>{K.splice(K.indexOf(G),1)}},emit(oe,...G){for(let K of[...me[oe]])K(...G)}}})();function k(B){let me=[O.on("error",oe=>{me.forEach(G=>G()),B(oe)}),O.on("closed",oe=>{me.forEach(G=>G()),B(oe)})]}let N,I=0,R,re=!1,ee=0,Ct=!1;async function It(){clearTimeout(R);let[B,me]=await(N??(N=new Promise((K,St)=>(async()=>{if(re){if(await f(ee),!I)return N=void 0,St({code:1e3,reason:"All Subscriptions Gone"});ee++}O.emit("connecting");let V=new S(typeof e=="function"?await e():e,Rl),wt,Ut;function Ti(){isFinite(o)&&o>0&&(clearTimeout(Ut),Ut=setTimeout(()=>{V.readyState===S.OPEN&&(V.send(hn({type:be.Ping})),O.emit("ping",!1,void 0))},o))}k(De=>{N=void 0,clearTimeout(wt),clearTimeout(Ut),St(De),ma(De)&&De.code===4499&&(V.close(4499,"Terminated"),V.onerror=null,V.onclose=null)}),V.onerror=De=>O.emit("error",De),V.onclose=De=>O.emit("closed",De),V.onopen=async()=>{try{O.emit("opened",V);let De=typeof t=="function"?await t():t;if(V.readyState!==S.OPEN)return;V.send(hn(De?{type:be.ConnectionInit,payload:De}:{type:be.ConnectionInit},C)),isFinite(u)&&u>0&&(wt=setTimeout(()=>{V.close(He.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},u)),Ti()}catch(De){O.emit("error",De),V.close(He.InternalClientError,ks(De instanceof Error?De.message:new Error(De).message,"Internal client error"))}};let zr=!1;V.onmessage=({data:De})=>{try{let Ne=Fl(De,_);if(O.emit("message",Ne),Ne.type==="ping"||Ne.type==="pong"){O.emit(Ne.type,!0,Ne.payload),Ne.type==="pong"?Ti():s||(V.send(hn(Ne.payload?{type:be.Pong,payload:Ne.payload}:{type:be.Pong})),O.emit("pong",!1,Ne.payload));return}if(zr)return;if(Ne.type!==be.ConnectionAck)throw new Error(`First message cannot be of type ${Ne.type}`);clearTimeout(wt),zr=!0,O.emit("connected",V,Ne.payload),re=!1,ee=0,K([V,new Promise((H1,Tf)=>k(Tf))])}catch(Ne){V.onmessage=null,O.emit("error",Ne),V.close(He.BadResponse,ks(Ne instanceof Error?Ne.message:new Error(Ne).message,"Bad response"))}}})())));B.readyState===S.CLOSING&&await me;let oe=()=>{},G=new Promise(K=>oe=K);return[B,oe,Promise.race([G.then(()=>{if(!I){let K=()=>B.close(1e3,"Normal Closure");isFinite(a)&&a>0?R=setTimeout(()=>{B.readyState===S.OPEN&&K()},a):K()}}),me])]}function ke(B){if(ma(B)&&(Nd(B.code)||[He.InternalServerError,He.InternalClientError,He.BadRequest,He.BadResponse,He.Unauthorized,He.SubprotocolNotAcceptable,He.SubscriberAlreadyExists,He.TooManyInitialisationRequests].includes(B.code)))throw B;if(Ct)return!1;if(ma(B)&&B.code===1e3)return I>0;if(!l||ee>=l||!p(B)||h?.(B))throw B;return re=!0}return n||(async()=>{for(I++;;)try{let[,,B]=await It();await B}catch(B){try{if(!ke(B))return}catch(me){return i?.(me)}}})(),{on:O.on,subscribe(B,me){let oe=g(B),G=!1,K=!1,St=()=>{I--,G=!0};return(async()=>{for(I++;;)try{let[V,wt,Ut]=await It();if(G)return wt();let Ti=O.onMessage(oe,zr=>{switch(zr.type){case be.Next:{me.next(zr.payload);return}case be.Error:{K=!0,G=!0,me.error(zr.payload),St();return}case be.Complete:{G=!0,St();return}}});V.send(hn({id:oe,type:be.Subscribe,payload:B},C)),St=()=>{!G&&V.readyState===S.OPEN&&V.send(hn({id:oe,type:be.Complete},C)),I--,G=!0,wt()},await Ut.finally(Ti);return}catch(V){if(!ke(V))return}})().then(()=>{K||me.complete()}).catch(V=>{me.error(V)}),()=>{G||St()}},async dispose(){if(Ct=!0,N){let[B]=await N;B.close(1e3,"Normal Closure")}},terminate(){N&&O.emit("closed",{code:4499,reason:"Terminated",wasClean:!1})}}}function ma(r){return Rt(r)&&"code"in r&&"reason"in r}function Nd(r){return[1e3,1001,1006,1005,1012,1013,1013].includes(r)?!1:r>=1e3&&r<=1999}function Pd(r){return typeof r=="function"&&"constructor"in r&&"CLOSED"in r&&"CLOSING"in r&&"CONNECTING"in r&&"OPEN"in r}function Rd(r){return z(r)&&"code"in r&&"reason"in r}var Ml=function(r){ge(e,r);function e(t){var n=r.call(this)||this;return n.client=t,n}return e.prototype.request=function(t){var n=this;return new Q(function(i){return n.client.subscribe(m(m({},t),{query:Xr(t.query)}),{next:i.next.bind(i),complete:i.complete.bind(i),error:function(a){return a instanceof Error?i.error(a):Rd(a)?i.error(new Error("Socket closed with event ".concat(a.code," ").concat(a.reason||""))):i.error(new Pt({graphQLErrors:Array.isArray(a)?a:[a]}))}})})},e}(st);var Ra=function(){return Ra=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ra.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function wa(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wa=function(t){return typeof t}:wa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(r)}function Ld(r){return wa(r)=="object"&&r!==null}var cf=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function Ms(r,e){for(var t=/\r\n|[\n\r]/g,n=1,i=e+1,a;(a=t.exec(r.body))&&a.index<e;)n+=1,i=e+1-(a.index+a[0].length);return{line:n,column:i}}function Fd(r){return uf(r.source,Ms(r.source,r.start))}function uf(r,e){var t=r.locationOffset.column-1,n=_a(t)+r.body,i=e.line-1,a=r.locationOffset.line-1,o=e.line+a,s=e.line===1?t:0,u=e.column+s,l="".concat(r.name,":").concat(o,":").concat(u,`
54
+ `),f=n.split(/\r\n|[\n\r]/g),p=f[i];if(p.length>120){for(var h=Math.floor(u/80),d=u%80,y=[],g=0;g<p.length;g+=80)y.push(p.slice(g,g+80));return l+jl([["".concat(o),y[0]]].concat(y.slice(1,h+1).map(function(C){return["",C]}),[[" ",_a(d-1)+"^"],["",y[h+1]]]))}return l+jl([["".concat(o-1),f[i-1]],["".concat(o),p],["",_a(u-1)+"^"],["".concat(o+1),f[i+1]]])}function jl(r){var e=r.filter(function(n){n[0];var i=n[1];return i!==void 0}),t=Math.max.apply(Math,e.map(function(n){var i=n[0];return i.length}));return e.map(function(n){var i=n[0],a=n[1];return $d(t,i)+(a?" | "+a:" |")}).join(`
55
+ `)}function _a(r){return Array(r+1).join(" ")}function $d(r,e){return _a(r-e.length)+e}function Ea(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ea=function(t){return typeof t}:Ea=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(r)}function Ul(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Md(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ul(Object(t),!0).forEach(function(n){jd(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ul(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function jd(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ud(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function ql(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function qd(r,e,t){return e&&ql(r.prototype,e),t&&ql(r,t),r}function Bd(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&vi(r,e)}function Vd(r){var e=ff();return function(){var n=bi(r),i;if(e){var a=bi(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return lf(this,i)}}function lf(r,e){return e&&(Ea(e)==="object"||typeof e=="function")?e:ii(r)}function ii(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function js(r){var e=typeof Map=="function"?new Map:void 0;return js=function(n){if(n===null||!Qd(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return xa(n,arguments,bi(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),vi(i,n)},js(r)}function xa(r,e,t){return ff()?xa=Reflect.construct:xa=function(i,a,o){var s=[null];s.push.apply(s,a);var u=Function.bind.apply(i,s),l=new u;return o&&vi(l,o.prototype),l},xa.apply(null,arguments)}function ff(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Qd(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function vi(r,e){return vi=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vi(r,e)}function bi(r){return bi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},bi(r)}var Wd=function(r){Bd(t,r);var e=Vd(t);function t(n,i,a,o,s,u,l){var f,p,h,d;Ud(this,t),d=e.call(this,n),d.name="GraphQLError",d.originalError=u??void 0,d.nodes=Bl(Array.isArray(i)?i:i?[i]:void 0);for(var y=[],g=0,C=(_=d.nodes)!==null&&_!==void 0?_:[];g<C.length;g++){var _,b=C[g],S=b.loc;S!=null&&y.push(S)}y=Bl(y),d.source=a??((f=y)===null||f===void 0?void 0:f[0].source),d.positions=o??((p=y)===null||p===void 0?void 0:p.map(function(k){return k.start})),d.locations=o&&a?o.map(function(k){return Ms(a,k)}):(h=y)===null||h===void 0?void 0:h.map(function(k){return Ms(k.source,k.start)}),d.path=s??void 0;var O=u?.extensions;return l==null&&Ld(O)?d.extensions=Md({},O):d.extensions=l??{},Object.defineProperties(ii(d),{message:{enumerable:!0},locations:{enumerable:d.locations!=null},path:{enumerable:d.path!=null},extensions:{enumerable:d.extensions!=null&&Object.keys(d.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?(Object.defineProperty(ii(d),"stack",{value:u.stack,writable:!0,configurable:!0}),lf(d)):(Error.captureStackTrace?Error.captureStackTrace(ii(d),t):Object.defineProperty(ii(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return qd(t,[{key:"toString",value:function(){return Gd(this)}},{key:cf,get:function(){return"Object"}}]),t}(js(Error));function Bl(r){return r===void 0||r.length===0?void 0:r}function Gd(r){var e=r.message;if(r.nodes)for(var t=0,n=r.nodes;t<n.length;t++){var i=n[t];i.loc&&(e+=`
56
+
57
+ `+Fd(i.loc))}else if(r.source&&r.locations)for(var a=0,o=r.locations;a<o.length;a++){var s=o[a];e+=`
58
+
59
+ `+uf(r.source,s)}return e}function nt(r,e,t){return new Wd("Syntax Error: ".concat(t),void 0,r,[e])}var j=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function Kd(r,e){var t=Boolean(r);if(!t)throw new Error(e??"Unexpected invariant triggered.")}var zd=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,Us=zd;function pf(r){var e=r.prototype.toJSON;typeof e=="function"||Kd(0),r.prototype.inspect=e,Us&&(r.prototype[Us]=e)}var df=function(){function r(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}var e=r.prototype;return e.toJSON=function(){return{start:this.start,end:this.end}},r}();pf(df);var Se=function(){function r(t,n,i,a,o,s,u){this.kind=t,this.start=n,this.end=i,this.line=a,this.column=o,this.value=u,this.prev=s,this.next=null}var e=r.prototype;return e.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},r}();pf(Se);var w=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Oa(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Oa=function(t){return typeof t}:Oa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oa(r)}var Hd=10,hf=2;function Jd(r){return Ya(r,[])}function Ya(r,e){switch(Oa(r)){case"string":return JSON.stringify(r);case"function":return r.name?"[function ".concat(r.name,"]"):"[function]";case"object":return r===null?"null":Yd(r,e);default:return String(r)}}function Yd(r,e){if(e.indexOf(r)!==-1)return"[Circular]";var t=[].concat(e,[r]),n=e1(r);if(n!==void 0){var i=n.call(r);if(i!==r)return typeof i=="string"?i:Ya(i,t)}else if(Array.isArray(r))return Zd(r,t);return Xd(r,t)}function Xd(r,e){var t=Object.keys(r);if(t.length===0)return"{}";if(e.length>hf)return"["+t1(r)+"]";var n=t.map(function(i){var a=Ya(r[i],e);return i+": "+a});return"{ "+n.join(", ")+" }"}function Zd(r,e){if(r.length===0)return"[]";if(e.length>hf)return"[Array]";for(var t=Math.min(Hd,r.length),n=r.length-t,i=[],a=0;a<t;++a)i.push(Ya(r[a],e));return n===1?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}function e1(r){var e=r[String(Us)];if(typeof e=="function")return e;if(typeof r.inspect=="function")return r.inspect}function t1(r){var e=Object.prototype.toString.call(r).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof r.constructor=="function"){var t=r.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}function Ds(r,e){var t=Boolean(r);if(!t)throw new Error(e)}function Ns(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ns=function(t){return typeof t}:Ns=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(r)}var r1=function(e,t){return e instanceof t};function Vl(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function n1(r,e,t){return e&&Vl(r.prototype,e),t&&Vl(r,t),r}var mf=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||Ds(0,"Body must be a string. Received: ".concat(Jd(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Ds(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ds(0,"column in locationOffset is 1-indexed and must be positive.")}return n1(r,[{key:cf,get:function(){return"Source"}}]),r}();function i1(r){return r1(r,mf)}var a1=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function o1(r){var e=r.split(/\r\n|[\n\r]/g),t=s1(r);if(t!==0)for(var n=1;n<e.length;n++)e[n]=e[n].slice(t);for(var i=0;i<e.length&&Ql(e[i]);)++i;for(var a=e.length;a>i&&Ql(e[a-1]);)--a;return e.slice(i,a).join(`
60
+ `)}function Ql(r){for(var e=0;e<r.length;++e)if(r[e]!==" "&&r[e]!==" ")return!1;return!0}function s1(r){for(var e,t=!0,n=!0,i=0,a=null,o=0;o<r.length;++o)switch(r.charCodeAt(o)){case 13:r.charCodeAt(o+1)===10&&++o;case 10:t=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!t&&(a===null||i<a)&&(a=i),n=!1}return(e=a)!==null&&e!==void 0?e:0}var c1=function(){function r(t){var n=new Se(w.SOF,0,0,0,0,null);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var e=r.prototype;return e.advance=function(){this.lastToken=this.token;var n=this.token=this.lookahead();return n},e.lookahead=function(){var n=this.token;if(n.kind!==w.EOF)do{var i;n=(i=n.next)!==null&&i!==void 0?i:n.next=l1(this,n)}while(n.kind===w.COMMENT);return n},r}();function u1(r){return r===w.BANG||r===w.DOLLAR||r===w.AMP||r===w.PAREN_L||r===w.PAREN_R||r===w.SPREAD||r===w.COLON||r===w.EQUALS||r===w.AT||r===w.BRACKET_L||r===w.BRACKET_R||r===w.BRACE_L||r===w.PIPE||r===w.BRACE_R}function Mr(r){return isNaN(r)?w.EOF:r<127?JSON.stringify(String.fromCharCode(r)):'"\\u'.concat(("00"+r.toString(16).toUpperCase()).slice(-4),'"')}function l1(r,e){for(var t=r.source,n=t.body,i=n.length,a=e.end;a<i;){var o=n.charCodeAt(a),s=r.line,u=1+a-r.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++r.line,r.lineStart=a;continue;case 13:n.charCodeAt(a+1)===10?a+=2:++a,++r.line,r.lineStart=a;continue;case 33:return new Se(w.BANG,a,a+1,s,u,e);case 35:return p1(t,a,s,u,e);case 36:return new Se(w.DOLLAR,a,a+1,s,u,e);case 38:return new Se(w.AMP,a,a+1,s,u,e);case 40:return new Se(w.PAREN_L,a,a+1,s,u,e);case 41:return new Se(w.PAREN_R,a,a+1,s,u,e);case 46:if(n.charCodeAt(a+1)===46&&n.charCodeAt(a+2)===46)return new Se(w.SPREAD,a,a+3,s,u,e);break;case 58:return new Se(w.COLON,a,a+1,s,u,e);case 61:return new Se(w.EQUALS,a,a+1,s,u,e);case 64:return new Se(w.AT,a,a+1,s,u,e);case 91:return new Se(w.BRACKET_L,a,a+1,s,u,e);case 93:return new Se(w.BRACKET_R,a,a+1,s,u,e);case 123:return new Se(w.BRACE_L,a,a+1,s,u,e);case 124:return new Se(w.PIPE,a,a+1,s,u,e);case 125:return new Se(w.BRACE_R,a,a+1,s,u,e);case 34:return n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34?m1(t,a,s,u,e,r):h1(t,a,s,u,e);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d1(t,a,o,s,u,e);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return g1(t,a,s,u,e)}throw nt(t,a,f1(o))}var l=r.line,f=1+a-r.lineStart;return new Se(w.EOF,i,i,l,f,e)}function f1(r){return r<32&&r!==9&&r!==10&&r!==13?"Cannot contain the invalid character ".concat(Mr(r),"."):r===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(Mr(r),".")}function p1(r,e,t,n,i){var a=r.body,o,s=e;do o=a.charCodeAt(++s);while(!isNaN(o)&&(o>31||o===9));return new Se(w.COMMENT,e,s,t,n,i,a.slice(e+1,s))}function d1(r,e,t,n,i,a){var o=r.body,s=t,u=e,l=!1;if(s===45&&(s=o.charCodeAt(++u)),s===48){if(s=o.charCodeAt(++u),s>=48&&s<=57)throw nt(r,u,"Invalid number, unexpected digit after 0: ".concat(Mr(s),"."))}else u=Ps(r,u,s),s=o.charCodeAt(u);if(s===46&&(l=!0,s=o.charCodeAt(++u),u=Ps(r,u,s),s=o.charCodeAt(u)),(s===69||s===101)&&(l=!0,s=o.charCodeAt(++u),(s===43||s===45)&&(s=o.charCodeAt(++u)),u=Ps(r,u,s),s=o.charCodeAt(u)),s===46||v1(s))throw nt(r,u,"Invalid number, expected digit but got: ".concat(Mr(s),"."));return new Se(l?w.FLOAT:w.INT,e,u,n,i,a,o.slice(e,u))}function Ps(r,e,t){var n=r.body,i=e,a=t;if(a>=48&&a<=57){do a=n.charCodeAt(++i);while(a>=48&&a<=57);return i}throw nt(r,i,"Invalid number, expected digit but got: ".concat(Mr(a),"."))}function h1(r,e,t,n,i){for(var a=r.body,o=e+1,s=o,u=0,l="";o<a.length&&!isNaN(u=a.charCodeAt(o))&&u!==10&&u!==13;){if(u===34)return l+=a.slice(s,o),new Se(w.STRING,e,o+1,t,n,i,l);if(u<32&&u!==9)throw nt(r,o,"Invalid character within String: ".concat(Mr(u),"."));if(++o,u===92){switch(l+=a.slice(s,o-1),u=a.charCodeAt(o),u){case 34:l+='"';break;case 47:l+="/";break;case 92:l+="\\";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
61
+ `;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:{var f=y1(a.charCodeAt(o+1),a.charCodeAt(o+2),a.charCodeAt(o+3),a.charCodeAt(o+4));if(f<0){var p=a.slice(o+1,o+5);throw nt(r,o,"Invalid character escape sequence: \\u".concat(p,"."))}l+=String.fromCharCode(f),o+=4;break}default:throw nt(r,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}++o,s=o}}throw nt(r,o,"Unterminated string.")}function m1(r,e,t,n,i,a){for(var o=r.body,s=e+3,u=s,l=0,f="";s<o.length&&!isNaN(l=o.charCodeAt(s));){if(l===34&&o.charCodeAt(s+1)===34&&o.charCodeAt(s+2)===34)return f+=o.slice(u,s),new Se(w.BLOCK_STRING,e,s+3,t,n,i,o1(f));if(l<32&&l!==9&&l!==10&&l!==13)throw nt(r,s,"Invalid character within String: ".concat(Mr(l),"."));l===10?(++s,++a.line,a.lineStart=s):l===13?(o.charCodeAt(s+1)===10?s+=2:++s,++a.line,a.lineStart=s):l===92&&o.charCodeAt(s+1)===34&&o.charCodeAt(s+2)===34&&o.charCodeAt(s+3)===34?(f+=o.slice(u,s)+'"""',s+=4,u=s):++s}throw nt(r,s,"Unterminated string.")}function y1(r,e,t,n){return ya(r)<<12|ya(e)<<8|ya(t)<<4|ya(n)}function ya(r){return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1}function g1(r,e,t,n,i){for(var a=r.body,o=a.length,s=e+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new Se(w.NAME,e,s,t,n,i,a.slice(e,s))}function v1(r){return r===95||r>=65&&r<=90||r>=97&&r<=122}function b1(r,e){var t=new C1(r,e);return t.parseDocument()}var C1=function(){function r(t,n){var i=i1(t)?t:new mf(t);this._lexer=new c1(i),this._options=n}var e=r.prototype;return e.parseName=function(){var n=this.expectToken(w.NAME);return{kind:j.NAME,value:n.value,loc:this.loc(n)}},e.parseDocument=function(){var n=this._lexer.token;return{kind:j.DOCUMENT,definitions:this.many(w.SOF,this.parseDefinition,w.EOF),loc:this.loc(n)}},e.parseDefinition=function(){if(this.peek(w.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(w.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(w.BRACE_L))return{kind:j.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var i=this.parseOperationType(),a;return this.peek(w.NAME)&&(a=this.parseName()),{kind:j.OPERATION_DEFINITION,operation:i,name:a,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseOperationType=function(){var n=this.expectToken(w.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},e.parseVariableDefinitions=function(){return this.optionalMany(w.PAREN_L,this.parseVariableDefinition,w.PAREN_R)},e.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:j.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(w.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(w.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},e.parseVariable=function(){var n=this._lexer.token;return this.expectToken(w.DOLLAR),{kind:j.VARIABLE,name:this.parseName(),loc:this.loc(n)}},e.parseSelectionSet=function(){var n=this._lexer.token;return{kind:j.SELECTION_SET,selections:this.many(w.BRACE_L,this.parseSelection,w.BRACE_R),loc:this.loc(n)}},e.parseSelection=function(){return this.peek(w.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var n=this._lexer.token,i=this.parseName(),a,o;return this.expectOptionalToken(w.COLON)?(a=i,o=this.parseName()):o=i,{kind:j.FIELD,alias:a,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(w.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},e.parseArguments=function(n){var i=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(w.PAREN_L,i,w.PAREN_R)},e.parseArgument=function(){var n=this._lexer.token,i=this.parseName();return this.expectToken(w.COLON),{kind:j.ARGUMENT,name:i,value:this.parseValueLiteral(!1),loc:this.loc(n)}},e.parseConstArgument=function(){var n=this._lexer.token;return{kind:j.ARGUMENT,name:this.parseName(),value:(this.expectToken(w.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},e.parseFragment=function(){var n=this._lexer.token;this.expectToken(w.SPREAD);var i=this.expectOptionalKeyword("on");return!i&&this.peek(w.NAME)?{kind:j.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:j.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseFragmentDefinition=function(){var n,i=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:j.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:j.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(n){var i=this._lexer.token;switch(i.kind){case w.BRACKET_L:return this.parseList(n);case w.BRACE_L:return this.parseObject(n);case w.INT:return this._lexer.advance(),{kind:j.INT,value:i.value,loc:this.loc(i)};case w.FLOAT:return this._lexer.advance(),{kind:j.FLOAT,value:i.value,loc:this.loc(i)};case w.STRING:case w.BLOCK_STRING:return this.parseStringLiteral();case w.NAME:switch(this._lexer.advance(),i.value){case"true":return{kind:j.BOOLEAN,value:!0,loc:this.loc(i)};case"false":return{kind:j.BOOLEAN,value:!1,loc:this.loc(i)};case"null":return{kind:j.NULL,loc:this.loc(i)};default:return{kind:j.ENUM,value:i.value,loc:this.loc(i)}}case w.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:j.STRING,value:n.value,block:n.kind===w.BLOCK_STRING,loc:this.loc(n)}},e.parseList=function(n){var i=this,a=this._lexer.token,o=function(){return i.parseValueLiteral(n)};return{kind:j.LIST,values:this.any(w.BRACKET_L,o,w.BRACKET_R),loc:this.loc(a)}},e.parseObject=function(n){var i=this,a=this._lexer.token,o=function(){return i.parseObjectField(n)};return{kind:j.OBJECT,fields:this.any(w.BRACE_L,o,w.BRACE_R),loc:this.loc(a)}},e.parseObjectField=function(n){var i=this._lexer.token,a=this.parseName();return this.expectToken(w.COLON),{kind:j.OBJECT_FIELD,name:a,value:this.parseValueLiteral(n),loc:this.loc(i)}},e.parseDirectives=function(n){for(var i=[];this.peek(w.AT);)i.push(this.parseDirective(n));return i},e.parseDirective=function(n){var i=this._lexer.token;return this.expectToken(w.AT),{kind:j.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(i)}},e.parseTypeReference=function(){var n=this._lexer.token,i;return this.expectOptionalToken(w.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(w.BRACKET_R),i={kind:j.LIST_TYPE,type:i,loc:this.loc(n)}):i=this.parseNamedType(),this.expectOptionalToken(w.BANG)?{kind:j.NON_NULL_TYPE,type:i,loc:this.loc(n)}:i},e.parseNamedType=function(){var n=this._lexer.token;return{kind:j.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},e.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===w.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},e.peekDescription=function(){return this.peek(w.STRING)||this.peek(w.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var a=this.parseDirectives(!0),o=this.many(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);return{kind:j.SCHEMA_DEFINITION,description:i,directives:a,operationTypes:o,loc:this.loc(n)}},e.parseOperationTypeDefinition=function(){var n=this._lexer.token,i=this.parseOperationType();this.expectToken(w.COLON);var a=this.parseNamedType();return{kind:j.OPERATION_TYPE_DEFINITION,operation:i,type:a,loc:this.loc(n)}},e.parseScalarTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var a=this.parseName(),o=this.parseDirectives(!0);return{kind:j.SCALAR_TYPE_DEFINITION,description:i,name:a,directives:o,loc:this.loc(n)}},e.parseObjectTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var a=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:j.OBJECT_TYPE_DEFINITION,description:i,name:a,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},e.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var i=[];this.expectOptionalToken(w.AMP);do i.push(this.parseNamedType());while(this.expectOptionalToken(w.AMP)||this.peek(w.NAME));return i}return this.delimitedMany(w.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(w.BRACE_L)&&this._lexer.lookahead().kind===w.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(w.BRACE_L,this.parseFieldDefinition,w.BRACE_R)},e.parseFieldDefinition=function(){var n=this._lexer.token,i=this.parseDescription(),a=this.parseName(),o=this.parseArgumentDefs();this.expectToken(w.COLON);var s=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:j.FIELD_DEFINITION,description:i,name:a,arguments:o,type:s,directives:u,loc:this.loc(n)}},e.parseArgumentDefs=function(){return this.optionalMany(w.PAREN_L,this.parseInputValueDef,w.PAREN_R)},e.parseInputValueDef=function(){var n=this._lexer.token,i=this.parseDescription(),a=this.parseName();this.expectToken(w.COLON);var o=this.parseTypeReference(),s;this.expectOptionalToken(w.EQUALS)&&(s=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:j.INPUT_VALUE_DEFINITION,description:i,name:a,type:o,defaultValue:s,directives:u,loc:this.loc(n)}},e.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var a=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:j.INTERFACE_TYPE_DEFINITION,description:i,name:a,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},e.parseUnionTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();return{kind:j.UNION_TYPE_DEFINITION,description:i,name:a,directives:o,types:s,loc:this.loc(n)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(w.EQUALS)?this.delimitedMany(w.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();return{kind:j.ENUM_TYPE_DEFINITION,description:i,name:a,directives:o,values:s,loc:this.loc(n)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(w.BRACE_L,this.parseEnumValueDefinition,w.BRACE_R)},e.parseEnumValueDefinition=function(){var n=this._lexer.token,i=this.parseDescription(),a=this.parseName(),o=this.parseDirectives(!0);return{kind:j.ENUM_VALUE_DEFINITION,description:i,name:a,directives:o,loc:this.loc(n)}},e.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var a=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();return{kind:j.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:a,directives:o,fields:s,loc:this.loc(n)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(w.BRACE_L,this.parseInputValueDef,w.BRACE_R)},e.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===w.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},e.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(!0),a=this.optionalMany(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);if(i.length===0&&a.length===0)throw this.unexpected();return{kind:j.SCHEMA_EXTENSION,directives:i,operationTypes:a,loc:this.loc(n)}},e.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),a=this.parseDirectives(!0);if(a.length===0)throw this.unexpected();return{kind:j.SCALAR_TYPE_EXTENSION,name:i,directives:a,loc:this.loc(n)}},e.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(a.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:j.OBJECT_TYPE_EXTENSION,name:i,interfaces:a,directives:o,fields:s,loc:this.loc(n)}},e.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),a=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(a.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:j.INTERFACE_TYPE_EXTENSION,name:i,interfaces:a,directives:o,fields:s,loc:this.loc(n)}},e.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:j.UNION_TYPE_EXTENSION,name:i,directives:a,types:o,loc:this.loc(n)}},e.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:j.ENUM_TYPE_EXTENSION,name:i,directives:a,values:o,loc:this.loc(n)}},e.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),a=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(a.length===0&&o.length===0)throw this.unexpected();return{kind:j.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:a,fields:o,loc:this.loc(n)}},e.parseDirectiveDefinition=function(){var n=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(w.AT);var a=this.parseName(),o=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:j.DIRECTIVE_DEFINITION,description:i,name:a,arguments:o,repeatable:s,locations:u,loc:this.loc(n)}},e.parseDirectiveLocations=function(){return this.delimitedMany(w.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var n=this._lexer.token,i=this.parseName();if(a1[i.value]!==void 0)return i;throw this.unexpected(n)},e.loc=function(n){var i;if(((i=this._options)===null||i===void 0?void 0:i.noLocation)!==!0)return new df(n,this._lexer.lastToken,this._lexer.source)},e.peek=function(n){return this._lexer.token.kind===n},e.expectToken=function(n){var i=this._lexer.token;if(i.kind===n)return this._lexer.advance(),i;throw nt(this._lexer.source,i.start,"Expected ".concat(yf(n),", found ").concat(Rs(i),"."))},e.expectOptionalToken=function(n){var i=this._lexer.token;if(i.kind===n)return this._lexer.advance(),i},e.expectKeyword=function(n){var i=this._lexer.token;if(i.kind===w.NAME&&i.value===n)this._lexer.advance();else throw nt(this._lexer.source,i.start,'Expected "'.concat(n,'", found ').concat(Rs(i),"."))},e.expectOptionalKeyword=function(n){var i=this._lexer.token;return i.kind===w.NAME&&i.value===n?(this._lexer.advance(),!0):!1},e.unexpected=function(n){var i=n??this._lexer.token;return nt(this._lexer.source,i.start,"Unexpected ".concat(Rs(i),"."))},e.any=function(n,i,a){this.expectToken(n);for(var o=[];!this.expectOptionalToken(a);)o.push(i.call(this));return o},e.optionalMany=function(n,i,a){if(this.expectOptionalToken(n)){var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(a));return o}return[]},e.many=function(n,i,a){this.expectToken(n);var o=[];do o.push(i.call(this));while(!this.expectOptionalToken(a));return o},e.delimitedMany=function(n,i){this.expectOptionalToken(n);var a=[];do a.push(i.call(this));while(this.expectOptionalToken(n));return a},r}();function Rs(r){var e=r.value;return yf(r.kind)+(e!=null?' "'.concat(e,'"'):"")}function yf(r){return u1(r)?'"'.concat(r,'"'):r}var Ta=new Map,qs=new Map,gf=!0,La=!1;function vf(r){return r.replace(/[\s,]+/g," ").trim()}function S1(r){return vf(r.source.body.substring(r.start,r.end))}function w1(r){var e=new Set,t=[];return r.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,a=S1(n.loc),o=qs.get(i);o&&!o.has(a)?gf&&console.warn("Warning: fragment with name "+i+` already exists.
62
+ graphql-tag enforces all fragment names across your application to be unique; read more about
63
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||qs.set(i,o=new Set),o.add(a),e.has(a)||(e.add(a),t.push(n))}else t.push(n)}),Ra(Ra({},r),{definitions:t})}function _1(r){var e=new Set(r.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var a=n[i];a&&typeof a=="object"&&e.add(a)})});var t=r.loc;return t&&(delete t.startToken,delete t.endToken),r}function E1(r){var e=vf(r);if(!Ta.has(e)){var t=b1(r,{experimentalFragmentVariables:La,allowLegacyFragmentVariables:La});if(!t||t.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ta.set(e,_1(w1(t)))}return Ta.get(e)}function E(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];typeof r=="string"&&(r=[r]);var n=r[0];return e.forEach(function(i,a){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=r[a+1]}),E1(n)}function x1(){Ta.clear(),qs.clear()}function O1(){gf=!1}function T1(){La=!0}function A1(){La=!1}var ri={gql:E,resetCaches:x1,disableFragmentWarnings:O1,enableExperimentalFragmentVariables:T1,disableExperimentalFragmentVariables:A1};(function(r){r.gql=ri.gql,r.resetCaches=ri.resetCaches,r.disableFragmentWarnings=ri.disableFragmentWarnings,r.enableExperimentalFragmentVariables=ri.enableExperimentalFragmentVariables,r.disableExperimentalFragmentVariables=ri.disableExperimentalFragmentVariables})(E||(E={}));E.default=E;function A(r){if(r.error)throw r.error;if(r.errors)throw r.errors;return r.data}function I1(){}function ec(){return I1}var v=ec,Ge=ec,J=ec,bf=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Cf=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},jr=class{constructor(e){this.code=e}};bf([v(),Cf("design:type",String)],jr.prototype,"code",void 0);jr=bf([J(),Cf("design:paramtypes",[String])],jr);var tc=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},rc=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Tt=class{constructor(e,t){this.address=e,this.name=t}};tc([v(),rc("design:type",String)],Tt.prototype,"address",void 0);tc([v(),rc("design:type",String)],Tt.prototype,"name",void 0);Tt=tc([J(),rc("design:paramtypes",[String,String])],Tt);var fe=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Te=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},ir=class{constructor(e,t){this.key=t,this.signature=e}};fe([v(),Te("design:type",String)],ir.prototype,"signature",void 0);fe([v(),Te("design:type",String)],ir.prototype,"key",void 0);fe([v(),Te("design:type",Boolean)],ir.prototype,"valid",void 0);fe([v(),Te("design:type",Boolean)],ir.prototype,"invalid",void 0);ir=fe([J(),Ge(),Te("design:paramtypes",[String,String])],ir);var Ur=class{};fe([v(),Te("design:type",String)],Ur.prototype,"signature",void 0);fe([v(),Te("design:type",String)],Ur.prototype,"key",void 0);fe([v(),Te("design:type",Boolean)],Ur.prototype,"valid",void 0);fe([v(),Te("design:type",Boolean)],Ur.prototype,"invalid",void 0);Ur=fe([Ge()],Ur);function lr(r){let e=class{constructor(n,i,a,o){this.author=n,this.timestamp=i,this.data=a,this.proof=o}};return fe([v(),Te("design:type",String)],e.prototype,"author",void 0),fe([v(),Te("design:type",String)],e.prototype,"timestamp",void 0),fe([v(),Te("design:type",Object)],e.prototype,"data",void 0),fe([v(),Te("design:type",ir)],e.prototype,"proof",void 0),e=fe([J(),Te("design:paramtypes",[String,String,Object,ir])],e),e}function k1(r){let e=class{};return fe([v(),Te("design:type",String)],e.prototype,"author",void 0),fe([v(),Te("design:type",String)],e.prototype,"timestamp",void 0),fe([v(),Te("design:type",Object)],e.prototype,"data",void 0),fe([v(),Te("design:type",Ur)],e.prototype,"proof",void 0),e=fe([Ge()],e),e}var Wl=class extends lr(){};Wl=fe([J()],Wl);var Fa=class extends lr(){};fe([v(),Te("design:type",Tt)],Fa.prototype,"language",void 0);fe([v(),Te("design:type",jr)],Fa.prototype,"icon",void 0);Fa=fe([J()],Fa);function Eg(r){return r&&r.author&&r.timestamp&&r.data}var _e=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},$e=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},ct=class{constructor(e){this.source=e.source?e.source:"",this.target=e.target?e.target:"",this.predicate=e.predicate?e.predicate:""}};_e([v(),$e("design:type",String)],ct.prototype,"source",void 0);_e([v(),$e("design:type",String)],ct.prototype,"target",void 0);_e([v(),$e("design:type",String)],ct.prototype,"predicate",void 0);ct=_e([J(),$e("design:paramtypes",[Object])],ct);var $a=class{};_e([v(),$e("design:type",Array)],$a.prototype,"additions",void 0);_e([v(),$e("design:type",Array)],$a.prototype,"removals",void 0);$a=_e([Ge()],$a);var Ma=class{constructor(e,t){this.additions=e,this.removals=t}};_e([v(),$e("design:type",Array)],Ma.prototype,"additions",void 0);_e([v(),$e("design:type",Array)],Ma.prototype,"removals",void 0);Ma=_e([J(),$e("design:paramtypes",[Array,Array])],Ma);var Ci=class{};_e([v(),$e("design:type",String)],Ci.prototype,"source",void 0);_e([v(),$e("design:type",String)],Ci.prototype,"target",void 0);_e([v(),$e("design:type",String)],Ci.prototype,"predicate",void 0);Ci=_e([Ge()],Ci);var qr=class extends lr(){hash(){let e=JSON.stringify(this.data,Object.keys(this.data).sort())+JSON.stringify(this.author)+this.timestamp,t=0,n,i;for(n=0;n<e.length;n++)i=e.charCodeAt(n),t=(t<<5)-t+i,t|=0;return t}};_e([v(),$e("design:type",String)],qr.prototype,"status",void 0);qr=_e([J()],qr);var Bs=class extends k1(){};_e([v(),$e("design:type",String)],Bs.prototype,"status",void 0);Bs=_e([Ge()],Bs);function Dg(r,e){return r.author==e.author&&r.timestamp==e.timestamp&&r.data.source==e.data.source&&r.data.predicate==e.data.predicate&&r.data.target==e.data.target}function Ng(r){return r&&r.source&&r.target}var ja=class{constructor(e,t){this.oldLink=e,this.newLink=t}};_e([v(),$e("design:type",qr)],ja.prototype,"oldLink",void 0);_e([v(),$e("design:type",qr)],ja.prototype,"newLink",void 0);ja=_e([J(),$e("design:paramtypes",[qr,qr])],ja);var Vr=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Ei=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Vs,ar=class{constructor(e){e?this.links=e:this.links=[]}get(e){if(!e||!e.source&&!e.predicate&&!e.target)return this.links;if(e.source){let n=JSON.parse(JSON.stringify(this.links));return e.target&&(n=n.filter(i=>i.data.target===e.target)),e.predicate&&(n=n.filter(i=>i.data.predicate===e.predicate)),e.fromDate&&(n=n.filter(i=>new Date(i.timestamp)>=e.fromDate)),e.untilDate&&(n=n.filter(i=>new Date(i.timestamp)<=e.untilDate)),e.limit&&(n=n.slice(0,e.limit)),n}if(e.target){let n=JSON.parse(JSON.stringify(this.links));return e.predicate&&(n=n.filter(i=>i.data.predicate===e.predicate)),e.fromDate&&(n=n.filter(i=>new Date(i.timestamp)>=e.fromDate)),e.untilDate&&(n=n.filter(i=>new Date(i.timestamp)<=e.untilDate)),e.limit&&(n=n.slice(0,e.limit)),n}let t=JSON.parse(JSON.stringify(this.links));return t=t.filter(n=>n.data.predicate===e.predicate),e.limit&&(t=t.slice(0,e.limit)),t}getSingleTarget(e){delete e.target;let t=this.get(e);return t.length?t[0].data.target:null}};Vr([v(),Ei("design:type",Array)],ar.prototype,"links",void 0);ar=Vr([J(),Ei("design:paramtypes",[Array])],ar);var Qs=class{};Vr([v(),Ei("design:type",Array)],Qs.prototype,"links",void 0);Qs=Vr([Ge()],Qs);var Ws=Vs=class{constructor(e){e?this.links=e:this.links=[]}static fromLink(e){let t=new Vs;return t.links.push(e),t}};Vr([v(),Ei("design:type",Array)],Ws.prototype,"links",void 0);Ws=Vs=Vr([Ge(),Ei("design:paramtypes",[Array])],Ws);var Gs=class extends lr(){};Gs=Vr([J()],Gs);var L=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},$=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},rr=class{constructor(e,t){this.did=e,t?this.perspective=t:this.perspective=new ar}};L([v(),$("design:type",String)],rr.prototype,"did",void 0);L([v(),$("design:type",ar)],rr.prototype,"perspective",void 0);L([v(),$("design:type",String)],rr.prototype,"directMessageLanguage",void 0);rr=L([J(),$("design:paramtypes",[String,ar])],rr);var Gl=class extends lr(){};Gl=L([J()],Gl);var or=class{constructor(e,t,n,i,a,o){this.did=e,this.didSigningKeyId=t,this.deviceKeyType=n,this.deviceKey=i,this.deviceKeySignedByDid=a,this.didSignedByDeviceKey=o}};L([v(),$("design:type",String)],or.prototype,"did",void 0);L([v(),$("design:type",String)],or.prototype,"didSigningKeyId",void 0);L([v(),$("design:type",String)],or.prototype,"deviceKeyType",void 0);L([v(),$("design:type",String)],or.prototype,"deviceKey",void 0);L([v(),$("design:type",String)],or.prototype,"deviceKeySignedByDid",void 0);L([v(),$("design:type",String)],or.prototype,"didSignedByDeviceKey",void 0);or=L([J(),$("design:paramtypes",[String,String,String,String,String,String])],or);var sr=class{constructor(e,t,n,i,a,o){this.did=e,this.didSigningKeyId=t,this.deviceKeyType=n,this.deviceKey=i,this.deviceKeySignedByDid=a,this.didSignedByDeviceKey=o}};L([v(),$("design:type",String)],sr.prototype,"did",void 0);L([v(),$("design:type",String)],sr.prototype,"didSigningKeyId",void 0);L([v(),$("design:type",String)],sr.prototype,"deviceKeyType",void 0);L([v(),$("design:type",String)],sr.prototype,"deviceKey",void 0);L([v(),$("design:type",String)],sr.prototype,"deviceKeySignedByDid",void 0);L([v(),$("design:type",String)],sr.prototype,"didSignedByDeviceKey",void 0);sr=L([Ge(),$("design:paramtypes",[String,String,String,String,String,String])],sr);var Ua=class{constructor(e,t){this.signature=e,this.publicKey=t}};L([v(),$("design:type",String)],Ua.prototype,"signature",void 0);L([v(),$("design:type",String)],Ua.prototype,"publicKey",void 0);Ua=L([J(),$("design:paramtypes",[String,String])],Ua);var wn=class{constructor(e,t){this.domain=e,this.pointers=t}};L([v(),$("design:type",String)],wn.prototype,"domain",void 0);L([v(),$("design:type",Array)],wn.prototype,"pointers",void 0);wn=L([J(),$("design:paramtypes",[String,Array])],wn);var qa=class{constructor(e,t){this.with=e,this.can=t}};L([v(),$("design:type",wn)],qa.prototype,"with",void 0);L([v(),$("design:type",Array)],qa.prototype,"can",void 0);qa=L([J(),$("design:paramtypes",[wn,Array])],qa);var jt=class{constructor(e,t,n,i,a){this.appName=e,this.appDesc=t,this.appIconPath=a,this.appUrl=n,this.capabilities=i}};L([v(),$("design:type",String)],jt.prototype,"appName",void 0);L([v(),$("design:type",String)],jt.prototype,"appDesc",void 0);L([v(),$("design:type",String)],jt.prototype,"appUrl",void 0);L([v(),$("design:type",String)],jt.prototype,"appIconPath",void 0);L([v(),$("design:type",Array)],jt.prototype,"capabilities",void 0);jt=L([J(),$("design:paramtypes",[String,String,String,Array,String])],jt);var _n=class{constructor(e,t,n,i){this.requestId=e,this.auth=t,this.token=n,this.revoked=i}};L([v(),$("design:type",String)],_n.prototype,"requestId",void 0);L([v(),$("design:type",String)],_n.prototype,"token",void 0);L([v(),$("design:type",Boolean)],_n.prototype,"revoked",void 0);L([v(),$("design:type",jt)],_n.prototype,"auth",void 0);_n=L([J(),$("design:paramtypes",[String,jt,String,Boolean])],_n);var En=class{constructor(e,t){this.domain=e,this.pointers=t}};L([v(),$("design:type",String)],En.prototype,"domain",void 0);L([v(),$("design:type",Array)],En.prototype,"pointers",void 0);En=L([Ge(),$("design:paramtypes",[String,Array])],En);var Ba=class{constructor(e,t){this.with=e,this.can=t}};L([v(),$("design:type",En)],Ba.prototype,"with",void 0);L([v(),$("design:type",Array)],Ba.prototype,"can",void 0);Ba=L([Ge(),$("design:paramtypes",[En,Array])],Ba);var cr=class{constructor(e,t,n,i,a,o){this.appName=e,this.appDesc=t,this.appUrl=i,this.appDomain=n,this.capabilities=o,this.appIconPath=a}};L([v(),$("design:type",String)],cr.prototype,"appName",void 0);L([v(),$("design:type",String)],cr.prototype,"appDesc",void 0);L([v(),$("design:type",String)],cr.prototype,"appDomain",void 0);L([v(),$("design:type",String)],cr.prototype,"appUrl",void 0);L([v(),$("design:type",String)],cr.prototype,"appIconPath",void 0);L([v(),$("design:type",Array)],cr.prototype,"capabilities",void 0);cr=L([Ge(),$("design:paramtypes",[String,String,String,String,String,Array])],cr);var On=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Tn=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},ut=class{constructor(e){e?(this.isInitialized=e.isInitialized,this.isInitialized||(this.isInitialized=!1),this.isUnlocked=e.isUnlocked,this.isUnlocked||(this.isUnlocked=!1),this.did=e.did,this.didDocument=e.didDocument,this.error=e.error):(this.isInitialized=!1,this.isUnlocked=!1)}};On([v(),Tn("design:type",Boolean)],ut.prototype,"isInitialized",void 0);On([v(),Tn("design:type",Boolean)],ut.prototype,"isUnlocked",void 0);On([v(),Tn("design:type",String)],ut.prototype,"did",void 0);On([v(),Tn("design:type",String)],ut.prototype,"didDocument",void 0);On([v(),Tn("design:type",String)],ut.prototype,"error",void 0);ut=On([J(),Tn("design:paramtypes",[Object])],ut);var Kl=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Ce=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Ye,Xe,Ks=class{constructor(e,t){Ye.set(this,void 0),Xe.set(this,void 0),Kl(this,Ye,e,"f"),Kl(this,Xe,t,"f")}async otherAgents(){return await Ce(this,Ye,"f").otherAgents(Ce(this,Xe,"f"))}async hasTelepresenceAdapter(){return await Ce(this,Ye,"f").hasTelepresenceAdapter(Ce(this,Xe,"f"))}async onlineAgents(){return await Ce(this,Ye,"f").onlineAgents(Ce(this,Xe,"f"))}async setOnlineStatus(e){return await Ce(this,Ye,"f").setOnlineStatus(Ce(this,Xe,"f"),e)}async setOnlineStatusU(e){return await Ce(this,Ye,"f").setOnlineStatusU(Ce(this,Xe,"f"),e)}async sendSignal(e,t){return await Ce(this,Ye,"f").sendSignal(Ce(this,Xe,"f"),e,t)}async sendSignalU(e,t){return await Ce(this,Ye,"f").sendSignalU(Ce(this,Xe,"f"),e,t)}async sendBroadcast(e){return await Ce(this,Ye,"f").sendBroadcast(Ce(this,Xe,"f"),e)}async sendBroadcastU(e){return await Ce(this,Ye,"f").sendBroadcastU(Ce(this,Xe,"f"),e)}async addSignalHandler(e){await Ce(this,Ye,"f").addSignalHandler(Ce(this,Xe,"f"),e)}removeSignalHandler(e){Ce(this,Ye,"f").removeSignalHandler(Ce(this,Xe,"f"),e)}};Ye=new WeakMap,Xe=new WeakMap;var Qr=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Wr=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Ue=class{constructor(e){e&&(this.source=e.source,this.predicate=e.predicate,this.target=e.target,e.fromDate&&(this.fromDate=e.fromDate),e.untilDate&&(this.untilDate=e.untilDate),e.limit&&(this.limit=e.limit))}isMatch(e){return!(this.source&&this.source!==e.source||this.predicate&&this.predicate!==e.predicate||this.target&&this.target!==e.target)}};Qr([v(),Wr("design:type",String)],Ue.prototype,"source",void 0);Qr([v(),Wr("design:type",String)],Ue.prototype,"target",void 0);Qr([v(),Wr("design:type",String)],Ue.prototype,"predicate",void 0);Qr([v(),Wr("design:type",Date)],Ue.prototype,"fromDate",void 0);Qr([v(),Wr("design:type",Date)],Ue.prototype,"untilDate",void 0);Qr([v(),Wr("design:type",Number)],Ue.prototype,"limit",void 0);Ue=Qr([J(),Ge(),Wr("design:paramtypes",[Object])],Ue);var zl=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Je=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},gt,Lt;function Ls(r){return encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}var lt=class{constructor(){gt.set(this,void 0),Lt.set(this,void 0)}static fromUrl(e){if(!e||!e.startsWith("literal://"))throw new Error("Can't create Literal from non-literal URL");let t=new lt;return zl(t,Lt,e,"f"),t}static from(e){let t=new lt;return zl(t,gt,e,"f"),t}toUrl(){if(Je(this,Lt,"f")&&!Je(this,gt,"f"))return Je(this,Lt,"f");if(!Je(this,Lt,"f")&&!Je(this,gt,"f"))throw new Error("Can't turn empty Literal into URL");let e;switch(typeof Je(this,gt,"f")){case"string":e=`string:${Ls(Je(this,gt,"f"))}`;break;case"number":e=`number:${Ls(Je(this,gt,"f"))}`;break;case"object":e=`json:${Ls(JSON.stringify(Je(this,gt,"f")))}`;break}return`literal://${e}`}get(){if(Je(this,gt,"f"))return Je(this,gt,"f");if(!Je(this,Lt,"f"))throw new Error("Can't render empty Literal");if(!Je(this,Lt,"f").startsWith("literal://"))throw new Error("Can't render Literal from non-literal URL");let e=Je(this,Lt,"f").substring(10);if(e.startsWith("string:"))return decodeURIComponent(e.substring(7));if(e.startsWith("number:")){let t=e.substring(7);return parseFloat(t)}if(e.startsWith("json:")){let t=e.substring(5);return JSON.parse(decodeURIComponent(t))}throw new Error(`Can't parse unknown literal: ${e}`)}};gt=new WeakMap,Lt=new WeakMap;function nr(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Sf(r){return`set${nr(r)}`}function Mt(r){return r.endsWith("y")?r.slice(0,-1)+"ies":r+"s"}function nc(r){return r.endsWith("ies")?r.slice(0,-3)+"y":r.endsWith("s")?r.slice(0,-1):r}function D1(r){return`add${nr(nc(r))}`}function N1(r){let e=r.substring(3),t=Mt(e);return t.charAt(0).toLowerCase()+t.slice(1)}function P1(r){return`remove${nr(nc(r))}`}function R1(r){let e=r.substring(6),t=Mt(e);return t.charAt(0).toLowerCase()+t.slice(1)}function L1(r){let e=r.substring(13),t=Mt(e);return t.charAt(0).toLowerCase()+t.slice(1)}function F1(r){return`setCollection${nr(nc(r))}`}function Dr(r){if(Array.isArray(r))return`[${r.map(Dr).join(", ")}]`;let e=Object.keys(r),t=[];for(let n of e){let i=JSON.stringify(r[n]),a=`${n}: ${i}`;t.push(a)}return`{${t.join(", ")}}`}var Fs=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},q=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Be,Ve,de,Va=class{constructor(r,e,t){Be.set(this,void 0),Ve.set(this,void 0),de.set(this,void 0),Fs(this,Be,e,"f"),Fs(this,Ve,t,"f"),Fs(this,de,r,"f")}get baseExpression(){return q(this,Be,"f")}async init(){let isInstance=await q(this,de,"f").isSubjectInstance(q(this,Be,"f"),q(this,Ve,"f"));if(!isInstance)throw`Not a valid subject instance of ${q(this,Ve,"f")} for ${q(this,Be,"f")}`;let results=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), property(C, Property)`),properties=results.map(r=>r.Property);for(let r of properties){let e=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), property_resolve(C, "${r}")`);Object.defineProperty(this,r,{configurable:!0,get:async()=>{let t=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), property_getter(C, "${q(this,Be,"f")}", "${r}", Value)`);if(t&&t.length>0){let n=t[0].Value;if(e)try{let i=await q(this,de,"f").getExpression(n);try{return JSON.parse(i.data)}catch{return i.data}}catch{return n}else return n}else return t||void 0}})}let setters=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), property_setter(C, Property, Setter)`);for(let setter of setters||[])if(setter){let property=setter.Property,actions=eval(setter.Setter),resolveLanguageResults=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), property_resolve_language(C, "${property}", Language)`),resolveLanguage;resolveLanguageResults&&resolveLanguageResults.length>0&&(resolveLanguage=resolveLanguageResults[0].Language),this[Sf(property)]=async r=>{resolveLanguage&&(r=await q(this,de,"f").createExpression(r,resolveLanguage)),await q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:r}])}}let results2=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), collection(C, Collection)`);results2||(results2=[]);let collections=results2.map(r=>r.Collection);for(let r of collections)Object.defineProperty(this,r,{configurable:!0,get:async()=>{let e=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), collection_getter(C, "${q(this,Be,"f")}", "${r}", Value)`);return e&&e.length>0&&e[0].Value?e[0].Value.filter(n=>n!==""&&n!==""):[]}});let adders=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), collection_adder(C, Collection, Adder)`);adders||(adders=[]);for(let adder of adders)if(adder){let collection=adder.Collection,actions=eval(adder.Adder);this[D1(collection)]=async r=>{Array.isArray(r)?await Promise.all(r.map(e=>q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:e}]))):await q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:r}])}}let removers=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), collection_remover(C, Collection, Remover)`);removers||(removers=[]);for(let remover of removers)if(remover){let collection=remover.Collection,actions=eval(remover.Remover);this[P1(collection)]=async r=>{Array.isArray(r)?await Promise.all(r.map(e=>q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:e}]))):await q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:r}])}}let collectionSetters=await q(this,de,"f").infer(`subject_class("${q(this,Ve,"f")}", C), collection_setter(C, Collection, Setter)`);collectionSetters||(collectionSetters=[]);for(let collectionSetter of collectionSetters)if(collectionSetter){let collection=collectionSetter.Collection,actions=eval(collectionSetter.Setter);this[F1(collection)]=async r=>{Array.isArray(r)?await q(this,de,"f").executeAction(actions,q(this,Be,"f"),r.map(e=>({name:"value",value:e}))):await q(this,de,"f").executeAction(actions,q(this,Be,"f"),[{name:"value",value:r}])}}}};Be=new WeakMap,Ve=new WeakMap,de=new WeakMap;var mn=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},F=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},he,Oe,Nr,Pr,Rr,ai,Sn=class{constructor(r,e){he.set(this,void 0),Oe.set(this,void 0),Nr.set(this,void 0),Pr.set(this,void 0),Rr.set(this,void 0),ai.set(this,void 0),mn(this,Nr,[],"f"),mn(this,Pr,[],"f"),mn(this,Rr,[],"f"),mn(this,ai,[],"f"),mn(this,he,r,"f"),mn(this,Oe,e,"f"),F(this,Oe,"f").addPerspectiveLinkAddedListener(F(this,he,"f").uuid,F(this,Nr,"f")),F(this,Oe,"f").addPerspectiveLinkRemovedListener(F(this,he,"f").uuid,F(this,Pr,"f")),F(this,Oe,"f").addPerspectiveLinkUpdatedListener(F(this,he,"f").uuid,F(this,Rr,"f")),F(this,Oe,"f").addPerspectiveSyncStateChangeListener(F(this,he,"f").uuid,F(this,ai,"f"))}async executeAction(r,e,t){let n=a=>{if(a)return a==="this"?e:a},i=a=>{if(t){let o=a;for(let s of t)o=o.replace(s.name,s.value);return o}else return a};for(let a of r){let o=n(i(a.source)),s=n(i(a.predicate)),u=n(i(a.target)),l=a?.local??!1;switch(a.action){case"addLink":await this.add(new ct({source:o,predicate:s,target:u}),l?"local":"shared");break;case"removeLink":let f=await this.get(new Ue({source:o,predicate:s,target:u}));for(let h of f)await this.remove(h);break;case"setSingleTarget":await this.setSingleTarget(new ct({source:o,predicate:s,target:u}),l?"local":"shared");break;case"collectionSetter":let p=await this.get(new Ue({source:o,predicate:s}));await this.removeLinks(p),await this.addLinks(t.map(h=>new ct({source:o,predicate:s,target:h.value})),l?"local":"shared");break}}}get uuid(){return F(this,he,"f").uuid}get name(){return F(this,he,"f").name}get sharedUrl(){return F(this,he,"f").sharedUrl}get neighbourhood(){return F(this,he,"f").neighbourhood}get state(){return F(this,he,"f").state}async get(r){return await F(this,Oe,"f").queryLinks(F(this,he,"f").uuid,r)}async infer(r){return await F(this,Oe,"f").queryProlog(F(this,he,"f").uuid,r)}async add(r,e="shared"){return await F(this,Oe,"f").addLink(F(this,he,"f").uuid,r,e)}async addLinks(r,e="shared"){return await F(this,Oe,"f").addLinks(F(this,he,"f").uuid,r,e)}async removeLinks(r){return await F(this,Oe,"f").removeLinks(F(this,he,"f").uuid,r)}async linkMutations(r,e="shared"){return await F(this,Oe,"f").linkMutations(F(this,he,"f").uuid,r,e)}async addLinkExpression(r,e="shared"){return await F(this,Oe,"f").addLinkExpression(F(this,he,"f").uuid,r,e)}async update(r,e){return await F(this,Oe,"f").updateLink(F(this,he,"f").uuid,r,e)}async remove(r){return await F(this,Oe,"f").removeLink(F(this,he,"f").uuid,r)}async getExpression(r){return await F(this,Oe,"f").getExpression(r)}async createExpression(r,e){return await F(this,Oe,"f").createExpression(r,e)}async addListener(r,e){r==="link-added"?F(this,Nr,"f").push(e):r==="link-removed"?F(this,Pr,"f").push(e):r==="link-updated"&&F(this,Rr,"f").push(e)}async addSyncStateChangeListener(r){F(this,ai,"f").push(r)}async removeListener(r,e){if(r==="link-added"){let t=F(this,Nr,"f").indexOf(e);F(this,Nr,"f").splice(t,1)}else if(r==="link-removed"){let t=F(this,Pr,"f").indexOf(e);F(this,Pr,"f").splice(t,1)}else if(r==="link-updated"){let t=F(this,Rr,"f").indexOf(e);F(this,Rr,"f").splice(t,1)}}async snapshot(){return F(this,Oe,"f").snapshotByUUID(F(this,he,"f").uuid)}async loadSnapshot(r){let e=JSON.parse(JSON.stringify(r));delete e.__typename,e.links.forEach(t=>{delete t.data.__typename});for(let t of e.links)await this.addLinkExpression(t)}async getSingleTarget(r){delete r.target;let e=await this.get(r);return e.length?e[0].data.target:null}async setSingleTarget(r,e="shared"){let t=new Ue({source:r.source,predicate:r.predicate}),n=await this.get(t),i=[];for(let o of n)delete o.__typename,delete o.data.__typename,delete o.proof.__typename,i.push(o);let a=[r];await this.linkMutations({additions:a,removals:i},e)}async sdnaFlows(){return(await this.infer("register_sdna_flow(X, _)")).map(e=>e.X)}async availableFlows(r){return(await this.infer(`flowable("${r}", F), register_sdna_flow(X, F)`)).map(t=>t.X)}async startFlow(flowName,exprAddr){let startAction=await this.infer(`start_action(Action, F), register_sdna_flow("${flowName}", F)`);startAction=eval(startAction[0].Action),await this.executeAction(startAction,exprAddr,void 0)}async expressionsInFlowState(r,e){return(await this.infer(`register_sdna_flow("${r}", F), flow_state(X, ${e}, F)`)).map(n=>n.X)}async flowState(r,e){return(await this.infer(`register_sdna_flow("${r}", F), flow_state("${e}", X, F)`))[0].X}async flowActions(r,e){return(await this.infer(`register_sdna_flow("${r}", Flow), flow_state("${e}", State, Flow), action(State, Name, _, _)`)).map(n=>n.Name)}async runFlowAction(flowName,exprAddr,actionName){let action=await this.infer(`register_sdna_flow("${flowName}", Flow), flow_state("${exprAddr}", State, Flow), action(State, "${actionName}", _, Action)`);action=eval(action[0].Action),await this.executeAction(action,exprAddr,void 0)}async getSdna(){return(await this.get(new Ue({predicate:"ad4m://sdna"}))).map(e=>e.data.target).map(e=>lt.fromUrl(e).get())}async addSdna(r,e,t){let n="ad4m://has_custom_sdna";t==="subject_class"?n="ad4m://has_subject_class":t==="flow"&&(n="ad4m://has_flow");let i=lt.from(r).toUrl(),a=await this.get(new Ue({source:"ad4m://self",predicate:n,target:i})),o=[];a.length===0&&o.push(new ct({source:"ad4m://self",predicate:n,target:i})),o.push(new ct({source:i,predicate:"ad4m://sdna",target:lt.from(e).toUrl()})),await this.addLinks(o)}async subjectClasses(){try{return(await this.infer("subject_class(X, _)")).map(r=>r.X)}catch{return[]}}async stringOrTemplateObjectToSubjectClass(r){if(typeof r=="string")return r;{let e=await this.subjectClassesByTemplate(r);return e[0]?e[0]:r.className}}async createSubject(subjectClass,exprAddr){let className=await this.stringOrTemplateObjectToSubjectClass(subjectClass),result=await this.infer(`subject_class("${className}", C), constructor(C, Actions)`);if(!result.length)throw"No constructor found for given subject class: "+className;let actions=result.map(x=>eval(x.Actions));return await this.executeAction(actions[0],exprAddr,void 0),this.getSubjectProxy(exprAddr,subjectClass)}async removeSubject(subjectClass,exprAddr){let className=await this.stringOrTemplateObjectToSubjectClass(subjectClass),result=await this.infer(`subject_class("${className}", C), destructor(C, Actions)`);if(!result.length)throw"No constructor found for given subject class: "+className;let actions=result.map(x=>eval(x.Actions));await this.executeAction(actions[0],exprAddr,void 0)}async isSubjectInstance(r,e){let t=await this.stringOrTemplateObjectToSubjectClass(e);return await this.infer(`subject_class("${t}", C), instance(C, "${r}")`)}async getSubjectProxy(r,e){if(!await this.isSubjectInstance(r,e))throw`Expression ${r} is not a subject instance of given class: ${JSON.stringify(e)}`;let t=await this.stringOrTemplateObjectToSubjectClass(e),n=new Va(this,r,t);return await n.init(),n}async getAllSubjectInstances(r){let e=[];typeof r=="string"?e=[r]:e=await this.subjectClassesByTemplate(r);let t=[];for(let n of e){let i=await this.infer(`subject_class("${n}", C), instance(C, X)`),a=await Promise.all(i.map(async o=>await this.getSubjectProxy(o.X,n)));t=t.concat(a)}return t}async getAllSubjectProxies(r){let e=[];typeof r=="string"?e=[r]:e=await this.subjectClassesByTemplate(r);let t=[];for(let n of e)t=await this.infer(`subject_class("${n}", C), instance(C, X)`);return t}async subjectClassesByTemplate(r){let e=[],t=[];Object.getPrototypeOf(r).__properties?Object.keys(Object.getPrototypeOf(r).__properties).forEach(l=>e.push(l)):e.push(...Object.keys(r).filter(l=>!Array.isArray(r[l]))),Object.getPrototypeOf(r).__collections?Object.keys(Object.getPrototypeOf(r).__collections).filter(l=>l!=="isSubjectInstance").forEach(l=>!t.includes(l)):t.push(...Object.keys(r).filter(l=>Array.isArray(r[l])).filter(l=>l!=="isSubjectInstance"));let n=Object.getOwnPropertyNames(r).filter(l=>typeof r[l]=="function"&&l.startsWith("set")&&!l.startsWith("setCollection"));n=n.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(r)).filter(l=>typeof r[l]=="function"&&l.startsWith("set")&&!l.startsWith("setCollection")));let i=Object.getOwnPropertyNames(r).filter(l=>typeof r[l]=="function"&&l.startsWith("add"));i=i.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(r)).filter(l=>typeof r[l]=="function"&&l.startsWith("add")));let a=Object.getOwnPropertyNames(r).filter(l=>typeof r[l]=="function"&&l.startsWith("remove"));a=a.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(r)).filter(l=>typeof r[l]=="function"&&l.startsWith("remove")));let o=Object.getOwnPropertyNames(r).filter(l=>typeof r[l]=="function"&&l.startsWith("setCollection"));o=o.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(r)).filter(l=>typeof r[l]=="function"&&l.startsWith("setCollection")));let s="subject_class(Class, C)";for(let l of e)s+=`, property(C, "${l}")`;for(let l of t)s+=`, collection(C, "${l}")`;for(let l of n){let f=l.substring(3);f=f.charAt(0).toLowerCase()+f.slice(1),s+=`, property_setter(C, "${f}", _)`}for(let l of i)s+=`, collection_adder(C, "${N1(l)}", _)`;for(let l of a)s+=`, collection_remover(C, "${R1(l)}", _)`;for(let l of o)s+=`, collection_setter(C, "${L1(l)}", _)`;s+=".";let u=await this.infer(s);return u?u.map(l=>l.Class):[]}async ensureSDNASubjectClass(r){if((await this.subjectClassesByTemplate(new r)).length>0)return;let{name:t,sdna:n}=r.generateSDNA();await this.addSdna(t,n,"subject_class")}getNeighbourhoodProxy(){return F(this,Oe,"f").getNeighbourhoodProxy(F(this,he,"f").uuid)}};he=new WeakMap,Oe=new WeakMap,Nr=new WeakMap,Pr=new WeakMap,Rr=new WeakMap,ai=new WeakMap;var Ar=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},H=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},ce,oi,si,ci,Aa,ui,Ia,rt=`
64
+ author
65
+ timestamp
66
+ status
67
+ data { source, predicate, target }
68
+ proof { valid, invalid, signature, key }
69
+ `,yn=`
70
+ uuid
71
+ name
72
+ sharedUrl
73
+ state
74
+ neighbourhood {
75
+ data {
76
+ linkLanguage
77
+ meta {
78
+ links
79
+ {
80
+ author
81
+ timestamp
82
+ data { source, predicate, target }
83
+ proof { valid, invalid, signature, key }
84
+ }
85
+ }
86
+ }
87
+ author
88
+ }
89
+ `,Qa=class{constructor(e,t=!0){ce.set(this,void 0),oi.set(this,void 0),si.set(this,void 0),ci.set(this,void 0),Aa.set(this,void 0),ui.set(this,void 0),Ia.set(this,void 0),Ar(this,ce,e,"f"),Ar(this,oi,[],"f"),Ar(this,si,[],"f"),Ar(this,ci,[],"f"),Ar(this,Aa,[],"f"),t&&(this.subscribePerspectiveAdded(),this.subscribePerspectiveUpdated(),this.subscribePerspectiveRemoved())}setExpressionClient(e){Ar(this,ui,e,"f")}setNeighbourhoodClient(e){Ar(this,Ia,e,"f")}async all(){let{perspectives:e}=A(await H(this,ce,"f").query({query:E`query perspectives {
90
+ perspectives {
91
+ ${yn}
92
+ }
93
+ }`}));return e.map(t=>new Sn(t,this))}async byUUID(e){let{perspective:t}=A(await H(this,ce,"f").query({query:E`query perspective($uuid: String!) {
94
+ perspective(uuid: $uuid) {
95
+ ${yn}
96
+ }
97
+ }`,variables:{uuid:e}}));return t?new Sn(t,this):null}async snapshotByUUID(e){let{perspectiveSnapshot:t}=A(await H(this,ce,"f").query({query:E`query perspectiveSnapshot($uuid: String!) {
98
+ perspectiveSnapshot(uuid: $uuid) {
99
+ links { ${rt} }
100
+ }
101
+ }`,variables:{uuid:e}}));return t}async publishSnapshotByUUID(e){let{perspectivePublishSnapshot:t}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectivePublishSnapshot($uuid: String!) {
102
+ perspectivePublishSnapshot(uuid: $uuid)
103
+ }`,variables:{uuid:e}}));return t}async queryLinks(e,t){let{perspectiveQueryLinks:n}=A(await H(this,ce,"f").query({query:E`query perspectiveQueryLinks($uuid: String!, $query: LinkQuery!) {
104
+ perspectiveQueryLinks(query: $query, uuid: $uuid) {
105
+ ${rt}
106
+ }
107
+ }`,variables:{uuid:e,query:t}}));return n}async queryProlog(e,t){let{perspectiveQueryProlog:n}=A(await H(this,ce,"f").query({query:E`query perspectiveQueryProlog($uuid: String!, $query: String!) {
108
+ perspectiveQueryProlog(uuid: $uuid, query: $query)
109
+ }`,variables:{uuid:e,query:t}}));return JSON.parse(n)}async add(e){let{perspectiveAdd:t}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveAdd($name: String!) {
110
+ perspectiveAdd(name: $name) {
111
+ ${yn}
112
+ }
113
+ }`,variables:{name:e}}));return new Sn(t,this)}async update(e,t){let{perspectiveUpdate:n}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveUpdate($uuid: String!, $name: String!) {
114
+ perspectiveUpdate(uuid: $uuid, name: $name) {
115
+ ${yn}
116
+ }
117
+ }`,variables:{uuid:e,name:t}}));return new Sn(n,this)}async remove(e){return A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveRemove($uuid: String!) {
118
+ perspectiveRemove(uuid: $uuid)
119
+ }`,variables:{uuid:e}}))}async addLink(e,t,n){let{perspectiveAddLink:i}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveAddLink($uuid: String!, $link: LinkInput!, $status: String){
120
+ perspectiveAddLink(link: $link, uuid: $uuid, status: $status) {
121
+ ${rt}
122
+ }
123
+ }`,variables:{uuid:e,link:t,status:n}}));return i}async addLinks(e,t,n){let{perspectiveAddLinks:i}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveAddLinks($uuid: String!, $links: [LinkInput!]!, $status: String){
124
+ perspectiveAddLinks(links: $links, uuid: $uuid, status: $status) {
125
+ ${rt}
126
+ }
127
+ }`,variables:{uuid:e,links:t,status:n}}));return i}async removeLinks(e,t){let{perspectiveRemoveLinks:n}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveRemoveLinks($uuid: String!, $links: [LinkExpressionInput!]!){
128
+ perspectiveRemoveLinks(links: $links, uuid: $uuid) {
129
+ ${rt}
130
+ }
131
+ }`,variables:{uuid:e,links:t}}));return n}async linkMutations(e,t,n){let{perspectiveLinkMutations:i}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveLinkMutations($uuid: String!, $mutations: LinkMutations!, $status: String){
132
+ perspectiveLinkMutations(mutations: $mutations, uuid: $uuid, status: $status) {
133
+ additions {
134
+ ${rt}
135
+ }
136
+ removals {
137
+ ${rt}
138
+ }
139
+ }
140
+ }`,variables:{uuid:e,mutations:t,status:n}}));return i}async addLinkExpression(e,t,n){let{perspectiveAddLinkExpression:i}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveAddLinkExpression($uuid: String!, $link: LinkExpressionInput!, $status: String){
141
+ perspectiveAddLinkExpression(link: $link, uuid: $uuid, status: $status) {
142
+ ${rt}
143
+ }
144
+ }`,variables:{uuid:e,link:t}}));return i}async updateLink(e,t,n){delete t.__typename,delete t.data.__typename,delete t.proof.__typename;let{perspectiveUpdateLink:i}=A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveUpdateLink(
145
+ $uuid: String!,
146
+ $newLink: LinkInput!
147
+ $oldLink: LinkExpressionInput!
148
+ ){
149
+ perspectiveUpdateLink(
150
+ newLink: $newLink,
151
+ oldLink: $oldLink,
152
+ uuid: $uuid
153
+ ) {
154
+ ${rt}
155
+ }
156
+ }`,variables:{uuid:e,oldLink:t,newLink:n}}));return i.status||delete i.status,i}async removeLink(e,t){return delete t.__typename,delete t.data.__typename,delete t.proof.__typename,delete t.status,A(await H(this,ce,"f").mutate({mutation:E`mutation perspectiveRemoveLink($link: LinkExpressionInput!, $uuid: String!) {
157
+ perspectiveRemoveLink(link: $link, uuid: $uuid)
158
+ }`,variables:{uuid:e,link:t}}))}async getExpression(e){return await H(this,ui,"f").get(e)}async createExpression(e,t){return await H(this,ui,"f").create(e,t)}addPerspectiveAddedListener(e){H(this,oi,"f").push(e)}subscribePerspectiveAdded(){H(this,ce,"f").subscribe({query:E` subscription {
159
+ perspectiveAdded { ${yn} }
160
+ }
161
+ `}).subscribe({next:e=>{H(this,oi,"f").forEach(t=>{t(e.data.perspectiveAdded)})},error:e=>console.error(e)})}addPerspectiveUpdatedListener(e){H(this,si,"f").push(e)}subscribePerspectiveUpdated(){H(this,ce,"f").subscribe({query:E` subscription {
162
+ perspectiveUpdated { ${yn} }
163
+ }
164
+ `}).subscribe({next:e=>{H(this,si,"f").forEach(t=>{t(e.data.perspectiveUpdated)})},error:e=>console.error(e)})}addPerspectiveSyncedListener(e){H(this,Aa,"f").push(e)}async addPerspectiveSyncStateChangeListener(e,t){H(this,ce,"f").subscribe({query:E` subscription {
165
+ perspectiveSyncStateChange(uuid: "${e}")
166
+ }
167
+ `}).subscribe({next:n=>{t.forEach(i=>{i(n.data.perspectiveSyncStateChange)})},error:n=>console.error(n)}),await new Promise(n=>setTimeout(n,500))}addPerspectiveRemovedListener(e){H(this,ci,"f").push(e)}subscribePerspectiveRemoved(){H(this,ce,"f").subscribe({query:E` subscription {
168
+ perspectiveRemoved
169
+ }
170
+ `}).subscribe({next:e=>{H(this,ci,"f").forEach(t=>{t(e.data.perspectiveRemoved)})},error:e=>console.error(e)})}async addPerspectiveLinkAddedListener(e,t){H(this,ce,"f").subscribe({query:E` subscription {
171
+ perspectiveLinkAdded(uuid: "${e}") { ${rt} }
172
+ }
173
+ `}).subscribe({next:n=>{t.forEach(i=>{i(n.data.perspectiveLinkAdded)})},error:n=>console.error(n)}),await new Promise(n=>setTimeout(n,500))}async addPerspectiveLinkRemovedListener(e,t){H(this,ce,"f").subscribe({query:E` subscription {
174
+ perspectiveLinkRemoved(uuid: "${e}") { ${rt} }
175
+ }
176
+ `}).subscribe({next:n=>{t.forEach(i=>{n.data.perspectiveLinkRemoved.status||delete n.data.perspectiveLinkRemoved.status,i(n.data.perspectiveLinkRemoved)})},error:n=>console.error(n)}),await new Promise(n=>setTimeout(n,500))}async addPerspectiveLinkUpdatedListener(e,t){H(this,ce,"f").subscribe({query:E` subscription {
177
+ perspectiveLinkUpdated(uuid: "${e}") {
178
+ oldLink {
179
+ ${rt}
180
+ }
181
+ newLink {
182
+ ${rt}
183
+ }
184
+ }
185
+ }
186
+ `}).subscribe({next:n=>{t.forEach(i=>{n.data.perspectiveLinkUpdated.newLink.status||delete n.data.perspectiveLinkUpdated.newLink.status,n.data.perspectiveLinkUpdated.oldLink.status||delete n.data.perspectiveLinkUpdated.oldLink.status,i(n.data.perspectiveLinkUpdated)})},error:n=>console.error(n)}),await new Promise(n=>setTimeout(n,500))}getNeighbourhoodProxy(e){return new Ks(H(this,Ia,"f"),e)}};ce=new WeakMap,oi=new WeakMap,si=new WeakMap,ci=new WeakMap,Aa=new WeakMap,ui=new WeakMap,Ia=new WeakMap;var ga=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Z=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},ie,li,fi,pi,ni=`
187
+ did
188
+ directMessageLanguage
189
+ perspective {
190
+ links {
191
+ author, timestamp,
192
+ proof {
193
+ signature, key, valid, invalid
194
+ }
195
+ data {
196
+ source, predicate, target
197
+ }
198
+ }
199
+ }
200
+ `,va=`
201
+ requestId
202
+ revoked
203
+ auth {
204
+ appName
205
+ appDesc
206
+ appUrl
207
+ appIconPath
208
+ capabilities {
209
+ with {
210
+ domain
211
+ pointers
212
+ }
213
+ can
214
+ }
215
+ }
216
+ `,gn=`
217
+ isInitialized
218
+ isUnlocked
219
+ did
220
+ didDocument
221
+ error
222
+ `,ba=`
223
+ did
224
+ didSigningKeyId
225
+ deviceKeyType
226
+ deviceKey
227
+ deviceKeySignedByDid
228
+ didSignedByDeviceKey
229
+ `,$1=`
230
+ signature
231
+ publicKey
232
+ `,Si=class{constructor(e,t=!0){ie.set(this,void 0),li.set(this,void 0),fi.set(this,void 0),pi.set(this,void 0),ga(this,ie,e,"f"),ga(this,fi,[],"f"),ga(this,pi,[],"f"),ga(this,li,[],"f"),t&&(this.subscribeAgentUpdated(),this.subscribeAgentStatusChanged(),this.subscribeAppsChanged())}async me(){let{agent:e}=A(await Z(this,ie,"f").query({query:E`query agent { agent { ${ni} } }`})),t=new rr(e.did,e.perspective);return t.directMessageLanguage=e.directMessageLanguage,t}async status(){let{agentStatus:e}=A(await Z(this,ie,"f").query({query:E`query agentStatus {
233
+ agentStatus {
234
+ ${gn}
235
+ }
236
+ }`}));return new ut(e)}async generate(e){let{agentGenerate:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentGenerate(
237
+ $passphrase: String!
238
+ ) {
239
+ agentGenerate(passphrase: $passphrase) {
240
+ ${gn}
241
+ }
242
+ }`,variables:{passphrase:e}}));return new ut(t)}async import(e){let{did:t,didDocument:n,keystore:i,passphrase:a}=e,{agentImport:o}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentImport(
243
+ $did: String!,
244
+ $didDocument: String!,
245
+ $keystore: String!,
246
+ $passphrase: String!
247
+ ) {
248
+ agentImport(did: $did, didDocument: $didDocument, keystore: $keystore, passphrase: $passphrase) {
249
+ ${gn}
250
+ }
251
+ }`,variables:{did:t,didDocument:n,keystore:i,passphrase:a}}));return new ut(o)}async lock(e){let{agentLock:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentLock($passphrase: String!) {
252
+ agentLock(passphrase: $passphrase) {
253
+ ${gn}
254
+ }
255
+ }`,variables:{passphrase:e}}));return new ut(t)}async unlock(e,t=!0){let{agentUnlock:n}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentUnlock($passphrase: String!, $holochain: Boolean!) {
256
+ agentUnlock(passphrase: $passphrase, holochain: $holochain) {
257
+ ${gn}
258
+ }
259
+ }`,variables:{passphrase:e,holochain:t}}));return new ut(n)}async byDID(e){let{agentByDID:t}=A(await Z(this,ie,"f").query({query:E`query agentByDID($did: String!) {
260
+ agentByDID(did: $did) {
261
+ ${ni}
262
+ }
263
+ }`,variables:{did:e}}));return t}async updatePublicPerspective(e){let t=JSON.parse(JSON.stringify(e));delete t.__typename,t.links.forEach(o=>{delete o.__typename,delete o.data.__typename,delete o.proof.__typename,delete o.status});let{agentUpdatePublicPerspective:n}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentUpdatePublicPerspective($perspective: PerspectiveInput!) {
264
+ agentUpdatePublicPerspective(perspective: $perspective) {
265
+ ${ni}
266
+ }
267
+ }`,variables:{perspective:t}})),i=n,a=new rr(i.did,i.perspective);return a.directMessageLanguage=i.directMessageLanguage,a}async mutatePublicPerspective(e){let t=new Qa(Z(this,ie,"f")),n=new Si(Z(this,ie,"f")),i=await t.add("Agent Perspective Proxy"),a=await n.me();a.perspective&&await i.loadSnapshot(a.perspective);for(let u of e.additions)await i.add(u);for(let u of e.removals)await i.remove(u);let o=await i.snapshot(),s=await this.updatePublicPerspective(o);return await t.remove(i.uuid),s}async updateDirectMessageLanguage(e){let{agentUpdateDirectMessageLanguage:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentUpdateDirectMessageLanguage($directMessageLanguage: String!) {
268
+ agentUpdateDirectMessageLanguage(directMessageLanguage: $directMessageLanguage) {
269
+ ${ni}
270
+ }
271
+ }`,variables:{directMessageLanguage:e}})),n=t,i=new rr(n.did,n.perspective);return i.directMessageLanguage=n.directMessageLanguage,i}async addEntanglementProofs(e){let{agentAddEntanglementProofs:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentAddEntanglementProofs($proofs: [EntanglementProofInput!]!) {
272
+ agentAddEntanglementProofs(proofs: $proofs) {
273
+ ${ba}
274
+ }
275
+ }`,variables:{proofs:e}}));return t}async deleteEntanglementProofs(e){let{agentDeleteEntanglementProofs:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentDeleteEntanglementProofs($proofs: [EntanglementProofInput!]!) {
276
+ agentDeleteEntanglementProofs(proofs: $proofs) {
277
+ ${ba}
278
+ }
279
+ }`,variables:{proofs:e}}));return t}async getEntanglementProofs(){let{agentGetEntanglementProofs:e}=A(await Z(this,ie,"f").query({query:E`query agentGetEntanglementProofs {
280
+ agentGetEntanglementProofs {
281
+ ${ba}
282
+ }
283
+ }`}));return e}async entanglementProofPreFlight(e,t){let{agentEntanglementProofPreFlight:n}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentEntanglementProofPreFlight($deviceKey: String!, $deviceKeyType: String!) {
284
+ agentEntanglementProofPreFlight(deviceKey: $deviceKey, deviceKeyType: $deviceKeyType) {
285
+ ${ba}
286
+ }
287
+ }`,variables:{deviceKey:e,deviceKeyType:t}}));return n}addUpdatedListener(e){Z(this,fi,"f").push(e)}addAppChangedListener(e){Z(this,li,"f").push(e)}subscribeAgentUpdated(){Z(this,ie,"f").subscribe({query:E` subscription {
288
+ agentUpdated { ${ni} }
289
+ }
290
+ `}).subscribe({next:e=>{let t=e.data.agentUpdated;Z(this,fi,"f").forEach(n=>{n(t)})},error:e=>console.error(e)})}subscribeAppsChanged(){Z(this,ie,"f").subscribe({query:E` subscription {
291
+ agentAppsChanged {
292
+ ${va}
293
+ }
294
+ }
295
+ `}).subscribe({next:e=>{Z(this,li,"f").forEach(t=>{t()})},error:e=>console.error(e)})}addAgentStatusChangedListener(e){Z(this,pi,"f").push(e)}subscribeAgentStatusChanged(){Z(this,ie,"f").subscribe({query:E` subscription {
296
+ agentStatusChanged { ${gn} }
297
+ }
298
+ `}).subscribe({next:e=>{let t=e.data.agentStatusChanged;Z(this,pi,"f").forEach(n=>{n(t)})},error:e=>console.error(e)})}async requestCapability(e){let{agentRequestCapability:t}=A(await Z(this,ie,"f").mutate({mutation:E`
299
+ mutation agentRequestCapability($authInfo: AuthInfoInput!) {
300
+ agentRequestCapability(authInfo: $authInfo)
301
+ }
302
+ `,variables:{authInfo:e}}));return t}async permitCapability(e){let{agentPermitCapability:t}=A(await Z(this,ie,"f").mutate({mutation:E`
303
+ mutation agentPermitCapability($auth: String!) {
304
+ agentPermitCapability(auth: $auth)
305
+ }
306
+ `,variables:{auth:e}}));return t}async generateJwt(e,t){let{agentGenerateJwt:n}=A(await Z(this,ie,"f").mutate({mutation:E`
307
+ mutation agentGenerateJwt($requestId: String!, $rand: String!) {
308
+ agentGenerateJwt(requestId: $requestId, rand: $rand)
309
+ }
310
+ `,variables:{requestId:e,rand:t}}));return n}async getApps(){let{agentGetApps:e}=A(await Z(this,ie,"f").mutate({mutation:E`query agentGetApps {
311
+ agentGetApps {
312
+ ${va}
313
+ }
314
+ }`}));return e}async removeApp(e){let{agentRemoveApp:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentRemoveApp($requestId: String!) {
315
+ agentRemoveApp(requestId: $requestId) {
316
+ ${va}
317
+ }
318
+ }`,variables:{requestId:e}}));return t}async revokeToken(e){let{agentRevokeToken:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentRevokeToken($requestId: String!) {
319
+ agentRevokeToken(requestId: $requestId) {
320
+ ${va}
321
+ }
322
+ }`,variables:{requestId:e}}));return t}async isLocked(){let{agentIsLocked:e}=A(await Z(this,ie,"f").mutate({mutation:E`
323
+ query agentIsLocked {
324
+ agentIsLocked
325
+ }
326
+ `}));return e}async signMessage(e){let{agentSignMessage:t}=A(await Z(this,ie,"f").mutate({mutation:E`mutation agentSignMessage($message: String!) {
327
+ agentSignMessage(message: $message) {
328
+ ${$1}
329
+ }
330
+ }`,variables:{message:e}}));return t}};ie=new WeakMap,li=new WeakMap,fi=new WeakMap,pi=new WeakMap;var M1=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},tr=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},vt,Hl=`
331
+ name
332
+ address
333
+ settings
334
+ icon { code }
335
+ constructorIcon { code }
336
+ settingsIcon { code }
337
+ `,Jl=`
338
+ name
339
+ address
340
+ description
341
+ author
342
+ templated
343
+ templateSourceLanguageAddress
344
+ templateAppliedParams
345
+ possibleTemplateParams
346
+ sourceCodeLink
347
+ `,zs=class{constructor(e){vt.set(this,void 0),M1(this,vt,e,"f")}async byAddress(e){let{language:t}=A(await tr(this,vt,"f").query({query:E`query byAddress($address: String!) {
348
+ language(address: $address) {
349
+ ${Hl}
350
+ }
351
+ }`,variables:{address:e}}));return t}async byFilter(e){let{languages:t}=A(await tr(this,vt,"f").query({query:E`query byFilter($filter: String!) {
352
+ languages(filter: $filter) {
353
+ ${Hl}
354
+ }
355
+ }`,variables:{filter:e}}));return t}async all(){return this.byFilter("")}async writeSettings(e,t){let{languageWriteSettings:n}=A(await tr(this,vt,"f").mutate({mutation:E`mutation writeSettings($languageAddress: String!, $settings: String!) {
356
+ languageWriteSettings(languageAddress: $languageAddress, settings: $settings)
357
+ }`,variables:{languageAddress:e,settings:t}}));return n}async applyTemplateAndPublish(e,t){let{languageApplyTemplateAndPublish:n}=A(await tr(this,vt,"f").mutate({mutation:E`mutation languageApplyTemplateAndPublish(
358
+ $sourceLanguageHash: String!,
359
+ $templateData: String!,
360
+ ) {
361
+ languageApplyTemplateAndPublish(sourceLanguageHash: $sourceLanguageHash, templateData: $templateData) {
362
+ name, address
363
+ }
364
+ }`,variables:{sourceLanguageHash:e,templateData:t}}));return n}async publish(e,t){let{languagePublish:n}=A(await tr(this,vt,"f").mutate({mutation:E`mutation languagePublish(
365
+ $languagePath: String!,
366
+ $languageMeta: LanguageMetaInput!,
367
+ ) {
368
+ languagePublish(languagePath: $languagePath, languageMeta: $languageMeta) {
369
+ ${Jl}
370
+ }
371
+ }`,variables:{languagePath:e,languageMeta:t}}));return n}async meta(e){let{languageMeta:t}=A(await tr(this,vt,"f").query({query:E`query languageMeta(
372
+ $address: String!,
373
+ ) {
374
+ languageMeta(address: $address) {
375
+ ${Jl}
376
+ }
377
+ }`,variables:{address:e}}));return t}async source(e){let{languageSource:t}=A(await tr(this,vt,"f").query({query:E`query languageSource(
378
+ $address: String!,
379
+ ) {
380
+ languageSource(address: $address)
381
+ }`,variables:{address:e}}));return t}async remove(e){let{languageRemove:t}=A(await tr(this,vt,"f").mutate({mutation:E`mutation languageRemove(
382
+ $address: String!,
383
+ ) {
384
+ languageRemove(address: $address)
385
+ }`,variables:{address:e}}));return t}};vt=new WeakMap;var j1=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},Le=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Qe,Lr,Hs=class{constructor(e){Qe.set(this,void 0),Lr.set(this,new Map),j1(this,Qe,e,"f")}async publishFromPerspective(e,t,n){let{neighbourhoodPublishFromPerspective:i}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodPublishFromPerspective(
386
+ $linkLanguage: String!,
387
+ $meta: PerspectiveInput!,
388
+ $perspectiveUUID: String!
389
+ ) {
390
+ neighbourhoodPublishFromPerspective(
391
+ linkLanguage: $linkLanguage,
392
+ meta: $meta,
393
+ perspectiveUUID: $perspectiveUUID
394
+ )
395
+ }`,variables:{perspectiveUUID:e,linkLanguage:t,meta:n}}));return i}async joinFromUrl(e){let{neighbourhoodJoinFromUrl:t}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodJoinFromUrl($url: String!) {
396
+ neighbourhoodJoinFromUrl(url: $url) {
397
+ uuid
398
+ name
399
+ sharedUrl
400
+ state
401
+ neighbourhood {
402
+ data {
403
+ linkLanguage
404
+ meta {
405
+ links
406
+ {
407
+ author
408
+ timestamp
409
+ data { source, predicate, target }
410
+ proof { valid, invalid, signature, key }
411
+ }
412
+ }
413
+ }
414
+ author
415
+ }
416
+ }
417
+ }`,variables:{url:e}}));return t}async otherAgents(e){let{neighbourhoodOtherAgents:t}=A(await Le(this,Qe,"f").query({query:E`query neighbourhoodOtherAgents($perspectiveUUID: String!) {
418
+ neighbourhoodOtherAgents(perspectiveUUID: $perspectiveUUID)
419
+ }`,variables:{perspectiveUUID:e}}));return t}async hasTelepresenceAdapter(e){let{neighbourhoodHasTelepresenceAdapter:t}=A(await Le(this,Qe,"f").query({query:E`query neighbourhoodHasTelepresenceAdapter($perspectiveUUID: String!) {
420
+ neighbourhoodHasTelepresenceAdapter(perspectiveUUID: $perspectiveUUID)
421
+ }`,variables:{perspectiveUUID:e}}));return t}async onlineAgents(e){let{neighbourhoodOnlineAgents:t}=A(await Le(this,Qe,"f").query({query:E`query neighbourhoodOnlineAgents($perspectiveUUID: String!) {
422
+ neighbourhoodOnlineAgents(perspectiveUUID: $perspectiveUUID) {
423
+ did
424
+ status {
425
+ author
426
+ timestamp
427
+ data {
428
+ links {
429
+ author
430
+ timestamp
431
+ data { source, predicate, target }
432
+ proof { valid, invalid, signature, key }
433
+ }
434
+ }
435
+ proof { valid, invalid, signature, key }
436
+ }
437
+ }
438
+ }`,variables:{perspectiveUUID:e}}));return t}async setOnlineStatus(e,t){let{neighbourhoodSetOnlineStatus:n}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSetOnlineStatus(
439
+ $perspectiveUUID: String!,
440
+ $status: PerspectiveInput!
441
+ ) {
442
+ neighbourhoodSetOnlineStatus(
443
+ perspectiveUUID: $perspectiveUUID,
444
+ status: $status
445
+ )
446
+ }`,variables:{perspectiveUUID:e,status:t}}));return n}async setOnlineStatusU(e,t){let{neighbourhoodSetOnlineStatusU:n}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSetOnlineStatusU(
447
+ $perspectiveUUID: String!,
448
+ $status: PerspectiveUnsignedInput!
449
+ ) {
450
+ neighbourhoodSetOnlineStatusU(
451
+ perspectiveUUID: $perspectiveUUID,
452
+ status: $status
453
+ )
454
+ }`,variables:{perspectiveUUID:e,status:t}}));return n}async sendSignal(e,t,n){let{neighbourhoodSendSignal:i}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSendSignal(
455
+ $perspectiveUUID: String!,
456
+ $remoteAgentDid: String!,
457
+ $payload: PerspectiveInput!
458
+ ) {
459
+ neighbourhoodSendSignal(
460
+ perspectiveUUID: $perspectiveUUID,
461
+ remoteAgentDid: $remoteAgentDid,
462
+ payload: $payload
463
+ )
464
+ }`,variables:{perspectiveUUID:e,remoteAgentDid:t,payload:n}}));return i}async sendSignalU(e,t,n){let{neighbourhoodSendSignalU:i}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSendSignalU(
465
+ $perspectiveUUID: String!,
466
+ $remoteAgentDid: String!,
467
+ $payload: PerspectiveUnsignedInput!
468
+ ) {
469
+ neighbourhoodSendSignalU(
470
+ perspectiveUUID: $perspectiveUUID,
471
+ remoteAgentDid: $remoteAgentDid,
472
+ payload: $payload
473
+ )
474
+ }`,variables:{perspectiveUUID:e,remoteAgentDid:t,payload:n}}));return i}async sendBroadcast(e,t){let{neighbourhoodSendBroadcast:n}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSendBroadcast(
475
+ $perspectiveUUID: String!,
476
+ $payload: PerspectiveInput!
477
+ ) {
478
+ neighbourhoodSendBroadcast(
479
+ perspectiveUUID: $perspectiveUUID,
480
+ payload: $payload
481
+ )
482
+ }`,variables:{perspectiveUUID:e,payload:t}}));return n}async sendBroadcastU(e,t){let{neighbourhoodSendBroadcastU:n}=A(await Le(this,Qe,"f").mutate({mutation:E`mutation neighbourhoodSendBroadcastU(
483
+ $perspectiveUUID: String!,
484
+ $payload: PerspectiveUnsignedInput!
485
+ ) {
486
+ neighbourhoodSendBroadcastU(
487
+ perspectiveUUID: $perspectiveUUID,
488
+ payload: $payload
489
+ )
490
+ }`,variables:{perspectiveUUID:e,payload:t}}));return n}dispatchSignal(e,t){let n=Le(this,Lr,"f").get(e);n&&n.forEach(i=>i(t))}async subscribeToSignals(e){let t=this;await Le(this,Qe,"f").subscribe({query:E`subscription neighbourhoodSignal($perspectiveUUID: String!) {
491
+ neighbourhoodSignal(perspectiveUUID: $perspectiveUUID) {
492
+ author
493
+ timestamp
494
+ data {
495
+ links
496
+ {
497
+ author
498
+ timestamp
499
+ data { source, predicate, target }
500
+ proof { valid, invalid, signature, key }
501
+ }
502
+ }
503
+ proof { valid, invalid, signature, key }
504
+ }
505
+ }`,variables:{perspectiveUUID:e}}).subscribe({next:n=>{let{neighbourhoodSignal:i}=A(n);t.dispatchSignal(e,i)}})}async addSignalHandler(e,t){let n=Le(this,Lr,"f").get(e);n||(n=[],await this.subscribeToSignals(e)),n.push(t),Le(this,Lr,"f").set(e,n)}removeSignalHandler(e,t){let n=Le(this,Lr,"f").get(e);if(n){let i=n.indexOf(t);i>-1&&n.splice(i,1)}Le(this,Lr,"f").set(e,n)}};Qe=new WeakMap,Lr=new WeakMap;var $s=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},se=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},le,di,hi,Ca=`
506
+ author
507
+ timestamp
508
+ data {
509
+ links {
510
+ author
511
+ timestamp
512
+ data { source, predicate, target }
513
+ proof { valid, invalid, signature, key }
514
+ }
515
+ }
516
+ proof { valid, invalid, signature, key }
517
+ `,Js=class{constructor(e,t=!0){le.set(this,void 0),di.set(this,void 0),hi.set(this,void 0),$s(this,le,e,"f"),$s(this,di,[],"f"),$s(this,hi,[],"f"),t&&(this.subscribeMessageReceived(),this.subscribeExceptionOccurred())}async info(){let{runtimeInfo:e}=A(await se(this,le,"f").query({query:E`query runtimeInfo {
518
+ runtimeInfo {
519
+ ad4mExecutorVersion,
520
+ isInitialized,
521
+ isUnlocked
522
+ }
523
+ }`}));return e}async quit(){return A(await se(this,le,"f").mutate({mutation:E`mutation runtimeQuit { runtimeQuit }`})).runtimeQuit}async openLink(e){let{runtimeOpenLink:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeOpenLink($url: String!) {
524
+ runtimeOpenLink(url: $url)
525
+ }`,variables:{url:e}}));return t}async addTrustedAgents(e){let{addTrustedAgents:t}=A(await se(this,le,"f").mutate({mutation:E`mutation addTrustedAgents($agents: [String!]!) {
526
+ addTrustedAgents(agents: $agents)
527
+ }`,variables:{agents:e}}));return t}async deleteTrustedAgents(e){let{deleteTrustedAgents:t}=A(await se(this,le,"f").mutate({mutation:E`mutation deleteTrustedAgents($agents: [String!]!) {
528
+ deleteTrustedAgents(agents: $agents)
529
+ }`,variables:{agents:e}}));return t}async getTrustedAgents(){let{getTrustedAgents:e}=A(await se(this,le,"f").query({query:E`query getTrustedAgents {
530
+ getTrustedAgents
531
+ }`}));return e}async addKnownLinkLanguageTemplates(e){let{runtimeAddKnownLinkLanguageTemplates:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeAddKnownLinkLanguageTemplates($addresses: [String!]!) {
532
+ runtimeAddKnownLinkLanguageTemplates(addresses: $addresses)
533
+ }`,variables:{addresses:e}}));return t}async removeKnownLinkLanguageTemplates(e){let{runtimeRemoveKnownLinkLanguageTemplates:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeRemoveKnownLinkLanguageTemplates($addresses: [String!]!) {
534
+ runtimeRemoveKnownLinkLanguageTemplates(addresses: $addresses)
535
+ }`,variables:{addresses:e}}));return t}async knownLinkLanguageTemplates(){let{runtimeKnownLinkLanguageTemplates:e}=A(await se(this,le,"f").query({query:E`query runtimeKnownLinkLanguageTemplates {
536
+ runtimeKnownLinkLanguageTemplates
537
+ }`}));return e}async addFriends(e){let{runtimeAddFriends:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeAddFriends($dids: [String!]!) {
538
+ runtimeAddFriends(dids: $dids)
539
+ }`,variables:{dids:e}}));return t}async removeFriends(e){let{runtimeRemoveFriends:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeRemoveFriends($dids: [String!]!) {
540
+ runtimeRemoveFriends(dids: $dids)
541
+ }`,variables:{dids:e}}));return t}async friends(){let{runtimeFriends:e}=A(await se(this,le,"f").query({query:E`query runtimeFriends {
542
+ runtimeFriends
543
+ }`}));return e}async hcAgentInfos(){let{runtimeHcAgentInfos:e}=A(await se(this,le,"f").query({query:E`query runtimeHcAgentInfos {
544
+ runtimeHcAgentInfos
545
+ }`}));return e}async hcAddAgentInfos(e){let{runtimeHcAddAgentInfos:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeHcAddAgentInfos($agentInfos: String!) {
546
+ runtimeHcAddAgentInfos(agentInfos: $agentInfos)
547
+ }`,variables:{agentInfos:e}}));return t}async verifyStringSignedByDid(e,t,n,i){let{runtimeVerifyStringSignedByDid:a}=A(await se(this,le,"f").mutate({mutation:E`query runtimeVerifyStringSignedByDid($did: String!, $didSigningKeyId: String!, $data: String!, $signedData: String!) {
548
+ runtimeVerifyStringSignedByDid(did: $did, didSigningKeyId: $didSigningKeyId, data: $data, signedData: $signedData)
549
+ }`,variables:{did:e,didSigningKeyId:t,data:n,signedData:i}}));return a}async setStatus(e){let{runtimeSetStatus:t}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeSetStatus($status: PerspectiveInput!) {
550
+ runtimeSetStatus(status: $status)
551
+ }`,variables:{status:e}}));return t}async friendStatus(e){let{runtimeFriendStatus:t}=A(await se(this,le,"f").query({query:E`query runtimeFriendStatus($did: String!) {
552
+ runtimeFriendStatus(did: $did) { ${Ca} }
553
+ }`,variables:{did:e}}));return t}async friendSendMessage(e,t){let{runtimeFriendSendMessage:n}=A(await se(this,le,"f").mutate({mutation:E`mutation runtimeFriendSendMessage($did: String!, $message: PerspectiveInput!) {
554
+ runtimeFriendSendMessage(did: $did, message: $message)
555
+ }`,variables:{did:e,message:t}}));return n}async messageInbox(e){let{runtimeMessageInbox:t}=A(await se(this,le,"f").query({query:E`query runtimeMessageInbox($filter: String) {
556
+ runtimeMessageInbox(filter: $filter) { ${Ca} }
557
+ }`,variables:{filter:e}}));return t}async messageOutbox(e){let{runtimeMessageOutbox:t}=A(await se(this,le,"f").query({query:E`query runtimeMessageOutbox($filter: String) {
558
+ runtimeMessageOutbox(filter: $filter) {
559
+ recipient,
560
+ message {
561
+ ${Ca}
562
+ }
563
+ }
564
+ }`,variables:{filter:e}}));return t}addMessageCallback(e){se(this,di,"f").push(e)}subscribeMessageReceived(){se(this,le,"f").subscribe({query:E` subscription {
565
+ runtimeMessageReceived { ${Ca} }
566
+ }
567
+ `}).subscribe({next:e=>{se(this,di,"f").forEach(t=>{t(e.data.runtimeMessageReceived)})},error:e=>console.error(e)})}addExceptionCallback(e){se(this,hi,"f").push(e)}subscribeExceptionOccurred(){se(this,le,"f").subscribe({query:E` subscription {
568
+ exceptionOccurred {
569
+ title
570
+ message
571
+ type
572
+ addon
573
+ }
574
+ }`}).subscribe({next:e=>{se(this,hi,"f").forEach(t=>{t(e.data.exceptionOccurred)})},error:e=>console.error(e)})}};le=new WeakMap,di=new WeakMap,hi=new WeakMap;var U1=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},vn=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},Ft,Ys=class{constructor(e){Ft.set(this,void 0),U1(this,Ft,e,"f")}async get(e){let{expression:t}=A(await vn(this,Ft,"f").query({query:E`query expression($url: String!) {
575
+ expression(url: $url) {
576
+ author
577
+ timestamp
578
+ data
579
+ language {
580
+ address
581
+ }
582
+ proof {
583
+ valid
584
+ invalid
585
+ }
586
+ }
587
+ }`,variables:{url:e}}));return t}async getMany(e){let{expressionMany:t}=A(await vn(this,Ft,"f").query({query:E`query expressionMany($urls: [String!]!) {
588
+ expressionMany(urls: $urls) {
589
+ author
590
+ timestamp
591
+ data
592
+ language {
593
+ address
594
+ }
595
+ proof {
596
+ valid
597
+ invalid
598
+ }
599
+ }
600
+ }`,variables:{urls:e}}));return t}async getRaw(e){let{expressionRaw:t}=A(await vn(this,Ft,"f").query({query:E`query expressionRaw($url: String!) {
601
+ expressionRaw(url: $url)
602
+ }`,variables:{url:e}}));return t}async create(e,t){e=JSON.stringify(e);let{expressionCreate:n}=A(await vn(this,Ft,"f").mutate({mutation:E`mutation expressionCreate($content: String!, $languageAddress: String!){
603
+ expressionCreate(content: $content, languageAddress: $languageAddress)
604
+ }`,variables:{content:e,languageAddress:t}}));return n}async interactions(e){let{expressionInteractions:t}=A(await vn(this,Ft,"f").query({query:E`query expressionInteractions($url: String!) {
605
+ expressionInteractions(url: $url) {
606
+ label
607
+ name
608
+ parameters { name, type }
609
+ }
610
+ }`,variables:{url:e}}));return t}async interact(e,t){let{expressionInteract:n}=A(await vn(this,Ft,"f").mutate({mutation:E`mutation expressionInteract($url: String!, $interactionCall: InteractionCall!){
611
+ expressionInteract(url: $url, interactionCall: $interactionCall)
612
+ }`,variables:{url:e,interactionCall:t}}));return n}};Ft=new WeakMap;var Ir=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},je=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},$t,ka,mi,Da,yi,Cn,Na,Wa=class{constructor(e,t=!0){$t.set(this,void 0),ka.set(this,void 0),mi.set(this,void 0),Da.set(this,void 0),yi.set(this,void 0),Cn.set(this,void 0),Na.set(this,void 0),Ir(this,$t,e,"f"),Ir(this,ka,new Si(je(this,$t,"f"),t),"f"),Ir(this,mi,new Ys(je(this,$t,"f")),"f"),Ir(this,Da,new zs(je(this,$t,"f")),"f"),Ir(this,yi,new Hs(je(this,$t,"f")),"f"),Ir(this,Cn,new Qa(je(this,$t,"f"),t),"f"),je(this,Cn,"f").setExpressionClient(je(this,mi,"f")),je(this,Cn,"f").setNeighbourhoodClient(je(this,yi,"f")),Ir(this,Na,new Js(je(this,$t,"f"),t),"f")}get agent(){return je(this,ka,"f")}get expression(){return je(this,mi,"f")}get languages(){return je(this,Da,"f")}get neighbourhood(){return je(this,yi,"f")}get perspective(){return je(this,Cn,"f")}get runtime(){return je(this,Na,"f")}};$t=new WeakMap,ka=new WeakMap,mi=new WeakMap,Da=new WeakMap,yi=new WeakMap,Cn=new WeakMap,Na=new WeakMap;var Yl;(function(r){r[r.LanguageIsNotLoaded=0]="LanguageIsNotLoaded",r[r.ExpressionIsNotVerified=1]="ExpressionIsNotVerified",r[r.AgentIsUntrusted=2]="AgentIsUntrusted",r[r.CapabilityRequested=3]="CapabilityRequested"})(Yl||(Yl={}));var ic=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},ac=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},$r=class{constructor(e,t){this.language=e,this.expression=t}};ic([v(),ac("design:type",Tt)],$r.prototype,"language",void 0);ic([v(),ac("design:type",String)],$r.prototype,"expression",void 0);$r=ic([J(),ac("design:paramtypes",[Tt,String])],$r);function Zg(r){return r.language.address==="did"?r.expression.toString():`${r.language.address}://${r.expression}`}function e6(r){if(r.startsWith("literal://")){let a=new Tt;a.address="literal",a.name="literal";let o=r.substring(10);return new $r(a,o)}let t=/^([^:^\s]+):\/\/([\s\S]+)$/.exec(r);if(t&&t.length==3){let a=t[1],o=t[2],s=new Tt;return s.address=a,new $r(s,o)}let i=/^did:([^\s]+)$/.exec(r);if(i&&i.length==2){let a=new Tt;return a.address="did",new $r(a,r)}throw new Error("Couldn't parse string as expression URL or DID: "+r)}var it=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},At=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Ga=class{};it([v(),At("design:type",String)],Ga.prototype,"name",void 0);it([v(),At("design:type",String)],Ga.prototype,"type",void 0);Ga=it([J()],Ga);var wi=class{};it([v(),At("design:type",String)],wi.prototype,"label",void 0);it([v(),At("design:type",String)],wi.prototype,"name",void 0);it([v(),At("design:type",Array)],wi.prototype,"parameters",void 0);wi=it([J()],wi);var Ka=class{get parameters(){return JSON.parse(this.parametersStringified)}constructor(e,t){this.name=e,this.parametersStringified=JSON.stringify(t)}};it([v(),At("design:type",String)],Ka.prototype,"name",void 0);it([v(),At("design:type",String)],Ka.prototype,"parametersStringified",void 0);Ka=it([Ge(),At("design:paramtypes",[String,Object])],Ka);var za=class{};it([v(),At("design:type",String)],za.prototype,"did",void 0);it([v(),At("design:type",Gs)],za.prototype,"status",void 0);za=it([J()],za);var Xl=class{},Gr=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},An=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},ur=class{};Gr([v(),An("design:type",String)],ur.prototype,"name",void 0);Gr([v(),An("design:type",String)],ur.prototype,"address",void 0);Gr([v(),An("design:type",String)],ur.prototype,"settings",void 0);Gr([v(),An("design:type",jr)],ur.prototype,"icon",void 0);Gr([v(),An("design:type",jr)],ur.prototype,"constructorIcon",void 0);Gr([v(),An("design:type",jr)],ur.prototype,"settingsIcon",void 0);ur=Gr([J()],ur);var Ke=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},Ze=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},bt=class{};Ke([v(),Ze("design:type",String)],bt.prototype,"name",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"address",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"description",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"author",void 0);Ke([v(),Ze("design:type",Boolean)],bt.prototype,"templated",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"templateSourceLanguageAddress",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"templateAppliedParams",void 0);Ke([v(),Ze("design:type",Array)],bt.prototype,"possibleTemplateParams",void 0);Ke([v(),Ze("design:type",String)],bt.prototype,"sourceCodeLink",void 0);bt=Ke([J()],bt);var xn=class{constructor(e,t){this.name=e,this.description=t,this.description||(this.description="")}};Ke([v(),Ze("design:type",String)],xn.prototype,"name",void 0);Ke([v(),Ze("design:type",String)],xn.prototype,"description",void 0);Ke([v(),Ze("design:type",Array)],xn.prototype,"possibleTemplateParams",void 0);Ke([v(),Ze("design:type",String)],xn.prototype,"sourceCodeLink",void 0);xn=Ke([Ge(),Ze("design:paramtypes",[String,String])],xn);var Zl=class{},ef=class extends lr(){},tf=class{},Xa=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},oc=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Ha=class{constructor(e,t){this.linkLanguage=e,this.meta=t}};Xa([v(),oc("design:type",String)],Ha.prototype,"linkLanguage",void 0);Xa([v(),oc("design:type",ar)],Ha.prototype,"meta",void 0);Ha=Xa([J(),oc("design:paramtypes",[String,ar])],Ha);var Xs=class extends lr(){};Xs=Xa([J()],Xs);var In=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},kn=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Zs;(function(r){r.Private="Private",r.NeighbourhoodJoinInitiated="NeighbourhoodJoinInitiated",r.LinkLanguageFailedToInstall="LinkLanguageFailedToInstall",r.LinkLanguageInstalledButNotSynced="LinkLanguageInstalledButNotSynced",r.Synced="Synced"})(Zs||(Zs={}));var Br=class{constructor(e,t,n){this.uuid=e,this.name=t,n?this.state=n:this.state=Zs.Private}};In([v(),kn("design:type",String)],Br.prototype,"uuid",void 0);In([v(),kn("design:type",String)],Br.prototype,"name",void 0);In([v(),kn("design:type",String)],Br.prototype,"state",void 0);In([v(),kn("design:type",String)],Br.prototype,"sharedUrl",void 0);In([v(),kn("design:type",Xs)],Br.prototype,"neighbourhood",void 0);Br=In([J(),kn("design:paramtypes",[String,String,String])],Br);var Za=function(r,e,t,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,n);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},wf=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},Ja=class{};Za([v(),wf("design:type",Array)],Ja.prototype,"additions",void 0);Za([v(),wf("design:type",Array)],Ja.prototype,"removals",void 0);Ja=Za([J()],Ja);var rf=class extends lr(){};rf=Za([J()],rf);var nf=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},bn=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},gi,Fr,Sa="smart_literal://content";function q1(r){let e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=t.length;for(let i=0;i<r;i++)e+=t.charAt(Math.floor(Math.random()*n));return e}var _i=class{constructor(e,t){gi.set(this,void 0),Fr.set(this,void 0),nf(this,gi,e,"f"),nf(this,Fr,t,"f")}get base(){return bn(this,Fr,"f")}static async create(e,t){let n=lt.from(q1(10)).toUrl(),i=new _i(e,n);return await i.set(t),i}static async isSmartLiteralBase(e,t){return(await e.get(new Ue({source:t,predicate:Sa}))).length>0}static async getAllSmartLiterals(e){return(await e.get(new Ue({predicate:Sa}))).map(n=>new _i(e,n.data.source))}async get(){let e=await bn(this,gi,"f").getSingleTarget(new Ue({source:bn(this,Fr,"f"),predicate:Sa}));if(!e)throw`No content for smart literal ${bn(this,Fr,"f")}`;return lt.fromUrl(e).get()}async set(e){let t=lt.from(e);await bn(this,gi,"f").setSingleTarget(new ct({source:bn(this,Fr,"f"),predicate:Sa,target:t.toUrl()}))}};gi=new WeakMap,Fr=new WeakMap;var af=class{};function d6(r,e,t){return{action:"addLink",source:r,predicate:e,target:t}}function h6(r){return`triple(this, "${r}", _)`}function m6(r){return function(e,t,n){if(typeof n.value!="function")throw new Error("instanceQuery decorator can only be applied to methods");n.value=async function(a){let o=[],s=e.name,u=`subject_class("${s}", C), instance(C, Instance)`;if(r&&r.where)for(let f in r.where){let p=r.where[f];u+=`, property_getter(C, Instance, "${f}", "${p}")`}r&&r.condition&&(u+=", "+r.condition);let l=await a.infer(u);if(l==!1)return o;if(typeof l=="string")throw l;for(let f of l){let p=f.Instance,h=new Va(a,p,s);await h.init(),o.push(h)}return o}}}function y6(r){return function(e,t){if(e.__properties=e.__properties||{},e.__properties[t]=e.__properties[t]||{},e.__properties[t]={...e.__properties[t],...r},r.writable){let n=t;e[`set${nr(n)}`]=()=>{}}Object.defineProperty(e,t,{configurable:!0,writable:!0})}}function g6(r){return function(e,t){e.__properties=e.__properties||{},e.__properties[t]=e.__properties[t]||{},e.__properties[t]={...e.__properties[t],through:r.through,required:!0,initial:r.value,flag:!0},e[t]=r.value,Object.defineProperty(e,t,{configurable:!0,writable:!0})}}function v6(r){return function(e,t){e.__collections=e.__collections||{},e.__collections[t]=r;let n=t;e[`add${nr(n)}`]=()=>{},e[`remove${nr(n)}`]=()=>{},e[`setCollection${nr(n)}`]=()=>{},Object.defineProperty(e,t,{configurable:!0,writable:!0})}}function _f(r){let e="",t="abcdefghijklmnopqrstuvwxyz",n=t.length;for(let i=0;i<r;i++)e+=t.charAt(Math.floor(Math.random()*n));return e}function b6(r){return function(e){e.prototype.className=r.name,e.className=r.name,e.generateSDNA=function(){let t="",n=r.name,i=e.prototype,a=_f(8);t+=`subject_class("${n}", ${a}).
613
+ `;let o=[],s=[];i.subjectConstructor&&i.subjectConstructor.length&&(s=s.concat(i.subjectConstructor));let u=[];i.isSubjectInstance&&i.isSubjectInstance.length&&(u=u.concat(i.isSubjectInstance));let l=[],f=i.__properties||{};for(let y in f){let g=`property(${a}, "${y}").
614
+ `,{through:C,initial:_,required:b,resolveLanguage:S,writable:O,flag:k,getter:N,setter:I,local:R}=f[y];if(S&&(g+=`property_resolve(${a}, "${y}").
615
+ `,g+=`property_resolve_language(${a}, "${y}", "${S}").
616
+ `),N?g+=`property_getter(${a}, Base, "${y}", Value) :- ${N}.
617
+ `:C&&(g+=`property_getter(${a}, Base, "${y}", Value) :- triple(Base, "${C}", Value).
618
+ `,b&&(k?u.push(`triple(Base, "${C}", "${_}")`):u.push(`triple(Base, "${C}", _)`))),I)g+=`property_setter(${a}, "${y}", Actions) :- ${I}.
619
+ `;else if(O&&typeof i[Sf(y)]=="function"){let ee=[{action:"setSingleTarget",source:"this",predicate:C,target:"value",...R&&{local:!0}}];g+=`property_setter(${a}, "${y}", '${Dr(ee)}').
620
+ `}l.push(g),_&&(s.push({action:"addLink",source:"this",predicate:C,target:_}),o.push({action:"removeLink",source:"this",predicate:C,target:_}))}let p=[],h=i.__collections||{};for(let y in h){let g=`collection(${a}, "${y}").
621
+ `,{through:C,where:_,local:b}=h[y];if(C){if(_){if(!_.isInstance&&!_.condition)throw"'where' needs one of 'isInstance' or 'condition'";let N=[];if(_.isInstance){let R;_.isInstance.name?R=_.isInstance.name:R=_.isInstance,N.push(`instance(OtherClass, Target), subject_class("${R}", OtherClass)`)}_.condition&&N.push(_.condition);let I=N.join(", ");g+=`collection_getter(${a}, Base, "${y}", List) :- setof(Target, (triple(Base, "${C}", Target), ${I}), List).
622
+ `}else g+=`collection_getter(${a}, Base, "${y}", List) :- findall(C, triple(Base, "${C}", C), List).
623
+ `;let S=[{action:"addLink",source:"this",predicate:C,target:"value",...b&&{local:!0}}],O=[{action:"removeLink",source:"this",predicate:C,target:"value"}],k=[{action:"collectionSetter",source:"this",predicate:C,target:"value",...b&&{local:!0}}];g+=`collection_adder(${a}, "${Mt(y)}", '${Dr(S)}').
624
+ `,g+=`collection_remover(${a}, "${Mt(y)}", '${Dr(O)}').
625
+ `,g+=`collection_setter(${a}, "${Mt(y)}", '${Dr(k)}').
626
+ `}p.push(g)}let d=Dr(s);if(t+=`constructor(${a}, '${d}').
627
+ `,u.length>0){let y=u.join(", ");t+=`instance(${a}, Base) :- ${y}.
628
+ `,t+=`
629
+ `}return t+=`destructor(${a}, '${Dr(o)}').
630
+ `,t+=`
631
+ `,t+=l.join(`
632
+ `),t+=`
633
+ `,t+=p.join(`
634
+ `),{sdna:t,name:n}},Object.defineProperty(e,"type",{configurable:!0})}}var C6=`
635
+ type Agent {
636
+ did: String!
637
+ directMessageLanguage: String
638
+ perspective: Perspective
639
+ }
640
+
641
+ type AgentSignature {
642
+ publicKey: String!
643
+ signature: String!
644
+ }
645
+
646
+ type AgentStatus {
647
+ did: String
648
+ didDocument: String
649
+ error: String
650
+ isInitialized: Boolean!
651
+ isUnlocked: Boolean!
652
+ }
653
+
654
+ type Apps {
655
+ auth: AuthInfo!
656
+ requestId: String!
657
+ revoked: Boolean
658
+ token: String!
659
+ }
660
+
661
+ type AuthInfo {
662
+ appDesc: String!
663
+ appIconPath: String
664
+ appName: String!
665
+ appUrl: String!
666
+ capabilities: [Capability!]!
667
+ }
668
+
669
+ input AuthInfoInput {
670
+ appDesc: String!
671
+ appDomain: String!
672
+ appIconPath: String
673
+ appName: String!
674
+ appUrl: String
675
+ capabilities: [CapabilityInput!]
676
+ }
677
+
678
+ type Capability {
679
+ can: [String!]!
680
+ with: Resource!
681
+ }
682
+
683
+ input CapabilityInput {
684
+ can: [String!]!
685
+ with: ResourceInput!
686
+ }
687
+
688
+ scalar DateTime
689
+
690
+ type EntanglementProof {
691
+ deviceKey: String!
692
+ deviceKeySignedByDid: String!
693
+ deviceKeyType: String!
694
+ did: String!
695
+ didSignedByDeviceKey: String
696
+ didSigningKeyId: String!
697
+ }
698
+
699
+ input EntanglementProofInput {
700
+ deviceKey: String!
701
+ deviceKeySignedByDid: String!
702
+ deviceKeyType: String!
703
+ did: String!
704
+ didSignedByDeviceKey: String!
705
+ didSigningKeyId: String!
706
+ }
707
+
708
+ type ExceptionInfo {
709
+ addon: String
710
+ message: String!
711
+ title: String!
712
+ type: Float!
713
+ }
714
+
715
+ type ExpressionProof {
716
+ invalid: Boolean
717
+ key: String
718
+ signature: String
719
+ valid: Boolean
720
+ }
721
+
722
+ input ExpressionProofInput {
723
+ invalid: Boolean
724
+ key: String
725
+ signature: String
726
+ valid: Boolean
727
+ }
728
+
729
+ type ExpressionRendered {
730
+ author: String!
731
+ data: String!
732
+ icon: Icon!
733
+ language: LanguageRef!
734
+ proof: ExpressionProof!
735
+ timestamp: String!
736
+ }
737
+
738
+ type Icon {
739
+ code: String!
740
+ }
741
+
742
+ input InteractionCall {
743
+ name: String!
744
+ parametersStringified: String!
745
+ }
746
+
747
+ type InteractionMeta {
748
+ label: String!
749
+ name: String!
750
+ parameters: [InteractionParameter!]!
751
+ }
752
+
753
+ type InteractionParameter {
754
+ name: String!
755
+ type: String!
756
+ }
757
+
758
+ type LanguageHandle {
759
+ address: String!
760
+ constructorIcon: Icon
761
+ icon: Icon
762
+ name: String!
763
+ settings: String
764
+ settingsIcon: Icon
765
+ }
766
+
767
+ type LanguageMeta {
768
+ address: String!
769
+ author: String!
770
+ description: String
771
+ name: String!
772
+ possibleTemplateParams: [String!]
773
+ sourceCodeLink: String
774
+ templateAppliedParams: String
775
+ templateSourceLanguageAddress: String
776
+ templated: Boolean
777
+ }
778
+
779
+ input LanguageMetaInput {
780
+ description: String = ""
781
+ name: String!
782
+ possibleTemplateParams: [String!]
783
+ sourceCodeLink: String
784
+ }
785
+
786
+ type LanguageRef {
787
+ address: String!
788
+ name: String!
789
+ }
790
+
791
+ type Link {
792
+ predicate: String
793
+ source: String!
794
+ target: String!
795
+ }
796
+
797
+ type LinkExpression {
798
+ author: String!
799
+ data: Link!
800
+ proof: ExpressionProof!
801
+ status: String
802
+ timestamp: String!
803
+ }
804
+
805
+ input LinkExpressionInput {
806
+ author: String!
807
+ data: LinkInput!
808
+ proof: ExpressionProofInput!
809
+ status: String = "shared"
810
+ timestamp: String!
811
+ }
812
+
813
+ type LinkExpressionMutations {
814
+ additions: [LinkExpression!]!
815
+ removals: [LinkExpression!]!
816
+ }
817
+
818
+ type LinkExpressionUpdated {
819
+ newLink: LinkExpression!
820
+ oldLink: LinkExpression!
821
+ }
822
+
823
+ input LinkInput {
824
+ predicate: String
825
+ source: String!
826
+ target: String!
827
+ }
828
+
829
+ input LinkMutations {
830
+ additions: [LinkInput!]!
831
+ removals: [LinkExpressionInput!]!
832
+ }
833
+
834
+ input LinkQuery {
835
+ fromDate: DateTime
836
+ limit: Float
837
+ predicate: String
838
+ source: String
839
+ target: String
840
+ untilDate: DateTime
841
+ }
842
+
843
+ type Mutation {
844
+ addTrustedAgents(agents: [String!]!): [String!]!
845
+ agentAddEntanglementProofs(proofs: [EntanglementProofInput!]!): [EntanglementProof!]!
846
+ agentDeleteEntanglementProofs(proofs: [EntanglementProofInput!]!): [EntanglementProof!]!
847
+ agentEntanglementProofPreFlight(deviceKey: String!, deviceKeyType: String!): EntanglementProof!
848
+ agentGenerate(passphrase: String!): AgentStatus!
849
+ agentGenerateJwt(rand: String!, requestId: String!): String!
850
+ agentImport(did: String!, didDocument: String!, keystore: String!, passphrase: String!): AgentStatus!
851
+ agentLock(passphrase: String!): AgentStatus!
852
+ agentPermitCapability(auth: String!): String!
853
+ agentRemoveApp(requestId: String!): [Apps!]!
854
+ agentRequestCapability(authInfo: AuthInfoInput!): String!
855
+ agentRevokeToken(requestId: String!): [Apps!]!
856
+ agentSignMessage(message: String!): AgentSignature!
857
+ agentUnlock(holochain: Boolean!, passphrase: String!): AgentStatus!
858
+ agentUpdateDirectMessageLanguage(directMessageLanguage: String!): Agent!
859
+ agentUpdatePublicPerspective(perspective: PerspectiveInput!): Agent!
860
+ deleteTrustedAgents(agents: [String!]!): [String!]!
861
+ expressionCreate(content: String!, languageAddress: String!): String!
862
+ expressionInteract(interactionCall: InteractionCall!, url: String!): String
863
+ languageApplyTemplateAndPublish(sourceLanguageHash: String!, templateData: String!): LanguageRef!
864
+ languagePublish(languageMeta: LanguageMetaInput!, languagePath: String!): LanguageMeta!
865
+ languageRemove(address: String!): Boolean!
866
+ languageWriteSettings(languageAddress: String!, settings: String!): Boolean!
867
+ neighbourhoodJoinFromUrl(url: String!): PerspectiveHandle!
868
+ neighbourhoodPublishFromPerspective(linkLanguage: String!, meta: PerspectiveInput!, perspectiveUUID: String!): String!
869
+ neighbourhoodSendBroadcast(payload: PerspectiveInput!, perspectiveUUID: String!): Boolean!
870
+ neighbourhoodSendBroadcastU(payload: PerspectiveUnsignedInput!, perspectiveUUID: String!): Boolean!
871
+ neighbourhoodSendSignal(payload: PerspectiveInput!, perspectiveUUID: String!, remoteAgentDid: String!): Boolean!
872
+ neighbourhoodSendSignalU(payload: PerspectiveUnsignedInput!, perspectiveUUID: String!, remoteAgentDid: String!): Boolean!
873
+ neighbourhoodSetOnlineStatus(perspectiveUUID: String!, status: PerspectiveInput!): Boolean!
874
+ neighbourhoodSetOnlineStatusU(perspectiveUUID: String!, status: PerspectiveUnsignedInput!): Boolean!
875
+ perspectiveAdd(name: String!): PerspectiveHandle!
876
+ perspectiveAddLink(link: LinkInput!, status: String = "shared", uuid: String!): LinkExpression!
877
+ perspectiveAddLinkExpression(link: LinkExpressionInput!, status: String, uuid: String!): LinkExpression!
878
+ perspectiveAddLinks(links: [LinkInput!]!, status: String, uuid: String!): [LinkExpression!]!
879
+ perspectiveLinkMutations(mutations: LinkMutations!, status: String, uuid: String!): LinkExpressionMutations!
880
+ perspectivePublishSnapshot(uuid: String!): String
881
+ perspectiveRemove(uuid: String!): Boolean!
882
+ perspectiveRemoveLink(link: LinkExpressionInput!, uuid: String!): Boolean!
883
+ perspectiveRemoveLinks(links: [LinkExpressionInput!]!, uuid: String!): [LinkExpression!]!
884
+ perspectiveUpdate(name: String!, uuid: String!): PerspectiveHandle
885
+ perspectiveUpdateLink(newLink: LinkInput!, oldLink: LinkExpressionInput!, uuid: String!): LinkExpression!
886
+ runtimeAddFriends(dids: [String!]!): [String!]!
887
+ runtimeAddKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
888
+ runtimeFriendSendMessage(did: String!, message: PerspectiveInput!): Boolean!
889
+ runtimeHcAddAgentInfos(agentInfos: String!): Boolean!
890
+ runtimeOpenLink(url: String!): Boolean!
891
+ runtimeQuit: Boolean!
892
+ runtimeRemoveFriends(dids: [String!]!): [String!]!
893
+ runtimeRemoveKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
894
+ runtimeSetStatus(status: PerspectiveInput!): Boolean!
895
+ }
896
+
897
+ type Neighbourhood {
898
+ linkLanguage: String!
899
+ meta: Perspective!
900
+ }
901
+
902
+ type NeighbourhoodExpression {
903
+ author: String!
904
+ data: Neighbourhood!
905
+ proof: ExpressionProof!
906
+ timestamp: String!
907
+ }
908
+
909
+ type OnlineAgent {
910
+ did: String!
911
+ status: PerspectiveExpression!
912
+ }
913
+
914
+ type Perspective {
915
+ links: [LinkExpression!]!
916
+ }
917
+
918
+ type PerspectiveExpression {
919
+ author: String!
920
+ data: Perspective!
921
+ proof: ExpressionProof!
922
+ timestamp: String!
923
+ }
924
+
925
+ type PerspectiveHandle {
926
+ name: String!
927
+ neighbourhood: NeighbourhoodExpression
928
+ sharedUrl: String
929
+ state: String!
930
+ uuid: String!
931
+ }
932
+
933
+ input PerspectiveInput {
934
+ links: [LinkExpressionInput!]!
935
+ }
936
+
937
+ input PerspectiveUnsignedInput {
938
+ links: [LinkInput!] = []
939
+ }
940
+
941
+ type Query {
942
+ agent: Agent!
943
+ agentByDID(did: String!): Agent
944
+ agentGetApps: [Apps!]!
945
+ agentGetEntanglementProofs: [EntanglementProof!]!
946
+ agentIsLocked: Boolean!
947
+ agentStatus: AgentStatus!
948
+ expression(url: String!): ExpressionRendered
949
+ expressionInteractions(url: String!): [InteractionMeta!]!
950
+ expressionMany(urls: [String!]!): [ExpressionRendered]!
951
+ expressionRaw(url: String!): String
952
+ getTrustedAgents: [String!]!
953
+ language(address: String!): LanguageHandle
954
+ languageMeta(address: String!): LanguageMeta!
955
+ languageSource(address: String!): String!
956
+ languages(filter: String): [LanguageHandle!]!
957
+ neighbourhoodHasTelepresenceAdapter(perspectiveUUID: String!): Boolean!
958
+ neighbourhoodOnlineAgents(perspectiveUUID: String!): [OnlineAgent!]!
959
+ neighbourhoodOtherAgents(perspectiveUUID: String!): [String!]!
960
+ perspective(uuid: String!): PerspectiveHandle
961
+ perspectiveQueryLinks(query: LinkQuery!, uuid: String!): [LinkExpression!]
962
+ perspectiveQueryProlog(query: String!, uuid: String!): String!
963
+ perspectiveSnapshot(uuid: String!): Perspective
964
+ perspectives: [PerspectiveHandle!]!
965
+ runtimeFriendStatus(did: String!): PerspectiveExpression
966
+ runtimeFriends: [String!]!
967
+ runtimeHcAgentInfos: String!
968
+ runtimeInfo: RuntimeInfo!
969
+ runtimeKnownLinkLanguageTemplates: [String!]!
970
+ runtimeMessageInbox(filter: String): [PerspectiveExpression!]!
971
+ runtimeMessageOutbox(filter: String): [SentMessage!]!
972
+ runtimeVerifyStringSignedByDid(data: String!, did: String!, didSigningKeyId: String!, signedData: String!): Boolean!
973
+ }
974
+
975
+ type Resource {
976
+ domain: String!
977
+ pointers: [String!]!
978
+ }
979
+
980
+ input ResourceInput {
981
+ domain: String!
982
+ pointers: [String!]!
983
+ }
984
+
985
+ type RuntimeInfo {
986
+ ad4mExecutorVersion: String!
987
+ isInitialized: Boolean!
988
+ isUnlocked: Boolean!
989
+ }
990
+
991
+ type SentMessage {
992
+ message: PerspectiveExpression!
993
+ recipient: String!
994
+ }
995
+
996
+ type Subscription {
997
+ agentAppsChanged: [Apps!]
998
+ agentStatusChanged: AgentStatus
999
+ agentUpdated: Agent
1000
+ exceptionOccurred: ExceptionInfo
1001
+ neighbourhoodSignal(perspectiveUUID: String!): PerspectiveExpression
1002
+ perspectiveAdded: PerspectiveHandle
1003
+ perspectiveLinkAdded(uuid: String!): LinkExpression
1004
+ perspectiveLinkRemoved(uuid: String!): LinkExpression
1005
+ perspectiveLinkUpdated(uuid: String!): LinkExpressionUpdated
1006
+ perspectiveRemoved: String
1007
+ perspectiveSyncStateChange(uuid: String!): String!
1008
+ perspectiveUpdated: PerspectiveHandle
1009
+ runtimeMessageReceived: PerspectiveExpression
1010
+ }
1011
+ `;function of(r){return r?.length?r.length===1?r.toString():r.length===2?r.join(" and "):r.slice(0,-1).join(", ")+", and "+r.slice(-1):""}function Ef(r){let e=r.can.includes("*")?["READ","WRITE","UPDATE"]:r.can,t=r.with.domain==="*"?"":r.with.domain,n=r.with.pointers.includes("*")?["all AD4M data"]:r.with.pointers;return`${of(e)} your ${t} actions, with access to ${of(n)}`}var kr=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},M=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},We,Fe,Pa,ae,sf=class{constructor(r,e,t){We.set(this,void 0),Fe.set(this,void 0),Pa.set(this,void 0),ae.set(this,void 0),kr(this,We,e||lt.from(_f(24)).toUrl(),"f"),kr(this,ae,r,"f"),kr(this,Pa,t||"ad4m://self","f")}get baseExpression(){return M(this,We,"f")}async getData(id){let tempId=id??M(this,We,"f"),isInstance=await M(this,ae,"f").isSubjectInstance(tempId,M(this,Fe,"f"));if(!isInstance)throw`Not a valid subject instance of ${M(this,Fe,"f")} for ${tempId}`;let results=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), property(C, Property)`),properties=results.map(r=>r.Property);for(let r of properties){let e=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), property_resolve(C, "${r}")`),t=async()=>{let n=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), property_getter(C, "${tempId}", "${r}", Value)`);if(n&&n.length>0){let i=n[0].Value;if(e)try{let a=await M(this,ae,"f").getExpression(i);try{return JSON.parse(a.data)}catch{return a.data}}catch{return i}else return i}else return n||void 0};this[r]=await t()}let results2=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), collection(C, Collection)`);results2||(results2=[]);let collections=results2.map(r=>r.Collection);for(let c of collections){let getProperty=async()=>{let results=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), collection_getter(C, "${tempId}", "${c}", Value)`);return results&&results.length>0&&results[0].Value?eval(results[0].Value):[]};this[c]=await getProperty()}return kr(this,We,tempId,"f"),this}async setProperty(key,value){let setters=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), property_setter(C, "${key}", Setter)`);if(setters&&setters.length>0){let actions=eval(setters[0].Setter),resolveLanguageResults=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), property_resolve_language(C, "${key}", Language)`),resolveLanguage;resolveLanguageResults&&resolveLanguageResults.length>0&&(resolveLanguage=resolveLanguageResults[0].Language),resolveLanguage&&(value=await M(this,ae,"f").createExpression(value,resolveLanguage)),await M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value}])}}async setCollectionSetter(key,value){let collectionSetters=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), collection_setter(C, "${Mt(key)}", Setter)`);if(collectionSetters||(collectionSetters=[]),collectionSetters.length>0){let actions=eval(collectionSetters[0].Setter);value&&(Array.isArray(value)?await M(this,ae,"f").executeAction(actions,M(this,We,"f"),value.map(r=>({name:"value",value:r}))):await M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value}]))}}async setCollectionAdder(key,value){let adders=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), collection_adder(C, "${Mt(key)}", Adder)`);if(adders||(adders=[]),adders.length>0){let actions=eval(adders[0].Adder);value&&(Array.isArray(value)?await Promise.all(value.map(r=>M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value:r}]))):await M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value}]))}}async setCollectionRemover(key,value){let removers=await M(this,ae,"f").infer(`subject_class("${M(this,Fe,"f")}", C), collection_remover(C, "${Mt(key)}", Remover)`);if(removers||(removers=[]),removers.length>0){let actions=eval(removers[0].Remover);value&&(Array.isArray(value)?await Promise.all(value.map(r=>M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value:r}]))):await M(this,ae,"f").executeAction(actions,M(this,We,"f"),[{name:"value",value}]))}}async save(){kr(this,Fe,await M(this,ae,"f").stringOrTemplateObjectToSubjectClass(this),"f"),await M(this,ae,"f").createSubject(this,M(this,We,"f")),await M(this,ae,"f").add(new ct({source:M(this,Pa,"f"),predicate:"ad4m://has_child",target:this.baseExpression})),await this.update()}async update(){kr(this,Fe,await M(this,ae,"f").stringOrTemplateObjectToSubjectClass(this),"f");let r=Object.entries(this);for(let[e,t]of r)if(t)if(t?.action)switch(t.action){case"setter":await this.setCollectionSetter(e,t.value);break;case"adder":await this.setCollectionAdder(e,t.value);break;case"remover":await this.setCollectionRemover(e,t.value);default:await this.setCollectionSetter(e,t.value);break}else Array.isArray(t)&&t.length>0?await this.setCollectionSetter(e,t):await this.setProperty(e,t);await this.getData()}async get(){return kr(this,Fe,await M(this,ae,"f").stringOrTemplateObjectToSubjectClass(this),"f"),await this.getData()}async delete(){await M(this,ae,"f").removeSubject(this,M(this,We,"f"))}static async all(r){let e=await r.stringOrTemplateObjectToSubjectClass(this),t=await r.getAllSubjectProxies(e),n=[];if(t){for(let i of t){let a=new this(r,i.X);n.push(await a.get())}return n}return[]}static async query(r,e){let t=e?.source||"ad4m://self",n=await r.stringOrTemplateObjectToSubjectClass(this),i=[];if(e)try{if((await r.infer(`findall([Timestamp, Base], (subject_class("${n}", C), instance(C, Base), link("${t}", Predicate, Base, Timestamp, Author)), AllData), sort(AllData, SortedData), length(SortedData, DataLength).`))[0].DataLength>=e.size){let s=`findall([Timestamp, Base], (subject_class("${n}", C), instance(C, Base), link("${t}", Predicate, Base, Timestamp, Author)), AllData), sort(AllData, SortedData), reverse(SortedData, ReverseSortedData), paginate(ReverseSortedData, ${e.page}, ${e.size}, PageData).`;i=await r.infer(s),i=i[0].PageData.map(u=>({Base:u[1],Timestamp:u[0]}))}else i=await r.infer(`subject_class("${n}", C), instance(C, Base), triple("${t}", Predicate, Base).`)}catch(o){console.log("Query failed",o)}else i=await r.infer(`subject_class("${n}", C), instance(C, Base), triple("${t}", Predicate, Base).`);return i?await Promise.all(i.map(async o=>await new this(r,o.Base).get())):[]}};We=new WeakMap,Fe=new WeakMap,Pa=new WeakMap,ae=new WeakMap;var eo="0.8.0-fix";function V1(){let r=new AbortController;return setTimeout(()=>r.abort(),20),r}function sc(r,e=5e3){return ye(this,null,function*(){return Promise.race([new Promise((t,n)=>{let i=new WebSocket(r);i.onopen=()=>{t(i)},i.onerror=a=>{n(a)}}),new Promise((t,n)=>{setTimeout(()=>{n(new Error("WebSocket connection timed out"))},e)})])})}function cc(r){return ye(this,null,function*(){try{let e=yield fetch(`http://localhost:${r}/graphql/`,{signal:V1().signal,mode:"no-cors"});if(e.status===400||e.status===0)return r;throw new Error(`Could not connect to port ${r}`)}catch(e){throw new Error(`Could not connect to port ${r}`)}})}function Q1(){return new Promise((r,e)=>{let t=document.querySelector("ad4m-connect"),n=t==null?void 0:t.getAd4mClient();n?r(n):e("No Ad4mClient found")})}function uc(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(r){return!1}return!0}function xf(r,e){uc()&&localStorage.setItem(`${eo}/${r}`,e)}function Kr(r){return uc()?localStorage.getItem(`${eo}/${r}`):null}function Of(r){uc()&&localStorage.removeItem(`${eo}/${r}`)}var W1=r=>{let e=new Set;do for(let t of Reflect.ownKeys(r))e.add([r,t]);while((r=Reflect.getPrototypeOf(r))&&r!==Object.prototype);return e};function xi(r,{include:e,exclude:t}={}){let n=i=>{let a=o=>typeof o=="string"?i===o:o.test(i);return e?e.some(a):t?!t.some(a):!0};for(let[i,a]of W1(r.constructor.prototype)){if(a==="constructor"||!n(a))continue;let o=Reflect.getOwnPropertyDescriptor(i,a);o&&typeof o.value=="function"&&(r[a]=r[a].bind(r))}return r}var Oi=class{constructor({appName:e,appDesc:t,appIconPath:n,appUrl:i,appDomain:a,capabilities:o,port:s,token:u,url:l}){this.activeSocket=null;this.requestedRestart=!1;this.authState="unauthenticated";this.connectionState="not_connected";this.port=12e3;this.capabilities=[];this.listeners={authstatechange:[],configstatechange:[],connectionstatechange:[]};xi(this);this.appName=e,this.appDesc=t,this.appDomain=a,this.appUrl=i,this.appIconPath=n,this.capabilities=o,this.port=s||this.port,this.url=l||`ws://localhost:${this.port}/graphql`,this.token=u||this.token,this.buildClient()}notifyConfigChange(e,t){this.listeners.configstatechange.forEach(n=>{n(e,t)})}notifyConnectionChange(e){this.connectionState!==e&&(this.connectionState=e,this.listeners.connectionstatechange.forEach(t=>{t(e)}))}notifyAuthChange(e){this.authState!==e&&(this.authState=e,this.listeners.authstatechange.forEach(t=>{t(e)}))}setPort(e){this.port!==e&&(this.port=e,this.setUrl(`ws://localhost:${this.port}/graphql`),this.notifyConfigChange("port",e))}setUrl(e){this.url!==e&&(this.url=e,this.notifyConfigChange("url",e))}setToken(e){this.token!==e&&(this.token=e,this.notifyConfigChange("token",e))}on(e,t){this.listeners[e].push(t)}connect(e){return ye(this,null,function*(){try{if(e){yield sc(e,1e4),this.setUrl(e);let t=this.buildClient();return yield this.checkAuth(),t}else{let t=yield this.ensureConnection();return yield this.checkAuth(),t}}catch(t){this.notifyConnectionChange("not_connected"),this.notifyAuthChange("unauthenticated")}})}connectToPort(e){return ye(this,null,function*(){try{if(e){let t=yield cc(e);this.setPort(t)}else{let t=yield this.findPort();this.setPort(t)}return this.buildClient()}catch(t){this.notifyConnectionChange("not_connected"),this.notifyAuthChange("unauthenticated")}})}ensureConnection(){return ye(this,null,function*(){var t,n;if(((t=this.activeSocket)==null?void 0:t.readyState)===WebSocket.OPEN&&((n=this.activeSocket)==null?void 0:n.url)===this.url&&this.ad4mClient)return this.ad4mClient;try{return yield sc(this.url,1e4),this.buildClient()}catch(i){return this.connectToPort()}})}findPort(){return ye(this,null,function*(){let e=[...Array(10).keys()].map((i,a)=>cc(12e3+a)),n=(yield Promise.allSettled(e)).find(i=>i.status==="fulfilled");if(n)return n.value;throw Error("Couldn't find an open port")})}buildClient(){this.notifyConnectionChange("connecting");try{new WebSocket(this.url)}catch(e){this.notifyConnectionChange("not_connected")}return this.apolloClient&&this.wsClient&&(this.requestedRestart=!0,this.wsClient.dispose(),this.apolloClient.stop()),this.wsClient=$l({url:this.url,connectionParams:()=>ye(this,null,function*(){return{headers:{authorization:this.token}}}),on:{connecting:()=>{this.requestedRestart||this.notifyConnectionChange("connecting")},opened:e=>{this.activeSocket=e},error:e=>{this.notifyConnectionChange("not_connected"),this.notifyAuthChange("unauthenticated")},connected:()=>{this.notifyConnectionChange("connected")},closed:()=>{this.requestedRestart||(this.notifyConnectionChange(this.token?"disconnected":"not_connected"),this.notifyAuthChange("unauthenticated"),this.requestedRestart=!1)}}}),this.apolloClient=new Is({link:new Ml(this.wsClient),cache:new la({resultCaching:!1,addTypename:!1}),defaultOptions:{watchQuery:{fetchPolicy:"no-cache"},query:{fetchPolicy:"no-cache"},mutate:{fetchPolicy:"no-cache"}}}),this.ad4mClient=new Wa(this.apolloClient),this.ad4mClient}checkAuth(){return ye(this,null,function*(){try{return(yield this.ad4mClient.agent.isLocked())?this.notifyAuthChange("locked"):(yield this.ad4mClient.agent.status(),this.notifyAuthChange("authenticated")),!0}catch(e){return e.message==="Socket closed with event 4500 Cannot extractByTags from a ciphered wallet. You must unlock first."?(this.notifyAuthChange("locked"),!0):(this.notifyAuthChange("unauthenticated"),!1)}})}requestCapability(e=!1){return ye(this,null,function*(){var t;return e&&this.setToken(null),this.requestId=yield(t=this.ad4mClient)==null?void 0:t.agent.requestCapability({appName:this.appName,appDesc:this.appDesc,appUrl:this.appUrl,appIconPath:this.appIconPath,appDomain:this.appDomain,capabilities:this.capabilities}),this.requestId})}verifyCode(e){return ye(this,null,function*(){var n;let t=yield(n=this.ad4mClient)==null?void 0:n.agent.generateJwt(this.requestId,e);return this.setToken(t),yield this.buildClient(),yield this.checkAuth(),this.token})}};function lc(){return Y`
1012
+ <div>
1013
+ <div class="lds-ring">
1014
+ <div></div>
1015
+ <div></div>
1016
+ <div></div>
1017
+ <div></div>
1018
+ </div>
1019
+ </div>
1020
+ `}function fc({port:r,url:e,isRemote:t,connectToPort:n,changeIsRemote:i,connectRemote:a,changeState:o,changeUrl:s,changePort:u}){return Y`
1021
+ <div class="items items--small">
1022
+ <div class="text-center">
1023
+ <h1 class="heading">Connection Settings</h1>
1024
+ <p class="body">Please choose how you want to connect to AD4M</p>
1025
+ </div>
1026
+ <div style="display: flex; gap: 10px;">
1027
+ <button class=${`button ${t?"button--secondary":"button--primary"}`} @click=${()=>i(!1)}>
1028
+ Locally
1029
+ </button>
1030
+ <button class=${`button ${t?"button--primary":"button--secondary"}`} @click=${()=>i(!0)}>
1031
+ Proxy
1032
+ </button>
1033
+ </div>
1034
+ ${t?Y`<div class="input">
1035
+ <label class="input__label">URL</label>
1036
+ <input
1037
+ class="input__field"
1038
+ value=${e}
1039
+ @input=${p=>s(p.target.value)}
1040
+ />
1041
+ </div>
1042
+ <div class="buttons">
1043
+ <button
1044
+ class="button button--full button--secondary"
1045
+ @click=${()=>o("start")}
1046
+ >
1047
+ Back
1048
+ </button>
1049
+ <button
1050
+ class="button button--full"
1051
+ @click=${()=>a(e)}
1052
+ >
1053
+ Connect
1054
+ </button>
1055
+ </div>`:Y`<div class="input">
1056
+ <label class="input__label">PORT</label>
1057
+ <input
1058
+ class="input__field"
1059
+ value=${r}
1060
+ @input=${p=>u(parseInt(p.target.value))}
1061
+ />
1062
+ </div>
1063
+
1064
+ <div class="buttons">
1065
+ <button
1066
+ class="button button--full button--secondary"
1067
+ @click=${()=>o("start")}
1068
+ >
1069
+ Back
1070
+ </button>
1071
+ <button
1072
+ class="button button--full"
1073
+ @click=${()=>n(r)}
1074
+ >
1075
+ Connect
1076
+ </button>
1077
+ </div>`}
1078
+ </div>
1079
+ `}function pc({connect:r,isMobile:e,hasClickedDownload:t,changeState:n,onDownloaded:i,scanQrcode:a}){function o(s){s.preventDefault();let u=s.currentTarget;window.open(u.href,"_blank"),this.onDownloaded()}return Y`
1080
+ <div class="items">
1081
+ ${t?Y`<div class="text-center">
1082
+ <a class="button" target="_blank" @click=${()=>r()}>
1083
+ Connect to AD4M
1084
+ </a>
1085
+ <p>
1086
+ Please connect to AD4M once you have downloaded and setup your
1087
+ AD4M agent
1088
+ </p>
1089
+ </div>`:Y`<div class="text-center">
1090
+ ${e?Y`<button class="button" @click=${()=>a()}>
1091
+ Connect with QR
1092
+ </button> `:Y`<a
1093
+ class="button"
1094
+ target="_blank"
1095
+ @click=${o}
1096
+ href="https://ad4m.dev/download"
1097
+ >
1098
+ Download AD4M
1099
+ </a>`}
1100
+ </div>
1101
+ <div class="text-center">
1102
+ <button class="button button--link " @click=${()=>r()}>
1103
+ Try again
1104
+ </button>
1105
+ or
1106
+ <button
1107
+ class="button button--link "
1108
+ @click=${()=>n("settings")}
1109
+ >
1110
+ Change connection settings
1111
+ </button>
1112
+ </div>`}
1113
+
1114
+ <div class="text-center">
1115
+ <a class="button button--link" _target="blank" href="https://ad4m.dev"
1116
+ >Learn more about AD4M</a
1117
+ >
1118
+ </div>
1119
+ </div>
1120
+ `}function dc({reconnect:r}){return Y`
1121
+ <div class="items items--small">
1122
+ <div class="text-center">
1123
+ <h1 class="heading">Could not connect to AD4M</h1>
1124
+ </div>
1125
+ <div class="text-center">
1126
+ <button class="button" @click=${()=>r()}>Try again</button>
1127
+ </div>
1128
+ </div>
1129
+ `}function hc({unlockAgent:r,reconnect:e}){return Y`
1130
+ <div class="text-center">
1131
+ <div class="items">
1132
+ <div>
1133
+ <h1 class="heading">Agent locked</h1>
1134
+ <p class="body">
1135
+ Your agent is locked, please unlock it & press reconnect.
1136
+ </p>
1137
+ </div>
1138
+ <button class="button" @click=${e}>Reconnect</button>
1139
+ </div>
1140
+ </div>
1141
+ `}function mc(){return Y`
1142
+ <svg viewBox="0 0 692 670" fill="none" xmlns="http://www.w3.org/2000/svg">
1143
+ <defs>
1144
+ <linearGradient id="gradient" x1="0" x2="1" y1="0" y2="0">
1145
+ <stop offset="0%" stop-color="var(--start-color)" />
1146
+ <stop offset="100%" stop-color="var(--end-color" />
1147
+ </linearGradient>
1148
+ </defs>
1149
+ <path
1150
+ d="M339 0C340.4 0 343.8 1.29999 346.5 2.89999C349.3 4.49999 352.7 6.9 354.1 8.2C355.6 9.5 359.2 12.5 362.1 15C365 17.5 369.9 21.7 373 24.5C376 27.2 382.1 33 386.5 37.5C390.9 41.9 396.5 47.8 399.1 50.5C401.6 53.3 407 59.8 411.1 65C415.2 70.2 419.7 76.1 421 78C422.3 79.9 423.7 81.7 424 82C424.3 82.3 427.1 86.3 430.1 91C433.1 95.7 437.7 103.1 440.3 107.5C442.8 111.9 445.9 117.8 447 120.5C448.3 123.4 448.9 126.4 448.6 127.8C448.3 129 447.1 130.2 446 130.5C444.9 130.8 442.5 130.5 440.8 130C439 129.4 434.6 128 431 126.9C427.4 125.7 423.6 124.6 422.5 124.4C421.4 124.2 417.8 123.4 414.5 122.7C411.2 121.9 406.3 120.2 403.5 118.8C400.8 117.4 396.9 114.7 394.9 112.9C392.9 111 387.9 105 383.8 99.5C379.6 94 375.4 88.6 374.4 87.4C373.3 86.2 369.6 82 366 77.9C362.4 73.8 355.4 66.3 350.3 61.3C342.8 53.8 340.7 52.2 339.3 52.9C338.3 53.4 333.1 58.2 327.8 63.7C322.5 69.1 315.5 76.7 312.4 80.5C309.2 84.3 306.1 88 305.5 88.6C305 89.2 303.8 90.8 303 92C302.2 93.2 300.8 95.2 299.9 96.4C299 97.5 296 101.9 293.2 106C290.5 110.1 285.6 118 282.3 123.5C279.1 129 274.7 137.1 272.5 141.5C270.4 145.9 268.6 149.8 268.6 150.1C268.5 150.4 267.7 152.2 266.8 154.1C265.9 156 263.6 161.3 261.7 166C259.7 170.7 257.3 177.2 256.2 180.5C255.2 183.8 253.5 189 252.6 192C251.7 195 250.8 198.4 250.5 199.5C250.2 200.6 249.3 204.4 248.5 208C247.6 211.6 246.8 215.4 246.6 216.5C246.4 217.6 245.7 221 245.1 224C244.5 227 243.3 235.1 242.5 242C241.7 248.9 240.7 260.8 240.4 268.5C240.1 276.2 239.7 283.5 239.5 284.8C239.2 286 237.5 288 235.8 289.2C234 290.4 232.1 291.4 231.5 291.5C230.9 291.6 229.1 292.3 227.5 292.9C225.9 293.6 224.1 294.3 223.5 294.4C222.9 294.6 221.7 295 220.8 295.3C219.8 295.7 218.2 296.3 217.3 296.7C216.3 297 215.2 297.4 214.8 297.4C214.5 297.5 213.8 297.8 213.4 298.3C213 298.7 212 299 211.1 299C210.2 299 208.4 299.6 207 300.4C205.1 301.5 204 301.5 202.1 300.6C200.7 300 199.2 298.1 198.8 296.5C198.3 294.9 198.1 284.5 198.5 273.5C198.8 262.5 199.2 251.9 199.5 250C199.7 248.1 200.1 243.5 200.4 239.7C200.7 236 201.7 228.5 202.5 223C203.3 217.5 204.5 210.9 205.1 208.2C205.7 205.6 206.3 202.4 206.5 201C206.7 199.6 208.7 191.8 210.9 183.5C213.1 175.3 216.2 164.9 217.8 160.5C219.5 156.1 221.7 150 222.8 147C223.9 144 226.2 138.1 228.1 134C229.9 129.9 231.7 126.1 232.1 125.5C232.5 124.9 235.4 119.6 238.6 113.5C241.7 107.4 248.1 96.6 252.8 89.5C257.6 82.3 261.9 75.9 262.5 75.2C263 74.5 264 73.4 264.5 72.7C265 72 266.8 69.7 268.4 67.5C270.1 65.3 271.6 63.3 271.9 63C272.3 62.7 274.5 60 277 57C279.4 54 283.9 48.8 287 45.6C290 42.3 295.9 36.3 300.1 32.1C304.2 27.9 309.9 22.4 312.6 19.9C315.3 17.4 320.6 12.7 324.5 9.39999C328.4 6.09999 332.6 2.6 334 1.7C335.4 0.799997 337.6 0 339 0V0ZM348.3 125.6C358.8 125.8 369.1 126.1 371 126.3C372.9 126.6 377 127.1 380 127.5C383 127.9 386.2 128.3 387 128.5C387.8 128.6 390.5 129.1 393 129.5C395.5 129.9 398.2 130.4 399 130.6C399.8 130.8 403.2 131.6 406.5 132.4C409.8 133.2 414.2 134.4 416.3 134.9C418.3 135.5 421.5 136.4 423.3 136.9C425 137.4 428.5 138.5 431 139.3C433.5 140.2 439.1 142.2 443.5 143.8C447.9 145.4 454 147.9 457 149.3C460 150.8 466.8 154.2 472 157C477.2 159.8 483.1 163.2 485 164.4C486.9 165.6 491.2 168.4 494.5 170.6C497.8 172.7 501.1 174.9 501.8 175.5C502.5 176 503.6 176.9 504.3 177.5C505 178.1 508.2 180.5 511.5 183C514.8 185.5 519.5 189.3 522 191.5C524.4 193.7 530.3 199.3 535.1 204C539.9 208.7 545.7 214.8 548.1 217.5C550.5 220.3 554.1 224.5 556 226.9C557.9 229.3 560 231.7 560.6 232.4C561.2 233 564.8 238.2 568.7 244C572.6 249.8 578.5 259.4 581.9 265.5C585.3 271.6 590.7 282.8 593.9 290.5C597.2 298.2 601.2 308.8 602.9 314C604.7 319.2 607.1 327.8 608.4 333C609.8 338.2 611.1 344.3 611.4 346.5C611.8 348.7 612.5 353 613 356C613.6 359 614.2 364.2 614.5 367.5C614.8 370.8 615.2 375.3 615.4 377.5C615.6 379.7 615.4 382.6 614.9 384C614.5 385.4 613.4 386.8 612.5 387.3C611.7 387.7 610.3 387.8 609.5 387.5C608.7 387.2 608 386.5 608 386C608 385.5 603.8 381.1 598.8 376.3C593.7 371.4 584.8 362.8 579 357C569 347.1 568.3 346.1 566.6 340C565.6 336.4 563.5 329.4 561.9 324.5C560.2 319.6 556.4 309.9 553.3 303C550.2 296.1 546.1 287.8 544.2 284.5C542.2 281.2 538.9 275.8 536.7 272.5C534.5 269.2 530.2 263.1 527.1 259C524 254.9 519.9 249.7 518 247.5C516.1 245.3 510.7 239.6 506 234.9C501.3 230.2 493.9 223.5 489.5 219.9C485.1 216.4 481.3 213.2 481 212.9C480.7 212.6 475.8 209.3 470 205.5C464.2 201.7 454.5 196.1 448.5 193C442.5 189.9 434.1 186.1 430 184.6C425.9 183 420.9 181.2 419 180.5C417.1 179.8 413.9 178.8 412 178.1C410.1 177.5 407.6 176.8 406.5 176.5C405.4 176.3 402.7 175.6 400.5 175C398.3 174.4 395.4 173.7 394 173.4C392.6 173.2 389.3 172.5 386.5 172C383.8 171.5 379.7 170.8 377.5 170.4C375.3 170.1 372.8 169.7 372 169.5C371.2 169.2 366.7 168.7 362 168.4C357.3 168 347.6 167.7 340.5 167.8C333.4 167.9 325.3 168.2 322.5 168.5C319.8 168.7 315.3 169.4 312.5 169.9C309.8 170.4 305.3 171.2 302.5 171.6C299.8 171.9 296.5 172.6 295.3 173.1C294 173.6 293 173.8 293 173.5C293 173.2 291.2 173.7 289 174.5C286.8 175.3 285 175.8 285 175.5C285 175.2 283.3 175.6 281.3 176.3C279.2 177 276.9 177.5 276.3 177.3C275.6 177.1 274.5 177 274 177C273.5 177 272.5 176 271.9 174.8C270.9 172.8 271.9 170.1 279.5 154.5C284.3 144.6 288.6 136.4 289.1 136.3C289.6 136.1 290 135.3 290 134.5C290 133.7 291.5 132.1 293.3 131C295 129.9 299 128.8 302 128.5C305 128.2 308.2 127.7 309 127.4C309.8 127.1 314.5 126.6 319.5 126.3C324.5 126 328.6 125.7 328.8 125.5C328.9 125.4 337.7 125.5 348.3 125.6V125.6ZM198.9 170.8C200 171.7 200.7 173.4 200.5 174.5C200.3 175.6 198.5 183.7 196.5 192.5C194.5 201.3 192.3 211.2 191.8 214.5C191.2 217.8 189.7 222.6 188.4 225.3C187.1 227.9 185.2 231 184.3 232.1C183.3 233.3 180.7 236.1 178.5 238.4C176.3 240.6 172 245.4 169 249C165.9 252.6 162.5 256.7 161.5 258.1C160.4 259.6 158.8 261.8 158 263C157.2 264.2 156 265.8 155.5 266.4C154.9 267 153.1 269.8 151.6 272.5C150 275.3 148.3 277.7 147.9 278C147.5 278.3 144.7 283.4 141.6 289.5C138.5 295.6 135.6 301.1 135 301.8C134.5 302.4 134.2 303 134.5 303C134.8 303 133.2 307.1 131 312C128.8 316.9 127.1 321.3 127.2 321.8C127.3 322.2 126.8 323.9 126.1 325.5C125.4 327.1 124.6 329.4 124.4 330.5C124.2 331.6 123.6 333.6 123.1 335C122.6 336.4 121.4 341.1 120.4 345.5C119.4 349.9 118.5 354.2 118.4 355C118.2 355.8 117.8 358.1 117.4 360C117.1 361.9 116.6 364.6 116.4 366C116.2 367.4 115.7 371.9 115.3 376C114.8 380.1 114.5 391.8 114.6 402C114.7 416 115.2 423.4 116.8 432.5C118 439.1 120 448.8 121.4 454C122.8 459.2 124.6 465.8 125.5 468.5C126.5 471.3 129.2 478.5 131.6 484.5C134 490.5 138.3 500 141.1 505.5C143.9 511 149.6 520.5 153.8 526.5C157.9 532.5 163.8 540.4 166.9 544C170 547.6 176 554.2 180.2 558.8C184.6 563.4 188 567.9 188 569C188 570.1 187 571.5 185.8 572.2C184.5 572.8 181.9 573.4 180 573.5C178.1 573.6 171.6 574.1 165.5 574.6C159.4 575 151 575.4 146.8 575.5C140 575.5 138.9 575.2 136.5 573C135 571.6 130.5 566.2 126.6 561C122.6 555.8 117.6 548.8 115.5 545.5C113.4 542.2 110.3 537.3 108.7 534.5C107.1 531.8 102.9 523.9 99.5001 517C96.0001 510.1 91.8001 500.9 90.1001 496.5C88.5001 492.1 85.7001 484 84.0001 478.5C82.3001 473 80.5001 467.1 80.0001 465.5C79.5001 463.9 78.6001 459.8 78.0001 456.5C77.4001 453.2 76.7001 449.6 76.5001 448.5C76.3001 447.4 75.9001 444.7 75.5001 442.5C75.2001 440.3 74.5001 435.6 73.9001 432C73.3001 428.4 72.7001 413.8 72.5001 399.5C72.2001 378.1 72.5001 371.3 74.0001 361C75.0001 354.1 77.0001 343.1 78.4001 336.5C79.8001 329.9 82.1001 320.9 83.6001 316.5C85.0001 312.1 86.3001 308.1 86.4001 307.5C86.6001 306.9 87.2001 305.4 87.7001 304C88.3001 302.6 91.1001 296.1 94.0001 289.5C96.8001 282.9 100.8 274.6 102.7 271C104.7 267.4 107.6 262.3 109.3 259.5C110.9 256.8 114.4 251.4 116.9 247.5C119.4 243.7 122.1 239.9 122.8 239.3C123.4 238.6 124 237.7 124 237.3C124 236.8 125 235.4 126.3 234C127.5 232.6 129.9 229.7 131.5 227.5C133.2 225.3 135.9 222 137.5 220C139.1 218.1 145 212 150.5 206.5C156 200.9 163.4 193.8 167 190.8C170.6 187.7 174.9 184.1 176.5 182.9C178.1 181.6 179.7 180.3 180 180C180.3 179.6 182.5 178 185 176.3C187.5 174.6 191.2 172.3 193.2 171.2C196.8 169.3 197.1 169.3 198.9 170.8V170.8ZM440.7 202C442 202 445.7 203.9 449 206.3C452.3 208.6 455.8 211 456.8 211.5C457.7 212.1 459.9 213.4 461.5 214.5C463.1 215.6 465 216.8 465.5 217.3C466 217.7 470 220.5 474.2 223.5C478.5 226.5 482.3 230 482.7 231.3C483.1 232.5 483.5 234.2 483.7 235C483.8 235.8 484.2 239 484.6 242C484.9 245 485.5 248.4 485.7 249.5C486 250.6 486.4 263.4 486.6 278C486.8 292.6 486.5 307.4 486 311C485.6 314.6 484.9 321.1 484.6 325.5C484.2 329.9 483.5 335.1 483 337C482.5 338.9 481.8 342.5 481.5 345C481.1 347.5 480 353.3 478.9 358C477.8 362.7 476.7 367.4 476.5 368.5C476.3 369.6 475.8 371.6 475.2 373C474.7 374.4 474.2 375.8 474.1 376.3C474.1 376.7 473.7 378.2 473.4 379.8C473.1 381.3 471.7 385.9 470.3 390C468.9 394.1 467.6 398.2 467.5 399C467.3 399.8 466.1 403.2 464.7 406.5C463.3 409.8 460.5 416.7 458.4 421.8C456.2 426.9 454.2 431 453.7 431C453.3 431 453.1 431.3 453.2 431.8C453.3 432.2 451.8 435.6 449.8 439.5C447.9 443.4 445.1 448.5 443.8 451C442.4 453.5 439.8 458 438 461C436.2 464 432.2 470.3 429.1 475C426 479.7 423.1 484 422.5 484.6C422 485.2 420.8 486.8 420 488C419.2 489.2 416.7 492.5 414.5 495.4C412.3 498.3 409.8 501.3 409 502.2C408.2 503 406.1 505.5 404.5 507.6C402.9 509.7 398.8 514.3 395.5 517.7C390.9 522.4 388.9 523.8 387 523.6C385.6 523.5 379.1 519.4 372.5 514.5C365.9 509.7 359.5 504.6 358.2 503.3C357 502.1 356 500.3 356 499.5C356 498.7 357.4 496.5 359.1 494.8C360.8 493 364 489.3 366.3 486.6C368.6 484 371.3 480.8 372.4 479.6C373.4 478.5 375.9 475.5 377.9 473C379.9 470.5 382.1 467.9 382.8 467.3C383.4 466.6 384 465.7 384 465.3C384 464.8 384.8 463.6 385.7 462.5C386.7 461.4 389.4 457.6 391.8 454C394.1 450.4 396.5 446.8 397 446C397.6 445.2 399.9 441.4 402.3 437.5C404.6 433.6 407.7 428.3 409 425.5C410.3 422.8 411.6 420.3 412 420C412.3 419.7 414.7 414.8 417.2 409C419.8 403.2 423.4 394.5 425.3 389.5C427.2 384.5 429.7 377.1 430.9 373C432.2 368.9 433.8 363 434.6 360C435.5 357 436.5 352.9 437 351C437.5 349.1 438.1 345.9 438.5 344C438.8 342.1 439.3 339.6 439.4 338.5C439.6 337.4 440.1 334.9 440.5 333C440.9 331.1 442.1 323.4 443.1 316C444.5 305.3 444.8 297.7 444.5 279C444.2 266.1 443.8 253.9 443.6 252C443.3 250.1 442.8 246.7 442.5 244.5C442.2 242.3 441.7 238.5 441.4 236C441.1 233.5 440.2 228.1 439.4 224C438.5 219.9 437.4 214.9 436.9 213C436.4 211.1 435.9 208.4 435.8 206.9C435.7 205.5 436.2 203.9 437 203.2C437.8 202.5 439.4 202 440.7 202V202ZM349.7 284.6C359.5 284.7 370.6 285.1 374.5 285.4C378.4 285.8 383.5 286.3 386 286.5C388.5 286.7 392.8 287.2 395.5 287.5C398.3 287.9 400.7 288.4 401 288.5C401.3 288.7 403.5 289.1 406 289.4C408.5 289.7 414.3 290.8 419 291.8C423.7 292.9 428.5 294.2 429.8 294.8C431 295.5 432 296.4 432 297C432 297.6 432.1 298.6 432.2 299.3C432.3 299.9 432.1 303.9 431.6 308C431.2 312.1 430.7 317.5 430.4 320C430.1 322.5 429.3 325.4 428.6 326.5C427.8 327.6 425.8 330 424.1 331.8C421.3 334.7 420.6 334.9 416.7 334.4C414.4 334.1 410.5 333.4 408 332.9C405.5 332.3 401.7 331.7 399.5 331.4C397.3 331.2 394.4 330.7 393 330.4C391.6 330.1 389.4 329.7 388 329.5C386.6 329.3 381.7 328.9 377 328.5C372.3 328.1 366.9 327.6 365 327.4C363.1 327.2 355 327 347 326.9C339 326.8 329.1 327.1 325 327.5C320.9 327.9 316.4 328.3 315 328.5C313.6 328.6 309.4 329.1 305.5 329.5C301.6 329.9 295.4 330.9 291.5 331.7C287.6 332.5 283.6 333.3 282.5 333.6C281.4 333.8 279.1 334.3 277.5 334.6C275.9 334.9 274.3 335.3 274 335.5C273.7 335.7 272 336.1 270.2 336.4C268.5 336.7 262.6 338.4 257.2 340C251.9 341.7 246.7 343.5 245.7 344C244.8 344.6 243.4 345 242.7 345C242.1 345.1 239.7 345.9 237.5 347C235.3 348.1 233.1 348.9 232.5 349C231.9 349 228.9 350.3 225.7 352C222.6 353.6 220 354.8 220 354.5C220 354.2 216.3 355.9 211.7 358.3C207.2 360.7 200.4 364.4 196.5 366.5C192.6 368.6 185 373.3 179.5 377C174 380.6 165.9 386.2 161.5 389.5C157.1 392.7 153 395.9 152.4 396.5C151.7 397 149.5 398.9 147.4 400.5C145.4 402.1 141.6 405.4 139.1 407.7C136.6 410 133.5 412.5 132.2 413.2C130.3 414.3 129.7 414.3 128.5 413C127.4 411.8 127 407.3 126.9 392.5C126.7 376.8 126.9 372.5 128.3 368C129.4 364.5 131.8 360.5 134.8 357.1C137.8 353.5 144 348.7 152.2 343.3C159.3 338.7 165.4 335 166 335C166.6 335 167 334.4 167 333.8C167 333.1 167.3 332.8 167.7 333.2C168.1 333.6 169.6 333.1 171 332.1C172.4 331.1 176.9 328.5 181 326.4C185.1 324.3 188.7 322.2 189 321.7C189.3 321.2 189.7 320.9 190 321.1C190.3 321.2 193.9 319.7 198 317.8C202.1 315.8 207.5 313.3 210 312.2C212.5 311.1 218.1 308.8 222.5 307.1C226.9 305.4 235 302.6 240.5 300.9C246 299.2 253.9 296.9 258 295.8C262.1 294.7 266.6 293.6 268 293.4C269.4 293.1 270.7 292.7 271 292.5C271.3 292.3 273.1 291.9 275 291.6C276.9 291.2 280.8 290.5 283.5 290C286.3 289.5 290.1 288.8 292 288.5C293.9 288.2 297.8 287.7 300.5 287.4C303.3 287.1 306.6 286.7 308 286.5C309.4 286.2 315.2 285.7 321 285.4C326.8 285 331.6 284.7 331.7 284.6C331.9 284.5 340 284.5 349.7 284.6V284.6ZM509.8 324.7C514.6 327.3 520.5 330.6 523 332.1C525.5 333.6 529.5 336.1 532 337.6C534.5 339.1 539 342.2 542.1 344.4C545.2 346.7 548.7 349.2 550 350C551.2 350.8 552.8 352 553.4 352.5C554 353.1 557.2 355.6 560.5 358C563.8 360.5 566.7 362.7 567 363C567.3 363.3 570.9 366.4 575 369.9C579.1 373.5 588.4 382.2 595.5 389.4C602.6 396.6 611.4 406.1 615 410.5C618.5 414.9 621.7 418.7 622 419C622.3 419.3 624.3 422 626.6 425C628.8 428 632.3 432.9 634.3 435.8C636.3 438.6 640.8 445.6 644.3 451.3C647.7 456.9 653.1 466.5 656.2 472.5C659.3 478.5 663.6 487.8 665.8 493C668 498.2 671.4 506.8 673.3 512C675.2 517.2 678.4 526.9 680.3 533.5C682.3 540.1 685.2 551.6 686.9 559C688.5 566.4 690 574.1 690.3 576C690.6 577.9 691.2 581.5 691.5 584C692 587 691.8 589.3 690.9 591C690.2 592.4 689.2 594 688.6 594.6C688 595.1 684.9 596.8 681.8 598.3C678.6 599.8 675.9 601 675.8 601C675.6 601 673.7 601.7 671.5 602.7C669.3 603.6 667.3 604.4 667 604.5C666.7 604.5 662.7 605.9 658 607.5C653.3 609.1 649.2 610.6 648.8 610.7C648.3 610.9 647.9 611 647.8 611.1C647.6 611.1 646.8 611.3 646 611.5C645.2 611.6 642 612.5 639 613.4C636 614.3 632.4 615.2 631 615.5C629.6 615.8 627.8 616.2 627 616.5C626.2 616.8 624.4 617.2 623 617.5C621.6 617.8 619.4 618.2 618 618.5C616.6 618.8 614.4 619.2 613 619.5C611.6 619.9 607.8 620.5 604.5 621C601.2 621.5 596.5 622.2 594 622.6C591.5 622.9 588.4 623.3 587 623.5C585.6 623.8 579.8 624.3 574 624.7C568.2 625.1 555.1 625.5 544.9 625.5C527.6 625.5 526.1 625.4 524.1 623.5C522.9 622.4 521.9 621.2 522 620.8C522 620.3 524.6 617.6 527.8 614.8C530.9 611.9 537.8 605.2 543 599.9C548.2 594.6 554.3 589.1 556.5 587.7C558.7 586.4 562.5 584.7 565 584C567.5 583.3 570.4 582.6 571.5 582.5C572.6 582.3 575.3 581.9 577.5 581.6C579.7 581.3 582.9 580.8 584.5 580.5C586.1 580.2 590.9 579.3 595 578.5C599.1 577.7 611.5 575 622.5 572.5C633.5 570 643.1 567.8 643.8 567.5C644.4 567.2 645 566.2 645 565.3C645 564.3 643.9 559.7 642.5 555C641.1 550.3 639.7 545.6 639.5 544.5C639.2 543.4 638.3 540.3 637.4 537.5C636.5 534.8 635.2 530.9 634.5 529C633.8 527.1 631.8 521.9 630 517.5C628.2 513.1 624 503.9 620.7 497C617.4 490.1 612.7 481.1 610.2 477C607.7 472.9 603 465.5 599.7 460.5C596.4 455.5 590.2 447.2 586.1 442C581.9 436.8 575.4 429.1 571.5 425.1C567.7 421 561.8 415 558.5 411.9C555.2 408.8 551.1 405.1 549.5 403.9C547.9 402.6 545.6 400.6 544.5 399.5C543.4 398.4 536.6 393.2 529.5 388C522.4 382.8 514.3 377.1 511.6 375.3C508.8 373.6 504.3 370.8 501.5 369.2C498.8 367.6 495.5 364.8 494.3 362.9C493.1 361 492.1 357.9 492.1 356C492.1 354.1 492.5 350.6 493 348.3C493.6 345.9 494.7 339.4 495.5 333.8C496.7 325.8 497.5 323.1 499.1 321.8C501.1 320.1 501.5 320.2 509.8 324.7V324.7ZM247 356C247.8 356 249 356.5 249.6 357.2C250.3 357.9 252.4 363.2 254.3 369C256.2 374.8 259.9 384.9 262.5 391.5C265.1 398.1 270.4 409.8 274.4 417.5C278.3 425.2 285.8 438 291.1 446C296.4 454 303.1 463.4 306 467C308.9 470.6 314 476.6 317.4 480.4C320.7 484.2 326.4 490.3 330 493.9C333.6 497.5 338.6 502.3 341 504.5C343.5 506.7 347.7 510.3 350.4 512.5C353.1 514.7 356 517.2 357 518C358 518.8 359.8 520.2 361 521C362.2 521.8 366.8 525.1 371.1 528.3C375.4 531.4 381.5 535.5 384.5 537.3C387.5 539 392.2 541.7 394.8 543.2C397.4 544.7 403.7 548 408.8 550.5C413.8 553 418.5 555 419 555C419.5 555 420 555.5 420 556C420 556.5 420.7 557 421.5 557C422.3 557 423.8 557.4 424.8 557.9C425.7 558.5 430.3 560.5 435 562.4C439.7 564.4 444.4 566.2 445.5 566.4C446.6 566.6 449.2 567.5 451.3 568.4C453.3 569.3 455.1 569.8 455.3 569.6C455.4 569.4 457.5 570.1 459.9 571.3C462.4 572.5 464.8 574.3 465.4 575.3C466.2 576.4 466.2 577.5 465.5 578.6C465 579.5 461.4 581.9 457.5 583.9C453.6 585.9 450 587.7 449.5 587.9C449 588.1 443.5 590.6 437.5 593.5C431.5 596.3 425.2 599.2 423.5 599.8C421.9 600.5 419.1 600.9 417.5 600.6C415.9 600.4 409.1 597.8 402.5 594.7C395.9 591.7 385.1 586.2 378.5 582.5C371.9 578.8 365.6 575.3 364.5 574.6C363.4 574 359.1 571.3 355 568.5C350.9 565.8 342.5 559.8 336.5 555.3C330.5 550.9 324.3 546.1 322.9 544.8C321.5 543.6 317.7 540.3 314.5 537.5C311.2 534.8 303.9 527.8 298.1 522C292.2 516.2 285.4 509 282.9 506C280.4 503 275.6 497.1 272.4 493C269.1 488.9 262.9 480.4 258.7 474.3C254.5 468.1 251 462.8 251 462.5C251 462.2 250.2 460.8 249.1 459.3C248.1 457.7 246.2 454.7 245 452.5C243.7 450.3 239.4 441.9 235.4 433.8C231.3 425.6 228 418.8 228 418.5C228 418.2 226.8 415.4 225.4 412.3C224 409.1 221.7 403.6 220.3 400C219 396.4 216.6 389.6 215 384.8C213.3 379.9 212 375.2 212 374.3C212 373.3 213.1 371.5 214.5 370.3C215.9 369 217 368.2 217 368.5C217 368.8 219.4 367.8 222.3 366.3C225.1 364.8 227.7 363.5 228 363.5C228.3 363.5 229.4 362.9 230.5 362.3C231.6 361.7 232.7 361.2 233 361.2C233.3 361.2 234.6 360.7 236 360.2C237.4 359.7 240.1 358.5 242 357.7C243.9 356.9 246.2 356.1 247 356V356ZM59.2001 439C59.7001 439 60.7001 439.7 61.5001 440.5C62.3001 441.3 63.0001 442.6 63.1001 443.3C63.1001 443.9 63.3001 445.2 63.5001 446C63.7001 446.8 64.1001 449.3 64.5001 451.5C64.8001 453.7 65.8001 458 66.6001 461C67.4001 464 69.0001 469 70.2001 472C71.7001 476.1 72.2001 479.9 72.2001 486.5C72.2001 494 71.7001 496.8 69.2001 503.5C67.6001 507.9 64.7001 515.8 62.7001 521C60.8001 526.2 58.7001 532.5 58.0001 535C57.3001 537.5 55.6001 542.9 54.3001 547C53.0001 551.1 51.5001 555.9 51.0001 557.5C50.4001 559.1 49.8001 561.4 49.6001 562.5C49.4001 563.6 48.5001 566.3 47.8001 568.5C46.8001 571.4 46.7001 572.8 47.4001 573.6C48.0001 574.1 51.4001 575.4 55.0001 576.4C58.6001 577.4 62.4001 578.4 63.5001 578.7C64.6001 578.9 66.4001 579.3 67.5001 579.5C68.6001 579.8 71.5001 580.4 74.0001 581C76.5001 581.7 79.4001 582.3 80.5001 582.4C81.6001 582.6 83.6001 583 85.0001 583.3C86.4001 583.7 89.3001 584.2 91.5001 584.4C93.7001 584.7 96.6001 585.1 98.0001 585.4C99.4001 585.7 102.5 586.1 105 586.4C107.5 586.7 114.2 587.2 120 587.6C125.8 588 136.1 588.3 143 588.3C149.9 588.2 158.7 587.9 162.5 587.6C166.4 587.3 171.5 586.8 174 586.5C176.5 586.1 180.8 585.5 183.5 585C186.3 584.5 189.6 583.8 191 583.5C192.4 583.2 195.1 582.7 197 582.5C198.9 582.3 201.4 581.9 202.5 581.6C203.6 581.4 206.5 580.7 209 580.1C211.5 579.6 215.4 578.4 217.8 577.5C220.1 576.7 222 576.2 222 576.5C222 576.8 223.6 576.3 225.5 575.5C227.4 574.7 229 574.2 229 574.5C229 574.8 229.6 574.7 230.3 574.3C230.9 573.9 231.8 573.4 232.3 573.3C232.7 573.1 233.1 573 233.3 572.9C233.4 572.9 234.2 572.7 235 572.5C235.8 572.3 240.3 570.8 245 569C249.7 567.3 255.1 565.2 257 564.3C258.9 563.4 265.9 560.1 272.5 556.9C279.1 553.7 287.4 549.4 291 547.4C294.6 545.4 298.7 543.8 300.3 543.9C301.8 543.9 303.8 544.6 304.8 545.3C305.8 545.9 309 548.5 311.9 551C314.9 553.5 318.6 556.7 320.4 558.2C322.1 559.8 325.6 562.7 328.2 564.7C330.8 566.8 332.9 569.2 333 570C333 570.8 332.5 572.3 331.8 573.2C331.1 574.1 326 577.2 320.5 580.1C315 583 303.8 588.8 295.5 593C287.3 597.2 275.3 602.8 269 605.4C262.7 608 256.8 610.3 256 610.5C255.2 610.7 250.9 612.1 246.5 613.6C242.1 615 237.8 616.5 237 616.7C236.2 616.9 235.4 617.1 235.3 617.1C235.1 617 233.2 617.7 231 618.5C228.8 619.3 227 619.8 227 619.5C227 619.2 225.8 619.5 224.3 620.1C222.7 620.7 217.5 622 212.5 623C207.6 624 201.9 625.1 200 625.4C198.1 625.7 195.4 626.2 194 626.4C192.6 626.7 189.5 627.1 187 627.5C184.5 627.9 181.2 628.3 179.5 628.5C177.9 628.7 171.1 629.2 164.5 629.6C157.9 630 146.7 630.4 139.5 630.3C132.4 630.3 120.9 630 114 629.6C107.1 629.3 100.6 628.8 99.5001 628.6C98.4001 628.4 95.3001 627.9 92.5001 627.6C89.8001 627.2 86.2001 626.7 84.5001 626.4C82.9001 626.2 79.3001 625.5 76.5001 625C73.8001 624.5 70.2001 623.8 68.5001 623.5C66.9001 623.1 64.6001 622.7 63.5001 622.5C62.4001 622.3 57.2001 621 52.0001 619.6C46.8001 618.2 39.6001 616.2 36.0001 615.1C32.4001 614.1 27.3001 612.4 24.5001 611.4C21.8001 610.5 15.7001 608.1 11.1001 606.1C6.50011 604.1 2.1001 601.6 1.4001 600.5C0.500095 599.1 0.200107 596.6 0.600107 592.5C0.800107 589.2 1.2001 585.4 1.5001 584C1.7001 582.6 2.6001 577.3 3.4001 572.3C4.3001 567.2 5.9001 559.1 7.0001 554.3C8.1001 549.4 9.3001 544.6 9.5001 543.5C9.8001 542.4 10.7001 539 11.6001 536C12.6001 533 14.4001 527.4 15.6001 523.5C16.9001 519.6 18.8001 514 19.9001 511C21.0001 508 24.4001 499.6 27.5001 492.5C30.6001 485.4 35.1001 475.9 37.4001 471.5C39.8001 467.1 42.6001 462 43.6001 460.1C44.6001 458.3 47.7001 453.3 50.3001 449.1C53.0001 444.9 55.9001 440.9 56.8001 440.3C57.7001 439.6 58.8001 439 59.2001 439V439ZM570.8 447.4C571.2 447.7 572.6 448.2 574 448.5C575.4 448.8 576.5 449.1 576.6 449.3C576.6 449.4 580.9 455.6 586.2 463C591.4 470.4 596.7 478.1 597.9 480C599 481.9 600 485.1 600 487C600 488.9 599.1 493 597.9 496C596.7 499 595.1 503.1 594.3 505C593.5 506.9 591.2 511.6 589.3 515.5C587.4 519.4 583.7 526.2 581.2 530.8C578.6 535.4 576 539.9 575.5 540.8C575 541.8 572.3 545.9 569.5 550C566.8 554.1 564.1 558.1 563.5 558.8C563 559.5 562 560.6 561.5 561.3C561 562 558.7 564.8 556.5 567.5C554.4 570.3 551.7 573.6 550.5 574.9C549.4 576.3 542.6 583.3 535.5 590.4C528.3 597.6 521.1 604.6 519.4 606C517.7 607.4 514.8 609.7 512.9 611.2C511 612.7 505.5 616.8 500.5 620.3C495.5 623.8 488.1 628.6 484 631C479.9 633.4 470.9 638.2 464 641.7C457.1 645.2 451.4 648.1 451.3 648C451.1 648 449.5 648.6 447.8 649.3C446 650.1 441.6 651.7 438 653C434.4 654.2 430.9 655.4 430.3 655.6C429.6 655.8 428.8 655.9 428.7 655.8C428.5 655.6 427.7 656 426.9 656.7C426.1 657.3 423.7 658.1 421.5 658.5C419.3 658.9 416.9 659.8 416.2 660.4C415.5 661 414.9 661.2 415 660.8C415 660.3 413.2 660.7 411 661.5C408.8 662.3 406.8 663 406.5 663C406.2 663 404.8 663.2 403.3 663.5C401.7 663.7 399.1 664.2 397.5 664.5C395.9 664.8 393.6 665.2 392.5 665.4C391.4 665.6 388.5 666.1 386 666.5C383.5 666.8 380.4 667.3 379 667.5C377.6 667.7 372.9 668.2 368.5 668.6C364.1 669 352.9 669.3 343.5 669.3C334.1 669.3 323.1 669 319 668.6C314.9 668.2 310.4 667.8 309 667.5C307.6 667.3 304.7 666.9 302.5 666.6C300.3 666.2 297.4 665.8 296 665.5C294.6 665.3 292.1 664.8 290.5 664.4C288.9 664.1 286.6 663.7 285.5 663.5C284.4 663.3 279 662 273.5 660.5C268 659 263.3 657.7 263 657.5C262.7 657.2 261.6 656.9 260.5 656.6C259.4 656.3 255.1 654.9 251 653.4C246.9 652 239 648.8 233.5 646.3C228 643.9 222.5 641.2 221.3 640.4C220 639.7 219 638.2 219 637.3C218.9 636.3 219.5 634.9 220.2 634.3C220.9 633.6 222.6 632.8 224 632.5C225.4 632.2 227.9 631.6 229.5 631C231.1 630.4 233.6 629.8 235 629.5C236.4 629.2 239.1 628.5 241 627.9C242.9 627.3 245.2 626.6 246 626.3C246.8 625.9 247.7 625.6 248 625.5C248.3 625.4 250.3 624.5 252.5 623.5C254.7 622.5 259.6 621.2 263.5 620.6C267.4 619.9 273.4 619.5 277 619.7C280.6 619.8 285.3 620.1 287.5 620.4C289.7 620.7 292.9 621.2 294.5 621.5C296.1 621.8 301.1 622.8 305.5 623.7C309.9 624.6 314.6 625.4 316 625.6C317.4 625.8 321.2 626.3 324.5 626.7C327.8 627.1 337 627.5 345 627.5C353 627.5 362.9 627.1 367 626.7C371.1 626.2 374.7 625.7 375 625.5C375.3 625.3 377.9 624.9 380.8 624.6C383.6 624.3 386.3 623.8 386.8 623.6C387.2 623.3 388.9 622.9 390.5 622.6C392.1 622.3 394.6 621.8 396 621.5C397.4 621.3 400.4 620.4 402.8 619.5C405.1 618.7 407.1 618.1 407.3 618.2C407.4 618.3 410.6 617.3 414.5 616C418.4 614.6 421.7 613.5 422 613.5C422.3 613.4 424.3 612.6 426.5 611.7C428.7 610.7 430.5 610 430.5 610C430.5 610 432.1 609.4 434 608.6C435.9 607.8 437.7 607.2 438 607.2C438.3 607.2 441.4 605.6 445 603.7C448.6 601.8 454.2 598.8 457.5 597C460.8 595.2 468.2 590.6 474 586.7C479.8 582.8 484.7 579.4 485 579.1C485.3 578.8 487.3 577.1 489.5 575.5C491.7 573.8 498.5 567.5 504.5 561.5C510.6 555.5 516.9 548.9 518.6 547C520.2 545.1 524.5 539.5 528.2 534.5C531.8 529.5 535.3 524.4 536 523C536.7 521.6 537.6 520.3 538 520C538.3 519.7 541.6 514.1 545.2 507.5C548.8 500.9 553.1 492.4 554.8 488.5C556.5 484.6 560.2 474.5 563 466C565.8 457.5 568.6 449.7 569.2 448.7C569.7 447.7 570.5 447.2 570.8 447.4V447.4Z"
1151
+ fill="url(#gradient)"
1152
+ />
1153
+ </svg>
1154
+ `}function yc({capabilities:r,appname:e,appiconpath:t,changeState:n,setOpen:i,requestCapability:a}){return Y`
1155
+ <div class="items">
1156
+ <div class="text-center">
1157
+ <p class="body">An external application</p>
1158
+ <h1 class="heading nomargin">${e}</h1>
1159
+ <p class="body">wants to access your AD4M data</p>
1160
+ </div>
1161
+ ${t&&Y`<div class="dialog__connect">
1162
+ <img class="dialog__connect-app" src=${t} alt="Logo" />
1163
+ <div class="dialog__connect-check"></div>
1164
+ <div class="dialog__connect-ad4m">${mc()}</div>
1165
+ </div>`}
1166
+ <div>
1167
+ <p class="text-center"><b>This will allow the developer to:</b></p>
1168
+ <ul class="check-list">
1169
+ ${r.map(o=>Y`<li>
1170
+ <span>
1171
+ <svg
1172
+ xmlns="http://www.w3.org/2000/svg"
1173
+ width="20"
1174
+ height="20"
1175
+ fill="var(--success-color)"
1176
+ viewBox="0 0 16 16"
1177
+ >
1178
+ <path
1179
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"
1180
+ />
1181
+ </svg>
1182
+ </span>
1183
+ <span>${Ef(o)}</span>
1184
+ </li>`)}
1185
+ </ul>
1186
+ </div>
1187
+ <div class="buttons">
1188
+ <button
1189
+ class="button button--secondary button--full"
1190
+ @click=${()=>i(!1)}
1191
+ >
1192
+ Cancel
1193
+ </button>
1194
+ <button
1195
+ class="button button--full"
1196
+ @click=${()=>a(!0)}
1197
+ >
1198
+ Authorize
1199
+ </button>
1200
+ </div>
1201
+ <button
1202
+ class="button button--full button--link"
1203
+ @click=${()=>n("settings")}
1204
+ >
1205
+ Connection settings
1206
+ </button>
1207
+ </div>
1208
+ `}function gc({code:r,changeState:e,verifyCode:t,changeCode:n}){return Y`
1209
+ <div class="items">
1210
+ <div class="text-center">
1211
+ <div class="heading">Please check Ad4m</div>
1212
+ <p class="body">
1213
+ Please check AD4M, confirm the request there and enter the 6-digit
1214
+ security code below.
1215
+ </p>
1216
+ </div>
1217
+ <div class="input">
1218
+ <label class="input__label">Security code</label>
1219
+ <input
1220
+ type="tel"
1221
+ placeholder="XXXXXX"
1222
+ class="input__field"
1223
+ value=${r}
1224
+ @change=${i=>n(i.target.value)}
1225
+ />
1226
+ </div>
1227
+ <div class="buttons">
1228
+ <button
1229
+ class="button button--full button--secondary"
1230
+ @click=${()=>e("start")}
1231
+ >
1232
+ Back
1233
+ </button>
1234
+ <button class="button button--full" @click=${()=>t(r)}>
1235
+ Continue
1236
+ </button>
1237
+ </div>
1238
+ </div>
1239
+ `}function vc(){return Y`
1240
+ <div class="items">
1241
+ <div class="text-center">
1242
+ <h1 class="heading">Request to AD4M blocked</h1>
1243
+ <div class="body">
1244
+ Its possible your browser is blocking requests to your local machine.
1245
+ Please remove any browser shields/protection that may be running for
1246
+ this page. Alternatively allow requests to localhost in your browser
1247
+ settings.
1248
+ </div>
1249
+ </div>
1250
+
1251
+ <div class="buttons">
1252
+ <button
1253
+ class="button button--full button--secondary"
1254
+ @click=${()=>location.reload()}
1255
+ >
1256
+ Try again
1257
+ </button>
1258
+ </div>
1259
+ </div>
1260
+ `}function bc({changeState:r,onSuccess:e,uiState:t}){function n(i){let a=new BarcodeDetector,o=i.currentTarget,s=()=>ye(this,null,function*(){try{if(t!=="qr")return;let l=(yield a.detect(o)).find(f=>f.format==="qr_code");if(l!=null&&l.rawValue){r("requestcap"),e(l.rawValue);return}else requestAnimationFrame(s)}catch(u){console.error(u)}});s()}return Y`
1261
+ <div class="qr-scanner">
1262
+ <div class="qr-content">
1263
+ <button
1264
+ class="button button--primary stop"
1265
+ @click=${()=>r("start")}
1266
+ >
1267
+ Stop scanning
1268
+ </button>
1269
+ <video
1270
+ width="100%"
1271
+ height="100%"
1272
+ @play=${n}
1273
+ autoplay
1274
+ playsinline
1275
+ muted
1276
+ ></video>
1277
+ </div>
1278
+ </div>
1279
+ `}function Cc(){return Y`<header class="dialog__header">
1280
+ <div class="dialog__logo">
1281
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 37" fill="none">
1282
+ <path
1283
+ d="M18.6099 0C18.6869 0 18.8737 0.0718656 19.0221 0.160316C19.1761 0.248767 19.3629 0.381443 19.4399 0.453309C19.5223 0.525176 19.7202 0.69102 19.8796 0.829225C20.039 0.967429 20.3083 1.19961 20.4787 1.3544C20.6436 1.50366 20.9789 1.82429 21.2208 2.07306C21.4626 2.3163 21.7704 2.64246 21.9133 2.79172C22.0508 2.94651 22.3476 3.30584 22.5729 3.59331C22.7983 3.88077 23.0456 4.20693 23.1171 4.31197C23.1885 4.417 23.2655 4.51651 23.282 4.53309C23.2985 4.54968 23.4524 4.77081 23.6173 5.03063C23.7822 5.29045 24.035 5.69954 24.1779 5.94278C24.3153 6.18602 24.4857 6.51218 24.5462 6.66144C24.6176 6.82175 24.6506 6.9876 24.6341 7.06499C24.6176 7.13133 24.5517 7.19767 24.4912 7.21425C24.4308 7.23084 24.2988 7.21425 24.2054 7.18661C24.1065 7.15344 23.8646 7.07605 23.6667 7.01524C23.4689 6.9489 23.26 6.88809 23.1995 6.87704C23.1391 6.86598 22.9412 6.82175 22.7598 6.78306C22.5784 6.73883 22.3091 6.64485 22.1552 6.56746C22.0068 6.49006 21.7924 6.3408 21.6825 6.2413C21.5725 6.13626 21.2977 5.80457 21.0724 5.50052C20.8415 5.19647 20.6107 4.89795 20.5557 4.83162C20.4952 4.76528 20.2919 4.53309 20.094 4.30644C19.8961 4.07978 19.5113 3.66517 19.231 3.38876C18.8188 2.97415 18.7033 2.8857 18.6264 2.9244C18.5714 2.95204 18.2856 3.21739 17.9943 3.52144C17.703 3.81996 17.3182 4.2401 17.1478 4.45017C16.9719 4.66024 16.8015 4.86478 16.7686 4.89795C16.7411 4.93112 16.6751 5.01957 16.6311 5.08591C16.5872 5.15225 16.5102 5.26281 16.4608 5.32915C16.4113 5.38996 16.2464 5.6332 16.0925 5.85985C15.9441 6.08651 15.6747 6.52323 15.4934 6.82728C15.3175 7.13133 15.0756 7.57911 14.9547 7.82235C14.8393 8.06559 14.7403 8.28119 14.7403 8.29777C14.7348 8.31436 14.6909 8.41387 14.6414 8.5189C14.5919 8.62394 14.4655 8.91693 14.3611 9.17675C14.2511 9.43658 14.1192 9.79591 14.0588 9.97834C14.0038 10.1608 13.9103 10.4482 13.8609 10.6141C13.8114 10.7799 13.7619 10.9679 13.7455 11.0287C13.729 11.0895 13.6795 11.2996 13.6355 11.4986C13.5861 11.6976 13.5421 11.9077 13.5311 11.9685C13.5201 12.0293 13.4816 12.2172 13.4486 12.3831C13.4157 12.5489 13.3497 12.9967 13.3057 13.3782C13.2618 13.7596 13.2068 14.4175 13.1903 14.8431C13.1738 15.2688 13.1518 15.6723 13.1408 15.7442C13.1243 15.8105 13.0309 15.9211 12.9375 15.9875C12.8385 16.0538 12.7341 16.1091 12.7011 16.1146C12.6681 16.1201 12.5692 16.1588 12.4812 16.192C12.3933 16.2307 12.2944 16.2694 12.2614 16.2749C12.2284 16.286 12.1624 16.3081 12.113 16.3247C12.058 16.3468 11.9701 16.3799 11.9206 16.4021C11.8656 16.4186 11.8052 16.4408 11.7832 16.4408C11.7667 16.4463 11.7282 16.4629 11.7062 16.4905C11.6842 16.5126 11.6293 16.5292 11.5798 16.5292C11.5303 16.5292 11.4314 16.5624 11.3544 16.6066C11.25 16.6674 11.1896 16.6674 11.0851 16.6177C11.0082 16.5845 10.9257 16.4795 10.9037 16.391C10.8762 16.3026 10.8653 15.7276 10.8872 15.1195C10.9037 14.5114 10.9257 13.9254 10.9422 13.8204C10.9532 13.7154 10.9752 13.4611 10.9917 13.251C11.0082 13.0465 11.0631 12.6319 11.1071 12.3278C11.1511 12.0238 11.217 11.6589 11.25 11.5096C11.283 11.3659 11.316 11.189 11.327 11.1116C11.338 11.0342 11.4479 10.603 11.5688 10.1442C11.6897 9.69087 11.8601 9.11594 11.9481 8.8727C12.0415 8.62946 12.1624 8.29225 12.2229 8.1264C12.2834 7.96056 12.4098 7.63439 12.5142 7.40774C12.6132 7.18109 12.7121 6.97101 12.7341 6.93785C12.7561 6.90468 12.9155 6.61168 13.0914 6.27447C13.2618 5.93725 13.6135 5.34021 13.8719 4.94771C14.1357 4.54968 14.3721 4.19588 14.405 4.15718C14.4325 4.11848 14.4875 4.05767 14.515 4.01897C14.5425 3.98028 14.6414 3.85313 14.7293 3.73151C14.8228 3.60989 14.9052 3.49933 14.9217 3.48274C14.9437 3.46616 15.0646 3.3169 15.202 3.15105C15.334 2.98521 15.5813 2.69774 15.7517 2.52084C15.9166 2.33841 16.2409 2.00672 16.4717 1.77454C16.6971 1.54236 17.0104 1.23831 17.1588 1.1001C17.3072 0.9619 17.5985 0.702077 17.8129 0.519647C18.0273 0.337217 18.2581 0.143732 18.3351 0.0939788C18.412 0.0442251 18.533 0 18.6099 0ZM19.1211 6.94337C19.6982 6.95443 20.2644 6.97101 20.3688 6.98207C20.4732 6.99866 20.6986 7.0263 20.8635 7.04841C21.0284 7.07052 21.2043 7.09263 21.2483 7.10369C21.2922 7.10922 21.4406 7.13686 21.578 7.15897C21.7155 7.18109 21.8639 7.20873 21.9078 7.21978C21.9518 7.23084 22.1387 7.27506 22.3201 7.31929C22.5015 7.36351 22.7433 7.42985 22.8587 7.45749C22.9687 7.49066 23.1446 7.54042 23.2435 7.56806C23.3369 7.5957 23.5293 7.65651 23.6667 7.70073C23.8042 7.75049 24.112 7.86105 24.3538 7.9495C24.5957 8.03795 24.9309 8.17615 25.0958 8.25355C25.2607 8.33647 25.6345 8.52443 25.9203 8.67922C26.2061 8.83401 26.5304 9.02196 26.6349 9.0883C26.7393 9.15464 26.9757 9.30943 27.1571 9.43105C27.3384 9.54714 27.5198 9.66876 27.5583 9.70193C27.5968 9.72957 27.6572 9.77932 27.6957 9.81249C27.7342 9.84566 27.9101 9.97834 28.0915 10.1165C28.2729 10.2547 28.5312 10.4648 28.6686 10.5864C28.8005 10.7081 29.1248 11.0176 29.3887 11.2775C29.6525 11.5373 29.9713 11.8745 30.1032 12.0238C30.2351 12.1785 30.433 12.4107 30.5374 12.5434C30.6419 12.6761 30.7573 12.8088 30.7903 12.8475C30.8233 12.8806 31.0211 13.1681 31.2355 13.4887C31.4499 13.8094 31.7742 14.3401 31.961 14.6773C32.1479 15.0145 32.4447 15.6336 32.6206 16.0593C32.802 16.485 33.0219 17.071 33.1153 17.3584C33.2143 17.6459 33.3462 18.1213 33.4176 18.4088C33.4946 18.6963 33.566 19.0335 33.5825 19.1551C33.6045 19.2767 33.643 19.5144 33.6705 19.6803C33.7035 19.8461 33.7364 20.1336 33.7529 20.316C33.7694 20.4984 33.7914 20.7472 33.8024 20.8688C33.8134 20.9904 33.8024 21.1508 33.7749 21.2281C33.7529 21.3055 33.6925 21.3829 33.643 21.4106C33.599 21.4327 33.5221 21.4382 33.4781 21.4216C33.4341 21.4051 33.3956 21.3664 33.3956 21.3387C33.3956 21.3111 33.1648 21.0678 32.89 20.8025C32.6096 20.5316 32.1204 20.0562 31.8016 19.7355C31.252 19.1883 31.2135 19.133 31.1201 18.7958C31.0651 18.5967 30.9497 18.2098 30.8617 17.9389C30.7683 17.668 30.5594 17.1318 30.389 16.7503C30.2186 16.3689 29.9933 15.9101 29.8888 15.7276C29.7789 15.5452 29.5975 15.2467 29.4766 15.0642C29.3557 14.8818 29.1193 14.5446 28.9489 14.3179C28.7785 14.0913 28.5532 13.8038 28.4487 13.6822C28.3443 13.5606 28.0475 13.2455 27.7892 12.9857C27.5308 12.7258 27.1241 12.3554 26.8822 12.1564C26.6404 11.9629 26.4315 11.786 26.415 11.7695C26.3985 11.7529 26.1292 11.5704 25.8104 11.3604C25.4916 11.1503 24.9584 10.8407 24.6286 10.6694C24.2988 10.498 23.8371 10.2879 23.6118 10.205C23.3864 10.1165 23.1116 10.017 23.0072 9.97834C22.9027 9.93964 22.7268 9.88436 22.6224 9.84566C22.518 9.81249 22.3805 9.77379 22.3201 9.75721C22.2596 9.74615 22.1112 9.70746 21.9903 9.67429C21.8694 9.64112 21.71 9.60242 21.633 9.58584C21.5561 9.57478 21.3747 9.53608 21.2208 9.50844C21.0724 9.4808 20.847 9.4421 20.7261 9.41999C20.6052 9.40341 20.4677 9.38129 20.4238 9.37024C20.3798 9.35365 20.1325 9.32601 19.8741 9.30943C19.6158 9.28732 19.0826 9.27073 18.6924 9.27626C18.3021 9.28179 17.8569 9.29837 17.703 9.31496C17.5546 9.32601 17.3072 9.36471 17.1533 9.39235C17.0049 9.41999 16.7576 9.46422 16.6037 9.48633C16.4553 9.50291 16.2739 9.54161 16.2079 9.56925C16.1365 9.59689 16.0815 9.60795 16.0815 9.59136C16.0815 9.57478 15.9825 9.60242 15.8616 9.64665C15.7407 9.69087 15.6418 9.71851 15.6418 9.70193C15.6418 9.68534 15.5483 9.70746 15.4384 9.74615C15.323 9.78485 15.1965 9.81249 15.1636 9.80143C15.1251 9.79038 15.0646 9.78485 15.0371 9.78485C15.0097 9.78485 14.9547 9.72957 14.9217 9.66323C14.8667 9.55267 14.9217 9.40341 15.3395 8.54101C15.6033 7.99372 15.8396 7.54042 15.8671 7.53489C15.8946 7.52383 15.9166 7.47961 15.9166 7.43538C15.9166 7.39116 15.999 7.3027 16.098 7.24189C16.1914 7.18109 16.4113 7.12028 16.5762 7.10369C16.7411 7.08711 16.917 7.05947 16.9609 7.04288C17.0049 7.0263 17.2632 6.99866 17.5381 6.98207C17.8129 6.96549 18.0383 6.9489 18.0493 6.93785C18.0548 6.93232 18.5384 6.93785 19.1211 6.94337ZM10.9092 9.4421C10.9697 9.49186 11.0082 9.58584 10.9972 9.64665C10.9862 9.70746 10.8872 10.1552 10.7773 10.6417C10.6674 11.1282 10.5465 11.6755 10.519 11.8579C10.486 12.0403 10.4035 12.3057 10.3321 12.455C10.2606 12.5987 10.1562 12.7701 10.1067 12.8309C10.0518 12.8972 9.90885 13.052 9.78793 13.1791C9.667 13.3008 9.43065 13.5661 9.26575 13.7651C9.09536 13.9641 8.90848 14.1908 8.85351 14.2682C8.79305 14.3511 8.70511 14.4727 8.66113 14.5391C8.61716 14.6054 8.5512 14.6939 8.52372 14.727C8.49074 14.7602 8.3918 14.915 8.30935 15.0642C8.22141 15.219 8.12797 15.3517 8.10598 15.3683C8.08399 15.3849 7.93009 15.6668 7.7597 16.004C7.5893 16.3413 7.4299 16.6453 7.39692 16.684C7.36944 16.7172 7.35295 16.7503 7.36944 16.7503C7.38593 16.7503 7.29799 16.977 7.17706 17.2479C7.05614 17.5188 6.9627 17.762 6.96819 17.7896C6.97369 17.8117 6.94621 17.9057 6.90773 17.9942C6.86925 18.0826 6.82528 18.2098 6.81429 18.2706C6.8033 18.3314 6.77032 18.442 6.74283 18.5193C6.71535 18.5967 6.64939 18.8566 6.59443 19.0998C6.53946 19.343 6.48999 19.5808 6.4845 19.625C6.4735 19.6692 6.45152 19.7964 6.42953 19.9014C6.41304 20.0064 6.38556 20.1557 6.37456 20.2331C6.36357 20.3105 6.33609 20.5592 6.3141 20.7859C6.28662 21.0126 6.27013 21.6593 6.27563 22.2232C6.28112 22.9972 6.30861 23.4062 6.39655 23.9093C6.46251 24.2742 6.57244 24.8104 6.64939 25.0979C6.72634 25.3853 6.82528 25.7502 6.87475 25.8994C6.92972 26.0542 7.07812 26.4523 7.21004 26.784C7.34196 27.1156 7.57831 27.6408 7.73221 27.9449C7.88612 28.2489 8.19942 28.7741 8.43028 29.1058C8.65564 29.4375 8.97993 29.8742 9.15033 30.0732C9.32072 30.2722 9.65051 30.6371 9.88137 30.8914C10.1232 31.1457 10.3101 31.3944 10.3101 31.4553C10.3101 31.5161 10.2551 31.5935 10.1892 31.6322C10.1177 31.6653 9.97481 31.6985 9.87038 31.704C9.76594 31.7095 9.40866 31.7372 9.07337 31.7648C8.73808 31.7869 8.27637 31.8091 8.04552 31.8146C7.67175 31.8146 7.61129 31.798 7.47937 31.6764C7.39692 31.599 7.14958 31.3005 6.93521 31.013C6.71535 30.7255 6.44052 30.3386 6.3251 30.1561C6.20967 29.9737 6.03927 29.7028 5.95133 29.548C5.86338 29.3988 5.63253 28.9621 5.44565 28.5806C5.25327 28.1992 5.02242 27.6906 4.92897 27.4473C4.84103 27.2041 4.68713 26.7563 4.59368 26.4523C4.50024 26.1482 4.40131 25.8221 4.37382 25.7336C4.34634 25.6452 4.29687 25.4185 4.26389 25.2361C4.23091 25.0536 4.19244 24.8546 4.18144 24.7938C4.17045 24.733 4.14846 24.5837 4.12648 24.4621C4.10999 24.3405 4.07151 24.0807 4.03853 23.8817C4.00555 23.6827 3.97257 22.8755 3.96158 22.085C3.94509 20.902 3.96158 20.5261 4.04403 19.9567C4.09899 19.5752 4.20893 18.9671 4.28588 18.6023C4.36283 18.2374 4.48925 17.7399 4.5717 17.4966C4.64865 17.2534 4.72011 17.0323 4.7256 16.9991C4.7366 16.9659 4.76958 16.883 4.79706 16.8056C4.83004 16.7282 4.98394 16.3689 5.14334 16.004C5.29724 15.6392 5.5171 15.1803 5.62154 14.9813C5.73147 14.7823 5.89087 14.5004 5.98431 14.3456C6.07225 14.1963 6.26463 13.8978 6.40205 13.6822C6.53946 13.4721 6.68787 13.2621 6.72634 13.2289C6.75932 13.1902 6.7923 13.1404 6.7923 13.1183C6.7923 13.0907 6.84727 13.0133 6.91872 12.9359C6.98468 12.8585 7.1166 12.6982 7.20455 12.5766C7.29799 12.455 7.44639 12.2725 7.53434 12.162C7.62228 12.0569 7.94658 11.7197 8.24889 11.4157C8.5512 11.1061 8.95795 10.7136 9.15582 10.5477C9.3537 10.3764 9.59005 10.1773 9.678 10.111C9.76594 10.0391 9.85389 9.96728 9.87038 9.9507C9.88687 9.92858 10.0078 9.84013 10.1452 9.74615C10.2826 9.65217 10.486 9.52503 10.5959 9.46422C10.7938 9.35918 10.8103 9.35918 10.9092 9.4421ZM24.1999 11.1669C24.2714 11.1669 24.4747 11.2719 24.6561 11.4046C24.8375 11.5317 25.0299 11.6644 25.0849 11.6921C25.1343 11.7252 25.2552 11.7971 25.3432 11.8579C25.4311 11.9187 25.5356 11.9851 25.5631 12.0127C25.5905 12.0348 25.8104 12.1896 26.0413 12.3554C26.2776 12.5213 26.4865 12.7148 26.5085 12.7866C26.5304 12.853 26.5524 12.947 26.5634 12.9912C26.5689 13.0354 26.5909 13.2123 26.6129 13.3782C26.6294 13.544 26.6624 13.732 26.6734 13.7928C26.6898 13.8536 26.7118 14.5612 26.7228 15.3683C26.7338 16.1754 26.7173 16.9936 26.6898 17.1926C26.6679 17.3916 26.6294 17.7509 26.6129 17.9942C26.5909 18.2374 26.5524 18.5249 26.525 18.6299C26.4975 18.7349 26.459 18.934 26.4425 19.0722C26.4205 19.2104 26.3601 19.531 26.2996 19.7908C26.2391 20.0506 26.1787 20.3105 26.1677 20.3713C26.1567 20.4321 26.1292 20.5427 26.0962 20.6201C26.0687 20.6974 26.0413 20.7748 26.0358 20.8025C26.0358 20.8246 26.0138 20.9075 25.9973 20.996C25.9808 21.0789 25.9038 21.3332 25.8269 21.5598C25.7499 21.7865 25.6785 22.0131 25.673 22.0574C25.662 22.1016 25.596 22.2896 25.5191 22.472C25.4421 22.6544 25.2882 23.0359 25.1728 23.3178C25.0519 23.5997 24.9419 23.8264 24.9145 23.8264C24.8925 23.8264 24.8815 23.843 24.887 23.8706C24.8925 23.8927 24.81 24.0807 24.7001 24.2963C24.5957 24.5119 24.4418 24.7938 24.3703 24.932C24.2933 25.0702 24.1504 25.319 24.0515 25.4848C23.9526 25.6507 23.7327 25.999 23.5623 26.2588C23.3919 26.5186 23.2325 26.7563 23.1995 26.7895C23.172 26.8227 23.1061 26.9111 23.0621 26.9774C23.0181 27.0438 22.8807 27.2262 22.7598 27.3865C22.6389 27.5468 22.5015 27.7127 22.4575 27.7624C22.4135 27.8067 22.2981 27.9449 22.2101 28.061C22.1222 28.1771 21.8968 28.4313 21.7155 28.6193C21.4626 28.8791 21.3527 28.9565 21.2483 28.9455C21.1713 28.9399 20.814 28.7133 20.4513 28.4424C20.0885 28.1771 19.7367 27.8951 19.6652 27.8232C19.5993 27.7569 19.5443 27.6574 19.5443 27.6132C19.5443 27.569 19.6213 27.4473 19.7147 27.3534C19.8082 27.2538 19.984 27.0493 20.1105 26.9C20.2369 26.7563 20.3853 26.5794 20.4458 26.5131C20.5007 26.4523 20.6381 26.2864 20.7481 26.1482C20.858 26.01 20.9789 25.8663 21.0174 25.8331C21.0504 25.7944 21.0834 25.7447 21.0834 25.7225C21.0834 25.6949 21.1273 25.6286 21.1768 25.5678C21.2318 25.5069 21.3802 25.2969 21.5121 25.0979C21.6385 24.8988 21.7704 24.6998 21.7979 24.6556C21.8309 24.6114 21.9573 24.4013 22.0892 24.1857C22.2156 23.9701 22.386 23.6771 22.4575 23.5223C22.529 23.3731 22.6004 23.2349 22.6224 23.2183C22.6389 23.2017 22.7708 22.9308 22.9082 22.6102C23.0511 22.2896 23.249 21.8086 23.3534 21.5322C23.4579 21.2558 23.5953 20.8467 23.6612 20.6201C23.7327 20.3934 23.8206 20.0672 23.8646 19.9014C23.9141 19.7355 23.969 19.5089 23.9965 19.4039C24.024 19.2988 24.057 19.1219 24.079 19.0169C24.0955 18.9118 24.123 18.7736 24.1284 18.7128C24.1394 18.652 24.1669 18.5138 24.1889 18.4088C24.2109 18.3038 24.2769 17.8781 24.3318 17.469C24.4088 16.8775 24.4253 16.4573 24.4088 15.4236C24.3923 14.7104 24.3703 14.036 24.3593 13.931C24.3428 13.8259 24.3153 13.638 24.2988 13.5164C24.2824 13.3947 24.2549 13.1847 24.2384 13.0465C24.2219 12.9083 24.1724 12.6097 24.1284 12.3831C24.079 12.1564 24.0185 11.88 23.991 11.775C23.9636 11.67 23.9361 11.5207 23.9306 11.4378C23.9251 11.3604 23.9526 11.2719 23.9965 11.2332C24.0405 11.1945 24.1285 11.1669 24.1999 11.1669ZM19.198 15.7332C19.7367 15.7387 20.3468 15.7608 20.5612 15.7774C20.7755 15.7995 21.0559 15.8271 21.1933 15.8382C21.3307 15.8492 21.5671 15.8769 21.7155 15.8935C21.8694 15.9156 22.0013 15.9432 22.0178 15.9488C22.0343 15.9598 22.1552 15.9819 22.2926 15.9985C22.43 16.0151 22.7488 16.0759 23.0072 16.1312C23.2655 16.192 23.5293 16.2639 23.6008 16.297C23.6667 16.3357 23.7217 16.3855 23.7217 16.4186C23.7217 16.4518 23.7272 16.5071 23.7327 16.5458C23.7382 16.579 23.7272 16.8001 23.6997 17.0267C23.6777 17.2534 23.6502 17.5519 23.6338 17.6901C23.6173 17.8283 23.5733 17.9886 23.5348 18.0495C23.4908 18.1103 23.3809 18.2429 23.2875 18.3424C23.1336 18.5028 23.0951 18.5138 22.8807 18.4862C22.7543 18.4696 22.5399 18.4309 22.4025 18.4033C22.2651 18.3701 22.0562 18.3369 21.9353 18.3203C21.8144 18.3093 21.655 18.2816 21.578 18.2651C21.5011 18.2485 21.3802 18.2264 21.3032 18.2153C21.2263 18.2042 20.9569 18.1821 20.6986 18.16C20.4403 18.1379 20.1434 18.1103 20.039 18.0992C19.9346 18.0882 19.4894 18.0771 19.0496 18.0716C18.6099 18.066 18.0657 18.0826 17.8404 18.1047C17.615 18.1269 17.3677 18.149 17.2907 18.16C17.2138 18.1655 16.9829 18.1932 16.7686 18.2153C16.5542 18.2374 16.2134 18.2927 15.999 18.3369C15.7847 18.3811 15.5648 18.4254 15.5043 18.442C15.4439 18.453 15.3175 18.4807 15.2295 18.4972C15.1416 18.5138 15.0536 18.5359 15.0371 18.547C15.0207 18.558 14.9272 18.5802 14.8283 18.5967C14.7348 18.6133 14.4105 18.7073 14.1137 18.7958C13.8224 18.8897 13.5366 18.9892 13.4816 19.0169C13.4321 19.0501 13.3552 19.0722 13.3167 19.0722C13.2837 19.0777 13.1518 19.1219 13.0309 19.1827C12.91 19.2435 12.789 19.2878 12.7561 19.2933C12.7231 19.2933 12.5582 19.3652 12.3823 19.4591C12.2119 19.5476 12.069 19.6139 12.069 19.5973C12.069 19.5808 11.8656 19.6747 11.6128 19.8074C11.3654 19.9401 10.9917 20.1446 10.7773 20.2607C10.5629 20.3768 10.1452 20.6366 9.84289 20.8412C9.54058 21.0402 9.09536 21.3498 8.85351 21.5322C8.61166 21.7091 8.3863 21.886 8.35332 21.9192C8.31485 21.9468 8.19392 22.0518 8.0785 22.1403C7.96857 22.2287 7.7597 22.4112 7.62228 22.5383C7.48487 22.6655 7.31448 22.8037 7.24302 22.8424C7.13859 22.9032 7.10561 22.9032 7.03965 22.8313C6.97919 22.765 6.9572 22.5162 6.9517 21.698C6.94071 20.8301 6.9517 20.5924 7.02866 20.3436C7.08912 20.1502 7.22103 19.929 7.38593 19.7411C7.55083 19.5421 7.89161 19.2767 8.34233 18.9782C8.73259 18.7239 9.06788 18.5193 9.10086 18.5193C9.13384 18.5193 9.15582 18.4862 9.15582 18.453C9.15582 18.4143 9.17231 18.3977 9.1943 18.4198C9.21628 18.442 9.29873 18.4143 9.37569 18.359C9.45264 18.3038 9.69998 18.16 9.92534 18.0439C10.1507 17.9278 10.3486 17.8117 10.3651 17.7841C10.3816 17.7565 10.4035 17.7399 10.42 17.7509C10.4365 17.7565 10.6344 17.6735 10.8598 17.5685C11.0851 17.4579 11.3819 17.3197 11.5193 17.2589C11.6568 17.1981 11.9646 17.071 12.2064 16.977C12.4483 16.883 12.8935 16.7282 13.1958 16.6342C13.4981 16.5403 13.9323 16.4131 14.1577 16.3523C14.3831 16.2915 14.6304 16.2307 14.7073 16.2196C14.7843 16.203 14.8558 16.1809 14.8722 16.1699C14.8887 16.1588 14.9877 16.1367 15.0921 16.1201C15.1965 16.098 15.4109 16.0593 15.5593 16.0317C15.7132 16.004 15.9221 15.9653 16.0265 15.9488C16.131 15.9322 16.3453 15.9045 16.4937 15.8879C16.6476 15.8714 16.829 15.8492 16.906 15.8382C16.9829 15.8216 17.3017 15.794 17.6205 15.7774C17.9393 15.7553 18.2032 15.7387 18.2087 15.7332C18.2197 15.7276 18.6649 15.7276 19.198 15.7332ZM27.998 17.9499C28.2619 18.0937 28.5862 18.2761 28.7236 18.359C28.861 18.442 29.0808 18.5802 29.2183 18.6631C29.3557 18.746 29.603 18.9174 29.7734 19.039C29.9438 19.1661 30.1362 19.3043 30.2076 19.3486C30.2736 19.3928 30.3615 19.4591 30.3945 19.4868C30.4275 19.5199 30.6034 19.6582 30.7848 19.7908C30.9662 19.929 31.1256 20.0506 31.1421 20.0672C31.1585 20.0838 31.3564 20.2552 31.5818 20.4487C31.8071 20.6477 32.3183 21.1286 32.7086 21.5267C33.0988 21.9247 33.5825 22.4499 33.7804 22.6931C33.9728 22.9364 34.1487 23.1464 34.1652 23.163C34.1817 23.1796 34.2916 23.3289 34.418 23.4947C34.5389 23.6605 34.7313 23.9314 34.8412 24.0917C34.9512 24.2465 35.1985 24.6335 35.3909 24.9486C35.5778 25.2582 35.8746 25.7889 36.045 26.1206C36.2154 26.4523 36.4517 26.9664 36.5727 27.2538C36.6936 27.5413 36.8805 28.0167 36.9849 28.3042C37.0893 28.5917 37.2652 29.1279 37.3697 29.4928C37.4796 29.8576 37.639 30.4934 37.7324 30.9024C37.8204 31.3115 37.9028 31.7372 37.9193 31.8422C37.9358 31.9473 37.9688 32.1463 37.9853 32.2845C38.0128 32.4503 38.0018 32.5775 37.9523 32.6714C37.9138 32.7488 37.8589 32.8373 37.8259 32.8705C37.7929 32.8981 37.6225 32.9921 37.4521 33.075C37.2762 33.1579 37.1278 33.2243 37.1223 33.2243C37.1113 33.2243 37.0069 33.263 36.886 33.3182C36.765 33.368 36.6551 33.4122 36.6386 33.4178C36.6221 33.4178 36.4023 33.4951 36.1439 33.5836C35.8856 33.672 35.6602 33.755 35.6382 33.7605C35.6108 33.7716 35.5888 33.7771 35.5833 33.7826C35.5723 33.7826 35.5283 33.7937 35.4843 33.8047C35.4404 33.8102 35.2645 33.86 35.0996 33.9098C34.9347 33.9595 34.7368 34.0093 34.6599 34.0258C34.5829 34.0424 34.484 34.0645 34.44 34.0811C34.396 34.0977 34.2971 34.1198 34.2201 34.1364C34.1432 34.153 34.0223 34.1751 33.9453 34.1917C33.8684 34.2083 33.7474 34.2304 33.6705 34.247C33.5935 34.2691 33.3847 34.3023 33.2033 34.3299C33.0219 34.3575 32.7635 34.3962 32.6261 34.4183C32.4887 34.4349 32.3183 34.457 32.2414 34.4681C32.1644 34.4847 31.8456 34.5123 31.5268 34.5344C31.208 34.5566 30.488 34.5787 29.9273 34.5787C28.9764 34.5787 28.894 34.5731 28.784 34.4681C28.7181 34.4073 28.6631 34.341 28.6686 34.3188C28.6686 34.2912 28.8115 34.1419 28.9874 33.9872C29.1578 33.8268 29.5371 33.4564 29.8229 33.1635C30.1087 32.8705 30.444 32.5664 30.5649 32.489C30.6858 32.4172 30.8947 32.3232 31.0321 32.2845C31.1695 32.2458 31.3289 32.2071 31.3894 32.2016C31.4499 32.1905 31.5983 32.1684 31.7192 32.1518C31.8401 32.1352 32.016 32.1076 32.104 32.091C32.1919 32.0744 32.4557 32.0247 32.6811 31.9804C32.9065 31.9362 33.588 31.7869 34.1926 31.6487C34.7973 31.5105 35.3249 31.3889 35.3634 31.3723C35.3964 31.3557 35.4294 31.3005 35.4294 31.2507C35.4294 31.1954 35.3689 30.9411 35.292 30.6813C35.215 30.4215 35.1381 30.1617 35.1271 30.1009C35.1106 30.04 35.0611 29.8687 35.0116 29.7139C34.9622 29.5646 34.8907 29.349 34.8522 29.244C34.8138 29.139 34.7038 28.8515 34.6049 28.6082C34.506 28.365 34.2751 27.8564 34.0937 27.475C33.9123 27.0935 33.654 26.596 33.5166 26.3693C33.3792 26.1427 33.1208 25.7336 32.9394 25.4572C32.758 25.1808 32.4173 24.7219 32.1919 24.4345C31.961 24.147 31.6038 23.7214 31.3894 23.5002C31.1805 23.2736 30.8562 22.9419 30.6749 22.7705C30.4935 22.5991 30.2681 22.3946 30.1802 22.3283C30.0922 22.2564 29.9658 22.1458 29.9053 22.085C29.8449 22.0242 29.4711 21.7367 29.0808 21.4493C28.6906 21.1618 28.2454 20.8467 28.097 20.7472C27.9431 20.6532 27.6957 20.4984 27.5418 20.41C27.3934 20.3215 27.212 20.1667 27.1461 20.0617C27.0801 19.9567 27.0251 19.7853 27.0251 19.6803C27.0251 19.5752 27.0471 19.3817 27.0746 19.2546C27.1076 19.1219 27.168 18.7626 27.212 18.453C27.278 18.0108 27.322 17.8615 27.4099 17.7896C27.5198 17.6957 27.5418 17.7012 27.998 17.9499ZM13.5531 19.6803C13.597 19.6803 13.663 19.7079 13.696 19.7466C13.7345 19.7853 13.8499 20.0783 13.9543 20.3989C14.0588 20.7196 14.2621 21.2779 14.405 21.6428C14.5479 22.0076 14.8393 22.6544 15.0591 23.0801C15.2735 23.5058 15.6857 24.2134 15.9771 24.6556C16.2684 25.0979 16.6366 25.6175 16.796 25.8165C16.9554 26.0155 17.2358 26.3472 17.4226 26.5573C17.604 26.7674 17.9173 27.1046 18.1152 27.3036C18.3131 27.5026 18.5879 27.768 18.7198 27.8896C18.8573 28.0112 19.0881 28.2102 19.2365 28.3318C19.3849 28.4535 19.5443 28.5917 19.5993 28.6359C19.6543 28.6801 19.7532 28.7575 19.8191 28.8017C19.8851 28.846 20.1379 29.0284 20.3743 29.2053C20.6107 29.3767 20.9459 29.6033 21.1108 29.7028C21.2757 29.7968 21.5341 29.9461 21.677 30.029C21.8199 30.1119 22.1662 30.2943 22.4465 30.4325C22.7213 30.5707 22.9797 30.6813 23.0072 30.6813C23.0346 30.6813 23.0621 30.709 23.0621 30.7366C23.0621 30.7642 23.1006 30.7919 23.1446 30.7919C23.1885 30.7919 23.271 30.814 23.326 30.8416C23.3754 30.8748 23.6283 30.9854 23.8866 31.0904C24.1449 31.201 24.4033 31.3005 24.4637 31.3115C24.5242 31.3226 24.6671 31.3723 24.7825 31.4221C24.8925 31.4718 24.9914 31.4995 25.0024 31.4884C25.0079 31.4774 25.1233 31.5161 25.2552 31.5824C25.3927 31.6487 25.5246 31.7482 25.5576 31.8035C25.6015 31.8643 25.6015 31.9251 25.5631 31.986C25.5356 32.0357 25.3377 32.1684 25.1233 32.2789C24.909 32.3895 24.7111 32.489 24.6836 32.5001C24.6561 32.5111 24.3538 32.6493 24.024 32.8097C23.6942 32.9644 23.3479 33.1248 23.2545 33.1579C23.1666 33.1966 23.0126 33.2187 22.9247 33.2022C22.8368 33.1911 22.463 33.0474 22.1002 32.876C21.7374 32.7101 21.1438 32.4061 20.781 32.2016C20.4183 31.997 20.072 31.8035 20.0115 31.7648C19.9511 31.7317 19.7147 31.5824 19.4894 31.4276C19.264 31.2784 18.8023 30.9467 18.4725 30.6979C18.1427 30.4547 17.8019 30.1893 17.725 30.1174C17.648 30.0511 17.4391 29.8687 17.2632 29.7139C17.0819 29.5646 16.6806 29.1776 16.3618 28.857C16.0375 28.5364 15.6637 28.1384 15.5263 27.9725C15.3889 27.8067 15.1251 27.4805 14.9492 27.2538C14.7678 27.0272 14.427 26.5573 14.1962 26.2201C13.9653 25.8773 13.7729 25.5843 13.7729 25.5678C13.7729 25.5512 13.729 25.4738 13.6685 25.3909C13.6135 25.3024 13.5091 25.1366 13.4431 25.0149C13.3717 24.8933 13.1353 24.429 12.9155 23.9812C12.6901 23.5279 12.5087 23.152 12.5087 23.1354C12.5087 23.1188 12.4428 22.964 12.3658 22.7926C12.2889 22.6157 12.1624 22.3117 12.0855 22.1127C12.014 21.9136 11.8821 21.5377 11.7942 21.2724C11.7007 21.0015 11.6293 20.7417 11.6293 20.6919C11.6293 20.6366 11.6897 20.5371 11.7667 20.4708C11.8436 20.3989 11.9041 20.3547 11.9041 20.3713C11.9041 20.3879 12.036 20.3326 12.1954 20.2497C12.3493 20.1667 12.4922 20.0949 12.5087 20.0949C12.5252 20.0949 12.5857 20.0617 12.6461 20.0285C12.7066 19.9954 12.7671 19.9677 12.7836 19.9677C12.8 19.9677 12.8715 19.9401 12.9484 19.9124C13.0254 19.8848 13.1738 19.8185 13.2782 19.7742C13.3827 19.73 13.5091 19.6858 13.5531 19.6803ZM3.23054 24.2686C3.25802 24.2686 3.31299 24.3073 3.35696 24.3516C3.40093 24.3958 3.43941 24.4677 3.4449 24.5063C3.4449 24.5395 3.4559 24.6114 3.46689 24.6556C3.47788 24.6998 3.49987 24.838 3.52186 24.9597C3.53835 25.0813 3.59331 25.319 3.63728 25.4848C3.68126 25.6507 3.7692 25.9271 3.83516 26.0929C3.91761 26.3196 3.94509 26.5297 3.94509 26.8945C3.94509 27.3091 3.91761 27.4639 3.78019 27.8343C3.69225 28.0775 3.53285 28.5143 3.42292 28.8017C3.31848 29.0892 3.20306 29.4375 3.16458 29.5757C3.1261 29.7139 3.03266 30.0124 2.96121 30.2391C2.88975 30.4657 2.8073 30.7311 2.77982 30.8195C2.74684 30.908 2.71386 31.0351 2.70287 31.0959C2.69188 31.1567 2.64241 31.306 2.60393 31.4276C2.54896 31.5879 2.54347 31.6653 2.58194 31.7095C2.61492 31.7372 2.80181 31.8091 2.99968 31.8643C3.19756 31.9196 3.40643 31.9749 3.46689 31.9915C3.52735 32.0025 3.62629 32.0247 3.68675 32.0357C3.74721 32.0523 3.90662 32.0855 4.04403 32.1186C4.18144 32.1573 4.34084 32.1905 4.40131 32.196C4.46177 32.2071 4.5717 32.2292 4.64865 32.2458C4.7256 32.2679 4.885 32.2955 5.00593 32.3066C5.12685 32.3232 5.28625 32.3453 5.3632 32.3619C5.44016 32.3785 5.61054 32.4006 5.74796 32.4172C5.88537 32.4337 6.25364 32.4614 6.57244 32.4835C6.89124 32.5056 7.45739 32.5222 7.83665 32.5222C8.21591 32.5167 8.69961 32.5001 8.90848 32.4835C9.12284 32.4669 9.40317 32.4393 9.54058 32.4227C9.678 32.4006 9.91435 32.3674 10.0628 32.3398C10.2167 32.3121 10.398 32.2734 10.475 32.2568C10.5519 32.2403 10.7004 32.2126 10.8048 32.2016C10.9092 32.1905 11.0466 32.1684 11.1071 32.1518C11.1676 32.1407 11.327 32.102 11.4644 32.0689C11.6018 32.0412 11.8162 31.9749 11.9481 31.9251C12.0745 31.8809 12.1789 31.8533 12.1789 31.8699C12.1789 31.8864 12.2669 31.8588 12.3713 31.8146C12.4757 31.7704 12.5637 31.7427 12.5637 31.7593C12.5637 31.7759 12.5967 31.7704 12.6351 31.7482C12.6681 31.7261 12.7176 31.6985 12.7451 31.693C12.7671 31.6819 12.789 31.6764 12.8 31.6709C12.8055 31.6709 12.8495 31.6598 12.8935 31.6487C12.9375 31.6377 13.1848 31.5548 13.4431 31.4553C13.7015 31.3613 13.9983 31.2452 14.1027 31.1954C14.2072 31.1457 14.5919 30.9632 14.9547 30.7863C15.3175 30.6094 15.7737 30.3717 15.9716 30.2612C16.1694 30.1506 16.3948 30.0622 16.4827 30.0677C16.5652 30.0677 16.6751 30.1064 16.7301 30.1451C16.785 30.1782 16.9609 30.322 17.1203 30.4602C17.2852 30.5984 17.4886 30.7753 17.5875 30.8582C17.681 30.9467 17.8734 31.107 18.0163 31.2175C18.1592 31.3336 18.2746 31.4663 18.2801 31.5105C18.2801 31.5548 18.2526 31.6377 18.2142 31.6874C18.1757 31.7372 17.8954 31.9086 17.593 32.0689C17.2907 32.2292 16.6751 32.5498 16.2189 32.782C15.7682 33.0142 15.1086 33.3238 14.7623 33.4675C14.416 33.6112 14.0917 33.7384 14.0478 33.7494C14.0038 33.7605 13.7674 33.8379 13.5256 33.9208C13.2837 33.9982 13.0474 34.0811 13.0034 34.0922C12.9594 34.1032 12.9155 34.1143 12.91 34.1143C12.899 34.1088 12.7945 34.1475 12.6736 34.1917C12.5527 34.2359 12.4538 34.2636 12.4538 34.247C12.4538 34.2304 12.3878 34.247 12.3054 34.2801C12.2174 34.3133 11.9316 34.3852 11.6568 34.4405C11.3874 34.4957 11.0741 34.5566 10.9697 34.5731C10.8653 34.5897 10.7168 34.6174 10.6399 34.6284C10.5629 34.645 10.3925 34.6671 10.2551 34.6892C10.1177 34.7113 9.93633 34.7335 9.84289 34.7445C9.75495 34.7556 9.38118 34.7832 9.01841 34.8053C8.65564 34.8274 8.04002 34.8495 7.64427 34.844C7.25401 34.844 6.62191 34.8274 6.24265 34.8053C5.86338 34.7887 5.50611 34.7611 5.44565 34.75C5.38519 34.739 5.2148 34.7113 5.06089 34.6948C4.91249 34.6726 4.71461 34.645 4.62117 34.6284C4.53322 34.6174 4.33535 34.5787 4.18144 34.551C4.03304 34.5234 3.83516 34.4847 3.74172 34.4681C3.65377 34.446 3.52735 34.4239 3.46689 34.4128C3.40643 34.4018 3.12061 34.3299 2.83479 34.2525C2.54896 34.1751 2.15321 34.0645 1.95534 34.0037C1.75746 33.9485 1.47714 33.8545 1.32323 33.7992C1.17483 33.7494 0.839535 33.6168 0.586693 33.5062C0.333852 33.3956 0.0920031 33.2574 0.0535272 33.1966C0.00405787 33.1192 -0.0124311 32.981 0.00955509 32.7544C0.0205482 32.5719 0.0425341 32.3619 0.0590237 32.2845C0.0700169 32.2071 0.119486 31.9141 0.163458 31.6377C0.212927 31.3557 0.300872 30.908 0.361335 30.6426C0.421797 30.3717 0.487755 30.1064 0.498748 30.0456C0.515238 29.9848 0.564707 29.7968 0.614176 29.631C0.669142 29.4651 0.76808 29.1555 0.834038 28.9399C0.905494 28.7243 1.00993 28.4148 1.07039 28.2489C1.13085 28.0831 1.31774 27.6187 1.48813 27.2262C1.65852 26.8337 1.90587 26.3085 2.03229 26.0653C2.16421 25.8221 2.31811 25.5401 2.37308 25.4351C2.42804 25.3356 2.59843 25.0592 2.74134 24.827C2.88975 24.5948 3.04915 24.3737 3.09862 24.3405C3.14809 24.3018 3.20855 24.2686 3.23054 24.2686ZM31.3509 24.733C31.3729 24.7496 31.4499 24.7772 31.5268 24.7938C31.6038 24.8104 31.6642 24.827 31.6697 24.838C31.6697 24.8436 31.9061 25.1863 32.1974 25.5954C32.4832 26.0045 32.7745 26.4302 32.8405 26.5352C32.901 26.6402 32.9559 26.8171 32.9559 26.9222C32.9559 27.0272 32.9065 27.2538 32.8405 27.4197C32.7745 27.5855 32.6866 27.8122 32.6426 27.9172C32.5986 28.0223 32.4722 28.2821 32.3678 28.4977C32.2634 28.7133 32.06 29.0892 31.9226 29.3435C31.7797 29.5978 31.6367 29.8466 31.6093 29.8963C31.5818 29.9516 31.4334 30.1782 31.2795 30.4049C31.1311 30.6316 30.9827 30.8527 30.9497 30.8914C30.9222 30.9301 30.8672 30.9909 30.8397 31.0296C30.8123 31.0683 30.6858 31.2231 30.5649 31.3723C30.4495 31.5271 30.3011 31.7095 30.2351 31.7814C30.1747 31.8588 29.8009 32.2458 29.4106 32.6383C29.0149 33.0363 28.6191 33.4233 28.5257 33.5007C28.4323 33.5781 28.2729 33.7052 28.1684 33.7881C28.064 33.8711 27.7617 34.0977 27.4868 34.2912C27.212 34.4847 26.8053 34.75 26.5799 34.8827C26.3546 35.0154 25.8599 35.2807 25.4806 35.4742C25.1013 35.6677 24.788 35.828 24.7825 35.8225C24.7715 35.8225 24.6836 35.8557 24.5902 35.8944C24.4912 35.9386 24.2494 36.027 24.0515 36.0989C23.8536 36.1652 23.6612 36.2316 23.6283 36.2426C23.5898 36.2537 23.5458 36.2592 23.5403 36.2537C23.5293 36.2426 23.4854 36.2648 23.4414 36.3035C23.3974 36.3366 23.2655 36.3808 23.1446 36.403C23.0236 36.4251 22.8917 36.4748 22.8532 36.508C22.8148 36.5412 22.7818 36.5522 22.7873 36.5301C22.7873 36.5025 22.6884 36.5246 22.5674 36.5688C22.4465 36.613 22.3366 36.6517 22.3201 36.6517C22.3036 36.6517 22.2266 36.6628 22.1442 36.6794C22.0562 36.6904 21.9133 36.7181 21.8254 36.7346C21.7374 36.7512 21.611 36.7733 21.5506 36.7844C21.4901 36.7955 21.3307 36.8231 21.1933 36.8452C21.0559 36.8618 20.8855 36.8894 20.8085 36.9005C20.7316 36.9115 20.4732 36.9392 20.2314 36.9613C19.9895 36.9834 19.3739 37 18.8573 37C18.3406 37 17.736 36.9834 17.5106 36.9613C17.2852 36.9392 17.0379 36.9171 16.9609 36.9005C16.884 36.8894 16.7246 36.8673 16.6037 36.8507C16.4827 36.8286 16.3233 36.8065 16.2464 36.7899C16.1694 36.7789 16.032 36.7512 15.9441 36.7291C15.8561 36.7125 15.7297 36.6904 15.6692 36.6794C15.6088 36.6683 15.312 36.5964 15.0097 36.5135C14.7073 36.4306 14.449 36.3587 14.4325 36.3477C14.416 36.3311 14.3556 36.3145 14.2951 36.2979C14.2346 36.2813 13.9983 36.2039 13.7729 36.121C13.5476 36.0436 13.1133 35.8667 12.811 35.7285C12.5087 35.5958 12.2064 35.4466 12.1405 35.4024C12.069 35.3637 12.014 35.2807 12.014 35.231C12.0085 35.1757 12.0415 35.0983 12.08 35.0651C12.1185 35.0264 12.2119 34.9822 12.2889 34.9656C12.3658 34.9491 12.5032 34.9159 12.5912 34.8827C12.6791 34.8495 12.8165 34.8164 12.8935 34.7998C12.9704 34.7832 13.1188 34.7445 13.2233 34.7113C13.3277 34.6782 13.4541 34.6395 13.4981 34.6229C13.5421 34.6008 13.5915 34.5842 13.608 34.5787C13.6245 34.5731 13.7345 34.5234 13.8554 34.4681C13.9763 34.4128 14.2456 34.341 14.46 34.3078C14.6744 34.2691 15.0042 34.247 15.202 34.258C15.3999 34.2636 15.6583 34.2801 15.7792 34.2967C15.9001 34.3133 16.076 34.341 16.1639 34.3575C16.2519 34.3741 16.5267 34.4294 16.7686 34.4792C17.0104 34.5289 17.2687 34.5731 17.3457 34.5842C17.4226 34.5952 17.6315 34.6229 17.8129 34.645C17.9943 34.6671 18.5 34.6892 18.9397 34.6892C19.3794 34.6892 19.9236 34.6671 20.1489 34.645C20.3743 34.6174 20.5722 34.5897 20.5887 34.5787C20.6052 34.5676 20.7481 34.5455 20.9075 34.5289C21.0614 34.5123 21.2098 34.4847 21.2373 34.4736C21.2592 34.457 21.3527 34.4349 21.4406 34.4183C21.5286 34.4018 21.666 34.3741 21.7429 34.3575C21.8199 34.3465 21.9848 34.2967 22.1167 34.247C22.2431 34.2028 22.3531 34.1696 22.3641 34.1751C22.3696 34.1806 22.5454 34.1254 22.7598 34.0535C22.9742 33.9761 23.1556 33.9153 23.172 33.9153C23.1885 33.9098 23.2985 33.8655 23.4194 33.8158C23.5403 33.7605 23.6393 33.7218 23.6393 33.7218C23.6393 33.7218 23.7272 33.6886 23.8316 33.6444C23.9361 33.6002 24.035 33.567 24.0515 33.567C24.068 33.567 24.2384 33.4786 24.4363 33.3735C24.6341 33.2685 24.9419 33.1026 25.1233 33.0031C25.3047 32.9036 25.7115 32.6493 26.0303 32.4337C26.3491 32.2181 26.6184 32.0302 26.6349 32.0136C26.6514 31.997 26.7613 31.903 26.8822 31.8146C27.0032 31.7206 27.3769 31.3723 27.7067 31.0406C28.042 30.709 28.3883 30.3441 28.4817 30.2391C28.5697 30.134 28.806 29.8244 29.0094 29.548C29.2073 29.2716 29.3997 28.9897 29.4381 28.9123C29.4766 28.8349 29.5261 28.763 29.5481 28.7465C29.5645 28.7299 29.7459 28.4203 29.9438 28.0554C30.1417 27.6906 30.378 27.2207 30.4715 27.0051C30.5649 26.7895 30.7683 26.2311 30.9222 25.7612C31.0761 25.2913 31.23 24.8602 31.263 24.8049C31.2905 24.7496 31.3344 24.7219 31.3509 24.733Z"
1284
+ fill="white"
1285
+ />
1286
+ </svg>
1287
+ </div>
1288
+ </header>`}function G1(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>navigator.userAgent.match(e))}var K1=ro`
1289
+ :host {
1290
+ --primary-color: #fff;
1291
+ --heading-color: #fff;
1292
+ --body-color: #a7a7a7;
1293
+ --success-color: #52d652;
1294
+ --background-color: #000;
1295
+ --start-color: #a4adff;
1296
+ --end-color: #d273ff;
1297
+ --gradient: linear-gradient(90deg, var(--start-color), var(--end-color));
1298
+ }
1299
+
1300
+ .wrapper {
1301
+ font-family: "DM Sans", Helvetica, Arial, sans-serif;
1302
+ position: fixed;
1303
+ display: grid;
1304
+ place-content: center;
1305
+ top: 0;
1306
+ left: 0;
1307
+ color: var(--body-color);
1308
+ height: 100vh;
1309
+ width: 100vw;
1310
+ }
1311
+
1312
+ * {
1313
+ box-sizing: border-box;
1314
+ }
1315
+
1316
+ .check-list {
1317
+ list-style: none;
1318
+ margin: 0;
1319
+ padding: 0;
1320
+ }
1321
+
1322
+ .check-list li {
1323
+ display: flex;
1324
+ gap: 10px;
1325
+ margin-bottom: 10px;
1326
+ }
1327
+
1328
+ .items {
1329
+ display: flex;
1330
+ flex-direction: column;
1331
+ flex-gap: 50px;
1332
+ gap: 50px;
1333
+ }
1334
+
1335
+ .items--small {
1336
+ flex-gap: 20px;
1337
+ gap: 20px;
1338
+ }
1339
+
1340
+ .button {
1341
+ text-decoration: none;
1342
+ cursor: pointer;
1343
+ border: 0;
1344
+ color: var(--background-color);
1345
+ background: var(--gradient);
1346
+ height: 50px;
1347
+ font-weight: 600;
1348
+ min-width: 100px;
1349
+ padding: 0px 30px;
1350
+ border-radius: 8px;
1351
+ display: inline-flex;
1352
+ align-items: center;
1353
+ justify-content: center;
1354
+ text-align: center;
1355
+ font-family: inherit;
1356
+ font-size: 15px;
1357
+ }
1358
+
1359
+ @media (min-width: 800px) {
1360
+ .button {
1361
+ min-width: 200px;
1362
+ padding: 0px 40px;
1363
+ font-size: 17px;
1364
+ }
1365
+ }
1366
+
1367
+ .heading {
1368
+ color: var(--heading-color);
1369
+ font-size: 18px;
1370
+ font-weight: 600;
1371
+ margin: 0;
1372
+ margin-bottom: 10px;
1373
+ }
1374
+
1375
+ .heading.nomargin {
1376
+ margin: 0;
1377
+ }
1378
+
1379
+ .body {
1380
+ padding: 0;
1381
+ margin: 0;
1382
+ font-size: 14px;
1383
+ line-height: 1.5;
1384
+ }
1385
+
1386
+ .buttons {
1387
+ display: flex;
1388
+ align-items: center;
1389
+ justify-content: center;
1390
+ flex-gap: 10px;
1391
+ gap: 10px;
1392
+ }
1393
+
1394
+ .button--full {
1395
+ width: 100%;
1396
+ display: flex;
1397
+ }
1398
+
1399
+ .button--link {
1400
+ padding: 0;
1401
+ height: auto;
1402
+ background: none;
1403
+ color: var(--primary-color);
1404
+ font-size: inherit;
1405
+ min-width: auto;
1406
+ text-decoration: none;
1407
+ }
1408
+
1409
+ .button--link:hover {
1410
+ text-decoration: underline;
1411
+ }
1412
+
1413
+ .button--secondary {
1414
+ background: var(--background-color);
1415
+ border: 1px solid var(--primary-color);
1416
+ color: var(--primary-color);
1417
+ }
1418
+
1419
+ .dialog {
1420
+ background-color: var(--background-color);
1421
+ z-index: 10;
1422
+ border-radius: 8px;
1423
+ width: calc(100vw - 10px);
1424
+ max-width: 500px;
1425
+ max-height: 90vh;
1426
+ overflow-y: auto;
1427
+ }
1428
+
1429
+ .dialog__header {
1430
+ display: flex;
1431
+ align-items: center;
1432
+ justify-content: center;
1433
+ padding: 20px 30px;
1434
+ gap: 10px;
1435
+ color: var(--primary-color);
1436
+ margin-bottom: 20px;
1437
+ font-size: 14px;
1438
+ }
1439
+
1440
+ .dialog__logo {
1441
+ display: flex;
1442
+ text-align: center;
1443
+ width: 25px;
1444
+ }
1445
+
1446
+ .dialog__content {
1447
+ min-height: 300px;
1448
+ display: grid;
1449
+ place-content: center;
1450
+ padding-top: 0;
1451
+ padding-left: 30px;
1452
+ padding-right: 30px;
1453
+ padding-bottom: 30px;
1454
+ }
1455
+
1456
+ .dialog__connect {
1457
+ display: flex;
1458
+ justify-content: center;
1459
+ align-items: center;
1460
+ flex-gap: 50px;
1461
+ gap: 50px;
1462
+ position: relative;
1463
+ }
1464
+
1465
+ .dialog__logo svg {
1466
+ width: 100%;
1467
+ }
1468
+
1469
+ .dialog__connect-ad4m {
1470
+ width: 80px;
1471
+ height: 80px;
1472
+ background: var(--background-color);
1473
+ padding: 20px;
1474
+ box-shadow: 0px 4px 7px 0px rgb(0 0 0 / 8%);
1475
+ border-radius: 50%;
1476
+ position: relative;
1477
+ }
1478
+
1479
+ .dialog__connect-ad4m:before {
1480
+ content: "";
1481
+ position: absolute;
1482
+ top: 0;
1483
+ right: 0;
1484
+ bottom: 0;
1485
+ left: 0;
1486
+ z-index: -1;
1487
+ margin: -2px;
1488
+ border-radius: inherit;
1489
+ background: var(--gradient);
1490
+ }
1491
+
1492
+ .dialog__connect-app {
1493
+ width: 80px;
1494
+ height: 80px;
1495
+ }
1496
+
1497
+ .dialog__connect-check:before {
1498
+ content: "";
1499
+ display: block;
1500
+ width: 40px;
1501
+ border-bottom: 2px dashed var(--body-color);
1502
+ position: absolute;
1503
+ left: 50%;
1504
+ top: 50%;
1505
+ transform: translateY(-50%) translateX(-50%);
1506
+ }
1507
+
1508
+ .dialog__connect-check svg {
1509
+ position: relative;
1510
+ }
1511
+
1512
+ .text-center {
1513
+ text-align: center;
1514
+ }
1515
+
1516
+ .uppercase {
1517
+ text-transform: uppercase;
1518
+ }
1519
+
1520
+ .input {
1521
+ display: flex;
1522
+ flex-direction: column;
1523
+ flex-gap: 10px;
1524
+ gap: 10px;
1525
+ }
1526
+
1527
+ .input__label {
1528
+ font-size: 12px;
1529
+ }
1530
+
1531
+ .input__field {
1532
+ border-radius: 8px;
1533
+ outline: 0;
1534
+ height: 60px;
1535
+ color: var(--heading-color);
1536
+ background-color: var(--background-color);
1537
+ padding: 0px 30px;
1538
+ font-size: 20px;
1539
+ border: 1px solid var(--body-color);
1540
+ }
1541
+
1542
+ .input__field:focus {
1543
+ border: 1px solid var(--primary-color);
1544
+ box-shadow: 0px 0px 0px 1px var(--primary-color);
1545
+ }
1546
+
1547
+ .ad4mConnect__backdrop {
1548
+ position: absolute;
1549
+ top: 0;
1550
+ left: 0;
1551
+ height: 100vh;
1552
+ width: 100vw;
1553
+ background-color: rgba(0, 0, 0, 0.5);
1554
+ }
1555
+
1556
+ .ad4mConnect__locked {
1557
+ position: fixed;
1558
+ top: 0;
1559
+ left: 0;
1560
+ background: linear-gradient(
1561
+ 90deg,
1562
+ rgba(2, 0, 36, 1) 0%,
1563
+ rgba(38, 3, 23, 1) 41%,
1564
+ rgba(51, 4, 31, 1) 100%
1565
+ );
1566
+ height: 100vh;
1567
+ width: 100vw;
1568
+ padding: 36px;
1569
+ display: flex;
1570
+ align-items: center;
1571
+ flex-direction: column;
1572
+ font-family: "Comfortaa", cursive;
1573
+ }
1574
+
1575
+ .lds-ring {
1576
+ display: block;
1577
+ position: relative;
1578
+ width: 80px;
1579
+ height: 80px;
1580
+ margin: 0 auto;
1581
+ margin-top: 24px;
1582
+ }
1583
+ .lds-ring div {
1584
+ box-sizing: border-box;
1585
+ display: block;
1586
+ position: absolute;
1587
+ width: 64px;
1588
+ height: 64px;
1589
+ margin: 4px;
1590
+ border: 4px solid var(--primary-color);
1591
+ border-radius: 50%;
1592
+ animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
1593
+ border-color: var(--primary-color) transparent transparent transparent;
1594
+ }
1595
+ .lds-ring div:nth-child(1) {
1596
+ animation-delay: -0.45s;
1597
+ }
1598
+ .lds-ring div:nth-child(2) {
1599
+ animation-delay: -0.3s;
1600
+ }
1601
+ .lds-ring div:nth-child(3) {
1602
+ animation-delay: -0.15s;
1603
+ }
1604
+ @keyframes lds-ring {
1605
+ 0% {
1606
+ transform: rotate(0deg);
1607
+ }
1608
+ 100% {
1609
+ transform: rotate(360deg);
1610
+ }
1611
+ }
1612
+
1613
+ .disconnected {
1614
+ position: fixed;
1615
+ top: 0;
1616
+ left: 0;
1617
+ width: 100vw;
1618
+ padding: 10px 0;
1619
+ text-align: center;
1620
+ background: red;
1621
+ }
1622
+
1623
+ .qr-scanner {
1624
+ background: black;
1625
+ position: fixed;
1626
+ left: 0;
1627
+ top: 0;
1628
+ width: 100%;
1629
+ height: 100%;
1630
+ display: grid;
1631
+ grid-template-columns: 1fr;
1632
+ place-content: center;
1633
+ }
1634
+
1635
+ .qr-scanner .stop {
1636
+ position: absolute;
1637
+ z-index: 10;
1638
+ left: 50%;
1639
+ bottom: 10px;
1640
+ transform: translateX(-50%);
1641
+ }
1642
+
1643
+ .qr-scanner video {
1644
+ height: 100vh;
1645
+ width: 100vw;
1646
+ object-fit: cover;
1647
+ }
1648
+ `,Ee=class extends Bt{constructor(){super(...arguments);this._code=null;this._isMobile=null;this._hasClickedDownload=null;this._isRemote=!1;this._isOpen=!1;this.uiState="start";this.appName=null;this.appDesc=null;this.appDomain=null;this.appIconPath=null;this.capabilities=[];this.token=Kr("ad4murl")||"";this.port=parseInt(Kr("ad4mport"))||12e3;this.url=Kr("ad4murl")||""}get authState(){return this._client.authState}get connectionState(){return this._client.connectionState}connectedCallback(){super.connectedCallback(),xi(this),this._isMobile=G1(),this._client=new Oi({appName:this.appName,appDesc:this.appDesc,appDomain:this.appDomain,appUrl:window.location.origin,appIconPath:this.appIconPath,capabilities:Array.isArray(this.capabilities)?this.capabilities:JSON.parse(this.capabilities),port:this.port||parseInt(Kr("ad4mport"))||12e3,token:this.token||Kr("ad4mtoken"),url:this.url||Kr("ad4murl")}),this._client.on("configstatechange",this.handleConfigChange),this._client.on("authstatechange",this.handleAuthChange),this._client.on("connectionstatechange",this.handleConnectionChange),this.loadFont()}unlockAgent(t,n=!0){return ye(this,null,function*(){yield this._client.ad4mClient.agent.unlock(t,n)})}verifyCode(t){this._client.verifyCode(t)}changeUrl(t){this._client.setUrl(t)}changePort(t){this._client.setPort(t)}changeUIState(t){this.uiState=t}changeIsRemote(t){this._isRemote=t}changeCode(t){this._code=t}onDownloaded(){this._hasClickedDownload=!0}handleAuthChange(t){let n=new CustomEvent("authstatechange",{detail:t});t==="locked"&&(this._isOpen=!0),this.dispatchEvent(n),this.requestUpdate()}handleConfigChange(t,n){this[t]=n,n?xf("ad4m"+t,n):Of("ad4m"+t),this.requestUpdate()}handleConnectionChange(t){t==="connected"&&this.changeUIState("requestcap"),t==="disconnected"&&(this._isOpen=!0),t==="not_connected"&&this.changeUIState("start");let n=new CustomEvent("connectionstatechange",{detail:t});this.dispatchEvent(n),this.requestUpdate()}loadFont(){let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.crossOrigin="anonymous",t.href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap",document.head.appendChild(t)}startCamera(t){return ye(this,null,function*(){try{window.BarcodeDetector.getSupportedFormats()}catch(n){window.BarcodeDetector=Qt}yield this.changeUIState("qr"),setTimeout(()=>ye(this,null,function*(){let n=this.shadowRoot.querySelector("video");if(!n)return;let i=yield navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:"environment"}});n.srcObject=i,n.autoplay=!0}),100)})}connect(){return ye(this,null,function*(){return this._isOpen=!0,this.requestUpdate(),yield this._client.connect()})}getAd4mClient(){return this._client.ad4mClient}connectRemote(t){return ye(this,null,function*(){try{let n=yield this._client.connect(t);return this.changeUIState("requestcap"),n}catch(n){n.message==="Socket closed with event 4500 Invalid Compact JWS"&&this.changeUIState("requestcap")}})}requestCapability(t){return ye(this,null,function*(){try{yield this._client.requestCapability(t),this.changeUIState("verifycode")}catch(n){console.warn(n)}})}isAuthenticated(){return ye(this,null,function*(){return this._client.checkAuth()})}setOpen(t){this._isOpen=t}renderViews(){if(this.connectionState==="connecting")return lc();if(this.uiState==="qr")return bc({changeState:this.changeUIState,onSuccess:t=>this._client.connect(t),uiState:this.uiState});if(this.authState==="locked")return hc({unlockAgent:this.unlockAgent,reconnect:this.connect});if(this.uiState==="settings")return fc({port:this.port,changePort:this.changePort,isRemote:this._isRemote,changeIsRemote:this.changeIsRemote,url:this.url,changeState:this.changeUIState,changeUrl:this.changeUrl,connectToPort:this._client.connectToPort,connectRemote:this.connectRemote});if(this.connectionState==="not_connected")return pc({scanQrcode:this.startCamera,connect:this.connect,isMobile:this._isMobile,hasClickedDownload:this._hasClickedDownload,onDownloaded:this.onDownloaded,changeState:this.changeUIState});if(this.connectionState==="connected")return this.uiState==="verifycode"?gc({code:this._code,changeCode:this.changeCode,changeState:this.changeUIState,verifyCode:this.verifyCode}):yc({changeState:this.changeUIState,requestCapability:this.requestCapability,capabilities:this.capabilities,appname:this.appName,setOpen:this.setOpen,appiconpath:this.appIconPath});if(this.connectionState==="disconnected")return dc({reconnect:this.connect});if(this.connectionState==="port_not_found")return vc()}render(){return this._isOpen===!1||this.authState==="authenticated"?null:Y`
1649
+ <div class="wrapper">
1650
+ <div class="dialog">
1651
+ ${Cc()}
1652
+ <main class="dialog__content">${this.renderViews()}</main>
1653
+ </div>
1654
+ <div class="ad4mConnect__backdrop" />
1655
+ </div>
1656
+ `}};Ee.styles=[K1],Pe([Vt()],Ee.prototype,"_code",2),Pe([Vt()],Ee.prototype,"_isMobile",2),Pe([Vt()],Ee.prototype,"_hasClickedDownload",2),Pe([Vt()],Ee.prototype,"_isRemote",2),Pe([Vt()],Ee.prototype,"_client",2),Pe([Vt()],Ee.prototype,"_isOpen",2),Pe([Vt()],Ee.prototype,"uiState",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"appName",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"appDesc",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"appDomain",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"appIconPath",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"capabilities",2),Pe([ft({type:String})],Ee.prototype,"token",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"port",2),Pe([ft({type:String,reflect:!0})],Ee.prototype,"url",2),Ee=Pe([Uc("ad4m-connect")],Ee);function z1(r){let e=new Ee;return Object.entries(r).forEach(([t,n])=>{e[t]=n}),document.body.appendChild(e),e}export{Ee as Ad4mConnectElement,z1 as default,Q1 as getAd4mClient};
1657
+ /*!
1658
+ * @undecaf/barcode-detector-polyfill v0.9.20
1659
+ * A WebAssembly polyfill for the Barcode Detection API
1660
+ * Built 2023-07-29T22:09:21.713Z
1661
+ * (c) 2021-present Ferdinand Kasper <fkasper@modus-operandi.at>
1662
+ * Released under the MIT license.
1663
+ *
1664
+ * This work uses https://github.com/undecaf/zbar-wasm.git as per
1665
+ * LGPL-2.1 section 6 (https://opensource.org/licenses/LGPL-2.1).
1666
+ */
1667
+ /*! *****************************************************************************
1668
+ Copyright (c) Microsoft Corporation.
1669
+
1670
+ Permission to use, copy, modify, and/or distribute this software for any
1671
+ purpose with or without fee is hereby granted.
1672
+
1673
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1674
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1675
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1676
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1677
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1678
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1679
+ PERFORMANCE OF THIS SOFTWARE.
1680
+ ***************************************************************************** */
1681
+ /**
1682
+ * @license
1683
+ * Copyright 2017 Google LLC
1684
+ * SPDX-License-Identifier: BSD-3-Clause
1685
+ */
1686
+ /**
1687
+ * @license
1688
+ * Copyright 2019 Google LLC
1689
+ * SPDX-License-Identifier: BSD-3-Clause
1690
+ */
1691
+ /**
1692
+ * @license
1693
+ * Copyright 2021 Google LLC
1694
+ * SPDX-License-Identifier: BSD-3-Clause
1695
+ */
1696
+ /**
1697
+ * @license
1698
+ * Copyright 2022 Google LLC
1699
+ * SPDX-License-Identifier: BSD-3-Clause
1700
+ */
1701
+ //! @fayeed - make it support node.js