@wix/create-app 0.0.32 → 0.0.33

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/build/index.js CHANGED
@@ -193,7 +193,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
193
193
  Failed to update files.
194
194
  Failed to sync changes from local files to the Dev Editor
195
195
  Still watching local files and will continue to sync changes...
196
- `}),FailedToWatchFiles:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>V.default.createElement(me,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>V.default.createElement(me,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:e})=>{let r=({issue:i})=>{let s=o=>(0,xI.match)(o,{page:()=>"page",widget:()=>"widget","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element"});return V.default.createElement(Te,{flexDirection:"column"},V.default.createElement(te,null,V.default.createElement(te,{bold:!0},"Duplicate ID: "),i.id),V.default.createElement(te,{bold:!0},"Extensions:"),i.components.map(({name:o,path:a,type:l})=>V.default.createElement(te,{key:a},"[",s(l),"] ",o," (",a,")")),V.default.createElement(te,null,V.default.createElement(te,{bold:!0},"Possible GUID: "),i.suggestedId))},n=V.default.createElement(Te,{flexDirection:"column",rowGap:1},V.default.createElement(te,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(i=>V.default.createElement(r,{issue:i,key:i.id})));return()=>V.default.createElement(me,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:n})},FailedToGetPackageDetails:()=>()=>V.default.createElement(me,{message:"Failed to get package info."}),InvalidCreateAppResponse:()=>()=>V.default.createElement(me,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>V.default.createElement(me,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),FailedToGetPagesDiff:()=>()=>V.default.createElement(me,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>V.default.createElement(me,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>V.default.createElement(me,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>V.default.createElement(me,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>V.default.createElement(me,{message:"Failed to create a presigned upload url"}),FailedToUploadApplicationFiles:()=>()=>V.default.createElement(me,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>V.default.createElement(me,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>V.default.createElement(me,{message:"Failed to get user information."}),FailedToCreateDevelopmentSite:()=>()=>V.default.createElement(me,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>V.default.createElement(me,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>V.default.createElement(me,{message:"Failed to request development sites limit."}),FailedToQuerySites:()=>()=>V.default.createElement(me,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>V.default.createElement(me,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>V.default.createElement(me,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>V.default.createElement(Vn,{message:"Failed to publish site."}),SiteNotFound:()=>()=>V.default.createElement(me,{message:"Site not found."}),FailedToSaveDevelopmentSite:({path:e})=>()=>V.default.createElement(me,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:()=>()=>V.default.createElement(me,{message:"Failed to build the application.",hint:"Please check the build output for more information"}),FailedToCheckIfAppInstalled:()=>()=>V.default.createElement(me,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to save auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let n=In(r);return()=>V.default.createElement(me,{message:`Failed to write JSON at path: ${e}. Cause: ${n}`})},TemplatePathNotFound:({templatePath:e})=>()=>V.default.createElement(me,{message:`Template path not found: ${e}`,hint:"Make sure the template path exists in the remote repository"}),FailedToCloneRepo:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to clone repo: ${r}`,hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"})},InvalidGitUrl:({url:e})=>()=>V.default.createElement(me,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>V.default.createElement(me,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>V.default.createElement(me,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>V.default.createElement(me,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:V.default.createElement(te,null,"Full error can be found in ",V.default.createElement(te,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>V.default.createElement(me,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>V.default.createElement(me,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>V.default.createElement(me,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>V.default.createElement(Vn,{message:"Failed to create an app configuration in dev center."}),FailedToUpdateAppRelease:()=>()=>V.default.createElement(Vn,{message:"Failed to update an app configuration in dev center."}),FailedToCheckDeprecatedStatus:()=>()=>V.default.createElement(Vn,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>V.default.createElement(Vn,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:r})=>()=>V.default.createElement(me,{message:V.default.createElement(te,null,"The versions of ",V.default.createElement(te,{bold:!0},"@wix/cli")," (",e,") and"," ",V.default.createElement(te,{bold:!0},"@wix/cli-app")," (",r,") dependencies do not match"),hint:V.default.createElement(te,null,"Align their versions in your ",V.default.createElement(te,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>V.default.createElement(me,{message:"Failed to get validation status for app version from dev center"}),InvalidEmbeddedScriptParameterNames:({templateFilename:e,invalidParameters:r})=>()=>V.default.createElement(me,{message:`Invalid embedded script template in ${e}`,hint:`Dynamic parameters can only include letters, but some include invalid names: ${r.join(", ")}`}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>V.default.createElement(me,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e})=>()=>V.default.createElement(me,{message:V.default.createElement(te,null,"We use name of folder as tagName for your custom element. Unfortunatly, ",V.default.createElement(te,{bold:!0},e)," is invalid tagName."),hint:V.default.createElement(te,null,"You can find rules for tagName here:"," ",V.default.createElement(te,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))})})}function In(t){return t instanceof Error?t.message:JSON.stringify(t)}function VCe(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var xl=({error:t,systemErrorOverride:e})=>(0,IS.useMemo)(()=>{let r=Vm(t);return sa(r)&&e?e:(0,IS.createElement)(G9(r.cliCode))},[t,e]);c();var OY=L(Xe(),1);c();c();c();c();c();c();var $9=Object.prototype.toString;function jg(t){switch($9.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return To(t,Error)}}function SI(t,e){return $9.call(t)===`[object ${e}]`}function Ms(t){return SI(t,"String")}function FS(t){return t===null||typeof t!="object"&&typeof t!="function"}function Oi(t){return SI(t,"Object")}function bI(t){return typeof Event<"u"&&To(t,Event)}function DI(t){return typeof Element<"u"&&To(t,Element)}function qg(t){return SI(t,"RegExp")}function dn(t){return!!(t&&t.then&&typeof t.then=="function")}function wI(t){return Oi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Hg(t){return typeof t=="number"&&t!==t}function To(t,e){try{return t instanceof e}catch{return!1}}function NS(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}c();function Ao(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Gg(t,e){let r=t,n=r.length;if(n<=150)return r;e>n&&(e=n);let i=Math.max(e-60,0);i<5&&(i=0);let s=Math.min(i+140,n);return s>n-5&&(s=n),s===n&&(i=Math.max(s-140,0)),r=r.slice(i,s),i>0&&(r=`'{snip} ${r}`),s<n&&(r+=" {snip}"),r}function z9(t,e,r=!1){return Ms(t)?qg(e)?e.test(t):Ms(e)?r?t===e:t.includes(e):!1:!1}function Oo(t,e=[],r=!1){return e.some(n=>z9(t,n,r))}function TI(t,e,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!To(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=WCe(CI(t,e,i,o.originalException,n,s.exception.values,a,0),r))}function CI(t,e,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(To(n[i],Error)){V9(o,a);let p=t(e,n[i]),d=l.length;W9(p,i,d,a),l=CI(t,e,r,n[i],i,[p,...l],p,d)}return Array.isArray(n.errors)&&n.errors.forEach((p,d)=>{if(To(p,Error)){V9(o,a);let m=t(e,p),g=l.length;W9(m,`errors[${d}]`,g,a),l=CI(t,e,r,p,i,[m,...l],m,g)}}),l}function V9(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function W9(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function WCe(t,e){return t.map(r=>(r.value&&(r.value=Ao(r.value,e)),r))}c();c();function PS(t){return t&&t.Math==Math?t:void 0}var ar=typeof globalThis=="object"&&PS(globalThis)||typeof window=="object"&&PS(window)||typeof self=="object"&&PS(self)||typeof global=="object"&&PS(global)||function(){return this}()||{};function Us(){return ar}function $g(t,e,r){let n=r||ar,i=n.__SENTRY__=n.__SENTRY__||{};return i[t]||(i[t]=e())}var alt=Us(),YCe=80;function Y9(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,i=[],s=0,o=0,a=" > ",l=a.length,p,d=Array.isArray(e)?e:e.keyAttrs,m=!Array.isArray(e)&&e.maxStringLength||YCe;for(;r&&s++<n&&(p=JCe(r,d),!(p==="html"||s>1&&o+i.length*l+p.length>=m));)i.push(p),o+=p.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function JCe(t,e){let r=t,n=[],i,s,o,a,l;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let p=e&&e.length?e.filter(m=>r.getAttribute(m)).map(m=>[m,r.getAttribute(m)]):null;if(p&&p.length)p.forEach(m=>{n.push(`[${m[0]}="${m[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&Ms(i))for(s=i.split(/\s+/),l=0;l<s.length;l++)n.push(`.${s[l]}`);let d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)o=d[l],a=r.getAttribute(o),a&&n.push(`[${o}="${a}"]`);return n.join("")}c();c();var KCe="Sentry Logger ",zg=["debug","info","warn","error","log","assert","trace"],wd={};function Sl(t){if(!("console"in ar))return t();let e=ar.console,r={},n=Object.keys(wd);n.forEach(i=>{let s=wd[i];r[i]=e[i],e[i]=s});try{return t()}finally{n.forEach(i=>{e[i]=r[i]})}}function XCe(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zg.forEach(r=>{e[r]=(...n)=>{t&&Sl(()=>{ar.console[r](`${KCe}[${r}]:`,...n)})}}):zg.forEach(r=>{e[r]=()=>{}}),e}var re=XCe();var ZCe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function QCe(t){return t==="http"||t==="https"}function Uu(t,e=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function J9(t){let e=ZCe.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,i="",s,o="",a]=e.slice(1),l="",p=a,d=p.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),p=d.pop()),p){let m=p.match(/^\d+/);m&&(p=m[0])}return K9({host:s,pass:i,path:l,projectId:p,port:o,protocol:r,publicKey:n})}function K9(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function eTe(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(re.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:r.match(/^\d+$/)?QCe(n)?e&&isNaN(parseInt(e,10))?(re.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function LS(t){let e=typeof t=="string"?J9(t):K9(t);if(!(!e||!eTe(e)))return e}c();var Fn=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};c();c();c();function Rt(t,e,r){if(!(e in t))return;let n=t[e],i=r(n);typeof i=="function"&&Q9(i,n),t[e]=i}function Sa(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Q9(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,Sa(t,"__sentry_original__",e)}catch{}}function OI(t){return t.__sentry_original__}function RI(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function kS(t){if(jg(t))return{message:t.message,name:t.name,stack:t.stack,...Z9(t)};if(bI(t)){let e={type:t.type,target:X9(t.target),currentTarget:X9(t.currentTarget),...Z9(t)};return typeof CustomEvent<"u"&&To(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function X9(t){try{return DI(t)?Y9(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Z9(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function II(t,e=40){let r=Object.keys(kS(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return Ao(r[0],e);for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>e))return n===r.length?i:Ao(i,e)}return""}function Ur(t){return AI(t,new Map)}function AI(t,e){if(Oi(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let i of Object.keys(t))typeof t[i]<"u"&&(n[i]=AI(t[i],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(i=>{n.push(AI(i,e))}),n}return t}function hr(){let t=ar,e=t.crypto||t.msCrypto,r=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>e.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function e7(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ba(t){let{message:e,event_id:r}=t;if(e)return e;let n=e7(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function FI(t,e,r){let n=t.exception=t.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=r||"Error")}function NI(t,e){let r=e7(t);if(!r)return;let n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...e},e&&"data"in e){let s={...i&&i.data,...e.data};r.mechanism.data=s}}var tTe=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function PI(t){let e=t.match(tTe)||[],r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10);return{buildmetadata:e[5],major:isNaN(r)?void 0:r,minor:isNaN(n)?void 0:n,patch:isNaN(i)?void 0:i,prerelease:e[4]}}function LI(t,e,r=5){if(e.lineno===void 0)return;let n=t.length,i=Math.max(Math.min(n-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,i-r),i).map(s=>Gg(s,0)),e.context_line=Gg(t[Math.min(n-1,i)],e.colno||0),e.post_context=t.slice(Math.min(i+1,n),i+1+r).map(s=>Gg(s,0))}function BS(t){if(t&&t.__sentry_captured__)return!0;try{Sa(t,"__sentry_captured__",!0)}catch{}return!1}function bl(t){return Array.isArray(t)?t:[t]}c();c();function rTe(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.includes(":\\")&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&t!==void 0&&!t.includes("node_modules/")}function t7(t){let e=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return n=>{let i=n.match(r);if(i){let s,o,a,l,p;if(i[1]){a=i[1];let g=a.lastIndexOf(".");if(a[g-1]==="."&&g--,g>0){s=a.slice(0,g),o=a.slice(g+1);let v=s.indexOf(".Module");v>0&&(a=a.slice(v+1),s=s.slice(0,v))}l=void 0}o&&(l=s,p=o),o==="<anonymous>"&&(p=void 0,a=void 0),a===void 0&&(p=p||"<anonymous>",a=l?`${l}.${p}`:p);let d=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2],m=i[5]==="native";return!d&&i[5]&&!m&&(d=i[5]),{filename:d,module:t?t(d):void 0,function:a,lineno:parseInt(i[3],10)||void 0,colno:parseInt(i[4],10)||void 0,in_app:rTe(d,m)}}if(n.match(e))return{filename:n}}}var i7=50,r7=/\(error: (.*)\)/,n7=/captureMessage|captureException/;function BI(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let i=[],s=r.split(`
196
+ `}),FailedToWatchFiles:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>V.default.createElement(me,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>V.default.createElement(me,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:e})=>{let r=({issue:i})=>{let s=o=>(0,xI.match)(o,{page:()=>"page",widget:()=>"widget","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element"});return V.default.createElement(Te,{flexDirection:"column"},V.default.createElement(te,null,V.default.createElement(te,{bold:!0},"Duplicate ID: "),i.id),V.default.createElement(te,{bold:!0},"Extensions:"),i.components.map(({name:o,path:a,type:l})=>V.default.createElement(te,{key:a},"[",s(l),"] ",o," (",a,")")),V.default.createElement(te,null,V.default.createElement(te,{bold:!0},"Possible GUID: "),i.suggestedId))},n=V.default.createElement(Te,{flexDirection:"column",rowGap:1},V.default.createElement(te,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(i=>V.default.createElement(r,{issue:i,key:i.id})));return()=>V.default.createElement(me,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:n})},FailedToGetPackageDetails:()=>()=>V.default.createElement(me,{message:"Failed to get package info."}),InvalidCreateAppResponse:()=>()=>V.default.createElement(me,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>V.default.createElement(me,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),FailedToGetPagesDiff:()=>()=>V.default.createElement(me,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>V.default.createElement(me,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>V.default.createElement(me,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>V.default.createElement(me,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>V.default.createElement(me,{message:"Failed to create a presigned upload url"}),FailedToUploadApplicationFiles:()=>()=>V.default.createElement(me,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>V.default.createElement(me,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>V.default.createElement(me,{message:"Failed to get user information."}),FailedToCreateDevelopmentSite:()=>()=>V.default.createElement(me,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>V.default.createElement(me,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>V.default.createElement(me,{message:"Failed to request development sites limit."}),FailedToQuerySites:()=>()=>V.default.createElement(me,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>V.default.createElement(me,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>V.default.createElement(me,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>V.default.createElement(Vn,{message:"Failed to publish site."}),SiteNotFound:()=>()=>V.default.createElement(me,{message:"Site not found."}),FailedToSaveDevelopmentSite:({path:e})=>()=>V.default.createElement(me,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:()=>()=>V.default.createElement(me,{message:"Failed to build the application.",hint:"Please check the build output for more information"}),FailedToCheckIfAppInstalled:()=>()=>V.default.createElement(me,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to save auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let n=In(r);return()=>V.default.createElement(me,{message:`Failed to write JSON at path: ${e}. Cause: ${n}`})},TemplatePathNotFound:({templatePath:e})=>()=>V.default.createElement(me,{message:`Template path not found: ${e}`,hint:"Make sure the template path exists in the remote repository"}),FailedToCloneRepo:({cause:e})=>{let r=In(e);return()=>V.default.createElement(me,{message:`Failed to clone repo: ${r}`,hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"})},InvalidGitUrl:({url:e})=>()=>V.default.createElement(me,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>V.default.createElement(me,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>V.default.createElement(me,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>V.default.createElement(me,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:V.default.createElement(te,null,"Full error can be found in ",V.default.createElement(te,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>V.default.createElement(me,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>V.default.createElement(me,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>V.default.createElement(me,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>V.default.createElement(Vn,{message:"Failed to create an app configuration in dev center."}),FailedToUpdateAppRelease:()=>()=>V.default.createElement(Vn,{message:"Failed to update an app configuration in dev center."}),FailedToCheckDeprecatedStatus:()=>()=>V.default.createElement(Vn,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>V.default.createElement(Vn,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:r})=>()=>V.default.createElement(me,{message:V.default.createElement(te,null,"The versions of ",V.default.createElement(te,{bold:!0},"@wix/cli")," (",e,") and"," ",V.default.createElement(te,{bold:!0},"@wix/cli-app")," (",r,") dependencies do not match"),hint:V.default.createElement(te,null,"Align their versions in your ",V.default.createElement(te,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>V.default.createElement(me,{message:"Failed to get validation status for app version from dev center"}),InvalidEmbeddedScriptParameterNames:({templateFilename:e,invalidParameters:r})=>()=>V.default.createElement(me,{message:`Invalid embedded script template in ${e}`,hint:`Dynamic parameters can only include letters, but some include invalid names: ${r.join(", ")}`}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>V.default.createElement(me,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e,errorMessage:r})=>()=>V.default.createElement(me,{message:V.default.createElement(te,null,"We use name of folder as tagName for your custom element. Unfortunatly, ",V.default.createElement(te,{bold:!0},e)," is invalid tagName. Reason: ",r),hint:V.default.createElement(te,null,"You can find rules for tagName here:"," ",V.default.createElement(te,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))})})}function In(t){return t instanceof Error?t.message:JSON.stringify(t)}function VCe(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var xl=({error:t,systemErrorOverride:e})=>(0,IS.useMemo)(()=>{let r=Vm(t);return sa(r)&&e?e:(0,IS.createElement)(G9(r.cliCode))},[t,e]);c();var OY=L(Xe(),1);c();c();c();c();c();c();var $9=Object.prototype.toString;function jg(t){switch($9.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return To(t,Error)}}function SI(t,e){return $9.call(t)===`[object ${e}]`}function Ms(t){return SI(t,"String")}function FS(t){return t===null||typeof t!="object"&&typeof t!="function"}function Oi(t){return SI(t,"Object")}function bI(t){return typeof Event<"u"&&To(t,Event)}function DI(t){return typeof Element<"u"&&To(t,Element)}function qg(t){return SI(t,"RegExp")}function dn(t){return!!(t&&t.then&&typeof t.then=="function")}function wI(t){return Oi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Hg(t){return typeof t=="number"&&t!==t}function To(t,e){try{return t instanceof e}catch{return!1}}function NS(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}c();function Ao(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Gg(t,e){let r=t,n=r.length;if(n<=150)return r;e>n&&(e=n);let i=Math.max(e-60,0);i<5&&(i=0);let s=Math.min(i+140,n);return s>n-5&&(s=n),s===n&&(i=Math.max(s-140,0)),r=r.slice(i,s),i>0&&(r=`'{snip} ${r}`),s<n&&(r+=" {snip}"),r}function z9(t,e,r=!1){return Ms(t)?qg(e)?e.test(t):Ms(e)?r?t===e:t.includes(e):!1:!1}function Oo(t,e=[],r=!1){return e.some(n=>z9(t,n,r))}function TI(t,e,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!To(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=WCe(CI(t,e,i,o.originalException,n,s.exception.values,a,0),r))}function CI(t,e,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(To(n[i],Error)){V9(o,a);let p=t(e,n[i]),d=l.length;W9(p,i,d,a),l=CI(t,e,r,n[i],i,[p,...l],p,d)}return Array.isArray(n.errors)&&n.errors.forEach((p,d)=>{if(To(p,Error)){V9(o,a);let m=t(e,p),g=l.length;W9(m,`errors[${d}]`,g,a),l=CI(t,e,r,p,i,[m,...l],m,g)}}),l}function V9(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function W9(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function WCe(t,e){return t.map(r=>(r.value&&(r.value=Ao(r.value,e)),r))}c();c();function PS(t){return t&&t.Math==Math?t:void 0}var ar=typeof globalThis=="object"&&PS(globalThis)||typeof window=="object"&&PS(window)||typeof self=="object"&&PS(self)||typeof global=="object"&&PS(global)||function(){return this}()||{};function Us(){return ar}function $g(t,e,r){let n=r||ar,i=n.__SENTRY__=n.__SENTRY__||{};return i[t]||(i[t]=e())}var alt=Us(),YCe=80;function Y9(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,i=[],s=0,o=0,a=" > ",l=a.length,p,d=Array.isArray(e)?e:e.keyAttrs,m=!Array.isArray(e)&&e.maxStringLength||YCe;for(;r&&s++<n&&(p=JCe(r,d),!(p==="html"||s>1&&o+i.length*l+p.length>=m));)i.push(p),o+=p.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function JCe(t,e){let r=t,n=[],i,s,o,a,l;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let p=e&&e.length?e.filter(m=>r.getAttribute(m)).map(m=>[m,r.getAttribute(m)]):null;if(p&&p.length)p.forEach(m=>{n.push(`[${m[0]}="${m[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&Ms(i))for(s=i.split(/\s+/),l=0;l<s.length;l++)n.push(`.${s[l]}`);let d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)o=d[l],a=r.getAttribute(o),a&&n.push(`[${o}="${a}"]`);return n.join("")}c();c();var KCe="Sentry Logger ",zg=["debug","info","warn","error","log","assert","trace"],wd={};function Sl(t){if(!("console"in ar))return t();let e=ar.console,r={},n=Object.keys(wd);n.forEach(i=>{let s=wd[i];r[i]=e[i],e[i]=s});try{return t()}finally{n.forEach(i=>{e[i]=r[i]})}}function XCe(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zg.forEach(r=>{e[r]=(...n)=>{t&&Sl(()=>{ar.console[r](`${KCe}[${r}]:`,...n)})}}):zg.forEach(r=>{e[r]=()=>{}}),e}var re=XCe();var ZCe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function QCe(t){return t==="http"||t==="https"}function Uu(t,e=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function J9(t){let e=ZCe.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,i="",s,o="",a]=e.slice(1),l="",p=a,d=p.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),p=d.pop()),p){let m=p.match(/^\d+/);m&&(p=m[0])}return K9({host:s,pass:i,path:l,projectId:p,port:o,protocol:r,publicKey:n})}function K9(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function eTe(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(re.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:r.match(/^\d+$/)?QCe(n)?e&&isNaN(parseInt(e,10))?(re.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function LS(t){let e=typeof t=="string"?J9(t):K9(t);if(!(!e||!eTe(e)))return e}c();var Fn=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};c();c();c();function Rt(t,e,r){if(!(e in t))return;let n=t[e],i=r(n);typeof i=="function"&&Q9(i,n),t[e]=i}function Sa(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Q9(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,Sa(t,"__sentry_original__",e)}catch{}}function OI(t){return t.__sentry_original__}function RI(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function kS(t){if(jg(t))return{message:t.message,name:t.name,stack:t.stack,...Z9(t)};if(bI(t)){let e={type:t.type,target:X9(t.target),currentTarget:X9(t.currentTarget),...Z9(t)};return typeof CustomEvent<"u"&&To(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function X9(t){try{return DI(t)?Y9(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Z9(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function II(t,e=40){let r=Object.keys(kS(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return Ao(r[0],e);for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>e))return n===r.length?i:Ao(i,e)}return""}function Ur(t){return AI(t,new Map)}function AI(t,e){if(Oi(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let i of Object.keys(t))typeof t[i]<"u"&&(n[i]=AI(t[i],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(i=>{n.push(AI(i,e))}),n}return t}function hr(){let t=ar,e=t.crypto||t.msCrypto,r=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>e.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function e7(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ba(t){let{message:e,event_id:r}=t;if(e)return e;let n=e7(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function FI(t,e,r){let n=t.exception=t.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=r||"Error")}function NI(t,e){let r=e7(t);if(!r)return;let n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...e},e&&"data"in e){let s={...i&&i.data,...e.data};r.mechanism.data=s}}var tTe=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function PI(t){let e=t.match(tTe)||[],r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10);return{buildmetadata:e[5],major:isNaN(r)?void 0:r,minor:isNaN(n)?void 0:n,patch:isNaN(i)?void 0:i,prerelease:e[4]}}function LI(t,e,r=5){if(e.lineno===void 0)return;let n=t.length,i=Math.max(Math.min(n-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,i-r),i).map(s=>Gg(s,0)),e.context_line=Gg(t[Math.min(n-1,i)],e.colno||0),e.post_context=t.slice(Math.min(i+1,n),i+1+r).map(s=>Gg(s,0))}function BS(t){if(t&&t.__sentry_captured__)return!0;try{Sa(t,"__sentry_captured__",!0)}catch{}return!1}function bl(t){return Array.isArray(t)?t:[t]}c();c();function rTe(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.includes(":\\")&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&t!==void 0&&!t.includes("node_modules/")}function t7(t){let e=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return n=>{let i=n.match(r);if(i){let s,o,a,l,p;if(i[1]){a=i[1];let g=a.lastIndexOf(".");if(a[g-1]==="."&&g--,g>0){s=a.slice(0,g),o=a.slice(g+1);let v=s.indexOf(".Module");v>0&&(a=a.slice(v+1),s=s.slice(0,v))}l=void 0}o&&(l=s,p=o),o==="<anonymous>"&&(p=void 0,a=void 0),a===void 0&&(p=p||"<anonymous>",a=l?`${l}.${p}`:p);let d=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2],m=i[5]==="native";return!d&&i[5]&&!m&&(d=i[5]),{filename:d,module:t?t(d):void 0,function:a,lineno:parseInt(i[3],10)||void 0,colno:parseInt(i[4],10)||void 0,in_app:rTe(d,m)}}if(n.match(e))return{filename:n}}}var i7=50,r7=/\(error: (.*)\)/,n7=/captureMessage|captureException/;function BI(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let i=[],s=r.split(`
197
197
  `);for(let o=n;o<s.length;o++){let a=s[o];if(a.length>1024)continue;let l=r7.test(a)?a.replace(r7,"$1"):a;if(!l.match(/\S*Error: /)){for(let p of e){let d=p(l);if(d){i.push(d);break}}if(i.length>=i7)break}}return s7(i)}}function s7(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),n7.test(e[e.length-1].function||"")&&(e.pop(),n7.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,i7).map(r=>({...r,filename:r.filename||e[e.length-1].filename,function:r.function||"?"}))}var kI="<anonymous>";function Vg(t){try{return!t||typeof t!="function"?kI:t.name||kI}catch{return kI}}function MI(t){return[90,t7(t)]}c();var UI=Us();function nTe(){if(!("fetch"in UI))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function o7(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function a7(){if(!nTe())return!1;if(o7(UI.fetch))return!0;let t=!1,e=UI.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=o7(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}c();var MS=Us();function u7(){let t=MS.chrome,e=t&&t.app&&t.app.runtime,r="history"in MS&&!!MS.history.pushState&&!!MS.history.replaceState;return!e&&r}var Qr=Us(),Wg="__sentry_xhr_v2__",Yg={},c7={};function iTe(t){if(!c7[t])switch(c7[t]=!0,t){case"console":sTe();break;case"dom":m7();break;case"xhr":h7();break;case"fetch":oTe();break;case"history":aTe();break;case"error":pTe();break;case"unhandledrejection":dTe();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("unknown instrumentation type:",t);return}}function Cd(t,e){Yg[t]=Yg[t]||[],Yg[t].push(e),iTe(t)}function js(t,e){if(!(!t||!Yg[t]))for(let r of Yg[t]||[])try{r(e)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error(`Error while triggering instrumentation handler.
198
198
  Type: ${t}
199
199
  Name: ${Vg(r)}
@@ -212,7 +212,7 @@ Event: ${ba(t)}.
212
212
  Url: ${rb(t)}`),!0):sAe(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
213
213
  Event: ${ba(t)}.
214
214
  Url: ${rb(t)}`),!0)}function rAe(t,e){return t.type||!e||!e.length?!1:oAe(t).some(r=>Oo(r,e))}function nAe(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?Oo(r,e):!1}function iAe(t,e){if(!e||!e.length)return!1;let r=rb(t);return r?Oo(r,e):!1}function sAe(t,e){if(!e||!e.length)return!0;let r=rb(t);return r?Oo(r,e):!0}function oAe(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&e.length===0&&re.error(`Could not extract message for event ${ba(t)}`),e}function aAe(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function uAe(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function rb(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?uAe(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error(`Cannot extract url for event ${ba(t)}`),null}}c();var cAe="cause",lAe=5,s_=class t{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this._key=e.key||cAe,this._limit=e.limit||lAe,this.name=t.id}setupOnce(){}preprocessEvent(e,r,n){let i=n.getOptions();TI(WS,i.stackParser,i.maxValueLength,this._key,this._limit,e,r)}};s_.__initStatic();c();function Tl(t,e){let r=e.getClient(),n=r&&r.getDsn(),i=r&&r.getOptions().tunnel;return pAe(t,n)||fAe(t,i)}function fAe(t,e){return e?Y7(t)===Y7(e):!1}function pAe(t,e){return e?t.includes(e.host):!1}function Y7(t){return t[t.length-1]==="/"?t.slice(0,-1):t}c();c();c();c();function o_(t,e){return t??e()}c();function oe(t){let e,r=t[0],n=1;for(;n<t.length;){let i=t[n],s=t[n+1];if(n+=2,(i==="optionalAccess"||i==="optionalCall")&&r==null)return;i==="access"||i==="optionalAccess"?(e=r,r=s(r)):(i==="call"||i==="optionalCall")&&(r=s((...o)=>r.call(e,...o)),e=void 0)}return r}c();function pi(t){let e=oe([t,"call",n=>n(),"access",n=>n.getClient,"call",n=>n(),"optionalAccess",n=>n.getOptions,"call",n=>n()]);return(oe([e,"optionalAccess",n=>n.instrumenter])||"sentry")!=="sentry"}var Id=class t{static __initStatic(){this.id="Express"}constructor(e={}){this.name=t.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}setupOnce(e,r){if(!this._router){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("ExpressIntegration is missing an Express instance");return}if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("Express Integration is skipped because of instrumenter configuration.");return}SAe(this._router,this._methods),bAe(this._router)}};Id.__initStatic();function J7(t,e){let r=t.length;switch(r){case 2:return function(n,i){let s=i.__sentry_transaction;if(s){let o=s.startChild({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"});i.once("finish",()=>{o.finish()})}return t.call(this,n,i)};case 3:return function(n,i,s){let o=i.__sentry_transaction,a=oe([o,"optionalAccess",l=>l.startChild,"call",l=>l({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"})]);t.call(this,n,i,function(...l){oe([a,"optionalAccess",p=>p.finish,"call",p=>p()]),s.call(this,...l)})};case 4:return function(n,i,s,o){let a=s.__sentry_transaction,l=oe([a,"optionalAccess",p=>p.startChild,"call",p=>p({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"})]);t.call(this,n,i,s,function(...p){oe([l,"optionalAccess",d=>d.finish,"call",d=>d()]),o.call(this,...p)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${r}`)}}function vAe(t,e){return t.map(r=>typeof r=="function"?J7(r,e):Array.isArray(r)?r.map(n=>typeof n=="function"?J7(n,e):n):r)}function xAe(t,e){let r=t[e];return t[e]=function(...n){return r.call(this,...vAe(n,e))},t}function SAe(t,e=[]){e.forEach(r=>xAe(t,r))}function bAe(t){let e="settings"in t;e&&t._router===void 0&&t.lazyrouter&&t.lazyrouter();let r=e?t._router:t;if(!r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.debug("Routing instrumentation is currently only supported in Express 4.");return}let n=Object.getPrototypeOf(r),i=n.process_params;n.process_params=function(o,a,l,p,d){l._reconstructedRoute||(l._reconstructedRoute="");let{layerRoutePath:m,isRegex:g,isArray:v,numExtraSegments:S}=wAe(o);(m||g||v)&&(l._hasParameters=!0);let b;m?b=m:b=AAe(l.originalUrl,l._reconstructedRoute,o.path)||"";let C=b.split("/").filter(I=>I.length>0&&(g||v||!I.includes("*"))).join("/");C&&C.length>0&&(l._reconstructedRoute+=`/${C}${g?"/":""}`);let T=Td(qu(l.originalUrl||""))+S,N=Td(l._reconstructedRoute);if(T===N){l._hasParameters||l._reconstructedRoute!==l.originalUrl&&(l._reconstructedRoute=l.originalUrl?qu(l.originalUrl):l.originalUrl);let I=p.__sentry_transaction;if(I&&I.metadata.source!=="custom"){let P=l._reconstructedRoute||"/";I.setName(...Kg(l,{path:!0,method:!0,customRoute:P}))}}return i.call(this,o,a,l,p,d)}}var DAe=(t,e,r)=>{if(!t||!e||!r||Object.keys(r).length===0||!oe([r,"access",p=>p[0],"optionalAccess",p=>p.offset]))return;let n=r.sort((p,d)=>p.offset-d.offset),s=new RegExp(e,`${e.flags}d`).exec(t);if(!s||!s.indices)return;let[,...o]=s.indices;if(o.length!==n.length)return;let a=t,l=0;return o.forEach((p,d)=>{if(p){let[m,g]=p,v=a.substring(0,m-l),S=`:${n[d].name}`,b=a.substring(g-l);a=v+S+b,l=l+(g-m-S.length)}}),a};function wAe(t){let e=oe([t,"access",o=>o.route,"optionalAccess",o=>o.path]),r=qg(e),n=Array.isArray(e);if(!e){let[o]=process.versions.node.split(".").map(Number);o>=16&&(e=DAe(t.path,t.regexp,t.keys))}if(!e)return{isRegex:r,isArray:n,numExtraSegments:0};let i=n?Math.max(CAe(e)-Td(t.path||""),0):0;return{layerRoutePath:TAe(n,e),isRegex:r,isArray:n,numExtraSegments:i}}function CAe(t){return t.reduce((e,r)=>e+Td(r.toString()),0)}function TAe(t,e){return t?e.map(r=>r.toString()).join(","):e&&e.toString()}function AAe(t,e,r){let n=oe([t,"optionalAccess",a=>a.split,"call",a=>a("/"),"access",a=>a.filter,"call",a=>a(l=>!!l)]),i=0,s=oe([e,"optionalAccess",a=>a.split,"call",a=>a("/"),"access",a=>a.filter,"call",a=>a(l=>!!l),"access",a=>a.length])||0;return oe([r,"optionalAccess",a=>a.split,"call",a=>a("/"),"access",a=>a.filter,"call",a=>a(l=>oe([n,"optionalAccess",p=>p[s+i]])===l?(i+=1,!0):!1),"access",a=>a.join,"call",a=>a("/")])}c();var Fd=class t{static __initStatic(){this.id="Postgres"}constructor(e={}){this.name=t.id,this._usePgNative=!!e.usePgNative,this._module=e.module}loadDependency(){return this._module=this._module||os("pg")}setupOnce(e,r){if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("Postgres Integration is skipped because of instrumenter configuration.");return}let n=this.loadDependency();if(!n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Postgres Integration was unable to require `pg` package.");return}let i=this._usePgNative?oe([n,"access",s=>s.native,"optionalAccess",s=>s.Client]):n.Client;if(!i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Postgres Integration was unable to access 'pg-native' bindings.");return}Rt(i.prototype,"query",function(s){return function(o,a,l){let d=r().getScope().getSpan(),m={"db.system":"postgresql"};try{this.database&&(m["db.name"]=this.database),this.host&&(m["server.address"]=this.host),this.port&&(m["server.port"]=this.port),this.user&&(m["db.user"]=this.user)}catch{}let g=oe([d,"optionalAccess",S=>S.startChild,"call",S=>S({description:typeof o=="string"?o:o.text,op:"db",origin:"auto.db.postgres",data:m})]);if(typeof l=="function")return s.call(this,o,a,function(S,b){oe([g,"optionalAccess",C=>C.finish,"call",C=>C()]),l(S,b)});if(typeof a=="function")return s.call(this,o,function(S,b){oe([g,"optionalAccess",C=>C.finish,"call",C=>C()]),a(S,b)});let v=typeof a<"u"?s.call(this,o,a):s.call(this,o);return dn(v)?v.then(S=>(oe([g,"optionalAccess",b=>b.finish,"call",b=>b()]),S)):(oe([g,"optionalAccess",S=>S.finish,"call",S=>S()]),v)}})}};Fd.__initStatic();c();var Nd=class t{static __initStatic(){this.id="Mysql"}constructor(){this.name=t.id}loadDependency(){return this._module=this._module||os("mysql/lib/Connection.js")}setupOnce(e,r){if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("Mysql Integration is skipped because of instrumenter configuration.");return}let n=this.loadDependency();if(!n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Mysql Integration was unable to require `mysql` package.");return}let i;try{n.prototype.connect=new Proxy(n.prototype.connect,{apply(a,l,p){return i||(i=l.config),a.apply(l,p)}})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Mysql Integration was unable to instrument `mysql` config.")}function s(){return i?{"server.address":i.host,"server.port":i.port,"db.user":i.user}:{}}function o(a){if(!a||a.endTimestamp)return;let l=s();Object.keys(l).forEach(p=>{a.setData(p,l[p])}),a.finish()}Rt(n,"createQuery",function(a){return function(l,p,d){let g=r().getScope().getSpan(),v=oe([g,"optionalAccess",b=>b.startChild,"call",b=>b({description:typeof l=="string"?l:l.sql,op:"db",origin:"auto.db.mysql",data:{"db.system":"mysql"}})]);if(typeof d=="function")return a.call(this,l,p,function(b,C,T){o(v),d(b,C,T)});if(typeof p=="function")return a.call(this,l,function(b,C,T){o(v),p(b,C,T)});let S=a.call(this,l,p);return S.on("end",()=>{o(v)}),S}})}};Nd.__initStatic();c();var OAe=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],RAe={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};function IAe(t){return t&&typeof t=="object"&&t.once&&typeof t.once=="function"}var Pd=class t{static __initStatic(){this.id="Mongo"}constructor(e={}){this.name=t.id,this._operations=Array.isArray(e.operations)?e.operations:OAe,this._describeOperations="describeOperations"in e?e.describeOperations:!0,this._useMongoose=!!e.useMongoose}loadDependency(){let e=this._useMongoose?"mongoose":"mongodb";return this._module=this._module||os(e)}setupOnce(e,r){if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("Mongo Integration is skipped because of instrumenter configuration.");return}let n=this.loadDependency();if(!n){let i=this._useMongoose?"mongoose":"mongodb";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error(`Mongo Integration was unable to require \`${i}\` package.`);return}this._instrumentOperations(n.Collection,this._operations,r)}_instrumentOperations(e,r,n){r.forEach(i=>this._patchOperation(e,i,n))}_patchOperation(e,r,n){if(!(r in e.prototype))return;let i=this._getSpanContextFromOperationArguments.bind(this);Rt(e.prototype,r,function(s){return function(...o){let a=o[o.length-1],p=n().getScope().getSpan();if(typeof a!="function"||r==="mapReduce"&&o.length===2){let m=oe([p,"optionalAccess",v=>v.startChild,"call",v=>v(i(this,r,o))]),g=s.call(this,...o);if(dn(g))return g.then(v=>(oe([m,"optionalAccess",S=>S.finish,"call",S=>S()]),v));if(IAe(g)){let v=g;try{v.once("close",()=>{oe([m,"optionalAccess",S=>S.finish,"call",S=>S()])})}catch{oe([m,"optionalAccess",b=>b.finish,"call",b=>b()])}return v}else return oe([m,"optionalAccess",v=>v.finish,"call",v=>v()]),g}let d=oe([p,"optionalAccess",m=>m.startChild,"call",m=>m(i(this,r,o.slice(0,-1)))]);return s.call(this,...o.slice(0,-1),function(m,g){oe([d,"optionalAccess",v=>v.finish,"call",v=>v()]),a(m,g)})}})}_getSpanContextFromOperationArguments(e,r,n){let i={"db.system":"mongodb","db.name":e.dbName,"db.operation":r,"db.mongodb.collection":e.collectionName},s={op:"db",origin:"auto.db.mongo",description:r,data:i},o=RAe[r],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(r):this._describeOperations;if(!o||!a)return s;try{if(r==="mapReduce"){let[l,p]=n;i[o[0]]=typeof l=="string"?l:l.name||"<anonymous>",i[o[1]]=typeof p=="string"?p:p.name||"<anonymous>"}else for(let l=0;l<o.length;l++)i[`db.mongodb.${o[l]}`]=JSON.stringify(n[l])}catch{}return s}};Pd.__initStatic();c();function FAe(t){return!!t&&!!t.$use}var Ld=class t{static __initStatic(){this.id="Prisma"}constructor(e={}){if(this.name=t.id,FAe(e.client)&&!e.client._sentryInstrumented){Sa(e.client,"_sentryInstrumented",!0);let r={};try{let n=e.client._engineConfig;if(n){let{activeProvider:i,clientVersion:s}=n;i&&(r["db.system"]=i),s&&(r["db.prisma.version"]=s)}}catch{}e.client.$use((n,i)=>{if(pi(pt))return i(n);let s=n.action,o=n.model;return QS({name:o?`${o} ${s}`:s,op:"db.sql.prisma",origin:"auto.db.prisma",data:{...r,"db.operation":s}},()=>i(n))})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("Unsupported Prisma client provided to PrismaIntegration. Provided client:",e.client)}setupOnce(){}};Ld.__initStatic();c();var kd=class t{static __initStatic(){this.id="GraphQL"}constructor(){this.name=t.id}loadDependency(){return this._module=this._module||os("graphql/execution/execute.js")}setupOnce(e,r){if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("GraphQL Integration is skipped because of instrumenter configuration.");return}let n=this.loadDependency();if(!n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("GraphQL Integration was unable to require graphql/execution package.");return}Rt(n,"execute",function(i){return function(...s){let o=r().getScope(),a=o.getSpan(),l=oe([a,"optionalAccess",d=>d.startChild,"call",d=>d({description:"execute",op:"graphql.execute",origin:"auto.graphql.graphql"})]);oe([o,"optionalAccess",d=>d.setSpan,"call",d=>d(l)]);let p=i.call(this,...s);return dn(p)?p.then(d=>(oe([l,"optionalAccess",m=>m.finish,"call",m=>m()]),oe([o,"optionalAccess",m=>m.setSpan,"call",m=>m(a)]),d)):(oe([l,"optionalAccess",d=>d.finish,"call",d=>d()]),oe([o,"optionalAccess",d=>d.setSpan,"call",d=>d(a)]),p)}})}};kd.__initStatic();c();var Bd=class t{static __initStatic(){this.id="Apollo"}constructor(e={useNestjs:!1}){this.name=t.id,this._useNest=!!e.useNestjs}loadDependency(){return this._useNest?this._module=this._module||os("@nestjs/graphql"):this._module=this._module||os("apollo-server-core"),this._module}setupOnce(e,r){if(pi(r)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("Apollo Integration is skipped because of instrumenter configuration.");return}if(this._useNest){let n=this.loadDependency();if(!n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package.");return}Rt(n.GraphQLFactory.prototype,"mergeWithSchema",function(i){return function(...s){return Rt(this.resolversExplorerService,"explore",function(o){return function(){let a=bl(o.call(this));return K7(a,r)}}),i.call(this,...s)}})}else{let n=this.loadDependency();if(!n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error("Apollo Integration was unable to require apollo-server-core package.");return}Rt(n.ApolloServerBase.prototype,"constructSchema",function(i){return function(){if(!this.config.resolvers)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this.config.schema?(re.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),re.warn()):this.config.modules&&re.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),re.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),i.call(this);let s=bl(this.config.resolvers);return this.config.resolvers=K7(s,r),i.call(this)}})}}};Bd.__initStatic();function K7(t,e){return t.map(r=>(Object.keys(r).forEach(n=>{Object.keys(r[n]).forEach(i=>{typeof r[n][i]=="function"&&NAe(r,n,i,e)})}),r))}function NAe(t,e,r,n){Rt(t[e],r,function(i){return function(...s){let a=n().getScope().getSpan(),l=oe([a,"optionalAccess",d=>d.startChild,"call",d=>d({description:`${e}.${r}`,op:"graphql.resolve",origin:"auto.graphql.apollo"})]),p=i.call(this,...s);return dn(p)?p.then(d=>(oe([l,"optionalAccess",m=>m.finish,"call",m=>m()]),d)):(oe([l,"optionalAccess",d=>d.finish,"call",d=>d()]),p)}})}c();import*as X7 from"os";import{TextEncoder as PAe}from"util";var a_=class extends e_{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.node",packages:[{name:"npm:@sentry/node",version:r_}],version:r_},e.transportOptions={textEncoder:new PAe,...e.transportOptions};let r={...e,platform:"node",runtime:{name:"node",version:global.process.version},serverName:e.serverName||global.process.env.SENTRY_NAME||X7.hostname()};super(r)}};c();var uY=L(aY());import*as eOe from"http";import*as tOe from"https";import{Readable as rOe}from"stream";import{URL as cY}from"url";import{createGzip as nOe}from"zlib";var iOe=1024*32;function sOe(t){return new rOe({read(){this.push(t),this.push(null)}})}function yF(t){let e;try{e=new cY(t.url)}catch{return console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used."),t_(t,()=>Promise.resolve({}))}let r=e.protocol==="https:",n=oOe(e,t.proxy||(r?process.env.https_proxy:void 0)||process.env.http_proxy),i=r?tOe:eOe,s=t.keepAlive===void 0?!1:t.keepAlive,o=n?new uY.HttpsProxyAgent(n):new i.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=aOe(t,o_(t.httpModule,()=>i),o);return t_(t,a)}function oOe(t,e){let{no_proxy:r}=process.env;if(!(r&&r.split(",").some(i=>t.host.endsWith(i)||t.hostname.endsWith(i))))return e}function aOe(t,e,r){let{hostname:n,pathname:i,port:s,protocol:o,search:a}=new cY(t.url);return function(p){return new Promise((d,m)=>{let g=sOe(p.body),v={...t.headers};p.body.length>iOe&&(v["content-encoding"]="gzip",g=g.pipe(nOe()));let S=e.request({method:"POST",agent:r,headers:v,hostname:n,path:`${i}${a}`,port:s,protocol:o,ca:t.caCerts},b=>{b.on("data",()=>{}),b.on("end",()=>{}),b.setEncoding("utf8");let C=o_(b.headers["retry-after"],()=>null),T=o_(b.headers["x-sentry-rate-limits"],()=>null);d({statusCode:b.statusCode,headers:{"retry-after":C,"x-sentry-rate-limits":Array.isArray(T)?T[0]:T}})});S.on("error",m),g.pipe(S)})}}c();c();import{posix as uOe,sep as cOe}from"path";var lOe=cOe==="\\";function fOe(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function lY(t,e=lOe){if(!t)return;let r=e?fOe(t):t,{root:n,dir:i,base:s,ext:o}=uOe.parse(r),l=`${B&&B.main&&B.main.filename&&i||global.process.cwd()}/`,p=s;(o===".js"||o===".mjs"||o===".cjs")&&(p=p.slice(0,o.length*-1)),!n&&!i&&(i=".");let d=i.lastIndexOf("/node_modules/");if(d>-1)return`${i.slice(d+14).replace(/\//g,".")}:${p}`;if(d=`${i}/`.lastIndexOf(l,0),d===0){let m=i.slice(l.length).replace(/\//g,".");return m&&(m+=":"),m+=p,m}return p}c();var Gs=PI(process.versions.node);c();import*as fY from"util";var Ol=class t{constructor(){t.prototype.__init.call(this)}static __initStatic(){this.id="Console"}__init(){this.name=t.id}setupOnce(){Cd("console",({args:e,level:r})=>{let n=pt();n.getIntegration(t)&&n.addBreadcrumb({category:"console",level:WI(r),message:fY.format.apply(void 0,e)},{input:[...e],level:r})})}};Ol.__initStatic();c();c();import{URL as EF}from"url";function dY(t){let{protocol:e,hostname:r,port:n}=mY(t),i=t.path?t.path:"/";return`${e}//${r}${n}${i}`}function vF(t){let{protocol:e,hostname:r,port:n}=mY(t),i=t.pathname||"/",s=t.auth?pOe(t.auth):"";return`${e}//${s}${r}${n}${i}`}function pOe(t){let[e,r]=t.split(":");return`${e?"[Filtered]":""}:${r?"[Filtered]":""}@`}function xF(t,e,r){if(!t)return t;let[n,i]=t.split(" ");return e.host&&!e.protocol&&(e.protocol=oe([r,"optionalAccess",s=>s.agent,"optionalAccess",s=>s.protocol]),i=vF(e)),oe([i,"optionalAccess",s=>s.startsWith,"call",s=>s("///")])&&(i=i.slice(2)),`${n} ${i}`}function pY(t){let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:`${t.pathname||""}${t.search||""}`,href:t.href};return t.port!==""&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username}:${t.password}`),e}function hY(t,e){let r,n;if(typeof e[e.length-1]=="function"&&(r=e.pop()),typeof e[0]=="string")n=pY(new EF(e[0]));else if(e[0]instanceof EF)n=pY(e[0]);else{n=e[0];try{let i=new EF(n.path||"",`${n.protocol||"http:"}//${n.hostname}`);n={pathname:i.pathname,search:i.search,hash:i.hash,...n}}catch{}}return e.length===2&&(n={...n,...e[1]}),n.protocol===void 0&&(Gs.major&&Gs.major>8?n.protocol=oe([oe([t,"optionalAccess",i=>i.globalAgent]),"optionalAccess",i=>i.protocol])||oe([n.agent,"optionalAccess",i=>i.protocol])||oe([n._defaultAgent,"optionalAccess",i=>i.protocol]):n.protocol=oe([n.agent,"optionalAccess",i=>i.protocol])||oe([n._defaultAgent,"optionalAccess",i=>i.protocol])||oe([oe([t,"optionalAccess",i=>i.globalAgent]),"optionalAccess",i=>i.protocol])),r?[n,r]:[n]}function mY(t){let e=t.protocol||"",r=t.hostname||t.host||"",n=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(r)?"":`:${t.port}`;return{protocol:e,hostname:r,port:n}}var Wu=class t{static __initStatic(){this.id="Http"}__init(){this.name=t.id}constructor(e={}){t.prototype.__init.call(this),this._breadcrumbs=typeof e.breadcrumbs>"u"?!0:e.breadcrumbs,this._tracing=e.tracing?e.tracing===!0?{}:e.tracing:void 0}setupOnce(e,r){if(!this._breadcrumbs&&!this._tracing)return;let n=oe([r,"call",l=>l(),"access",l=>l.getClient,"call",l=>l(),"optionalAccess",l=>l.getOptions,"call",l=>l()]);if(n&&n.instrumenter!=="sentry"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log("HTTP Integration is skipped because of instrumenter configuration.");return}let i=oe([this,"access",l=>l._tracing,"optionalAccess",l=>l.shouldCreateSpanForRequest])||oe([n,"optionalAccess",l=>l.shouldCreateSpanForRequest]),s=oe([n,"optionalAccess",l=>l.tracePropagationTargets])||oe([this,"access",l=>l._tracing,"optionalAccess",l=>l.tracePropagationTargets]),o=B("http"),a=gY(o,this._breadcrumbs,i,s);if(Rt(o,"get",a),Rt(o,"request",a),Gs.major&&Gs.major>8){let l=B("https"),p=gY(l,this._breadcrumbs,i,s);Rt(l,"get",p),Rt(l,"request",p)}}};Wu.__initStatic();function gY(t,e,r,n){let i=new Fi(100),s=new Fi(100),o=p=>{if(r===void 0)return!0;let d=i.get(p);if(d!==void 0)return d;let m=r(p);return i.set(p,m),m},a=p=>{if(n===void 0)return!0;let d=s.get(p);if(d!==void 0)return d;let m=Oo(p,n);return s.set(p,m),m};function l(p,d,m,g){pt().getIntegration(Wu)&&pt().addBreadcrumb({category:"http",data:{status_code:g&&g.statusCode,...d},type:"http"},{event:p,request:m,response:g})}return function(d){return function(...g){let v=hY(t,g),S=v[0],b=dY(S),C=vF(S);if(Tl(C,pt()))return d.apply(t,v);let T=pt(),N=T.getScope(),I=N.getSpan(),P=dOe(C,S),M=o(b)?oe([I,"optionalAccess",U=>U.startChild,"call",U=>U({op:"http.client",origin:"auto.http.node.http",description:`${P["http.method"]} ${P.url}`,data:P})]):void 0;if(a(b))if(M){let U=M.toTraceparent(),K=oe([M,"optionalAccess",ue=>ue.transaction,"optionalAccess",ue=>ue.getDynamicSamplingContext,"call",ue=>ue()]);_Y(S,C,U,K)}else{let U=T.getClient(),{traceId:K,sampled:ue,dsc:Z}=N.getPropagationContext(),_e=Cl(K,void 0,ue),z=Z||(U?Hs(K,U,N):void 0);_Y(S,C,_e,z)}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log(`[Tracing] Not adding sentry-trace header to outgoing request (${C}) due to mismatching tracePropagationTargets option.`);return d.apply(t,v).once("response",function(U){let K=this;e&&l("response",P,K,U),M&&(U.statusCode&&M.setHttpStatus(U.statusCode),M.description=xF(M.description,S,K),M.finish())}).once("error",function(){let U=this;e&&l("error",P,U),M&&(M.setHttpStatus(500),M.description=xF(M.description,S,U),M.finish())})}}}function _Y(t,e,r,n){if((t.headers||{})["sentry-trace"])return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.log(`[Tracing] Adding sentry-trace header ${r} to outgoing request to "${e}": `);let s=Ad(n),o=s&&s.length>0?hOe(t,s):void 0;t.headers={...t.headers,"sentry-trace":r,...o&&{baggage:o}}}function dOe(t,e){let r=e.method||"GET",n={url:t,"http.method":r};return e.hash&&(n["http.fragment"]=e.hash.substring(1)),e.search&&(n["http.query"]=e.search.substring(1)),n}function hOe(t,e){if(!t.headers||!t.headers.baggage)return e;if(e){if(Array.isArray(t.headers.baggage))return[...t.headers.baggage,e]}else return t.headers.baggage;return[t.headers.baggage,e]}c();c();var mOe=2e3;function p_(t){console.error(t);let e=pt().getClient();e===void 0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1));let r=e.getOptions(),n=r&&r.shutdownTimeout&&r.shutdownTimeout>0&&r.shutdownTimeout||mOe;e.close(n).then(i=>{i||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},i=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.error(i)})}var Rl=class t{static __initStatic(){this.id="OnUncaughtException"}__init(){this.name=t.id}__init2(){this.handler=this._makeErrorHandler()}constructor(e={}){t.prototype.__init.call(this),t.prototype.__init2.call(this),this._options={exitEvenIfOtherHandlersAreRegistered:!0,...e}}setupOnce(){global.process.on("uncaughtException",this.handler)}_makeErrorHandler(){let r=!1,n=!1,i=!1,s;return o=>{let a=p_,l=pt().getClient();this._options.onFatalError?a=this._options.onFatalError:l&&l.getOptions().onFatalError&&(a=l.getOptions().onFatalError);let d=global.process.listeners("uncaughtException").reduce((g,v)=>v.name==="domainUncaughtExceptionClear"||v.tag&&v.tag==="sentry_tracingErrorCallback"||v===this.handler?g:g+1,0)===0,m=this._options.exitEvenIfOtherHandlersAreRegistered||d;if(r)m&&(i?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&re.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),p_(o)):n||(n=!0,setTimeout(()=>{i||(i=!0,a(s,o))},2e3)));else{let g=pt();s=o,r=!0,g.getIntegration(t)?g.withScope(v=>{v.setLevel("fatal"),g.captureException(o,{originalException:o,data:{mechanism:{handled:!1,type:"onuncaughtexception"}}}),!i&&m&&(i=!0,a(o))}):!i&&m&&(i=!0,a(o))}}}};Rl.__initStatic();c();var Il=class t{static __initStatic(){this.id="OnUnhandledRejection"}__init(){this.name=t.id}constructor(e={mode:"warn"}){this._options=e,t.prototype.__init.call(this)}setupOnce(){global.process.on("unhandledRejection",this.sendUnhandledPromise.bind(this))}sendUnhandledPromise(e,r){let n=pt();n.getIntegration(t)&&n.withScope(i=>{i.setExtra("unhandledPromiseRejection",!0),n.captureException(e,{originalException:r,data:{mechanism:{handled:!1,type:"onunhandledrejection"}}})}),this._handleRejection(e)}_handleRejection(e){let r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";this._options.mode==="warn"?Sl(()=>{console.warn(r),console.error(e&&e.stack?e.stack:e)}):this._options.mode==="strict"&&(Sl(()=>{console.warn(r)}),p_(e))}};Il.__initStatic();c();import{existsSync as gOe,readFileSync as _Oe}from"fs";import{dirname as yOe,join as EOe}from"path";var SF;function vOe(){try{return B.cache?Object.keys(B.cache):[]}catch{return[]}}function xOe(){let t=B.main&&B.main.paths||[],e=vOe(),r={},n={};return e.forEach(i=>{let s=i,o=()=>{let a=s;if(s=yOe(a),!s||a===s||n[a])return;if(t.indexOf(s)<0)return o();let l=EOe(a,"package.json");if(n[a]=!0,!gOe(l))return o();try{let p=JSON.parse(_Oe(l,"utf8"));r[p.name]=p.version}catch{}};o()}),r}var Fl=class t{constructor(){t.prototype.__init.call(this)}static __initStatic(){this.id="Modules"}__init(){this.name=t.id}setupOnce(e,r){e(n=>r().getIntegration(t)?{...n,modules:{...n.modules,...this._getModules()}}:n)}_getModules(){return SF||(SF=xOe()),SF}};Fl.__initStatic();c();import{readFile as SOe}from"fs";var ib=new Fi(100),bOe=7;function DOe(t){return new Promise((e,r)=>{SOe(t,"utf8",(n,i)=>{n?r(n):e(i)})})}var Nl=class t{static __initStatic(){this.id="ContextLines"}__init(){this.name=t.id}constructor(e={}){this._options=e,t.prototype.__init.call(this)}get _contextLines(){return this._options.frameContextLines!==void 0?this._options.frameContextLines:bOe}setupOnce(e,r){e(n=>r().getIntegration(t)?this.addSourceContext(n):n)}async addSourceContext(e){let r={},n=[];if(this._contextLines>0&&oe([e,"access",i=>i.exception,"optionalAccess",i=>i.values])){for(let i of e.exception.values)if(oe([i,"access",s=>s.stacktrace,"optionalAccess",s=>s.frames]))for(let s=i.stacktrace.frames.length-1;s>=0;s--){let o=i.stacktrace.frames[s];o.filename&&!r[o.filename]&&!ib.get(o.filename)&&(n.push(wOe(o.filename)),r[o.filename]=1)}}if(n.length>0&&await Promise.all(n),this._contextLines>0&&oe([e,"access",i=>i.exception,"optionalAccess",i=>i.values]))for(let i of e.exception.values)i.stacktrace&&i.stacktrace.frames&&await this.addSourceContextToFrames(i.stacktrace.frames);return e}addSourceContextToFrames(e){for(let r of e)if(r.filename&&r.context_line===void 0){let n=ib.get(r.filename);if(n)try{LI(n,r,this._contextLines)}catch{}}}};Nl.__initStatic();async function wOe(t){let e=ib.get(t);if(e===null)return null;if(e!==void 0)return e;let r=null;try{r=(await DOe(t)).split(`
215
- `)}catch{}return ib.set(t,r),r}c();import{execFile as COe}from"child_process";import{readFile as TOe,readdir as AOe}from"fs";import*as jr from"os";import{join as OOe}from"path";import{promisify as EY}from"util";var ROe=EY(TOe),IOe=EY(AOe),Pl=class t{static __initStatic(){this.id="Context"}__init(){this.name=t.id}constructor(e={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0}){this._options=e,t.prototype.__init.call(this)}setupOnce(e){e(r=>this.addContext(r))}async addContext(e){this._cachedContext===void 0&&(this._cachedContext=this._getContexts());let r=this._updateContext(await this._cachedContext);return e.contexts={...e.contexts,app:{...r.app,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.app])},os:{...r.os,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.os])},device:{...r.device,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.device])},culture:{...r.culture,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.culture])},cloud_resource:{...r.cloud_resource,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.cloud_resource])}},e}_updateContext(e){return oe([e,"optionalAccess",r=>r.app,"optionalAccess",r=>r.app_memory])&&(e.app.app_memory=process.memoryUsage().rss),oe([e,"optionalAccess",r=>r.device,"optionalAccess",r=>r.free_memory])&&(e.device.free_memory=jr.freemem()),e}async _getContexts(){let e={};if(this._options.os&&(e.os=await FOe()),this._options.app&&(e.app=POe()),this._options.device&&(e.device=LOe(this._options.device)),this._options.culture){let r=NOe();r&&(e.culture=r)}return this._options.cloudResource&&(e.cloud_resource=qOe()),e}};Pl.__initStatic();async function FOe(){let t=jr.platform();switch(t){case"darwin":return UOe();case"linux":return jOe();default:return{name:kOe[t]||t,version:jr.release()}}}function NOe(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let r=Intl.DateTimeFormat().resolvedOptions();return{locale:r.locale,timezone:r.timeZone}}}catch{}}function POe(){let t=process.memoryUsage().rss;return{app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t}}function LOe(t){let e={},r;try{r=jr.uptime&&jr.uptime()}catch{}if(typeof r=="number"&&(e.boot_time=new Date(Date.now()-r*1e3).toISOString()),e.arch=jr.arch(),(t===!0||t.memory)&&(e.memory_size=jr.totalmem(),e.free_memory=jr.freemem()),t===!0||t.cpu){let n=jr.cpus();if(n&&n.length){let i=n[0];e.processor_count=n.length,e.cpu_description=i.model,e.processor_frequency=i.speed}}return e}var kOe={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},BOe=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],MOe={alpine:t=>t,arch:t=>Ro(/distrib_release=(.*)/,t),centos:t=>Ro(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>Ro(/release (..)/,t),mint:t=>Ro(/distrib_release=(.*)/,t),red:t=>Ro(/release ([^ ]+)/,t),suse:t=>Ro(/VERSION = (.*)\n/,t),ubuntu:t=>Ro(/distrib_release=(.*)/,t)};function Ro(t,e){let r=t.exec(e);return r?r[1]:void 0}async function UOe(){let t={kernel_version:jr.release(),name:"Mac OS X",version:`10.${Number(jr.release().split(".")[0])-4}`};try{let e=await new Promise((r,n)=>{COe("/usr/bin/sw_vers",(i,s)=>{if(i){n(i);return}r(s)})});t.name=Ro(/^ProductName:\s+(.*)$/m,e),t.version=Ro(/^ProductVersion:\s+(.*)$/m,e),t.build=Ro(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function yY(t){return t.split(" ")[0].toLowerCase()}async function jOe(){let t={kernel_version:jr.release(),name:"Linux"};try{let e=await IOe("/etc"),r=BOe.find(a=>e.includes(a.name));if(!r)return t;let n=OOe("/etc",r.name),i=(await ROe(n,{encoding:"utf-8"})).toLowerCase(),{distros:s}=r;t.name=s.find(a=>i.indexOf(yY(a))>=0)||s[0];let o=yY(t.name);t.version=MOe[o](i)}catch{}return t}function qOe(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}c();c();import*as bY from"url";c();function vY(t){let e={},r=0;for(;r<t.length;){let n=t.indexOf("=",r);if(n===-1)break;let i=t.indexOf(";",r);if(i===-1)i=t.length;else if(i<n){r=t.lastIndexOf(";",n-1)+1;continue}let s=t.slice(r,n).trim();if(e[s]===void 0){let o=t.slice(n+1,i).trim();o.charCodeAt(0)===34&&(o=o.slice(1,-1));try{e[s]=o.indexOf("%")!==-1?decodeURIComponent(o):o}catch{e[s]=o}}r=i+1}return e}var HOe={ip:!1,request:!0,transaction:!0,user:!0},GOe=["cookies","data","headers","method","query_string","url"],$Oe=["id","username","email"];function xY(t,e={}){let r=t.method&&t.method.toUpperCase(),n="",i="url";e.customRoute||t.route?(n=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(n=qu(t.originalUrl||t.url||""));let s="";return e.method&&r&&(s+=r),e.method&&e.path&&(s+=" "),e.path&&n&&(s+=n),[s,i]}function zOe(t,e){switch(e){case"path":return xY(t,{path:!0})[0];case"handler":return t.route&&t.route.stack&&t.route.stack[0]&&t.route.stack[0].name||"<anonymous>";case"methodPath":default:{let r=t._reconstructedRoute?t._reconstructedRoute:void 0;return xY(t,{path:!0,method:!0,customRoute:r})[0]}}}function VOe(t,e){let r={};return(Array.isArray(e)?e:$Oe).forEach(i=>{t&&i in t&&(r[i]=t[i])}),r}function SY(t,e){let{include:r=GOe}=e||{},n={},i=t.headers||{},s=t.method,o=t.hostname||t.host||i.host||"<no host>",a=t.protocol==="https"||t.socket&&t.socket.encrypted?"https":"http",l=t.originalUrl||t.url||"",p=l.startsWith(a)?l:`${a}://${o}${l}`;return r.forEach(d=>{switch(d){case"headers":{n.headers=i,r.includes("cookies")||delete n.headers.cookie;break}case"method":{n.method=s;break}case"url":{n.url=p;break}case"cookies":{n.cookies=t.cookies||i.cookie&&vY(i.cookie)||{};break}case"query_string":{n.query_string=WOe(t);break}case"data":{if(s==="GET"||s==="HEAD")break;t.body!==void 0&&(n.data=Ms(t.body)?t.body:JSON.stringify(Ri(t.body)));break}default:({}).hasOwnProperty.call(t,d)&&(n[d]=t[d])}}),n}function DY(t,e,r){let n={...HOe,...oe([r,"optionalAccess",i=>i.include])};if(n.request){let i=Array.isArray(n.request)?SY(e,{include:n.request}):SY(e);t.request={...t.request,...i}}if(n.user){let i=e.user&&Oi(e.user)?VOe(e.user,n.user):{};Object.keys(i).length&&(t.user={...t.user,...i})}if(n.ip){let i=e.ip||e.socket&&e.socket.remoteAddress;i&&(t.user={...t.user,ip_address:i})}return n.transaction&&!t.transaction&&(t.transaction=zOe(e,n.transaction)),t}function WOe(t){let e=t.originalUrl||t.url||"";if(e)return e.startsWith("/")&&(e=`http://dogs.are.great${e}`),t.query||new bY.URL(e).search.replace("?","")||void 0}var bF={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"},Ll=class t{static __initStatic(){this.id="RequestData"}__init(){this.name=t.id}constructor(e={}){t.prototype.__init.call(this),this._addRequestData=DY,this._options={...bF,...e,include:{method:!0,...bF.include,...e.include,user:e.include&&typeof e.include.user=="boolean"?e.include.user:{...bF.include.user,...(e.include||{}).user}}}}setupOnce(e,r){let{transactionNamingScheme:n}=this._options;e(i=>{let s=r(),o=s.getIntegration(t),{sdkProcessingMetadata:a={}}=i,l=a.request;if(!o||!l)return i;let p=a.requestDataOptionsFromExpressHandler||a.requestDataOptionsFromGCPWrapper||YOe(this._options),d=this._addRequestData(i,l,p);if(i.type==="transaction"||n==="handler")return d;let g=l._sentryTransaction;if(g){let v=JOe(s)==="sentry.javascript.nextjs"?g.name.startsWith("/api"):n!=="path",[S]=Kg(l,{path:!0,method:v,customRoute:g.name});d.transaction=S}return d})}};Ll.__initStatic();function YOe(t){let{transactionNamingScheme:e,include:{ip:r,user:n,...i}}=t,s=[];for(let[a,l]of Object.entries(i))l&&s.push(a);let o;if(n===void 0)o=!0;else if(typeof n=="boolean")o=n;else{let a=[];for(let[l,p]of Object.entries(n))p&&a.push(l);o=a}return{include:{ip:r,user:o,request:s.length!==0?s:void 0,transaction:e}}}function JOe(t){try{return t.getClient().getOptions()._metadata.sdk.name}catch{return}}c();function KOe(t,e,r){let n=0,i=5,s=0;return setInterval(()=>{s===0?n>t&&(i*=2,r(i),i>86400&&(i=86400),s=i):(s-=1,s===0&&e()),n=0},1e3).unref(),()=>{n+=1}}function CY(t){let e=[],r=!1;function n(o){e=[],!r&&(r=!0,t(o))}e.push(n);function i(o){e.push(o)}function s(o){let a=e.pop()||n;try{a(o)}catch{n(o)}}return{add:i,next:s}}var DF=class{constructor(){let{Session:e}=B("inspector");this._session=new e}configureAndConnect(e,r){this._session.connect(),this._session.on("Debugger.paused",n=>{e(n,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,r){this._getProperties(e,n=>{let{add:i,next:s}=CY(r);for(let o of n)if(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&oe([o,"optionalAccess",a=>a.value,"access",a=>a.className])==="Array"){let a=o.value.objectId;i(l=>this._unrollArray(a,o.name,l,s))}else if(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.className])==="Object"){let a=o.value.objectId;i(l=>this._unrollObject(a,o.name,l,s))}else(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])||oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.description]))&&i(a=>this._unrollOther(o,a,s));s({})})}_getProperties(e,r){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(n,i)=>{r(n?[]:i.result)})}_unrollArray(e,r,n,i){this._getProperties(e,s=>{n[r]=s.filter(o=>o.name!=="length"&&!isNaN(parseInt(o.name,10))).sort((o,a)=>parseInt(o.name,10)-parseInt(a.name,10)).map(o=>oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])),i(n)})}_unrollObject(e,r,n,i){this._getProperties(e,s=>{n[r]=s.map(o=>[o.name,oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])]).reduce((o,[a,l])=>(o[a]=l,o),{}),i(n)})}_unrollOther(e,r,n){oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.value])?r[e.name]=e.value.value:oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.description])&&oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.type])!=="function"&&(r[e.name]=`<${e.value.description}>`),n(r)}};function XOe(){try{return new DF}catch{return}}function wY(t){return t!==void 0&&["","?","<anonymous>"].includes(t)}function ZOe(t,e){return t===e||wY(t)&&wY(e)}function TY(t){if(t!==void 0)return t.slice(-10).reduce((e,r)=>`${e},${r.function},${r.lineno},${r.colno}`,"")}function QOe(t,e){if(e!==void 0)return TY(t(e,1))}var kl=class t{static __initStatic(){this.id="LocalVariables"}__init(){this.name=t.id}__init2(){this._cachedFrames=new Fi(20)}constructor(e={},r=XOe()){this._options=e,this._session=r,t.prototype.__init.call(this),t.prototype.__init2.call(this)}setupOnce(e,r){this._setup(e,oe([r,"call",n=>n(),"access",n=>n.getClient,"call",n=>n(),"optionalAccess",n=>n.getOptions,"call",n=>n()]))}_setup(e,r){if(this._session&&oe([r,"optionalAccess",n=>n.includeLocalVariables])){if((Gs.major||0)<18){re.log("The `LocalVariables` integration is only supported on Node >= v18.");return}let i=this._options.captureAllExceptions!==!1;if(this._session.configureAndConnect((s,o)=>this._handlePaused(r.stackParser,s,o),i),i){let s=this._options.maxExceptionsPerSecond||50;this._rateLimiter=KOe(s,()=>{re.log("Local variables rate-limit lifted."),oe([this,"access",o=>o._session,"optionalAccess",o=>o.setPauseOnExceptions,"call",o=>o(!0)])},o=>{re.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${o} seconds.`),oe([this,"access",a=>a._session,"optionalAccess",a=>a.setPauseOnExceptions,"call",a=>a(!1)])})}e(async s=>this._addLocalVariables(s))}}_handlePaused(e,{params:{reason:r,data:n,callFrames:i}},s){if(r!=="exception"&&r!=="promiseRejection"){s();return}oe([this,"access",p=>p._rateLimiter,"optionalCall",p=>p()]);let o=QOe(e,oe([n,"optionalAccess",p=>p.description]));if(o==null){s();return}let{add:a,next:l}=CY(p=>{this._cachedFrames.set(o,p),s()});for(let p=0;p<Math.min(i.length,5);p++){let{scopeChain:d,functionName:m,this:g}=i[p],v=d.find(b=>b.type==="local"),S=g.className==="global"||!g.className?m:`${g.className}.${m}`;if(oe([v,"optionalAccess",b=>b.object,"access",b=>b.objectId])===void 0)a(b=>{b[p]={function:S},l(b)});else{let b=v.object.objectId;a(C=>oe([this,"access",T=>T._session,"optionalAccess",T=>T.getLocalVariables,"call",T=>T(b,N=>{C[p]={function:S,vars:N},l(C)})]))}}l([])}_addLocalVariables(e){for(let r of oe([e,"optionalAccess",n=>n.exception,"optionalAccess",n=>n.values])||[])this._addLocalVariablesToException(r);return e}_addLocalVariablesToException(e){let r=TY(oe([e,"optionalAccess",s=>s.stacktrace,"optionalAccess",s=>s.frames]));if(r===void 0)return;let n=this._cachedFrames.remove(r);if(n===void 0)return;let i=oe([e,"access",s=>s.stacktrace,"optionalAccess",s=>s.frames,"optionalAccess",s=>s.length])||0;for(let s=0;s<i;s++){let o=i-s-1;if(!oe([e,"optionalAccess",a=>a.stacktrace,"optionalAccess",a=>a.frames,"optionalAccess",a=>a[o]])||!n[s])break;n[s].vars===void 0||e.stacktrace.frames[o].in_app===!1||!ZOe(e.stacktrace.frames[o].function,n[s].function)||(e.stacktrace.frames[o].vars=n[s].vars)}}};kl.__initStatic();c();var d_;(function(t){let e="undici:request:create";t.RequestCreate=e;let r="undici:request:headers";t.RequestEnd=r;let n="undici:request:error";t.RequestError=n})(d_||(d_={}));var Bl=class t{static __initStatic(){this.id="Undici"}__init(){this.name=t.id}__init2(){this._createSpanUrlMap=new Fi(100)}__init3(){this._headersUrlMap=new Fi(100)}constructor(e={}){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),t.prototype.__init5.call(this),t.prototype.__init6.call(this),this._options={breadcrumbs:e.breadcrumbs===void 0?!0:e.breadcrumbs,shouldCreateSpanForRequest:e.shouldCreateSpanForRequest}}setupOnce(e){if(Gs.major&&Gs.major<16)return;let r;try{r=ju(module,"diagnostics_channel")}catch{}!r||!r.subscribe||(r.subscribe(d_.RequestCreate,this._onRequestCreate),r.subscribe(d_.RequestEnd,this._onRequestEnd),r.subscribe(d_.RequestError,this._onRequestError))}_shouldCreateSpan(e){if(this._options.shouldCreateSpanForRequest===void 0)return!0;let r=this._createSpanUrlMap.get(e);if(r!==void 0)return r;let n=this._options.shouldCreateSpanForRequest(e);return this._createSpanUrlMap.set(e,n),n}__init4(){this._onRequestCreate=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n}=e,i=n.origin?n.origin.toString()+n.path:n.path;if(Tl(i,r)||n.__sentry_span__!==void 0)return;let s=r.getClient();if(!s)return;let o=s.getOptions(),a=r.getScope(),l=a.getSpan(),p=this._shouldCreateSpan(i)?eRe(l,n,i):void 0;if(p&&(n.__sentry_span__=p),(m=>{if(o.tracePropagationTargets===void 0)return!0;let g=this._headersUrlMap.get(m);if(g!==void 0)return g;let v=Oo(m,o.tracePropagationTargets);return this._headersUrlMap.set(m,v),v})(i))if(p){let m=oe([p,"optionalAccess",v=>v.transaction,"optionalAccess",v=>v.getDynamicSamplingContext,"call",v=>v()]),g=Ad(m);AY(n,p.toTraceparent(),g)}else{let{traceId:m,sampled:g,dsc:v}=a.getPropagationContext(),S=Cl(m,void 0,g),b=v||Hs(m,s,a),C=Ad(b);AY(n,S,C)}}}__init5(){this._onRequestEnd=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n,response:i}=e,s=n.origin?n.origin.toString()+n.path:n.path;if(Tl(s,r))return;let o=n.__sentry_span__;o&&(o.setHttpStatus(i.statusCode),o.finish()),this._options.breadcrumbs&&r.addBreadcrumb({category:"http",data:{method:n.method,status_code:i.statusCode,url:s},type:"http"},{event:"response",request:n,response:i})}}__init6(){this._onRequestError=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n}=e,i=n.origin?n.origin.toString()+n.path:n.path;if(Tl(i,r))return;let s=n.__sentry_span__;s&&(s.setStatus("internal_error"),s.finish()),this._options.breadcrumbs&&r.addBreadcrumb({category:"http",data:{method:n.method,url:i},level:"error",type:"http"},{event:"error",request:n})}}};Bl.__initStatic();function AY(t,e,r){t.__sentry_has_headers__||(t.addHeader("sentry-trace",e),r&&t.addHeader("baggage",r),t.__sentry_has_headers__=!0)}function eRe(t,e,r){let n=zI(r),i=e.method||"GET",s={"http.method":i};return n.search&&(s["http.query"]=n.search),n.hash&&(s["http.fragment"]=n.hash),oe([t,"optionalAccess",o=>o.startChild,"call",o=>o({op:"http.client",origin:"auto.http.node.undici",description:`${i} ${VI(n)}`,data:s})])}var wF=[new Vu.InboundFilters,new Vu.FunctionToString,new Vu.LinkedErrors,new Ol,new Wu,new Bl,new Rl,new Il,new Nl,new kl,new Pl,new Fl,new Ll];var CF=BI(MI(lY));var TF={};$f(TF,{Console:()=>Ol,Context:()=>Pl,ContextLines:()=>Nl,Http:()=>Wu,LocalVariables:()=>kl,Modules:()=>Fl,OnUncaughtException:()=>Rl,OnUnhandledRejection:()=>Il,RequestData:()=>Ll,Undici:()=>Bl});c();var AF={};$f(AF,{Apollo:()=>Bd,Express:()=>Id,GraphQL:()=>kd,Mongo:()=>Pd,Mysql:()=>Nd,Postgres:()=>Fd,Prisma:()=>Ld});c();var Kyt={...Vu,...TF,...AF};var OF=L(Xc(),1);import tRe from"node:events";var rRe=(t,e,{data:r}={})=>{if(!sa(e))return;let n=(0,OY.isType)(e.cliCode,Fp.UnknownFailure)?e.cliCode.error:e;t.withScope(i=>{let s=ag(n);s&&(i.setTag("requestId",s.requestId),i.setContext("requestInfo",zv(s))),n instanceof Error&&i.setContext("error details",{info:OF.default.info(n),fullStack:OF.default.fullStack(n)}),t.captureException(n,{data:r})})};function RY({dsn:t,release:e}){let{sentryDsn:r}=or(),n=new a_({enabled:r!==void 0||!0,dsn:r??t,release:e,integrations:wF.filter(o=>o.name!=="OnUnhandledRejection"&&o.name!=="OnUncaughtException"&&o.name!=="Modules"),stackParser:CF,transport:yF,beforeSend(o){return delete o.server_name,o},normalizeDepth:10}),i=new $u(n),s=new tRe;return{on:s.on.bind(s),reportError:(o,{data:a}={})=>{let l=Vm(o);rRe(i,l,{data:a}),s.emit("errorReported",l)},setContext:(o,a)=>i.setContext(o,a),setUser:o=>i.setUser(o)}}function IF({debugOutputPath:t,...e}){let r=RY(e),n=function({error:s,data:o}){r.reportError(s,{data:o}),jA(IY.default.createElement(xl,{error:s})),U9(t,s),RF.exitCode=1};return{handler:n,errorReporter:r,registerToProcessErrors:function(){RF.on("uncaughtException",s=>{n({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),RF.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||n({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}c();var Ud=L(ne(),1),FY=(0,Ud.createContext)(null),FF=t=>Ud.default.createElement(FY.Provider,{...t}),Ca=()=>{let t=(0,Ud.useContext)(FY);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};var NY=({userCode:t,verificationUri:e})=>{let{reportError:r}=Ca(),[n,i]=(0,hn.useState)(null);return Yi((s,o)=>{o.return&&OS(e).catch(a=>{r(a),i(a)})}),hn.default.createElement(hn.default.Fragment,null,hn.default.createElement(Ot,{i18nKey:"login.instructions_title"}),hn.default.createElement(Te,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},hn.default.createElement(Ot,{i18nKey:"login.instructions_details",components:[hn.default.createElement(te,{skin:"legacyBlue"}),hn.default.createElement(gp,{value:"enter"}),hn.default.createElement(oi,{url:e})],values:{code:t}})),n&&hn.default.createElement(hn.default.Fragment,null,hn.default.createElement(Te,{flexDirection:"column",marginBottom:1},hn.default.createElement(xl,{error:n})),hn.default.createElement(Ot,{i18nKey:"login.error_opening_browser",components:[hn.default.createElement(oi,{url:e})]})))};var LY=({loginFn:t,onLogin:e,onError:r})=>{let n=xc();function i(a){n.report(uI({isSuccess:!1,...a instanceof Error?{errorType:a.name}:{errorType:"unknown",errorMessage:JSON.stringify(a)}})),r(a)}let s=As(async({signal:a},l)=>{try{let p=await t({deviceCode:l,signal:a});n.report(uI({isSuccess:!0})),e(p)}catch(p){i(p)}}),{status:o}=an(async()=>(n.report(y9({})),Yp.requestDeviceCode()),[],{onSuccess:a=>{s.execute(a)},onError:i});return(0,PY.match)(o,{Error:()=>null,Loading:()=>NF.default.createElement(Ar,null),Success:({result:{userCode:a,verificationUri:l}})=>NF.default.createElement(NY,{userCode:a,verificationUri:l})})};c();var PF=L(ne(),1);c();var m_=L(ne(),1),MY=L(Xe(),1);c();var h_=L(ne(),1),kY=L(Xe(),1);var BY=({children:t})=>{let{status:e}=an(eS,[],{onError:()=>{}});return(0,kY.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>h_.default.createElement(h_.default.Fragment,null,r&&h_.default.createElement(Te,{marginBottom:1},h_.default.createElement(Ot,{i18nKey:"login.legacy_auth_notice"})),t)})};var UY=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:n,children:i})=>{let{status:s,merge:o}=an(e,[],{onSuccess:a=>{a&&r(a)},onError:n});return(0,MY.match)(s,{Loading:()=>m_.default.createElement(Ar,null),Error:()=>null,Success:({result:a})=>a===null?m_.default.createElement(vl,{messages:x9},m_.default.createElement(BY,null,m_.default.createElement(LY,{loginFn:t,onLogin:l=>{o({result:l}),r(l)},onError:n}))):i(a)})};var LF=({children:t,onError:e,onLogin:r})=>{let n=pu();return PF.default.createElement(UY,{authStrategy:Fg,onLogin:({userInfo:i})=>r?.(i),onError:e??n},({getAccessToken:i,userInfo:s})=>PF.default.createElement(tS.Provider,{value:{getAccessToken:i,userInfo:s}},t))};var{isLoggedIn:r0t}=Fg;c();var rJ=L(tJ(),1),{program:S0t,createCommand:b0t,createArgument:D0t,createOption:w0t,CommanderError:C0t,InvalidArgumentError:T0t,InvalidOptionArgumentError:A0t,Command:nJ,Argument:O0t,Option:R0t,Help:I0t}=rJ.default;c();import{join as vRe}from"node:path";var iJ="https://22f50012d85a41e78a75ae13d92bd04f@o37417.ingest.sentry.io/4505232975593472",JF="wix-error.log";function sJ(t){return vRe(t,JF)}c();c();var aJ=L(ne(),1);c();var oJ=t=>({newAppNameEntered:({name:e})=>(t.report(g9({name:e})),{succeed({appId:r}){t.report(lI({result:"success",appId:r}))},failed(r){t.report(lI({result:"failure",...r instanceof Error?{errorType:r.name,errorMessage:r.message}:{}}))}}),typeOfCreationSelected:({appType:e})=>t.report(E9({type:e})),existingAppSelectedToExtend:({appName:e,numApps:r,appId:n})=>t.report(m9({appName:e,numApps:r,appId:n}))});function Ml(){let t=xc();return(0,aJ.useMemo)(()=>oJ(t),[t])}c();import{randomUUID as S1e}from"node:crypto";c();c();c();Fs();var PJ=L(NJ()),LJ=L(Wp()),f1e={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},rN=function(){function t(){}return t.prototype.factory=function(e){var r=this;e===void 0&&(e={});var n=it(it({},f1e),e),i=PJ.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(s,o){return _v(r,void 0,void 0,function(){var a,l,p,d,m;return yv(this,function(g){switch(g.label){case 0:return a=o.endpoint||n.endpoint,l=n.baseUrl,p=n.userAgent,d=n.logError,m=p?{headers:{"User-Agent":p}}:{},[4,new LJ.HttpClient({baseURL:l}).get(a,{headers:m,params:s,timeout:30*1e3}).catch(function(v){return d?console.error(v.toJSON()):Promise.reject(v)})];case 1:return g.sent(),[2]}})})}),i},t}();var mvt=new rN;c();import{join as p1e}from"node:path";var d1e=Ee.object({telemetry:Ee.boolean().default(!0)}),h1e="user.config.json";function m1e(){return p1e(lg(),h1e)}async function kJ(){let t=m1e(),r=await ks(t)?await ku(t):{};return d1e.parse(r)}c();import{randomUUID as g1e}from"node:crypto";function nN(t,e){t.updateDefaults(iN(e))}function iN(t){return t?{_client_id:t,_uuid:t,logged_user_id:t,logged_account_id:t,target_account_id:t}:{_client_id:g1e()}}async function sN(t,e){let r=or().biLoggerBaseUrl,n=r?{baseUrl:r}:{},i=iN(e),{telemetry:s}=await kJ();return new rN().factory(n).updateDefaults({localTime:()=>Date.now(),...t,...i}).setMuted(!s).logger()}c();import{uptime as x1e}from"node:process";c();var BJ=L(zC(),1);import _1e from"node:os";import{platform as y1e,version as E1e}from"node:process";function MJ({cliVersion:t,flow:e}){return{...e?{flow:e}:{},cliVersion:t,isCI:BJ.default,nodeVersion:E1e,osName:v1e(),osVersion:_1e.release()}}function v1e(){switch(y1e){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var UJ=()=>Math.round(x1e()*1e3);function oN({biLogger:t,command:e,flow:r,cliVersion:n}){let i={command:e.name(),arguments:e.args.join(",")??"",flags:Object.keys(e.opts()).join(",")};return t.report(v9({...MJ({cliVersion:n,flow:r}),...i,isValid:!0})),{succeed(){t.report(cI({...i,duration:UJ(),isSuccess:!0,isValid:!0}))},failed(s){let o=Np(s)?{errorType:sa(s)?"SystemError":"UserError",errorName:s.name,errorMessage:s.message}:s instanceof Error?{errorType:"UnknownError",errorName:s.name,errorMessage:s.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(s)};t.report(cI({...i,...o,duration:UJ(),isSuccess:!1,isValid:!0}))}}}var qJ="0.0.32";var Hd={name:"@wix/create-app",description:"Create Wix apps",version:qJ,author:"Ihor Machuzhak",bin:"bin/index.cjs",devDependencies:{"@commander-js/extra-typings":"^11.1.0","@types/is-git-url":"^1.0.1","@types/lodash":"^4.14.200","@types/validate-npm-package-name":"^4.0.1","@wix/bi-logger-wix-cli":"^1.31.0","@wix/cli-auth":"workspace:*","@wix/cli-core-definitions":"workspace:*","@wix/cli-error":"workspace:*","@wix/cli-error-reporting":"workspace:*","@wix/cli-fs":"workspace:*","@wix/cli-http-client":"workspace:*","@wix/cli-i18n":"workspace:*","@wix/cli-site-selector":"workspace:*","@wix/cli-telemetry":"workspace:*","@wix/cli-telemetry-react":"workspace:*","@wix/cli-test-overrides":"workspace:*","@wix/cli-ui-kit":"workspace:*","@wix/create-app-definitions":"workspace:*","@wix/dev-center-client":"workspace:*","@wix/gena":"workspace:*","@wix/site-list-client":"workspace:*","@wix/tsup-configs":"workspace:*",commander:"^11.1.0",execa:"^8.0.1",globby:"^13.2.2","is-git-url":"^1.0.0",lodash:"^4.17.21","package-json":"^8.1.1",react:"^18.2.0",semver:"^7.5.4",tempy:"^3.1.0","type-fest":"^3.13.1","validate-npm-package-name":"^5.0.0",variant:"^3.0.0-dev.26",zod:"^3.22.4"},engines:{node:">= 18.16"},files:["bin","build","templates"],perfer:{bundleSize:{files:[{glob:"./build/index.js",maxSize:"400kb"}]}},publishConfig:{registry:"https://registry.npmjs.org/",access:"public",versionBumpStrategy:"manual",logLevel:"verbose"},scripts:{build:"run -T tsup","build:watch":"run build --watch","dev:npm":"npx $INIT_CWD","dev:yarn":"yarn create @wix/app@portal:$INIT_CWD",lint:"run -T lint-package",test:"yarn workspace @wix/create-app-spec run test","test:watch":"yarn workspace @wix/create-app-spec run test:watch",typecheck:"run -T tsc --noEmit"},type:"module",wix:{artifact:{groupId:"com.wixpress",artifactId:"wix-create-app"},validations:{postBuild:["typecheck","lint"]}}};var aN=async(t,e)=>{let r=await sN({cliSessionId:S1e()},e);t.on("errorReported",i=>r.report(_9({errorMessage:i.message,errorType:sa(i)?"SystemError":"UserError",errorName:i.name})));function n(i){let s={name:()=>"create-app",args:i.args,opts:()=>i.opts()};return oN({biLogger:r,command:s,cliVersion:qJ,flow:"Apps"})}return{biLogger:r,reportCommandStartEvent:n}};c();var tn=L(ne(),1),uB=L(Xe(),1);c();var __=L(ne(),1);var HJ=()=>{let{t}=at();return __.default.createElement(Te,{flexDirection:"column",marginBottom:1,rowGap:1},__.default.createElement(te,null,t("create_app.get_started")),__.default.createElement(Ot,{i18nKey:"create_app.more_info_on_app_development",components:[__.default.createElement(oi,{url:"https://wix.to/dVzAH1u"})]}))};c();c();c();var eQ=L(uN(),1),w_=L(VP(),1),D_=L(LZ(),1);import QPe from"node:fs";import eLe from"node:path";c();var tL=L(VP(),1),WZ=L(zZ(),1);import JPe from"node:process";import VZ from"node:fs";import Xd from"node:path";c();function Kd(t){let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}c();import{fileURLToPath as WPe}from"node:url";import{Transform as YPe}from"node:stream";var b_=t=>t instanceof URL?WPe(t):t,Ub=class extends YPe{constructor(e){super({objectMode:!0,transform(r,n,i){i(void 0,e(r)?r:void 0)}})}},jb=t=>t[0]==="!";var YZ={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:!0,dot:!0},JZ="**/.gitignore",KPe=(t,e)=>jb(t)?"!"+Xd.posix.join(e,t.slice(1)):Xd.posix.join(e,t),XPe=(t,e)=>{let r=Kd(Xd.relative(e,Xd.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>KPe(n,r))},ZPe=(t,e)=>{if(e=Kd(e),Xd.isAbsolute(t)){if(Kd(t).startsWith(e))return Xd.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},KZ=(t,e)=>{let r=t.flatMap(i=>XPe(i,e)),n=(0,WZ.default)().add(r);return i=>(i=b_(i),i=ZPe(i,e),i?n.ignores(Kd(i)):!1)},XZ=(t={})=>({cwd:b_(t.cwd)||JPe.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY}),ZZ=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=XZ(e),s=await(0,tL.default)(t,{cwd:r,suppressErrors:n,deep:i,...YZ}),o=await Promise.all(s.map(async a=>({filePath:a,content:await VZ.promises.readFile(a,"utf8")})));return KZ(o,r)},QZ=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=XZ(e),o=tL.default.sync(t,{cwd:r,suppressErrors:n,deep:i,...YZ}).map(a=>({filePath:a,content:VZ.readFileSync(a,"utf8")}));return KZ(o,r)};var tLe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},rL=t=>(t=[...new Set([t].flat())],tLe(t),t),rLe=t=>{if(!t.cwd)return;let e;try{e=QPe.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},tQ=(t={})=>(t={...t,ignore:t.ignore||[],expandDirectories:t.expandDirectories===void 0?!0:t.expandDirectories,cwd:b_(t.cwd)},rLe(t),t),rQ=t=>async(e,r)=>t(rL(e),tQ(r)),qb=t=>(e,r)=>t(rL(e),tQ(r)),nQ=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?rL(e):[];return r&&n.push(JZ),n},nLe=async t=>{let e=nQ(t);return sQ(e.length>0&&await ZZ(e,t))},iQ=t=>{let e=nQ(t);return sQ(e.length>0&&QZ(e,t))},sQ=t=>{let e=new Set;return r=>{let n=r.path||r,i=eLe.normalize(n),s=e.has(i)||t&&t(n);return e.add(i),!s}},oQ=(t,e)=>t.flat().filter(r=>e(r)),iLe=(t,e)=>(0,eQ.default)(t).pipe(new Ub(r=>e(r))),aQ=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>jb(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},uQ=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),cQ=async(t,e)=>{let r=aQ(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=uQ(i,n),o=n?{cwd:n}:void 0;return Promise.all(r.map(async a=>{let{patterns:l,options:p}=a;return[l,p.ignore]=await Promise.all([(0,D_.default)(l,s),(0,D_.default)(p.ignore,o)]),{patterns:l,options:p}}))},nL=(t,e)=>{let r=aQ(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=uQ(i,n),o=n?{cwd:n}:void 0;return r.map(a=>{let{patterns:l,options:p}=a;return l=D_.default.sync(l,s),p.ignore=D_.default.sync(p.ignore,o),{patterns:l,options:p}})},Hb=rQ(async(t,e)=>{let[r,n]=await Promise.all([cQ(t,e),nLe(e)]),i=await Promise.all(r.map(s=>(0,w_.default)(s.patterns,s.options)));return oQ(i,n)}),EDt=qb((t,e)=>{let r=nL(t,e),n=iQ(e),i=r.map(s=>w_.default.sync(s.patterns,s.options));return oQ(i,n)}),vDt=qb((t,e)=>{let r=nL(t,e),n=iQ(e),i=r.map(s=>w_.default.stream(s.patterns,s.options));return iLe(i,n)}),xDt=qb((t,e)=>t.some(r=>w_.default.isDynamicPattern(r,e))),SDt=rQ(cQ),bDt=qb(nL);async function iL(t){return(await Hb(["*"],{ignore:[JF],cwd:t})).length===0}c();var yie=L(eD(),1);c();import{Agent as nje}from"node:http";import{Agent as ije}from"node:https";c();c();c();var nte=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Qke(t){return nte.includes(t)}var eBe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...nte];function tBe(t){return eBe.includes(t)}var rBe=["null","undefined","string","number","bigint","boolean","symbol"];function nBe(t){return rBe.includes(t)}function rh(t){return e=>typeof e===t}var{toString:iBe}=Object.prototype,L_=t=>{let e=iBe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&F.domElement(t))return"HTMLElement";if(tBe(e))return e},kt=t=>e=>L_(e)===t;function F(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(F.observable(t))return"Observable";if(F.array(t))return"Array";if(F.buffer(t))return"Buffer";let e=L_(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}F.undefined=rh("undefined");F.string=rh("string");var sBe=rh("number");F.number=t=>sBe(t)&&!F.nan(t);F.bigint=rh("bigint");F.function_=rh("function");F.null_=t=>t===null;F.class_=t=>F.function_(t)&&t.toString().startsWith("class ");F.boolean=t=>t===!0||t===!1;F.symbol=rh("symbol");F.numericString=t=>F.string(t)&&!F.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));F.array=(t,e)=>Array.isArray(t)?F.function_(e)?t.every(r=>e(r)):!0:!1;F.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;F.blob=t=>kt("Blob")(t);F.nullOrUndefined=t=>F.null_(t)||F.undefined(t);F.object=t=>!F.null_(t)&&(typeof t=="object"||F.function_(t));F.iterable=t=>F.function_(t?.[Symbol.iterator]);F.asyncIterable=t=>F.function_(t?.[Symbol.asyncIterator]);F.generator=t=>F.iterable(t)&&F.function_(t?.next)&&F.function_(t?.throw);F.asyncGenerator=t=>F.asyncIterable(t)&&F.function_(t.next)&&F.function_(t.throw);F.nativePromise=t=>kt("Promise")(t);var oBe=t=>F.function_(t?.then)&&F.function_(t?.catch);F.promise=t=>F.nativePromise(t)||oBe(t);F.generatorFunction=kt("GeneratorFunction");F.asyncGeneratorFunction=t=>L_(t)==="AsyncGeneratorFunction";F.asyncFunction=t=>L_(t)==="AsyncFunction";F.boundFunction=t=>F.function_(t)&&!t.hasOwnProperty("prototype");F.regExp=kt("RegExp");F.date=kt("Date");F.error=kt("Error");F.map=t=>kt("Map")(t);F.set=t=>kt("Set")(t);F.weakMap=t=>kt("WeakMap")(t);F.weakSet=t=>kt("WeakSet")(t);F.weakRef=t=>kt("WeakRef")(t);F.int8Array=kt("Int8Array");F.uint8Array=kt("Uint8Array");F.uint8ClampedArray=kt("Uint8ClampedArray");F.int16Array=kt("Int16Array");F.uint16Array=kt("Uint16Array");F.int32Array=kt("Int32Array");F.uint32Array=kt("Uint32Array");F.float32Array=kt("Float32Array");F.float64Array=kt("Float64Array");F.bigInt64Array=kt("BigInt64Array");F.bigUint64Array=kt("BigUint64Array");F.arrayBuffer=kt("ArrayBuffer");F.sharedArrayBuffer=kt("SharedArrayBuffer");F.dataView=kt("DataView");F.enumCase=(t,e)=>Object.values(e).includes(t);F.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;F.urlInstance=t=>kt("URL")(t);F.urlString=t=>{if(!F.string(t))return!1;try{return new URL(t),!0}catch{return!1}};F.truthy=t=>!!t;F.falsy=t=>!t;F.nan=t=>Number.isNaN(t);F.primitive=t=>F.null_(t)||nBe(typeof t);F.integer=t=>Number.isInteger(t);F.safeInteger=t=>Number.isSafeInteger(t);F.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};F.typedArray=t=>Qke(L_(t));var aBe=t=>F.safeInteger(t)&&t>=0;F.arrayLike=t=>!F.nullOrUndefined(t)&&!F.function_(t)&&aBe(t.length);F.inRange=(t,e)=>{if(F.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(F.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var uBe=1,cBe=["innerHTML","ownerDocument","style","attributes","nodeValue"];F.domElement=t=>F.object(t)&&t.nodeType===uBe&&F.string(t.nodeName)&&!F.plainObject(t)&&cBe.every(e=>e in t);F.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;F.nodeStream=t=>F.object(t)&&F.function_(t.pipe)&&!F.observable(t);F.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var ite=t=>e=>F.integer(e)&&Math.abs(e%2)===t;F.evenInteger=ite(0);F.oddInteger=ite(1);F.emptyArray=t=>F.array(t)&&t.length===0;F.nonEmptyArray=t=>F.array(t)&&t.length>0;F.emptyString=t=>F.string(t)&&t.length===0;var lBe=t=>F.string(t)&&!/\S/.test(t);F.emptyStringOrWhitespace=t=>F.emptyString(t)||lBe(t);F.nonEmptyString=t=>F.string(t)&&t.length>0;F.nonEmptyStringAndNotWhitespace=t=>F.string(t)&&!F.emptyStringOrWhitespace(t);F.emptyObject=t=>F.object(t)&&!F.map(t)&&!F.set(t)&&Object.keys(t).length===0;F.nonEmptyObject=t=>F.object(t)&&!F.map(t)&&!F.set(t)&&Object.keys(t).length>0;F.emptySet=t=>F.set(t)&&t.size===0;F.nonEmptySet=t=>F.set(t)&&t.size>0;F.emptyMap=t=>F.map(t)&&t.size===0;F.nonEmptyMap=t=>F.map(t)&&t.size>0;F.propertyKey=t=>F.any([F.string,F.number,F.symbol],t);F.formData=t=>kt("FormData")(t);F.urlSearchParams=t=>kt("URLSearchParams")(t);var ste=(t,e,r)=>{if(!F.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};F.any=(t,...e)=>(F.array(t)?t:[t]).some(n=>ste(Array.prototype.some,n,e));F.all=(t,...e)=>ste(Array.prototype.every,t,e);var ye=(t,e,r,n={})=>{if(!t){let{multipleValues:i}=n,s=i?`received values of types ${[...new Set(r.map(o=>`\`${F(o)}\``))].join(", ")}`:`received value of type \`${F(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}},ae={undefined:t=>ye(F.undefined(t),"undefined",t),string:t=>ye(F.string(t),"string",t),number:t=>ye(F.number(t),"number",t),bigint:t=>ye(F.bigint(t),"bigint",t),function_:t=>ye(F.function_(t),"Function",t),null_:t=>ye(F.null_(t),"null",t),class_:t=>ye(F.class_(t),"Class",t),boolean:t=>ye(F.boolean(t),"boolean",t),symbol:t=>ye(F.symbol(t),"symbol",t),numericString:t=>ye(F.numericString(t),"string with a number",t),array:(t,e)=>{ye(F.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>ye(F.buffer(t),"Buffer",t),blob:t=>ye(F.blob(t),"Blob",t),nullOrUndefined:t=>ye(F.nullOrUndefined(t),"null or undefined",t),object:t=>ye(F.object(t),"Object",t),iterable:t=>ye(F.iterable(t),"Iterable",t),asyncIterable:t=>ye(F.asyncIterable(t),"AsyncIterable",t),generator:t=>ye(F.generator(t),"Generator",t),asyncGenerator:t=>ye(F.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>ye(F.nativePromise(t),"native Promise",t),promise:t=>ye(F.promise(t),"Promise",t),generatorFunction:t=>ye(F.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>ye(F.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>ye(F.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>ye(F.boundFunction(t),"Function",t),regExp:t=>ye(F.regExp(t),"RegExp",t),date:t=>ye(F.date(t),"Date",t),error:t=>ye(F.error(t),"Error",t),map:t=>ye(F.map(t),"Map",t),set:t=>ye(F.set(t),"Set",t),weakMap:t=>ye(F.weakMap(t),"WeakMap",t),weakSet:t=>ye(F.weakSet(t),"WeakSet",t),weakRef:t=>ye(F.weakRef(t),"WeakRef",t),int8Array:t=>ye(F.int8Array(t),"Int8Array",t),uint8Array:t=>ye(F.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>ye(F.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>ye(F.int16Array(t),"Int16Array",t),uint16Array:t=>ye(F.uint16Array(t),"Uint16Array",t),int32Array:t=>ye(F.int32Array(t),"Int32Array",t),uint32Array:t=>ye(F.uint32Array(t),"Uint32Array",t),float32Array:t=>ye(F.float32Array(t),"Float32Array",t),float64Array:t=>ye(F.float64Array(t),"Float64Array",t),bigInt64Array:t=>ye(F.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>ye(F.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>ye(F.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>ye(F.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>ye(F.dataView(t),"DataView",t),enumCase:(t,e)=>ye(F.enumCase(t,e),"EnumCase",t),urlInstance:t=>ye(F.urlInstance(t),"URL",t),urlString:t=>ye(F.urlString(t),"string with a URL",t),truthy:t=>ye(F.truthy(t),"truthy",t),falsy:t=>ye(F.falsy(t),"falsy",t),nan:t=>ye(F.nan(t),"NaN",t),primitive:t=>ye(F.primitive(t),"primitive",t),integer:t=>ye(F.integer(t),"integer",t),safeInteger:t=>ye(F.safeInteger(t),"integer",t),plainObject:t=>ye(F.plainObject(t),"plain object",t),typedArray:t=>ye(F.typedArray(t),"TypedArray",t),arrayLike:t=>ye(F.arrayLike(t),"array-like",t),domElement:t=>ye(F.domElement(t),"HTMLElement",t),observable:t=>ye(F.observable(t),"Observable",t),nodeStream:t=>ye(F.nodeStream(t),"Node.js Stream",t),infinite:t=>ye(F.infinite(t),"infinite number",t),emptyArray:t=>ye(F.emptyArray(t),"empty array",t),nonEmptyArray:t=>ye(F.nonEmptyArray(t),"non-empty array",t),emptyString:t=>ye(F.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>ye(F.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>ye(F.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>ye(F.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>ye(F.emptyObject(t),"empty object",t),nonEmptyObject:t=>ye(F.nonEmptyObject(t),"non-empty object",t),emptySet:t=>ye(F.emptySet(t),"empty set",t),nonEmptySet:t=>ye(F.nonEmptySet(t),"non-empty set",t),emptyMap:t=>ye(F.emptyMap(t),"empty map",t),nonEmptyMap:t=>ye(F.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>ye(F.propertyKey(t),"PropertyKey",t),formData:t=>ye(F.formData(t),"FormData",t),urlSearchParams:t=>ye(F.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>ye(F.evenInteger(t),"even integer",t),oddInteger:t=>ye(F.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>ye(F.directInstanceOf(t,e),"T",t),inRange:(t,e)=>ye(F.inRange(t,e),"in range",t),any:(t,...e)=>ye(F.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>ye(F.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(F,{class:{value:F.class_},function:{value:F.function_},null:{value:F.null_}});Object.defineProperties(ae,{class:{value:ae.class_},function:{value:ae.function_},null:{value:ae.null_}});var k=F;c();import{EventEmitter as e3e}from"node:events";c();var CL=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},nh=class t{static fn(e){return(...r)=>new t((n,i,s)=>{r.push(s),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let i=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a))},s=a=>{this._isPending=!1,n(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,s,o)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new CL(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(nh.prototype,Promise.prototype);c();function fBe(t){return k.object(t)&&"_onResponse"in t}var lr=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,fBe(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,k.string(r.stack)&&k.string(this.stack)){let i=this.stack.indexOf(this.message)+this.message.length,s=this.stack.slice(i).split(`
215
+ `)}catch{}return ib.set(t,r),r}c();import{execFile as COe}from"child_process";import{readFile as TOe,readdir as AOe}from"fs";import*as jr from"os";import{join as OOe}from"path";import{promisify as EY}from"util";var ROe=EY(TOe),IOe=EY(AOe),Pl=class t{static __initStatic(){this.id="Context"}__init(){this.name=t.id}constructor(e={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0}){this._options=e,t.prototype.__init.call(this)}setupOnce(e){e(r=>this.addContext(r))}async addContext(e){this._cachedContext===void 0&&(this._cachedContext=this._getContexts());let r=this._updateContext(await this._cachedContext);return e.contexts={...e.contexts,app:{...r.app,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.app])},os:{...r.os,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.os])},device:{...r.device,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.device])},culture:{...r.culture,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.culture])},cloud_resource:{...r.cloud_resource,...oe([e,"access",n=>n.contexts,"optionalAccess",n=>n.cloud_resource])}},e}_updateContext(e){return oe([e,"optionalAccess",r=>r.app,"optionalAccess",r=>r.app_memory])&&(e.app.app_memory=process.memoryUsage().rss),oe([e,"optionalAccess",r=>r.device,"optionalAccess",r=>r.free_memory])&&(e.device.free_memory=jr.freemem()),e}async _getContexts(){let e={};if(this._options.os&&(e.os=await FOe()),this._options.app&&(e.app=POe()),this._options.device&&(e.device=LOe(this._options.device)),this._options.culture){let r=NOe();r&&(e.culture=r)}return this._options.cloudResource&&(e.cloud_resource=qOe()),e}};Pl.__initStatic();async function FOe(){let t=jr.platform();switch(t){case"darwin":return UOe();case"linux":return jOe();default:return{name:kOe[t]||t,version:jr.release()}}}function NOe(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let r=Intl.DateTimeFormat().resolvedOptions();return{locale:r.locale,timezone:r.timeZone}}}catch{}}function POe(){let t=process.memoryUsage().rss;return{app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t}}function LOe(t){let e={},r;try{r=jr.uptime&&jr.uptime()}catch{}if(typeof r=="number"&&(e.boot_time=new Date(Date.now()-r*1e3).toISOString()),e.arch=jr.arch(),(t===!0||t.memory)&&(e.memory_size=jr.totalmem(),e.free_memory=jr.freemem()),t===!0||t.cpu){let n=jr.cpus();if(n&&n.length){let i=n[0];e.processor_count=n.length,e.cpu_description=i.model,e.processor_frequency=i.speed}}return e}var kOe={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},BOe=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],MOe={alpine:t=>t,arch:t=>Ro(/distrib_release=(.*)/,t),centos:t=>Ro(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>Ro(/release (..)/,t),mint:t=>Ro(/distrib_release=(.*)/,t),red:t=>Ro(/release ([^ ]+)/,t),suse:t=>Ro(/VERSION = (.*)\n/,t),ubuntu:t=>Ro(/distrib_release=(.*)/,t)};function Ro(t,e){let r=t.exec(e);return r?r[1]:void 0}async function UOe(){let t={kernel_version:jr.release(),name:"Mac OS X",version:`10.${Number(jr.release().split(".")[0])-4}`};try{let e=await new Promise((r,n)=>{COe("/usr/bin/sw_vers",(i,s)=>{if(i){n(i);return}r(s)})});t.name=Ro(/^ProductName:\s+(.*)$/m,e),t.version=Ro(/^ProductVersion:\s+(.*)$/m,e),t.build=Ro(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function yY(t){return t.split(" ")[0].toLowerCase()}async function jOe(){let t={kernel_version:jr.release(),name:"Linux"};try{let e=await IOe("/etc"),r=BOe.find(a=>e.includes(a.name));if(!r)return t;let n=OOe("/etc",r.name),i=(await ROe(n,{encoding:"utf-8"})).toLowerCase(),{distros:s}=r;t.name=s.find(a=>i.indexOf(yY(a))>=0)||s[0];let o=yY(t.name);t.version=MOe[o](i)}catch{}return t}function qOe(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}c();c();import*as bY from"url";c();function vY(t){let e={},r=0;for(;r<t.length;){let n=t.indexOf("=",r);if(n===-1)break;let i=t.indexOf(";",r);if(i===-1)i=t.length;else if(i<n){r=t.lastIndexOf(";",n-1)+1;continue}let s=t.slice(r,n).trim();if(e[s]===void 0){let o=t.slice(n+1,i).trim();o.charCodeAt(0)===34&&(o=o.slice(1,-1));try{e[s]=o.indexOf("%")!==-1?decodeURIComponent(o):o}catch{e[s]=o}}r=i+1}return e}var HOe={ip:!1,request:!0,transaction:!0,user:!0},GOe=["cookies","data","headers","method","query_string","url"],$Oe=["id","username","email"];function xY(t,e={}){let r=t.method&&t.method.toUpperCase(),n="",i="url";e.customRoute||t.route?(n=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(n=qu(t.originalUrl||t.url||""));let s="";return e.method&&r&&(s+=r),e.method&&e.path&&(s+=" "),e.path&&n&&(s+=n),[s,i]}function zOe(t,e){switch(e){case"path":return xY(t,{path:!0})[0];case"handler":return t.route&&t.route.stack&&t.route.stack[0]&&t.route.stack[0].name||"<anonymous>";case"methodPath":default:{let r=t._reconstructedRoute?t._reconstructedRoute:void 0;return xY(t,{path:!0,method:!0,customRoute:r})[0]}}}function VOe(t,e){let r={};return(Array.isArray(e)?e:$Oe).forEach(i=>{t&&i in t&&(r[i]=t[i])}),r}function SY(t,e){let{include:r=GOe}=e||{},n={},i=t.headers||{},s=t.method,o=t.hostname||t.host||i.host||"<no host>",a=t.protocol==="https"||t.socket&&t.socket.encrypted?"https":"http",l=t.originalUrl||t.url||"",p=l.startsWith(a)?l:`${a}://${o}${l}`;return r.forEach(d=>{switch(d){case"headers":{n.headers=i,r.includes("cookies")||delete n.headers.cookie;break}case"method":{n.method=s;break}case"url":{n.url=p;break}case"cookies":{n.cookies=t.cookies||i.cookie&&vY(i.cookie)||{};break}case"query_string":{n.query_string=WOe(t);break}case"data":{if(s==="GET"||s==="HEAD")break;t.body!==void 0&&(n.data=Ms(t.body)?t.body:JSON.stringify(Ri(t.body)));break}default:({}).hasOwnProperty.call(t,d)&&(n[d]=t[d])}}),n}function DY(t,e,r){let n={...HOe,...oe([r,"optionalAccess",i=>i.include])};if(n.request){let i=Array.isArray(n.request)?SY(e,{include:n.request}):SY(e);t.request={...t.request,...i}}if(n.user){let i=e.user&&Oi(e.user)?VOe(e.user,n.user):{};Object.keys(i).length&&(t.user={...t.user,...i})}if(n.ip){let i=e.ip||e.socket&&e.socket.remoteAddress;i&&(t.user={...t.user,ip_address:i})}return n.transaction&&!t.transaction&&(t.transaction=zOe(e,n.transaction)),t}function WOe(t){let e=t.originalUrl||t.url||"";if(e)return e.startsWith("/")&&(e=`http://dogs.are.great${e}`),t.query||new bY.URL(e).search.replace("?","")||void 0}var bF={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"},Ll=class t{static __initStatic(){this.id="RequestData"}__init(){this.name=t.id}constructor(e={}){t.prototype.__init.call(this),this._addRequestData=DY,this._options={...bF,...e,include:{method:!0,...bF.include,...e.include,user:e.include&&typeof e.include.user=="boolean"?e.include.user:{...bF.include.user,...(e.include||{}).user}}}}setupOnce(e,r){let{transactionNamingScheme:n}=this._options;e(i=>{let s=r(),o=s.getIntegration(t),{sdkProcessingMetadata:a={}}=i,l=a.request;if(!o||!l)return i;let p=a.requestDataOptionsFromExpressHandler||a.requestDataOptionsFromGCPWrapper||YOe(this._options),d=this._addRequestData(i,l,p);if(i.type==="transaction"||n==="handler")return d;let g=l._sentryTransaction;if(g){let v=JOe(s)==="sentry.javascript.nextjs"?g.name.startsWith("/api"):n!=="path",[S]=Kg(l,{path:!0,method:v,customRoute:g.name});d.transaction=S}return d})}};Ll.__initStatic();function YOe(t){let{transactionNamingScheme:e,include:{ip:r,user:n,...i}}=t,s=[];for(let[a,l]of Object.entries(i))l&&s.push(a);let o;if(n===void 0)o=!0;else if(typeof n=="boolean")o=n;else{let a=[];for(let[l,p]of Object.entries(n))p&&a.push(l);o=a}return{include:{ip:r,user:o,request:s.length!==0?s:void 0,transaction:e}}}function JOe(t){try{return t.getClient().getOptions()._metadata.sdk.name}catch{return}}c();function KOe(t,e,r){let n=0,i=5,s=0;return setInterval(()=>{s===0?n>t&&(i*=2,r(i),i>86400&&(i=86400),s=i):(s-=1,s===0&&e()),n=0},1e3).unref(),()=>{n+=1}}function CY(t){let e=[],r=!1;function n(o){e=[],!r&&(r=!0,t(o))}e.push(n);function i(o){e.push(o)}function s(o){let a=e.pop()||n;try{a(o)}catch{n(o)}}return{add:i,next:s}}var DF=class{constructor(){let{Session:e}=B("inspector");this._session=new e}configureAndConnect(e,r){this._session.connect(),this._session.on("Debugger.paused",n=>{e(n,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,r){this._getProperties(e,n=>{let{add:i,next:s}=CY(r);for(let o of n)if(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&oe([o,"optionalAccess",a=>a.value,"access",a=>a.className])==="Array"){let a=o.value.objectId;i(l=>this._unrollArray(a,o.name,l,s))}else if(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.className])==="Object"){let a=o.value.objectId;i(l=>this._unrollObject(a,o.name,l,s))}else(oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])||oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.description]))&&i(a=>this._unrollOther(o,a,s));s({})})}_getProperties(e,r){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(n,i)=>{r(n?[]:i.result)})}_unrollArray(e,r,n,i){this._getProperties(e,s=>{n[r]=s.filter(o=>o.name!=="length"&&!isNaN(parseInt(o.name,10))).sort((o,a)=>parseInt(o.name,10)-parseInt(a.name,10)).map(o=>oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])),i(n)})}_unrollObject(e,r,n,i){this._getProperties(e,s=>{n[r]=s.map(o=>[o.name,oe([o,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])]).reduce((o,[a,l])=>(o[a]=l,o),{}),i(n)})}_unrollOther(e,r,n){oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.value])?r[e.name]=e.value.value:oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.description])&&oe([e,"optionalAccess",i=>i.value,"optionalAccess",i=>i.type])!=="function"&&(r[e.name]=`<${e.value.description}>`),n(r)}};function XOe(){try{return new DF}catch{return}}function wY(t){return t!==void 0&&["","?","<anonymous>"].includes(t)}function ZOe(t,e){return t===e||wY(t)&&wY(e)}function TY(t){if(t!==void 0)return t.slice(-10).reduce((e,r)=>`${e},${r.function},${r.lineno},${r.colno}`,"")}function QOe(t,e){if(e!==void 0)return TY(t(e,1))}var kl=class t{static __initStatic(){this.id="LocalVariables"}__init(){this.name=t.id}__init2(){this._cachedFrames=new Fi(20)}constructor(e={},r=XOe()){this._options=e,this._session=r,t.prototype.__init.call(this),t.prototype.__init2.call(this)}setupOnce(e,r){this._setup(e,oe([r,"call",n=>n(),"access",n=>n.getClient,"call",n=>n(),"optionalAccess",n=>n.getOptions,"call",n=>n()]))}_setup(e,r){if(this._session&&oe([r,"optionalAccess",n=>n.includeLocalVariables])){if((Gs.major||0)<18){re.log("The `LocalVariables` integration is only supported on Node >= v18.");return}let i=this._options.captureAllExceptions!==!1;if(this._session.configureAndConnect((s,o)=>this._handlePaused(r.stackParser,s,o),i),i){let s=this._options.maxExceptionsPerSecond||50;this._rateLimiter=KOe(s,()=>{re.log("Local variables rate-limit lifted."),oe([this,"access",o=>o._session,"optionalAccess",o=>o.setPauseOnExceptions,"call",o=>o(!0)])},o=>{re.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${o} seconds.`),oe([this,"access",a=>a._session,"optionalAccess",a=>a.setPauseOnExceptions,"call",a=>a(!1)])})}e(async s=>this._addLocalVariables(s))}}_handlePaused(e,{params:{reason:r,data:n,callFrames:i}},s){if(r!=="exception"&&r!=="promiseRejection"){s();return}oe([this,"access",p=>p._rateLimiter,"optionalCall",p=>p()]);let o=QOe(e,oe([n,"optionalAccess",p=>p.description]));if(o==null){s();return}let{add:a,next:l}=CY(p=>{this._cachedFrames.set(o,p),s()});for(let p=0;p<Math.min(i.length,5);p++){let{scopeChain:d,functionName:m,this:g}=i[p],v=d.find(b=>b.type==="local"),S=g.className==="global"||!g.className?m:`${g.className}.${m}`;if(oe([v,"optionalAccess",b=>b.object,"access",b=>b.objectId])===void 0)a(b=>{b[p]={function:S},l(b)});else{let b=v.object.objectId;a(C=>oe([this,"access",T=>T._session,"optionalAccess",T=>T.getLocalVariables,"call",T=>T(b,N=>{C[p]={function:S,vars:N},l(C)})]))}}l([])}_addLocalVariables(e){for(let r of oe([e,"optionalAccess",n=>n.exception,"optionalAccess",n=>n.values])||[])this._addLocalVariablesToException(r);return e}_addLocalVariablesToException(e){let r=TY(oe([e,"optionalAccess",s=>s.stacktrace,"optionalAccess",s=>s.frames]));if(r===void 0)return;let n=this._cachedFrames.remove(r);if(n===void 0)return;let i=oe([e,"access",s=>s.stacktrace,"optionalAccess",s=>s.frames,"optionalAccess",s=>s.length])||0;for(let s=0;s<i;s++){let o=i-s-1;if(!oe([e,"optionalAccess",a=>a.stacktrace,"optionalAccess",a=>a.frames,"optionalAccess",a=>a[o]])||!n[s])break;n[s].vars===void 0||e.stacktrace.frames[o].in_app===!1||!ZOe(e.stacktrace.frames[o].function,n[s].function)||(e.stacktrace.frames[o].vars=n[s].vars)}}};kl.__initStatic();c();var d_;(function(t){let e="undici:request:create";t.RequestCreate=e;let r="undici:request:headers";t.RequestEnd=r;let n="undici:request:error";t.RequestError=n})(d_||(d_={}));var Bl=class t{static __initStatic(){this.id="Undici"}__init(){this.name=t.id}__init2(){this._createSpanUrlMap=new Fi(100)}__init3(){this._headersUrlMap=new Fi(100)}constructor(e={}){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),t.prototype.__init5.call(this),t.prototype.__init6.call(this),this._options={breadcrumbs:e.breadcrumbs===void 0?!0:e.breadcrumbs,shouldCreateSpanForRequest:e.shouldCreateSpanForRequest}}setupOnce(e){if(Gs.major&&Gs.major<16)return;let r;try{r=ju(module,"diagnostics_channel")}catch{}!r||!r.subscribe||(r.subscribe(d_.RequestCreate,this._onRequestCreate),r.subscribe(d_.RequestEnd,this._onRequestEnd),r.subscribe(d_.RequestError,this._onRequestError))}_shouldCreateSpan(e){if(this._options.shouldCreateSpanForRequest===void 0)return!0;let r=this._createSpanUrlMap.get(e);if(r!==void 0)return r;let n=this._options.shouldCreateSpanForRequest(e);return this._createSpanUrlMap.set(e,n),n}__init4(){this._onRequestCreate=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n}=e,i=n.origin?n.origin.toString()+n.path:n.path;if(Tl(i,r)||n.__sentry_span__!==void 0)return;let s=r.getClient();if(!s)return;let o=s.getOptions(),a=r.getScope(),l=a.getSpan(),p=this._shouldCreateSpan(i)?eRe(l,n,i):void 0;if(p&&(n.__sentry_span__=p),(m=>{if(o.tracePropagationTargets===void 0)return!0;let g=this._headersUrlMap.get(m);if(g!==void 0)return g;let v=Oo(m,o.tracePropagationTargets);return this._headersUrlMap.set(m,v),v})(i))if(p){let m=oe([p,"optionalAccess",v=>v.transaction,"optionalAccess",v=>v.getDynamicSamplingContext,"call",v=>v()]),g=Ad(m);AY(n,p.toTraceparent(),g)}else{let{traceId:m,sampled:g,dsc:v}=a.getPropagationContext(),S=Cl(m,void 0,g),b=v||Hs(m,s,a),C=Ad(b);AY(n,S,C)}}}__init5(){this._onRequestEnd=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n,response:i}=e,s=n.origin?n.origin.toString()+n.path:n.path;if(Tl(s,r))return;let o=n.__sentry_span__;o&&(o.setHttpStatus(i.statusCode),o.finish()),this._options.breadcrumbs&&r.addBreadcrumb({category:"http",data:{method:n.method,status_code:i.statusCode,url:s},type:"http"},{event:"response",request:n,response:i})}}__init6(){this._onRequestError=e=>{let r=pt();if(!r.getIntegration(t))return;let{request:n}=e,i=n.origin?n.origin.toString()+n.path:n.path;if(Tl(i,r))return;let s=n.__sentry_span__;s&&(s.setStatus("internal_error"),s.finish()),this._options.breadcrumbs&&r.addBreadcrumb({category:"http",data:{method:n.method,url:i},level:"error",type:"http"},{event:"error",request:n})}}};Bl.__initStatic();function AY(t,e,r){t.__sentry_has_headers__||(t.addHeader("sentry-trace",e),r&&t.addHeader("baggage",r),t.__sentry_has_headers__=!0)}function eRe(t,e,r){let n=zI(r),i=e.method||"GET",s={"http.method":i};return n.search&&(s["http.query"]=n.search),n.hash&&(s["http.fragment"]=n.hash),oe([t,"optionalAccess",o=>o.startChild,"call",o=>o({op:"http.client",origin:"auto.http.node.undici",description:`${i} ${VI(n)}`,data:s})])}var wF=[new Vu.InboundFilters,new Vu.FunctionToString,new Vu.LinkedErrors,new Ol,new Wu,new Bl,new Rl,new Il,new Nl,new kl,new Pl,new Fl,new Ll];var CF=BI(MI(lY));var TF={};$f(TF,{Console:()=>Ol,Context:()=>Pl,ContextLines:()=>Nl,Http:()=>Wu,LocalVariables:()=>kl,Modules:()=>Fl,OnUncaughtException:()=>Rl,OnUnhandledRejection:()=>Il,RequestData:()=>Ll,Undici:()=>Bl});c();var AF={};$f(AF,{Apollo:()=>Bd,Express:()=>Id,GraphQL:()=>kd,Mongo:()=>Pd,Mysql:()=>Nd,Postgres:()=>Fd,Prisma:()=>Ld});c();var Kyt={...Vu,...TF,...AF};var OF=L(Xc(),1);import tRe from"node:events";var rRe=(t,e,{data:r}={})=>{if(!sa(e))return;let n=(0,OY.isType)(e.cliCode,Fp.UnknownFailure)?e.cliCode.error:e;t.withScope(i=>{let s=ag(n);s&&(i.setTag("requestId",s.requestId),i.setContext("requestInfo",zv(s))),n instanceof Error&&i.setContext("error details",{info:OF.default.info(n),fullStack:OF.default.fullStack(n)}),t.captureException(n,{data:r})})};function RY({dsn:t,release:e}){let{sentryDsn:r}=or(),n=new a_({enabled:r!==void 0||!0,dsn:r??t,release:e,integrations:wF.filter(o=>o.name!=="OnUnhandledRejection"&&o.name!=="OnUncaughtException"&&o.name!=="Modules"),stackParser:CF,transport:yF,beforeSend(o){return delete o.server_name,o},normalizeDepth:10}),i=new $u(n),s=new tRe;return{on:s.on.bind(s),reportError:(o,{data:a}={})=>{let l=Vm(o);rRe(i,l,{data:a}),s.emit("errorReported",l)},setContext:(o,a)=>i.setContext(o,a),setUser:o=>i.setUser(o)}}function IF({debugOutputPath:t,...e}){let r=RY(e),n=function({error:s,data:o}){r.reportError(s,{data:o}),jA(IY.default.createElement(xl,{error:s})),U9(t,s),RF.exitCode=1};return{handler:n,errorReporter:r,registerToProcessErrors:function(){RF.on("uncaughtException",s=>{n({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),RF.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||n({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}c();var Ud=L(ne(),1),FY=(0,Ud.createContext)(null),FF=t=>Ud.default.createElement(FY.Provider,{...t}),Ca=()=>{let t=(0,Ud.useContext)(FY);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};var NY=({userCode:t,verificationUri:e})=>{let{reportError:r}=Ca(),[n,i]=(0,hn.useState)(null);return Yi((s,o)=>{o.return&&OS(e).catch(a=>{r(a),i(a)})}),hn.default.createElement(hn.default.Fragment,null,hn.default.createElement(Ot,{i18nKey:"login.instructions_title"}),hn.default.createElement(Te,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},hn.default.createElement(Ot,{i18nKey:"login.instructions_details",components:[hn.default.createElement(te,{skin:"legacyBlue"}),hn.default.createElement(gp,{value:"enter"}),hn.default.createElement(oi,{url:e})],values:{code:t}})),n&&hn.default.createElement(hn.default.Fragment,null,hn.default.createElement(Te,{flexDirection:"column",marginBottom:1},hn.default.createElement(xl,{error:n})),hn.default.createElement(Ot,{i18nKey:"login.error_opening_browser",components:[hn.default.createElement(oi,{url:e})]})))};var LY=({loginFn:t,onLogin:e,onError:r})=>{let n=xc();function i(a){n.report(uI({isSuccess:!1,...a instanceof Error?{errorType:a.name}:{errorType:"unknown",errorMessage:JSON.stringify(a)}})),r(a)}let s=As(async({signal:a},l)=>{try{let p=await t({deviceCode:l,signal:a});n.report(uI({isSuccess:!0})),e(p)}catch(p){i(p)}}),{status:o}=an(async()=>(n.report(y9({})),Yp.requestDeviceCode()),[],{onSuccess:a=>{s.execute(a)},onError:i});return(0,PY.match)(o,{Error:()=>null,Loading:()=>NF.default.createElement(Ar,null),Success:({result:{userCode:a,verificationUri:l}})=>NF.default.createElement(NY,{userCode:a,verificationUri:l})})};c();var PF=L(ne(),1);c();var m_=L(ne(),1),MY=L(Xe(),1);c();var h_=L(ne(),1),kY=L(Xe(),1);var BY=({children:t})=>{let{status:e}=an(eS,[],{onError:()=>{}});return(0,kY.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>h_.default.createElement(h_.default.Fragment,null,r&&h_.default.createElement(Te,{marginBottom:1},h_.default.createElement(Ot,{i18nKey:"login.legacy_auth_notice"})),t)})};var UY=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:n,children:i})=>{let{status:s,merge:o}=an(e,[],{onSuccess:a=>{a&&r(a)},onError:n});return(0,MY.match)(s,{Loading:()=>m_.default.createElement(Ar,null),Error:()=>null,Success:({result:a})=>a===null?m_.default.createElement(vl,{messages:x9},m_.default.createElement(BY,null,m_.default.createElement(LY,{loginFn:t,onLogin:l=>{o({result:l}),r(l)},onError:n}))):i(a)})};var LF=({children:t,onError:e,onLogin:r})=>{let n=pu();return PF.default.createElement(UY,{authStrategy:Fg,onLogin:({userInfo:i})=>r?.(i),onError:e??n},({getAccessToken:i,userInfo:s})=>PF.default.createElement(tS.Provider,{value:{getAccessToken:i,userInfo:s}},t))};var{isLoggedIn:r0t}=Fg;c();var rJ=L(tJ(),1),{program:S0t,createCommand:b0t,createArgument:D0t,createOption:w0t,CommanderError:C0t,InvalidArgumentError:T0t,InvalidOptionArgumentError:A0t,Command:nJ,Argument:O0t,Option:R0t,Help:I0t}=rJ.default;c();import{join as vRe}from"node:path";var iJ="https://22f50012d85a41e78a75ae13d92bd04f@o37417.ingest.sentry.io/4505232975593472",JF="wix-error.log";function sJ(t){return vRe(t,JF)}c();c();var aJ=L(ne(),1);c();var oJ=t=>({newAppNameEntered:({name:e})=>(t.report(g9({name:e})),{succeed({appId:r}){t.report(lI({result:"success",appId:r}))},failed(r){t.report(lI({result:"failure",...r instanceof Error?{errorType:r.name,errorMessage:r.message}:{}}))}}),typeOfCreationSelected:({appType:e})=>t.report(E9({type:e})),existingAppSelectedToExtend:({appName:e,numApps:r,appId:n})=>t.report(m9({appName:e,numApps:r,appId:n}))});function Ml(){let t=xc();return(0,aJ.useMemo)(()=>oJ(t),[t])}c();import{randomUUID as S1e}from"node:crypto";c();c();c();Fs();var PJ=L(NJ()),LJ=L(Wp()),f1e={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},rN=function(){function t(){}return t.prototype.factory=function(e){var r=this;e===void 0&&(e={});var n=it(it({},f1e),e),i=PJ.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(s,o){return _v(r,void 0,void 0,function(){var a,l,p,d,m;return yv(this,function(g){switch(g.label){case 0:return a=o.endpoint||n.endpoint,l=n.baseUrl,p=n.userAgent,d=n.logError,m=p?{headers:{"User-Agent":p}}:{},[4,new LJ.HttpClient({baseURL:l}).get(a,{headers:m,params:s,timeout:30*1e3}).catch(function(v){return d?console.error(v.toJSON()):Promise.reject(v)})];case 1:return g.sent(),[2]}})})}),i},t}();var mvt=new rN;c();import{join as p1e}from"node:path";var d1e=Ee.object({telemetry:Ee.boolean().default(!0)}),h1e="user.config.json";function m1e(){return p1e(lg(),h1e)}async function kJ(){let t=m1e(),r=await ks(t)?await ku(t):{};return d1e.parse(r)}c();import{randomUUID as g1e}from"node:crypto";function nN(t,e){t.updateDefaults(iN(e))}function iN(t){return t?{_client_id:t,_uuid:t,logged_user_id:t,logged_account_id:t,target_account_id:t}:{_client_id:g1e()}}async function sN(t,e){let r=or().biLoggerBaseUrl,n=r?{baseUrl:r}:{},i=iN(e),{telemetry:s}=await kJ();return new rN().factory(n).updateDefaults({localTime:()=>Date.now(),...t,...i}).setMuted(!s).logger()}c();import{uptime as x1e}from"node:process";c();var BJ=L(zC(),1);import _1e from"node:os";import{platform as y1e,version as E1e}from"node:process";function MJ({cliVersion:t,flow:e}){return{...e?{flow:e}:{},cliVersion:t,isCI:BJ.default,nodeVersion:E1e,osName:v1e(),osVersion:_1e.release()}}function v1e(){switch(y1e){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var UJ=()=>Math.round(x1e()*1e3);function oN({biLogger:t,command:e,flow:r,cliVersion:n}){let i={command:e.name(),arguments:e.args.join(",")??"",flags:Object.keys(e.opts()).join(",")};return t.report(v9({...MJ({cliVersion:n,flow:r}),...i,isValid:!0})),{succeed(){t.report(cI({...i,duration:UJ(),isSuccess:!0,isValid:!0}))},failed(s){let o=Np(s)?{errorType:sa(s)?"SystemError":"UserError",errorName:s.name,errorMessage:s.message}:s instanceof Error?{errorType:"UnknownError",errorName:s.name,errorMessage:s.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(s)};t.report(cI({...i,...o,duration:UJ(),isSuccess:!1,isValid:!0}))}}}var qJ="0.0.33";var Hd={name:"@wix/create-app",description:"Create Wix apps",version:qJ,author:"Ihor Machuzhak",bin:"bin/index.cjs",devDependencies:{"@commander-js/extra-typings":"^11.1.0","@types/is-git-url":"^1.0.1","@types/lodash":"^4.14.200","@types/validate-npm-package-name":"^4.0.1","@wix/bi-logger-wix-cli":"^1.31.0","@wix/cli-auth":"workspace:*","@wix/cli-core-definitions":"workspace:*","@wix/cli-error":"workspace:*","@wix/cli-error-reporting":"workspace:*","@wix/cli-fs":"workspace:*","@wix/cli-http-client":"workspace:*","@wix/cli-i18n":"workspace:*","@wix/cli-site-selector":"workspace:*","@wix/cli-telemetry":"workspace:*","@wix/cli-telemetry-react":"workspace:*","@wix/cli-test-overrides":"workspace:*","@wix/cli-ui-kit":"workspace:*","@wix/create-app-definitions":"workspace:*","@wix/dev-center-client":"workspace:*","@wix/gena":"workspace:*","@wix/site-list-client":"workspace:*","@wix/tsup-configs":"workspace:*",commander:"^11.1.0",execa:"^8.0.1",globby:"^13.2.2","is-git-url":"^1.0.0",lodash:"^4.17.21","package-json":"^8.1.1",react:"^18.2.0",semver:"^7.5.4",tempy:"^3.1.0","type-fest":"^3.13.1","validate-npm-package-name":"^5.0.0",variant:"^3.0.0-dev.26",zod:"^3.22.4"},engines:{node:">= 18.16"},files:["bin","build","templates"],perfer:{bundleSize:{files:[{glob:"./build/index.js",maxSize:"400kb"}]}},publishConfig:{registry:"https://registry.npmjs.org/",access:"public",versionBumpStrategy:"manual",logLevel:"verbose"},scripts:{build:"run -T tsup","build:watch":"run build --watch","dev:npm":"npx $INIT_CWD","dev:yarn":"yarn create @wix/app@portal:$INIT_CWD",lint:"run -T lint-package",test:"yarn workspace @wix/create-app-spec run test","test:watch":"yarn workspace @wix/create-app-spec run test:watch",typecheck:"run -T tsc --noEmit"},type:"module",wix:{artifact:{groupId:"com.wixpress",artifactId:"wix-create-app"},validations:{postBuild:["typecheck","lint"]}}};var aN=async(t,e)=>{let r=await sN({cliSessionId:S1e()},e);t.on("errorReported",i=>r.report(_9({errorMessage:i.message,errorType:sa(i)?"SystemError":"UserError",errorName:i.name})));function n(i){let s={name:()=>"create-app",args:i.args,opts:()=>i.opts()};return oN({biLogger:r,command:s,cliVersion:qJ,flow:"Apps"})}return{biLogger:r,reportCommandStartEvent:n}};c();var tn=L(ne(),1),uB=L(Xe(),1);c();var __=L(ne(),1);var HJ=()=>{let{t}=at();return __.default.createElement(Te,{flexDirection:"column",marginBottom:1,rowGap:1},__.default.createElement(te,null,t("create_app.get_started")),__.default.createElement(Ot,{i18nKey:"create_app.more_info_on_app_development",components:[__.default.createElement(oi,{url:"https://wix.to/dVzAH1u"})]}))};c();c();c();var eQ=L(uN(),1),w_=L(VP(),1),D_=L(LZ(),1);import QPe from"node:fs";import eLe from"node:path";c();var tL=L(VP(),1),WZ=L(zZ(),1);import JPe from"node:process";import VZ from"node:fs";import Xd from"node:path";c();function Kd(t){let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}c();import{fileURLToPath as WPe}from"node:url";import{Transform as YPe}from"node:stream";var b_=t=>t instanceof URL?WPe(t):t,Ub=class extends YPe{constructor(e){super({objectMode:!0,transform(r,n,i){i(void 0,e(r)?r:void 0)}})}},jb=t=>t[0]==="!";var YZ={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:!0,dot:!0},JZ="**/.gitignore",KPe=(t,e)=>jb(t)?"!"+Xd.posix.join(e,t.slice(1)):Xd.posix.join(e,t),XPe=(t,e)=>{let r=Kd(Xd.relative(e,Xd.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>KPe(n,r))},ZPe=(t,e)=>{if(e=Kd(e),Xd.isAbsolute(t)){if(Kd(t).startsWith(e))return Xd.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},KZ=(t,e)=>{let r=t.flatMap(i=>XPe(i,e)),n=(0,WZ.default)().add(r);return i=>(i=b_(i),i=ZPe(i,e),i?n.ignores(Kd(i)):!1)},XZ=(t={})=>({cwd:b_(t.cwd)||JPe.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY}),ZZ=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=XZ(e),s=await(0,tL.default)(t,{cwd:r,suppressErrors:n,deep:i,...YZ}),o=await Promise.all(s.map(async a=>({filePath:a,content:await VZ.promises.readFile(a,"utf8")})));return KZ(o,r)},QZ=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=XZ(e),o=tL.default.sync(t,{cwd:r,suppressErrors:n,deep:i,...YZ}).map(a=>({filePath:a,content:VZ.readFileSync(a,"utf8")}));return KZ(o,r)};var tLe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},rL=t=>(t=[...new Set([t].flat())],tLe(t),t),rLe=t=>{if(!t.cwd)return;let e;try{e=QPe.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},tQ=(t={})=>(t={...t,ignore:t.ignore||[],expandDirectories:t.expandDirectories===void 0?!0:t.expandDirectories,cwd:b_(t.cwd)},rLe(t),t),rQ=t=>async(e,r)=>t(rL(e),tQ(r)),qb=t=>(e,r)=>t(rL(e),tQ(r)),nQ=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?rL(e):[];return r&&n.push(JZ),n},nLe=async t=>{let e=nQ(t);return sQ(e.length>0&&await ZZ(e,t))},iQ=t=>{let e=nQ(t);return sQ(e.length>0&&QZ(e,t))},sQ=t=>{let e=new Set;return r=>{let n=r.path||r,i=eLe.normalize(n),s=e.has(i)||t&&t(n);return e.add(i),!s}},oQ=(t,e)=>t.flat().filter(r=>e(r)),iLe=(t,e)=>(0,eQ.default)(t).pipe(new Ub(r=>e(r))),aQ=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>jb(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},uQ=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),cQ=async(t,e)=>{let r=aQ(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=uQ(i,n),o=n?{cwd:n}:void 0;return Promise.all(r.map(async a=>{let{patterns:l,options:p}=a;return[l,p.ignore]=await Promise.all([(0,D_.default)(l,s),(0,D_.default)(p.ignore,o)]),{patterns:l,options:p}}))},nL=(t,e)=>{let r=aQ(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=uQ(i,n),o=n?{cwd:n}:void 0;return r.map(a=>{let{patterns:l,options:p}=a;return l=D_.default.sync(l,s),p.ignore=D_.default.sync(p.ignore,o),{patterns:l,options:p}})},Hb=rQ(async(t,e)=>{let[r,n]=await Promise.all([cQ(t,e),nLe(e)]),i=await Promise.all(r.map(s=>(0,w_.default)(s.patterns,s.options)));return oQ(i,n)}),EDt=qb((t,e)=>{let r=nL(t,e),n=iQ(e),i=r.map(s=>w_.default.sync(s.patterns,s.options));return oQ(i,n)}),vDt=qb((t,e)=>{let r=nL(t,e),n=iQ(e),i=r.map(s=>w_.default.stream(s.patterns,s.options));return iLe(i,n)}),xDt=qb((t,e)=>t.some(r=>w_.default.isDynamicPattern(r,e))),SDt=rQ(cQ),bDt=qb(nL);async function iL(t){return(await Hb(["*"],{ignore:[JF],cwd:t})).length===0}c();var yie=L(eD(),1);c();import{Agent as nje}from"node:http";import{Agent as ije}from"node:https";c();c();c();var nte=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Qke(t){return nte.includes(t)}var eBe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...nte];function tBe(t){return eBe.includes(t)}var rBe=["null","undefined","string","number","bigint","boolean","symbol"];function nBe(t){return rBe.includes(t)}function rh(t){return e=>typeof e===t}var{toString:iBe}=Object.prototype,L_=t=>{let e=iBe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&F.domElement(t))return"HTMLElement";if(tBe(e))return e},kt=t=>e=>L_(e)===t;function F(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(F.observable(t))return"Observable";if(F.array(t))return"Array";if(F.buffer(t))return"Buffer";let e=L_(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}F.undefined=rh("undefined");F.string=rh("string");var sBe=rh("number");F.number=t=>sBe(t)&&!F.nan(t);F.bigint=rh("bigint");F.function_=rh("function");F.null_=t=>t===null;F.class_=t=>F.function_(t)&&t.toString().startsWith("class ");F.boolean=t=>t===!0||t===!1;F.symbol=rh("symbol");F.numericString=t=>F.string(t)&&!F.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));F.array=(t,e)=>Array.isArray(t)?F.function_(e)?t.every(r=>e(r)):!0:!1;F.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;F.blob=t=>kt("Blob")(t);F.nullOrUndefined=t=>F.null_(t)||F.undefined(t);F.object=t=>!F.null_(t)&&(typeof t=="object"||F.function_(t));F.iterable=t=>F.function_(t?.[Symbol.iterator]);F.asyncIterable=t=>F.function_(t?.[Symbol.asyncIterator]);F.generator=t=>F.iterable(t)&&F.function_(t?.next)&&F.function_(t?.throw);F.asyncGenerator=t=>F.asyncIterable(t)&&F.function_(t.next)&&F.function_(t.throw);F.nativePromise=t=>kt("Promise")(t);var oBe=t=>F.function_(t?.then)&&F.function_(t?.catch);F.promise=t=>F.nativePromise(t)||oBe(t);F.generatorFunction=kt("GeneratorFunction");F.asyncGeneratorFunction=t=>L_(t)==="AsyncGeneratorFunction";F.asyncFunction=t=>L_(t)==="AsyncFunction";F.boundFunction=t=>F.function_(t)&&!t.hasOwnProperty("prototype");F.regExp=kt("RegExp");F.date=kt("Date");F.error=kt("Error");F.map=t=>kt("Map")(t);F.set=t=>kt("Set")(t);F.weakMap=t=>kt("WeakMap")(t);F.weakSet=t=>kt("WeakSet")(t);F.weakRef=t=>kt("WeakRef")(t);F.int8Array=kt("Int8Array");F.uint8Array=kt("Uint8Array");F.uint8ClampedArray=kt("Uint8ClampedArray");F.int16Array=kt("Int16Array");F.uint16Array=kt("Uint16Array");F.int32Array=kt("Int32Array");F.uint32Array=kt("Uint32Array");F.float32Array=kt("Float32Array");F.float64Array=kt("Float64Array");F.bigInt64Array=kt("BigInt64Array");F.bigUint64Array=kt("BigUint64Array");F.arrayBuffer=kt("ArrayBuffer");F.sharedArrayBuffer=kt("SharedArrayBuffer");F.dataView=kt("DataView");F.enumCase=(t,e)=>Object.values(e).includes(t);F.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;F.urlInstance=t=>kt("URL")(t);F.urlString=t=>{if(!F.string(t))return!1;try{return new URL(t),!0}catch{return!1}};F.truthy=t=>!!t;F.falsy=t=>!t;F.nan=t=>Number.isNaN(t);F.primitive=t=>F.null_(t)||nBe(typeof t);F.integer=t=>Number.isInteger(t);F.safeInteger=t=>Number.isSafeInteger(t);F.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};F.typedArray=t=>Qke(L_(t));var aBe=t=>F.safeInteger(t)&&t>=0;F.arrayLike=t=>!F.nullOrUndefined(t)&&!F.function_(t)&&aBe(t.length);F.inRange=(t,e)=>{if(F.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(F.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var uBe=1,cBe=["innerHTML","ownerDocument","style","attributes","nodeValue"];F.domElement=t=>F.object(t)&&t.nodeType===uBe&&F.string(t.nodeName)&&!F.plainObject(t)&&cBe.every(e=>e in t);F.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;F.nodeStream=t=>F.object(t)&&F.function_(t.pipe)&&!F.observable(t);F.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var ite=t=>e=>F.integer(e)&&Math.abs(e%2)===t;F.evenInteger=ite(0);F.oddInteger=ite(1);F.emptyArray=t=>F.array(t)&&t.length===0;F.nonEmptyArray=t=>F.array(t)&&t.length>0;F.emptyString=t=>F.string(t)&&t.length===0;var lBe=t=>F.string(t)&&!/\S/.test(t);F.emptyStringOrWhitespace=t=>F.emptyString(t)||lBe(t);F.nonEmptyString=t=>F.string(t)&&t.length>0;F.nonEmptyStringAndNotWhitespace=t=>F.string(t)&&!F.emptyStringOrWhitespace(t);F.emptyObject=t=>F.object(t)&&!F.map(t)&&!F.set(t)&&Object.keys(t).length===0;F.nonEmptyObject=t=>F.object(t)&&!F.map(t)&&!F.set(t)&&Object.keys(t).length>0;F.emptySet=t=>F.set(t)&&t.size===0;F.nonEmptySet=t=>F.set(t)&&t.size>0;F.emptyMap=t=>F.map(t)&&t.size===0;F.nonEmptyMap=t=>F.map(t)&&t.size>0;F.propertyKey=t=>F.any([F.string,F.number,F.symbol],t);F.formData=t=>kt("FormData")(t);F.urlSearchParams=t=>kt("URLSearchParams")(t);var ste=(t,e,r)=>{if(!F.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};F.any=(t,...e)=>(F.array(t)?t:[t]).some(n=>ste(Array.prototype.some,n,e));F.all=(t,...e)=>ste(Array.prototype.every,t,e);var ye=(t,e,r,n={})=>{if(!t){let{multipleValues:i}=n,s=i?`received values of types ${[...new Set(r.map(o=>`\`${F(o)}\``))].join(", ")}`:`received value of type \`${F(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}},ae={undefined:t=>ye(F.undefined(t),"undefined",t),string:t=>ye(F.string(t),"string",t),number:t=>ye(F.number(t),"number",t),bigint:t=>ye(F.bigint(t),"bigint",t),function_:t=>ye(F.function_(t),"Function",t),null_:t=>ye(F.null_(t),"null",t),class_:t=>ye(F.class_(t),"Class",t),boolean:t=>ye(F.boolean(t),"boolean",t),symbol:t=>ye(F.symbol(t),"symbol",t),numericString:t=>ye(F.numericString(t),"string with a number",t),array:(t,e)=>{ye(F.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>ye(F.buffer(t),"Buffer",t),blob:t=>ye(F.blob(t),"Blob",t),nullOrUndefined:t=>ye(F.nullOrUndefined(t),"null or undefined",t),object:t=>ye(F.object(t),"Object",t),iterable:t=>ye(F.iterable(t),"Iterable",t),asyncIterable:t=>ye(F.asyncIterable(t),"AsyncIterable",t),generator:t=>ye(F.generator(t),"Generator",t),asyncGenerator:t=>ye(F.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>ye(F.nativePromise(t),"native Promise",t),promise:t=>ye(F.promise(t),"Promise",t),generatorFunction:t=>ye(F.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>ye(F.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>ye(F.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>ye(F.boundFunction(t),"Function",t),regExp:t=>ye(F.regExp(t),"RegExp",t),date:t=>ye(F.date(t),"Date",t),error:t=>ye(F.error(t),"Error",t),map:t=>ye(F.map(t),"Map",t),set:t=>ye(F.set(t),"Set",t),weakMap:t=>ye(F.weakMap(t),"WeakMap",t),weakSet:t=>ye(F.weakSet(t),"WeakSet",t),weakRef:t=>ye(F.weakRef(t),"WeakRef",t),int8Array:t=>ye(F.int8Array(t),"Int8Array",t),uint8Array:t=>ye(F.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>ye(F.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>ye(F.int16Array(t),"Int16Array",t),uint16Array:t=>ye(F.uint16Array(t),"Uint16Array",t),int32Array:t=>ye(F.int32Array(t),"Int32Array",t),uint32Array:t=>ye(F.uint32Array(t),"Uint32Array",t),float32Array:t=>ye(F.float32Array(t),"Float32Array",t),float64Array:t=>ye(F.float64Array(t),"Float64Array",t),bigInt64Array:t=>ye(F.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>ye(F.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>ye(F.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>ye(F.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>ye(F.dataView(t),"DataView",t),enumCase:(t,e)=>ye(F.enumCase(t,e),"EnumCase",t),urlInstance:t=>ye(F.urlInstance(t),"URL",t),urlString:t=>ye(F.urlString(t),"string with a URL",t),truthy:t=>ye(F.truthy(t),"truthy",t),falsy:t=>ye(F.falsy(t),"falsy",t),nan:t=>ye(F.nan(t),"NaN",t),primitive:t=>ye(F.primitive(t),"primitive",t),integer:t=>ye(F.integer(t),"integer",t),safeInteger:t=>ye(F.safeInteger(t),"integer",t),plainObject:t=>ye(F.plainObject(t),"plain object",t),typedArray:t=>ye(F.typedArray(t),"TypedArray",t),arrayLike:t=>ye(F.arrayLike(t),"array-like",t),domElement:t=>ye(F.domElement(t),"HTMLElement",t),observable:t=>ye(F.observable(t),"Observable",t),nodeStream:t=>ye(F.nodeStream(t),"Node.js Stream",t),infinite:t=>ye(F.infinite(t),"infinite number",t),emptyArray:t=>ye(F.emptyArray(t),"empty array",t),nonEmptyArray:t=>ye(F.nonEmptyArray(t),"non-empty array",t),emptyString:t=>ye(F.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>ye(F.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>ye(F.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>ye(F.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>ye(F.emptyObject(t),"empty object",t),nonEmptyObject:t=>ye(F.nonEmptyObject(t),"non-empty object",t),emptySet:t=>ye(F.emptySet(t),"empty set",t),nonEmptySet:t=>ye(F.nonEmptySet(t),"non-empty set",t),emptyMap:t=>ye(F.emptyMap(t),"empty map",t),nonEmptyMap:t=>ye(F.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>ye(F.propertyKey(t),"PropertyKey",t),formData:t=>ye(F.formData(t),"FormData",t),urlSearchParams:t=>ye(F.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>ye(F.evenInteger(t),"even integer",t),oddInteger:t=>ye(F.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>ye(F.directInstanceOf(t,e),"T",t),inRange:(t,e)=>ye(F.inRange(t,e),"in range",t),any:(t,...e)=>ye(F.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>ye(F.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(F,{class:{value:F.class_},function:{value:F.function_},null:{value:F.null_}});Object.defineProperties(ae,{class:{value:ae.class_},function:{value:ae.function_},null:{value:ae.null_}});var k=F;c();import{EventEmitter as e3e}from"node:events";c();var CL=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},nh=class t{static fn(e){return(...r)=>new t((n,i,s)=>{r.push(s),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let i=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a))},s=a=>{this._isPending=!1,n(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,s,o)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new CL(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(nh.prototype,Promise.prototype);c();function fBe(t){return k.object(t)&&"_onResponse"in t}var lr=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,fBe(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,k.string(r.stack)&&k.string(this.stack)){let i=this.stack.indexOf(this.message)+this.message.length,s=this.stack.slice(i).split(`
216
216
  `).reverse(),o=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
217
217
  `).reverse();for(;o.length>0&&o[0]===s[0];)s.shift();this.stack=`${this.stack.slice(0,i)}${s.reverse().join(`
218
218
  `)}${o.reverse().join(`