@bizzsv/bizz-payment 1.2.2 → 1.2.4-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10727,9 +10727,58 @@ function nt() {
10727
10727
  D = tt();
10728
10728
  }, t;
10729
10729
  }
10730
- var rt = nt(), it = class e {
10730
+ var rt = nt(), it = "https://devapi.teip.io", at = "R33xmWassTrJO5I52s6FZ_3sdQRdiOR7Vc0oDSuf7No", ot = "urn:ietf:wg:oauth:2.0:oob", st = "https://cas.static.client.cardinaltrusted.com/songbird/v2.0.0/songbird.js", ct = void 0, lt = void 0, ut = void 0, dt = void 0, ft = void 0, pt = void 0, mt = void 0, ht = void 0, gt = class e {
10731
10731
  static instance;
10732
- baseUrl = "";
10732
+ environment = "development";
10733
+ constructor() {}
10734
+ static getInstance() {
10735
+ return e.instance ||= new e(), e.instance;
10736
+ }
10737
+ isDevelopmentEnvironment() {
10738
+ return ot;
10739
+ }
10740
+ getEnvironment() {
10741
+ return this.isDevelopmentEnvironment() ? "development" : this.environment;
10742
+ }
10743
+ getDevelopmentEnvironment() {
10744
+ return {
10745
+ apiBase: it,
10746
+ externalApiUid: at,
10747
+ songbirdUrl: st,
10748
+ externalApiRedirectUri: ot
10749
+ };
10750
+ }
10751
+ getProductionEnvironment() {
10752
+ return {
10753
+ apiBase: ct,
10754
+ songbirdUrl: dt,
10755
+ externalApiUid: lt,
10756
+ externalApiRedirectUri: ut
10757
+ };
10758
+ }
10759
+ getSandboxEnvironment() {
10760
+ return {
10761
+ apiBase: ft,
10762
+ songbirdUrl: ht,
10763
+ externalApiUid: pt,
10764
+ externalApiRedirectUri: mt
10765
+ };
10766
+ }
10767
+ setEnvironment(e) {
10768
+ this.environment = e;
10769
+ }
10770
+ getCurrentEnvironment() {
10771
+ switch (this.getEnvironment()) {
10772
+ case "production": return this.getProductionEnvironment();
10773
+ case "sandbox": return this.getSandboxEnvironment();
10774
+ default: return this.getDevelopmentEnvironment();
10775
+ }
10776
+ }
10777
+ }, _t = class e {
10778
+ static instance;
10779
+ get baseUrl() {
10780
+ return gt.getInstance().getCurrentEnvironment().apiBase || "";
10781
+ }
10733
10782
  bearerToken = null;
10734
10783
  constructor() {}
10735
10784
  static getInstance() {
@@ -10761,16 +10810,17 @@ var rt = nt(), it = class e {
10761
10810
  ...n
10762
10811
  });
10763
10812
  }
10764
- }, at = (e) => btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""), ot = async (e) => {
10813
+ }, vt = (e) => btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""), yt = async (e) => {
10765
10814
  let t = new TextEncoder().encode(e);
10766
- return at(await crypto.subtle.digest("SHA-256", t));
10767
- }, st = void 0, ct = void 0, lt = class e {
10815
+ return vt(await crypto.subtle.digest("SHA-256", t));
10816
+ }, bt = class e {
10768
10817
  static instance;
10769
10818
  authenticateAuthorize = "oauth/application/authorize";
10770
10819
  authenticateToken = "oauth/application/token";
10771
- request = it.getInstance();
10820
+ request = _t.getInstance();
10772
10821
  pkceReady;
10773
10822
  authToken = null;
10823
+ environment = gt.getInstance();
10774
10824
  constructor() {
10775
10825
  this.pkceReady = this.generatePkce();
10776
10826
  }
@@ -10784,28 +10834,28 @@ var rt = nt(), it = class e {
10784
10834
  let e = te.util.bytesToHex(te.random.getBytesSync(32));
10785
10835
  return {
10786
10836
  verifier: e,
10787
- challenge: await ot(e)
10837
+ challenge: await yt(e)
10788
10838
  };
10789
10839
  }
10790
10840
  async authorize(e) {
10791
- let t = {
10792
- client_id: st,
10793
- redirect_uri: ct,
10841
+ let { externalApiUid: t, externalApiRedirectUri: n } = this.environment.getCurrentEnvironment(), r = {
10842
+ client_id: t,
10843
+ redirect_uri: n,
10794
10844
  response_type: "code",
10795
10845
  code_challenge: e,
10796
10846
  code_challenge_method: "S256"
10797
10847
  };
10798
- return (await this.request.post(this.authenticateAuthorize, t)).json();
10848
+ return (await this.request.post(this.authenticateAuthorize, r)).json();
10799
10849
  }
10800
10850
  async token(e, t) {
10801
- let n = {
10802
- client_id: st,
10851
+ let { externalApiUid: n, externalApiRedirectUri: r } = this.environment.getCurrentEnvironment(), i = {
10852
+ client_id: n,
10803
10853
  code: e,
10804
10854
  code_verifier: t,
10805
- redirect_uri: ct,
10855
+ redirect_uri: r,
10806
10856
  grant_type: "authorization_code"
10807
10857
  };
10808
- return (await this.request.post(this.authenticateToken, n)).json();
10858
+ return (await this.request.post(this.authenticateToken, i)).json();
10809
10859
  }
10810
10860
  async authenticateAndAuthorize() {
10811
10861
  let { verifier: e, challenge: t } = await this.pkceReady;
@@ -10816,8 +10866,8 @@ var rt = nt(), it = class e {
10816
10866
  throw console.error("Error authenticating or authorizing:", e), e;
10817
10867
  }
10818
10868
  }
10819
- }, ut = class e {
10820
- request = it.getInstance();
10869
+ }, xt = class e {
10870
+ request = _t.getInstance();
10821
10871
  static instance;
10822
10872
  urlConfig = "external/online_payments/orders/configuration";
10823
10873
  config = null;
@@ -10835,8 +10885,8 @@ var rt = nt(), it = class e {
10835
10885
  let e = await this.request.get(this.urlConfig), t = await e.json();
10836
10886
  return e.ok && (this.config = t), t;
10837
10887
  }
10838
- }, dt = class e {
10839
- request = it.getInstance();
10888
+ }, St = class e {
10889
+ request = _t.getInstance();
10840
10890
  static instance;
10841
10891
  countries = [];
10842
10892
  countriesLoadError = null;
@@ -10858,7 +10908,7 @@ var rt = nt(), it = class e {
10858
10908
  let e = await this.request.get(this.urlCountries), t = await e.json();
10859
10909
  return e.ok ? (this.countriesLoadError = null, this.setCountries(t.data), t) : (this.countriesLoadError = "No se pudo cargar la lista de países.", t);
10860
10910
  }
10861
- }, ft = {
10911
+ }, Ct = {
10862
10912
  400: "Error al cargar orden de pago: solicitud inválida",
10863
10913
  401: "Error al cargar orden de pago: autenticación requerida",
10864
10914
  403: "Error al cargar orden de pago: autorización denegada",
@@ -10867,31 +10917,32 @@ var rt = nt(), it = class e {
10867
10917
  502: "Error al cargar orden de pago: respuesta inválida del servicio upstream",
10868
10918
  503: "Error al cargar orden de pago: servicio no disponible"
10869
10919
  };
10870
- function pt(e, t) {
10871
- return ft[e] || `Error al obtener información de sucursal: ${t}`;
10920
+ function wt(e, t) {
10921
+ return Ct[e] || `Error al obtener información de sucursal: ${t}`;
10872
10922
  }
10873
10923
  //#endregion
10874
10924
  //#region src/lib/paymentOrchestrator.ts
10875
- var mt = class e {
10925
+ var Tt = class e {
10876
10926
  static instance;
10877
10927
  initPromise = null;
10878
- auth = lt.getInstance();
10879
- request = it.getInstance();
10928
+ auth = bt.getInstance();
10929
+ request = _t.getInstance();
10880
10930
  branchConfig;
10881
- countryContent = dt.getInstance();
10931
+ countryContent = St.getInstance();
10932
+ environment = gt.getInstance();
10882
10933
  authToken = null;
10883
10934
  config = null;
10884
10935
  constructor() {}
10885
10936
  static getInstance() {
10886
10937
  return e.instance ||= new e(), e.instance;
10887
10938
  }
10888
- async initialize(e, t) {
10889
- return this.initPromise ||= this.boot(e, t), this.initPromise;
10939
+ async initialize(e, t, n = "production") {
10940
+ return this.initPromise ? this.initPromise : (this.environment.setEnvironment(n), this.initPromise = this.boot(e, t), this.initPromise);
10890
10941
  }
10891
10942
  async boot(e, t) {
10892
- await this.auth.authenticateAndAuthorize(), this.authToken = this.auth.getAuthToken(), this.request.setBearerToken(this.authToken?.access_token ?? ""), this.branchConfig = ut.getInstance(e, t);
10943
+ await this.auth.authenticateAndAuthorize(), this.authToken = this.auth.getAuthToken(), this.request.setBearerToken(this.authToken?.access_token ?? ""), this.branchConfig = xt.getInstance(e, t);
10893
10944
  let n = await this.branchConfig.configRequest();
10894
- if ("error" in n) throw Error(pt(n.status, e));
10945
+ if ("error" in n) throw Error(wt(n.status, e));
10895
10946
  this.config = this.branchConfig.getConfig(), await this.countryContent.fetchCountries();
10896
10947
  }
10897
10948
  getAuthToken() {
@@ -10902,12 +10953,12 @@ var mt = class e {
10902
10953
  if (!this.config) throw Error("PaymentOrchestrator not initialized. Call initialize() first.");
10903
10954
  return this.config;
10904
10955
  }
10905
- }, ht = class e {
10906
- request = it.getInstance();
10956
+ }, Et = class e {
10957
+ request = _t.getInstance();
10907
10958
  static instance;
10908
10959
  cardinalToken = null;
10909
10960
  urlCardinalToken = "external/online_payments/orders/token";
10910
- orchestrator = mt.getInstance();
10961
+ orchestrator = Tt.getInstance();
10911
10962
  constructor() {}
10912
10963
  static getInstance() {
10913
10964
  return e.instance ||= new e(), e.instance;
@@ -10932,7 +10983,7 @@ var mt = class e {
10932
10983
  let t = await this.request.post(this.urlCardinalToken, { data: e }), n = await t.json();
10933
10984
  return t.ok, n;
10934
10985
  }
10935
- }, gt = class e {
10986
+ }, Dt = class e {
10936
10987
  static instance;
10937
10988
  states = [];
10938
10989
  statesLoadError = null;
@@ -10950,21 +11001,23 @@ var mt = class e {
10950
11001
  return this.statesLoadError;
10951
11002
  }
10952
11003
  async fetchStates(e) {
10953
- let t = await it.getInstance().get(`resources/countries/${e}/states`), n = await t.json();
11004
+ let t = await _t.getInstance().get(`resources/countries/${e}/states`), n = await t.json();
10954
11005
  return t.ok ? (this.statesLoadError = null, this.setStates(n.data), n) : (this.statesLoadError = "No se pudo cargar la lista de estados.", this.setStates([]), n);
10955
11006
  }
10956
- }, _t = (e) => {
11007
+ }, Ot = (e) => {
10957
11008
  let t = e[0];
10958
11009
  return Number(t) === 4 ? "visa" : Number(t) === 2 || Number(t) === 5 ? "mastercard" : Number(t) === 6 ? "union_pay" : "not_valid";
10959
- }, vt = (e) => {
11010
+ }, kt = (e) => {
10960
11011
  let [t, n] = e.split("/");
10961
11012
  return {
10962
11013
  month: t,
10963
11014
  year: n
10964
11015
  };
10965
- }, yt = (e) => e.replace(/\s/g, ""), bt = class e {
11016
+ }, At = (e) => e.replace(/\s/g, ""), jt = class e {
10966
11017
  static instance;
10967
- songbirdUrl = "";
11018
+ get songbirdUrl() {
11019
+ return gt.getInstance().getCurrentEnvironment().songbirdUrl || "";
11020
+ }
10968
11021
  loaded = !1;
10969
11022
  initialized = !1;
10970
11023
  constructor() {}
@@ -11042,10 +11095,10 @@ var mt = class e {
11042
11095
  OrderChannel: e.transaction_mode
11043
11096
  } });
11044
11097
  }
11045
- }, xt = class e {
11098
+ }, Mt = class e {
11046
11099
  static instance;
11047
- request = it.getInstance();
11048
- cardinalService = bt.getInstance();
11100
+ request = _t.getInstance();
11101
+ cardinalService = jt.getInstance();
11049
11102
  registerPaymentResponse = null;
11050
11103
  constructor() {}
11051
11104
  static getInstance() {
@@ -11086,8 +11139,8 @@ var mt = class e {
11086
11139
  ds_transaction_id: t?.ds_transaction_id || void 0
11087
11140
  };
11088
11141
  }
11089
- }, St = class {
11090
- request = it.getInstance();
11142
+ }, Nt = class {
11143
+ request = _t.getInstance();
11091
11144
  urlEncrypt = "resources/encryption/public_key";
11092
11145
  token = null;
11093
11146
  async getTokenFromServer() {
@@ -11118,14 +11171,14 @@ var mt = class e {
11118
11171
  tag: te.default.util.encode64(i.mode.tag.getBytes())
11119
11172
  };
11120
11173
  }
11121
- }, Ct = class e {
11174
+ }, Pt = class e {
11122
11175
  static instance;
11123
- cardinalToken = ht.getInstance();
11124
- cardinalService = bt.getInstance();
11125
- cardinalPayment = xt.getInstance();
11126
- countryContent = dt.getInstance();
11127
- stateContent = gt.getInstance();
11128
- orchestrator = mt.getInstance();
11176
+ cardinalToken = Et.getInstance();
11177
+ cardinalService = jt.getInstance();
11178
+ cardinalPayment = Mt.getInstance();
11179
+ countryContent = St.getInstance();
11180
+ stateContent = Dt.getInstance();
11181
+ orchestrator = Tt.getInstance();
11129
11182
  constructor() {}
11130
11183
  static getInstance() {
11131
11184
  return e.instance ||= new e(), e.instance;
@@ -11138,14 +11191,14 @@ var mt = class e {
11138
11191
  n.sendAlert("Error", i.error || "Error al procesar el pago");
11139
11192
  return;
11140
11193
  }
11141
- let { id: a, token: o } = i.data, s = await this.cardinalService.setupCardinal(o), c = this.countryContent.getCountries().find((t) => t.id === e.country), l = this.stateContent.getStates().find((t) => t.id === e.region), u = vt(e.cardExpiry), d = new St();
11194
+ let { id: a, token: o } = i.data, s = await this.cardinalService.setupCardinal(o), c = this.countryContent.getCountries().find((t) => t.id === e.country), l = this.stateContent.getStates().find((t) => t.id === e.region), u = kt(e.cardExpiry), d = new Nt();
11142
11195
  try {
11143
11196
  await d.getTokenFromServer();
11144
11197
  } catch (e) {
11145
11198
  throw Error("Failed to get encryption token: " + e);
11146
11199
  }
11147
11200
  let f = d.encryptData({
11148
- card_number: yt(e.cardNumber),
11201
+ card_number: At(e.cardNumber),
11149
11202
  card_expiration_month: u.month,
11150
11203
  card_expiration_year: `20${u.year}`,
11151
11204
  cvv: e.cardCvc,
@@ -11235,8 +11288,8 @@ var mt = class e {
11235
11288
  let e = /* @__PURE__ */ new Date(), t = String(e.getFullYear()).slice(2), n = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0"), a = String(e.getSeconds()).padStart(2, "0");
11236
11289
  return {
11237
11290
  invoice_number: String(Math.floor(Math.random() * 90001) + 1e4),
11238
- terminal_id: "",
11239
- retailer_id: "",
11291
+ terminal_id: "00299998",
11292
+ retailer_id: "000999999999999",
11240
11293
  transaction_date: `${t}${n}`,
11241
11294
  transaction_time: `${r}${i}${a}`
11242
11295
  };
@@ -11252,33 +11305,33 @@ var mt = class e {
11252
11305
  };
11253
11306
  //#endregion
11254
11307
  //#region src/content/loadingContent.ts
11255
- function wt() {
11308
+ function Ft() {
11256
11309
  let e = document.createElement("div");
11257
11310
  return e.setAttribute("data-bizz-loading", ""), e.innerHTML = "\n <style>\n [data-bizz-loading] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 48px 16px;\n }\n .bizz-spinner {\n width: 32px;\n height: 32px;\n border: 3px solid #e9ecef;\n border-top-color: #ff5257;\n border-radius: 50%;\n animation: bizz-spin 0.6s linear infinite;\n }\n @keyframes bizz-spin {\n to { transform: rotate(360deg); }\n }\n </style>\n <div class=\"bizz-spinner\"></div>\n ", e;
11258
11311
  }
11259
11312
  //#endregion
11260
11313
  //#region src/content/utils/money.ts
11261
- var Tt = {
11314
+ var It = {
11262
11315
  minimumFractionDigits: 2,
11263
11316
  maximumFractionDigits: 2,
11264
11317
  useGrouping: !0
11265
11318
  };
11266
- new Intl.NumberFormat("en-US", Tt);
11267
- function Et(e, t = "USD", n = "currency") {
11319
+ new Intl.NumberFormat("en-US", It);
11320
+ function Lt(e, t = "USD", n = "currency") {
11268
11321
  return new Intl.NumberFormat("en-US", {
11269
11322
  style: n,
11270
11323
  currency: t,
11271
- ...Tt
11324
+ ...It
11272
11325
  }).format(e);
11273
11326
  }
11274
- function Dt(e) {
11327
+ function Rt(e) {
11275
11328
  return parseInt(e.replace(/,/g, "").replace(".", ""), 0);
11276
11329
  }
11277
11330
  //#endregion
11278
11331
  //#region src/content/validate/AmountValidate.ts
11279
- var Ot = class e {
11332
+ var zt = class e {
11280
11333
  static instance;
11281
- orchestrator = mt.getInstance();
11334
+ orchestrator = Tt.getInstance();
11282
11335
  urlValidateAmount = "external/online_payments/orders/validate";
11283
11336
  lastAmountValidate = 0;
11284
11337
  constructor() {}
@@ -11292,37 +11345,83 @@ var Ot = class e {
11292
11345
  return this.lastAmountValidate;
11293
11346
  }
11294
11347
  async validateAmount(e, t = !1) {
11295
- let n = typeof e == "string" ? Dt(e) : e;
11348
+ let n = typeof e == "string" ? Rt(e) : e;
11296
11349
  if (!t && n === this.getLastAmountValidate()) return;
11297
11350
  this.setLastAmountValidate(n);
11298
- let r = await it.getInstance().post(this.urlValidateAmount, { data: {
11351
+ let r = await _t.getInstance().post(this.urlValidateAmount, { data: {
11299
11352
  branch_id: this.orchestrator.getConfig().data.branch_id,
11300
11353
  amount_cents: n
11301
11354
  } }), i = await r.json();
11302
11355
  return r.ok, i;
11303
11356
  }
11304
- }, kt = class e {
11305
- request = it.getInstance();
11357
+ }, Bt = {
11358
+ subtotal_cents: "amount",
11359
+ billing_document_number: "billingDocumentNumber",
11360
+ billing_email: "email",
11361
+ card_network: "cardNumber",
11362
+ cardholder_name: "cardHolder",
11363
+ billing_name: "cardHolder",
11364
+ country: "country",
11365
+ description: "description"
11366
+ }, Vt = new Set([
11367
+ "iv",
11368
+ "tag",
11369
+ "encrypted_data",
11370
+ "encrypted_key"
11371
+ ]), Ht = class {
11372
+ origin;
11373
+ constructor(e) {
11374
+ this.origin = e;
11375
+ }
11376
+ sendServerValidationErrors(e, t) {
11377
+ if (typeof t == "string" || !e) return !1;
11378
+ let n = this.buildValidationResults(t);
11379
+ for (let t of n) e.postMessage({
11380
+ type: "payment-form:validation-result",
11381
+ field: t.field,
11382
+ error: t.error
11383
+ }, this.origin);
11384
+ return n.length > 0;
11385
+ }
11386
+ hasEncryptionPayloadErrors(e) {
11387
+ return typeof e == "string" ? !1 : Object.keys(e).some((e) => Vt.has(e));
11388
+ }
11389
+ resolveServerErrorMessage(e) {
11390
+ return typeof e == "string" ? e : "Por favor, revisa los campos";
11391
+ }
11392
+ buildValidationResults(e) {
11393
+ let t = [];
11394
+ for (let [n, r] of Object.entries(e)) {
11395
+ let e = Bt[n], i = Array.isArray(r) ? r.find((e) => typeof e == "string") : void 0;
11396
+ !e || !i || t.push({
11397
+ field: e,
11398
+ error: i
11399
+ });
11400
+ }
11401
+ return t;
11402
+ }
11403
+ }, Ut = class e {
11404
+ request = _t.getInstance();
11306
11405
  urlPaymentIntent = "external/online_payments/payment_intents";
11307
- orchestrator = mt.getInstance();
11406
+ orchestrator = Tt.getInstance();
11308
11407
  static instance;
11309
11408
  constructor() {}
11310
11409
  static getInstance() {
11311
11410
  return e.instance ||= new e(), e.instance;
11312
11411
  }
11313
11412
  async generatePaymentIntentPayload(e) {
11314
- let t = this.orchestrator.getConfig(), n = new St();
11413
+ let t = this.orchestrator.getConfig(), n = new Nt();
11315
11414
  try {
11316
11415
  await n.getTokenFromServer();
11317
11416
  } catch (e) {
11318
11417
  throw Error("Failed to get encryption token: " + e);
11319
11418
  }
11320
11419
  let r = {
11321
- card_number: yt(e.cardNumber),
11420
+ card_number: At(e.cardNumber),
11322
11421
  card_security_code: e.cardCvc,
11323
11422
  cardholder_name: e.cardHolder,
11324
- card_expiration_month: vt(e.cardExpiry).month,
11325
- card_expiration_year: vt(e.cardExpiry).year
11423
+ card_expiration_month: kt(e.cardExpiry).month,
11424
+ card_expiration_year: kt(e.cardExpiry).year
11326
11425
  }, i = null;
11327
11426
  try {
11328
11427
  i = n.encryptData(r);
@@ -11331,7 +11430,7 @@ var Ot = class e {
11331
11430
  }
11332
11431
  return {
11333
11432
  branch_id: t.data.branch_id,
11334
- card_network: _t(e.cardNumber),
11433
+ card_network: Ot(e.cardNumber),
11335
11434
  operation: "direct",
11336
11435
  iv: i.iv,
11337
11436
  tag: i.tag,
@@ -11354,7 +11453,42 @@ var Ot = class e {
11354
11453
  } }, "api/v2"), r = await n.json();
11355
11454
  return n.ok, r;
11356
11455
  }
11357
- }, At = [
11456
+ }, Wt = [
11457
+ {
11458
+ code: "51",
11459
+ title: "¡Fondos insuficientes!",
11460
+ message: "Intenta con otra tarjeta o confirma que tengas saldo disponible."
11461
+ },
11462
+ {
11463
+ code: "04",
11464
+ title: "¡Tarjeta bloqueada!",
11465
+ message: "Contacta a tu banco o prueba con otra tarjeta."
11466
+ },
11467
+ {
11468
+ code: "96",
11469
+ title: "¡Sistema no disponible!",
11470
+ message: "Vuelve a intentar en unos minutos."
11471
+ },
11472
+ {
11473
+ code: "54",
11474
+ title: "¡Tarjeta expirada!",
11475
+ message: "Revisa la fecha de vencimiento o usa otra tarjeta."
11476
+ },
11477
+ {
11478
+ code: "06",
11479
+ title: "¡CVV no válido!",
11480
+ message: "Verifica el código de seguridad e inténtalo de nuevo."
11481
+ },
11482
+ {
11483
+ code: "99",
11484
+ title: "¡Transacción inválida!",
11485
+ message: "Revisa tus datos e inténtalo de nuevo."
11486
+ }
11487
+ ], Gt = (e) => Wt.find((t) => t.code === e) || {
11488
+ title: "¡Error al pagar!",
11489
+ message: "Tu compra no pudo ser procesada!\nPor favor revisa tu información e inténtalo de nuevo",
11490
+ code: 0
11491
+ }, Kt = [
11358
11492
  {
11359
11493
  label: "Documento Único de Identidad (DUI)",
11360
11494
  value: "dui"
@@ -11367,13 +11501,13 @@ var Ot = class e {
11367
11501
  label: "Tarjeta de extranjero",
11368
11502
  value: "resident_card"
11369
11503
  }
11370
- ], jt = [{
11504
+ ], qt = [{
11371
11505
  label: "Selecciona aquí",
11372
11506
  value: ""
11373
- }], Mt = [{
11507
+ }], Jt = [{
11374
11508
  label: "Selecciona aquí",
11375
11509
  value: ""
11376
- }], Nt = {
11510
+ }], Yt = {
11377
11511
  amount: {
11378
11512
  label: "Monto a pagar",
11379
11513
  icon: "currency-dollar",
@@ -11386,7 +11520,7 @@ var Ot = class e {
11386
11520
  placeholder: "Tipo de documento",
11387
11521
  type: "select",
11388
11522
  default: "dui",
11389
- options: At
11523
+ options: Kt
11390
11524
  },
11391
11525
  billingDocumentNumber: {
11392
11526
  label: "Número de documento",
@@ -11430,7 +11564,7 @@ var Ot = class e {
11430
11564
  icon: "description",
11431
11565
  placeholder: "Description"
11432
11566
  }
11433
- }, Pt = {
11567
+ }, Xt = {
11434
11568
  amount: {
11435
11569
  label: "Monto a pagar",
11436
11570
  icon: "currency-dollar",
@@ -11443,7 +11577,7 @@ var Ot = class e {
11443
11577
  placeholder: "Selecciona tipo de documento",
11444
11578
  type: "select",
11445
11579
  default: "dui",
11446
- options: At
11580
+ options: Kt
11447
11581
  },
11448
11582
  billingDocumentNumber: {
11449
11583
  label: "Número de documento",
@@ -11503,14 +11637,14 @@ var Ot = class e {
11503
11637
  icon: "map-pin",
11504
11638
  placeholder: "Selecciona aquí",
11505
11639
  type: "select",
11506
- options: jt
11640
+ options: qt
11507
11641
  },
11508
11642
  region: {
11509
11643
  label: "Región",
11510
11644
  icon: "map-pin",
11511
11645
  placeholder: "Selecciona aquí",
11512
11646
  type: "select",
11513
- options: Mt
11647
+ options: Jt
11514
11648
  },
11515
11649
  city: {
11516
11650
  label: "Ciudad",
@@ -11536,13 +11670,13 @@ var Ot = class e {
11536
11670
  };
11537
11671
  //#endregion
11538
11672
  //#region src/content/html/iframeButtonContent.ts
11539
- function Ft(e) {
11673
+ function Zt(e) {
11540
11674
  let t = e?.label ?? "Pagar";
11541
11675
  return `<button type="submit" data-label="${t}" data-loading-label="${e?.loadingLabel ?? "Procesando..."}">${t}</button>`;
11542
11676
  }
11543
11677
  //#endregion
11544
11678
  //#region src/content/html/iframeHeaderContent.ts
11545
- function It(e) {
11679
+ function Qt(e) {
11546
11680
  let { header: t } = e, n = !0, r = !0, i = !0, a = !0, o = !0;
11547
11681
  return typeof t == "boolean" && !t ? "" : (typeof t == "object" && ("logo" in t && typeof t.logo == "boolean" && (n = t.logo), "totalAmount" in t && typeof t.totalAmount == "boolean" && (r = t.totalAmount), "description" in t && typeof t.description == "boolean" && (i = t.description), "requestMessage" in t && typeof t.requestMessage == "boolean" && (a = t.requestMessage), "date" in t && typeof t.date == "boolean" && (o = t.date)), `
11548
11682
  <header class="form-header">
@@ -11564,7 +11698,7 @@ function It(e) {
11564
11698
  }
11565
11699
  //#endregion
11566
11700
  //#region src/content/html/iframeInputsContent.ts
11567
- function Lt(e) {
11701
+ function $t(e) {
11568
11702
  let t = e.find((e) => e.name === "amount");
11569
11703
  return {
11570
11704
  amountHtml: t ? `
@@ -11604,39 +11738,39 @@ function Lt(e) {
11604
11738
  }
11605
11739
  //#endregion
11606
11740
  //#region src/content/iframeContent.html?raw
11607
- var Rt = "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <style>\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n scrollbar-width: none;\n -ms-overflow-style: none;\n }\n *::-webkit-scrollbar,\n html::-webkit-scrollbar,\n body::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n /* Hide scrollbars visually; scrolling still works (wheel, touch, keyboard) */\n body {\n font-family: Poppins, sans-serif;\n padding: 16px;\n }\n form#payment-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n section.payment-form-container {\n padding: 32px;\n border-radius: 12px;\n border: 1px solid #D3D9DE;\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-bottom: 1rem;\n }\n label {\n font-family: Poppins, sans-serif;\n font-weight: 400;\n line-height: 1.5rem;\n font-size: 1rem;\n color: #69737D;\n }\n .input-wrapper {\n display: flex;\n align-items: center;\n gap: 8px;\n background-color: #F6F7F9;\n border-radius: 12px;\n padding: 12px 15px;\n border: 1px solid transparent;\n transition: border-color 0.2s;\n }\n\n .input-wrapper svg {\n width: 18px;\n height: 18px;\n color: #9ca3af;\n flex-shrink: 0;\n }\n .input-wrapper input, select {\n width: 100%;\n border: none;\n background: transparent;\n font-family: Poppins, sans-serif;\n font-size: 14px;\n color: #1f2937;\n outline: none;\n }\n .input-wrapper input::placeholder {\n color: #9ca3af;\n }\n .input-wrapper input[disabled] {\n background-color: #f6f7f9;\n color: #69737D;\n cursor: not-allowed;\n }\n .field-error {\n font-size: 14px;\n padding-top: 4px;\n color: #DB3339;\n font-weight: 400;\n }\n .field-error.visible {\n display: block;\n }\n button {\n background-color: #ff5257;\n color: #fff;\n font-family: Poppins, sans-serif;\n font-size: 1rem;\n font-weight: 700;\n gap: .5rem;\n isolation: isolate;\n line-height: 1.5rem;\n padding: .5rem 1rem;\n transition-duration: .2s;\n transition-property: all;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n border: none;\n border-radius: 6px;\n cursor: pointer;\n }\n button:disabled {\n cursor: not-allowed;\n background-color: #e9ecef;\n color: #adb5bd\n }\n button:disabled:hover {\n background-color: #d7d9db;\n color: #a4a7ab;\n }\n button:hover {\n background-color: #e6484d;\n }\n .divider {\n margin-top: 0.5rem;\n background-color: #e9ecef;\n width: 100%;\n height: 1px;\n }\n .form-alert {\n display: none;\n text-align: center;\n padding: 12px 16px;\n }\n .form-alert.visible {\n display: block;\n }\n .form-alert:not(.form-alert--receipt) h3 {\n font-family: Poppins, sans-serif;\n font-size: 1rem;\n font-weight: 700;\n color: #1f2937;\n margin-bottom: 4px;\n }\n .form-alert:not(.form-alert--receipt) p {\n font-family: Poppins, sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: #86919c;\n }\n .form-alert--receipt {\n padding: 20px 12px 24px;\n }\n .payment-success {\n max-width: 320px;\n margin: 0 auto;\n text-align: center;\n }\n .payment-success__amount {\n font-family: Poppins, sans-serif;\n font-size: 2rem;\n font-weight: 700;\n color: #000000;\n letter-spacing: -0.02em;\n margin: 0 0 10px;\n line-height: 1.15;\n }\n .payment-success__datetime {\n font-family: Poppins, sans-serif;\n font-size: 0.8125rem;\n font-weight: 400;\n color: #6c757d;\n margin: 0 0 24px;\n line-height: 1.4;\n }\n .payment-success__blocks {\n display: flex;\n flex-direction: column;\n gap: 18px;\n margin-bottom: 28px;\n text-align: center;\n }\n .payment-success__block {\n display: flex;\n flex-direction: column;\n gap: 4px;\n align-items: center;\n }\n .payment-success__label {\n font-family: Poppins, sans-serif;\n font-size: 0.75rem;\n font-weight: 400;\n color: #6c757d;\n line-height: 1.3;\n }\n .payment-success__value {\n font-family: Poppins, sans-serif;\n font-size: 1.0625rem;\n font-weight: 700;\n color: #000000;\n line-height: 1.3;\n }\n .payment-success__footer {\n padding-top: 4px;\n }\n .payment-success__done {\n font-family: Poppins, sans-serif;\n font-size: 1.5rem;\n font-weight: 700;\n color: #000000;\n margin: 0 0 10px;\n line-height: 1.2;\n }\n \n .bizz-logo {\n width: 92px;\n height: 32px;\n display: block;\n margin: 0 auto 32px;\n }\n\n .form-header {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 32px;\n flex-direction: column;\n font-family: Poppins, sans-serif;\n font-weight: 400;\n line-height: 1.5rem;\n }\n .commerce-total-amount-container {\n color: #1E2125;\n margin-top: 32px;\n }\n .commerce-total-amount-container .total-amount-value {\n font-size: 3rem;\n font-weight: 600;\n line-height: 4rem;\n }\n .form-header .commerce-description {\n color: #1E2125;\n font-size: 1rem;\n }\n .form-header .commerce-total-amount {\n color: #1E2125;\n font-size: 1rem;\n margin-top: 32px;\n }\n .form-header .commerce-required {\n color: #121417;\n font-size: 1rem;\n margin-top: 32px;\n }\n .commerce-date {\n margin-top: 8px;\n font-size: 1rem;\n color: #69737D;\n }\n .commerce-logo {\n border-radius: 60px;\n border: 3px solid #F6F7F9;\n width: 60px;\n height: 60px;\n }\n .divider-header {\n margin: 32px 0px;\n background-color: #e9ecef;\n width: 100%;\n height: 1px;\n display: block;\n }\n </style>\n</head>\n<body>\n <!--BIZZ_LOGO-->\n <section class=\"payment-form-container\">\n <!--HEADER-->\n <form id=\"payment-form\">\n <div id=\"payment-form-static-fields\">\n <!--AMOUNT_FIELD-->\n </div>\n <div id=\"payment-form-dynamic-fields\">\n <!--FIELDS-->\n </div>\n <div class=\"form-alert\" id=\"form-alert\"></div>\n <!--SUBMIT_BUTTON-->\n </form>\n </section>\n <!--SCRIPT-->\n</body>\n</html>\n", zt = "(function(){var{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}=typeof Reflect<`u`&&Reflect;a||=function(e){return e},o||=function(e){return e},c||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},l||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var u=b(Array.prototype.forEach),d=b(Array.prototype.lastIndexOf),ee=b(Array.prototype.pop),f=b(Array.prototype.push),p=b(Array.prototype.splice),m=b(String.prototype.toLowerCase),h=b(String.prototype.toString),g=b(String.prototype.match),te=b(String.prototype.replace),ne=b(String.prototype.indexOf),re=b(String.prototype.trim),_=b(Object.prototype.hasOwnProperty),v=b(RegExp.prototype.test),y=ie(TypeError);function b(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c(e,t,r)}}function ie(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return l(e,n)}}function x(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if(typeof t==`string`){let e=i(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function S(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function C(t){let n=s(null);for(let[r,i]of e(t))_(t,r)&&(Array.isArray(i)?n[r]=S(i):i&&typeof i==`object`&&i.constructor===Object?n[r]=C(i):n[r]=i);return n}function ae(e,t){for(;e!==null;){let n=i(e,t);if(n){if(n.get)return b(n.get);if(typeof n.value==`function`)return b(n.value)}e=r(e)}function n(){return null}return n}var oe=a(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),se=a(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ce=a([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),le=a([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ue=a(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),de=a([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),fe=a([`#text`]),pe=a(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),me=a(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),he=a(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ge=a([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),_e=o(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),ve=o(/<%[\\w\\W]*|[\\w\\W]*%>/gm),ye=o(/\\$\\{[\\w\\W]*/gm),be=o(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),w=o(/^aria-[\\-\\w]+$/),xe=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),Se=o(/^(?:\\w+script|data):/i),Ce=o(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),we=o(/^html$/i),Te=o(/^[a-z][.\\w]*(-[.\\w]+)+$/i),Ee=Object.freeze({__proto__:null,ARIA_ATTR:w,ATTR_WHITESPACE:Ce,CUSTOM_ELEMENT:Te,DATA_ATTR:be,DOCTYPE_NAME:we,ERB_EXPR:ve,IS_ALLOWED_URI:xe,IS_SCRIPT_OR_DATA:Se,MUSTACHE_EXPR:_e,TMPLIT_EXPR:ye}),De={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Oe=function(){return typeof window>`u`?null:window},ke=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ae=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function je(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oe(),n=e=>je(e);if(n.version=`3.3.3`,n.removed=[],!t||!t.document||t.document.nodeType!==De.document||!t.Element)return n.isSupported=!1,n;let{document:r}=t,i=r,o=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:b,Element:ie,NodeFilter:S,NamedNodeMap:_e=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:ve,DOMParser:ye,trustedTypes:be}=t,w=ie.prototype,Se=ae(w,`cloneNode`),Ce=ae(w,`remove`),Te=ae(w,`nextSibling`),Me=ae(w,`childNodes`),T=ae(w,`parentNode`);if(typeof l==`function`){let e=r.createElement(`template`);e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,D=``,{implementation:O,createNodeIterator:Ne,createDocumentFragment:Pe,getElementsByTagName:Fe}=r,{importNode:Ie}=i,k=Ae();n.isSupported=typeof e==`function`&&typeof T==`function`&&O&&O.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Le,ERB_EXPR:A,TMPLIT_EXPR:Re,DATA_ATTR:ze,ARIA_ATTR:Be,IS_SCRIPT_OR_DATA:Ve,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:He}=Ee,{IS_ALLOWED_URI:Ue}=Ee,M=null,We=x({},[...oe,...se,...ce,...ue,...fe]),N=null,Ge=x({},[...pe,...me,...he,...ge]),P=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),F=null,I=null,L=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ke=!0,qe=!0,Je=!1,Ye=!0,R=!1,Xe=!0,z=!1,Ze=!1,B=!1,V=!1,H=!1,U=!1,W=!0,Qe=!1,$e=!0,et=!1,G={},K=null,tt=x({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),nt=null,rt=x({},[`audio`,`video`,`img`,`source`,`image`,`track`]),it=null,at=x({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ot=`http://www.w3.org/1998/Math/MathML`,st=`http://www.w3.org/2000/svg`,q=`http://www.w3.org/1999/xhtml`,J=q,ct=!1,lt=null,ut=x({},[ot,st,q],h),dt=x({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ft=x({},[`annotation-xml`]),pt=x({},[`title`,`style`,`font`,`a`,`script`]),mt=null,ht=[`application/xhtml+xml`,`text/html`],Y=null,X=null,gt=r.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(X&&X===e)){if((!e||typeof e!=`object`)&&(e={}),e=C(e),mt=ht.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=mt===`application/xhtml+xml`?h:m,M=_(e,`ALLOWED_TAGS`)?x({},e.ALLOWED_TAGS,Y):We,N=_(e,`ALLOWED_ATTR`)?x({},e.ALLOWED_ATTR,Y):Ge,lt=_(e,`ALLOWED_NAMESPACES`)?x({},e.ALLOWED_NAMESPACES,h):ut,it=_(e,`ADD_URI_SAFE_ATTR`)?x(C(at),e.ADD_URI_SAFE_ATTR,Y):at,nt=_(e,`ADD_DATA_URI_TAGS`)?x(C(rt),e.ADD_DATA_URI_TAGS,Y):rt,K=_(e,`FORBID_CONTENTS`)?x({},e.FORBID_CONTENTS,Y):tt,F=_(e,`FORBID_TAGS`)?x({},e.FORBID_TAGS,Y):C({}),I=_(e,`FORBID_ATTR`)?x({},e.FORBID_ATTR,Y):C({}),G=_(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Ke=e.ALLOW_ARIA_ATTR!==!1,qe=e.ALLOW_DATA_ATTR!==!1,Je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,R=e.SAFE_FOR_TEMPLATES||!1,Xe=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,V=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,U=e.RETURN_TRUSTED_TYPE||!1,B=e.FORCE_BODY||!1,W=e.SANITIZE_DOM!==!1,Qe=e.SANITIZE_NAMED_PROPS||!1,$e=e.KEEP_CONTENT!==!1,et=e.IN_PLACE||!1,Ue=e.ALLOWED_URI_REGEXP||xe,J=e.NAMESPACE||q,dt=e.MATHML_TEXT_INTEGRATION_POINTS||dt,ft=e.HTML_INTEGRATION_POINTS||ft,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),R&&(qe=!1),H&&(V=!0),G&&(M=x({},fe),N=s(null),G.html===!0&&(x(M,oe),x(N,pe)),G.svg===!0&&(x(M,se),x(N,me),x(N,ge)),G.svgFilters===!0&&(x(M,ce),x(N,me),x(N,ge)),G.mathMl===!0&&(x(M,ue),x(N,he),x(N,ge))),_(e,`ADD_TAGS`)||(L.tagCheck=null),_(e,`ADD_ATTR`)||(L.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?L.tagCheck=e.ADD_TAGS:(M===We&&(M=C(M)),x(M,e.ADD_TAGS,Y))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?L.attributeCheck=e.ADD_ATTR:(N===Ge&&(N=C(N)),x(N,e.ADD_ATTR,Y))),e.ADD_URI_SAFE_ATTR&&x(it,e.ADD_URI_SAFE_ATTR,Y),e.FORBID_CONTENTS&&(K===tt&&(K=C(K)),x(K,e.FORBID_CONTENTS,Y)),e.ADD_FORBID_CONTENTS&&(K===tt&&(K=C(K)),x(K,e.ADD_FORBID_CONTENTS,Y)),$e&&(M[`#text`]=!0),z&&x(M,[`html`,`head`,`body`]),M.table&&(x(M,[`tbody`]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw y(`TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw y(`TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.`);E=e.TRUSTED_TYPES_POLICY,D=E.createHTML(``)}else E===void 0&&(E=ke(be,o)),E!==null&&typeof D==`string`&&(D=E.createHTML(``));a&&a(e),X=e}},yt=x({},[...se,...ce,...le]),bt=x({},[...ue,...de]),xt=function(e){let t=T(e);(!t||!t.tagName)&&(t={namespaceURI:J,tagName:`template`});let n=m(e.tagName),r=m(t.tagName);return lt[e.namespaceURI]?e.namespaceURI===st?t.namespaceURI===q?n===`svg`:t.namespaceURI===ot?n===`svg`&&(r===`annotation-xml`||dt[r]):!!yt[n]:e.namespaceURI===ot?t.namespaceURI===q?n===`math`:t.namespaceURI===st?n===`math`&&ft[r]:!!bt[n]:e.namespaceURI===q?t.namespaceURI===st&&!ft[r]||t.namespaceURI===ot&&!dt[r]?!1:!bt[n]&&(pt[n]||!yt[n]):!!(mt===`application/xhtml+xml`&&lt[e.namespaceURI]):!1},Z=function(e){f(n.removed,{element:e});try{T(e).removeChild(e)}catch{Ce(e)}},Q=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{f(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e===`is`)if(V||H)try{Z(t)}catch{}else try{t.setAttribute(e,``)}catch{}},St=function(e){let t=null,n=null;if(B)e=`<remove></remove>`+e;else{let t=g(e,/^[\\r\\n\\t ]+/);n=t&&t[0]}mt===`application/xhtml+xml`&&J===q&&(e=`<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>`+e+`</body></html>`);let i=E?E.createHTML(e):e;if(J===q)try{t=new ye().parseFromString(i,mt)}catch{}if(!t||!t.documentElement){t=O.createDocument(J,`template`,null);try{t.documentElement.innerHTML=ct?D:i}catch{}}let a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),J===q?Fe.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},Ct=function(e){return Ne.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof ve&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof _e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof b==`function`&&e instanceof b};function $(e,t,r){u(e,e=>{e.call(n,t,r,X)})}let Et=function(e){let t=null;if($(k.beforeSanitizeElements,e,null),wt(e))return Z(e),!0;let r=Y(e.nodeName);if($(k.uponSanitizeElement,e,{tagName:r,allowedTags:M}),Xe&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&v(/<[/\\w!]/g,e.innerHTML)&&v(/<[/\\w!]/g,e.textContent)||e.nodeType===De.progressingInstruction||Xe&&e.nodeType===De.comment&&v(/<[/\\w]/g,e.data))return Z(e),!0;if(!(L.tagCheck instanceof Function&&L.tagCheck(r))&&(!M[r]||F[r])){if(!F[r]&&Ot(r)&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r)))return!1;if($e&&!K[r]){let t=T(e)||e.parentNode,n=Me(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Se(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,Te(e))}}}return Z(e),!0}return e instanceof ie&&!xt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&v(/<\\/no(script|embed|frames)/i,e.innerHTML)?(Z(e),!0):(R&&e.nodeType===De.text&&(t=e.textContent,u([Le,A,Re],e=>{t=te(t,e,` `)}),e.textContent!==t&&(f(n.removed,{element:e.cloneNode()}),e.textContent=t)),$(k.afterSanitizeElements,e,null),!1)},Dt=function(e,t,n){if(I[t]||W&&(t===`id`||t===`name`)&&(n in r||n in gt))return!1;if(!(qe&&!I[t]&&v(ze,t))&&!(Ke&&v(Be,t))&&!(L.attributeCheck instanceof Function&&L.attributeCheck(t,e))){if(!N[t]||I[t]){if(!(Ot(e)&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&v(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||t===`is`&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,n)||P.tagNameCheck instanceof Function&&P.tagNameCheck(n))))return!1}else if(!it[t]&&!v(Ue,te(n,j,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ne(n,`data:`)===0&&nt[e])&&!(Je&&!v(Ve,te(n,j,``)))&&n)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&g(e,He)},kt=function(e){$(k.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},i=t.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=t[i],c=Y(a),l=s,d=a===`value`?l:re(l);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,$(k.uponSanitizeAttribute,e,r),d=r.attrValue,Qe&&(c===`id`||c===`name`)&&(Q(a,e),d=`user-content-`+d),Xe&&v(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(a,e);continue}if(c===`attributename`&&g(d,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!Ye&&v(/\\/>/i,d)){Q(a,e);continue}R&&u([Le,A,Re],e=>{d=te(d,e,` `)});let f=Y(e.nodeName);if(!Dt(f,c,d)){Q(a,e);continue}if(E&&typeof be==`object`&&typeof be.getAttributeType==`function`&&!o)switch(be.getAttributeType(f,c)){case`TrustedHTML`:d=E.createHTML(d);break;case`TrustedScriptURL`:d=E.createScriptURL(d);break}if(d!==l)try{o?e.setAttributeNS(o,a,d):e.setAttribute(a,d),wt(e)?Z(e):ee(n.removed)}catch{Q(a,e)}}$(k.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(k.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(k.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof c&&e(n.content);$(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=null,a=null,o=null,s=null;if(ct=!e,ct&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw y(`dirty is not a string, aborting`)}else throw y(`toString is not a function`);if(!n.isSupported)return e;if(Ze||vt(t),n.removed=[],typeof e==`string`&&(et=!1),et){if(e.nodeName){let t=Y(e.nodeName);if(!M[t]||F[t])throw y(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof b)r=St(`<!---->`),a=r.ownerDocument.importNode(e,!0),a.nodeType===De.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?r=a:r.appendChild(a);else{if(!V&&!R&&!z&&e.indexOf(`<`)===-1)return E&&U?E.createHTML(e):e;if(r=St(e),!r)return V?null:U?D:``}r&&B&&Z(r.firstChild);let l=Ct(et?e:r);for(;o=l.nextNode();)Et(o),kt(o),o.content instanceof c&&At(o.content);if(et)return e;if(V){if(H)for(s=Pe.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(N.shadowroot||N.shadowrootmode)&&(s=Ie.call(i,s,!0)),s}let d=z?r.outerHTML:r.innerHTML;return z&&M[`!doctype`]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&v(we,r.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+r.ownerDocument.doctype.name+`>\n`+d),R&&u([Le,A,Re],e=>{d=te(d,e,` `)}),E&&U?E.createHTML(d):d},n.setConfig=function(){vt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ze=!0},n.clearConfig=function(){X=null,Ze=!1},n.isValidAttribute=function(e,t,n){return X||vt({}),Dt(Y(e),Y(t),n)},n.addHook=function(e,t){typeof t==`function`&&f(k[e],t)},n.removeHook=function(e,t){if(t!==void 0){let n=d(k[e],t);return n===-1?void 0:p(k[e],n,1)[0]}return ee(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k=Ae()},n}var Me=je(),T=class e{static instance;baseUrl=``;bearerToken=null;constructor(){}static getInstance(){return e.instance||=new e,e.instance}setBearerToken(e){this.bearerToken=e}async get(e,t={},n=`api/v1`){return fetch(`${this.baseUrl}/${n}/${e}`,{...t,method:`GET`,headers:{\"Content-Type\":`application/json`,Authorization:`Bearer ${this.bearerToken}`,...t.headers}})}async post(e,t,n={},r=`api/v1`){return fetch(`${this.baseUrl}/${r}/${e}`,{body:Me.sanitize(JSON.stringify(t)),method:`POST`,headers:{\"Content-Type\":`application/json`,Authorization:`Bearer ${this.bearerToken}`,...n.headers},...n})}},E=Object.defineProperty,D=(e,t,n)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t,n)=>D(e,typeof t==`symbol`?t:t+``,n),Ne={\"#\":{pattern:/[0-9]/},\"@\":{pattern:/[a-zA-Z]/},\"*\":{pattern:/[a-zA-Z0-9]/}},Pe=(e,t,n)=>e.replaceAll(t,``).replace(n,`.`).replace(`..`,`.`).replace(/[^.\\d]/g,``),Fe=(e,t,n)=>new Intl.NumberFormat(n.number?.locale??`en`,{minimumFractionDigits:e,maximumFractionDigits:t,roundingMode:`trunc`}),Ie=(e,t=!0,n)=>{let r=n.number?.unsigned!==!0&&e.startsWith(`-`)?`-`:``,i=n.number?.fraction??0,a=Fe(0,i,n),o=a.formatToParts(1000.12),s=o.find(e=>e.type===`group`)?.value??` `,c=o.find(e=>e.type===`decimal`)?.value??`.`,l=Pe(e,s,c);if(Number.isNaN(parseFloat(l)))return r;let u=l.split(`.`);u[1]!=null&&u[1].length>=1&&(a=Fe(u[1].length<=i?u[1].length:i,i,n));let d=a.format(parseFloat(l));return t?i>0&&l.endsWith(`.`)&&!l.slice(0,-1).includes(`.`)&&(d+=c):d=Pe(d,s,c),r+d},k=e=>JSON.parse(e.replaceAll(`'`,`\"`)),Le=(e,t={})=>{let n={...t};e.dataset.maska!=null&&e.dataset.maska!==``&&(n.mask=Re(e.dataset.maska)),e.dataset.maskaEager!=null&&(n.eager=A(e.dataset.maskaEager)),e.dataset.maskaReversed!=null&&(n.reversed=A(e.dataset.maskaReversed)),e.dataset.maskaTokensReplace!=null&&(n.tokensReplace=A(e.dataset.maskaTokensReplace)),e.dataset.maskaTokens!=null&&(n.tokens=ze(e.dataset.maskaTokens));let r={};return e.dataset.maskaNumberLocale!=null&&(r.locale=e.dataset.maskaNumberLocale),e.dataset.maskaNumberFraction!=null&&(r.fraction=parseInt(e.dataset.maskaNumberFraction)),e.dataset.maskaNumberUnsigned!=null&&(r.unsigned=A(e.dataset.maskaNumberUnsigned)),(e.dataset.maskaNumber!=null||Object.values(r).length>0)&&(n.number=r),n},A=e=>e===``?!0:!!JSON.parse(e),Re=e=>e.startsWith(`[`)&&e.endsWith(`]`)?k(e):e,ze=e=>{if(e.startsWith(`{`)&&e.endsWith(`}`))return k(e);let t={};return e.split(`|`).forEach(e=>{let n=e.split(`:`);t[n[0]]={pattern:Be()?new RegExp(n[1],`u`):new RegExp(n[1]),optional:n[2]===`optional`,multiple:n[2]===`multiple`,repeated:n[2]===`repeated`}}),t},Be=()=>{try{return!0}catch{return!1}},Ve=class{constructor(e={}){O(this,`opts`,{}),O(this,`memo`,new Map);let t={...e};if(t.tokens!=null){t.tokens=t.tokensReplace?{...t.tokens}:{...Ne,...t.tokens};for(let e of Object.values(t.tokens))typeof e.pattern==`string`&&(e.pattern=Be()?new RegExp(e.pattern,`u`):new RegExp(e.pattern))}else t.tokens=Ne;Array.isArray(t.mask)&&(t.mask.length>1?t.mask=[...t.mask].sort((e,t)=>e.length-t.length):t.mask=t.mask[0]??``),t.mask===``&&(t.mask=null),this.opts=t}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){let t=this.findMask(String(e));if(this.opts.mask==null||t==null)return!1;let n=this.process(String(e),t).length;return typeof this.opts.mask==`string`?n>=this.opts.mask.length:n>=t.length}findMask(e){let t=this.opts.mask;if(t==null)return null;if(typeof t==`string`)return t;if(typeof t==`function`)return t(e);let n=this.process(e,t.slice(-1).pop()??``,!1);return t.find(t=>this.process(e,t,!1).length>=n.length)??``}escapeMask(e){let t=[],n=[];return e.split(``).forEach((r,i)=>{r===`!`&&e[i-1]!==`!`?n.push(i-n.length):t.push(r)}),{mask:t.join(``),escaped:n}}process(e,t,n=!0){if(this.opts.number!=null)return Ie(e,n,this.opts);if(t==null)return e;let r=`v=${e},mr=${t},m=${n?1:0}`;if(this.memo.has(r))return this.memo.get(r);let{mask:i,escaped:a}=this.escapeMask(t),o=[],s=this.opts.tokens==null?{}:this.opts.tokens,c=this.isReversed()?-1:1,l=this.isReversed()?`unshift`:`push`,u=this.isReversed()?0:i.length-1,d=this.isReversed()?()=>m>-1&&h>-1:()=>m<i.length&&h<e.length,ee=e=>!this.isReversed()&&e<=u||this.isReversed()&&e>=u,f,p=-1,m=this.isReversed()?i.length-1:0,h=this.isReversed()?e.length-1:0,g=!1;for(;d();){let t=i.charAt(m),r=s[t],d=r?.transform==null?e.charAt(h):r.transform(e.charAt(h));if(!a.includes(m)&&r!=null?(d.match(r.pattern)==null?r.multiple?g&&=(m+=c,h-=c,!1):d===f?f=void 0:r.optional&&(m+=c,h-=c):(o[l](d),r.repeated?(p===-1?p=m:m===u&&m!==p&&(m=p-c),u===p&&(m-=c)):r.multiple&&(g=!0,m-=c),m+=c),h+=c):(n&&!this.isEager()&&o[l](t),d===t&&!this.isEager()?h+=c:f=t,this.isEager()||(m+=c)),this.isEager())for(;ee(m)&&(s[i.charAt(m)]==null||a.includes(m));){if(n){if(o[l](i.charAt(m)),e.charAt(h)===i.charAt(m)){m+=c,h+=c;continue}}else i.charAt(m)===e.charAt(h)&&(h+=c);m+=c}}return this.memo.set(r,o.join(``)),this.memo.get(r)}},j=class{constructor(e,t={}){O(this,`items`,new Map),O(this,`eventAbortController`),O(this,`onInput`,e=>{if(e instanceof CustomEvent&&e.type===`input`&&!e.isTrusted&&!e.bubbles)return;let t=e.target,n=this.items.get(t);if(n===void 0)return;let r=`inputType`in e&&e.inputType.startsWith(`delete`),i=n.isEager(),a=r&&i&&n.unmasked(t.value)===``?``:t.value;this.fixCursor(t,r,()=>this.setValue(t,a))}),this.options=t,this.eventAbortController=new AbortController,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){e.value!==``&&e.value!==this.processInput(e)?.masked&&this.setValue(e,e.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(e){let t=this.getOptions(this.options);for(let n of e){if(!this.items.has(n)){let{signal:e}=this.eventAbortController;n.addEventListener(`input`,this.onInput,{capture:!0,signal:e})}let e=new Ve(Le(n,t));this.items.set(n,e),queueMicrotask(()=>this.updateValue(n)),n.selectionStart===null&&e.isEager()&&console.warn(\"Maska: input of `%s` type is not supported\",n.type)}}getInputs(e){return typeof e==`string`?Array.from(document.querySelectorAll(e)):`length`in e?Array.from(e):[e]}getOptions(e){let{onMaska:t,preProcess:n,postProcess:r,...i}=e;return i}fixCursor(e,t,n){let r=e.selectionStart,i=e.value;if(n(),r===null||r===i.length&&!t)return;let a=e.value,o=i.slice(0,r),s=a.slice(0,r),c=this.processInput(e,o)?.unmasked,l=this.processInput(e,s)?.unmasked;if(c===void 0||l===void 0)return;let u=r;o!==s&&(u+=t?a.length-i.length:c.length-l.length),e.setSelectionRange(u,u)}setValue(e,t){let n=this.processInput(e,t);n!==void 0&&(e.value=n.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(e=>e(n)):this.options.onMaska(n)),e.dispatchEvent(new CustomEvent(`maska`,{detail:n})),e.dispatchEvent(new CustomEvent(`input`,{detail:n.masked})))}processInput(e,t){let n=this.items.get(e);if(n===void 0)return;let r=t??e.value;this.options.preProcess!=null&&(r=this.options.preProcess(r));let i=n.masked(r);return this.options.postProcess!=null&&(i=this.options.postProcess(i)),{masked:i,unmasked:n.unmasked(r),completed:n.completed(r)}}},He={minimumFractionDigits:2,maximumFractionDigits:2,useGrouping:!0},Ue=new Intl.NumberFormat(`en-US`,He);function M(e,t=`USD`,n=`currency`){return new Intl.NumberFormat(`en-US`,{style:n,currency:t,...He}).format(e)}function We(e){if(!e?.trim())return`—`;let t=e.trim();return t.startsWith(`#`)?t:`#${t}`}var N=(e,t)=>e.querySelector(`input[name=\"${t}\"], select[name=\"${t}\"]`),Ge=(e,t)=>{let n=e.querySelector(`button[type=\"submit\"]`);if(n){n.disabled=t;let e=n.dataset.label??`Pagar`,r=n.dataset.loadingLabel??`Procesando...`;n.textContent=t?r:e}},P=e=>{e.reset();let t=e.querySelector(`select[name=\"documentType\"]`);t&&(t.value=`dui`,t.dispatchEvent(new Event(`change`,{bubbles:!0})))},F=(e,t,n)=>{let r=e.querySelector(`.form-alert`);r&&(r.innerHTML=`<h3>`+t+`</h3><p>`+n+`</p>`,r.classList.remove(`form-alert--receipt`),r.classList.add(`visible`))},I=(e,t)=>{let n=document.querySelector(`.form-header`);if(n){let e=n.querySelector(`.commerce-logo`);e&&(n.innerHTML=``,n.appendChild(e))}let r=document.querySelector(`.divider-header`);r&&(r.style.display=`none`);let i=t.data,a=M(i.amount_cents/100,i.amount_currency),o=`${i.date}, ${i.time}`,s=We(i.reference_number),c=We(i.authorization_number);e.innerHTML=`<div class=\"payment-success\"><p class=\"payment-success__amount\">`+a+`</p><p class=\"payment-success__datetime\">`+o+`</p><div class=\"payment-success__blocks\"><div class=\"payment-success__block\"><span class=\"payment-success__label\">Número de referencia</span><span class=\"payment-success__value\">`+s+`</span></div><div class=\"payment-success__block\"><span class=\"payment-success__label\">Número de autorización</span><span class=\"payment-success__value\">`+c+`</span></div></div><div class=\"payment-success__footer\"><h3 class=\"payment-success__done\">¡Gracias por tu compra!</h3></div></div>`},L=(e,t,n)=>{let r=N(e,t);if(!r)return;let i=r.closest(`.input-wrapper`),a=i?.parentElement?.querySelector(`.field-error`);n?(i&&i.classList.add(`has-error`),a&&(a.textContent=n,a.classList.add(`visible`),Ke(a))):(i&&i.classList.remove(`has-error`),a&&(a.textContent=``,a.classList.remove(`visible`)))},Ke=e=>{e.scrollIntoView({behavior:`smooth`,block:`center`})},qe=e=>{let t=e.find(e=>e.name===`amount`);t&&(t.addEventListener(`input`,function(){let e=t.value.replace(/\\D/g,``);if(e){let n=parseInt(e,10)/100;t.value=Ue.format(n)}else t.value=``}),t.addEventListener(`blur`,()=>{parent.postMessage({type:`payment-form:validate-amount`,amount:t.value},`*`)}))},Je=class e{static instance;states=[];statesLoadError=null;constructor(){}static getInstance(){return e.instance||=new e,e.instance}getStates(){return this.states}setStates(e){this.states=e}getStatesLoadError(){return this.statesLoadError}async fetchStates(e){let t=await T.getInstance().get(`resources/countries/${e}/states`),n=await t.json();return t.ok?(this.statesLoadError=null,this.setStates(n.data),n):(this.statesLoadError=`No se pudo cargar la lista de estados.`,this.setStates([]),n)}},Ye=e=>{let t=e.find(e=>e.name===`documentType`),n=e.find(e=>e.name===`billingDocumentNumber`);if(!t||!n)return;let r=new j(n);t.addEventListener(`change`,function(e){r?.destroy(),e.target.value===`dui`?(n.setAttribute(`inputmode`,`numeric`),n.setAttribute(`data-maska`,`########-#`),r=new j(n)):(n.removeAttribute(`inputmode`),n.removeAttribute(`data-maska`),n.value=``,r=null)})},R=e=>{e.forEach(function(e){e instanceof HTMLInputElement&&(e.addEventListener(`blur`,function(){let t=e.dataset.maskaValue||e.value;parent.postMessage({type:`payment-form:validate`,field:e.name,value:t},`*`)}),e.addEventListener(`input`,function(){let t=e.closest(`.input-wrapper`),n=t?.parentElement?.querySelector(`.field-error`);t&&t.classList.remove(`has-error`),n&&(n.textContent=``,n.classList.remove(`visible`))})),e instanceof HTMLSelectElement&&e.addEventListener(`change`,function(){parent.postMessage({type:`payment-form:validate`,field:e.name,value:e.value},`*`)})})},Xe=(e,t)=>{e.addEventListener(`submit`,function(e){e.preventDefault();let n={};t.forEach(function(e){n[e.name]=e.dataset.maskaValue||e.value}),parent.postMessage({type:`payment-form:submit`,value:n},`*`)})};function z(e=document.body){let t=new ResizeObserver(()=>{let{width:t,height:n}=e.getBoundingClientRect();parent.postMessage({type:`payment-form:sizing`,width:t,height:n},`*`)});return t.observe(e),t}var Ze=T.getInstance();new j(`input[data-maska]:not([name=\"billingDocumentNumber\"])`);var B=document.getElementById(`payment-form`),V=B.querySelectorAll(`input, select`),H=Array.from(V.values());qe(H),Ye(H);var U=H.find(e=>e.name===`country`),W=H.find(e=>e.name===`region`);if(U instanceof HTMLSelectElement){let e=Je.getInstance();U.addEventListener(`change`,async function(){if(U.value===``)return;if(L(B,`region`,``),W instanceof HTMLSelectElement){W.innerHTML=``;let e=document.createElement(`option`);e.value=``,e.textContent=`Cargando...`,W.appendChild(e),W.disabled=!0}let t=await e.fetchStates(U.value);if(W instanceof HTMLSelectElement&&(W.disabled=!1,W.innerHTML=``),`error`in t){let t=e.getStatesLoadError();t&&L(B,`region`,t);return}if(e.setStates(t.data),parent.postMessage({type:`payment-form:states-loaded`,states:t.data},`*`),W instanceof HTMLSelectElement){let e=document.createElement(`option`);e.value=``,e.textContent=`Selecciona aquí`,W.appendChild(e),t.data.forEach(e=>{let t=document.createElement(`option`);t.value=e.id,t.textContent=e.name,W.appendChild(t)})}})}R(H),z(),window.addEventListener(`message`,function(e){if(!(!e.data||!e.data.type))switch(e.data.type){case`payment-form:set-submit-loading`:Ge(B,e.data.disabled);break;case`payment-form:reset`:P(B);break;case`payment-form:alert`:F(B,e.data.title,e.data.message);break;case`payment-form:validation-result`:L(B,e.data.field,e.data.error);break;case`payment-form:success`:I(B,e.data.paymentIntent);break;case`payment-form:set-token`:Ze.setBearerToken(e.data.token);break;default:break}}),Xe(B,H)})();", Bt = "data:image/svg+xml,%3csvg%20width='99'%20height='32'%20viewBox='0%200%2099%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.3848%200C29.8942%206.60543e-06%2031.9284%202.03883%2031.9284%204.55384V27.4462C31.9284%2029.9611%2029.8942%2032%2027.3848%2032H4.54376C2.03439%2032%203.69132e-05%2029.9611%200%2027.4462V4.55384C0%202.03882%202.03437%200%204.54376%200H27.3848ZM12.0067%205.0348C11.1292%205.03257%2010.3064%205.37037%209.68349%205.98797C9.0639%206.60335%208.70775%207.46498%208.70775%208.35337V15.4962C8.70775%2016.0154%209.12754%2016.4372%209.64666%2016.4372C10.1647%2016.4372%2010.5856%2016.0165%2010.5856%2015.4962V8.331C10.5856%207.95282%2010.7328%207.59689%2011.0008%207.32948C11.2676%207.06208%2011.6215%206.91564%2011.9978%206.91564H12.0023C12.7781%206.91791%2013.4099%207.56007%2013.4099%208.34774V13.5762C13.4099%2014.5508%2014.1982%2015.3407%2015.1705%2015.3407H18.1221C18.9695%2015.3407%2019.7934%2015.6518%2020.4119%2016.2325C21.0851%2016.8647%2021.4568%2017.7273%2021.4568%2018.647V21.6646C21.4568%2022.5473%2021.1141%2023.3776%2020.4901%2024.003C19.8672%2024.6274%2019.0387%2024.972%2018.1568%2024.972H14.0229C13.1689%2024.972%2012.3315%2024.67%2011.7063%2024.0871C11.0287%2023.4538%2010.6547%2022.5889%2010.6547%2021.6658V20.9799C10.6547%2020.7315%2010.7529%2020.4931%2010.9282%2020.3163L12.5169%2018.7242C12.6922%2018.5485%2012.93%2018.45%2013.1778%2018.45H15.6618C16.0067%2018.4501%2016.3449%2018.5688%2016.6005%2018.8004C16.8941%2019.0655%2017.056%2019.4314%2017.0549%2019.823C17.0527%2020.576%2016.4331%2021.188%2015.6729%2021.188H13.3161C12.7982%2021.188%2012.3774%2021.6087%2012.3774%2022.1289C12.3774%2022.6481%2012.797%2023.0699%2013.3161%2023.0699H15.6896C16.759%2023.0699%2017.755%2022.5518%2018.3813%2021.6355C18.6346%2021.2651%2018.8066%2020.841%2018.8825%2020.398C19.0666%2019.3273%2018.7339%2018.2823%2017.9949%2017.5338C17.3898%2016.9207%2016.5413%2016.5692%2015.6683%2016.5692H13.2045C12.9232%2016.5692%2012.643%2016.605%2012.3729%2016.6867C11.9196%2016.8243%2011.5189%2017.0638%2011.1884%2017.395L9.62652%2018.9614C9.4334%2019.1549%209.26156%2019.372%209.12983%2019.6115C8.89539%2020.0389%208.77596%2020.5021%208.77596%2020.981V21.6669C8.77597%2022.3673%208.91323%2023.0464%209.18337%2023.6864C9.44348%2024.304%209.81749%2024.859%2010.292%2025.3356C10.7664%2025.8112%2011.3202%2026.186%2011.9364%2026.4467C12.575%2026.7174%2013.2526%2026.855%2013.9514%2026.855H18.1546C18.8534%2026.855%2019.5311%2026.7174%2020.1696%2026.4467C20.7859%2026.1849%2021.3396%2025.8112%2021.8141%2025.3356C22.2885%2024.8601%2022.6626%2024.3052%2022.9227%2023.6876C23.1928%2023.0476%2023.3301%2022.3684%2023.3301%2021.668V18.6503C23.3301%2017.9499%2023.1928%2017.2708%2022.9227%2016.6309L22.9259%2016.6274C22.6647%2016.0098%2022.2918%2015.4549%2021.8174%2014.9794C21.3418%2014.5028%2020.7891%2014.1291%2020.1729%2013.8684C19.5343%2013.5976%2018.8567%2013.4598%2018.1579%2013.4598H15.2865V8.331C15.2865%207.46722%2014.9562%206.65034%2014.3545%206.03272C13.7416%205.40167%2012.8852%205.03816%2012.0067%205.0348Z'%20fill='%23121417'/%3e%3cpath%20d='M53.3405%2027.9622C52.2765%2027.9622%2051.291%2027.7244%2050.3858%2027.2507C49.4807%2026.7769%2048.7229%2026.121%2048.1143%2025.2809V25.8218C48.1143%2026.7616%2047.3527%2027.5249%2046.415%2027.5249C45.4773%2027.5249%2044.7157%2026.7616%2044.7157%2025.8218V5.70262C44.7157%204.76283%2045.4773%203.99949%2046.415%203.99949C47.3527%203.99949%2048.1143%204.76283%2048.1143%205.70262V15.6663C48.6789%2014.855%2049.408%2014.2202%2050.3055%2013.7656C51.201%2013.3092%2052.1904%2013.0809%2053.2735%2013.0809C54.6112%2013.0809%2055.8072%2013.4051%2056.8635%2014.0514C57.918%2014.6997%2058.7485%2015.5819%2059.3532%2016.6982C59.9579%2017.8144%2060.2603%2019.0898%2060.2603%2020.5206C60.2603%2021.9514%2059.9503%2023.2422%2059.3321%2024.3642C58.714%2025.4862%2057.8835%2026.3665%2056.8406%2027.0033C55.7995%2027.6419%2054.6322%2027.9603%2053.3405%2027.9603V27.9622ZM52.3722%2025.0489C53.218%2025.0489%2053.9663%2024.8552%2054.6169%2024.4677C55.2676%2024.0803%2055.7766%2023.5471%2056.1459%2022.8682C56.5133%2022.1892%2056.699%2021.4125%2056.699%2020.536C56.699%2019.6595%2056.5095%2018.8789%2056.1325%2018.1903C55.7555%2017.5018%2055.2427%2016.9648%2054.5978%2016.5754C53.951%2016.188%2053.2104%2015.9943%2052.3741%2015.9943C51.5378%2015.9943%2050.7877%2016.188%2050.1294%2016.5754C49.4692%2016.9628%2048.9525%2017.5018%2048.5813%2018.1903C48.2081%2018.8789%2048.0225%2019.6614%2048.0225%2020.536C48.0225%2021.4105%2048.2062%2022.1892%2048.5755%2022.8682C48.9449%2023.5471%2049.4577%2024.0803%2050.1179%2024.4677C50.7781%2024.8552%2051.5302%2025.0489%2052.376%2025.0489H52.3722Z'%20fill='%23121417'/%3e%3cpath%20d='M64.816%2010.647C64.4429%2010.647%2064.1003%2010.553%2063.7865%2010.367C63.4726%2010.1809%2063.2219%209.92969%2063.0363%209.61515C62.8488%209.30061%2062.7569%208.95154%2062.7569%208.56795C62.7569%208.18437%2062.8507%207.85256%2063.0363%207.54186C63.2219%207.23115%2063.4726%206.98374%2063.7865%206.79578C64.1003%206.60974%2064.4429%206.51576%2064.816%206.51576C65.1892%206.51576%2065.5413%206.60974%2065.8456%206.79578C66.1498%206.98374%2066.3967%207.23115%2066.5823%207.54186C66.7679%207.85256%2066.8617%208.19396%2066.8617%208.56795C66.8617%208.94195%2066.7679%209.30061%2066.5823%209.61515C66.3948%209.92969%2066.1498%2010.1809%2065.8456%2010.367C65.5413%2010.5549%2065.1968%2010.647%2064.816%2010.647ZM63.109%2025.8217V15.2213C63.109%2014.2815%2063.8707%2013.5182%2064.8084%2013.5182C65.746%2013.5182%2066.5077%2014.2815%2066.5077%2015.2213V25.8217C66.5077%2026.7615%2065.746%2027.5249%2064.8084%2027.5249C63.8707%2027.5249%2063.109%2026.7615%2063.109%2025.8217Z'%20fill='%23121417'/%3e%3cpath%20d='M70.9719%2025.4033L78.0104%2016.1569H71.7795C71.0523%2016.1569%2070.4629%2015.5662%2070.4629%2014.8374C70.4629%2014.1086%2071.0523%2013.5178%2071.7795%2013.5178H81.1736C82.2644%2013.5178%2082.8825%2014.7702%2082.2204%2015.6391L75.1724%2024.8835H82.1113C82.8385%2024.8835%2083.4279%2025.4743%2083.4279%2026.2031C83.4279%2026.9319%2082.8385%2027.5226%2082.1113%2027.5226H72.0187C70.9279%2027.5226%2070.3098%2026.2702%2070.9719%2025.4014V25.4033Z'%20fill='%23121417'/%3e%3cpath%20d='M86.544%2025.4033L93.5824%2016.1569H87.3516C86.6244%2016.1569%2086.035%2015.5662%2086.035%2014.8374C86.035%2014.1086%2086.6244%2013.5178%2087.3516%2013.5178H96.7457C97.8365%2013.5178%2098.4546%2014.7702%2097.7925%2015.6391L90.7445%2024.8835H97.6834C98.4106%2024.8835%2099%2025.4743%2099%2026.2031C99%2026.9319%2098.4106%2027.5226%2097.6834%2027.5226H87.5908C86.5%2027.5226%2085.8819%2026.2702%2086.544%2025.4014V25.4033Z'%20fill='%23121417'/%3e%3c/svg%3e";
11741
+ var en = "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <style>\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n scrollbar-width: none;\n -ms-overflow-style: none;\n }\n *::-webkit-scrollbar,\n html::-webkit-scrollbar,\n body::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n /* Hide scrollbars visually; scrolling still works (wheel, touch, keyboard) */\n body {\n font-family: Poppins, sans-serif;\n padding: 16px;\n }\n form#payment-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n section.payment-form-container {\n padding: 32px;\n border-radius: 12px;\n border: 1px solid #D3D9DE;\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-bottom: 1rem;\n }\n label {\n font-family: Poppins, sans-serif;\n font-weight: 400;\n line-height: 1.5rem;\n font-size: 1rem;\n color: #69737D;\n }\n .input-wrapper {\n display: flex;\n align-items: center;\n gap: 8px;\n background-color: #F6F7F9;\n border-radius: 12px;\n padding: 12px 15px;\n border: 1px solid transparent;\n transition: border-color 0.2s;\n }\n\n .input-wrapper svg {\n width: 18px;\n height: 18px;\n color: #9ca3af;\n flex-shrink: 0;\n }\n .input-wrapper input, select {\n width: 100%;\n border: none;\n background: transparent;\n font-family: Poppins, sans-serif;\n font-size: 14px;\n color: #1f2937;\n outline: none;\n }\n .input-wrapper input::placeholder {\n color: #9ca3af;\n }\n .input-wrapper input[disabled] {\n background-color: #f6f7f9;\n color: #69737D;\n cursor: not-allowed;\n }\n .field-error {\n font-size: 14px;\n padding-top: 4px;\n color: #DB3339;\n font-weight: 400;\n }\n .field-error.visible {\n display: block;\n }\n button {\n background-color: #ff5257;\n color: #fff;\n font-family: Poppins, sans-serif;\n font-size: 1rem;\n font-weight: 700;\n gap: .5rem;\n isolation: isolate;\n line-height: 1.5rem;\n padding: .5rem 1rem;\n transition-duration: .2s;\n transition-property: all;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n border: none;\n border-radius: 6px;\n cursor: pointer;\n }\n button:disabled {\n cursor: not-allowed;\n background-color: #e9ecef;\n color: #adb5bd\n }\n button:disabled:hover {\n background-color: #d7d9db;\n color: #a4a7ab;\n }\n button:hover {\n background-color: #e6484d;\n }\n .divider {\n margin-top: 0.5rem;\n background-color: #e9ecef;\n width: 100%;\n height: 1px;\n }\n .form-alert {\n display: none;\n text-align: center;\n padding: 12px 16px;\n }\n .form-alert.visible {\n display: block;\n }\n .form-alert:not(.form-alert--receipt) h3 {\n font-family: Poppins, sans-serif;\n font-size: 1rem;\n font-weight: 700;\n color: #1f2937;\n margin-bottom: 4px;\n }\n .form-alert:not(.form-alert--receipt) p {\n font-family: Poppins, sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: #86919c;\n }\n .form-alert--receipt {\n padding: 20px 12px 24px;\n }\n .payment-success {\n max-width: 320px;\n margin: 0 auto;\n text-align: center;\n }\n .payment-success__amount {\n font-family: Poppins, sans-serif;\n font-size: 2rem;\n font-weight: 700;\n color: #000000;\n letter-spacing: -0.02em;\n margin: 0 0 10px;\n line-height: 1.15;\n }\n .payment-success__datetime {\n font-family: Poppins, sans-serif;\n font-size: 0.8125rem;\n font-weight: 400;\n color: #6c757d;\n margin: 0 0 24px;\n line-height: 1.4;\n }\n .payment-success__blocks {\n display: flex;\n flex-direction: column;\n gap: 18px;\n margin-bottom: 28px;\n text-align: center;\n }\n .payment-success__block {\n display: flex;\n flex-direction: column;\n gap: 4px;\n align-items: center;\n }\n .payment-success__label {\n font-family: Poppins, sans-serif;\n font-size: 0.75rem;\n font-weight: 400;\n color: #6c757d;\n line-height: 1.3;\n }\n .payment-success__value {\n font-family: Poppins, sans-serif;\n font-size: 1.0625rem;\n font-weight: 700;\n color: #000000;\n line-height: 1.3;\n }\n .payment-success__footer {\n padding-top: 4px;\n }\n .payment-success__done {\n font-family: Poppins, sans-serif;\n font-size: 1.5rem;\n font-weight: 700;\n color: #000000;\n margin: 0 0 10px;\n line-height: 1.2;\n }\n \n .bizz-logo {\n width: 92px;\n height: 32px;\n display: block;\n margin: 0 auto 32px;\n }\n\n .form-header {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 32px;\n flex-direction: column;\n font-family: Poppins, sans-serif;\n font-weight: 400;\n line-height: 1.5rem;\n }\n .commerce-total-amount-container {\n color: #1E2125;\n margin-top: 32px;\n }\n .commerce-total-amount-container .total-amount-value {\n font-size: 3rem;\n font-weight: 600;\n line-height: 4rem;\n }\n .form-header .commerce-description {\n color: #1E2125;\n font-size: 1rem;\n }\n .form-header .commerce-total-amount {\n color: #1E2125;\n font-size: 1rem;\n margin-top: 32px;\n }\n .form-header .commerce-required {\n color: #121417;\n font-size: 1rem;\n margin-top: 32px;\n }\n .commerce-date {\n margin-top: 8px;\n font-size: 1rem;\n color: #69737D;\n }\n .commerce-logo {\n border-radius: 60px;\n border: 3px solid #F6F7F9;\n width: 60px;\n height: 60px;\n }\n .divider-header {\n margin: 32px 0px;\n background-color: #e9ecef;\n width: 100%;\n height: 1px;\n display: block;\n }\n </style>\n</head>\n<body>\n <!--BIZZ_LOGO-->\n <section class=\"payment-form-container\">\n <!--HEADER-->\n <form id=\"payment-form\">\n <div id=\"payment-form-static-fields\">\n <!--AMOUNT_FIELD-->\n </div>\n <div id=\"payment-form-dynamic-fields\">\n <!--FIELDS-->\n </div>\n <div class=\"form-alert\" id=\"form-alert\"></div>\n <!--SUBMIT_BUTTON-->\n </form>\n </section>\n <!--SCRIPT-->\n</body>\n</html>\n", tn = "(function(){var{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}=typeof Reflect<`u`&&Reflect;a||=function(e){return e},o||=function(e){return e},c||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},l||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var u=b(Array.prototype.forEach),d=b(Array.prototype.lastIndexOf),ee=b(Array.prototype.pop),f=b(Array.prototype.push),p=b(Array.prototype.splice),m=b(String.prototype.toLowerCase),h=b(String.prototype.toString),g=b(String.prototype.match),te=b(String.prototype.replace),ne=b(String.prototype.indexOf),re=b(String.prototype.trim),_=b(Object.prototype.hasOwnProperty),v=b(RegExp.prototype.test),y=ie(TypeError);function b(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c(e,t,r)}}function ie(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return l(e,n)}}function x(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if(typeof t==`string`){let e=i(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function S(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function C(t){let n=s(null);for(let[r,i]of e(t))_(t,r)&&(Array.isArray(i)?n[r]=S(i):i&&typeof i==`object`&&i.constructor===Object?n[r]=C(i):n[r]=i);return n}function ae(e,t){for(;e!==null;){let n=i(e,t);if(n){if(n.get)return b(n.get);if(typeof n.value==`function`)return b(n.value)}e=r(e)}function n(){return null}return n}var oe=a(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),se=a(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ce=a([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),le=a([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ue=a(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),de=a([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),fe=a([`#text`]),pe=a(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),me=a(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),he=a(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ge=a([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),_e=o(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),ve=o(/<%[\\w\\W]*|[\\w\\W]*%>/gm),ye=o(/\\$\\{[\\w\\W]*/gm),w=o(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),T=o(/^aria-[\\-\\w]+$/),be=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),xe=o(/^(?:\\w+script|data):/i),Se=o(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),Ce=o(/^html$/i),we=o(/^[a-z][.\\w]*(-[.\\w]+)+$/i),Te=Object.freeze({__proto__:null,ARIA_ATTR:T,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:we,DATA_ATTR:w,DOCTYPE_NAME:Ce,ERB_EXPR:ve,IS_ALLOWED_URI:be,IS_SCRIPT_OR_DATA:xe,MUSTACHE_EXPR:_e,TMPLIT_EXPR:ye}),E={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ee=function(){return typeof window>`u`?null:window},De=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Oe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ke(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ee(),n=e=>ke(e);if(n.version=`3.3.3`,n.removed=[],!t||!t.document||t.document.nodeType!==E.document||!t.Element)return n.isSupported=!1,n;let{document:r}=t,i=r,o=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:b,Element:ie,NodeFilter:S,NamedNodeMap:_e=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:ve,DOMParser:ye,trustedTypes:w}=t,T=ie.prototype,xe=ae(T,`cloneNode`),Se=ae(T,`remove`),we=ae(T,`nextSibling`),Ae=ae(T,`childNodes`),D=ae(T,`parentNode`);if(typeof l==`function`){let e=r.createElement(`template`);e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let O,k=``,{implementation:je,createNodeIterator:Me,createDocumentFragment:Ne,getElementsByTagName:Pe}=r,{importNode:Fe}=i,A=Oe();n.isSupported=typeof e==`function`&&typeof D==`function`&&je&&je.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ie,ERB_EXPR:Le,TMPLIT_EXPR:Re,DATA_ATTR:ze,ARIA_ATTR:Be,IS_SCRIPT_OR_DATA:Ve,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:j}=Te,{IS_ALLOWED_URI:Ue}=Te,M=null,We=x({},[...oe,...se,...ce,...ue,...fe]),N=null,Ge=x({},[...pe,...me,...he,...ge]),P=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),F=null,I=null,L=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ke=!0,qe=!0,Je=!1,Ye=!0,R=!1,Xe=!0,z=!1,Ze=!1,Qe=!1,B=!1,$e=!1,et=!1,tt=!0,nt=!1,rt=!0,V=!1,H={},U=null,it=x({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),at=null,ot=x({},[`audio`,`video`,`img`,`source`,`image`,`track`]),W=null,st=x({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),G=`http://www.w3.org/1998/Math/MathML`,K=`http://www.w3.org/2000/svg`,q=`http://www.w3.org/1999/xhtml`,J=q,ct=!1,lt=null,ut=x({},[G,K,q],h),dt=x({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ft=x({},[`annotation-xml`]),pt=x({},[`title`,`style`,`font`,`a`,`script`]),mt=null,ht=[`application/xhtml+xml`,`text/html`],Y=null,X=null,gt=r.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(X&&X===e)){if((!e||typeof e!=`object`)&&(e={}),e=C(e),mt=ht.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=mt===`application/xhtml+xml`?h:m,M=_(e,`ALLOWED_TAGS`)?x({},e.ALLOWED_TAGS,Y):We,N=_(e,`ALLOWED_ATTR`)?x({},e.ALLOWED_ATTR,Y):Ge,lt=_(e,`ALLOWED_NAMESPACES`)?x({},e.ALLOWED_NAMESPACES,h):ut,W=_(e,`ADD_URI_SAFE_ATTR`)?x(C(st),e.ADD_URI_SAFE_ATTR,Y):st,at=_(e,`ADD_DATA_URI_TAGS`)?x(C(ot),e.ADD_DATA_URI_TAGS,Y):ot,U=_(e,`FORBID_CONTENTS`)?x({},e.FORBID_CONTENTS,Y):it,F=_(e,`FORBID_TAGS`)?x({},e.FORBID_TAGS,Y):C({}),I=_(e,`FORBID_ATTR`)?x({},e.FORBID_ATTR,Y):C({}),H=_(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Ke=e.ALLOW_ARIA_ATTR!==!1,qe=e.ALLOW_DATA_ATTR!==!1,Je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,R=e.SAFE_FOR_TEMPLATES||!1,Xe=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,B=e.RETURN_DOM||!1,$e=e.RETURN_DOM_FRAGMENT||!1,et=e.RETURN_TRUSTED_TYPE||!1,Qe=e.FORCE_BODY||!1,tt=e.SANITIZE_DOM!==!1,nt=e.SANITIZE_NAMED_PROPS||!1,rt=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,Ue=e.ALLOWED_URI_REGEXP||be,J=e.NAMESPACE||q,dt=e.MATHML_TEXT_INTEGRATION_POINTS||dt,ft=e.HTML_INTEGRATION_POINTS||ft,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),R&&(qe=!1),$e&&(B=!0),H&&(M=x({},fe),N=s(null),H.html===!0&&(x(M,oe),x(N,pe)),H.svg===!0&&(x(M,se),x(N,me),x(N,ge)),H.svgFilters===!0&&(x(M,ce),x(N,me),x(N,ge)),H.mathMl===!0&&(x(M,ue),x(N,he),x(N,ge))),_(e,`ADD_TAGS`)||(L.tagCheck=null),_(e,`ADD_ATTR`)||(L.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?L.tagCheck=e.ADD_TAGS:(M===We&&(M=C(M)),x(M,e.ADD_TAGS,Y))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?L.attributeCheck=e.ADD_ATTR:(N===Ge&&(N=C(N)),x(N,e.ADD_ATTR,Y))),e.ADD_URI_SAFE_ATTR&&x(W,e.ADD_URI_SAFE_ATTR,Y),e.FORBID_CONTENTS&&(U===it&&(U=C(U)),x(U,e.FORBID_CONTENTS,Y)),e.ADD_FORBID_CONTENTS&&(U===it&&(U=C(U)),x(U,e.ADD_FORBID_CONTENTS,Y)),rt&&(M[`#text`]=!0),z&&x(M,[`html`,`head`,`body`]),M.table&&(x(M,[`tbody`]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw y(`TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw y(`TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.`);O=e.TRUSTED_TYPES_POLICY,k=O.createHTML(``)}else O===void 0&&(O=De(w,o)),O!==null&&typeof k==`string`&&(k=O.createHTML(``));a&&a(e),X=e}},yt=x({},[...se,...ce,...le]),bt=x({},[...ue,...de]),xt=function(e){let t=D(e);(!t||!t.tagName)&&(t={namespaceURI:J,tagName:`template`});let n=m(e.tagName),r=m(t.tagName);return lt[e.namespaceURI]?e.namespaceURI===K?t.namespaceURI===q?n===`svg`:t.namespaceURI===G?n===`svg`&&(r===`annotation-xml`||dt[r]):!!yt[n]:e.namespaceURI===G?t.namespaceURI===q?n===`math`:t.namespaceURI===K?n===`math`&&ft[r]:!!bt[n]:e.namespaceURI===q?t.namespaceURI===K&&!ft[r]||t.namespaceURI===G&&!dt[r]?!1:!bt[n]&&(pt[n]||!yt[n]):!!(mt===`application/xhtml+xml`&&lt[e.namespaceURI]):!1},Z=function(e){f(n.removed,{element:e});try{D(e).removeChild(e)}catch{Se(e)}},Q=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{f(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e===`is`)if(B||$e)try{Z(t)}catch{}else try{t.setAttribute(e,``)}catch{}},St=function(e){let t=null,n=null;if(Qe)e=`<remove></remove>`+e;else{let t=g(e,/^[\\r\\n\\t ]+/);n=t&&t[0]}mt===`application/xhtml+xml`&&J===q&&(e=`<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>`+e+`</body></html>`);let i=O?O.createHTML(e):e;if(J===q)try{t=new ye().parseFromString(i,mt)}catch{}if(!t||!t.documentElement){t=je.createDocument(J,`template`,null);try{t.documentElement.innerHTML=ct?k:i}catch{}}let a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),J===q?Pe.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},Ct=function(e){return Me.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof ve&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof _e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof b==`function`&&e instanceof b};function $(e,t,r){u(e,e=>{e.call(n,t,r,X)})}let Et=function(e){let t=null;if($(A.beforeSanitizeElements,e,null),wt(e))return Z(e),!0;let r=Y(e.nodeName);if($(A.uponSanitizeElement,e,{tagName:r,allowedTags:M}),Xe&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&v(/<[/\\w!]/g,e.innerHTML)&&v(/<[/\\w!]/g,e.textContent)||e.nodeType===E.progressingInstruction||Xe&&e.nodeType===E.comment&&v(/<[/\\w]/g,e.data))return Z(e),!0;if(!(L.tagCheck instanceof Function&&L.tagCheck(r))&&(!M[r]||F[r])){if(!F[r]&&Ot(r)&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r)))return!1;if(rt&&!U[r]){let t=D(e)||e.parentNode,n=Ae(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=xe(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,we(e))}}}return Z(e),!0}return e instanceof ie&&!xt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&v(/<\\/no(script|embed|frames)/i,e.innerHTML)?(Z(e),!0):(R&&e.nodeType===E.text&&(t=e.textContent,u([Ie,Le,Re],e=>{t=te(t,e,` `)}),e.textContent!==t&&(f(n.removed,{element:e.cloneNode()}),e.textContent=t)),$(A.afterSanitizeElements,e,null),!1)},Dt=function(e,t,n){if(I[t]||tt&&(t===`id`||t===`name`)&&(n in r||n in gt))return!1;if(!(qe&&!I[t]&&v(ze,t))&&!(Ke&&v(Be,t))&&!(L.attributeCheck instanceof Function&&L.attributeCheck(t,e))){if(!N[t]||I[t]){if(!(Ot(e)&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&v(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||t===`is`&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&v(P.tagNameCheck,n)||P.tagNameCheck instanceof Function&&P.tagNameCheck(n))))return!1}else if(!W[t]&&!v(Ue,te(n,He,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ne(n,`data:`)===0&&at[e])&&!(Je&&!v(Ve,te(n,He,``)))&&n)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&g(e,j)},kt=function(e){$(A.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},i=t.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=t[i],c=Y(a),l=s,d=a===`value`?l:re(l);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,$(A.uponSanitizeAttribute,e,r),d=r.attrValue,nt&&(c===`id`||c===`name`)&&(Q(a,e),d=`user-content-`+d),Xe&&v(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(a,e);continue}if(c===`attributename`&&g(d,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!Ye&&v(/\\/>/i,d)){Q(a,e);continue}R&&u([Ie,Le,Re],e=>{d=te(d,e,` `)});let f=Y(e.nodeName);if(!Dt(f,c,d)){Q(a,e);continue}if(O&&typeof w==`object`&&typeof w.getAttributeType==`function`&&!o)switch(w.getAttributeType(f,c)){case`TrustedHTML`:d=O.createHTML(d);break;case`TrustedScriptURL`:d=O.createScriptURL(d);break}if(d!==l)try{o?e.setAttributeNS(o,a,d):e.setAttribute(a,d),wt(e)?Z(e):ee(n.removed)}catch{Q(a,e)}}$(A.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(A.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(A.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof c&&e(n.content);$(A.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=null,a=null,o=null,s=null;if(ct=!e,ct&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw y(`dirty is not a string, aborting`)}else throw y(`toString is not a function`);if(!n.isSupported)return e;if(Ze||vt(t),n.removed=[],typeof e==`string`&&(V=!1),V){if(e.nodeName){let t=Y(e.nodeName);if(!M[t]||F[t])throw y(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof b)r=St(`<!---->`),a=r.ownerDocument.importNode(e,!0),a.nodeType===E.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?r=a:r.appendChild(a);else{if(!B&&!R&&!z&&e.indexOf(`<`)===-1)return O&&et?O.createHTML(e):e;if(r=St(e),!r)return B?null:et?k:``}r&&Qe&&Z(r.firstChild);let l=Ct(V?e:r);for(;o=l.nextNode();)Et(o),kt(o),o.content instanceof c&&At(o.content);if(V)return e;if(B){if($e)for(s=Ne.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(N.shadowroot||N.shadowrootmode)&&(s=Fe.call(i,s,!0)),s}let d=z?r.outerHTML:r.innerHTML;return z&&M[`!doctype`]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&v(Ce,r.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+r.ownerDocument.doctype.name+`>\n`+d),R&&u([Ie,Le,Re],e=>{d=te(d,e,` `)}),O&&et?O.createHTML(d):d},n.setConfig=function(){vt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ze=!0},n.clearConfig=function(){X=null,Ze=!1},n.isValidAttribute=function(e,t,n){return X||vt({}),Dt(Y(e),Y(t),n)},n.addHook=function(e,t){typeof t==`function`&&f(A[e],t)},n.removeHook=function(e,t){if(t!==void 0){let n=d(A[e],t);return n===-1?void 0:p(A[e],n,1)[0]}return ee(A[e])},n.removeHooks=function(e){A[e]=[]},n.removeAllHooks=function(){A=Oe()},n}var Ae=ke(),D=`https://devapi.teip.io`,O=`R33xmWassTrJO5I52s6FZ_3sdQRdiOR7Vc0oDSuf7No`,k=`urn:ietf:wg:oauth:2.0:oob`,je=`https://cas.static.client.cardinaltrusted.com/songbird/v2.0.0/songbird.js`,Me=void 0,Ne=void 0,Pe=void 0,Fe=void 0,A=void 0,Ie=void 0,Le=void 0,Re=void 0,ze=class e{static instance;environment=`development`;constructor(){}static getInstance(){return e.instance||=new e,e.instance}isDevelopmentEnvironment(){return k}getEnvironment(){return this.isDevelopmentEnvironment()?`development`:this.environment}getDevelopmentEnvironment(){return{apiBase:D,externalApiUid:O,songbirdUrl:je,externalApiRedirectUri:k}}getProductionEnvironment(){return{apiBase:Me,songbirdUrl:Fe,externalApiUid:Ne,externalApiRedirectUri:Pe}}getSandboxEnvironment(){return{apiBase:A,songbirdUrl:Re,externalApiUid:Ie,externalApiRedirectUri:Le}}setEnvironment(e){this.environment=e}getCurrentEnvironment(){switch(this.getEnvironment()){case`production`:return this.getProductionEnvironment();case`sandbox`:return this.getSandboxEnvironment();default:return this.getDevelopmentEnvironment()}}},Be=class e{static instance;get baseUrl(){return ze.getInstance().getCurrentEnvironment().apiBase||``}bearerToken=null;constructor(){}static getInstance(){return e.instance||=new e,e.instance}setBearerToken(e){this.bearerToken=e}async get(e,t={},n=`api/v1`){return fetch(`${this.baseUrl}/${n}/${e}`,{...t,method:`GET`,headers:{\"Content-Type\":`application/json`,Authorization:`Bearer ${this.bearerToken}`,...t.headers}})}async post(e,t,n={},r=`api/v1`){return fetch(`${this.baseUrl}/${r}/${e}`,{body:Ae.sanitize(JSON.stringify(t)),method:`POST`,headers:{\"Content-Type\":`application/json`,Authorization:`Bearer ${this.bearerToken}`,...n.headers},...n})}},Ve=Object.defineProperty,He=(e,t,n)=>t in e?Ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j=(e,t,n)=>He(e,typeof t==`symbol`?t:t+``,n),Ue={\"#\":{pattern:/[0-9]/},\"@\":{pattern:/[a-zA-Z]/},\"*\":{pattern:/[a-zA-Z0-9]/}},M=(e,t,n)=>e.replaceAll(t,``).replace(n,`.`).replace(`..`,`.`).replace(/[^.\\d]/g,``),We=(e,t,n)=>new Intl.NumberFormat(n.number?.locale??`en`,{minimumFractionDigits:e,maximumFractionDigits:t,roundingMode:`trunc`}),N=(e,t=!0,n)=>{let r=n.number?.unsigned!==!0&&e.startsWith(`-`)?`-`:``,i=n.number?.fraction??0,a=We(0,i,n),o=a.formatToParts(1000.12),s=o.find(e=>e.type===`group`)?.value??` `,c=o.find(e=>e.type===`decimal`)?.value??`.`,l=M(e,s,c);if(Number.isNaN(parseFloat(l)))return r;let u=l.split(`.`);u[1]!=null&&u[1].length>=1&&(a=We(u[1].length<=i?u[1].length:i,i,n));let d=a.format(parseFloat(l));return t?i>0&&l.endsWith(`.`)&&!l.slice(0,-1).includes(`.`)&&(d+=c):d=M(d,s,c),r+d},Ge=e=>JSON.parse(e.replaceAll(`'`,`\"`)),P=(e,t={})=>{let n={...t};e.dataset.maska!=null&&e.dataset.maska!==``&&(n.mask=I(e.dataset.maska)),e.dataset.maskaEager!=null&&(n.eager=F(e.dataset.maskaEager)),e.dataset.maskaReversed!=null&&(n.reversed=F(e.dataset.maskaReversed)),e.dataset.maskaTokensReplace!=null&&(n.tokensReplace=F(e.dataset.maskaTokensReplace)),e.dataset.maskaTokens!=null&&(n.tokens=L(e.dataset.maskaTokens));let r={};return e.dataset.maskaNumberLocale!=null&&(r.locale=e.dataset.maskaNumberLocale),e.dataset.maskaNumberFraction!=null&&(r.fraction=parseInt(e.dataset.maskaNumberFraction)),e.dataset.maskaNumberUnsigned!=null&&(r.unsigned=F(e.dataset.maskaNumberUnsigned)),(e.dataset.maskaNumber!=null||Object.values(r).length>0)&&(n.number=r),n},F=e=>e===``?!0:!!JSON.parse(e),I=e=>e.startsWith(`[`)&&e.endsWith(`]`)?Ge(e):e,L=e=>{if(e.startsWith(`{`)&&e.endsWith(`}`))return Ge(e);let t={};return e.split(`|`).forEach(e=>{let n=e.split(`:`);t[n[0]]={pattern:Ke()?new RegExp(n[1],`u`):new RegExp(n[1]),optional:n[2]===`optional`,multiple:n[2]===`multiple`,repeated:n[2]===`repeated`}}),t},Ke=()=>{try{return!0}catch{return!1}},qe=class{constructor(e={}){j(this,`opts`,{}),j(this,`memo`,new Map);let t={...e};if(t.tokens!=null){t.tokens=t.tokensReplace?{...t.tokens}:{...Ue,...t.tokens};for(let e of Object.values(t.tokens))typeof e.pattern==`string`&&(e.pattern=Ke()?new RegExp(e.pattern,`u`):new RegExp(e.pattern))}else t.tokens=Ue;Array.isArray(t.mask)&&(t.mask.length>1?t.mask=[...t.mask].sort((e,t)=>e.length-t.length):t.mask=t.mask[0]??``),t.mask===``&&(t.mask=null),this.opts=t}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){let t=this.findMask(String(e));if(this.opts.mask==null||t==null)return!1;let n=this.process(String(e),t).length;return typeof this.opts.mask==`string`?n>=this.opts.mask.length:n>=t.length}findMask(e){let t=this.opts.mask;if(t==null)return null;if(typeof t==`string`)return t;if(typeof t==`function`)return t(e);let n=this.process(e,t.slice(-1).pop()??``,!1);return t.find(t=>this.process(e,t,!1).length>=n.length)??``}escapeMask(e){let t=[],n=[];return e.split(``).forEach((r,i)=>{r===`!`&&e[i-1]!==`!`?n.push(i-n.length):t.push(r)}),{mask:t.join(``),escaped:n}}process(e,t,n=!0){if(this.opts.number!=null)return N(e,n,this.opts);if(t==null)return e;let r=`v=${e},mr=${t},m=${n?1:0}`;if(this.memo.has(r))return this.memo.get(r);let{mask:i,escaped:a}=this.escapeMask(t),o=[],s=this.opts.tokens==null?{}:this.opts.tokens,c=this.isReversed()?-1:1,l=this.isReversed()?`unshift`:`push`,u=this.isReversed()?0:i.length-1,d=this.isReversed()?()=>m>-1&&h>-1:()=>m<i.length&&h<e.length,ee=e=>!this.isReversed()&&e<=u||this.isReversed()&&e>=u,f,p=-1,m=this.isReversed()?i.length-1:0,h=this.isReversed()?e.length-1:0,g=!1;for(;d();){let t=i.charAt(m),r=s[t],d=r?.transform==null?e.charAt(h):r.transform(e.charAt(h));if(!a.includes(m)&&r!=null?(d.match(r.pattern)==null?r.multiple?g&&=(m+=c,h-=c,!1):d===f?f=void 0:r.optional&&(m+=c,h-=c):(o[l](d),r.repeated?(p===-1?p=m:m===u&&m!==p&&(m=p-c),u===p&&(m-=c)):r.multiple&&(g=!0,m-=c),m+=c),h+=c):(n&&!this.isEager()&&o[l](t),d===t&&!this.isEager()?h+=c:f=t,this.isEager()||(m+=c)),this.isEager())for(;ee(m)&&(s[i.charAt(m)]==null||a.includes(m));){if(n){if(o[l](i.charAt(m)),e.charAt(h)===i.charAt(m)){m+=c,h+=c;continue}}else i.charAt(m)===e.charAt(h)&&(h+=c);m+=c}}return this.memo.set(r,o.join(``)),this.memo.get(r)}},Je=class{constructor(e,t={}){j(this,`items`,new Map),j(this,`eventAbortController`),j(this,`onInput`,e=>{if(e instanceof CustomEvent&&e.type===`input`&&!e.isTrusted&&!e.bubbles)return;let t=e.target,n=this.items.get(t);if(n===void 0)return;let r=`inputType`in e&&e.inputType.startsWith(`delete`),i=n.isEager(),a=r&&i&&n.unmasked(t.value)===``?``:t.value;this.fixCursor(t,r,()=>this.setValue(t,a))}),this.options=t,this.eventAbortController=new AbortController,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){e.value!==``&&e.value!==this.processInput(e)?.masked&&this.setValue(e,e.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(e){let t=this.getOptions(this.options);for(let n of e){if(!this.items.has(n)){let{signal:e}=this.eventAbortController;n.addEventListener(`input`,this.onInput,{capture:!0,signal:e})}let e=new qe(P(n,t));this.items.set(n,e),queueMicrotask(()=>this.updateValue(n)),n.selectionStart===null&&e.isEager()&&console.warn(\"Maska: input of `%s` type is not supported\",n.type)}}getInputs(e){return typeof e==`string`?Array.from(document.querySelectorAll(e)):`length`in e?Array.from(e):[e]}getOptions(e){let{onMaska:t,preProcess:n,postProcess:r,...i}=e;return i}fixCursor(e,t,n){let r=e.selectionStart,i=e.value;if(n(),r===null||r===i.length&&!t)return;let a=e.value,o=i.slice(0,r),s=a.slice(0,r),c=this.processInput(e,o)?.unmasked,l=this.processInput(e,s)?.unmasked;if(c===void 0||l===void 0)return;let u=r;o!==s&&(u+=t?a.length-i.length:c.length-l.length),e.setSelectionRange(u,u)}setValue(e,t){let n=this.processInput(e,t);n!==void 0&&(e.value=n.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(e=>e(n)):this.options.onMaska(n)),e.dispatchEvent(new CustomEvent(`maska`,{detail:n})),e.dispatchEvent(new CustomEvent(`input`,{detail:n.masked})))}processInput(e,t){let n=this.items.get(e);if(n===void 0)return;let r=t??e.value;this.options.preProcess!=null&&(r=this.options.preProcess(r));let i=n.masked(r);return this.options.postProcess!=null&&(i=this.options.postProcess(i)),{masked:i,unmasked:n.unmasked(r),completed:n.completed(r)}}},Ye={minimumFractionDigits:2,maximumFractionDigits:2,useGrouping:!0},R=new Intl.NumberFormat(`en-US`,Ye);function Xe(e,t=`USD`,n=`currency`){return new Intl.NumberFormat(`en-US`,{style:n,currency:t,...Ye}).format(e)}function z(e){if(!e?.trim())return`—`;let t=e.trim();return t.startsWith(`#`)?t:`#${t}`}var Ze=(e,t)=>e.querySelector(`input[name=\"${t}\"], select[name=\"${t}\"]`),Qe=(e,t)=>{let n=e.querySelector(`button[type=\"submit\"]`);if(n){n.disabled=t;let e=n.dataset.label??`Pagar`,r=n.dataset.loadingLabel??`Procesando...`;n.textContent=t?r:e}},B=e=>{e.reset();let t=e.querySelector(`select[name=\"documentType\"]`);t&&(t.value=`dui`,t.dispatchEvent(new Event(`change`,{bubbles:!0})))},$e=(e,t,n)=>{let r=e.querySelector(`.form-alert`);r&&(r.innerHTML=`<h3>`+t+`</h3><p>`+n+`</p>`,r.classList.remove(`form-alert--receipt`),r.classList.add(`visible`))},et=(e,t)=>{let n=document.querySelector(`.form-header`);if(n){let e=n.querySelector(`.commerce-logo`);e&&(n.innerHTML=``,n.appendChild(e))}let r=document.querySelector(`.divider-header`);r&&(r.style.display=`none`);let i=t.data,a=Xe(i.amount_cents/100,i.amount_currency),o=`${i.date}, ${i.time}`,s=z(i.reference_number),c=z(i.authorization_number);e.innerHTML=`<div class=\"payment-success\"><p class=\"payment-success__amount\">`+a+`</p><p class=\"payment-success__datetime\">`+o+`</p><div class=\"payment-success__blocks\"><div class=\"payment-success__block\"><span class=\"payment-success__label\">Número de referencia</span><span class=\"payment-success__value\">`+s+`</span></div><div class=\"payment-success__block\"><span class=\"payment-success__label\">Número de autorización</span><span class=\"payment-success__value\">`+c+`</span></div></div><div class=\"payment-success__footer\"><h3 class=\"payment-success__done\">¡Gracias por tu compra!</h3></div></div>`},tt=(e,t,n)=>{let r=Ze(e,t);if(!r)return;let i=r.closest(`.input-wrapper`),a=i?.parentElement?.querySelector(`.field-error`);n?(i&&i.classList.add(`has-error`),a&&(a.textContent=n,a.classList.add(`visible`),nt(a))):(i&&i.classList.remove(`has-error`),a&&(a.textContent=``,a.classList.remove(`visible`)))},nt=e=>{e.scrollIntoView({behavior:`smooth`,block:`center`})},rt=e=>{let t=e.find(e=>e.name===`amount`);t&&(t.addEventListener(`input`,function(){let e=t.value.replace(/\\D/g,``);if(e){let n=parseInt(e,10)/100;t.value=R.format(n)}else t.value=``}),t.addEventListener(`blur`,()=>{parent.postMessage({type:`payment-form:validate-amount`,amount:t.value},`*`)}))},V=class e{static instance;states=[];statesLoadError=null;constructor(){}static getInstance(){return e.instance||=new e,e.instance}getStates(){return this.states}setStates(e){this.states=e}getStatesLoadError(){return this.statesLoadError}async fetchStates(e){let t=await Be.getInstance().get(`resources/countries/${e}/states`),n=await t.json();return t.ok?(this.statesLoadError=null,this.setStates(n.data),n):(this.statesLoadError=`No se pudo cargar la lista de estados.`,this.setStates([]),n)}},H=e=>{let t=e.find(e=>e.name===`documentType`),n=e.find(e=>e.name===`billingDocumentNumber`);if(!t||!n)return;let r=new Je(n);t.addEventListener(`change`,function(e){r?.destroy(),e.target.value===`dui`?(n.setAttribute(`inputmode`,`numeric`),n.setAttribute(`data-maska`,`########-#`),r=new Je(n)):(n.removeAttribute(`inputmode`),n.removeAttribute(`data-maska`),n.value=``,r=null)})},U=e=>{e.forEach(function(e){e instanceof HTMLInputElement&&(e.addEventListener(`blur`,function(){let t=e.dataset.maskaValue||e.value;parent.postMessage({type:`payment-form:validate`,field:e.name,value:t},`*`)}),e.addEventListener(`input`,function(){let t=e.closest(`.input-wrapper`),n=t?.parentElement?.querySelector(`.field-error`);t&&t.classList.remove(`has-error`),n&&(n.textContent=``,n.classList.remove(`visible`))})),e instanceof HTMLSelectElement&&e.addEventListener(`change`,function(){parent.postMessage({type:`payment-form:validate`,field:e.name,value:e.value},`*`)})})},it=(e,t)=>{e.addEventListener(`submit`,function(e){e.preventDefault();let n={};t.forEach(function(e){n[e.name]=e.dataset.maskaValue||e.value}),parent.postMessage({type:`payment-form:submit`,value:n},`*`)})};function at(e=document.body){let t=new ResizeObserver(()=>{let{width:t,height:n}=e.getBoundingClientRect();parent.postMessage({type:`payment-form:sizing`,width:t,height:n},`*`)});return t.observe(e),t}var ot=Be.getInstance();new Je(`input[data-maska]:not([name=\"billingDocumentNumber\"])`);var W=document.getElementById(`payment-form`),st=W.querySelectorAll(`input, select`),G=Array.from(st.values());rt(G),H(G);var K=G.find(e=>e.name===`country`),q=G.find(e=>e.name===`region`);if(K instanceof HTMLSelectElement){let e=V.getInstance();K.addEventListener(`change`,async function(){if(K.value===``)return;if(tt(W,`region`,``),q instanceof HTMLSelectElement){q.innerHTML=``;let e=document.createElement(`option`);e.value=``,e.textContent=`Cargando...`,q.appendChild(e),q.disabled=!0}let t=await e.fetchStates(K.value);if(q instanceof HTMLSelectElement&&(q.disabled=!1,q.innerHTML=``),`error`in t){let t=e.getStatesLoadError();t&&tt(W,`region`,t);return}if(e.setStates(t.data),parent.postMessage({type:`payment-form:states-loaded`,states:t.data},`*`),q instanceof HTMLSelectElement){let e=document.createElement(`option`);e.value=``,e.textContent=`Selecciona aquí`,q.appendChild(e),t.data.forEach(e=>{let t=document.createElement(`option`);t.value=e.id,t.textContent=e.name,q.appendChild(t)})}})}U(G),at(),window.addEventListener(`message`,function(e){if(!(!e.data||!e.data.type))switch(e.data.type){case`payment-form:set-submit-loading`:Qe(W,e.data.disabled);break;case`payment-form:reset`:B(W);break;case`payment-form:alert`:$e(W,e.data.title,e.data.message);break;case`payment-form:validation-result`:tt(W,e.data.field,e.data.error);break;case`payment-form:success`:et(W,e.data.paymentIntent);break;case`payment-form:set-token`:ot.setBearerToken(e.data.token);break;default:break}}),it(W,G)})();", nn = "data:image/svg+xml,%3csvg%20width='99'%20height='32'%20viewBox='0%200%2099%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.3848%200C29.8942%206.60543e-06%2031.9284%202.03883%2031.9284%204.55384V27.4462C31.9284%2029.9611%2029.8942%2032%2027.3848%2032H4.54376C2.03439%2032%203.69132e-05%2029.9611%200%2027.4462V4.55384C0%202.03882%202.03437%200%204.54376%200H27.3848ZM12.0067%205.0348C11.1292%205.03257%2010.3064%205.37037%209.68349%205.98797C9.0639%206.60335%208.70775%207.46498%208.70775%208.35337V15.4962C8.70775%2016.0154%209.12754%2016.4372%209.64666%2016.4372C10.1647%2016.4372%2010.5856%2016.0165%2010.5856%2015.4962V8.331C10.5856%207.95282%2010.7328%207.59689%2011.0008%207.32948C11.2676%207.06208%2011.6215%206.91564%2011.9978%206.91564H12.0023C12.7781%206.91791%2013.4099%207.56007%2013.4099%208.34774V13.5762C13.4099%2014.5508%2014.1982%2015.3407%2015.1705%2015.3407H18.1221C18.9695%2015.3407%2019.7934%2015.6518%2020.4119%2016.2325C21.0851%2016.8647%2021.4568%2017.7273%2021.4568%2018.647V21.6646C21.4568%2022.5473%2021.1141%2023.3776%2020.4901%2024.003C19.8672%2024.6274%2019.0387%2024.972%2018.1568%2024.972H14.0229C13.1689%2024.972%2012.3315%2024.67%2011.7063%2024.0871C11.0287%2023.4538%2010.6547%2022.5889%2010.6547%2021.6658V20.9799C10.6547%2020.7315%2010.7529%2020.4931%2010.9282%2020.3163L12.5169%2018.7242C12.6922%2018.5485%2012.93%2018.45%2013.1778%2018.45H15.6618C16.0067%2018.4501%2016.3449%2018.5688%2016.6005%2018.8004C16.8941%2019.0655%2017.056%2019.4314%2017.0549%2019.823C17.0527%2020.576%2016.4331%2021.188%2015.6729%2021.188H13.3161C12.7982%2021.188%2012.3774%2021.6087%2012.3774%2022.1289C12.3774%2022.6481%2012.797%2023.0699%2013.3161%2023.0699H15.6896C16.759%2023.0699%2017.755%2022.5518%2018.3813%2021.6355C18.6346%2021.2651%2018.8066%2020.841%2018.8825%2020.398C19.0666%2019.3273%2018.7339%2018.2823%2017.9949%2017.5338C17.3898%2016.9207%2016.5413%2016.5692%2015.6683%2016.5692H13.2045C12.9232%2016.5692%2012.643%2016.605%2012.3729%2016.6867C11.9196%2016.8243%2011.5189%2017.0638%2011.1884%2017.395L9.62652%2018.9614C9.4334%2019.1549%209.26156%2019.372%209.12983%2019.6115C8.89539%2020.0389%208.77596%2020.5021%208.77596%2020.981V21.6669C8.77597%2022.3673%208.91323%2023.0464%209.18337%2023.6864C9.44348%2024.304%209.81749%2024.859%2010.292%2025.3356C10.7664%2025.8112%2011.3202%2026.186%2011.9364%2026.4467C12.575%2026.7174%2013.2526%2026.855%2013.9514%2026.855H18.1546C18.8534%2026.855%2019.5311%2026.7174%2020.1696%2026.4467C20.7859%2026.1849%2021.3396%2025.8112%2021.8141%2025.3356C22.2885%2024.8601%2022.6626%2024.3052%2022.9227%2023.6876C23.1928%2023.0476%2023.3301%2022.3684%2023.3301%2021.668V18.6503C23.3301%2017.9499%2023.1928%2017.2708%2022.9227%2016.6309L22.9259%2016.6274C22.6647%2016.0098%2022.2918%2015.4549%2021.8174%2014.9794C21.3418%2014.5028%2020.7891%2014.1291%2020.1729%2013.8684C19.5343%2013.5976%2018.8567%2013.4598%2018.1579%2013.4598H15.2865V8.331C15.2865%207.46722%2014.9562%206.65034%2014.3545%206.03272C13.7416%205.40167%2012.8852%205.03816%2012.0067%205.0348Z'%20fill='%23121417'/%3e%3cpath%20d='M53.3405%2027.9622C52.2765%2027.9622%2051.291%2027.7244%2050.3858%2027.2507C49.4807%2026.7769%2048.7229%2026.121%2048.1143%2025.2809V25.8218C48.1143%2026.7616%2047.3527%2027.5249%2046.415%2027.5249C45.4773%2027.5249%2044.7157%2026.7616%2044.7157%2025.8218V5.70262C44.7157%204.76283%2045.4773%203.99949%2046.415%203.99949C47.3527%203.99949%2048.1143%204.76283%2048.1143%205.70262V15.6663C48.6789%2014.855%2049.408%2014.2202%2050.3055%2013.7656C51.201%2013.3092%2052.1904%2013.0809%2053.2735%2013.0809C54.6112%2013.0809%2055.8072%2013.4051%2056.8635%2014.0514C57.918%2014.6997%2058.7485%2015.5819%2059.3532%2016.6982C59.9579%2017.8144%2060.2603%2019.0898%2060.2603%2020.5206C60.2603%2021.9514%2059.9503%2023.2422%2059.3321%2024.3642C58.714%2025.4862%2057.8835%2026.3665%2056.8406%2027.0033C55.7995%2027.6419%2054.6322%2027.9603%2053.3405%2027.9603V27.9622ZM52.3722%2025.0489C53.218%2025.0489%2053.9663%2024.8552%2054.6169%2024.4677C55.2676%2024.0803%2055.7766%2023.5471%2056.1459%2022.8682C56.5133%2022.1892%2056.699%2021.4125%2056.699%2020.536C56.699%2019.6595%2056.5095%2018.8789%2056.1325%2018.1903C55.7555%2017.5018%2055.2427%2016.9648%2054.5978%2016.5754C53.951%2016.188%2053.2104%2015.9943%2052.3741%2015.9943C51.5378%2015.9943%2050.7877%2016.188%2050.1294%2016.5754C49.4692%2016.9628%2048.9525%2017.5018%2048.5813%2018.1903C48.2081%2018.8789%2048.0225%2019.6614%2048.0225%2020.536C48.0225%2021.4105%2048.2062%2022.1892%2048.5755%2022.8682C48.9449%2023.5471%2049.4577%2024.0803%2050.1179%2024.4677C50.7781%2024.8552%2051.5302%2025.0489%2052.376%2025.0489H52.3722Z'%20fill='%23121417'/%3e%3cpath%20d='M64.816%2010.647C64.4429%2010.647%2064.1003%2010.553%2063.7865%2010.367C63.4726%2010.1809%2063.2219%209.92969%2063.0363%209.61515C62.8488%209.30061%2062.7569%208.95154%2062.7569%208.56795C62.7569%208.18437%2062.8507%207.85256%2063.0363%207.54186C63.2219%207.23115%2063.4726%206.98374%2063.7865%206.79578C64.1003%206.60974%2064.4429%206.51576%2064.816%206.51576C65.1892%206.51576%2065.5413%206.60974%2065.8456%206.79578C66.1498%206.98374%2066.3967%207.23115%2066.5823%207.54186C66.7679%207.85256%2066.8617%208.19396%2066.8617%208.56795C66.8617%208.94195%2066.7679%209.30061%2066.5823%209.61515C66.3948%209.92969%2066.1498%2010.1809%2065.8456%2010.367C65.5413%2010.5549%2065.1968%2010.647%2064.816%2010.647ZM63.109%2025.8217V15.2213C63.109%2014.2815%2063.8707%2013.5182%2064.8084%2013.5182C65.746%2013.5182%2066.5077%2014.2815%2066.5077%2015.2213V25.8217C66.5077%2026.7615%2065.746%2027.5249%2064.8084%2027.5249C63.8707%2027.5249%2063.109%2026.7615%2063.109%2025.8217Z'%20fill='%23121417'/%3e%3cpath%20d='M70.9719%2025.4033L78.0104%2016.1569H71.7795C71.0523%2016.1569%2070.4629%2015.5662%2070.4629%2014.8374C70.4629%2014.1086%2071.0523%2013.5178%2071.7795%2013.5178H81.1736C82.2644%2013.5178%2082.8825%2014.7702%2082.2204%2015.6391L75.1724%2024.8835H82.1113C82.8385%2024.8835%2083.4279%2025.4743%2083.4279%2026.2031C83.4279%2026.9319%2082.8385%2027.5226%2082.1113%2027.5226H72.0187C70.9279%2027.5226%2070.3098%2026.2702%2070.9719%2025.4014V25.4033Z'%20fill='%23121417'/%3e%3cpath%20d='M86.544%2025.4033L93.5824%2016.1569H87.3516C86.6244%2016.1569%2086.035%2015.5662%2086.035%2014.8374C86.035%2014.1086%2086.6244%2013.5178%2087.3516%2013.5178H96.7457C97.8365%2013.5178%2098.4546%2014.7702%2097.7925%2015.6391L90.7445%2024.8835H97.6834C98.4106%2024.8835%2099%2025.4743%2099%2026.2031C99%2026.9319%2098.4106%2027.5226%2097.6834%2027.5226H87.5908C86.5%2027.5226%2085.8819%2026.2702%2086.544%2025.4014V25.4033Z'%20fill='%23121417'/%3e%3c/svg%3e";
11608
11742
  //#endregion
11609
11743
  //#region src/content/html/iframeTemplate.ts
11610
- function Vt(e) {
11611
- let t = `<img src="${Bt}" alt="Bizz Logo" class="bizz-logo">`;
11612
- return Rt.replace("<!--BIZZ_LOGO-->", t).replace("<!--HEADER-->", e.headerHtml).replace("<!--AMOUNT_FIELD-->", e.amountHtml).replace("<!--FIELDS-->", e.fieldsHtml).replace("<!--SUBMIT_BUTTON-->", e.submitButtonHtml).replace("<!--SCRIPT-->", `<script>${zt}<\/script>`);
11744
+ function rn(e) {
11745
+ let t = `<img src="${nn}" alt="Bizz Logo" class="bizz-logo">`;
11746
+ return en.replace("<!--BIZZ_LOGO-->", t).replace("<!--HEADER-->", e.headerHtml).replace("<!--AMOUNT_FIELD-->", e.amountHtml).replace("<!--FIELDS-->", e.fieldsHtml).replace("<!--SUBMIT_BUTTON-->", e.submitButtonHtml).replace("<!--SCRIPT-->", `<script>${tn}<\/script>`);
11613
11747
  }
11614
- function Ht(e) {
11748
+ function an(e) {
11615
11749
  let t = document.createElement("iframe");
11616
11750
  return t.style.border = "none", t.style.display = "block", t.style.overflow = "hidden", t.srcdoc = e, t.style.width = "100%", t.style.height = "100%", t;
11617
11751
  }
11618
11752
  //#endregion
11619
11753
  //#region src/icons/currency-dollar.svg?raw
11620
- var Ut = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-currency-dollar\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2\" />\n <path d=\"M12 3v3m0 12v3\" />\n</svg>", Wt = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-credit-card\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8\" />\n <path d=\"M3 10l18 0\" />\n <path d=\"M7 15l.01 0\" />\n <path d=\"M11 15l2 0\" />\n</svg>", Gt = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-calendar\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12\" />\n <path d=\"M16 3v4\" />\n <path d=\"M8 3v4\" />\n <path d=\"M4 11h16\" />\n <path d=\"M11 15h1\" />\n <path d=\"M12 15v3\" />\n</svg>", Kt = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-shield-lock\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3\" />\n <path d=\"M11 11a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />\n <path d=\"M12 12l0 2.5\" />\n</svg>", qt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-mail\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10\" /><path d=\"M3 7l9 6l9 -6\" /></svg>", Jt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-user\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\" /><path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\" /></svg>", Yt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-message-circle\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1\" /></svg>", Xt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-id\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -10\" /><path d=\"M7 10a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M15 8l2 0\" /><path d=\"M15 12l2 0\" /><path d=\"M7 16l10 0\" /></svg>", Zt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-device-mobile\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14\" /><path d=\"M11 4h2\" /><path d=\"M12 17v.01\" /></svg>", Qt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-map-pin\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0\" /><path d=\"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0\" /></svg>", $t = {
11621
- "currency-dollar": Ut,
11622
- "credit-card": Wt,
11623
- calendar: Gt,
11624
- "shield-lock": Kt,
11625
- email: qt,
11626
- user: Jt,
11627
- description: Yt,
11628
- document: Xt,
11629
- phone: Zt,
11630
- "map-pin": Qt
11754
+ var on = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-currency-dollar\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2\" />\n <path d=\"M12 3v3m0 12v3\" />\n</svg>", sn = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-credit-card\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8\" />\n <path d=\"M3 10l18 0\" />\n <path d=\"M7 15l.01 0\" />\n <path d=\"M11 15l2 0\" />\n</svg>", cn = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-calendar\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12\" />\n <path d=\"M16 3v4\" />\n <path d=\"M8 3v4\" />\n <path d=\"M4 11h16\" />\n <path d=\"M11 15h1\" />\n <path d=\"M12 15v3\" />\n</svg>", ln = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-shield-lock\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3\" />\n <path d=\"M11 11a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />\n <path d=\"M12 12l0 2.5\" />\n</svg>", un = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-mail\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10\" /><path d=\"M3 7l9 6l9 -6\" /></svg>", dn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-user\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\" /><path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\" /></svg>", fn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-message-circle\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1\" /></svg>", pn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-id\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -10\" /><path d=\"M7 10a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M15 8l2 0\" /><path d=\"M15 12l2 0\" /><path d=\"M7 16l10 0\" /></svg>", mn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-device-mobile\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14\" /><path d=\"M11 4h2\" /><path d=\"M12 17v.01\" /></svg>", hn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-map-pin\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0\" /><path d=\"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0\" /></svg>", gn = {
11755
+ "currency-dollar": on,
11756
+ "credit-card": sn,
11757
+ calendar: cn,
11758
+ "shield-lock": ln,
11759
+ email: un,
11760
+ user: dn,
11761
+ description: fn,
11762
+ document: pn,
11763
+ phone: mn,
11764
+ "map-pin": hn
11631
11765
  };
11632
- function en(e) {
11633
- let t = $t[e];
11766
+ function _n(e) {
11767
+ let t = gn[e];
11634
11768
  if (!t) throw Error(`Icon "${e}" not found`);
11635
11769
  return t;
11636
11770
  }
11637
11771
  //#endregion
11638
11772
  //#region src/validation/index.ts
11639
- var tn = class e {
11773
+ var vn = class e {
11640
11774
  static instance;
11641
11775
  currentDate = /* @__PURE__ */ new Date();
11642
11776
  currentYear = this.currentDate.getFullYear();
@@ -11661,7 +11795,7 @@ var tn = class e {
11661
11795
  }
11662
11796
  cardNumberInput(e) {
11663
11797
  let t = e.replace(/\s/g, "");
11664
- return /^[0-9]{16}$/.test(t) ? _t(t) === "not_valid" ? "Por favor ingrese una tarjeta visa, mastercard o union_pay" : "" : "Por favor, ingrese un número de tarjeta válido";
11798
+ return /^[0-9]{16}$/.test(t) ? Ot(t) === "not_valid" ? "Por favor ingrese una tarjeta visa, mastercard o union_pay" : "" : "Por favor, ingrese un número de tarjeta válido";
11665
11799
  }
11666
11800
  cardExpiryInput(e) {
11667
11801
  let [t, n] = e.split("/"), r = Number(this.currentYear.toString().slice(-2));
@@ -11673,103 +11807,22 @@ var tn = class e {
11673
11807
  cardCvcInput(e) {
11674
11808
  return /^[0-9]{3,4}$/.test(e) ? "" : "Por favor, ingrese un código de seguridad válido";
11675
11809
  }
11676
- }, nn = (e, t, n, r) => Object.keys(t).map((i) => {
11810
+ }, yn = (e, t, n, r) => Object.keys(t).map((i) => {
11677
11811
  let a = t[i], o = e.get(i);
11678
11812
  return {
11679
11813
  name: i,
11680
11814
  label: o?.label ?? a.label,
11681
11815
  placeholder: o?.placeholder ?? a.placeholder ?? a.label,
11682
- iconSvg: en(a.icon),
11816
+ iconSvg: _n(a.icon),
11683
11817
  mask: a.mask,
11684
11818
  divider: a.divider,
11685
11819
  type: a.type ?? "text",
11686
11820
  options: a.type === "select" ? a.options : void 0,
11687
11821
  default: a.default,
11688
- amountValue: n ? Et(n / 100, "USD", "decimal") : void 0,
11822
+ amountValue: n ? Lt(n / 100, "USD", "decimal") : void 0,
11689
11823
  disabled: i === "amount" ? r : !1
11690
11824
  };
11691
- }), rn = [
11692
- {
11693
- code: "51",
11694
- title: "¡Fondos insuficientes!",
11695
- message: "Intenta con otra tarjeta o confirma que tengas saldo disponible."
11696
- },
11697
- {
11698
- code: "04",
11699
- title: "¡Tarjeta bloqueada!",
11700
- message: "Contacta a tu banco o prueba con otra tarjeta."
11701
- },
11702
- {
11703
- code: "96",
11704
- title: "¡Sistema no disponible!",
11705
- message: "Vuelve a intentar en unos minutos."
11706
- },
11707
- {
11708
- code: "54",
11709
- title: "¡Tarjeta expirada!",
11710
- message: "Revisa la fecha de vencimiento o usa otra tarjeta."
11711
- },
11712
- {
11713
- code: "06",
11714
- title: "¡CVV no válido!",
11715
- message: "Verifica el código de seguridad e inténtalo de nuevo."
11716
- },
11717
- {
11718
- code: "99",
11719
- title: "¡Transacción inválida!",
11720
- message: "Revisa tus datos e inténtalo de nuevo."
11721
- }
11722
- ], an = (e) => rn.find((t) => t.code === e) || {
11723
- title: "¡Error al pagar!",
11724
- message: "Tu compra no pudo ser procesada!\nPor favor revisa tu información e inténtalo de nuevo",
11725
- code: 0
11726
- }, on = {
11727
- subtotal_cents: "amount",
11728
- billing_document_number: "billingDocumentNumber",
11729
- billing_email: "email",
11730
- card_network: "cardNumber",
11731
- cardholder_name: "cardHolder",
11732
- billing_name: "cardHolder",
11733
- country: "country",
11734
- description: "description"
11735
- }, sn = new Set([
11736
- "iv",
11737
- "tag",
11738
- "encrypted_data",
11739
- "encrypted_key"
11740
- ]), cn = class {
11741
- origin;
11742
- constructor(e) {
11743
- this.origin = e;
11744
- }
11745
- sendServerValidationErrors(e, t) {
11746
- if (typeof t == "string" || !e) return !1;
11747
- let n = this.buildValidationResults(t);
11748
- for (let t of n) e.postMessage({
11749
- type: "payment-form:validation-result",
11750
- field: t.field,
11751
- error: t.error
11752
- }, this.origin);
11753
- return n.length > 0;
11754
- }
11755
- hasEncryptionPayloadErrors(e) {
11756
- return typeof e == "string" ? !1 : Object.keys(e).some((e) => sn.has(e));
11757
- }
11758
- resolveServerErrorMessage(e) {
11759
- return typeof e == "string" ? e : "Por favor, revisa los campos";
11760
- }
11761
- buildValidationResults(e) {
11762
- let t = [];
11763
- for (let [n, r] of Object.entries(e)) {
11764
- let e = on[n], i = Array.isArray(r) ? r.find((e) => typeof e == "string") : void 0;
11765
- !e || !i || t.push({
11766
- field: e,
11767
- error: i
11768
- });
11769
- }
11770
- return t;
11771
- }
11772
- }, ln = class {
11825
+ }), bn = class {
11773
11826
  config;
11774
11827
  iframe = null;
11775
11828
  messageHandler = null;
@@ -11777,19 +11830,19 @@ var tn = class e {
11777
11830
  failureListeners = /* @__PURE__ */ new Set();
11778
11831
  readyListeners = /* @__PURE__ */ new Set();
11779
11832
  sizingListeners = /* @__PURE__ */ new Set();
11780
- validation = tn.getInstance();
11833
+ validation = vn.getInstance();
11781
11834
  origin = u;
11782
11835
  serverErrorHandler;
11783
- orchestrator = mt.getInstance();
11784
- paymentIntent = kt.getInstance();
11785
- countryContent = dt.getInstance();
11786
- processPayment = Ct.getInstance();
11787
- stateContent = gt.getInstance();
11788
- amountEvaluation = Ot.getInstance();
11836
+ orchestrator = Tt.getInstance();
11837
+ paymentIntent = Ut.getInstance();
11838
+ countryContent = St.getInstance();
11839
+ processPayment = Pt.getInstance();
11840
+ stateContent = Dt.getInstance();
11841
+ amountEvaluation = zt.getInstance();
11789
11842
  currentAmount;
11790
11843
  currentValues = {};
11791
11844
  constructor(e) {
11792
- this.config = e, this.currentAmount = e.totalAmount, this.serverErrorHandler = new cn(this.origin);
11845
+ this.config = e, this.currentAmount = e.totalAmount, this.serverErrorHandler = new Ht(this.origin);
11793
11846
  }
11794
11847
  on(e, t) {
11795
11848
  e === "success" ? this.successListeners.add(t) : e === "failure" ? this.failureListeners.add(t) : e === "ready" ? this.readyListeners.add(t) : e === "sizing" && this.sizingListeners.add(t);
@@ -11797,10 +11850,10 @@ var tn = class e {
11797
11850
  async setup() {
11798
11851
  let e = document.querySelector(this.config.iframeTarget);
11799
11852
  if (!e) throw Error(`Element not found: ${this.config.iframeTarget}`);
11800
- let t = wt();
11853
+ let t = Ft();
11801
11854
  e.appendChild(t);
11802
11855
  try {
11803
- await this.orchestrator.initialize(this.config.branchCode, this.config.paymentRequestCode);
11856
+ await this.orchestrator.initialize(this.config.branchCode, this.config.paymentRequestCode, this.config.environment);
11804
11857
  } catch (n) {
11805
11858
  t.remove();
11806
11859
  let r = document.createElement("div");
@@ -11812,7 +11865,7 @@ var tn = class e {
11812
11865
  let t = e.data;
11813
11866
  if (t?.type) {
11814
11867
  if (t.type === "payment-form:states-loaded" && this.stateContent.setStates(t.states), t.type === "payment-form:sizing" && (this.iframe && (this.iframe.style.height = `${t.height}px`), this.sendSizingEmitter(t.width, t.height)), t.type === "payment-form:validate-amount") {
11815
- this.currentAmount = Dt(t.amount), this.setSubmitLoading(!0);
11868
+ this.currentAmount = Rt(t.amount), this.setSubmitLoading(!0);
11816
11869
  let e = await this.amountEvaluation.validateAmount(t.amount);
11817
11870
  if (this.setSubmitLoading(!1), e && "data" in e) {
11818
11871
  let t = this.orchestrator.getConfig();
@@ -11829,7 +11882,7 @@ var tn = class e {
11829
11882
  }, this.origin);
11830
11883
  }
11831
11884
  if (t.type === "payment-form:submit") {
11832
- t.value.amount && (this.currentAmount = Dt(t.value.amount));
11885
+ t.value.amount && (this.currentAmount = Rt(t.value.amount));
11833
11886
  let e = !1, n = Object.keys(t.value);
11834
11887
  for (let r of n) {
11835
11888
  let n = this.validation.validateField(r, t.value[r] ?? "");
@@ -11875,7 +11928,7 @@ var tn = class e {
11875
11928
  return;
11876
11929
  }
11877
11930
  if (n.data.status !== "success") {
11878
- let e = an(n.data.response_code ?? "");
11931
+ let e = Gt(n.data.response_code ?? "");
11879
11932
  this.sendAlert(e.title, e.message), this.sendFailureEmitter(0, e.message);
11880
11933
  return;
11881
11934
  }
@@ -11901,35 +11954,35 @@ var tn = class e {
11901
11954
  if (!this.config.paymentRequestCode) return;
11902
11955
  let { data: e } = this.orchestrator.getConfig();
11903
11956
  if (e.order_template_id == null || typeof e.amount_cents != "number" || e.amount_cents <= 0) return;
11904
- let t = Et(e.amount_cents / 100, "USD", "decimal");
11905
- this.config.description = e.description, this.config.totalAmount = Dt(t), this.currentAmount = Dt(t);
11957
+ let t = Lt(e.amount_cents / 100, "USD", "decimal");
11958
+ this.config.description = e.description, this.config.totalAmount = Rt(t), this.currentAmount = Rt(t);
11906
11959
  }
11907
11960
  renderForm() {
11908
11961
  let e = document.querySelector(this.config.iframeTarget);
11909
11962
  if (!e) return;
11910
11963
  this.iframe && this.iframe.remove();
11911
- let t = new Map((this.config.i18n?.fields ?? []).map((e) => [e.name, e])), n = this.orchestrator.getConfig().data.secure_mode ? Pt : Nt, r = n.country;
11964
+ let t = new Map((this.config.i18n?.fields ?? []).map((e) => [e.name, e])), n = this.orchestrator.getConfig().data.secure_mode ? Xt : Yt, r = n.country;
11912
11965
  r && "options" in r && (r.options = [...r.options, ...this.countryContent.getCountries().map((e) => ({
11913
11966
  label: e.name,
11914
11967
  value: e.id
11915
11968
  }))]);
11916
- let i = !!this.config.totalAmount, a = nn(t, n, this.currentAmount, i);
11969
+ let i = !!this.config.totalAmount, a = yn(t, n, this.currentAmount, i);
11917
11970
  a.forEach((e) => {
11918
11971
  this.currentValues[e.name] !== void 0 && e.name !== "amount" && (e.default = this.currentValues[e.name]);
11919
11972
  });
11920
- let o = this.config.totalAmount ? Et(this.config.totalAmount / 100, "USD", "decimal") : "", { amountHtml: s, fieldsHtml: c } = Lt(a);
11921
- this.iframe = Ht(Vt({
11922
- headerHtml: It({
11973
+ let o = this.config.totalAmount ? Lt(this.config.totalAmount / 100, "USD", "decimal") : "", { amountHtml: s, fieldsHtml: c } = $t(a);
11974
+ this.iframe = an(rn({
11975
+ headerHtml: Qt({
11923
11976
  logo: this.orchestrator.getConfig().data.logo_url,
11924
11977
  name: this.orchestrator.getConfig().data.name,
11925
11978
  description: this.config.description,
11926
11979
  header: this.config.header,
11927
11980
  totalAmount: o,
11928
- ...o ? { icon: en("currency-dollar") } : {}
11981
+ ...o ? { icon: _n("currency-dollar") } : {}
11929
11982
  }),
11930
11983
  amountHtml: s,
11931
11984
  fieldsHtml: c,
11932
- submitButtonHtml: Ft(this.config.i18n?.submitButton)
11985
+ submitButtonHtml: Zt(this.config.i18n?.submitButton)
11933
11986
  })), e.appendChild(this.iframe), this.iframe.addEventListener("load", () => {
11934
11987
  this.setToken(this.orchestrator.getAuthToken().access_token);
11935
11988
  let e = this.countryContent.getCountriesLoadError();
@@ -11993,4 +12046,4 @@ var tn = class e {
11993
12046
  }
11994
12047
  };
11995
12048
  //#endregion
11996
- export { ln as BizzPaymentForm };
12049
+ export { bn as BizzPaymentForm };