PageSourceSearch

https://www.architect.new/_next/static/chunks/5704.c951d62a17ad1365.js

js architect.new collected 2026-10-04 13:33:14 UTC 4,381 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5704],{95704:function(t,e,r){r.d(e,{ET:function(){return w},JM:function(){return T},Lj:function(){return l},PR:function(){return s},Zr:function(){return y},bQ:function(){return m},checkUserAccess:function(){return f},getOrCreateReferralCode:function(){return d},il:function(){return C},oU:function(){return p},r4:function(){return i},uO:function(){return h},updateUser:function(){return u}});var n=r(97855),o=r(39004);function c(t){var e;return null!==(e=null!=t?t:(0,o.bW)())&&void 0!==e?e:void 0}function a(t){let e=c(t);return e?{Authorization:"Bearer ".concat(e)}:{}}async function s(t,e){try{return await (0,n.R1)("/api/v1/users/".concat(t),c(e))}catch(t){if(404===t.status)return null;throw console.error("Error fetching user:",t),t}}async function i(t){try{return await (0,n.sg)("/api/v1/users",t)}catch(t){throw console.error("Error creating user:",t),t}}async function u(t,e,r){try{return await (0,n.nc)("/api/v1/users/".concat(t),e,c(r))}catch(t){throw console.error("Error updating user:",t),t}}async function l(t,e,r){try{let o=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/profile"),{method:"PATCH",headers:{"Content-Type":"application/json",...a(r)},body:JSON.stringify(e)});if(!o.ok){let t=await o.json().catch(()=>({}));throw Error(t.detail||"Failed to update profile: ".concat(o.statusText))}return await o.json()}catch(t){throw console.error("Error updating user profile:",t),t}}async function f(t,e,r){try{let o=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/access?email=").concat(encodeURIComponent(e)),{method:"GET",headers:{"Content-Type":"application/json",...a(r)}});if(!o.ok)throw Error("Failed to check user access: ".concat(o.statusText));return await o.json()}catch(t){throw console.error("Error checking user access:",t),t}}function p(t){let e=t.split("@")[1];if(!e||["gmail.com","yahoo.com","hotmail.com","outlook.com","icloud.com","proton.me","protonmail.com"].includes(e.toLowerCase()))return"";let r=e.split(".")[0];return r.charAt(0).toUpperCase()+r.slice(1)}function h(t){return t.toLowerCase().trim().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}async function d(t,e,r,o){try{let c=new URLSearchParams;e&&c.set("email",e),r&&c.set("name",r);let s=c.toString(),i="".concat(n.CT,"/api/v1/users/").concat(t,"/referral-code").concat(s?"?".concat(s):""),u=await fetch(i,{headers:a(o)});if(!u.ok)return null;return await u.json()}catch(t){return null}}async function w(t,e){try{let r=await fetch("".concat(n.CT,"/api/v1/users/feedback"),{method:"POST",headers:{"Content-Type":"application/json",...a(e)},body:JSON.stringify(t)});if(!r.ok){let t=await r.json();throw Error(t.detail||"Failed to submit feedback: ".concat(r.statusText))}return await r.json()}catch(t){throw console.error("Error submitting feedback:",t),t}}async function y(t,e){try{let r=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/preferences/exists"),{method:"GET",headers:{"Content-Type":"application/json",...a(e)}});if(!r.ok)return console.error("Error checking preferences exist:",r.statusText),!1;return(await r.json()).exists}catch(t){return console.error("Error checking user preferences exist:",t),!1}}async function T(t,e){try{let r=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/preferences"),{method:"GET",headers:{"Content-Type":"application/json",...a(e)}});if(404===r.status)return null;if(!r.ok)throw Error("Failed to get user preferences: ".concat(r.statusText));return await r.json()}catch(t){return console.error("Error fetching user preferences:",t),null}}async function m(t,e,r){try{let o=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/preferences"),{method:"POST",headers:{"Content-Type":"application/json",...a(r)},body:JSON.stringify(e)});if(!o.ok){let t=await o.json();throw Error(t.detail||"Failed to create preferences: ".concat(o.statusText))}return await o.json()}catch(t){throw console.error("Error creating user preferences:",t),t}}async function C(t,e,r){try{let o=await fetch("".concat(n.CT,"/api/v1/users/").concat(t,"/preferences"),{method:"PATCH",headers:{"Content-Type":"application/json",...a(r)},body:JSON.stringify(e)});if(!o.ok){let t=await o.json();throw Error(t.detail||"Failed to update preferences: ".concat(o.statusText))}return await o.json()}catch(t){throw console.error("Error updating user preferences:",t),t}}}}]);

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.