1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[632],{9414:(e,t,i)=>{var n,o,a,r,s,c,l,d,u,p,h;function f(e,t,i,n){return new(i||(i=Promise))(function(o,a){function r(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(r,s)}c((n=n.apply(e,t||[])).next())})}i.d(t,{ID:()=>S,Kj:()=>g,Lv:()=>b,gD:()=>y});class m{constructor(e,t,i){this.method=e,this.attribute=t,void 0!==i&&(Array.isArray(i)?this.values=i:this.values=[i])}toString(){return JSON.stringify({method:this.method,attribute:this.attribute,values:this.values})}}m.equal=(e,t)=>new m("equal",e,t).toString(),m.notEqual=(e,t)=>new m("notEqual",e,t).toString(),m.lessThan=(e,t)=>new m("lessThan",e,t).toString(),m.lessThanEqual=(e,t)=>new m("lessThanEqual",e,t).toString(),m.greaterThan=(e,t)=>new m("greaterThan",e,t).toString(),m.greaterThanEqual=(e,t)=>new m("greaterThanEqual",e,t).toString(),m.isNull=e=>new m("isNull",e).toString(),m.isNotNull=e=>new m("isNotNull",e).toString(),m.between=(e,t,i)=>new m("between",e,[t,i]).toString(),m.startsWith=(e,t)=>new m("startsWith",e,t).toString(),m.endsWith=(e,t)=>new m("endsWith",e,t).toString(),m.select=e=>new m("select",void 0,e).toString(),m.search=(e,t)=>new m("search",e,t).toString(),m.orderDesc=e=>new m("orderDesc",e).toString(),m.orderAsc=e=>new m("orderAsc",e).toString(),m.cursorAfter=e=>new m("cursorAfter",void 0,e).toString(),m.cursorBefore=e=>new m("cursorBefore",void 0,e).toString(),m.limit=e=>new m("limit",void 0,e).toString(),m.offset=e=>new m("offset",void 0,e).toString(),m.contains=(e,t)=>new m("contains",e,t).toString(),m.or=e=>new m("or",void 0,e.map(e=>JSON.parse(e))).toString(),m.and=e=>new m("and",void 0,e.map(e=>JSON.parse(e))).toString();class v extends Error{constructor(e,t=0,i="",n=""){super(e),this.name="AppwriteException",this.message=e,this.code=t,this.type=i,this.response=n}}class g{constructor(){this.config={endpoint:"https://cloud.appwrite.io/v1",endpointRealtime:"",project:"",jwt:"",locale:"",session:""},this.headers={"x-sdk-name":"Web","x-sdk-platform":"client","x-sdk-language":"web","x-sdk-version":"16.1.0","X-Appwrite-Response-Format":"1.6.0"},this.realtime={socket:void 0,timeout:void 0,heartbeat:void 0,url:"",channels:new Set,subscriptions:new Map,subscriptionsCounter:0,reconnect:!0,reconnectAttempts:0,lastMessage:void 0,connect:()=>{clearTimeout(this.realtime.timeout),this.realtime.timeout=null==window?void 0:window.setTimeout(()=>{this.realtime.createSocket()},50)},getTimeout:()=>{switch(!0){case this.realtime.reconnectAttempts<5:return 1e3;case this.realtime.reconnectAttempts<15:return 5e3;case this.realtime.reconnectAttempts<100:return 1e4;default:return 6e4}},createHeartbeat:()=>{this.realtime.heartbeat&&clearTimeout(this.realtime.heartbeat),this.realtime.heartbeat=null==window?void 0:window.setInterval(()=>{var e;null===(e=this.realtime.socket)||void 0===e||e.send(JSON.stringify({type:"ping"}))},2e4)},createSocket:()=>{var e,t,i;if(this.realtime.channels.size<1){this.realtime.reconnect=!1,null===(e=this.realtime.socket)||void 0===e||e.close();return}let n=new URLSearchParams;n.set("project",this.config.project),this.realtime.channels.forEach(e=>{n.append("channels[]",e)});let o=this.config.endpointRealtime+"/realtime?"+n.toString();(o!==this.realtime.url||!this.realtime.socket||(null===(t=this.realtime.socket)||void 0===t?void 0:t.readyState)>WebSocket.OPEN)&&(this.realtime.socket&&(null===(i=this.realtime.socket)||void 0===i?void 0:i.readyState)<WebSocket.CLOSING&&(this.realtime.reconnect=!1,this.realtime.socket.close()),this.realtime.url=o,this.realtime.socket=new WebSocket(o),this.realtime.socket.addEventListener("message",this.realtime.onMessage),this.realtime.socket.addEventListener("open",e=>{this.realtime.reconnectAttempts=0,this.realtime.createHeartbeat()}),this.realtime.socket.addEventListener("close",e=>{var t,i,n;if(!this.realtime.reconnect||(null===(i=null===(t=this.realtime)||void 0===t?void 0:t.lastMessage)||void 0===i?void 0:i.type)==="error"&&1008===(null===(n=this.realtime)||void 0===n?void 0:n.lastMessage.data).code){this.realtime.reconnect=!0;return}let o=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${o/1e3} seconds.`,e.reason),setTimeout(()=>{this.realtime.reconnectAttempts++,this.realtime.createSocket()},o)}))},onMessage:e=>{var t,i;try{let n=JSON.parse(e.data);switch(this.realtime.lastMessage=n,n.type){case"connected":let o=JSON.parse(null!==(t=window.localStorage.getItem("cookieFallback"))&&void 0!==t?t:"{}"),a=null==o?void 0:o[`a_session_${this.config.project}`],r=n.data;a&&!r.user&&(null===(i=this.realtime.socket)||void 0===i||i.send(JSON.stringify({type:"authentication",data:{session:a}})));break;case"event":let s=n.data;if(null==s?void 0:s.channels){if(!s.channels.some(e=>this.realtime.channels.has(e)))return;
1this.realtime.subscriptions.forEach(e=>{s.channels.some(t=>e.channels.includes(t))&&setTimeout(()=>e.callback(s))})}break;case"error":throw n.data}}catch(e){console.error(e)}},cleanUp:e=>{this.realtime.channels.forEach(t=>{e.includes(t)&&!Array.from(this.realtime.subscriptions).some(([e,i])=>i.channels.includes(t))&&this.realtime.channels.delete(t)})}}}setEndpoint(e){return this.config.endpoint=e,this.config.endpointRealtime=this.config.endpointRealtime||this.config.endpoint.replace("https://","wss://").replace("http://","ws://"),this}setEndpointRealtime(e){return this.config.endpointRealtime=e,this}setProject(e){return this.headers["X-Appwrite-Project"]=e,this.config.project=e,this}setJWT(e){return this.headers["X-Appwrite-JWT"]=e,this.config.jwt=e,this}setLocale(e){return this.headers["X-Appwrite-Locale"]=e,this.config.locale=e,this}setSession(e){return this.headers["X-Appwrite-Session"]=e,this.config.session=e,this}subscribe(e,t){let i="string"==typeof e?[e]:e;i.forEach(e=>this.realtime.channels.add(e));let n=this.realtime.subscriptionsCounter++;return this.realtime.subscriptions.set(n,{channels:i,callback:t}),this.realtime.connect(),()=>{this.realtime.subscriptions.delete(n),this.realtime.cleanUp(i),this.realtime.connect()}}prepareRequest(e,t,i={},n={}){if(e=e.toUpperCase(),i=Object.assign({},this.headers,i),"undefined"!=typeof window&&window.localStorage){let e=window.localStorage.getItem("cookieFallback");e&&(i["X-Fallback-Cookies"]=e)}let o={method:e,headers:i,credentials:"include"};if("GET"===e)for(let[e,i]of Object.entries(g.flatten(n)))t.searchParams.append(e,i);else switch(i["content-type"]){case"application/json":o.body=JSON.stringify(n);break;case"multipart/form-data":let a=new FormData;for(let[e,t]of Object.entries(n))if(t instanceof File)a.append(e,t,t.name);else if(Array.isArray(t))for(let i of t)a.append(`${e}[]`,i);else a.append(e,t);o.body=a,delete i["content-type"]}return{uri:t.toString(),options:o}}chunkedUpload(e,t,i={},n={},o){return f(this,void 0,void 0,function*(){let a=Object.values(n).find(e=>e instanceof File);if(a.size<=g.CHUNK_SIZE)return yield this.call(e,t,i,n);let r=0,s=null;for(;r<a.size;){let c=r+g.CHUNK_SIZE;c>=a.size&&(c=a.size),i["content-range"]=`bytes ${r}-${c-1}/${a.size}`;let l=a.slice(r,c),d=Object.assign(Object.assign({},n),{file:new File([l],a.name)});s=yield this.call(e,t,i,d),o&&"function"==typeof o&&o({$id:s.$id,progress:Math.round(c/a.size*100),sizeUploaded:c,chunksTotal:Math.ceil(a.size/g.CHUNK_SIZE),chunksUploaded:Math.ceil(c/g.CHUNK_SIZE)}),s&&s.$id&&(i["x-appwrite-id"]=s.$id),r=c}return s})}ping(){return f(this,void 0,void 0,function*(){return this.call("GET",new URL(this.config.endpoint+"/ping"))})}call(e,t,i={},n={},o="json"){var a;return f(this,void 0,void 0,function*(){let{uri:r,options:s}=this.prepareRequest(e,t,i,n),c=null,l=yield fetch(r,s),d=l.headers.get("x-appwrite-warning");if(d&&d.split(";").forEach(e=>console.warn("Warning: "+e)),c=(null===(a=l.headers.get("content-type"))||void 0===a?void 0:a.includes("application/json"))?yield l.json():"arrayBuffer"===o?yield l.arrayBuffer():{message:yield l.text()},400<=l.status)throw new v(null==c?void 0:c.message,l.status,null==c?void 0:c.type,c);let u=l.headers.get("X-Fallback-Cookies");return"undefined"!=typeof window&&window.localStorage&&u&&(window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."),window.localStorage.setItem("cookieFallback",u)),c})}static flatten(e,t=""){let i={};for(let[n,o]of Object.entries(e)){let e=t?t+"["+n+"]":n;Array.isArray(o)?i=Object.assign(Object.assign({},i),g.flatten(o,e)):i[e]=o}return i}}g.CHUNK_SIZE=5242880;class w{constructor(e){this.client=e}static flatten(e,t=""){let i={};for(let[n,o]of Object.entries(e)){let e=t?t+"["+n+"]":n;Array.isArray(o)?i=Object.assign(Object.assign({},i),w.flatten(o,e)):i[e]=o}return i}}w.CHUNK_SIZE=5242880;class y{constructor(e){this.client=e}get(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}create(e,t,i,n){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "email"');if(void 0===i)throw new v('Missing required parameter: "password"');let o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.password=i),void 0!==n&&(o.name=n);let a=new URL(this.client.config.endpoint+"/account");return yield this.client.call("post",a,{"content-type":"application/json"},o)})}updateEmail(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "email"');if(void 0===t)throw new v('Missing required parameter: "password"');let i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);let n=new URL(this.client.config.endpoint+"/account/email");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}listIdentities(e){return f(this,void 0,void 0,function*(){let t={};void 0!==e&&(t.queries=e);let i=new URL(this.client.config.endpoint+"/account/identities");return yield this.client.call("get",i,{"content-type":"application/json"},t)})}deleteIdentity(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "identityId"');let t="/account/identities/{identityId}".replace("{identityId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}
1createJWT(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/jwts");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}listLogs(e){return f(this,void 0,void 0,function*(){let t={};void 0!==e&&(t.queries=e);let i=new URL(this.client.config.endpoint+"/account/logs");return yield this.client.call("get",i,{"content-type":"application/json"},t)})}updateMFA(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "mfa"');let t={};void 0!==e&&(t.mfa=e);let i=new URL(this.client.config.endpoint+"/account/mfa");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}createMfaAuthenticator(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "type"');let t="/account/mfa/authenticators/{type}".replace("{type}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("post",i,{"content-type":"application/json"},{})})}updateMfaAuthenticator(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "type"');if(void 0===t)throw new v('Missing required parameter: "otp"');let i="/account/mfa/authenticators/{type}".replace("{type}",e),n={};void 0!==t&&(n.otp=t);let o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}deleteMfaAuthenticator(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "type"');let t="/account/mfa/authenticators/{type}".replace("{type}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}createMfaChallenge(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "factor"');let t={};void 0!==e&&(t.factor=e);let i=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("post",i,{"content-type":"application/json"},t)})}updateMfaChallenge(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "challengeId"');if(void 0===t)throw new v('Missing required parameter: "otp"');let i={};void 0!==e&&(i.challengeId=e),void 0!==t&&(i.otp=t);let n=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}listMfaFactors(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/mfa/factors");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}getMfaRecoveryCodes(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}createMfaRecoveryCodes(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}updateMfaRecoveryCodes(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("patch",e,{"content-type":"application/json"},{})})}updateName(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "name"');let t={};void 0!==e&&(t.name=e);let i=new URL(this.client.config.endpoint+"/account/name");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}updatePassword(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "password"');let i={};void 0!==e&&(i.password=e),void 0!==t&&(i.oldPassword=t);let n=new URL(this.client.config.endpoint+"/account/password");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}updatePhone(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "phone"');if(void 0===t)throw new v('Missing required parameter: "password"');let i={};void 0!==e&&(i.phone=e),void 0!==t&&(i.password=t);let n=new URL(this.client.config.endpoint+"/account/phone");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}getPrefs(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}updatePrefs(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "prefs"');let t={};void 0!==e&&(t.prefs=e);let i=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}createRecovery(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "email"');if(void 0===t)throw new v('Missing required parameter: "url"');let i={};void 0!==e&&(i.email=e),void 0!==t&&(i.url=t);let n=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}updateRecovery(e,t,i){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');if(void 0===i)throw new v('Missing required parameter: "password"');let n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.secret=t),void 0!==i&&(n.password=i);let o=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("put",o,{"content-type":"application/json"},n)})}listSessions(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}deleteSessions(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("delete",e,{"content-type":"application/json"},{})})}createAnonymousSession(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/sessions/anonymous");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}createEmailPasswordSession(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "email"');if(void 0===t)throw new v('Missing required parameter: "password"');let i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);let n=new URL(this.client.config.endpoint+"/account/sessions/email");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}
1updateMagicURLSession(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);let n=new URL(this.client.config.endpoint+"/account/sessions/magic-url");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createOAuth2Session(e,t,i,n){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "provider"');let o="/account/sessions/oauth2/{provider}".replace("{provider}",e),a={};void 0!==t&&(a.success=t),void 0!==i&&(a.failure=i),void 0!==n&&(a.scopes=n);let r=new URL(this.client.config.endpoint+o);for(let[e,t]of(a.project=this.client.config.project,Object.entries(w.flatten(a))))r.searchParams.append(e,t);if("undefined"==typeof window||null==window||!window.location)return r.toString();window.location.href=r.toString()})}updatePhoneSession(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);let n=new URL(this.client.config.endpoint+"/account/sessions/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createSession(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);let n=new URL(this.client.config.endpoint+"/account/sessions/token");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}getSession(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "sessionId"');let t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})})}updateSession(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "sessionId"');let t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("patch",i,{"content-type":"application/json"},{})})}deleteSession(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "sessionId"');let t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}updateStatus(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/status");return yield this.client.call("patch",e,{"content-type":"application/json"},{})})}createPushTarget(e,t,i){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "targetId"');if(void 0===t)throw new v('Missing required parameter: "identifier"');let n={};void 0!==e&&(n.targetId=e),void 0!==t&&(n.identifier=t),void 0!==i&&(n.providerId=i);let o=new URL(this.client.config.endpoint+"/account/targets/push");return yield this.client.call("post",o,{"content-type":"application/json"},n)})}updatePushTarget(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "targetId"');if(void 0===t)throw new v('Missing required parameter: "identifier"');let i="/account/targets/{targetId}/push".replace("{targetId}",e),n={};void 0!==t&&(n.identifier=t);let o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}deletePushTarget(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "targetId"');let t="/account/targets/{targetId}/push".replace("{targetId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}createEmailToken(e,t,i){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "email"');let n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.email=t),void 0!==i&&(n.phrase=i);let o=new URL(this.client.config.endpoint+"/account/tokens/email");return yield this.client.call("post",o,{"content-type":"application/json"},n)})}createMagicURLToken(e,t,i,n){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "email"');let o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.url=i),void 0!==n&&(o.phrase=n);let a=new URL(this.client.config.endpoint+"/account/tokens/magic-url");return yield this.client.call("post",a,{"content-type":"application/json"},o)})}createOAuth2Token(e,t,i,n){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "provider"');let o="/account/tokens/oauth2/{provider}".replace("{provider}",e),a={};void 0!==t&&(a.success=t),void 0!==i&&(a.failure=i),void 0!==n&&(a.scopes=n);let r=new URL(this.client.config.endpoint+o);for(let[e,t]of(a.project=this.client.config.project,Object.entries(w.flatten(a))))r.searchParams.append(e,t);if("undefined"==typeof window||null==window||!window.location)return r.toString();window.location.href=r.toString()})}createPhoneToken(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "phone"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.phone=t);let n=new URL(this.client.config.endpoint+"/account/tokens/phone");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}createVerification(e){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "url"');let t={};void 0!==e&&(t.url=e);let i=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("post",i,{"content-type":"application/json"},t)})}updateVerification(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);let n=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createPhoneVerification(){return f(this,void 0,void 0,function*(){let e=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}updatePhoneVerification(e,t){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "userId"');if(void 0===t)throw new v('Missing required parameter: "secret"');let i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);let n=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}}class b{constructor(e){this.client=e}listDocuments(e,t,i){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "databaseId"');if(void 0===t)throw new v('Missing required parameter: "collectionId"');let n="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),o={};void 0!==i&&(o.queries=i);let a=new URL(this.client.config.endpoint+n);return yield this.client.call("get",a,{"content-type":"application/json"},o)})}createDocument(e,t,i,n,o){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "databaseId"');if(void 0===t)throw new v('Missing required parameter: "collectionId"');if(void 0===i)throw new v('Missing required parameter: "documentId"');if(void 0===n)throw new v('Missing required parameter: "data"');let a="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),r={};void 0!==i&&(r.documentId=i),void 0!==n&&(r.data=n),void 0!==o&&(r.permissions=o);let s=new URL(this.client.config.endpoint+a);return yield this.client.call("post",s,{"content-type":"application/json"},r)})}getDocument(e,t,i,n){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "databaseId"');if(void 0===t)throw new v('Missing required parameter: "collectionId"');if(void 0===i)throw new v('Missing required parameter: "documentId"');let o="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),a={};void 0!==n&&(a.queries=n);let r=new URL(this.client.config.endpoint+o);return yield this.client.call("get",r,{"content-type":"application/json"},a)})}updateDocument(e,t,i,n,o){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "databaseId"');if(void 0===t)throw new v('Missing required parameter: "collectionId"');if(void 0===i)throw new v('Missing required parameter: "documentId"');let a="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),r={};void 0!==n&&(r.data=n),void 0!==o&&(r.permissions=o);let s=new URL(this.client.config.endpoint+a);return yield this.client.call("patch",s,{"content-type":"application/json"},r)})}deleteDocument(e,t,i){return f(this,void 0,void 0,function*(){if(void 0===e)throw new v('Missing required parameter: "databaseId"');if(void 0===t)throw new v('Missing required parameter: "collectionId"');if(void 0===i)throw new v('Missing required parameter: "documentId"');let n="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),o=new URL(this.client.config.endpoint+n);return yield this.client.call("delete",o,{"content-type":"application/json"},{})})}}class M{}M.read=e=>`read("${e}")`,M.write=e=>`write("${e}")`,M.create=e=>`create("${e}")`,M.update=e=>`update("${e}")`,M.delete=e=>`delete("${e}")`;class S{static custom(e){return e}static unique(e=7){let t=(function(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return n})(S,n,0,o).call(S),i="";for(let t=0;t<e;t++)i+=Math.floor(16*Math.random()).toString(16);return t+i}}n=S,o=function(){let e=new Date,t=Math.floor(e.getTime()/1e3),i=e.getMilliseconds();return t.toString(16)+i.toString(16).padStart(5,"0")},(a||(a={})).Totp="totp",function(e){e.Email="email",e.Phone="phone",e.Totp="totp",e.Recoverycode="recoverycode"}(r||(r={})),function(e){e.Amazon="amazon",e.Apple="apple",e.Auth0="auth0",e.Authentik="authentik",e.Autodesk="autodesk",e.Bitbucket="bitbucket",e.Bitly="bitly",e.Box="box",e.Dailymotion="dailymotion",e.Discord="discord",e.Disqus="disqus",e.Dropbox="dropbox",e.Etsy="etsy",e.Facebook="facebook",e.Github="github",e.Gitlab="gitlab",e.Google="google",e.Linkedin="linkedin",e.Microsoft="microsoft",e.Notion="notion",e.Oidc="oidc",e.Okta="okta",e.Paypal="paypal",e.PaypalSandbox="paypalSandbox",e.Podio="podio",e.Salesforce="salesforce",e.Slack="slack",e.Spotify="spotify",e.Stripe="stripe",e.Tradeshift="tradeshift",e.TradeshiftBox="tradeshiftBox",e.Twitch="twitch",e.Wordpress="wordpress",e.Yahoo="yahoo",e.Yammer="yammer",e.Yandex="yandex",e.Zoho="zoho",e.Zoom="zoom",e.Mock="mock"}(s||(s={})),function(e){e.AvantBrowser="aa",e.AndroidWebViewBeta="an",e.GoogleChrome="ch",e.GoogleChromeIOS="ci",e.GoogleChromeMobile="cm",e.Chromium="cr",e.MozillaFirefox="ff",e.S
1afari="sf",e.MobileSafari="mf",e.MicrosoftEdge="ps",e.MicrosoftEdgeIOS="oi",e.OperaMini="om",e.Opera="op",e.OperaNext="on"}(c||(c={})),function(e){e.AmericanExpress="amex",e.Argencard="argencard",e.Cabal="cabal",e.Cencosud="cencosud",e.DinersClub="diners",e.Discover="discover",e.Elo="elo",e.Hipercard="hipercard",e.JCB="jcb",e.Mastercard="mastercard",e.Naranja="naranja",e.TarjetaShopping="targeta-shopping",e.UnionChinaPay="union-china-pay",e.Visa="visa",e.MIR="mir",e.Maestro="maestro"}(l||(l={})),function(e){e.Afghanistan="af",e.Angola="ao",e.Albania="al",e.Andorra="ad",e.UnitedArabEmirates="ae",e.Argentina="ar",e.Armenia="am",e.AntiguaAndBarbuda="ag",e.Australia="au",e.Austria="at",e.Azerbaijan="az",e.Burundi="bi",e.Belgium="be",e.Benin="bj",e.BurkinaFaso="bf",e.Bangladesh="bd",e.Bulgaria="bg",e.Bahrain="bh",e.Bahamas="bs",e.BosniaAndHerzegovina="ba",e.Belarus="by",e.Belize="bz",e.Bolivia="bo",e.Brazil="br",e.Barbados="bb",e.BruneiDarussalam="bn",e.Bhutan="bt",e.Botswana="bw",e.CentralAfricanRepublic="cf",e.Canada="ca",e.Switzerland="ch",e.Chile="cl",e.China="cn",e.CoteDIvoire="ci",e.Cameroon="cm",e.DemocraticRepublicOfTheCongo="cd",e.RepublicOfTheCongo="cg",e.Colombia="co",e.Comoros="km",e.CapeVerde="cv",e.CostaRica="cr",e.Cuba="cu",e.Cyprus="cy",e.CzechRepublic="cz",e.Germany="de",e.Djibouti="dj",e.Dominica="dm",e.Denmark="dk",e.DominicanRepublic="do",e.Algeria="dz",e.Ecuador="ec",e.Egypt="eg",e.Eritrea="er",e.Spain="es",e.Estonia="ee",e.Ethiopia="et",e.Finland="fi",e.Fiji="fj",e.France="fr",e.MicronesiaFederatedStatesOf="fm",e.Gabon="ga",e.UnitedKingdom="gb",e.Georgia="ge",e.Ghana="gh",e.Guinea="gn",e.Gambia="gm",e.GuineaBissau="gw",e.EquatorialGuinea="gq",e.Greece="gr",e.Grenada="gd",e.Guatemala="gt",e.Guyana="gy",e.Honduras="hn",e.Croatia="hr",e.Haiti="ht",e.Hungary="hu",e.Indonesia="id",e.India="in",e.Ireland="ie",e.IranIslamicRepublicOf="ir",e.Iraq="iq",e.Iceland="is",e.Israel="il",e.Italy="it",e.Jamaica="jm",e.Jordan="jo",e.Japan="jp",e.Kazakhstan="kz",e.Kenya="ke",e.Kyrgyzstan="kg",e.Cambodia="kh",e.Kiribati="ki",e.SaintKittsAndNevis="kn",e.SouthKorea="kr",e.Kuwait="kw",e.LaoPeopleSDemocraticRepublic="la",e.Lebanon="lb",e.Liberia="lr",e.Libya="ly",e.SaintLucia="lc",e.Liechtenstein="li",e.SriLanka="lk",e.Lesotho="ls",e.Lithuania="lt",e.Luxembourg="lu",e.Latvia="lv",e.Morocco="ma",e.Monaco="mc",e.Moldova="md",e.Madagascar="mg",e.Maldives="mv",e.Mexico="mx",e.MarshallIslands="mh",e.NorthMacedonia="mk",e.Mali="ml",e.Malta="mt",e.Myanmar="mm",e.Montenegro="me",e.Mongolia="mn",e.Mozambique="mz",e.Mauritania="mr",e.Mauritius="mu",e.Malawi="mw",e.Malaysia="my",e.Namibia="na",e.Niger="ne",e.Nigeria="ng",e.Nicaragua="ni",e.Netherlands="nl",e.Norway="no",e.Nepal="np",e.Nauru="nr",e.NewZealand="nz",e.Oman="om",e.Pakistan="pk",e.Panama="pa",e.Peru="pe",e.Philippines="ph",e.Palau="pw",e.PapuaNewGuinea="pg",e.Poland="pl",e.FrenchPolynesia="pf",e.NorthKorea="kp",e.Portugal="pt",e.Paraguay="py",e.Qatar="qa",e.Romania="ro",e.Russia="ru",e.Rwanda="rw",e.SaudiArabia="sa",e.Sudan="sd",e.Senegal="sn",e.Singapore="sg",e.SolomonIslands="sb",e.SierraLeone="sl",e.ElSalvador="sv",e.SanMarino="sm",e.Somalia="so",e.Serbia="rs",e.SouthSudan="ss",e.SaoTomeAndPrincipe="st",e.Suriname="sr",e.Slovakia="sk",e.Slovenia="si",e.Sweden="se",e.Eswatini="sz",e.Seychelles="sc",e.Syria="sy",e.Chad="td",e.Togo="tg",e.Thailand="th",e.Tajikistan="tj",e.Turkmenistan="tm",e.TimorLeste="tl",e.Tonga="to",e.TrinidadAndTobago="tt",e.Tunisia="tn",e.Turkey="tr",e.Tuvalu="tv",e.Tanzania="tz",e.Uganda="ug",e.Ukraine="ua",e.Uruguay="uy",e.UnitedStates="us",e.Uzbekistan="uz",e.VaticanCity="va",e.SaintVincentAndTheGrenadines="vc",e.Venezuela="ve",e.Vietnam="vn",e.Vanuatu="vu",e.Samoa="ws",e.Yemen="ye",e.SouthAfrica="za",e.Zambia="zm",e.Zimbabwe="zw"}(d||(d={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.DELETE="DELETE",e.OPTIONS="OPTIONS"}(u||(u={})),function(e){e.Center="center",e.Topleft="top-left",e.Top="top",e.Topright="top-right",e.Left="left",e.Right="right",e.Bottomleft="bottom-left",e.Bottom="bottom",e.Bottomright="bottom-right"}(p||(p={})),function(e){e.Jpg="jpg",e.Jpeg="jpeg",e.Gif="gif",e.Png="png",e.Webp="webp",e.Avif="avif"}(h||(h={}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.