@stacksjs/orm 0.70.87 → 0.70.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -8
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var i3=Object.create;var{getPrototypeOf:a3,defineProperty:H9,getOwnPropertyNames:o3}=Object;var s3=Object.prototype.hasOwnProperty;function r3($){return this[$]}var t3,e3,$B=($,Z,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var X=Z?t3??=new WeakMap:e3??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?i3(a3($)):{};let G=Z||!$||!$.__esModule?H9(J,"default",{value:$,enumerable:!0}):J;for(let V of o3($))if(!s3.call(G,V))H9(G,V,{get:r3.bind($,V),enumerable:!0});if(Q)X.set($,G);return G};var K=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var C=import.meta.require;var b0=K((h9)=>{Object.defineProperty(h9,"__esModule",{value:!0});h9.CryptoProviderOnlySupportsAsyncError=h9.CryptoProvider=void 0;class _9{computeHMACSignature($,Z){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync($,Z){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async($){throw Error("computeSHA256 not implemented.")}}h9.CryptoProvider=_9;class g9 extends Error{}h9.CryptoProviderOnlySupportsAsyncError=g9});var p9=K((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.NodeCryptoProvider=void 0;var u9=C("crypto"),PB=b0();class c9 extends PB.CryptoProvider{computeHMACSignature($,Z){return u9.createHmac("sha256",Z).update($,"utf8").digest("hex")}async computeHMACSignatureAsync($,Z){return await this.computeHMACSignature($,Z)}async computeSHA256Async($){return new Uint8Array(await u9.createHash("sha256").update($).digest())}}n9.NodeCryptoProvider=c9});var j0=K((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.HttpClientResponse=i9.HttpClient=void 0;class H0{getClientName(){throw Error("getClientName not implemented.")}makeRequest($,Z,J,Q,X,Y,G,V){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let $=TypeError(H0.TIMEOUT_ERROR_CODE);return $.code=H0.TIMEOUT_ERROR_CODE,$}}i9.HttpClient=H0;H0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];H0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class d9{constructor($,Z){this._statusCode=$,this._headers=Z}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream($){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}i9.HttpClientResponse=d9});var JZ=K(($Z)=>{Object.defineProperty($Z,"__esModule",{value:!0});$Z.NodeHttpClientResponse=$Z.NodeHttpClient=void 0;var o9=C("http"),s9=C("https"),k$=j0(),r9=o9.default||o9,t9=s9.default||s9,RB=new r9.Agent({keepAlive:!0}),yB=new t9.Agent({keepAlive:!0});class e9 extends k$.HttpClient{constructor($){super();this._agent=$}getClientName(){return"node"}makeRequest($,Z,J,Q,X,Y,G,V){let U=G==="http",W=this._agent;if(!W)W=U?RB:yB;return new Promise((z,L)=>{let H=(U?r9:t9).request({host:$,port:Z,path:J,method:Q,agent:W,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});H.setTimeout(V,()=>{H.destroy(k$.HttpClient.makeTimeoutError())}),H.on("response",(T)=>{z(new A$(T))}),H.on("error",(T)=>{L(T)}),H.once("socket",(T)=>{if(T.connecting)T.once(U?"connect":"secureConnect",()=>{H.write(Y),H.end()});else H.write(Y),H.end()})})}}$Z.NodeHttpClient=e9;class A$ extends k$.HttpClientResponse{constructor($){super($.statusCode,$.headers||{});this._res=$}getRawResponse(){return this._res}toStream($){return this._res.once("end",()=>$()),this._res}toJSON(){return new Promise(($,Z)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{J+=Q}),this._res.once("end",()=>{try{$(JSON.parse(J))}catch(Q){Z(Q)}})})}}$Z.NodeHttpClientResponse=A$});var c=K((VZ)=>{Object.defineProperty(VZ,"__esModule",{value:!0});VZ.parseHeadersForFetch=VZ.parseHttpHeaderAsNumber=VZ.parseHttpHeaderAsString=VZ.getAPIMode=VZ.jsonStringifyRequestData=VZ.concat=VZ.createApiKeyAuthenticator=VZ.detectAIAgent=VZ.AI_AGENTS=VZ.determineProcessUserAgentProperties=VZ.validateInteger=VZ.flattenAndStringify=VZ.isObject=VZ.emitWarning=VZ.pascalToCamelCase=VZ.callbackifyPromiseWithTimeout=VZ.normalizeHeader=VZ.normalizeHeaders=VZ.removeNullish=VZ.protoExtend=VZ.getOptionsFromArgs=VZ.getDataFromArgs=VZ.extractUrlParams=VZ.makeURLInterpolator=VZ.queryStringifyRequestData=VZ.isOptionsHash=void 0;var x$=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function I$($){return $&&typeof $==="object"&&x$.some((Z)=>Object.prototype.hasOwnProperty.call($,Z))}VZ.isOptionsHash=I$;function bB($){return fB($)}VZ.queryStringifyRequestData=bB;function QZ($){return encodeURIComponent($).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function jB($){if($ instanceof Date)return Math.floor($.getTime()/1000).toString();if($===null)return"";return String($)}function fB($){let Z=[];function J(Q,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){Z.push(QZ(Q)+"="+QZ(jB(X)));return}if(Array.isArray(X)){for(let Y=0;Y<X.length;Y++)if(X[Y]!==void 0)J(Q+"["+Y+"]",X[Y]);return}for(let Y of Object.keys(X))J(Q+"["+Y+"]",X[Y])}if(typeof $==="object"&&$!==null)for(let Q of Object.keys($))J(Q,$[Q]);return Z.join("&")}VZ.makeURLInterpolator=(()=>{let $={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return(Z)=>{let J=Z.replace(/["\n\r\u2028\u2029]/g,(Q)=>$[Q]);return(Q)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Y)=>{let G=Q[Y];if(MB(G))return encodeURIComponent(G);return""})}}})();function MB($){return["number","string","boolean"].includes(typeof $)}function _B($){let Z=$.match(/\{\w+\}/g);if(!Z)return[];return Z.map((J)=>J.replace(/[{}]/g,""))}VZ.extractUrlParams=_B;function gB($){if(!Array.isArray($)||!$[0]||typeof $[0]!=="object")return{};if(!I$($[0]))return $.shift();let Z=Object.keys($[0]),J=Z.filter((Q)=>x$.includes(Q));if(J.length>0&&J.length!==Z.length)P$(`Options found in arguments (${J.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}VZ.getDataFromArgs=gB;function hB($){let Z={host:null,headers:{},settings:{},streaming:!1};if($.length>0){let J=$[$.length-1];if(typeof J==="string")Z.authenticator=N$($.pop());else if(I$(J)){let Q={...$.pop()},X=Object.keys(Q).filter((Y)=>!x$.includes(Y));if(X.length)P$(`Invalid options found (${X.join(", ")}); ignoring.`);if(Q.apiKey)Z.authenticator=N$(Q.apiKey);if(Q.idempotencyKey)Z.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)Z.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if(Z.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");Z.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)Z.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))Z.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))Z.settings.timeout=Q.timeout;if(Q.host)Z.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");Z.authenticator=Q.authenticator}if(Q.headers)Object.assign(Z.headers,Q.headers);if(Q.additionalHeaders)Object.assign(Z.headers,Q.additionalHeaders);if(Q.streaming)Z.streaming=!0}}return Z}VZ.getOptionsFromArgs=hB;function mB($){let Z=this,J=Object.prototype.hasOwnProperty.call($,"constructor")?$.constructor:function(...Q){Z.apply(this,Q)};return Object.assign(J,Z),J.prototype=Object.create(Z.prototype),Object.assign(J.prototype,$),J}VZ.protoExtend=mB;function uB($){if(typeof $!=="object")throw Error("Argument must be an object");return Object.keys($).reduce((Z,J)=>{if($[J]!=null)Z[J]=$[J];return Z},{})}VZ.removeNullish=uB;function cB($){if(!($&&typeof $==="object"))return $;return Object.keys($).reduce((Z,J)=>{return Z[XZ(J)]=$[J],Z},{})}VZ.normalizeHeaders=cB;function XZ($){return $.split("-").map((Z)=>Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase()).join("-")}VZ.normalizeHeader=XZ;function nB($,Z){if(Z)return $.then((J)=>{setTimeout(()=>{Z(null,J)},0)},(J)=>{setTimeout(()=>{Z(J,null)},0)});return $}VZ.callbackifyPromiseWithTimeout=nB;function lB($){if($==="OAuth")return"oauth";else return $[0].toLowerCase()+$.substring(1)}VZ.pascalToCamelCase=lB;function P$($){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${$}`);return process.emitWarning($,"Stripe")}VZ.emitWarning=P$;function YZ($){let Z=typeof $;return(Z==="function"||Z==="object")&&!!$}VZ.isObject=YZ;function pB($){let Z={},J=(Q,X)=>{Object.entries(Q).forEach(([Y,G])=>{let V=X?`${X}[${Y}]`:Y;if(YZ(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,V);else Z[V]=G;else Z[V]=String(G)})};return J($,null),Z}VZ.flattenAndStringify=pB;function dB($,Z,J){if(!Number.isInteger(Z))if(J!==void 0)return J;else throw Error(`${$} must be an integer`);return Z}VZ.validateInteger=dB;function iB(){return typeof process>"u"?{}:{lang_version:process.version}}VZ.determineProcessUserAgentProperties=iB;VZ.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function aB($){for(let[Z,J]of VZ.AI_AGENTS)if($[Z])return J;return""}VZ.detectAIAgent=aB;function N$($){let Z=(J)=>{return J.headers.Authorization="Bearer "+$,Promise.resolve()};return Z._apiKey=$,Z}VZ.createApiKeyAuthenticator=N$;function oB($){let Z=$.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array(Z),Q=0;return $.forEach((X)=>{J.set(X,Q),Q+=X.length}),J}VZ.concat=oB;function sB($,Z){if(this[$]instanceof Date)return Math.floor(this[$].getTime()/1000).toString();return Z}function rB($){return JSON.stringify($,sB)}VZ.jsonStringifyRequestData=rB;function tB($){if(!$)return"v1";return $.startsWith("/v2")?"v2":"v1"}VZ.getAPIMode=tB;function GZ($){if(Array.isArray($))return $.join(", ");return String($)}VZ.parseHttpHeaderAsString=GZ;function eB($){let Z=Array.isArray($)?$[0]:$;return Number(Z)}VZ.parseHttpHeaderAsNumber=eB;function $W($){return Object.entries($).map(([Z,J])=>{return[Z,GZ(J)]})}VZ.parseHeadersForFetch=$W});var LZ=K((UZ)=>{Object.defineProperty(UZ,"__esModule",{value:!0});UZ.FetchHttpClientResponse=UZ.FetchHttpClient=void 0;var NW=c(),f0=j0();class E8 extends f0.HttpClient{constructor($){super();if(!$){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");$=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=E8.makeFetchWithAbortTimeout($);else this._fetchFn=E8.makeFetchWithRaceTimeout($)}static makeFetchWithRaceTimeout($){return(Z,J,Q)=>{let X,Y=new Promise((V,U)=>{X=setTimeout(()=>{X=null,U(f0.HttpClient.makeTimeoutError())},Q)}),G=$(Z,J);return Promise.race([G,Y]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout($){return async(Z,J,Q)=>{let X=new AbortController,Y=setTimeout(()=>{Y=null,X.abort(f0.HttpClient.makeTimeoutError())},Q);try{return await $(Z,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw f0.HttpClient.makeTimeoutError();else throw G}finally{if(Y)clearTimeout(Y)}}}getClientName(){return"fetch"}async makeRequest($,Z,J,Q,X,Y,G,V){let W=new URL(J,`${G==="http"?"http":"https"}://${$}`);W.port=Z;let B=Q=="POST"||Q=="PUT"||Q=="PATCH",z=Y||(B?"":void 0),L=await this._fetchFn(W.toString(),{method:Q,headers:(0,NW.parseHeadersForFetch)(X),body:z},V);return new F8(L)}}UZ.FetchHttpClient=E8;class F8 extends f0.HttpClientResponse{constructor($){super($.status,F8._transformHeadersToObject($.headers));this._res=$}getRawResponse(){return this._res}toStream($){return $(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject($){let Z={};for(let J of $){if(!Array.isArray(J)||J.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");Z[J[0]]=J[1]}return Z}}UZ.FetchHttpClientResponse=F8});var DZ=K((wZ)=>{Object.defineProperty(wZ,"__esModule",{value:!0});wZ.SubtleCryptoProvider=void 0;var KZ=b0();class HZ extends KZ.CryptoProvider{constructor($){super();this.subtleCrypto=$||crypto.subtle}computeHMACSignature($,Z){throw new KZ.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync($,Z){let J=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",J.encode(Z),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Q,J.encode($)),Y=new Uint8Array(X),G=Array(Y.length);for(let V=0;V<Y.length;V++)G[V]=S$[Y[V]];return G.join("")}async computeSHA256Async($){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",$))}}wZ.SubtleCryptoProvider=HZ;var S$=Array(256);for(let $=0;$<S$.length;$++)S$[$]=$.toString(16).padStart(2,"0")});var FZ=K((qZ)=>{Object.defineProperty(qZ,"__esModule",{value:!0});qZ.PlatformFunctions=void 0;var IW=LZ(),PW=DZ();class OZ{constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,($)=>{let Z=Math.random()*16|0;return($==="x"?Z:Z&3|8).toString(16)})}secureCompare($,Z){if($.length!==Z.length)return!1;let J=$.length,Q=0;for(let X=0;X<J;++X)Q|=$.charCodeAt(X)^Z.charCodeAt(X);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData($){throw Error("tryBufferData not implemented.")}createNodeHttpClient($){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient($){return new IW.FetchHttpClient($)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider($){return new PW.SubtleCryptoProvider($)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}qZ.PlatformFunctions=OZ});var M0=K((AZ)=>{Object.defineProperty(AZ,"__esModule",{value:!0});AZ.TemporarySessionExpiredError=AZ.RateLimitError=AZ.StripeUnsupportedResponseTypeError=AZ.StripeUnsupportedGrantTypeError=AZ.StripeInvalidScopeError=AZ.StripeOAuthInvalidRequestError=AZ.StripeInvalidClientError=AZ.StripeInvalidGrantError=AZ.StripeOAuthError=AZ.StripeIdempotencyError=AZ.StripeSignatureVerificationError=AZ.StripeConnectionError=AZ.StripeRateLimitError=AZ.StripePermissionError=AZ.StripeAuthenticationError=AZ.StripeAPIError=AZ.StripeInvalidRequestError=AZ.StripeCardError=AZ.StripeError=AZ.generateV2Error=AZ.generateOAuthError=AZ.generateV1Error=void 0;var SW=($)=>{let Z=$.statusCode;if(Z===429||Z===400&&$.code==="rate_limit")return new j$($);if(Z===400||Z===404){if($.type==="idempotency_error")return new k8($);return new C8($)}if(Z===401)return new v$($);if(Z===402)return new R$($);if(Z===403)return new b$($);return new y$($)};AZ.generateV1Error=SW;var RW=($)=>{switch($.type){case"invalid_grant":return new f$($);case"invalid_client":return new M$($);case"invalid_request":return new _$($);case"invalid_scope":return new g$($);case"unsupported_grant_type":return new h$($);case"unsupported_response_type":return new m$($);default:return new d($)}};AZ.generateOAuthError=RW;var yW=($)=>{switch($.type){case"idempotency_error":return new k8($);case"rate_limit":return new u$($);case"temporary_session_expired":return new c$($)}switch($.code){case"invalid_fields":return new C8($)}return AZ.generateV1Error($)};AZ.generateV2Error=yW;class y extends Error{constructor($={},Z=null){super($.message);this.type=Z||this.constructor.name,this.raw=$,this.rawType=$.type,this.code=$.code,this.doc_url=$.doc_url,this.param=$.param,this.detail=$.detail,this.headers=$.headers,this.requestId=$.requestId,this.statusCode=$.statusCode,this.message=$.message??"",this.userMessage=$.user_message,this.charge=$.charge,this.decline_code=$.decline_code,this.payment_intent=$.payment_intent,this.payment_method=$.payment_method,this.payment_method_type=$.payment_method_type,this.setup_intent=$.setup_intent,this.source=$.source}}AZ.StripeError=y;y.generate=AZ.generateV1Error;class R$ extends y{constructor($={}){super($,"StripeCardError")}}AZ.StripeCardError=R$;class C8 extends y{constructor($={}){super($,"StripeInvalidRequestError")}}AZ.StripeInvalidRequestError=C8;class y$ extends y{constructor($={}){super($,"StripeAPIError")}}AZ.StripeAPIError=y$;class v$ extends y{constructor($={}){super($,"StripeAuthenticationError")}}AZ.StripeAuthenticationError=v$;class b$ extends y{constructor($={}){super($,"StripePermissionError")}}AZ.StripePermissionError=b$;class j$ extends y{constructor($={}){super($,"StripeRateLimitError")}}AZ.StripeRateLimitError=j$;class CZ extends y{constructor($={}){super($,"StripeConnectionError")}}AZ.StripeConnectionError=CZ;class kZ extends y{constructor($,Z,J={}){super(J,"StripeSignatureVerificationError");this.header=$,this.payload=Z}}AZ.StripeSignatureVerificationError=kZ;class k8 extends y{constructor($={}){super($,"StripeIdempotencyError")}}AZ.StripeIdempotencyError=k8;class d extends y{constructor($={},Z="StripeOAuthError"){super($,Z)}}AZ.StripeOAuthError=d;class f$ extends d{constructor($={}){super($,"StripeInvalidGrantError")}}AZ.StripeInvalidGrantError=f$;class M$ extends d{constructor($={}){super($,"StripeInvalidClientError")}}AZ.StripeInvalidClientError=M$;class _$ extends d{constructor($={}){super($,"StripeOAuthInvalidRequestError")}}AZ.StripeOAuthInvalidRequestError=_$;class g$ extends d{constructor($={}){super($,"StripeInvalidScopeError")}}AZ.StripeInvalidScopeError=g$;class h$ extends d{constructor($={}){super($,"StripeUnsupportedGrantTypeError")}}AZ.StripeUnsupportedGrantTypeError=h$;class m$ extends d{constructor($={}){super($,"StripeUnsupportedResponseTypeError")}}AZ.StripeUnsupportedResponseTypeError=m$;class u$ extends y{constructor($={}){super($,"RateLimitError")}}AZ.RateLimitError=u$;class c$ extends y{constructor($={}){super($,"TemporarySessionExpiredError")}}AZ.TemporarySessionExpiredError=c$});var bZ=K((yZ)=>{Object.defineProperty(yZ,"__esModule",{value:!0});yZ.NodePlatformFunctions=void 0;var A8=C("crypto"),xZ=C("events"),tW=p9(),IZ=JZ(),eW=FZ(),$U=M0(),ZU=c(),PZ=C("os");class SZ extends $U.StripeError{}class RZ extends eW.PlatformFunctions{uuid4(){if(A8.randomUUID)return A8.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,PZ.release)()} ${(0,PZ.arch)()}`}secureCompare($,Z){if(!$||!Z)throw Error("secureCompare must receive two arguments");if($.length!==Z.length)return!1;if(A8.timingSafeEqual){let J=new TextEncoder,Q=J.encode($),X=J.encode(Z);return A8.timingSafeEqual(Q,X)}return super.secureCompare($,Z)}createEmitter(){return new xZ.EventEmitter}tryBufferData($){if(!($.file.data instanceof xZ.EventEmitter))return Promise.resolve($);let Z=[];return new Promise((J,Q)=>{$.file.data.on("data",(X)=>{Z.push(X)}).once("end",()=>{let X=Object.assign({},$);X.file.data=(0,ZU.concat)(Z),J(X)}).on("error",(X)=>{Q(new SZ({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient($){return new IZ.NodeHttpClient($)}createDefaultHttpClient(){return new IZ.NodeHttpClient}createNodeCryptoProvider(){return new tW.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}yZ.NodePlatformFunctions=RZ});var _Z=K((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.RequestSender=void 0;var w0=M0(),jZ=j0(),j=c(),JU=60;class _0{constructor($,Z){this._stripe=$,this._maxBufferedRequestMetric=Z}_normalizeStripeContext($,Z){if($)return $.toString()||null;return Z?.toString()||null}_addHeadersDirectlyToObject($,Z){$.requestId=Z["request-id"],$.stripeAccount=$.stripeAccount||Z["stripe-account"],$.apiVersion=$.apiVersion||Z["stripe-version"],$.idempotencyKey=$.idempotencyKey||Z["idempotency-key"]}_makeResponseEvent($,Z,J){let Q=Date.now(),X=Q-$.request_start_time;return(0,j.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:$.method,path:$.path,status:Z,request_id:this._getRequestId(J),elapsed:X,request_start_time:$.request_start_time,request_end_time:Q})}_getRequestId($){return $["request-id"]}_streamingResponseHandler($,Z,J){return(Q)=>{let X=Q.getHeaders(),Y=()=>{let V=this._makeResponseEvent($,Q.getStatusCode(),X);this._stripe._emitter.emit("response",V),this._recordRequestMetrics(this._getRequestId(X),V.elapsed,Z)},G=Q.toStream(Y);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler($,Z,J,Q){return(X)=>{let Y=X.getHeaders(),G=this._getRequestId(Y),V=X.getStatusCode(),U=this._makeResponseEvent($,V,Y);this._stripe._emitter.emit("response",U),X.toJSON().then((W)=>{if(W.error){let B=typeof W.error==="string";if(B)W.error={type:W.error,message:W.error_description};W.error.headers=Y,W.error.statusCode=V,W.error.requestId=G;let z;if(B)z=(0,w0.generateOAuthError)(W.error);else if(Z==="v2")z=(0,w0.generateV2Error)(W.error);else z=(0,w0.generateV1Error)(W.error);throw z}return W},(W)=>{throw new w0.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:W,requestId:Y["request-id"]})}).then((W)=>{this._recordRequestMetrics(G,U.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Y),Object.defineProperty(W,"lastResponse",{enumerable:!1,writable:!1,value:B}),Q(null,W)},(W)=>Q(W,null))}}static _generateConnectionErrorMessage($){return`An error occurred with our connection to Stripe.${$>0?` Request was retried ${$} times.`:""}`}static _shouldRetry($,Z,J,Q){if(Q&&Z===0&&jZ.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if(Z>=J)return!1;if(!$)return!0;if($.getHeaders()["stripe-should-retry"]==="false")return!1;if($.getHeaders()["stripe-should-retry"]==="true")return!0;if($.getStatusCode()===409)return!0;if($.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS($,Z=null){let J=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),X=Math.min(J*Math.pow(2,$-1),Q);if(X*=0.5*(1+Math.random()),X=Math.max(J,X),Number.isInteger(Z)&&Z<=JU)X=Math.max(X,Z);return X*1000}_getMaxNetworkRetries($={}){return $.maxNetworkRetries!==void 0&&Number.isInteger($.maxNetworkRetries)?$.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey($,Z,J){let Q=this._getMaxNetworkRetries(Z),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if($==="POST"||$==="DELETE")return X()}else if(J==="v1"){if($==="POST"&&Q>0)return X()}return null}_makeHeaders({contentType:$,contentLength:Z,apiVersion:J,clientUserAgent:Q,method:X,userSuppliedHeaders:Y,userSuppliedSettings:G,stripeAccount:V,stripeContext:U,apiMode:W}){let B={Accept:"application/json","Content-Type":$,"User-Agent":this._getUserAgentString(W),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":V,"Stripe-Context":U,"Idempotency-Key":this._defaultIdempotencyKey(X,G,W)},z=X=="POST"||X=="PUT"||X=="PATCH";if(z||Z){if(!z)(0,j.emitWarning)(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=Z}return Object.assign((0,j.removeNullish)(B),(0,j.normalizeHeaders)(Y))}_getUserAgentString($){let Z=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${$} NodeBindings/${Z}`;if(J)X+=` ${J}`;if(Q)X+=` AIAgent/${Q}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let $=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:$})}}_recordRequestMetrics($,Z,J){if(this._stripe.getTelemetryEnabled()&&$)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,j.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:$,request_duration_ms:Z};if(J&&J.length>0)Q.usage=J;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest($,Z,J,Q,X){return new Promise((G,V)=>{let U;try{let H=$.toUpperCase();if(H!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let T=[].slice.call([J,Q]),D=(0,j.getDataFromArgs)(T),q=H==="POST"?Object.assign({},D):null,O=(0,j.getOptionsFromArgs)(T),k=O.headers,N=O.authenticator;U={requestMethod:H,requestPath:Z,bodyData:q,queryData:{},authenticator:N,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:X||["raw_request"]}}catch(H){V(H);return}function W(H,T){if(H)V(H);else G(T)}let{headers:B,settings:z}=U,L=U.authenticator;this._request(U.requestMethod,U.host,Z,U.bodyData,L,{headers:B,settings:z,streaming:U.streaming},U.usage,W)})}_getContentLength($){return typeof $==="string"?new TextEncoder().encode($).length:$.length}_request($,Z,J,Q,X,Y,G=[],V,U=null){let W;X=X??this._stripe._authenticator??null;let B=(0,j.getAPIMode)(J),z=(T,D,q,O,k)=>{return setTimeout(T,this._getSleepTimeInMS(O,k),D,q,O+1)},L=(T,D,q)=>{let O=Y.settings&&Y.settings.timeout&&Number.isInteger(Y.settings.timeout)&&Y.settings.timeout>=0?Y.settings.timeout:this._stripe.getApiField("timeout"),k={host:Z||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:$,headers:Object.assign({},D),body:W,protocol:this._stripe.getApiField("protocol")};X(k).then(()=>{let N=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),R=Date.now(),M=(0,j.removeNullish)({api_version:T,account:(0,j.parseHttpHeaderAsString)(D["Stripe-Account"]),idempotency_key:(0,j.parseHttpHeaderAsString)(D["Idempotency-Key"]),method:$,path:J,request_start_time:R}),_=q||0,P0=this._getMaxNetworkRetries(Y.settings||{});this._stripe._emitter.emit("request",M),N.then((v)=>{if(_0._shouldRetry(v,_,P0))return z(L,T,D,_,(0,j.parseHttpHeaderAsNumber)(v.getHeaders()["retry-after"]));else if(Y.streaming&&v.getStatusCode()<400)return this._streamingResponseHandler(M,G,V)(v);else return this._jsonResponseHandler(M,B,G,V)(v)}).catch((v)=>{if(_0._shouldRetry(null,_,P0,v))return z(L,T,D,_,null);else{let d3=v.code&&v.code===jZ.HttpClient.TIMEOUT_ERROR_CODE;return V(new w0.StripeConnectionError({message:d3?`Request aborted due to timeout being reached (${O}ms)`:_0._generateConnectionErrorMessage(_),detail:v}))}})}).catch((N)=>{throw new w0.StripeError({message:"Unable to authenticate the request",exception:N})})},H=(T,D)=>{if(T)return V(T);W=D,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(D),apiVersion:O,clientUserAgent:q,method:$,userSuppliedHeaders:Y.headers??null,userSuppliedSettings:Y.settings??{},stripeAccount:Y.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Y.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});L(O,k,0)})};if(U)U($,Q,Y.headers,H);else{let T;if(B=="v2")T=Q?(0,j.jsonStringifyRequestData)(Q):"";else T=(0,j.queryStringifyRequestData)(Q||{});H(null,T)}}}fZ.RequestSender=_0});var lZ=K((cZ)=>{Object.defineProperty(cZ,"__esModule",{value:!0});cZ.makeAutoPaginationMethods=void 0;var N8=c();class p${constructor($,Z,J,Q){this.index=0,this.pagePromise=$,this.promiseCache={currentPromise:null},this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async iterate($){if(!($&&$.data&&typeof $.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let Z=uZ(this.requestArgs);if(this.index<$.data.length){let J=Z?$.data.length-1-this.index:this.index,Q=$.data[J];return this.index+=1,{value:Q,done:!1}}else if($.has_more){this.index=0,this.pagePromise=this.getNextPage($);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage($){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let $=(async()=>{let Z=await this._next();return this.promiseCache.currentPromise=null,Z})();return this.promiseCache.currentPromise=$,$}}class gZ extends p${getNextPage($){let Z=uZ(this.requestArgs),J=VU($,Z);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[Z?"ending_before":"starting_after"]:J})}}class hZ extends p${getNextPage($){if(!$.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:$.next_page})}}class mZ{constructor($,Z,J,Q){this.firstPagePromise=$,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let $=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=$.data[Symbol.iterator](),this.nextPageUrl=$.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let $=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=$.next_page_url||null,this.currentPageIterator=$.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let J=this.currentPageIterator.next();if(!J.done)return{done:!1,value:J.value}}let $=await this.turnPage();if(!$)return{done:!0,value:void 0};let Z=$.next();if(!Z.done)return{done:!1,value:Z.value};return{done:!0,value:void 0}}}var QU=($,Z,J,Q)=>{let X=(0,N8.getAPIMode)(J.fullPath||J.path);if(X!=="v2"&&J.methodType==="search")return l$(new hZ(Q,Z,J,$));if(X!=="v2"&&J.methodType==="list")return l$(new gZ(Q,Z,J,$));if(X==="v2"&&J.methodType==="list")return l$(new mZ(Q,Z,J,$));return null};cZ.makeAutoPaginationMethods=QU;var l$=($)=>{let Z=BU((...X)=>$.next(...X)),J=WU(Z),Q={autoPagingEach:Z,autoPagingToArray:J,next:()=>$.next(),return:()=>{return{}},[XU()]:()=>{return Q}};return Q};function XU(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function YU($){if($.length<2)return null;let Z=$[1];if(typeof Z!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);return Z}function GU($){if($.length===0)return;let Z=$[0];if(typeof Z!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);if(Z.length===2)return Z;if(Z.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${Z}`);return function(Q,X){let Y=Z(Q);X(Y)}}function VU($,Z){let J=Z?0:$.data.length-1,Q=$.data[J],X=Q&&Q.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function BU($){return function(){let J=[].slice.call(arguments),Q=GU(J),X=YU(J);if(J.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${J}`);let Y=UU($,Q);return(0,N8.callbackifyPromiseWithTimeout)(Y,X)}}function WU($){return function(J,Q){let X=J&&J.limit;if(!X)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(X>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");let Y=new Promise((G,V)=>{let U=[];$((W)=>{if(U.push(W),U.length>=X)return!1}).then(()=>{G(U)}).catch(V)});return(0,N8.callbackifyPromiseWithTimeout)(Y,Q)}}function UU($,Z){return new Promise((J,Q)=>{function X(Y){if(Y.done){J();return}let G=Y.value;return new Promise((V)=>{Z(G,V)}).then((V)=>{if(V===!1)return X({done:!0,value:void 0});else return $().then(X)})}$().then(X).catch(Q)})}function uZ($){let Z=[].slice.call($);return!!(0,N8.getDataFromArgs)(Z).ending_before}});var aZ=K((dZ)=>{Object.defineProperty(dZ,"__esModule",{value:!0});dZ.stripeMethod=void 0;var pZ=c(),zU=lZ();function LU($){if($.path!==void 0&&$.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${$.path}) and a 'fullPath' (${$.fullPath}).`);return function(...Z){let J=typeof Z[Z.length-1]=="function"&&Z.pop();$.urlParams=(0,pZ.extractUrlParams)($.fullPath||this.createResourcePathWithSymbols($.path||""));let Q=(0,pZ.callbackifyPromiseWithTimeout)(this._makeRequest(Z,$,{}),J);return Object.assign(Q,(0,zU.makeAutoPaginationMethods)(this,Z,$,Q)),Q}}dZ.stripeMethod=LU});var I8=K((sZ)=>{Object.defineProperty(sZ,"__esModule",{value:!0});sZ.Decimal=sZ.isDecimal=sZ.DEFAULT_DIV_PRECISION=void 0;var KU={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};sZ.DEFAULT_DIV_PRECISION=34;var oZ=30,x8=1e6;class P{constructor($,Z){let[J,Q]=P.normalize($,Z);this._coefficient=J,this._exponent=Q,Object.freeze(this)}static normalize($,Z){if($===0n)return[0n,0];let J=$,Q=Z;while(J!==0n&&J%10n===0n)J/=10n,Q+=1;return[J,Q]}static roundDivision($,Z,J,Q){if(Z===0n)return $;if(Q==="round-down")return $;let X=Z>0n===J>0n?1n:-1n;if(Q==="round-up")return $+X;if(Q==="ceil")return X===1n?$+1n:$;if(Q==="floor")return X===-1n?$-1n:$;let Y=Z<0n?-Z:Z,G=J<0n?-J:J,V=Y*2n,U;if(V===G)U=0;else if(V<G)U=-1;else U=1;if(U<0)return $;if(U>0)return $+X;if(Q==="half-up")return $+X;if(Q==="half-down")return $;if($%2n===0n)return $;else return $+X}add($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient+Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient+Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J+Z._coefficient,Z._exponent)}}sub($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient-Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient-Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J-Z._coefficient,Z._exponent)}}mul($){let Z=$;return new P(this._coefficient*Z._coefficient,this._exponent+Z._exponent)}div($,Z,J){if(Z<0||!Number.isInteger(Z))throw Error("precision must be a non-negative integer");let Q=$;if(Q._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Q._exponent+Z,Y,G,V;if(X>=0){let W=this._coefficient*10n**BigInt(X);Y=W/Q._coefficient,G=W%Q._coefficient,V=Q._coefficient}else{let W=Q._coefficient*10n**BigInt(-X);Y=this._coefficient/W,G=this._coefficient%W,V=W}let U=P.roundDivision(Y,G,V,J);return new P(U,-Z)}cmp($){let Z=$;if(this._exponent===Z._exponent){if(this._coefficient<Z._coefficient)return-1;if(this._coefficient>Z._coefficient)return 1;return 0}if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent),Q=Z._coefficient*J;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let J=10n**BigInt(this._exponent-Z._exponent),Q=this._coefficient*J;if(Q<Z._coefficient)return-1;if(Q>Z._coefficient)return 1;return 0}}eq($){return this.cmp($)===0}lt($){return this.cmp($)===-1}lte($){return this.cmp($)<=0}gt($){return this.cmp($)===1}gte($){return this.cmp($)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new P(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new P(-this._coefficient,this._exponent);return this}round($,Z){let J=typeof Z==="string"?KU[Z]:Z;if(J===void 0)throw Error(`Unknown rounding preset: "${Z}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,$);return sZ.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return sZ.Decimal.zero;if(X<=J.value)return this;let Y=X-J.value,G=10n**BigInt(Y),V=this._coefficient/G,U=this._coefficient%G,W=P.roundDivision(V,U,G,$);return new P(W,this._exponent+Y)}toString(){if(this._coefficient===0n)return"0";let $=this._coefficient.toString(),Z=$.startsWith("-"),J=Z?$.slice(1):$;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>oZ){if(J.length===1)return`${$}E${String(this._exponent)}`;let G=J[0]??"",V=J.slice(1),U=this._exponent+J.length-1;return`${Z?"-":""}${G}.${V}E${String(U)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${Z?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),V=J.slice(J.length-X);return`${Z?"-":""}${G}.${V}`}}if(J.length+this._exponent<=oZ){if(this._exponent===0)return $;let X="0".repeat(this._exponent);return`${Z?"-":""}${J}${X}`}else{if(J.length===1)return`${$}E+${String(this._exponent)}`;let X=J[0]??"",Y=J.slice(1),G=this._exponent+J.length-1;return`${Z?"-":""}${X}.${Y}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed($,Z){if($<0||!Number.isInteger($))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Y=X.toString(),G=Y.startsWith("-"),V=G?Y.slice(1):Y;if($===0)return Y;if($>=V.length){let U="0".repeat($-V.length);return`${G?"-":""}0.${U}${V}`}else{let U=V.slice(0,V.length-$),W=V.slice(V.length-$);return`${G?"-":""}${U}.${W}`}},Q=-$;if(this._exponent===Q)return J(this._coefficient);if(this._exponent<Q){let X=Q-this._exponent,Y=10n**BigInt(X),G=this._coefficient/Y,V=this._coefficient%Y,U=P.roundDivision(G,V,Y,Z);return J(U)}else{let X=this._exponent-Q,Y=this._coefficient*10n**BigInt(X);return J(Y)}}valueOf(){return this.toString()}}function HU($){return $ instanceof P}sZ.isDecimal=HU;sZ.Decimal={from($){if(typeof $==="bigint")return new P($,0);if(typeof $==="number"){if(!Number.isFinite($))throw Error("Number must be finite");return sZ.Decimal.from($.toString())}let Z=$.trim();if(Z==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(Z);if(!J)throw Error(`Invalid decimal string: ${$}`);let Q=J[1]==="-"?-1n:1n,X=J[2]??"",Y=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>x8||G<-x8)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let V=X+Y,U=Q*BigInt(V),W=G-Y.length;if(!Number.isSafeInteger(W)||W>x8||W<-x8)throw Error(`Computed exponent out of range: ${String(W)} exceeds safe integer bounds`);return new P(U,W)},zero:new P(0n,0)}});var tZ=K((rZ)=>{Object.defineProperty(rZ,"__esModule",{value:!0});rZ.coerceV2ResponseData=rZ.coerceV2RequestData=void 0;var DU=I8(),OU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":return typeof $==="bigint"||typeof $==="number"?String($):$;case"decimal_string":return typeof $.toFixed==="function"&&typeof $.isZero==="function"?$.toString():$;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$,Q={};for(let X of Object.keys(J)){let Y=Z.fields[X];Q[X]=Y?rZ.coerceV2RequestData(J[X],Y):J[X]}return Q}case"array":{if(!Array.isArray($))return $;return $.map((J)=>rZ.coerceV2RequestData(J,Z.element))}case"nullable":return rZ.coerceV2RequestData($,Z.inner)}};rZ.coerceV2RequestData=OU;var qU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":if(typeof $==="string")try{return BigInt($)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${$}'`)}return $;case"decimal_string":if(typeof $==="string")try{return DU.Decimal.from($)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${$}'`)}return $;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$;for(let Q of Object.keys(Z.fields))if(Q in J)J[Q]=rZ.coerceV2ResponseData(J[Q],Z.fields[Q]);return J}case"array":{if(!Array.isArray($))return $;for(let J=0;J<$.length;J++)$[J]=rZ.coerceV2ResponseData($[J],Z.element);return $}case"nullable":return rZ.coerceV2ResponseData($,Z.inner)}};rZ.coerceV2ResponseData=qU});var w=K(($1)=>{Object.defineProperty($1,"__esModule",{value:!0});$1.StripeResource=void 0;var Z0=c(),EU=aZ(),eZ=tZ();m0.extend=Z0.protoExtend;m0.method=EU.stripeMethod;m0.MAX_BUFFERED_REQUEST_METRICS=100;function m0($,Z){if(this._stripe=$,Z)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,Z0.makeURLInterpolator)(this.basePath||$.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,Z0.makeURLInterpolator)(this.path),this.initialize(...arguments)}$1.StripeResource=m0;m0.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath($,Z){let J=[this.basePath(Z),this.path(Z)];if(typeof $==="function"){let Q=$(Z);if(Q)J.push(Q)}else J.push($);return this._joinUrlParts(J)},createResourcePathWithSymbols($){if($)return`/${this._joinUrlParts([this.resourcePath,$])}`;else return`/${this.resourcePath}`},_joinUrlParts($){return $.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts($,Z,J){let Q=(Z.method||"GET").toUpperCase(),X=Z.usage||[],Y=Z.urlParams||[],G=Z.encode||((_)=>_),V=!!Z.fullPath,U=(0,Z0.makeURLInterpolator)(V?Z.fullPath:Z.path||""),W=V?Z.fullPath:this.createResourcePathWithSymbols(Z.path),B=[].slice.call($),z=Y.reduce((_,P0)=>{let v=B.shift();if(typeof v!=="string")throw Error(`Stripe: Argument "${P0}" must be a string, but got: ${v} (on API request to \`${Q} ${W}\`)`);return _[P0]=v,_},{}),L=(0,Z0.getDataFromArgs)(B),H=G(Object.assign({},L,J)),T=(0,Z0.getOptionsFromArgs)(B),D=T.host||Z.host,q=!!Z.streaming||!!T.streaming;if(B.filter((_)=>_!=null).length)throw Error(`Stripe: Unknown arguments (${B}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${W}\`)`);let O=V?U(z):this.createFullPath(U,z),k=Object.assign(T.headers,Z.headers);if(Z.validator)Z.validator(H,{headers:k});let N=Z.method==="GET"||Z.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:N?null:H,queryData:N?H:{},authenticator:T.authenticator??null,headers:k,host:D??null,streaming:q,settings:T.settings,usage:X}},_makeRequest($,Z,J){return new Promise((Q,X)=>{let Y;try{Y=this._getRequestOpts($,Z,J)}catch(z){X(z);return}if(Z.requestSchema&&Y.bodyData)Y.bodyData=(0,eZ.coerceV2RequestData)(Y.bodyData,Z.requestSchema);function G(z,L){if(z)X(z);else try{if(Z.responseSchema)(0,eZ.coerceV2ResponseData)(L,Z.responseSchema);Q(Z.transformResponseData?Z.transformResponseData(L):L)}catch(H){X(H)}}let V=Object.keys(Y.queryData).length===0,U=[Y.requestPath,V?"":"?",(0,Z0.queryStringifyRequestData)(Y.queryData)].join(""),{headers:W,settings:B}=Y;this._stripe._requestSender._request(Y.requestMethod,Y.host,U,Y.bodyData,Y.authenticator,{headers:W,settings:B,streaming:Y.streaming},Y.usage,G,this.requestDataProcessor?.bind(this))})}}});var X1=K((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeContext=void 0;class T0{constructor($=[]){this._segments=[...$]}get segments(){return[...this._segments]}push($){if(!$)throw Error("Segment cannot be null or undefined");return new T0([...this._segments,$])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new T0(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse($){if(!$)return new T0([]);return new T0($.split("/"))}}J1.StripeContext=T0});var V1=K((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.createWebhooks=void 0;var a=M0(),FU=b0();function CU($){let Z={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,z,L,H,T,D){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D)}catch(O){if(O instanceof FU.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(B,z,L,H,T,D){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D);let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(B){let z=W(B),L=z.signature||z.cryptoProvider.computeHMACSignature(z.payloadString,z.secret);return z.generateHeaderString(L)},generateTestHeaderStringAsync:async function(B){let z=W(B),L=z.signature||await z.cryptoProvider.computeHMACSignatureAsync(z.payloadString,z.secret);return z.generateHeaderString(L)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=T.computeHMACSignature(Q(O,k),L);return Y(O,q,k,M,H,N,R,D),!0},async verifyHeaderAsync(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=await T.computeHMACSignatureAsync(Q(O,k),L);return Y(O,q,k,M,H,N,R,D)}};function Q(B,z){return`${z.timestamp}.${B}`}function X(B,z,L){if(!B)throw new a.StripeSignatureVerificationError(z,B,{message:"No webhook payload was provided."});let H=typeof B!="string"&&!(B instanceof Uint8Array),T=new TextDecoder("utf8"),D=B instanceof Uint8Array?T.decode(B):B;if(Array.isArray(z))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(z==null||z=="")throw new a.StripeSignatureVerificationError(z,B,{message:"No stripe-signature header value was provided."});let q=z instanceof Uint8Array?T.decode(z):z,O=G(q,L);if(!O||O.timestamp===-1)throw new a.StripeSignatureVerificationError(q,D,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new a.StripeSignatureVerificationError(q,D,{message:"No signatures found with expected scheme"});return{decodedPayload:D,decodedHeader:q,details:O,suspectPayloadType:H}}function Y(B,z,L,H,T,D,q,O){let k=!!L.signatures.filter($.secureCompare.bind($,H)).length,N=`
|
|
2
|
+
var i3=Object.create;var{getPrototypeOf:a3,defineProperty:HZ,getOwnPropertyNames:o3}=Object;var s3=Object.prototype.hasOwnProperty;function r3(Z){return this[Z]}var t3,e3,ZB=(Z,$,J)=>{var Q=Z!=null&&typeof Z==="object";if(Q){var X=$?t3??=new WeakMap:e3??=new WeakMap,Y=X.get(Z);if(Y)return Y}J=Z!=null?i3(a3(Z)):{};let G=$||!Z||!Z.__esModule?HZ(J,"default",{value:Z,enumerable:!0}):J;for(let V of o3(Z))if(!s3.call(G,V))HZ(G,V,{get:r3.bind(Z,V),enumerable:!0});if(Q)X.set(Z,G);return G};var K=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var C=import.meta.require;var j0=K((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.CryptoProviderOnlySupportsAsyncError=hZ.CryptoProvider=void 0;class _Z{computeHMACSignature(Z,$){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(Z,$){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(Z){throw Error("computeSHA256 not implemented.")}}hZ.CryptoProvider=_Z;class gZ extends Error{}hZ.CryptoProviderOnlySupportsAsyncError=gZ});var pZ=K((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.NodeCryptoProvider=void 0;var uZ=C("crypto"),PB=j0();class cZ extends PB.CryptoProvider{computeHMACSignature(Z,$){return uZ.createHmac("sha256",$).update(Z,"utf8").digest("hex")}async computeHMACSignatureAsync(Z,$){return await this.computeHMACSignature(Z,$)}async computeSHA256Async(Z){return new Uint8Array(await uZ.createHash("sha256").update(Z).digest())}}lZ.NodeCryptoProvider=cZ});var b0=K((iZ)=>{Object.defineProperty(iZ,"__esModule",{value:!0});iZ.HttpClientResponse=iZ.HttpClient=void 0;class H0{getClientName(){throw Error("getClientName not implemented.")}makeRequest(Z,$,J,Q,X,Y,G,V){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let Z=TypeError(H0.TIMEOUT_ERROR_CODE);return Z.code=H0.TIMEOUT_ERROR_CODE,Z}}iZ.HttpClient=H0;H0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];H0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class dZ{constructor(Z,$){this._statusCode=Z,this._headers=$}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(Z){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}iZ.HttpClientResponse=dZ});var J$=K((Z$)=>{Object.defineProperty(Z$,"__esModule",{value:!0});Z$.NodeHttpClientResponse=Z$.NodeHttpClient=void 0;var oZ=C("http"),sZ=C("https"),k9=b0(),rZ=oZ.default||oZ,tZ=sZ.default||sZ,RB=new rZ.Agent({keepAlive:!0}),vB=new tZ.Agent({keepAlive:!0});class eZ extends k9.HttpClient{constructor(Z){super();this._agent=Z}getClientName(){return"node"}makeRequest(Z,$,J,Q,X,Y,G,V){let U=G==="http",W=this._agent;if(!W)W=U?RB:vB;return new Promise((z,L)=>{let H=(U?rZ:tZ).request({host:Z,port:$,path:J,method:Q,agent:W,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});H.setTimeout(V,()=>{H.destroy(k9.HttpClient.makeTimeoutError())}),H.on("response",(T)=>{z(new A9(T))}),H.on("error",(T)=>{L(T)}),H.once("socket",(T)=>{if(T.connecting)T.once(U?"connect":"secureConnect",()=>{H.write(Y),H.end()});else H.write(Y),H.end()})})}}Z$.NodeHttpClient=eZ;class A9 extends k9.HttpClientResponse{constructor(Z){super(Z.statusCode,Z.headers||{});this._res=Z}getRawResponse(){return this._res}toStream(Z){return this._res.once("end",()=>Z()),this._res}toJSON(){return new Promise((Z,$)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{J+=Q}),this._res.once("end",()=>{try{Z(JSON.parse(J))}catch(Q){$(Q)}})})}}Z$.NodeHttpClientResponse=A9});var c=K((V$)=>{Object.defineProperty(V$,"__esModule",{value:!0});V$.parseHeadersForFetch=V$.parseHttpHeaderAsNumber=V$.parseHttpHeaderAsString=V$.getAPIMode=V$.jsonStringifyRequestData=V$.concat=V$.createApiKeyAuthenticator=V$.detectAIAgent=V$.AI_AGENTS=V$.determineProcessUserAgentProperties=V$.validateInteger=V$.flattenAndStringify=V$.isObject=V$.emitWarning=V$.pascalToCamelCase=V$.callbackifyPromiseWithTimeout=V$.normalizeHeader=V$.normalizeHeaders=V$.removeNullish=V$.protoExtend=V$.getOptionsFromArgs=V$.getDataFromArgs=V$.extractUrlParams=V$.makeURLInterpolator=V$.queryStringifyRequestData=V$.isOptionsHash=void 0;var x9=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function I9(Z){return Z&&typeof Z==="object"&&x9.some(($)=>Object.prototype.hasOwnProperty.call(Z,$))}V$.isOptionsHash=I9;function jB(Z){return fB(Z)}V$.queryStringifyRequestData=jB;function Q$(Z){return encodeURIComponent(Z).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function bB(Z){if(Z instanceof Date)return Math.floor(Z.getTime()/1000).toString();if(Z===null)return"";return String(Z)}function fB(Z){let $=[];function J(Q,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){$.push(Q$(Q)+"="+Q$(bB(X)));return}if(Array.isArray(X)){for(let Y=0;Y<X.length;Y++)if(X[Y]!==void 0)J(Q+"["+Y+"]",X[Y]);return}for(let Y of Object.keys(X))J(Q+"["+Y+"]",X[Y])}if(typeof Z==="object"&&Z!==null)for(let Q of Object.keys(Z))J(Q,Z[Q]);return $.join("&")}V$.makeURLInterpolator=(()=>{let Z={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return($)=>{let J=$.replace(/["\n\r\u2028\u2029]/g,(Q)=>Z[Q]);return(Q)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Y)=>{let G=Q[Y];if(MB(G))return encodeURIComponent(G);return""})}}})();function MB(Z){return["number","string","boolean"].includes(typeof Z)}function _B(Z){let $=Z.match(/\{\w+\}/g);if(!$)return[];return $.map((J)=>J.replace(/[{}]/g,""))}V$.extractUrlParams=_B;function gB(Z){if(!Array.isArray(Z)||!Z[0]||typeof Z[0]!=="object")return{};if(!I9(Z[0]))return Z.shift();let $=Object.keys(Z[0]),J=$.filter((Q)=>x9.includes(Q));if(J.length>0&&J.length!==$.length)P9(`Options found in arguments (${J.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}V$.getDataFromArgs=gB;function hB(Z){let $={host:null,headers:{},settings:{},streaming:!1};if(Z.length>0){let J=Z[Z.length-1];if(typeof J==="string")$.authenticator=N9(Z.pop());else if(I9(J)){let Q={...Z.pop()},X=Object.keys(Q).filter((Y)=>!x9.includes(Y));if(X.length)P9(`Invalid options found (${X.join(", ")}); ignoring.`);if(Q.apiKey)$.authenticator=N9(Q.apiKey);if(Q.idempotencyKey)$.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)$.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if($.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");$.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)$.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))$.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))$.settings.timeout=Q.timeout;if(Q.host)$.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");$.authenticator=Q.authenticator}if(Q.headers)Object.assign($.headers,Q.headers);if(Q.additionalHeaders)Object.assign($.headers,Q.additionalHeaders);if(Q.streaming)$.streaming=!0}}return $}V$.getOptionsFromArgs=hB;function mB(Z){let $=this,J=Object.prototype.hasOwnProperty.call(Z,"constructor")?Z.constructor:function(...Q){$.apply(this,Q)};return Object.assign(J,$),J.prototype=Object.create($.prototype),Object.assign(J.prototype,Z),J}V$.protoExtend=mB;function uB(Z){if(typeof Z!=="object")throw Error("Argument must be an object");return Object.keys(Z).reduce(($,J)=>{if(Z[J]!=null)$[J]=Z[J];return $},{})}V$.removeNullish=uB;function cB(Z){if(!(Z&&typeof Z==="object"))return Z;return Object.keys(Z).reduce(($,J)=>{return $[X$(J)]=Z[J],$},{})}V$.normalizeHeaders=cB;function X$(Z){return Z.split("-").map(($)=>$.charAt(0).toUpperCase()+$.substr(1).toLowerCase()).join("-")}V$.normalizeHeader=X$;function lB(Z,$){if($)return Z.then((J)=>{setTimeout(()=>{$(null,J)},0)},(J)=>{setTimeout(()=>{$(J,null)},0)});return Z}V$.callbackifyPromiseWithTimeout=lB;function nB(Z){if(Z==="OAuth")return"oauth";else return Z[0].toLowerCase()+Z.substring(1)}V$.pascalToCamelCase=nB;function P9(Z){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${Z}`);return process.emitWarning(Z,"Stripe")}V$.emitWarning=P9;function Y$(Z){let $=typeof Z;return($==="function"||$==="object")&&!!Z}V$.isObject=Y$;function pB(Z){let $={},J=(Q,X)=>{Object.entries(Q).forEach(([Y,G])=>{let V=X?`${X}[${Y}]`:Y;if(Y$(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,V);else $[V]=G;else $[V]=String(G)})};return J(Z,null),$}V$.flattenAndStringify=pB;function dB(Z,$,J){if(!Number.isInteger($))if(J!==void 0)return J;else throw Error(`${Z} must be an integer`);return $}V$.validateInteger=dB;function iB(){return typeof process>"u"?{}:{lang_version:process.version}}V$.determineProcessUserAgentProperties=iB;V$.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function aB(Z){for(let[$,J]of V$.AI_AGENTS)if(Z[$])return J;return""}V$.detectAIAgent=aB;function N9(Z){let $=(J)=>{return J.headers.Authorization="Bearer "+Z,Promise.resolve()};return $._apiKey=Z,$}V$.createApiKeyAuthenticator=N9;function oB(Z){let $=Z.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array($),Q=0;return Z.forEach((X)=>{J.set(X,Q),Q+=X.length}),J}V$.concat=oB;function sB(Z,$){if(this[Z]instanceof Date)return Math.floor(this[Z].getTime()/1000).toString();return $}function rB(Z){return JSON.stringify(Z,sB)}V$.jsonStringifyRequestData=rB;function tB(Z){if(!Z)return"v1";return Z.startsWith("/v2")?"v2":"v1"}V$.getAPIMode=tB;function G$(Z){if(Array.isArray(Z))return Z.join(", ");return String(Z)}V$.parseHttpHeaderAsString=G$;function eB(Z){let $=Array.isArray(Z)?Z[0]:Z;return Number($)}V$.parseHttpHeaderAsNumber=eB;function ZW(Z){return Object.entries(Z).map(([$,J])=>{return[$,G$(J)]})}V$.parseHeadersForFetch=ZW});var L$=K((U$)=>{Object.defineProperty(U$,"__esModule",{value:!0});U$.FetchHttpClientResponse=U$.FetchHttpClient=void 0;var NW=c(),f0=b0();class E8 extends f0.HttpClient{constructor(Z){super();if(!Z){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");Z=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=E8.makeFetchWithAbortTimeout(Z);else this._fetchFn=E8.makeFetchWithRaceTimeout(Z)}static makeFetchWithRaceTimeout(Z){return($,J,Q)=>{let X,Y=new Promise((V,U)=>{X=setTimeout(()=>{X=null,U(f0.HttpClient.makeTimeoutError())},Q)}),G=Z($,J);return Promise.race([G,Y]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout(Z){return async($,J,Q)=>{let X=new AbortController,Y=setTimeout(()=>{Y=null,X.abort(f0.HttpClient.makeTimeoutError())},Q);try{return await Z($,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw f0.HttpClient.makeTimeoutError();else throw G}finally{if(Y)clearTimeout(Y)}}}getClientName(){return"fetch"}async makeRequest(Z,$,J,Q,X,Y,G,V){let W=new URL(J,`${G==="http"?"http":"https"}://${Z}`);W.port=$;let B=Q=="POST"||Q=="PUT"||Q=="PATCH",z=Y||(B?"":void 0),L=await this._fetchFn(W.toString(),{method:Q,headers:(0,NW.parseHeadersForFetch)(X),body:z},V);return new F8(L)}}U$.FetchHttpClient=E8;class F8 extends f0.HttpClientResponse{constructor(Z){super(Z.status,F8._transformHeadersToObject(Z.headers));this._res=Z}getRawResponse(){return this._res}toStream(Z){return Z(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(Z){let $={};for(let J of Z){if(!Array.isArray(J)||J.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");$[J[0]]=J[1]}return $}}U$.FetchHttpClientResponse=F8});var D$=K((w$)=>{Object.defineProperty(w$,"__esModule",{value:!0});w$.SubtleCryptoProvider=void 0;var K$=j0();class H$ extends K$.CryptoProvider{constructor(Z){super();this.subtleCrypto=Z||crypto.subtle}computeHMACSignature(Z,$){throw new K$.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(Z,$){let J=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",J.encode($),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Q,J.encode(Z)),Y=new Uint8Array(X),G=Array(Y.length);for(let V=0;V<Y.length;V++)G[V]=S9[Y[V]];return G.join("")}async computeSHA256Async(Z){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",Z))}}w$.SubtleCryptoProvider=H$;var S9=Array(256);for(let Z=0;Z<S9.length;Z++)S9[Z]=Z.toString(16).padStart(2,"0")});var F$=K((q$)=>{Object.defineProperty(q$,"__esModule",{value:!0});q$.PlatformFunctions=void 0;var IW=L$(),PW=D$();class O${constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(Z)=>{let $=Math.random()*16|0;return(Z==="x"?$:$&3|8).toString(16)})}secureCompare(Z,$){if(Z.length!==$.length)return!1;let J=Z.length,Q=0;for(let X=0;X<J;++X)Q|=Z.charCodeAt(X)^$.charCodeAt(X);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(Z){throw Error("tryBufferData not implemented.")}createNodeHttpClient(Z){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(Z){return new IW.FetchHttpClient(Z)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(Z){return new PW.SubtleCryptoProvider(Z)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}q$.PlatformFunctions=O$});var M0=K((A$)=>{Object.defineProperty(A$,"__esModule",{value:!0});A$.TemporarySessionExpiredError=A$.RateLimitError=A$.StripeUnsupportedResponseTypeError=A$.StripeUnsupportedGrantTypeError=A$.StripeInvalidScopeError=A$.StripeOAuthInvalidRequestError=A$.StripeInvalidClientError=A$.StripeInvalidGrantError=A$.StripeOAuthError=A$.StripeIdempotencyError=A$.StripeSignatureVerificationError=A$.StripeConnectionError=A$.StripeRateLimitError=A$.StripePermissionError=A$.StripeAuthenticationError=A$.StripeAPIError=A$.StripeInvalidRequestError=A$.StripeCardError=A$.StripeError=A$.generateV2Error=A$.generateOAuthError=A$.generateV1Error=void 0;var SW=(Z)=>{let $=Z.statusCode;if($===429||$===400&&Z.code==="rate_limit")return new b9(Z);if($===400||$===404){if(Z.type==="idempotency_error")return new k8(Z);return new C8(Z)}if($===401)return new y9(Z);if($===402)return new R9(Z);if($===403)return new j9(Z);return new v9(Z)};A$.generateV1Error=SW;var RW=(Z)=>{switch(Z.type){case"invalid_grant":return new f9(Z);case"invalid_client":return new M9(Z);case"invalid_request":return new _9(Z);case"invalid_scope":return new g9(Z);case"unsupported_grant_type":return new h9(Z);case"unsupported_response_type":return new m9(Z);default:return new d(Z)}};A$.generateOAuthError=RW;var vW=(Z)=>{switch(Z.type){case"idempotency_error":return new k8(Z);case"rate_limit":return new u9(Z);case"temporary_session_expired":return new c9(Z)}switch(Z.code){case"invalid_fields":return new C8(Z)}return A$.generateV1Error(Z)};A$.generateV2Error=vW;class v extends Error{constructor(Z={},$=null){super(Z.message);this.type=$||this.constructor.name,this.raw=Z,this.rawType=Z.type,this.code=Z.code,this.doc_url=Z.doc_url,this.param=Z.param,this.detail=Z.detail,this.headers=Z.headers,this.requestId=Z.requestId,this.statusCode=Z.statusCode,this.message=Z.message??"",this.userMessage=Z.user_message,this.charge=Z.charge,this.decline_code=Z.decline_code,this.payment_intent=Z.payment_intent,this.payment_method=Z.payment_method,this.payment_method_type=Z.payment_method_type,this.setup_intent=Z.setup_intent,this.source=Z.source}}A$.StripeError=v;v.generate=A$.generateV1Error;class R9 extends v{constructor(Z={}){super(Z,"StripeCardError")}}A$.StripeCardError=R9;class C8 extends v{constructor(Z={}){super(Z,"StripeInvalidRequestError")}}A$.StripeInvalidRequestError=C8;class v9 extends v{constructor(Z={}){super(Z,"StripeAPIError")}}A$.StripeAPIError=v9;class y9 extends v{constructor(Z={}){super(Z,"StripeAuthenticationError")}}A$.StripeAuthenticationError=y9;class j9 extends v{constructor(Z={}){super(Z,"StripePermissionError")}}A$.StripePermissionError=j9;class b9 extends v{constructor(Z={}){super(Z,"StripeRateLimitError")}}A$.StripeRateLimitError=b9;class C$ extends v{constructor(Z={}){super(Z,"StripeConnectionError")}}A$.StripeConnectionError=C$;class k$ extends v{constructor(Z,$,J={}){super(J,"StripeSignatureVerificationError");this.header=Z,this.payload=$}}A$.StripeSignatureVerificationError=k$;class k8 extends v{constructor(Z={}){super(Z,"StripeIdempotencyError")}}A$.StripeIdempotencyError=k8;class d extends v{constructor(Z={},$="StripeOAuthError"){super(Z,$)}}A$.StripeOAuthError=d;class f9 extends d{constructor(Z={}){super(Z,"StripeInvalidGrantError")}}A$.StripeInvalidGrantError=f9;class M9 extends d{constructor(Z={}){super(Z,"StripeInvalidClientError")}}A$.StripeInvalidClientError=M9;class _9 extends d{constructor(Z={}){super(Z,"StripeOAuthInvalidRequestError")}}A$.StripeOAuthInvalidRequestError=_9;class g9 extends d{constructor(Z={}){super(Z,"StripeInvalidScopeError")}}A$.StripeInvalidScopeError=g9;class h9 extends d{constructor(Z={}){super(Z,"StripeUnsupportedGrantTypeError")}}A$.StripeUnsupportedGrantTypeError=h9;class m9 extends d{constructor(Z={}){super(Z,"StripeUnsupportedResponseTypeError")}}A$.StripeUnsupportedResponseTypeError=m9;class u9 extends v{constructor(Z={}){super(Z,"RateLimitError")}}A$.RateLimitError=u9;class c9 extends v{constructor(Z={}){super(Z,"TemporarySessionExpiredError")}}A$.TemporarySessionExpiredError=c9});var j$=K((v$)=>{Object.defineProperty(v$,"__esModule",{value:!0});v$.NodePlatformFunctions=void 0;var A8=C("crypto"),x$=C("events"),tW=pZ(),I$=J$(),eW=F$(),ZU=M0(),$U=c(),P$=C("os");class S$ extends ZU.StripeError{}class R$ extends eW.PlatformFunctions{uuid4(){if(A8.randomUUID)return A8.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,P$.release)()} ${(0,P$.arch)()}`}secureCompare(Z,$){if(!Z||!$)throw Error("secureCompare must receive two arguments");if(Z.length!==$.length)return!1;if(A8.timingSafeEqual){let J=new TextEncoder,Q=J.encode(Z),X=J.encode($);return A8.timingSafeEqual(Q,X)}return super.secureCompare(Z,$)}createEmitter(){return new x$.EventEmitter}tryBufferData(Z){if(!(Z.file.data instanceof x$.EventEmitter))return Promise.resolve(Z);let $=[];return new Promise((J,Q)=>{Z.file.data.on("data",(X)=>{$.push(X)}).once("end",()=>{let X=Object.assign({},Z);X.file.data=(0,$U.concat)($),J(X)}).on("error",(X)=>{Q(new S$({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient(Z){return new I$.NodeHttpClient(Z)}createDefaultHttpClient(){return new I$.NodeHttpClient}createNodeCryptoProvider(){return new tW.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}v$.NodePlatformFunctions=R$});var _$=K((f$)=>{Object.defineProperty(f$,"__esModule",{value:!0});f$.RequestSender=void 0;var w0=M0(),b$=b0(),b=c(),JU=60;class _0{constructor(Z,$){this._stripe=Z,this._maxBufferedRequestMetric=$}_normalizeStripeContext(Z,$){if(Z)return Z.toString()||null;return $?.toString()||null}_addHeadersDirectlyToObject(Z,$){Z.requestId=$["request-id"],Z.stripeAccount=Z.stripeAccount||$["stripe-account"],Z.apiVersion=Z.apiVersion||$["stripe-version"],Z.idempotencyKey=Z.idempotencyKey||$["idempotency-key"]}_makeResponseEvent(Z,$,J){let Q=Date.now(),X=Q-Z.request_start_time;return(0,b.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:Z.method,path:Z.path,status:$,request_id:this._getRequestId(J),elapsed:X,request_start_time:Z.request_start_time,request_end_time:Q})}_getRequestId(Z){return Z["request-id"]}_streamingResponseHandler(Z,$,J){return(Q)=>{let X=Q.getHeaders(),Y=()=>{let V=this._makeResponseEvent(Z,Q.getStatusCode(),X);this._stripe._emitter.emit("response",V),this._recordRequestMetrics(this._getRequestId(X),V.elapsed,$)},G=Q.toStream(Y);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler(Z,$,J,Q){return(X)=>{let Y=X.getHeaders(),G=this._getRequestId(Y),V=X.getStatusCode(),U=this._makeResponseEvent(Z,V,Y);this._stripe._emitter.emit("response",U),X.toJSON().then((W)=>{if(W.error){let B=typeof W.error==="string";if(B)W.error={type:W.error,message:W.error_description};W.error.headers=Y,W.error.statusCode=V,W.error.requestId=G;let z;if(B)z=(0,w0.generateOAuthError)(W.error);else if($==="v2")z=(0,w0.generateV2Error)(W.error);else z=(0,w0.generateV1Error)(W.error);throw z}return W},(W)=>{throw new w0.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:W,requestId:Y["request-id"]})}).then((W)=>{this._recordRequestMetrics(G,U.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Y),Object.defineProperty(W,"lastResponse",{enumerable:!1,writable:!1,value:B}),Q(null,W)},(W)=>Q(W,null))}}static _generateConnectionErrorMessage(Z){return`An error occurred with our connection to Stripe.${Z>0?` Request was retried ${Z} times.`:""}`}static _shouldRetry(Z,$,J,Q){if(Q&&$===0&&b$.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if($>=J)return!1;if(!Z)return!0;if(Z.getHeaders()["stripe-should-retry"]==="false")return!1;if(Z.getHeaders()["stripe-should-retry"]==="true")return!0;if(Z.getStatusCode()===409)return!0;if(Z.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(Z,$=null){let J=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),X=Math.min(J*Math.pow(2,Z-1),Q);if(X*=0.5*(1+Math.random()),X=Math.max(J,X),Number.isInteger($)&&$<=JU)X=Math.max(X,$);return X*1000}_getMaxNetworkRetries(Z={}){return Z.maxNetworkRetries!==void 0&&Number.isInteger(Z.maxNetworkRetries)?Z.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(Z,$,J){let Q=this._getMaxNetworkRetries($),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if(Z==="POST"||Z==="DELETE")return X()}else if(J==="v1"){if(Z==="POST"&&Q>0)return X()}return null}_makeHeaders({contentType:Z,contentLength:$,apiVersion:J,clientUserAgent:Q,method:X,userSuppliedHeaders:Y,userSuppliedSettings:G,stripeAccount:V,stripeContext:U,apiMode:W}){let B={Accept:"application/json","Content-Type":Z,"User-Agent":this._getUserAgentString(W),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":V,"Stripe-Context":U,"Idempotency-Key":this._defaultIdempotencyKey(X,G,W)},z=X=="POST"||X=="PUT"||X=="PATCH";if(z||$){if(!z)(0,b.emitWarning)(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=$}return Object.assign((0,b.removeNullish)(B),(0,b.normalizeHeaders)(Y))}_getUserAgentString(Z){let $=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${Z} NodeBindings/${$}`;if(J)X+=` ${J}`;if(Q)X+=` AIAgent/${Q}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let Z=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:Z})}}_recordRequestMetrics(Z,$,J){if(this._stripe.getTelemetryEnabled()&&Z)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,b.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:Z,request_duration_ms:$};if(J&&J.length>0)Q.usage=J;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest(Z,$,J,Q,X){return new Promise((G,V)=>{let U;try{let H=Z.toUpperCase();if(H!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let T=[].slice.call([J,Q]),D=(0,b.getDataFromArgs)(T),q=H==="POST"?Object.assign({},D):null,O=(0,b.getOptionsFromArgs)(T),k=O.headers,N=O.authenticator;U={requestMethod:H,requestPath:$,bodyData:q,queryData:{},authenticator:N,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:X||["raw_request"]}}catch(H){V(H);return}function W(H,T){if(H)V(H);else G(T)}let{headers:B,settings:z}=U,L=U.authenticator;this._request(U.requestMethod,U.host,$,U.bodyData,L,{headers:B,settings:z,streaming:U.streaming},U.usage,W)})}_getContentLength(Z){return typeof Z==="string"?new TextEncoder().encode(Z).length:Z.length}_request(Z,$,J,Q,X,Y,G=[],V,U=null){let W;X=X??this._stripe._authenticator??null;let B=(0,b.getAPIMode)(J),z=(T,D,q,O,k)=>{return setTimeout(T,this._getSleepTimeInMS(O,k),D,q,O+1)},L=(T,D,q)=>{let O=Y.settings&&Y.settings.timeout&&Number.isInteger(Y.settings.timeout)&&Y.settings.timeout>=0?Y.settings.timeout:this._stripe.getApiField("timeout"),k={host:$||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:Z,headers:Object.assign({},D),body:W,protocol:this._stripe.getApiField("protocol")};X(k).then(()=>{let N=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),R=Date.now(),M=(0,b.removeNullish)({api_version:T,account:(0,b.parseHttpHeaderAsString)(D["Stripe-Account"]),idempotency_key:(0,b.parseHttpHeaderAsString)(D["Idempotency-Key"]),method:Z,path:J,request_start_time:R}),_=q||0,P0=this._getMaxNetworkRetries(Y.settings||{});this._stripe._emitter.emit("request",M),N.then((y)=>{if(_0._shouldRetry(y,_,P0))return z(L,T,D,_,(0,b.parseHttpHeaderAsNumber)(y.getHeaders()["retry-after"]));else if(Y.streaming&&y.getStatusCode()<400)return this._streamingResponseHandler(M,G,V)(y);else return this._jsonResponseHandler(M,B,G,V)(y)}).catch((y)=>{if(_0._shouldRetry(null,_,P0,y))return z(L,T,D,_,null);else{let d3=y.code&&y.code===b$.HttpClient.TIMEOUT_ERROR_CODE;return V(new w0.StripeConnectionError({message:d3?`Request aborted due to timeout being reached (${O}ms)`:_0._generateConnectionErrorMessage(_),detail:y}))}})}).catch((N)=>{throw new w0.StripeError({message:"Unable to authenticate the request",exception:N})})},H=(T,D)=>{if(T)return V(T);W=D,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(D),apiVersion:O,clientUserAgent:q,method:Z,userSuppliedHeaders:Y.headers??null,userSuppliedSettings:Y.settings??{},stripeAccount:Y.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Y.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});L(O,k,0)})};if(U)U(Z,Q,Y.headers,H);else{let T;if(B=="v2")T=Q?(0,b.jsonStringifyRequestData)(Q):"";else T=(0,b.queryStringifyRequestData)(Q||{});H(null,T)}}}f$.RequestSender=_0});var n$=K((c$)=>{Object.defineProperty(c$,"__esModule",{value:!0});c$.makeAutoPaginationMethods=void 0;var N8=c();class p9{constructor(Z,$,J,Q){this.index=0,this.pagePromise=Z,this.promiseCache={currentPromise:null},this.requestArgs=$,this.spec=J,this.stripeResource=Q}async iterate(Z){if(!(Z&&Z.data&&typeof Z.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let $=u$(this.requestArgs);if(this.index<Z.data.length){let J=$?Z.data.length-1-this.index:this.index,Q=Z.data[J];return this.index+=1,{value:Q,done:!1}}else if(Z.has_more){this.index=0,this.pagePromise=this.getNextPage(Z);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage(Z){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let Z=(async()=>{let $=await this._next();return this.promiseCache.currentPromise=null,$})();return this.promiseCache.currentPromise=Z,Z}}class g$ extends p9{getNextPage(Z){let $=u$(this.requestArgs),J=VU(Z,$);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[$?"ending_before":"starting_after"]:J})}}class h$ extends p9{getNextPage(Z){if(!Z.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:Z.next_page})}}class m${constructor(Z,$,J,Q){this.firstPagePromise=Z,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=$,this.spec=J,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let Z=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=Z.data[Symbol.iterator](),this.nextPageUrl=Z.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let Z=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=Z.next_page_url||null,this.currentPageIterator=Z.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let J=this.currentPageIterator.next();if(!J.done)return{done:!1,value:J.value}}let Z=await this.turnPage();if(!Z)return{done:!0,value:void 0};let $=Z.next();if(!$.done)return{done:!1,value:$.value};return{done:!0,value:void 0}}}var QU=(Z,$,J,Q)=>{let X=(0,N8.getAPIMode)(J.fullPath||J.path);if(X!=="v2"&&J.methodType==="search")return n9(new h$(Q,$,J,Z));if(X!=="v2"&&J.methodType==="list")return n9(new g$(Q,$,J,Z));if(X==="v2"&&J.methodType==="list")return n9(new m$(Q,$,J,Z));return null};c$.makeAutoPaginationMethods=QU;var n9=(Z)=>{let $=BU((...X)=>Z.next(...X)),J=WU($),Q={autoPagingEach:$,autoPagingToArray:J,next:()=>Z.next(),return:()=>{return{}},[XU()]:()=>{return Q}};return Q};function XU(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function YU(Z){if(Z.length<2)return null;let $=Z[1];if(typeof $!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);return $}function GU(Z){if(Z.length===0)return;let $=Z[0];if(typeof $!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof $}`);if($.length===2)return $;if($.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${$}`);return function(Q,X){let Y=$(Q);X(Y)}}function VU(Z,$){let J=$?0:Z.data.length-1,Q=Z.data[J],X=Q&&Q.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function BU(Z){return function(){let J=[].slice.call(arguments),Q=GU(J),X=YU(J);if(J.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${J}`);let Y=UU(Z,Q);return(0,N8.callbackifyPromiseWithTimeout)(Y,X)}}function WU(Z){return function(J,Q){let X=J&&J.limit;if(!X)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(X>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");let Y=new Promise((G,V)=>{let U=[];Z((W)=>{if(U.push(W),U.length>=X)return!1}).then(()=>{G(U)}).catch(V)});return(0,N8.callbackifyPromiseWithTimeout)(Y,Q)}}function UU(Z,$){return new Promise((J,Q)=>{function X(Y){if(Y.done){J();return}let G=Y.value;return new Promise((V)=>{$(G,V)}).then((V)=>{if(V===!1)return X({done:!0,value:void 0});else return Z().then(X)})}Z().then(X).catch(Q)})}function u$(Z){let $=[].slice.call(Z);return!!(0,N8.getDataFromArgs)($).ending_before}});var a$=K((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.stripeMethod=void 0;var p$=c(),zU=n$();function LU(Z){if(Z.path!==void 0&&Z.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${Z.path}) and a 'fullPath' (${Z.fullPath}).`);return function(...$){let J=typeof $[$.length-1]=="function"&&$.pop();Z.urlParams=(0,p$.extractUrlParams)(Z.fullPath||this.createResourcePathWithSymbols(Z.path||""));let Q=(0,p$.callbackifyPromiseWithTimeout)(this._makeRequest($,Z,{}),J);return Object.assign(Q,(0,zU.makeAutoPaginationMethods)(this,$,Z,Q)),Q}}d$.stripeMethod=LU});var I8=K((s$)=>{Object.defineProperty(s$,"__esModule",{value:!0});s$.Decimal=s$.isDecimal=s$.DEFAULT_DIV_PRECISION=void 0;var KU={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};s$.DEFAULT_DIV_PRECISION=34;var o$=30,x8=1e6;class P{constructor(Z,$){let[J,Q]=P.normalize(Z,$);this._coefficient=J,this._exponent=Q,Object.freeze(this)}static normalize(Z,$){if(Z===0n)return[0n,0];let J=Z,Q=$;while(J!==0n&&J%10n===0n)J/=10n,Q+=1;return[J,Q]}static roundDivision(Z,$,J,Q){if($===0n)return Z;if(Q==="round-down")return Z;let X=$>0n===J>0n?1n:-1n;if(Q==="round-up")return Z+X;if(Q==="ceil")return X===1n?Z+1n:Z;if(Q==="floor")return X===-1n?Z-1n:Z;let Y=$<0n?-$:$,G=J<0n?-J:J,V=Y*2n,U;if(V===G)U=0;else if(V<G)U=-1;else U=1;if(U<0)return Z;if(U>0)return Z+X;if(Q==="half-up")return Z+X;if(Q==="half-down")return Z;if(Z%2n===0n)return Z;else return Z+X}add(Z){let $=Z;if(this._exponent===$._exponent)return new P(this._coefficient+$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new P(this._coefficient+$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new P(this._coefficient*J+$._coefficient,$._exponent)}}sub(Z){let $=Z;if(this._exponent===$._exponent)return new P(this._coefficient-$._coefficient,this._exponent);if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent);return new P(this._coefficient-$._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-$._exponent);return new P(this._coefficient*J-$._coefficient,$._exponent)}}mul(Z){let $=Z;return new P(this._coefficient*$._coefficient,this._exponent+$._exponent)}div(Z,$,J){if($<0||!Number.isInteger($))throw Error("precision must be a non-negative integer");let Q=Z;if(Q._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Q._exponent+$,Y,G,V;if(X>=0){let W=this._coefficient*10n**BigInt(X);Y=W/Q._coefficient,G=W%Q._coefficient,V=Q._coefficient}else{let W=Q._coefficient*10n**BigInt(-X);Y=this._coefficient/W,G=this._coefficient%W,V=W}let U=P.roundDivision(Y,G,V,J);return new P(U,-$)}cmp(Z){let $=Z;if(this._exponent===$._exponent){if(this._coefficient<$._coefficient)return-1;if(this._coefficient>$._coefficient)return 1;return 0}if(this._exponent<$._exponent){let J=10n**BigInt($._exponent-this._exponent),Q=$._coefficient*J;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let J=10n**BigInt(this._exponent-$._exponent),Q=this._coefficient*J;if(Q<$._coefficient)return-1;if(Q>$._coefficient)return 1;return 0}}eq(Z){return this.cmp(Z)===0}lt(Z){return this.cmp(Z)===-1}lte(Z){return this.cmp(Z)<=0}gt(Z){return this.cmp(Z)===1}gte(Z){return this.cmp(Z)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new P(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new P(-this._coefficient,this._exponent);return this}round(Z,$){let J=typeof $==="string"?KU[$]:$;if(J===void 0)throw Error(`Unknown rounding preset: "${$}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,Z);return s$.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return s$.Decimal.zero;if(X<=J.value)return this;let Y=X-J.value,G=10n**BigInt(Y),V=this._coefficient/G,U=this._coefficient%G,W=P.roundDivision(V,U,G,Z);return new P(W,this._exponent+Y)}toString(){if(this._coefficient===0n)return"0";let Z=this._coefficient.toString(),$=Z.startsWith("-"),J=$?Z.slice(1):Z;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>o$){if(J.length===1)return`${Z}E${String(this._exponent)}`;let G=J[0]??"",V=J.slice(1),U=this._exponent+J.length-1;return`${$?"-":""}${G}.${V}E${String(U)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${$?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),V=J.slice(J.length-X);return`${$?"-":""}${G}.${V}`}}if(J.length+this._exponent<=o$){if(this._exponent===0)return Z;let X="0".repeat(this._exponent);return`${$?"-":""}${J}${X}`}else{if(J.length===1)return`${Z}E+${String(this._exponent)}`;let X=J[0]??"",Y=J.slice(1),G=this._exponent+J.length-1;return`${$?"-":""}${X}.${Y}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed(Z,$){if(Z<0||!Number.isInteger(Z))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Y=X.toString(),G=Y.startsWith("-"),V=G?Y.slice(1):Y;if(Z===0)return Y;if(Z>=V.length){let U="0".repeat(Z-V.length);return`${G?"-":""}0.${U}${V}`}else{let U=V.slice(0,V.length-Z),W=V.slice(V.length-Z);return`${G?"-":""}${U}.${W}`}},Q=-Z;if(this._exponent===Q)return J(this._coefficient);if(this._exponent<Q){let X=Q-this._exponent,Y=10n**BigInt(X),G=this._coefficient/Y,V=this._coefficient%Y,U=P.roundDivision(G,V,Y,$);return J(U)}else{let X=this._exponent-Q,Y=this._coefficient*10n**BigInt(X);return J(Y)}}valueOf(){return this.toString()}}function HU(Z){return Z instanceof P}s$.isDecimal=HU;s$.Decimal={from(Z){if(typeof Z==="bigint")return new P(Z,0);if(typeof Z==="number"){if(!Number.isFinite(Z))throw Error("Number must be finite");return s$.Decimal.from(Z.toString())}let $=Z.trim();if($==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec($);if(!J)throw Error(`Invalid decimal string: ${Z}`);let Q=J[1]==="-"?-1n:1n,X=J[2]??"",Y=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>x8||G<-x8)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let V=X+Y,U=Q*BigInt(V),W=G-Y.length;if(!Number.isSafeInteger(W)||W>x8||W<-x8)throw Error(`Computed exponent out of range: ${String(W)} exceeds safe integer bounds`);return new P(U,W)},zero:new P(0n,0)}});var t$=K((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.coerceV2ResponseData=r$.coerceV2RequestData=void 0;var DU=I8(),OU=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":return typeof Z==="bigint"||typeof Z==="number"?String(Z):Z;case"decimal_string":return typeof Z.toFixed==="function"&&typeof Z.isZero==="function"?Z.toString():Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z,Q={};for(let X of Object.keys(J)){let Y=$.fields[X];Q[X]=Y?r$.coerceV2RequestData(J[X],Y):J[X]}return Q}case"array":{if(!Array.isArray(Z))return Z;return Z.map((J)=>r$.coerceV2RequestData(J,$.element))}case"nullable":return r$.coerceV2RequestData(Z,$.inner)}};r$.coerceV2RequestData=OU;var qU=(Z,$)=>{if(Z==null)return Z;switch($.kind){case"int64_string":if(typeof Z==="string")try{return BigInt(Z)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${Z}'`)}return Z;case"decimal_string":if(typeof Z==="string")try{return DU.Decimal.from(Z)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${Z}'`)}return Z;case"object":{if(typeof Z!=="object"||Array.isArray(Z))return Z;let J=Z;for(let Q of Object.keys($.fields))if(Q in J)J[Q]=r$.coerceV2ResponseData(J[Q],$.fields[Q]);return J}case"array":{if(!Array.isArray(Z))return Z;for(let J=0;J<Z.length;J++)Z[J]=r$.coerceV2ResponseData(Z[J],$.element);return Z}case"nullable":return r$.coerceV2ResponseData(Z,$.inner)}};r$.coerceV2ResponseData=qU});var w=K((Z1)=>{Object.defineProperty(Z1,"__esModule",{value:!0});Z1.StripeResource=void 0;var $0=c(),EU=a$(),e$=t$();m0.extend=$0.protoExtend;m0.method=EU.stripeMethod;m0.MAX_BUFFERED_REQUEST_METRICS=100;function m0(Z,$){if(this._stripe=Z,$)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,$0.makeURLInterpolator)(this.basePath||Z.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,$0.makeURLInterpolator)(this.path),this.initialize(...arguments)}Z1.StripeResource=m0;m0.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(Z,$){let J=[this.basePath($),this.path($)];if(typeof Z==="function"){let Q=Z($);if(Q)J.push(Q)}else J.push(Z);return this._joinUrlParts(J)},createResourcePathWithSymbols(Z){if(Z)return`/${this._joinUrlParts([this.resourcePath,Z])}`;else return`/${this.resourcePath}`},_joinUrlParts(Z){return Z.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(Z,$,J){let Q=($.method||"GET").toUpperCase(),X=$.usage||[],Y=$.urlParams||[],G=$.encode||((_)=>_),V=!!$.fullPath,U=(0,$0.makeURLInterpolator)(V?$.fullPath:$.path||""),W=V?$.fullPath:this.createResourcePathWithSymbols($.path),B=[].slice.call(Z),z=Y.reduce((_,P0)=>{let y=B.shift();if(typeof y!=="string")throw Error(`Stripe: Argument "${P0}" must be a string, but got: ${y} (on API request to \`${Q} ${W}\`)`);return _[P0]=y,_},{}),L=(0,$0.getDataFromArgs)(B),H=G(Object.assign({},L,J)),T=(0,$0.getOptionsFromArgs)(B),D=T.host||$.host,q=!!$.streaming||!!T.streaming;if(B.filter((_)=>_!=null).length)throw Error(`Stripe: Unknown arguments (${B}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${W}\`)`);let O=V?U(z):this.createFullPath(U,z),k=Object.assign(T.headers,$.headers);if($.validator)$.validator(H,{headers:k});let N=$.method==="GET"||$.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:N?null:H,queryData:N?H:{},authenticator:T.authenticator??null,headers:k,host:D??null,streaming:q,settings:T.settings,usage:X}},_makeRequest(Z,$,J){return new Promise((Q,X)=>{let Y;try{Y=this._getRequestOpts(Z,$,J)}catch(z){X(z);return}if($.requestSchema&&Y.bodyData)Y.bodyData=(0,e$.coerceV2RequestData)(Y.bodyData,$.requestSchema);function G(z,L){if(z)X(z);else try{if($.responseSchema)(0,e$.coerceV2ResponseData)(L,$.responseSchema);Q($.transformResponseData?$.transformResponseData(L):L)}catch(H){X(H)}}let V=Object.keys(Y.queryData).length===0,U=[Y.requestPath,V?"":"?",(0,$0.queryStringifyRequestData)(Y.queryData)].join(""),{headers:W,settings:B}=Y;this._stripe._requestSender._request(Y.requestMethod,Y.host,U,Y.bodyData,Y.authenticator,{headers:W,settings:B,streaming:Y.streaming},Y.usage,G,this.requestDataProcessor?.bind(this))})}}});var X1=K((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeContext=void 0;class T0{constructor(Z=[]){this._segments=[...Z]}get segments(){return[...this._segments]}push(Z){if(!Z)throw Error("Segment cannot be null or undefined");return new T0([...this._segments,Z])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new T0(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(Z){if(!Z)return new T0([]);return new T0(Z.split("/"))}}J1.StripeContext=T0});var V1=K((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.createWebhooks=void 0;var a=M0(),FU=j0();function CU(Z){let $={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,z,L,H,T,D){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(B,z,L,H||$.DEFAULT_TOLERANCE,T,D)}catch(O){if(O instanceof FU.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(B,z,L,H,T,D){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(B,z,L,H||$.DEFAULT_TOLERANCE,T,D);let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(B){let z=W(B),L=z.signature||z.cryptoProvider.computeHMACSignature(z.payloadString,z.secret);return z.generateHeaderString(L)},generateTestHeaderStringAsync:async function(B){let z=W(B),L=z.signature||await z.cryptoProvider.computeHMACSignatureAsync(z.payloadString,z.secret);return z.generateHeaderString(L)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=T.computeHMACSignature(Q(O,k),L);return Y(O,q,k,M,H,N,R,D),!0},async verifyHeaderAsync(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=await T.computeHMACSignatureAsync(Q(O,k),L);return Y(O,q,k,M,H,N,R,D)}};function Q(B,z){return`${z.timestamp}.${B}`}function X(B,z,L){if(!B)throw new a.StripeSignatureVerificationError(z,B,{message:"No webhook payload was provided."});let H=typeof B!="string"&&!(B instanceof Uint8Array),T=new TextDecoder("utf8"),D=B instanceof Uint8Array?T.decode(B):B;if(Array.isArray(z))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(z==null||z=="")throw new a.StripeSignatureVerificationError(z,B,{message:"No stripe-signature header value was provided."});let q=z instanceof Uint8Array?T.decode(z):z,O=G(q,L);if(!O||O.timestamp===-1)throw new a.StripeSignatureVerificationError(q,D,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new a.StripeSignatureVerificationError(q,D,{message:"No signatures found with expected scheme"});return{decodedPayload:D,decodedHeader:q,details:O,suspectPayloadType:H}}function Y(B,z,L,H,T,D,q,O){let k=!!L.signatures.filter(Z.secureCompare.bind(Z,H)).length,N=`
|
|
3
3
|
Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,R=q?`
|
|
4
4
|
|
|
5
5
|
Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!k){if(D)throw new a.StripeSignatureVerificationError(z,B,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
|
|
@@ -8,9 +8,9 @@ Signature verification is impossible without access to the original signed mater
|
|
|
8
8
|
`+R});throw new a.StripeSignatureVerificationError(z,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
|
|
9
9
|
If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.
|
|
10
10
|
`+N+`
|
|
11
|
-
`+R})}let M=Math.floor((typeof O==="number"?O:Date.now())/1000)-L.timestamp;if(T>0&&M>T)throw new a.StripeSignatureVerificationError(z,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,z){if(typeof B!=="string")return null;return B.split(",").reduce((L,H)=>{let T=H.split("=");if(T[0]==="t")L.timestamp=parseInt(T[1],10);if(T[0]===z)L.signatures.push(T[1]);return L},{timestamp:-1,signatures:[]})}let V=null;function U(){if(!V)V=$.createDefaultCryptoProvider();return V}function W(B){if(!B)throw new a.StripeError({message:"Options are required"});let z=Math.floor(B.timestamp)||Math.floor(Date.now()/1000),L=B.scheme||J.EXPECTED_SCHEME,H=B.cryptoProvider||U(),T=`${z}.${B.payload}`;return{...B,timestamp:z,scheme:L,cryptoProvider:H,payloadString:T,generateHeaderString:(q)=>{return`t=${z},${L}=${q}`}}}return Z.signature=J,Z}Y1.createWebhooks=CU});var U1=K((B1)=>{Object.defineProperty(B1,"__esModule",{value:!0});B1.ApiMajorVersion=B1.ApiVersion=void 0;B1.ApiVersion="2026-03-25.dahlia";B1.ApiMajorVersion="dahlia"});var K1=K((z1)=>{Object.defineProperty(z1,"__esModule",{value:!0});z1.resourceNamespace=void 0;function AU($,Z){for(let J in Z){if(!Object.prototype.hasOwnProperty.call(Z,J))continue;let Q=J[0].toLowerCase()+J.substring(1),X=new Z[J]($);this[Q]=X}}function NU($,Z){return function(J){return new AU(J,Z)}}z1.resourceNamespace=NU});var D1=K((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.AccountLinks=void 0;var H1=w(),xU=H1.StripeResource.method;w1.AccountLinks=H1.StripeResource.extend({create:xU({method:"POST",fullPath:"/v2/core/account_links"})})});var C1=K((E1)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.AccountTokens=void 0;var q1=w(),O1=q1.StripeResource.method;E1.AccountTokens=q1.StripeResource.extend({create:O1({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:O1({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var x1=K((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.Accounts=void 0;var k1=w(),J0=k1.StripeResource.method;A1.Accounts=k1.StripeResource.extend({retrieve:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:J0({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var R1=K((P1)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.Persons=void 0;var I1=w(),u0=I1.StripeResource.method;P1.Persons=I1.StripeResource.extend({create:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:u0({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var f1=K((b1)=>{Object.defineProperty(b1,"__esModule",{value:!0});b1.PersonTokens=void 0;var v1=w(),y1=v1.StripeResource.method;b1.PersonTokens=v1.StripeResource.extend({create:y1({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:y1({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var g1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.Accounts=void 0;var d$=w(),IU=R1(),PU=f1(),c0=d$.StripeResource.method;M1.Accounts=d$.StripeResource.extend({constructor:function(...$){d$.StripeResource.apply(this,$),this.persons=new IU.Persons(...$),this.personTokens=new PU.PersonTokens(...$)},create:c0({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:c0({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:c0({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:c0({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:c0({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var n1=K((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.ActiveEntitlements=void 0;var m1=w(),h1=m1.StripeResource.method;u1.ActiveEntitlements=m1.StripeResource.extend({retrieve:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var i1=K((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.Alerts=void 0;var l1=w(),D0=l1.StripeResource.method;p1.Alerts=l1.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:D0({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:D0({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var r1=K((o1)=>{Object.defineProperty(o1,"__esModule",{value:!0});o1.Associations=void 0;var a1=w(),SU=a1.StripeResource.method;o1.Associations=a1.StripeResource.extend({find:SU({method:"GET",fullPath:"/v1/tax/associations/find"})})});var Z4=K((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.Authorizations=void 0;var t1=w(),n0=t1.StripeResource.method;e1.Authorizations=t1.StripeResource.extend({retrieve:n0({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:n0({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var Y4=K((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.Authorizations=void 0;var J4=w(),Q0=J4.StripeResource.method;Q4.Authorizations=J4.StripeResource.extend({create:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var W4=K((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.Calculations=void 0;var G4=w(),i$=G4.StripeResource.method;V4.Calculations=G4.StripeResource.extend({create:i$({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:i$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:i$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var K4=K((z4)=>{Object.defineProperty(z4,"__esModule",{value:!0});z4.Cardholders=void 0;var U4=w(),S8=U4.StripeResource.method;z4.Cardholders=U4.StripeResource.extend({create:S8({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:S8({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:S8({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:S8({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var D4=K((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.Cards=void 0;var H4=w(),R8=H4.StripeResource.method;w4.Cards=H4.StripeResource.extend({create:R8({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:R8({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:R8({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:R8({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var F4=K((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.Cards=void 0;var O4=w(),l0=O4.StripeResource.method;q4.Cards=O4.StripeResource.extend({deliverCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var N4=K((k4)=>{Object.defineProperty(k4,"__esModule",{value:!0});k4.Configurations=void 0;var C4=w(),y8=C4.StripeResource.method;k4.Configurations=C4.StripeResource.extend({create:y8({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:y8({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:y8({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:y8({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var S4=K((I4)=>{Object.defineProperty(I4,"__esModule",{value:!0});I4.Configurations=void 0;var x4=w(),p0=x4.StripeResource.method;I4.Configurations=x4.StripeResource.extend({create:p0({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:p0({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:p0({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:p0({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:p0({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var b4=K((y4)=>{Object.defineProperty(y4,"__esModule",{value:!0});y4.ConfirmationTokens=void 0;var R4=w(),RU=R4.StripeResource.method;y4.ConfirmationTokens=R4.StripeResource.extend({create:RU({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var _4=K((f4)=>{Object.defineProperty(f4,"__esModule",{value:!0});f4.ConnectionTokens=void 0;var j4=w(),yU=j4.StripeResource.method;f4.ConnectionTokens=j4.StripeResource.extend({create:yU({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.CreditBalanceSummary=void 0;var g4=w(),vU=g4.StripeResource.method;h4.CreditBalanceSummary=g4.StripeResource.extend({retrieve:vU({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var d4=K((l4)=>{Object.defineProperty(l4,"__esModule",{value:!0});l4.CreditBalanceTransactions=void 0;var n4=w(),c4=n4.StripeResource.method;l4.CreditBalanceTransactions=n4.StripeResource.extend({retrieve:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.CreditGrants=void 0;var i4=w(),O0=i4.StripeResource.method;a4.CreditGrants=i4.StripeResource.extend({create:O0({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:O0({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:O0({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var $6=K((t4)=>{Object.defineProperty(t4,"__esModule",{value:!0});t4.CreditReversals=void 0;var r4=w(),a$=r4.StripeResource.method;t4.CreditReversals=r4.StripeResource.extend({create:a$({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:a$({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:a$({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var X6=K((J6)=>{Object.defineProperty(J6,"__esModule",{value:!0});J6.Customers=void 0;var Z6=w(),bU=Z6.StripeResource.method;J6.Customers=Z6.StripeResource.extend({fundCashBalance:bU({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var B6=K((G6)=>{Object.defineProperty(G6,"__esModule",{value:!0});G6.DebitReversals=void 0;var Y6=w(),o$=Y6.StripeResource.method;G6.DebitReversals=Y6.StripeResource.extend({create:o$({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:o$({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:o$({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var L6=K((U6)=>{Object.defineProperty(U6,"__esModule",{value:!0});U6.Disputes=void 0;var W6=w(),d0=W6.StripeResource.method;U6.Disputes=W6.StripeResource.extend({create:d0({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:d0({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:d0({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var D6=K((w6)=>{Object.defineProperty(w6,"__esModule",{value:!0});w6.EarlyFraudWarnings=void 0;var H6=w(),K6=H6.StripeResource.method;w6.EarlyFraudWarnings=H6.StripeResource.extend({retrieve:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var F6=K((q6)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.EventDestinations=void 0;var O6=w(),o=O6.StripeResource.method;q6.EventDestinations=O6.StripeResource.extend({create:o({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:o({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:o({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:o({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var N6=K((k6)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.Events=void 0;var C6=w(),s$=C6.StripeResource.method;k6.Events=C6.StripeResource.extend({retrieve(...$){return s$({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(J)=>{return this.addFetchRelatedObjectIfNeeded(J)}}).apply(this,$)},list(...$){return s$({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(J)=>{return{...J,data:J.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,$)},addFetchRelatedObjectIfNeeded($){if(!$.related_object||!$.related_object.url)return $;return{...$,fetchRelatedObject:()=>s$({method:"GET",fullPath:$.related_object.url}).apply(this,[{stripeContext:$.context,headers:{"Stripe-Request-Trigger":`event=${$.id}`}}])}}})});var S6=K((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.Features=void 0;var x6=w(),v8=x6.StripeResource.method;I6.Features=x6.StripeResource.extend({create:v8({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:v8({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:v8({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:v8({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var b6=K((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.FinancialAccounts=void 0;var R6=w(),X0=R6.StripeResource.method;y6.FinancialAccounts=R6.StripeResource.extend({create:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var _6=K((f6)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.InboundTransfers=void 0;var j6=w(),r$=j6.StripeResource.method;f6.InboundTransfers=j6.StripeResource.extend({fail:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var u6=K((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.InboundTransfers=void 0;var g6=w(),b8=g6.StripeResource.method;h6.InboundTransfers=g6.StripeResource.extend({create:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var p6=K((n6)=>{Object.defineProperty(n6,"__esModule",{value:!0});n6.Locations=void 0;var c6=w(),i0=c6.StripeResource.method;n6.Locations=c6.StripeResource.extend({create:i0({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:i0({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:i0({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:i0({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:i0({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var o6=K((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.MeterEventAdjustments=void 0;var d6=w(),jU=d6.StripeResource.method;i6.MeterEventAdjustments=d6.StripeResource.extend({create:jU({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var e6=K((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.MeterEventAdjustments=void 0;var s6=w(),fU=s6.StripeResource.method;r6.MeterEventAdjustments=s6.StripeResource.extend({create:fU({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var Q7=K((Z7)=>{Object.defineProperty(Z7,"__esModule",{value:!0});Z7.MeterEventSession=void 0;var $7=w(),MU=$7.StripeResource.method;Z7.MeterEventSession=$7.StripeResource.extend({create:MU({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var V7=K((Y7)=>{Object.defineProperty(Y7,"__esModule",{value:!0});Y7.MeterEventStream=void 0;var X7=w(),_U=X7.StripeResource.method;Y7.MeterEventStream=X7.StripeResource.extend({create:_U({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var z7=K((W7)=>{Object.defineProperty(W7,"__esModule",{value:!0});W7.MeterEvents=void 0;var B7=w(),gU=B7.StripeResource.method;W7.MeterEvents=B7.StripeResource.extend({create:gU({method:"POST",fullPath:"/v1/billing/meter_events"})})});var w7=K((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.MeterEvents=void 0;var L7=w(),hU=L7.StripeResource.method;K7.MeterEvents=L7.StripeResource.extend({create:hU({method:"POST",fullPath:"/v2/billing/meter_events"})})});var q7=K((D7)=>{Object.defineProperty(D7,"__esModule",{value:!0});D7.Meters=void 0;var T7=w(),Y0=T7.StripeResource.method;D7.Meters=T7.StripeResource.extend({create:Y0({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:Y0({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var k7=K((F7)=>{Object.defineProperty(F7,"__esModule",{value:!0});F7.OnboardingLinks=void 0;var E7=w(),mU=E7.StripeResource.method;F7.OnboardingLinks=E7.StripeResource.extend({create:mU({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var I7=K((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.Orders=void 0;var A7=w(),a0=A7.StripeResource.method;N7.Orders=A7.StripeResource.extend({create:a0({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:a0({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:a0({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:a0({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:a0({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var y7=K((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.OutboundPayments=void 0;var P7=w(),j8=P7.StripeResource.method;S7.OutboundPayments=P7.StripeResource.extend({update:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var f7=K((b7)=>{Object.defineProperty(b7,"__esModule",{value:!0});b7.OutboundPayments=void 0;var v7=w(),f8=v7.StripeResource.method;b7.OutboundPayments=v7.StripeResource.extend({create:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var h7=K((_7)=>{Object.defineProperty(_7,"__esModule",{value:!0});_7.OutboundTransfers=void 0;var M7=w(),M8=M7.StripeResource.method;_7.OutboundTransfers=M7.StripeResource.extend({update:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var n7=K((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.OutboundTransfers=void 0;var m7=w(),_8=m7.StripeResource.method;u7.OutboundTransfers=m7.StripeResource.extend({create:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var i7=K((p7)=>{Object.defineProperty(p7,"__esModule",{value:!0});p7.PaymentEvaluations=void 0;var l7=w(),uU=l7.StripeResource.method;p7.PaymentEvaluations=l7.StripeResource.extend({create:uU({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var r7=K((o7)=>{Object.defineProperty(o7,"__esModule",{value:!0});o7.PersonalizationDesigns=void 0;var a7=w(),g8=a7.StripeResource.method;o7.PersonalizationDesigns=a7.StripeResource.extend({create:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var ZJ=K((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.PersonalizationDesigns=void 0;var t7=w(),t$=t7.StripeResource.method;e7.PersonalizationDesigns=t7.StripeResource.extend({activate:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var GJ=K((XJ)=>{Object.defineProperty(XJ,"__esModule",{value:!0});XJ.PhysicalBundles=void 0;var QJ=w(),JJ=QJ.StripeResource.method;XJ.PhysicalBundles=QJ.StripeResource.extend({retrieve:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var zJ=K((WJ)=>{Object.defineProperty(WJ,"__esModule",{value:!0});WJ.Products=void 0;var BJ=w(),VJ=BJ.StripeResource.method;WJ.Products=BJ.StripeResource.extend({retrieve:VJ({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:VJ({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var wJ=K((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.Readers=void 0;var LJ=w(),f=LJ.StripeResource.method;KJ.Readers=LJ.StripeResource.extend({create:f({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:f({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:f({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:f({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var qJ=K((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.Readers=void 0;var TJ=w(),e$=TJ.StripeResource.method;DJ.Readers=TJ.StripeResource.extend({presentPaymentMethod:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var kJ=K((FJ)=>{Object.defineProperty(FJ,"__esModule",{value:!0});FJ.ReceivedCredits=void 0;var EJ=w(),cU=EJ.StripeResource.method;FJ.ReceivedCredits=EJ.StripeResource.extend({create:cU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var PJ=K((xJ)=>{Object.defineProperty(xJ,"__esModule",{value:!0});xJ.ReceivedCredits=void 0;var NJ=w(),AJ=NJ.StripeResource.method;xJ.ReceivedCredits=NJ.StripeResource.extend({retrieve:AJ({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:AJ({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var vJ=K((RJ)=>{Object.defineProperty(RJ,"__esModule",{value:!0});RJ.ReceivedDebits=void 0;var SJ=w(),nU=SJ.StripeResource.method;RJ.ReceivedDebits=SJ.StripeResource.extend({create:nU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var _J=K((fJ)=>{Object.defineProperty(fJ,"__esModule",{value:!0});fJ.ReceivedDebits=void 0;var jJ=w(),bJ=jJ.StripeResource.method;fJ.ReceivedDebits=jJ.StripeResource.extend({retrieve:bJ({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:bJ({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var uJ=K((hJ)=>{Object.defineProperty(hJ,"__esModule",{value:!0});hJ.Refunds=void 0;var gJ=w(),lU=gJ.StripeResource.method;hJ.Refunds=gJ.StripeResource.extend({expire:lU({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var pJ=K((nJ)=>{Object.defineProperty(nJ,"__esModule",{value:!0});nJ.Registrations=void 0;var cJ=w(),h8=cJ.StripeResource.method;nJ.Registrations=cJ.StripeResource.extend({create:h8({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:h8({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:h8({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:h8({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var oJ=K((iJ)=>{Object.defineProperty(iJ,"__esModule",{value:!0});iJ.ReportRuns=void 0;var dJ=w(),$9=dJ.StripeResource.method;iJ.ReportRuns=dJ.StripeResource.extend({create:$9({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:$9({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:$9({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var $5=K((tJ)=>{Object.defineProperty(tJ,"__esModule",{value:!0});tJ.ReportTypes=void 0;var rJ=w(),sJ=rJ.StripeResource.method;tJ.ReportTypes=rJ.StripeResource.extend({retrieve:sJ({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:sJ({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var X5=K((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.Requests=void 0;var Z5=w(),Z9=Z5.StripeResource.method;J5.Requests=Z5.StripeResource.extend({create:Z9({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:Z9({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:Z9({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var W5=K((V5)=>{Object.defineProperty(V5,"__esModule",{value:!0});V5.ScheduledQueryRuns=void 0;var G5=w(),Y5=G5.StripeResource.method;V5.ScheduledQueryRuns=G5.StripeResource.extend({retrieve:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var K5=K((z5)=>{Object.defineProperty(z5,"__esModule",{value:!0});z5.Secrets=void 0;var U5=w(),m8=U5.StripeResource.method;z5.Secrets=U5.StripeResource.extend({create:m8({method:"POST",fullPath:"/v1/apps/secrets"}),list:m8({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:m8({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:m8({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var D5=K((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.Sessions=void 0;var H5=w(),pU=H5.StripeResource.method;w5.Sessions=H5.StripeResource.extend({create:pU({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var F5=K((q5)=>{Object.defineProperty(q5,"__esModule",{value:!0});q5.Sessions=void 0;var O5=w(),q0=O5.StripeResource.method;q5.Sessions=O5.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:q0({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var x5=K((A5)=>{Object.defineProperty(A5,"__esModule",{value:!0});A5.Sessions=void 0;var k5=w(),C5=k5.StripeResource.method;A5.Sessions=k5.StripeResource.extend({create:C5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:C5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var y5=K((S5)=>{Object.defineProperty(S5,"__esModule",{value:!0});S5.Settings=void 0;var P5=w(),I5=P5.StripeResource.method;S5.Settings=P5.StripeResource.extend({retrieve:I5({method:"GET",fullPath:"/v1/tax/settings"}),update:I5({method:"POST",fullPath:"/v1/tax/settings"})})});var M5=K((j5)=>{Object.defineProperty(j5,"__esModule",{value:!0});j5.Suppliers=void 0;var b5=w(),v5=b5.StripeResource.method;j5.Suppliers=b5.StripeResource.extend({retrieve:v5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:v5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var m5=K((g5)=>{Object.defineProperty(g5,"__esModule",{value:!0});g5.TestClocks=void 0;var _5=w(),o0=_5.StripeResource.method;g5.TestClocks=_5.StripeResource.extend({create:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:o0({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var l5=K((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.Tokens=void 0;var u5=w(),J9=u5.StripeResource.method;c5.Tokens=u5.StripeResource.extend({retrieve:J9({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:J9({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:J9({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var o5=K((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.TransactionEntries=void 0;var d5=w(),p5=d5.StripeResource.method;i5.TransactionEntries=d5.StripeResource.extend({retrieve:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var $Q=K((t5)=>{Object.defineProperty(t5,"__esModule",{value:!0});t5.Transactions=void 0;var r5=w(),s5=r5.StripeResource.method;t5.Transactions=r5.StripeResource.extend({retrieve:s5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:s5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var XQ=K((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.Transactions=void 0;var ZQ=w(),Q9=ZQ.StripeResource.method;JQ.Transactions=ZQ.StripeResource.extend({retrieve:Q9({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:Q9({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:Q9({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var BQ=K((GQ)=>{Object.defineProperty(GQ,"__esModule",{value:!0});GQ.Transactions=void 0;var YQ=w(),u8=YQ.StripeResource.method;GQ.Transactions=YQ.StripeResource.extend({retrieve:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:u8({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:u8({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var LQ=K((UQ)=>{Object.defineProperty(UQ,"__esModule",{value:!0});UQ.Transactions=void 0;var WQ=w(),X9=WQ.StripeResource.method;UQ.Transactions=WQ.StripeResource.extend({createForceCapture:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var DQ=K((wQ)=>{Object.defineProperty(wQ,"__esModule",{value:!0});wQ.Transactions=void 0;var HQ=w(),KQ=HQ.StripeResource.method;wQ.Transactions=HQ.StripeResource.extend({retrieve:KQ({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:KQ({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var FQ=K((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ValueListItems=void 0;var OQ=w(),c8=OQ.StripeResource.method;qQ.ValueListItems=OQ.StripeResource.extend({create:c8({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:c8({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:c8({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:c8({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var NQ=K((kQ)=>{Object.defineProperty(kQ,"__esModule",{value:!0});kQ.ValueLists=void 0;var CQ=w(),s0=CQ.StripeResource.method;kQ.ValueLists=CQ.StripeResource.extend({create:s0({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:s0({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:s0({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:s0({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:s0({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var RQ=K((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.VerificationReports=void 0;var IQ=w(),xQ=IQ.StripeResource.method;PQ.VerificationReports=IQ.StripeResource.extend({retrieve:xQ({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:xQ({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var jQ=K((vQ)=>{Object.defineProperty(vQ,"__esModule",{value:!0});vQ.VerificationSessions=void 0;var yQ=w(),E0=yQ.StripeResource.method;vQ.VerificationSessions=yQ.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:E0({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:E0({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var Y9=K((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.Accounts=void 0;var fQ=w(),I=fQ.StripeResource.method;MQ.Accounts=fQ.StripeResource.extend({create:I({method:"POST",fullPath:"/v1/accounts"}),retrieve($,...Z){if(typeof $==="string")return I({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[$,...Z]);else{if($===null||$===void 0)[].shift.apply([$,...Z]);return I({method:"GET",fullPath:"/v1/account"}).apply(this,[$,...Z])}},update:I({method:"POST",fullPath:"/v1/accounts/{account}"}),list:I({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:I({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:I({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:I({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:I({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:I({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:I({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:I({method:"GET",fullPath:"/v1/account"}),retrieveCapability:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:I({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:I({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var uQ=K((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.AccountLinks=void 0;var gQ=w(),dU=gQ.StripeResource.method;hQ.AccountLinks=gQ.StripeResource.extend({create:dU({method:"POST",fullPath:"/v1/account_links"})})});var pQ=K((nQ)=>{Object.defineProperty(nQ,"__esModule",{value:!0});nQ.AccountSessions=void 0;var cQ=w(),iU=cQ.StripeResource.method;nQ.AccountSessions=cQ.StripeResource.extend({create:iU({method:"POST",fullPath:"/v1/account_sessions"})})});var oQ=K((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.ApplePayDomains=void 0;var dQ=w(),n8=dQ.StripeResource.method;iQ.ApplePayDomains=dQ.StripeResource.extend({create:n8({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:n8({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:n8({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:n8({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var eQ=K((rQ)=>{Object.defineProperty(rQ,"__esModule",{value:!0});rQ.ApplicationFees=void 0;var sQ=w(),F0=sQ.StripeResource.method;rQ.ApplicationFees=sQ.StripeResource.extend({retrieve:F0({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:F0({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:F0({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:F0({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:F0({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:F0({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var QX=K((ZX)=>{Object.defineProperty(ZX,"__esModule",{value:!0});ZX.Balance=void 0;var $X=w(),aU=$X.StripeResource.method;ZX.Balance=$X.StripeResource.extend({retrieve:aU({method:"GET",fullPath:"/v1/balance"})})});var BX=K((GX)=>{Object.defineProperty(GX,"__esModule",{value:!0});GX.BalanceSettings=void 0;var YX=w(),XX=YX.StripeResource.method;GX.BalanceSettings=YX.StripeResource.extend({retrieve:XX({method:"GET",fullPath:"/v1/balance_settings"}),update:XX({method:"POST",fullPath:"/v1/balance_settings"})})});var KX=K((zX)=>{Object.defineProperty(zX,"__esModule",{value:!0});zX.BalanceTransactions=void 0;var UX=w(),WX=UX.StripeResource.method;zX.BalanceTransactions=UX.StripeResource.extend({retrieve:WX({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:WX({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var DX=K((wX)=>{Object.defineProperty(wX,"__esModule",{value:!0});wX.Charges=void 0;var HX=w(),C0=HX.StripeResource.method;wX.Charges=HX.StripeResource.extend({create:C0({method:"POST",fullPath:"/v1/charges"}),retrieve:C0({method:"GET",fullPath:"/v1/charges/{charge}"}),update:C0({method:"POST",fullPath:"/v1/charges/{charge}"}),list:C0({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:C0({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:C0({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var FX=K((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.ConfirmationTokens=void 0;var OX=w(),oU=OX.StripeResource.method;qX.ConfirmationTokens=OX.StripeResource.extend({retrieve:oU({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var xX=K((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CountrySpecs=void 0;var kX=w(),CX=kX.StripeResource.method;AX.CountrySpecs=kX.StripeResource.extend({retrieve:CX({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:CX({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var RX=K((PX)=>{Object.defineProperty(PX,"__esModule",{value:!0});PX.Coupons=void 0;var IX=w(),r0=IX.StripeResource.method;PX.Coupons=IX.StripeResource.extend({create:r0({method:"POST",fullPath:"/v1/coupons"}),retrieve:r0({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:r0({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:r0({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var jX=K((vX)=>{Object.defineProperty(vX,"__esModule",{value:!0});vX.CreditNotes=void 0;var yX=w(),s=yX.StripeResource.method;vX.CreditNotes=yX.StripeResource.extend({create:s({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:s({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:s({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:s({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:s({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:s({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:s({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:s({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var gX=K((MX)=>{Object.defineProperty(MX,"__esModule",{value:!0});MX.CustomerSessions=void 0;var fX=w(),sU=fX.StripeResource.method;MX.CustomerSessions=fX.StripeResource.extend({create:sU({method:"POST",fullPath:"/v1/customer_sessions"})})});var cX=K((mX)=>{Object.defineProperty(mX,"__esModule",{value:!0});mX.Customers=void 0;var hX=w(),A=hX.StripeResource.method;mX.Customers=hX.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:A({method:"GET",fullPath:"/v1/customers/{customer}"}),update:A({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:A({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:A({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:A({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:A({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:A({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:A({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:A({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:A({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:A({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:A({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:A({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var dX=K((lX)=>{Object.defineProperty(lX,"__esModule",{value:!0});lX.Disputes=void 0;var nX=w(),l8=nX.StripeResource.method;lX.Disputes=nX.StripeResource.extend({retrieve:l8({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:l8({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:l8({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:l8({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var rX=K((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.EphemeralKeys=void 0;var aX=w(),iX=aX.StripeResource.method;oX.EphemeralKeys=aX.StripeResource.extend({create:iX({method:"POST",fullPath:"/v1/ephemeral_keys",validator:($,Z)=>{if(!Z.headers||!Z.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:iX({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var JY=K(($Y)=>{Object.defineProperty($Y,"__esModule",{value:!0});$Y.Events=void 0;var eX=w(),tX=eX.StripeResource.method;$Y.Events=eX.StripeResource.extend({retrieve:tX({method:"GET",fullPath:"/v1/events/{id}"}),list:tX({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var VY=K((YY)=>{Object.defineProperty(YY,"__esModule",{value:!0});YY.ExchangeRates=void 0;var XY=w(),QY=XY.StripeResource.method;YY.ExchangeRates=XY.StripeResource.extend({retrieve:QY({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:QY({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var zY=K((WY)=>{Object.defineProperty(WY,"__esModule",{value:!0});WY.FileLinks=void 0;var BY=w(),p8=BY.StripeResource.method;WY.FileLinks=BY.StripeResource.extend({create:p8({method:"POST",fullPath:"/v1/file_links"}),retrieve:p8({method:"GET",fullPath:"/v1/file_links/{link}"}),update:p8({method:"POST",fullPath:"/v1/file_links/{link}"}),list:p8({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var wY=K((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.multipartRequestDataProcessor=void 0;var LY=c(),rU=($,Z,J)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Q}`;let X=new TextEncoder,Y=new Uint8Array(0),G=X.encode(`\r
|
|
12
|
-
`);function V(B){let z=Y,L=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Y=new Uint8Array(z.length+L.length+2),Y.set(z),Y.set(L,z.length),Y.set(G,Y.length-2)}function U(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let W=(0,LY.flattenAndStringify)(Z);for(let B in W){if(!Object.prototype.hasOwnProperty.call(W,B))continue;let z=W[B];if(V(`--${Q}`),Object.prototype.hasOwnProperty.call(z,"data")){let L=z;V(`Content-Disposition: form-data; name=${U(B)}; filename=${U(L.name||"blob")}`),V(`Content-Type: ${L.type||"application/octet-stream"}`),V(""),V(L.data)}else V(`Content-Disposition: form-data; name=${U(B)}`),V(""),V(z)}return V(`--${Q}--`),Y};function tU($,Z,J,Q){if(Z=Z||{},$!=="POST")return Q(null,(0,LY.queryStringifyRequestData)(Z));this._stripe._platformFunctions.tryBufferData(Z).then((X)=>{let Y=rU($,X,J);return Q(null,Y)}).catch((X)=>Q(X,null))}KY.multipartRequestDataProcessor=tU});var qY=K((DY)=>{Object.defineProperty(DY,"__esModule",{value:!0});DY.Files=void 0;var eU=wY(),TY=w(),G9=TY.StripeResource.method;DY.Files=TY.StripeResource.extend({create:G9({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:G9({method:"GET",fullPath:"/v1/files/{file}"}),list:G9({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:eU.multipartRequestDataProcessor})});var kY=K((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.InvoiceItems=void 0;var EY=w(),t0=EY.StripeResource.method;FY.InvoiceItems=EY.StripeResource.extend({create:t0({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:t0({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:t0({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:t0({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:t0({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var PY=K((xY)=>{Object.defineProperty(xY,"__esModule",{value:!0});xY.InvoicePayments=void 0;var NY=w(),AY=NY.StripeResource.method;xY.InvoicePayments=NY.StripeResource.extend({retrieve:AY({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:AY({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var vY=K((RY)=>{Object.defineProperty(RY,"__esModule",{value:!0});RY.InvoiceRenderingTemplates=void 0;var SY=w(),d8=SY.StripeResource.method;RY.InvoiceRenderingTemplates=SY.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var MY=K((jY)=>{Object.defineProperty(jY,"__esModule",{value:!0});jY.Invoices=void 0;var bY=w(),S=bY.StripeResource.method;jY.Invoices=bY.StripeResource.extend({create:S({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:S({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:S({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:S({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:S({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:S({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:S({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:S({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:S({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:S({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:S({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:S({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var mY=K((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0});gY.Mandates=void 0;var _Y=w(),$z=_Y.StripeResource.method;gY.Mandates=_Y.StripeResource.extend({retrieve:$z({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var pY=K((nY)=>{Object.defineProperty(nY,"__esModule",{value:!0});nY.OAuth=void 0;var cY=w(),Zz=c(),uY=cY.StripeResource.method,V9="connect.stripe.com";nY.OAuth=cY.StripeResource.extend({basePath:"/",authorizeUrl($,Z){$=$||{},Z=Z||{};let J="oauth/authorize";if(Z.express)J=`express/${J}`;if(!$.response_type)$.response_type="code";if(!$.client_id)$.client_id=this._stripe.getClientId();if(!$.scope)$.scope="read_write";return`https://${V9}/${J}?${(0,Zz.queryStringifyRequestData)($)}`},token:uY({method:"POST",path:"oauth/token",host:V9}),deauthorize($,...Z){if(!$.client_id)$.client_id=this._stripe.getClientId();return uY({method:"POST",path:"oauth/deauthorize",host:V9}).apply(this,[$,...Z])}})});var sY=K((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0});aY.PaymentAttemptRecords=void 0;var iY=w(),dY=iY.StripeResource.method;aY.PaymentAttemptRecords=iY.StripeResource.extend({retrieve:dY({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:dY({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var $G=K((tY)=>{Object.defineProperty(tY,"__esModule",{value:!0});tY.PaymentIntents=void 0;var rY=w(),g=rY.StripeResource.method;tY.PaymentIntents=rY.StripeResource.extend({create:g({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:g({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:g({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:g({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:g({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:g({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var XG=K((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.PaymentLinks=void 0;var ZG=w(),e0=ZG.StripeResource.method;JG.PaymentLinks=ZG.StripeResource.extend({create:e0({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:e0({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:e0({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var BG=K((GG)=>{Object.defineProperty(GG,"__esModule",{value:!0});GG.PaymentMethodConfigurations=void 0;var YG=w(),i8=YG.StripeResource.method;GG.PaymentMethodConfigurations=YG.StripeResource.extend({create:i8({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:i8({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:i8({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:i8({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var LG=K((UG)=>{Object.defineProperty(UG,"__esModule",{value:!0});UG.PaymentMethodDomains=void 0;var WG=w(),$8=WG.StripeResource.method;UG.PaymentMethodDomains=WG.StripeResource.extend({create:$8({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:$8({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:$8({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var TG=K((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.PaymentMethods=void 0;var KG=w(),k0=KG.StripeResource.method;HG.PaymentMethods=KG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:k0({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:k0({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var EG=K((OG)=>{Object.defineProperty(OG,"__esModule",{value:!0});OG.PaymentRecords=void 0;var DG=w(),r=DG.StripeResource.method;OG.PaymentRecords=DG.StripeResource.extend({retrieve:r({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:r({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var AG=K((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.Payouts=void 0;var FG=w(),A0=FG.StripeResource.method;CG.Payouts=FG.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/payouts"}),retrieve:A0({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:A0({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:A0({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:A0({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:A0({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var PG=K((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.Plans=void 0;var NG=w(),Z8=NG.StripeResource.method;xG.Plans=NG.StripeResource.extend({create:Z8({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:Z8({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:Z8({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:Z8({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:Z8({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var vG=K((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.Prices=void 0;var SG=w(),J8=SG.StripeResource.method;RG.Prices=SG.StripeResource.extend({create:J8({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:J8({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:J8({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:J8({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:J8({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var MG=K((jG)=>{Object.defineProperty(jG,"__esModule",{value:!0});jG.Products=void 0;var bG=w(),n=bG.StripeResource.method;jG.Products=bG.StripeResource.extend({create:n({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:n({method:"GET",fullPath:"/v1/products/{id}"}),update:n({method:"POST",fullPath:"/v1/products/{id}"}),list:n({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:n({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:n({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:n({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:n({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:n({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:n({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var mG=K((gG)=>{Object.defineProperty(gG,"__esModule",{value:!0});gG.PromotionCodes=void 0;var _G=w(),a8=_G.StripeResource.method;gG.PromotionCodes=_G.StripeResource.extend({create:a8({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:a8({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:a8({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:a8({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var lG=K((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.Quotes=void 0;var uG=w(),l=uG.StripeResource.method;cG.Quotes=uG.StripeResource.extend({create:l({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:l({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:l({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:l({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:l({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:l({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:l({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:l({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var aG=K((dG)=>{Object.defineProperty(dG,"__esModule",{value:!0});dG.Refunds=void 0;var pG=w(),Q8=pG.StripeResource.method;dG.Refunds=pG.StripeResource.extend({create:Q8({method:"POST",fullPath:"/v1/refunds"}),retrieve:Q8({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Q8({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Q8({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Q8({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var tG=K((sG)=>{Object.defineProperty(sG,"__esModule",{value:!0});sG.Reviews=void 0;var oG=w(),B9=oG.StripeResource.method;sG.Reviews=oG.StripeResource.extend({retrieve:B9({method:"GET",fullPath:"/v1/reviews/{review}"}),list:B9({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:B9({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var JV=K(($V)=>{Object.defineProperty($V,"__esModule",{value:!0});$V.SetupAttempts=void 0;var eG=w(),Jz=eG.StripeResource.method;$V.SetupAttempts=eG.StripeResource.extend({list:Jz({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var GV=K((XV)=>{Object.defineProperty(XV,"__esModule",{value:!0});XV.SetupIntents=void 0;var QV=w(),G0=QV.StripeResource.method;XV.SetupIntents=QV.StripeResource.extend({create:G0({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:G0({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:G0({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var UV=K((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.ShippingRates=void 0;var VV=w(),o8=VV.StripeResource.method;BV.ShippingRates=VV.StripeResource.extend({create:o8({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:o8({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:o8({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:o8({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var HV=K((LV)=>{Object.defineProperty(LV,"__esModule",{value:!0});LV.Sources=void 0;var zV=w(),X8=zV.StripeResource.method;LV.Sources=zV.StripeResource.extend({create:X8({method:"POST",fullPath:"/v1/sources"}),retrieve:X8({method:"GET",fullPath:"/v1/sources/{source}"}),update:X8({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:X8({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:X8({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var OV=K((TV)=>{Object.defineProperty(TV,"__esModule",{value:!0});TV.SubscriptionItems=void 0;var wV=w(),Y8=wV.StripeResource.method;TV.SubscriptionItems=wV.StripeResource.extend({create:Y8({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:Y8({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:Y8({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:Y8({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:Y8({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var CV=K((EV)=>{Object.defineProperty(EV,"__esModule",{value:!0});EV.SubscriptionSchedules=void 0;var qV=w(),N0=qV.StripeResource.method;EV.SubscriptionSchedules=qV.StripeResource.extend({create:N0({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:N0({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:N0({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var xV=K((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.Subscriptions=void 0;var kV=w(),i=kV.StripeResource.method;AV.Subscriptions=kV.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:i({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var yV=K((SV)=>{Object.defineProperty(SV,"__esModule",{value:!0});SV.TaxCodes=void 0;var PV=w(),IV=PV.StripeResource.method;SV.TaxCodes=PV.StripeResource.extend({retrieve:IV({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:IV({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var fV=K((bV)=>{Object.defineProperty(bV,"__esModule",{value:!0});bV.TaxIds=void 0;var vV=w(),s8=vV.StripeResource.method;bV.TaxIds=vV.StripeResource.extend({create:s8({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:s8({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:s8({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:s8({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var hV=K((_V)=>{Object.defineProperty(_V,"__esModule",{value:!0});_V.TaxRates=void 0;var MV=w(),r8=MV.StripeResource.method;_V.TaxRates=MV.StripeResource.extend({create:r8({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:r8({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:r8({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:r8({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var lV=K((cV)=>{Object.defineProperty(cV,"__esModule",{value:!0});cV.Tokens=void 0;var uV=w(),mV=uV.StripeResource.method;cV.Tokens=uV.StripeResource.extend({create:mV({method:"POST",fullPath:"/v1/tokens"}),retrieve:mV({method:"GET",fullPath:"/v1/tokens/{token}"})})});var aV=K((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.Topups=void 0;var pV=w(),G8=pV.StripeResource.method;dV.Topups=pV.StripeResource.extend({create:G8({method:"POST",fullPath:"/v1/topups"}),retrieve:G8({method:"GET",fullPath:"/v1/topups/{topup}"}),update:G8({method:"POST",fullPath:"/v1/topups/{topup}"}),list:G8({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:G8({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var tV=K((sV)=>{Object.defineProperty(sV,"__esModule",{value:!0});sV.Transfers=void 0;var oV=w(),t=oV.StripeResource.method;sV.Transfers=oV.StripeResource.extend({create:t({method:"POST",fullPath:"/v1/transfers"}),retrieve:t({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:t({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:t({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:t({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:t({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:t({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:t({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var J3=K(($3)=>{Object.defineProperty($3,"__esModule",{value:!0});$3.WebhookEndpoints=void 0;var eV=w(),V8=eV.StripeResource.method;$3.WebhookEndpoints=eV.StripeResource.extend({create:V8({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:V8({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:V8({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:V8({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:V8({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var X3=K((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var x=K1(),Qz=D1(),Xz=C1(),Yz=x1(),Gz=g1(),Vz=n1(),Bz=i1(),Wz=r1(),Uz=Z4(),zz=Y4(),Lz=W4(),Kz=K4(),Hz=D4(),wz=F4(),Tz=N4(),Dz=S4(),Oz=b4(),qz=_4(),Ez=u4(),Fz=d4(),Cz=s4(),kz=$6(),Az=X6(),Nz=B6(),xz=L6(),Iz=D6(),Pz=F6(),Sz=N6(),Rz=S6(),yz=b6(),vz=_6(),bz=u6(),jz=p6(),fz=o6(),Mz=e6(),_z=Q7(),gz=V7(),hz=z7(),mz=w7(),uz=q7(),cz=k7(),nz=I7(),lz=y7(),pz=f7(),dz=h7(),iz=n7(),az=i7(),oz=r7(),sz=ZJ(),rz=GJ(),tz=zJ(),ez=wJ(),$L=qJ(),ZL=kJ(),JL=PJ(),QL=vJ(),XL=_J(),YL=uJ(),GL=pJ(),VL=oJ(),BL=$5(),WL=X5(),UL=W5(),zL=K5(),LL=D5(),KL=F5(),HL=x5(),wL=y5(),TL=M5(),DL=m5(),OL=l5(),qL=o5(),EL=$Q(),FL=XQ(),CL=BQ(),kL=LQ(),AL=DQ(),NL=FQ(),xL=NQ(),IL=RQ(),PL=jQ(),SL=Y9();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return SL.Accounts}});var RL=uQ();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return RL.AccountLinks}});var yL=pQ();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return yL.AccountSessions}});var vL=Y9();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return vL.Accounts}});var bL=oQ();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return bL.ApplePayDomains}});var jL=eQ();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return jL.ApplicationFees}});var fL=QX();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return fL.Balance}});var ML=BX();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return ML.BalanceSettings}});var _L=KX();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return _L.BalanceTransactions}});var gL=DX();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return gL.Charges}});var hL=FX();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return hL.ConfirmationTokens}});var mL=xX();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return mL.CountrySpecs}});var uL=RX();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return uL.Coupons}});var cL=jX();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return cL.CreditNotes}});var nL=gX();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return nL.CustomerSessions}});var lL=cX();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return lL.Customers}});var pL=dX();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return pL.Disputes}});var dL=rX();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return dL.EphemeralKeys}});var iL=JY();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return iL.Events}});var aL=VY();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return aL.ExchangeRates}});var oL=zY();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return oL.FileLinks}});var sL=qY();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return sL.Files}});var rL=kY();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return rL.InvoiceItems}});var tL=PY();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return tL.InvoicePayments}});var eL=vY();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return eL.InvoiceRenderingTemplates}});var $K=MY();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return $K.Invoices}});var ZK=mY();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return ZK.Mandates}});var JK=pY();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return JK.OAuth}});var QK=sY();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return QK.PaymentAttemptRecords}});var XK=$G();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return XK.PaymentIntents}});var YK=XG();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return YK.PaymentLinks}});var GK=BG();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return GK.PaymentMethodConfigurations}});var VK=LG();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return VK.PaymentMethodDomains}});var BK=TG();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return BK.PaymentMethods}});var WK=EG();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return WK.PaymentRecords}});var UK=AG();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return UK.Payouts}});var zK=PG();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return zK.Plans}});var LK=vG();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return LK.Prices}});var KK=MG();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return KK.Products}});var HK=mG();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return HK.PromotionCodes}});var wK=lG();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return wK.Quotes}});var TK=aG();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return TK.Refunds}});var DK=tG();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return DK.Reviews}});var OK=JV();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return OK.SetupAttempts}});var qK=GV();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return qK.SetupIntents}});var EK=UV();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return EK.ShippingRates}});var FK=HV();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return FK.Sources}});var CK=OV();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return CK.SubscriptionItems}});var kK=CV();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return kK.SubscriptionSchedules}});var AK=xV();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return AK.Subscriptions}});var NK=yV();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return NK.TaxCodes}});var xK=fV();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return xK.TaxIds}});var IK=hV();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return IK.TaxRates}});var PK=lV();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return PK.Tokens}});var SK=aV();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return SK.Topups}});var RK=tV();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return RK.Transfers}});var yK=J3();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return yK.WebhookEndpoints}});E.Apps=(0,x.resourceNamespace)("apps",{Secrets:zL.Secrets});E.Billing=(0,x.resourceNamespace)("billing",{Alerts:Bz.Alerts,CreditBalanceSummary:Ez.CreditBalanceSummary,CreditBalanceTransactions:Fz.CreditBalanceTransactions,CreditGrants:Cz.CreditGrants,MeterEventAdjustments:fz.MeterEventAdjustments,MeterEvents:hz.MeterEvents,Meters:uz.Meters});E.BillingPortal=(0,x.resourceNamespace)("billingPortal",{Configurations:Tz.Configurations,Sessions:LL.Sessions});E.Checkout=(0,x.resourceNamespace)("checkout",{Sessions:KL.Sessions});E.Climate=(0,x.resourceNamespace)("climate",{Orders:nz.Orders,Products:tz.Products,Suppliers:TL.Suppliers});E.Entitlements=(0,x.resourceNamespace)("entitlements",{ActiveEntitlements:Vz.ActiveEntitlements,Features:Rz.Features});E.FinancialConnections=(0,x.resourceNamespace)("financialConnections",{Accounts:Yz.Accounts,Sessions:HL.Sessions,Transactions:EL.Transactions});E.Forwarding=(0,x.resourceNamespace)("forwarding",{Requests:WL.Requests});E.Identity=(0,x.resourceNamespace)("identity",{VerificationReports:IL.VerificationReports,VerificationSessions:PL.VerificationSessions});E.Issuing=(0,x.resourceNamespace)("issuing",{Authorizations:Uz.Authorizations,Cardholders:Kz.Cardholders,Cards:Hz.Cards,Disputes:xz.Disputes,PersonalizationDesigns:oz.PersonalizationDesigns,PhysicalBundles:rz.PhysicalBundles,Tokens:OL.Tokens,Transactions:FL.Transactions});E.Radar=(0,x.resourceNamespace)("radar",{EarlyFraudWarnings:Iz.EarlyFraudWarnings,PaymentEvaluations:az.PaymentEvaluations,ValueListItems:NL.ValueListItems,ValueLists:xL.ValueLists});E.Reporting=(0,x.resourceNamespace)("reporting",{ReportRuns:VL.ReportRuns,ReportTypes:BL.ReportTypes});E.Sigma=(0,x.resourceNamespace)("sigma",{ScheduledQueryRuns:UL.ScheduledQueryRuns});E.Tax=(0,x.resourceNamespace)("tax",{Associations:Wz.Associations,Calculations:Lz.Calculations,Registrations:GL.Registrations,Settings:wL.Settings,Transactions:CL.Transactions});E.Terminal=(0,x.resourceNamespace)("terminal",{Configurations:Dz.Configurations,ConnectionTokens:qz.ConnectionTokens,Locations:jz.Locations,OnboardingLinks:cz.OnboardingLinks,Readers:ez.Readers});E.TestHelpers=(0,x.resourceNamespace)("testHelpers",{ConfirmationTokens:Oz.ConfirmationTokens,Customers:Az.Customers,Refunds:YL.Refunds,TestClocks:DL.TestClocks,Issuing:(0,x.resourceNamespace)("issuing",{Authorizations:zz.Authorizations,Cards:wz.Cards,PersonalizationDesigns:sz.PersonalizationDesigns,Transactions:kL.Transactions}),Terminal:(0,x.resourceNamespace)("terminal",{Readers:$L.Readers}),Treasury:(0,x.resourceNamespace)("treasury",{InboundTransfers:vz.InboundTransfers,OutboundPayments:lz.OutboundPayments,OutboundTransfers:dz.OutboundTransfers,ReceivedCredits:ZL.ReceivedCredits,ReceivedDebits:QL.ReceivedDebits})});E.Treasury=(0,x.resourceNamespace)("treasury",{CreditReversals:kz.CreditReversals,DebitReversals:Nz.DebitReversals,FinancialAccounts:yz.FinancialAccounts,InboundTransfers:bz.InboundTransfers,OutboundPayments:pz.OutboundPayments,OutboundTransfers:iz.OutboundTransfers,ReceivedCredits:JL.ReceivedCredits,ReceivedDebits:XL.ReceivedDebits,TransactionEntries:qL.TransactionEntries,Transactions:AL.Transactions});E.V2=(0,x.resourceNamespace)("v2",{Billing:(0,x.resourceNamespace)("billing",{MeterEventAdjustments:Mz.MeterEventAdjustments,MeterEventSession:_z.MeterEventSession,MeterEventStream:gz.MeterEventStream,MeterEvents:mz.MeterEvents}),Core:(0,x.resourceNamespace)("core",{AccountLinks:Qz.AccountLinks,AccountTokens:Xz.AccountTokens,Accounts:Gz.Accounts,EventDestinations:Pz.EventDestinations,Events:Sz.Events})})});var E3=K((O3)=>{Object.defineProperty(O3,"__esModule",{value:!0});O3.createStripe=void 0;var Y3=M0(),sK=_Z(),T3=w(),G3=X1(),rK=V1(),D3=U1(),tK=b0(),eK=I8(),V3=j0(),t8=X3(),V0=c(),B3="api.stripe.com",W3="443",U3="/v1/",z3=D3.ApiVersion,L3=80000,K3=5,H3=0.5,$H=["name","version","url","partner_id"],w3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],ZH=($)=>new sK.RequestSender($,T3.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function JH($,Z=ZH){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=D3.ApiVersion;let J=typeof process<"u"&&process.env?(0,V0.detectAIAgent)(process.env):"";Q.AI_AGENT=J,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,V0.determineProcessUserAgentProperties)(),...J?{ai_agent:J}:{}},Q.StripeResource=T3.StripeResource,Q.StripeContext=G3.StripeContext,Q.resources=t8,Q.HttpClient=V3.HttpClient,Q.HttpClientResponse=V3.HttpClientResponse,Q.CryptoProvider=tK.CryptoProvider,Q.webhooks=(0,rK.createWebhooks)($),Q.Decimal=eK.Decimal;function Q(X,Y={}){if(!(this instanceof Q))return new Q(X,Y);let G=this._getPropsFromConfig(Y);this._platformFunctions=$,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let V=G.httpAgent||null;this._api={host:G.host||B3,port:G.port||W3,protocol:G.protocol||"https",basePath:U3,version:G.apiVersion||z3,timeout:(0,V0.validateInteger)("timeout",G.timeout,L3),maxNetworkRetries:(0,V0.validateInteger)("maxNetworkRetries",G.maxNetworkRetries,2),agent:V,httpClient:G.httpClient||(V?this._platformFunctions.createNodeHttpClient(V):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:G.stripeAccount||null,stripeContext:G.stripeContext||null};let U=G.typescript||!1;if(U!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=U;if(G.appInfo)this._setAppInfo(G.appInfo);this._prepResources(),this._setAuthenticator(X,G.authenticator),this.errors=Y3,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=G.telemetry!==!1,this._requestSender=Z(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=Y3,Q.createNodeHttpClient=$.createNodeHttpClient,Q.createFetchHttpClient=$.createFetchHttpClient,Q.createNodeCryptoProvider=$.createNodeCryptoProvider,Q.createSubtleCryptoProvider=$.createSubtleCryptoProvider,Q.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(X,Y,G,V){return this._requestSender._rawRequest(X,Y,G,V)},_setAuthenticator(X,Y){if(X&&Y)throw Error("Can't specify both apiKey and authenticator");if(!X&&!Y)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=X?(0,V0.createApiKeyAuthenticator)(X):Y},_setAppInfo(X){if(X&&typeof X!=="object")throw Error("AppInfo must be an object.");if(X&&!X.name)throw Error("AppInfo.name is required");X=X||{},this._appInfo=$H.reduce((Y,G)=>{if(typeof X[G]=="string")Y=Y||{},Y[G]=X[G];return Y},{})},_setApiField(X,Y){this._api[X]=Y},getApiField(X){return this._api[X]},setClientId(X){this._clientId=X},getClientId(){return this._clientId},getConstant:(X)=>{switch(X){case"DEFAULT_HOST":return B3;case"DEFAULT_PORT":return W3;case"DEFAULT_BASE_PATH":return U3;case"DEFAULT_API_VERSION":return z3;case"DEFAULT_TIMEOUT":return L3;case"MAX_NETWORK_RETRY_DELAY_SEC":return K3;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return H3}return Q[X]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(X,Y,G){let V=(0,V0.validateInteger)(X,Y,G);this._setApiField(X,V)},getMaxNetworkRetryDelay(){return K3},getInitialNetworkRetryDelay(){return H3},getClientUserAgent(X){return this.getClientUserAgentSeeded(Q.USER_AGENT,X)},getClientUserAgentSeeded(X,Y){let G={};for(let W in X){if(!Object.prototype.hasOwnProperty.call(X,W))continue;G[W]=encodeURIComponent(X[W]??"null")}let V=this._platformFunctions.getPlatformInfo();if(V&&this.getTelemetryEnabled())G.platform=encodeURIComponent(V);else delete G.platform;let U=this.getApiField("httpClient");if(U)G.httplib=encodeURIComponent(U.getClientName());if(this._appInfo)G.application=this._appInfo;Y(JSON.stringify(G))},getAppInfoAsString(){if(!this._appInfo)return"";let X=this._appInfo.name;if(this._appInfo.version)X+=`/${this._appInfo.version}`;if(this._appInfo.url)X+=` (${this._appInfo.url})`;return X},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let X in t8){if(!Object.prototype.hasOwnProperty.call(t8,X))continue;this[(0,V0.pascalToCamelCase)(X)]=new t8[X](this)}},_getPropsFromConfig(X){if(!X)return{};let Y=typeof X==="string";if(!(X===Object(X)&&!Array.isArray(X))&&!Y)throw Error("Config must either be an object or a string");if(Y)return{apiVersion:X};if(Object.keys(X).filter((U)=>!w3.includes(U)).length>0)throw Error(`Config object may only contain the following: ${w3.join(", ")}`);return X},parseEventNotification(X,Y,G,V,U,W){this.webhooks.signature.verifyHeader(X,Y,G,V||this.webhooks.DEFAULT_TOLERANCE,U,W);let B=X instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(X)):JSON.parse(X);if(B&&B.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(B.context)B.context=G3.StripeContext.parse(B.context);return B.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${B.id}`,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_event"])},B.fetchRelatedObject=()=>{if(!B.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",B.related_object.url,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_related_object"])},B}},Q}O3.createStripe=JH});var C3=K((F3,B8)=>{Object.defineProperty(F3,"__esModule",{value:!0});var QH=bZ(),XH=E3(),YH=I8(),W9=(0,XH.createStripe)(new QH.NodePlatformFunctions);B8.exports=W9;B8.exports.Stripe=W9;B8.exports.default=W9;B8.exports.Decimal=YH.Decimal});import"@stacksjs/validation";import{log as Q$}from"@stacksjs/cli";import{db as w9}from"@stacksjs/database";async function ZB($,Z={}){let{olderThanDays:J=30,column:Q="created_at",query:X}=Z;try{if(X){let W=w9.deleteFrom($);W=X(W);let B=await W.execute(),z=Array.isArray(B)?B:[B],L=Number(z[0]?.numDeletedRows??z.length??0);return Q$.info(`Pruned ${L} records from ${$}`),L}let Y=new Date;Y.setDate(Y.getDate()-J);let G=await w9.deleteFrom($).where(Q,"<",Y.toISOString()).execute(),V=Array.isArray(G)?G:[G],U=Number(V[0]?.numDeletedRows??V.length??0);return Q$.info(`Pruned ${U} records from ${$} older than ${J} days`),U}catch(Y){throw Q$.error(`Failed to prune ${$}:`,Y),Y}}async function $T($,Z={}){return ZB($,Z)}function ZT($){if(!$?.prunable)return null;if(typeof $.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return $.prunable}import{createCipheriv as JB,createDecipheriv as QB,createHash as XB,randomBytes as YB}from"crypto";import{log as H8}from"@stacksjs/logging";var T9="enc:",D9="aes-256-gcm",GB=12,K8=null;async function O9(){if(K8)return K8;let $=process.env.APP_KEY;if(!$)try{$=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!$)return null;return K8=XB("sha256").update($).digest(),K8}function S0($){return typeof $==="string"&&$.startsWith(T9)}async function X$($){if($==null)return $;if(S0($))return $;if(typeof $!=="string")return $;let Z=await O9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),$;let J=YB(GB),Q=JB(D9,Z,J),X=Buffer.concat([Q.update($,"utf8"),Q.final()]),Y=Q.getAuthTag();return`${T9}${J.toString("base64")}:${Y.toString("base64")}:${X.toString("base64")}`}async function Y$($){if($==null)return $;if(typeof $!=="string")return $;if(!S0($))return $;try{let Z=await O9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Q,X]=$.split(":");if(!J||!Q||!X)return H8.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Y=Buffer.from(J,"base64"),G=Buffer.from(Q,"base64"),V=Buffer.from(X,"base64"),U=QB(D9,Z,Y);return U.setAuthTag(G),Buffer.concat([U.update(V),U.final()]).toString("utf8")}catch(Z){return H8.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:Z}),null}}function G$($){let Z=$.attributes;if(!Z||typeof Z!=="object")return[];let J=[];for(let[Q,X]of Object.entries(Z))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Q);return J}import{log as y0}from"@stacksjs/logging";var VB=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],E9="model_audits",W$=null;function BB($){W$=$}async function V$(){if(W$!=null)return W$;try{let $=await import("@stacksjs/router").catch(()=>null);if(!$)return null;let Z=$.getCurrentRequest;if(typeof Z!=="function")return null;let J=Z();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function w8($){if(!$||typeof $!=="object")return null;let Z={};for(let[J,Q]of Object.entries($)){if(VB.some((X)=>X.test(J)))continue;Z[J]=Q}return Z}function R0($){if(!$||typeof $!=="object")return null;let Z=$;if(Z._attributes&&typeof Z._attributes==="object")return{...Z._attributes};return{...$}}function WB($,Z){if(!$||!Z)return{old:$,next:Z};let J={},Q={},X=new Set([...Object.keys($),...Object.keys(Z)]);for(let Y of X)if($[Y]!==Z[Y])J[Y]=$[Y],Q[Y]=Z[Y];return{old:J,next:Q}}async function B$($,Z=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(E9).values({auditable_type:$.auditable_type,auditable_id:$.auditable_id,event:$.event,old_values:$.old_values?JSON.stringify($.old_values):null,new_values:$.new_values?JSON.stringify($.new_values):null,user_id:$.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(y0.warn(`[orm] audit row write failed for ${$.auditable_type}#${String($.auditable_id)} (${$.event})`,{error:J}),Z)throw J}}function F9($){return{async audits(Z){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(E9).selectAll().where("auditable_type","=",$).where("auditable_id","=",Z).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?q9(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?q9(X.new_values):X.new_values}))}catch(J){return y0.warn(`[orm] audits() lookup failed for ${$}#${String(Z)}`,{error:J}),[]}}}}function q9($){try{return JSON.parse($)}catch{return $}}function C9($){if($&&typeof $==="object"&&"transactional"in $)return{transactional:$.transactional===!0};return{transactional:!1}}function k9($,Z,J="id",Q={}){let X=Q.transactional===!0,Y=$;if(typeof $.audits!=="function")$.audits=F9(Z).audits;let G=async(B)=>{if(!X)return await B();let{db:z}=await import("@stacksjs/database");return await z.transaction(async()=>B())},V=$.create;if(typeof V==="function")$.create=async function(...B){return await G(async()=>{let z=await V.apply(this,B);try{let L=R0(z),H=L?.[J];if(H!=null){let T=await V$();await B$({auditable_type:Z,auditable_id:H,event:"created",old_values:null,new_values:w8(L),user_id:T},X)}}catch(L){if(y0.warn(`[orm] audit(create) failed for ${Z}`,{error:L}),X)throw L}return z})};let U=$.update;if(typeof U==="function")$.update=async function(B,z){return await G(async()=>{let L=Y.find,H=typeof L==="function"?R0(await L.call(Y,B)):null,T=await U.call(this,B,z);try{let D=R0(T)??(typeof L==="function"?R0(await L.call(Y,B)):null),{old:q,next:O}=WB(H,D);if(O&&Object.keys(O).length>0){let k=await V$();await B$({auditable_type:Z,auditable_id:B,event:"updated",old_values:w8(q),new_values:w8(O),user_id:k},X)}}catch(D){if(y0.warn(`[orm] audit(update) failed for ${Z}#${String(B)}`,{error:D}),X)throw D}return T})};let W=(B)=>{let z=$[B];if(typeof z!=="function")return;$[B]=async function(L){return await G(async()=>{let H=Y.find,T=typeof H==="function"?R0(await H.call(Y,L)):null,D=await z.call(this,L);try{if(D!==!1&&T){let q=await V$();await B$({auditable_type:Z,auditable_id:L,event:"deleted",old_values:w8(T),new_values:null,user_id:q},X)}}catch(q){if(y0.warn(`[orm] audit(${B}) failed for ${Z}#${String(L)}`,{error:q}),X)throw q}return D})}};W("delete"),W("softDelete")}function A9($){let Z=$;return Z?.code==="SQLITE_CONSTRAINT_UNIQUE"||Z?.code==="SQLITE_CONSTRAINT"||Z?.code==="23505"||Z?.errno===1062||/unique|duplicate/i.test(Z?.message??"")}function UB($,Z,J){let Q=$;if($ instanceof Error&&typeof Q.status==="number"&&Number.isInteger(Q.status)&&Q.status>=400&&Q.status<600){let X={error:$.message};if(Q.details!==void 0)X.details=Q.details;return{status:Q.status,body:X}}if(A9($))return{status:409,body:{error:`${Z} already exists`}};return{status:500,body:{error:`Failed to ${J} ${Z}`,detail:String($)}}}import{cacheRequestQuery as zB}from"@stacksjs/router";var T8=new WeakMap;function UT($,Z){return zB(`batchLoad:${$.name??"model"}:${String(Z)}`,async()=>{return new Promise((J,Q)=>{let X=T8.get($);if(!X)X={keys:[],resolvers:[],scheduled:!1},T8.set($,X);if(X.keys.push(Z),X.resolvers.push({key:Z,resolve:J,reject:Q}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Y=T8.get($);if(!Y)return;T8.delete($);let G=Array.from(new Set(Y.keys));try{let V=typeof $.findMany==="function"?await $.findMany(G):await Promise.all(G.map((W)=>$.find?.(W))),U=new Map;for(let W of V??[]){let B=W?.id;if(B!==void 0)U.set(B,W)}for(let W of Y.resolvers)W.resolve(U.get(W.key))}catch(V){for(let U of Y.resolvers)U.reject(V)}})})})}import{db as HT}from"@stacksjs/database";class LB{conditions=[];where($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("and","where",$,X,Y)}orWhere($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("or","where",$,X,Y)}whereIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z})}whereNotIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z,operator:"not in"})}whereNull($){this.conditions.push({type:"and",method:"whereNull",column:$})}whereNotNull($){this.conditions.push({type:"and",method:"whereNotNull",column:$})}whereBetween($,Z){this.conditions.push({type:"and",method:"whereBetween",column:$,range:Z})}whereExists($){this.conditions.push({type:"and",method:"whereExists",column:"",callback:$})}addCondition($,Z,J,Q,X){this.conditions.push({type:$,method:Z,column:J,operator:Q,value:X})}getConditions(){return this.conditions}}import{db as D8,runInTransactionScope as KB}from"@stacksjs/database";async function DT($,Z){return await KB(async()=>{return await D8.transaction($,Z)})}function OT($){return D8.transaction(async()=>{await $()})}async function qT($){return await D8.savepoint($)}function ET($,Z){return D8.transactional($,Z)}import{path as p}from"@stacksjs/path";import{fs as L0,globSync as K$}from"@stacksjs/storage";import{plural as S9,singular as N9,snakeCase as b}from"@stacksjs/strings";import{isString as O8}from"@stacksjs/validation";async function xT($){if(typeof $==="string")$=(await import($)).default;return $.table??b(S9($?.name||""))}function v0($,Z){if($.name)return $.name;return p.basename(Z).replace(/\.ts$/,"")}function u($,Z){if($.table)return $.table;return b(S9(v0($,Z)))}function HB($,Z){let J=[$,Z];return J.sort(),J.join("_")}function IT($,Z){return Z in $}async function wB($,Z){let J=[];if($.hasOne)for(let Q of $.hasOne)J.push(await U$(Q,$,Z,"hasOne"));if($.hasMany)for(let Q of $.hasMany)J.push(await U$(Q,$,Z,"hasMany"));if($.belongsTo)for(let Q of $.belongsTo)J.push(await U$(Q,$,Z,"belongsTo"));if($.hasOneThrough)for(let Q of $.hasOneThrough)J.push(await I9(Q,$,Z,"hasOneThrough"));if($.hasManyThrough)for(let Q of $.hasManyThrough)J.push(await I9(Q,$,Z,"hasManyThrough"));if($.belongsToMany)for(let Q of $.belongsToMany)J.push(await DB(Q,$,Z,"belongsToMany"));if($.morphOne)J.push(await P9($.morphOne,$,Z,"morphOne"));if($.morphMany){let Q=Array.isArray($.morphMany)?$.morphMany:[$.morphMany];for(let X of Q)J.push(await P9(X,$,Z,"morphMany"))}if($.morphTo){let Q=$.morphTo,X=Array.isArray(Q)?Q:typeof Q==="object"&&Q!==null?[Q]:[];for(let Y of X)J.push(TB(Y,$,Z))}if($.morphToMany){let Q=Array.isArray($.morphToMany)?$.morphToMany:[$.morphToMany];for(let X of Q)J.push(x9(X,$,Z,"morphToMany"))}if($.morphedByMany){let Q=Array.isArray($.morphedByMany)?$.morphedByMany:[$.morphedByMany];for(let X of Q)J.push(x9(X,$,Z,"morphedByMany"))}return J}function TB($,Z,J){let Q=$&&typeof $==="object"&&$.name?String($.name):`${b(J)}able`,X=$?.type||`${Q}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:$?.id||`${Q}_id`,modelKey:X,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function x9($,Z,J,Q){let X=typeof $==="object"&&$!==null,Y=X?String($.model||""):String($),G=X&&$.morphName?String($.morphName):`${b(J)}able`,V=X&&$.pivotTable?String($.pivotTable):G,U=X&&$.id||`${G}_id`,W=X&&$.type||`${G}_type`;return{relationship:Q,model:Y,table:"",relationTable:"",foreignKey:U,modelKey:W,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:U,pivotKey:W,pivotTable:V}}async function q8($,Z){let J=L$(`${Z}.ts`),Q=L$(`${$}.ts`),X=z$(`${$}.ts`),Y=z$(`${Z}.ts`);if(!J&&!Y)throw Error(`Model not found: ${Z}`);if(!Q&&!X)throw Error(`Model not found: ${$}`);let G;try{if(L0.existsSync(J))G=(await import(J)).default;else G=(await import(Y)).default}catch(U){throw Error(`Failed to load model: ${Z}. Error: ${U?.message||"Unknown error"}`)}let V=L0.existsSync(Q)?Q:X;return{modelRelation:G,modelPath:V,modelRelationPath:L0.existsSync(J)?J:Y}}async function I9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$;else X=$.model,Y=$.relationName||"",G=$.through,V=$.throughForeignKey||"";let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B)),T=b(J);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:`${T}_id`,modelKey:`${H}_id`,relationName:Y,relationModel:J,throughModel:G,throughForeignKey:V,pivotForeign:`${T}_id`,pivotKey:`${H}_id`,pivotTable:L}}async function DB($,Z,J,Q){let X="",Y="",G="",V=b(J);if(O8($))X=$;else X=$.model,Y=$.pivotTable||"",G=$.firstForeignKey||`${V}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B));return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:typeof $==="string"?`${V}_id`:$.firstForeignKey||`${V}_id`,modelKey:typeof $==="string"?`${H}_id`:$.secondForeignKey||`${H}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${H}_id`,pivotTable:Y}}async function P9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$,Y=`${b(J)}able`;else X=$.model,Y=$.morphName||`${b(J)}able`,G=$.type||`${Y}_type`,V=$.id||`${Y}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:V||`${Y}_id`,modelKey:G||`${Y}_type`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:L}}async function U$($,Z,J,Q){let X="",Y="";if(O8($))X=$;else X=$.model,Y=$.relationName||"";let{modelRelation:G,modelPath:V,modelRelationPath:U}=await q8(J,X),W=u(G,U),B=u(Z,V),z=b(v0(G,U)),L=b(J),H={relationship:Q,model:X,table:W,relationTable:B,foreignKey:typeof $==="string"?`${L}_id`:$.foreignKey||`${L}_id`,modelKey:`${z}_id`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${L}_id`,pivotKey:`${z}_id`,pivotTable:B};if(Q==="belongsTo")H.foreignKey="";return H}function PT($){let Z=/belongs/,J=/has/,Q=/Through/,X=/morph/;if(Q.test($))return"throughType";if(Z.test($))return"belongsType";if(J.test($))return"hasType";if(X.test($))return"morphType";return""}function ST($){let Z=/One/;if(/Many/.test($))return"many";if(Z.test($))return"one";return""}async function RT($,Z){let J=[];if("belongsToMany"in $){let Q=$.belongsToMany||[];for(let X of Q){let Y,G;if(typeof X==="string")G=X;else G=X.model;let V=L$(`${G}.ts`),U=z$(`${G}.ts`);if(L0.existsSync(V))Y=(await import(V)).default;else Y=(await import(U)).default;let W=u(Y,V),B=u($,Z),z=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${N9(B)}_${$.primaryKey}`,L=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${N9(W)}_${$.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??HB(B,W),firstForeignKey:z,secondForeignKey:L})}return J}return[]}async function yT($){let Z=K$([p.userModelsPath("*.ts"),p.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Q=0;Q<Z.length;Q++){let X=Z[Q],Y=await import(X);if($===Y.default.name)continue;let G=v0(Y,X),V=await wB(Y.default,G);if(!V.length)continue;let U=V.find((W)=>W.model===$);if(U)J.push(U)}return J}function vT($){if($===void 0)return[];return Object.keys($).filter((Z)=>{return $[Z]?.hidden===!0})}function bT($){let Z=$.attributes;if(Z===void 0)return[];return Object.keys(Z).filter((J)=>{return Z[J]?.guarded===!0}).map((J)=>b(J))}function jT($,Z){let J=$.attributes,Q=[];if(J===void 0)return[];let X=typeof $.traits?.billable==="object"||typeof $.traits?.billable==="boolean",Y=typeof $.traits?.useAuth==="object"?$.traits?.useAuth.usePasskey:!1,G=$.traits?.useUuid||!1;if(X)Q.push("stripe_id");if(G)Q.push("uuid");if(Y)Q.push(...["two_factor_secret","public_key"]);let V=Z.map((U)=>U.foreignKey).filter((U)=>U);return[...Object.keys(J).filter((U)=>{if(J===void 0)return!1;return J[U]?.fillable===!0}).map((U)=>b(U)),...Q,...V]}async function fT($,Z){let J=$.attributes;if(!J)J={};let Q=Object.keys(J),X=[],Y=Bun.file(Z),G="";try{if(await Y.exists())G=await Y.text()}catch{G=""}let V=/rule:.*$/gm,U;U=V.exec(G);while(U!==null)X.push(U[0]),U=V.exec(G);return Q.map((B,z)=>{let L=J[B],H=null,T=!1,D=!1,q=!1,O=!1;if(L)H=L||null,T=L.unique||!1,D=L.hidden||!1,q=L.fillable||!1;let k=X[z]??"";return O=(L.validation?.rule).isRequired??!1,{field:B,default:H,unique:T,hidden:D,fillable:q,required:O,fieldArray:OB(k)}})}function OB($){let Z=$.split("rule: schema.");if(Z.length!==2)return null;if(!Z[1])Z[1]="";let J=Z[1].replace(/,/g,"");if(!J)return null;let Q=J.split("."),X=/\(([^)]+)\)/;return Q.map((Y)=>{let G=X.exec(Y),V=G?G[1]:null;return{entity:Y.replace(X,"").replace(/\(|\)/g,""),charValue:V}})[0]||null}function MT($){let Z=$.fieldArray?.entity;switch(Z){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return Z}}function z$($){let Z=p.join(p.storagePath("framework/defaults/app/Models"),"/"),J=p.join(Z,$);if(L0.existsSync(J))return J;return K$(`${Z}**/${$}`,{absolute:!0})[0]??""}function L$($){let Z=p.join(p.userModelsPath("/"),"/"),J=p.join(Z,$);if(L0.existsSync(J))return J;return K$(`${Z}**/${$}`,{absolute:!0})[0]??""}function _T($){let Z=typeof $==="number"?new Date($):typeof $==="string"?new Date($):$;if(Number.isNaN(Z.getTime()))throw Error(`Invalid date value: ${String($)}`);return Z.toISOString().replace("T"," ").split(".")[0]??""}function gT($){return $.toISOString().split("T")[0]??""}function hT($){return $.getTime()}import{createModel as UH,registerModel as zH}from"@stacksjs/query-builder";import{log as h}from"@stacksjs/logging";import{snakeCase as Z$}from"@stacksjs/strings";import{AsyncLocalStorage as LH}from"async_hooks";function qB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.total==="number"&&typeof Z.last_page==="number"}function EB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.has_more_pages==="boolean"&&!("total"in Z)}function FB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&(typeof Z.next_cursor==="string"||Z.next_cursor===null)}function H$($){let{data:Z}=$,{perPage:J,page:Q,total:X,lastPage:Y}=$.meta,G=Z.length===0,V=G?null:(Q-1)*J+1,U=G?null:V+Z.length-1;return{data:Z,current_page:Q,per_page:J,total:X,last_page:Y,from:V,to:U,has_more_pages:Q<Y}}function w$($){return{data:$.data,current_page:$.meta.page,per_page:$.meta.perPage,has_more_pages:$.meta.hasMore}}function T$($){return{data:$.data,per_page:$.meta.perPage,next_cursor:R9($.meta.nextCursor),prev_cursor:R9($.meta.prevCursor),has_more_pages:$.meta.nextCursor!==null&&$.meta.nextCursor!==void 0}}function R9($){if($===null||$===void 0)return null;if(typeof $==="string")return $;return JSON.stringify($)}function O$($,Z){let J=F$(),Q=J?D$(J,"per_page"):void 0,X=J?D$(J,"page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,Q??15)),G=Math.max(1,Math.floor(Z??X??1));return{perPage:Y,page:G}}function q$($,Z){let J=F$(),Q=J?v9(J,"cursor"):void 0,X=J?D$(J,"per_page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,X??15)),V=y9(Z!==void 0?Z:Q??null);return{perPage:Y,cursor:V}}function y9($){if($===null||$===void 0)return null;if(Array.isArray($))return $;if(typeof $==="string"&&$.startsWith("["))try{let Z=JSON.parse($);if(Array.isArray(Z))return Z}catch{}return $}function E$($){let Z=F$();if(!Z)return $;let J=(()=>{try{return new URL(Z.url)}catch{return null}})();if(!J)return $;let Q=J.pathname;if($.path=Q,"next_cursor"in $)return $.next_page_url=$.next_cursor!==null?$0(J,{cursor:$.next_cursor}):null,$.prev_page_url=$.prev_cursor!==null?$0(J,{cursor:$.prev_cursor}):null,$;let X=$.current_page;if($.prev_page_url=X>1?$0(J,{page:X-1}):null,"total"in $){let Y=$.last_page;$.next_page_url=X<Y?$0(J,{page:X+1}):null,$.first_page_url=$0(J,{page:1}),$.last_page_url=$0(J,{page:Y})}else $.next_page_url=$.has_more_pages?$0(J,{page:X+1}):null;return $}function $0($,Z){let J=new URL($.toString());for(let[Q,X]of Object.entries(Z))J.searchParams.set(Q,String(X));return`${J.pathname}${J.search}`}var K0;function F$(){if(K0===null)return;if(K0===void 0)try{let Z=C("@stacksjs/router");if(typeof Z.getCurrentRequest==="function")K0=Z.getCurrentRequest;else{K0=null;return}}catch{K0=null;return}return K0()}function D$($,Z){let J=v9($,Z);if(J===void 0)return;let Q=Number(J);return Number.isFinite(Q)?Q:void 0}function v9($,Z){let J=$.query?.[Z];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as CB,sql as kB}from"@stacksjs/database";function C$($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/taggable] ${Z} requires a positive numeric id (received ${String($)})`)}function b9($){let Z=CB;return{async tags(J){return C$(J,"tags"),await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).selectAll().execute()},async tagCount(J){C$(J,"tagCount");let Q=await Z.selectFrom("taggable").select(kB`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addTag(J,Q){if(C$(J,"addTag"),!Q||typeof Q.name!=="string"||Q.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await Z.insertInto("taggable").values({...Q,taggable_id:J,taggable_type:$,slug:Q.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),order:0,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Q){await Z.deleteFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("id","=",Q).execute()}}}import{db as AB}from"@stacksjs/database";function j9($){let Z=AB;async function J(Q){return(await Z.selectFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).selectAll().execute()).map((Y)=>Y.category_id)}return{async categories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).selectAll().execute()},async categoryCount(Q){return(await J(Q)).length},async addCategory(Q,X){let Y=await Z.selectFrom("categorizable").where("name","=",X.name).selectAll().executeTakeFirst();if(!Y)Y=await Z.insertInto("categorizable").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();return await Z.insertInto("categorizable_models").values({categorizable_id:Q,categorizable_type:$,category_id:Y.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Q,X){await Z.deleteFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).where("category_id","=",X).execute()}}}import{db as NB,sql as xB}from"@stacksjs/database";function f9($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/commentable] ${Z} requires a positive numeric id (received ${String($)})`)}function M9($){let Z=NB;return{async comments(J){return f9(J,"comments"),await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).selectAll().execute()},async commentCount(J){let Q=await Z.selectFrom("comments").select(xB`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addComment(J,Q){if(f9(J,"addComment"),!Q||typeof Q.title!=="string"||Q.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Q.body!=="string"||Q.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");return await Z.insertInto("comments").values({...Q,commentables_id:J,commentables_type:$,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async approvedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","rejected").selectAll().execute()}}}import{db as GH}from"@stacksjs/database";function k3($){let Z=GH;return{async createStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Q)},async updateStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Q)},async deleteStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.deleteStripeUser(J)},async createOrGetStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Q)},async retrieveStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Q}=await import("@stacksjs/payments");return await Q.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Q)},async addPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Q)},async paymentMethods(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Q)},async newSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.create(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async updateSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.update(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async cancelSubscription(J,Q,X={}){let{manageSubscription:Y}=await import("@stacksjs/payments");return{subscription:await Y.cancel(Q,X)}},async activeSubscription(J){let{manageSubscription:Q}=await import("@stacksjs/payments"),X=await Z.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Y=await Q.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Y}}return},async checkout(J,Q,X={}){let{manageCheckout:Y,manageCustomer:G}=await import("@stacksjs/payments"),V={};if(X.enableTax)V.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)V.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Q.map((z)=>({price:z.priceId,quantity:z.quantity||1}))},...V,...X};return await Y.create(J,B)},async createSetupIntent(J,Q={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Q)},async subscriptionHistory(J){let{manageInvoice:Q}=await import("@stacksjs/payments");return await Q.list(J)},async transactionHistory(J){let{manageTransaction:Q}=await import("@stacksjs/payments");return await Q.list(J)},async connectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=(J._attributes??J)[X];if(!Y)return null;let G=await W8();try{return await G.accounts.retrieve(Y)}catch{return null}},async createConnectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=J._attributes??J,G=Y[X],V=await W8();if(!G){let{stacksIdempotencyKey:U}=await import("@stacksjs/payments"),W=Q.modelTable||$,B=await V.accounts.create({type:Q.type??"express",email:Q.email??Y.email,country:Q.country??"US",capabilities:Q.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:U("connect.account.create",W,Y.id)});return G=B.id,await Z.updateTable(W).set({[X]:G}).where("id","=",Number(Y.id)).execute(),B}return await V.accounts.retrieve(G)},async connectOnboardLink(J,Q){let X=Q.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await W8()).accountLinks.create({account:G,refresh_url:Q.refreshUrl,return_url:Q.returnUrl,type:Q.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=Q.chargesColumn||"charges_enabled",G=Q.payoutsColumn||"payouts_enabled",V=J._attributes??J,U=V[X];if(!U)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await W8()).accounts.retrieve(U),z=!!B.charges_enabled,L=!!B.payouts_enabled,H=Q.modelTable||$;return await Z.updateTable(H).set({[Y]:z,[G]:L}).where("id","=",Number(V.id)).execute(),{chargesEnabled:z,payoutsEnabled:L}},async chargeWithSplit(J,Q){let X=await W8(),Y=Q.accountColumn||"stripe_account_id",G=J._attributes??J,V=Q.connectAccountId||G[Y],U={amount:Q.amountCents,currency:Q.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Q.metadata};if(V){if(U.transfer_data={destination:V},Q.platformFeeCents)U.application_fee_amount=Q.platformFeeCents}let{freshIdempotencyKey:W}=await import("@stacksjs/payments");return await X.paymentIntents.create(U,{idempotencyKey:W("payment_intent.create",G.id,Q.amountCents)})}}}async function W8(){let $=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!$)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => $B(C3(),1))).default($,{apiVersion:"2026-03-25.dahlia"})}import{db as VH}from"@stacksjs/database";function A3($,Z){let J=VH,Q=Z?.table||`${$}_likes`,X=Z?.foreignKey||`${$.replace(/s$/,"")}_id`;return{async likes(Y){return await J.selectFrom(Q).where(X,"=",Y).selectAll().execute()},async likeCount(Y){let G=await J.selectFrom(Q).select("count(*) as count").where(X,"=",Y).executeTakeFirst();return Number(G?.count)||0},async like(Y,G){if(typeof Y!=="number"||!Number.isFinite(Y)||Y<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Y)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let V=new Date().toISOString();try{return await J.insertInto(Q).values({[X]:Y,user_id:G,created_at:V,updated_at:V}).returningAll().executeTakeFirst()}catch(U){let W=U;if(!(W.code==="SQLITE_CONSTRAINT_UNIQUE"||W.code==="SQLITE_CONSTRAINT"||W.code==="23505"||W.errno===1062||/unique|duplicate/i.test(W.message??"")))throw U;let z=await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst();if(z)return z;throw U}},async unlike(Y,G){await J.deleteFrom(Q).where(X,"=",Y).where("user_id","=",G).execute()},async isLiked(Y,G){return!!await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Y){return(await J.selectFrom(Q).select([X]).where("user_id","=",Y).execute()).map((V)=>Number(V[X])).filter(Boolean)}}}function N3(){return{async generateTwoFactorForModel($){let{generateTwoFactorSecret:Z}=await import("@stacksjs/auth"),J=Z();await $.update({two_factor_secret:J})},async verifyTwoFactorCode($,Z){let J=$.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Q,RateLimiter:X}=await import("@stacksjs/auth"),Y=String($.id??$.get?.("id")??$.get?.("email")??J),G=`2fa:${Y}`;if(await X.isRateLimited(G)){let{HttpError:U}=await import("@stacksjs/error-handling");throw new U(429,"Too many verification attempts. Please try again later.")}if(!await Q(Z,J))return await X.recordFailedAttempt(G),!1;try{let{cache:U}=await import("@stacksjs/cache"),W=`2fa:used:${Y}:${Z}`;if(await U.has(W))return await X.recordFailedAttempt(G),!1;await U.set(W,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as x0}from"@stacksjs/logging";var e8="deleted_at";function x3($,Z="id"){return{async softDelete(J){let Q=new Date().toISOString(),X=$.where(Z,J);if(typeof X?.update==="function")return await X.update({[e8]:Q}),!0;return!1},async restore(J){let Q=$.where(Z,J);if(typeof Q?.update==="function")return await Q.update({[e8]:null}),!0;return!1},async forceDelete(J){let Q=$.where(Z,J);if(typeof Q?.delete==="function")return await Q.delete(),!0;return!1},withTrashed(){return typeof $.query==="function"?$.query():$},onlyTrashed(){let J=typeof $.query==="function"?$.query():$;if(typeof J?.whereNotNull==="function")return J.whereNotNull(e8);return J?.where?.(e8,"!=",null)??J}}}function I3($){if($===!0||$==null)return{};if(typeof $==="object"&&!Array.isArray($)){let Z=$;if(Array.isArray(Z.cascade)){let J=Z.cascade.filter((Q)=>typeof Q==="string");return J.length?{cascade:J}:{}}return{}}return{}}function BH($,Z){let J=$.hasMany??[],Q=$.hasOne??[],X=J.some((B)=>U9(B,Z,!0)),Y=Q.some((B)=>U9(B,Z,!1));if(!X&&!Y)return x0.warn(`[orm] soft-delete cascade: '${Z}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let V=(X?J:Q).find((B)=>U9(B,Z,X))??null;if(!V)return null;let W=globalThis[V];if(!W)return x0.warn(`[orm] soft-delete cascade: model '${V}' is not yet on globalThis \u2014 skipping cascade for '${Z}'`),null;return{className:V,model:W}}function U9($,Z,J){let Q=$.toLowerCase();if(Z===Q)return!0;if(J&&Z===`${Q}s`)return!0;if(J&&Q.endsWith("y")&&Z===`${Q.slice(0,-1)}ies`)return!0;return!1}async function WH($,Z,J,Q,X){try{let Y=J.where;if(typeof Y!=="function"){x0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let U=Y.call(J,Q,Z),W=typeof U?.get==="function"?await U.get():Array.isArray(U)?U:[],B=J.primaryKey||"id";for(let z of W){let L=z?.[B];if(L!=null)await G.call(J,L)}return}let V=Y.call(J,Q,Z);if(typeof V?.delete==="function"){x0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await V.delete();return}}else{let G=J.restore;if(typeof G!=="function"){x0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let V=J.withTrashed,W=(typeof V==="function"?V.call(J):J).where?.(Q,Z),B=typeof W?.get==="function"?await W.get():[],z=J.primaryKey||"id";for(let L of B){let H=L?.[z];if(H!=null)await G.call(J,H)}}}catch(Y){if(x0.warn(`[orm] soft-delete cascade ${X} on ${$}#${String(Z)} failed`,{error:Y}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Y}}async function U8($,Z,J,Q){let X=Z.cascade;if(!X||X.length===0)return;let Y=`${$.name.toLowerCase()}_id`;for(let G of X){let V=BH($,G);if(!V)continue;await WH(V.className,J,V.model,Y,Q)}}var f3=new LH;function W0(){return f3.getStore()?.suppressed===!0}function B0($){return Promise.resolve(f3.run({suppressed:!0},$))}var P3=new Set;function KH($,Z){let J=typeof $==="string"?$.slice(0,80):String($),Q=`${typeof $}:${J}`;if(P3.has(Q))return;P3.add(Q);let X=Z instanceof Error?Z.message:String(Z);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var HH={string:{get:($)=>$!=null?String($):null,set:($)=>$!=null?String($):null},number:{get:($)=>$!=null?Number($):null,set:($)=>$!=null?Number($):null},integer:{get:($)=>$!=null?Math.trunc(Number($)):null,set:($)=>$!=null?Math.trunc(Number($)):null},float:{get:($)=>$!=null?Number.parseFloat(String($)):null,set:($)=>$!=null?Number.parseFloat(String($)):null},boolean:{get:($)=>$===1||$==="1"||$===!0||$==="true",set:($)=>$===!0||$===1||$==="1"||$==="true"?1:0},json:{get:($)=>{if($==null)return null;if(typeof $==="string")try{return JSON.parse($)}catch(Z){return KH($,Z),null}return $},set:($)=>{if($==null)return null;return typeof $==="string"?$:JSON.stringify($)}},datetime:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString():$},date:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString().split("T")[0]:$},array:{get:($)=>{if($==null)return[];if(Array.isArray($))return $;if(typeof $==="string")try{return JSON.parse($)}catch{return[]}return[]},set:($)=>{if($==null)return null;return Array.isArray($)?JSON.stringify($):$}}};function M3($){return typeof $==="string"?HH[$]:$}function S3($,Z,J){if(!$||typeof $!=="object")return $;let Q={...$};for(let[X,Y]of Object.entries(Z))if(X in Q){let G=M3(Y);Q[X]=G[J](Q[X])}return Q}var $$=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),R3=Symbol.for("stacks.modelInstanceProxy"),wH={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function TH($,Z){if(!$||!Z)return null;let J=Z.split("."),Q=$;for(let X of J){if(Q==null||typeof Q!=="object")return null;let Y=Q;if("_attributes"in Y&&Y._attributes&&typeof Y._attributes==="object"){let G=Y._attributes;if(X in G){Q=G[X];continue}}if(X in Y){Q=Y[X];continue}return null}return Q??null}function m($,Z){if(!$||typeof $!=="object")return $;if($[R3])return $;let J=$._attributes;if(!J||typeof J!=="object")return $;if(Z&&Object.keys(Z).length>0){for(let[Q,X]of Object.entries(Z))if(Object.prototype.hasOwnProperty.call(J,Q))J[Q]=M3(X).get(J[Q])}return new Proxy($,{get(Q,X,Y){if(X===R3)return!0;if(X==="saveAsync")return async function(){let V=Q._definition,U=V?.set;if(U&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes),H=L&&typeof L.then==="function"?await L:L;Q._attributes[B]=H}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="save")return function(){let V=Q._definition,U=V?.set;if(U&&Object.keys(U).length>0&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes);if(L&&typeof L.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Q._attributes[B]=L}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="updateAsync")return async function(V){if(V&&typeof V==="object"&&!Array.isArray(V))for(let[U,W]of Object.entries(V))Y[U]=W;return Y.saveAsync()};if(X==="saveQuietly")return function(){return B0(()=>Q.save())};if(X==="saveAsyncQuietly")return function(){return B0(()=>Y.saveAsync())};if(X==="updateQuietly")return function(V){return B0(()=>Q.update(V))};if(X==="updateAsyncQuietly")return function(V){return B0(()=>Y.updateAsync(V))};if(X==="deleteQuietly")return function(){return B0(()=>Q.delete())};if(X==="toSearchableObject")return function(){let W=Q._definition?.traits?.useSearch;if(!W)return null;let B=Q._attributes;if(!B)return null;if(W===!0){let D={...B};if(B.id!=null)D.id=String(B.id);return D}let z={},L=W.displayable?.length?W.displayable:[...W.searchable??[],...W.filterable??[],...W.sortable??[],"id"],H=W.denormalize??{},T=Q._relations;for(let D of L){let q=Z$(D),O=B[q]??B[D];if(O!==void 0){z[q]=O;continue}let k=H[D]??H[q];if(k){z[q]=TH(T,k);continue}z[q]=void 0}if(B.id!=null)z.id=String(B.id);return z};if(typeof X==="string"&&!$$.has(X)){let V=Q._attributes;if(V&&Object.prototype.hasOwnProperty.call(V,X))return V[X];let U=Q._relations;if(U&&Object.prototype.hasOwnProperty.call(U,X)){let B=U[X];if(Array.isArray(B))return B.map((z)=>m(z,Z));return m(B,Z)}let W=wH[X];if(W){let L=Q._definition?.__traitMethods?.[W.bag]?.[X];if(typeof L==="function")return W.mode==="model"?(...H)=>L(Y,...H):(...H)=>L(Q.id,...H)}}let G=Reflect.get(Q,X,Q);return typeof G==="function"?G.bind(Q):G},set(Q,X,Y,G){if(typeof X==="string"&&!$$.has(X)){let{_attributes:V,set:U}=Q;if(V&&Object.prototype.hasOwnProperty.call(V,X)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}if(V&&!(X in Q)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}}return Reflect.set(Q,X,Y,G)},has(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return!0;let G=Q._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Q,X)},deleteProperty(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return delete Y[X],!0}return Reflect.deleteProperty(Q,X)},ownKeys(Q){let X=Q._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Q,X){if(typeof X==="string"){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return{configurable:!0,enumerable:!0,value:Y[X],writable:!0}}return Object.getOwnPropertyDescriptor(Q,X)}})}var DH=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),OH={paginate:H$,simplePaginate:w$,cursorPaginate:T$},y3=Symbol.for("stacks.queryBuilderProxy");function _3($,Z){if(!$||typeof $!=="object")return $;if($[y3])return $;return new Proxy($,{get(J,Q,X){if(Q===y3)return!0;let Y=Reflect.get(J,Q,X);if(typeof Y!=="function")return Y;return function(...G){let V=G,U=String(Q);if(U==="paginate"||U==="simplePaginate"){let{perPage:z,page:L}=O$(G[0],G[1]);V=[z,L]}else if(U==="cursorPaginate"){let{perPage:z,cursor:L}=q$(G[0],G[1]);V=[z,L,G[2],G[3]]}let W=Y.apply(J,V),B=(z)=>{if(DH.has(U)){if(Array.isArray(z))return z.map((H)=>m(H,Z));let L=OH[U];if(L&&z&&Array.isArray(z.data)){let H=z.data.map((D)=>m(D,Z)),T=L({...z,data:H});return E$(T)}if(z&&Array.isArray(z.data))return{...z,data:z.data.map((H)=>m(H,Z))};return m(z,Z)}if(z&&typeof z==="object"&&typeof z.get==="function")return _3(z,Z);return z};if(W&&typeof W.then==="function")return W.then(B);return B(W)}}})}function qH($,Z){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Y of J){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let Q=["create","firstOrCreate","updateOrCreate","make"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Y of X){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V);return _3(U,Z)}}}class g3 extends Error{model;id;constructor($,Z){super(Z!=null?`[ORM] ${$} not found for id=${String(Z)}`:`[ORM] No matching ${$} row`);this.name="ModelNotFoundError",this.model=$,this.id=Z}}class L9 extends Error{model;attribute;reason;constructor($,Z,J){let Q=J==="guarded"?`'${Z}' is marked guarded`:`'${Z}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${$} forbidden: ${Q}. Use ${$}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=$,this.attribute=Z,this.reason=J}}var EH=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function z8($,Z,J={}){if(J.force)return Z;if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;let Q=$.attributes;if(!Q)return Z;let X=new Set,Y=new Set,G=new Set;for(let[U,W]of Object.entries(Q)){let B=Z$(U);if(X.add(B),W?.fillable===!0)Y.add(B);if(W?.guarded===!0)G.add(B)}let V=Y.size>0?Y:X;for(let U of Object.keys(Z)){if(EH.has(U))continue;if(G.has(U))throw new L9($.name,U,"guarded");if(U.endsWith("_id"))continue;if(!V.has(U))throw new L9($.name,U,"not-fillable")}return Z}async function K9($,Z){let J=$.set;if(!J||typeof J!=="object")return Z;let Q={...Z};for(let[X,Y]of Object.entries(J)){if(typeof Y!=="function"||!(X in Q))continue;try{Q[X]=await Y(Q)}catch(G){h.error(`[orm] ${$.name}.set.${X} threw \u2014 skipping setter`,G)}}return Q}function FH($,Z){let J=Z.primaryKey||"id",Q=$.create;function X(W){let B=$.where;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working where(): the underlying query builder did not expose one`);return B}function Y(W){let B=$.find;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working find(): the underlying query builder did not expose one`);return B}function G(W){let B=$.create;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} cannot create: the underlying query builder did not expose create()`);return B}if(typeof $.update!=="function")$.update=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){h.debug(`[orm] ${Z.name}.update called with empty data \u2014 short-circuiting and returning current row`);let H=$.find;return typeof H==="function"?await H.call($,W):null}z8(Z,B);let z=await K9(Z,B);await X("update").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceUpdate!=="function")$.forceUpdate=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.forceUpdate requires a data object as the second argument`);let z=await K9(Z,B);await X("forceUpdate").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceCreate!=="function")$.forceCreate=async function(W){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.forceCreate requires a data object`);if(typeof Q!=="function")throw Error(`[ORM] ${Z.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Q.call($,W)};if(typeof $.delete!=="function")$.delete=async function(W){if(W==null)throw Error(`[ORM] ${Z.name}.delete requires an id as the first argument`);if(!await Y("delete").call($,W))return!1;return await X("delete").call($,J,W).delete(),!0};if(typeof $.findOrFail!=="function")$.findOrFail=async function(W){let B=await Y("findOrFail").call($,W);if(B==null)throw new g3(Z.name,W);return B};if(typeof $.exists!=="function")$.exists=async function(W){if(W==null)return!1;let B=X("exists").call($,J,W);if(typeof B.count==="function"){let L=await B.count();return Number(L)>0}let z=$.find;return typeof z==="function"?await z.call($,W)!=null:!1};if(typeof $.firstOrCreate!=="function")$.firstOrCreate=async function(W,B={}){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.firstOrCreate requires a where-attrs object`);let z=X("firstOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L)return L;let H={...W,...B};return z8(Z,H),await G("firstOrCreate").call($,H)};if(typeof $.updateOrCreate!=="function")$.updateOrCreate=async function(W,B){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a values object`);let z=X("updateOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L){z8(Z,B);let T=L[J];await X("updateOrCreate").call($,J,T).update(B);let D=$.find;return typeof D==="function"?await D.call($,T):{...L,...B}}let H={...W,...B};return z8(Z,H),await G("updateOrCreate").call($,H)};if(typeof $.count!=="function")$.count=async function(){let W=$;if(typeof W.query==="function"){let L=W.query();if(typeof L?.count==="function"){let H=await L.count();return Number(H)||0}}let{all:B,get:z}=$;if(typeof B==="function")return(await B.call($)||[]).length;if(typeof z==="function")return(await z.call($)||[]).length;return 0};if(typeof $.pluck!=="function")$.pluck=async function(W){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.pluck requires a column name`);let B=$.all;return((typeof B==="function"?await B.call($):[])||[]).map((L)=>L?.[W])};if(typeof $.whereIn!=="function")$.whereIn=async function(W,B){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${Z.name}.whereIn requires an array of values`);if(B.length===0)return[];let z=$.where;if(typeof z!=="function")return[];let L=z.call($,W,"in",B);if(L&&typeof L.get==="function")return await L.get();return await L};let V=[["latest","desc"],["oldest","asc"]];for(let[W,B]of V)if(typeof $[W]!=="function")$[W]=async function(z="created_at"){let L=$,H=typeof L.query==="function"?L.query():L;if(typeof H?.orderBy==="function"){let O=H.orderBy(z,B);if(typeof O.first==="function")return await O.first();if(typeof O.get==="function")return(await O.get())?.[0]??null}let T=$.all;if(typeof T!=="function")return null;return[...await T.call($)||[]].sort((O,k)=>{let N=O?.[z],R=k?.[z];if(N===R)return 0;return(N>R?1:-1)*(B==="desc"?-1:1)})[0]??null};let U=h3(Z.traits?.useSearch);if(U){let W=U.index??Z.table??Z$(`${Z.name}s`);if(typeof $.search!=="function")$.search=function(B,z){return CH($,W,B,z)};if(typeof $.makeAllSearchable!=="function")$.makeAllSearchable=async function(B=500){let z=$.all;if(typeof z!=="function")throw Error(`[ORM] ${Z.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:L}=await import("@stacksjs/search-engine"),H=L(),T=0,D=$.query;if(typeof D==="function")try{let k=D.call($);if(k&&typeof k.chunk==="function")return await k.chunk(B,async(N)=>{let R=N.map((M)=>v3(M,U)).filter(Boolean);if(R.length>0)await H.addDocuments(W,R);T+=R.length}),T}catch{}let O=(await z.call($)||[]).map((k)=>v3(k,U)).filter(Boolean);if(O.length>0)await H.addDocuments(W,O);return O.length};if(typeof $.removeAllFromSearch!=="function")$.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),z=B();if(typeof z.deleteAllDocuments==="function"){await z.deleteAllDocuments(W);return}let L=$.all,H=typeof L==="function"?await L.call($)||[]:[],T=B();for(let D of H){let q=D?.id??D?._attributes?.id;if(q!=null)await T.deleteDocument(W,Number(q))}}}}function v3($,Z){if(typeof Z.shape==="function")try{return Z.shape($)}catch{return}let J=$?.toSearchableObject?.();if(J!==void 0)return J;return $?._attributes??(typeof $?.toJSON==="function"?$.toJSON():null)}function CH($,Z,J,Q){let X={q:J,...Q??{}},Y={with(G){return X={...X,...G},Y},where(G){return X={...X,filter:G},Y},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search(Z,X))?.hits??[]},async paginate(G,V=1){let{useSearchEngine:U}=await import("@stacksjs/search-engine"),B=await U().search(Z,{...X,limit:G,offset:(V-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:V,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search(Z,X)}};return Y}async function z9($,Z){if(!$||typeof $!=="object")return;let J=$._attributes??$;for(let Q of Z){if(!(Q in J))continue;let X=J[Q];if(!S0(X))continue;J[Q]=await Y$(X)}}function kH($,Z){if(Z.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let V of G)await z9(V,Z);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let V of G.data)await z9(V,Z);return G}if(G)await z9(G,Z);return G},Q=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Q){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let Y=$.update;if(typeof Y==="function")$.update=async function(G,V){let U=await Y.call(this,G,V);return await J(U)}}function AH($,Z){if(Z.length===0)return;let J=async(Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return Y;let G={...Y};for(let V of Z)if(V in G)G[V]=await X$(G[V]);return G},Q=["create","firstOrCreate","updateOrCreate"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=async function(...V){if(V[0]=await J(V[0]),V[1])V[1]=await J(V[1]);return await G.apply(this,V)}}let X=$.update;if(typeof X==="function")$.update=async function(Y,G){let V=await J(G);return await X.call(this,Y,V)}}function NH($,Z){let J=$.create;if(typeof J==="function")$.create=async function(Q,...X){z8(Z,Q);let Y=await K9(Z,Q);return await J.call(this,Y,...X)};for(let Q of["firstOrCreate","updateOrCreate"]){let X=$[Q];if(typeof X!=="function")continue}}function xH($,Z){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Y=$[X];if(typeof Y==="function")$[X]=async function(...G){if(h.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String($.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=S3(G[0],Z,"set");return await Y.apply(this,G)}}let Q=$.update;if(typeof Q==="function")$.update=async function(X,Y){let G=Y&&typeof Y==="object"&&!Array.isArray(Y)?S3(Y,Z,"set"):Y;return await Q.call(this,X,G)}}function OF($){h.debug(`[orm] Defining model: ${$.name} (table: ${$.table})`);let Z=IH($),J=SH($),Q=PH(Z,J),X=RH($);$.__traitMethods=X;let Y=Q?{...$,hooks:{...$.hooks,...Q}}:$,G=UH(Y);if(qH(G,$.casts),FH(G,Y),NH(G,Y),$.casts&&Object.keys($.casts).length>0)xH(G,$.casts);let V=G$($);if(V.length>0)AH(G,V),kH(G,V);let U=$.traits?.useSoftDeletes;if(U)yH(G,Y,U);let W=$.traits?.useAudit;if(W){let z=C9(W);k9(G,$.name,$.primaryKey||"id",z)}G.withoutEvents=function(z){return B0(z)};for(let z of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let L=G[z];if(typeof L!=="function")continue;let H=`${z}Quietly`;if(typeof G[H]==="function")continue;G[H]=function(...T){return B0(()=>L.apply(G,T))}}let B=Object.assign(G,X,{...$,getDefinition:()=>$,_isStacksModel:!0});return zH($.name,B),B}function IH($){let Z=$.traits?.observe;if(!Z)return;let J=$.name.toLowerCase(),Q=(L)=>{let H=L?.attributes;if(!H||typeof H!=="object")return L;let T=$.primaryKey||"id",D={...H};if(D[T]===void 0&&L[T]!==void 0)D[T]=L[T];return D},X=async(L,H)=>{if(W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(L,H)}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}},Y=$.traits?.broadcastOn,G=$.traits?.broadcastWith,V=typeof Y==="function"&&typeof G==="function",U=async(L,H)=>{if(!V)return;if(W0())return;try{let T=Y(H),D=Array.isArray(T)?T:[T],q=G(H),k=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof k!=="function")return;for(let N of D){if(typeof N!=="string"||N.length===0)continue;await k(N,L,q)}}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${L}' handler error:`,T),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw T}},W=async(L,H)=>{if(W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(L,H);if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}return!0},B=Z===!0?["create","update","delete"]:Array.isArray(Z)?Z:[],z={};if(B.includes("create"))z.beforeCreate=async(L)=>{if(h.debug(`[orm] Create ${J}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:creating`,L))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},z.afterCreate=async(L)=>{let H=Q(L);await X(`${J}:created`,H),await X(`${J}:saved`,H),await U(`${J}:created`,L)};if(B.includes("update"))z.beforeUpdate=async(L)=>{if(h.debug(`[orm] Update ${J}#${L?.id??"unknown"}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:updating`,L))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},z.afterUpdate=async(L)=>{let H=Q(L);await X(`${J}:updated`,H),await X(`${J}:saved`,H),await U(`${J}:updated`,L)};if(B.includes("delete"))z.beforeDelete=async(L)=>{if(h.debug(`[orm] Delete ${J}#${L?.id??"unknown"}`),!await W(`${J}:deleting`,L))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},z.afterDelete=async(L)=>{await X(`${J}:deleted`,Q(L)),await U(`${J}:deleted`,L)};return z}function PH(...$){let Z={},J=new Set;for(let Q of $){if(!Q)continue;for(let X of Object.keys(Q))J.add(X)}for(let Q of J){let X=$.map((Y)=>Y?.[Q]).filter((Y)=>typeof Y==="function");if(!X.length)continue;Z[Q]=async(...Y)=>{for(let G of X)await G(...Y)}}return Object.keys(Z).length?Z:void 0}function h3($){if(!$)return null;if($===!0)return{};if(typeof $==="object")return $;return null}function SH($){let Z=h3($.traits?.useSearch);if(!Z)return;let J=Z,Q=J.index??$.table??Z$(`${$.name}s`);function X(V){if(typeof J.shape==="function")try{return J.shape(V)}catch(B){h.warn(`[orm/search] shape() threw for ${$.name}: ${B.message}`);return}let W=m(V).toSearchableObject?.();if(W!==void 0)return W;return V?._attributes??(typeof V?.toJSON==="function"?V.toJSON():null)}let Y=async(V)=>{if(W0())return;let U=X(V);if(!U)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"upsert",doc:U})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}; falling back to inline: ${W.message}`),await b3(Q,U,$.name)}return}await b3(Q,U,$.name)};return{afterCreate:Y,afterUpdate:Y,afterDelete:async(V)=>{if(W0())return;let U=V?.id??V?._attributes?.id;if(U==null)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"delete",id:Number(U)})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}#${U}; falling back to inline: ${W.message}`),await j3(Q,Number(U),$.name)}return}await j3(Q,Number(U),$.name)}}}async function b3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().addDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to index ${J}: ${Q.message}`)}}async function j3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().deleteDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to remove ${J}#${Z}: ${Q.message}`)}}function RH($){let Z={},J=$.table,Q=$.traits;if(!Q)return Z;if(Q.taggable)Z._taggable=b9(J);if(Q.categorizable)Z._categorizable=j9(J);if(Q.commentable)Z._commentable=M9(J);if(Q.billable)Z._billable=k3(J);if(Q.likeable){let Y=typeof Q.likeable==="object"?Q.likeable:void 0;Z._likeable=A3(J,Y)}let X=Q.useAuth||Q.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)Z._twoFactor=N3();return Z}function yH($,Z,J){let Q=x3($,Z.primaryKey||"id"),X=I3(J),Y=Z,G=Z.name.toLowerCase(),V=Z.traits?.observe!=null&&Z.traits?.observe!==!1,U=async(H)=>{if(!V||W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(`${G}:restoring`,{id:H});if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,T)}return!0},W=async(H)=>{if(!V||W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(`${G}:restored`,{id:H})}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,T)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",z=async(H)=>{if(!X.cascade?.length||!B){let D=await Q.softDelete(H);if(D&&X.cascade?.length)await U8(Y,X,H,"softDelete");return D}let{db:T}=await import("@stacksjs/database");return await T.transaction(async()=>{let D=await Q.softDelete(H);if(D)await U8(Y,X,H,"softDelete");return D})},L=async(H)=>{if(!await U(H))return!1;if(!X.cascade?.length||!B){let O=await Q.restore(H);if(O){if(X.cascade?.length)await U8(Y,X,H,"restore");await W(H)}return O}let{db:D}=await import("@stacksjs/database"),q=await D.transaction(async()=>{let O=await Q.restore(H);if(O)await U8(Y,X,H,"restore");return O});if(q)await W(H);return q};$.softDelete=z,$.restore=L,$.forceDelete=Q.forceDelete,$.withTrashed=Q.withTrashed,$.onlyTrashed=Q.onlyTrashed,$.delete=z}function vH($){if($==null)return $;if(Array.isArray($))return $.map(vH);if(typeof $!=="object")return $;if(typeof $.toJSON==="function")return $.toJSON();if($._attributes&&typeof $._attributes==="object")return $._attributes;return $}import{log as bH}from"@stacksjs/logging";import{path as U0}from"@stacksjs/path";import{fs as L8}from"@stacksjs/storage";function z0($){return $.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function jH($){let Z=typeof $.type==="string"?$.type.toLowerCase():"",J=(()=>{switch(Z){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return $.nullable===!0?`${J} | null`:J}function fH($){let Z={},J=$.belongsTo;if(!J)return Z;let Q=Array.isArray(J)?J:Object.keys(J);for(let X of Q)Z[`${z0(X)}_id`]="number";return Z}function MH($,Z){let[J,Q]=[z0($),z0(Z)].sort();return`${J}_${Q}`}function _H($,Z){let J=Z.belongsToMany;if(!J)return[];let Q=[],X=Array.isArray(J)?J:[];for(let Y of X){let G,V,U,W;if(typeof Y==="string")G=Y;else if(Y&&typeof Y==="object"&&"model"in Y){let H=Y;G=H.model,V=H.pivotTable,U=H.firstForeignKey,W=H.secondForeignKey}else continue;let B=V??MH($,G),z=U??`${z0($)}_id`,L=W??`${z0(G)}_id`;Q.push({table:B,columns:{id:"number",[z]:"number",[L]:"number",created_at:"string",updated_at:"string | null"}})}return Q}function gH($){let Z={id:"number"},J=$.traits??{};if(J.useUuid)Z.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)Z.created_at="string",Z.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)Z.deleted_at="string | null";return Z}function hH($){let Z={},J=$.attributes??{};for(let[Q,X]of Object.entries(J))Z[z0(Q)]=jH(X);return Z}function m3($,Z){let J=Object.entries(Z).map(([Q,X])=>` ${Q}: ${X}`).join(`
|
|
13
|
-
`);return` ${
|
|
11
|
+
`+R})}let M=Math.floor((typeof O==="number"?O:Date.now())/1000)-L.timestamp;if(T>0&&M>T)throw new a.StripeSignatureVerificationError(z,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,z){if(typeof B!=="string")return null;return B.split(",").reduce((L,H)=>{let T=H.split("=");if(T[0]==="t")L.timestamp=parseInt(T[1],10);if(T[0]===z)L.signatures.push(T[1]);return L},{timestamp:-1,signatures:[]})}let V=null;function U(){if(!V)V=Z.createDefaultCryptoProvider();return V}function W(B){if(!B)throw new a.StripeError({message:"Options are required"});let z=Math.floor(B.timestamp)||Math.floor(Date.now()/1000),L=B.scheme||J.EXPECTED_SCHEME,H=B.cryptoProvider||U(),T=`${z}.${B.payload}`;return{...B,timestamp:z,scheme:L,cryptoProvider:H,payloadString:T,generateHeaderString:(q)=>{return`t=${z},${L}=${q}`}}}return $.signature=J,$}Y1.createWebhooks=CU});var U1=K((B1)=>{Object.defineProperty(B1,"__esModule",{value:!0});B1.ApiMajorVersion=B1.ApiVersion=void 0;B1.ApiVersion="2026-03-25.dahlia";B1.ApiMajorVersion="dahlia"});var K1=K((z1)=>{Object.defineProperty(z1,"__esModule",{value:!0});z1.resourceNamespace=void 0;function AU(Z,$){for(let J in $){if(!Object.prototype.hasOwnProperty.call($,J))continue;let Q=J[0].toLowerCase()+J.substring(1),X=new $[J](Z);this[Q]=X}}function NU(Z,$){return function(J){return new AU(J,$)}}z1.resourceNamespace=NU});var D1=K((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.AccountLinks=void 0;var H1=w(),xU=H1.StripeResource.method;w1.AccountLinks=H1.StripeResource.extend({create:xU({method:"POST",fullPath:"/v2/core/account_links"})})});var C1=K((E1)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.AccountTokens=void 0;var q1=w(),O1=q1.StripeResource.method;E1.AccountTokens=q1.StripeResource.extend({create:O1({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:O1({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var x1=K((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.Accounts=void 0;var k1=w(),J0=k1.StripeResource.method;A1.Accounts=k1.StripeResource.extend({retrieve:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:J0({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var R1=K((P1)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.Persons=void 0;var I1=w(),u0=I1.StripeResource.method;P1.Persons=I1.StripeResource.extend({create:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:u0({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var f1=K((j1)=>{Object.defineProperty(j1,"__esModule",{value:!0});j1.PersonTokens=void 0;var y1=w(),v1=y1.StripeResource.method;j1.PersonTokens=y1.StripeResource.extend({create:v1({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:v1({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var g1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.Accounts=void 0;var d9=w(),IU=R1(),PU=f1(),c0=d9.StripeResource.method;M1.Accounts=d9.StripeResource.extend({constructor:function(...Z){d9.StripeResource.apply(this,Z),this.persons=new IU.Persons(...Z),this.personTokens=new PU.PersonTokens(...Z)},create:c0({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:c0({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:c0({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:c0({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:c0({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var l1=K((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.ActiveEntitlements=void 0;var m1=w(),h1=m1.StripeResource.method;u1.ActiveEntitlements=m1.StripeResource.extend({retrieve:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var i1=K((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.Alerts=void 0;var n1=w(),D0=n1.StripeResource.method;p1.Alerts=n1.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:D0({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:D0({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var r1=K((o1)=>{Object.defineProperty(o1,"__esModule",{value:!0});o1.Associations=void 0;var a1=w(),SU=a1.StripeResource.method;o1.Associations=a1.StripeResource.extend({find:SU({method:"GET",fullPath:"/v1/tax/associations/find"})})});var $4=K((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.Authorizations=void 0;var t1=w(),l0=t1.StripeResource.method;e1.Authorizations=t1.StripeResource.extend({retrieve:l0({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:l0({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:l0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var Y4=K((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.Authorizations=void 0;var J4=w(),Q0=J4.StripeResource.method;Q4.Authorizations=J4.StripeResource.extend({create:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var W4=K((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.Calculations=void 0;var G4=w(),i9=G4.StripeResource.method;V4.Calculations=G4.StripeResource.extend({create:i9({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:i9({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:i9({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var K4=K((z4)=>{Object.defineProperty(z4,"__esModule",{value:!0});z4.Cardholders=void 0;var U4=w(),S8=U4.StripeResource.method;z4.Cardholders=U4.StripeResource.extend({create:S8({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:S8({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:S8({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:S8({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var D4=K((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.Cards=void 0;var H4=w(),R8=H4.StripeResource.method;w4.Cards=H4.StripeResource.extend({create:R8({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:R8({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:R8({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:R8({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var F4=K((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.Cards=void 0;var O4=w(),n0=O4.StripeResource.method;q4.Cards=O4.StripeResource.extend({deliverCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:n0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var N4=K((k4)=>{Object.defineProperty(k4,"__esModule",{value:!0});k4.Configurations=void 0;var C4=w(),v8=C4.StripeResource.method;k4.Configurations=C4.StripeResource.extend({create:v8({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:v8({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:v8({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:v8({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var S4=K((I4)=>{Object.defineProperty(I4,"__esModule",{value:!0});I4.Configurations=void 0;var x4=w(),p0=x4.StripeResource.method;I4.Configurations=x4.StripeResource.extend({create:p0({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:p0({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:p0({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:p0({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:p0({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var j4=K((v4)=>{Object.defineProperty(v4,"__esModule",{value:!0});v4.ConfirmationTokens=void 0;var R4=w(),RU=R4.StripeResource.method;v4.ConfirmationTokens=R4.StripeResource.extend({create:RU({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var _4=K((f4)=>{Object.defineProperty(f4,"__esModule",{value:!0});f4.ConnectionTokens=void 0;var b4=w(),vU=b4.StripeResource.method;f4.ConnectionTokens=b4.StripeResource.extend({create:vU({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.CreditBalanceSummary=void 0;var g4=w(),yU=g4.StripeResource.method;h4.CreditBalanceSummary=g4.StripeResource.extend({retrieve:yU({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var d4=K((n4)=>{Object.defineProperty(n4,"__esModule",{value:!0});n4.CreditBalanceTransactions=void 0;var l4=w(),c4=l4.StripeResource.method;n4.CreditBalanceTransactions=l4.StripeResource.extend({retrieve:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.CreditGrants=void 0;var i4=w(),O0=i4.StripeResource.method;a4.CreditGrants=i4.StripeResource.extend({create:O0({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:O0({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:O0({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var Z6=K((t4)=>{Object.defineProperty(t4,"__esModule",{value:!0});t4.CreditReversals=void 0;var r4=w(),a9=r4.StripeResource.method;t4.CreditReversals=r4.StripeResource.extend({create:a9({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:a9({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:a9({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var X6=K((J6)=>{Object.defineProperty(J6,"__esModule",{value:!0});J6.Customers=void 0;var $6=w(),jU=$6.StripeResource.method;J6.Customers=$6.StripeResource.extend({fundCashBalance:jU({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var B6=K((G6)=>{Object.defineProperty(G6,"__esModule",{value:!0});G6.DebitReversals=void 0;var Y6=w(),o9=Y6.StripeResource.method;G6.DebitReversals=Y6.StripeResource.extend({create:o9({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:o9({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:o9({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var L6=K((U6)=>{Object.defineProperty(U6,"__esModule",{value:!0});U6.Disputes=void 0;var W6=w(),d0=W6.StripeResource.method;U6.Disputes=W6.StripeResource.extend({create:d0({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:d0({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:d0({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var D6=K((w6)=>{Object.defineProperty(w6,"__esModule",{value:!0});w6.EarlyFraudWarnings=void 0;var H6=w(),K6=H6.StripeResource.method;w6.EarlyFraudWarnings=H6.StripeResource.extend({retrieve:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var F6=K((q6)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.EventDestinations=void 0;var O6=w(),o=O6.StripeResource.method;q6.EventDestinations=O6.StripeResource.extend({create:o({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:o({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:o({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:o({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var N6=K((k6)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.Events=void 0;var C6=w(),s9=C6.StripeResource.method;k6.Events=C6.StripeResource.extend({retrieve(...Z){return s9({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(J)=>{return this.addFetchRelatedObjectIfNeeded(J)}}).apply(this,Z)},list(...Z){return s9({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(J)=>{return{...J,data:J.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,Z)},addFetchRelatedObjectIfNeeded(Z){if(!Z.related_object||!Z.related_object.url)return Z;return{...Z,fetchRelatedObject:()=>s9({method:"GET",fullPath:Z.related_object.url}).apply(this,[{stripeContext:Z.context,headers:{"Stripe-Request-Trigger":`event=${Z.id}`}}])}}})});var S6=K((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.Features=void 0;var x6=w(),y8=x6.StripeResource.method;I6.Features=x6.StripeResource.extend({create:y8({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:y8({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:y8({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:y8({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var j6=K((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.FinancialAccounts=void 0;var R6=w(),X0=R6.StripeResource.method;v6.FinancialAccounts=R6.StripeResource.extend({create:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var _6=K((f6)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.InboundTransfers=void 0;var b6=w(),r9=b6.StripeResource.method;f6.InboundTransfers=b6.StripeResource.extend({fail:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:r9({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var u6=K((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.InboundTransfers=void 0;var g6=w(),j8=g6.StripeResource.method;h6.InboundTransfers=g6.StripeResource.extend({create:j8({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:j8({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:j8({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:j8({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var p6=K((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.Locations=void 0;var c6=w(),i0=c6.StripeResource.method;l6.Locations=c6.StripeResource.extend({create:i0({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:i0({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:i0({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:i0({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:i0({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var o6=K((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.MeterEventAdjustments=void 0;var d6=w(),bU=d6.StripeResource.method;i6.MeterEventAdjustments=d6.StripeResource.extend({create:bU({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var e6=K((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.MeterEventAdjustments=void 0;var s6=w(),fU=s6.StripeResource.method;r6.MeterEventAdjustments=s6.StripeResource.extend({create:fU({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var Q7=K(($7)=>{Object.defineProperty($7,"__esModule",{value:!0});$7.MeterEventSession=void 0;var Z7=w(),MU=Z7.StripeResource.method;$7.MeterEventSession=Z7.StripeResource.extend({create:MU({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var V7=K((Y7)=>{Object.defineProperty(Y7,"__esModule",{value:!0});Y7.MeterEventStream=void 0;var X7=w(),_U=X7.StripeResource.method;Y7.MeterEventStream=X7.StripeResource.extend({create:_U({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var z7=K((W7)=>{Object.defineProperty(W7,"__esModule",{value:!0});W7.MeterEvents=void 0;var B7=w(),gU=B7.StripeResource.method;W7.MeterEvents=B7.StripeResource.extend({create:gU({method:"POST",fullPath:"/v1/billing/meter_events"})})});var w7=K((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.MeterEvents=void 0;var L7=w(),hU=L7.StripeResource.method;K7.MeterEvents=L7.StripeResource.extend({create:hU({method:"POST",fullPath:"/v2/billing/meter_events"})})});var q7=K((D7)=>{Object.defineProperty(D7,"__esModule",{value:!0});D7.Meters=void 0;var T7=w(),Y0=T7.StripeResource.method;D7.Meters=T7.StripeResource.extend({create:Y0({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:Y0({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var k7=K((F7)=>{Object.defineProperty(F7,"__esModule",{value:!0});F7.OnboardingLinks=void 0;var E7=w(),mU=E7.StripeResource.method;F7.OnboardingLinks=E7.StripeResource.extend({create:mU({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var I7=K((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.Orders=void 0;var A7=w(),a0=A7.StripeResource.method;N7.Orders=A7.StripeResource.extend({create:a0({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:a0({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:a0({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:a0({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:a0({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var v7=K((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.OutboundPayments=void 0;var P7=w(),b8=P7.StripeResource.method;S7.OutboundPayments=P7.StripeResource.extend({update:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:b8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var f7=K((j7)=>{Object.defineProperty(j7,"__esModule",{value:!0});j7.OutboundPayments=void 0;var y7=w(),f8=y7.StripeResource.method;j7.OutboundPayments=y7.StripeResource.extend({create:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var h7=K((_7)=>{Object.defineProperty(_7,"__esModule",{value:!0});_7.OutboundTransfers=void 0;var M7=w(),M8=M7.StripeResource.method;_7.OutboundTransfers=M7.StripeResource.extend({update:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var l7=K((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.OutboundTransfers=void 0;var m7=w(),_8=m7.StripeResource.method;u7.OutboundTransfers=m7.StripeResource.extend({create:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var i7=K((p7)=>{Object.defineProperty(p7,"__esModule",{value:!0});p7.PaymentEvaluations=void 0;var n7=w(),uU=n7.StripeResource.method;p7.PaymentEvaluations=n7.StripeResource.extend({create:uU({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var r7=K((o7)=>{Object.defineProperty(o7,"__esModule",{value:!0});o7.PersonalizationDesigns=void 0;var a7=w(),g8=a7.StripeResource.method;o7.PersonalizationDesigns=a7.StripeResource.extend({create:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var $J=K((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.PersonalizationDesigns=void 0;var t7=w(),t9=t7.StripeResource.method;e7.PersonalizationDesigns=t7.StripeResource.extend({activate:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:t9({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var GJ=K((XJ)=>{Object.defineProperty(XJ,"__esModule",{value:!0});XJ.PhysicalBundles=void 0;var QJ=w(),JJ=QJ.StripeResource.method;XJ.PhysicalBundles=QJ.StripeResource.extend({retrieve:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var zJ=K((WJ)=>{Object.defineProperty(WJ,"__esModule",{value:!0});WJ.Products=void 0;var BJ=w(),VJ=BJ.StripeResource.method;WJ.Products=BJ.StripeResource.extend({retrieve:VJ({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:VJ({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var wJ=K((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.Readers=void 0;var LJ=w(),f=LJ.StripeResource.method;KJ.Readers=LJ.StripeResource.extend({create:f({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:f({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:f({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:f({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var qJ=K((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.Readers=void 0;var TJ=w(),e9=TJ.StripeResource.method;DJ.Readers=TJ.StripeResource.extend({presentPaymentMethod:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:e9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var kJ=K((FJ)=>{Object.defineProperty(FJ,"__esModule",{value:!0});FJ.ReceivedCredits=void 0;var EJ=w(),cU=EJ.StripeResource.method;FJ.ReceivedCredits=EJ.StripeResource.extend({create:cU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var PJ=K((xJ)=>{Object.defineProperty(xJ,"__esModule",{value:!0});xJ.ReceivedCredits=void 0;var NJ=w(),AJ=NJ.StripeResource.method;xJ.ReceivedCredits=NJ.StripeResource.extend({retrieve:AJ({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:AJ({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var yJ=K((RJ)=>{Object.defineProperty(RJ,"__esModule",{value:!0});RJ.ReceivedDebits=void 0;var SJ=w(),lU=SJ.StripeResource.method;RJ.ReceivedDebits=SJ.StripeResource.extend({create:lU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var _J=K((fJ)=>{Object.defineProperty(fJ,"__esModule",{value:!0});fJ.ReceivedDebits=void 0;var bJ=w(),jJ=bJ.StripeResource.method;fJ.ReceivedDebits=bJ.StripeResource.extend({retrieve:jJ({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:jJ({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var uJ=K((hJ)=>{Object.defineProperty(hJ,"__esModule",{value:!0});hJ.Refunds=void 0;var gJ=w(),nU=gJ.StripeResource.method;hJ.Refunds=gJ.StripeResource.extend({expire:nU({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var pJ=K((lJ)=>{Object.defineProperty(lJ,"__esModule",{value:!0});lJ.Registrations=void 0;var cJ=w(),h8=cJ.StripeResource.method;lJ.Registrations=cJ.StripeResource.extend({create:h8({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:h8({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:h8({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:h8({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var oJ=K((iJ)=>{Object.defineProperty(iJ,"__esModule",{value:!0});iJ.ReportRuns=void 0;var dJ=w(),ZZ=dJ.StripeResource.method;iJ.ReportRuns=dJ.StripeResource.extend({create:ZZ({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:ZZ({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:ZZ({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var Z5=K((tJ)=>{Object.defineProperty(tJ,"__esModule",{value:!0});tJ.ReportTypes=void 0;var rJ=w(),sJ=rJ.StripeResource.method;tJ.ReportTypes=rJ.StripeResource.extend({retrieve:sJ({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:sJ({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var X5=K((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.Requests=void 0;var $5=w(),$Z=$5.StripeResource.method;J5.Requests=$5.StripeResource.extend({create:$Z({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:$Z({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:$Z({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var W5=K((V5)=>{Object.defineProperty(V5,"__esModule",{value:!0});V5.ScheduledQueryRuns=void 0;var G5=w(),Y5=G5.StripeResource.method;V5.ScheduledQueryRuns=G5.StripeResource.extend({retrieve:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var K5=K((z5)=>{Object.defineProperty(z5,"__esModule",{value:!0});z5.Secrets=void 0;var U5=w(),m8=U5.StripeResource.method;z5.Secrets=U5.StripeResource.extend({create:m8({method:"POST",fullPath:"/v1/apps/secrets"}),list:m8({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:m8({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:m8({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var D5=K((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.Sessions=void 0;var H5=w(),pU=H5.StripeResource.method;w5.Sessions=H5.StripeResource.extend({create:pU({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var F5=K((q5)=>{Object.defineProperty(q5,"__esModule",{value:!0});q5.Sessions=void 0;var O5=w(),q0=O5.StripeResource.method;q5.Sessions=O5.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:q0({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var x5=K((A5)=>{Object.defineProperty(A5,"__esModule",{value:!0});A5.Sessions=void 0;var k5=w(),C5=k5.StripeResource.method;A5.Sessions=k5.StripeResource.extend({create:C5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:C5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var v5=K((S5)=>{Object.defineProperty(S5,"__esModule",{value:!0});S5.Settings=void 0;var P5=w(),I5=P5.StripeResource.method;S5.Settings=P5.StripeResource.extend({retrieve:I5({method:"GET",fullPath:"/v1/tax/settings"}),update:I5({method:"POST",fullPath:"/v1/tax/settings"})})});var M5=K((b5)=>{Object.defineProperty(b5,"__esModule",{value:!0});b5.Suppliers=void 0;var j5=w(),y5=j5.StripeResource.method;b5.Suppliers=j5.StripeResource.extend({retrieve:y5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:y5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var m5=K((g5)=>{Object.defineProperty(g5,"__esModule",{value:!0});g5.TestClocks=void 0;var _5=w(),o0=_5.StripeResource.method;g5.TestClocks=_5.StripeResource.extend({create:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:o0({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var n5=K((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.Tokens=void 0;var u5=w(),JZ=u5.StripeResource.method;c5.Tokens=u5.StripeResource.extend({retrieve:JZ({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:JZ({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:JZ({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var o5=K((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.TransactionEntries=void 0;var d5=w(),p5=d5.StripeResource.method;i5.TransactionEntries=d5.StripeResource.extend({retrieve:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var ZQ=K((t5)=>{Object.defineProperty(t5,"__esModule",{value:!0});t5.Transactions=void 0;var r5=w(),s5=r5.StripeResource.method;t5.Transactions=r5.StripeResource.extend({retrieve:s5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:s5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var XQ=K((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.Transactions=void 0;var $Q=w(),QZ=$Q.StripeResource.method;JQ.Transactions=$Q.StripeResource.extend({retrieve:QZ({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:QZ({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:QZ({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var BQ=K((GQ)=>{Object.defineProperty(GQ,"__esModule",{value:!0});GQ.Transactions=void 0;var YQ=w(),u8=YQ.StripeResource.method;GQ.Transactions=YQ.StripeResource.extend({retrieve:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:u8({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:u8({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var LQ=K((UQ)=>{Object.defineProperty(UQ,"__esModule",{value:!0});UQ.Transactions=void 0;var WQ=w(),XZ=WQ.StripeResource.method;UQ.Transactions=WQ.StripeResource.extend({createForceCapture:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:XZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var DQ=K((wQ)=>{Object.defineProperty(wQ,"__esModule",{value:!0});wQ.Transactions=void 0;var HQ=w(),KQ=HQ.StripeResource.method;wQ.Transactions=HQ.StripeResource.extend({retrieve:KQ({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:KQ({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var FQ=K((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ValueListItems=void 0;var OQ=w(),c8=OQ.StripeResource.method;qQ.ValueListItems=OQ.StripeResource.extend({create:c8({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:c8({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:c8({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:c8({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var NQ=K((kQ)=>{Object.defineProperty(kQ,"__esModule",{value:!0});kQ.ValueLists=void 0;var CQ=w(),s0=CQ.StripeResource.method;kQ.ValueLists=CQ.StripeResource.extend({create:s0({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:s0({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:s0({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:s0({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:s0({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var RQ=K((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.VerificationReports=void 0;var IQ=w(),xQ=IQ.StripeResource.method;PQ.VerificationReports=IQ.StripeResource.extend({retrieve:xQ({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:xQ({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var bQ=K((yQ)=>{Object.defineProperty(yQ,"__esModule",{value:!0});yQ.VerificationSessions=void 0;var vQ=w(),E0=vQ.StripeResource.method;yQ.VerificationSessions=vQ.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:E0({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:E0({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var YZ=K((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.Accounts=void 0;var fQ=w(),I=fQ.StripeResource.method;MQ.Accounts=fQ.StripeResource.extend({create:I({method:"POST",fullPath:"/v1/accounts"}),retrieve(Z,...$){if(typeof Z==="string")return I({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[Z,...$]);else{if(Z===null||Z===void 0)[].shift.apply([Z,...$]);return I({method:"GET",fullPath:"/v1/account"}).apply(this,[Z,...$])}},update:I({method:"POST",fullPath:"/v1/accounts/{account}"}),list:I({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:I({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:I({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:I({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:I({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:I({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:I({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:I({method:"GET",fullPath:"/v1/account"}),retrieveCapability:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:I({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:I({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var uQ=K((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.AccountLinks=void 0;var gQ=w(),dU=gQ.StripeResource.method;hQ.AccountLinks=gQ.StripeResource.extend({create:dU({method:"POST",fullPath:"/v1/account_links"})})});var pQ=K((lQ)=>{Object.defineProperty(lQ,"__esModule",{value:!0});lQ.AccountSessions=void 0;var cQ=w(),iU=cQ.StripeResource.method;lQ.AccountSessions=cQ.StripeResource.extend({create:iU({method:"POST",fullPath:"/v1/account_sessions"})})});var oQ=K((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.ApplePayDomains=void 0;var dQ=w(),l8=dQ.StripeResource.method;iQ.ApplePayDomains=dQ.StripeResource.extend({create:l8({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:l8({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:l8({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:l8({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var eQ=K((rQ)=>{Object.defineProperty(rQ,"__esModule",{value:!0});rQ.ApplicationFees=void 0;var sQ=w(),F0=sQ.StripeResource.method;rQ.ApplicationFees=sQ.StripeResource.extend({retrieve:F0({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:F0({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:F0({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:F0({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:F0({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:F0({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var QX=K(($X)=>{Object.defineProperty($X,"__esModule",{value:!0});$X.Balance=void 0;var ZX=w(),aU=ZX.StripeResource.method;$X.Balance=ZX.StripeResource.extend({retrieve:aU({method:"GET",fullPath:"/v1/balance"})})});var BX=K((GX)=>{Object.defineProperty(GX,"__esModule",{value:!0});GX.BalanceSettings=void 0;var YX=w(),XX=YX.StripeResource.method;GX.BalanceSettings=YX.StripeResource.extend({retrieve:XX({method:"GET",fullPath:"/v1/balance_settings"}),update:XX({method:"POST",fullPath:"/v1/balance_settings"})})});var KX=K((zX)=>{Object.defineProperty(zX,"__esModule",{value:!0});zX.BalanceTransactions=void 0;var UX=w(),WX=UX.StripeResource.method;zX.BalanceTransactions=UX.StripeResource.extend({retrieve:WX({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:WX({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var DX=K((wX)=>{Object.defineProperty(wX,"__esModule",{value:!0});wX.Charges=void 0;var HX=w(),C0=HX.StripeResource.method;wX.Charges=HX.StripeResource.extend({create:C0({method:"POST",fullPath:"/v1/charges"}),retrieve:C0({method:"GET",fullPath:"/v1/charges/{charge}"}),update:C0({method:"POST",fullPath:"/v1/charges/{charge}"}),list:C0({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:C0({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:C0({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var FX=K((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.ConfirmationTokens=void 0;var OX=w(),oU=OX.StripeResource.method;qX.ConfirmationTokens=OX.StripeResource.extend({retrieve:oU({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var xX=K((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CountrySpecs=void 0;var kX=w(),CX=kX.StripeResource.method;AX.CountrySpecs=kX.StripeResource.extend({retrieve:CX({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:CX({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var RX=K((PX)=>{Object.defineProperty(PX,"__esModule",{value:!0});PX.Coupons=void 0;var IX=w(),r0=IX.StripeResource.method;PX.Coupons=IX.StripeResource.extend({create:r0({method:"POST",fullPath:"/v1/coupons"}),retrieve:r0({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:r0({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:r0({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var bX=K((yX)=>{Object.defineProperty(yX,"__esModule",{value:!0});yX.CreditNotes=void 0;var vX=w(),s=vX.StripeResource.method;yX.CreditNotes=vX.StripeResource.extend({create:s({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:s({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:s({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:s({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:s({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:s({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:s({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:s({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var gX=K((MX)=>{Object.defineProperty(MX,"__esModule",{value:!0});MX.CustomerSessions=void 0;var fX=w(),sU=fX.StripeResource.method;MX.CustomerSessions=fX.StripeResource.extend({create:sU({method:"POST",fullPath:"/v1/customer_sessions"})})});var cX=K((mX)=>{Object.defineProperty(mX,"__esModule",{value:!0});mX.Customers=void 0;var hX=w(),A=hX.StripeResource.method;mX.Customers=hX.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:A({method:"GET",fullPath:"/v1/customers/{customer}"}),update:A({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:A({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:A({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:A({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:A({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:A({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:A({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:A({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:A({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:A({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:A({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:A({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var dX=K((nX)=>{Object.defineProperty(nX,"__esModule",{value:!0});nX.Disputes=void 0;var lX=w(),n8=lX.StripeResource.method;nX.Disputes=lX.StripeResource.extend({retrieve:n8({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:n8({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:n8({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:n8({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var rX=K((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.EphemeralKeys=void 0;var aX=w(),iX=aX.StripeResource.method;oX.EphemeralKeys=aX.StripeResource.extend({create:iX({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(Z,$)=>{if(!$.headers||!$.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:iX({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var JY=K((ZY)=>{Object.defineProperty(ZY,"__esModule",{value:!0});ZY.Events=void 0;var eX=w(),tX=eX.StripeResource.method;ZY.Events=eX.StripeResource.extend({retrieve:tX({method:"GET",fullPath:"/v1/events/{id}"}),list:tX({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var VY=K((YY)=>{Object.defineProperty(YY,"__esModule",{value:!0});YY.ExchangeRates=void 0;var XY=w(),QY=XY.StripeResource.method;YY.ExchangeRates=XY.StripeResource.extend({retrieve:QY({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:QY({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var zY=K((WY)=>{Object.defineProperty(WY,"__esModule",{value:!0});WY.FileLinks=void 0;var BY=w(),p8=BY.StripeResource.method;WY.FileLinks=BY.StripeResource.extend({create:p8({method:"POST",fullPath:"/v1/file_links"}),retrieve:p8({method:"GET",fullPath:"/v1/file_links/{link}"}),update:p8({method:"POST",fullPath:"/v1/file_links/{link}"}),list:p8({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var wY=K((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.multipartRequestDataProcessor=void 0;var LY=c(),rU=(Z,$,J)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Q}`;let X=new TextEncoder,Y=new Uint8Array(0),G=X.encode(`\r
|
|
12
|
+
`);function V(B){let z=Y,L=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Y=new Uint8Array(z.length+L.length+2),Y.set(z),Y.set(L,z.length),Y.set(G,Y.length-2)}function U(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let W=(0,LY.flattenAndStringify)($);for(let B in W){if(!Object.prototype.hasOwnProperty.call(W,B))continue;let z=W[B];if(V(`--${Q}`),Object.prototype.hasOwnProperty.call(z,"data")){let L=z;V(`Content-Disposition: form-data; name=${U(B)}; filename=${U(L.name||"blob")}`),V(`Content-Type: ${L.type||"application/octet-stream"}`),V(""),V(L.data)}else V(`Content-Disposition: form-data; name=${U(B)}`),V(""),V(z)}return V(`--${Q}--`),Y};function tU(Z,$,J,Q){if($=$||{},Z!=="POST")return Q(null,(0,LY.queryStringifyRequestData)($));this._stripe._platformFunctions.tryBufferData($).then((X)=>{let Y=rU(Z,X,J);return Q(null,Y)}).catch((X)=>Q(X,null))}KY.multipartRequestDataProcessor=tU});var qY=K((DY)=>{Object.defineProperty(DY,"__esModule",{value:!0});DY.Files=void 0;var eU=wY(),TY=w(),GZ=TY.StripeResource.method;DY.Files=TY.StripeResource.extend({create:GZ({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:GZ({method:"GET",fullPath:"/v1/files/{file}"}),list:GZ({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:eU.multipartRequestDataProcessor})});var kY=K((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.InvoiceItems=void 0;var EY=w(),t0=EY.StripeResource.method;FY.InvoiceItems=EY.StripeResource.extend({create:t0({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:t0({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:t0({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:t0({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:t0({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var PY=K((xY)=>{Object.defineProperty(xY,"__esModule",{value:!0});xY.InvoicePayments=void 0;var NY=w(),AY=NY.StripeResource.method;xY.InvoicePayments=NY.StripeResource.extend({retrieve:AY({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:AY({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var yY=K((RY)=>{Object.defineProperty(RY,"__esModule",{value:!0});RY.InvoiceRenderingTemplates=void 0;var SY=w(),d8=SY.StripeResource.method;RY.InvoiceRenderingTemplates=SY.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var MY=K((bY)=>{Object.defineProperty(bY,"__esModule",{value:!0});bY.Invoices=void 0;var jY=w(),S=jY.StripeResource.method;bY.Invoices=jY.StripeResource.extend({create:S({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:S({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:S({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:S({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:S({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:S({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:S({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:S({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:S({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:S({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:S({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:S({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var mY=K((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0});gY.Mandates=void 0;var _Y=w(),Zz=_Y.StripeResource.method;gY.Mandates=_Y.StripeResource.extend({retrieve:Zz({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var pY=K((lY)=>{Object.defineProperty(lY,"__esModule",{value:!0});lY.OAuth=void 0;var cY=w(),$z=c(),uY=cY.StripeResource.method,VZ="connect.stripe.com";lY.OAuth=cY.StripeResource.extend({basePath:"/",authorizeUrl(Z,$){Z=Z||{},$=$||{};let J="oauth/authorize";if($.express)J=`express/${J}`;if(!Z.response_type)Z.response_type="code";if(!Z.client_id)Z.client_id=this._stripe.getClientId();if(!Z.scope)Z.scope="read_write";return`https://${VZ}/${J}?${(0,$z.queryStringifyRequestData)(Z)}`},token:uY({method:"POST",path:"oauth/token",host:VZ}),deauthorize(Z,...$){if(!Z.client_id)Z.client_id=this._stripe.getClientId();return uY({method:"POST",path:"oauth/deauthorize",host:VZ}).apply(this,[Z,...$])}})});var sY=K((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0});aY.PaymentAttemptRecords=void 0;var iY=w(),dY=iY.StripeResource.method;aY.PaymentAttemptRecords=iY.StripeResource.extend({retrieve:dY({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:dY({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var ZG=K((tY)=>{Object.defineProperty(tY,"__esModule",{value:!0});tY.PaymentIntents=void 0;var rY=w(),g=rY.StripeResource.method;tY.PaymentIntents=rY.StripeResource.extend({create:g({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:g({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:g({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:g({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:g({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:g({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var XG=K((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.PaymentLinks=void 0;var $G=w(),e0=$G.StripeResource.method;JG.PaymentLinks=$G.StripeResource.extend({create:e0({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:e0({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:e0({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var BG=K((GG)=>{Object.defineProperty(GG,"__esModule",{value:!0});GG.PaymentMethodConfigurations=void 0;var YG=w(),i8=YG.StripeResource.method;GG.PaymentMethodConfigurations=YG.StripeResource.extend({create:i8({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:i8({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:i8({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:i8({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var LG=K((UG)=>{Object.defineProperty(UG,"__esModule",{value:!0});UG.PaymentMethodDomains=void 0;var WG=w(),Z8=WG.StripeResource.method;UG.PaymentMethodDomains=WG.StripeResource.extend({create:Z8({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:Z8({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:Z8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:Z8({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:Z8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var TG=K((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.PaymentMethods=void 0;var KG=w(),k0=KG.StripeResource.method;HG.PaymentMethods=KG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:k0({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:k0({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var EG=K((OG)=>{Object.defineProperty(OG,"__esModule",{value:!0});OG.PaymentRecords=void 0;var DG=w(),r=DG.StripeResource.method;OG.PaymentRecords=DG.StripeResource.extend({retrieve:r({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:r({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var AG=K((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.Payouts=void 0;var FG=w(),A0=FG.StripeResource.method;CG.Payouts=FG.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/payouts"}),retrieve:A0({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:A0({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:A0({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:A0({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:A0({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var PG=K((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.Plans=void 0;var NG=w(),$8=NG.StripeResource.method;xG.Plans=NG.StripeResource.extend({create:$8({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:$8({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:$8({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:$8({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:$8({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var yG=K((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.Prices=void 0;var SG=w(),J8=SG.StripeResource.method;RG.Prices=SG.StripeResource.extend({create:J8({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:J8({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:J8({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:J8({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:J8({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var MG=K((bG)=>{Object.defineProperty(bG,"__esModule",{value:!0});bG.Products=void 0;var jG=w(),l=jG.StripeResource.method;bG.Products=jG.StripeResource.extend({create:l({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:l({method:"GET",fullPath:"/v1/products/{id}"}),update:l({method:"POST",fullPath:"/v1/products/{id}"}),list:l({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:l({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:l({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:l({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:l({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:l({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:l({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var mG=K((gG)=>{Object.defineProperty(gG,"__esModule",{value:!0});gG.PromotionCodes=void 0;var _G=w(),a8=_G.StripeResource.method;gG.PromotionCodes=_G.StripeResource.extend({create:a8({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:a8({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:a8({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:a8({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var nG=K((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.Quotes=void 0;var uG=w(),n=uG.StripeResource.method;cG.Quotes=uG.StripeResource.extend({create:n({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:n({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:n({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:n({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:n({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:n({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:n({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:n({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:n({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:n({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var aG=K((dG)=>{Object.defineProperty(dG,"__esModule",{value:!0});dG.Refunds=void 0;var pG=w(),Q8=pG.StripeResource.method;dG.Refunds=pG.StripeResource.extend({create:Q8({method:"POST",fullPath:"/v1/refunds"}),retrieve:Q8({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Q8({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Q8({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Q8({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var tG=K((sG)=>{Object.defineProperty(sG,"__esModule",{value:!0});sG.Reviews=void 0;var oG=w(),BZ=oG.StripeResource.method;sG.Reviews=oG.StripeResource.extend({retrieve:BZ({method:"GET",fullPath:"/v1/reviews/{review}"}),list:BZ({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:BZ({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var JV=K((ZV)=>{Object.defineProperty(ZV,"__esModule",{value:!0});ZV.SetupAttempts=void 0;var eG=w(),Jz=eG.StripeResource.method;ZV.SetupAttempts=eG.StripeResource.extend({list:Jz({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var GV=K((XV)=>{Object.defineProperty(XV,"__esModule",{value:!0});XV.SetupIntents=void 0;var QV=w(),G0=QV.StripeResource.method;XV.SetupIntents=QV.StripeResource.extend({create:G0({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:G0({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:G0({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var UV=K((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.ShippingRates=void 0;var VV=w(),o8=VV.StripeResource.method;BV.ShippingRates=VV.StripeResource.extend({create:o8({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:o8({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:o8({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:o8({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var HV=K((LV)=>{Object.defineProperty(LV,"__esModule",{value:!0});LV.Sources=void 0;var zV=w(),X8=zV.StripeResource.method;LV.Sources=zV.StripeResource.extend({create:X8({method:"POST",fullPath:"/v1/sources"}),retrieve:X8({method:"GET",fullPath:"/v1/sources/{source}"}),update:X8({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:X8({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:X8({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var OV=K((TV)=>{Object.defineProperty(TV,"__esModule",{value:!0});TV.SubscriptionItems=void 0;var wV=w(),Y8=wV.StripeResource.method;TV.SubscriptionItems=wV.StripeResource.extend({create:Y8({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:Y8({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:Y8({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:Y8({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:Y8({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var CV=K((EV)=>{Object.defineProperty(EV,"__esModule",{value:!0});EV.SubscriptionSchedules=void 0;var qV=w(),N0=qV.StripeResource.method;EV.SubscriptionSchedules=qV.StripeResource.extend({create:N0({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:N0({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:N0({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var xV=K((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.Subscriptions=void 0;var kV=w(),i=kV.StripeResource.method;AV.Subscriptions=kV.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:i({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var vV=K((SV)=>{Object.defineProperty(SV,"__esModule",{value:!0});SV.TaxCodes=void 0;var PV=w(),IV=PV.StripeResource.method;SV.TaxCodes=PV.StripeResource.extend({retrieve:IV({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:IV({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var fV=K((jV)=>{Object.defineProperty(jV,"__esModule",{value:!0});jV.TaxIds=void 0;var yV=w(),s8=yV.StripeResource.method;jV.TaxIds=yV.StripeResource.extend({create:s8({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:s8({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:s8({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:s8({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var hV=K((_V)=>{Object.defineProperty(_V,"__esModule",{value:!0});_V.TaxRates=void 0;var MV=w(),r8=MV.StripeResource.method;_V.TaxRates=MV.StripeResource.extend({create:r8({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:r8({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:r8({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:r8({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var nV=K((cV)=>{Object.defineProperty(cV,"__esModule",{value:!0});cV.Tokens=void 0;var uV=w(),mV=uV.StripeResource.method;cV.Tokens=uV.StripeResource.extend({create:mV({method:"POST",fullPath:"/v1/tokens"}),retrieve:mV({method:"GET",fullPath:"/v1/tokens/{token}"})})});var aV=K((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.Topups=void 0;var pV=w(),G8=pV.StripeResource.method;dV.Topups=pV.StripeResource.extend({create:G8({method:"POST",fullPath:"/v1/topups"}),retrieve:G8({method:"GET",fullPath:"/v1/topups/{topup}"}),update:G8({method:"POST",fullPath:"/v1/topups/{topup}"}),list:G8({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:G8({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var tV=K((sV)=>{Object.defineProperty(sV,"__esModule",{value:!0});sV.Transfers=void 0;var oV=w(),t=oV.StripeResource.method;sV.Transfers=oV.StripeResource.extend({create:t({method:"POST",fullPath:"/v1/transfers"}),retrieve:t({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:t({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:t({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:t({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:t({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:t({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:t({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var J3=K((Z3)=>{Object.defineProperty(Z3,"__esModule",{value:!0});Z3.WebhookEndpoints=void 0;var eV=w(),V8=eV.StripeResource.method;Z3.WebhookEndpoints=eV.StripeResource.extend({create:V8({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:V8({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:V8({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:V8({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:V8({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var X3=K((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var x=K1(),Qz=D1(),Xz=C1(),Yz=x1(),Gz=g1(),Vz=l1(),Bz=i1(),Wz=r1(),Uz=$4(),zz=Y4(),Lz=W4(),Kz=K4(),Hz=D4(),wz=F4(),Tz=N4(),Dz=S4(),Oz=j4(),qz=_4(),Ez=u4(),Fz=d4(),Cz=s4(),kz=Z6(),Az=X6(),Nz=B6(),xz=L6(),Iz=D6(),Pz=F6(),Sz=N6(),Rz=S6(),vz=j6(),yz=_6(),jz=u6(),bz=p6(),fz=o6(),Mz=e6(),_z=Q7(),gz=V7(),hz=z7(),mz=w7(),uz=q7(),cz=k7(),lz=I7(),nz=v7(),pz=f7(),dz=h7(),iz=l7(),az=i7(),oz=r7(),sz=$J(),rz=GJ(),tz=zJ(),ez=wJ(),ZL=qJ(),$L=kJ(),JL=PJ(),QL=yJ(),XL=_J(),YL=uJ(),GL=pJ(),VL=oJ(),BL=Z5(),WL=X5(),UL=W5(),zL=K5(),LL=D5(),KL=F5(),HL=x5(),wL=v5(),TL=M5(),DL=m5(),OL=n5(),qL=o5(),EL=ZQ(),FL=XQ(),CL=BQ(),kL=LQ(),AL=DQ(),NL=FQ(),xL=NQ(),IL=RQ(),PL=bQ(),SL=YZ();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return SL.Accounts}});var RL=uQ();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return RL.AccountLinks}});var vL=pQ();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return vL.AccountSessions}});var yL=YZ();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return yL.Accounts}});var jL=oQ();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return jL.ApplePayDomains}});var bL=eQ();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return bL.ApplicationFees}});var fL=QX();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return fL.Balance}});var ML=BX();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return ML.BalanceSettings}});var _L=KX();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return _L.BalanceTransactions}});var gL=DX();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return gL.Charges}});var hL=FX();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return hL.ConfirmationTokens}});var mL=xX();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return mL.CountrySpecs}});var uL=RX();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return uL.Coupons}});var cL=bX();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return cL.CreditNotes}});var lL=gX();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return lL.CustomerSessions}});var nL=cX();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return nL.Customers}});var pL=dX();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return pL.Disputes}});var dL=rX();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return dL.EphemeralKeys}});var iL=JY();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return iL.Events}});var aL=VY();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return aL.ExchangeRates}});var oL=zY();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return oL.FileLinks}});var sL=qY();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return sL.Files}});var rL=kY();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return rL.InvoiceItems}});var tL=PY();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return tL.InvoicePayments}});var eL=yY();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return eL.InvoiceRenderingTemplates}});var ZK=MY();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return ZK.Invoices}});var $K=mY();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return $K.Mandates}});var JK=pY();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return JK.OAuth}});var QK=sY();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return QK.PaymentAttemptRecords}});var XK=ZG();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return XK.PaymentIntents}});var YK=XG();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return YK.PaymentLinks}});var GK=BG();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return GK.PaymentMethodConfigurations}});var VK=LG();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return VK.PaymentMethodDomains}});var BK=TG();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return BK.PaymentMethods}});var WK=EG();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return WK.PaymentRecords}});var UK=AG();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return UK.Payouts}});var zK=PG();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return zK.Plans}});var LK=yG();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return LK.Prices}});var KK=MG();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return KK.Products}});var HK=mG();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return HK.PromotionCodes}});var wK=nG();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return wK.Quotes}});var TK=aG();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return TK.Refunds}});var DK=tG();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return DK.Reviews}});var OK=JV();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return OK.SetupAttempts}});var qK=GV();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return qK.SetupIntents}});var EK=UV();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return EK.ShippingRates}});var FK=HV();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return FK.Sources}});var CK=OV();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return CK.SubscriptionItems}});var kK=CV();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return kK.SubscriptionSchedules}});var AK=xV();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return AK.Subscriptions}});var NK=vV();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return NK.TaxCodes}});var xK=fV();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return xK.TaxIds}});var IK=hV();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return IK.TaxRates}});var PK=nV();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return PK.Tokens}});var SK=aV();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return SK.Topups}});var RK=tV();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return RK.Transfers}});var vK=J3();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return vK.WebhookEndpoints}});E.Apps=(0,x.resourceNamespace)("apps",{Secrets:zL.Secrets});E.Billing=(0,x.resourceNamespace)("billing",{Alerts:Bz.Alerts,CreditBalanceSummary:Ez.CreditBalanceSummary,CreditBalanceTransactions:Fz.CreditBalanceTransactions,CreditGrants:Cz.CreditGrants,MeterEventAdjustments:fz.MeterEventAdjustments,MeterEvents:hz.MeterEvents,Meters:uz.Meters});E.BillingPortal=(0,x.resourceNamespace)("billingPortal",{Configurations:Tz.Configurations,Sessions:LL.Sessions});E.Checkout=(0,x.resourceNamespace)("checkout",{Sessions:KL.Sessions});E.Climate=(0,x.resourceNamespace)("climate",{Orders:lz.Orders,Products:tz.Products,Suppliers:TL.Suppliers});E.Entitlements=(0,x.resourceNamespace)("entitlements",{ActiveEntitlements:Vz.ActiveEntitlements,Features:Rz.Features});E.FinancialConnections=(0,x.resourceNamespace)("financialConnections",{Accounts:Yz.Accounts,Sessions:HL.Sessions,Transactions:EL.Transactions});E.Forwarding=(0,x.resourceNamespace)("forwarding",{Requests:WL.Requests});E.Identity=(0,x.resourceNamespace)("identity",{VerificationReports:IL.VerificationReports,VerificationSessions:PL.VerificationSessions});E.Issuing=(0,x.resourceNamespace)("issuing",{Authorizations:Uz.Authorizations,Cardholders:Kz.Cardholders,Cards:Hz.Cards,Disputes:xz.Disputes,PersonalizationDesigns:oz.PersonalizationDesigns,PhysicalBundles:rz.PhysicalBundles,Tokens:OL.Tokens,Transactions:FL.Transactions});E.Radar=(0,x.resourceNamespace)("radar",{EarlyFraudWarnings:Iz.EarlyFraudWarnings,PaymentEvaluations:az.PaymentEvaluations,ValueListItems:NL.ValueListItems,ValueLists:xL.ValueLists});E.Reporting=(0,x.resourceNamespace)("reporting",{ReportRuns:VL.ReportRuns,ReportTypes:BL.ReportTypes});E.Sigma=(0,x.resourceNamespace)("sigma",{ScheduledQueryRuns:UL.ScheduledQueryRuns});E.Tax=(0,x.resourceNamespace)("tax",{Associations:Wz.Associations,Calculations:Lz.Calculations,Registrations:GL.Registrations,Settings:wL.Settings,Transactions:CL.Transactions});E.Terminal=(0,x.resourceNamespace)("terminal",{Configurations:Dz.Configurations,ConnectionTokens:qz.ConnectionTokens,Locations:bz.Locations,OnboardingLinks:cz.OnboardingLinks,Readers:ez.Readers});E.TestHelpers=(0,x.resourceNamespace)("testHelpers",{ConfirmationTokens:Oz.ConfirmationTokens,Customers:Az.Customers,Refunds:YL.Refunds,TestClocks:DL.TestClocks,Issuing:(0,x.resourceNamespace)("issuing",{Authorizations:zz.Authorizations,Cards:wz.Cards,PersonalizationDesigns:sz.PersonalizationDesigns,Transactions:kL.Transactions}),Terminal:(0,x.resourceNamespace)("terminal",{Readers:ZL.Readers}),Treasury:(0,x.resourceNamespace)("treasury",{InboundTransfers:yz.InboundTransfers,OutboundPayments:nz.OutboundPayments,OutboundTransfers:dz.OutboundTransfers,ReceivedCredits:$L.ReceivedCredits,ReceivedDebits:QL.ReceivedDebits})});E.Treasury=(0,x.resourceNamespace)("treasury",{CreditReversals:kz.CreditReversals,DebitReversals:Nz.DebitReversals,FinancialAccounts:vz.FinancialAccounts,InboundTransfers:jz.InboundTransfers,OutboundPayments:pz.OutboundPayments,OutboundTransfers:iz.OutboundTransfers,ReceivedCredits:JL.ReceivedCredits,ReceivedDebits:XL.ReceivedDebits,TransactionEntries:qL.TransactionEntries,Transactions:AL.Transactions});E.V2=(0,x.resourceNamespace)("v2",{Billing:(0,x.resourceNamespace)("billing",{MeterEventAdjustments:Mz.MeterEventAdjustments,MeterEventSession:_z.MeterEventSession,MeterEventStream:gz.MeterEventStream,MeterEvents:mz.MeterEvents}),Core:(0,x.resourceNamespace)("core",{AccountLinks:Qz.AccountLinks,AccountTokens:Xz.AccountTokens,Accounts:Gz.Accounts,EventDestinations:Pz.EventDestinations,Events:Sz.Events})})});var E3=K((O3)=>{Object.defineProperty(O3,"__esModule",{value:!0});O3.createStripe=void 0;var Y3=M0(),sK=_$(),T3=w(),G3=X1(),rK=V1(),D3=U1(),tK=j0(),eK=I8(),V3=b0(),t8=X3(),V0=c(),B3="api.stripe.com",W3="443",U3="/v1/",z3=D3.ApiVersion,L3=80000,K3=5,H3=0.5,ZH=["name","version","url","partner_id"],w3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],$H=(Z)=>new sK.RequestSender(Z,T3.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function JH(Z,$=$H){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=D3.ApiVersion;let J=typeof process<"u"&&process.env?(0,V0.detectAIAgent)(process.env):"";Q.AI_AGENT=J,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,V0.determineProcessUserAgentProperties)(),...J?{ai_agent:J}:{}},Q.StripeResource=T3.StripeResource,Q.StripeContext=G3.StripeContext,Q.resources=t8,Q.HttpClient=V3.HttpClient,Q.HttpClientResponse=V3.HttpClientResponse,Q.CryptoProvider=tK.CryptoProvider,Q.webhooks=(0,rK.createWebhooks)(Z),Q.Decimal=eK.Decimal;function Q(X,Y={}){if(!(this instanceof Q))return new Q(X,Y);let G=this._getPropsFromConfig(Y);this._platformFunctions=Z,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let V=G.httpAgent||null;this._api={host:G.host||B3,port:G.port||W3,protocol:G.protocol||"https",basePath:U3,version:G.apiVersion||z3,timeout:(0,V0.validateInteger)("timeout",G.timeout,L3),maxNetworkRetries:(0,V0.validateInteger)("maxNetworkRetries",G.maxNetworkRetries,2),agent:V,httpClient:G.httpClient||(V?this._platformFunctions.createNodeHttpClient(V):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:G.stripeAccount||null,stripeContext:G.stripeContext||null};let U=G.typescript||!1;if(U!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=U;if(G.appInfo)this._setAppInfo(G.appInfo);this._prepResources(),this._setAuthenticator(X,G.authenticator),this.errors=Y3,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=G.telemetry!==!1,this._requestSender=$(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=Y3,Q.createNodeHttpClient=Z.createNodeHttpClient,Q.createFetchHttpClient=Z.createFetchHttpClient,Q.createNodeCryptoProvider=Z.createNodeCryptoProvider,Q.createSubtleCryptoProvider=Z.createSubtleCryptoProvider,Q.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(X,Y,G,V){return this._requestSender._rawRequest(X,Y,G,V)},_setAuthenticator(X,Y){if(X&&Y)throw Error("Can't specify both apiKey and authenticator");if(!X&&!Y)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=X?(0,V0.createApiKeyAuthenticator)(X):Y},_setAppInfo(X){if(X&&typeof X!=="object")throw Error("AppInfo must be an object.");if(X&&!X.name)throw Error("AppInfo.name is required");X=X||{},this._appInfo=ZH.reduce((Y,G)=>{if(typeof X[G]=="string")Y=Y||{},Y[G]=X[G];return Y},{})},_setApiField(X,Y){this._api[X]=Y},getApiField(X){return this._api[X]},setClientId(X){this._clientId=X},getClientId(){return this._clientId},getConstant:(X)=>{switch(X){case"DEFAULT_HOST":return B3;case"DEFAULT_PORT":return W3;case"DEFAULT_BASE_PATH":return U3;case"DEFAULT_API_VERSION":return z3;case"DEFAULT_TIMEOUT":return L3;case"MAX_NETWORK_RETRY_DELAY_SEC":return K3;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return H3}return Q[X]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(X,Y,G){let V=(0,V0.validateInteger)(X,Y,G);this._setApiField(X,V)},getMaxNetworkRetryDelay(){return K3},getInitialNetworkRetryDelay(){return H3},getClientUserAgent(X){return this.getClientUserAgentSeeded(Q.USER_AGENT,X)},getClientUserAgentSeeded(X,Y){let G={};for(let W in X){if(!Object.prototype.hasOwnProperty.call(X,W))continue;G[W]=encodeURIComponent(X[W]??"null")}let V=this._platformFunctions.getPlatformInfo();if(V&&this.getTelemetryEnabled())G.platform=encodeURIComponent(V);else delete G.platform;let U=this.getApiField("httpClient");if(U)G.httplib=encodeURIComponent(U.getClientName());if(this._appInfo)G.application=this._appInfo;Y(JSON.stringify(G))},getAppInfoAsString(){if(!this._appInfo)return"";let X=this._appInfo.name;if(this._appInfo.version)X+=`/${this._appInfo.version}`;if(this._appInfo.url)X+=` (${this._appInfo.url})`;return X},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let X in t8){if(!Object.prototype.hasOwnProperty.call(t8,X))continue;this[(0,V0.pascalToCamelCase)(X)]=new t8[X](this)}},_getPropsFromConfig(X){if(!X)return{};let Y=typeof X==="string";if(!(X===Object(X)&&!Array.isArray(X))&&!Y)throw Error("Config must either be an object or a string");if(Y)return{apiVersion:X};if(Object.keys(X).filter((U)=>!w3.includes(U)).length>0)throw Error(`Config object may only contain the following: ${w3.join(", ")}`);return X},parseEventNotification(X,Y,G,V,U,W){this.webhooks.signature.verifyHeader(X,Y,G,V||this.webhooks.DEFAULT_TOLERANCE,U,W);let B=X instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(X)):JSON.parse(X);if(B&&B.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(B.context)B.context=G3.StripeContext.parse(B.context);return B.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${B.id}`,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_event"])},B.fetchRelatedObject=()=>{if(!B.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",B.related_object.url,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_related_object"])},B}},Q}O3.createStripe=JH});var C3=K((F3,B8)=>{Object.defineProperty(F3,"__esModule",{value:!0});var QH=j$(),XH=E3(),YH=I8(),WZ=(0,XH.createStripe)(new QH.NodePlatformFunctions);B8.exports=WZ;B8.exports.Stripe=WZ;B8.exports.default=WZ;B8.exports.Decimal=YH.Decimal});import"@stacksjs/validation";import{log as Q9}from"@stacksjs/cli";import{db as wZ}from"@stacksjs/database";async function $B(Z,$={}){let{olderThanDays:J=30,column:Q="created_at",query:X}=$;try{if(X){let W=wZ.deleteFrom(Z);W=X(W);let B=await W.execute(),z=Array.isArray(B)?B:[B],L=Number(z[0]?.numDeletedRows??z.length??0);return Q9.info(`Pruned ${L} records from ${Z}`),L}let Y=new Date;Y.setDate(Y.getDate()-J);let G=await wZ.deleteFrom(Z).where(Q,"<",Y.toISOString()).execute(),V=Array.isArray(G)?G:[G],U=Number(V[0]?.numDeletedRows??V.length??0);return Q9.info(`Pruned ${U} records from ${Z} older than ${J} days`),U}catch(Y){throw Q9.error(`Failed to prune ${Z}:`,Y),Y}}async function ZT(Z,$={}){return $B(Z,$)}function $T(Z){if(!Z?.prunable)return null;if(typeof Z.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return Z.prunable}import{createCipheriv as JB,createDecipheriv as QB,createHash as XB,randomBytes as YB}from"crypto";import{log as H8}from"@stacksjs/logging";var TZ="enc:",DZ="aes-256-gcm",GB=12,K8=null;async function OZ(){if(K8)return K8;let Z=process.env.APP_KEY;if(!Z)try{Z=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!Z)return null;return K8=XB("sha256").update(Z).digest(),K8}function S0(Z){return typeof Z==="string"&&Z.startsWith(TZ)}async function X9(Z){if(Z==null)return Z;if(S0(Z))return Z;if(typeof Z!=="string")return Z;let $=await OZ();if(!$)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),Z;let J=YB(GB),Q=JB(DZ,$,J),X=Buffer.concat([Q.update(Z,"utf8"),Q.final()]),Y=Q.getAuthTag();return`${TZ}${J.toString("base64")}:${Y.toString("base64")}:${X.toString("base64")}`}async function Y9(Z){if(Z==null)return Z;if(typeof Z!=="string")return Z;if(!S0(Z))return Z;try{let $=await OZ();if(!$)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Q,X]=Z.split(":");if(!J||!Q||!X)return H8.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Y=Buffer.from(J,"base64"),G=Buffer.from(Q,"base64"),V=Buffer.from(X,"base64"),U=QB(DZ,$,Y);return U.setAuthTag(G),Buffer.concat([U.update(V),U.final()]).toString("utf8")}catch($){return H8.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:$}),null}}function G9(Z){let $=Z.attributes;if(!$||typeof $!=="object")return[];let J=[];for(let[Q,X]of Object.entries($))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Q);return J}import{log as v0}from"@stacksjs/logging";var VB=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],EZ="model_audits",W9=null;function BB(Z){W9=Z}async function V9(){if(W9!=null)return W9;try{let Z=await import("@stacksjs/router").catch(()=>null);if(!Z)return null;let $=Z.getCurrentRequest;if(typeof $!=="function")return null;let J=$();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function w8(Z){if(!Z||typeof Z!=="object")return null;let $={};for(let[J,Q]of Object.entries(Z)){if(VB.some((X)=>X.test(J)))continue;$[J]=Q}return $}function R0(Z){if(!Z||typeof Z!=="object")return null;let $=Z;if($._attributes&&typeof $._attributes==="object")return{...$._attributes};return{...Z}}function WB(Z,$){if(!Z||!$)return{old:Z,next:$};let J={},Q={},X=new Set([...Object.keys(Z),...Object.keys($)]);for(let Y of X)if(Z[Y]!==$[Y])J[Y]=Z[Y],Q[Y]=$[Y];return{old:J,next:Q}}async function B9(Z,$=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(EZ).values({auditable_type:Z.auditable_type,auditable_id:Z.auditable_id,event:Z.event,old_values:Z.old_values?JSON.stringify(Z.old_values):null,new_values:Z.new_values?JSON.stringify(Z.new_values):null,user_id:Z.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(v0.warn(`[orm] audit row write failed for ${Z.auditable_type}#${String(Z.auditable_id)} (${Z.event})`,{error:J}),$)throw J}}function FZ(Z){return{async audits($){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(EZ).selectAll().where("auditable_type","=",Z).where("auditable_id","=",$).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?qZ(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?qZ(X.new_values):X.new_values}))}catch(J){return v0.warn(`[orm] audits() lookup failed for ${Z}#${String($)}`,{error:J}),[]}}}}function qZ(Z){try{return JSON.parse(Z)}catch{return Z}}function CZ(Z){if(Z&&typeof Z==="object"&&"transactional"in Z)return{transactional:Z.transactional===!0};return{transactional:!1}}function kZ(Z,$,J="id",Q={}){let X=Q.transactional===!0,Y=Z;if(typeof Z.audits!=="function")Z.audits=FZ($).audits;let G=async(B)=>{if(!X)return await B();let{db:z}=await import("@stacksjs/database");return await z.transaction(async()=>B())},V=Z.create;if(typeof V==="function")Z.create=async function(...B){return await G(async()=>{let z=await V.apply(this,B);try{let L=R0(z),H=L?.[J];if(H!=null){let T=await V9();await B9({auditable_type:$,auditable_id:H,event:"created",old_values:null,new_values:w8(L),user_id:T},X)}}catch(L){if(v0.warn(`[orm] audit(create) failed for ${$}`,{error:L}),X)throw L}return z})};let U=Z.update;if(typeof U==="function")Z.update=async function(B,z){return await G(async()=>{let L=Y.find,H=typeof L==="function"?R0(await L.call(Y,B)):null,T=await U.call(this,B,z);try{let D=R0(T)??(typeof L==="function"?R0(await L.call(Y,B)):null),{old:q,next:O}=WB(H,D);if(O&&Object.keys(O).length>0){let k=await V9();await B9({auditable_type:$,auditable_id:B,event:"updated",old_values:w8(q),new_values:w8(O),user_id:k},X)}}catch(D){if(v0.warn(`[orm] audit(update) failed for ${$}#${String(B)}`,{error:D}),X)throw D}return T})};let W=(B)=>{let z=Z[B];if(typeof z!=="function")return;Z[B]=async function(L){return await G(async()=>{let H=Y.find,T=typeof H==="function"?R0(await H.call(Y,L)):null,D=await z.call(this,L);try{if(D!==!1&&T){let q=await V9();await B9({auditable_type:$,auditable_id:L,event:"deleted",old_values:w8(T),new_values:null,user_id:q},X)}}catch(q){if(v0.warn(`[orm] audit(${B}) failed for ${$}#${String(L)}`,{error:q}),X)throw q}return D})}};W("delete"),W("softDelete")}function AZ(Z){let $=Z;return $?.code==="SQLITE_CONSTRAINT_UNIQUE"||$?.code==="SQLITE_CONSTRAINT"||$?.code==="23505"||$?.errno===1062||/unique|duplicate/i.test($?.message??"")}function UB(Z,$,J){let Q=Z;if(Z instanceof Error&&typeof Q.status==="number"&&Number.isInteger(Q.status)&&Q.status>=400&&Q.status<600){let X={error:Z.message};if(Q.details!==void 0)X.details=Q.details;return{status:Q.status,body:X}}if(AZ(Z))return{status:409,body:{error:`${$} already exists`}};return{status:500,body:{error:`Failed to ${J} ${$}`,detail:String(Z)}}}import{cacheRequestQuery as zB}from"@stacksjs/router";var T8=new WeakMap;function UT(Z,$){return zB(`batchLoad:${Z.name??"model"}:${String($)}`,async()=>{return new Promise((J,Q)=>{let X=T8.get(Z);if(!X)X={keys:[],resolvers:[],scheduled:!1},T8.set(Z,X);if(X.keys.push($),X.resolvers.push({key:$,resolve:J,reject:Q}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Y=T8.get(Z);if(!Y)return;T8.delete(Z);let G=Array.from(new Set(Y.keys));try{let V=typeof Z.findMany==="function"?await Z.findMany(G):await Promise.all(G.map((W)=>Z.find?.(W))),U=new Map;for(let W of V??[]){let B=W?.id;if(B!==void 0)U.set(B,W)}for(let W of Y.resolvers)W.resolve(U.get(W.key))}catch(V){for(let U of Y.resolvers)U.reject(V)}})})})}import{db as HT}from"@stacksjs/database";class LB{conditions=[];where(Z,...$){let[J,Q]=$,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("and","where",Z,X,Y)}orWhere(Z,...$){let[J,Q]=$,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("or","where",Z,X,Y)}whereIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$})}whereNotIn(Z,$){this.conditions.push({type:"and",method:"whereIn",column:Z,values:$,operator:"not in"})}whereNull(Z){this.conditions.push({type:"and",method:"whereNull",column:Z})}whereNotNull(Z){this.conditions.push({type:"and",method:"whereNotNull",column:Z})}whereBetween(Z,$){this.conditions.push({type:"and",method:"whereBetween",column:Z,range:$})}whereExists(Z){this.conditions.push({type:"and",method:"whereExists",column:"",callback:Z})}addCondition(Z,$,J,Q,X){this.conditions.push({type:Z,method:$,column:J,operator:Q,value:X})}getConditions(){return this.conditions}}import{db as D8,runInTransactionScope as KB}from"@stacksjs/database";async function DT(Z,$){return await KB(async()=>{return await D8.transaction(Z,$)})}function OT(Z){return D8.transaction(async()=>{await Z()})}async function qT(Z){return await D8.savepoint(Z)}function ET(Z,$){return D8.transactional(Z,$)}import{path as p}from"@stacksjs/path";import{fs as L0,globSync as K9}from"@stacksjs/storage";import{plural as SZ,singular as NZ,snakeCase as j}from"@stacksjs/strings";import{isString as O8}from"@stacksjs/validation";async function xT(Z){if(typeof Z==="string")Z=(await import(Z)).default;return Z.table??j(SZ(Z?.name||""))}function y0(Z,$){if(Z.name)return Z.name;return p.basename($).replace(/\.ts$/,"")}function u(Z,$){if(Z.table)return Z.table;return j(SZ(y0(Z,$)))}function HB(Z,$){let J=[Z,$];return J.sort(),J.join("_")}function IT(Z,$){return $ in Z}async function wB(Z,$){let J=[];if(Z.hasOne)for(let Q of Z.hasOne)J.push(await U9(Q,Z,$,"hasOne"));if(Z.hasMany)for(let Q of Z.hasMany)J.push(await U9(Q,Z,$,"hasMany"));if(Z.belongsTo)for(let Q of Z.belongsTo)J.push(await U9(Q,Z,$,"belongsTo"));if(Z.hasOneThrough)for(let Q of Z.hasOneThrough)J.push(await IZ(Q,Z,$,"hasOneThrough"));if(Z.hasManyThrough)for(let Q of Z.hasManyThrough)J.push(await IZ(Q,Z,$,"hasManyThrough"));if(Z.belongsToMany)for(let Q of Z.belongsToMany)J.push(await DB(Q,Z,$,"belongsToMany"));if(Z.morphOne)J.push(await PZ(Z.morphOne,Z,$,"morphOne"));if(Z.morphMany){let Q=Array.isArray(Z.morphMany)?Z.morphMany:[Z.morphMany];for(let X of Q)J.push(await PZ(X,Z,$,"morphMany"))}if(Z.morphTo){let Q=Z.morphTo,X=Array.isArray(Q)?Q:typeof Q==="object"&&Q!==null?[Q]:[];for(let Y of X)J.push(TB(Y,Z,$))}if(Z.morphToMany){let Q=Array.isArray(Z.morphToMany)?Z.morphToMany:[Z.morphToMany];for(let X of Q)J.push(xZ(X,Z,$,"morphToMany"))}if(Z.morphedByMany){let Q=Array.isArray(Z.morphedByMany)?Z.morphedByMany:[Z.morphedByMany];for(let X of Q)J.push(xZ(X,Z,$,"morphedByMany"))}return J}function TB(Z,$,J){let Q=Z&&typeof Z==="object"&&Z.name?String(Z.name):`${j(J)}able`,X=Z?.type||`${Q}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:Z?.id||`${Q}_id`,modelKey:X,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function xZ(Z,$,J,Q){let X=typeof Z==="object"&&Z!==null,Y=X?String(Z.model||""):String(Z),G=X&&Z.morphName?String(Z.morphName):`${j(J)}able`,V=X&&Z.pivotTable?String(Z.pivotTable):G,U=X&&Z.id||`${G}_id`,W=X&&Z.type||`${G}_type`;return{relationship:Q,model:Y,table:"",relationTable:"",foreignKey:U,modelKey:W,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:U,pivotKey:W,pivotTable:V}}async function q8(Z,$){let J=L9(`${$}.ts`),Q=L9(`${Z}.ts`),X=z9(`${Z}.ts`),Y=z9(`${$}.ts`);if(!J&&!Y)throw Error(`Model not found: ${$}`);if(!Q&&!X)throw Error(`Model not found: ${Z}`);let G;try{if(L0.existsSync(J))G=(await import(J)).default;else G=(await import(Y)).default}catch(U){throw Error(`Failed to load model: ${$}. Error: ${U?.message||"Unknown error"}`)}let V=L0.existsSync(Q)?Q:X;return{modelRelation:G,modelPath:V,modelRelationPath:L0.existsSync(J)?J:Y}}async function IZ(Z,$,J,Q){let X="",Y="",G="",V="";if(O8(Z))X=Z;else X=Z.model,Y=Z.relationName||"",G=Z.through,V=Z.throughForeignKey||"";let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W),H=j(y0(U,B)),T=j(J);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:`${T}_id`,modelKey:`${H}_id`,relationName:Y,relationModel:J,throughModel:G,throughForeignKey:V,pivotForeign:`${T}_id`,pivotKey:`${H}_id`,pivotTable:L}}async function DB(Z,$,J,Q){let X="",Y="",G="",V=j(J);if(O8(Z))X=Z;else X=Z.model,Y=Z.pivotTable||"",G=Z.firstForeignKey||`${V}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W),H=j(y0(U,B));return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:typeof Z==="string"?`${V}_id`:Z.firstForeignKey||`${V}_id`,modelKey:typeof Z==="string"?`${H}_id`:Z.secondForeignKey||`${H}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${H}_id`,pivotTable:Y}}async function PZ(Z,$,J,Q){let X="",Y="",G="",V="";if(O8(Z))X=Z,Y=`${j(J)}able`;else X=Z.model,Y=Z.morphName||`${j(J)}able`,G=Z.type||`${Y}_type`,V=Z.id||`${Y}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u($,W);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:V||`${Y}_id`,modelKey:G||`${Y}_type`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:L}}async function U9(Z,$,J,Q){let X="",Y="";if(O8(Z))X=Z;else X=Z.model,Y=Z.relationName||"";let{modelRelation:G,modelPath:V,modelRelationPath:U}=await q8(J,X),W=u(G,U),B=u($,V),z=j(y0(G,U)),L=j(J),H={relationship:Q,model:X,table:W,relationTable:B,foreignKey:typeof Z==="string"?`${L}_id`:Z.foreignKey||`${L}_id`,modelKey:`${z}_id`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${L}_id`,pivotKey:`${z}_id`,pivotTable:B};if(Q==="belongsTo")H.foreignKey="";return H}function PT(Z){let $=/belongs/,J=/has/,Q=/Through/,X=/morph/;if(Q.test(Z))return"throughType";if($.test(Z))return"belongsType";if(J.test(Z))return"hasType";if(X.test(Z))return"morphType";return""}function ST(Z){let $=/One/;if(/Many/.test(Z))return"many";if($.test(Z))return"one";return""}async function RT(Z,$){let J=[];if("belongsToMany"in Z){let Q=Z.belongsToMany||[];for(let X of Q){let Y,G;if(typeof X==="string")G=X;else G=X.model;let V=L9(`${G}.ts`),U=z9(`${G}.ts`);if(L0.existsSync(V))Y=(await import(V)).default;else Y=(await import(U)).default;let W=u(Y,V),B=u(Z,$),z=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${NZ(B)}_${Z.primaryKey}`,L=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${NZ(W)}_${Z.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??HB(B,W),firstForeignKey:z,secondForeignKey:L})}return J}return[]}async function vT(Z){let $=K9([p.userModelsPath("*.ts"),p.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Q=0;Q<$.length;Q++){let X=$[Q],Y=await import(X);if(Z===Y.default.name)continue;let G=y0(Y,X),V=await wB(Y.default,G);if(!V.length)continue;let U=V.find((W)=>W.model===Z);if(U)J.push(U)}return J}function yT(Z){if(Z===void 0)return[];return Object.keys(Z).filter(($)=>{return Z[$]?.hidden===!0})}function jT(Z){let $=Z.attributes;if($===void 0)return[];return Object.keys($).filter((J)=>{return $[J]?.guarded===!0}).map((J)=>j(J))}function bT(Z,$){let J=Z.attributes,Q=[];if(J===void 0)return[];let X=typeof Z.traits?.billable==="object"||typeof Z.traits?.billable==="boolean",Y=typeof Z.traits?.useAuth==="object"?Z.traits?.useAuth.usePasskey:!1,G=Z.traits?.useUuid||!1;if(X)Q.push("stripe_id");if(G)Q.push("uuid");if(Y)Q.push(...["two_factor_secret","public_key"]);let V=$.map((U)=>U.foreignKey).filter((U)=>U);return[...Object.keys(J).filter((U)=>{if(J===void 0)return!1;return J[U]?.fillable===!0}).map((U)=>j(U)),...Q,...V]}async function fT(Z,$){let J=Z.attributes;if(!J)J={};let Q=Object.keys(J),X=[],Y=Bun.file($),G="";try{if(await Y.exists())G=await Y.text()}catch{G=""}let V=/rule:.*$/gm,U;U=V.exec(G);while(U!==null)X.push(U[0]),U=V.exec(G);return Q.map((B,z)=>{let L=J[B],H=null,T=!1,D=!1,q=!1,O=!1;if(L)H=L||null,T=L.unique||!1,D=L.hidden||!1,q=L.fillable||!1;let k=X[z]??"";return O=(L.validation?.rule).isRequired??!1,{field:B,default:H,unique:T,hidden:D,fillable:q,required:O,fieldArray:OB(k)}})}function OB(Z){let $=Z.split("rule: schema.");if($.length!==2)return null;if(!$[1])$[1]="";let J=$[1].replace(/,/g,"");if(!J)return null;let Q=J.split("."),X=/\(([^)]+)\)/;return Q.map((Y)=>{let G=X.exec(Y),V=G?G[1]:null;return{entity:Y.replace(X,"").replace(/\(|\)/g,""),charValue:V}})[0]||null}function MT(Z){let $=Z.fieldArray?.entity;switch($){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return $}}function z9(Z){let $=p.join(p.storagePath("framework/defaults/app/Models"),"/"),J=p.join($,Z);if(L0.existsSync(J))return J;return K9(`${$}**/${Z}`,{absolute:!0})[0]??""}function L9(Z){let $=p.join(p.userModelsPath("/"),"/"),J=p.join($,Z);if(L0.existsSync(J))return J;return K9(`${$}**/${Z}`,{absolute:!0})[0]??""}function _T(Z){let $=typeof Z==="number"?new Date(Z):typeof Z==="string"?new Date(Z):Z;if(Number.isNaN($.getTime()))throw Error(`Invalid date value: ${String(Z)}`);return $.toISOString().replace("T"," ").split(".")[0]??""}function gT(Z){return Z.toISOString().split("T")[0]??""}function hT(Z){return Z.getTime()}import{createModel as UH,registerModel as zH}from"@stacksjs/query-builder";import{log as h}from"@stacksjs/logging";import{snakeCase as $9}from"@stacksjs/strings";import{AsyncLocalStorage as LH}from"async_hooks";function qB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.total==="number"&&typeof $.last_page==="number"}function EB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&typeof $.current_page==="number"&&typeof $.per_page==="number"&&typeof $.has_more_pages==="boolean"&&!("total"in $)}function FB(Z){if(Z===null||typeof Z!=="object")return!1;let $=Z;return Array.isArray($.data)&&(typeof $.next_cursor==="string"||$.next_cursor===null)}function H9(Z){let{data:$}=Z,{perPage:J,page:Q,total:X,lastPage:Y}=Z.meta,G=$.length===0,V=G?null:(Q-1)*J+1,U=G?null:V+$.length-1;return{data:$,current_page:Q,per_page:J,total:X,last_page:Y,from:V,to:U,has_more_pages:Q<Y}}function w9(Z){return{data:Z.data,current_page:Z.meta.page,per_page:Z.meta.perPage,has_more_pages:Z.meta.hasMore}}function T9(Z){return{data:Z.data,per_page:Z.meta.perPage,next_cursor:RZ(Z.meta.nextCursor),prev_cursor:RZ(Z.meta.prevCursor),has_more_pages:Z.meta.nextCursor!==null&&Z.meta.nextCursor!==void 0}}function RZ(Z){if(Z===null||Z===void 0)return null;if(typeof Z==="string")return Z;return JSON.stringify(Z)}function O9(Z,$){let J=F9(),Q=J?D9(J,"per_page"):void 0,X=J?D9(J,"page"):void 0,Y=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,Q??15)),G=Math.max(1,Math.floor($??X??1));return{perPage:Y,page:G}}function q9(Z,$){let J=F9(),Q=J?yZ(J,"cursor"):void 0,X=J?D9(J,"per_page"):void 0,Y=Z!==void 0?Math.max(1,Math.floor(Z)):Math.min(100,Math.max(1,X??15)),V=vZ($!==void 0?$:Q??null);return{perPage:Y,cursor:V}}function vZ(Z){if(Z===null||Z===void 0)return null;if(Array.isArray(Z))return Z;if(typeof Z==="string"&&Z.startsWith("["))try{let $=JSON.parse(Z);if(Array.isArray($))return $}catch{}return Z}function E9(Z){let $=F9();if(!$)return Z;let J=(()=>{try{return new URL($.url)}catch{return null}})();if(!J)return Z;let Q=J.pathname;if(Z.path=Q,"next_cursor"in Z)return Z.next_page_url=Z.next_cursor!==null?Z0(J,{cursor:Z.next_cursor}):null,Z.prev_page_url=Z.prev_cursor!==null?Z0(J,{cursor:Z.prev_cursor}):null,Z;let X=Z.current_page;if(Z.prev_page_url=X>1?Z0(J,{page:X-1}):null,"total"in Z){let Y=Z.last_page;Z.next_page_url=X<Y?Z0(J,{page:X+1}):null,Z.first_page_url=Z0(J,{page:1}),Z.last_page_url=Z0(J,{page:Y})}else Z.next_page_url=Z.has_more_pages?Z0(J,{page:X+1}):null;return Z}function Z0(Z,$){let J=new URL(Z.toString());for(let[Q,X]of Object.entries($))J.searchParams.set(Q,String(X));return`${J.pathname}${J.search}`}var K0;function F9(){if(K0===null)return;if(K0===void 0)try{let $=C("@stacksjs/router");if(typeof $.getCurrentRequest==="function")K0=$.getCurrentRequest;else{K0=null;return}}catch{K0=null;return}return K0()}function D9(Z,$){let J=yZ(Z,$);if(J===void 0)return;let Q=Number(J);return Number.isFinite(Q)?Q:void 0}function yZ(Z,$){let J=Z.query?.[$];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as CB,sql as kB}from"@stacksjs/database";function C9(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/taggable] ${$} requires a positive numeric id (received ${String(Z)})`)}function jZ(Z){let $=CB;return{async tags(J){return C9(J,"tags"),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).selectAll().execute()},async tagCount(J){C9(J,"tagCount");let Q=await $.selectFrom("taggables").select(kB`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",Z).executeTakeFirst();return Number(Q?.count)||0},async addTag(J,Q){if(C9(J,"addTag"),!Q||typeof Q.name!=="string"||Q.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await $.insertInto("taggables").values({...Q,taggable_id:J,taggable_type:Z,slug:Q.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("name","=",Q.name).selectAll().executeTakeFirst()},async activeTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await $.selectFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Q){await $.deleteFrom("taggables").where("taggable_id","=",J).where("taggable_type","=",Z).where("id","=",Q).execute()}}}import{db as AB}from"@stacksjs/database";function bZ(Z){let $=AB;async function J(Q){return(await $.selectFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",Z).selectAll().execute()).map((Y)=>Y.category_id)}return{async categories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).selectAll().execute()},async categoryCount(Q){return(await J(Q)).length},async addCategory(Q,X){let Y=()=>$.selectFrom("categorizables").where("name","=",X.name).where("categorizable_type","=",Z).selectAll().executeTakeFirst(),G=await Y();if(!G)await $.insertInto("categorizables").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),categorizable_type:Z,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G=await Y();return await $.insertInto("categorizable_models").values({categorizable_id:Q,categorizable_type:Z,category_id:G.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).execute(),G},async activeCategories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Q){let X=await J(Q);if(X.length===0)return[];return await $.selectFrom("categorizables").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Q,X){await $.deleteFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",Z).where("category_id","=",X).execute()}}}import{db as NB,sql as xB}from"@stacksjs/database";function fZ(Z,$){if(typeof Z!=="number"||!Number.isFinite(Z)||Z<=0)throw Error(`[orm/commentable] ${$} requires a positive numeric id (received ${String(Z)})`)}function MZ(Z){let $=NB;return{async comments(J){return fZ(J,"comments"),await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).selectAll().execute()},async commentCount(J){let Q=await $.selectFrom("commentables").select(xB`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",Z).executeTakeFirst();return Number(Q?.count)||0},async addComment(J,Q){if(fZ(J,"addComment"),!Q||typeof Q.title!=="string"||Q.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Q.body!=="string"||Q.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");let X=await $.insertInto("commentables").values({...Q,commentables_id:J,commentables_type:Z,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();if(X&&typeof X==="object"&&"id"in X)return X;let Y=X?.lastInsertRowid;if(Y==null)return X;return await $.selectFrom("commentables").where("id","=",Number(Y)).selectAll().executeTakeFirst()},async approvedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await $.selectFrom("commentables").where("commentables_id","=",J).where("commentables_type","=",Z).where("status","=","rejected").selectAll().execute()}}}import{db as GH}from"@stacksjs/database";function k3(Z){let $=GH;return{async createStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Q)},async updateStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Q)},async deleteStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.deleteStripeUser(J)},async createOrGetStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Q)},async retrieveStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Q}=await import("@stacksjs/payments");return await Q.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Q)},async addPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Q)},async paymentMethods(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Q)},async newSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.create(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async updateSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.update(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async cancelSubscription(J,Q,X={}){let{manageSubscription:Y}=await import("@stacksjs/payments");return{subscription:await Y.cancel(Q,X)}},async activeSubscription(J){let{manageSubscription:Q}=await import("@stacksjs/payments"),X=await $.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Y=await Q.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Y}}return},async checkout(J,Q,X={}){let{manageCheckout:Y,manageCustomer:G}=await import("@stacksjs/payments"),V={};if(X.enableTax)V.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)V.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Q.map((z)=>({price:z.priceId,quantity:z.quantity||1}))},...V,...X};return await Y.create(J,B)},async createSetupIntent(J,Q={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Q)},async subscriptionHistory(J){let{manageInvoice:Q}=await import("@stacksjs/payments");return await Q.list(J)},async transactionHistory(J){let{manageTransaction:Q}=await import("@stacksjs/payments");return await Q.list(J)},async connectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=(J._attributes??J)[X];if(!Y)return null;let G=await W8();try{return await G.accounts.retrieve(Y)}catch{return null}},async createConnectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=J._attributes??J,G=Y[X],V=await W8();if(!G){let{stacksIdempotencyKey:U}=await import("@stacksjs/payments"),W=Q.modelTable||Z,B=await V.accounts.create({type:Q.type??"express",email:Q.email??Y.email,country:Q.country??"US",capabilities:Q.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:U("connect.account.create",W,Y.id)});return G=B.id,await $.updateTable(W).set({[X]:G}).where("id","=",Number(Y.id)).execute(),B}return await V.accounts.retrieve(G)},async connectOnboardLink(J,Q){let X=Q.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await W8()).accountLinks.create({account:G,refresh_url:Q.refreshUrl,return_url:Q.returnUrl,type:Q.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=Q.chargesColumn||"charges_enabled",G=Q.payoutsColumn||"payouts_enabled",V=J._attributes??J,U=V[X];if(!U)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await W8()).accounts.retrieve(U),z=!!B.charges_enabled,L=!!B.payouts_enabled,H=Q.modelTable||Z;return await $.updateTable(H).set({[Y]:z,[G]:L}).where("id","=",Number(V.id)).execute(),{chargesEnabled:z,payoutsEnabled:L}},async chargeWithSplit(J,Q){let X=await W8(),Y=Q.accountColumn||"stripe_account_id",G=J._attributes??J,V=Q.connectAccountId||G[Y],U={amount:Q.amountCents,currency:Q.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Q.metadata};if(V){if(U.transfer_data={destination:V},Q.platformFeeCents)U.application_fee_amount=Q.platformFeeCents}let{freshIdempotencyKey:W}=await import("@stacksjs/payments");return await X.paymentIntents.create(U,{idempotencyKey:W("payment_intent.create",G.id,Q.amountCents)})}}}async function W8(){let Z=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!Z)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => ZB(C3(),1))).default(Z,{apiVersion:"2026-03-25.dahlia"})}import{db as VH}from"@stacksjs/database";function A3(Z,$){let J=VH,Q=$?.table||`${Z}_likes`,X=$?.foreignKey||`${Z.replace(/s$/,"")}_id`;return{async likes(Y){return await J.selectFrom(Q).where(X,"=",Y).selectAll().execute()},async likeCount(Y){let G=await J.selectFrom(Q).select("count(*) as count").where(X,"=",Y).executeTakeFirst();return Number(G?.count)||0},async like(Y,G){if(typeof Y!=="number"||!Number.isFinite(Y)||Y<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Y)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let V=new Date().toISOString();try{return await J.insertInto(Q).values({[X]:Y,user_id:G,created_at:V,updated_at:V}).returningAll().executeTakeFirst()}catch(U){let W=U;if(!(W.code==="SQLITE_CONSTRAINT_UNIQUE"||W.code==="SQLITE_CONSTRAINT"||W.code==="23505"||W.errno===1062||/unique|duplicate/i.test(W.message??"")))throw U;let z=await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst();if(z)return z;throw U}},async unlike(Y,G){await J.deleteFrom(Q).where(X,"=",Y).where("user_id","=",G).execute()},async isLiked(Y,G){return!!await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Y){return(await J.selectFrom(Q).select([X]).where("user_id","=",Y).execute()).map((V)=>Number(V[X])).filter(Boolean)}}}function N3(){return{async generateTwoFactorForModel(Z){let{generateTwoFactorSecret:$}=await import("@stacksjs/auth"),J=$();await Z.update({two_factor_secret:J})},async verifyTwoFactorCode(Z,$){let J=Z.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Q,RateLimiter:X}=await import("@stacksjs/auth"),Y=String(Z.id??Z.get?.("id")??Z.get?.("email")??J),G=`2fa:${Y}`;if(await X.isRateLimited(G)){let{HttpError:U}=await import("@stacksjs/error-handling");throw new U(429,"Too many verification attempts. Please try again later.")}if(!await Q($,J))return await X.recordFailedAttempt(G),!1;try{let{cache:U}=await import("@stacksjs/cache"),W=`2fa:used:${Y}:${$}`;if(await U.has(W))return await X.recordFailedAttempt(G),!1;await U.set(W,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as x0}from"@stacksjs/logging";var e8="deleted_at";function x3(Z,$="id"){return{async softDelete(J){let Q=new Date().toISOString(),X=Z.where($,J);if(typeof X?.update==="function")return await X.update({[e8]:Q}),!0;return!1},async restore(J){let Q=Z.where($,J);if(typeof Q?.update==="function")return await Q.update({[e8]:null}),!0;return!1},async forceDelete(J){let Q=Z.where($,J);if(typeof Q?.delete==="function")return await Q.delete(),!0;return!1},withTrashed(){return typeof Z.query==="function"?Z.query():Z},onlyTrashed(){let J=typeof Z.query==="function"?Z.query():Z;if(typeof J?.whereNotNull==="function")return J.whereNotNull(e8);return J?.where?.(e8,"!=",null)??J}}}function I3(Z){if(Z===!0||Z==null)return{};if(typeof Z==="object"&&!Array.isArray(Z)){let $=Z;if(Array.isArray($.cascade)){let J=$.cascade.filter((Q)=>typeof Q==="string");return J.length?{cascade:J}:{}}return{}}return{}}function BH(Z,$){let J=Z.hasMany??[],Q=Z.hasOne??[],X=J.some((B)=>UZ(B,$,!0)),Y=Q.some((B)=>UZ(B,$,!1));if(!X&&!Y)return x0.warn(`[orm] soft-delete cascade: '${$}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let V=(X?J:Q).find((B)=>UZ(B,$,X))??null;if(!V)return null;let W=globalThis[V];if(!W)return x0.warn(`[orm] soft-delete cascade: model '${V}' is not yet on globalThis \u2014 skipping cascade for '${$}'`),null;return{className:V,model:W}}function UZ(Z,$,J){let Q=Z.toLowerCase();if($===Q)return!0;if(J&&$===`${Q}s`)return!0;if(J&&Q.endsWith("y")&&$===`${Q.slice(0,-1)}ies`)return!0;return!1}async function WH(Z,$,J,Q,X){try{let Y=J.where;if(typeof Y!=="function"){x0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let U=Y.call(J,Q,$),W=typeof U?.get==="function"?await U.get():Array.isArray(U)?U:[],B=J.primaryKey||"id";for(let z of W){let L=z?.[B];if(L!=null)await G.call(J,L)}return}let V=Y.call(J,Q,$);if(typeof V?.delete==="function"){x0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await V.delete();return}}else{let G=J.restore;if(typeof G!=="function"){x0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let V=J.withTrashed,W=(typeof V==="function"?V.call(J):J).where?.(Q,$),B=typeof W?.get==="function"?await W.get():[],z=J.primaryKey||"id";for(let L of B){let H=L?.[z];if(H!=null)await G.call(J,H)}}}catch(Y){if(x0.warn(`[orm] soft-delete cascade ${X} on ${Z}#${String($)} failed`,{error:Y}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Y}}async function U8(Z,$,J,Q){let X=$.cascade;if(!X||X.length===0)return;let Y=`${Z.name.toLowerCase()}_id`;for(let G of X){let V=BH(Z,G);if(!V)continue;await WH(V.className,J,V.model,Y,Q)}}var f3=new LH;function W0(){return f3.getStore()?.suppressed===!0}function B0(Z){return Promise.resolve(f3.run({suppressed:!0},Z))}var P3=new Set;function KH(Z,$){let J=typeof Z==="string"?Z.slice(0,80):String(Z),Q=`${typeof Z}:${J}`;if(P3.has(Q))return;P3.add(Q);let X=$ instanceof Error?$.message:String($);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var HH={string:{get:(Z)=>Z!=null?String(Z):null,set:(Z)=>Z!=null?String(Z):null},number:{get:(Z)=>Z!=null?Number(Z):null,set:(Z)=>Z!=null?Number(Z):null},integer:{get:(Z)=>Z!=null?Math.trunc(Number(Z)):null,set:(Z)=>Z!=null?Math.trunc(Number(Z)):null},float:{get:(Z)=>Z!=null?Number.parseFloat(String(Z)):null,set:(Z)=>Z!=null?Number.parseFloat(String(Z)):null},boolean:{get:(Z)=>Z===1||Z==="1"||Z===!0||Z==="true",set:(Z)=>Z===!0||Z===1||Z==="1"||Z==="true"?1:0},json:{get:(Z)=>{if(Z==null)return null;if(typeof Z==="string")try{return JSON.parse(Z)}catch($){return KH(Z,$),null}return Z},set:(Z)=>{if(Z==null)return null;return typeof Z==="string"?Z:JSON.stringify(Z)}},datetime:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString():Z},date:{get:(Z)=>Z?new Date(Z):null,set:(Z)=>Z instanceof Date?Z.toISOString().split("T")[0]:Z},array:{get:(Z)=>{if(Z==null)return[];if(Array.isArray(Z))return Z;if(typeof Z==="string")try{return JSON.parse(Z)}catch{return[]}return[]},set:(Z)=>{if(Z==null)return null;return Array.isArray(Z)?JSON.stringify(Z):Z}}};function M3(Z){return typeof Z==="string"?HH[Z]:Z}function S3(Z,$,J){if(!Z||typeof Z!=="object")return Z;let Q={...Z};for(let[X,Y]of Object.entries($))if(X in Q){let G=M3(Y);Q[X]=G[J](Q[X])}return Q}var Z9=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),R3=Symbol.for("stacks.modelInstanceProxy"),wH={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function TH(Z,$){if(!Z||!$)return null;let J=$.split("."),Q=Z;for(let X of J){if(Q==null||typeof Q!=="object")return null;let Y=Q;if("_attributes"in Y&&Y._attributes&&typeof Y._attributes==="object"){let G=Y._attributes;if(X in G){Q=G[X];continue}}if(X in Y){Q=Y[X];continue}return null}return Q??null}function m(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[R3])return Z;let J=Z._attributes;if(!J||typeof J!=="object")return Z;if($&&Object.keys($).length>0){for(let[Q,X]of Object.entries($))if(Object.prototype.hasOwnProperty.call(J,Q))J[Q]=M3(X).get(J[Q])}return new Proxy(Z,{get(Q,X,Y){if(X===R3)return!0;if(X==="saveAsync")return async function(){let V=Q._definition,U=V?.set;if(U&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes),H=L&&typeof L.then==="function"?await L:L;Q._attributes[B]=H}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="save")return function(){let V=Q._definition,U=V?.set;if(U&&Object.keys(U).length>0&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes);if(L&&typeof L.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Q._attributes[B]=L}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="updateAsync")return async function(V){if(V&&typeof V==="object"&&!Array.isArray(V))for(let[U,W]of Object.entries(V))Y[U]=W;return Y.saveAsync()};if(X==="saveQuietly")return function(){return B0(()=>Q.save())};if(X==="saveAsyncQuietly")return function(){return B0(()=>Y.saveAsync())};if(X==="updateQuietly")return function(V){return B0(()=>Q.update(V))};if(X==="updateAsyncQuietly")return function(V){return B0(()=>Y.updateAsync(V))};if(X==="deleteQuietly")return function(){return B0(()=>Q.delete())};if(X==="toSearchableObject")return function(){let W=Q._definition?.traits?.useSearch;if(!W)return null;let B=Q._attributes;if(!B)return null;if(W===!0){let D={...B};if(B.id!=null)D.id=String(B.id);return D}let z={},L=W.displayable?.length?W.displayable:[...W.searchable??[],...W.filterable??[],...W.sortable??[],"id"],H=W.denormalize??{},T=Q._relations;for(let D of L){let q=$9(D),O=B[q]??B[D];if(O!==void 0){z[q]=O;continue}let k=H[D]??H[q];if(k){z[q]=TH(T,k);continue}z[q]=void 0}if(B.id!=null)z.id=String(B.id);return z};if(typeof X==="string"&&!Z9.has(X)){let V=Q._attributes;if(V&&Object.prototype.hasOwnProperty.call(V,X))return V[X];let U=Q._relations;if(U&&Object.prototype.hasOwnProperty.call(U,X)){let B=U[X];if(Array.isArray(B))return B.map((z)=>m(z,$));return m(B,$)}let W=wH[X];if(W){let L=Q._definition?.__traitMethods?.[W.bag]?.[X];if(typeof L==="function")return W.mode==="model"?(...H)=>L(Y,...H):(...H)=>L(Q.id,...H)}}let G=Reflect.get(Q,X,Q);return typeof G==="function"?G.bind(Q):G},set(Q,X,Y,G){if(typeof X==="string"&&!Z9.has(X)){let{_attributes:V,set:U}=Q;if(V&&Object.prototype.hasOwnProperty.call(V,X)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}if(V&&!(X in Q)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}}return Reflect.set(Q,X,Y,G)},has(Q,X){if(typeof X==="string"&&!Z9.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return!0;let G=Q._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Q,X)},deleteProperty(Q,X){if(typeof X==="string"&&!Z9.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return delete Y[X],!0}return Reflect.deleteProperty(Q,X)},ownKeys(Q){let X=Q._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Q,X){if(typeof X==="string"){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return{configurable:!0,enumerable:!0,value:Y[X],writable:!0}}return Object.getOwnPropertyDescriptor(Q,X)}})}var DH=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),OH={paginate:H9,simplePaginate:w9,cursorPaginate:T9},v3=Symbol.for("stacks.queryBuilderProxy");function _3(Z,$){if(!Z||typeof Z!=="object")return Z;if(Z[v3])return Z;return new Proxy(Z,{get(J,Q,X){if(Q===v3)return!0;let Y=Reflect.get(J,Q,X);if(typeof Y!=="function")return Y;return function(...G){let V=G,U=String(Q);if(U==="paginate"||U==="simplePaginate"){let{perPage:z,page:L}=O9(G[0],G[1]);V=[z,L]}else if(U==="cursorPaginate"){let{perPage:z,cursor:L}=q9(G[0],G[1]);V=[z,L,G[2],G[3]]}let W=Y.apply(J,V),B=(z)=>{if(DH.has(U)){if(Array.isArray(z))return z.map((H)=>m(H,$));let L=OH[U];if(L&&z&&Array.isArray(z.data)){let H=z.data.map((D)=>m(D,$)),T=L({...z,data:H});return E9(T)}if(z&&Array.isArray(z.data))return{...z,data:z.data.map((H)=>m(H,$))};return m(z,$)}if(z&&typeof z==="object"&&typeof z.get==="function")return _3(z,$);return z};if(W&&typeof W.then==="function")return W.then(B);return B(W)}}})}function qH(Z,$){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Y of J){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,$)):m(B,$);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let Q=["create","firstOrCreate","updateOrCreate","make"];for(let Y of Q){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,$)):m(B,$);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Y of X){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=function(...V){let U=G.apply(this,V);return _3(U,$)}}}class g3 extends Error{model;id;constructor(Z,$){super($!=null?`[ORM] ${Z} not found for id=${String($)}`:`[ORM] No matching ${Z} row`);this.name="ModelNotFoundError",this.model=Z,this.id=$}}class LZ extends Error{model;attribute;reason;constructor(Z,$,J){let Q=J==="guarded"?`'${$}' is marked guarded`:`'${$}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${Z} forbidden: ${Q}. Use ${Z}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=Z,this.attribute=$,this.reason=J}}var EH=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function z8(Z,$,J={}){if(J.force)return $;if(!$||typeof $!=="object"||Array.isArray($))return $;let Q=Z.attributes;if(!Q)return $;let X=new Set,Y=new Set,G=new Set;for(let[U,W]of Object.entries(Q)){let B=$9(U);if(X.add(B),W?.fillable===!0)Y.add(B);if(W?.guarded===!0)G.add(B)}let V=Y.size>0?Y:X;for(let U of Object.keys($)){if(EH.has(U))continue;if(G.has(U))throw new LZ(Z.name,U,"guarded");if(U.endsWith("_id"))continue;if(!V.has(U))throw new LZ(Z.name,U,"not-fillable")}return $}async function KZ(Z,$){let J=Z.set;if(!J||typeof J!=="object")return $;let Q={...$};for(let[X,Y]of Object.entries(J)){if(typeof Y!=="function"||!(X in Q))continue;try{Q[X]=await Y(Q)}catch(G){h.error(`[orm] ${Z.name}.set.${X} threw \u2014 skipping setter`,G)}}return Q}function FH(Z,$){let J=$.primaryKey||"id",Q=Z.create;function X(W){let B=Z.where;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} needs a working where(): the underlying query builder did not expose one`);return B}function Y(W){let B=Z.find;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} needs a working find(): the underlying query builder did not expose one`);return B}function G(W){let B=Z.create;if(typeof B!=="function")throw Error(`[ORM] ${$.name}.${W} cannot create: the underlying query builder did not expose create()`);return B}if(typeof Z.update!=="function")Z.update=async function(W,B){if(W==null)throw Error(`[ORM] ${$.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){h.debug(`[orm] ${$.name}.update called with empty data \u2014 short-circuiting and returning current row`);let H=Z.find;return typeof H==="function"?await H.call(Z,W):null}z8($,B);let z=await KZ($,B);await X("update").call(Z,J,W).update(z);let L=Z.find;return typeof L==="function"?await L.call(Z,W):null};if(typeof Z.forceUpdate!=="function")Z.forceUpdate=async function(W,B){if(W==null)throw Error(`[ORM] ${$.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.forceUpdate requires a data object as the second argument`);let z=await KZ($,B);await X("forceUpdate").call(Z,J,W).update(z);let L=Z.find;return typeof L==="function"?await L.call(Z,W):null};if(typeof Z.forceCreate!=="function")Z.forceCreate=async function(W){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.forceCreate requires a data object`);if(typeof Q!=="function")throw Error(`[ORM] ${$.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Q.call(Z,W)};if(typeof Z.delete!=="function")Z.delete=async function(W){if(W==null)throw Error(`[ORM] ${$.name}.delete requires an id as the first argument`);if(!await Y("delete").call(Z,W))return!1;return await X("delete").call(Z,J,W).delete(),!0};if(typeof Z.findOrFail!=="function")Z.findOrFail=async function(W){let B=await Y("findOrFail").call(Z,W);if(B==null)throw new g3($.name,W);return B};if(typeof Z.exists!=="function")Z.exists=async function(W){if(W==null)return!1;let B=X("exists").call(Z,J,W);if(typeof B.count==="function"){let L=await B.count();return Number(L)>0}let z=Z.find;return typeof z==="function"?await z.call(Z,W)!=null:!1};if(typeof Z.firstOrCreate!=="function")Z.firstOrCreate=async function(W,B={}){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.firstOrCreate requires a where-attrs object`);let z=X("firstOrCreate").call(Z,W),L=typeof z.first==="function"?await z.first():await z;if(L)return L;let H={...W,...B};return z8($,H),await G("firstOrCreate").call(Z,H)};if(typeof Z.updateOrCreate!=="function")Z.updateOrCreate=async function(W,B){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${$.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${$.name}.updateOrCreate requires a values object`);let z=X("updateOrCreate").call(Z,W),L=typeof z.first==="function"?await z.first():await z;if(L){z8($,B);let T=L[J];await X("updateOrCreate").call(Z,J,T).update(B);let D=Z.find;return typeof D==="function"?await D.call(Z,T):{...L,...B}}let H={...W,...B};return z8($,H),await G("updateOrCreate").call(Z,H)};if(typeof Z.count!=="function")Z.count=async function(){let W=Z;if(typeof W.query==="function"){let L=W.query();if(typeof L?.count==="function"){let H=await L.count();return Number(H)||0}}let{all:B,get:z}=Z;if(typeof B==="function")return(await B.call(Z)||[]).length;if(typeof z==="function")return(await z.call(Z)||[]).length;return 0};if(typeof Z.pluck!=="function")Z.pluck=async function(W){if(!W||typeof W!=="string")throw Error(`[ORM] ${$.name}.pluck requires a column name`);let B=Z.all;return((typeof B==="function"?await B.call(Z):[])||[]).map((L)=>L?.[W])};if(typeof Z.whereIn!=="function")Z.whereIn=async function(W,B){if(!W||typeof W!=="string")throw Error(`[ORM] ${$.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${$.name}.whereIn requires an array of values`);if(B.length===0)return[];let z=Z.where;if(typeof z!=="function")return[];let L=z.call(Z,W,"in",B);if(L&&typeof L.get==="function")return await L.get();return await L};let V=[["latest","desc"],["oldest","asc"]];for(let[W,B]of V)if(typeof Z[W]!=="function")Z[W]=async function(z="created_at"){let L=Z,H=typeof L.query==="function"?L.query():L;if(typeof H?.orderBy==="function"){let O=H.orderBy(z,B);if(typeof O.first==="function")return await O.first();if(typeof O.get==="function")return(await O.get())?.[0]??null}let T=Z.all;if(typeof T!=="function")return null;return[...await T.call(Z)||[]].sort((O,k)=>{let N=O?.[z],R=k?.[z];if(N===R)return 0;return(N>R?1:-1)*(B==="desc"?-1:1)})[0]??null};let U=h3($.traits?.useSearch);if(U){let W=U.index??$.table??$9(`${$.name}s`);if(typeof Z.search!=="function")Z.search=function(B,z){return CH(Z,W,B,z)};if(typeof Z.makeAllSearchable!=="function")Z.makeAllSearchable=async function(B=500){let z=Z.all;if(typeof z!=="function")throw Error(`[ORM] ${$.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:L}=await import("@stacksjs/search-engine"),H=L(),T=0,D=Z.query;if(typeof D==="function")try{let k=D.call(Z);if(k&&typeof k.chunk==="function")return await k.chunk(B,async(N)=>{let R=N.map((M)=>y3(M,U)).filter(Boolean);if(R.length>0)await H.addDocuments(W,R);T+=R.length}),T}catch{}let O=(await z.call(Z)||[]).map((k)=>y3(k,U)).filter(Boolean);if(O.length>0)await H.addDocuments(W,O);return O.length};if(typeof Z.removeAllFromSearch!=="function")Z.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),z=B();if(typeof z.deleteAllDocuments==="function"){await z.deleteAllDocuments(W);return}let L=Z.all,H=typeof L==="function"?await L.call(Z)||[]:[],T=B();for(let D of H){let q=D?.id??D?._attributes?.id;if(q!=null)await T.deleteDocument(W,Number(q))}}}}function y3(Z,$){if(typeof $.shape==="function")try{return $.shape(Z)}catch{return}let J=Z?.toSearchableObject?.();if(J!==void 0)return J;return Z?._attributes??(typeof Z?.toJSON==="function"?Z.toJSON():null)}function CH(Z,$,J,Q){let X={q:J,...Q??{}},Y={with(G){return X={...X,...G},Y},where(G){return X={...X,filter:G},Y},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search($,X))?.hits??[]},async paginate(G,V=1){let{useSearchEngine:U}=await import("@stacksjs/search-engine"),B=await U().search($,{...X,limit:G,offset:(V-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:V,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search($,X)}};return Y}async function zZ(Z,$){if(!Z||typeof Z!=="object")return;let J=Z._attributes??Z;for(let Q of $){if(!(Q in J))continue;let X=J[Q];if(!S0(X))continue;J[Q]=await Y9(X)}}function kH(Z,$){if($.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let V of G)await zZ(V,$);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let V of G.data)await zZ(V,$);return G}if(G)await zZ(G,$);return G},Q=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Q){let V=Z[G];if(typeof V!=="function")continue;Z[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let V=Z[G];if(typeof V!=="function")continue;Z[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let Y=Z.update;if(typeof Y==="function")Z.update=async function(G,V){let U=await Y.call(this,G,V);return await J(U)}}function AH(Z,$){if($.length===0)return;let J=async(Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return Y;let G={...Y};for(let V of $)if(V in G)G[V]=await X9(G[V]);return G},Q=["create","firstOrCreate","updateOrCreate"];for(let Y of Q){let G=Z[Y];if(typeof G!=="function")continue;Z[Y]=async function(...V){if(V[0]=await J(V[0]),V[1])V[1]=await J(V[1]);return await G.apply(this,V)}}let X=Z.update;if(typeof X==="function")Z.update=async function(Y,G){let V=await J(G);return await X.call(this,Y,V)}}function NH(Z,$){let J=Z.create;if(typeof J==="function")Z.create=async function(Q,...X){z8($,Q);let Y=await KZ($,Q);return await J.call(this,Y,...X)};for(let Q of["firstOrCreate","updateOrCreate"]){let X=Z[Q];if(typeof X!=="function")continue}}function xH(Z,$){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Y=Z[X];if(typeof Y==="function")Z[X]=async function(...G){if(h.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String(Z.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=S3(G[0],$,"set");return await Y.apply(this,G)}}let Q=Z.update;if(typeof Q==="function")Z.update=async function(X,Y){let G=Y&&typeof Y==="object"&&!Array.isArray(Y)?S3(Y,$,"set"):Y;return await Q.call(this,X,G)}}function OF(Z){h.debug(`[orm] Defining model: ${Z.name} (table: ${Z.table})`);let $=IH(Z),J=SH(Z),Q=PH($,J),X=RH(Z);Z.__traitMethods=X;let Y=Q?{...Z,hooks:{...Z.hooks,...Q}}:Z,G=UH(Y);if(qH(G,Z.casts),FH(G,Y),NH(G,Y),Z.casts&&Object.keys(Z.casts).length>0)xH(G,Z.casts);let V=G9(Z);if(V.length>0)AH(G,V),kH(G,V);let U=Z.traits?.useSoftDeletes;if(U)vH(G,Y,U);let W=Z.traits?.useAudit;if(W){let z=CZ(W);kZ(G,Z.name,Z.primaryKey||"id",z)}G.withoutEvents=function(z){return B0(z)};for(let z of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let L=G[z];if(typeof L!=="function")continue;let H=`${z}Quietly`;if(typeof G[H]==="function")continue;G[H]=function(...T){return B0(()=>L.apply(G,T))}}let B=Object.assign(G,X,{...Z,getDefinition:()=>Z,_isStacksModel:!0});return zH(Z.name,B),B}function IH(Z){let $=Z.traits?.observe;if(!$)return;let J=Z.name.toLowerCase(),Q=(L)=>{let H=L?.attributes;if(!H||typeof H!=="object")return L;let T=Z.primaryKey||"id",D={...H};if(D[T]===void 0&&L[T]!==void 0)D[T]=L[T];return D},X=async(L,H)=>{if(W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(L,H)}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}},Y=Z.traits?.broadcastOn,G=Z.traits?.broadcastWith,V=typeof Y==="function"&&typeof G==="function",U=async(L,H)=>{if(!V)return;if(W0())return;try{let T=Y(H),D=Array.isArray(T)?T:[T],q=G(H),k=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof k!=="function")return;for(let N of D){if(typeof N!=="string"||N.length===0)continue;await k(N,L,q)}}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${L}' handler error:`,T),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw T}},W=async(L,H)=>{if(W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(L,H);if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}return!0},B=$===!0?["create","update","delete"]:Array.isArray($)?$:[],z={};if(B.includes("create"))z.beforeCreate=async(L)=>{if(h.debug(`[orm] Create ${J}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:creating`,L))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},z.afterCreate=async(L)=>{let H=Q(L);await X(`${J}:created`,H),await X(`${J}:saved`,H),await U(`${J}:created`,L)};if(B.includes("update"))z.beforeUpdate=async(L)=>{if(h.debug(`[orm] Update ${J}#${L?.id??"unknown"}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:updating`,L))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},z.afterUpdate=async(L)=>{let H=Q(L);await X(`${J}:updated`,H),await X(`${J}:saved`,H),await U(`${J}:updated`,L)};if(B.includes("delete"))z.beforeDelete=async(L)=>{if(h.debug(`[orm] Delete ${J}#${L?.id??"unknown"}`),!await W(`${J}:deleting`,L))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},z.afterDelete=async(L)=>{await X(`${J}:deleted`,Q(L)),await U(`${J}:deleted`,L)};return z}function PH(...Z){let $={},J=new Set;for(let Q of Z){if(!Q)continue;for(let X of Object.keys(Q))J.add(X)}for(let Q of J){let X=Z.map((Y)=>Y?.[Q]).filter((Y)=>typeof Y==="function");if(!X.length)continue;$[Q]=async(...Y)=>{for(let G of X)await G(...Y)}}return Object.keys($).length?$:void 0}function h3(Z){if(!Z)return null;if(Z===!0)return{};if(typeof Z==="object")return Z;return null}function SH(Z){let $=h3(Z.traits?.useSearch);if(!$)return;let J=$,Q=J.index??Z.table??$9(`${Z.name}s`);function X(V){if(typeof J.shape==="function")try{return J.shape(V)}catch(B){h.warn(`[orm/search] shape() threw for ${Z.name}: ${B.message}`);return}let W=m(V).toSearchableObject?.();if(W!==void 0)return W;return V?._attributes??(typeof V?.toJSON==="function"?V.toJSON():null)}let Y=async(V)=>{if(W0())return;let U=X(V);if(!U)return;if($.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"upsert",doc:U})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${Z.name}; falling back to inline: ${W.message}`),await j3(Q,U,Z.name)}return}await j3(Q,U,Z.name)};return{afterCreate:Y,afterUpdate:Y,afterDelete:async(V)=>{if(W0())return;let U=V?.id??V?._attributes?.id;if(U==null)return;if($.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"delete",id:Number(U)})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${Z.name}#${U}; falling back to inline: ${W.message}`),await b3(Q,Number(U),Z.name)}return}await b3(Q,Number(U),Z.name)}}}async function j3(Z,$,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().addDocument(Z,$)}catch(Q){h.warn(`[orm/search] Failed to index ${J}: ${Q.message}`)}}async function b3(Z,$,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().deleteDocument(Z,$)}catch(Q){h.warn(`[orm/search] Failed to remove ${J}#${$}: ${Q.message}`)}}function RH(Z){let $={},J=Z.table,Q=Z.traits;if(!Q)return $;if(Q.taggable)$._taggable=jZ(J);if(Q.categorizable)$._categorizable=bZ(J);if(Q.commentable)$._commentable=MZ(J);if(Q.billable)$._billable=k3(J);if(Q.likeable){let Y=typeof Q.likeable==="object"?Q.likeable:void 0;$._likeable=A3(J,Y)}let X=Q.useAuth||Q.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)$._twoFactor=N3();return $}function vH(Z,$,J){let Q=x3(Z,$.primaryKey||"id"),X=I3(J),Y=$,G=$.name.toLowerCase(),V=$.traits?.observe!=null&&$.traits?.observe!==!1,U=async(H)=>{if(!V||W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(`${G}:restoring`,{id:H});if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,T)}return!0},W=async(H)=>{if(!V||W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(`${G}:restored`,{id:H})}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,T)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",z=async(H)=>{if(!X.cascade?.length||!B){let D=await Q.softDelete(H);if(D&&X.cascade?.length)await U8(Y,X,H,"softDelete");return D}let{db:T}=await import("@stacksjs/database");return await T.transaction(async()=>{let D=await Q.softDelete(H);if(D)await U8(Y,X,H,"softDelete");return D})},L=async(H)=>{if(!await U(H))return!1;if(!X.cascade?.length||!B){let O=await Q.restore(H);if(O){if(X.cascade?.length)await U8(Y,X,H,"restore");await W(H)}return O}let{db:D}=await import("@stacksjs/database"),q=await D.transaction(async()=>{let O=await Q.restore(H);if(O)await U8(Y,X,H,"restore");return O});if(q)await W(H);return q};Z.softDelete=z,Z.restore=L,Z.forceDelete=Q.forceDelete,Z.withTrashed=Q.withTrashed,Z.onlyTrashed=Q.onlyTrashed,Z.delete=z}function yH(Z){if(Z==null)return Z;if(Array.isArray(Z))return Z.map(yH);if(typeof Z!=="object")return Z;if(typeof Z.toJSON==="function")return Z.toJSON();if(Z._attributes&&typeof Z._attributes==="object")return Z._attributes;return Z}import{log as jH}from"@stacksjs/logging";import{path as U0}from"@stacksjs/path";import{fs as L8}from"@stacksjs/storage";function z0(Z){return Z.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function bH(Z){let $=typeof Z.type==="string"?Z.type.toLowerCase():"",J=(()=>{switch($){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return Z.nullable===!0?`${J} | null`:J}function fH(Z){let $={},J=Z.belongsTo;if(!J)return $;let Q=Array.isArray(J)?J:Object.keys(J);for(let X of Q)$[`${z0(X)}_id`]="number";return $}function MH(Z,$){let[J,Q]=[z0(Z),z0($)].sort();return`${J}_${Q}`}function _H(Z,$){let J=$.belongsToMany;if(!J)return[];let Q=[],X=Array.isArray(J)?J:[];for(let Y of X){let G,V,U,W;if(typeof Y==="string")G=Y;else if(Y&&typeof Y==="object"&&"model"in Y){let H=Y;G=H.model,V=H.pivotTable,U=H.firstForeignKey,W=H.secondForeignKey}else continue;let B=V??MH(Z,G),z=U??`${z0(Z)}_id`,L=W??`${z0(G)}_id`;Q.push({table:B,columns:{id:"number",[z]:"number",[L]:"number",created_at:"string",updated_at:"string | null"}})}return Q}function gH(Z){let $={id:"number"},J=Z.traits??{};if(J.useUuid)$.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)$.created_at="string",$.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)$.deleted_at="string | null";return $}function hH(Z){let $={},J=Z.attributes??{};for(let[Q,X]of Object.entries(J))$[z0(Q)]=bH(X);return $}function m3(Z,$){let J=Object.entries($).map(([Q,X])=>` ${Q}: ${X}`).join(`
|
|
13
|
+
`);return` ${Z}: {
|
|
14
14
|
// columns
|
|
15
15
|
${J}
|
|
16
16
|
}`}var u3=`/* eslint-disable */
|
|
@@ -24,8 +24,8 @@ declare module '@stacksjs/database' {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export {}
|
|
27
|
-
`;async function
|
|
27
|
+
`;async function l3(Z,$){let J=[];if(!L8.existsSync(Z))return J;let Q=L8.readdirSync(Z,{withFileTypes:!0});for(let X of Q){let Y=U0.join(Z,X.name);if(X.isDirectory()){if($){let G=await l3(Y,!0);J.push(...G)}continue}if(!X.name.endsWith(".ts"))continue;if(X.name.startsWith("_")||X.name.startsWith("index"))continue;try{let G=await import(Y),V=G.default||G;if(V?.name&&(V.attributes||V.table))J.push({filePath:Y,model:V})}catch{}}return J}async function mH(Z={}){let $=Z.modelsDir??U0.userModelsPath(),J=Z.defaultsDir??U0.frameworkPath("defaults/app/Models"),Q=Z.outFile??U0.projectPath("database/types.d.ts"),X=[],Y=[];for(let[z,L]of[[$,!1],[J,!0]])try{let H=await l3(z,L);Y.push(...H)}catch(H){X.push({file:z,error:H.message})}let G=new Map;for(let z of Y)G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);for(let z of Y)if(z.filePath.startsWith($))G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);let V=[];for(let[z,{model:L}]of G){let H=L.table??`${z0(z)}s`,T={...gH(L),...hH(L),...fH(L)};V.push({table:H,model:z,columns:T})}let U=new Map;for(let[z,{model:L}]of G)for(let H of _H(z,L)){if(U.has(H.table))continue;U.set(H.table,{table:H.table,model:`(${H.table} pivot)`,columns:H.columns})}V.push(...U.values()),V.sort((z,L)=>z.table.localeCompare(L.table));let W=V.map((z)=>m3(z.table,z.columns)).join(`
|
|
28
28
|
`),B=`${u3}${W}
|
|
29
|
-
${c3}`;if(
|
|
30
|
-
`);return`${u3}${
|
|
31
|
-
${c3}`}import{configureOrm as cH}from"@stacksjs/query-builder";function
|
|
29
|
+
${c3}`;if(!Z.dryRun){let z=U0.dirname(Q);if(!L8.existsSync(z))L8.mkdirSync(z,{recursive:!0});L8.writeFileSync(Q,B,"utf-8"),jH.success(`[generate:db-types] wrote ${V.length} table(s) to ${Q}`)}return{outFile:Q,tables:V,errors:X,content:B}}function uH(Z){let $=[...Z].sort((J,Q)=>J.table.localeCompare(Q.table)).map((J)=>m3(J.table,J.columns)).join(`
|
|
30
|
+
`);return`${u3}${$}
|
|
31
|
+
${c3}`}import{configureOrm as cH}from"@stacksjs/query-builder";function lH(){try{let Z=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")cH({database:Z})}catch{}}lH();async function n3(Z){for(let $=0;;$++){let J=await import(Z);try{return J.default}catch(Q){if($<5&&Q instanceof ReferenceError&&/before initialization/.test(Q.message)){await new Promise((X)=>setTimeout(X,0));continue}throw Q}}}async function J9(Z,$=[""]){let{path:J}=await import("@stacksjs/path"),Q=J.userModelsPath(`${Z}.ts`);try{if(await Bun.file(Q).exists())return await n3(Q)}catch(X){console.error(`[orm] Failed to import userland model ${Z} from ${Q} \u2014 falling back to framework default. Reason:`,X)}for(let X of $){let Y=X?`${X}/`:"",G=J.frameworkPath(`defaults/app/Models/${Y}${Z}.ts`);try{if(await Bun.file(G).exists())return await n3(G)}catch(V){console.error(`[orm] Failed to import framework default model ${Z} from ${G} \u2014 trying next subdir. Reason:`,V)}}return null}var e={},p3=()=>{},xF=new Promise((Z)=>{p3=Z});function F(Z){return new Proxy(function(){},{get($,J){if(J==="then")return;let Q=e[Z];if(Q==null)return;let X=Q[J];return typeof X==="function"?X.bind(Q):X},set($,J,Q){let X=e[Z];if(X==null)return!1;return X[J]=Q,!0},has($,J){let Q=e[Z];return Q==null?!1:(J in Q)},apply($,J,Q){let X=e[Z];if(X==null||typeof X!=="function")return;return X.apply(J,Q)}})}var nH=F("User"),pH=F("Job"),dH=F("FailedJob"),iH=[["Team",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Activity",[""],"dashboard"],["Deployment",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["SocialPost",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Driver",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:Z}=await import("@stacksjs/config"),$=await J9("User");if($)e.User=$;if(Z("queue")){let J=await J9("Job");if(J)e.Job=J;let Q=await J9("FailedJob");if(Q)e.FailedJob=Q}for(let[J,Q,X]of iH){if(!Z(X))continue;let Y=await J9(J,Q);if(Y)e[J]=Y}}catch(Z){console.error("[orm] deferred model load failed:",Z)}finally{p3()}});var aH=F("Activity"),oH=F("Author"),sH=F("Campaign"),rH=F("Cart"),tH=F("CartItem"),eH=F("Category"),Zw=F("Comment"),$w=F("Coupon"),Jw=F("Customer"),Qw=F("DeliveryRoute"),Xw=F("Deployment"),Yw=F("DigitalDelivery"),Gw=F("Driver"),Vw=F("CampaignSend"),Bw=F("EmailList"),Ww=F("EmailListSubscriber"),Uw=F("Error"),zw=F("GiftCard"),Lw=F("LicenseKey"),Kw=F("Log"),Hw=F("LoyaltyPoint"),ww=F("LoyaltyReward"),Tw=F("Manufacturer"),Dw=F("Notification"),Ow=F("Order"),qw=F("OrderItem"),Ew=F("Page"),Fw=F("Payment"),Cw=F("PaymentMethod"),kw=F("PaymentProduct"),Aw=F("PaymentTransaction"),Nw=F("Post"),xw=F("PrintDevice"),Iw=F("Product"),Pw=F("ProductUnit"),Sw=F("ProductVariant"),Rw=F("Receipt"),vw=F("Release"),yw=F("Request"),jw=F("Review"),bw=F("ShippingMethod"),fw=F("ShippingRate"),Mw=F("ShippingZone"),_w=F("SocialPost"),gw=F("Subscriber"),hw=F("SubscriberEmail"),mw=F("Subscription"),uw=F("Tag"),cw=F("TaxRate"),lw=F("Team"),nw=F("Transaction"),pw=F("WaitlistProduct"),dw=F("WaitlistRestaurant"),iw=F("Websocket"),aw={User:nH,Job:pH,FailedJob:dH,Activity:aH,Author:oH,Campaign:sH,CampaignSend:Vw,Cart:rH,CartItem:tH,Category:eH,Comment:Zw,Coupon:$w,Customer:Jw,DeliveryRoute:Qw,Deployment:Xw,DigitalDelivery:Yw,Driver:Gw,EmailList:Bw,EmailListSubscriber:Ww,ErrorModel:Uw,GiftCard:zw,LicenseKey:Lw,Log:Kw,LoyaltyPoint:Hw,LoyaltyReward:ww,Manufacturer:Tw,Notification:Dw,Order:Ow,OrderItem:qw,Page:Ew,Payment:Fw,PaymentMethod:Cw,PaymentProduct:kw,PaymentTransaction:Aw,Post:Nw,PrintDevice:xw,Product:Iw,ProductUnit:Pw,ProductVariant:Sw,Receipt:Rw,Release:vw,Request:yw,Review:jw,ShippingMethod:bw,ShippingRate:fw,ShippingZone:Mw,SocialPost:_w,Subscriber:gw,SubscriberEmail:hw,Subscription:mw,Tag:uw,TaxRate:cw,Team:lw,Transaction:nw,WaitlistProduct:pw,WaitlistRestaurant:dw,Websocket:iw},I0=globalThis;for(let[Z,$]of Object.entries(aw))if($&&I0[Z]===void 0)I0[Z]=$;async function ow(Z){if(!Z)return[];try{if(typeof Z.all==="function"){let $=await Z.all();return Array.isArray($)?$:[]}if(typeof Z.get==="function"){let $=await Z.get();return Array.isArray($)?$:[]}}catch{}return[]}function sw(Z,$,J=""){if(!Z)return J;try{if(typeof Z.get==="function"){let X=Z.get($);if(X!==void 0&&X!==null)return X}}catch{}let Q=Z?.[$];return Q!==void 0&&Q!==null?Q:J}if(I0.safeAll===void 0)I0.safeAll=ow;if(I0.safeGet===void 0)I0.safeGet=sw;export{B0 as withoutEvents,ET as transactional,OT as transactionBuilder,DT as transaction,hT as toTimestamp,w9 as toSimplePaginator,H9 as toPaginator,T9 as toCursorPaginator,yH as toAttrs,BB as setAuditUser,qT as savepoint,O9 as resolvePageArgs,q9 as resolveCursorArgs,uH as renderDatabaseTypeFile,$B as prunable,vZ as parseCursor,xF as ormReady,xT as modelTableName,ZT as massPrunable,UB as mapWriteError,MT as mapEntity,AZ as isUniqueViolation,EB as isSimplePaginator,qB as isPaginator,S0 as isEncrypted,FB as isCursorPaginator,IT as hasRelations,u as getTableName,wB as getRelations,PT as getRelationType,ST as getRelationCount,$T as getPrunableConfig,RT as getPivotTables,HB as getPivotTableName,y0 as getModelName,yT as getHiddenAttributes,jT as getGuardedAttributes,bT as getFillableAttributes,_T as formatDate,L9 as findUserModel,z9 as findCoreModel,vT as fetchOtherModelRelations,fT as extractFields,gT as extractDate,E9 as enrichPaginatorUrls,X9 as encryptValue,OF as defineModel,Y9 as decryptValue,HT as db,FZ as createAuditMethods,G9 as collectEncryptedAttributes,mH as buildDatabaseSchema,UT as batchLoad,iw as Websocket,dw as WaitlistRestaurant,pw as WaitlistProduct,nH as User,nw as Transaction,lw as Team,cw as TaxRate,uw as Tag,mw as Subscription,hw as SubscriberEmail,gw as Subscriber,LB as SubqueryBuilder,_w as SocialPost,Mw as ShippingZone,fw as ShippingRate,bw as ShippingMethod,jw as Review,yw as Request,vw as Release,Rw as Receipt,Sw as ProductVariant,Pw as ProductUnit,Iw as Product,xw as PrintDevice,Nw as Post,Aw as PaymentTransaction,kw as PaymentProduct,Cw as PaymentMethod,Fw as Payment,Ew as Page,qw as OrderItem,Ow as Order,Dw as Notification,g3 as ModelNotFoundError,LZ as MassAssignmentException,Tw as Manufacturer,ww as LoyaltyReward,Hw as LoyaltyPoint,Kw as Log,Lw as LicenseKey,pH as Job,zw as GiftCard,dH as FailedJob,Uw as ErrorModel,Ww as EmailListSubscriber,Bw as EmailList,Gw as Driver,Yw as DigitalDelivery,Xw as Deployment,Qw as DeliveryRoute,Jw as Customer,$w as Coupon,Zw as Comment,eH as Category,tH as CartItem,rH as Cart,Vw as CampaignSend,sH as Campaign,oH as Author,aH as Activity};
|