@tinkerlandai/indiana-sdk 0.6.4 → 0.7.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +9 -4
  2. package/README.md +4 -4
  3. package/README.zh-CN.md +3 -3
  4. package/dist/{ai-usage-B4W5m4Ie.d.ts → ai-usage-BsrSG955.d.ts} +334 -518
  5. package/dist/chunk-3SONNXFG.js +1 -0
  6. package/dist/chunk-467Z5ISI.js +11 -0
  7. package/dist/{chunk-2EJSV6BA.js → chunk-4AWSZWZD.js} +1 -1
  8. package/dist/{chunk-5TEZEOHX.js → chunk-6MO6Y24B.js} +1 -1
  9. package/dist/chunk-HD74AAFS.js +1 -0
  10. package/dist/chunk-J4RHVU3W.js +1 -0
  11. package/dist/chunk-KQCTDXVD.js +17 -0
  12. package/dist/chunk-NOFNOHUI.js +1 -0
  13. package/dist/chunk-QO4YQLZ4.js +1 -0
  14. package/dist/chunk-RRII2DMC.js +1 -0
  15. package/dist/chunk-WCFVNF5D.js +1 -0
  16. package/dist/chunk-YAFMBXIE.js +4 -0
  17. package/dist/{client-OYRHOMUQ.js → client-F6UPJMHR.js} +1 -1
  18. package/dist/{configuration-sync-C2mytNwU.d.ts → configuration-sync-Bvd956GL.d.ts} +333 -25
  19. package/dist/controls-XG46TKUU.js +2 -0
  20. package/dist/funnel-runtime-host-26QI2W3S.js +1 -0
  21. package/dist/{funnel-runtime-start-sZ8ZCNlq.d.ts → funnel-runtime-start-ChVYbLzV.d.ts} +6655 -2785
  22. package/dist/iam.js +1 -1
  23. package/dist/index.d.ts +3634 -1485
  24. package/dist/index.js +1 -1
  25. package/dist/native-shell.js +1 -1
  26. package/dist/openrouter.d.ts +2 -3
  27. package/dist/openrouter.js +1 -1
  28. package/dist/page.d.ts +13 -13
  29. package/dist/page.js +1 -1
  30. package/dist/paywall-WKOHBYW7.js +1 -0
  31. package/dist/popup.d.ts +9 -16
  32. package/dist/popup.js +12 -12
  33. package/dist/react-native.d.ts +14 -14
  34. package/dist/react-native.js +1 -1
  35. package/dist/server.d.ts +4 -4
  36. package/dist/server.js +1 -1
  37. package/dist/src-UHLPVD6E.js +1 -0
  38. package/dist/visual.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/chunk-63BWE27V.js +0 -1
  41. package/dist/chunk-CB63JLGT.js +0 -1
  42. package/dist/chunk-D7YHFS6B.js +0 -4
  43. package/dist/chunk-HTRQPMJO.js +0 -11
  44. package/dist/chunk-ISUXYPYL.js +0 -1
  45. package/dist/chunk-QG3WUJG5.js +0 -1
  46. package/dist/chunk-RMJJOSVZ.js +0 -1
  47. package/dist/chunk-S2MSIA57.js +0 -17
  48. package/dist/chunk-VVSQKVE7.js +0 -1
  49. package/dist/funnel-runtime-host-NWS3URFA.js +0 -1
  50. package/dist/paywall-4XZ6NDMY.js +0 -1
  51. package/dist/src-WV6GZYWA.js +0 -1
  52. package/dist/{customer-page-B4FGCVpt.d.ts → customer-page-B4LkIr5q.d.ts} +4 -4
  53. package/dist/{screen-16d-xADb.d.ts → screen-iFngkxaL.d.ts} +185 -185
@@ -32,11 +32,11 @@ declare const usageResponseSchema: z.ZodObject<{
32
32
  id: z.ZodUUID;
33
33
  internal_feature_id: z.ZodUUID;
34
34
  kind: z.ZodEnum<{
35
- release: "release";
36
- confirm: "confirm";
37
35
  consume: "consume";
38
36
  reserve: "reserve";
37
+ confirm: "confirm";
39
38
  refund: "refund";
39
+ release: "release";
40
40
  expire: "expire";
41
41
  }>;
42
42
  originalId: z.ZodNullable<z.ZodUUID>;
@@ -59,8 +59,8 @@ declare const usageResponseSchema: z.ZodObject<{
59
59
  }>>;
60
60
  createdAt: z.ZodISODateTime;
61
61
  reservationStatus: z.ZodNullable<z.ZodEnum<{
62
- pending: "pending";
63
62
  expired: "expired";
63
+ pending: "pending";
64
64
  confirmed: "confirmed";
65
65
  released: "released";
66
66
  }>>;
@@ -182,8 +182,8 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
182
182
  key: string;
183
183
  name: string;
184
184
  groupId: string | null;
185
- membershipType: "addon" | "main";
186
- status: "unknown" | "active" | "pending" | "trialing" | "expired" | "scheduled" | "trial" | "past_due" | "ended" | "paused";
185
+ membershipType: "main" | "addon";
186
+ status: "active" | "scheduled" | "expired" | "past_due" | "unknown" | "pending" | "trial" | "paused" | "ended" | "trialing";
187
187
  cancelAtPeriodEnd: boolean;
188
188
  accessEnabled: boolean;
189
189
  renewalChange: {
@@ -193,13 +193,13 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
193
193
  effectiveAt: string;
194
194
  benefitsAppliedAt: string | null;
195
195
  timing: "immediate" | "renewal";
196
- changeKind: "quantity" | "seats" | "plan";
196
+ changeKind: "quantity" | "plan" | "seats";
197
197
  seat: {
198
198
  key: string;
199
199
  fromQuantity: number;
200
200
  toQuantity: number;
201
201
  } | null;
202
- status: "pending" | "prepared" | "confirmed" | "scheduled" | "quoted";
202
+ status: "scheduled" | "pending" | "prepared" | "confirmed" | "quoted";
203
203
  feature?: {
204
204
  internal_feature_id: string;
205
205
  name: string;
@@ -208,7 +208,7 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
208
208
  } | undefined;
209
209
  } | null;
210
210
  period: {
211
- phase: "paid" | "trial";
211
+ phase: "trial" | "paid";
212
212
  startsAt: string;
213
213
  endsAt: string | null;
214
214
  } | null;
@@ -236,7 +236,7 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
236
236
  internal_feature_id: string;
237
237
  key: string;
238
238
  name: string;
239
- kind: "access" | "metered" | "credit";
239
+ kind: "metered" | "access" | "credit";
240
240
  }[];
241
241
  balancesLimited: boolean;
242
242
  };
@@ -250,17 +250,17 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
250
250
  check: {
251
251
  internal_feature_id: string;
252
252
  name: string;
253
- kind: "access" | "metered" | "credit";
253
+ kind: "metered" | "access" | "credit";
254
254
  quantity: string;
255
255
  allowed: boolean;
256
256
  reason: "unavailable" | "insufficient_balance" | "limit_exceeded" | "awaiting_topup" | "authorization_required" | "payment_blocked" | "cash_budget_exceeded" | "not_entitled" | "capacity_exceeded" | "authentication_required" | null;
257
257
  preview: {
258
- scenario: "feature_flag" | "usage_limit";
258
+ scenario: "usage_limit" | "feature_flag";
259
259
  candidates: {
260
260
  productId: string;
261
261
  productVersionId: string;
262
262
  name: string;
263
- action: "purchase" | "upgrade" | "addon" | "topup";
263
+ action: "upgrade" | "purchase" | "addon" | "topup";
264
264
  membershipId: string | null;
265
265
  currency: "USD" | "EUR" | "CNY" | "GBP" | "JPY" | "CAD" | "AUD" | "NZD" | "CHF" | "HKD" | "SGD" | "KRW" | "INR" | "BRL" | "MXN" | "TWD" | "THB" | "IDR" | "MYR" | "PHP" | "VND" | "ZAR" | "AED" | "SAR" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "ILS" | "TRY" | "RON";
266
266
  amountMinor: string;
@@ -279,13 +279,13 @@ declare function createIndianaReactNative(options: IndianaReactNativeOptions): {
279
279
  receipts: {
280
280
  id: string;
281
281
  internal_feature_id: string;
282
- kind: "release" | "confirm" | "consume" | "reserve" | "refund" | "expire";
282
+ kind: "consume" | "reserve" | "confirm" | "refund" | "release" | "expire";
283
283
  originalId: string | null;
284
284
  quantity: string;
285
285
  accepted: boolean;
286
286
  reason: "expired" | "unavailable" | "insufficient_balance" | "limit_exceeded" | "awaiting_topup" | "authorization_required" | "payment_blocked" | "cash_budget_exceeded" | null;
287
287
  createdAt: string;
288
- reservationStatus: "pending" | "expired" | "confirmed" | "released" | null;
288
+ reservationStatus: "expired" | "pending" | "confirmed" | "released" | null;
289
289
  expiresAt: string | null;
290
290
  allocations: ({
291
291
  funding: "prepaid";
@@ -1 +1 @@
1
- import{a as mA}from"./chunk-QG3WUJG5.js";import{Vf as $}from"./chunk-HTRQPMJO.js";import"./chunk-S5TVMQRC.js";import{b as gA}from"./chunk-ISUXYPYL.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import{a as R}from"./chunk-5TEZEOHX.js";import"./chunk-RMJJOSVZ.js";import"./chunk-S2MSIA57.js";function P(A){return typeof A=="string"?A:String(A)}var MA=/[\ud800-\udbff](?![\udc00-\udfff])|(^|[^\ud800-\udbff])[\udc00-\udfff]/g;function OA(A){return A.replace(MA,"$1\uFFFD")}function AA(A,e){if(typeof A!="object"||A==null){let t="";throw t+="The provided value is not an object",new TypeError(t)}return A}function IA(A){if(A!=null&&(typeof A=="object"||typeof A=="function")){let e=A[Symbol.iterator];if(e==null)return;if(typeof e!="function")throw new TypeError("The provided value is not iterable");let t=e.call(A);if(!t||typeof t!="object")throw new TypeError("Result of the Symbol.iterator method is not an object");return t}}function wA(A){let e;if(Array.isArray(A)){let t=A.map(P);if(t.length===2)return t}else if((e=IA(A))!=null){let t=AA(e.next()),r=AA(e.next());if(!t.done&&!r.done)return[P(t.value),P(r.value)]}throw new TypeError("Each query pair must be an iterable [name, value] tuple")}var PA="0123456789ABCDEF",jA=/(?:%[0-9A-Fa-f]{2})+/g;function B(A){return`%${PA[A>>4&15]}${PA[15&A]}`}function vA(A,e,t=!1){return A>=55296&&A<=57343&&(A=65533),A<=127?t&&A===32?"+":e(A)?B(A):String.fromCharCode(A):A<=2047?B(192|A>>6)+B(128|63&A):A<=65535?B(224|A>>12)+B(128|A>>6&63)+B(128|63&A):B(240|A>>18)+B(128|A>>12&63)+B(128|A>>6&63)+B(128|63&A)}function eA(A){return A>=48&&A<=57?A-48:A>=65&&A<=70?A-65+10:A>=97&&A<=102?A-97+10:-1}function tA(A,e=!1){let t=0;for(;t<A.length;t++){let r=A.charCodeAt(t);if(r===37||e&&r===43)break}return t===A.length?A:(e?A.replace(/\+/g," "):A).replace(jA,r=>{try{return decodeURIComponent(r)}catch{return"\uFFFD".repeat(r.length/3)}})}function O(A){return A<=31||A>126}function QA(A){switch(A){case 32:case 34:case 60:case 62:case 96:return!0;default:return O(A)}}function uA(A){switch(A){case 32:case 34:case 35:case 60:case 62:return!0;default:return O(A)}}function FA(A){return uA(A)||A===39}function rA(A){switch(A){case 63:case 94:case 96:case 123:case 125:return!0;default:return uA(A)}}function G(A){switch(A){case 47:case 58:case 59:case 61:case 64:case 91:case 92:case 93:case 124:return!0;default:return rA(A)}}function yA(A){switch(A){case 33:case 39:case 40:case 41:case 126:return!0;default:return(function(t){switch(t){case 36:case 37:case 38:case 43:case 44:return!0;default:return G(t)}})(A)}}function qA(A,e){return vA(A=A||0,e)}function k(A,e,t=!1){let r=0;for(;r<A.length;r++){let u=A.charCodeAt(r);if(u>=128||t&&u===32||e(u))break}if(r===A.length)return A;let n=A.slice(0,r);for(;r<A.length;r++){let u=A.charCodeAt(r),o=u;if(u>=55296&&u<=56319&&r+1<A.length){let a=A.charCodeAt(r+1);a>=56320&&a<=57343&&(o=(u-55296<<10)+a-56320+65536,r++)}n+=vA(o,e,t)}return n}function cA(A){let e=[],t=0,r=0;for(;r<=A.length;){if(r=A.indexOf("&",t),r<0&&(r=A.length),r!==t){let n=A.slice(t,r),u=n.indexOf("=");u<0&&(u=n.length),e.push([tA(n.slice(0,u),!0),tA(n.slice(u+1),!0)])}if(t=r+1,r===A.length)break}return e}function nA(A){let e="";for(let t=0;t<A.length;t++){let r=k(A[t][0],yA,!0),n=k(A[t][1],yA,!0);e+=t!==0?`&${r}=${n}`:`${r}=${n}`}return e}var _A=[2191,2191,3164,3164,3292,3292,6863,6877,6880,6891,8385,8385,11158,11158,42958,42959,42962,42962,42964,42964,42993,42993,64451,64466,64912,64913,64968,64974,67904,67929,69317,69319,69328,69336,69370,69371,72544,72551,73136,73179,73184,73193,93856,93880,93883,93907,94194,94198,100344,100351,101641,101662,101760,101874,118010,118012,118458,118480,118496,118512,124608,124638,124640,124661,124670,124671,128728,128728,128887,128890,129232,129240,129620,129623,129674,129674,129678,129678,129736,129736,129741,129741,129770,129770,129775,129775,130042,130042,177978,177983,183970,183981,205744,210041],YA=[7296,7297,7298,7299,7300,7301,7302,7303,7304,42958,42962,42964,42993],GA=["\u0432","\u0434","\u043E","\u0441","\u0442","\u0442","\u044A","\u0463","\uA64B","\uA7CF","\uA7D3","\uA7D5","s"],JA=[2381,2381,2509,2509,2637,2637,2765,2765,2893,2893,3021,3021,3149,3149,3277,3277,3387,3388,3405,3405,3530,3530,3642,3642,3770,3770,3972,3972,4153,4154,5908,5909,5940,5940,6098,6098,6752,6752,6980,6980,7082,7083,7154,7155,11647,11647,43014,43014,43052,43052,43204,43204,43347,43347,43456,43456,43766,43766,44013,44013,68159,68159,69702,69702,69744,69744,69759,69759,69817,69817,69939,69940,70080,70080,70197,70197,70378,70378,70477,70477,70606,70608,70722,70722,70850,70850,71103,71103,71231,71231,71350,71350,71467,71467,71737,71737,71997,71998,72160,72160,72244,72244,72263,72263,72345,72345,72767,72767,73028,73029,73111,73111,73537,73538,90415,90415];function WA(A){for(let e=0;e<A.length;e++){let t=A.codePointAt(e);if(t>65535&&e++,t<=32||t===37||t===127||t>=55296&&t<=57343||t>=128&&t<=159||t>=64976&&t<=65007||!(65534&~t)||t===65533)return!0}return!1}var[VA,XA,KA,DA]=[[[],"0,6,7,8,m,w,10,1b,1d,1f,72,73,7k,8k,dt,2rk","AAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAA/AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAADAAABwfwAAAAAAAMADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhAAAAQAAAAAAAAQCAAABAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgACAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAP///////////////wAAAAAAAAAAAAAAAAAAAAA="],[[],"6,7,8,o,4o,7e,7f,7h,7i,7j,dl","AAAAAEF9+P/+BwAAAMAA//8AAPz/////BlADAAAAAJwAAPz///8AAADA//H/5+X8AAAAAAAAAAAA/P///wcAAAAAAAAAAAAAPv0vAD0BAABA/gAA/5/5/f8BAAAAAAAAgAAAAP//////////////AYD/////BQAAAAAAAAAAAAAAAAAAAAAAAP///////wcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8g+N8B+AAAAAAAAAAAAAAAAAAAAAAAAP//AwAAYAAAAAAAAAAAAAD/////CwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAA//8fAB4AAAD//wMAAAAAAH3/HgwAAAAAAAD//////////w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="],[[],"6,7,8,o,4o,7e,7f,7h,7i,7j,dl","AAAAAP3////+BwAAAMDu//////////////8vAADAAJwAAP3///8AAADg////////AAAAAAAAAAAA/P///wcAAAAAAAAAAAAA////Ab0H//9H/gAA/9////8BAAAAAAAAgAAAAP//////////////AYD/////BQAAAAAAAAAAAAAAAAAAAAAAAP///////wcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL/G//8T+AAAAAAAAAAAAAAAAAAAAAAAAP//AwAAfgAAAAAAAAAAAAD+////DwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANwAAAAAAAAAAAAAAAAA//8fAB4AAAD//wMAAAAAAH3/Hg4AAAAAAAD//////////w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="],[[],"0,3,4,5,6,7,8,9,a,b,c,d,e,f,g,j,n,o,p,q,r,s,t,w,18,19,1c,4m,4o,4p,4q,4r,6z,72,73,75,76,77,7e,7h,7i,7j,7k,7l,7m,7n,7o,7p,7q,7r,7s,7t,7u,7v,7w,7x,7y,7z,8k,9t,a2,a3,a7,cc,cv,cx,cy,d6,dc,dd,de,dg,dh,di,dk,dl,2rk,2rl","AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAD//////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v////+/tgAAAAAAAAAAAP8XAAAAAAD4//8AAAEAAAAAAAAAAAAAAMCfnz0AAACAAgAAAP///wcAAAAAAAAAAAAAwP8BAAAAAAAA+A8gAADA++8+AAAAAAAOAAAAAAAAgP8AAAAAAPz///v///8HAAAAAAAAFP4h/gAMAAAAAgAAAAAAABAeIAAADAAAQAYAAAAAAAAQhjkCAAAAIwAGAAAAAAAAEL4hAAAMAAD8AgAAAAAAAJAeIGAADAAAAAQAAAAAAAAAASAAAAAAAAARAAAAAAAA0ME9YAAMAAAAAgAAAAAAAJBAMAAADAAAAAMAAAAAAAAYHiAAAAwAAAACAAAAAAAAAAAEXAAAAAAAAAAAAAAA8geAfwAAAAAAAAAAAAAAAPIfAH8AAAAAAAAAAAADAACgAgAAAAAAAP5/3+D//v///x9AAAAAAAAAAAAAAAAA4P1mAAAAwwEAHgBkIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAMAAAADAAAAAwAAAAAAAAAsD9A/g8gAAAAAAC4AAAAAAAAAAAAAAAAAABgAAAAAAIAAAAAAAAAAAAAAAAAAIcBBA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAJAAAAAAAAQH/lH/ifAAAAAAAA//////8//w8AAA8AAAAAANAXBAAAAAD4DwADAAAAPDsAAAAAAABAowMAAAAAAADwzwAAAAAAAAAAAAAAAAAAAAAAAAD3//0hEAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wDIAAAAfAAAAAAAAB/8AAAAAAAAAAAAAAAA/////wEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAwAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA/////wAAAAAAPAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAID3PwAAAMAAAAAAAAAAAAAAAwBECAAAYBAAAAAAAAAAAAAAAAAAAAAAAAAwAAAA//8DgAAAAADAPwAAgP8DAAAAAAAHAAAAAADIMwAAAAAgAAAAAAAAAAB+ZgAIEAAAAAAAEAAAAAAAAJ3BAgAAAAAwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICEAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAMAHAAAAAAAAAAAAAAAAAAAAAG7wAAAAAACHAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAPAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAA/AAAAAAAAAAAwP8BAAAAAAA8AAAAAAAAAAAAAAAAAAAAAgAAAAAAAP9/AAAAAAAZgAMAAAAAAHgGBAAAAAAAAAAHAAAAgO8fAAAAAAAAAAgAAwAAAAAAwH8AngAAAAAAAAAAAAAAgNNAAgAAAAAAAAAAAAAAAAAAAAAAAID4BwAAAwAAAAAAABgBAAAAwB8fAAAAAAAAAAD4AUAFAAYAAAAAAAAAAAAA/1wAAEAAAAAAAAAAAAAA+IUNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8sAEAADAAAAAAAAAAAAAA+KcBAAAAAAAAAAAAAAAAKL8AAAAAAAAAAAAAAACgvA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgP8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgIAAAAAAAAAAAAAAAAAAAAAADwDAEAAAD+BwAAAAD4eYAAfg4AAAAAAPx/AwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf78AAAAAAAAAAAAA/P///G0AAAAAAAAAAAAAAAAAAAB+tL8AAAAAAAAAAACjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAwAAAAAAwAcFAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//4H/PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMD/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAAAAAAAB/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAcAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAPAAAAAAAAAAAAAAD//////z///38AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAD+P/nDwAAADwAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////9/+P//////HyAAEAAA+P7/AAAAAAAAAAAAAH////nbBwAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASMAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfwAAAAAAAAAAAAAAAADwDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAA////////////////AAAAAAAAAAAAAAAAAAAAAP///////////////////////////////////////wAA"]].map(function([e,t,r]){return[e,t.split(",").map(n=>parseInt(n,36)),Uint8Array.from(atob(r),n=>n.charCodeAt(0))]});function ZA(A,e){return e===931||e===1010||e===120531||e===120589||e===120647||e===120705||e===120763?"\u03C3":e>=5112&&e<=5117?String.fromCodePoint(e-8):e>=43888&&e<=43967?String.fromCodePoint(e-38864):e>=93856&&e<=93880?String.fromCodePoint(e+27):e===837||e===890||e>=8064&&e<=8111||e>=8114&&e<=8188?A.normalize("NFD").replace(/\u0345/g,"\u03B9").normalize("NFC").toLowerCase():""}function BA(A,e){for(let t=0;t<A.length;t+=2)if(e>=A[t]&&e<=A[t+1])return!0;return!1}function x(A,e){let[t,r,n]=A,u=e>>8;for(let h=0;h<t.length;h+=2)if(u>=t[h]&&u<=t[h+1])return!0;let o=r.indexOf(u);if(o<0)return!1;let a=255&e;return!!(n[32*o+(a>>3)]&1<<(7&a))}function Ae(A){let e=Array.from(A,t=>t.codePointAt(0));for(let t=0;t<e.length;t++){let r=e[t];if(r!==8204&&r!==8205||t>0&&BA(JA,e[t-1]))continue;if(r===8205)return!1;let n=t-1;for(;n>=0&&x(DA,e[n]);)n--;let u=t+1;for(;u<e.length&&x(DA,e[u]);)u++;if(!(n>=0&&u<e.length&&x(XA,e[n])&&x(KA,e[u])))return!1}return!0}var ee=/(?![\p{Mark}\p{Decimal_Number}])[\p{Script=Arabic}\p{Script=Hebrew}]/u,te=/\p{Script=Latin}/u;function re(A){return!ee.test(A)||!te.test(A)}var z=36,F=1,sA=26,ne=38,se=700,ie=72,le=128,oe=2147483647;function CA(A){return String.fromCharCode(A+22+75*+(A<26))}function ue(A,e,t){let r=0;for(A=t?Math.floor(A/se):A>>1,A+=Math.floor(A/e);A>(z-F)*sA>>1;r+=z)A=Math.floor(A/(z-F));return Math.floor(r+(z-F+1)*A/(A+ne))}function ce(A){let e=Array.from(A,h=>h.codePointAt(0)),t="",r=0;for(let h=0;h<e.length;h++){let p=e[h];p<128&&(t+=String.fromCharCode(p),r++)}let n=r;n&&(t+="-");let u=le,o=0,a=ie;for(;r<e.length;){let h=oe;for(let p=0;p<e.length;p++){let g=e[p];g>=u&&g<h&&(h=g)}o+=(h-u)*(r+1),u=h;for(let p=0;p<e.length;p++){let g=e[p];if(g<u&&o++,g===u){let D=o;for(let S=z;;S+=z){let E=S<=a?F:S>=a+sA?sA:S-a;if(D<E)break;t+=CA(E+(D-E)%(z-E)),D=Math.floor((D-E)/(z-E))}t+=CA(D),a=ue(o,r+1,r===n),o=0,r++}}o++,u++}return t}function X(A){let e=10;if(A.length>=2&&A[0]==="0"&&(A[1]==="x"||A[1]==="X"))A=A.slice(2),e=16;else if(A.length>=2&&A[0]==="0")A=A.slice(1),e=8;else if(A==="")return-1;let t=0;for(let r=0;r<A.length;r++){let n=eA(A.charCodeAt(r));if(n>=e||n<0)return-1;t=t*e+n}return t}function bA(A){switch(A){case".":case"%2e":case"%2E":return!0;default:return!1}}function kA(A,e){return(A>=65&&A<=90||A>=97&&A<=122)&&(e===58||e===124)}function UA(A){return A.length===2&&kA(A.codePointAt(0),A.codePointAt(1))}function SA(A){return A.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}function C(A){switch(A){case"ftp":case"http":case"https":case"ws":case"wss":case"file":return!0;default:return!1}}function RA(A){switch(A){case"ftp":return 21;case"http":case"ws":return 80;case"https":case"wss":return 443;default:return null}}function iA(A,e){if(A[0]==="[")return A[A.length-1]==="]"?(function(r){let n=[0,0,0,0,0,0,0,0],u=null,o=0,a=0,h=Array.from(r,p=>p.codePointAt(0));if(h[a]===58){if(h[a+1]!==58)return null;a+=2,o++,u=o}for(;a<h.length;){if(o===8)return null;if(h[a]===58){if(u!==null)return null;a++,o++,u=o;continue}let p=0,g=0,D=0;for(;D<4&&(p=eA(h[a]))>=0;)g=(g<<4)+p,a++,D++;if(h[a]===46){if(D===0||o>6)return null;a-=D;let S=0;for(;h[a]!==void 0;){let E=0;if(S>0)if(h[a]===46&&S<4)a++;else return null;if(h[a]==null||h[a]<48||h[a]>57)return null;for(;h[a]>=48&&h[a]<=57;){if(E=10*E+eA(h[a]),E>255)return null;a++}n[o]=256*n[o]+E,S++,S%2==0&&o++}if(S!==4)return null;break}else if(h[a]===58){if(h[++a]===void 0)return null}else if(h[a]!==void 0)return null;n[o]=g,o++}if(u!==null){let p=o-u;for(o=7;o!==0&&p>0;){let g=n[u+p-1];n[u+p-1]=n[o],n[o]=g,o--,p--}}else if(u===null&&o!==8)return null;return n})(A.substring(1,A.length-1)):null;if(e)return(function(r){return SA(r)?null:k(r,O)})(A);{let t=(function(n){let u=!1,o=!1;for(let h=0;h<n.length;h++){let p=n.charCodeAt(h);if(p<=32||p===37||p===127)return null;if(p>=128){u=!0;break}p>=65&&p<=90&&(o=!0)}if(!u)return n!==""?o?n.toLowerCase():n:null;if((function(p){for(let g of p){let D=g.codePointAt(0);if(/[\p{Cn}\p{Co}\p{Cs}\p{Noncharacter_Code_Point}]/u.test(g)&&!BA(_A,D)||x(VA,D))return!0}return!1})(n))return null;let a=(n=(function(p){let g="";for(let D of p){let S=D.codePointAt(0);if(S!==8204&&S!==8205&&/\p{Default_Ignorable_Code_Point}/u.test(D))continue;let E=ZA(D,S);if(E){g+=E;continue}let dA=YA.indexOf(S);g+=dA<0?D:GA[dA]}return g})(n).normalize("NFKC").replace(/[\u3002\uff0e\uff61]/g,".").toLowerCase()).split(".");for(let h=0;h<a.length;h++){let p=a[h];if(p==="")continue;let g=/[^\0-\x7f]/.test(p);if(WA(p)||g&&(/^\p{Mark}/u.test(p)||!Ae(p)||!re(p)||p.startsWith("xn--")))return null;g&&(a[h]=`xn--${ce(p)}`)}return(n=a.join("."))!==""?n:null})(A.indexOf("%")===-1?A:tA(A));return t===null||SA(t)?null:(function(n){let u=n.length,o=n.lastIndexOf(".",u-2)+1;if(n.charCodeAt(u-1)===46&&u--,u<=o)return!1;if(X(n.slice(o,u))>=0)return!0;for(;o<u;o++){let a=n.charCodeAt(o);if(a<48||a>57)return!1}return!0})(t)?(function(n){let u=n.split("."),o=u.length;if(u[o-1]||o--,o>4)return null;let a=0;for(let p=0;p<o-1;p++){let g=X(u[p]);if(g<0||g>255)return null;a+=g*(1<<8*(3-p))}let h=X(u[o-1]);return h<0||h>=256**(5-o)?null:(a+=h,a)})(t):t}}function lA(A){return typeof A=="number"?(function(t){let n="";return n+=`${(t>>>24&255).toString(10)}.`,n+=`${(t>>>16&255).toString(10)}.`,n+=`${(t>>>8&255).toString(10)}.`,n+=(t&255).toString(10),n})(A):Array.isArray(A)?`[${(function(t){let r=(function(a){let h=-1,p=-1,g=1,D=0;for(let S=0;S<a.length;++S)a[S]!==0?(D>g&&(h=p,g=D),p=-1,D=0):(p===-1&&(p=S),++D);return D>g?p:h})(t),n="",u=!1;for(let o=0;o<=7;++o)if(!(u&&t[o]===0)){if(u&&(u=!1),r===o){n+=o===0?"::":":",u=!0;continue}n+=t[o].toString(16),o!==7&&(n+=":")}return n})(A)}]`:A}function zA(A){A.path.length>0&&(A.path.length!==1||A.scheme!=="file"||!(function(t){return/^[A-Za-z]:$/u.test(t)})(A.path[0]))&&A.path.pop()}function HA(A){return A.username!==""||A.password!==""}function K(A){return A.host===null||A.host===""||A.scheme==="file"}var s=0,i="",d="",m=null,l,_=!1,Y=!1,L=!1,b;function I(A,e,t,r){e||(A=(function(o){let a=0,h=o.length;for(;a<h&&!(o.charCodeAt(a)>32);++a);for(;h>a&&!(o.charCodeAt(h-1)>32);--h);return o.substring(a,h)})(A)),A=(function(o){let a=0;for(;a<o.length;a++){let p=o.charCodeAt(a);if(p===9||p===10||p===13)break}if(a===o.length)return o;let h=o.slice(0,a);for(;a<o.length;a++){let p=o.charCodeAt(a);p!==9&&p!==10&&p!==13&&(h+=o[a])}return h})(A),s=0,i=A,d="",m=t||null,l=e||{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,opaquePath:!1},_=!1,Y=!1,L=!1,b=r||0;let n=ae;switch(r){case 3:case 4:n=J;break;case 5:n=fA;break;case 6:n=N;break;case 7:n=H;break;case 8:n=U}return n(c(A,s))!==1?l:null}function f(A,e){return s+=s===A?v(e):1,s<=i.length}function c(A,e){return e<A.length?A.codePointAt(e):void 0}function v(A){return A!=null&&A>65535?2:1}function LA(A){return A==null?"":A<=65535?String.fromCharCode(A):String.fromCodePoint(A)}var ae=A=>{let e=s;if(A!=null&&(A>=65&&A<=90||A>=97&&A<=122)){let t=s+1;for(A=i.charCodeAt(t);A===43||A===45||A===46||A>=65&&A<=90||A>=97&&A<=122||A>=48&&A<=57;)t++,A=i.charCodeAt(t);return d=i.slice(s,t).toLowerCase(),s=t,fe(t<i.length?A:void 0)}else return b?1:(--s,f(e,A)?NA(c(i,s)):0)},fe=A=>{let e=s;if(A===58){if(b){if(C(l.scheme)!==C(d))return 0;if((HA(l)||l.port!==null)&&d==="file")return 0;if(l.scheme==="file"&&l.host==="")return 0}return l.scheme=d,b?(l.port===RA(l.scheme)&&(l.port=null),0):(d="",l.scheme==="file"?f(e,A)?hA(c(i,s)):0:C(l.scheme)&&m!==null&&m.scheme===l.scheme?f(e,A)?he(c(i,s)):0:C(l.scheme)?f(e,A)?de(c(i,s)):0:c(i,s+1)===47?(s++,f(e,A)?pe(c(i,s)):0):(l.path=[""],l.opaquePath=!0,f(e,A)?TA(c(i,s)):0))}else return b?1:(d="",s=-1,f(e,A)?NA(c(i,s)):0)},NA=A=>{let e=s;return m===null||m.opaquePath&&A!==35?1:m.opaquePath&&A===35?(l.scheme=m.scheme,l.path=m.path.slice(),l.opaquePath=m.opaquePath,l.query=m.query,l.fragment="",f(e,A)?U(c(i,s)):0):m.scheme==="file"?(s--,f(e,A)?hA(c(i,s)):0):(s--,f(e,A)?aA(c(i,s)):0)},he=A=>{let e=s;return A===47&&c(i,s+1)===47?(++s,f(e,A)?V(c(i,s)):0):(s--,f(e,A)?aA(c(i,s)):0)},pe=A=>{let e=s;return A===47?f(e,A)?T(c(i,s)):0:(s--,f(e,A)?q(c(i,s)):0)},aA=A=>{let e=s;return l.scheme=m.scheme,A===47||C(l.scheme)&&A===92?f(e,A)?EA(c(i,s)):0:(l.username=m.username,l.password=m.password,l.host=m.host,l.port=m.port,l.path=m.path.slice(),l.query=m.query,A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(l.query=null,l.path.pop(),s--,f(e,A)?q(c(i,s)):0):f(e,A)?aA(c(i,s)):0)},EA=A=>{let e=s;return C(l.scheme)&&(A===47||A===92)?f(e,A)?V(c(i,s)):0:A===47?f(e,A)?T(c(i,s)):0:(l.username=m.username,l.password=m.password,l.host=m.host,l.port=m.port,s--,f(e,A)?q(c(i,s)):0)},de=A=>{let e=s;return A===47&&c(i,s+1)===47?s++:s--,f(e,A)?V(c(i,s)):0},V=A=>{let e=s;return A!==47&&A!==92?(s--,f(e,A)?T(c(i,s)):0):f(e,A)?V(c(i,s)):0},T=A=>{let e=s;if(A!=null&&A!==64&&A!==35&&A!==47&&A!==63&&(A!==92||!C(l.scheme))){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===64||r===35||r===47||r===63||r===92&&C(l.scheme))break;t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?T(c(i,s)):0}if(A===64){_&&(d=`%40${d}`),_=!0;for(let t=0;t<d.length;t++){let r=d.codePointAt(t);if(r===58&&!Y){Y=!0;continue}let n=qA(r,G);Y?l.password+=n:l.username+=n,r!=null&&r>65535&&t++}return d="",f(e,A)?T(c(i,s)):0}else return A==null||A===35||A===47||A===63||A===92&&C(l.scheme)?_&&d===""?1:(s-=d.length+1,d="",f(e,A)?J(c(i,s)):0):(d+=LA(A),f(e,A)?T(c(i,s)):0)},J=A=>{let e=s;if(b&&l.scheme==="file")return s--,f(e,A)?pA(c(i,s)):0;if(A!=null&&A!==58&&A!==35&&A!==47&&A!==63&&(A!==92||!C(l.scheme))){let t=s+v(A);for(A===91?L=!0:A===93&&(L=!1);t<i.length;){let r=c(i,t);if(r==null||!L&&r===58||r===35||r===47||r===63||r===92&&C(l.scheme))break;r===91?L=!0:r===93&&(L=!1),t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?J(c(i,s)):0}else if(A===58&&!L){if(d===""||b===4)return 1;let t=iA(d,!C(l.scheme));return t===null?1:(l.host=lA(t),d="",f(e,A)?fA(c(i,s)):0)}else if(A==null||A===35||A===47||A===63||A===92&&C(l.scheme)){if(s--,C(l.scheme)&&d==="")return 1;if(b&&d===""&&(HA(l)||l.port!==null))return 1;let t=iA(d,!C(l.scheme));return t===null?1:(l.host=lA(t),d="",b?0:f(e,A)?N(c(i,s)):0)}else return d+=LA(A),f(e,A)?J(c(i,s)):0},fA=A=>{let e=s;if(A!=null&&A>=48&&A<=57){let t=s+1;for(;t<i.length;){let r=i.charCodeAt(t);if(r<48||r>57)break;t++}return d+=i.slice(s,t),s=t-1,f(e,A)?fA(c(i,s)):0}else if(b||A==null||A===35||A===47||A===63||A===92&&C(l.scheme)){if(d!==""){let t=parseInt(d,10);if(t>65535)return 1;if(l.port=t===RA(l.scheme)?null:t,d="",b)return 0}return b?1:(s--,f(e,A)?N(c(i,s)):0)}else return 1};function $A(A,e){let t=A.length-e;if(t<2)return!1;if(kA(c(A,e),c(A,e+1))){if(t===2)return!0;{let r=c(A,e+2);return r===47||r===92||r===63||r===35}}else return!1}var hA=A=>{let e=s;return l.scheme="file",l.host="",A===47||A===92?f(e,A)?ge(c(i,s)):0:m?.scheme==="file"?(l.host=m.host,l.path=m.path.slice(),l.opaquePath=m.opaquePath,l.query=m.query,A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(l.query=null,$A(i,s)?l.path=[]:zA(l),s--,f(e,A)?q(c(i,s)):0):f(e,A)?hA(c(i,s)):0):(s--,f(e,A)?q(c(i,s)):0)},ge=A=>{let e=s;return A===47||A===92?f(e,A)?pA(c(i,s)):0:(m!==null&&m.scheme==="file"&&(!$A(i,s)&&(function(r){if(r.length===2){let n=r.codePointAt(0),u=r.codePointAt(1);return(n>=65&&n<=90||n>=97&&n<=122)&&u===58}else return!1})(m.path[0])&&l.path.push(m.path[0]),l.host=m.host),s--,f(e,A)?q(c(i,s)):0)},pA=A=>{let e=s;if(A!=null&&A!==47&&A!==92&&A!==63&&A!==35){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===47||r===92||r===63||r===35)break;t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?pA(c(i,s)):0}else if(A==null||A===47||A===92||A===63||A===35){if(s--,!b&&UA(d))return f(e,A)?q(c(i,s)):0;if(d==="")return l.host="",b?0:f(e,A)?N(c(i,s)):0;{let t=iA(d,!C(l.scheme));return t===null?1:(t==="localhost"&&(t=""),l.host=lA(t),d="",b?0:f(e,A)?N(c(i,s)):0)}}return 1},N=A=>{let e=s;return C(l.scheme)?(A!==92&&A!==47&&s--,f(e,A)?q(c(i,s)):0):!b&&A===63?(l.query="",f(e,A)?H(c(i,s)):0):!b&&A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(A!==47&&s--,f(e,A)?q(c(i,s)):0):(b&&l.host===null&&l.path.push(""),f(e,A)?N(c(i,s)):0)},q=A=>{let e=s;if(A!=null&&A!==47&&(!C(l.scheme)||A!==92)&&(b||A!==63&&A!==35)){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===47||C(l.scheme)&&r===92||!b&&(r===63||r===35))break;t+=v(r)}d+=k(i.slice(s,t),rA),s=t,A=c(i,t)}if(A==null||A===47||C(l.scheme)&&A===92||!b&&(A===63||A===35)){let t=C(l.scheme)&&A===92;return(function(n){switch(n){case"..":case"%2e.":case"%2E.":case".%2e":case".%2E":case"%2e%2e":case"%2E%2e":case"%2e%2E":case"%2E%2E":return!0;default:return!1}})(d)?(zA(l),A!==47&&!t&&l.path.push("")):bA(d)&&A!==47&&!t?l.path.push(""):bA(d)||(l.scheme==="file"&&l.path.length===0&&UA(d)&&(d=`${d[0]}:`),l.path.push(d)),d="",A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):f(e,A)?q(c(i,s)):0}else return d+=qA(A,rA),f(e,A)?q(c(i,s)):0},TA=A=>{let e=s;if(A===63)return l.query="",f(e,A)?H(c(i,s)):0;if(A===35)return l.fragment="",f(e,A)?U(c(i,s)):0;if(A!=null){let t=s+v(A);for(;t<i.length;){let n=c(i,t);if(n===63||n===35)break;t+=v(n)}let r=i.slice(s,t);if(t<i.length&&r.charCodeAt(r.length-1)===32?l.path[0]+=k(r.slice(0,-1),O)+"%20":l.path[0]+=k(r,O),s=t,(A=c(i,t))===63)return l.query="",f(e,A)?H(c(i,s)):0;if(A===35)return l.fragment="",f(e,A)?U(c(i,s)):0}return f(e,A)?TA(c(i,s)):0},H=A=>{let e=s,t=s;if(A!=null){if(b)t=i.length;else{let n=i.indexOf("#",s);t=n===-1?i.length:n}let r=C(l.scheme)?FA:uA;l.query+=k(i.slice(s,t),r)}return s=t,c(i,t)===35&&!b?(l.fragment="",f(e,A)?U(c(i,s)):0):f(e,A)?H(c(i,s)):0},U=A=>{let e=s;return A!=null&&(l.fragment+=k(i.slice(s),QA),s=i.length),f(e,A)?U(c(i,s)):0};function oA(A){if(A.opaquePath)return A.path[0];{let e="";for(let t of A.path)e+=`/${t}`;return e}}function xA(A){switch(A.scheme){case"blob":{let e=I(oA(A),null,null,0);return e===null||e.scheme!=="http"&&e.scheme!=="https"?"null":xA(e)}case"ftp":case"http":case"https":case"ws":case"wss":return(function(t){let r=`${t.scheme}://`;return r+=t.host,t.port!==null&&(r+=`:${t.port}`),r})(A);default:return"null"}}var w=Symbol("URLImpl"),j=class A{constructor(e,t){if(e===void 0&&t===void 0)throw new TypeError('The "url" argument must be specified.');e=P(e),t!=null&&(t=P(t));let r=null;if(t!=null&&(r=I(t,null,null,0),r==null))throw new TypeError(`Invalid base URL: ${t}`);let n=I(e,null,r,0);if(n==null)throw new TypeError(`Invalid URL: ${e}`);this[w]={url:n,query:null}}static createObjectURL(e){throw new TypeError("URL.createObjetURL is unsupported")}static revokeObjectURL(e){}static parse(e,t){e=P(e),t!==void 0&&(t=P(t));try{return new A(e,t)}catch{return null}}static canParse(e,t){e=P(e),t!==void 0&&(t=P(t));let r=null;return t!=null&&(r=I(t,null,null,0),r==null)?!1:I(e,null,r,0)!=null}get href(){return(function(t){let r=`${t.scheme}:`;return t.host!==null&&(r+="//",(t.username!==""||t.password!=="")&&(r+=t.username,t.password!==""&&(r+=`:${t.password}`),r+="@"),r+=t.host,t.port!==null&&(r+=`:${t.port}`)),t.host===null&&!t.opaquePath&&t.path.length>1&&t.path[0]===""&&(r+="/."),r+=oA(t),t.query!==null&&(r+=`?${t.query}`),t.fragment!==null&&(r+=`#${t.fragment}`),r})(this[w].url)}set href(e){let t=I(e=P(e),null,null,0);if(t==null)throw new TypeError(`Invalid URL: ${e}`);this[w].url=t,this[w].query&&Z(this[w].query,t.query)}get origin(){return xA(this[w].url)}get protocol(){return`${this[w].url.scheme}:`}set protocol(e){I(`${e=P(e)}:`,this[w].url,null,2)}get username(){return this[w].url.username}set username(e){e=P(e),K(this[w].url)||(function(r,n){r.username=k(n,G)})(this[w].url,e)}get password(){return this[w].url.password}set password(e){e=P(e),K(this[w].url)||(function(r,n){r.password=k(n,G)})(this[w].url,e)}get host(){let{url:e}=this[w];return e.host==null?"":e.port==null?e.host:`${e.host}:${e.port}`}set host(e){e=P(e),this[w].url.opaquePath||I(e,this[w].url,null,3)}get hostname(){let{url:e}=this[w];return e.host!=null?e.host:""}set hostname(e){e=P(e),this[w].url.opaquePath||I(e,this[w].url,null,4)}get port(){let{url:e}=this[w];return e.port!=null?`${e.port}`:""}set port(e){e=P(e);let{url:t}=this[w];K(t)||(e?I(e,t,null,5):t.port=null)}get pathname(){return oA(this[w].url)}set pathname(e){e=P(e);let{url:t}=this[w];t.opaquePath||(t.path=[],I(e,t,null,6))}get search(){let{url:e}=this[w];return e.query?`?${e.query}`:""}set search(e){e=P(e);let{url:t,query:r}=this[w];if(!e)t.query=null,r&&Z(r,null);else{let n=e[0]==="?"?e.substring(1):e;t.query="",I(n,t,null,7),r&&Z(r,t.query)}}get searchParams(){let e=this[w],t=e.query;return t==null&&(t=e.query=(function(n,u){let o=new W;return o[y].url=n,o[y].serialized=u==null,u&&(o[y].list=cA(u)),o})(this,e.url.query)),t}get hash(){let{url:e}=this[w];return e.fragment?`#${e.fragment}`:""}set hash(e){e=P(e);let{url:t}=this[w];if(!e)t.fragment=null;else{let r=e[0]==="#"?e.substring(1):e;t.fragment="",I(r,t,null,8)}}toJSON(){return this.href}toString(){return this.href}};Object.defineProperty(j.prototype,Symbol.toStringTag,{value:"URL",configurable:!0});var y=Symbol("URLSearchParamsImpl"),me=Symbol.dispose||Symbol.for("dispose");function Z(A,e){e?A[y].list=cA(e):A[y].list.length=0,A[y].serialized=e==null}function Q(A){if(A.url){let e=nA(A.list);(function(r,n){r[w].url.query=n})(A.url,e||null),A.serialized=!0}}var we=typeof Iterator<"u"?Iterator:Object,M=class extends we{constructor(e,t){super(),this[y]={ptr:e,map:t,index:0}}next(){let e=this[y];return e.index<e.ptr.list.length?{value:e.map(e.ptr.list[e.index++]),done:!1}:{value:void 0,done:!0}}[Symbol.iterator](){return this}[me](){}},W=class{constructor(e){let t=this[y]={list:[],url:null,serialized:!0},r;if(Array.isArray(e))for(let n=0;n<e.length;n++)t.list.push(wA(e[n]));else if((r=IA(e))!=null){let n;for(;!(n=AA(r.next())).done;)t.list.push(wA(n.value))}else if((typeof e=="object"||typeof e=="function")&&e!=null){let n=Object.keys(e);for(let u=0;u<n.length;u++){let o=n[u],a=OA(o),h=P(e[o]),p=t.list.find(g=>g[0]===a);p?p[1]=h:t.list.push([a,h])}}else if(e!==void 0){let n=P(e);n=n[0]==="?"?n.substring(1):n,t.list=cA(n)}}get size(){return this[y].list.length}append(e,t){e=P(e),t=P(t),this[y].list.push([e,t]);let r=this[y];r.url&&r.serialized?(function(u,o){let a=u[w].url;a.query=a.query?`${a.query}&${o}`:o})(r.url,nA([[e,t]])):Q(r)}delete(e,t){e=P(e),t=t!=null?P(t):void 0;let{list:r}=this[y],n=0;for(;n<r.length;)r[n][0]===e&&(t==null||r[n][1]===t)?r.splice(n,1):n++;Q(this[y])}get(e){e=P(e);let{list:t}=this[y];for(let r=0;r<t.length;r++)if(t[r][0]===e)return t[r][1];return null}getAll(e){e=P(e);let t=[],{list:r}=this[y];for(let n=0;n<r.length;n++)r[n][0]===e&&t.push(r[n][1]);return t}has(e,t){e=P(e),t=t!=null?P(t):void 0;let{list:r}=this[y];for(let n=0;n<r.length;n++)if(r[n][0]===e&&(t==null||r[n][1]===t))return!0;return!1}set(e,t){e=P(e),t=P(t);let{list:r}=this[y],n=!1,u=!1,o=0;for(;o<r.length;)r[o][0]===e?n?(r.splice(o,1),u=!0):(n=!0,r[o][1]!==t&&(r[o][1]=t,u=!0),o++):o++;n||(r.push([e,t]),u=!0),u&&Q(this[y])}sort(){this[y].list.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),Q(this[y])}forEach(e,t){if(typeof e!="function")throw new TypeError('The "callback" argument must be of type function');let{list:r}=this[y];for(let n=0;n<r.length;n++)e.call(t,r[n][1],r[n][0],this)}entries(){return new M(this[y],e=>e)}keys(){return new M(this[y],e=>e[0])}values(){return new M(this[y],e=>e[1])}toString(){return nA(this[y].list)}[Symbol.iterator](){return this.entries()}};Object.defineProperty(W.prototype,Symbol.toStringTag,{value:"URLSearchParams",configurable:!0});var Pe=$.trackUsage.request.shape.command,ye=$.trackUsage.response,De=$.checkEntitlement.request.omit({customerId:!0}).strict();function Ie(A){let e=gA.parse(A.scope),t=mA({...A,scope:e},void 0,j),r=0,n=!1;return{identify(u){if(!/^gg_ct_[A-Za-z0-9_-]{32,128}$/.test(u))throw new R("INVALID_TOKEN","A Customer Token is required");r++,t.identify(u),n=!0},reset(){r++,n=!1,t.reset()},async readHoldings(){let u=$.readHoldings;return u.response.parse(await t.request(u.path,{}))},async checkEntitlement(u){let o=$.checkEntitlement,a=De.parse(u);return o.response.parse(await t.request(o.path,a))},async trackUsage(u){if(!n)throw new R("UNAUTHENTICATED","Identify the Customer first");if(!A.usageReporter)throw new R("INVALID_REQUEST","Configure your authenticated backend usageReporter");let o=Pe.parse(u),a=r,h;try{h=await A.usageReporter(o)}catch(g){throw a!==r?new R("IDENTITY_CHANGED","Customer identity changed during usage reporting"):g}if(a!==r)throw new R("IDENTITY_CHANGED","Customer identity changed during usage reporting");let p=ye.parse(h);if(p.scope.projectId!==e.projectId||p.scope.environment!==e.environment)throw new R("INVALID_RESPONSE","Usage response scope differs");return p}}}export{R as IndianaError,Ie as createIndianaReactNative};
1
+ import{a as mA}from"./chunk-QO4YQLZ4.js";import{li as $}from"./chunk-467Z5ISI.js";import{b as gA}from"./chunk-3SONNXFG.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import"./chunk-S5TVMQRC.js";import{a as R}from"./chunk-6MO6Y24B.js";import"./chunk-HD74AAFS.js";import"./chunk-RRII2DMC.js";import"./chunk-KQCTDXVD.js";function P(A){return typeof A=="string"?A:String(A)}var MA=/[\ud800-\udbff](?![\udc00-\udfff])|(^|[^\ud800-\udbff])[\udc00-\udfff]/g;function OA(A){return A.replace(MA,"$1\uFFFD")}function AA(A,e){if(typeof A!="object"||A==null){let t="";throw t+="The provided value is not an object",new TypeError(t)}return A}function IA(A){if(A!=null&&(typeof A=="object"||typeof A=="function")){let e=A[Symbol.iterator];if(e==null)return;if(typeof e!="function")throw new TypeError("The provided value is not iterable");let t=e.call(A);if(!t||typeof t!="object")throw new TypeError("Result of the Symbol.iterator method is not an object");return t}}function wA(A){let e;if(Array.isArray(A)){let t=A.map(P);if(t.length===2)return t}else if((e=IA(A))!=null){let t=AA(e.next()),r=AA(e.next());if(!t.done&&!r.done)return[P(t.value),P(r.value)]}throw new TypeError("Each query pair must be an iterable [name, value] tuple")}var PA="0123456789ABCDEF",jA=/(?:%[0-9A-Fa-f]{2})+/g;function B(A){return`%${PA[A>>4&15]}${PA[15&A]}`}function vA(A,e,t=!1){return A>=55296&&A<=57343&&(A=65533),A<=127?t&&A===32?"+":e(A)?B(A):String.fromCharCode(A):A<=2047?B(192|A>>6)+B(128|63&A):A<=65535?B(224|A>>12)+B(128|A>>6&63)+B(128|63&A):B(240|A>>18)+B(128|A>>12&63)+B(128|A>>6&63)+B(128|63&A)}function eA(A){return A>=48&&A<=57?A-48:A>=65&&A<=70?A-65+10:A>=97&&A<=102?A-97+10:-1}function tA(A,e=!1){let t=0;for(;t<A.length;t++){let r=A.charCodeAt(t);if(r===37||e&&r===43)break}return t===A.length?A:(e?A.replace(/\+/g," "):A).replace(jA,r=>{try{return decodeURIComponent(r)}catch{return"\uFFFD".repeat(r.length/3)}})}function O(A){return A<=31||A>126}function QA(A){switch(A){case 32:case 34:case 60:case 62:case 96:return!0;default:return O(A)}}function uA(A){switch(A){case 32:case 34:case 35:case 60:case 62:return!0;default:return O(A)}}function FA(A){return uA(A)||A===39}function rA(A){switch(A){case 63:case 94:case 96:case 123:case 125:return!0;default:return uA(A)}}function G(A){switch(A){case 47:case 58:case 59:case 61:case 64:case 91:case 92:case 93:case 124:return!0;default:return rA(A)}}function yA(A){switch(A){case 33:case 39:case 40:case 41:case 126:return!0;default:return(function(t){switch(t){case 36:case 37:case 38:case 43:case 44:return!0;default:return G(t)}})(A)}}function qA(A,e){return vA(A=A||0,e)}function k(A,e,t=!1){let r=0;for(;r<A.length;r++){let u=A.charCodeAt(r);if(u>=128||t&&u===32||e(u))break}if(r===A.length)return A;let n=A.slice(0,r);for(;r<A.length;r++){let u=A.charCodeAt(r),o=u;if(u>=55296&&u<=56319&&r+1<A.length){let a=A.charCodeAt(r+1);a>=56320&&a<=57343&&(o=(u-55296<<10)+a-56320+65536,r++)}n+=vA(o,e,t)}return n}function cA(A){let e=[],t=0,r=0;for(;r<=A.length;){if(r=A.indexOf("&",t),r<0&&(r=A.length),r!==t){let n=A.slice(t,r),u=n.indexOf("=");u<0&&(u=n.length),e.push([tA(n.slice(0,u),!0),tA(n.slice(u+1),!0)])}if(t=r+1,r===A.length)break}return e}function nA(A){let e="";for(let t=0;t<A.length;t++){let r=k(A[t][0],yA,!0),n=k(A[t][1],yA,!0);e+=t!==0?`&${r}=${n}`:`${r}=${n}`}return e}var _A=[2191,2191,3164,3164,3292,3292,6863,6877,6880,6891,8385,8385,11158,11158,42958,42959,42962,42962,42964,42964,42993,42993,64451,64466,64912,64913,64968,64974,67904,67929,69317,69319,69328,69336,69370,69371,72544,72551,73136,73179,73184,73193,93856,93880,93883,93907,94194,94198,100344,100351,101641,101662,101760,101874,118010,118012,118458,118480,118496,118512,124608,124638,124640,124661,124670,124671,128728,128728,128887,128890,129232,129240,129620,129623,129674,129674,129678,129678,129736,129736,129741,129741,129770,129770,129775,129775,130042,130042,177978,177983,183970,183981,205744,210041],YA=[7296,7297,7298,7299,7300,7301,7302,7303,7304,42958,42962,42964,42993],GA=["\u0432","\u0434","\u043E","\u0441","\u0442","\u0442","\u044A","\u0463","\uA64B","\uA7CF","\uA7D3","\uA7D5","s"],JA=[2381,2381,2509,2509,2637,2637,2765,2765,2893,2893,3021,3021,3149,3149,3277,3277,3387,3388,3405,3405,3530,3530,3642,3642,3770,3770,3972,3972,4153,4154,5908,5909,5940,5940,6098,6098,6752,6752,6980,6980,7082,7083,7154,7155,11647,11647,43014,43014,43052,43052,43204,43204,43347,43347,43456,43456,43766,43766,44013,44013,68159,68159,69702,69702,69744,69744,69759,69759,69817,69817,69939,69940,70080,70080,70197,70197,70378,70378,70477,70477,70606,70608,70722,70722,70850,70850,71103,71103,71231,71231,71350,71350,71467,71467,71737,71737,71997,71998,72160,72160,72244,72244,72263,72263,72345,72345,72767,72767,73028,73029,73111,73111,73537,73538,90415,90415];function WA(A){for(let e=0;e<A.length;e++){let t=A.codePointAt(e);if(t>65535&&e++,t<=32||t===37||t===127||t>=55296&&t<=57343||t>=128&&t<=159||t>=64976&&t<=65007||!(65534&~t)||t===65533)return!0}return!1}var[VA,XA,KA,DA]=[[[],"0,6,7,8,m,w,10,1b,1d,1f,72,73,7k,8k,dt,2rk","AAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAA/AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAADAAABwfwAAAAAAAMADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhAAAAQAAAAAAAAQCAAABAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgACAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAP///////////////wAAAAAAAAAAAAAAAAAAAAA="],[[],"6,7,8,o,4o,7e,7f,7h,7i,7j,dl","AAAAAEF9+P/+BwAAAMAA//8AAPz/////BlADAAAAAJwAAPz///8AAADA//H/5+X8AAAAAAAAAAAA/P///wcAAAAAAAAAAAAAPv0vAD0BAABA/gAA/5/5/f8BAAAAAAAAgAAAAP//////////////AYD/////BQAAAAAAAAAAAAAAAAAAAAAAAP///////wcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8g+N8B+AAAAAAAAAAAAAAAAAAAAAAAAP//AwAAYAAAAAAAAAAAAAD/////CwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAA//8fAB4AAAD//wMAAAAAAH3/HgwAAAAAAAD//////////w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="],[[],"6,7,8,o,4o,7e,7f,7h,7i,7j,dl","AAAAAP3////+BwAAAMDu//////////////8vAADAAJwAAP3///8AAADg////////AAAAAAAAAAAA/P///wcAAAAAAAAAAAAA////Ab0H//9H/gAA/9////8BAAAAAAAAgAAAAP//////////////AYD/////BQAAAAAAAAAAAAAAAAAAAAAAAP///////wcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL/G//8T+AAAAAAAAAAAAAAAAAAAAAAAAP//AwAAfgAAAAAAAAAAAAD+////DwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANwAAAAAAAAAAAAAAAAA//8fAB4AAAD//wMAAAAAAH3/Hg4AAAAAAAD//////////w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="],[[],"0,3,4,5,6,7,8,9,a,b,c,d,e,f,g,j,n,o,p,q,r,s,t,w,18,19,1c,4m,4o,4p,4q,4r,6z,72,73,75,76,77,7e,7h,7i,7j,7k,7l,7m,7n,7o,7p,7q,7r,7s,7t,7u,7v,7w,7x,7y,7z,8k,9t,a2,a3,a7,cc,cv,cx,cy,d6,dc,dd,de,dg,dh,di,dk,dl,2rk,2rl","AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAD//////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v////+/tgAAAAAAAAAAAP8XAAAAAAD4//8AAAEAAAAAAAAAAAAAAMCfnz0AAACAAgAAAP///wcAAAAAAAAAAAAAwP8BAAAAAAAA+A8gAADA++8+AAAAAAAOAAAAAAAAgP8AAAAAAPz///v///8HAAAAAAAAFP4h/gAMAAAAAgAAAAAAABAeIAAADAAAQAYAAAAAAAAQhjkCAAAAIwAGAAAAAAAAEL4hAAAMAAD8AgAAAAAAAJAeIGAADAAAAAQAAAAAAAAAASAAAAAAAAARAAAAAAAA0ME9YAAMAAAAAgAAAAAAAJBAMAAADAAAAAMAAAAAAAAYHiAAAAwAAAACAAAAAAAAAAAEXAAAAAAAAAAAAAAA8geAfwAAAAAAAAAAAAAAAPIfAH8AAAAAAAAAAAADAACgAgAAAAAAAP5/3+D//v///x9AAAAAAAAAAAAAAAAA4P1mAAAAwwEAHgBkIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAMAAAADAAAAAwAAAAAAAAAsD9A/g8gAAAAAAC4AAAAAAAAAAAAAAAAAABgAAAAAAIAAAAAAAAAAAAAAAAAAIcBBA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAJAAAAAAAAQH/lH/ifAAAAAAAA//////8//w8AAA8AAAAAANAXBAAAAAD4DwADAAAAPDsAAAAAAABAowMAAAAAAADwzwAAAAAAAAAAAAAAAAAAAAAAAAD3//0hEAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wDIAAAAfAAAAAAAAB/8AAAAAAAAAAAAAAAA/////wEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAwAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA/////wAAAAAAPAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAID3PwAAAMAAAAAAAAAAAAAAAwBECAAAYBAAAAAAAAAAAAAAAAAAAAAAAAAwAAAA//8DgAAAAADAPwAAgP8DAAAAAAAHAAAAAADIMwAAAAAgAAAAAAAAAAB+ZgAIEAAAAAAAEAAAAAAAAJ3BAgAAAAAwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICEAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAMAHAAAAAAAAAAAAAAAAAAAAAG7wAAAAAACHAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAPAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAA/AAAAAAAAAAAwP8BAAAAAAA8AAAAAAAAAAAAAAAAAAAAAgAAAAAAAP9/AAAAAAAZgAMAAAAAAHgGBAAAAAAAAAAHAAAAgO8fAAAAAAAAAAgAAwAAAAAAwH8AngAAAAAAAAAAAAAAgNNAAgAAAAAAAAAAAAAAAAAAAAAAAID4BwAAAwAAAAAAABgBAAAAwB8fAAAAAAAAAAD4AUAFAAYAAAAAAAAAAAAA/1wAAEAAAAAAAAAAAAAA+IUNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8sAEAADAAAAAAAAAAAAAA+KcBAAAAAAAAAAAAAAAAKL8AAAAAAAAAAAAAAACgvA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgP8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgIAAAAAAAAAAAAAAAAAAAAAADwDAEAAAD+BwAAAAD4eYAAfg4AAAAAAPx/AwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf78AAAAAAAAAAAAA/P///G0AAAAAAAAAAAAAAAAAAAB+tL8AAAAAAAAAAACjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAwAAAAAAwAcFAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//4H/PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMD/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAAAAAAAB/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAcAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAPAAAAAAAAAAAAAAD//////z///38AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAD+P/nDwAAADwAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////9/+P//////HyAAEAAA+P7/AAAAAAAAAAAAAH////nbBwAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASMAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfwAAAAAAAAAAAAAAAADwDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAA////////////////AAAAAAAAAAAAAAAAAAAAAP///////////////////////////////////////wAA"]].map(function([e,t,r]){return[e,t.split(",").map(n=>parseInt(n,36)),Uint8Array.from(atob(r),n=>n.charCodeAt(0))]});function ZA(A,e){return e===931||e===1010||e===120531||e===120589||e===120647||e===120705||e===120763?"\u03C3":e>=5112&&e<=5117?String.fromCodePoint(e-8):e>=43888&&e<=43967?String.fromCodePoint(e-38864):e>=93856&&e<=93880?String.fromCodePoint(e+27):e===837||e===890||e>=8064&&e<=8111||e>=8114&&e<=8188?A.normalize("NFD").replace(/\u0345/g,"\u03B9").normalize("NFC").toLowerCase():""}function BA(A,e){for(let t=0;t<A.length;t+=2)if(e>=A[t]&&e<=A[t+1])return!0;return!1}function x(A,e){let[t,r,n]=A,u=e>>8;for(let h=0;h<t.length;h+=2)if(u>=t[h]&&u<=t[h+1])return!0;let o=r.indexOf(u);if(o<0)return!1;let a=255&e;return!!(n[32*o+(a>>3)]&1<<(7&a))}function Ae(A){let e=Array.from(A,t=>t.codePointAt(0));for(let t=0;t<e.length;t++){let r=e[t];if(r!==8204&&r!==8205||t>0&&BA(JA,e[t-1]))continue;if(r===8205)return!1;let n=t-1;for(;n>=0&&x(DA,e[n]);)n--;let u=t+1;for(;u<e.length&&x(DA,e[u]);)u++;if(!(n>=0&&u<e.length&&x(XA,e[n])&&x(KA,e[u])))return!1}return!0}var ee=/(?![\p{Mark}\p{Decimal_Number}])[\p{Script=Arabic}\p{Script=Hebrew}]/u,te=/\p{Script=Latin}/u;function re(A){return!ee.test(A)||!te.test(A)}var z=36,F=1,sA=26,ne=38,se=700,ie=72,le=128,oe=2147483647;function CA(A){return String.fromCharCode(A+22+75*+(A<26))}function ue(A,e,t){let r=0;for(A=t?Math.floor(A/se):A>>1,A+=Math.floor(A/e);A>(z-F)*sA>>1;r+=z)A=Math.floor(A/(z-F));return Math.floor(r+(z-F+1)*A/(A+ne))}function ce(A){let e=Array.from(A,h=>h.codePointAt(0)),t="",r=0;for(let h=0;h<e.length;h++){let p=e[h];p<128&&(t+=String.fromCharCode(p),r++)}let n=r;n&&(t+="-");let u=le,o=0,a=ie;for(;r<e.length;){let h=oe;for(let p=0;p<e.length;p++){let g=e[p];g>=u&&g<h&&(h=g)}o+=(h-u)*(r+1),u=h;for(let p=0;p<e.length;p++){let g=e[p];if(g<u&&o++,g===u){let D=o;for(let S=z;;S+=z){let E=S<=a?F:S>=a+sA?sA:S-a;if(D<E)break;t+=CA(E+(D-E)%(z-E)),D=Math.floor((D-E)/(z-E))}t+=CA(D),a=ue(o,r+1,r===n),o=0,r++}}o++,u++}return t}function X(A){let e=10;if(A.length>=2&&A[0]==="0"&&(A[1]==="x"||A[1]==="X"))A=A.slice(2),e=16;else if(A.length>=2&&A[0]==="0")A=A.slice(1),e=8;else if(A==="")return-1;let t=0;for(let r=0;r<A.length;r++){let n=eA(A.charCodeAt(r));if(n>=e||n<0)return-1;t=t*e+n}return t}function bA(A){switch(A){case".":case"%2e":case"%2E":return!0;default:return!1}}function kA(A,e){return(A>=65&&A<=90||A>=97&&A<=122)&&(e===58||e===124)}function UA(A){return A.length===2&&kA(A.codePointAt(0),A.codePointAt(1))}function SA(A){return A.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}function C(A){switch(A){case"ftp":case"http":case"https":case"ws":case"wss":case"file":return!0;default:return!1}}function RA(A){switch(A){case"ftp":return 21;case"http":case"ws":return 80;case"https":case"wss":return 443;default:return null}}function iA(A,e){if(A[0]==="[")return A[A.length-1]==="]"?(function(r){let n=[0,0,0,0,0,0,0,0],u=null,o=0,a=0,h=Array.from(r,p=>p.codePointAt(0));if(h[a]===58){if(h[a+1]!==58)return null;a+=2,o++,u=o}for(;a<h.length;){if(o===8)return null;if(h[a]===58){if(u!==null)return null;a++,o++,u=o;continue}let p=0,g=0,D=0;for(;D<4&&(p=eA(h[a]))>=0;)g=(g<<4)+p,a++,D++;if(h[a]===46){if(D===0||o>6)return null;a-=D;let S=0;for(;h[a]!==void 0;){let E=0;if(S>0)if(h[a]===46&&S<4)a++;else return null;if(h[a]==null||h[a]<48||h[a]>57)return null;for(;h[a]>=48&&h[a]<=57;){if(E=10*E+eA(h[a]),E>255)return null;a++}n[o]=256*n[o]+E,S++,S%2==0&&o++}if(S!==4)return null;break}else if(h[a]===58){if(h[++a]===void 0)return null}else if(h[a]!==void 0)return null;n[o]=g,o++}if(u!==null){let p=o-u;for(o=7;o!==0&&p>0;){let g=n[u+p-1];n[u+p-1]=n[o],n[o]=g,o--,p--}}else if(u===null&&o!==8)return null;return n})(A.substring(1,A.length-1)):null;if(e)return(function(r){return SA(r)?null:k(r,O)})(A);{let t=(function(n){let u=!1,o=!1;for(let h=0;h<n.length;h++){let p=n.charCodeAt(h);if(p<=32||p===37||p===127)return null;if(p>=128){u=!0;break}p>=65&&p<=90&&(o=!0)}if(!u)return n!==""?o?n.toLowerCase():n:null;if((function(p){for(let g of p){let D=g.codePointAt(0);if(/[\p{Cn}\p{Co}\p{Cs}\p{Noncharacter_Code_Point}]/u.test(g)&&!BA(_A,D)||x(VA,D))return!0}return!1})(n))return null;let a=(n=(function(p){let g="";for(let D of p){let S=D.codePointAt(0);if(S!==8204&&S!==8205&&/\p{Default_Ignorable_Code_Point}/u.test(D))continue;let E=ZA(D,S);if(E){g+=E;continue}let dA=YA.indexOf(S);g+=dA<0?D:GA[dA]}return g})(n).normalize("NFKC").replace(/[\u3002\uff0e\uff61]/g,".").toLowerCase()).split(".");for(let h=0;h<a.length;h++){let p=a[h];if(p==="")continue;let g=/[^\0-\x7f]/.test(p);if(WA(p)||g&&(/^\p{Mark}/u.test(p)||!Ae(p)||!re(p)||p.startsWith("xn--")))return null;g&&(a[h]=`xn--${ce(p)}`)}return(n=a.join("."))!==""?n:null})(A.indexOf("%")===-1?A:tA(A));return t===null||SA(t)?null:(function(n){let u=n.length,o=n.lastIndexOf(".",u-2)+1;if(n.charCodeAt(u-1)===46&&u--,u<=o)return!1;if(X(n.slice(o,u))>=0)return!0;for(;o<u;o++){let a=n.charCodeAt(o);if(a<48||a>57)return!1}return!0})(t)?(function(n){let u=n.split("."),o=u.length;if(u[o-1]||o--,o>4)return null;let a=0;for(let p=0;p<o-1;p++){let g=X(u[p]);if(g<0||g>255)return null;a+=g*(1<<8*(3-p))}let h=X(u[o-1]);return h<0||h>=256**(5-o)?null:(a+=h,a)})(t):t}}function lA(A){return typeof A=="number"?(function(t){let n="";return n+=`${(t>>>24&255).toString(10)}.`,n+=`${(t>>>16&255).toString(10)}.`,n+=`${(t>>>8&255).toString(10)}.`,n+=(t&255).toString(10),n})(A):Array.isArray(A)?`[${(function(t){let r=(function(a){let h=-1,p=-1,g=1,D=0;for(let S=0;S<a.length;++S)a[S]!==0?(D>g&&(h=p,g=D),p=-1,D=0):(p===-1&&(p=S),++D);return D>g?p:h})(t),n="",u=!1;for(let o=0;o<=7;++o)if(!(u&&t[o]===0)){if(u&&(u=!1),r===o){n+=o===0?"::":":",u=!0;continue}n+=t[o].toString(16),o!==7&&(n+=":")}return n})(A)}]`:A}function zA(A){A.path.length>0&&(A.path.length!==1||A.scheme!=="file"||!(function(t){return/^[A-Za-z]:$/u.test(t)})(A.path[0]))&&A.path.pop()}function HA(A){return A.username!==""||A.password!==""}function K(A){return A.host===null||A.host===""||A.scheme==="file"}var s=0,i="",d="",m=null,l,_=!1,Y=!1,L=!1,b;function I(A,e,t,r){e||(A=(function(o){let a=0,h=o.length;for(;a<h&&!(o.charCodeAt(a)>32);++a);for(;h>a&&!(o.charCodeAt(h-1)>32);--h);return o.substring(a,h)})(A)),A=(function(o){let a=0;for(;a<o.length;a++){let p=o.charCodeAt(a);if(p===9||p===10||p===13)break}if(a===o.length)return o;let h=o.slice(0,a);for(;a<o.length;a++){let p=o.charCodeAt(a);p!==9&&p!==10&&p!==13&&(h+=o[a])}return h})(A),s=0,i=A,d="",m=t||null,l=e||{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,opaquePath:!1},_=!1,Y=!1,L=!1,b=r||0;let n=ae;switch(r){case 3:case 4:n=J;break;case 5:n=fA;break;case 6:n=N;break;case 7:n=H;break;case 8:n=U}return n(c(A,s))!==1?l:null}function f(A,e){return s+=s===A?v(e):1,s<=i.length}function c(A,e){return e<A.length?A.codePointAt(e):void 0}function v(A){return A!=null&&A>65535?2:1}function LA(A){return A==null?"":A<=65535?String.fromCharCode(A):String.fromCodePoint(A)}var ae=A=>{let e=s;if(A!=null&&(A>=65&&A<=90||A>=97&&A<=122)){let t=s+1;for(A=i.charCodeAt(t);A===43||A===45||A===46||A>=65&&A<=90||A>=97&&A<=122||A>=48&&A<=57;)t++,A=i.charCodeAt(t);return d=i.slice(s,t).toLowerCase(),s=t,fe(t<i.length?A:void 0)}else return b?1:(--s,f(e,A)?NA(c(i,s)):0)},fe=A=>{let e=s;if(A===58){if(b){if(C(l.scheme)!==C(d))return 0;if((HA(l)||l.port!==null)&&d==="file")return 0;if(l.scheme==="file"&&l.host==="")return 0}return l.scheme=d,b?(l.port===RA(l.scheme)&&(l.port=null),0):(d="",l.scheme==="file"?f(e,A)?hA(c(i,s)):0:C(l.scheme)&&m!==null&&m.scheme===l.scheme?f(e,A)?he(c(i,s)):0:C(l.scheme)?f(e,A)?de(c(i,s)):0:c(i,s+1)===47?(s++,f(e,A)?pe(c(i,s)):0):(l.path=[""],l.opaquePath=!0,f(e,A)?TA(c(i,s)):0))}else return b?1:(d="",s=-1,f(e,A)?NA(c(i,s)):0)},NA=A=>{let e=s;return m===null||m.opaquePath&&A!==35?1:m.opaquePath&&A===35?(l.scheme=m.scheme,l.path=m.path.slice(),l.opaquePath=m.opaquePath,l.query=m.query,l.fragment="",f(e,A)?U(c(i,s)):0):m.scheme==="file"?(s--,f(e,A)?hA(c(i,s)):0):(s--,f(e,A)?aA(c(i,s)):0)},he=A=>{let e=s;return A===47&&c(i,s+1)===47?(++s,f(e,A)?V(c(i,s)):0):(s--,f(e,A)?aA(c(i,s)):0)},pe=A=>{let e=s;return A===47?f(e,A)?T(c(i,s)):0:(s--,f(e,A)?q(c(i,s)):0)},aA=A=>{let e=s;return l.scheme=m.scheme,A===47||C(l.scheme)&&A===92?f(e,A)?EA(c(i,s)):0:(l.username=m.username,l.password=m.password,l.host=m.host,l.port=m.port,l.path=m.path.slice(),l.query=m.query,A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(l.query=null,l.path.pop(),s--,f(e,A)?q(c(i,s)):0):f(e,A)?aA(c(i,s)):0)},EA=A=>{let e=s;return C(l.scheme)&&(A===47||A===92)?f(e,A)?V(c(i,s)):0:A===47?f(e,A)?T(c(i,s)):0:(l.username=m.username,l.password=m.password,l.host=m.host,l.port=m.port,s--,f(e,A)?q(c(i,s)):0)},de=A=>{let e=s;return A===47&&c(i,s+1)===47?s++:s--,f(e,A)?V(c(i,s)):0},V=A=>{let e=s;return A!==47&&A!==92?(s--,f(e,A)?T(c(i,s)):0):f(e,A)?V(c(i,s)):0},T=A=>{let e=s;if(A!=null&&A!==64&&A!==35&&A!==47&&A!==63&&(A!==92||!C(l.scheme))){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===64||r===35||r===47||r===63||r===92&&C(l.scheme))break;t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?T(c(i,s)):0}if(A===64){_&&(d=`%40${d}`),_=!0;for(let t=0;t<d.length;t++){let r=d.codePointAt(t);if(r===58&&!Y){Y=!0;continue}let n=qA(r,G);Y?l.password+=n:l.username+=n,r!=null&&r>65535&&t++}return d="",f(e,A)?T(c(i,s)):0}else return A==null||A===35||A===47||A===63||A===92&&C(l.scheme)?_&&d===""?1:(s-=d.length+1,d="",f(e,A)?J(c(i,s)):0):(d+=LA(A),f(e,A)?T(c(i,s)):0)},J=A=>{let e=s;if(b&&l.scheme==="file")return s--,f(e,A)?pA(c(i,s)):0;if(A!=null&&A!==58&&A!==35&&A!==47&&A!==63&&(A!==92||!C(l.scheme))){let t=s+v(A);for(A===91?L=!0:A===93&&(L=!1);t<i.length;){let r=c(i,t);if(r==null||!L&&r===58||r===35||r===47||r===63||r===92&&C(l.scheme))break;r===91?L=!0:r===93&&(L=!1),t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?J(c(i,s)):0}else if(A===58&&!L){if(d===""||b===4)return 1;let t=iA(d,!C(l.scheme));return t===null?1:(l.host=lA(t),d="",f(e,A)?fA(c(i,s)):0)}else if(A==null||A===35||A===47||A===63||A===92&&C(l.scheme)){if(s--,C(l.scheme)&&d==="")return 1;if(b&&d===""&&(HA(l)||l.port!==null))return 1;let t=iA(d,!C(l.scheme));return t===null?1:(l.host=lA(t),d="",b?0:f(e,A)?N(c(i,s)):0)}else return d+=LA(A),f(e,A)?J(c(i,s)):0},fA=A=>{let e=s;if(A!=null&&A>=48&&A<=57){let t=s+1;for(;t<i.length;){let r=i.charCodeAt(t);if(r<48||r>57)break;t++}return d+=i.slice(s,t),s=t-1,f(e,A)?fA(c(i,s)):0}else if(b||A==null||A===35||A===47||A===63||A===92&&C(l.scheme)){if(d!==""){let t=parseInt(d,10);if(t>65535)return 1;if(l.port=t===RA(l.scheme)?null:t,d="",b)return 0}return b?1:(s--,f(e,A)?N(c(i,s)):0)}else return 1};function $A(A,e){let t=A.length-e;if(t<2)return!1;if(kA(c(A,e),c(A,e+1))){if(t===2)return!0;{let r=c(A,e+2);return r===47||r===92||r===63||r===35}}else return!1}var hA=A=>{let e=s;return l.scheme="file",l.host="",A===47||A===92?f(e,A)?ge(c(i,s)):0:m?.scheme==="file"?(l.host=m.host,l.path=m.path.slice(),l.opaquePath=m.opaquePath,l.query=m.query,A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(l.query=null,$A(i,s)?l.path=[]:zA(l),s--,f(e,A)?q(c(i,s)):0):f(e,A)?hA(c(i,s)):0):(s--,f(e,A)?q(c(i,s)):0)},ge=A=>{let e=s;return A===47||A===92?f(e,A)?pA(c(i,s)):0:(m!==null&&m.scheme==="file"&&(!$A(i,s)&&(function(r){if(r.length===2){let n=r.codePointAt(0),u=r.codePointAt(1);return(n>=65&&n<=90||n>=97&&n<=122)&&u===58}else return!1})(m.path[0])&&l.path.push(m.path[0]),l.host=m.host),s--,f(e,A)?q(c(i,s)):0)},pA=A=>{let e=s;if(A!=null&&A!==47&&A!==92&&A!==63&&A!==35){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===47||r===92||r===63||r===35)break;t+=v(r)}return d+=i.slice(s,t),s=t-1,f(e,A)?pA(c(i,s)):0}else if(A==null||A===47||A===92||A===63||A===35){if(s--,!b&&UA(d))return f(e,A)?q(c(i,s)):0;if(d==="")return l.host="",b?0:f(e,A)?N(c(i,s)):0;{let t=iA(d,!C(l.scheme));return t===null?1:(t==="localhost"&&(t=""),l.host=lA(t),d="",b?0:f(e,A)?N(c(i,s)):0)}}return 1},N=A=>{let e=s;return C(l.scheme)?(A!==92&&A!==47&&s--,f(e,A)?q(c(i,s)):0):!b&&A===63?(l.query="",f(e,A)?H(c(i,s)):0):!b&&A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):A!=null?(A!==47&&s--,f(e,A)?q(c(i,s)):0):(b&&l.host===null&&l.path.push(""),f(e,A)?N(c(i,s)):0)},q=A=>{let e=s;if(A!=null&&A!==47&&(!C(l.scheme)||A!==92)&&(b||A!==63&&A!==35)){let t=s+v(A);for(;t<i.length;){let r=c(i,t);if(r==null||r===47||C(l.scheme)&&r===92||!b&&(r===63||r===35))break;t+=v(r)}d+=k(i.slice(s,t),rA),s=t,A=c(i,t)}if(A==null||A===47||C(l.scheme)&&A===92||!b&&(A===63||A===35)){let t=C(l.scheme)&&A===92;return(function(n){switch(n){case"..":case"%2e.":case"%2E.":case".%2e":case".%2E":case"%2e%2e":case"%2E%2e":case"%2e%2E":case"%2E%2E":return!0;default:return!1}})(d)?(zA(l),A!==47&&!t&&l.path.push("")):bA(d)&&A!==47&&!t?l.path.push(""):bA(d)||(l.scheme==="file"&&l.path.length===0&&UA(d)&&(d=`${d[0]}:`),l.path.push(d)),d="",A===63?(l.query="",f(e,A)?H(c(i,s)):0):A===35?(l.fragment="",f(e,A)?U(c(i,s)):0):f(e,A)?q(c(i,s)):0}else return d+=qA(A,rA),f(e,A)?q(c(i,s)):0},TA=A=>{let e=s;if(A===63)return l.query="",f(e,A)?H(c(i,s)):0;if(A===35)return l.fragment="",f(e,A)?U(c(i,s)):0;if(A!=null){let t=s+v(A);for(;t<i.length;){let n=c(i,t);if(n===63||n===35)break;t+=v(n)}let r=i.slice(s,t);if(t<i.length&&r.charCodeAt(r.length-1)===32?l.path[0]+=k(r.slice(0,-1),O)+"%20":l.path[0]+=k(r,O),s=t,(A=c(i,t))===63)return l.query="",f(e,A)?H(c(i,s)):0;if(A===35)return l.fragment="",f(e,A)?U(c(i,s)):0}return f(e,A)?TA(c(i,s)):0},H=A=>{let e=s,t=s;if(A!=null){if(b)t=i.length;else{let n=i.indexOf("#",s);t=n===-1?i.length:n}let r=C(l.scheme)?FA:uA;l.query+=k(i.slice(s,t),r)}return s=t,c(i,t)===35&&!b?(l.fragment="",f(e,A)?U(c(i,s)):0):f(e,A)?H(c(i,s)):0},U=A=>{let e=s;return A!=null&&(l.fragment+=k(i.slice(s),QA),s=i.length),f(e,A)?U(c(i,s)):0};function oA(A){if(A.opaquePath)return A.path[0];{let e="";for(let t of A.path)e+=`/${t}`;return e}}function xA(A){switch(A.scheme){case"blob":{let e=I(oA(A),null,null,0);return e===null||e.scheme!=="http"&&e.scheme!=="https"?"null":xA(e)}case"ftp":case"http":case"https":case"ws":case"wss":return(function(t){let r=`${t.scheme}://`;return r+=t.host,t.port!==null&&(r+=`:${t.port}`),r})(A);default:return"null"}}var w=Symbol("URLImpl"),j=class A{constructor(e,t){if(e===void 0&&t===void 0)throw new TypeError('The "url" argument must be specified.');e=P(e),t!=null&&(t=P(t));let r=null;if(t!=null&&(r=I(t,null,null,0),r==null))throw new TypeError(`Invalid base URL: ${t}`);let n=I(e,null,r,0);if(n==null)throw new TypeError(`Invalid URL: ${e}`);this[w]={url:n,query:null}}static createObjectURL(e){throw new TypeError("URL.createObjetURL is unsupported")}static revokeObjectURL(e){}static parse(e,t){e=P(e),t!==void 0&&(t=P(t));try{return new A(e,t)}catch{return null}}static canParse(e,t){e=P(e),t!==void 0&&(t=P(t));let r=null;return t!=null&&(r=I(t,null,null,0),r==null)?!1:I(e,null,r,0)!=null}get href(){return(function(t){let r=`${t.scheme}:`;return t.host!==null&&(r+="//",(t.username!==""||t.password!=="")&&(r+=t.username,t.password!==""&&(r+=`:${t.password}`),r+="@"),r+=t.host,t.port!==null&&(r+=`:${t.port}`)),t.host===null&&!t.opaquePath&&t.path.length>1&&t.path[0]===""&&(r+="/."),r+=oA(t),t.query!==null&&(r+=`?${t.query}`),t.fragment!==null&&(r+=`#${t.fragment}`),r})(this[w].url)}set href(e){let t=I(e=P(e),null,null,0);if(t==null)throw new TypeError(`Invalid URL: ${e}`);this[w].url=t,this[w].query&&Z(this[w].query,t.query)}get origin(){return xA(this[w].url)}get protocol(){return`${this[w].url.scheme}:`}set protocol(e){I(`${e=P(e)}:`,this[w].url,null,2)}get username(){return this[w].url.username}set username(e){e=P(e),K(this[w].url)||(function(r,n){r.username=k(n,G)})(this[w].url,e)}get password(){return this[w].url.password}set password(e){e=P(e),K(this[w].url)||(function(r,n){r.password=k(n,G)})(this[w].url,e)}get host(){let{url:e}=this[w];return e.host==null?"":e.port==null?e.host:`${e.host}:${e.port}`}set host(e){e=P(e),this[w].url.opaquePath||I(e,this[w].url,null,3)}get hostname(){let{url:e}=this[w];return e.host!=null?e.host:""}set hostname(e){e=P(e),this[w].url.opaquePath||I(e,this[w].url,null,4)}get port(){let{url:e}=this[w];return e.port!=null?`${e.port}`:""}set port(e){e=P(e);let{url:t}=this[w];K(t)||(e?I(e,t,null,5):t.port=null)}get pathname(){return oA(this[w].url)}set pathname(e){e=P(e);let{url:t}=this[w];t.opaquePath||(t.path=[],I(e,t,null,6))}get search(){let{url:e}=this[w];return e.query?`?${e.query}`:""}set search(e){e=P(e);let{url:t,query:r}=this[w];if(!e)t.query=null,r&&Z(r,null);else{let n=e[0]==="?"?e.substring(1):e;t.query="",I(n,t,null,7),r&&Z(r,t.query)}}get searchParams(){let e=this[w],t=e.query;return t==null&&(t=e.query=(function(n,u){let o=new W;return o[y].url=n,o[y].serialized=u==null,u&&(o[y].list=cA(u)),o})(this,e.url.query)),t}get hash(){let{url:e}=this[w];return e.fragment?`#${e.fragment}`:""}set hash(e){e=P(e);let{url:t}=this[w];if(!e)t.fragment=null;else{let r=e[0]==="#"?e.substring(1):e;t.fragment="",I(r,t,null,8)}}toJSON(){return this.href}toString(){return this.href}};Object.defineProperty(j.prototype,Symbol.toStringTag,{value:"URL",configurable:!0});var y=Symbol("URLSearchParamsImpl"),me=Symbol.dispose||Symbol.for("dispose");function Z(A,e){e?A[y].list=cA(e):A[y].list.length=0,A[y].serialized=e==null}function Q(A){if(A.url){let e=nA(A.list);(function(r,n){r[w].url.query=n})(A.url,e||null),A.serialized=!0}}var we=typeof Iterator<"u"?Iterator:Object,M=class extends we{constructor(e,t){super(),this[y]={ptr:e,map:t,index:0}}next(){let e=this[y];return e.index<e.ptr.list.length?{value:e.map(e.ptr.list[e.index++]),done:!1}:{value:void 0,done:!0}}[Symbol.iterator](){return this}[me](){}},W=class{constructor(e){let t=this[y]={list:[],url:null,serialized:!0},r;if(Array.isArray(e))for(let n=0;n<e.length;n++)t.list.push(wA(e[n]));else if((r=IA(e))!=null){let n;for(;!(n=AA(r.next())).done;)t.list.push(wA(n.value))}else if((typeof e=="object"||typeof e=="function")&&e!=null){let n=Object.keys(e);for(let u=0;u<n.length;u++){let o=n[u],a=OA(o),h=P(e[o]),p=t.list.find(g=>g[0]===a);p?p[1]=h:t.list.push([a,h])}}else if(e!==void 0){let n=P(e);n=n[0]==="?"?n.substring(1):n,t.list=cA(n)}}get size(){return this[y].list.length}append(e,t){e=P(e),t=P(t),this[y].list.push([e,t]);let r=this[y];r.url&&r.serialized?(function(u,o){let a=u[w].url;a.query=a.query?`${a.query}&${o}`:o})(r.url,nA([[e,t]])):Q(r)}delete(e,t){e=P(e),t=t!=null?P(t):void 0;let{list:r}=this[y],n=0;for(;n<r.length;)r[n][0]===e&&(t==null||r[n][1]===t)?r.splice(n,1):n++;Q(this[y])}get(e){e=P(e);let{list:t}=this[y];for(let r=0;r<t.length;r++)if(t[r][0]===e)return t[r][1];return null}getAll(e){e=P(e);let t=[],{list:r}=this[y];for(let n=0;n<r.length;n++)r[n][0]===e&&t.push(r[n][1]);return t}has(e,t){e=P(e),t=t!=null?P(t):void 0;let{list:r}=this[y];for(let n=0;n<r.length;n++)if(r[n][0]===e&&(t==null||r[n][1]===t))return!0;return!1}set(e,t){e=P(e),t=P(t);let{list:r}=this[y],n=!1,u=!1,o=0;for(;o<r.length;)r[o][0]===e?n?(r.splice(o,1),u=!0):(n=!0,r[o][1]!==t&&(r[o][1]=t,u=!0),o++):o++;n||(r.push([e,t]),u=!0),u&&Q(this[y])}sort(){this[y].list.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),Q(this[y])}forEach(e,t){if(typeof e!="function")throw new TypeError('The "callback" argument must be of type function');let{list:r}=this[y];for(let n=0;n<r.length;n++)e.call(t,r[n][1],r[n][0],this)}entries(){return new M(this[y],e=>e)}keys(){return new M(this[y],e=>e[0])}values(){return new M(this[y],e=>e[1])}toString(){return nA(this[y].list)}[Symbol.iterator](){return this.entries()}};Object.defineProperty(W.prototype,Symbol.toStringTag,{value:"URLSearchParams",configurable:!0});var Pe=$.trackUsage.request.shape.command,ye=$.trackUsage.response,De=$.checkEntitlement.request.omit({customerId:!0}).strict();function Ie(A){let e=gA.parse(A.scope),t=mA({...A,scope:e},void 0,j),r=0,n=!1;return{identify(u){if(!/^gg_ct_[A-Za-z0-9_-]{32,128}$/.test(u))throw new R("INVALID_TOKEN","A Customer Token is required");r++,t.identify(u),n=!0},reset(){r++,n=!1,t.reset()},async readHoldings(){let u=$.readHoldings;return u.response.parse(await t.request(u.path,{}))},async checkEntitlement(u){let o=$.checkEntitlement,a=De.parse(u);return o.response.parse(await t.request(o.path,a))},async trackUsage(u){if(!n)throw new R("UNAUTHENTICATED","Identify the Customer first");if(!A.usageReporter)throw new R("INVALID_REQUEST","Configure your authenticated backend usageReporter");let o=Pe.parse(u),a=r,h;try{h=await A.usageReporter(o)}catch(g){throw a!==r?new R("IDENTITY_CHANGED","Customer identity changed during usage reporting"):g}if(a!==r)throw new R("IDENTITY_CHANGED","Customer identity changed during usage reporting");let p=ye.parse(h);if(p.scope.projectId!==e.projectId||p.scope.environment!==e.environment)throw new R("INVALID_RESPONSE","Usage response scope differs");return p}}}export{R as IndianaError,Ie as createIndianaReactNative};
package/dist/server.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import 'zod';
2
2
  export { I as IndianaError } from './errors-DrdTlPwf.js';
3
- export { f as AiPricingOptions, d as AiTokenQuote, b as AiTokenUsage, a as AiUsageContext, g as AiUsageMiddlewareOptions, h as AiUsageRecord, i as aiPriceSnapshotSchema, j as aiTokenQuoteSchema, c as createAiPricing, k as createAiUsageMiddleware, l as createConfiguredAiPricing } from './ai-usage-B4W5m4Ie.js';
4
- import './screen-16d-xADb.js';
5
- export { h as FeatureClient, e as FeatureClientOptions, r as FunnelDecisionInput, s as FunnelDecisionTimeoutError, t as FunnelDecisionUsedInput, u as FunnelLocalEvaluation, v as FunnelLocalEvaluator, w as FunnelLocalEvaluatorOptions, x as FunnelLocalSession, y as FunnelLocalSessionOptions, i as FunnelNodeEvaluationContext, z as FunnelSignalInput, g as FunnelStartInput, A as IndianaServerOptions, L as LocalFunnelClient, k as LocalFunnelClientOptions, n as createFeatureClient, B as createFunnelCampaignClient, C as createFunnelDecisionClient, D as createFunnelLocalEvaluator, E as createFunnelOrchestrationClient, G as createFunnelStartClient, H as createGuestToken, J as createIndianaServer, o as createLocalFunnelClient, K as createNativeReceiptClient, M as createPaywallStartClient, N as createSynchronizedFunnelLocalEvaluator, q as evaluateFunnelNode, O as renewFunnelRun } from './funnel-runtime-start-sZ8ZCNlq.js';
6
- export { C as ConfigurationSync, c as createConfigurationSync } from './configuration-sync-C2mytNwU.js';
3
+ export { f as AiPricingOptions, d as AiTokenQuote, b as AiTokenUsage, a as AiUsageContext, g as AiUsageMiddlewareOptions, h as AiUsageRecord, i as aiPriceSnapshotSchema, j as aiTokenQuoteSchema, c as createAiPricing, k as createAiUsageMiddleware, l as createConfiguredAiPricing } from './ai-usage-BsrSG955.js';
4
+ import './screen-iFngkxaL.js';
5
+ export { j as FeatureClient, g as FeatureClientOptions, t as FunnelDecisionInput, u as FunnelDecisionTimeoutError, v as FunnelDecisionUsedInput, w as FunnelLocalEvaluation, x as FunnelLocalEvaluator, y as FunnelLocalEvaluatorOptions, z as FunnelLocalSession, A as FunnelLocalSessionOptions, k as FunnelNodeEvaluationContext, B as FunnelSignalInput, i as FunnelStartInput, C as IndianaServerOptions, L as LocalFunnelClient, m as LocalFunnelClientOptions, p as createFeatureClient, D as createFunnelCampaignClient, E as createFunnelDecisionClient, G as createFunnelLocalEvaluator, H as createFunnelOrchestrationClient, J as createFunnelStartClient, K as createGuestToken, M as createIndianaServer, q as createLocalFunnelClient, N as createNativeReceiptClient, O as createPaywallStartClient, Q as createSynchronizedFunnelLocalEvaluator, s as evaluateFunnelNode, T as renewFunnelRun } from './funnel-runtime-start-ChVYbLzV.js';
6
+ export { C as ConfigurationSync, c as createConfigurationSync } from './configuration-sync-Bvd956GL.js';
7
7
  import '@ai-sdk/provider';
8
8
  import 'zod/v4';
9
9
  import './growth-rules-B4YYy64R.js';
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- import{a as j,b,c as pe,d as le,e as de,f as me,i as fe,j as Se,k as Ee,l as qe,m as Ae}from"./chunk-63BWE27V.js";import{a as Ce,b as Re,c as Fe,d as Le}from"./chunk-2EJSV6BA.js";import{a as q}from"./chunk-QG3WUJG5.js";import{Ig as U,Ii as B,Ji as se,Lg as X,Li as _,Mi as oe,Ng as Z,Rh as M,Tg as te,Tj as ie,Uj as ce,Vf as o,ch as V,dh as ne,dl as ue,fh as re,qh as N,rh as R,sh as ae}from"./chunk-HTRQPMJO.js";import"./chunk-S5TVMQRC.js";import{b as Y,h as W}from"./chunk-ISUXYPYL.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import{a as s}from"./chunk-5TEZEOHX.js";import{Rb as ee}from"./chunk-RMJJOSVZ.js";import{B as $,b as H,m as J}from"./chunk-S2MSIA57.js";function p(n,r){try{return n.parse(r)}catch{throw new s("INVALID_RESPONSE","Invalid gateway response")}}function we(n){let r=le(n),t=i=>{throw new s("INVALID_RESPONSE",i)};r.nodes.size!==n.topology.nodes.length&&t("Duplicate local node identity"),r.nodes.get(n.topology.entry)?.type!=="entry"&&t("A local Funnel must start at Entry");let e=new Set(["entry","condition","feature","split","end","output"]);for(let i of r.nodes.values()){if(!e.has(i.type))throw new s("SERVER_REQUIRED","This Funnel requires authoritative server execution");if(i.type==="entry"&&i.id!==n.topology.entry&&t("Unexpected Entry node"),["entry","feature"].includes(i.type)&&!i.outputs.next&&t("Local next exit is unavailable"),i.type==="feature"){let c=i.resources.featureKey;(!c||!Object.hasOwn(n.evaluation.variables,i.writes.value)||!Object.hasOwn(r.features,c))&&t("Local Feature definition or declaration is unavailable")}if(i.type==="condition"){let c=n.conditions[i.id];(!c||!i.outputs.default||c.some((f,m)=>f.port!==`case:${m}`||!i.outputs[f.port]))&&t("Local Condition exits are unavailable")}if(i.type==="split"&&(!i.resources.experimentId||!Object.hasOwn(n.growth.experiments,i.resources.experimentId)||!i.outputs.notParticipating)&&t("Local Experiment definition or exit is unavailable"),i.type==="end"||i.type==="output"){let c=n.evaluation.terminals[i.id];if(!c)throw new s("SERVER_REQUIRED","Terminal resource delivery requires the server");Object.keys(i.outputs).length&&t("A terminal cannot have outgoing edges"),c.output?.type==="feature"&&!Object.hasOwn(r.features,c.output.featureKey)&&t("Terminal Feature definition is unavailable")}for(let c of Object.values(i.outputs))r.nodes.has(c)||t("Local target is unavailable")}let a=new Set,u=new Set;function l(i){if(u.has(i)&&t("Local graph contains a cycle"),!a.has(i)){u.add(i);for(let c of Object.values(r.nodes.get(i).outputs))l(c);u.delete(i),a.add(i)}}return l(n.topology.entry),a.size!==r.nodes.size&&t("Local graph contains unreachable nodes"),{evaluate(i){let c={},f=i.context;f.features=r.features,f.savedGroups=r.savedGroups;let m=()=>{f.attributes=Z({declarations:n.evaluation.variables,attributes:i.attributes,parameters:i.parameters,answers:{},results:c,savedGroups:r.savedGroups})};m();let I=n.topology.entry,d=0;for(;;){let w=r.nodes.get(I);if(w.type==="end"||w.type==="output"){let y=n.evaluation.terminals[I],h=y.output,v=h?.type==="feature"?r.feature(h.featureKey,f):h?.type==="variable"?te({source:"variable",key:h.key,...h.path?{path:h.path}:{}},{declarations:n.evaluation.variables,answers:{},results:c,parameters:i.parameters,attributes:i.attributes,savedGroups:r.savedGroups}):h?.value??null;return U(n.evaluation.outputSchema,v)||t("Local output does not match its declaration"),{outcome:y.outcome,value:v}}if(d++>=n.evaluation.maxTransitions)throw new s("TRANSITION_LIMIT","Local Funnel transition budget exceeded");if(w.type==="entry")I=w.outputs.next;else{let y=r.evaluate(I,f);if(w.type==="feature"){let h=w.writes.value,v=y.value??null;U(n.evaluation.variables[h],v)||t("Local Feature value does not match its declaration"),X(n.evaluation.variables,{writes:w.writes},{[h]:v}),c[h]=v,m()}I=y.target}}}}}import{z as ye}from"zod";function Ie(n,r,t){let e=J.parse(n.attributes);if(["parameters","answers","results"].some(S=>Object.hasOwn(e,S)))throw new s("INVALID_REQUEST","Flow namespaces cannot be caller attributes");let a=ee.parse(n.parameters??{}),u=ye.record(ye.string(),$).parse(n.stickyBucketAssignmentDocs??{});for(let[S,g]of Object.entries(u))if(S!==`${g.attributeName}||${g.attributeValue}`||!Object.hasOwn(e,g.attributeName)||H(e[g.attributeName])!==g.attributeValue)throw new s("INVALID_REQUEST","Sticky document identity does not match this session");let l=n.saveStickyBucketAssignmentDoc,i=n.onFeatureUsage,c=n.onExperimentViewed,f=n.onError,m=new Map,I=new Set,d={},w=Promise.resolve();function y(S){let g=w.then(()=>(t(),S()));return w=g.catch(()=>{}),g}function h(S){try{f?.(S)}catch{}}function v(S){try{let g=S();g&&typeof g.catch=="function"&&g.catch(h)}catch(g){h(g)}}async function L(){for(let[S,g]of m){if(t(),l)try{await l(structuredClone(g))}catch{throw new s("STICKY_SAVE_FAILED","Persist the pending Sticky assignment before using this evaluation")}t(),m.delete(S)}}return{evaluate(S={}){let g=S.track===!0;return y(async()=>{let D=await r();t(D);let K=new Set(I),z={...d},Q=new Map,T=[],he={stickyBucketAssignmentDocs:structuredClone(u),saveStickyBucketAssignmentDoc(E){Q.set(`${E.attributeName}||${E.attributeValue}`,structuredClone(E))},...g?{trackedExperiments:K,trackedFeatureUsage:z,onExperimentViewed(E,C){let P=structuredClone(E),ve=structuredClone(C);c&&T.push(()=>c(structuredClone(P),structuredClone(ve)))},onFeatureUsage(E,C){let P=structuredClone(C);i&&T.push(()=>i(E,structuredClone(P)))}}:{}},ge=D.program.evaluate({attributes:e,parameters:a,context:he});t(D);for(let[E,C]of Q)u[E]=C,m.set(E,C);await L(),t(D),g&&(I=K,d=z);for(let E of T)v(E);let O=D.configuration;return structuredClone({evaluationMode:"local",scope:O.scope,funnelId:O.funnelId,versionId:O.versionId,evaluationRevision:O.evaluationRevision,generation:O.growth.generation,...ge})})},flush:()=>y(L),get stickyBucketAssignmentDocs(){return t(),structuredClone(u)}}}var De=6e4;function x(n){if(typeof window<"u")throw new s("SERVER_ONLY","Local Funnel sessions run on your backend");let r=Y.parse(n.scope),t=n.funnelId,e=n.load,a,u,l,i=0,c=I=>Date.now()>=I.expiresAt;async function f(){if(u)return u;let I=i;a=void 0;let d=(async()=>{let w=await e();if(I!==i)throw new s("IDENTITY_CHANGED","Local evaluator was reset");if(w&&typeof w=="object"&&"evaluationMode"in w&&w.evaluationMode==="remote")throw p(_,w),new s("EVALUATION_MODE","This Funnel requires remote decide");let y=p(oe,w);if(I!==i)throw new s("IDENTITY_CHANGED","Local evaluator was reset");if(y.scope.projectId!==r.projectId||y.scope.environment!==r.environment||y.funnelId!==t)throw new s("SCOPE_MISMATCH","Local configuration scope changed");if(y.growth.scope.projectId!==r.projectId||y.growth.scope.environment!==r.environment||y.growth.expiresAt!==y.expiresAt)throw new s("INVALID_RESPONSE","GB configuration scope or expiry changed");let h=Math.min(Date.now()+De,y.expiresAt?Date.parse(y.expiresAt):1/0);if(Date.now()>=h)throw new s("CONFIGURATION_EXPIRED","Refresh expired local rules");let v=JSON.stringify([r.projectId,r.environment,t,y.versionId,y.evaluationRevision,y.growth.generation]),L=[y.topology,y.conditions,y.evaluation,y.growth.features,y.growth.experiments,y.growth.savedGroups];if(l?.key===v&&!pe(l.body,L))throw new s("INVALID_RESPONSE","Immutable local configuration identity changed");return l?.key!==v&&(l={key:v,body:L,program:we(y)}),a={key:v,configuration:y,expiresAt:h,program:l.program},a})();u=d;try{return await d}finally{u===d&&(u=void 0)}}function m(){return u??(a&&!c(a)?Promise.resolve(a):f())}return{session(I){let d=i;return Ie(I,m,w=>{if(n.assertUsable?.(),d!==i)throw new s("IDENTITY_CHANGED","Local evaluator was reset");if(w&&(c(w)||a?.key!==w.key))throw new s("CONFIGURATION_EXPIRED","Refresh local rules before using this result")})},async refresh(){return structuredClone((await f()).configuration)},reset(){i++,a=void 0,u=void 0,l=void 0}}}function Oe(n,r){let t=n.snapshot?.generation,e=x({scope:{projectId:n.scope.projectId,environment:n.scope.environment},funnelId:r,load:()=>n.localFunnel(r),assertUsable:()=>n.assertFunnel(r)}),a=n.subscribe(()=>{let l=n.snapshot?.generation;n.fresh&&l!==t&&(t=l,e.refresh().catch(()=>{}))}),u=e.session;return Object.assign(e,{session(l){let i=u(l),c=i.evaluate;return Object.assign(i,{async evaluate(...f){return n.fresh||await n.refresh(),c(...f)}})},destroy(){a(),e.reset()}})}function _e(n){if(typeof window<"u")throw new s("SERVER_ONLY","Secret API keys must stay on the backend");return{start:r=>fe(n,r)}}var F=class extends s{constructor(t,e){super("DECISION_PENDING","Decision is still pending; read this decision ID or retry the original request ID",202,e);this.decisionId=t;this.decisionRequestId=e}decisionId;decisionRequestId};async function k(n,r,t,e){let{decisionId:a,requestId:u}=n,l=n,i=250;for(;;){if(l.decisionId!==a||l.requestId!==u||l.decision&&!b(l.decision,r))throw new s("INVALID_RESPONSE","Decision request or customer changed");if(l.decision)return l.decision;if(l.status==="failed")throw new s("DECISION_FAILED","Decision execution failed",503,u);if(Date.now()>=t)throw new F(a,u);if(await new Promise(c=>setTimeout(c,Math.min(i,t-Date.now()))),Date.now()>=t)throw new F(a,u);i=Math.min(1e3,i*2);try{l=await e(a,t)}catch(c){if(c instanceof s&&["TIMEOUT","NETWORK_ERROR","SERVICE_UNAVAILABLE","RATE_LIMITED"].includes(c.code))continue;throw c}}}function G(n){if("remoteEval"in n)throw new s("INVALID_REQUEST","Configure evaluation mode on the Funnel; remoteEval is not supported");if(typeof window<"u")throw new s("SERVER_ONLY","Funnel decisions are requested by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new s("INVALID_TOKEN","A server API key is required");let r,t,e=new Map;async function a(c,f){let m=c;m.status!=="pending"&&e.delete(m.decisionId);for(let I=0;I<32&&m.evaluation;I++){let d=m.evaluation;if(d.runId!==m.decisionId)throw new s("INVALID_RESPONSE","Local evaluation Run changed");let w=e.get(m.decisionId);if(!w&&d.type==="evaluate_segment"){let h=ue.parse(await u({operation:"segment_configuration",funnelId:n.funnelId,versionId:d.versionId},f));if(h.configuration.scope.projectId!==n.scope.projectId||h.configuration.scope.environment!==n.scope.environment||h.configuration.funnelId!==n.funnelId||h.configuration.versionId!==d.versionId||h.configuration.evaluationRevision!==d.policyRevision)throw new s("SCOPE_MISMATCH","Original decision segment configuration changed");if(e.size>=128)throw new s("COMMAND_PENDING","Reconcile outstanding decisions first");w={operation:"commit_decision_segment",decisionId:m.decisionId,requestId:M(m.decisionId,d.visit,`segment:${d.revision}`),nodeId:d.nodeId,visit:d.visit,revision:d.revision,policyRevision:d.policyRevision,generation:h.configuration.growth.generation,...me(h.configuration,h.document,d)},e.set(m.decisionId,w)}if(!w){if(d.type!=="evaluate")throw new s("INVALID_RESPONSE","Unknown decision instruction");if((!t||t.versionId!==d.versionId||t.evaluationRevision!==d.policyRevision||t.expiresAt&&Date.parse(t.expiresAt)<=Date.now())&&(t=_.parse(await u({operation:"configuration",funnelId:n.funnelId,versionId:d.versionId},f))),t.scope.projectId!==n.scope.projectId||t.scope.environment!==n.scope.environment||t.funnelId!==n.funnelId)throw new s("SCOPE_MISMATCH","Local evaluation configuration scope changed");if(t.evaluationMode!=="local"||t.versionId!==d.versionId||t.evaluationRevision!==d.policyRevision)throw new s("EVALUATION_MODE","Original Local evaluation policy is unavailable");if(e.size>=128)throw new s("COMMAND_PENDING","Reconcile outstanding Local decisions first");w={operation:"evaluate_decision",decisionId:m.decisionId,requestId:M(m.decisionId,d.visit,"evaluation"),nodeId:d.nodeId,visit:d.visit,revision:d.revision,receiptId:d.receiptId,policyRevision:d.policyRevision,generation:t.growth.generation,result:de(t,d.nodeId,d)},e.set(m.decisionId,w)}let y=R.parse(await u(w,f));if(y.decisionId!==c.decisionId||y.requestId!==c.requestId)throw new s("INVALID_RESPONSE","Decision identity changed during local evaluation");e.delete(m.decisionId),m=y}return m}async function u(c,f,m=!1){let I=q({...n,fetch:(d,w)=>{let y=new Headers(w?.headers);return y.set("Accept-Encoding","identity"),m&&y.set("Prefer","respond-async"),(n.fetch??globalThis.fetch)(d,{...w,headers:y})},timeoutMs:Math.min(n.timeoutMs??1e4,f?Math.max(1,f-Date.now()):12e4)});return I.identify(n.apiKey),I.request("funnels",c)}async function l(c,f){let m=R.parse(await u(N.parse({operation:"read_decision",decisionId:c}),f));if(m.decisionId!==c)throw new s("INVALID_RESPONSE","Decision identity changed");return a(m,f)}async function i(c,f,m=!1){let I=N.options[0].parse({...c,operation:"decide",funnelId:n.funnelId}),d;try{d=R.parse(await u(I,f,m))}catch(w){throw w instanceof s&&["TIMEOUT","NETWORK_ERROR","SERVICE_UNAVAILABLE"].includes(w.code)?new s("DECISION_ACCEPTANCE_UNKNOWN","Decision acceptance is unknown; retry the original request ID and input",w.status,c.requestId):w}if(d.requestId!==c.requestId||d.decision&&!b(d.decision,I.customer))throw new s("INVALID_RESPONSE","Decision request or customer changed");return{response:await a(d,f),customer:I.customer}}return{local(){return r??=x({scope:n.scope,funnelId:n.funnelId,load:()=>u({operation:"local_configuration",funnelId:n.funnelId})})},async configuration(){let c=_.parse(await u({operation:"configuration",funnelId:n.funnelId}));if(c.scope.projectId!==n.scope.projectId||c.scope.environment!==n.scope.environment||c.funnelId!==n.funnelId)throw new s("SCOPE_MISMATCH","Configuration scope changed");return c},features(c={}){return j({...c,scope:n.scope,load:async()=>W.parse(await u({operation:"feature_config",funnelId:n.funnelId}))})},read:c=>l(c),async submit(c){return(await i(c,void 0,!0)).response},async decide(c){let f=Date.now()+3e4,m=await i(c,f);return k(m.response,m.customer,f,l)},async reportUsed(c){let f=ae.parse(await u(N.parse({...c,operation:"report_used"})));if(f.decisionId!==c.decisionId||f.eventId!==c.eventId)throw new s("INVALID_RESPONSE","Usage receipt identity changed");return f}}}function Ne(n){if(typeof window<"u")throw new s("SERVER_ONLY","Native receipts are verified by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new s("INVALID_TOKEN","Server API key required");let r=q({...n,timeoutMs:n.timeoutMs??35e3});return r.identify(n.apiKey),{async recover(t){let e=ie.parse(t);if(e.orderId!==e.receiptId)throw new s("INVALID_REQUEST","Native recovery requires the accepted commercial intent");let a=e.nativeEvidence,u={requestId:e.requestId,customerToken:e.customerToken,purchaseIntentId:e.orderId,...a===null?{intent:"read"}:a.provider==="apple"?{provider:"apple",signedTransaction:a.signedTransaction}:{provider:"google",purchaseToken:a.purchaseToken}},l=o.restoreNativePurchase.response.parse(await r.request(o.restoreNativePurchase.path,u));if(l.operation.requestId!==e.requestId)throw new s("INVALID_RESPONSE","Native receipt request identity changed");let i=ce.parse({scope:l.scope,requestId:e.requestId,orderId:l.operation.orderId,receiptId:l.operation.orderId,orderStatus:l.operation.status,refunded:l.operation.refunded,...l.operation.completion===null?{}:{nativeCompletion:{orderId:l.operation.orderId,receiptId:l.operation.orderId,...l.operation.completion}}});if(i.requestId!==e.requestId||i.orderId!==e.orderId||i.receiptId!==e.receiptId||i.scope.projectId!==n.scope.projectId||i.scope.environment!==n.scope.environment)throw new s("INVALID_RESPONSE","Current order receipt scope changed");return i}}}import{z as be}from"zod";var A=be.number().int().min(0).max(Number.MAX_SAFE_INTEGER);function xe(n,r){let t=A.parse(n.inputTokens.total),e=A.parse(n.outputTokens.total),a=A.parse(n.inputTokens.cacheRead??0),u=A.parse(n.inputTokens.cacheWrite??0),l=A.parse(n.outputTokens.reasoning??0);if(a+u>t||l>e||n.inputTokens.noCache!==void 0&&A.parse(n.inputTokens.noCache)!==t-a-u||n.outputTokens.text!==void 0&&A.parse(n.outputTokens.text)!==e-l)throw new s("AI_USAGE_UNAVAILABLE","Provider token counts do not conserve total usage");return{input:t-a-u,cache_read:a,cache_write:u,output:r==="output"?e:e-l,reasoning:r==="separate"?l:0,input_audio:0,output_audio:0}}function ke(n){if(typeof window<"u")throw new s("SERVER_ONLY","AI usage belongs on the trusted backend");if(!n.modelId||!["output","separate"].includes(n.reasoning))throw new s("INVALID_REQUEST","Model ID and reasoning pricing are required");async function r(e){await n.persist({context:e,modelId:n.modelId,usage:null,tokens:null,quote:null,receipt:null,phase:"incomplete"})}async function t(e,a){let u={context:e,modelId:n.modelId,usage:a,tokens:null,quote:null,receipt:null,phase:"captured"};await n.persist(u);let l=n.mapTokens?n.mapTokens(a):xe(a,n.reasoning),i=await n.pricing.quoteTokens({modelId:n.modelId,tokens:l});await n.persist({...u,tokens:l,quote:i,phase:"quoted"});let c=await n.pricing.trackTokens(n.client,{...e,quote:i});if(!c.receipt.accepted)throw new s("AI_BALANCE_REJECTED","AI usage was captured but the balance operation was rejected");await n.persist({...u,tokens:l,quote:i,receipt:c,phase:"settled"})}return{specificationVersion:"v4",async wrapGenerate({doGenerate:e}){let a=await n.context(),u;try{u=await e()}catch(l){throw await r(a),l}return await t(a,u.usage),u},async wrapStream({doStream:e}){let a=await n.context(),u;try{u=await e()}catch(m){throw await r(a),m}let l=!1,i=!1,c=u.stream.getReader();async function f(){l||i||(i=!0,await r(a))}return{...u,stream:new ReadableStream({async pull(m){try{let{value:I,done:d}=await c.read();if(d){if(!l)throw await f(),new s("AI_USAGE_UNAVAILABLE","Stream ended without final usage; no amount was invented");m.close();return}if(I.type==="finish"){if(l)throw new s("AI_USAGE_UNAVAILABLE","Provider sent more than one final usage record");l=!0,await t(a,I.usage)}m.enqueue(I)}catch(I){try{await f()}finally{m.error(I),await c.cancel(I)}}},async cancel(m){try{await f()}finally{await c.cancel(m)}}})}}}}function Te(n){if(typeof window<"u")throw new s("SERVER_ONLY","Funnel receipts are sent by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new s("INVALID_TOKEN","A server API key is required");let r=q(n);return r.identify(n.apiKey),{async signal(t){let e=V.parse({...t,operation:"signal"}),a=ne.parse(await r.request("funnels",e));if(a.runId!==t.runId||a.eventId!==t.eventId||a.scope.projectId!==n.scope.projectId||a.scope.environment!==n.scope.environment)throw new s("INVALID_RESPONSE","Receipt identity changed");return a},async readResults(t){let e=V.parse({operation:"read_results",runId:t}),a=re.parse(await r.request("funnels",e));if(a.runId!==t||a.scope.projectId!==n.scope.projectId||a.scope.environment!==n.scope.environment)throw new s("INVALID_RESPONSE","Result identity changed");return a}}}function Pe(n){if("remoteEval"in n)throw new s("INVALID_REQUEST","Configure evaluation mode on the Funnel; remoteEval is not supported");if(typeof window<"u")throw new s("SERVER_ONLY","Campaign entry requires your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new s("INVALID_TOKEN","A server API key is required");let r=q({...n,timeoutMs:n.timeoutMs??35e3});return r.identify(n.apiKey),{async decide(t){let e=Date.now()+(n.timeoutMs??3e4),a=B.parse({...t,funnelId:n.funnelId,operation:"campaign_decide"}),u=q({...n,timeoutMs:Math.min(n.timeoutMs??35e3,Math.max(1,e-Date.now()))});u.identify(n.apiKey);let l=R.parse(await u.request("funnels",a));if(l.scope.projectId!==n.scope.projectId||l.scope.environment!==n.scope.environment)throw new s("SCOPE_MISMATCH","Campaign scope changed");return k(l,a.customer,e,(i,c)=>G({...n,timeoutMs:Math.min(n.timeoutMs??1e4,Math.max(1,c-Date.now()))}).read(i))},async start(t){let e=B.parse({...t,funnelId:n.funnelId,operation:"campaign_start"}),a=se.parse(await r.request("funnels",e));if(a.scope.projectId!==n.scope.projectId||a.scope.environment!==n.scope.environment)throw new s("SCOPE_MISMATCH","Campaign scope changed");if(!("suppressed"in a)&&(a.run.source.id!==n.funnelId||!a.customerId||e.customer.type==="id"&&a.customerId!==e.customer.value))throw new s("INVALID_RESPONSE","Campaign Funnel or Customer changed");return a}}}function xt(){if(typeof window<"u")throw new s("SERVER_ONLY","Guest identity is issued by your backend");let n=crypto.getRandomValues(new Uint8Array(32));return"gg_gc_"+btoa(String.fromCharCode(...n)).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function kt(n){if(typeof window<"u")throw new s("SERVER_ONLY","Secret API keys must stay on your backend");let r=q(n);return r.identify(n.apiKey),{async listInvoiceTemplates(t={}){let e=o.listInvoiceTemplates;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewInvoice(t){let e=o.previewInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async createInvoice(t){let e=o.createInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageInvoice(t){let e=o.manageInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readInvoiceOperation(t){let e=o.readInvoiceOperation;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listInvoices(t){let e=o.listInvoices;return p(e.response,await r.request(e.path,e.request.parse(t)))},async getInvoice(t){let e=o.getInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async recordCouponRedemption(t){let e=o.recordCouponRedemption,a=e.request.safeParse(t);if(!a.success)throw new s("INVALID_REQUEST","Invalid Coupon redemption facts");return p(e.response,await r.request(e.path,a.data))},async getFeatures(t={}){let e=o.getFeatures;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async evaluateFeatures(t){let e=o.evaluateFeatures;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async trackEvents(t){let e=o.trackEvents;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async resolvePaywall(t){let e=o.resolvePaywall;return p(e.response,await r.request(e.path,e.request.parse(t)))},async resolveOffering(t){let e=o.resolveOffering;return p(e.response,await r.request(e.path,e.request.parse(t)))},async checkEntitlement(t){let e=o.checkEntitlement;return p(e.response,await r.request(e.path,e.request.parse(t)))},async setupPayment(t){let e=o.setupPayment;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readPaymentSetup(t){let e=o.readPaymentSetup;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewSubscriptionBatch(t){let e=o.previewSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async confirmSubscriptionBatch(t){let e=o.confirmSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionBatch(t){let e=o.readSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async abandonSubscriptionBatch(t){let e=o.abandonSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageSubscriptionTrial(t){let e=o.manageSubscriptionTrial;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionTrial(t){let e=o.readSubscriptionTrial;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listSubscriptions(t){let e=o.listSubscriptions;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listPurchases(t){let e=o.listPurchases;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listSubscriptionConflicts(t){let e=o.listSubscriptionConflicts;return p(e.response,await r.request(e.path,e.request.parse(t)))},async retrySubscriptionConflict(t){let e=o.retrySubscriptionConflict;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewRefund(t){let e=o.previewRefund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async refund(t){let e=o.refund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readRefund(t){let e=o.readRefund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewUpdate(t){let e=o.previewUpdate;return p(e.response,await r.request(e.path,e.request.parse(t)))},async update(t){let e=o.update;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionUpdate(t){let e=o.readSubscriptionUpdate;return p(e.response,await r.request(e.path,e.request.parse(t)))},async restoreNativePurchase(t){let e=o.restoreNativePurchase;return p(e.response,await r.request(e.path,e.request.parse(t)))},async verifySubscriptions(t){let e=o.verifySubscriptions;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewAttach(t){let e=o.previewAttach;return p(e.response,await r.request(e.path,e.request.parse(t)))},async attach(t){let e=o.attach;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionOperation(t){let e=o.readSubscriptionOperation;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readAiPricing(t){let e=o.readAiPricing;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsage(t){let e=o.readUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async setUsage(t){let e=o.setUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageBalanceGrant(t){let e=o.manageBalanceGrant;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readBalanceSource(t){let e=o.readBalanceSource;return p(e.response,await r.request(e.path,e.request.parse(t)))},async adjustBalance(t){let e=o.adjustBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listBalanceGrants(t){let e=o.listBalanceGrants;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageBillingLimits(t){let e=o.manageBillingLimits;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSeats(t){let e=o.readSeats;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageSeat(t){let e=o.manageSeat;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageUsageEntity(t){let e=o.manageUsageEntity;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsageAnalytics(t){let e=o.readUsageAnalytics;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readCreditAnalytics(t){let e=o.readCreditAnalytics;return p(e.response,await r.request(e.path,e.request.parse(t)))},async submitUsageBatch(t){let e=o.submitUsageBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsageBatch(t){let e=o.readUsageBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readHoldings(t){let e=o.readHoldings;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readLedger(t){let e=o.readLedger;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readBillingInvoice(t){let e=o.readBillingInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readCreditStatement(t){let e=o.readCreditStatement;return p(e.response,await r.request(e.path,e.request.parse(t)))},async quoteBalance(t){let e=o.quoteBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async trackUsage(t){let e=o.trackUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async mutateBalance(t){let e=o.mutateBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async getCustomer(t){let e=o.getCustomer,a=e.request.safeParse(t);if(!a.success)throw new s("INVALID_REQUEST","Invalid customer lookup");let u=e.response.safeParse(await r.request(e.path,a.data));if(!u.success)throw new s("INVALID_RESPONSE","Invalid customer response");return u.data},async listCustomers(t={}){let e=o.listCustomers,a=e.request.safeParse(t);if(!a.success)throw new s("INVALID_REQUEST","Invalid customer filters");let u=e.response.safeParse(await r.request(e.path,a.data));if(!u.success)throw new s("INVALID_RESPONSE","Invalid customer response");return u.data},async updateCustomer(t){let e=o.updateCustomer,a=e.request.safeParse(t);if(!a.success)throw new s("INVALID_REQUEST","Invalid customer patch");let u=e.response.safeParse(await r.request(e.path,a.data));if(!u.success)throw new s("INVALID_RESPONSE","Invalid customer response");return u.data},async createGuestCustomer(t){let e=o.createGuestCustomer;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async resumeGuestSession(t){let e=o.resumeGuestSession;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async claimGuestCustomer(t){let e=o.claimGuestCustomer;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async renewCustomerSession(t){let e=o.renewSession;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async revokeCustomerSessions(t){let e=o.revokeSessions;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async createCustomerSession(t){let e=o.createSession.request.safeParse({customerId:t});if(!e.success)throw new s("INVALID_REQUEST","A customer ID is required");let a=o.createSession.response.safeParse(await r.request("customer-sessions",e.data));if(!a.success)throw new s("INVALID_RESPONSE","Invalid customer session response");return a.data},async getOrCreateCustomer(t){let e=o.createCustomer.request.safeParse(t);if(!e.success)throw new s("INVALID_REQUEST","Invalid customer input");let a=o.createCustomer.response.safeParse(await r.request("customers",e.data));if(!a.success)throw new s("INVALID_RESPONSE","Invalid customer response");return a.data},async grantOffer(t){let e=o.grantOffer.request.safeParse({...t,requestId:t.requestId??crypto.randomUUID()});if(!e.success||!e.data.customerId)throw new s("INVALID_REQUEST","Invalid offer grant");let a=o.grantOffer.response.safeParse(await r.request("offers/grant",e.data));if(!a.success)throw new s("INVALID_RESPONSE","Invalid offer response");return a.data}}}async function Tt(n,r){if(typeof window<"u")throw new s("SERVER_ONLY","Renewal requires your backend");let{funnelCredentialCommandSchema:t,funnelCredentialResponseSchema:e}=await import("./src-WV6GZYWA.js"),a=q(n);return a.identify(n.apiKey),e.parse(await a.request("funnels",t.parse({...r,operation:"renew_run"})))}export{F as FunnelDecisionTimeoutError,s as IndianaError,Ce as aiPriceSnapshotSchema,Re as aiTokenQuoteSchema,Fe as createAiPricing,ke as createAiUsageMiddleware,Se as createConfigurationSync,Le as createConfiguredAiPricing,j as createFeatureClient,Pe as createFunnelCampaignClient,G as createFunnelDecisionClient,x as createFunnelLocalEvaluator,Te as createFunnelOrchestrationClient,qe as createFunnelStartClient,xt as createGuestToken,kt as createIndianaServer,Ae as createLocalFunnelClient,Ne as createNativeReceiptClient,_e as createPaywallStartClient,Oe as createSynchronizedFunnelLocalEvaluator,Ee as evaluateFunnelNode,Tt as renewFunnelRun};
1
+ import{a as G,b,c as de,d as k,e as me,f as fe,g as we,j as ye,k as qe,l as Ae,m as Re,n as Ce}from"./chunk-NOFNOHUI.js";import{a as Fe,b as Le,c as De,d as Oe}from"./chunk-4AWSZWZD.js";import{a as q}from"./chunk-QO4YQLZ4.js";import{Ce as ne,Ne as M,Oe as re,Pi as B,Qe as ae,fj as j,gj as oe,hj as ie,jj as _,kf as N,kj as ce,lf as C,li as o,mf as se,ok as ue,pk as pe,pl as le,re as V,ue as ee,we as te}from"./chunk-467Z5ISI.js";import{b as H,h as W}from"./chunk-3SONNXFG.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import"./chunk-S5TVMQRC.js";import{a}from"./chunk-6MO6Y24B.js";import{Mb as X}from"./chunk-HD74AAFS.js";import{b as J,q as Z}from"./chunk-RRII2DMC.js";import{d as $}from"./chunk-KQCTDXVD.js";function p(n,r){try{return n.parse(r)}catch{throw new a("INVALID_RESPONSE","Invalid gateway response")}}function Ie(n){let r=me(n),t=c=>{throw new a("INVALID_RESPONSE",c)};r.nodes.size!==n.topology.nodes.length&&t("Duplicate local node identity"),r.nodes.get(n.topology.entry)?.type!=="entry"&&t("A local Funnel must start at Entry");let e=new Set(["entry","condition","feature","split","end","output"]);for(let c of r.nodes.values()){if(!e.has(c.type))throw new a("SERVER_REQUIRED","This Funnel requires authoritative server execution");if(c.type==="entry"&&c.id!==n.topology.entry&&t("Unexpected Entry node"),["entry","feature"].includes(c.type)&&!c.outputs.next&&t("Local next exit is unavailable"),c.type==="feature"){let u=c.resources.featureKey;(!u||!Object.hasOwn(n.evaluation.variables,c.writes.value)||!Object.hasOwn(r.features,u))&&t("Local Feature definition or declaration is unavailable")}if(c.type==="condition"){let u=n.conditions[c.id];(!u||!c.outputs.default||u.some((f,m)=>f.port!==`case:${m}`||!c.outputs[f.port]))&&t("Local Condition exits are unavailable")}if(c.type==="split"&&(!c.resources.experimentId||!Object.hasOwn(n.growth.experiments,c.resources.experimentId)||!c.outputs.notParticipating)&&t("Local Experiment definition or exit is unavailable"),c.type==="end"||c.type==="output"){let u=n.evaluation.terminals[c.id];if(!u)throw new a("SERVER_REQUIRED","Terminal resource delivery requires the server");Object.keys(c.outputs).length&&t("A terminal cannot have outgoing edges"),u.output?.type==="feature"&&!Object.hasOwn(r.features,u.output.featureKey)&&t("Terminal Feature definition is unavailable")}for(let u of Object.values(c.outputs))r.nodes.has(u)||t("Local target is unavailable")}let s=new Set,i=new Set;function l(c){if(i.has(c)&&t("Local graph contains a cycle"),!s.has(c)){i.add(c);for(let u of Object.values(r.nodes.get(c).outputs))l(u);i.delete(c),s.add(c)}}return l(n.topology.entry),s.size!==r.nodes.size&&t("Local graph contains unreachable nodes"),{evaluate(c){let u={},f=c.context;f.features=r.features,f.savedGroups=r.savedGroups;let m=()=>{f.attributes=te({declarations:n.evaluation.variables,attributes:c.attributes,parameters:c.parameters,answers:{},results:u,savedGroups:r.savedGroups})};m();let I=n.topology.entry,d=0;for(;;){let w=r.nodes.get(I);if(w.type==="end"||w.type==="output"){let y=n.evaluation.terminals[I],h=y.output,v=h?.type==="feature"?r.feature(h.featureKey,f):h?.type==="variable"?ne({source:"variable",key:h.key,...h.path?{path:h.path}:{}},{declarations:n.evaluation.variables,answers:{},results:u,parameters:c.parameters,attributes:c.attributes,savedGroups:r.savedGroups}):h?.value??null;return V(n.evaluation.outputSchema,v)||t("Local output does not match its declaration"),{outcome:y.outcome,value:v}}if(d++>=n.evaluation.maxTransitions)throw new a("TRANSITION_LIMIT","Local Funnel transition budget exceeded");if(w.type==="entry")I=w.outputs.next;else{let y=r.evaluate(I,f);if(w.type==="feature"){let h=w.writes.value,v=y.value??null;V(n.evaluation.variables[h],v)||t("Local Feature value does not match its declaration"),ee(n.evaluation.variables,{writes:w.writes},{[h]:v}),u[h]=v,m()}I=y.target}}}}}import{z as he}from"zod";function ge(n,r,t){let e=J.parse(n.attributes);if(["parameters","answers","results"].some(S=>Object.hasOwn(e,S)))throw new a("INVALID_REQUEST","Flow namespaces cannot be caller attributes");let s=X.parse(n.parameters??{}),i=he.record(he.string(),Z).parse(n.stickyBucketAssignmentDocs??{});for(let[S,g]of Object.entries(i))if(S!==`${g.attributeName}||${g.attributeValue}`||!Object.hasOwn(e,g.attributeName)||$(e[g.attributeName])!==g.attributeValue)throw new a("INVALID_REQUEST","Sticky document identity does not match this session");let l=n.saveStickyBucketAssignmentDoc,c=n.onFeatureUsage,u=n.onExperimentViewed,f=n.onError,m=new Map,I=new Set,d={},w=Promise.resolve();function y(S){let g=w.then(()=>(t(),S()));return w=g.catch(()=>{}),g}function h(S){try{f?.(S)}catch{}}function v(S){try{let g=S();g&&typeof g.catch=="function"&&g.catch(h)}catch(g){h(g)}}async function L(){for(let[S,g]of m){if(t(),l)try{await l(structuredClone(g))}catch{throw new a("STICKY_SAVE_FAILED","Persist the pending Sticky assignment before using this evaluation")}t(),m.delete(S)}}return{evaluate(S={}){let g=S.track===!0;return y(async()=>{let D=await r();t(D);let z=new Set(I),Q={...d},Y=new Map,T=[],ve={stickyBucketAssignmentDocs:structuredClone(i),saveStickyBucketAssignmentDoc(E){Y.set(`${E.attributeName}||${E.attributeValue}`,structuredClone(E))},...g?{trackedExperiments:z,trackedFeatureUsage:Q,onExperimentViewed(E,R){let U=structuredClone(E),Ee=structuredClone(R);u&&T.push(()=>u(structuredClone(U),structuredClone(Ee)))},onFeatureUsage(E,R){let U=structuredClone(R);c&&T.push(()=>c(E,structuredClone(U)))}}:{}},Se=D.program.evaluate({attributes:e,parameters:s,context:ve});t(D);for(let[E,R]of Y)i[E]=R,m.set(E,R);await L(),t(D),g&&(I=z,d=Q);for(let E of T)v(E);let O=D.configuration;return structuredClone({evaluationMode:"local",scope:O.scope,funnelId:O.funnelId,versionId:O.versionId,evaluationRevision:O.evaluationRevision,generation:O.growth.generation,...Se})})},flush:()=>y(L),get stickyBucketAssignmentDocs(){return t(),structuredClone(i)}}}var _e=6e4;function x(n){if(typeof window<"u")throw new a("SERVER_ONLY","Local Funnel sessions run on your backend");let r=H.parse(n.scope),t=n.funnelId,e=n.load,s,i,l,c=0,u=I=>Date.now()>=I.expiresAt;async function f(){if(i)return i;let I=c;s=void 0;let d=(async()=>{let w=await e();if(I!==c)throw new a("IDENTITY_CHANGED","Local evaluator was reset");if(w&&typeof w=="object"&&"evaluationMode"in w&&w.evaluationMode==="remote")throw p(_,w),new a("EVALUATION_MODE","This Funnel requires remote decide");let y=p(ce,w);if(I!==c)throw new a("IDENTITY_CHANGED","Local evaluator was reset");if(y.scope.projectId!==r.projectId||y.scope.environment!==r.environment||y.funnelId!==t)throw new a("SCOPE_MISMATCH","Local configuration scope changed");if(y.growth.scope.projectId!==r.projectId||y.growth.scope.environment!==r.environment||y.growth.expiresAt!==y.expiresAt)throw new a("INVALID_RESPONSE","GB configuration scope or expiry changed");let h=Math.min(Date.now()+_e,y.expiresAt?Date.parse(y.expiresAt):1/0);if(Date.now()>=h)throw new a("CONFIGURATION_EXPIRED","Refresh expired local rules");let v=JSON.stringify([r.projectId,r.environment,t,y.versionId,y.evaluationRevision,y.growth.generation]),L=[y.topology,y.conditions,y.evaluation,y.growth.features,y.growth.experiments,y.growth.savedGroups];if(l?.key===v&&!de(l.body,L))throw new a("INVALID_RESPONSE","Immutable local configuration identity changed");return l?.key!==v&&(l={key:v,body:L,program:Ie(y)}),s={key:v,configuration:y,expiresAt:h,program:l.program},s})();i=d;try{return await d}finally{i===d&&(i=void 0)}}function m(){return i??(s&&!u(s)?Promise.resolve(s):f())}return{session(I){let d=c;return ge(I,m,w=>{if(n.assertUsable?.(),d!==c)throw new a("IDENTITY_CHANGED","Local evaluator was reset");if(w&&(u(w)||s?.key!==w.key))throw new a("CONFIGURATION_EXPIRED","Refresh local rules before using this result")})},async refresh(){return structuredClone((await f()).configuration)},reset(){c++,s=void 0,i=void 0,l=void 0}}}function Ne(n,r){let t=n.snapshot?.generation,e=x({scope:{projectId:n.scope.projectId,environment:n.scope.environment},funnelId:r,load:()=>n.localFunnel(r),assertUsable:()=>n.assertFunnel(r)}),s=n.subscribe(()=>{let l=n.snapshot?.generation;n.fresh&&l!==t&&(t=l,e.refresh().catch(()=>{}))}),i=e.session;return Object.assign(e,{session(l){let c=i(l),u=c.evaluate;return Object.assign(c,{async evaluate(...f){return n.fresh||await n.refresh(),u(...f)}})},destroy(){s(),e.reset()}})}function be(n){if(typeof window<"u")throw new a("SERVER_ONLY","Secret API keys must stay on the backend");return{start:r=>ye(n,r)}}var F=class extends a{constructor(t,e){super("DECISION_PENDING","Decision is still pending; read this decision ID or retry the original request ID",202,e);this.decisionId=t;this.decisionRequestId=e}decisionId;decisionRequestId};async function P(n,r,t,e){let{decisionId:s,requestId:i}=n,l=n,c=250;for(;;){if(l.decisionId!==s||l.requestId!==i||l.decision&&!b(l.decision,r))throw new a("INVALID_RESPONSE","Decision request or customer changed");if(l.decision)return l.decision;if(l.status==="failed")throw new a("DECISION_FAILED","Decision execution failed",503,i);if(Date.now()>=t)throw new F(s,i);if(await new Promise(u=>setTimeout(u,Math.min(c,t-Date.now()))),Date.now()>=t)throw new F(s,i);c=Math.min(1e3,c*2);try{l=await e(s,t)}catch(u){if(u instanceof a&&["TIMEOUT","NETWORK_ERROR","SERVICE_UNAVAILABLE","RATE_LIMITED"].includes(u.code))continue;throw u}}}function K(n){if("remoteEval"in n)throw new a("INVALID_REQUEST","Configure evaluation mode on the Funnel; remoteEval is not supported");if(typeof window<"u")throw new a("SERVER_ONLY","Funnel decisions are requested by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new a("INVALID_TOKEN","A server API key is required");let r,t,e=new Map;async function s(u,f){let m=u;m.status!=="pending"&&e.delete(m.decisionId);for(let I=0;I<32&&m.evaluation;I++){let d=m.evaluation;if(d.runId!==m.decisionId)throw new a("INVALID_RESPONSE","Local evaluation Run changed");let w=e.get(m.decisionId);if(!w&&d.type==="evaluate_segment"){let h=le.parse(await i({operation:"segment_configuration",funnelId:n.funnelId,versionId:d.versionId},f));if(h.configuration.scope.projectId!==n.scope.projectId||h.configuration.scope.environment!==n.scope.environment||h.configuration.funnelId!==n.funnelId||h.configuration.versionId!==d.versionId||h.configuration.evaluationRevision!==d.policyRevision)throw new a("SCOPE_MISMATCH","Original decision segment configuration changed");if(e.size>=128)throw new a("COMMAND_PENDING","Reconcile outstanding decisions first");w={operation:"commit_decision_segment",decisionId:m.decisionId,requestId:B(m.decisionId,d.visit,`segment:${d.revision}`),nodeId:d.nodeId,visit:d.visit,revision:d.revision,policyRevision:d.policyRevision,generation:h.configuration.growth.generation,...we(h.configuration,h.document,d)},e.set(m.decisionId,w)}if(!w){if(d.type!=="evaluate")throw new a("INVALID_RESPONSE","Unknown decision instruction");if((!t||t.versionId!==d.versionId||t.evaluationRevision!==d.policyRevision||t.expiresAt&&Date.parse(t.expiresAt)<=Date.now())&&(t=_.parse(await i({operation:"configuration",funnelId:n.funnelId,versionId:d.versionId},f))),t.scope.projectId!==n.scope.projectId||t.scope.environment!==n.scope.environment||t.funnelId!==n.funnelId)throw new a("SCOPE_MISMATCH","Local evaluation configuration scope changed");if(t.evaluationMode!=="local"||t.versionId!==d.versionId||t.evaluationRevision!==d.policyRevision)throw new a("EVALUATION_MODE","Original Local evaluation policy is unavailable");if(e.size>=128)throw new a("COMMAND_PENDING","Reconcile outstanding Local decisions first");w={operation:"evaluate_decision",decisionId:m.decisionId,requestId:B(m.decisionId,d.visit,"evaluation"),nodeId:d.nodeId,visit:d.visit,revision:d.revision,receiptId:d.receiptId,policyRevision:d.policyRevision,generation:t.growth.generation,result:fe(t,d.nodeId,d)},e.set(m.decisionId,w)}let y=C.parse(await i(w,f));if(y.decisionId!==u.decisionId||y.requestId!==u.requestId)throw new a("INVALID_RESPONSE","Decision identity changed during local evaluation");e.delete(m.decisionId),m=y}return m}async function i(u,f,m=!1){let I=q({...n,fetch:(d,w)=>{let y=new Headers(w?.headers);return y.set("Accept-Encoding","identity"),m&&y.set("Prefer","respond-async"),(n.fetch??globalThis.fetch)(d,{...w,headers:y})},timeoutMs:Math.min(n.timeoutMs??1e4,f?Math.max(1,f-Date.now()):12e4)});return I.identify(n.apiKey),I.request("funnels",u)}async function l(u,f){let m=C.parse(await i(N.parse({operation:"read_decision",decisionId:u}),f));if(m.decisionId!==u)throw new a("INVALID_RESPONSE","Decision identity changed");return s(m,f)}async function c(u,f,m=!1){let I=N.options[0].parse({...u,operation:"decide",funnelId:n.funnelId}),d;try{d=C.parse(await i(I,f,m))}catch(w){throw w instanceof a&&["TIMEOUT","NETWORK_ERROR","SERVICE_UNAVAILABLE"].includes(w.code)?new a("DECISION_ACCEPTANCE_UNKNOWN","Decision acceptance is unknown; retry the original request ID and input",w.status,u.requestId):w}if(d.requestId!==u.requestId||d.decision&&!b(d.decision,I.customer))throw new a("INVALID_RESPONSE","Decision request or customer changed");return{response:await s(d,f),customer:I.customer}}return{local(){return r??=x({scope:n.scope,funnelId:n.funnelId,load:()=>i({operation:"local_configuration",funnelId:n.funnelId})})},async configuration(){let u=_.parse(await i({operation:"configuration",funnelId:n.funnelId}));if(u.scope.projectId!==n.scope.projectId||u.scope.environment!==n.scope.environment||u.funnelId!==n.funnelId)throw new a("SCOPE_MISMATCH","Configuration scope changed");return u},features(u={}){return G({...u,scope:n.scope,load:async()=>W.parse(await i({operation:"feature_config",funnelId:n.funnelId}))})},read:u=>l(u),async submit(u){return(await c(u,void 0,!0)).response},async decide(u){let f=Date.now()+3e4,m=await c(u,f);return P(m.response,m.customer,f,l)},async reportUsed(u){let f=se.parse(await i(N.parse({...u,operation:"report_used"})));if(f.decisionId!==u.decisionId||f.eventId!==u.eventId)throw new a("INVALID_RESPONSE","Usage receipt identity changed");return f}}}function ke(n){if(typeof window<"u")throw new a("SERVER_ONLY","Native receipts are verified by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new a("INVALID_TOKEN","Server API key required");let r=q({...n,timeoutMs:n.timeoutMs??35e3});return r.identify(n.apiKey),{async recover(t){let e=ue.parse(t);if(e.orderId!==e.receiptId)throw new a("INVALID_REQUEST","Native recovery requires the accepted commercial intent");let s=e.nativeEvidence,i={requestId:e.requestId,customerToken:e.customerToken,purchaseIntentId:e.orderId,...s===null?{intent:"read"}:s.provider==="apple"?{provider:"apple",signedTransaction:s.signedTransaction}:{provider:"google",purchaseToken:s.purchaseToken}},l=o.restoreNativePurchase.response.parse(await r.request(o.restoreNativePurchase.path,i));if(l.operation.requestId!==e.requestId)throw new a("INVALID_RESPONSE","Native receipt request identity changed");let c=pe.parse({scope:l.scope,requestId:e.requestId,orderId:l.operation.orderId,receiptId:l.operation.orderId,orderStatus:l.operation.status,refunded:l.operation.refunded,...l.operation.completion===null?{}:{nativeCompletion:{orderId:l.operation.orderId,receiptId:l.operation.orderId,...l.operation.completion}}});if(c.requestId!==e.requestId||c.orderId!==e.orderId||c.receiptId!==e.receiptId||c.scope.projectId!==n.scope.projectId||c.scope.environment!==n.scope.environment)throw new a("INVALID_RESPONSE","Current order receipt scope changed");return c}}}import{z as xe}from"zod";var A=xe.number().int().min(0).max(Number.MAX_SAFE_INTEGER);function Pe(n,r){let t=A.parse(n.inputTokens.total),e=A.parse(n.outputTokens.total),s=A.parse(n.inputTokens.cacheRead??0),i=A.parse(n.inputTokens.cacheWrite??0),l=A.parse(n.outputTokens.reasoning??0);if(s+i>t||l>e||n.inputTokens.noCache!==void 0&&A.parse(n.inputTokens.noCache)!==t-s-i||n.outputTokens.text!==void 0&&A.parse(n.outputTokens.text)!==e-l)throw new a("AI_USAGE_UNAVAILABLE","Provider token counts do not conserve total usage");return{input:t-s-i,cache_read:s,cache_write:i,output:r==="output"?e:e-l,reasoning:r==="separate"?l:0,input_audio:0,output_audio:0}}function Te(n){if(typeof window<"u")throw new a("SERVER_ONLY","AI usage belongs on the trusted backend");if(!n.modelId||!["output","separate"].includes(n.reasoning))throw new a("INVALID_REQUEST","Model ID and reasoning pricing are required");async function r(e){await n.persist({context:e,modelId:n.modelId,usage:null,tokens:null,quote:null,receipt:null,phase:"incomplete"})}async function t(e,s){let i={context:e,modelId:n.modelId,usage:s,tokens:null,quote:null,receipt:null,phase:"captured"};await n.persist(i);let l=n.mapTokens?n.mapTokens(s):Pe(s,n.reasoning),c=await n.pricing.quoteTokens({modelId:n.modelId,tokens:l});await n.persist({...i,tokens:l,quote:c,phase:"quoted"});let u=await n.pricing.trackTokens(n.client,{...e,quote:c});if(!u.receipt.accepted)throw new a("AI_BALANCE_REJECTED","AI usage was captured but the balance operation was rejected");await n.persist({...i,tokens:l,quote:c,receipt:u,phase:"settled"})}return{specificationVersion:"v4",async wrapGenerate({doGenerate:e}){let s=await n.context(),i;try{i=await e()}catch(l){throw await r(s),l}return await t(s,i.usage),i},async wrapStream({doStream:e}){let s=await n.context(),i;try{i=await e()}catch(m){throw await r(s),m}let l=!1,c=!1,u=i.stream.getReader();async function f(){l||c||(c=!0,await r(s))}return{...i,stream:new ReadableStream({async pull(m){try{let{value:I,done:d}=await u.read();if(d){if(!l)throw await f(),new a("AI_USAGE_UNAVAILABLE","Stream ended without final usage; no amount was invented");m.close();return}if(I.type==="finish"){if(l)throw new a("AI_USAGE_UNAVAILABLE","Provider sent more than one final usage record");l=!0,await t(s,I.usage)}m.enqueue(I)}catch(I){try{await f()}finally{m.error(I),await u.cancel(I)}}},async cancel(m){try{await f()}finally{await u.cancel(m)}}})}}}}function Ue(n){if(typeof window<"u")throw new a("SERVER_ONLY","Funnel receipts are sent by your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new a("INVALID_TOKEN","A server API key is required");let r=q(n);return r.identify(n.apiKey),{async signal(t){let e=M.parse({...t,operation:"signal"}),s=re.parse(await r.request("funnels",e));if(s.runId!==t.runId||s.eventId!==t.eventId||s.scope.projectId!==n.scope.projectId||s.scope.environment!==n.scope.environment)throw new a("INVALID_RESPONSE","Receipt identity changed");return s},async readResults(t){let e=M.parse({operation:"read_results",runId:t}),s=ae.parse(await r.request("funnels",e));if(s.runId!==t||s.scope.projectId!==n.scope.projectId||s.scope.environment!==n.scope.environment)throw new a("INVALID_RESPONSE","Result identity changed");return s}}}function Ve(n){if("remoteEval"in n)throw new a("INVALID_REQUEST","Configure evaluation mode on the Funnel; remoteEval is not supported");if(typeof window<"u")throw new a("SERVER_ONLY","Campaign entry requires your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new a("INVALID_TOKEN","A server API key is required");let r=q({...n,timeoutMs:n.timeoutMs??35e3});return r.identify(n.apiKey),{async decide(t){let e=Date.now()+(n.timeoutMs??3e4),s=j.parse({...t,funnelId:n.funnelId,operation:"campaign_decide"}),i=q({...n,timeoutMs:Math.min(n.timeoutMs??35e3,Math.max(1,e-Date.now()))});i.identify(n.apiKey);let l=C.parse(await i.request("funnels",s));if(l.scope.projectId!==n.scope.projectId||l.scope.environment!==n.scope.environment)throw new a("SCOPE_MISMATCH","Campaign scope changed");return P(l,s.customer,e,(c,u)=>K({...n,timeoutMs:Math.min(n.timeoutMs??1e4,Math.max(1,u-Date.now()))}).read(c))},async start(t){let e=j.parse({...t,funnelId:n.funnelId,operation:"campaign_start"}),s=ie.parse(await r.request("funnels",e)),i=oe.parse("suppressed"in s?s:await k(n,s));if(i.scope.projectId!==n.scope.projectId||i.scope.environment!==n.scope.environment)throw new a("SCOPE_MISMATCH","Campaign scope changed");if(!("suppressed"in i)&&(i.run.source.id!==n.funnelId||!i.customerId||e.customer.type==="id"&&i.customerId!==e.customer.value))throw new a("INVALID_RESPONSE","Campaign Funnel or Customer changed");return i}}}function Ut(){if(typeof window<"u")throw new a("SERVER_ONLY","Guest identity is issued by your backend");let n=crypto.getRandomValues(new Uint8Array(32));return"gg_gc_"+btoa(String.fromCharCode(...n)).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Vt(n){if(typeof window<"u")throw new a("SERVER_ONLY","Secret API keys must stay on your backend");let r=q(n);return r.identify(n.apiKey),{async listInvoiceTemplates(t={}){let e=o.listInvoiceTemplates;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewInvoice(t){let e=o.previewInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async createInvoice(t){let e=o.createInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageInvoice(t){let e=o.manageInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readInvoiceOperation(t){let e=o.readInvoiceOperation;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listInvoices(t){let e=o.listInvoices;return p(e.response,await r.request(e.path,e.request.parse(t)))},async getInvoice(t){let e=o.getInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async recordCouponRedemption(t){let e=o.recordCouponRedemption,s=e.request.safeParse(t);if(!s.success)throw new a("INVALID_REQUEST","Invalid Coupon redemption facts");return p(e.response,await r.request(e.path,s.data))},async getFeatures(t={}){let e=o.getFeatures;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async evaluateFeatures(t){let e=o.evaluateFeatures;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async trackEvents(t){let e=o.trackEvents;return p(e.response,await r.request(e.path,e.request.parse(t),e.method))},async resolvePaywall(t){let e=o.resolvePaywall;return p(e.response,await r.request(e.path,e.request.parse(t)))},async resolveOffering(t){let e=o.resolveOffering;return p(e.response,await r.request(e.path,e.request.parse(t)))},async checkEntitlement(t){let e=o.checkEntitlement;return p(e.response,await r.request(e.path,e.request.parse(t)))},async setupPayment(t){let e=o.setupPayment;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readPaymentSetup(t){let e=o.readPaymentSetup;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewSubscriptionBatch(t){let e=o.previewSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async confirmSubscriptionBatch(t){let e=o.confirmSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionBatch(t){let e=o.readSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async abandonSubscriptionBatch(t){let e=o.abandonSubscriptionBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageSubscriptionTrial(t){let e=o.manageSubscriptionTrial;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionTrial(t){let e=o.readSubscriptionTrial;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listSubscriptions(t){let e=o.listSubscriptions;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listPurchases(t){let e=o.listPurchases;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listSubscriptionConflicts(t){let e=o.listSubscriptionConflicts;return p(e.response,await r.request(e.path,e.request.parse(t)))},async retrySubscriptionConflict(t){let e=o.retrySubscriptionConflict;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewRefund(t){let e=o.previewRefund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async refund(t){let e=o.refund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readRefund(t){let e=o.readRefund;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewUpdate(t){let e=o.previewUpdate;return p(e.response,await r.request(e.path,e.request.parse(t)))},async update(t){let e=o.update;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionUpdate(t){let e=o.readSubscriptionUpdate;return p(e.response,await r.request(e.path,e.request.parse(t)))},async restoreNativePurchase(t){let e=o.restoreNativePurchase;return p(e.response,await r.request(e.path,e.request.parse(t)))},async verifySubscriptions(t){let e=o.verifySubscriptions;return p(e.response,await r.request(e.path,e.request.parse(t)))},async previewAttach(t){let e=o.previewAttach;return p(e.response,await r.request(e.path,e.request.parse(t)))},async attach(t){let e=o.attach;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSubscriptionOperation(t){let e=o.readSubscriptionOperation;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readAiPricing(t){let e=o.readAiPricing;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsage(t){let e=o.readUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async setUsage(t){let e=o.setUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageBalanceGrant(t){let e=o.manageBalanceGrant;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readBalanceSource(t){let e=o.readBalanceSource;return p(e.response,await r.request(e.path,e.request.parse(t)))},async adjustBalance(t){let e=o.adjustBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async listBalanceGrants(t){let e=o.listBalanceGrants;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageBillingLimits(t){let e=o.manageBillingLimits;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readSeats(t){let e=o.readSeats;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageSeat(t){let e=o.manageSeat;return p(e.response,await r.request(e.path,e.request.parse(t)))},async manageUsageEntity(t){let e=o.manageUsageEntity;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsageAnalytics(t){let e=o.readUsageAnalytics;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readCreditAnalytics(t){let e=o.readCreditAnalytics;return p(e.response,await r.request(e.path,e.request.parse(t)))},async submitUsageBatch(t){let e=o.submitUsageBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readUsageBatch(t){let e=o.readUsageBatch;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readHoldings(t){let e=o.readHoldings;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readLedger(t){let e=o.readLedger;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readBillingInvoice(t){let e=o.readBillingInvoice;return p(e.response,await r.request(e.path,e.request.parse(t)))},async readCreditStatement(t){let e=o.readCreditStatement;return p(e.response,await r.request(e.path,e.request.parse(t)))},async quoteBalance(t){let e=o.quoteBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async trackUsage(t){let e=o.trackUsage;return p(e.response,await r.request(e.path,e.request.parse(t)))},async mutateBalance(t){let e=o.mutateBalance;return p(e.response,await r.request(e.path,e.request.parse(t)))},async getCustomer(t){let e=o.getCustomer,s=e.request.safeParse(t);if(!s.success)throw new a("INVALID_REQUEST","Invalid customer lookup");let i=e.response.safeParse(await r.request(e.path,s.data));if(!i.success)throw new a("INVALID_RESPONSE","Invalid customer response");return i.data},async listCustomers(t={}){let e=o.listCustomers,s=e.request.safeParse(t);if(!s.success)throw new a("INVALID_REQUEST","Invalid customer filters");let i=e.response.safeParse(await r.request(e.path,s.data));if(!i.success)throw new a("INVALID_RESPONSE","Invalid customer response");return i.data},async updateCustomer(t){let e=o.updateCustomer,s=e.request.safeParse(t);if(!s.success)throw new a("INVALID_REQUEST","Invalid customer patch");let i=e.response.safeParse(await r.request(e.path,s.data));if(!i.success)throw new a("INVALID_RESPONSE","Invalid customer response");return i.data},async createGuestCustomer(t){let e=o.createGuestCustomer;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async resumeGuestSession(t){let e=o.resumeGuestSession;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async claimGuestCustomer(t){let e=o.claimGuestCustomer;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async renewCustomerSession(t){let e=o.renewSession;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async revokeCustomerSessions(t){let e=o.revokeSessions;return e.response.parse(await r.request(e.path,e.request.parse(t)))},async createCustomerSession(t){let e=o.createSession.request.safeParse({customerId:t});if(!e.success)throw new a("INVALID_REQUEST","A customer ID is required");let s=o.createSession.response.safeParse(await r.request("customer-sessions",e.data));if(!s.success)throw new a("INVALID_RESPONSE","Invalid customer session response");return s.data},async getOrCreateCustomer(t){let e=o.createCustomer.request.safeParse(t);if(!e.success)throw new a("INVALID_REQUEST","Invalid customer input");let s=o.createCustomer.response.safeParse(await r.request("customers",e.data));if(!s.success)throw new a("INVALID_RESPONSE","Invalid customer response");return s.data},async grantOffer(t){let e=o.grantOffer.request.safeParse({...t,requestId:t.requestId??crypto.randomUUID()});if(!e.success||!e.data.customerId)throw new a("INVALID_REQUEST","Invalid offer grant");let s=o.grantOffer.response.safeParse(await r.request("offers/grant",e.data));if(!s.success)throw new a("INVALID_RESPONSE","Invalid offer response");return s.data}}}async function Mt(n,r){if(typeof window<"u")throw new a("SERVER_ONLY","Renewal requires your backend");if(!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(n.apiKey))throw new a("INVALID_TOKEN","A server API key is required");let{funnelCredentialCommandSchema:t,funnelCredentialResponseSchema:e}=await import("./src-UHLPVD6E.js"),s=q(n);s.identify(n.apiKey);let i=e.parse(await k(n,await s.request("funnels",t.parse({...r,operation:"renew_run"}))));if(i.run.id!==r.runId)throw new a("INVALID_RESPONSE","Run renewal identity changed");return i}export{F as FunnelDecisionTimeoutError,a as IndianaError,Fe as aiPriceSnapshotSchema,Le as aiTokenQuoteSchema,De as createAiPricing,Te as createAiUsageMiddleware,qe as createConfigurationSync,Oe as createConfiguredAiPricing,G as createFeatureClient,Ve as createFunnelCampaignClient,K as createFunnelDecisionClient,x as createFunnelLocalEvaluator,Ue as createFunnelOrchestrationClient,Re as createFunnelStartClient,Ut as createGuestToken,Vt as createIndianaServer,Ce as createLocalFunnelClient,ke as createNativeReceiptClient,be as createPaywallStartClient,Ne as createSynchronizedFunnelLocalEvaluator,Ae as evaluateFunnelNode,Mt as renewFunnelRun};
@@ -0,0 +1 @@
1
+ import{$ as Xa,$a as Xb,$b as Dd,$c as He,$d as rh,$e as xi,$f as xj,$g as xk,$h as xl,$i as xm,$j as yn,$k as Eo,A as Q,Aa as wb,Ab as Mc,Ac as ge,Ad as of,Ae as Yh,Af as Yi,Ag as Yj,Ah as Yk,Ai as Yl,Aj as Ym,Ak as Zn,B as R,Ba as xb,Bb as Nc,Bc as he,Bd as pf,Be as Zh,Bf as Zi,Bg as Zj,Bh as Zk,Bi as Zl,Bj as Zm,Bk as _n,C as S,Ca as yb,Cb as Oc,Cc as ie,Cd as qf,Ce as _h,Cf as _i,Cg as _j,Ch as _k,Ci as _l,Cj as _m,Ck as $n,D as T,Da as zb,Db as Pc,Dc as je,Dd as rf,De as $h,Df as $i,Dg as $j,Dh as $k,Di as $l,Dj as $m,Dk as ao,E as U,Ea as Ab,Eb as Qc,Ec as ke,Ed as sf,Ee as ai,Ef as aj,Eg as ak,Eh as al,Ei as am,Ej as an,Ek as bo,F as V,Fa as Bb,Fb as Rc,Fc as le,Fd as vf,Fe as bi,Ff as bj,Fg as bk,Fh as bl,Fi as bm,Fj as bn,Fk as co,G as W,Ga as Cb,Gb as Sc,Gc as me,Gd as wf,Ge as ci,Gf as cj,Gg as ck,Gh as cl,Gi as cm,Gj as cn,Gk as eo,H as Z,Ha as Db,Hb as Tc,Hc as ne,Hd as Tg,He as di,Hf as dj,Hg as dk,Hh as dl,Hi as dm,Hj as dn,Hk as fo,I as _,Ia as Eb,Ib as Uc,Ic as oe,Id as Ug,Ie as ei,If as ej,Ig as ek,Ih as el,Ii as em,Ij as en,Ik as go,J as $,Ja as Fb,Jb as bd,Jc as pe,Jd as Vg,Je as fi,Jf as fj,Jg as fk,Jh as fl,Ji as fm,Jj as fn,Jk as ho,K as aa,Ka as Gb,Kb as cd,Kc as qe,Kd as Wg,Ke as gi,Kf as gj,Kg as gk,Kh as gl,Ki as gm,Kj as gn,Kk as io,L as ba,La as Hb,Lb as dd,Lc as re,Ld as Xg,Le as hi,Lf as hj,Lg as hk,Lh as hl,Li as hm,Lj as hn,Lk as jo,M as ca,Ma as Ib,Mb as ed,Mc as se,Md as Yg,Me as ii,Mf as ij,Mg as ik,Mh as il,Mi as im,Mj as jn,Mk as ko,N as da,Na as Jb,Nb as fd,Nc as te,Nd as Zg,Ne as ji,Nf as jj,Ng as jk,Nh as jl,Ni as jm,Nj as kn,Nk as lo,O as ea,Oa as Kb,Ob as gd,Oc as ue,Od as _g,Oe as ki,Of as kj,Og as kk,Oh as kl,Oi as km,Oj as ln,Ok as mo,P as fa,Pa as Lb,Pb as hd,Pc as ve,Pd as $g,Pe as li,Pf as lj,Pg as lk,Ph as ll,Pi as lm,Pj as mn,Pk as no,Q as ga,Qa as Mb,Qb as id,Qc as we,Qd as ah,Qe as mi,Qf as mj,Qg as mk,Qh as ml,Qi as mm,Qj as nn,Qk as oo,R as ha,Ra as Nb,Rb as jd,Rc as xe,Rd as bh,Re as ni,Rf as nj,Rg as nk,Rh as nl,Ri as nm,Rj as on,Rk as po,S as ia,Sa as Ob,Sb as kd,Sc as ye,Sd as ch,Se as oi,Sf as oj,Sg as ok,Sh as ol,Si as om,Sj as pn,Sk as qo,T as ja,Ta as Pb,Tb as ld,Tc as ze,Td as dh,Te as pi,Tf as pj,Tg as pk,Th as pl,Ti as pm,Tj as qn,Tk as ro,U as ka,Ua as Qb,Ub as md,Uc as Ae,Ud as eh,Ue as qi,Uf as qj,Ug as qk,Uh as ql,Ui as qm,Uj as rn,Uk as so,V as Ra,Va as Rb,Vb as nd,Vc as Be,Vd as fh,Ve as ri,Vf as rj,Vg as rk,Vh as rl,Vi as rm,Vj as sn,Vk as to,W as Sa,Wa as Sb,Wb as od,Wc as Ce,Wd as gh,We as si,Wf as sj,Wg as sk,Wh as sl,Wi as sm,Wj as tn,Wk as uo,X as Ta,Xa as Tb,Xb as zd,Xc as De,Xd as hh,Xe as ti,Xf as tj,Xg as tk,Xh as tl,Xi as tm,Xj as un,Xk as vo,Y as Ua,Ya as Ub,Yb as Ad,Yc as Ee,Yd as oh,Ye as ui,Yf as uj,Yg as uk,Yh as ul,Yi as um,Yj as vn,Yk as wo,Z as Va,Za as Vb,Zb as Bd,Zc as Fe,Zd as ph,Ze as vi,Zf as vj,Zg as vk,Zh as vl,Zi as vm,Zj as wn,Zk as xo,_ as Wa,_a as Wb,_b as Cd,_c as Ge,_d as qh,_e as wi,_f as wj,_g as wk,_h as wl,_i as wm,_j as xn,_k as yo,a,aa as Ya,ab as Yb,ac as Ed,ad as Ie,ae as sh,af as yi,ag as yj,ah as yk,ai as yl,aj as ym,ak as zn,al as Fo,b,ba as Za,bb as Zb,bc as Jd,bd as Je,be as th,bf as zi,bg as zj,bh as zk,bi as zl,bj as zm,bk as An,bl as Go,c,ca as _a,cb as _b,cc as Kd,cd as Ke,ce as uh,cf as Ai,cg as Aj,ch as Ak,ci as Al,cj as Am,ck as Bn,cl as Ho,d,da as $a,db as $b,dc as Ld,dd as Le,de as vh,df as Bi,dg as Bj,dh as Bk,di as Bl,dj as Bm,dk as Cn,dl as Io,e,ea as ab,eb as ac,ec as Md,ed as Me,ee as wh,ef as Ci,eg as Cj,eh as Ck,ei as Cl,ej as Cm,ek as Dn,el as Jo,f,fa as bb,fb as bc,fc as Nd,fd as Ne,fe as xh,ff as Di,fg as Dj,fh as Dk,fi as Dl,fj as Dm,fk as En,fl as Ko,g,ga as cb,gb as cc,gc as Od,gd as Oe,ge as Eh,gf as Ei,gg as Ej,gh as Ek,gi as El,gj as Em,gk as Fn,gl as Lo,h,ha as db,hb as dc,hc as Pd,hd as Pe,he as Fh,hf as Fi,hg as Fj,hh as Fk,hi as Fl,hj as Fm,hk as Gn,hl as Mo,i,ia as eb,ib as ec,ic as Qd,id as Qe,ie as Gh,if as Gi,ig as Gj,ih as Gk,ii as Gl,ij as Gm,ik as Hn,il as No,j,ja as fb,jb as fc,jc as Rd,jd as Ye,je as Hh,jf as Hi,jg as Hj,jh as Hk,ji as Hl,jj as Hm,jk as In,jl as Oo,k,ka as gb,kb as wc,kc as Sd,kd as Ze,ke as Ih,kf as Ii,kg as Ij,kh as Ik,ki as Il,kj as Im,kk as Jn,kl as Po,l,la as hb,lb as xc,lc as Td,ld as _e,le as Jh,lf as Ji,lg as Jj,lh as Jk,li as Jl,lj as Jm,lk as Kn,ll as Qo,m,ma as ib,mb as yc,mc as Ud,md as $e,me as Kh,mf as Ki,mg as Kj,mh as Kk,mi as Kl,mj as Km,mk as Ln,ml as Ro,n,na as jb,nb as zc,nc as Vd,nd as af,ne as Lh,nf as Li,ng as Lj,nh as Lk,ni as Ll,nj as Lm,nk as Mn,nl as So,o,oa as kb,ob as Ac,oc as Wd,od as bf,oe as Mh,of as Mi,og as Mj,oh as Mk,oi as Ml,oj as Mm,ok as Nn,ol as To,p,pa as lb,pb as Bc,pc as Xd,pd as cf,pe as Nh,pf as Ni,pg as Nj,ph as Nk,pi as Nl,pj as Nm,pk as On,pl as Uo,q,qa as mb,qb as Cc,qc as Yd,qd as df,qe as Oh,qf as Oi,qg as Oj,qh as Ok,qi as Ol,qj as Om,qk as Pn,ql as Vo,r,ra as nb,rb as Dc,rc as Zd,rd as ef,re as Ph,rf as Pi,rg as Pj,rh as Pk,ri as Pl,rj as Pm,rk as Qn,rl as Wo,s,sa as ob,sb as Ec,sc as _d,sd as ff,se as Qh,sf as Qi,sg as Qj,sh as Qk,si as Ql,sj as Qm,sk as Rn,t as z,ta as pb,tb as Fc,tc as $d,td as gf,te as Rh,tf as Ri,tg as Rj,th as Rk,ti as Rl,tj as Rm,tk as Sn,u as A,ua as qb,ub as Gc,uc as ae,ud as hf,ue as Sh,uf as Si,ug as Sj,uh as Sk,ui as Sl,uj as Sm,uk as Tn,v as B,va as rb,vb as Hc,vc as be,vd as jf,ve as Th,vf as Ti,vg as Tj,vh as Tk,vi as Tl,vj as Tm,vk as Un,w as C,wa as sb,wb as Ic,wc as ce,wd as kf,we as Uh,wf as Ui,wg as Uj,wh as Uk,wi as Ul,wj as Um,wk as Vn,x as D,xa as tb,xb as Jc,xc as de,xd as lf,xe as Vh,xf as Vi,xg as Vj,xh as Vk,xi as Vl,xj as Vm,xk as Wn,y as E,ya as ub,yb as Kc,yc as ee,yd as mf,ye as Wh,yf as Wi,yg as Wj,yh as Wk,yi as Wl,yj as Wm,yk as Xn,z as P,za as vb,zb as Lc,zc as fe,zd as nf,ze as Xh,zf as Xi,zg as Xj,zh as Xk,zi as Xl,zj as Xm,zk as Yn}from"./chunk-467Z5ISI.js";import{a as X,b as Y,c as ih,d as jh,e as kh,f as lh,g as mh,h as nh,j as zo,k as Ao,l as Bo,m as Co,n as Do}from"./chunk-3SONNXFG.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import{$ as xd,$a as ig,A as lc,Aa as Jf,Ab as Jg,B as mc,Ba as Kf,Bb as Kg,C as nc,Ca as Lf,Cb as Lg,D as oc,Da as Mf,Db as Mg,E as pc,Ea as Nf,Eb as Ng,F as qc,Fa as Of,Fb as Og,G as rc,Ga as Pf,Gb as Pg,H as sc,Ha as Qf,Hb as Qg,I as tc,Ia as Rf,Ib as Rg,J as uc,Ja as Sf,Jb as Sg,K as vc,Ka as Tf,Kb as yh,L as Vc,La as Uf,Lb as zh,M as Wc,Ma as Vf,Mb as Ah,N as Xc,Na as Wf,Nb as Bh,O as Yc,Oa as Xf,Ob as Ch,P as Zc,Pa as Yf,Pb as Dh,Q as _c,Qa as Zf,R as $c,Ra as _f,S as ad,Sa as $f,T as pd,Ta as ag,U as qd,Ua as bg,V as rd,Va as cg,W as sd,Wa as dg,X as td,Xa as eg,Y as ud,Ya as fg,Z as vd,Za as gg,_ as wd,_a as hg,a as t,aa as yd,ab as jg,b as u,ba as Fd,bb as kg,c as v,ca as Gd,cb as lg,d as w,da as Hd,db as mg,e as x,ea as Id,eb as ng,f as y,fa as Re,fb as og,g as F,ga as Se,gb as pg,h as G,ha as Te,hb as qg,i as H,ia as Ue,ib as rg,j as I,ja as Ve,jb as sg,k as J,ka as We,kb as tg,l as K,la as Xe,lb as ug,m as L,ma as tf,mb as vg,n as M,na as uf,nb as wg,o as N,oa as xf,ob as xg,p as O,pa as yf,pb as yg,q as Ma,qa as zf,qb as zg,r as Na,ra as Af,rb as Ag,s as Oa,sa as Bf,sb as Bg,t as Pa,ta as Cf,tb as Cg,u as Qa,ua as Df,ub as Dg,v as gc,va as Ef,vb as Eg,w as hc,wa as Ff,wb as Fg,x as ic,xa as Gf,xb as Gg,y as jc,ya as Hf,yb as Hg,z as kc,za as If,zb as Ig}from"./chunk-HD74AAFS.js";import{a as ta,b as ua,c as va,d as wa,e as xa,f as ya,g as za,h as Aa,i as Ba,j as Ca,k as Da,l as Ea,m as Fa,n as Ga,o as Ha,p as Ia,q as Ja,r as Ka,s as La}from"./chunk-RRII2DMC.js";import{c as la,d as ma,e as na,h as oa,i as pa,j as qa,k as ra,l as sa}from"./chunk-KQCTDXVD.js";export{$k as CODE_REFERENCE_LIMITS,Pa as COMMON_LOCALES,Tj as CONFIGURATION_POLICY,Ra as COUPON_TERM_LOCALES,If as CUSTOMER_DATA_SOURCES,Ud as CreateInvoiceParamsSchema,Td as CreateInvoicePreviewSchema,rn as DEFAULT_AUDIENCE_GROUP,fi as DEFAULT_FUNNEL_EXECUTION_POLICY,Ui as FUNNEL_API_CAPABILITIES,fj as FUNNEL_EXECUTION_LIMITS,ni as FUNNEL_LIMITS,Mm as FUNNEL_PREVIEW_LIMITS,Vo as FUNNEL_READ_ONLY_OPERATIONS,gj as FUNNEL_RECORDING_LIMITS,Go as FUNNEL_SEGMENT_BYTES,Fo as FUNNEL_SEGMENT_LIMIT,zm as FUNNEL_SERVER_KEY_HEADER,jm as FunnelCalculationError,Po as FunnelLocalCalculationError,Rd as InvoiceModeParamsSchema,Sd as InvoiceTemplateSchema,_e as OFFERING_MAX_DEPTH,af as OFFERING_MAX_ITEMS,$e as OFFERING_MAX_PRODUCTS,Cg as POPUP_WIDTHS,Kj as PUBLIC_PAYWALL_UNSUPPORTED_NODES,Qd as ReissueInvoiceParamsSchema,Tf as SCREEN_LIMITS,Sf as SCREEN_SCHEMA_VERSION,wc as SDK_PROTOCOL_HEADER,yc as SDK_SUPPORT_HEADER,zc as SDK_SUPPORT_POLICY,xc as SDK_VERSION_HEADER,Ag as SURFACE_PATHS,Af as SURFACE_VARIABLES,Fc as SdkProtocolError,oi as UNBOUND_PRODUCT_VERSION_ID,Dc as addSupportMonths,j as aiCreditSystemConfigSchema,ok as aiMarkupSchema,nk as aiModelIdSchema,pk as aiModelRatesSchema,qk as aiPricingConfigurationSchema,mk as aiTokenPools,w as amountToMinor,fh as analyticsConfigSchema,hh as analyticsEventEnabled,lc as apiErrorCatalog,mc as apiErrorCodeForStatus,gc as apiErrorCodeSchema,Jl as apiOperations,Cl as apiPermissionSchema,Jn as appResultsSchema,In as appRevenueSchema,Sn as appendScreenTemplate,po as applyGrowthReleasePlan,im as archiveSurfaceTemplateSchema,un as audienceCustomerSchema,Bn as audienceFunnelUsageSchema,Cn as audienceFunnelUsagesSchema,vn as audienceMembersSchema,Ic as audienceSchema,tn as audienceWriteSchema,mn as auditFieldSchema,pn as auditHistoryCursorSchema,qn as auditHistorySchema,ln as auditResourceSchema,qb as autoTopupPurchaseLimitSchema,Cb as autoTopupStateSchema,wo as autumnAmountToMinor,an as autumnCustomerAutoTopupSchema,fn as autumnCustomerControlsSchema,hn as autumnCustomerMetadataSchema,en as autumnCustomerOverageAllowedSchema,kn as autumnCustomerProductSummarySchema,jn as autumnCustomerProfileRecordSchema,bn as autumnCustomerSpendLimitSchema,dn as autumnCustomerUsageAlertSchema,cn as autumnCustomerUsageLimitSchema,gn as autumnEntityControlsSchema,xo as autumnMinorToAmount,yo as autumnUsageUnitAmountDecimal,hk as balanceAdjustmentCommandSchema,ik as balanceAdjustmentStateSchema,Zc as balanceAllocationSchema,Wc as balanceCommandSchema,cd as balanceGrantCommandSchema,bd as balanceGrantCreateSchema,fd as balanceGrantPageSchema,ed as balanceGrantReadSchema,dd as balanceGrantSchema,ad as balanceOperationSchema,Xc as balancePricingSegmentSchema,$c as balanceQuoteSchema,Yc as balanceReceiptUnitsSchema,_c as balanceRejectionReasonSchema,Yn as balanceSourceReasonSchema,jk as balanceSourceStateSchema,Zn as balanceSourceStatusSchema,$n as balanceSourcesPageSchema,_n as balanceSourcesQuerySchema,jb as billingAccruedMinorSchema,ib as billingAmountMinorSchema,tb as billingAuthorizationSchema,sb as billingAuthorizationTermsSchema,kb as billingBudgetMinorSchema,Db as billingControlInputSchema,Eb as billingControlsSchema,Mb as billingCouponsSchema,z as billingCurrencies,Fb as billingInvoiceLineSchema,Gb as billingInvoiceSchema,Jb as billingInvoicesSchema,xb as billingLimitSchema,dm as billingPortalInputSchema,em as billingPortalSchema,D as billingSettingsMutationSchema,B as billingSettingsSchema,C as billingSettingsScopeSchema,Bb as billingUsageWindowSchema,fg as borderSchema,lg as buttonNodeSchema,km as calculateFunnelNode,So as calculateLocalFunnelEvaluation,To as calculateLocalFunnelSegment,Lc as campaignInputSchema,Jc as campaignOfferSchema,Mc as campaignSchema,Na as canonicalLocale,Bf as capabilityBindingSchema,ob as cashPriceSchema,mb as cashPricingSchema,lb as cashPricingTiersSchema,hb as cashUnitAmountMinorSchema,Rk as claimRewardProductRequestSchema,cl as codeReferenceBranchSchema,il as codeReferenceConfigRequestSchema,hl as codeReferenceConfigureSchema,ol as codeReferenceFeatureSummarySchema,al as codeReferenceKeySchema,dl as codeReferencePathSchema,ll as codeReferenceReceiptSchema,bl as codeReferenceRepoSchema,kl as codeReferenceReportSchema,fl as codeReferenceRepositoryInputSchema,gl as codeReferenceRepositorySchema,jl as codeReferenceScanConfigSchema,ml as codeReferenceScanSchema,nl as codeReferenceSettingsSchema,pl as codeReferenceSummarySchema,Hd as commerceAccessSchema,Re as commerceContextSchema,Ee as commerceCursorSchema,Fe as commerceListQuerySchema,Id as commerceMoneySchema,Un as commerceProductKind,Gd as commerceProductKindSchema,Fd as commerceProviderSchema,Ea as compileGrowthFeatures,Wj as configurationArtifactSchema,ak as configurationDependencies,Vj as configurationDependenciesSchema,_j as configurationDigest,Xj as configurationFunnelSchema,$j as configurationGeneration,Zj as configurationJson,Sj as configurationPaywallSchema,Uj as configurationScopeSchema,Hb as confirmBillingAdjustmentInputSchema,vb as confirmBillingAuthorizationInputSchema,ic as consoleErrorCodeSchema,uc as consoleErrorResponseSchema,to as consoleHasPermission,oe as consoleRefundRequestSchema,ro as consoleResources,so as consoleRolePermissions,qo as consoleRoleSchema,sg as countdownNodeSchema,Ya as couponAppliesToSchema,bb as couponChangeErrors,rg as couponCodeNodeSchema,dh as couponContentDigestSchema,Wa as couponDiscountSchema,Ij as couponDisplaySchema,Nl as couponDistributionBatchSchema,Pl as couponDistributionDetailSchema,Ml as couponDistributionPreviewSchema,Ol as couponDistributionRecipientSchema,Ql as couponDistributionWriteSchema,Xa as couponDurationSchema,Za as couponEligibilitySchema,_a as couponInputSchema,ql as couponRedemptionCommandSchema,rl as couponRedemptionReceiptSchema,Va as couponStatusSchema,$m as couponTemplateExample,Zm as couponTemplateKey,eb as couponWindow,xn as createAccountOverviewPage,wn as createCreditCenterPage,zn as createCustomerPageTemplates,Fl as createCustomerRequestSchema,Gl as createCustomerResponseSchema,yn as createMembershipPage,Tk as createReferralCodeRequestSchema,F as creditAmountSchema,tk as creditAnalyticsFilterSchema,vk as creditAnalyticsPageSchema,uk as creditAnalyticsQuerySchema,rk as creditAnalyticsRangeSchema,sk as creditAnalyticsTimezoneSchema,L as creditDimensionSchema,M as creditMultiplierSchema,H as creditPriceAdjustmentSchema,N as creditPricingSchema,J as creditPropertiesSchema,G as creditQuantitySchema,O as creditRateSchema,Ob as creditResetCountSchema,Nb as creditResetSchema,I as creditResourceKeySchema,Pb as creditRolloverSchema,c as creditSchemaItemSchema,jd as creditStatementInputSchema,kd as creditStatementSchema,i as creditSystemConfigSchema,K as creditTiersSchema,t as currencies,A as currencyAmountOptionsSchema,v as currencyDecimals,u as currencySchema,Kl as currentApiOperations,ld as currentNotificationEventTypeSchema,pg as customHtmlNodeSchema,ka as customerActivitySchema,qi as customerAttributesSchema,sn as customerAudienceSchema,Kf as customerDataConfigSchema,Nf as customerDataIntentSchema,ng as customerDataNodeSchema,wi as customerDataReferenceMessage,vi as customerDataReferenced,ui as customerDataSchema,Jf as customerDataSourceSchema,Il as customerEntitlementsSchema,Di as customerFiltersSchema,ri as customerFingerprintSchema,Kn as customerFunnelDecisionsSchema,Bi as customerGetSchema,td as customerHoldingsSchema,si as customerInputSchema,xd as customerLedgerEntrySchema,yd as customerLedgerPageSchema,wd as customerLedgerQuerySchema,zi as customerLookupSchema,yi as customerMutationSchema,Mf as customerPageDataSchema,Lf as customerPageNodeStateSchema,Ei as customerPageSchema,Ai as customerPatchSchema,ec as customerPlanCreateSchema,fc as customerPlanCreatedSchema,ja as customerPlanSchema,xi as customerProfileSchema,ti as customerReferenceSchema,cm as customerScheduledChangeCancelSchema,am as customerScheduledChangeSchema,bm as customerScheduledChangesSchema,Nc as customerSchema,pi as customerTagsSchema,Ci as customerUpdateRequestSchema,el as defaultCodeReferenceMethods,ym as deliveredFunnelResponse,fk as deliveredPaywall,wh as deliveredScreenDocument,cb as describeCoupon,_b as diffProductVariant,mg as dividerNodeSchema,Of as emptyCustomerPageNode,Te as entitlementCheckInputSchema,Ue as entitlementCheckReasonSchema,We as entitlementCheckResultSchema,Se as entitlementRequirementSchema,ga as entitlementSnapshotSchema,Hl as entitlementStatusSchema,X as environmentSchema,Dd as environmentSettingsSchema,pc as errorCodeMatchesStatus,vc as errorMetadata,rc as errorMetadataSchema,oc as errorPolicy,kc as errorReasonSchema,jc as errorRecoverySchema,sc as errorResponseSchema,Qf as escapeHtmlText,pa as evalCondition,sa as evalFeature,qh as evaluateFeaturesRequestSchema,sh as evaluateFeaturesResultSchema,Ro as evaluateLocalFunnelNode,um as executionSourceSchema,Oo as expandFunnelSegment,Da as experimentConfigurationSchema,Ca as experimentPhaseSchema,Ha as experimentSnapshotSchema,n as featureCollectionSchema,g as featureConfigOverrideSchema,k as featureDefinitionSchema,oh as featureDeliveryPayloadSchema,a as featureIdSchema,$ as featureInputSchema,f as featureMarkupsOverrideSchema,o as featureOptionsSchema,nh as featurePayloadSchema,m as featureRecordSchema,aa as featureSchema,uo as featureTypes,vo as featureUpdateBlockers,l as featureUpdateRulesSchema,pd as featureUsageReadSchema,qd as featureUsageSetSchema,rd as featureUsageStateSchema,b as featureUsageTypeSchema,p as featureWriteSchema,Ig as fieldValue,dg as fillSchema,sd as financialAmountSchema,vd as financialCursorSchema,ud as financialEntryTypeSchema,Qg as findDocumentNode,Pg as findNode,Ym as formatCouponConditions,Ta as formatCouponDiscount,Sa as formatCouponMoney,Ua as formatCouponTerms,y as formatCurrencyMinor,Xn as formatProductBillingPeriod,db as formatUsd,Vi as funnelApiBindingSchema,Si as funnelApiProjectionSchema,Li as funnelBundleDefinitionSchema,Pi as funnelBundleLiterals,Oi as funnelBundleResultSchema,Mi as funnelBundleSelectionSchema,Dm as funnelCampaignCommandSchema,Fm as funnelCampaignStartDeliverySchema,Em as funnelCampaignStartResponseSchema,Wi as funnelCapabilitySchema,pm as funnelCollectionSchema,Gj as funnelCommandSchema,Hm as funnelConfigurationSchema,oj as funnelConsumedVariables,No as funnelContextDelta,Am as funnelCredentialCommandSchema,Cm as funnelCredentialDeliverySchema,Bm as funnelCredentialResponseSchema,Fj as funnelDataQueriesSchema,Hi as funnelDecideShape,Ii as funnelDecisionCommandSchema,Hh as funnelDecisionEvaluationSchema,Fi as funnelDecisionOutputSchema,Ji as funnelDecisionResponseSchema,Gi as funnelDecisionSchema,Kh as funnelDecisionSegmentEvaluationSchema,Ki as funnelDecisionUsedResponseSchema,xj as funnelDocumentDraftSchema,Bj as funnelDocumentSchema,Uh as funnelEvaluationAttributes,Gh as funnelEvaluationInstructionSchema,Eh as funnelEvaluationModeSchema,Fh as funnelEvaluationResultSchema,ei as funnelExecutionPolicySchema,uj as funnelExecutionStateSchema,Yi as funnelExternalPageUrlSchema,di as funnelExternalTaskSchema,$i as funnelGraphDraftSchema,_i as funnelGraphNodeSchema,aj as funnelGraphSchema,bj as funnelGraphTargets,An as funnelGroupReferenceSchema,tm as funnelInstructionSchema,lm as funnelInvocationId,Im as funnelLocalConfigurationSchema,mm as funnelLocalScreenCommandSchema,nm as funnelLocalScreenResponseSchema,Jh as funnelLocalSegmentStepSchema,Wo as funnelNodeAcceptsEffect,sj as funnelNodeInputSchema,qj as funnelNodeKindSchema,Rh as funnelNodeProjections,tj as funnelNodeResultSchema,Oh as funnelNodeWritesSchema,Zi as funnelOpenInSchema,ji as funnelOrchestrationCommandSchema,Bh as funnelParametersFromUrl,Ej as funnelPresentationSubmissionSchema,Nm as funnelPreviewCommandSchema,Qm as funnelPreviewDependencySchema,Rm as funnelPreviewJournalSchema,Om as funnelPreviewOutcomeSchema,Tm as funnelPreviewRequestSchema,Um as funnelPreviewResponseSchema,Pm as funnelPreviewScenarioSchema,Wm as funnelPreviewShareWriteSchema,Vm as funnelPreviewSnapshotSchema,Sm as funnelPreviewSourceSchema,Qi as funnelProjectionFilterValueSchema,Ri as funnelProjectionWhereSchema,Dj as funnelPublicationDraftSchema,zj as funnelPublicationRules,Cj as funnelPublicationSchema,Aj as funnelPublishableDraftSchema,Ho as funnelPureNode,om as funnelRecordSchema,rj as funnelResourceReferenceSchema,Dn as funnelResultsCursorSchema,En as funnelResultsQuerySchema,mi as funnelResultsResponseSchema,Fn as funnelResultsSchema,vm as funnelRunViewSchema,xm as funnelRuntimeDeliverySchema,wm as funnelRuntimeResponseSchema,sm as funnelRuntimeStatusSchema,lj as funnelScreenReads,kj as funnelScreenTokens,mj as funnelScreenValues,Uo as funnelSegmentConfigurationSchema,Ih as funnelSegmentEvaluationInstructionSchema,Mo as funnelSegmentHasDynamicHash,Io as funnelSegmentPositionSchema,Ko as funnelSegmentSchema,Jo as funnelSegmentStepSchema,ki as funnelSignalResponseSchema,Xm as funnelStatisticsSchema,Lo as funnelStepId,ci as funnelTaskBindingSchema,ai as funnelTaskDataSchema,bi as funnelTaskOutputsSchema,gi as funnelTaskResponseSchema,li as funnelTaskResultsSchema,Rn as funnelTemplateDraft,Pn as funnelTemplateSchema,Jm as funnelTopology,Gm as funnelTopologySchema,vj as funnelTraceEventSchema,Yh as funnelValueBindingSchema,Lh as funnelValueDeclarationSchema,Ph as funnelValueMatches,Xh as funnelValuePathSchema,Th as funnelValueSchema,Mh as funnelVariableDeclarationSchema,Nh as funnelVariableDeclarationsSchema,jj as funnelVariableRead,Qh as funnelVariableValues,hj as funnelVisitAllowed,pj as funnelWaitKindSchema,qm as funnelWriteSchema,jh as gbRuntimeExperimentResultSchema,ih as gbRuntimeExperimentSchema,kh as gbRuntimeFeatureRuleSchema,lh as gbRuntimeFeatureSchema,mh as gbRuntimeSavedGroupsSchema,la as getQueryStringOverride,oo as getRecommendedRolloutData,qa as getStickyBucketAttributes,go as growthAttributeSchema,ua as growthAttributesSchema,io as growthCatalogSchema,xa as growthConditionGroupIds,Wh as growthConditionPaths,va as growthConditionSchema,ko as growthDryRunSchema,lo as growthExperimentInspectionSchema,Fa as growthExperimentStop,Ga as growthFeatureExpiry,za as growthFeatureRuleSchema,Aa as growthFeatureSchema,Ba as growthFeaturesSchema,mo as growthGroupReferenceCursorSchema,no as growthGroupReferencesSchema,wa as growthGroupSchema,ho as growthNamespaceSchema,jo as growthResourceWriteSchema,Ka as growthRuleContextSchema,ya as growthSavedGroupsSchema,Ia as growthSnapshotSchema,La as growthSplitResultSchema,Pf as htmlVariableErrors,gk as hydratePaywall,Vf as identifierSchema,kg as imageNodeSchema,cg as imagePositionSchema,ag as insetsSchema,wl as invoiceCommandSchema,gd as invoiceDetailInputSchema,id as invoiceDetailSchema,zl as invoiceOperationSchema,hd as invoiceProductItemSchema,ne as invoiceRefundsSchema,vl as invoiceTemplateCommandSchema,ul as invoiceTemplatePageSchema,sl as invoiceTemplateValuesSchema,pb as isInvoiceCreditPrice,xf as isProductGroup,Tn as isRecurringMembership,Rg as isRtlLocale,Cc as isStableSdkProtocol,na as isURLTargeted,nb as itemBillingCycleSchema,ij as jsonStorageBytes,ta as jsonValueSchema,E as licenseOfferSchema,Ib as listBillingInvoicesInputSchema,nc as localErrorRecovery,Qa as localeLabel,Ma as localeSchema,Jg as localeStatuses,Og as localizeScreen,zb as manageBillingLimitsInputSchema,yb as manageOveragePolicyInputSchema,yl as managedInvoiceDetailSchema,Al as managedInvoicePageSchema,xl as managedInvoiceSchema,tl as managedInvoiceTemplateSchema,hc as managementErrorCodeSchema,tc as managementErrorResponseSchema,bg as marginSchema,Oa as matchLocale,Vh as matchesGrowthCondition,T as membershipActionSchema,Vn as membershipBillingCount,U as membershipChangeSchema,V as membershipHoldingSchema,R as membershipRulesSchema,W as membershipStateSchema,S as membershipTimingSchema,nn as mergeAuditSchema,_ as metadataSchema,h as meteredConfigSchema,x as minorToAmount,e as modelMarkupsSchema,Mn as nativeCompletionSchema,Jd as nativeCouponStoreOfferLinkWriteSchema,Kd as nativeCouponStoreOfferLinksSchema,Sc as nativeProductBindingSchema,Uc as nativeProductBindingWriteSchema,Tc as nativeProductBindingsPageSchema,Ln as nativeProofSchema,Pd as nativePurchaseInstructionSchema,Nn as nativeReceiptCommandSchema,On as nativeReceiptResponseSchema,Pe as nativeRestoreCommandSchema,Qe as nativeRestoreResultSchema,Nd as nativeStoreOfferForProduct,Ld as nativeStoreOfferSelectionSchema,Md as nativeStoreOfferSelectionsSchema,Od as nativeStoreSelectionMatches,fe as nativeSubscriptionUpdatePreviewSchema,ge as nativeSubscriptionUpdateResultSchema,Ll as newBlankSurface,ab as newCouponInput,gh as newEnvironmentAnalyticsConfig,rm as newFunnelDocument,Uf as nodeIdSchema,on as objectAuditSchema,yj as offerCopyUnscoped,Gn as offerFlowInputSchema,Hn as offerFlowResultSchema,fb as offerSchema,gb as offerUnavailableReasonSchema,gf as offeringAuthorSchema,lf as offeringCollectionSchema,ff as offeringDocumentSchema,bf as offeringItemSchema,cf as offeringItemsSchema,Ze as offeringMetadataSchema,hf as offeringProductEvidenceSchema,Ye as offeringProductIdSchema,df as offeringProductIds,pf as offeringProductOptionSchema,ef as offeringProductPaths,rf as offeringPublicationIssues,jf as offeringRecordSchema,of as offeringSelectorSchema,sf as offeringValueSchema,kf as offeringVersionSchema,qf as offeringWorkspaceSchema,nf as offeringWriteResultSchema,mf as offeringWriteSchema,Vc as overageBehaviorSchema,Ab as overagePolicySchema,wj as ownedFunnelScreenSchema,co as pageExperimentEventSchema,eo as pageExperimentEventsRequestSchema,fo as pageExperimentEventsResponseSchema,bo as pageExperimentPayloadSchema,ao as pageExperimentSchema,_f as paintColorSchema,bk as parsePublicFunnel,qc as parseRetryAfter,ye as paymentSetupCommandSchema,ze as paymentSetupReadSchema,Be as paymentSetupSchema,Ve as paywallCandidateSchema,Vg as paywallClientActionSchema,$g as paywallCollectionSchema,ek as paywallDeliverySchema,Wg as paywallDocumentDraftSchema,Xg as paywallDocumentSchema,Zg as paywallFlowIssues,ch as paywallLibrarySchema,Yg as paywallProductIssues,vf as paywallProductsSchema,_g as paywallRecordSchema,Xe as paywallRequestSchema,dk as paywallResolutionSchema,ck as paywallResolveInputSchema,ah as paywallSummarySchema,bh as paywallWriteSchema,da as planConfigSchema,ea as planInputSchema,ca as planItemSchema,tg as planPickerNodeSchema,fa as planSchema,ha as planVersionSchema,Kc as popupSchema,dc as prepaidAllowanceAmount,r as prepaidPriceAmount,s as prepaidQuantityAmount,Oc as prepaidQuantitySchema,q as prepaidTierPricingSchema,rb as prepareBillingAuthorizationInputSchema,_m as prepareCouponTemplate,Qo as prepareLocalFunnelNodes,oa as prepareSavedGroups,ub as preparedBillingAuthorizationSchema,Bg as presentationSchema,qg as priceNodeSchema,ba as priceSchema,Sb as productAllowanceSchema,Pc as productBindingSchema,Rc as productBindingWriteSchema,Qc as productBindingsPageSchema,bc as productCollectionSchema,Vb as productConfigurationSchema,Yb as productDefinitionSchema,cc as productEditorOptionsSchema,uf as productGroupingMatches,tf as productGroupingSchema,Ub as productLicenseSchema,Rl as productMigrationBlockReasonSchema,Yl as productMigrationDetailSchema,Sl as productMigrationErrorCodeSchema,Xl as productMigrationItemSchema,Vl as productMigrationItemStatusSchema,Zl as productMigrationListSchema,Tl as productMigrationPreviewSchema,$l as productMigrationQuerySchema,Ul as productMigrationRunStatusSchema,Wl as productMigrationSchema,_l as productMigrationWriteSchema,$b as productOptionsSchema,Rb as productPrepaidPriceSchema,Qb as productPricesSchema,ac as productRecordSchema,Tg as productSelectionSchema,Tb as productTrialSchema,Wb as productVariantOverridesSchema,Xb as productVariantSchema,Ti as projectFunnelApiOutputs,Km as projectFunnelConfiguration,Lm as projectFunnelLocalConfiguration,Cd as projectSettingsSchema,$a as promotionCodeInputSchema,Bc as protocolForSdkVersion,d as providerMarkupsSchema,eh as publicCouponScreenDataSchema,ph as publicFeatureConfigurationSchema,Eo as publicFunnelDocument,Mj as publicPaywallBenefitSchema,Qj as publicPaywallButtonSchema,Nj as publicPaywallChannelsSchema,Pj as publicPaywallCouponSchema,Lj as publicPaywallPriceSchema,Oj as publicPaywallProductSchema,Rj as publicPaywallSchema,xh as publicScreenDocument,vh as publicScreenIssues,Kg as publishChecks,He as purchaseListItemSchema,Ne as purchaseListPageSchema,Xf as radiusSchema,Zh as readFunnelValuePath,Qk as redeemRewardRequestSchema,Uk as referralCodeSchema,Wk as referralProgramCollectionSchema,Jk as referralProgramInputSchema,Lk as referralProgramRecordSchema,Ok as referralProgramWriteSchema,rh as remoteFeatureResultSchema,nj as renameFunnelScreenVariable,Eg as replaceFirstPageRoot,Jj as resolveCouponDisplay,Ni as resolveFunnelBundle,Xi as resolveFunnelCapabilityInputs,ii as resolveFunnelTaskInputs,_h as resolveFunnelValueBinding,$h as resolveFunnelValueBindings,Zb as resolveProductVariant,Ng as resolveScreenLocale,Gc as resolveSdkProtocol,El as responseMetaSchema,wb as revokeBillingAuthorizationInputSchema,Yk as rewardActivityRedemptionSchema,Zk as rewardActivitySchema,Ik as rewardCodeInputSchema,Xk as rewardCodeSchema,_k as rewardCodeWriteSchema,Vk as rewardCollectionSchema,Fk as rewardConfigurationSchema,Dk as rewardGrantExpirySchema,Ek as rewardGrantSchema,Hk as rewardInputSchema,Gk as rewardKeySchema,Mk as rewardOptionSchema,Sk as rewardProductCheckoutSchema,Kk as rewardRecordSchema,Pk as rewardRedemptionSchema,Ck as rewardStatusSchema,Bk as rewardTypeSchema,Nk as rewardWriteSchema,ra as runExperiment,Wn as sameMembershipBillingCycle,hm as saveSurfaceTemplateSchema,Y as scopeSchema,xg as screenActionSchema,zh as screenAnswersSchema,yh as screenDataCursorSchema,Fg as screenDocumentSchema,Yf as screenImageSourceSchema,Ch as screenInputBindingsSchema,wg as screenNodeSchema,Ah as screenParametersSchema,Ug as screenPresentationSchema,yf as screenProductScopes,zf as screenProductSelections,Dh as screenRendererInputSchema,Sg as screenSelections,yg as screenStringsSchema,Yj as sdkConfigurationManifestSchema,Ac as sdkProtocolRegistry,Hc as sdkProtocolResponseHeaders,Ad as seatCommandSchema,zd as seatReadSchema,Bd as seatsStateSchema,dj as selectFunnelCondition,wf as selectedPaywallProduct,Hf as selectedSurfaceValue,Mg as servableLocales,Lb as setBillingCouponsInputSchema,gg as shadowSchema,eg as shapeSchema,$f as sizeSchema,Wf as spaceSchema,og as spacerNodeSchema,Z as stableKeySchema,ug as stackInteractionSchema,vg as stackNodeSchema,Ja as stickyAssignmentDocumentSchema,Yd as stripeAppendContextSchema,Xd as stripeCouponTermsSchema,Zd as stripePurchaseExecutionSchema,ke as stripeRefundExecutionSchema,Ae as stripeSetupExecutionSchema,ce as stripeSubscriptionUpdateExecutionSchema,de as stripeSubscriptionUpdatePreviewSchema,ee as stripeSubscriptionUpdateResultSchema,ve as stripeTrialExecutionSchema,ig as styleSchema,Vd as subscriptionAttachCommandSchema,_d as subscriptionAttachQuoteSchema,pe as subscriptionBatchCommandSchema,re as subscriptionBatchGroupSchema,qe as subscriptionBatchReadSchema,se as subscriptionBatchSchema,ae as subscriptionCarryOptionsSchema,Oe as subscriptionConflictPageSchema,Je as subscriptionConflictQuerySchema,Le as subscriptionConflictRetryResultSchema,Ke as subscriptionConflictRetrySchema,Ie as subscriptionConflictSchema,Kb as subscriptionCouponExecutionSchema,Bl as subscriptionInvoiceModeSchema,Ge as subscriptionListItemSchema,Me as subscriptionListPageSchema,Wd as subscriptionOperationInputSchema,$d as subscriptionOperationSchema,je as subscriptionRefundCommandSchema,le as subscriptionRefundPreviewSchema,me as subscriptionRefundResultSchema,te as subscriptionTrialCommandSchema,xe as subscriptionTrialPolicySchema,ue as subscriptionTrialReadSchema,we as subscriptionTrialResultSchema,be as subscriptionUpdateCommandSchema,he as subscriptionUpdatePreviewSchema,ie as subscriptionUpdateResultSchema,Ce as subscriptionVerificationInputSchema,De as subscriptionVerificationSchema,Rf as substituteHtmlVariables,Gf as substituteSurfaceVariables,Df as surfaceDataSchema,zg as surfaceSchema,gm as surfaceTemplateSchema,Cf as surfaceValueSchema,Ef as surfaceVariableNames,Lg as templateChecks,fm as templateCoverImageSchema,Qn as templateScreen,jg as textNodeSchema,hg as textStyleSchema,Zf as themeSchema,ma as toAttributeString,th as trackEventsRequestSchema,uh as trackEventsResultSchema,ej as transitionFunnelGraph,Hg as translatableFields,P as trialPolicySchema,Q as trialRecordSchema,Ff as unknownSurfaceVariables,nd as usageAlertNotificationDataSchema,od as usageAllowanceNotificationDataSchema,xk as usageAnalyticsPageSchema,wk as usageAnalyticsQuerySchema,Ak as usageBatchPageSchema,zk as usageBatchReadSchema,yk as usageBatchSubmitSchema,kk as usageEntityCommandSchema,lk as usageEntitySchema,md as usageLimitNotificationDataSchema,cj as validateFunnelGraph,Sh as validateFunnelProjections,hi as validateFunnelTaskData,Hj as validateScreenAnswers,Ec as validateSdkProtocolRegistry,ia as validitySchema,Dl as verifiedPrincipalSchema,Ao as visualChangeSchema,Do as visualExperimentPayloadSchema,Co as visualExperimentSchema,zo as visualMutationSchema,Bo as visualVariationSchema,Dg as walkDocument,Gg as walkScreen,Ed as workspaceSettingsSchema};