PageSourceSearch

https://autopreneur.id/webinar-seller-ai?utm_source=beranda

html autopreneur.id collected 2026-10-02 01:54:40 UTC 284,991 bytes, 3,641 lines download raw bytes

1<!doctype html>
2<html lang="id">
3<head>
4<script type="text/javascript">;try{(function installAnalyticsSelfTraffic(w, initialBusinessId, apiBase) {
5  if (w.__sclv_self_traffic__) {
6    w.__sclv_self_traffic__.setContext(initialBusinessId, apiBase);
7    return w.__sclv_self_traffic__;
8  }
9  const fragmentKey = "__sclv_self_traffic";
10  const maximumAge = 7 * 86400;
11  let businessId = 0;
12  let origin = "";
13  let endpoint = apiBase || "/api/v3";
14  let generation = 0;
15  let candidate = null;
16  let blocked = false;
17  let expiryTimer = null;
18  let ready = Promise.resolve();
19  const storageKey = () => `_sclv_self_traffic:${businessId}:${origin}`;
20  const cookieName = () => `_sclv_self_traffic_${businessId}`;
21  const now = () => Math.floor(Date.now() / 1e3);
22  const valid = (value) => value && typeof value.token === "string" && /^[A-Za-z0-9._-]{1,4096}$/.test(value.token) && value.business_id === businessId && value.origin === origin && Number.isSafeInteger(value.expires_at) && value.expires_at > now() && value.expires_at <= now() + maximumAge + 60;
23  const notify = () => {
24    try {
25      w.dispatchEvent(new w.CustomEvent("scalev:self-traffic"));
26    } catch {
27    }
28  };
29  const read = () => {
30    for (const storage of ["localStorage", "sessionStorage"]) {
31      try {
32        const value = JSON.parse(w[storage].getItem(storageKey()) || "null");
33        if (valid(value)) return value;
34      } catch {
35      }
36    }
37    try {
38      const prefix = `${cookieName()}=`;
39      const raw = String(w.document.cookie || "").split(";").map((part) => part.trim()).find((part) => part.startsWith(prefix));
40      const value = JSON.parse(
41        decodeURIComponent((raw == null ? void 0 : raw.slice(prefix.length)) || "null")
42      );
43      if (valid(value)) return value;
44    } catch {
45    }
46    return null;
47  };
48  const persist = (value) => {
49    for (const storage of ["localStorage", "sessionStorage"]) {
50      try {
51        if (value) w[storage].setItem(storageKey(), JSON.stringify(value));
52        else w[storage].removeItem(storageKey());
53      } catch {
54      }
55    }
56    try {
57      const secure = w.location.protocol === "https:" ? "; Secure" : "";
58      w.document.cookie = `${cookieName()}=${value ? encodeURIComponent(JSON.stringify(value)) : ""}; Path=/; Max-Age=${value ? Math.max(0, value.expires_at - now()) : 0}; SameSite=Lax${secure}`;
59    } catch {
60    }
61  };
62  const takeHandoff = () => {
63    try {
64      const url = new URL(w.location.href);
65      const parts = url.hash.slice(1).split("&");
66      const values = [];
67      const retained = parts.filter((part) => {
68        const at = part.indexOf("=");
69        try {
70          if (decodeURIComponent(at < 0 ? part : part.slice(0, at)) !== fragmentKey)
71            return true;
72          values.push(at < 0 ? "" : part.slice(at + 1));
73          return false;
74        } catch {
75          return true;
76        }
77      });
78      if (!values.length) return null;
79      url.hash = retained.join("&");
80      try {
81        w.history.replaceState(w.history.state, "", url.href);
82      } catch {
83      }
84      const retainedHash = url.hash;
85      if (retainedHash) {
86        const restoreAnchor = () => {
87          var _a, _b;
88          if (w.location.hash !== retainedHash) return;
89          try {
90            (_b = (_a = w.document.getElementById(decodeURIComponent(retainedHash.slice(1)))) == null ? void 0 : _a.scrollIntoView) == null ? void 0 : _b.call(_a);
91          } catch {
92          }
93        };
94        if (w.document.readyState === "loading")
95          w.document.addEventListener("DOMContentLoaded", restoreAnchor, {
96            once: true
97          });
98        else restoreAnchor();
99      }
100      if (values.length !== 1) return null;
101      const value = JSON.parse(decodeURIComponent(values[0]));
102      return valid(value) ? value : null;
103    } catch {
104      return null;
105    }
106  };
107  const verify = (value) => {
108    const currentGeneration = ++generation;
109    const currentBusiness = businessId;
110    const currentOrigin = origin;
111    candidate = value;
112    blocked = Boolean(value);
113    if (expiryTimer) w.clearTimeout(expiryTimer);
114    notify();
115    if (!value) return Promise.resolve();
116    persist(value);
117    return (async () => {
118      let timer;
119      try {
120        const controller = new w.AbortController();
121        timer = w.setTimeout(() => controller.abort(), 5e3);
122        const response = await w.fetch(
123          `${endpoint.replace(/\/$/, "").replace(/\/v\d+$/, "")}/v3/public/self-traffic`,
124          {
125            method: "POST",
126            credentials: "omit",
127            keepalive: true,
128            signal: controller.signal,
129            headers: { "Content-Type": "application/json" },
130            body: JSON.stringify({ token: value.token })
131          }
132        );
133        if (currentGeneration !== generation || currentBusiness !== businessId || currentOrigin !== origin)
134          return;
135        if ([400, 401, 403, 422].includes(response.status)) {
136          candidate = null;
137          blocked = false;
138          persist(null);
139          notify();
140          return;
141        }
142        if (response.status !== 200) throw new Error("self_traffic_unavailable");
143        const result = await response.json();
144        if (currentGeneration !== generation) return;
145        if (!valid(result)) {
146          candidate = null;
147          blocked = false;
148          persist(null);
149          notify();
150          return;
151        }
152        candidate = {
153          token: result.token,
154          business_id: result.business_id,
155          origin: result.origin,
156          expires_at: result.expires_at
157        };
158        persist(candidate);
159        expiryTimer = w.setTimeout(
160          () => {
161            if (currentGeneration !== generation) return;
162            candidate = null;
163            blocked = false;
164            persist(null);
165            notify();
166          },
167          Math.max(0, candidate.expires_at * 1e3 - Date.now())
168        );
169        notify();
170      } catch {
171      } finally {
172        if (timer) w.clearTimeout(timer);
173      }
174    })();
175  };
176  const setContext = (nextBusinessId, nextApiBase = endpoint) => {
177    const nextBusiness = Number(nextBusinessId);
178    const nextOrigin = new URL(w.location.href).origin;
179    endpoint = nextApiBase;
180    if (businessId === nextBusiness && origin === nextOrigin) {
181      const handoff2 = takeHandoff();
182      if (handoff2) ready = verify(handoff2);
183      return;
184    }
185    businessId = Number.isSafeInteger(nextBusiness) && nextBusiness > 0 ? nextBusiness : 0;
186    origin = nextOrigin;
187    const handoff = takeHandoff();
188    ready = verify(handoff || (businessId ? read() : null));
189  };
190  const runtime = {
191    allowed: (expectedBusinessId) => (!expectedBusinessId || Number(expectedBusinessId) === businessId) && !blocked,
192    proof: (expectedBusinessId) => (!expectedBusinessId || Number(expectedBusinessId) === businessId) && valid(candidate) ? candidate.token : "",
193    setContext,
194    get ready() {
195      return ready;
196    }
197  };
198  w.__sclv_self_traffic__ = runtime;
199  setContext(initialBusinessId, apiBase);
200  w.addEventListener("storage", (event) => {
201    if (event.key === storageKey()) ready = verify(read());
202  });
203  return runtime;
204})(window,12808,"https://api.scalev.com/v2");}catch(_selfTrafficUnavailable){};try{(function installCustomerPrivacy(w, initialPolicy, apiBase = "/v3", language = "") {
205  if (w.__sclv_privacy__) {
206    w.__sclv_privacy__.setContext(initialPolicy, apiBase, language);
207    return w.__sclv_privacy__;
208  }
209  const d = w.document;
210  const groups = ["analytics", "marketing"];
211  const year = 365 * 864e5;
212  const countries = "AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(
213    " "
214  );
215  const cookieValues = String(d.cookie || "").split(";").map((p) => p.trim()).filter((p) => p.startsWith("__Host-sclv_country="));
216  const rawCountry = cookieValues.length === 1 ? cookieValues[0].slice("__Host-sclv_country=".length) : "";
217  const country = countries.includes(rawCountry) ? rawCountry : "";
218  let policy = null;
219  let record = {};
220  let visit = null;
221  let cookieRefusals = /* @__PURE__ */ new Set();
222  let endpoint = apiBase;
223  const locale = country === "ID" ? "id" : "en";
224  let key = "";
225  let inFlight = null;
226  let dialog = null;
227  let updateDialogState = null;
228  let refreshing = false;
229  let opener = null;
230  let restoreDialogBackground = null;
231  let removeDialogLayoutListener = null;
232  let reloading = false;
233  let choiceFailed = false;
234  let privacyChannel = null;
235  let appliedPermissions = { analytics: false, marketing: false };
236  let appliedRecipients = {};
237  const subscribers = [];
238  const loadedRecipients = /* @__PURE__ */ new Set();
239  const validChoice = (value) => value === "granted" || value === "denied" ? value : null;
240  const uuid = () => {
241    var _a;
242    if ((_a = w.crypto) == null ? void 0 : _a.randomUUID) return w.crypto.randomUUID();
243    const bytes = new Uint8Array(16);
244    w.crypto.getRandomValues(bytes);
245    bytes[6] = bytes[6] & 15 | 64;
246    bytes[8] = bytes[8] & 63 | 128;
247    const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join(
248      ""
249    );
250    return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
251  };
252  const denialCookieName = () => `sclv_privacy_denied_${(policy == null ? void 0 : policy.business_id) || ""}`;
253  const localCookieName = () => `sclv_privacy_local_${(policy == null ? void 0 : policy.business_id) || ""}`;
254  const recipientId = (id) => /^[a-z][a-z0-9_]{0,31}:[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(id);
255  const localRecipientDetails = () => {
256    const configured = new Set((policy == null ? void 0 : policy.recipients) || []);
257    return Object.fromEntries(
258      Object.entries(record.recipient_details || {}).filter(([id, detail]) => recipientId(id) && validChoice(detail == null ? void 0 : detail.state)).sort(
259        ([a], [b]) => Number(configured.has(b)) - Number(configured.has(a))
260      ).slice(0, 100)
261    );
262  };
263  const readRecord = () => {
264    var _a;
265    let value = {};
266    for (const storage of ["localStorage", "sessionStorage"]) {
267      try {
268        const saved = w[storage].getItem(key);
269        if (saved) {
270          const parsed = JSON.parse(saved);
271          value = parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
272          break;
273        }
274      } catch {
275      }
276    }
277    try {
278      const prefix = `${localCookieName()}=`;
279      const raw = String(d.cookie || "").split(";").map((part) => part.trim()).find((part) => part.startsWith(prefix));
280      const local = JSON.parse(
281        decodeURIComponent((raw == null ? void 0 : raw.slice(prefix.length)) || "null")
282      );
283      if ((local == null ? void 0 : local.version) === 1 && (Object.keys(value).length === 0 || Number(local.local_updated_at) > Number(value.local_updated_at || 0))) {
284        value = { ...value, ...local };
285      }
286    } catch {
287    }
288    const denial = ((_a = String(d.cookie || "").split(";").map((part) => part.trim()).find((part) => part.startsWith(`${denialCookieName()}=`))) == null ? void 0 : _a.split("=")[1]) || "";
289    cookieRefusals = new Set(
290      denial.split(".").filter((group) => groups.includes(group))
291    );
292    for (const group of groups)
293      if (cookieRefusals.has(group)) {
294        value.choices = { ...value.choices, [group]: "denied" };
295        if (group === "marketing") value.recipient_details = {};
296      }
297    return value;
298  };
299  const persist = () => {
300    if (!key) return false;
301    let stored = false;
302    for (const storage of ["localStorage", "sessionStorage"]) {
303      try {
304        w[storage].setItem(key, JSON.stringify(record));
305        stored = true;
306      } catch {
307      }
308    }
309    try {
310      const local = {
311        version: 1,
312        local_updated_at: record.local_updated_at || 0,
313        choices: Object.fromEntries(
314          groups.map((group) => {
315            var _a;
316            return [group, validChoice((_a = record.choices) == null ? void 0 : _a[group])];
317          })
318        ),
319        recipient_details: localRecipientDetails(),
320        marketing_selection: Boolean(record.marketing_selection)
321      };
322      let encoded = encodeURIComponent(JSON.stringify(local));
323      if (encoded.length > 3500) {
324        local.recipient_details = {};
325        local.marketing_selection = true;
326        encoded = encodeURIComponent(JSON.stringify(local));
327      }
328      d.cookie = `${localCookieName()}=${encoded}; Path=/; Max-Age=34560000; SameSite=Lax${w.location.protocol === "https:" ? "; Secure" : ""}`;
329      stored = stored || String(d.cookie || "").split(";").some((part) => part.trim().startsWith(`${localCookieName()}=`));
330    } catch {
331    }
332    const denied = groups.filter((group) => {
333      var _a;
334      if (((_a = record.choices) == null ? void 0 : _a[group]) !== "denied") return false;
335      if (group !== "marketing") return true;
336      return !Object.values(record.recipient_details || {}).some(
337        (detail) => {
338          var _a2;
339          return detail.state === "granted" && Number(detail.decided_at) > Number(((_a2 = record.denied_at) == null ? void 0 : _a2.marketing) || 0);
340        }
341      );
342    });
343    cookieRefusals = new Set(denied);
344    try {
345      d.cookie = `${denialCookieName()}=${denied.join(".")}; Path=/; Max-Age=${denied.length ? 3456e4 : 0}; SameSite=Lax${w.location.protocol === "https:" ? "; Secure" : ""}`;
346    } catch {
347    }
348    try {
349      privacyChannel == null ? void 0 : privacyChannel.postMessage({ business_id: policy.business_id });
350    } catch {
351    }
352    return stored;
353  };
354  const required = (group) => Boolean(
355    policy && country && policy[`${group}_consent_countries`].includes(country)
356  );
357  const hasConsentUi = () => Boolean(policy && (!country || groups.some(required)));
358  const choice = (group) => {
359    var _a;
360    return validChoice((_a = record.choices) == null ? void 0 : _a[group]);
361  };
362  const categoryAllowed = (group) => {
363    if (!groups.includes(group)) return false;
364    if (group === "analytics" && (policy == null ? void 0 : policy.analytics_enabled) !== true)
365      return false;
366    return !required(group) || choice(group) === "granted";
367  };
368  const recipientChoice = (id) => {
369    var _a, _b, _c;
370    const detail = (_a = record.recipient_details) == null ? void 0 : _a[id];
371    const category = choice("marketing");
372    const categoryAt = category === "granted" ? (_b = record.granted_at) == null ? void 0 : _b.marketing : (_c = record.denied_at) == null ? void 0 : _c.marketing;
373    if (validChoice(detail == null ? void 0 : detail.state)) {
374      if (detail.decided_at && Number(categoryAt) > Number(detail.decided_at))
375        return category;
376      return detail.state;
377    }
378    return record.marketing_selection ? null : category;
379  };
380  const allowed = (group, id) => {
381    if (group !== "marketing") return categoryAllowed(group);
382    if (id !== void 0 && !(policy == null ? void 0 : policy.recipients.includes(id))) return false;
383    if (!required(group)) return true;
384    if (id === void 0)
385      return (policy == null ? void 0 : policy.recipients.length) ? policy.recipients.some((recipient) => allowed("marketing", recipient)) : categoryAllowed(group);
386    return recipientChoice(id) === "granted";
387  };
388  const allowedProvider = (provider) => Boolean(
389    Array.from(loadedRecipients).filter((id) => id.startsWith(`${provider}:`)).every(
390      (id) => provider === "gtm" ? allowedGtm(id.slice(4)) : allowed("marketing", id)
391    ) && (!((policy == null ? void 0 : policy.recipients) || []).some((id) => id.startsWith(`${provider}:`)) ? categoryAllowed("marketing") : policy.recipients.some(
392      (id) => id.startsWith(`${provider}:`) && (provider === "gtm" ? allowedGtm(id.slice(4)) : allowed("marketing", id))
393    ))
394  );
395  const loadRecipient = (id) => {
396    if (!allowed("marketing", id)) return false;
397    loadedRecipients.add(id);
398    return true;
399  };
400  const allowedGtm = (containerId) => allowed("marketing", `gtm:${containerId}`);
401  const loadGtm = (id) => {
402    if (!allowedGtm(id)) return false;
403    loadedRecipients.add(`gtm:${id}`);
404    return true;
405  };
406  const recipientPermissions = () => Object.fromEntries(
407    ((policy == null ? void 0 : policy.recipients) || []).map((id) => [id, allowed("marketing", id)])
408  );
409  const lostRecipient = (previous) => Object.keys(previous).some(
410    (id) => previous[id] && !allowed("marketing", id)
411  );
412  const subject = () => {
413    if (groups.some((group) => allowed(group))) {
414      let changed = false;
415      if (!record.subject_id) {
416        try {
417          record.subject_id = uuid();
418        } catch {
419          return null;
420        }
421        changed = true;
422      }
423      const decision = Date.parse(record.decision_at);
424      if (!Number.isFinite(decision) || decision + year <= Date.now()) {
425        record.decision_at = (/* @__PURE__ */ new Date()).toISOString();
426        changed = true;
427      }
428      if (changed) {
429        record.version = 1;
430        persist();
431      }
432    }
433    return record.subject_id || null;
434  };
435  const localContext = () => ({
436    local_choices: Object.fromEntries(
437      groups.flatMap((group) => {
438        const value = !required(group) ? "not_required" : group === "marketing" && record.marketing_selection ? "denied" : choice(group);
439        return value ? [[group, value]] : [];
440      })
441    ),
442    local_recipient_choices: required("marketing") ? Object.fromEntries(
443      Object.keys(localRecipientDetails()).flatMap((id) => {
444        const value = recipientChoice(id);
445        return value ? [[id, value]] : [];
446      })
447    ) : {}
448  });
449  const context = () => {
450    var _a, _b;
451    return {
452      token: (policy == null ? void 0 : policy.policy_token) || "",
453      // Receipt transport is optional evidence, not a browser permission gate.
454      receipt: record.receipt || null,
455      subject_id: subject(),
456      decision_at: record.decision_at || null,
457      ...localContext(),
458      ...((_b = (_a = w.__sclv_self_traffic__) == null ? void 0 : _a.proof) == null ? void 0 : _b.call(_a, policy == null ? void 0 : policy.business_id)) ? { self_traffic: w.__sclv_self_traffic__.proof(policy == null ? void 0 : policy.business_id) } : {}
459    };
460  };
461  const captureVisit = () => {
462    visit = {
463      businessId: (policy == null ? void 0 : policy.business_id) || null,
464      context: JSON.parse(JSON.stringify(context())),
465      receipt: record.receipt || null
466    };
467    return visitContext();
468  };
469  const visitContext = () => {
470    if (!visit || visit.businessId !== ((policy == null ? void 0 : policy.business_id) || null))
471      return captureVisit();
472    if (record.receipt && record.receipt !== visit.receipt) {
473      visit.receipt = record.receipt;
474      visit.context = {
475        ...visit.context,
476        receipt: record.receipt,
477        subject_id: record.subject_id || visit.context.subject_id,
478        decision_at: record.decision_at || visit.context.decision_at
479      };
480    }
481    return JSON.parse(JSON.stringify({ ...visit.context, ...localContext() }));
482  };
483  const serverTrackingAllowed2 = () => !required("marketing") || !record.marketing_selection && choice("marketing") === "granted" || Object.keys(localRecipientDetails()).some(
484    (id) => recipientChoice(id) === "granted"
485  );
486  const snapshot = () => ({
487    businessId: (policy == null ? void 0 : policy.business_id) || null,
488    country: country || null,
489    choices: { analytics: choice("analytics"), marketing: choice("marketing") },
490    required: {
491      analytics: required("analytics"),
492      marketing: required("marketing")
493    },
494    allowed: {
495      analytics: allowed("analytics"),
496      marketing: allowed("marketing")
497    },
498    recipientChoices: Object.fromEntries(
499      ((policy == null ? void 0 : policy.recipients) || []).map((id) => [id, recipientChoice(id)])
500    ),
501    recipients: recipientPermissions(),
502    pending: Boolean(record.pending),
503    reloading
504  });
505  const clearOptionalState = (group, providerNames) => {
506    const names = providerNames || (group === "analytics" ? ["_sclv_vid", "_sclv_sid", "_sclv_sat", "_sclv_adc"] : [
507      "_fbp",
508      "_fbc",
509      "_ttp",
510      "_tt_enable_cookie",
511      "_scalev_ttclid",
512      "_scalev_click_id",
513      "_scalev_gclid"
514    ]);
515    for (const name of names) {
516      try {
517        w.localStorage.removeItem(name);
518      } catch {
519      }
520      const host = w.location.hostname.split(".");
521      const domains = [""];
522      for (let i = 0; i < host.length - 1; i++)
523        domains.push(`; Domain=.${host.slice(i).join(".")}`);
524      for (const domain of domains) {
525        try {
526          d.cookie = `${name}=; Path=/; Max-Age=0; SameSite=Lax${w.location.protocol === "https:" ? "; Secure" : ""}${domain}`;
527        } catch {
528        }
529      }
530    }
531  };
532  const notify = () => {
533    groups.forEach((group) => {
534      if (!allowed(group)) clearOptionalState(group);
535    });
536    for (const [provider, names] of Object.entries({
537      meta: ["_fbp", "_fbc"],
538      tiktok: ["_ttp", "_tt_enable_cookie", "_scalev_ttclid"],
539      kwai: ["_scalev_click_id"],
540      gtm: ["_scalev_gclid"]
541    }))
542      if (!allowedProvider(provider)) clearOptionalState("marketing", names);
543    subscribers.slice().forEach((fn) => {
544      try {
545        fn(snapshot());
546      } catch {
547      }
548    });
549    try {
550      w.dispatchEvent(
551        new w.CustomEvent("scalev:privacy", { detail: snapshot() })
552      );
553    } catch {
554    }
555    appliedPermissions = snapshot().allowed;
556    appliedRecipients = recipientPermissions();
557    updateDialogState == null ? void 0 : updateDialogState();
558  };
559  const close = () => {
560    var _a;
561    const restoreFocus = dialog == null ? void 0 : dialog.contains(d.activeElement);
562    restoreDialogBackground == null ? void 0 : restoreDialogBackground();
563    restoreDialogBackground = null;
564    removeDialogLayoutListener == null ? void 0 : removeDialogLayoutListener();
565    removeDialogLayoutListener = null;
566    if (dialog) dialog.remove();
567    dialog = null;
568    updateDialogState = null;
569    if (restoreFocus) (_a = opener == null ? void 0 : opener.focus) == null ? void 0 : _a.call(opener);
570  };
571  const checkoutFields = [
572    "name",
573    "customer_name",
574    "customerName",
575    "email",
576    "customer_email",
577    "customerEmail",
578    "phone",
579    "fullPhoneNumber",
580    "customer_phone",
581    "customerPhone",
582    "address",
583    "shipping_address",
584    "shippingAddress",
585    "notes",
586    "province",
587    "city",
588    "subdistrict",
589    "postalCodeSelected",
590    "postal_code",
591    "postalCode",
592    "paymentMethod",
593    "payment_method",
594    "sub_payment_method",
595    "selectedCourier",
596    "shipping_method"
597  ];
598  const locationFields = [
599    "id",
600    "ro_province_id",
601    "province_name",
602    "ro_city_id",
603    "city_name",
604    "subdistrict_id",
605    "subdistrict_name",
606    "postal_code",
607    "full_location",
608    "label",
609    "name"
610  ];
611  const cleanCheckout = (value) => {
612    const clean = {};
613    for (const field of checkoutFields)
614      if (["string", "number"].includes(typeof (value == null ? void 0 : value[field])))
615        clean[field] = typeof value[field] === "number" ? value[field] : value[field].slice(
616          0,
617          [
618            "address",
619            "shipping_address",
620            "shippingAddress",
621            "notes"
622          ].includes(field) ? 2e3 : 250
623        );
624    for (const field of ["provinceObject", "cityObject", "subdistrictObject"]) {
625      if (!(value == null ? void 0 : value[field]) || typeof value[field] !== "object") continue;
626      clean[field] = {};
627      for (const item of locationFields)
628        if (["string", "number"].includes(typeof value[field][item]))
629          clean[field][item] = typeof value[field][item] === "number" ? value[field][item] : value[field][item].slice(0, 250);
630    }
631    return clean;
632  };
633  const documentCheckoutContext = {
634    businessId: initialPolicy == null ? void 0 : initialPolicy.business_id,
635    host: w.location.host,
636    path: w.location.pathname
637  };
638  const checkoutHandlers = /* @__PURE__ */ new Map();
639  let checkoutRestore = null;
640  let checkoutRestoreKey = "";
641  let checkoutSavedNonce = null;
642  const restoreKey = () => `sclv_privacy_restore:${policy == null ? void 0 : policy.business_id}:${w.location.host}:${w.location.pathname}`;
643  const loadCheckoutRestore = () => {
644    var _a;
645    if (checkoutRestoreKey === restoreKey()) return;
646    checkoutRestoreKey = restoreKey();
647    checkoutRestore = null;
648    try {
649      for (const storageKey of Object.keys(w.sessionStorage)) {
650        if (!storageKey.startsWith("sclv_privacy_restore:")) continue;
651        try {
652          if (((_a = JSON.parse(w.sessionStorage.getItem(storageKey) || "null")) == null ? void 0 : _a.expires_at) <= Date.now())
653            w.sessionStorage.removeItem(storageKey);
654        } catch {
655          w.sessionStorage.removeItem(storageKey);
656        }
657      }
658      const raw = w.sessionStorage.getItem(checkoutRestoreKey);
659      const saved = JSON.parse(raw || "null");
660      if ((saved == null ? void 0 : saved.nonce) === checkoutSavedNonce) return;
661      w.sessionStorage.removeItem(checkoutRestoreKey);
662      if ((saved == null ? void 0 : saved.nonce) && saved.business_id === policy.business_id && saved.host === w.location.host && saved.path === w.location.pathname && saved.expires_at > Date.now() && saved.expires_at <= Date.now() + 3e5)
663        checkoutRestore = saved;
664    } catch {
665    }
666  };
667  const registerCheckout = (id, capture, restore) => {
668    var _a;
669    loadCheckoutRestore();
670    const entry = {
671      capture,
672      businessId: policy == null ? void 0 : policy.business_id,
673      host: w.location.host,
674      path: w.location.pathname
675    };
676    checkoutHandlers.set(id, entry);
677    if ((checkoutRestore == null ? void 0 : checkoutRestore.expires_at) > Date.now() && ((_a = checkoutRestore.forms) == null ? void 0 : _a[id])) {
678      const value = cleanCheckout(checkoutRestore.forms[id]);
679      delete checkoutRestore.forms[id];
680      try {
681        restore(value, { expiresAt: checkoutRestore.expires_at });
682      } catch {
683      }
684    }
685    return () => {
686      if (checkoutHandlers.get(id) === entry) checkoutHandlers.delete(id);
687    };
688  };
689  const domCheckoutFields = () => Array.from(d.querySelectorAll("input,select,textarea")).filter((input) => {
690    const field = input.name || input.id;
691    return checkoutFields.includes(field) && !["password", "file", "hidden", "submit", "button"].includes(
692      input.type
693    ) && !/cc-|one-time-code|current-password|new-password/i.test(
694      input.autocomplete || ""
695    );
696  });
697  const restoreDomCheckout = () => {
698    var _a;
699    if (!d.getElementById("scalev-runtime")) return;
700    loadCheckoutRestore();
701    const fields = (_a = checkoutRestore == null ? void 0 : checkoutRestore.forms) == null ? void 0 : _a.dom;
702    if (!fields || checkoutRestore.expires_at <= Date.now()) return;
703    for (const input of domCheckoutFields()) {
704      const field = input.name || input.id;
705      if (!Object.prototype.hasOwnProperty.call(fields, field)) continue;
706      if (input.tagName === "SELECT" && !Array.from(input.options).some(
707        (option) => !option.disabled && option.value === fields[field]
708      )) {
709        delete fields[field];
710        continue;
711      }
712      if (input.type === "radio" || input.type === "checkbox") {
713        if (input.value !== fields[field]) continue;
714        input.checked = true;
715      } else input.value = fields[field];
716      delete fields[field];
717      input.dispatchEvent(new w.Event("input", { bubbles: true }));
718      input.dispatchEvent(new w.Event("change", { bubbles: true }));
719    }
720  };
721  const reload = () => {
722    refreshing = true;
723    reloading = true;
724    updateDialogState == null ? void 0 : updateDialogState();
725    const forms = {};
726    for (const [id, entry] of checkoutHandlers) {
727      if (entry.businessId !== (policy == null ? void 0 : policy.business_id) || entry.host !== w.location.host || entry.path !== w.location.pathname)
728        continue;
729      try {
730        forms[id] = cleanCheckout(entry.capture());
731      } catch {
732      }
733    }
734    if (d.getElementById("scalev-runtime") && documentCheckoutContext.businessId === (policy == null ? void 0 : policy.business_id) && documentCheckoutContext.host === w.location.host && documentCheckoutContext.path === w.location.pathname) {
735      forms.dom = {};
736      for (const input of domCheckoutFields()) {
737        if (["radio", "checkbox"].includes(input.type) && !input.checked)
738          continue;
739        forms.dom[input.name || input.id] = input.value;
740      }
741      forms.dom = cleanCheckout(forms.dom);
742    }
743    try {
744      checkoutSavedNonce = uuid();
745      if (Object.keys(forms).length)
746        w.sessionStorage.setItem(
747          restoreKey(),
748          JSON.stringify({
749            nonce: checkoutSavedNonce,
750            business_id: policy.business_id,
751            host: w.location.host,
752            path: w.location.pathname,
753            expires_at: Date.now() + 3e5,
754            forms
755          })
756        );
757      w.dispatchEvent(new w.CustomEvent("scalev:privacy-before-reload"));
758    } catch {
759    }
760    w.location.reload();
761  };
762  const pendingMatchesPolicy = (pending) => Boolean(pending && policy);
763  const hasNewGrant = (pending) => [
764    ...Object.values((pending == null ? void 0 : pending.choices) || {}),
765    ...Object.values((pending == null ? void 0 : pending.recipient_choices) || {})
766  ].includes("granted");
767  const postPending = async (options = {}) => {
768    if (inFlight) return inFlight;
769    if (!policy || !record.pending) return snapshot();
770    const pending = record.pending;
771    if (!pendingMatchesPolicy(pending))
772      throw new Error("privacy_policy_changed");
773    const acceptedPolicy = {
774      revision: policy.revision,
775      notice_version: policy.notice_version,
776      recipients: pending.choices.marketing === null ? (record.recipients || []).slice() : pending.recipients.slice(),
777      valid_grants: Object.fromEntries(
778        groups.map((group) => [group, choice(group) === "granted"])
779      )
780    };
781    if (!Number.isFinite(Date.parse(pending.chosen_at)) || Date.now() - Date.parse(pending.chosen_at) > 8 * 864e5)
782      throw new Error("privacy_choice_expired");
783    const activeKey = key;
784    const request = {
785      token: policy.policy_token,
786      operation_id: pending.operation_id,
787      subject_id: record.subject_id,
788      chosen_at: pending.chosen_at,
789      receipt: pending.receipt || null,
790      choices: pending.choices,
791      ...pending.recipient_choices ? { recipient_choices: pending.recipient_choices } : {}
792    };
793    inFlight = (async () => {
794      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
795      const controller = new w.AbortController();
796      const timeout = w.setTimeout(() => controller.abort(), 1e4);
797      try {
798        const response = await w.fetch(
799          `${endpoint.replace(/\/$/, "").replace(/\/v\d+$/, "")}/v3/public/privacy/choice`,
800          {
801            method: "POST",
802            credentials: "omit",
803            keepalive: true,
804            signal: controller.signal,
805            headers: { "Content-Type": "application/json" },
806            body: JSON.stringify(request)
807          }
808        );
809        const data = await response.json();
810        if (response.status !== 202 || typeof data.receipt !== "string" || !data.receipt || !Number.isFinite(Date.parse(data.expires_at)))
811          throw new Error("privacy_choice_not_recorded");
812        if (key !== activeKey || ((_a = record.pending) == null ? void 0 : _a.operation_id) !== pending.operation_id)
813          return snapshot();
814        if (refreshing && hasNewGrant(pending)) return snapshot();
815        const grantedAt = { ...record.granted_at };
816        const deniedAt = { ...record.denied_at };
817        const choiceExpiresAt = { ...record.choice_expires_at };
818        const invalidatedGrants = { ...record.invalidated_grants };
819        const nextChoices = {};
820        for (const group of groups) {
821          const returned = validChoice((_b = data.choices) == null ? void 0 : _b[group]);
822          if (pending.choices[group] !== null && returned !== pending.choices[group])
823            throw new Error("privacy_choice_mismatch");
824          nextChoices[group] = returned;
825          if (returned === "denied")
826            deniedAt[group] = ((_d = (_c = data.choice_details) == null ? void 0 : _c[group]) == null ? void 0 : _d.decided_at) || (pending.choices[group] === "denied" ? Date.parse(pending.chosen_at) : deniedAt[group]);
827          if (returned === "granted") {
828            const details = (_e = data.choice_details) == null ? void 0 : _e[group];
829            grantedAt[group] = pending.granted_at[group] || grantedAt[group];
830            if ((details == null ? void 0 : details.state) === returned && Number.isFinite(details.decided_at) && Number.isFinite(details.expires_at)) {
831              grantedAt[group] = details.decided_at;
832              choiceExpiresAt[group] = details.expires_at * 1e3;
833            }
834            invalidatedGrants[group] = pending.choices[group] === null && !acceptedPolicy.valid_grants[group];
835          } else {
836            delete grantedAt[group];
837            delete choiceExpiresAt[group];
838            delete invalidatedGrants[group];
839          }
840        }
841        const recipientDetails = { ...record.recipient_details };
842        for (const id of /* @__PURE__ */ new Set([
843          ...Object.keys(pending.recipient_choices || {}),
844          ...Object.keys(data.recipient_details || {})
845        ])) {
846          const selected = (_g = (_f = pending.recipient_choices) == null ? void 0 : _f[id]) != null ? _g : null;
847          const detail = (_h = data.recipient_details) == null ? void 0 : _h[id];
848          const returned = validChoice(
849            (_j = (_i = data.recipient_choices) == null ? void 0 : _i[id]) != null ? _j : detail == null ? void 0 : detail.state
850          );
851          if (selected !== null && returned !== selected)
852            throw new Error("privacy_recipient_mismatch");
853          if (returned === "granted" && (!Number.isFinite(detail == null ? void 0 : detail.decided_at) || !Number.isFinite(detail == null ? void 0 : detail.expires_at)))
854            throw new Error("privacy_recipient_expiry_missing");
855          if (detail && (((_k = recipientDetails[id]) == null ? void 0 : _k.state) === returned || ((_l = pending.recipient_choices) == null ? void 0 : _l[id]) === returned))
856            recipientDetails[id] = {
857              state: returned,
858              decided_at: detail.decided_at,
859              expires_at: detail.expires_at
860            };
861        }
862        record = {
863          ...record,
864          recipient_details: recipientDetails,
865          acknowledged_recipients: { ...recipientDetails },
866          marketing_selection: Boolean(pending.recipient_choices) || record.marketing_selection,
867          choices: { ...record.choices },
868          acknowledged_choices: { ...nextChoices },
869          granted_at: grantedAt,
870          denied_at: deniedAt,
871          choice_expires_at: choiceExpiresAt,
872          invalidated_grants: invalidatedGrants,
873          receipt: data.receipt,
874          revision: acceptedPolicy.revision,
875          notice_version: acceptedPolicy.notice_version,
876          recipients: data.recipient_details ? Object.keys(data.recipient_details) : acceptedPolicy.recipients,
877          expires_at: Date.parse(data.expires_at),
878          pending: null
879        };
880        persist();
881        choiceFailed = false;
882        notify();
883        return snapshot();
884      } finally {
885        w.clearTimeout(timeout);
886        inFlight = null;
887        if (record.pending && record.pending.operation_id !== pending.operation_id)
888          postPending({ }).catch(() => {
889            choiceFailed = true;
890          });
891      }
892    })();
893    return inFlight;
894  };
895  const save = (choices, options = {}) => {
896    var _a, _b, _c, _d;
897    if (!policy) return Promise.reject(new Error("privacy_policy_unavailable"));
898    const next = {
899      analytics: validChoice(choices == null ? void 0 : choices.analytics),
900      marketing: validChoice(choices == null ? void 0 : choices.marketing)
901    };
902    const recipientChoices = (choices == null ? void 0 : choices.recipient_choices) && typeof choices.recipient_choices === "object" ? Object.fromEntries(
903      policy.recipients.filter(
904        (id) => Object.prototype.hasOwnProperty.call(
905          choices.recipient_choices,
906          id
907        )
908      ).map((id) => {
909        const selected = validChoice(choices.recipient_choices[id]);
910        return [
911          id,
912          selected === "granted" && allowed("marketing", id) ? null : selected
913        ];
914      })
915    ) : null;
916    const sameRecipients = (pending) => JSON.stringify(pending.recipient_choices || null) === JSON.stringify(recipientChoices);
917    const recipientsUnchanged = !recipientChoices || Object.entries(recipientChoices).every(
918      ([id, selected]) => {
919        var _a2, _b2, _c2, _d2;
920        return selected === null || selected === "denied" && ((_b2 = (_a2 = record.recipient_details) == null ? void 0 : _a2[id]) == null ? void 0 : _b2.state) === "denied" && ((_d2 = (_c2 = record.acknowledged_recipients) == null ? void 0 : _c2[id]) == null ? void 0 : _d2.state) === "denied" && record.receipt && !record.pending;
921      }
922    );
923    for (const group of groups) {
924      if (next[group] === "granted" && choice(group) === "granted" && (group !== "marketing" || recipientChoices || policy.recipients.every((id) => recipientChoice(id) === "granted")))
925        next[group] = null;
926      if (next[group] === null && ((_b = (_a = record.pending) == null ? void 0 : _a.choices) == null ? void 0 : _b[group]) === "denied")
927        next[group] = "denied";
928    }
929    if (record.pending && pendingMatchesPolicy(record.pending) && Date.now() - Date.parse(record.pending.chosen_at) <= 8 * 864e5 && sameRecipients(record.pending) && groups.every((group) => record.pending.choices[group] === next[group]))
930      return postPending(options).catch(() => snapshot());
931    if (!record.pending && recipientsUnchanged && groups.every(
932      (group) => {
933        var _a2;
934        return next[group] === null || next[group] === "denied" && choice(group) === "denied" && ((_a2 = record.acknowledged_choices) == null ? void 0 : _a2[group]) === "denied" && record.receipt;
935      }
936    )) {
937      close();
938      return Promise.resolve(snapshot());
939    }
940    const previous = snapshot();
941    const now = Date.now();
942    const grantedAt = {};
943    for (const group of groups) {
944      if (next[group] === "granted") grantedAt[group] = now;
945    }
946    record = {
947      ...record,
948      version: 1,
949      local_updated_at: now,
950      subject_id: record.subject_id || uuid(),
951      choices: { ...record.choices },
952      pending: {
953        operation_id: uuid(),
954        revision: policy.revision,
955        notice_version: policy.notice_version,
956        recipients: policy.recipients.slice(),
957        chosen_at: new Date(now).toISOString(),
958        receipt: record.receipt || null,
959        choices: next,
960        ...recipientChoices ? { recipient_choices: recipientChoices } : {},
961        granted_at: grantedAt
962      }
963    };
964    if (next.marketing !== null && !recipientChoices) {
965      record.recipient_details = {};
966      record.marketing_selection = false;
967    } else if (recipientChoices) {
968      if (!record.marketing_selection && choice("marketing") === "granted") {
969        record.recipient_details = { ...record.recipient_details };
970        for (const id of policy.recipients)
971          (_d = record.recipient_details)[id] || (_d[id] = {
972            state: "granted",
973            decided_at: ((_c = record.granted_at) == null ? void 0 : _c.marketing) || now
974          });
975      }
976      record.marketing_selection = true;
977    }
978    groups.forEach((group) => {
979      if (next[group] !== null) {
980        record.choices[group] = next[group];
981        if (next[group] === "denied")
982          record.denied_at = { ...record.denied_at, [group]: now };
983        else record.granted_at = { ...record.granted_at, [group]: now };
984      }
985    });
986    for (const [id, selected] of Object.entries(recipientChoices || {})) {
987      if (selected !== null)
988        record.recipient_details = {
989          ...record.recipient_details,
990          [id]: {
991            state: selected,
992            ...selected === "granted" ? { decided_at: now } : {}
993          }
994        };
995    }
996    persist();
997    notify();
998    if (options.reload !== false && (lostRecipient(previous.recipients) || hasNewGrant(record.pending) || groups.some((group) => next[group] !== null))) {
999      postPending({ }).catch(() => {
1000        choiceFailed = true;
1001        updateDialogState == null ? void 0 : updateDialogState();
1002      });
1003      reload();
1004      return Promise.resolve(snapshot());
1005    }
1006    return postPending(options).catch(() => {
1007      choiceFailed = true;
1008      return snapshot();
1009    });
1010  };
1011  const open = (layer = "preferences") => {
1012    var _a, _b, _c, _d, _e, _f;
1013    if (!hasConsentUi() || !d.body) return;
1014    if (dialog) {
1015      if (layer === "preferences" && !dialog.querySelector("[data-save]")) {
1016        restoreDialogBackground == null ? void 0 : restoreDialogBackground();
1017        restoreDialogBackground = null;
1018        removeDialogLayoutListener == null ? void 0 : removeDialogLayoutListener();
1019        removeDialogLayoutListener = null;
1020        dialog.remove();
1021        dialog = null;
1022      } else return;
1023    }
1024    if (!(opener == null ? void 0 : opener.isConnected) || !((_b = (_a = d.activeElement) == null ? void 0 : _a.closest) == null ? void 0 : _b.call(_a, "#sclv-privacy-dialog")))
1025      opener = d.activeElement;
1026    const draft = {
1027      analytics: ((_c = record.pending) == null ? void 0 : _c.choices.analytics) ? record.pending.choices.analytics === "granted" : allowed("analytics"),
1028      marketing: ((_d = record.pending) == null ? void 0 : _d.choices.marketing) ? record.pending.choices.marketing === "granted" : allowed("marketing"),
1029      recipients: recipientPermissions()
1030    };
1031    for (const [id, selected] of Object.entries(
1032      ((_e = record.pending) == null ? void 0 : _e.recipient_choices) || {}
1033    ))
1034      if (selected !== null) draft.recipients[id] = selected === "granted";
1035    if (((_f = record.pending) == null ? void 0 : _f.choices.marketing) !== "denied" && Object.values(draft.recipients).some(Boolean))
1036      draft.marketing = true;
1037    const render = (currentLayer, focusTarget) => {
1038      var _a2, _b2;
1039      restoreDialogBackground == null ? void 0 : restoreDialogBackground();
1040      restoreDialogBackground = null;
1041      removeDialogLayoutListener == null ? void 0 : removeDialogLayoutListener();
1042      removeDialogLayoutListener = null;
1043      if (dialog) dialog.remove();
1044      const preferences = currentLayer === "preferences";
1045      const en = locale === "en";
1046      const copy = en ? {
1047        title: "Your privacy choices",
1048        intro: "We use cookies and similar technologies to remember your preferences, measure visits and show relevant ads. You can accept all, decline non-essential cookies or manage your preferences.",
1049        preferencesIntro: "Choose whether to allow store statistics and advertising. You can change these settings anytime in Privacy settings.",
1050        essential: "Essential",
1051        essentialDetail: "Keep your cart, checkout and payments working.",
1052        alwaysOn: "Always on",
1053        analytics: "Store statistics",
1054        marketing: "Advertising and ad measurement",
1055        analyticsDetail: "Help this store understand visits and orders with Scalev.",
1056        marketingDetail: "Measure ads and let the selected partners personalise advertising.",
1057        partners: "Advertising partners",
1058        save: "Save",
1059        reject: "Decline",
1060        accept: "Accept",
1061        dismiss: "Close privacy dialog",
1062        manage: "Manage preferences",
1063        back: "Back",
1064        error: "Your choice is saved in this browser.",
1065        saving: "Saving your choice\u2026",
1066        savingRefusal: "Tracking is off. Saving your refusal\u2026",
1067        savingPartialRefusal: "Your refusal is active in this browser. Saving\u2026",
1068        refreshingRefusal: "Refreshing to stop tracking\u2026",
1069        refusalError: "Tracking is off. Could not finish saving your refusal. Try again.",
1070        savingButton: "Saving\u2026",
1071        waitingButton: "Applying\u2026",
1072        refreshingButton: "Refreshing\u2026",
1073        waiting: "Applying your choice\u2026",
1074        refreshing: "Refreshing page\u2026",
1075        privacy: "Privacy policy"
1076      } : {
1077        title: "Pilihan privasi Anda",
1078        intro: "Kami menggunakan cookie dan teknologi serupa untuk mengingat pilihan Anda, mengukur kunjungan, dan menampilkan iklan yang relevan. Anda bisa menerima semua, menolak yang tidak wajib, atau mengatur preferensi.",
1079        preferencesIntro: "Atur izin untuk statistik toko dan iklan. Anda bisa mengubahnya kapan saja di Pengaturan privasi.",
1080        essential: "Esensial",
1081        essentialDetail: "Menjaga keranjang, checkout, dan pembayaran tetap berjalan.",
1082        alwaysOn: "Selalu aktif",
1083        analytics: "Statistik toko",
1084        marketing: "Periklanan dan pengukuran iklan",
1085        analyticsDetail: "Membantu toko memahami kunjungan dan pesanan dengan Scalev.",
1086        marketingDetail: "Mengukur iklan dan mengizinkan mitra pilihan mempersonalisasi iklan.",
1087        partners: "Mitra periklanan",
1088        save: "Simpan",
1089        reject: "Tolak",
1090        accept: "Terima",
1091        dismiss: "Tutup dialog privasi",
1092        manage: "Kelola preferensi",
1093        back: "Kembali",
1094        error: "Pilihan Anda tersimpan di browser ini.",
1095        saving: "Menyimpan pilihan\u2026",
1096        savingRefusal: "Pelacakan nonaktif. Menyimpan penolakan\u2026",
1097        savingPartialRefusal: "Penolakan berlaku di browser ini. Menyimpan\u2026",
1098        refreshingRefusal: "Memuat ulang untuk menghentikan pelacakan\u2026",
1099        refusalError: "Pelacakan nonaktif. Penolakan belum selesai disimpan. Coba lagi.",
1100        savingButton: "Menyimpan\u2026",
1101        waitingButton: "Menerapkan\u2026",
1102        refreshingButton: "Memuat ulang\u2026",
1103        waiting: "Menerapkan pilihan\u2026",
1104        refreshing: "Memuat ulang halaman\u2026",
1105        privacy: "Kebijakan privasi"
1106      };
1107      dialog = d.createElement("div");
1108      dialog.id = "sclv-privacy-dialog";
1109      dialog.lang = locale;
1110      dialog.setAttribute("role", "dialog");
1111      dialog.setAttribute("data-layer", currentLayer);
1112      dialog.setAttribute("aria-modal", String(preferences));
1113      dialog.setAttribute("aria-labelledby", "sclv-privacy-title");
1114      dialog.setAttribute("aria-describedby", "sclv-privacy-intro");
1115      dialog.innerHTML = '<div class="sclv-privacy-panel"><div class="sclv-privacy-header"><div class="sclv-privacy-heading"><span class="sclv-privacy-symbol" aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false"><path d="M12 3 4.5 6v5.5c0 4.5 3 7.7 7.5 9.5 4.5-1.8 7.5-5 7.5-9.5V6L12 3Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/><path d="m8.5 11.5 2.5 2.5 4.5-5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg></span><h2 id="sclv-privacy-title"></h2></div></div><div class="sclv-privacy-content" data-content><p id="sclv-privacy-intro" data-intro></p><div data-groups></div><div data-partners></div>' + (preferences ? '<a href="https://scalev.com/privacy" target="_blank" rel="noopener noreferrer" data-policy><span data-policy-label></span><svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true" focusable="false">
1115<path fill-rule="evenodd" clip-rule="evenodd" d="M8.16667 2.91667C7.8445 2.91667 7.58333 2.6555 7.58333 2.33333C7.58333 2.01117 7.8445 1.75 8.16667 1.75L11.6667 1.75C11.9888 1.75 12.25 2.01117 12.25 2.33333V5.83333C12.25 6.1555 11.9888 6.41667 11.6667 6.41667C11.3445 6.41667 11.0833 6.1555 11.0833 5.83333V3.74162L6.24581 8.57915C6.01801 8.80695 5.64866 8.80695 5.42085 8.57915C5.19305 8.35134 5.19305 7.98199 5.42085 7.75419L10.2584 2.91667H8.16667ZM1.75 4.66667C1.75 3.70017 2.5335 2.91667 3.5 2.91667L5.83333 2.91667C6.1555 2.91667 6.41667 3.17783 6.41667 3.5C6.41667 3.82217 6.1555 4.08333 5.83333 4.08333H3.5C3.17783 4.08333 2.91667 4.3445 2.91667 4.66667L2.91667 10.5C2.91667 10.8222 3.17783 11.0833 3.5 11.0833L9.33333 11.0833C9.65552 11.0833 9.91667 10.8222 9.91667 10.5L9.91667 8.16667C9.91667 7.8445 10.1778 7.58333 10.5 7.58333C10.8222 7.58333 11.0833 7.8445 11.0833 8.16667L11.0833 10.5C11.0833 11.4665 10.2998 12.25 9.33333 12.25L3.5 12.25C2.53351 12.25 1.75 11.4665 1.75 10.5L1.75 4.66667Z" fill="currentColor"/></svg></a>' : "") + '</div><div class="sclv-privacy-decision"><p data-status role="status" aria-live="polite" aria-atomic="true" hidden><span data-spinner aria-hidden="true" hidden></span><span data-status-text></span></p><div class="sclv-privacy-actions"></div></div></div>';
1116      dialog.querySelector("h2").textContent = copy.title;
1117      dialog.querySelector("[data-intro]").textContent = preferences ? copy.preferencesIntro : copy.intro;
1118      if (preferences)
1119        dialog.querySelector("[data-policy-label]").textContent = copy.privacy;
1120      const fields = {};
1121      const partnerFields = [];
1122      const header = dialog.querySelector(".sclv-privacy-header");
1123      const decision = dialog.querySelector(".sclv-privacy-decision");
1124      const actions = dialog.querySelector(".sclv-privacy-actions");
1125      let submittedAction = "";
1126      let submittedWidth = 0;
1127      const button = (name, fn, target = decision) => {
1128        const element = d.createElement("button");
1129        element.type = "button";
1130        element.setAttribute(`data-${name}`, "");
1131        element.textContent = copy[name];
1132        element.onclick = fn;
1133        target.append(element);
1134        return element;
1135      };
1136      const dismiss = button("dismiss", close, header);
1137      dismiss.className = "sclv-privacy-dismiss";
1138      dismiss.setAttribute("aria-label", copy.dismiss);
1139      dismiss.innerHTML = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.75729 6.75736C7.22593 6.28872 7.98572 6.28873 8.45435 6.75736L11.9999 10.3029L15.5455 6.75736C16.0142 6.28872 16.7739 6.28873 17.2426 6.75736C17.7112 7.226 17.7112 7.98577 17.2426 8.45442L13.697 12L17.2426 15.5456C17.7112 16.0142 17.7112 16.774 17.2426 17.2426C16.7739 17.7113 16.0142 17.7113 15.5455 17.2426L11.9999 13.6971L8.45435 17.2426C7.98572 17.7113 7.22593 17.7113 6.75729 17.2426C6.28866 16.774 6.28866 16.0142 6.75729 15.5456L10.3029 12L6.75729 8.45442C6.28866 7.98579 6.28866 7.22599 6.75729 6.75736Z" fill="currentColor"/></svg>';
1140      const groupLabel = (name, title, description, checked, target) => {
1141        const label = d.createElement("label");
1142        const input = d.createElement("input");
1143        input.type = "checkbox";
1144        if (groups.includes(name)) input.setAttribute("role", "switch");
1145        input.checked = checked;
1146        input.setAttribute("data-choice", name);
1147        const text = d.createElement("span");
1148        text.id = `sclv-privacy-${name}-label`;
1149        text.textContent = title;
1150        input.setAttribute("aria-labelledby", text.id);
1151        label.append(input, text);
1152        if (description) {
1153          const detail = d.createElement("small");
1154          detail.id = `sclv-privacy-${name}-description`;
1155          detail.textContent = description;
1156          input.setAttribute("aria-describedby", detail.id);
1157          label.append(detail);
1158        }
1159        target.append(label);
1160        return { input, label };
1161      };
1162      const submit = (values, action) => {
1163        if (actions.getAttribute("aria-busy") === "true") return;
1164        const submittedKey = key;
1165        submittedAction = action;
1166        submittedWidth = actions.querySelector(`[data-${action}]`).getBoundingClientRect().width;
1167        choiceFailed = false;
1168        const saving = save(values);
1169        updateDialogState == null ? void 0 : updateDialogState();
1170        saving.then(() => {
1171          if (key === submittedKey) updateDialogState == null ? void 0 : updateDialogState();
1172        }).catch(() => {
1173          if (key !== submittedKey) return;
1174          choiceFailed = true;
1175          updateDialogState == null ? void 0 : updateDialogState();
1176        });
1177      };
1178      if (currentLayer === "preferences") {
1179        header.after(dialog.querySelector(".sclv-privacy-heading"));
1180        const back = button("back", () => render("prompt", "manage"), header);
1181        back.className = "sclv-privacy-back";
1182        back.insertAdjacentHTML(
1183          "afterbegin",
1184          '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M10 16L6 12M6 12L10 8M6 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
1185        );
1186        header.prepend(back);
1187        const essential = d.createElement("div");
1188        essential.setAttribute("data-essential", "");
1189        essential.innerHTML = "<div><strong></strong><small></small></div><span></span>";
1190        essential.querySelector("strong").textContent = copy.essential;
1191        essential.querySelector("small").textContent = copy.essentialDetail;
1192        essential.querySelector("span").textContent = copy.alwaysOn;
1193        dialog.querySelector("[data-groups]").append(essential);
1194        groups.forEach((group) => {
1195          fields[group] = groupLabel(
1196            group,
1197            copy[group],
1198            copy[`${group}Detail`],
1199            draft[group],
1200            dialog.querySelector("[data-groups]")
1201          ).input;
1202          fields[group].onchange = () => {
1203            draft[group] = fields[group].checked;
1204            if (group === "marketing") {
1205              for (const item of partnerFields) {
1206                item.input.checked = draft.marketing;
1207                item.ids.forEach((id) => {
1208                  draft.recipients[id] = draft.marketing;
1209                });
1210              }
1211            }
1212          };
1213        });
1214        const canonical = {
1215          meta: ["Meta", "https://www.facebook.com/privacy/policy/"],
1216          meta_audience: ["Meta", "https://www.facebook.com/privacy/policy/"],
1217          tiktok: [
1218            "TikTok",
1219            "https://www.tiktok.com/legal/page/row/privacy-policy/en"
1220          ],
1221          kwai: ["Kwai", "https://www.kwai.com/legal"],
1222          gtm: ["Google Tag Manager", "https://policies.google.com/privacy"]
1223        };
1224        const shown = /* @__PURE__ */ new Set();
1225        const partnerGroups = [];
1226        for (const item of policy.recipient_groups || []) {
1227          if (!item || typeof item.name !== "string" || !Array.isArray(item.recipient_ids))
1228            continue;
1229          const ids = item.recipient_ids.filter(
1230            (id) => policy.recipients.includes(id) && !shown.has(id)
1231          );
1232          if (!ids.length) continue;
1233          ids.forEach((id) => shown.add(id));
1234          partnerGroups.push({
1235            name: item.name.slice(0, 100),
1236            url: item.privacy_url,
1237            ids
1238          });
1239        }
1240        for (const [prefix, [name, url]] of Object.entries(canonical)) {
1241          const ids = policy.recipients.filter(
1242            (id) => id.startsWith(`${prefix}:`) && !shown.has(id)
1243          );
1244          if (!ids.length) continue;
1245          const existing = partnerGroups.find(
1246            (item) => item.name === name && item.url === url
1247          );
1248          if (existing) existing.ids.push(...ids);
1249          else partnerGroups.push({ name, url, ids });
1250        }
1251        if (partnerGroups.length) {
1252          const details = d.createElement("details");
1253          const summary = d.createElement("summary");
1254          summary.textContent = copy.partners;
1255          const count = d.createElement("span");
1256          count.className = "sclv-privacy-partner-count";
1257          count.textContent = String(partnerGroups.length);
1258          count.setAttribute("aria-hidden", "true");
1259          summary.append(count);
1260          details.append(summary);
1261          dialog.querySelector("[data-partners]").append(details);
1262          partnerGroups.forEach((item, index) => {
1263            const { input, label } = groupLabel(
1264              `partner-${index}`,
1265              item.name,
1266              "",
1267              item.ids.every((id) => draft.recipients[id]),
1268              details
1269            );
1270            input.indeterminate = !input.checked && item.ids.some((id) => draft.recipients[id]);
1271            input.onchange = () => {
1272              input.indeterminate = false;
1273              item.ids.forEach((id) => {
1274                draft.recipients[id] = input.checked;
1275              });
1276              draft.marketing = Object.values(draft.recipients).some(Boolean);
1277              fields.marketing.checked = draft.marketing;
1278            };
1279            partnerFields.push({ input, ids: item.ids });
1280            try {
1281              const url = new URL(item.url);
1282              if (url.protocol === "https:") {
1283                const link = d.createElement("a");
1284                link.href = url.href;
1285                link.target = "_blank";
1286                link.rel = "noopener noreferrer";
1287                link.textContent = `${item.name}: ${copy.privacy}`;
1288                label.after(link);
1289              }
1290            } catch {
1291            }
1292          });
1293        }
1294        button(
1295          "save",
1296          () => submit(
1297            {
1298              analytics: draft.analytics ? "granted" : "denied",
1299              marketing: draft.marketing ? "granted" : "denied",
1300              recipient_choices: Object.fromEntries(
1301                policy.recipients.map((id) => [
1302                  id,
1303                  draft.marketing && draft.recipients[id] ? "granted" : "denied"
1304                ])
1305              )
1306            },
1307            "save"
1308          ),
1309          actions
1310        );
1311      } else {
1312        button("manage", () => render("preferences"));
1313        for (const action of ["reject", "accept"]) {
1314          button(
1315            action,
1316            () => {
1317              const state = action === "accept" ? "granted" : "denied";
1318              submit(
1319                {
1320                  analytics: state,
1321                  marketing: state
1322                },
1323                action
1324              );
1325            },
1326            actions
1327          );
1328        }
1329      }
1330      if (!preferences) {
1331        const mobile = (_a2 = w.matchMedia) == null ? void 0 : _a2.call(w, "(max-width: 540px)");
1332        const orderActions = () => {
1333          const first = actions.querySelector(
1334            (mobile == null ? void 0 : mobile.matches) ? "[data-accept]" : "[data-reject]"
1335          );
1336          if (actions.firstElementChild === first) return;
1337          const focused = d.activeElement;
1338          actions.prepend(first);
1339          if (actions.contains(focused)) focused.focus();
1340        };
1341        orderActions();
1342        (_b2 = mobile == null ? void 0 : mobile.addEventListener) == null ? void 0 : _b2.call(mobile, "change", orderActions);
1343        removeDialogLayoutListener = () => {
1344          var _a3;
1345          return (_a3 = mobile == null ? void 0 : mobile.removeEventListener) == null ? void 0 : _a3.call(mobile, "change", orderActions);
1346        };
1347      }
1348      dialog.addEventListener("focusin", (event) => {
1349        var _a3;
1350        if (!preferences && ((_a3 = event.relatedTarget) == null ? void 0 : _a3.isConnected) && !dialog.contains(event.relatedTarget))
1351          opener = event.relatedTarget;
1352      });
1353      dialog.onkeydown = (event) => {
1354        if (event.key === "Escape") {
1355          event.preventDefault();
1356          close();
1357          return;
1358        }
1359        if (event.key !== "Tab" || !preferences) return;
1360        const focusable = Array.from(
1361          dialog.querySelectorAll(
1362            "button:not(:disabled), input:not(:disabled), a[href], summary"
1363          )
1364        ).filter(
1365          (item) => !item.closest("details:not([open])") || item.tagName === "SUMMARY"
1366        );
1367        const first = focusable[0], last = focusable[focusable.length - 1];
1368        if (event.shiftKey && d.activeElement === first) {
1369          event.preventDefault();
1370          last.focus();
1371        } else if (!event.shiftKey && d.activeElement === last) {
1372          event.preventDefault();
1373          first.focus();
1374        }
1375      };
1376      const activeDialog = dialog;
1377      updateDialogState = () => {
1378        const busy = refreshing;
1379        const refusingAll = groups.every(
1380          (group) => {
1381            var _a3, _b3;
1382            return ((_b3 = ((_a3 = record.pending) == null ? void 0 : _a3.choices) || record.choices) == null ? void 0 : _b3[group]) === "denied";
1383          }
1384        );
1385        actions.setAttribute("aria-busy", String(busy));
1386        for (const action of ["accept", "reject", "save"]) {
1387          const actionButton = actions.querySelector(`[data-${action}]`);
1388          if (!actionButton) continue;
1389          const submitting = busy && action === submittedAction;
1390          actionButton.classList.toggle("sclv-privacy-submitting", submitting);
1391          actionButton.textContent = submitting ? copy.refreshingButton : copy[action];
1392          if (submitting && submittedWidth > 0)
1393            actionButton.style.minWidth = `${submittedWidth}px`;
1394          else actionButton.style.removeProperty("min-width");
1395        }
1396        const status = activeDialog.querySelector("[data-status]");
1397        status.hidden = !busy && !choiceFailed;
1398        activeDialog.querySelector("[data-spinner]").hidden = !busy;
1399        activeDialog.querySelector("[data-status-text]").textContent = choiceFailed ? copy.error : refreshing ? refusingAll ? copy.refreshingRefusal : copy.refreshing : "";
1400        activeDialog.querySelectorAll("button:not([data-dismiss]), input").forEach((item) => {
1401          item.disabled = busy;
1402        });
1403      };
1404      updateDialogState();
1405      d.body.append(dialog);
1406      if (preferences) {
1407        const background = /* @__PURE__ */ new Map();
1408        const overflow = d.body.style.getPropertyValue("overflow");
1409        const priority = d.body.style.getPropertyPriority("overflow");
1410        const isolate = () => {
1411          for (const element of d.body.children) {
1412            if (element === activeDialog || background.has(element)) continue;
1413            background.set(element, element.getAttribute("inert"));
1414            element.setAttribute("inert", "");
1415          }
1416        };
1417        isolate();
1418        const observer = w.MutationObserver ? new w.MutationObserver(isolate) : null;
1419        observer == null ? void 0 : observer.observe(d.body, { childList: true });
1420        d.body.style.setProperty("overflow", "hidden");
1421        restoreDialogBackground = () => {
1422          observer == null ? void 0 : observer.disconnect();
1423          for (const [element, inert] of background) {
1424            if (inert === null) element.removeAttribute("inert");
1425            else element.setAttribute("inert", inert);
1426          }
1427          if (overflow) d.body.style.setProperty("overflow", overflow, priority);
1428          else d.body.style.removeProperty("overflow");
1429        };
1430      }
1431      const focus = focusTarget ? dialog.querySelector(`[data-${focusTarget}]`) : preferences ? dialog.querySelector("[data-back]") : null;
1432      if (focus) (focus.disabled ? dismiss : focus).focus();
1433    };
1434    render(layer === "prompt" ? "prompt" : "preferences");
1435  };
1436  const mount = () => {
1437    var _a, _b;
1438    if (!d.body) return;
1439    if (!hasConsentUi()) {
1440      close();
1441      (_a = d.getElementById("sclv-privacy-settings")) == null ? void 0 : _a.remove();
1442      return;
1443    }
1444    updateDialogState == null ? void 0 : updateDialogState();
1445    if (!d.getElementById("sclv-privacy-style")) {
1446      const style = d.createElement("style");
1447      style.id = "sclv-privacy-style";
1448      style.textContent = `
1449#sclv-privacy-settings,
1450#sclv-privacy-dialog {
1451  /* Match Scalev's Tailwind rounded and primary tokens. */
1452  --sclv-privacy-radius: 0.25rem;
1453  --sclv-privacy-accent: #0899cf;
1454  --sclv-privacy-accent-hover: #0783b2;
1455  color-scheme: light;
1456  color: #223548;
1457  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
1458  letter-spacing: normal;
1459  text-align: left;
1460}
1461#sclv-privacy-settings,
1462#sclv-privacy-dialog,
1463#sclv-privacy-dialog * { box-sizing: border-box; }
1464body:has(> #sclv-privacy-dialog) > #sclv-privacy-settings { visibility: hidden; }
1465#sclv-privacy-settings {
1466  position: fixed;
1467  left: 16px;
1468  bottom: max(16px, env(safe-area-inset-bottom));
1469  z-index: 2147483646;
1470  min-height: 44px;
1471  padding: 10px 16px;
1472  border: 1px solid #c4cad3;
1473  border-radius: var(--sclv-privacy-radius);
1474  background: #fff;
1475  box-shadow: 0 2px 12px #16243514;
1476  cursor: pointer;
1477}
1478#sclv-privacy-dialog {
1479  position: fixed;
1480  bottom: max(24px, env(safe-area-inset-bottom));
1481  left: 24px;
1482  z-index: 2147483647;
1483  width: 480px;
1484  max-width: calc(100% - 48px);
1485  max-height: calc(100vh - 48px);
1486  max-height: calc(100dvh - 48px);
1487}
1488#sclv-privacy-dialog .sclv-privacy-panel {
1489  display: flex;
1490  flex-direction: column;
1491  width: 100%;
1492  max-height: inherit;
1493  overflow: hidden;
1494  overflow-wrap: anywhere;
1495  border: 1px solid #dbdfe5;
1496  border-radius: var(--sclv-privacy-radius);
1497  background: #fff;
1498  box-shadow: 0 16px 56px #16243526, 0 2px 8px #1624350a;
1499}
1500#sclv-privacy-dialog .sclv-privacy-header {
1501  display: flex;
1502  flex: 0 0 auto;
1503  align-items: center;
1504  justify-content: space-between;
1505  gap: 12px;
1506  padding: 20px 20px 0 24px;
1507}
1508#sclv-privacy-dialog .sclv-privacy-heading {
1509  display: flex;
1510  align-items: center;
1511  gap: 12px;
1512  min-width: 0;
1513}
1514#sclv-privacy-dialog .sclv-privacy-symbol {
1515  display: flex;
1516  flex: 0 0 40px;
1517  align-items: center;
1518  justify-content: center;
1519  width: 40px;
1520  height: 40px;
1521  border-radius: var(--sclv-privacy-radius);
1522  background: #e8f6fb;
1523  color: var(--sclv-privacy-accent);
1524}
1525#sclv-privacy-dialog h2 {
1526  margin: 0;
1527  color: #162435;
1528  font: 700 20px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
1529  letter-spacing: -.35px;
1530}
1531#sclv-privacy-dialog .sclv-privacy-content {
1532  min-height: 0;
1533  overflow-y: auto;
1534  overscroll-behavior: contain;
1535  padding: 12px 24px 0;
1536  scrollbar-width: thin;
1537}
1538#sclv-privacy-dialog p { margin: 0; }
1539#sclv-privacy-dialog [data-intro] { color: #5b6675; font-size: 14px; line-height: 1.65; }
1540#sclv-privacy-dialog a { color: var(--sclv-privacy-accent); text-decoration: underline; text-underline-offset: 3px; }
1541#sclv-privacy-dialog [data-policy] { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 4px; font-size: 13px; text-decoration: none; }
1542#sclv-privacy-dialog [data-policy-label] { text-decoration: underline; text-underline-offset: 3px; }
1543#sclv-privacy-dialog [data-policy] svg { flex: 0 0 14px; width: 14px; height: 14px; }
1544#sclv-privacy-dialog button {
1545  min-height: 44px;
1546  margin: 0;
1547  padding: 10px 12px;
1548  border: 1px solid transparent;
1549  border-radius: var(--sclv-privacy-radius);
1550  background: transparent;
1551  color: #223548;
1552  font: inherit;
1553  line-height: 1.4;
1554  text-transform: none;
1555  letter-spacing: normal;
1556  cursor: pointer;
1557  transition: background-color .15s, border-color .15s;
1558}
1559#sclv-privacy-dialog button:hover:not(:disabled) { background: #f6f9fc; }
1560#sclv-privacy-dialog .sclv-privacy-dismiss {
1561  display: inline-flex;
1562  flex: 0 0 44px;
1563  align-items: center;
1564  justify-content: center;
1565  width: 44px;
1566  height: 44px;
1567  padding: 0;
1568  color: #5b6675;
1569}
1570#sclv-privacy-dialog .sclv-privacy-decision { flex: 0 0 auto; padding: 20px 24px; }
1571#sclv-privacy-dialog .sclv-privacy-actions { display: flex; gap: 12px; }
1572#sclv-privacy-dialog [data-accept],
1573#sclv-privacy-dialog [data-reject],
1574#sclv-privacy-dialog [data-save] {
1575  flex: 1 1 0;
1576  min-width: 0;
1577  min-height: 48px;
1578  border-width: 2px;
1579  border-style: solid;
1580  border-color: var(--sclv-privacy-accent);
1581  color: var(--sclv-privacy-accent);
1582  font-size: 15px;
1583  font-weight: 700;
1584}
1585#sclv-privacy-dialog [data-reject]:hover:not(:disabled) { background: #e8f6fb; }
1586#sclv-privacy-dialog [data-accept],
1587#sclv-privacy-dialog [data-save] {
1588  background: var(--sclv-privacy-accent);
1589  color: #fff;
1590}
1591#sclv-privacy-dialog [data-accept]:hover:not(:disabled),
1592#sclv-privacy-dialog [data-save]:hover:not(:disabled) {
1593  border-color: var(--sclv-privacy-accent-hover);
1594  background: var(--sclv-privacy-accent-hover);
1595}
1596#sclv-privacy-dialog [data-manage] { display: block; width: 100%; margin-top: 8px; color: var(--sclv-privacy-accent); font-size: 13px; font-weight: 600; text-align: center; text-decoration: underline; text-underline-offset: 3px; }
1597#sclv-privacy-dialog [data-manage]:hover:not(:disabled) { background: transparent; color: var(--sclv-privacy-accent-hover); }
1598#sclv-privacy-dialog[data-layer="preferences"] {
1599  inset: 0;
1600  display: flex;
1601  align-items: center;
1602  justify-content: center;
1603  width: auto;
1604  max-width: none;
1605  max-height: none;
1606  padding: 24px;
1607  background: #1624353d;
1608  -webkit-backdrop-filter: blur(3px);
1609  backdrop-filter: blur(3px);
1610}
1611#sclv-privacy-dialog[data-layer="preferences"] .sclv-privacy-panel {
1612  max-width: 600px;
1613  max-height: calc(100vh - 48px);
1614  max-height: calc(100dvh - 48px);
1615}
1616#sclv-privacy-dialog[data-layer="preferences"] .sclv-privacy-header { padding: 12px 16px 8px; }
1617#sclv-privacy-dialog[data-layer="preferences"] .sclv-privacy-heading { flex: 0 0 auto; padding: 0 24px; }
1618#sclv-privacy-dialog .sclv-privacy-back { display: inline-flex; align-items: center; gap: 4px; padding: 8px; color: #5b6675; }
1619#sclv-privacy-dialog [data-groups] { display: grid; gap: 10px; }
1620#sclv-privacy-dialog[data-layer="preferences"] [data-groups] { margin-top: 20px; }
1621#sclv-privacy-dialog [data-essential],
1622#sclv-privacy-dialog label {
1623  display: grid;
1624  grid-template-columns: 1fr auto;
1625  align-items: center;
1626  gap: 4px 20px;
1627  margin: 0;
1628  padding: 16px;
1629  border: 1px solid #dbdfe5;
1630  border-radius: var(--sclv-privacy-radius);
1631  background: #fff;
1632}
1633#sclv-privacy-dialog label { font: inherit; cursor: pointer; }
1634#sclv-privacy-dialog label:hover { border-color: #c4cad3; }
1635#sclv-privacy-dialog [data-essential] { background: #f6f9fc; }
1636#sclv-privacy-dialog [data-essential] > div { display: contents; }
1637#sclv-privacy-dialog [data-essential] strong,
1638#sclv-privacy-dialog label > span { grid-column: 1; grid-row: 1; color: #223548; font-size: 14px; font-weight: 650; }
1639#sclv-privacy-dialog small { display: block; grid-column: 1 / -1; grid-row: 2; margin-top: 2px; color: #5b6675; font-size: 13px; font-weight: 400; line-height: 1.55; }
1640#sclv-privacy-dialog [data-essential] > span { grid-column: 2; grid-row: 1; border-radius: var(--sclv-privacy-radius); padding: 4px 8px; background: #e8ebef; color: #5b6675; font-size: 12px; font-weight: 600; white-space: nowrap; }
1641#sclv-privacy-dialog input {
1642  appearance: none;
1643  position: relative;
1644  grid-column: 2;
1645  grid-row: 1;
1646  width: 44px;
1647  height: 26px;
1648  /* Merchant form fields can set minimum sizes, padding and focus shadows. */
1649  min-width: 0;
1650  min-height: 0;
1651  margin: 0;
1652  padding: 0;
1653  border: 2px solid #7e8c99;
1654  border-radius: 9999px;
1655  background: #7e8c99;
1656  box-shadow: none;
1657  cursor: pointer;
1658  transition: background-color .15s, border-color .15s;
1659}
1660#sclv-privacy-dialog input::before {
1661  content: "";
1662  position: absolute;
1663  top: 2px;
1664  left: 2px;
1665  width: 18px;
1666  height: 18px;
1667  border-radius: 50%;
1668  background: #fff;
1669  box-shadow: 0 1px 3px #16243526;
1670  transition: transform .15s;
1671}
1672#sclv-privacy-dialog input:checked { border-color: var(--sclv-privacy-accent); background: var(--sclv-privacy-accent); }
1673#sclv-privacy-dialog input:checked::before { transform: translateX(18px); }
1674#sclv-privacy-dialog details { margin-top: 14px; border: 1px solid #dbdfe5; border-radius: var(--sclv-privacy-radius); }
1675#sclv-privacy-dialog summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 16px; font-weight: 600; list-style: none; cursor: pointer; }
1676#sclv-privacy-dialog summary::-webkit-details-marker { display: none; }
1677#sclv-privacy-dialog summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
1678#sclv-privacy-dialog details[open] summary::after { transform: rotate(225deg); }
1679#sclv-privacy-dialog .sclv-privacy-partner-count { padding: 1px 7px; border-radius: var(--sclv-privacy-radius); background: #e8ebef; color: #5b6675; font-size: 12px; }
1680#sclv-privacy-dialog details label { border: 0; border-radius: 0; padding-bottom: 0; }
1681#sclv-privacy-dialog details input { appearance: auto; width: 20px; height: 20px; border-radius: var(--sclv-privacy-radius); accent-color: var(--sclv-privacy-accent); }
1682#sclv-privacy-dialog details input::before { content: none; }
1683#sclv-privacy-dialog details a { display: block; width: fit-content; min-height: 36px; margin: 0 16px; padding: 4px 0 12px; font-size: 12px; }
1684#sclv-privacy-dialog details p { margin: 4px 16px 16px; color: #5b6675; font-size: 12px; }
1685#sclv-privacy-dialog [data-status] { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 12px; border: 1px solid #dbdfe5; border-radius: var(--sclv-privacy-radius); background: #e8f6fb; color: #223548; font-size: 13px; }
1686#sclv-privacy-dialog [data-spinner] { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid #c4cad3; border-top-color: var(--sclv-privacy-accent); border-radius: 50%; animation: sclv-privacy-spin .8s linear infinite; }
1687#sclv-privacy-dialog [data-status][hidden],
1688#sclv-privacy-dialog [data-spinner][hidden] { display: none; }
1689#sclv-privacy-dialog .sclv-privacy-submitting { white-space: nowrap; }
1690#sclv-privacy-dialog button:disabled,
1691#sclv-privacy-dialog input:disabled { cursor: wait; opacity: .6; }
1692#sclv-privacy-dialog :focus-visible,
1693#sclv-privacy-settings:focus-visible { outline: 3px solid var(--sclv-privacy-accent); outline-offset: 3px; }
1694@keyframes sclv-privacy-spin { to { transform: rotate(360deg); } }
1695@media (max-width: 540px) {
1696  #sclv-privacy-dialog { left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
1697  #sclv-privacy-dialog .sclv-privacy-header { gap: 4px; padding: 16px 12px 0 20px; }
1698  #sclv-privacy-dialog .sclv-privacy-heading { gap: 10px; }
1699  #sclv-privacy-dialog .sclv-privacy-symbol { flex-basis: 32px; width: 32px; height: 36px; background: transparent; }
1700  #sclv-privacy-dialog h2 { font-size: 19px; }
1701  #sclv-privacy-dialog .sclv-privacy-content { padding: 12px 20px 0; }
1702  #sclv-privacy-dialog .sclv-privacy-decision { padding: 16px 20px; }
1703  #sclv-privacy-dialog .sclv-privacy-actions { flex-direction: column; }
1704  #sclv-privacy-dialog [data-accept], #sclv-privacy-dialog [data-reject], #sclv-privacy-dialog [data-save] { padding-inline: 6px; font-size: 14px; }
1705  #sclv-privacy-dialog[data-layer="preferences"] { padding: 12px; }
1706  #sclv-privacy-dialog[data-layer="preferences"] .sclv-privacy-panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
1707  #sclv-privacy-dialog[data-layer="preferences"] .sclv-privacy-heading { padding: 0 20px; }
1708  #sclv-privacy-dialog [data-essential], #sclv-privacy-dialog label { gap: 4px 12px; padding: 14px; }
1709}
1710@media (prefers-reduced-motion: reduce) {
1711  #sclv-privacy-dialog *, #sclv-privacy-dialog *::before { animation: none !important; transition: none !important; }
1712}
1713@media (forced-colors: active) {
1714  #sclv-privacy-dialog input { appearance: auto; }
1715  #sclv-privacy-dialog input::before { content: none; }
1716  #sclv-privacy-dialog button, #sclv-privacy-settings { border-color: ButtonText; }
1717}
1718      `;
1719      d.head.append(style);
1720    }
1721    if (!d.getElementById("sclv-privacy-settings")) {
1722      const button = d.createElement("button");
1723      button.id = "sclv-privacy-settings";
1724      button.type = "button";
1725      button.onclick = () => open("preferences");
1726      d.body.append(button);
1727    }
1728    d.getElementById("sclv-privacy-settings").textContent = String(
1729      locale
1730    ).startsWith("en") ? "Privacy settings" : "Pengaturan privasi";
1731    if (!record.pending && ((_b = record.choices) == null ? void 0 : _b.marketing) === "granted" && policy.recipients.some((id) => recipientChoice(id) === null) || groups.some(
1732      (group) => {
1733        var _a2;
1734        return (required(group) || ((_a2 = record.choices) == null ? void 0 : _a2[group]) === "granted") && choice(group) === null;
1735      }
1736    ) && !record.pending)
1737      open("prompt");
1738  };
1739  const setContext = (value, nextEndpoint) => {
1740    const valid = value && /^[1-9]\d*$/.test(String(value.business_id)) && Array.isArray(value.analytics_consent_countries) && value.analytics_consent_countries.every(
1741      (code) => countries.includes(code)
1742    ) && Array.isArray(value.marketing_consent_countries) && value.marketing_consent_countries.every(
1743      (code) => countries.includes(code)
1744    ) && Array.isArray(value.recipients) && value.recipients.every(
1745      (recipient) => typeof recipient === "string" && recipientId(recipient)
1746    );
1747    const nextKey = valid ? `sclv_privacy:${value.business_id}` : "";
1748    const previousPolicy = policy;
1749    const previousPermissions = snapshot().allowed;
1750    if (nextKey !== key || previousPolicy && (previousPolicy.revision !== (value == null ? void 0 : value.revision) || previousPolicy.notice_version !== (value == null ? void 0 : value.notice_version) || JSON.stringify(previousPolicy.recipients) !== JSON.stringify(value == null ? void 0 : value.recipients)))
1751      close();
1752    if (nextKey !== key) choiceFailed = false;
1753    policy = valid ? {
1754      ...value,
1755      recipients: [...new Set(value.recipients)].sort()
1756    } : null;
1757    key = nextKey;
1758    endpoint = nextEndpoint || endpoint;
1759    record = readRecord();
1760    const shouldReload = previousPolicy && (previousPolicy.business_id !== (policy == null ? void 0 : policy.business_id) || groups.some((group) => previousPermissions[group] && !allowed(group)) || previousPermissions.marketing && JSON.stringify(previousPolicy.recipients) !== JSON.stringify(policy == null ? void 0 : policy.recipients));
1761    if (shouldReload) reloading = true;
1762    notify();
1763    mount();
1764    if (shouldReload) reload();
1765  };
1766  const runtime = {
1767    get: snapshot,
1768    registerCheckout,
1769    allowed,
1770    allowedProvider,
1771    allowedGtm,
1772    loadRecipient,
1773    loadGtm,
1774    context,
1775    captureVisit,
1776    visitContext,
1777    serverTrackingAllowed: serverTrackingAllowed2,
1778    save,
1779    retry: postPending,
1780    openPreferences: open,
1781    closePreferences: close,
1782    setContext,
1783    onChange: (fn) => {
1784      subscribers.push(fn);
1785      return () => {
1786        const i = subscribers.indexOf(fn);
1787        if (i >= 0) subscribers.splice(i, 1);
1788      };
1789    },
1790    run: (group, fn) => {
1791      if (allowed(group)) return fn();
1792    }
1793  };
1794  w.__sclv_privacy__ = runtime;
1795  w.ScalevPrivacy = Object.freeze(runtime);
1796  setContext(initialPolicy, apiBase);
1797  d.addEventListener(
1798    "DOMContentLoaded",
1799    () => {
1800      mount();
1801      restoreDomCheckout();
1802    },
1803    { once: true }
1804  );
1805  if (d.readyState !== "loading") restoreDomCheckout();
1806  w.addEventListener("storage", (event) => {
1807    if (event.key !== key) return;
1808    const previous = snapshot();
1809    try {
1810      record = JSON.parse(event.newValue || "{}") || {};
1811    } catch {
1812      record = {};
1813    }
1814    notify();
1815    if (lostRecipient(previous.recipients) || groups.some((group) => previous.allowed[group] && !allowed(group)))
1816      reload();
1817  });
1818  const synchronizeChoices = () => {
1819    if (!key) return;
1820    const previous = appliedPermissions;
1821    const previousRecipients = appliedRecipients;
1822    record = readRecord();
1823    notify();
1824    if (lostRecipient(previousRecipients) || groups.some((group) => previous[group] && !allowed(group)))
1825      reload();
1826  };
1827  const connectPrivacyChannel = () => {
1828    if (privacyChannel || !w.BroadcastChannel) return;
1829    try {
1830      privacyChannel = new w.BroadcastChannel("sclv_privacy_choices");
1831      privacyChannel.onmessage = (event) => {
1832        var _a;
1833        if (((_a = event.data) == null ? void 0 : _a.business_id) === (policy == null ? void 0 : policy.business_id))
1834          synchronizeChoices();
1835      };
1836    } catch {
1837    }
1838  };
1839  connectPrivacyChannel();
1840  w.addEventListener("focus", synchronizeChoices);
1841  w.addEventListener("pagehide", () => {
1842    privacyChannel == null ? void 0 : privacyChannel.close();
1843    privacyChannel = null;
1844  });
1845  w.addEventListener("pageshow", (event) => {
1846    connectPrivacyChannel();
1847    if (!event.persisted || !key) return;
1848    const previous = appliedPermissions;
1849    const previousRecipients = appliedRecipients;
1850    record = readRecord();
1851    notify();
1852    if (lostRecipient(previousRecipients) || groups.some((group) => previous[group] && !allowed(group)))
1853      reload();
1854  });
1855  if (record.pending) {
1856    postPending().catch(() => {
1857      choiceFailed = true;
1858    });
1859  }
1860  return runtime;
1861})(window,{"revision":13,"recipients":["meta:1148933853431977","meta:2298824807282800","meta:880115360868945","meta_audience:120216390613540121","meta_audience:120216390985720121","meta_audience:120224980166490575","meta_audience:120224980369230575","tiktok:CSV9QOBC77UDA082778G"],"business_id":12808,"notice_version":"regional-privacy-2026-09-v1","recipient_groups":[{"id":"meta","name":"Meta","recipient_ids":["meta:1148933853431977","meta:2298824807282800","meta:880115360868945","meta_audience:120216390613540121","meta_audience:120216390985720121","meta_audience:120224980166490575","meta_audience:120224980369230575"],"privacy_url":"https://www.facebook.com/privacy/policy/"},{"id":"tiktok","name":"TikTok","recipient_ids":["tiktok:CSV9QOBC77UDA082778G"],"privacy_url":"https://www.tiktok.com/legal/page/row/privacy-policy/en"}],"gtm_containers":[],"policy_token":"SFMyNTY.g2gDbQAAA7Z7InJldmlzaW9uIjoxMywicmVjaXBpZW50cyI6WyJtZXRhOjExNDg5MzM4NTM0MzE5NzciLCJtZXRhOjIyOTg4MjQ4MDcyODI4MDAiLCJtZXRhOjg4MDExNTM2MDg2ODk0NSIsIm1ldGFfYXVkaWVuY2U6MTIwMjE2MzkwNjEzNTQwMTIxIiwibWV0YV9hdWRpZW5jZToxMjAyMTYzOTA5ODU3MjAxMjEiLCJtZXRhX2F1ZGllbmNlOjEyMDIyNDk4MDE2NjQ5MDU3NSIsIm1ldGFfYXVkaWVuY2U6MTIwMjI0OTgwMzY5MjMwNTc1IiwidGlrdG9rOkNTVjlRT0JDNzdVREEwODI3NzhHIl0sImJ1c2luZXNzX2lkIjoxMjgwOCwibm90aWNlX3ZlcnNpb24iOiJyZWdpb25hbC1wcml2YWN5LTIwMjYtMDktdjEiLCJtYXJrZXRpbmdfZ2VuZXJhdGlvbiI6MTIsImFuYWx5dGljc19jb25zZW50X2NvdW50cmllcyI6WyJBVCIsIkJFIiwiQkciLCJDWSIsIkNaIiwiREUiLCJESyIsIkVFIiwiRVMiLCJGSSIsIkZSIiwiR0IiLCJHUiIsIkhSIiwiSFUiLCJJRSIsIklTIiwiSVQiLCJMSSIsIkxUIiwiTFUiLCJMViIsIk1UIiwiTkwiLCJOTyIsIlBMIiwiUFQiLCJSTyIsIlNFIiwiU0kiLCJTSyJdLCJtYXJrZXRpbmdfY29uc2VudF9jb3VudHJpZXMiOlsiQVQiLCJCRSIsIkJHIiwiQ1kiLCJDWiIsIkRFIiwiREsiLCJFRSIsIkVTIiwiRkkiLCJGUiIsIkdCIiwiR1IiLCJIUiIsIkhVIiwiSUUiLCJJUyIsIklUIiwiTEkiLCJMVCIsIkxVIiwiTFYiLCJNVCIsIk5MIiwiTk8iLCJQTCIsIlBUIiwiUk8iLCJTRSIsIlNJIiwiU0siXSwiYW5hbHl0aWNzX2VuYWJsZWQiOnRydWUsImFuYWx5dGljc19sZWdhbF9hY2NlcHRhbmNlIjp7InJlcXVpcmVkX3ZlcnNpb24iOiIyMDI2LTA5LTA5IiwicHJpdmFjeV9hY2NlcHRlZF9hdCI6MTc4ODk1ODUxMCwicHJpdmFjeV92ZXJzaW9uIjoiMjAyNi0wOS0wOSIsInRlcm1zX2FjY2VwdGVkX2F0IjoxNzg4OTU4NTEwLCJ0ZXJtc192ZXJzaW9uIjoiMjAyNi0wOS0wOSJ9fW4GAIAOIPqgAWIAAVGA.mbemHixzrqWAD_F7MIAvcj5Nvrzih5oU3ezq-Emm6Jo","marketing_generation":12,"analytics_consent_countries":["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MT","NL","NO","PL","PT","RO","SE","SI","SK"],"marketing_consent_countries":["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MT","NL","NO","PL","PT","RO","SE","SI","SK"],"analytics_enabled":true,"analytics_legal_acceptance":{"required_version":"2026-09-09","privacy_accepted_at":1788958510,"privacy_version":"2026-09-09","terms_accepted_at":1788958510,"terms_version":"2026-09-09"}},"https://api.scalev.com/v2","id");}catch(_privacyUnavailable){}</script>
1861
1862<title>Webinar - Naikin Profit Pakai Ai</title>
1863<meta charset="utf-8">
1864<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
1865<link rel="preload" as="image" href="https://cdn.scalev.com/uploads/1788230895/8Ch0OgEIwHUKhoS0oSv3Rg/1788230895818-AI-Seller-Webinar-2.webp" fetchpriority="high">
1866<link rel="preconnect" href="https://fonts.googleapis.com">
1867<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
1868<meta name="description">
1869<meta property="og:type" content="website">
1870<meta property="og:title" content="Webinar - Naikin Profit Pakai Ai">
1871<meta property="og:description">
1872<meta property="og:image">
1873<meta property="twitter:card">
1874<meta property="twitter:title" content="Webinar - Naikin Profit Pakai Ai">
1875<meta property="twitter:description">
1876<meta property="twitter:image">
1877<link rel="icon" href="https://cdn.scalev.com/uploads/1787628054/35gLGD9lpCqNvDwXUuinMQ/1787628053207-Logo-Autopreneur.png">
1878<link rel="preconnect" href="https://fonts.googleapis.com">
1879<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
1880<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&amp;amp;display=swap" rel="stylesheet">
1881<style>/* ===== Reset & Base ===== */
1882    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
1883    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
1884    body {
1885      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
1886      background: #050505;
1887      color: #FFFFFF;
1888      line-height: 1.6;
1889      font-size: 16px;
1890      overflow-x: hidden;
1891    }
1892
1893    /* ===== Variables ===== */
1894    :root {
1895      --bg-main: #050505;
1896      --bg-section: #0B0B0B;
1897      --bg-card: #111111;
1898      --bg-card-hover: #161616;
1899      --bg-input: #0D0D0D;
1900      --border: #222222;
1901      --border-light: #333333;
1902      --text-main: #FFFFFF;
1903      --text-secondary: #B3B3B3;
1904      --text-muted: #777777;
1905      --primary: #FF6B35;
1906      --primary-hover: #FF8754;
1907      --accent: #FFB800;
1908      --btn-text: #FFFFFF;
1909      --radius: 12px;
1910      --radius-lg: 20px;
1911      --radius-sm: 8px;
1912      --max-width: 1140px;
1913      --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
1914    }
1915
1916    /* ===== Typography ===== */
1917    h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-main); }
1918    h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
1919    h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
1920    h3 { font-size: 1.25rem; font-weight: 700; }
1921    p { color: var(--text-secondary); }
1922    a { color: var(--primary); text-decoration: none; }
1923
1924    /* ===== Layout ===== */
1925    .container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
1926    section { padding: 72px 0; }
1927    .text-center { text-align: center; }
1928    .text-primary { color: var(--primary); }
1929
1930    /* ===== Header ===== */
1931    .header {
1932      position: sticky;
1933      top: 0;
1934      z-index: 100;
1935      background: rgba(5, 5, 5, 0.85);
1936      backdrop-filter: blur(12px);
1937      -webkit-backdrop-filter: blur(12px);
1938      border-bottom: 1px solid var(--border);
1939    }
1940    .header-inner {
1941      display: flex;
1942      align-items: center;
1943      justify-content: space-between;
1944      padding: 16px 0;
1945      gap: 24px;
1946    }
1947    .logo {
1948      font-size: 1.25rem;
1949      font-weight: 900;
1950      letter-spacing: -0.03em;
1951      color: var(--text-main);
1952      display: flex;
1953      align-items: center;
1954      gap: 10px;
1955    }
1956    .logo span { color: var(--primary); }
1957    .logo-img {
1958      height: 36px;
1959      width: 36px;
1960      object-fit: cover;
1961      border-radius: 50%; /* Membuat gambar jadi bulat */
1962    }
1963    .header-right { display: flex; align-items: center; gap: 12px; }
1964    .header-cta {
1965      padding: 10px 20px;
1966      font-size: 0.875rem;
1967      font-weight: 700;
1968    }
1969
1970    /* ===== Buttons ===== */
1971    .btn {
1972      display: inline-flex;
1973      align-items: center;
1974      justify-content: center;
1975      gap: 8px;
1976      padding: 14px 28px;
1977      border-radius: var(--radius-sm);
1978      font-weight: 700;
1979      font-size: 1rem;
1980      border: none;
1981      cursor: pointer;
1982      transition: var(--transition);
1983      text-decoration: none;
1984      font-family: inherit;
1985      line-height: 1;
1986    }
1987    .btn-primary { background: var(--primary); color: var(--btn-text); }
1988    .btn-primary:hover {
1989      background: var(--primary-hover);
1990      transform: translateY(-1px);
1991      box-shadow: 0 8px 24px rgba(255, 107, 53, 0.25);
1992    }
1993    .btn-secondary {
1994      background: transparent;
1995      color: var(--text-main);
1996      border: 1px solid var(--border-light);
1997    }
1998    .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
1999    .btn-block { width: 100%; }
2000    .btn-lg { padding: 18px 36px; font-size: 1.125rem; }
2001
2002    /* ===== Hero ===== */
2003    .hero {
2004      position: relative;
2005      padding: 64px 0 48px;
2006      background: radial-gradient(ellipse at 50% 0%, rgba(255, 107, 53, 0.08) 0%, transparent 60%);
2007    }
2008    .hero-badge {
2009      display: inline-flex;
2010      align-items: center;
2011      gap: 8px;
2012      padding: 8px 16px;
2013      background: rgba(255, 107, 53, 0.1);
2014      border: 1px solid rgba(255, 107, 53, 0.3);
2015      border-radius: 100px;
2016      font-size: 0.8125rem;
2017      font-weight: 600;
2018      color: var(--primary);
2019      margin-bottom: 24px;
2020    }
2021    .hero-badge .dot {
2022      width: 8px; height: 8px;
2023      background: var(--primary);
2024      border-radius: 50%;
2025      animation: pulse 2s infinite;
2026    }
2027    @keyframes pulse {
2028      0%, 100% { opacity: 1; transform: scale(1); }
2029      50% { opacity: 0.5; transform: scale(0.8); }
2030    }
2031    .hero h1 { margin-bottom: 16px; }
2032    .hero h1 .highlight {
2033      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
2034      -webkit-background-clip: text;
2035      background-clip: text;
2036      -webkit-text-fill-color: transparent;
2037    }
2038    .hero-subtitle { font-size: 1.125rem; max-width: 580px; margin-bottom: 32px; }
2039    .hero-meta { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 32px; }
2040    .hero-meta-item {
2041      display: flex;
2042      align-items: center;
2043      gap: 10px;
2044      font-size: 0.9375rem;
2045      color: var(--text-main);
2046    }
2047    .hero-meta-icon {
2048      width: 40px; height: 40px;
2049      display: flex; align-items: center; justify-content: center;
2050      background: var(--bg-card); border: 1px solid var(--border);
2051      border-radius: 10px; font-size: 1.25rem;
2052    }
2053    .hero-cta-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
2054    .hero-trust { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text-muted); }
2055    .hero-trust strong { color: var(--primary); }
2056
2057    /* ===== Poster Section ===== */
2058    .poster-section { padding: 24px 0 72px; }
2059    .poster-frame {
2060      max-width: 800px; margin: 0 auto;
2061      border-radius: var(--radius-lg); overflow: hidden;
2062      position: relative;
2063      box-shadow: 0 0 0 1px var(--border), 0 20px 60px rgba(0,0,0,0.5);
2064    }
2065    .poster-frame::before {
2066      content: ''; position: absolute; inset: -2px;
2067      background: linear-gradient(135deg, rgba(255,107,53,0.4), transparent 50%, rgba(255,184,0,0.2));
2068      border-radius: var(--radius-lg); z-index: -1;
2069    }
2070    .poster-img {
2071      width: 100%; height: auto; display: block;
2072      aspect-ratio: 16/9; object-fit: cover; background: var(--bg-card);
2073    }
2074
2075    /* ===== Section Header ===== */
2076    .section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
2077    .section-header h2 { margin-bottom: 12px; }
2078    .section-header p { font-size: 1.0625rem; }
2079
2080    /* ===== Pricing & Benefits ===== */
2081    .pricing-card {
2082      max-width: 500px; margin: 0 auto;
2083      background: var(--bg-card); border: 1px solid var(--border);
2084      border-radius: var(--radius-lg); overflow: hidden; position: relative;
2085    }
2086    .pricing-badge {
2087      position: absolute; top: 20px; right: 0;
2088      background: var(--primary); color: var(--btn-text);
2089      padding: 6px 16px; font-size: 0.75rem; font-weight: 800;
2090      text-transform: uppercase; border-top-left-radius: 8px; border-bottom-left-radius: 8px;
2091    }
2092    .pricing-header {
2093      padding: 32px 32px 24px; text-align: center;
2094      border-bottom: 1px solid var(--border);
2095      background: linear-gradient(180deg, rgba(255,107,53,0.05) 0%, transparent 100%);
2096    }
2097    .pricing-header h3 { font-size: 1.5rem; margin-bottom: 16px; }
2098    .price-display { display: flex; flex-direction: column; align-items: center; gap: 4px; }
2099    .price-old { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; }
2100    .price-new { font-size: 2.5rem; font-weight: 900; color: var(--primary); line-height: 1; }
2101    .pricing-body { padding: 32px; }
2102    .pricing-benefits-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
2103    .pricing-benefits-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9375rem; color: var(--text-main); }
2104    .benefit-icon {
2105      flex-shrink: 0; width: 24px; height: 24px;
2106      background: rgba(255, 107, 53, 0.1); color: var(--primary);
2107      border-radius: 50%; display: flex; align-items: center; justify-content: center;
2108      font-size: 0.75rem; font-weight: 900; margin-top: 2px;
2109    }
2110
2111    /* ===== Learn Grid ===== */
2112    .learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
2113    .learn-card {
2114      background: var(--bg-card); border: 1px solid var(--border);
2115      border-radius: var(--radius); padding: 28px; transition: var(--transition);
2116    }
2117    .learn-card:hover { background: var(--bg-card-hover); border-color: var(--border-light); transform: translateY(-2px); }
2118    .learn-card-icon {
2119      width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
2120      background: rgba(255, 107, 53, 0.1); border-radius: 12px; font-size: 1.5rem; margin-bottom: 16px;
2121    }
2122    .learn-card h3 { margin-bottom: 8px; }
2123    .learn-card p { font-size: 0.9375rem; line-height: 1.6; }
2124
2125    /* ===== Speaker ===== */
2126    .speaker-card {
2127      display: flex; gap: 32px; align-items: center; max-width: 800px; margin: 0 auto;
2128      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px;
2129    }
2130    .speaker-avatar {
2131      width: 120px; height: 120px; flex-shrink: 0;
2132      border-radius: 50%; overflow: hidden;
2133      border: 2px solid var(--border-light); background: var(--bg-input);
2134    }
2135    .speaker-avatar img { width: 100%; height: 100%; object-fit: cover; }
2136    .speaker-info h3 { font-size: 1.5rem; margin-bottom: 4px; }
2137    .speaker-role { color: var(--primary); font-weight: 600; font-size: 0.9375rem; margin-bottom: 12px; }
2138    .speaker-bio { font-size: 0.9375rem; }
2139
2140    /* ===== Agenda ===== */
2141    .agenda-timeline { max-width: 640px; margin: 0 auto; position: relative; }
2142    .agenda-timeline::before {
2143      content: ''; position: absolute; left: 60px; top: 0; bottom: 0;
2144      width: 2px; background: var(--border);
2145    }
2146    .agenda-item { display: flex; gap: 24px; padding-bottom: 28px; position: relative; }
2147    .agenda-item:last-child { padding-bottom: 0; }
2148    .agenda-time {
2149      width: 50px; flex-shrink: 0; text-align: right;
2150      font-weight: 700; font-size: 0.875rem; color: var(--primary); padding-top: 2px;
2151    }
2152    .agenda-dot {
2153      width: 12px; height: 12px; flex-shrink: 0; background: var(--primary);
2154      border-radius: 50%; margin-top: 4px; margin-left: 5px; position: relative; z-index: 1;
2155    }
2156    .agenda-content h3 { font-size: 1rem; margin-bottom: 4px; }
2157    .agenda-content p { font-size: 0.875rem; }
2158
2159    /* ===== Checkout Section ===== */
2160    .checkout-section { background: var(--bg-section); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
2161    .checkout-grid { display: block; max-width: 700px; margin: 0 auto; }
2162    .checkout-form-wrapper {
2163      background: var(--bg-card); border: 1px solid var(--border);
2164      border-radius: var(--radius-lg); padding: 32px;
2165    }
2166    .checkout-form-wrapper h2 { font-size: 1.5rem; margin-bottom: 8px; }
2167    .checkout-form-wrapper > p { font-size: 0.9375rem; margin-bottom: 28px; }
2168
2169    /* ===== Form ===== */
2170    fieldset { border: none; margin-bottom: 28px; }
2171    fieldset legend {
2172      font-size: 0.8125rem; font-weight: 700; text-transform: uppercase;
2173      letter-spacing: 0.05em; color: var(--primary); margin-bottom: 16px; padding: 0;
2174    }
2175    .form-group { margin-bottom: 16px; }
2176    .form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
2177    .form-label .req { color: var(--primary); }
2178    .form-input {
2179      width: 100%; padding: 12px 14px; background: var(--bg-input);
2180      border: 1px solid var(--border); border-radius: var(--radius-sm);
2181      color: var(--text-main); font-size: 0.9375rem; font-family: inherit;
2182      transition: var(--transition); -webkit-appearance: none; appearance: none;
2183    }
2184    .form-input:focus {
2185      outline: none; border-color: var(--primary);
2186      box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
2187    }
2188    .form-input::placeholder { color: var(--text-muted); }
2189    .form-error { font-size: 0.8125rem; color: #ff6b6b; margin-top: 4px; display: none; }
2190    .form-error.active { display: block; }
2191    .form-input.invalid { border-color: #ff6b6b; }
2192
2193    /* ===== Upsell ===== */
2194    .upsell-box { display: flex; flex-direction: column; gap: 10px; }
2195    .upsell-card {
2196      display: flex; gap: 14px; padding: 16px; background: var(--bg-input);
2197      border: 2px dashed var(--border-light); border-radius: var(--radius);
2198      cursor: pointer; transition: var(--transition); align-items: flex-start;
2199    }
2200    .upsell-card:hover { border-color: var(--primary); }
2201    .upsell-card input { display: none; }
2202    .upsell-checkbox-custom {
2203      width: 22px; height: 22px; border: 2px solid var(--border-light);
2204      border-radius: 6px; flex-shrink: 0; margin-top: 2px;
2205      position: relative; transition: var(--transition);
2206    }
2207    .upsell-card input:checked ~ .upsell-checkbox-custom { background: var(--primary); border-color: var(--primary); }
2208    .upsell-card input:checked ~ .upsell-checkbox-custom::after {
2209      content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
2210      color: var(--btn-text); font-size: 14px; font-weight: 900;
2211    }
2212    .upsell-content h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text-main); }
2213    .upsell-content p { font-size: 0.8125rem; margin-bottom: 8px; }
2214    .upsell-price { color: var(--primary); font-weight: 700; font-size: 0.875rem; }
2215
2216    /* ===== Payment Methods ===== */
2217    .payment-methods-list { display: flex; flex-direction: column; gap: 10px; }
2218    .payment-option {
2219      display: flex; align-items: center; gap: 14px; padding: 14px 16px;
2220      background: var(--bg-input); border: 2px solid var(--border);
2221      border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
2222    }
2223    .payment-option:hover { border-color: var(--border-light); }
2224    .payment-option.selected { border-color: var(--primary); background: rgba(255, 107, 53, 0.05); }
2225    .payment-option input { display: none; }
2226    .payment-radio {
2227      width: 20px; height: 20px; flex-shrink: 0;
2228      border: 2px solid var(--border-light); border-radius: 50%;
2229      position: relative; transition: var(--transition);
2230    }
2231    .payment-option.selected .payment-radio { border-color: var(--primary); }
2232    .payment-option.selected .payment-radio::after {
2233      content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
2234      width: 10px; height: 10px; background: var(--primary); border-radius: 50%;
2235    }
2236    .payment-logo {
2237      width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
2238      border-radius: 6px; background: #FFFFFF; padding: 4px;
2239    }
2240    .payment-logo-dummy {
2241      width: 40px; height: 40px; flex-shrink: 0; border-radius: 6px;
2242      display: flex; align-items: center; justify-content: center;
2243      font-size: 0.7rem; font-weight: 800; background: #FFFFFF; color: #050505;
2244    }
2245    .payment-label { font-size: 0.9375rem; font-weight: 500; color: var(--text-main); }
2246
2247    /* ===== Summary Card (Inside Form) ===== */
2248    .summary-card-inside {
2249      background: var(--bg-input); border: 1px solid var(--border);
2250      border-radius: var(--radius); padding: 20px; margin-bottom: 28px;
2251    }
2252    .summary-card-inside h3 { font-size: 1.125rem; margin-bottom: 16px; color: var(--text-main); }
2253    
2254    .summary-product {
2255      display: flex; gap: 12px; padding-bottom: 16px;
2256      border-bottom: 1px solid var(--border); margin-bottom: 16px;
2257    }
2258    .summary-product-icon {
2259      width: 48px; height: 48px; flex-shrink: 0;
2260      background: rgba(255, 107, 53, 0.1); border-radius: 10px;
2261      display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
2262    }
2263    .summary-product-info h4 { font-size: 0.9375rem; margin-bottom: 2px; color: var(--text-main); }
2264    .summary-product-info p { font-size: 0.8125rem; color: var(--text-muted); }
2265    
2266    .summary-upsell-row {
2267      display: flex; gap: 12px; padding-bottom: 16px;
2268      border-bottom: 1px solid var(--border); margin-bottom: 16px;
2269    }
2270    .summary-upsell-row[style*="display: none"] { border: none; padding: 0; margin: 0; }
2271
2272    .summary-line {
2273      display: flex; justify-content: space-between; align-items: center;
2274      padding: 6px 0; font-size: 0.9375rem;
2275    }
2276    .summary-line span:first-child { color: var(--text-secondary); }
2277    .summary-line.total {
2278      border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px;
2279      font-size: 1.125rem; font-weight: 800;
2280    }
2281    .summary-line.total span:first-child { color: var(--text-main); }
2282    .summary-line.total span:last-child { color: var(--primary); }
2283    .summary-line.discount span:last-child { color: #4ade80; }
2284
2285    /* ===== Discount ===== */
2286    .discount-row { display: flex; gap: 10px; }
2287    .discount-row .form-input { flex: 1; }
2288    .btn-discount {
2289      padding: 12px 20px; background: var(--bg-card); border: 1px solid var(--border-light);
2290      color: var(--text-main); border-radius: var(--radius-sm); font-size: 0.875rem;
2291      font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; white-space: nowrap;
2292    }
2293    .btn-discount:hover { border-color: var(--primary); color: var(--primary); }
2294    .btn-discount:disabled { opacity: 0.5; cursor: not-allowed; }
2295    .discount-msg { font-size: 0.8125rem; margin-top: 8px; display: none; }
2296    .discount-msg.active { display: block; }
2297    .discount-msg.success { color: #4ade80; }
2298    .discount-msg.error { color: #ff6b6b; }
2299
2300    /* ===== Submit Button ===== */
2301    .submit-btn {
2302      width: 100%; padding: 18px; font-size: 1.0625rem; font-weight: 800;
2303      margin-top: 8px; position: relative;
2304    }
2305    .submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
2306    .submit-btn .spinner {
2307      display: none; width: 20px; height: 20px;
2308      border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--btn-text);
2309      border-radius: 50%; animation: spin 0.6s linear infinite;
2310    }
2311    .submit-btn.loading .spinner { display: inline-block; }
2312    .submit-btn.loading .btn-text { display: none; }
2313    @keyframes spin { to { transform: rotate(360deg); } }
2314
2315    /* ===== General Error Banner ===== */
2316    .error-banner {
2317      display: none; padding: 14px 16px; background: rgba(255, 107, 107, 0.1);
2318      border: 1px solid rgba(255, 107, 107, 0.3); border-radius: var(--radius-sm);
2319      color: #ff9999; font-size: 0.875rem; margin-bottom: 20px;
2320    }
2321    .error-banner.active { display: block; }
2322
2323    /* ===== FAQ ===== */
2324    .faq-list { max-width: 720px; margin: 0 auto; }
2325    .faq-item { border-bottom: 1px solid var(--border); }
2326    .faq-question {
2327      width: 100%; text-align: left; background: none; border: none;
2328      color: var(--text-main); font-size: 1rem; font-weight: 600; padding: 20px 0;
2329      cursor: pointer; display: flex; justify-content: space-between; align-items: center;
2330      gap: 16px; font-family: inherit; transition: var(--transition);
2331    }
2332    .faq-question:hover { color: var(--primary); }
2333    .faq-question .faq-icon {
2334      flex-shrink: 0; width: 24px; height: 24px; display: flex;
2335      align-items: center; justify-content: center; transition: var(--transition);
2336    }
2337    .faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
2338    .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
2339    .faq-item.open .faq-answer { max-height: 200px; }
2340    .faq-answer p { padding: 0 0 20px; font-size: 0.9375rem; }
2341
2342    /* ===== Footer ===== */
2343    .footer { border-top: 1px solid var(--border); padding: 40px 0; text-align: center; }
2344    .footer p { font-size: 0.875rem; color: var(--text-muted); }
2345
2346    /* ===== Success Overlay ===== */
2347    .success-overlay {
2348      display: none; position: fixed; inset: 0; background: rgba(5, 5, 5, 0.92);
2349      backdrop-filter: blur(8px); z-index: 1000; align-items: center; justify-content: center; padding: 24px;
2350    }
2351    .success-overlay.active { display: flex; }
2352    .success-card {
2353      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
2354      padding: 40px; max-width: 440px; width: 100%; text-align: center;
2355    }
2356    .success-icon {
2357      width: 64px; height: 64px; margin: 0 auto 20px; background: rgba(255, 107, 53, 0.1);
2358      border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem;
2359    }
2360    .success-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
2361    .success-card p { font-size: 0.9375rem; margin-bottom: 20px; }
2362    .success-detail {
2363      background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
2364      padding: 16px; margin-bottom: 20px; text-align: left;
2365    }
2366    .success-detail-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 4px 0; }
2367    .success-detail-row span:first-child { color: var(--text-muted); }
2368    .success-detail-row span:last-child { color: var(--text-main); font-weight: 600; }
2369
2370    /* ===== Responsive ===== */
2371    @media (max-width: 900px) { .speaker-card { flex-direction: column; text-align: center; } }
2372    @media (max-width: 640px) {
2373      section { padding: 56px 0; }
2374      .header-inner { padding: 12px 0; gap: 12px; }
2375      .logo { font-size: 1.1rem; gap: 8px; }
2376      .logo-img { height: 32px; width: 32px; }
2377      .header-cta { padding: 8px 14px; font-size: 0.8rem; }
2378      .hero-meta { gap: 16px; }
2379      .checkout-form-wrapper { padding: 20px; }
2380      .pricing-body { padding: 24px; }
2381      .price-new { font-size: 2rem; }
2382    }</style>
2383<style id="scalev-html-mode-css">@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/plus-jakarta-sans/latin-v12.woff2') format('woff2');
2383unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/plus-jakarta-sans/latin-ext-v12.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/plus-jakarta-sans/vietnamese-v12.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('/fonts/plus-jakarta-sans/cyrillic-ext-v12.woff2') format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Plus Jakarta Sans Fallback';src:local('Arial');size-adjust:132.531%;ascent-override:78.3213%;descent-override:16.7508%;line-gap-override:0%}html,body{margin:0;width:100%;min-height:0;overflow-x:clip}*,*::before,*::after{box-sizing:border-box}img,svg,video,canvas,iframe{max-width:100%}.sv-store-header .sv-store-logo-link{display:flex;align-items:center;justify-content:center}.sv-store-logo-img{width:100%;height:100%;object-fit:cover}#scalev-html-mode-root{width:100%;min-width:0}#locator{display:block;width:100%;height:0;min-height:0;overflow:hidden;pointer-events:none}
2384
2385</style>
2386<style id="scalev-self-hosted-font-stack">:root{--sf-font:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif}</style>
2387<script type="text/javascript">if(window.__sclv_privacy__&&window.__sclv_privacy__.allowedProvider("meta")&&["meta:880115360868945","meta:1148933853431977","meta:2298824807282800"].some(function(id){return window.__sclv_privacy__.allowed('marketing',id)})){!(function (f, b, e, v, n, t, s) {
2388        if (f.fbq) return
2389        n = f.fbq = function () {
2390          n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments)
2391        }
2392        if (!f._fbq) f._fbq = n
2393        n.push = n
2394        n.loaded = !0
2395        n.version = '2.0'
2396        n.queue = []
2397        t = b.createElement(e)
2398        t.async = !0
2399        t.src = v
2400        s = b.getElementsByTagName(e)[0]
2401        s.parentNode.insertBefore(t, s)
2402      })(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');if(window.__sclv_privacy__&&window.__sclv_privacy__.loadRecipient("meta:880115360868945")){fbq('init', "880115360868945");
2403}if(window.__sclv_privacy__&&window.__sclv_privacy__.loadRecipient("meta:1148933853431977")){fbq('init', "1148933853431977");
2404}if(window.__sclv_privacy__&&window.__sclv_privacy__.loadRecipient("meta:2298824807282800")){fbq('init', "2298824807282800");
2405}fbq('track', 'PageView');
2406}</script>
vendor: 1 bytes, line 2406
2406
2407<script type="text/javascript">if(window.__sclv_privacy__&&window.__sclv_privacy__.allowedProvider("tiktok")&&["tiktok:CSV9QOBC77UDA082778G"].some(function(id){return window.__sclv_privacy__.allowed('marketing',id)})){!function (w, d, t) {
2408      w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
2409      if(window.__sclv_privacy__&&window.__sclv_privacy__.loadRecipient("tiktok:CSV9QOBC77UDA082778G")){ttq.load("CSV9QOBC77UDA082778G");
2410}
2411      ttq.page();
2412    }(window, document, 'ttq');
2413}</script>
2413
2414</head>
2415<body>
2416<script type="text/javascript" tagPosition="bodyOpen">
2417  window.__sclv_privacy__?.visitContext?.();
2418  window.__scalev_runtime_analytics_event_ids__=window.__scalev_runtime_analytics_event_ids__||{};
2419  window.__scalev_runtime_analytics_event_ids__["page:page_4c46139965274b6c"]=window.__scalev_runtime_analytics_event_ids__["page:page_4c46139965274b6c"]||{};
2420  const __scalevRuntimeIds=(platform,count)=>{
2421    const registry=window.__scalev_runtime_analytics_event_ids__["page:page_4c46139965274b6c"];
2422    const ids=registry[platform]=registry[platform]||[];
2423    while(ids.length<count){
2424      ids.push(window.crypto&&typeof window.crypto.randomUUID==='function'
2425        ?window.crypto.randomUUID()
2426        :Date.now().toString(36)+'-'+Math.random().toString(36).slice(2));
2427    }
2428    return ids.slice(0,count);
2429  };
2430  const __scalevCookie=(name)=>{
2431    const prefix=name+'=';
2432    const value=document.cookie.split(';').map((part)=>part.trim()).find((part)=>part.startsWith(prefix));
2433    if(!value)return null;
2434    // Same URIError guard as runtimeKwaiClickIdSnippet: a malformed cookie value
2435    // would otherwise throw and kill every analytics block after this call. This
2436    // helper reads _fbc/_fbp/_ttp and _scalev_click_id, so one bad cookie could
2437    // silently take out the whole injected script.
2438    try{return decodeURIComponent(value.slice(prefix.length))}catch(e){return null}
2439  };
2440  const __scalevQuery=(name)=>new URLSearchParams(window.location.search).get(name);
2441  const __scalevWriteCookie=(name,value)=>{
2442    const secure=window.location.protocol==='https:'?'; Secure':'';
2443    document.cookie=name+'='+encodeURIComponent(value)+'; Path=/; Max-Age=7776000; SameSite=Lax'+secure;
2444  };
2445  // Optional browser cookie initialization still requires current Meta permission.
2446  if(window.__sclv_privacy__?.allowedProvider?.('meta')){
2447  const __scalevNow=Date.now();
2448  const __scalevFbclid=__scalevQuery('fbclid');
2449  if(__scalevFbclid&&__scalevFbclid!=='fbclid'){
2450    __scalevWriteCookie('_fbc','fb.1.'+__scalevNow+'.'+__scalevFbclid);
2451  }
2452  if(!__scalevCookie('_fbp')){
2453    __scalevWriteCookie('_fbp','fb.1.'+__scalevNow+'.'+Math.floor(Math.random()*10000000000));
2454  }
2455  }
2456
2457  __scalevRuntimeIds('facebook', 1);
2458  __scalevRuntimeIds('tiktok', 1);
2459
2460  (function(){
2461  // SNAPSHOT THE URL AT PARSE TIME, scoped to this IIFE.
2462  //
2463  // Deferring moved request-BODY evaluation to flush time, up to ~3s later. A third party that
2464  // rewrites the URL after load - history.replaceState stripping UTM and click ids is the common
2465  // tag-manager and consent-tool pattern - would make a flush-time read return null where a
2466  // parse-time read succeeded, silently degrading ad attribution with no error anywhere.
2467  // Nothing in fe-public does this (both history.replaceState call sites pass state only, with no
2468  // URL argument) but merchant additional_head_code and GTM containers cannot be ruled out.
2469  //
2470  // SHADOWED HERE, not changed in the shared bootstrap. __scalevQuery is used by the checkout and
2471  // landing-page scripts too, which run much later and MUST read live - there is a test pinning
2472  // that helper's exact source. Snapshotting it globally broke five of them. The narrow fix is a
2473  // local shadow inside this closure, so only the deferred conversions read the snapshot.
2474  //
2475  // COOKIES ARE DELIBERATELY NOT SNAPSHOTTED: the bootstrap writes _fbc and _fbp from the fbclid
2476  // during this same script, so a cookie snapshot taken here would predate those writes and send
2477  // nulls for exactly the Meta values it exists to carry. The URL needed a snapshot because third
2478  // parties rewrite it; cookies need the opposite because we write them ourselves.
2479  var __scalevSearchSnapshot=window.location.search;
2480  var __scalevHrefSnapshot=window.location.href;
2481  var __scalevQuery=function(name){return new URLSearchParams(__scalevSearchSnapshot).get(name)};
2482  var __scalevConversionsFired=false;
2483  function __scalevFlushConversions(){
2484    if(window.__sclv_privacy__?.serverTrackingAllowed?.()===false)return;
2485    if(__scalevConversionsFired)return;
2486    __scalevConversionsFired=true;
2487    if(!window.__sclv_privacy__||!window.__sclv_privacy__.serverTrackingAllowed||window.__sclv_privacy__.serverTrackingAllowed("meta")){fetch('https://api.scalev.com/v2/fb-event/', {
2488      method: 'POST',
2489      keepalive: true,
2490      headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
2491      body: JSON.stringify({ privacy: window.__sclv_privacy__?.context?.() || {}, visit_privacy: window.__sclv_privacy__?.visitContext?.() || {},
2492        page_unique_id: "page_4c46139965274b6c",
2493        user_data: {
2494          country: 'id',
2495          client_user_agent: navigator.userAgent,
2496          fbc: __scalevCookie('_fbc'),
2497          fbp: __scalevCookie('_fbp')
2498        },
2499        event_source_url: __scalevHrefSnapshot,
2500        events: [{"event_name":"ViewContent"}
2500].map((event,index)=>({
2501          ...event,
2502          event_id: __scalevRuntimeIds('facebook', 1)[index]
2503        }))
2504      })
2505    }).catch((error) => {
2506      console.warn('[Analytics] Non-fatal analytics request failed', error)
2507    })
2508}
2509if(!window.__sclv_privacy__||!window.__sclv_privacy__.serverTrackingAllowed||window.__sclv_privacy__.serverTrackingAllowed("tiktok")){fetch('https://api.scalev.com/v2/tiktok-event/', {
2510      method: 'POST',
2511      keepalive: true,
2512      headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
2513      body: JSON.stringify({ privacy: window.__sclv_privacy__?.context?.() || {}, visit_privacy: window.__sclv_privacy__?.visitContext?.() || {},
2514        page_unique_id: "page_4c46139965274b6c",
2515        user: {
2516          user_agent: navigator.userAgent,
2517          ttclid: __scalevQuery('ttclid') || __scalevCookie('_scalev_ttclid'),
2518          ttp: __scalevCookie('_ttp')
2519        },
2520        event_source_url: __scalevHrefSnapshot,
2521        events: [{"event":"ViewContent","parameters":{"content_id":"page_4c46139965274b6c"}}].map((event,index)=>({
2522          ...event,
2523          event_id: __scalevRuntimeIds('tiktok', 1)[index]
2524        }))
2525      })
2526    }).catch((error) => {
2527      console.warn('[Analytics] Non-fatal analytics request failed', error)
2528    })
2529}
2530  }
2531  // ARM THE IDLE LEG FROM load, NOT FROM PARSE.
2532  //
2533  // requestIdleCallback armed at bodyOpen is granted DURING PARSING: on a slow connection the
2534  // CPU sits idle while the network streams, so Chrome ran the callback at ~451ms and the POSTs
2535  // started around FCP - 131ms before DOMContentLoaded and 3.8s before load. Measured, not
2536  // theorised. Two consequences, both defeating the point of deferring at all: the requests were
2537  // still parser-era, and the abandonment leg was dead code because the flush had always already
2538  // fired by any realistic departure.
2539  //
2540  // Arming from load makes "idle" mean POST-LOAD idle, and makes pagehide the live path for a
2541  // pre-load departure - which is the case that actually needed keepalive, and which can now be
2542  // exercised by navigating before load.
2543  function __scalevArmIdleFlush(){
2544    // NO requestIdleCallback (Safari before 16.4, a real share of this audience): flush NOW.
2545    // We are already at load, so there is nothing left to wait for, and an extra delay would
2546    // only widen the window in which a departure can beat the flush. The pre-amendment fallback
2547    // did exactly this and was already correct; only the rIC path needed changing.
2548    if(typeof window.requestIdleCallback!=='function'){
2549      __scalevFlushConversions();
2550      return;
2551    }
2552    // Both clocks start at LOAD, never at parse. The 3s backstop is a post-load ceiling for a
2553    // page whose main thread never goes idle; it is deliberately not parse-relative, or it would
2554    // beat the load event entirely on a slow connection and put us back where we started.
2555    var timer=setTimeout(__scalevFlushConversions,3000);
2556    window.requestIdleCallback(function(){clearTimeout(timer);__scalevFlushConversions()},{timeout:2000});
2557  }
2558  // ARMED FROM DOMContentLoaded, not load. Measured: with DCL arming the chain endpoint stays at
2559  // the woff2 (the POSTs finish 7-37ms before it), dispatch lands at DCL+17ms = FCP+141ms so paint
2560  // still precedes it, and the DCL-to-load gap was 3.91s — so waiting for load bought nothing on
2561  // the metric while widening the abandonment window ~6x. 'loading' is the only readyState before
2562  // DCL; anything later means it has already fired.
2563  if(document.readyState!=='loading'){
2564    __scalevArmIdleFlush();
2565  }else{
2566    document.addEventListener('DOMContentLoaded',__scalevArmIdleFlush);
2567  }
2568  // Armed from bodyOpen on purpose: a visitor can leave before load, and this is the only leg
2569  // that covers that. keepalive lets the request outlive the departure.
2570  window.addEventListener('pagehide',__scalevFlushConversions);
2571  document.addEventListener('visibilitychange',function(){
2572    if(document.visibilityState==='hidden')__scalevFlushConversions();
2573  });
2574  })();
2575</script>
2575
2576<div id="scalev-html-mode-root">
2577<!-- ===== Header ===== -->
2578  <header class="header">
2579    <div class="container header-inner">
2580      <div class="logo">
2581        <img src="https://cdn.scalev.com/uploads/1786602799/4q6uF863RL1JnNHGtQ1j7g/1786602799750-Logo-Autopreneur.webp" alt="Autopreneur" class="logo-img">
2582        Autopreneur
2583      </div>
2584      <div class="header-right">
2585        <button type="button" class="btn btn-primary header-cta" onclick="document.getElementById('checkout').scrollIntoView({behavior:'smooth'})">
2586          Daftar
2587        </button>
2588      </div>
2589    </div>
2590  </header>
2591
2592  <!-- ===== Hero ===== -->
2593  <section class="hero">
2594    <div class="container">
2595      <div class="hero-badge">
2596        <span class="dot"></span>
2597        Webinar — Slot Terbatas!
2598      </div>
2599      <h1> <span class="highlight">Naikin Profit Toko Pakai AI</span></h1>
2600      <p class="hero-subtitle">
2601        Kamu fokus mikirin strategi, AI yang bantu eksekusi. Pelajari cara menggunakan AI untuk riset pasar, pengembangan bisnis, evaluasi toko, dan berbagai kebutuhan seller marketplace lainnya.
2602      </p>
2603      <div class="hero-meta">
2604        <div class="hero-meta-item">
2605          <div class="hero-meta-icon">📅</div>
2606          <div>Kamis, 24 September 2026</div>
2607        </div>
2608        <div class="hero-meta-item">
2609          <div class="hero-meta-icon">⏰</div>
2610          <div>20:00 WIB - Selesai</div>
2611        </div>
2612        <div class="hero-meta-item">
2613          <div class="hero-meta-icon">🎥</div>
2614          <div>Zoom Meeting</div>
2615        </div>
2616      </div>
2617      <div class="hero-cta-group">
2618        <button type="button" class="btn btn-primary btn-lg" onclick="document.getElementById('pricing').scrollIntoView({behavior:'smooth'})">
2619          Lihat Harga &amp; Benefit →
2620        </button>
2621        <div class="hero-trust">
2622          <strong>7.000+</strong> seller sudah bergabung
2623        </div>
2624      </div>
2625    </div>
2626  </section>
2627
2628  <!-- ===== Poster Section (Tampilan Responsif Anti-Crop) ===== -->
2629  <section class="poster-section" style="padding: 20px 16px; margin: 0; box-sizing: width: 100%;">
2630    <div class="poster-frame" style="width: 100%; display: flex; justify-content: center; align-items: center;">
2631      <img class="poster-img" data-scalev-inspector-copy-id="scalev-html-mode-el-29" src="https://cdn.scalev.com/uploads/1788231574/SGkxGRpf_Lp7z4y33aS_dA/1788231574833-ai24sep.webp" alt="Poster Webinar AI Seller Academy" style="width: 100%; max-width: 600px; height: auto; object-fit: contain; display: block; border-radius: 8px;">
2632    </div>
2633  </section>
2634
2635  <!-- ===== What You'll Learn ===== -->
2636  <section>
2637    <div class="container">
2638      <div class="section-header">
2639        <h2>Apa yang Akan Kamu Pelajari?</h2>
2640        <p>Strategi AI praktis yang bisa langsung kamu terapkan untuk meningkatkan penjualan Shopee.</p>
2641      </div>
2642      <div class="learn-grid">
2643        <div class="learn-card">
2644          <div class="learn-card-icon">📝</div>
2645          <h3>Pengenalan Fundamental AI</h3>
2646          <p>Pahami konsep dasar AI dengan bahasa yang sederhana.</p>
2647        </div>
2648        <div class="learn-card">
2649          <div class="learn-card-icon">🔍</div>
2650          <h3>Riset Produk dengan AI</h3>
2651          <p>Temukan produk winning dengan bantuan AI tools tanpa perlu ribet analisis manual.</p>
2652        </div>
2653        <div class="learn-card">
2654          <div class="learn-card-icon">🎨</div>
2655          <h3>Implementasi AI Untuk R&amp;D</h3>
2656          <p>Gunakan AI untuk mencari insight pasar, mengembangkan ide, dan mendukung proses riset bisnis.</p>
2657        </div>
2658        <div class="learn-card">
2659          <div class="learn-card-icon">💻</div>
2660          <h3>Memaksimalkan Tools AI</h3>
2661          <p>Ketahui cara memanfaatkan tools AI untuk membantu pekerjaan seller marketplace menjadi lebih cepat dan efisien.</p>
2662        </div>
2663        <div class="learn-card">
2664          <div class="learn-card-icon">💬</div>
2665          <h3>Evaluasi Toko dibantu AI</h3>
2666          <p>AI untuk bantu baca kondisi dan evaluasi toko, bahkan ketika Anda belum terbiasa dengan analisis data.</p>
2667        </div>
2668        <div class="learn-card">
2669          <div class="learn-card-icon">📊</div>
2670          <h3>
2670Analisis Kompetitor</h3>
2671          <p>Pantau dan analisis strategi kompetitor secara real-time dengan AI.</p>
2672        </div>
2673      </div>
2674    </div>
2675  </section>
2676
2677  <!-- ===== Pricing & Benefits ===== -->
2678  <section id="pricing" style="background: var(--bg-section); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);">
2679    <div class="container">
2680      <div class="section-header">
2681        <h2>Investasi &amp; Benefit</h2>
2682        <p>Sekali investasi, manfaat jangka panjang untuk toko Shopee kamu.</p>
2683      </div>
2684      <div class="pricing-card">
2685        <div class="pricing-badge">Best</div>
2686        <div class="pricing-header">
2687          <h3>Paket Lengkap Webinar</h3>
2688          <div class="price-display">
2689            <span class="price-old">Rp 150.000</span>
2690            <span class="price-new">Rp 79.000</span>
2691          </div>
2692        </div>
2693        <div class="pricing-body">
2694          <ul class="pricing-benefits-list">
2695            <li><div class="benefit-icon">✓</div><span>Live Zoom Webinar (+- 2Jam)</span></li>
2696            <li><div class="benefit-icon">✓</div><span>Akses AI Asisten Seller (Free 8 Hari)</span></li>
2697            <li><div class="benefit-icon">✓</div><span>Sesi Q&amp;A Langsung dengan Mentor</span></li>
2698            <li><div class="benefit-icon">✓</div><span>Recording Webinar (Terpisah)</span></li>
2699          </ul>
2700          <button type="button" class="btn btn-primary btn-block btn-lg" onclick="document.getElementById('checkout').scrollIntoView({behavior:'smooth'})">
2701            Daftar Webinar Sekarang
2702          </button>
2703        </div>
2704      </div>
2705    </div>
2706  </section>
2707
2708  <!-- ===== Speaker ===== -->
2709  <section style="background: var(--bg-section); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);">
2710    <div class="container">
2711      <div class="section-header">
2712        <h2>Speaker Webinar</h2>
2713      </div>
2714      <div class="speaker-card">
2715        <div class="speaker-avatar">
2716          <img src="https://cdn.scalev.com/uploads/1786519695/zyERVRLZaX-2bO7wKClnwQ/1786519695651-SHOPEE-ADS-AKSELERATOR.webp" alt="Speaker">
2717        </div>
2718        <div class="speaker-info">
2719          <h3>Mahdi As-Syarqi</h3>
2720          <div class="speaker-role">E-commerce AI Strategist &amp; Official Shopee Seller Mentor</div>
2721          <p class="speaker-bio">Berpengalaman 5+ tahun dalam e-commerce dan AI automation. Telah membantu banyak seller Shopee meningkatkan omzet dengan teknologi AI. Praktisi langsung yang menerapkan AI tools dalam operasional tokonya.</p>
2722        </div>
2723      </div>
2724    </div>
2725  </section>
2726
2727  <!-- ===== Agenda ===== -->
2728  <section>
2729    <div class="container">
2730      <div class="section-header">
2731        <h2>Agenda Webinar</h2>
2732        <p>Pembelajaran praktis dan langsung bisa diterapkan.</p>
2733      </div>
2734      <div class="agenda-timeline">
2735        <div class="agenda-item">
2736          <div class="agenda-time">20:00</div><div class="agenda-dot"></div>
2737          <div class="agenda-content"><h3>Opening &amp; Perkenalan</h3><p>Sambutan, perkenalan, dan gambaran umum webinar.</p></div>
2738        </div>
2739        <div class="agenda-item">
2740          <div class="agenda-time">20:10</div><div class="agenda-dot"></div>
2741          <div class="agenda-content"><h3>Mengapa Seller Perlu Menggunakan AI?</h3><p>AI dapat membantu seller bekerja lebih cepat serta fokus pada strategi.</p></div>
2742        </div>
2743        <div class="agenda-item">
2744          <div class="agenda-time">20:20</div><div class="agenda-dot"></div>
2745          <div class="agenda-content"><h3>Mengenal AI Secara Fundamental</h3><p>Penjelasan dasar mengenai AI dan cara kerja AI secara sederhana.</p></div>
2746        </div>
2747        <div class="agenda-item">
2748          <div class="agenda-time">20:40</div><div class="agenda-dot"></div>
2749          <div class="agenda-content"><h3>Implementasi AI untuk R&amp;D</h3><p>Contoh penggunaan AI untuk mengembangkan ide, menyusun strategi dan membuat variasi konten.</p></div>
2750        </div>
2751        <div class="agenda-item">
2752          <div class="agenda-time">21:00</div><div class="agenda-dot"></div>
2753          <div class="agenda-content"><h3>Evaluasi Toko dengan Bantuan AI</h3><p>Gambaran cara menggunakan AI untuk membantu mengevaluasi performa toko.</p></div>
2754        </div>
2755        <div class="agenda-item">
2756          <div class="agenda-time">21:15</div><div class="agenda-dot"></div>
2757          <div class="agenda-content"><h3>Live Q&amp;A / Tanya Jawab</h3><p>Tanya jawab langsung dengan mentor seputar materi AI.</p></div>
2758        </div>
2759      </div>
2760    </div>
2761  </section>
2762
2763  <!-- ===== Checkout Form ===== -->
2764  <section class="checkout-section" id="checkout">
2765    <div class="container">
2766      <div class="section-header">
2767        <h2>Formulir Pendaftaran</h2>
2768        <p>Isi data diri Anda dan selesaikan pembayaran untuk mengamankan slot webinar.</p>
2769      </div>
2770      
2771      <div class="checkout-grid">
2772        <div class="checkout-form-wrapper">
2773          <h2>Daftar Webinar</h2>
2774          <p>Lengkapi data di bawah ini untuk bergabung.</p>
2775
2776          <div class="error-banner" id="error-banner"></div>
2777
2778          <form id="checkout-form" novalidate="">
2779            <!-- Customer Info -->
2780            <fieldset>
2781              <legend>Informasi Peserta</legend>
2782              <div class="form-group">
2783                <label class="form-label" for="cust-name">Nama Lengkap <span class="req">*</span></label>
2784                <input type="text" id="cust-name" class="form-input" placeholder="Nama lengkap Anda" required="">
2785                <div class="form-error" id="error-cust-name">Nama wajib diisi.</div>
2786              </div>
2787              <div class="form-group">
2788                <label class="form-label" for="cust-phone">Nomor WhatsApp <span class="req">*</span></label>
2789                <input type="tel" id="cust-phone" class="form-input" placeholder="08xxxxxxxxxx" required="">
2790                <div class="form-error" id="error-cust-phone">Nomor WhatsApp wajib diisi.</div>
2791              </div>
2792              <div class="form-group">
2793                <label class="form-label" for="cust-email">Email <span class="req">*</span></label>
2794                <input type="email" id="cust-email" class="form-input" placeholder="[email protected]" required="">
2795                <div class="form-error" id="error-cust-email">Email wajib diisi dan valid.</div>
2796              </div>
2797            </fieldset>
2798
2799            <!-- Upsell -->
2800            <fieldset>
2801              <legend>Tambahkan ke Pesanan (Opsional)</legend>
2802              <div id="upsell-box" class="upsell-box"></div>
2803            </fieldset>
2804
2805            <!-- Payment Method -->
2806            <fieldset id="payment-fieldset">
2807              <legend>Metode Pembayaran</legend>
2808              <div class="payment-methods-list" id="payment-methods"></div>
2809              <div class="form-error" id="error-payment">Metode pembayaran wajib dipilih.</div>
2810            </fieldset>
2811
2812            <!-- Ringkasan Pesanan -->
2813            <fieldset>
2814              <legend>Ringkasan Pesanan</legend>
2815              <div class="summary-card-inside">
2816                <div class="summary-product">
2817                  <div class="summary-product-icon">🎓</div>
2818                  <div class="summary-product-info">
2819                    <h4 id="summary-product-name">Memuat produk...</h4>
2820                    <p id="summary-product-desc">Mohon tunggu sebentar</p>
2821                  </div>
2822                </div>
2823                
2824                <!-- Baris Upsell di Ringkasan (Akan muncul jika dicentang) -->
2825                <div class="summary-upsell-row" id="summary-upsell-row" style="display:none;">
2826                  <div class="summary-product-icon">📚</div>
2827                  <div class="summary-product-info">
2828                    <h4 id="summary-upsell-name">Upsell</h4>
2829                    <p id="summary-upsell-price">+ Rp —</p>
2830                  </div>
2831                </div>
2832
2833                <div class="summary-line summary-item-line">
2834                  <span id="summary-product-line-name">Webinar</span>
2835                  <span id="summary-product-price">Rp —</span>
2836                </div>
2837                <div class="summary-line summary-item-line" id="summary-bundle-price-row" style="display:none;">
2838                  <span id="summary-bundle-line-name">Bundle</span>
2839                  <span id="summary-bundle-price">+ Rp —</span>
2840                </div>
2841                <div class="summary-line discount" id="summary-discount-row" style="display:none;">
2842                  <span>Harga Diskon</span>
2843                  <span id="summary-discount">- Rp —</span>
2844                </div>
2845                <div class="summary-line" id="summary-other-income-row" style="display:none;">
2846                  <span id="summary-other-income-name">Biaya tambahan</span>
2847                  <span id="summary-other-income">Rp —</span>
2848                </div>
2849                <div class="summary-line" id="summary-service-fee-row" style="display:none;">
2850                  <span>Biaya layanan</span>
2851                  <span id="summary-service-fee">Rp —</span>
2852                </div>
2853                <div class="summary-line total">
2854                  <span>Total</span>
2855                  <span id="summary-total">Rp —</span>
2856                </div>
2857              </div>
2858            </fieldset>
2859
2860            <!-- Discount Code -->
2861            <fieldset>
2862              <legend>Kode Diskon (Opsional)</legend>
2863              <div class="discount-row">
2864                <input type="text" id="discount-code" class="form-input" placeholder="Masukkan kode diskon">
2865                <button type="button" class="btn-discount" id="apply-discount">Terapkan</button>
2866              </div>
2867              <div class="discount-msg" id="discount-msg"></div>
2868            </fieldset>
2869
2870            <!-- Submit -->
2871            <button type="submit" class="btn btn-primary btn-block submit-btn" id="submit-btn">
2872              <span class="spinner"></span>
2873              <span class="btn-text">Daftar &amp; Bayar Sekarang</span>
2874            </button>
2875          </form>
2876        </div>
2877      </div>
2878    </div>
2879  </section>
2880
2881  <!-- ===== FAQ ===== -->
2882  <section>
2883    <div class="container">
2884      <div class="section-header">
2885        <h2>Pertanyaan yang Sering Diajukan</h2>
2886      </div>
2887      <div class="faq-list">
2888        <div class="faq-item">
2889          <button type="button" class="faq-question" onclick="toggleFaq(this)">
2890            Apakah saya perlu pengalaman AI sebelumnya?
2891            <span class="faq-icon">+</span>
2892          </button>
2893          <div class="faq-answer">
2894            <p>Tidak! Webinar ini dirancang untuk semua level, dari pemula yang belum pernah menggunakan AI hingga seller yang sudah advanced. Materi akan mencakup dasar-dasar hingga strategi advanced.</p>
2895          </div>
2896        </div>
2897        <div class="faq-item">
2898          <button type="button" class="faq-question" onclick="toggleFaq(this)">
2899            Bagaimana cara mengikuti webinar?
2900            <span class="faq-icon">+</span>
2901          </button>
2902          <div class="faq-answer">
2903            <p>Setelah mendaftar dan pembayaran terkonfirmasi, link Zoom Meeting akan dikirim ke email Anda sebelum acara dimulai. Pastikan email yang Anda daftarkan aktif.</p>
2904          </div>
2905        </div>
2906        <div class="faq-item">
2907          <button type="button" class="faq-question" onclick="toggleFaq(this)">
2908            Apakah ada rekaman webinar?
2909            <span class="faq-icon">+</span>
2910          </button>
2911          <div class="faq-answer">
2912            <p>Ya! Rekaman webinar tersedia terpisah (berbayar), Anda bisa menambahkan produk rekaman ketika mau daftar. Sehingga tetap bisa menonton rekamannya kapan saja.</p>
2913          </div>
2914        </div>
2915        <div class="faq-item">
2916          <button type="button" class="faq-question" onclick="toggleFaq(this)">
2917            Saya pemula di Shopee, apakah cocok?
2918            <span class="faq-icon">+</span>
2919          </button>
2920          <div class="faq-answer">
2921            <p>Sangat cocok! Justru sebagai pemula, Anda akan belajar strategi yang tepat sejak awal sehingga bisa lebih cepat berkembang dibanding seller lain yang masih manual.</p>
2922          </div>
2923        </div>
2924      </div>
2925    </div>
2926  </section>
2927
2928  <!-- ===== Footer ===== -->
2929  <footer class="footer">
2930    <div class="container">
2931      <p>© 2026 Autopreneur — AI Seller Academy. All rights reserved.</p>
2932    </div>
2933  </footer>
2934
2935  <!-- ===== Success Overlay ===== -->
2936  <div class="success-overlay" id="success-overlay">
2937    <div class="success-card">
2938      <div class="success-icon">✅</div>
2939      <h3>Pendaftaran Berhasil!</h3>
2940      <p>Pesanan Anda telah dibuat. Detail pembayaran telah dikirim ke email Anda.</p>
2941      <div class="success-detail">
2942        <div class="success-detail-row">
2943          <span>Order ID</span>
2944          <span id="success-order-id">—</span>
2945        </div>
2946        <div class="success-detail-row">
2947          <span>Total</span>
2948          <span id="success-total">—</span>
2949        </div>
2950        <div class="success-detail-row">
2951          <span>Status</span>
2952          <span id="success-status">Menunggu Pembayaran</span>
2953        </div>
2954      </div>
2955      <p style="font-size:0.8125rem; color:var(--text-muted);">Cek email Anda secara berkala. Link Zoom akan dikirim H-1 sebelum acara.</p>
2956    </div>
2957  </div>
2958</div>
2959<div id="locator" aria-hidden="true"></div>
2960
2961<script id="scalev-data" type="application/json">{"page":{"id":329612,"uniqueId":"page_4c46139965274b6c","username":"autopreneur","business":{"username":"autopreneur"}},"store":{"id":13044,"unique_id":"store_ci7iPmSyWlgGvhrtHepMpdem","uuid":"d397de23-9b4b-470d-8d4a-76588ca7c2aa","name":"Autopreneur","logo":"https://cdn.scalev.com/Store/sxl8Wp8lY-lbviu5mi7Uh9blE1SgjzG6suH0-4vj-jY/1740732367459-logo-new.webp","is_active":true,"payment_link_checkout_mode":"flexible","payment_method_options":[{"value":"bt:BCA:pa_2dxoRZ9GvF5N8hyPQgJbkEK4","display":"Bank Central Asia (Naufal Muktaz Mahdi)","logo_url":"https://cdn.scalev.com/assets/images/banks/bca.png"},{"value":"dana","display":"DANA","logo_url":"https://cdn.scalev.com/icons/dana.png"},{"value":"gopay","display":"GoPay","logo_url":"https://cdn.scalev.com/icons/gopay.png"},{"value":"invoice","display":"Virtual Account / GoPay / DANA","logo_url":"https://cdn.scalev.com/icons/invoice.png"},{"value":"qris","display":"QRIS","logo_url":"https://cdn.scalev.com/icons/qris.png"},{"value":"shopeepay","display":"ShopeePay","logo_url":"https://cdn.scalev.com/icons/shopeepay.png"},{"value":"va_bni","display":"BNI Virtual Account","logo_url":"https://cdn.scalev.com/icons/va_bni.png"},{"value":"va_bri","display":"BRI Virtual Account","logo_url":"https://cdn.scalev.com/icons/va_bri.png"},{"value":"va_mandiri","display":"Bank Mandiri Virtual Account","logo_url":"https://cdn.scalev.com/icons/va_mandiri.png"},{"value":"va_permata","display":"Bank Permata Virtual Account","logo_url":"https://cdn.scalev.com/icons/va_permata.png"}],"payment_methods":["bank_transfer","dana","gopay","invoice","qris","shopeepay","va_bni","va_bri","va_mandiri","va_permata"],"payment_accounts":[{"id":16813,"unique_id":"pa_2dxoRZ9GvF5N8hyPQgJbkEK4","method":"bank_transfer","account_holder":"Naufal Muktaz Mahdi","account_number":"8265448417","financial_entity":{"id":3,"code":"bca","name":"Bank Central Asia"}}],"error_order_notification":{"message":null,"phone":null},"is_postal_code":false,"postal_code_requirement":"autofill","products":[{"id":445307,"uuid":"90df9390-d7fd-4e14-b9b7-4376bc6ad17c","name":"Webinar : Naikin Profit Pakai AI","public_name":"Webinar : Naikin Profit Pakai AI","slug":"webinar-ai-seller-academy","item_type":"digital","status":"active","variant_count":1,"images":["https://cdn.scalev.com/uploads/1788230895/8Ch0OgEIwHUKhoS0oSv3Rg/1788230895818-AI-Seller-Webinar-2.webp"],"gallery_images":["https://cdn.scalev.com/uploads/1788230895/8Ch0OgEIwHUKhoS0oSv3Rg/1788230895818-AI-Seller-Webinar-2.webp"],"variants":[{"id":574998,"unique_id":"variant_WVUALfENOuAbgYkc7YqtR6G2","name":"Webinar : Naikin Profit Pakai AI","product_name":"Webinar : Naikin Profit Pakai AI","price":"79000.00","price_mode":"fixed","weight":0,"images":["https://cdn.scalev.com/uploads/1788230895/8Ch0OgEIwHUKhoS0oSv3Rg/1788230895818-AI-Seller-Webinar-2.webp"],"gallery_images":["https://cdn.scalev.com/uploads/1788230895/8Ch0OgEIwHUKhoS0oSv3Rg/1788230895818-AI-Seller-Webinar-2.webp"]}]}],"bundle_price_options":[{"id":41348,"unique_id":"bpo_aAFwoHhcXnPGD_AtWidHnFpC","slug":"webinar-naikin-profit-pakai-ai-harga-diskon-nzhcjt","bundle_id":30950,"name":"Rekaman Webinar","description":"","price":"49000.00","bundle":{"id":30950,"name":"Rekaman Webinar : Naikin Profit Pakai AI","public_name":"Rekaman Webinar : Naikin Profit Pakai AI","images":[],"bundlelines":[{"id":159901,"variant_id":576160,"variant":{"id":576160,"business_id":12808,"product_id":446036,"unique_id":"variant_NuX9iTCb3JrxNEMmagioNvRo","sku":null,"description":null,"rich_description":null,"price":"49000.00","price_mode":"fixed","minimum_customer_price":null,"images":[],"display_images":[],"gallery_images":[],"product_featured_image_url":null,"image_configs":{},"weight":0,"metadata":{"special_uuid":"a6e0dadf-773d-4628-9aab-11dd774afa41"},"item_type":"digital","is_file_enabled":true,"is_lms_enabled":false,"is_license_enabled":false,"pricing_type":"one_time","interval":null,"interval_count":null,"validity_period_unit":null,"validity_period":null,"product_name":"Rekaman Webinar : Naikin Profit Pakai AI","product_public_name":"Rekaman Webinar : Naikin Profit Pakai AI","option1_name":null,"option2_name":null,"option3_name":null,"option1_value":null,"option2_value":null,"option3_value":null,"name":"Rekaman Webinar : Naikin Profit Pakai AI","available_qty":null,"config":{}},"quantity":1}]}}]},"after_checkout":{"type":"success_page"},"_analytics":{"submit":{"facebook":{"pixels":[{"id":4312,"name":"Pixel FB Scalev","pixel_id":"880115360868945"},{"id":8811,"name":"Autopreneur.id - Pixel","pixel_id":"1148933853431977"},{"id":32991,"name":"Pixel Interest IJAB","pixel_id":"2298824807282800"}],"events":["InitiateCheckout"],"parameters":{"InitiateCheckout":[]}},"tiktok":{"pixels":[{"id":416,"name":"Pixel Tiktok IJAB","pixel_id":"CSV9QOBC77UDA082778G"}],"events":["InitiateCheckout"],"parameters":{"InitiateCheckout":[]}},"kwai_client":{"pixels":[],"events":["formSubmit"],"parameters":{"formSubmit":[]}}
2961,"kwai_server":{"pixels":[],"events":["EVENT_FORM_SUBMIT"],"parameters":{"EVENT_FORM_SUBMIT":[]}}},"gtm":null,"onload":{"facebook":{"pixels":[{"id":4312,"name":"Pixel FB Scalev","pixel_id":"880115360868945"},{"id":8811,"name":"Autopreneur.id - Pixel","pixel_id":"1148933853431977"},{"id":32991,"name":"Pixel Interest IJAB","pixel_id":"2298824807282800"}],"events":["ViewContent"],"parameters":{}},"tiktok":{"pixels":[{"id":416,"name":"Pixel Tiktok IJAB","pixel_id":"CSV9QOBC77UDA082778G"}],"events":["ViewContent"],"parameters":{}},"kwai_client":{"pixels":[],"events":["contentView"],"parameters":{}},"kwai_server":{"pixels":[],"events":["EVENT_CONTENT_VIEW"],"parameters":{}}}},"entity_type":null,"is_multiple":false,"is_product_page":false}</script>
vendor: 1 bytes, line 2961
2961
2962<script id="scalev-runtime" type="text/javascript" data-page-unique-id="page_4c46139965274b6c" data-checkout-intent-page-unique-id="page_4c46139965274b6c" data-business-username="autopreneur" data-context-token="eyJwYWdlVW5pcXVlSWQiOiJwYWdlXzRjNDYxMzk5NjUyNzRiNmMiLCJidXNpbmVzc1VzZXJuYW1lIjoiYXV0b3ByZW5ldXIiLCJob3N0IjoiYXV0b3ByZW5ldXIuaWQiLCJpYXQiOjE3OTA5MDU1MDAsImV4cCI6MTc5MDkwOTEwMCwicmVuZXdfZXhwIjoxNzkwOTkxOTAwfQ.Uk0xG4Ypcw__o45mPzAFMYc5uFkvZk1TvTd_DsJhSxk" data-page-api-key="ppk_W4FGL4aRQKDbL8CgoN9GSSSxkHEEX6wPtjF47Uxk1HQJ6GzzbdOG26pKMkDIIxr5" data-nexus-api-url="https://api.scalev.com/v2" data-api-version="v3" data-recaptcha-site-key-form="6LeTIlsrAAAAAOBBefeqfCZXNMHx61ZFZH4QYqMe" data-analytics-ingest-token="SFMyNTY.g2gDdAAAAAd3AWN3BHRydWV3AWJiAAAyCHcBc2IAADL0dwFpbQAAAAYzMjk2MTJ3AXBiAAUHjHcBdmECdwFlbQAAAAxsYW5kaW5nX3BhZ2VuBgCADiD6oAFiAAFRgA.p-amrgoUcWhJezj92Zkp_lzzxbRQXNUMWIjorzvKWOI" data-analytics-entity-type="" data-analytics-entity-id="" data-analytics-surface="html_mode">(function(){var Zt="__sclv_analytics_owner__",Or="__sclv_analytics_reload__",lt="__sclv_analytics_document_path__",Xt=new URL(window.location.href).pathname;if(window[Zt]==="standard"||window[lt]&&window[lt]!==Xt){window[Or]=!0;var oe=window.__sclv_analytics__;oe&&typeof oe.closePage=="function"&&oe.closePage(),oe&&typeof oe.flush=="function"&&oe.flush(),window.location&&typeof window.location.replace=="function"?window.location.replace(window.location.href):window.location&&typeof window.location.reload=="function"&&window.location.reload();return}window[Zt]="html_mode",window[lt]=Xt;var Qt=document.currentScript||document.getElementById("scalev-runtime"),E=Qt&&Qt.dataset||{},_e=null,Le=null,ft=null,en=null,tn=!1,nn="/api/v3",rn="/api/scalev-runtime",an=60,on="scalev_html_mode_context_token_reload_at",cn="scalev_html_mode_missing_context_token_reloaded",Pr=30*1e3,Lr="https://cdn.scalev.com/assets/images/kurir",Ne=window.__SCALEV_CHECKOUT_INTENT_TIMING__||{},Nr=Number(Ne.debounceMs)||2500,Dr=Number(Ne.maxWaitMs)||15e3,Mr=Number(Ne.captureDebounceMs)||400,jr=Number(Ne.reconcileMs)||5e3,Rr="html-mode-main-form",Ur="scalev:checkout-intent:html:v2",s={initialized:!1,clientSessionId:null,id:null,token:null,expiresAt:null,nextSequence:1,lastActivityAt:0,sessionKey:null,latestSnapshot:null,latestSnapshotSignature:null,baselineSnapshotSignature:null,lastSentSnapshotSignature:null,pendingSnapshot:null,startPromise:null,requestChain:Promise.resolve(),debounceTimer:null,maxWaitTimer:null,captureTimer:null,reconcileTimer:null,retryTimer:null,retryAttempt:0,retryPending:!1,freshClientSession:!1,domCapturedFields:{},tokenRecoveryAttempted:!1,terminal:!1},sn=800,pt=new Set,v={pageUniqueId:E.pageUniqueId||"",checkoutIntentPageUniqueId:E.checkoutIntentPageUniqueId||E.pageUniqueId||"",checkoutIntentStoreUniqueId:E.checkoutIntentStoreUniqueId||E.pageUniqueId||"",businessUsername:E.businessUsername||"",contextToken:E.contextToken||"",pageApiKey:E.pageApiKey||"",nexusApiUrl:E.nexusApiUrl||"",recaptchaSiteKeyForm:E.recaptchaSiteKeyForm||"",analyticsIngestToken:E.analyticsIngestToken||"",analyticsEntityType:E.analyticsEntityType||"",analyticsEntityId:E.analyticsEntityId||"",analyticsSurface:E.analyticsSurface==="builder"?"builder":"html_mode"},_t=window.__SCALEV_HTML_MODE_DEBUG__===!0||new URLSearchParams(window.location.search).get("html_mode_debug")==="1",De=window.__SCALEV_HTML_MODE_DIAGNOSTICS__=window.__SCALEV_HTML_MODE_DIAGNOSTICS__||[];function O(e,t,n,r){if(window.__SCALEV_RECORD_DOCUMENT_DIAGNOSTIC__){var i=window.__SCALEV_RECORD_DOCUMENT_DIAGNOSTIC__(e||"warning",t,n,r);return un(),i}var a={level:e||"warning",code:t,message:n,details:D(r||{}),timestamp:new Date().toISOString()};return De.length<100&&De.push(a),un(),a}function F(e,t){window.console&&typeof window.console.warn=="function"&&window.console.warn("[Analytics] "+e,t)}function Fr(){_t&&(window.__SCALEV_RECORD_DOCUMENT_DIAGNOSTIC__||(window.addEventListener("error",function(e){O("error","runtime_error",e.message,{filename:e.filename,lineno:e.lineno,colno:e.colno})}),window.addEventListener("unhandledrejection",function(e){O("error","unhandled_promise_rejection",e.reason&&e.reason.message?e.reason.message:String(e.reason||"Unhandled promise rejection"),{})})),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Me):setTimeout(
2962Me,0),window.addEventListener("load",Me),window.addEventListener("resize",Kr(Me,250)))}function Kr(e,t){var n=null;return function(){clearTimeout(n),n=setTimeout(e,t)}}function un(){if(!(!_t||typeof document=="undefined")){var e=document.getElementById("scalev-html-mode-debug-overlay");e||(e=document.createElement("div"),e.id="scalev-html-mode-debug-overlay",e.style.cssText="position:fixed;right:12px;bottom:12px;z-index:2147483647;max-width:360px;max-height:45vh;overflow:auto;background:#101828;color:#fff;border-radius:8px;box-shadow:0 12px 32px rgba(16,24,40,.28);font:12px/1.45 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;padding:10px 12px;",document.body.appendChild(e));var t=De.slice(-8);e.innerHTML='<strong style="display:block;margin-bottom:6px;">Scalev Agent Diagnostics</strong>'+(t.length?t.map(function(n){return'<div style="border-top:1px solid rgba(255,255,255,.16);padding-top:6px;margin-top:6px;"><span style="color:'+(n.level==="error"?"#FDA29B":"#FEC84B")+'">'+x(n.code)+"</span><br>"+x(n.message)+"</div>"}).join(""):"<span>No diagnostics yet.</span>")}}function x(e){return String(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Me(){if(!(!_t||typeof document=="undefined")){var e=document.documentElement;e&&e.scrollWidth>window.innerWidth+4&&O("warning","horizontal_overflow","Page content overflows horizontally.",{scrollWidth:e.scrollWidth,viewportWidth:window.innerWidth});var t=document.querySelector('a[href], button, input[type="submit"], input[type="button"]');t||O("warning","missing_primary_cta","No primary CTA element was found."),Array.prototype.slice.call(document.querySelectorAll("input, select, textarea")).filter(function(n){return!(n.type==="hidden"||n.getAttribute("aria-label")||n.getAttribute("aria-labelledby")||n.id&&document.querySelector('label[for="'+n.id+'"]'))}).forEach(function(n){O("warning","unlabeled_form_control","Form control is missing a label.",{name:n.name||"",type:n.type||n.tagName})})}}function ce(e){for(var t=e+"=",n=document.cookie?document.cookie.split(";"):[],r=0;r<n.length;r+=1){var i=n[r].trim();if(i.indexOf(t)===0)return i.slice(t.length)}return null}function je(e){try{return decodeURIComponent(e||"")}catch{return e||""}}function Br(e){return!!ce(e)}function zr(){var e=document.getElementById("scalev-data");if(!e||!e.textContent)return{};try{return JSON.parse(e.textContent)}catch{return{}}}function V(){return zr()||{}}function Vr(){return V().page||{}}function ve(){return V().store||null}function p(e){var t={};return Object.keys(e||{}).forEach(function(n){var r=e[n];r!=null&&r!==""&&(t[n]=r)}),t}function c(){for(var e=0;e<arguments.length;e+=1){var t=arguments[e];if(t!=null&&t!=="")return t}}function dn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hr(e){return String(e).replace(/_([a-zA-Z0-9])/g,function(t,n){return n.toUpperCase()})}function ln(e){return String(e).replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase()}function Yr(e){return{parameters:!0,metadata:!0,visitPrivacy:!0,visit_privacy:!0,customData:!0,custom_data:!0,customDataJson:!0,custom_data_json:!0}[e]===!0}function Re(e,t,n){if(Array.isArray(e))return e.map(function(a){return Re(a,t,n)});if(!dn(e)||Yr(n))return e;var r={},i=[];return Object.keys(e).forEach(function(a){var o=t==="runtime"?Hr(a):ln(a),u=Re(e[a],t,o),d=!Object.prototype.hasOwnProperty.call(r,o)||a===o;d&&(r[o]=u),t==="runtime"&&a!==o&&i.push({key:a,targetKey:o})}),t==="runtime"&&(Object.keys(r).forEach(function(a){var o=ln(a);o!==a&&i.push({key:o,targetKey:a})}
2962),i.forEach(function(a){Object.prototype.hasOwnProperty.call(r,a.key)||f(r,a.key,r[a.targetKey])})),r}function Wr(e){return Re(e,"runtime")}function D(e){return Wr(e)}function fn(e){return Re(e,"backend")}function se(){var e=Vr();return c(e.uniqueId,e.unique_id,v.pageUniqueId)}function R(e){var t=se();if(!t)throw new Error("Missing Scalev page context.");return"/pages/"+encodeURIComponent(t)+e}function vt(e){return"/pages/"+encodeURIComponent(v.checkoutIntentPageUniqueId)+e}function X(){var e=ve()||{},t=e.products||[],n=[];return t.forEach(function(r){(r.variants||[]).forEach(function(i){n.push(i)})}),n}function Ue(e){return e&&e.variant||e||{}}function pn(e){e=e||{};var t=Ue(e),n=c(e.customerPrice,e.customer_price,t.customerPrice,t.customer_price);return Ge(t,n)}function H(e){e=e||{};var t=c(e.variantId,e.variant_id,e.id);if(t!==void 0)return t;var n=c(e.variant_unique_id,e.variantUniqueId,e.unique_id,e.uniqueId);if(n){var r=X().find(function(i){return c(i.unique_id,i.uniqueId)===n});return r&&r.id}}function mt(e){e=e||{};var t=c(e.variant_unique_id,e.variantUniqueId,e.unique_id,e.uniqueId,e.variant);if(t!==void 0)return t;var n=c(e.variantId,e.variant_id,e.id);if(n!==void 0){var r=X().find(function(i){return String(c(i.id,i.variant_id))===String(n)});return r&&c(r.unique_id,r.uniqueId)}}function Gr(e){return e=e||{},c(e.destinationSubdistrictId,e.destination_subdistrict_id,e.subdistrictId,e.subdistrict_id,e.destinationId,e.destination_id,e.destination,e.locationId,e.location_id,e.location)}function Fe(e){return e&&typeof e=="object"?c(e.unique_id,e.uniqueId,e.warehouse_unique_id,e.warehouseUniqueId,e.warehouse&&Fe(e.warehouse),e.id):e}function ht(e){return e&&typeof e=="object"?c(e.id,e.courier_service_id,e.courierServiceId,e.service_id,e.serviceId):e}function Jr(e){return!e||typeof e!="object"?null:c(e.courier_service&&e.courier_service.courier&&e.courier_service.courier.code,e.courierService&&e.courierService.courier&&e.courierService.courier.code,e.courier&&e.courier.code,e.courier_co
2962de,e.courierCode,e.service_code,e.serviceCode)}function $r(e){return e=String(e||"").trim(),e?Lr+"/"+encodeURIComponent(e)+".png":null}function ue(e){if(!e||typeof e!="object")return e;if(e.logoUrl||e.logo_url)return D(e);var t=$r(Jr(e));return D(t?Object.assign({},e,{logoUrl:t}):e)}function Zr(e){if(Array.isArray(e))return e.map(ue);if(!e||typeof e!="object")return e;if(Array.isArray(e.data))return Object.assign({},e,{data:e.data.map(ue)});if(e.data&&typeof e.data=="object"){if(Array.isArray(e.data.data))return Object.assign({},e,{data:Object.assign({},e.data,{data:e.data.data.map(ue)})});if(Array.isArray(e.data.results))return Object.assign({},e,{data:Object.assign({},e.data,{results:e.data.results.map(ue)})})}return Array.isArray(e.results)?Object.assign({},e,{results:e.results.map(ue)}):ue(e)}function Ke(e){return String(e||"").trim().replace(/[\s-]+/g,"_")}var Be={BCA:"va_bca",BNI:"va_bni",BRI:"va_bri",MANDIRI:"va_mandiri",PERMATA:"va_permata",CIMB:"va_cimb",BSI:"va_bsi",MAYBANK:"va_maybank",BNC:"va_bnc",DANAMON:"va_danamon",AG:"va_artha_graha",BAG:"va_artha_graha",BMI:"va_muamalat",BTN:"va_btn",OCBC:"va_ocbc",BJB:"va_bjb",SAHABAT_SAMPOERNA:"va_sahabat_sampoerna",ARTAJASA:"va_artajasa"},_n=Object.keys(Be).reduce(function(e,t){var n=Be[t];return e[n]||(e[n]=t),e},{});function me(e){return e&&typeof e=="object"?e.value:e}function Y(e){return e=me(e),typeof e!="string"?e:Ke(e).toUpperCase()}function gt(e){return Be[Y(e)]||null}function Xr(e){if(e=me(e),typeof e!="string")return null;var t=e.trim();if(!t)return null;var n=Ke(t),r=n.toLowerCase();if(_n[r])return _n[r];if(r.indexOf("va:")===0&&r.length>3)return Y(t.slice(3));var i=[];r.indexOf("va_")===0&&r.length>3&&i.push(n.slice(3)),r.slice(-3)==="_va"&&r.length>3&&i.push(n.slice(0,-3)),r.indexOf("va")===0&&r.length>2&&i.push(n.slice(2)),r.slice(-2)==="va"&&r.length>2&&i.push(n.slice(0,-2)),i.push(n);for(var a=0;a<i.length;a+=1){var o=Y(i[a]);if(Be[o])return o}return null}function Qr(){var e=ve()||{};return e.sub_payment_methods||e.subPaymentMethods||[]}function ei(){var e=ve()||{},t=e.is_payment_link_enabled!=null?e.is_payment_link_enabled:e.isPaymentLinkEnabled;if(typeof t=="boolean")return t;var n=e.payment_link_checkout_mode||e.paymentLinkCheckoutMode,r=e.payment_methods||e.paymentMethods||[];return n==="strict_two_step"&&r.indexOf("payment_link")!==-1}function vn(e){var t=Y(e);return t?Qr().some(function(n){return Y(n)===t}):!1}function ti(e){var t=Ke(e);if(!t)return null;var n=t.toLowerCase(),r=[];n.indexOf("va_")===0&&n.length>3&&r.push(t.slice(3)),n.slice(-3)==="_va"&&n.length>3&&r.push(t.slice(0,-3)),n.indexOf("va")===0&&n.length>2&&r.push(t.slice(2)),n.slice(-2)==="va"&&n.length>2&&r.push(t.slice(0,-2)),vn(t)&&r.push(t);for(var i=0;i<r.length;i+=1)if(vn(r[i]))return Y(r[i]);return null}function ni(e){if(e=me(e),typeof e!="string")return null;var t=Xr(e);if(t)return{paymentMethod:gt(t)};var n=ti(e);return n?{paymentMethod:gt(n)}:null}function ri(e){if(e=me(e),typeof e!="string")return null;var t=e.trim(),n=t.toLowerCase();if(n.indexOf("bt:")!==0)return null;var r=t.indexOf(":",3);if(r===-1)return null;var i=Y(t.slice(3,r)),a=t.slice(r+1).trim();return!i||!a?null:{paymentMethod:"bank_transfer",paymentAccountUniqueId:a}}function he(e){if(e=e||{},ei())return{paymentMethod:"payment_link"};var t=me(c(e.paymentMethod,e.payment_method)),n=Y(c(e.subPaymentMethod,e.sub_payment_method)),r=ri(t),i=ni(t);return r||(i?{paymentMethod:i.paymentMethod}:Ke(t).toLowerCase()==="va"&&n?{paymentMethod:gt(n)||"va"}:{paymentMethod:t})}function y(e){try{return e==="analytics"&&window.__sclv_self_traffic__&&!window.__sclv_self_traffic__.allowed()?!1:!!(window.__sclv_privacy__&&typeof window.__sclv_privacy__.allowed=="function"&&window.__sclv_privacy__.allowed(e))}catch{return!1}}function k(e){try{return!!(window.__sclv_privacy__&&typeof window.__sclv_privacy__.allowedProvider=="function"&&window.__sclv_privacy__.allowedProvider(e))}catch{return!1}}function Q(){try{return window.__sclv_privacy__&&typeof window.__sclv_privacy__.context=="function"?window.__sclv_privacy__.context():{}}catch{return{}}}function ge(){try{return window.__sclv_privacy__&&typeof window.__sclv_privacy__.visitContext=="function"?window.__sclv_privacy__.visitContext():{}}catch{return{}}}function yt(e){try{return!window.__sclv_privacy__||typeof window.__sclv_privacy__.serverTrackingAllowed!="function"||window.__sclv_privacy__.serverTrackingAllowed(e)!==!1}catch{return!0}}function ye(){var e=new URLSearchParams(window.location.search);return p({fbc:k("meta")?je(ce("_fbc")):void 0,fbp:k("meta")?je(ce("_fbp")):void 0,ttp:k("tiktok")?je(ce("_ttp")):void 0,ttclid:k("tiktok")?e.get("ttclid"):void 0,gclid:k("gtm")?e.get("gclid"):void 0,kwai_clickid:k("kwai")?e.get("click_id")||e.get("kwai_clickid"):void 0,utm_source:y("analytics")||y("marketing")?e.get("utm_source"):void 0,utm_medium:y("analytics")||y("marketing")?e.get("utm_medium"):void 0,utm_campaign:y("analytics")||y("marketing")?e.get("utm_campaign"):void 0,utm_c
2962ontent:y("analytics")||y("marketing")?e.get("utm_content"):void 0,utm_term:y("analytics")||y("marketing")?e.get("utm_term"):void 0,affiliate_code:e.get("ref")||e.get("aff")||e.get("affiliate_code")})}function ii(){return typeof window.matchMedia=="function"?window.matchMedia("(max-width: 767px)").matches:typeof window.innerWidth=="number"?window.innerWidth<=767:!1}function W(e){if(!(!e||typeof e!="object"))return c(e.id,e.unique_id,e.uniqueId,e.cart_id,e.cartId,e.cart&&W(e.cart))}function ai(){if(typeof document=="undefined")return null;var e=document.getElementById("scalev");if(!e)return null;var t=e.dataset&&e.dataset.scalev||(typeof e.getAttribute=="function"?e.getAttribute("data-scalev"):null);if(!t)return null;try{return JSON.parse(t)}catch{return null}}function mn(){var e=V(),t=ve(),n=ai();return c(e.cart&&W(e.cart),e.checkout&&e.checkout.cart&&W(e.checkout.cart),t&&t.cart&&W(t.cart),window.__SCALEV_CART__&&W(window.__SCALEV_CART__),window.ScalevCart&&W(window.ScalevCart),n&&W(n.cart),n&&n.windowObject&&W(n.windowObject.cart))}function oi(){return v.recaptchaSiteKeyForm?window.grecaptcha&&window.grecaptcha.enterprise?Promise.resolve(window.grecaptcha.enterprise):Le||(Le=new Promise(function(e,t){var n=document.createElement("script");n.src="https://www.google.com/recaptcha/enterprise.js?render="+encodeURIComponent(v.recaptchaSiteKeyForm),n.async=!0,n.defer=!0,n.onload=function(){e(window.grecaptcha&&window.grecaptcha.enterprise)},n.onerror=function(){t(new Error("Failed to load checkout security verification."))},document.head.appendChild(n)}),Le):Promise.resolve(null)}function hn(e,t,n){O("error",e,t,n||{});var r=new Error(t);return r.code=e,r}function gn(e){return e=e||"order_create",v.recaptchaSiteKeyForm?oi().then(function(t){return new Promise(function(n,r){if(!t||!t.ready){r(new Error("Checkout security verification is not available."));return}try{t.ready(function(){var i=window.grecaptcha&&window.grecaptcha.enterprise?window.grecaptcha.enterprise:t;if(!i.execute){r(new Error("Checkout security verification is not available."));return}Promise.resolve(i.execute(v.recaptchaSiteKeyForm,{action:e})).then(n).catch(r)})}catch(i){r(i)}})}).catch(function(t){throw O("error","recaptcha_failed","Checkout security verification failed.",{message:t&&t.message?t.message:String(t)}),t}):Promise.reject(hn("recaptcha_required","Checkout security verification is unavailable. Please try again later."))}function yn(){return p({"x-scalev-page-id":v.pageUniqueId,"x-scalev-business-username":v.businessUsername,"x-scalev-host":window.location.host})}function ci(e){if(!e||typeof e!="string"||e.indexOf(".")===-1||typeof window.atob!="function")return null;try{for(var t=e.split(".")[0],n=t.replace(/-/g,"+").replace(/_/g,"/");n.length%4;)n+="=";return JSON.parse(window.atob(n))}catch{return null}}function si(e){var t=ci(e);return!t||!t.exp?!1:t.exp-Math.floor(Date.now()/1e3)<=an}function bt(e){var t=e&&(e.statusMessage||e.message||e.error||e.statusText);return typeof t=="string"?t:""}function ui(e,t){var n=bt(t);return e.status===401&&n==="Expired HTML Mode runtime token"}function di(e,t){var n=bt(t);return e.status===401&&(n==="Expired HTML Mode runtime token"||n==="Missing HTML Mode runtime token")}function li(e){var t=Date.now();try{var n=window.sessionStorage;if(!n)return!1;if(e==="Missing HTML Mode runtime token")return n.getItem(cn)==="1"?!1:(n.setItem(cn,"1"),!0);var r=Number(n.getItem(on));return r&&t-r>=0&&t-r<Pr?!1:(n.setItem(on,String(t)),!0)}catch{return!1}}function bn(e){return li(e)?(O("warning","context_token_page_reload","Scalev runtime context token is stale; reloading the page.",{message:e||""}),window.location&&typeof window.location.reload=="function"?(window.location.reload(),!0):!1):!1}async function be(e){var t=await e.text();if(t)try{return JSON.parse(t)}catch{return t}return null}function wt(e,t){return t=t||[],e?typeof e=="string"?[t.length?t.join(".")+": "+e:e]:Array.isArray(e)?e.map(function(n){return wt(n,t)}).reduce(function(n,r){return n.concat(r)},[]):typeof e=="object"?Object.keys(e).map(function(n){return wt(e[n],t.concat(n))}).reduce(function(n,r){return n.concat(r)},[]):[]:[]}function wn(e,t){if(!e||typeof e!="object")return t;if(typeof e.message=="string"&&e.message)return e.message;if(typeof e.error=="string"&&e.error)return e.error;var n=wt(e.error||e.errors);return n.length?n.join("; "):typeof e.statusMessage=="string"&&e.statusMessage?e.statusMessage:t}function kt(e,t,n){if(!e.ok){n&&n.reloadOnContextTokenFailure&&di(e,t)&&bn(bt(t)),O("error","runtime_request_failed","Scalev runtime request failed.",{path:n&&n.path,status:e.status,response:t});var r=new Error(wn(t,e.statusText));throw r.status=e.status,r.data=t,r}return qt(t)}async function kn(e){if(_e)return await _e;_e=(async function(){var t=await fetch(rn+"/context-token",{method:"POST",headers:Object.assign({},yn(),{"x-scalev-context-token":e})}),n=kt(t,await be(t),{path:"/context-token",reloadOnContextTokenFailure:!0}),r=n&&n.token;if(!r)throw new Error("Scalev runtime context token renewal failed.");return v.contextToken=r,O("info","context_token_renewed","Scalev runtime context token renewed.",{}),r})();try{return await _e}finally{_e=null}}async function fi(){if(!v.contextToken)throw bn("Missing HTML Mode runtime token"),new Error("Missing Scalev runtime context token.");return si(v.contextToken)?await kn(v.contextToken):v.contextToken}function xn(e,t){var n=Object.assign({},yn(),{"x-scalev-context-token":t}),r;return e.body!==void 0&&(n["content-type"]="application/json",r=JSON.stringify(e.body)),v.pageApiKey&&(n["x-scalev-page-api-key"]=v.pageApiKey),e.headers&&(n=Object.assign(n,e.headers)),{method:e.method||"GET",headers:n,body:r,credentials:e.credentials||"same-origin",keepalive:e.keepalive===!0}}async function Sn(e,t,n){var r=await fi(),i=xn(n,r),a=await fetch(e,i),o=await be(a);return ui(a,o)&&(r=await kn(r),i=xn(n,r),a=await fetch(e,i),o=await be(a)),kt(a,o,{path:t,reloadOnContextTokenFailure:!0})}async function P(e,t){if(t=t||{},/\/analytics\//.test(e)){if(!yt())return{skipped:!0,reason:"privacy"};t=Object.assign({},t,{body:Object.assign({},t.body,{privacy:Q(),visit_privacy:ge()})})}var n=Object.assign({},t);n.body!==void 0&&(n.body=fn(n.body)),n.query&&(n.query=fn(n.query));var r=n.query?"?"+new URLSearchParams(n.query).toString():"";return await Sn(nn+e+r,e,n)}async function In(e,t){return t=t||{},await Sn(rn+e,e,t)}async function pi(e){var t=e?"?"+new URLSearchParams({checkout_intent_prefill_token:e}).toString():"",n=await fetch("/api/form-prefill"+t,{method:"GET",credentials:"same-origin"}),r=await be(n);return kt(n,r,{path:"/form-prefill",reloadOnContextTokenFailure:!1})}function _i(e){return e&&dn(e)&&Tt(e,"data")?e.data:e}function An(){var e=St();return e?"checkout-intent:"+e:"visitor"}function Cn(){return window.crypto&&typeof window.crypto.randomUUID=="function"?window.crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2)+"-"+Math.random().toString(36).slice(2)}function vi(){if(!v.checkoutIntentPageUniqueId||!v.pageApiKey)return!1;var e=V();if(!e.after_checkout&&!e.afterCheckout)return!1;var t=new URLSearchParams(window.location.search);if(t.has("preview_token")||t.has("draft_token")||t.has("formOnly")||t.has("merchant_preview")||t.has("builder_preview")||t.get("mode")==="draft"||t.get("draft")==="1")return!1;try{if(window.self&&window.top&&window.self!==window.top)return!1}catch{return!1}return!0}function S(){for(var e=0;e<arguments.length;
2962e+=1)if(arguments[e]!==void 0)return arguments[e]}function C(e,t){if(e!==void 0){if(e===null)return null;var n=String(e).trim();return n?n.slice(0,t):null}}function mi(e){if(e!==void 0){if(e===null||e==="")return null;var t=Number(e);return Number.isInteger(t)&&t>0?t:null}}var w={name:{payloadKey:"customer_name",maxLength:200},customername:{payloadKey:"customer_name",maxLength:200},fullname:{payloadKey:"customer_name",maxLength:200},buyername:{payloadKey:"customer_name",maxLength:200},email:{payloadKey:"customer_email",maxLength:320},customeremail:{payloadKey:"customer_email",maxLength:320},buyeremail:{payloadKey:"customer_email",maxLength:320},phone:{payloadKey:"customer_phone",maxLength:40},phonenumber:{payloadKey:"customer_phone",maxLength:40},customerphone:{payloadKey:"customer_phone",maxLength:40},buyerphone:{payloadKey:"customer_phone",maxLength:40},fullphonenumber:{payloadKey:"customer_phone",maxLength:40},address:{payloadKey:"shipping_address",maxLength:2e3},shippingaddress:{payloadKey:"shipping_address",maxLength:2e3},provinceselect:{payloadKey:"shipping_province",maxLength:200,selectedText:!0},shippingprovince:{payloadKey:"shipping_province",maxLength:200},cityselect:{payloadKey:"shipping_city",maxLength:200,selectedText:!0},shippingcity:{payloadKey:"shipping_city",maxLength:200},subdistrictselect:{payloadKey:"shipping_subdistrict",maxLength:200,selectedText:!0,locationKey:"shipping_location_id"},shippingsubdistrict:{payloadKey:"shipping_subdistrict",maxLength:200},shippinglocationid:{payloadKey:"shipping_location_id",integer:!0},destinationsubdistrictid:{payloadKey:"shipping_location_id",integer:!0},subdistrictid:{payloadKey:"shipping_location_id",integer:!0},locationid:{payloadKey:"shipping_location_id",integer:!0},postalcode:{payloadKey:"shipping_postal_code",maxLength:20},postalcodeselected:{payloadKey:"shipping_postal_code",maxLength:20},shippingpostalcode:{payloadKey:"shipping_postal_code",maxLength:20},paymentmethod:{payloadKey:"payment_method",maxLength:100},notes:{payloadKey:"notes",maxLength:2e3},ordernotes:{payloadKey:"notes",maxLength:2e3},discountcode:{payloadKey:"discount_code_code",maxLength:100},discountcodecode:{payloadKey:"discount_code_code",maxLength:100},variantselect:{itemType:"variant"},variantid:{itemType:"variant"},variantuniqueid:{itemType:"variant"},bundlepriceoptionselect:{itemType:"bundle_price_option"},bundlepriceoptionid:{itemType:"bundle_price_option"},quantity:{quantity:!0},itemquantity:{quantity:!0},qty:{quantity:!0}},hi={name:w.customername,honorificprefix:w.customername,givenname:w.customername,additionalname:w.customername,familyname:w.customername,nickname:w.customername,email:w.customeremail,tel:w.customerphone,telcountrycode:w.customerphone,telnational:w.customerphone,telareacode:w.customerphone,tellocal:w.customerphone,streetaddress:w.shippingaddress,addressline1:w.shippingaddress,addressline2:w.shippingaddress,postalcode:w.postalcode,addresslevel1:w.shippingprovince,addresslevel2:w.shippingcity};function ze(e,t){return!e||typeof e.getAttribute!="function"?null:e.getAttribute(t)}function qn(e){return String(e||"").toLowerCase().replace(/[^a-z0-9]/g,"")}function gi(e){var t=ze(e,"autocomplete");if(!t)return null;for(var n=String(t).split(/\s+/),r=n.length-1;r>=0;r-=1){var i=hi[qn(n[r])];if(i)return i}return null}function xt(e){if(!e||e.disabled)return null;var t=String(e.type||"").toLowerCase();if(["hidden","password","file"].includes(t))return null;var n=[ze(e,"data-scalev-field"),e.name,e.id,ze(e,"aria-label"),ze(e,"placeholder")];if(n.some(function(o){return/password|passwd|otp|captcha|recaptcha|cardnumber|cardholder|cvv|cvc|secret|authorization|token/i.test(o||"")}))return null;for(var r=0;r<n.length;r+=1){var i=w[qn(n[r])];if(i)return i}var a=gi(e);return a||(t==="email"?w.customeremail:t==="tel"?w.customerphone:null)}function yi(e){var t=String(e.type||"").toLowerCase();return(t==="radio"||t==="checkbox")&&!e.checked?{found:!1}:{found:!0,value:e.value===void 0||e.value===null?"":String(e.value).trim()}}function bi(e,t,n){if(n==="")return!0;if(e.validity&&e.validity.valid===!1)return!1;if(t.payloadKey==="customer_email")return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n);if(t.payloadKey==="customer_phone")return String(n).replace(/\D/g,"").length>=8;if(t.quantity){var r=Number(n);return Number.isInteger(r)&&r>0&&r<=1e4}if(t.integer||t.locationKey){var i=Number(n);return Number.isInteger(i)&&i>0}return!0}function wi(e){var t=e.selectedOptions&&e.selectedOptions[0]?e.selectedOptions[0]:e.options&&e.selectedIndex>=0?e.options[e.selectedIndex]:null;return t?String(t.textContent||t.label||"").trim():""}function ki(e,t,n){var r={type:e,quantity:n},i=e==="variant"?X():We(),a=i.some(function(u){return String(c(u.unique_id,u.uniqueId,""))===t}),o=Number(t);return e==="variant"?a||!Number.isInteger(o)?r.variantUniqueId=t:r.variantId=o:a||!Number.isInteger(o)?r.bundlePriceOptionUniqueId=t:r.bundlePriceOptionId=o,r}function Tn(){if(!document||typeof document.querySelectorAll!="function")return null;var e=document.querySelectorAll("input, select, textarea"),t={},n=null,r=1,i=!1;return Array.prototype.slice.call(e).forEach(function(a){var o=xt(a);if(o){var u=yi(a);if(u.found){var d=u.value;if(!bi(a,o,d)){i=!0;return}if(o.quantity){d&&(r=Number(d));return}if(o.itemType){d&&(n={type:o.itemType,value:d});return}var l=o.selectedText?wi(a):d;
2962if(!d){s.domCapturedFields[o.payloadKey]&&(t[o.payloadKey]=null),o.locationKey&&s.domCapturedFields[o.locationKey]&&(t[o.locationKey]=null);return}t[o.payloadKey]=C(l,o.maxLength),s.domCapturedFields[o.payloadKey]=!0,o.locationKey&&(t[o.locationKey]=Number(d),s.domCapturedFields[o.locationKey]=!0)}}}),i?(s.pendingSnapshot=null,G(),I("skipped_invalid"),null):(n&&(t.items=[ki(n.type,n.value,r)]),Object.keys(t).length?t:null)}function xi(e){return Array.isArray(e)?e.slice(0,50).reduce(function(t,n){n=n||{};var r=C(n.key,200),i=C(n.label,200),a=n.value;if(!r||!i)return t;if(typeof a=="string")a=C(a,2e3);else if(a!==null&&!["number","boolean"].includes(typeof a))return t;return t.push({key:r,label:i,value:a}),t},[]):[]}function Si(e){e=e&&typeof e=="object"?e:{};var t=S(e.customer,e.buyer)||{},n=S(e.destination,e.shipping_destination,e.shippingDestination)||{},r=S(e.provinceObject,e.province_object)||{},i=S(e.cityObject,e.city_object)||{},a=S(e.subdistrictObject,e.subdistrict_object)||{},o=he(e),u={customer_name:C(S(t.name,t.customer_name,t.customerName,e.customer_name,e.customerName,e.name),200),customer_email:C(S(t.email,t.customer_email,t.customerEmail,e.customer_email,e.customerEmail,e.email),320),customer_phone:C(S(t.phone,t.customer_phone,t.customerPhone,e.customer_phone,e.customerPhone,e.fullPhoneNumber,e.phone),40),shipping_address:C(S(n.address,n.shipping_address,n.shippingAddress,e.shipping_address,e.shippingAddress,e.address),2e3),shipping_province:C(S(n.province,n.province_name,n.provinceName,r.province_name,r.provinceName,e.shipping_province,e.shippingProvince,e.province),200),shipping_city:C(S(n.city,n.city_name,n.cityName,i.city_name,i.cityName,e.shipping_city,e.shippingCity,e.city),200),shipping_subdistrict:C(S(n.subdistrict,n.subdistrict_name,n.subdistrictName,a.subdistrict_name,a.subdistrictName,e.shipping_subdistrict,e.shippingSubdistrict),200),shipping_location_id:mi(S(n.subdistrict_id,n.subdistrictId,n.location_id,n.locationId,e.destination_subdistrict_id,e.destinationSubdistrictId,e.shipping_location_id,e.shippingLocationId,e.location_id,e.locationId,e.subdistrict_id,e.subdistrictId,a.id,a.ro_subdistrict_id,e.subdistrict)),shipping_postal_code:C(S(n.postal_code,n.postalCode,e.shipping_postal_code,e.shippingPostalCode,e.postal_code,e.postalCode,e.postalCodeSelected),20),payment_method:C(o.paymentMethod,100),notes:C(e.notes,2e3),discount_code_code:C(S(e.discount_code_code,e.discountCodeCode,e.discount_code,e.discountCode),100)},d=S(e.custom_fields,e.customFields);return d!==void 0&&(u.custom_fields=xi(d)),Object.keys(u).forEach(function(l){u[l]===void 0&&delete u[l]}),u}function Ii(e){e=e||{};var t=c(e.items,e.checkout_items),n=c(e.ordervariants,e.order_variants,e.orderVariants,e.variants),r=c(e.orderbundles,e.order_bundles,e.orderBundles,e.bundle_price_options,e.bundlePriceOptions),i=[];return m(t).forEach(function(a){a=a||{};var o=Rn(a);o==="variant"&&i.push({type:"variant",variant_id:H(a),quantity:c(a.quantity,a.qty,1)}),o==="bundle"&&i.push({type:"bundle_price_option",bundle_price_option_id:c(a.bundle_price_option_id,a.bundlePriceOptionId,a.id),quantity:c(a.quantity,a.qty,1)})}),m(n).forEach(function(a){i.push({type:"variant",variant_id:H(a),quantity:c(a.quantity,a.qty,1)})}),m(r).forEach(function(a){i.push({type:"bundle_price_option",bundle_price_option_id:c(a.bundle_price_option_id,a.bundlePriceOptionId,a.id),quantity:c(a.quantity,a.qty,1)})}),i.filter(function(a){return a.type==="variant"?Number(a.variant_id)>0:a.type==="bundle_price_option"?Number(a.bundle_price_option_id)>0:!1})}function Ai(){var e=X(),t=We();return e.length===1&&t.length===0?[{type:"variant",variant_id:H(e[0]),quantity:1}].filter(function(n){return Number(n.variant_id)>0}):t.length===1&&e.length===0?[{type:"bundle_price_option",bundle_price_option_id:c(t[0].bundle_price_option_id,t[0].bundlePriceOptionId,t[0].id),quantity:1}].filter(function(n){return Number(n.bundle_price_option_id)>0}):[]}function En(e){var t={fields:Si(e)},n=Ii(e),r=mn();return n.length||(n=Ai()),n.length&&(t.items=n),Number(r)>0&&(t.cart_id=Number(r)),t}function Ci(e){var t=e&&e.fields||{},n=t.customer_email,r=t.customer_phone;return!(n&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(n).trim())||r&&String(r).replace(/\D/g,"").length<8)}function I(e){var t=window.__SCALEV_CHECKOUT_INTENT_METRICS__=window.__SCALEV_CHECKOUT_INTENT_METRICS__||{};t[e]=(t[e]||0)+1,typeof window.CustomEvent=="function"&&window.dispatchEvent(new window.CustomEvent("scalev:checkout-intent-observability",{detail:{outcome:e,count:t[e]}}))}function Ve(){return document.visibilityState==="hidden"}function qi(){try{var e=new URL(window.location.href);
2962return e.hash="",Array.from(e.searchParams.keys()).forEach(function(t){/token|password|passwd|otp|captcha|recaptcha|email|phone|card|cvv|secret/i.test(t)&&e.searchParams.delete(t)}),e.toString()}catch{return}}function St(){return new URLSearchParams(window.location.search).get("checkout_intent_prefill_token")||void 0}function Ti(e){try{return JSON.parse(window.localStorage.getItem(e)||window.sessionStorage.getItem(e)||"null")}catch{return null}}function ee(){if(s.sessionKey)try{window.localStorage.setItem(s.sessionKey,JSON.stringify({clientSessionId:s.clientSessionId,id:s.id,token:s.token,expiresAt:s.expiresAt,nextSequence:s.nextSequence,lastActivityAt:s.lastActivityAt}))}catch{}}function de(){try{s.sessionKey&&(window.localStorage.removeItem(s.sessionKey),window.sessionStorage.removeItem(s.sessionKey))}catch{}}function It(){if(s.initialized||!vi())return s.initialized;var e=Ur+":"+v.checkoutIntentPageUniqueId,t=Ti(e),n=Date.now(),r=t&&Date.parse(t.expiresAt||""),i=!t||!t.clientSessionId||Number.isFinite(r)&&r<=n&&!t.id;return s.sessionKey=e,s.clientSessionId=i?Cn():t.clientSessionId,s.id=i?null:t.id,s.token=i?null:t.token,s.expiresAt=i?null:t.expiresAt,s.nextSequence=i?1:Math.max(1,Number(t.nextSequence||1)),s.lastActivityAt=i?n:Number(t.lastActivityAt||n),s.freshClientSession=!t,s.initialized=!0,ee(),!0}
2962function On(){de(),s.clientSessionId=Cn(),s.id=null,s.token=null,s.expiresAt=null,s.nextSequence=1,s.lastActivityAt=Date.now(),s.startPromise=null,s.retryAttempt=0,s.tokenRecoveryAttempted=!1,s.freshClientSession=!0,s.terminal=!1,ee()}function Pn(e){return e&&e.data&&(e.data.error_code||e.data.errorCode)}function He(e){clearTimeout(s.retryTimer);var t=Math.min(6e4,1500*Math.pow(2,s.retryAttempt)),n=Math.round(t*(.75+Math.random()*.25));s.retryAttempt+=1,s.retryTimer=setTimeout(function(){if(!s.terminal){if(Ve()){s.retryPending=!0,I("held_hidden");return}e()}},n)}function Ln(e){return!e.status||e.status===408||e.status===429||e.status>=500}function Nn(){if(!s.id||!s.token)return!1;var e=Date.parse(s.expiresAt||"");return!Number.isFinite(e)||e>Date.now()+an*1e3}async function we(e,t){if(!It()||s.terminal)return null;if(t!==!0&&Ve())return I("held_hidden"),null;if(Nn())return s.token;if(s.startPromise)return await s.startPromise.catch(function(){return null});var n=s.latestSnapshot||{},r=JSON.stringify(n),i=!s.id&&!s.token,a=gn("checkout_intent_start").then(function(u){return P(vt("/checkout-intents"),{method:"POST",credentials:"omit",body:Object.assign({client_session_id:s.clientSessionId,form_widget_id:Rr,source_url:qi(),attribution:ye(),checkout_intent_prefill_token:St(),recaptcha_token:u},n)})}).then(function(u){return s.id=u&&u.id,s.token=u&&c(u.checkoutIntentToken,u.checkout_intent_token),s.expiresAt=u&&c(u.expiresAt,u.expires_at),s.nextSequence=Math.max(s.nextSequence,Number(u&&c(u.lastSequence,u.last_sequence))+1||1),s.lastActivityAt=Date.now(),s.retryAttempt=0,s.freshClientSession=!1,I("started"),i&&(s.lastSentSnapshotSignature=r,s.pendingSnapshot&&JSON.stringify(s.pendingSnapshot)===r&&(s.pendingSnapshot=null,I("created_with_snapshot"))),ee(),s.pendingSnapshot&&Ct(),s.token});s.startPromise=a;try{return await a}catch(u){I("start_failed");var o=Pn(u);return e!==!1&&u.status===409&&(o==="checkout_intent_completed"||o==="checkout_intent_expired")?(On(),await we(!1)):(Ln(u)?He(function(){we(e)}):(s.terminal=!0,xe(),de()),null)}finally{s.startPromise===a&&(s.startPromise=null)}}async function At(e,t){if(!(!s.id||!s.token)){var n=s.nextSequence;s.nextSequence+=1,ee();try{await P(vt("/checkout-intents/"+encodeURIComponent(s.id)),{method:"PATCH",credentials:"omit",keepalive:t===!0,headers:{"x-scalev-checkout-intent-token":s.token},body:Object.assign({sequence:n},e)}),s.lastActivityAt=Date.now(),s.retryAttempt=0,s.tokenRecoveryAttempted=!1,s.lastSentSnapshotSignature=JSON.stringify(e),I("updated"),ee()}catch(i){I("update_failed");var r=Pn(i);if(i.status===409&&r==="checkout_intent_completed"){s.terminal=!0,xe(),de();return}if(i.status===401||r==="checkout_intent_expired"){if(s.tokenRecoveryAttempted){s.terminal=!0,G(),xe(),clearTimeout(s.retryTimer),s.id=null,s.token=null,s.expiresAt=null,de();return}if(s.tokenRecoveryAttempted=!0,s.id=null,s.token=null,s.expiresAt=null,ee(),await we(!1),!s.id||!s.token){
2962s.terminal||(s.pendingSnapshot=s.latestSnapshot);return}return await At(s.latestSnapshot||e,t)}if(i.status===404){On(),await we(!0),s.pendingSnapshot=s.latestSnapshot,He(function(){te(!1)});return}Ln(i)?(s.pendingSnapshot=s.latestSnapshot,He(function(){te(!1)})):(s.terminal=!0,xe(),de())}}}function G(){clearTimeout(s.debounceTimer),clearTimeout(s.maxWaitTimer),s.debounceTimer=null,s.maxWaitTimer=null}async function te(e,t){G();var n=s.pendingSnapshot;if(!(!n||s.terminal)){if(t!==!0&&Ve()){I("held_hidden");return}if(s.pendingSnapshot=null,Nn()||await we(!0,t),!s.id||!s.token){s.pendingSnapshot=s.latestSnapshot;return}if(s.lastSentSnapshotSignature!==JSON.stringify(n)){if(e===!0){var r=s.requestChain,i=At(n,!0);s.requestChain=Promise.all([r.catch(function(){}),i]).then(function(){}),await i;return}s.requestChain=s.requestChain.catch(function(){}).then(function(){return At(n,e)}),await s.requestChain}}}function Ct(){if(Ve()){I("held_hidden");return}clearTimeout(s.debounceTimer),s.debounceTimer=setTimeout(function(){te(!1)},Nr),s.maxWaitTimer||(s.maxWaitTimer=setTimeout(function(){te(!1)},Dr))}function le(e){if(!(!It()||s.terminal)){var t=En(e),n=JSON.stringify(t);return Ci(t)?n===s.latestSnapshotSignature?(I("skipped_unchanged"),!1):n===s.baselineSnapshotSignature||n===s.lastSentSnapshotSignature?(s.latestSnapshot=t,s.latestSnapshotSignature=n,s.pendingSnapshot=null,G(),I("skipped_unchanged"),!1):(s.latestSnapshot=t,s.latestSnapshotSignature=n,s.pendingSnapshot=s.latestSnapshot,s.lastActivityAt=Date.now(),ee(),Ct(),!0):(s.pendingSnapshot=null,G(),I("skipped_invalid"),!1)}}function ke(){clearTimeout(s.captureTimer),s.captureTimer=null;var e=Tn();return e?le(e):!1}function Dn(){clearTimeout(s.captureTimer),s.captureTimer=setTimeout(function(){ke()},Mr)}function Ei(e,t){ke(),te(e,t)}function xe(){clearTimeout(s.captureTimer),clearInterval(s.reconcileTimer),s.captureTimer=null,s.reconcileTimer=null}async function Oi(e){le(e),await te(!1,!0)}function Pi(e){return s.token&&(e.checkout_intent_token=s.token),e}function Li(){s.terminal=!0,G(),xe(),clearTimeout(s.retryTimer),de()}function Ni(){if(It()){var e=Tn()||{};s.latestSnapshot=En(e),s.latestSnapshotSignature=JSON.stringify(s.latestSnapshot),s.baselineSnapshotSignature=s.latestSnapshotSignature,I("baseline_captured"),document.addEventListener("input",function(t){xt(t&&t.target)&&Dn()}),document.addEventListener("change",function(t){xt(t&&t.target)&&Dn()}),document.addEventListener("submit",function(){Ei(!1,!0)},!0),s.reconcileTimer=setInterval(function(){document.visibilityState!=="hidden"&&ke()},jr),window.addEventListener("pagehide",function(){ke(),G(),I("held_hidden")}),document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){ke(),G(),I("held_hidden");return}s.pendingSnapshot&&Ct(),s.retryPending&&(s.retryPending=!1,He(function(){te(!1)}))})}}function qt(e){return!e||typeof e!="object"?e:Di(e)?D(e.data):D(e)}function Tt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Di(e){return Tt(e,"data")?Object.keys(e).length===1?!0:["status","code","is_paginated","has_next","has_previous","next_cursor","previous_cursor","page_size","total_count"].some(function(t){return Tt(e,t)}):!1}function Et(e,t){var n=qt(e);return ft=Mn(n),en=t||An(),tn=!0,ft}function f(e,t,n){if(!(!e||n===void 0))try{Object.defineProperty(e,t,{value:n,enumerable:!1,configurable:!0,writable:!0})}catch{e[t]=n}}function Mi(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){return t.trim()}).filter(Boolean)}function Ye(e,t){if(!e||typeof e!="object")return e;var n=D(e),r=Mi(n.display),i,a,o={},u={id:!0,name:!0,provinceId:!0,provinceName:!0,cityId:!0,cityName:!0,subdistrictId:!0,subdistrictName:!0,locationId:!0};return t==="province"?(i=c(n.id,n.provinceId),a=c(n.name,n.provinceName)):t==="city"?(i=c(n.id,n.cityId),a=c(n.name,n.cityName)):t==="subdistrict"?(i=c(n.id,n.subdistrictId,n.locationId),a=c(n.subdistrictName,r[0],n.name)):(i=c(n.id,n.provinceId,n.cityId,n.subdistrictId,n.locationId),a=c(n.name,n.provinceName,n.cityName,n.subdistrictName)),i!==void 0&&(o.id=i),a!==void 0&&(o.name=a),Object.keys(n).forEac
2962h(function(d){if(u[d]){t==="subdistrict"&&(d==="cityName"||d==="provinceName")&&(o[d]=n[d]);return}o[d]=n[d]}),t==="subdistrict"&&(o.cityName===void 0&&r[1]!==void 0&&(o.cityName=r[1]),o.provinceName===void 0&&r[2]!==void 0&&(o.provinceName=r[2])),t==="province"?(f(o,"provinceId",i),f(o,"province_id",i),f(o,"provinceName",a),f(o,"province_name",a)):t==="city"?(f(o,"cityId",i),f(o,"city_id",i),f(o,"cityName",a),f(o,"city_name",a)):t==="subdistrict"&&(f(o,"subdistrictId",i),f(o,"subdistrict_id",i),f(o,"locationId",i),f(o,"location_id",i),f(o,"subdistrictName",a),f(o,"subdistrict_name",a)),o}function Ot(e,t){return Array.isArray(e)?e.map(function(n){return Ye(n,t)}):!e||typeof e!="object"?e:Array.isArray(e.data)?Object.assign({},e,{data:e.data.map(function(n){return Ye(n,t)})}):Array.isArray(e.results)?Object.assign({},e,{results:e.results.map(function(n){return Ye(n,t)})}):Ye(e,t)}function ji(e,t){var n=e.subdistrictObject||e.subdistrict_object;return c(t&&t.subdistrict_id,t&&t.subdistrictId,t&&t.destination_subdistrict_id,t&&t.destinationSubdistrictId,t&&t.location_id,t&&t.locationId,e.destinationSubdistrictId,e.destination_subdistrict_id,e.subdistrictId,e.subdistrict_id,e.locationId,e.location_id,n&&n.id,n&&n.subdistrict_id,n&&n.ro_subdistrict_id,e.subdistrict)}function Mn(e){e=e&&typeof e=="object"?e:{};var t=c(e.customer,e.buyer)||{},n=c(e.destination,e.shipping_destination,e.shippingDestination)||{},r=p({name:c(t.name,t.customer_name,t.customerName,e.customer_name,e.customerName,e.name),phone:c(t.phone,t.customer_phone,t.customerPhone,e.customer_phone,e.customerPhone,e.fullPhoneNumber,e.phone),email:c(t.email,t.customer_email,t.customerEmail,e.customer_email,e.customerEmail,e.email)}),i=p({address:c(n.address,n.shipping_address,n.shippingAddress,e.address,e.shipping_address,e.shippingAddress),subdistrictId:ji(e,n),postalCode:c(n.postal_code,n.postalCode,e.postal_code,e.postalCode,e.postalCodeSelected)}),a={customer_name:!0,customerName:!0,customer_phone:!0,customerPhone:!0,customer_email:!0,customerEmail:!0,name:!0,phone:!0,fullPhoneNumber:!0,email:!0,address:!0,shipping_address:!0,shippingAddress:!0,destination_subdistrict_id:!0,destinationSubdistrictId:!0,subdistrict_id:!0,subdistrictId:!0,location_id:!0,locationId:!0,subdistrict:!0,subdistrictObject:!0,subdistrict_object:!0,postal_code:!0,postalCode:!0,postalCodeSelected:!0,customer:!0,buyer:!0,destination:!0,shipping_destination:!0,shippingDestination:!0},o={};return Object.keys(e).forEach(function(u){a[u]||(o[u]=e[u])}),Object.keys(r).length&&(o.customer=D(r)),Object.keys(i).length&&(o.destination=D(i)),f(o,"customer_name",r.name),f(o,"customerName",r.name),f(o,"name",r.name),f(o,"customer_phone",r.phone),f(o,"customerPhone",r.phone),f(o,"phone",r.phone),f(o,"fullPhoneNumber",r.phone),f(o,"customer_email",r.email),f(o,"customerEmail",r.email),f(o,"email",r.email),f(o,"address",i.address),f(o,"destination_subdistrict_id",i.subdistrictId),f(o,"destinationSubdistrictId",i.subdistrictId),f(o,"subdistrict_id",i.subdistrictId),f(o,"subdistrictId",i.subdistrictId),f(o,"location_id",i.subdistrictId),f(o,"locationId",i.subdistrictId),f(o,"subdistrict",e.subdistrict),f(o,"subdistrictObject",c(e.subdistrictObject,e.subdistrict_object)),f(o,"postal_code",i.postalCode),f(o,"postalCode",i.postalCode),f(o,"postalCodeSelected",i.postalCode),o}function Ri(e){e=e&&typeof e=="object"?e:{};var t=Mn(e),n=t.customer||{},r=t.destination||{},i=Object.assign({},e);return Object.keys(n).length&&(i.customer=n,i.name=c(e.name,n.name),i.customer_name=c(e.customer_name,n.name),i.phone=c(e.phone,n.phone),i.fullPhoneNumber=c(e.fullPhoneNumber,n.phone),i.customer_phone=c(e.customer_phone,n.phone),i.email=c(e.email,n.email),i.customer_email=c(e.customer_email,n.email)),Object.keys(r).length&&(i.destination=r,i.address=c(e.address,r.address),i.destination_subdistrict_id=c(e.destination_subdistrict_id,r.subdistrictId),i.subdistrict_id=c(e.subdistrict_id,r.subdistrictId),i.location_id=c(e.location_id,r.subdistrictId),i.subdistrict=c(e.subdistrict,r.subdistrictId),i.subdistrictObject=c(e.subdistrictObject,e.
2962subdistrict_object,r.subdistrictId!==void 0?{id:r.subdistrictId}:void 0),i.postal_code=c(e.postal_code,r.postalCode),i.postalCodeSelected=c(e.postalCodeSelected,r.postalCode)),i}function Pt(e){return e=e||{},zi(c(e.shipping,e.shipping_option,e.shippingOption,e.selected_shipping_option,e.selectedShippingOption,e.courier_service,e.courierService))}function Ui(e){e=e||{};var t=c(e.customer,e.buyer);return p(t&&typeof t=="object"?{name:c(t.name,t.customer_name,t.customerName),phone:c(t.phone,t.customer_phone,t.customerPhone),email:c(t.email,t.customer_email,t.customerEmail)}:{name:c(e.customerName,e.customer_name,e.name),phone:c(e.customerPhone,e.customer_phone,e.phone),email:c(e.customerEmail,e.customer_email)})}function Lt(e){e=e||{};var t=c(e.destination,e.shipping_destination,e.shippingDestination);return p(t&&typeof t=="object"?{address:c(t.address,t.shipping_address,t.shippingAddress),location_id:c(t.subdistrict_id,t.subdistrictId,t.destination_subdistrict_id,t.destinationSubdistrictId,t.location_id,t.locationId,t.location),postal_code:c(t.postal_code,t.postalCode)}:{address:c(e.address,e.shipping_address),location_id:Gr(e),postal_code:c(e.postal_code,e.postalCode)})}function Fi(e){e=e||{};var t=he(e),n=Pt(e);return p({code:c(e.discountCode,e.code,e.discount_code,e.discountCodeCode,e.discount_code_code),gross_revenue:c(e.grossRevenue,e.gross_revenue),net_product_price:c(e.netProductPrice,e.net_product_price),shipping_cost:c(e.shippingCost,e.shipping_cost,n&&n.shipping_cost),payment_method:t.paymentMethod,domain:c(e.domain,window.location.hostname)})}function jn(e){e=e||{};var t=Je(e),n=Lt(e);return p({items:Zi(t),destination:Bi(e),location_id:n.location_id,postal_code:n.postal_code,payment_method:he(e).paymentMethod})}function Ki(e){e=e||{};var t=he(e),n=Pt(e);return p(Object.assign({},jn(e),{courier_service_id:ht(c(e.courier_service_id,e.courierServiceId,e.courier_service,e.courierService,n&&n.courier_service_id)),warehouse_unique_id:Fe(c(e.warehouse_unique_id,e.warehouseUniqueId,e.shipping_origin,e.shippingOrigin,n&&n.warehouse_unique_id)),courier_aggregator_code:c(e.courier_aggregator_code,e.courierAggregatorCode,e.courier_aggregator,e.courierAggregator,n&&n.courier_aggregator_code),payment_method:t.paymentMethod,discount_code_code:c(e.discountCode,e.discount_code,e.discountCodeCode,e.discount_code_code)}))}function Bi(e){var t=Lt(e);return p({location_id:t.location_id,postal_code:t.postal_code})}function zi(e){if(!(!e||typeof e!="object"))return p({courier_service_id:ht(e),warehouse_unique_id:Fe(e),courier_aggregator_code:c(e.courier_aggregator_code,e.courierAggregatorCode),shipping_cost:c(e.shipping_cost,e.shippingCost,e.cost)})}function We(){var e=ve()||{};return e.bundle_price_options||e.bundlePriceOptions||[]}function Nt(e){e=e||{};var t=c(e.bundle_price_option_unique_id,e.bundlePriceOptionUniqueId,e.unique_id,e.uniqueId,e.bundle_price_option,e.bundlePriceOption);if(t!==void 0)return t;var n=c(e.bundle_price_option_id,e.bundlePriceOptionId,e.id);if(n!==void 0){var r=We().find(function(i){return String(c(i.id,i.bundle_price_option_id))===String(n)});return r&&c(r.unique_id,r.uniqueId)}}function Vi(e){e=e||{};var t=c(e.bundle_price_option_id,e.bundlePriceOptionId,e.id);if(t!==void 0)return t;var n=Nt(e);if(n!==void 0){var r=We().find(function(i){return String(c(i.unique_id,i.uniqueId))===String(n)});return r&&c(r.id,r.bundle_price_option_id)}}function Rn(e){e=e||{};var t=String(c(e.type,e.item_type,e.itemType,"")).toLowerCase();if(t==="product"||t==="variant")return"variant";if(t==="bundle"||t==="bundle_price_option"||t==="bundle-price-option"||t==="orderbundle")return"bundle";if(mt(e)!==void 0)return"variant";if(Nt(e)!==void 0)return"bundle"}function Hi(e){e=e||{};var t=mt(e),n=H(e);return X().find(function(r){return t!==void 0&&String(c(r.unique_id,r.uniqueId))===String(t)||n!==void 0&&String(r.id)===String(n)})}function Dt(e){return String(c(e&&e.price_mode,e&&e.priceMode,"fixed"))==="customer_defined"}function Un(e){var t=Number(c(e&&e.minimum_customer_price,e&&e.minimumCustomerPrice,e&&e.price,1e4));return Number.isSafeInteger(t)&&t>=0?t:1e4}function Yi(e){for(var t=document.querySelectorAll('[data-scalev-customer-price], [data-sv-customer-price-input], [name="customerPrice"], #customerPriceInput, #customerPriceField input'),n=c(e.unique_id,e.uniqueId),r=0;r<t.length;r+=1)if(String(t[r].getAttribute("data-variant-unique-id")||"")===String(n||""))return t[r];if(X().filter(Dt).length===1){var i=document.querySelector('[data-scalev-customer-price], [data-sv-customer-price-input], [name="customerPrice"], #customerPriceInput, #customerPriceField input');return i&&typeof i.setAttribute=="function"?i:null}return null}function Fn(e,t){if(!(!e||typeof e.setAttribute!="function")){e.setAttribute("aria-invalid",t?"true":"false");var n=e.parentNode&&e.parentNode.parentNode,r=n&&n.querySelector("[data-scalev-customer-price-error]");r&&(r.textContent=t||"")}}function Ge(e,t){e=e||{};var n=c(t,e.customer_price,e.customerPrice),r=Hi(e);if(!Dt(r))return n===void 0?void 0:String(n);var i=Yi(r);n===void 0&&i&&(n=String(i.value||"").replace(/\D/g,""));var a=Number(n),o=Un(r),u="";if(n===void 0||n===""||!Number.isSafeInteger(a)?u="Harga wajib diisi.":a<o&&(u="Harga minimal Rp "+Se(o)+"."),Fn(i,u),u){var d=new Error(u);throw d.field="customer_price",d}return String(a)}function Se(e){return String(Math.max(0,Number(e)||0)).replace(/\B(?=(\d{3})+(?!\d))/g,".")}function Kn(e){if(!(!e||e.getAttribute("data-scalev-customer-price-format-bound")==="true")){var t=window.HTMLInputElement,n=t&&Object.getOwnPropertyDescriptor(t.prototype,"value");if(!(!n||!n.get||!n.set)){var r=n.get.bind(e),i=n.set.bind(e),a=function(){return String(r()||"").replace(/\D/g,"")},o=function(d){var l=String(d==null?"":d).replace(/\D/g,"");i(l?Se(l):"")};e.type="text",e.inputMode="numeric",e.setAttribute("inputmode","numeric"),e.setAttribute("data-scalev-customer-price-format-bound","true"),Object.defineProperty(e,"value",{configurable:!0,get:a,set:o}),o(a());var u=function(){o(a())};e.addEventListener("input",function(){u(),typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(u):setTimeout(u,0)})}}}function Mt(e){if(!e||typeof e.querySelectorAll!="function")return 0;for(var t=e.querySelectorAll('[data-scalev-customer-price], [data-sv-customer-price-input], [name="customerPrice"], #customerPriceInput, #customerPriceField input'),n=0;n<t.length;n+=1)Kn(t[n]);return t.length}function Wi(e){if(!(!e||typeof MutationObserver=="undefined"||e.__scalevCustomerPriceObserver)){var t=new MutationObserver(function(n){var r=n.some(function(i){return i.addedNodes&&i.addedNodes.length>0});r&&Mt(e)}
2962);t.observe(e,{childList:!0,subtree:!0}),Object.defineProperty(e,"__scalevCustomerPriceObserver",{configurable:!0,value:t})}}function Gi(){if(document.body){var e=document.getElementById("scalev-html-mode-root"),t=e||document.body;if(tt()){Mt(t),Wi(t);return}if(!Mt(t)){var n=X().filter(Dt);if(n.length){var r=document.createElement("section");if(!(!r||typeof r.appendChild!="function")){r.id="scalev-customer-price-fields",r.setAttribute("aria-label","Custom Harga"),r.style.cssText="box-sizing:border-box;width:min(100% - 32px,640px);margin:20px auto;padding:16px;border:1px solid #d7dde3;border-radius:12px;background:#fff;color:#17212b;font-family:inherit";var i=document.createElement("strong");i.textContent="Custom Harga",i.style.cssText="display:block;margin-bottom:12px;font-size:16px",r.appendChild(i),n.forEach(function(d){var l=Un(d),_=document.createElement("div");_.style.cssText="margin-top:12px";var M=document.createElement("label");M.style.cssText="display:block;margin-bottom:6px;font-size:13px;font-weight:600",M.textContent=c(d.product_name,d.productName,d.name,"Harga")+" \u2014 Min. Rp "+Se(l);var q=document.createElement("div");q.style.cssText="display:flex;align-items:center;border:1px solid #cbd5e1;border-radius:8px;overflow:hidden";var T=document.createElement("span");T.textContent="Rp",T.style.cssText="padding:10px 12px;background:#f5f7f9;font-weight:600";var g=document.createElement("input");g.type="text",g.inputMode="numeric",g.name="customerPrice",g.value=Se(l),g.setAttribute("data-scalev-customer-price",""),g.setAttribute("data-variant-unique-id",c(d.unique_id,d.uniqueId,"")),g.setAttribute("aria-invalid","false"),g.style.cssText="box-sizing:border-box;min-width:0;width:100%;border:0;outline:0;padding:10px 12px;background:#fff;color:inherit;font:inherit;font-weight:600",Kn(g),g.addEventListener("input",function(){var U=String(g.value||"").replace(/\D/g,"");g.value=U?Se(U):"",Fn(g,"")});var z=document.createElement("p");z.setAttribute("data-scalev-customer-price-error",""),z.setAttribute("aria-live","polite"),z.style.cssText="min-height:17px;margin:5px 0 0;color:#dc2626;font-size:12px",q.appendChild(T),q.appendChild(g),_.appendChild(M),_.appendChild(q),_.appendChild(z),r.appendChild(_)});var a=e||document.body,o=a.querySelector&&a.querySelector("form"),u=o&&o.querySelector&&o.querySelector('button[type="submit"], input[type="submit"]');o&&u&&typeof o.insertBefore=="function"?o.insertBefore(r,u):o?o.appendChild(r):a.appendChild(r)}}}}}function Je(e){e=e||{};var t={variants:[],bundles:[]},n=c(e.ordervariants,e.order_variants,e.orderVariants,e.variants),r=c(e.orderbundles,e.order_bundles,e.orderBundles,e.bundle_price_options,e.bundlePriceOptions),i=c(e.items,e.checkout_items);return m(n).forEach(function(a){t.variants.push(a)}),m(r).forEach(function(a){t.bundles.push(a)}),m(i).forEach(function(a){a=a||{};var o=Rn(a);o==="variant"&&t.variants.push(p({variant_unique_id:mt(a),sku:a.sku,quantity:c(a.quantity,a.qty,1),orderline_discount:c(a.orderline_discount,a.orderlineDiscount),variant_price_id:c(a.variant_price_id,a.variantPriceId),reseller_unit_price:c(a.reseller_unit_price,a.resellerUnitPrice),customer_price:Ge(a),price:c(a.price,a.variant_price,a.variantPrice)})),o==="bundle"&&t.bundles.push(p({bundle_price_option_unique_id:Nt(a),quantity:c(a.quantity,a.qty,1),price:c(a.price,a.bundle_price,a.bundlePrice)}))}),t.variants.length||(t.variants=void 0),t.bundles.length||(t.bundles=void 0),t}function Ji(e){return Array.isArray(e)?e.map(function(t){return t=t||{},p({variant_unique_id:c(t.variant_unique_id,t.variantUniqueId,t.unique_id,t.uniqueId),sku:t.sku,quantity:c(t.quantity,t.qty),orderline_discount:c(t.orderline_discount,t.orderlineDiscount),variant_price_id:c(t.variant_price_id,t.variantPriceId),reseller_unit_price:c(t.reseller_unit_price,t.resellerUnitPrice),customer_price:Ge(t)})}):e}function $i(e){return Array.isArray(e)?e.map(function(t){return t=t||{},p({bundle_price_option_unique_id:c(t.bundle_price_option_unique_id,t.bundlePriceOptionUniqueId,t.unique_id,t.uniqueId),quantity:c(t.quantity,t.qty)})}):e}function Zi(e){e=e||{};var t=[];
2962return m(e.variants).forEach(function(n){t.push(p({type:"variant",variant_id:H(n),quantity:c(n.quantity,n.qty,1),customer_price:Ge(n)}))}),m(e.bundles).forEach(function(n){t.push(p({type:"bundle_price_option",bundle_price_option_id:Vi(n),quantity:c(n.quantity,n.qty,1)}))}),t.length?t:void 0}function Bn(e){return Array.isArray(e)?e.map(function(t){return t=t||{},p({variant_unique_id:c(t.variant_unique_id,t.variantUniqueId,t.unique_id,t.uniqueId,t.variant),quantity:c(t.quantity,t.qty),price:c(t.price,t.variant_price,t.variantPrice)})}):e}function zn(e){return Array.isArray(e)?e.map(function(t){return t=t||{},p({bundle_price_option_unique_id:c(t.bundle_price_option_unique_id,t.bundlePriceOptionUniqueId,t.unique_id,t.uniqueId,t.bundle_price_option),quantity:c(t.quantity,t.qty),price:c(t.price,t.bundle_price,t.bundlePrice)})}):e}function Vn(e,t){return e=e||{},c(e.event_id,e.eventId,e.id,[se()||"page",c(e.event_name,e.eventName,e.event,e.name)||"event",Date.now(),t].join("-"))}function Xi(e){return Array.isArray(e)?e.map(function(t,n){return t=t||{},p({event_id:Vn(t,n),event_name:c(t.event_name,t.eventName,t.event,t.name),parameters:t.parameters})}):e}function Qi(e){return Array.isArray(e)?e.map(function(t,n){return t=t||{},p({event_id:Vn(t,n),event:c(t.event,t.event_name,t.eventName,t.name),parameters:t.parameters})}):e}function Hn(e,t){t=t||{};var n=ye(),r=Je(t),i=c(t.pageUniqueId,t.page_unique_id,se()),a=c(t.eventSourceUrl,t.event_source_url,window.location.href),o=c(t.referrerUrl,t.referrer_url,document.referrer),u=Bn(r.variants),d=zn(r.bundles);if(e==="fb"||e==="facebook"){var l=Object.assign({},t.userData||t.user_data||{},p({fn:c(t.firstName,t.first_name),ln:c(t.lastName,t.last_name),em:t.email,ph:t.phone,ct:t.city,st:t.state,country:c(t.country,"id"),client_user_agent:c(t.ua,t.userAgent,t.client_user_agent),client_ip_address:c(t.ip,t.clientIp,t.client_ip_address),external_id:c(t.externalId,t.external_id),fbc:c(t.fbc,n.fbc),fbp:c(t.fbp,n.fbp),location_id:c(t.locationId,t.location_id)}));return p({page_unique_id:i,user_data:l,bundles:t.bundles,variants:u,domain:t.domain,bundle_price_options:d,event_source_url:a,referrer_url:o,events:Xi(t.events)})}if(e==="tiktok"){var _=Object.assign({},t.user||{},p({email:t.email,phone:t.phone,user_agent:c(t.ua,t.userAgent,t.user_agent),ip:t.ip,external_id:c(t.externalId,t.external_id),ttclid:c(t.ttclid,n.ttclid),ttp:c(t.ttp,n.ttp)}));return p({page_unique_id:i,user:_,event_source_url:a,referrer_url:o,events:Qi(t.events),bundles:t.bundles,variants:u,domain:t.domain,bundle_price_options:d})}return e==="kwai"||e==="snackvideo"?p({page_unique_id:i,click_id:c(t.clickId,t.click_id,t.kwai_clickid,n.kwai_clickid),events:t.events,bundles:t.bundles,variants:u,domain:t.domain,bundle_price_options:d}):t}function ea(e){e=e||{};var t=Ui(e),n=Lt(e),r=Je(e),i=he(e),a=Pt(e),o=po();return p(Object.assign({form:e.form,customer_name:t.name,customer_phone:t.phone,customer_email:t.email,name:e.name,phone:e.phone,address:n.address,location_id:n.location_id,payment_method:i.paymentMethod,payment_account_unique_id:i.paymentAccountUniqueId,warehouse_unique_id:Fe(c(e.warehouseUniqueId,e.warehouse_unique_id,e.shippingOrigin,e.shipping_origin,a&&a.warehouse_unique_id)),courier_service_id:ht(c(e.courierServiceId,e.courier_service_id,e.courierService,e.courier_service,a&&a.courier_service_id)),other_income:i.paymentMethod==="payment_link"?void 0:c(e.otherIncome,e.other_income),other_income_name:i.paymentMethod==="payment_link"?void 0:c(e.otherIncomeName,e.other_income_name),orderlines:e.orderlines,product_discount:c(e.productDiscount,e.product_discount,0),shipping_cost:c(e.shippingCost,e.shipping_cost,a&&a.shipping_cost),shipping_discount:c(e.shippingDiscount,e.shipping_discount),notes:e.notes,transferproof_url:c(e.transferProofUrl,e.transferproof_url,e.transferProof),ordervariants:Ji(r.variants),orderbundles:$i(r.bundles),event_source_url:c(e.eventSourceUrl,e.event_source_url,window.location.href),fbc:e.fbc,fbp:e.fbp,ttclid:e.ttclid,gclid:e.gclid,ttp:e.ttp,kwai_clickid:c(e.clickId,e.click_id,e.kwai_clickid),ad_source:c(e.adSource,e.ad_source),privacy:Q(),visit_privacy:ge(),visitor_id:o.visitor_id,session_id:o.session_id,page_view_id:o.page_view_id,channel_unique_id:c(e.channelUniqueId,e.channel_unique_id,e.channel),courier_aggregator_code:c(e.courierAggregatorCode,e.courier_aggregator_code,e.courierAggregator,e.courier_aggregator,a&&a.courier_aggregator_code),payment_fee:c(e.paymentFee,e.payment_fee),payment_fee_rate:c(e.paymentFeeRate,e.payment_fee_rate),min_payment_fee:c(e.minPaymentFee,e.min_payment_fee),discount_code_code:c(e.discountCode,e.discount_code,e.discountCodeCode,e.discount_code_code),is_post_payment_redirect_enabled:c(e.isPostPaymentRedirectEnabled,e.is_post_payment_redirect_enabled),post_payment_redirect_url:c(e.postPaymentRedirectUrl,e.post_payment_redirect_url),utm_source:c(e.utmSource,e.utm_source),utm_medium:c(e.utmMedium,e.utm_medium),utm_campaign:c(e.utmCampaign,e.utm_campaign),utm_content:c(e.utmContent,e.utm_content),utm_term:c(e.utmTerm,e.utm_term),affiliate_code:c(e.affiliateCode,e.affiliate_code),postal_code:n.postal_code,is_mobile:c(e.isMobile,e.is_mobile,ii()),cart_id:c(e.cartId,e.cart_id,mn())},ye(),e.attribution||{},{privacy:Q(),visit_privacy:ge(),visitor_id:o.visitor_id,session_id:o.session_id,page_view_id:o.page_view_id}))}function Yn(){var e=V()._analytics;return e&&typeof e=="object"?e:{}}function ta(){var e=Yn().submit;return e&&typeof e=="object"?e:{}}function jt(){var e=Yn().onload;return e&&typeof e=="object"?e:{}}function m(e){return e?Array.isArray(e)?e:[e]:[]}function K(e){return m(e).filter(function(t){return t!=null&&t!==""})}function Ie(e){return e?String(typeof e=="string"||typeof e=="number"?e:c(e.pixel_id,e.pixelId,e.id,e.dataset_id,e.datasetId)||""):""}function A(e){return K(e).some(function(t){return!!Ie(t)})}function Wn(e){var t={};return m(e).forEach(function(n){!n||!n.key||n.value===void 0||n.value===null||(t[n.
2962key]=n.value)}),t}function B(e,t){if(!(!e||typeof e!="object")){var n=e[t];if(Array.isArray(n))return Wn(n);if(n&&typeof n=="object")return n;if(Array.isArray(e))return Wn(e)}}function na(e){if(e=String(e||"").trim(),!e)return{firstName:void 0,lastName:void 0};var t=e.split(/\s+/);return t.length<2?{firstName:t[0],lastName:void 0}:{firstName:t.slice(0,-1).join(" "),lastName:t[t.length-1]}}function ra(e){return!e||typeof e!="object"?{}:e.data&&typeof e.data=="object"?e.data:e}function ia(e){e=e||{};var t=c(e.order_id,e.orderId),n=t==null?"":String(t).trim();if(!n)return null;var r={event:"form_submit",scalev_event:"order_created",scalev_event_version:2,transaction_id:n,currency:"IDR",scalev_is_probably_spam:!!c(e.is_probably_spam,e.isProbablySpam,!1)},i=c(e.gross_revenue,e.grossRevenue),a=i===""?NaN:Number(i);return Number.isFinite(a)&&(r.value=a),r}function aa(e){if(!k("gtm"))return Promise.resolve(!1);var t=ia(e);return!t||pt.has(t.transaction_id)||(window.dataLayer=window.dataLayer||[],typeof window.dataLayer.push!="function")?Promise.resolve(!1):(pt.add(t.transaction_id),new Promise(function(n,r){var i=!1,a;function o(){i||(i=!0,clearTimeout(a),n(!0))}a=setTimeout(o,sn);try{window.dataLayer.push(Object.assign({},t,{eventCallback:o,eventTimeout:sn}))}catch(u){clearTimeout(a),pt.delete(t.transaction_id),r(u)}}))}function oa(e){if(!e||typeof e!="object"||Object.prototype.hasOwnProperty.call(e,"data"))return e;try{Object.defineProperty(e,"data",{get:function(){return e},enumerable:!1,configurable:!0})}catch{return e}return e}function ca(e){return c(e.order_id,e.orderId,e.id,e.unique_id,e.uniqueId,se())}function $e(e,t){return[ca(e)||"order",t,"FORM"].join("-")}function sa(e){var t=[],n=e.__scalev_analytics||{};return Array.isArray(n.line_items)?n.line_items:(m(e.items).forEach(function(r){var i=c(r.variant_unique_id,r.bundle_price_option_unique_id,r.variant_id,r.bundle_price_option_id,r.id);i&&t.push({id:i,quantity:Number(c(r.quantity,r.qty,1))||1,price:Number(c(r.price,0))})}),m(e.ordervariants).forEach(function(r){var i=c(r.variant_unique_id,r.variant,r.id);i&&t.push({id:i,quantity:Number(c(r.quantity,r.qty,1))||1,price:Number(c(r.variant_price,r.variantPrice,r.price,0))})}),m(e.orderbundles).forEach(function(r){var i=c(r.bundle_price_option_unique_id,r.bundle_price_option,r.id);i&&t.push({id:i,quantity:Number(c(r.quantity,r.qty,1))||1,price:Number(c(r.bundle_price,r.bundlePrice,r.price,0))})}),t)}function ua(e){var t=sa(e);if(!t.length)return{};var n=t.reduce(function(r,i){return r+(Number(i.price)||0)*(Number(i.quantity)||1)},0);return p({content_ids:t.map(function(r){return r.id}),content_type:"product",contents:t.map(function(r){return p({id:r.id,quantity:r.quantity,delivery_category:"home_delivery",item_price:r.price||void 0})}),value:n||void 0,currency:"IDR",num_items:t.length})}function Ze(e){if(e=e||{},e.content_id)return e;var t=se();return t?Object.assign({},e,{content_id:String(t)}):e}function da(e,t){var n=na(e.customer_name||e.name),r=ye(),i=e.__scalev_analytics||{},a=e.metadata||{};return p({firstName:n.firstName,lastName:n.lastName,email:e.customer_email,phone:e.customer_phone||e.phone,ua:window.navigator&&window.navigator.userAgent,variants:i.variants||e.ordervariants,bundlePriceOptions:i.bundle_price_options||e.orderbundles,eventSourceUrl:c(a.event_source_url,e.event_source_url)||window.location.href,externalId:c(t.customer_id,t.customerId),fbc:c(a.fbc,e.fbc,r.fbc),fbp:c(a.fbp,e.fbp,r.fbp),ttp:c(a.ttp,e.ttp,r.ttp),ttclid:c(a.ttclid,e.ttclid,r.ttclid),clickId:c(a.kwai_clickid,e.kwai_clickid,r.kwai_clickid),pageUniqueId:e.page_unique_id||se(),domain:window.location&&window.location.hostname})}function la(e){return{facebook:"/analytics/meta/events",fb:"/analytics/meta/events",tiktok:"/analytics/tiktok/events",kwai:"/analytics/snackvideo/events"}[e]}function fe(e,t){var n={facebook:"meta",fb:"meta",tiktok:"tiktok",kwai:"kwai"}[e];if(!yt(n))return Promise.resolve({skipped:!0,reason:"privacy"});var r=la(e);return r?P(R(r),{method:"POST",body:Hn(e,t)}).catch(function(i){return F("Non-fatal analytics request failed",i),O("warning","analytics_track_failed","Analytics request failed.",{provider:e,message:i&&i.message}),null}):Promise.resolve(null)}function Xe(e,t){var n=e&&e[t];if(Array.isArray(n)){var r={};
2962return n.forEach(function(i){!i||!i.key||!i.value||(r[i.key]=i.value)}),r}}function Qe(e){var t=jt()[e];return t&&t.pixels?t.pixels:[]}function Rt(e){try{e()}catch(t){F("Non-fatal browser pixel failed",t)}}function fa(e){var t=K(e.fbEvents);if(t.length!==0&&A(Qe("facebook"))){var n=t.map(function(r){return{event_id:J(),event_name:r,parameters:Xe(e.fbEventsParameters,r)}});fe("fb",{events:n}),typeof window.fbq=="function"&&n.forEach(function(r){Rt(function(){k("meta")&&window.fbq("track",r.event_name,r.parameters||null,{eventID:r.event_id})})})}}function pa(e,t){var n=Object.assign({},Xe(e.tiktokEventsParameters,t)||{});if(!n.content_id){var r=c(e.contentId,e.content_id);r!=null&&r!==""&&(n.content_id=String(r))}return Ze(n)}function _a(e){var t=K(e.tiktokEvents);if(t.length!==0&&A(Qe("tiktok"))){var n=t.map(function(r){return{event_id:J(),event:r,parameters:pa(e,r)}});fe("tiktok",{events:n}),!(!window.ttq||typeof window.ttq.track!="function")&&n.forEach(function(r){Rt(function(){k("tiktok")&&window.ttq.track(r.event,r.parameters||{},{event_id:r.event_id})})})}}function va(e){var t=K(e.kwaiServerEvents);t.length>0&&A(Qe("kwai_server"))&&fe("kwai",{events:t.map(function(i){return{event_name:i,parameters:Xe(e.kwaiServerEventsParameters,i)}})});var n=K(e.kwaiClientEvents);if(n.length!==0){var r=Qe("kwai_client");A(r)&&(!window.kwaiq||typeof window.kwaiq.instance!="function"||K(r).forEach(function(i){var a=Ie(i);if(a&&k("kwai")){var o=window.kwaiq.instance(a);!o||typeof o.track!="function"||n.forEach(function(u){Rt(function(){o.track(u,Xe(e.kwaiClientEventsParameters,u)||{})})})}}))}}function ma(e){e=e||{},fa(e),_a(e),va(e)}function ha(e,t,n){if(y("marketing")){var r=e.facebook||{},i=e.tiktok||{},a=e.kwai_client||{};if(!n.is_probably_spam&&A(r.pixels)&&typeof window.fbq=="function"){var o=ua(t);m(r.events).forEach(function(u){k("meta")&&window.fbq("track",u,Object.assign({},o,B(r.parameters,u)||{}),{eventID:$e(n,u)})})}!n.is_probably_spam&&A(i.pixels)&&window.ttq&&typeof window.ttq.track=="function"&&m(i.events).forEach(function(u){k("tiktok")&&window.ttq.track(u,Ze(B(i.parameters,u)||{}),{event_id:$e(n,u)})}),A(a.pixels)&&window.kwaiq&&typeof window.kwaiq.instance=="function"&&K(a.pixels).forEach(function(u){var d=Ie(u);d&&m(a.events).forEach(function(l){if(k("kwai")){var _=window.kwaiq.instance(d);!_||typeof _.track!="function"||_.track(l,B(a.parameters,l)||{})}})})}}function Gn(e){var t=window.__scalev_runtime_analytics_event_ids__;if(!t||typeof t!="object")return[];var n=Object.keys(t);if(n.length!==1)return[];var r=t[n[0]];if(!r||typeof r!="object")return[];var i=r[e];return Array.isArray(i)?i:[]}function ga(){if(y("marketing")){var e=jt(),t=e.facebook||{},n=e.tiktok||{},r=e.kwai_client||{};try{if(A(t.pixels)&&typeof window.fbq=="function"){var i=Gn("facebook");m(t.events).forEach(function(o,u){k("meta")&&window.fbq("track",o,B(t.parameters,o)||{},i[u]?{eventID:i[u]}:void 0)})}if(A(n.pixels)&&window.ttq&&typeof window.ttq.track=="function"){var a=Gn("tiktok");m(n.events).forEach(function(o,u){k("tiktok")&&window.ttq.track(o,Ze(B(n.parameters,o)||{}),a[u]?{event_id:a[u]}:void 0)})}A(r.pixels)&&window.kwaiq&&typeof window.kwaiq.instance=="function"&&K(r.pixels).forEach(function(o){var u=Ie(o);u&&m(r.events).forEach(function(d){if(k("kwai")){var l=window.kwaiq.instance(u);!l||typeof l.track!="function"||l.track(d,B(r.parameters,d)||{})}})})}catch(o){F("Non-fatal onload analytics failure",o)}}}function Jn(e,t,n){var r=v.nexusApiUrl;if(r&&yt(t))try{return fetch(r.replace(/\/$/,"")+e,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(Object.assign({privacy:Q(),visit_privacy:ge(),domain:Ft(),event_source_url:window.location.href},n))}).catch(function(i){F("Non-fatal analytics request failed",i)})}catch(i){F("Non-fatal analytics request failed",i)}}function $n(e){if(y("marketing")&&tt()){e=e||{};var t=jt(),n=t.facebook||{},r=t.tiktok||{},i=t.kwai_client||{},a=c(e.bundlePriceOptionId,e.bundle_price_option_id,(e.bundlePriceOption||e.bundle_price_option||{}).id);if(a===void 0){var o=Ue(e),u=e.product||V().product||{},d=H(o),l=Number(c(pn(e),o.price,0)),_={content_ids:d!==void 0?[String(d)]:[],content_type:"product",content_name:u.name||"",value:isNaN(l)?0:l,currency:"IDR"},M=J(),q=J(),T=Ze(_);try{A(n.pixels)&&(Jn("/fb-event/","meta",{events:[{event_id:M,event_name:"AddToCart",parameters:_}]}),typeof window.fbq=="function"&&k("meta")&&window.fbq("track","AddToCart",_,{eventID:M})),A(r.pixels)&&(Jn("/tiktok-event/","tiktok",{events:[{event_id:q,event:"AddToCart",parameters:T}]}),window.ttq&&typeof window.ttq.track=="function"&&k("tiktok")&&window.ttq.track("AddToCart",T,{event_id:q})),A(i.pixels)&&window.kwaiq&&typeof window.kwaiq.instance=="function"&&K(i.pixels).forEac
2962h(function(g){var z=Ie(g);if(z&&k("kwai")){var U=window.kwaiq.instance(z);!U||typeof U.track!="function"||U.track("AddToCart",_)}})}catch(g){F("Non-fatal AddToCart analytics failure",g)}}}}function ya(e,t){var n=ta(),r=ra(e),i=[];try{n.gtm&&i.push(aa(r)),ha(n,t,r);var a=da(t,r),o=n.facebook||{};!r.is_probably_spam&&A(o.pixels)&&m(o.events).length&&i.push(fe("facebook",Object.assign({},a,{events:m(o.events).map(function(l){return{event_id:$e(r,l),event_name:l,parameters:B(o.parameters,l)}})})));var u=n.tiktok||{};!r.is_probably_spam&&A(u.pixels)&&m(u.events).length&&i.push(fe("tiktok",Object.assign({},a,{events:m(u.events).map(function(l){return{event_id:$e(r,l),event:l,parameters:B(u.parameters,l)}})})));var d=n.kwai_server||{};!r.is_probably_spam&&A(d.pixels)&&m(d.events).length&&c(t.kwai_clickid,ye().kwai_clickid)&&i.push(fe("kwai",Object.assign({},a,{events:m(d.events).map(function(l){return{event_name:l,parameters:B(d.parameters,l)}})})))}catch(l){F("Non-fatal checkout analytics failure",l),O("warning","checkout_submit_analytics_failed","Checkout submit analytics failed.",{message:l&&l.message})}return i.length?Promise.allSettled(i).then(function(){return e}).catch(function(l){return F("Non-fatal checkout analytics failure",l),O("warning","checkout_submit_analytics_failed","Checkout submit analytics failed.",{message:l&&l.message}),e}):Promise.resolve(e)}async function ba(e){var t=ea(e);y("marketing")||["fbc","fbp","ttp","ttclid","gclid","click_id","kwai_clickid","ad_source"].forEach(function(u){delete t[u]}),y("analytics")||(delete t.visitor_id,delete t.session_id,delete t.page_view_id),!y("analytics")&&!y("marketing")&&["utm_source","utm_medium","utm_campaign","utm_content","utm_term"].forEach(function(u){delete t[u]}),t.privacy=Q(),t.visit_privacy=ge();var n=Je(e),r=Bn(n.variants),i=zn(n.bundles),a=[];m(r).forEach(function(u){var d=c(u.variant_unique_id,u.id);d&&a.push({id:d,quantity:Number(c(u.quantity,1))||1,price:Number(c(u.price,0))})}),m(i).forEach(function(u){var d=c(u.bundle_price_option_unique_id,u.id);d&&a.push({id:d,quantity:Number(c(u.quantity,1))||1,price:Number(c(u.price,0))})}),Object.defineProperty(t,"__scalev_analytics",{value:{variants:r,bundle_price_options:i,line_items:a},enumerable:!1});var o=await gn();if(!o)throw hn("recaptcha_failed","Checkout security verification returned an empty token.");return t.recaptcha_token=o,t}function wa(){var e=V();if(!e||!Object.prototype.hasOwnProperty.call(e,"prefill")&&!Object.prototype.hasOwnProperty.call(e,"_analytics"))return D(e);var t={};return Object.keys(e).forEach(function(n){n==="prefill"||n==="_analytics"||(t[n]=e[n])}),D(t)}function Zn(){var e=["click_id","ttclid","gclid","ap","ref","ad_source","discount_code"],t=new URLSearchParams(window.location.search),n=new URLSearchParams;function r(a,o){if(!n.has(a)){var u=o==null?"":String(o).trim();u&&n.set(a,u)}}e.forEach(function(a){r(a,t.get(a))}),t.forEach(function(a,o){o.indexOf("utm_")===0&&r(o,a)});var i=n.toString();return i?"/s/cart?"+i:"/s/cart"}function ka(){for(var e=document.querySelectorAll(".sv-store-cart"),t=0;t<e.length;t++)e[t].style.cursor="pointer",e[t].setAttribute("role","link"),e[t].setAttribute("tabindex","0");document.addEventListener("click",function(n){var r=n.target;if(!(!r||typeof r.closest!="function")){var i=r.closest(".sv-store-cart");i&&(n.preventDefault(),window.location.assign(Zn()))}}),document.addEventListener("keydown",function(n){if(n.key==="Enter"){var r=n.target;if(!(!r||typeof r.closest!="function")){var i=r.closest(".sv-store-cart");i&&(n.preventDefault(),window.location.assign(Zn()))}}})}var Ae="scalev_guest_token",Xn="scalev-cart-toast",Qn="sv-cart-count-badge";function er(){try{return window.localStorage.getItem(Ae)||""}catch{return""}}function xa(e){if(e)try{window.localStorage.setItem(Ae,e)}catch{}}function Sa(){var e=er();return e?{"x-scalev-guest-token":e}:{}}var tr="scalev-cart-toast-style",nr=null,Ia='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 12 10 18 20 6"></polyline></svg>',Aa='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="6" y1="6" x2="18" y2="18"></line><line x1="6" y1="18" x2="18" y2="6"></line></svg>';function Ca(){if(!document.getElementById(tr)){var e=document.createElement("style");e.id=tr,e.textContent=".sv-cart-toast{position:fixed;top:14px;left:50%;transform:translateX(-50%) translateY(-140%);background:var(--sv-cart-toast-surface,#0F1419);color:var(--sv-cart-toast-text,#fff);font-size:14px;font-weight:600;padding:11px 16px 11px 12px;border-radius:var(--sv-cart-radius,10px);display:flex;align-items:center;gap:10px;box-shadow:0 10px 28px -8px rgba(0,0,0,.3);z-index:2147483647;opacity:0;pointer-events:none;transition:transform .35s cubic-bezier(.2,.7,.3,1.1),opacity .25s;max-width:calc(100% - 24px);white-space:nowrap;box-sizing:border-box}.sv-cart-toast.is-visible{transform:translateX(-50%) translateY(0);opacity:1}.sv-cart-toast--error{white-space:normal;max-width:min(360px,calc(100% - 24px));align-items:flex-start}.sv-cart-toast__chip{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;color:var(--sv-cart-chip-icon,#fff)}.sv-cart-toast--success .sv-cart-toast__chip{background:var(--sv-cart-success,#16A34A)}.sv-cart-toast--error .sv-cart-toast__chip{background:var(--sv-cart-danger,#DC2626)}.sv-cart-toast__chip svg{width:12px;height:12px;color:var(--sv-cart-chip-icon,#fff);
2962stroke-width:3;display:block}",document.head.appendChild(e)}}function et(e,t){if(!(!e||!document.body)){Ca();var n=t==="error",r=document.getElementById(Xn);if(!r){r=document.createElement("div"),r.id=Xn;var i=document.createElement("span");i.className="sv-cart-toast__chip";var a=document.createElement("span");a.className="sv-cart-toast__msg",r.appendChild(i),r.appendChild(a),document.body.appendChild(r)}r.className="sv-cart-toast "+(n?"sv-cart-toast--error":"sv-cart-toast--success"),r.setAttribute("role",n?"alert":"status"),r.setAttribute("aria-live",n?"assertive":"polite"),r.querySelector(".sv-cart-toast__chip").innerHTML=n?Aa:Ia,r.querySelector(".sv-cart-toast__msg").textContent=e,r.classList.remove("is-visible"),r.offsetWidth,r.classList.add("is-visible"),clearTimeout(nr),nr=setTimeout(function(){r.classList.remove("is-visible")},2400)}}function qa(e){var t=e.querySelector("."+Qn);if(t)return t;var n=window.getComputedStyle(e);return n&&n.position==="static"&&(e.style.position="relative"),t=document.createElement("span"),t.className=Qn,t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:9999px;background-color:var(--sf-primary,"+ar+");color:#ffffff;font-size:10px;line-height:16px;font-weight:700;text-align:center;display:none;box-sizing:border-box;pointer-events:none;",e.appendChild(t),t}function Ce(e){for(var t=Number(e)||0,n=document.querySelectorAll(".sv-store-cart"),r=0;r<n.length;r+=1){var i=qa(n[r]);t>0?(i.textContent=t>99?"99+":String(t),i.style.display="block"):(i.textContent="",i.style.display="none"),n[r].setAttribute("aria-label",t>0?"Keranjang, "+t+" item":"Keranjang")}}function Ut(e){return!e||typeof e!="object"||(xa(c(e.guestToken,e.guest_token)),Ce(c(e.itemCount,e.item_count,0))),e}function tt(){return V().is_product_page===!0}function rr(){return{base:R("/cart"),headers:Sa()}}function Ft(){var e=window.location.hostname;return e.indexOf("localhost")!==-1?window.location.host:e}function J(){try{if(window.crypto&&typeof window.crypto.randomUUID=="function")return window.crypto.randomUUID()}catch{}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Ta(){return J()}function Ea(){var e=ce(Ae);if(e)return je(e);var t=Ta();try{var n=window.location.protocol==="https:"?"; Secure":"";document.cookie=Ae+"="+encodeURIComponent(t)+"; path=/; max-age=604800; SameSite=Lax"+n}catch{}return t}function Oa(e){return"/api/v2/catalog/"+encodeURIComponent(Ft())+"/cart"+(e||"")+"?guest_token="+encodeURIComponent(Ea())}async function Kt(e,t){t=t||{};var n={"x-origin":Ft()},r;t.body!==void 0&&(n["content-type"]="application/json",r=JSON.stringify(t.body));var i=await fetch(Oa(e),{method:t.method||"GET",headers:n,body:r}),a=await be(i);if(!i.ok){var o=new Error(wn(a,i.statusText));o.status=i.status,o.data=a;var u=a&&a.errors&&a.errors.customer_price;throw Array.isArray(u)&&(u=u[0]),u&&(o.field="customer_price",o.message=u),o}return qt(a)}function Bt(e){return!e||typeof e!="object"?0:c(e.itemCount,e.item_count,0)}function Pa(){try{if(!document.querySelector(".sv-store-cart"))return;if(tt()){if(!ce(Ae)){Ce(0);return}Kt("",{method:"GET"}).then(function(t){Ce(Bt(t))}).catch(function(){});return}if(!er()){Ce(0);return}var e=rr();P(e.base,{method:"GET",headers:e.headers}).then(Ut).catch(function(){})}catch{}}var La="scalev-cart-drawer",ir="scalev-cart-drawer-style",ar="#0699cf",h=null,qe=null,nt=null,or=0,zt={};function Na(){try{return typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function cr(e){var t=Number(e);return isFinite(t)||(t=0),"Rp "+t.toLocaleString("id-ID")}function sr(e){var t=["click_id","ttclid","gclid","ap","ref","ad_source","discount_code"],n=new URLSearchParams(window.location.search),r=new URLSearchParams;function i(o,u){if(!r.has(o)){var d=u==null?"":String(u).trim();d&&r.set(o,d)}}t.forEach(function(o){i(o,n.get(o))}),n.forEach(function(o,u){u.indexOf("utm_")===0&&i(u,o)});var a=r.toString();return a?e+"?"+a:e}function Da(){return sr("/s/checkout")}function Ma(e){var t=e.type==="bundle_price_option"?e.bundle_price_option_slug||"":e.product_slug||e.variant&&e.variant.product&&e.variant.product.slug||"",n=e.type==="bundle_price_option"?"/b/":"/p/";return sr(n+t)}function ja(){if(!document.getElementById(ir)){var e=document.createElement("style");e.id=ir,e.textContent=".sv-cart-drawer{position:fixed;inset:0;z-index:2147483646;visibility:hidden;pointer-events:none;font-family:var(--sf-font,inherit)}.sv-cart-drawer.is-open{visibility:visible;pointer-events:auto}.sv-cart-drawer *{box-sizing:border-box}.sv-cart-drawer__scrim{position:absolute;inset:0;background:var(--sv-cart-scrim,rgba(15,30,41,.42));opacity:0;transition:opacity .3s ease}.sv-cart-drawer.is-open .sv-cart-drawer__scrim{opacity:1}.sv-cart-drawer__panel{position:absolute;top:0;right:0;bottom:0;display:flex;flex-direction:column;width:92%;max-width:392px;background:var(--sv-cart-surface,#fff);box-shadow:-16px 0 40px -18px rgba(15,30,41,.4);transform:translateX(100%);transition:transform .34s cubic-bezier(.22,1,.36,1)}.sv-cart-drawer.is-open .sv-cart-drawer__panel{transform:translateX(0)}.sv-cart-drawer__head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
2962height:56px;padding:0 16px;border-bottom:1px solid var(--sv-cart-border,#EAEAEB)}.sv-cart-drawer__title{margin:0;font-size:16px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--sv-cart-text,#0F1419)}.sv-cart-drawer__close{width:34px;height:34px;border:0;border-radius:var(--sv-cart-radius,9px);background:var(--sv-cart-subtle,#F5F5F5);color:var(--sv-cart-muted,#55636E);display:grid;place-items:center;cursor:pointer}.sv-cart-drawer__close:hover{background:var(--sv-cart-border,#EAEAEB)}.sv-cart-drawer__body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.sv-cart-drawer__foot{flex:0 0 auto;border-top:1px solid var(--sv-cart-border,#EAEAEB);padding:14px 16px;padding-bottom:max(14px,env(safe-area-inset-bottom))}.sv-cart-drawer__checkout{display:flex;width:100%;height:52px;align-items:center;justify-content:center;gap:10px;border:0;border-radius:var(--sv-cart-radius,13px);background:var(--sf-primary,"+ar+");color:var(--sv-cart-on-primary,#fff);font-size:15.5px;font-weight:800;cursor:pointer;text-decoration:none;transition:filter .15s ease}.sv-cart-drawer__checkout:hover{filter:brightness(.96)}.sv-cart-drawer__checkout.is-disabled{opacity:.4;pointer-events:none}.sv-cart-drawer__note{margin:0 0 12px;text-align:center;font-size:12px;color:var(--sv-cart-muted,#55636E)}.sv-cart-line{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--sv-cart-border,#EAEAEB)}.sv-cart-line--blocked{opacity:.9}.sv-cart-line__thumb{width:56px;height:56px;flex:0 0 auto;border-radius:var(--sv-cart-radius,11px);background:var(--sv-cart-subtle,#F5F5F5);overflow:hidden;display:block}.sv-cart-line__thumb-img{width:100%;height:100%;object-fit:cover;display:block}.sv-cart-line__thumb--blocked .sv-cart-line__thumb-img{filter:grayscale(1);opacity:.8}.sv-cart-line__meta{flex:1;min-width:0;display:flex;flex-direction:column}.sv-cart-line__top{display:flex;align-items:flex-start;gap:8px}.sv-cart-line__name{display:block;min-width:0;font-size:14px;font-weight:600;line-height:1.3;color:var(--sv-cart-text,#0F1419);text-decoration:none}a.sv-cart-line__name:hover{text-decoration:underline}.sv-cart-line__sub{margin-top:2px;font-size:11.5px;color:var(--sv-cart-faint,#6B7680)}.sv-cart-line__badge{margin-top:4px;display:inline-block;border-radius:var(--sv-cart-radius,5px);background:var(--sv-cart-subtle,#F5F5F5);padding:2px 6px;font-size:10px;font-weight:600;color:var(--sv-cart-muted,#55636E)}.sv-cart-line__blocked-note{margin-top:4px;font-size:11.5px;font-weight:500;color:var(--sv-cart-danger,#C0392B)}.sv-cart-line__price{flex:0 0 auto;white-space:nowrap;font-size:14px;font-weight:700;color:var(--sv-cart-text,#0F1419)}.sv-cart-line__actions{margin-top:10px;display:flex;align-items:center;gap:12px}.sv-cart-step{display:flex;align-items:center;border:1px solid var(--sv-cart-border,#EAEAEB);border-radius:var(--sv-cart-radius,8px)}.sv-cart-step__btn{width:30px;height:30px;border:0;background:transparent;color:var(--sv-cart-text,#0F1419);font-size:16px;cursor:pointer;display:grid;place-items:center}.sv-cart-step__btn:disabled{opacity:.35;cursor:default}.sv-cart-step__qty{min-width:30px;padding:0 4px;text-align:center;font-size:14px;font-weight:700;color:var(--sv-cart-text,#0F1419)}.sv-cart-line__remove{border:0;background:transparent;color:var(--sv-cart-faint,#6B7680);font-size:12.5px;font-weight:600;cursor:pointer}.sv-cart-line__remove:hover{color:var(--sv-cart-danger,#C0392B)}.sv-cart-bundle{margin-top:10px}.sv-cart-bundle__toggle{display:flex;align-items:center;gap:4px;border:0;background:transparent;color:var(--sv-cart-muted,#55636E);font-size:12px;font-weight:500;cursor:pointer;padding:0}.sv-cart-bundle__list{margin:8px 0 0;padding:0 0 0 20px;list-style:none}.sv-cart-bundle__row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--sv-cart-muted,#55636E);margin-bottom:6px}.sv-cart-bundle__blocked{color:var(--sv-cart-danger,#C0392B);font-weight:500}.sv-cart-drawer__group-title{margin:0;padding:8px 16px;background:var(--sv-cart-subtle,#F5F5F5);font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--sv-cart-faint,#6B7680)}.sv-cart-drawer__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:64px 32px;text-align:center;color:var(--sv-cart-muted,#55636E)}.sv-cart-drawer__empty-ic{width:64px;
2962height:64px;border-radius:50%;background:var(--sv-cart-subtle,#F5F5F5);display:grid;place-items:center;color:var(--sv-cart-faint,#B3B2B4)}.sv-cart-drawer__shop{margin-top:4px;border:1px solid var(--sv-cart-border,#D9D8DA);border-radius:var(--sv-cart-radius,12px);background:var(--sv-cart-surface,#fff);padding:10px 20px;font-size:14px;font-weight:600;color:var(--sv-cart-text,#0F1419);cursor:pointer}.sv-cart-drawer__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media (prefers-reduced-motion: reduce){.sv-cart-drawer__scrim,.sv-cart-drawer__panel{transition-duration:.001ms}}",document.head.appendChild(e)}}function ur(e){return c(e.available,!0)===!1}function Ra(e){return e.type==="bundle_price_option"?c(e.bundle_price_option_name,e.bundle_name,"Paket"):c(e.variant_name,e.product_name,e.variant&&e.variant.name,"Produk")}function Ua(e){return e.type==="bundle_price_option"?e.bundle_name!==e.bundle_price_option_name?c(e.bundle_name,""):"":c(e.product_name,e.variant&&e.variant.product&&e.variant.product.name,"")}function Fa(e){var t=e.bundlelines||[];if(!t.length)return"";for(var n="",r=0;r<t.length;r+=1){var i=t[r],a=c(i.available,!0)===!1?'<span class="sv-cart-bundle__blocked">Belum bisa di-checkout</span>':"";n+='<li class="sv-cart-bundle__row"><span style="flex:1;min-width:0">'+x(c(i.product_name,""))+(i.variant_name?" &middot; "+x(i.variant_name):"")+"</span><span>x"+x(String(c(i.quantity,1)))+"</span>"+a+"</li>"}return'<div class="sv-cart-bundle"><button type="button" class="sv-cart-bundle__toggle" data-act="bundle" data-id="'+x(String(e.id))+'">Isi Paket ('+t.length+' produk)</button><ul class="sv-cart-bundle__list" data-bundle-for="'+x(String(e.id))+'" hidden>'+n+"</ul></div>"}function dr(e){var t=ur(e),n=x(String(e.id)),r=c(e.image,e.variant&&e.variant.image,""),i=c(e.available_qty,100),a=c(e.quantity,1),o=!t&&a<i,u=a>1,d=Ua(e),l=Ra(e),_=t?"":x(Ma(e)),M="sv-cart-line__thumb"+(t?" sv-cart-line__thumb--blocked":""),q=r?'<img class="sv-cart-line__thumb-img" src="'+x(r)+'" alt="" loading="lazy">':"",T=t?'<div class="'+M+'">'+q+"</div>":'<a class="'+M+'" href="'+_+'" aria-label="'+x(l)+'">'+q+"</a>",g=t?'<div class="sv-cart-line__name">'+x(l)+"</div>":'<a class="sv-cart-line__name" href="'+_+'">'+x(l)+"</a>";return'<div class="sv-cart-line'+(t?" sv-cart-line--blocked":"")+'">'+T+'<div class="sv-cart-line__meta"><div class="sv-cart-line__top"><div style="flex:1;min-width:0">'+g+(d?'<div class="sv-cart-line__sub">'+x(d)+"</div>":"")+(e.type==="bundle_price_option"?'<span class="sv-cart-line__badge">Paket</span>':"")+(t?'<div class="sv-cart-line__blocked-note">Belum bisa di-checkout</div>':"")+'</div><span class="sv-cart-line__price">'+x(cr(e.line_subtotal))+'</span></div><div class="sv-cart-line__actions"><div class="sv-cart-step"><button type="button" class="sv-cart-step__btn" data-act="dec" data-id="'+n+'" aria-label="Kurangi jumlah"'+(u?"":" disabled")+'>&minus;</button><span class="sv-cart-step__qty">'+x(String(a))+'</span><button type="button" class="sv-cart-step__btn" data-act="inc" data-id="'+n+'" aria-label="Tambah jumlah"'+(o?"":" disabled")+'>+</button></div><button type="button" class="sv-cart-line__remove" data-act="rem" data-id="'+n+'">Hapus</button></div>'+Fa(e)+"</div></div>"}function lr(e){if(h){for(var t=e&&e.items||[],n=[],r=[],i=0;i<t.length;i+=1)ur(t[i])?r.push(t[i]):n.push(t[i]);if(!t.length){h.body.innerHTML='<div class="sv-cart-drawer__empty"><div class="sv-cart-drawer__empty-ic"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="20" r="1.4"/><circle cx="18" cy="20" r="1.4"/><path d="M2 3h3l2.4 12.2a1.5 1.5 0 0 0 1.5 1.2h8.2a1.5 1.5 0 0 0 1.5-1.2L22 7H6"/></svg></div><p style="margin:0;font-size:14px">Keranjang Anda masih kosong.</p><button type="button" class="sv-cart-drawer__shop" data-act="close">Belanja lagi</button></div>',h.foot.style.display="none";return}for(var a="",o=0;o<n.length;o+=1)a+=dr(n[o]);if(r.length){a+='<p class="sv-cart-drawer__group-title">Belum bisa di-checkout</p>';for(var u=0;u<r.length;u+=1)a+=dr(r[u])}h.body.innerHTML=a,h.foot.style.display="block";var d=n.length>0;h.note.style.display=d?"none":"block",h.total.textContent=cr(e&&e.total),d?(h.checkout.classList.remove("is-disabled"),h.checkout.removeAttribute("aria-disabled")):(h.checkout.classList.add("is-disabled"),h.checkout.setAttribute("aria-disabled","true"))}}function Ka(e){nt=e,Ut(e),lr(e)}async function fr(e,t,n){if(!zt[e]){zt[e]=!0;var r=or+=1;try{var i=await Kt("/items/"+encodeURIComponent(e),t);r===or&&Ka(i)}catch(a){et(a&&a.message||n,"error")}finally{delete zt[e]}}}
2962function Ba(){if(!h){ja();var e=document.createElement("div");e.className="sv-cart-drawer",e.id=La,e.innerHTML='<div class="sv-cart-drawer__scrim" data-act="close"></div><aside class="sv-cart-drawer__panel" role="dialog" aria-modal="true" aria-label="Keranjang" aria-hidden="true"><div class="sv-cart-drawer__head"><h2 class="sv-cart-drawer__title">Keranjang</h2><button type="button" class="sv-cart-drawer__close" data-act="close" aria-label="Tutup keranjang"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M18 6 6 18M6 6l12 12"/></svg></button></div><div class="sv-cart-drawer__body"></div><div class="sv-cart-drawer__foot"><p class="sv-cart-drawer__note" style="display:none">Belum ada item yang siap di-checkout. Hapus item yang bermasalah dulu.</p><a class="sv-cart-drawer__checkout" href="#"><span>Checkout</span><span style="opacity:.6">&bull;</span><span class="sv-cart-drawer__total">Rp 0</span></a></div><div class="sv-cart-drawer__sr" role="status" aria-live="polite"></div></aside>',document.body.appendChild(e);var t=e.querySelector(".sv-cart-drawer__panel");h={root:e,panel:t,scrim:e.querySelector(".sv-cart-drawer__scrim"),body:e.querySelector(".sv-cart-drawer__body"),foot:e.querySelector(".sv-cart-drawer__foot"),note:e.querySelector(".sv-cart-drawer__note"),checkout:e.querySelector(".sv-cart-drawer__checkout"),total:e.querySelector(".sv-cart-drawer__total"),close:e.querySelector(".sv-cart-drawer__close"),live:e.querySelector(".sv-cart-drawer__sr")},e.addEventListener("click",function(n){var r=n.target;if(!(!r||typeof r.closest!="function")){var i=r.closest("[data-act]");if(!(!i||!e.contains(i))){var a=i.getAttribute("data-act"),o=i.getAttribute("data-id");if(a==="close")Vt();else if(a==="bundle"){var u=e.querySelector('[data-bundle-for="'+o+'"]');u&&(u.hidden=!u.hidden)}else if(a==="inc"||a==="dec"||a==="rem"){var d=za(o);if(!d)return;if(a==="rem")fr(o,{method:"DELETE"},"Gagal menghapus item");else{var l=c(d.quantity,1)+(a==="inc"?1:-1);if(l<1)return;fr(o,{method:"PATCH",body:{quantity:l}},"Gagal mengubah jumlah")}}}}}),h.checkout.addEventListener("click",function(n){n.preventDefault(),!h.checkout.classList.contains("is-disabled")&&(Vt(),window.location.assign(Da()))}),document.addEventListener("keydown",function(n){if(e.classList.contains("is-open")){if(n.key==="Escape"){n.stopPropagation(),Vt();return}if(n.key==="Tab"){var r=t.querySelectorAll('a[href], button:not([disabled]), input, [tabindex]:not([tabindex="-1"])');if(!r.length)return;var i=r[0],a=r[r.length-1],o=document.activeElement;n.shiftKey&&o===i?(n.preventDefault(),a.focus()):!n.shiftKey&&o===a&&(n.preventDefault(),i.focus())}}})}}function za(e){for(var t=nt&&nt.items||[],n=0;n<t.length;n+=1)if(String(t[n].id)===String(e))return t[n];return null}function Va(e){Ba(),nt=e,lr(e),qe=document.activeElement;var t=Bt(e),n=function(){h&&(h.root.classList.add("is-open"),h.panel.setAttribute("aria-hidden","false"),document.body.style.overflow="hidden",h.live.textContent="",setTimeout(function(){h&&(h.live.textContent="Ditambahkan ke keranjang. Total "+t+" item.")},60),setTimeout(function(){h&&h.close&&h.close.focus()},Na()?0:360))};typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(n):n()}function Vt(){h&&(h.root.classList.remove("is-open"),h.panel.setAttribute("aria-hidden","true"),document.body.style.overflow="",qe&&typeof qe.focus=="function"&&qe.focus(),qe=null)}var pr="scalev-sticky-cta-reveal-style";function Ha(){if(!document.getElementById(pr)){var e=document.createElement("style");e.id=pr,e.textContent=".sv-product-detail--final_cta.sv-cta-reveal:has(.sv-sticky-cta){transition:transform .2s ease-out,opacity .2s ease-out}.sv-product-detail--final_cta.sv-cta-hidden:has(.sv-sticky-cta){transform:translateY(100%);opacity:0;pointer-events:none}.sv-product-detail--final_cta.sv-cta-unreachable:has(.sv-sticky-cta){display:none}",document.head.appendChild(e)}}function _r(){for(var e=document.querySelectorAll(".sv-product-detail--final_cta"),t=0;t<e.length;t+=1)if(e[t].querySelector(".sv-sticky-cta"))return e[t];return null}function rt(e){return!!e&&e.getClientRects().length>0}function Ya(){for(var e=document.querySelectorAll('[data-sv-product-section="purchase_block"]'),t=0;t<e.length;t+=1)if(rt(e[t]))return e[t];return null}function Wa(e){var t=e.getAttribute("data-sclv-widget-id");if(!t)return null;var n=t.replace(/-sticky$/,"");if(n===t||!n)return null;for(var r=document.querySelectorAll('[data-sclv-widget-id="'+n+'"]'),i=0;i<r.length;
2962i+=1)if(r[i]!==e&&!(e.contains(r[i])||r[i].contains(e))&&!r[i].querySelector(".sv-sticky-cta")&&rt(r[i]))return r[i];return null}function Ht(e){var t=Ya();if(t)return{el:t,kind:"purchase_block"};var n=Wa(e);return n?{el:n,kind:"twin"}:null}function vr(e,t,n){if(typeof MutationObserver!="undefined"){var r=!1,i=new MutationObserver(function(a){for(var o=!1,u=0;u<a.length;u+=1){var d=a[u].target,l=t&&(d===t||t.contains(d));if(!l){o=!0;break}}if(!(!o||r)){r=!0;var _=function(){r=!1,n()};typeof requestAnimationFrame=="function"?requestAnimationFrame(_):setTimeout(_,0)}});i.observe(e||document.body,{attributes:!0,childList:!0,subtree:!0})}}var mr=!1;function hr(){if(!mr){mr=!0;var e=!1,t=function(){if(!e){e=!0;var o=function(){e=!1,gr()};typeof requestAnimationFrame=="function"?requestAnimationFrame(o):setTimeout(o,0)}};window.addEventListener("load",t),window.addEventListener("resize",t),window.addEventListener("orientationchange",t),document.addEventListener("click",function(o){var u=o.target;u&&u.closest&&u.closest("[data-sv-fold-toggle]")&&t()});var n=document.querySelector(".scalev-product-artifact__page");if(vr(n,_r(),t),typeof ResizeObserver!="undefined")for(var r=new ResizeObserver(t),i=[n,document.documentElement,document.body],a=0;a<i.length;a+=1)i[a]&&r.observe(i[a])}}function gr(){try{var e=_r();if(!e||e.getAttribute("data-sv-cta-init")==="1"||typeof IntersectionObserver=="undefined")return;var t=Ht(e);if(!t){hr();return}var n=t.el,r=t.kind==="twin";e.setAttribute("data-sv-cta-init","1"),Ha(),e.classList.add("sv-cta-hidden"),e.offsetWidth,e.classList.add("sv-cta-reveal");var i=function(){for(var b=document.querySelectorAll('[data-sv-product-section="inline_cta"]'),j=0;j<b.length;j+=1){var N=b[j];if(!(N===e||e.contains(N))&&!N.querySelector(".sv-sticky-cta")&&N.getClientRects().length!==0){var dt=N.getBoundingClientRect();if(dt.bottom>0&&dt.top<window.innerHeight)return!0}}return!1},a=function(b,j){var N=r?j:j||b.top>=0||i();N?e.classList.add("sv-cta-hidden"):e.classList.remove("sv-cta-hidden")},o=null,u=function(){if(!o){o=new IntersectionObserver(function(j){var N=j[j.length-1];N&&a(N.boundingClientRect,N.isIntersecting)},{threshold:0}),o.observe(n);var b=n.getBoundingClientRect();a(b,b.bottom>0&&b.top<window.innerHeight)}},d=function(){o&&(o.disconnect(),o=null)},l=function(){if(n){var b=n.getBoundingClientRect();a(b,b.bottom>0&&b.top<window.innerHeight)}};if(!r){var _=document.querySelectorAll('[data-sv-product-section="inline_cta"]');if(_.length)for(var M=new IntersectionObserver(l,{threshold:0}),q=0;q<_.length;q+=1)e.contains(_[q])||M.observe(_[q])}var T=function(){if(!rt(n)){var b=Ht(e);b&&b.el!==n&&(n=b.el,d())}var j=n.getBoundingClientRect(),N=document.documentElement.scrollHeight-window.innerHeight,dt=j.bottom+window.pageYOffset;N>dt+1?(e.classList.remove("sv-cta-unreachable"),u()):(d(),e.classList.add("sv-cta-hidden"),e.classList.add("sv-cta-unreachable"))};if(r){var g=function(){if(!rt(n)){d(),e.classList.remove("sv-cta-hidden");var b=Ht(e);
2962if(b&&b.kind==="twin"&&b.el!==n){n=b.el,u();return}e.removeAttribute("data-sv-cta-init"),hr()}};u(),window.addEventListener("load",g),window.addEventListener("resize",g),window.addEventListener("orientationchange",g),vr(document.querySelector(".scalev-product-artifact__page"),e,g);return}if(T(),typeof requestAnimationFrame!="undefined"&&requestAnimationFrame(function(){requestAnimationFrame(T)}),window.addEventListener("load",T),window.addEventListener("resize",T),window.addEventListener("orientationchange",T),typeof ResizeObserver!="undefined")for(var z=new ResizeObserver(T),U=[document.querySelector(".scalev-product-artifact__page"),document.documentElement,document.body],ut=0;ut<U.length;ut+=1)U[ut]&&z.observe(U[ut])}catch{}}var yr="scalev-store-logo-link-style";function Ga(){if(!document.getElementById(yr)){var e=document.createElement("style");e.id=yr,e.textContent=".sv-store-logo-link{display:flex;align-items:center;justify-content:center;height:100%;width:100%;color:inherit;text-decoration:none}",document.head.appendChild(e)}}function Ja(){try{var e=document.querySelector(".sv-store-logo");if(!e||e.closest("[data-sv-store-home]")||e.querySelector("[data-sv-store-home]")||e.closest("[data-sv-store-logo-nolink]")||e.querySelector("[data-sv-store-logo-nolink]"))return;Ga();var t=document.createElement("a");for(t.setAttribute("class","sv-store-logo-link"),t.setAttribute("href","/"),t.setAttribute("aria-label","Beranda toko"),t.setAttribute("data-sv-store-home","");e.firstChild;)t.appendChild(e.firstChild);e.appendChild(t)}catch{}}var pe="_sclv_vid",it="_sclv_sid",at="_sclv_sat",ot="_sclv_adc",Yt=[["fbclid","meta"],["ttclid","tiktok"],["gclid","google"]],br={meta:7,tiktok:7,google:30},$a=["page_view","page_hidden"],wr=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],Za=["builder","html_mode","server"],Xa=["landing_page","product","bundle_price_option","store_home","cart","checkout","payment_link","order_detail","order_success","order_invoice"],Qa=/^[1-9][0-9]{0,19}$/,kr=1800*1e3,eo=3600*24*400,xr=360*60*1e3,Sr=50,Ir=64*1024,to=10*1e3,ne=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,no=/[^\s@]+@[^\s@]+\.[^\s@]+/u,ro=/\+?(?:\p{N}[\s().-]*){7,}\p{N}/u,io=/[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/iu,ao=/(?:eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+|[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,})/u,oo=/[0-9a-f]{24,}/iu,co=/[0-9A-HJKMNP-TV-Z]{26}/iu,so=/[A-Za-z0-9_-]{32,}/u,uo=/(?:^|[^A-Za-z0-9])(?:bearer|authorization|api[ _-]?key|access[ _-]?token|refresh[ _-]?token|id[ _-]?token|client[ _-]?secret|token|secret|password|passwd)(?:$|[^A-Za-z0-9])/iu,lo=/^[\p{L}\p{N}][\p{L}\p{N} ._+\/-]*$/u,re=[],Te=!1,Ar=!1,$=null,Z=document.visibilityState==="hidden"?null:Date.now(),L=null,Cr={},ie=null,Wt="";function Ee(e){for(var t=e+"=",n=String(document.cookie||"").split(";"),r=0;r<n.length;r++){var i=n[r].replace(/^\s+/,"");if(i.indexOf(t)===0)return decodeURIComponent(i.slice(t.length))}return""}function ct(e,t,n){var r=window.location.protocol==="https:"?"; Secure":"";document.cookie=e+"="+encodeURIComponent(t)+"; Path=/; Max-Age="+n+"; SameSite=Lax"+r}function Oe(e){try{return window.localStorage.getItem(e)||""}catch{return""}}function st(e,t){try{window.localStorage.setItem(e,t)}catch{}}function fo(){if(ie!==null)return ie;for(var e=Date.now(),t=Ee(ot)||Oe(ot),n=String(t||"").split("."),r=Number(n[1]),i=br[n[0]]&&isFinite(r)&&r>e?n[0]:"",a=new URLSearchParams(window.location.search),o=0;o<Yt.length;o++){var u=Yt[o][0],d=Yt[o][1];if(String(a.get(u)||"").trim()!==""){var l=br[d];if(!l)continue;var _=d+"."+(e+l*24*60*60*1e3);return ct(ot,_,l*24*60*60),st(ot,_),ie=d,Wt="param",ie}}return ie=i,Wt=i?"cookie":"",ie}function po(){if(!y("analytics"))return{privacy:Q()};try{var e=Ee(pe)||Oe(pe);if(!ne.test(e||""))return{};var t=qr(),n={visitor_id:t.visitorId,session_id:t.sessionId};return v.analyticsIngestToken&&!Te&&L&&L.visitorId===t.visitorId&&L.url===Tr(window.location.href)&&ne.test(L.pageViewId)&&(n.page_view_id=L.pageViewId),n}catch{return{}}}function qr(){if(!y("analytics"))return{};var e=Date.now(),t=Ee(pe);ne.test(t)||(t=Oe(pe)),ne.test(t)||(t=J()),ct(pe,t,eo),st(pe,t);var n=Ee(it)||Oe(it),r=parseInt(Ee(at)||Oe(at),10),i=!isFinite(r)||e-r>kr;(!ne.test(n)||i)&&(n=J());var a=Math.ceil(kr/1e3);return ct(it,n,a),st(it,n),ct(at,String(e),a),st(at,String(e)),{visitorId:t,sessionId:n}}function _o(){var e=String(navigator&&navigator.userAgent||"").toLowerCase();if(/ipad|tablet|playbook|silk/.test(e))return"tablet";if(/mobi|iphone|ipod|android.*mobile/.test(e))return"mobile";var t=window.innerWidth||0,n=navigator&&navigator.maxTouchPoints||0;return t?n>0&&t<768?"mobile":n>0&&t<1024?"tablet":"desktop":"other"}function vo(e){return/^\/o\/[^/]+\/generated-invoice\/?$/.test(e)?"/o/:order/generated-invoice":/^\/o\/[^/]+\/success\/?$/.test(e)?"/o/:order/success":/^\/o\/[^/]+\/?$/.test(e)?"/o/:order":/^\/pay\/[^/]+\/?$/.test(e)?"/pay/:payment_link":e||"/"}function mo(e){var t=String(e||"").replace(/[\u0000-\u001f\u007f]/g,"").trim(),n=t.toLowerCase();return t.length>80||!lo.test(t)||no.test(t)||ro.test(t)||io.test(t)||ao.test(t)||oo.test(t)||co.test(t)||so.test(t)||uo.test(t)||n.indexOf("://")>=0||n.indexOf("token=")>=0||n.indexOf("secret=")>=0||n.indexOf("password=")>=0||n.indexOf("passwd=")>=0?"":t}function Tr(e){try{var t=new URL(window.location.href),n=new URL(e||t.href,t);(n.protocol!=="http:"&&n.protocol!=="https:"||n.origin!==t.origin)&&(n=t);
2962for(var r=new URLSearchParams,i=0;i<wr.length;i++){var a=wr[i],o=mo(n.searchParams.get(a));o&&r.set(a,o)}var u=r.toString();return n.origin+vo(n.pathname)+(u?"?"+u:"")}catch{return""}}function ho(e){try{var t=new URL(e||"");return t.protocol==="http:"||t.protocol==="https:"?t.origin:""}catch{return""}}function go(e,t,n){return t.indexOf(e)>=0?e:n}function yo(e){var t=Math.round(Number(e)||0);return!isFinite(t)||t<=0?0:Math.min(t,xr)}function bo(e){for(var t=[],n=[],r=0,i=0;i<e.length;i++){var a=JSON.stringify(e[i]).length+1;a>Ir||((n.length>=Sr||r+a>Ir)&&n.length>0&&(t.push(n),n=[],r=0),n.push(e[i]),r+=a)}return n.length&&t.push(n),t}function wo(e){if(y("analytics")){var t=JSON.stringify({token:v.analyticsIngestToken,privacy:Q(),sent_at:new Date().toISOString(),events:e}),n="text/plain;charset=UTF-8",r=nn+"/public/e";if(navigator&&navigator.sendBeacon)try{if(navigator.sendBeacon(r,new Blob([t],{type:n})))return}catch{}try{fetch(r,{method:"POST",body:t,keepalive:!0,headers:{"Content-Type":n}}).then(function(i){i&&i.status===401&&(Te=!0)}).catch(function(){})}catch{}}}function ae(){if(!y("analytics")){re=[],L=null;return}if($&&(clearTimeout($),$=null),!(Te||!re.length)){var e=re;re=[];for(var t=bo(e),n=0;n<t.length;n++)wo(t[n])}}function ko(){$||Te||($=setTimeout(ae,to))}function Gt(e){if(Z===null)return 0;var t=Date.now(),n=Math.max(0,t-Z);return Z=e?t:null,Math.min(n,xr)}function Jt(){if(L){var e=Gt(!0);e<=0||Pe("page_hidden",{pageViewId:L.pageViewId,renderMode:L.renderMode,props:L.props,visibleMs:e,internalPage:Cr,internalPageUrl:L.url})}}function xo(){Ar||(Ar=!0,document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"?(Jt(),Gt(!1),ae()):Z===null&&(Z=Date.now())}),window.addEventListener("pagehide",function(){Jt(),Gt(!1),ae()}),window.addEventListener("pageshow",function(e){e.persisted&&(Z=document.visibilityState==="hidden"?null:Date.now())}))}function So(e){var t={};if(Za.indexOf(v.analyticsSurface)>=0&&(t.surface=v.analyticsSurface),Xa.indexOf(v.analyticsEntityType)>=0){t.entity_type=v.analyticsEntityType;var n=String(v.analyticsEntityId||"").trim();Qa.test(n)?t.entity_id=n:v.analyticsEntityType==="payment_link"&&ne.test(n)&&(t.entity_id=n.toLowerCase())}return t}function Pe(e,t){if(y("analytics")&&!(!v.analyticsIngestToken||Te)&&!($a.indexOf(e)<0)){var n=t||{},r=qr(),i=J(),a=e==="page_view"?i:ne.test(n.pageViewId||"")?n.pageViewId:"",o=n.internalPage===Cr?n.internalPageUrl:"",u=Tr(o||window.location.href);xo();var d={event_id:i,event_name:e,occurred_at:new Date().toISOString(),visitor_id:r.visitorId,session_id:r.sessionId,consent_state:window.__sclv_privacy__.get().choices.analytics||"unknown",render_mode:go(n.renderMode,["csr","ssr","static","other"],"ssr"),page_url:u,referrer:ho(document.referrer||""),device_type:_o(),ad_click:fo(),ad_click_evidence:Wt,visible_ms:yo(n.visibleMs),props:So(n.props)};a&&(d.page_view_id=a),re.push(d),e==="page_view"&&(L={pageViewId:a,visitorId:r.visitorId,url:u,renderMode:d.render_mode,props:d.props}),re.length>=Sr?ae():ko()}}window.Scalev=Object.freeze({privacy:{get:function(){return window.__sclv_privacy__&&window.__sclv_privacy__.get()},openPreferences:function(){window.__sclv_privacy__&&window.__sclv_privacy__.openPreferences()}},data:{get:wa},location:{provinces:function(e){return P(R("/locations/provinces"),{query:e||{}}).then(function(t){return Ot(t,"province")})},cities:function(e,t){return P(R("/locations/cities"),{query:Object.assign({},t||{},{province_id:e})}).then(function(n){return Ot(n,"city")})},subdistricts:function(e,t){return P(R("/locations/subdistricts"),{query:Object.assign({},t||{},{city_id:e})}).then(function(n){return Ot(n,"subdistrict")})},postalCodes:function(e){return P(R("/locations/"+encodeURIComponent(e)+"/postal-codes"))}},checkout:{updateIntent:function(e){le(e)},validateDiscount:function(e){return P(R("/discount-codes/check"),{method:"POST",body:Fi(e)})},shippingOptions:function(e){return P(R("/checkout/shipping-options"),{method:"POST",body:jn(e)}).then(Zr)},estimateSummary:function(e){return P(R("/checkout/summary"),{method:"POST",body:Ki(e)})},createOrder:function(e){return ba(e).then(function(t){return Oi(e).then(function(){return Pi(t),P(vt("/orders"),{method:"POST",body:t}).then(function(n){return Li(),ya(n,t).then(oa)})})})},addToCart:function(e){e=e||{};var t=Math.max(1,parseInt(e.quantity,10)||1),n=pn(e),r=c(e.bundlePriceOptionId,e.bundle_price_option_id,e.bundlePriceOption&&c(e.bundlePriceOption.id,e.bundlePriceOption.bundlePriceOptionId),e.bundle_price_option&&e.bundle_price_option.id);if(tt()){var i=r!==void 0?{type:"bundle_price_option",bundle_price_option_id:r,quantity:t}:Object.assign({variant_id:H(Ue(e)),quantity:t},n!==void 0?{customer_price:String(n)}:{});return Kt("/items",{method:"POST",body:i}).then(function(u){return Ce(Bt(u)),Va(u),$n(e),u}).catch(function(u){throw et(u&&u.message||"Gagal menambahkan ke keranjang","error"),u})}var a=r!==void 0?{type:"bundle_price_option",bundlePriceOptionId:r,quantity:t}:Object.assign({type:"variant",variantId:H(Ue(e)),quantity:t},n!==void 0?{customerPrice:String(n)}:{}),o=rr();return P(o.base+"/items",{method:"POST",body:a,headers:o.headers}).then(function(u){return Ut(u),et("Berhasil ditambahkan ke keranjang","success"),u}).catch(function(u){throw et(u&&u.message||"Gagal menambahkan ke keranjang","error"),u})},trackAddToCart:function(e){$n(e)}},analytics:{track:function(e,t){var n=typeof e=="string"?{provider:e,payload:t||{}}:e,r=String(n&&n.provider||"").toLowerCase(),i={fb:"/analytics/meta/events",facebook:"/analytics/meta/events",meta:"/analytics/meta/events",tiktok:"/analytics/tiktok/events",kwai:"/analytics/snackvideo/events",snackvideo:"/analytics/snackvideo/events"}[r];if(!r)return Promise.resolve({skipped:!0,reason:"missing_analytics_provider"});if(!i)return Promise.reject(new Error("Unknown analytics provider."));var a=n&&Object.prototype.hasOwnProperty.call(n,"payload")?n.payload:n;return P(R(i),{method:"POST",body:Hn(r,a)}).catch(function(o){return F("Non-fatal analytics request failed",o),O("warning","analytics_track_failed","Analytics request failed.",{provider:r,message:o&&o.message}),{skipped:!0,reason:"analytics_request_failed"}})},trackWidgetEvents:function(e){ma(e)},trackPageView:function(e){Jt(),Pe("page_view",e)},trackEvent:function(e,t){Pe(e,t)},flushEvents:function(){ae()}},prefill:{get:function(){var e=St(),t=An();return tn&&en===t?Promise.resolve(ft):e?pi(e).then(function(n){var r=Et(_i(n),t);return le(r),r}):Br("scv_fd")?In("/prefill").then(function(n){var r=Et(n);return le(r),r}):Promise.resolve({})},save:function(e,t){var n=Ri(e);return le(n),In("/prefill",{method:"POST",body:{form:n,metadata:t||{}}}).then(function(r){return Et({data:n}),r})}},diagnostics:{get:function(){return De.slice()}}});var $t=y("analytics");function Er(e){var t=$t;$t=y("analytics"),$t?!t&&!e.reloading&&(Z=document.visibilityState==="hidden"?null:Date.now(),Pe("page_view",{renderMode:"csr"}),ae()):(re=[],L=null,ie=null,Z=null,$&&clearTimeout($),$=null)}try{window.__sclv_privacy__&&typeof window.__sclv_privacy__.onChange=="function"&&window.__sclv_privacy__.onChange(Er)}catch{}window.addEventListener("scalev:self-traffic",function(){Er({reloading:!!(window.__sclv_privacy__&&window.__sclv_privacy__.get().reloading)})}
2962),Fr(),Gi(),Ni(),ka(),Pa(),gr(),Ja(),ga(),Pe("page_view",{renderMode:"ssr"}),ae()})();
2963</script>
vendor: 1 bytes, line 2963
2963
2964<script id="scalev-html-mode-js" type="text/javascript">
2965
2966
2967    // ===== State =====
2968    const state = {
2969      scalevData: null,
2970      store: null,
2971      products: [],
2972      bundlePriceOptions: [],
2973      selectedBundlePriceOption: null,
2974      paymentMethodOptions: [],
2975      isPaymentLinkEnabled: false,
2976      afterCheckout: null,
2977      selectedProduct: null,
2978      selectedVariant: null,
2979      selectedPaymentMethod: null,
2980      discountCode: '',
2981      discountValid: false,
2982      discountData: null,
2983      isSubmitting: false,
2984      // State Upsell
2985      isUpsellSelected: false,
2986      upsellPrice: 0,
2987      upsellName: '',
2988      isBundleUpsell: false,
2989      summaryRequestId: 0,
2990    };
2991
2992    // ===== Utilities =====
2993    function toNumber(value) {
2994      if (typeof value === 'number' && Number.isFinite(value)) return value;
2995      if (typeof value !== 'string') return 0;
2996
2997      const raw = value.trim().replace(/[^0-9,.-]/g, '');
2998      if (!raw) return 0;
2999
3000      // Scalev mengirim harga sebagai integer, tetapi beberapa konteks dapat
3001      // menyertakan format desimal seperti "79000.00" atau format rupiah.
3002      if (/^-?\d+\.\d{1,2}$/.test(raw)) return Number(raw);
3003      if (/^-?\d{1,3}(\.\d{3})+$/.test(raw)) return Number(raw.replace(/\./g, ''));
3004      if (/^-?\d{1,3}(,\d{3})+$/.test(raw)) return Number(raw.replace(/,/g, ''));
3005      return Number(raw.replace(/[,.]/g, '')) || 0;
3006    }
3007
3008    function getDiscountAmount(result) {
3009      return toNumber(result?.discountCodeDiscount ?? result?.discountAmount ?? result?.discount?.amount);
3010    }
3011
3012    function formatRupiah(amount) {
3013      const numericAmount = toNumber(amount);
3014      if (!Number.isFinite(numericAmount)) return 'Rp —';
3015      return 'Rp ' + numericAmount.toLocaleString('id-ID');
3016    }
3017
3018    function escapeHtml(value) {
3019      return String(value ?? '').replace(/[&<>'"]/g, character => ({
3020        '&': '&amp;', '<': '&lt;', '>': '&gt;', "'": '&#39;', '"': '&quot;'
3021      }[character]));
3022    }
3023
3024    function getBundleDisplayName(option) {
3025      return option?.name || '';
3026    }
3027
3028    function getBundleDescription(option) {
3029      return option?.description || '';
3030    }
3031
3032    function navigateTo(url) {
3033      if (!url) return;
3034      if (window.self !== window.top) {
3035        window.parent.postMessage(url, '*');
3036      } else {
3037        window.location.assign(url);
3038      }
3039    }
3040
3041    function normalizePaymentMethod(paymentMethod) {
3042      if (typeof paymentMethod !== 'string') return paymentMethod;
3043      const value = paymentMethod.toLowerCase();
3044      if (value.startsWith('va:')) return 'va';
3045      if (value.startsWith('bt:')) return 'bank_transfer';
3046      return value;
3047    }
3048
3049    function getPublicOrderUrl(order) {
3050      if (order?.publicOrderUrl) return order.publicOrderUrl;
3051      if (order?.secretSlug) return new URL(`/o/${order.secretSlug}`, window.location.origin).toString();
3052      return null;
3053    }
3054
3055    function getPaymentInstructionUrl(order) {
3056      if (order?.status === 'draft') return getPublicOrderUrl(order);
3057      if (order?.paymentUrl) return order.paymentUrl;
3058      const publicUrl = getPublicOrderUrl(order);
3059      if (!publicUrl) return null;
3060      const url = new URL(publicUrl, window.location.href);
3061      url.pathname = `${url.pathname.replace(/\/$/, '')}/success`;
3062      return url.toString();
3063    }
3064
3065    function getWhatsappUrl(phone, order) {
3066      const cleanPhone = String(phone || '').replace(/[^\d]/g, '');
3067      if (!cleanPhone) return getPublicOrderUrl(order);
3068      const message = order?.chatMessage || '';
3069      return `https://api.whatsapp.com/send/?phone=${cleanPhone}&text=${message}`;
3070    }
3071
3072    function showFormError(fieldId, message) {
3073      const errorEl = document.getElementById('error-' + fieldId);
3074      const inputEl = document.getElementById(fieldId);
3075      if (errorEl) { errorEl.textContent = message; errorEl.classList.add('active'); }
3076      if (inputEl) inputEl.classList.add('invalid');
3077    }
3078
3079    function clearFormError(fieldId) {
3080      const errorEl = document.getElementById('error-' + fieldId);
3081      const inputEl = document.getElementById(fieldId);
3082      if (errorEl) errorEl.classList.remove('active');
3083      if (inputEl) inputEl.classList.remove('invalid');
3084    }
3085
3086    function showBanner(message) {
3087      const banner = document.getElementById('error-banner');
3088      banner.textContent = message;
3089      banner.classList.add('active');
3090    }
3091
3092    function clearBanner() { document.getElementById('error-banner').classList.remove('active'); }
3093    function toggleFaq(btn) { btn.parentElement.classList.toggle('open'); }
3094
3095    // ===== Initialize =====
3096    async function init() {
3097      if (!window.Scalev || !window.Scalev.data) {
3098        console.warn('Scalev runtime not available, using fallback state.');
3099        renderFallback();
3100        return;
3101      }
3102
3103      try {
3104        const data = window.Scalev.data.get();
3105        state.scalevData = data || {};
3106        state.store = data?.store || {};
3107        state.products = state.store?.products || [];
3108        state.bundlePriceOptions = state.store?.bundlePriceOptions || [];
3109        state.selectedBundlePriceOption = state.bundlePriceOptions[0] || null;
3110        state.paymentMethodOptions = state.store?.paymentMethodOptions || [];
3111        state.isPaymentLinkEnabled = state.store?.isPaymentLinkEnabled || false;
3112        state.afterCheckout = data?.afterCheckout || {};
3113
3114        if (state.products.length > 0) {
3115          state.selectedProduct = state.products[0];
3116          state.selectedVariant = state.selectedProduct.variants?.[0];
3117        }
3118
3119        renderProductInfo();
3120        renderUpsell();
3121        renderPaymentMethods();
3122        updateOrderSummary();
3123        handlePrefill();
3124        setupEventListeners();
3125
3126      } catch (error) {
3127        console.error('Scalev init error:', error);
3128        renderFallback();
3129      }
3130    }
3131
3132    function renderFallback() {
3133      document.getElementById('summary-product-name').textContent = 'Webinar: AI Seller Academy';
3134      document.getElementById('summary-product-desc').textContent = 'Akses Zoom Meeting + Recording + Modul';
3135      document.getElementById('summary-subtotal').textContent = 'Rp 150.000';
3136      document.getElementById('summary-total').textContent = 'Rp 150.000';
3137
3138      const upsellContainer = document.getElementById('upsell-box');
3139      upsellContainer.innerHTML = `
3140        <label class="upsell-card">
3141          <input type="checkbox" id="upsell-checkbox" />
3142          <div class="upsell-checkbox-custom"></div>
3143          <div class="upsell-content">
3144            <h4>Upsell: E-book AI Seller Lengkap</h4>
3145            <p>Dapatkan modul tambahan berisi panduan rahasia AI tools untuk seller Shopee.</p>
3146            <span class="upsell-price">+ Rp 50.000</span>
3147          </div>
3148        </label>
3149      `;
3150      state.upsellPrice = 50000;
3151      state.upsellName = "E-book AI Seller Lengkap";
3152      state.isBundleUpsell = false;
3153
3154      document.getElementById('upsell-checkbox').addEventListener('change', (e) => {
3155        state.isUpsellSelected = e.target.checked;
3156        updateOrderSummary();
3157      });
3158
3159      const paymentList = document.getElementById('payment-methods');
3160      paymentList.innerHTML = `
3161        <div class="payment-option selected">
3162          <div class="payment-radio"></div>
3163          <div class="payment-logo-dummy" style="background:#fff; color:#050505;">QRIS</div>
3164          <span class="payment-label">QRIS (Scan & All E-Wallet)</span>
3165        </div>
3166        <div class="payment-option">
3167          <div class="payment-radio"></div>
3168          <div class="payment-logo-dummy" style="background:#EE4D2D; color:#fff;">SPay</div>
3169          <span class="payment-label">ShopeePay</span>
3170        </div>
3171        <div class="payment-option">
3172          <div class="payment-radio"></div>
3173          <div class="payment-logo-dummy" style="background:#00AED6; color:#fff;">GoPay</div>
3174          <span class="payment-label">GoPay</span>
3175        </div>
3176        <div class="payment-option">
3177          <div class="payment-radio"></div>
3178          <div class="payment-logo-dummy" style="background:#118EEA; color:#fff;">DANA</div>
3179          <span class="payment-label">Dana</span>
3180        </div>
3181        <div class="payment-option">
3182          <div class="payment-radio"></div>
3183          <div class="payment-logo-dummy" style="background:#003D79; color:#fff;">BCA</div>
3184          <span class="payment-label">Bank Transfer (BCA)</span>
3185        </div>
3186      `;
3187      state.selectedPaymentMethod = 'qris';
3188
3189      paymentList.querySelectorAll('.payment-option').forEach(el => {
3190        el.addEventListener('click', () => {
3191          paymentList.querySelectorAll('.payment-option').forEach(o => o.classList.remove('selected'));
3192          el.classList.add('selected');
3193          const input = el.querySelector('input');
3194          if(input) { input.checked = true; state.selectedPaymentMethod = input.value; }
3195          clearFormError('payment');
3196        });
3197      });
3198    }
3199
3200    // ===== Render Product Info =====
3201    function renderProductInfo() {
3202      if (!state.selectedProduct || !state.selectedVariant) return;
3203      const productName = state.selectedProduct.name || 'Webinar: AI Seller Academy';
3204      const variantName = state.selectedVariant.name || 'Pilihan standar';
3205      const productPrice = toNumber(state.selectedVariant.price);
3206      document.getElementById('summary-product-name').textContent = productName;
3207      document.getElementById('summary-product-desc').textContent = variantName;
3208      document.getElementById('summary-product-line-name').textContent = productName;
3209      document.getElementById('summary-product-price').textContent = formatRupiah(productPrice);
3210    }
3211
3212    // ===== Render Upsell =====
3213    function renderUpsell() {
3214      const upsellContainer = document.getElementById('upsell-box');
3215      const option = state.selectedBundlePriceOption;
3216      const isBundle = Boolean(option?.uniqueId);
3217      const upsellName = getBundleDisplayName(option);
3218      const upsellDesc = getBundleDescription(option);
3219      const upsellPrice = toNumber(option?.price);
3220
3221      if (!isBundle) {
3222        state.upsellPrice = 0;
3223        state.upsellName = '';
3224        state.isBundleUpsell = false;
3225        upsellContainer.innerHTML = '<p class="upsell-empty">Belum ada bundle tambahan yang tersedia.</p>';
3226        return;
3227      }
3228
3229      upsellContainer.innerHTML = `
3230        <label class="upsell-card" for="upsell-checkbox">
3231          <input type="checkbox" id="upsell-checkbox" />
3232          <div class="upsell-checkbox-custom"></div>
3233          <div class="upsell-content">
3234            <h4>${escapeHtml(upsellName)}</h4>
3235            <p>${escapeHtml(upsellDesc)}</p>
3236            <span class="upsell-price">+ ${formatRupiah(upsellPrice)}</span>
3237          </div>
3238        </label>
3239      `;
3240
3241      state.upsellPrice = upsellPrice;
3242      state.upsellName = upsellName;
3243      state.isBundleUpsell = true;
3244
3245      document.getElementById('upsell-checkbox').addEventListener('change', (e) => {
3246        state.isUpsellSelected = e.target.checked;
3247        updateOrderSummary();
3248      });
3249    }
3250
3251    // ===== Render Payment Methods =====
3252    function renderPaymentMethods() {
3253      const container = document.getElementById('payment-methods');
3254
3255      if (state.isPaymentLinkEnabled) {
3256        state.selectedPaymentMethod = 'payment_link';
3257        document.getElementById('payment-fieldset').style.display = 'none';
3258        return;
3259      }
3260
3261      // Filter dan Urutan Prioritas (QRIS, ShopeePay, GoPay, Dana, BT)
3262      const orderMap = [
3263        { match: 'qris', priority: 1 },
3264        { match: 'shopeepay', priority: 2 },
3265        { match: 'gopay', priority: 3 },
3266        { match: 'dana', priority: 4 },
3267      ];
3268
3269      let filteredOptions = [];
3270      if (state.paymentMethodOptions && state.paymentMethodOptions.length > 0) {
3271        const mapped = state.paymentMethodOptions.map(opt => {
3272          const val = opt.value.toLowerCase();
3273          const disp = opt.display.toLowerCase();
3274          let priority = 99;
3275          for (const o of orderMap) {
3276            if (val.includes(o.match) || disp.includes(o.match)) {
3277              priority = o.priority;
3278              break;
3279            }
3280          }
3281          return { opt, priority };
3282        });
3283
3284        filteredOptions = mapped
3285          .filter(m => m.priority !== 99) // Sembunyikan yang tidak ada di list & sembunyikan VA
3286          .sort((a, b) => a.priority - b.priority)
3287          .map(m => m.opt);
3288      }
3289
3290      if (filteredOptions.length === 0) {
3291        console.warn('No payment methods returned from Scalev. Check your Store settings.');
3292        renderFallback(); // Fallback dummy
3293        return;
3294      }
3295
3296      container.innerHTML = filteredOptions.map((option, index) => `
3297        <label class="payment-option ${index === 0 ? 'selected' : ''}" data-value="${option.value}">
3298          <input type="radio" name="paymentMethod" value="${option.value}" ${index === 0 ? 'checked' : ''} />
3299          <div class="payment-radio"></div>
3300          ${option.logoUrl ? `<img src="${option.logoUrl}" alt="${option.display}" class="payment-logo" />` : '<div class="payment-logo-dummy">' + (option.display || '?').charAt(0) + '</div>'}
3301          <span class="payment-label">${option.display}</span>
3302        </label>
3303      `).join('');
3304
3305      state.selectedPaymentMethod = filteredOptions[0]?.value || null;
3306
3307      container.querySelectorAll('.payment-option').forEach(el => {
3308        el.addEventListener('click', () => {
3309          container.querySelectorAll('.payment-option').forEach(o => o.classList.remove('selected'));
3310          el.classList.add('selected');
3311          const input = el.querySelector('input');
3312          input.checked = true;
3313          state.selectedPaymentMethod = input.value;
3314          clearFormError('payment');
3315        });
3316      });
3317    }
3318
3319    // ===== Update Order Summary =====
3320    function getCheckoutItems() {
3321      if (!state.selectedVariant?.uniqueId) return [];
3322      const items = [{ type: 'product', variantUniqueId: state.selectedVariant.uniqueId, quantity: 1 }];
3323      if (state.isUpsellSelected && state.selectedBundlePriceOption?.uniqueId) {
3324        items.push({ type: 'bundle', bundlePriceOptionUniqueId: state.selectedBundlePriceOption.uniqueId, quantity: 1 });
3325      }
3326      return items;
3327    }
3328
3329    function renderSummaryFees(summary) {
3330      const otherIncome = toNumber(summary?.otherIncome);
3331      const serviceFee = toNumber(summary?.serviceFee);
3332      const otherIncomeRow = document.getElementById('summary-other-income-row');
3333      const serviceFeeRow = document.getElementById('summary-service-fee-row');
3334
3335      otherIncomeRow.style.display = otherIncome > 0 ? 'flex' : 'none';
3336      document.getElementById('summary-other-income-name').textContent = summary?.otherIncomeName || 'Biaya tambahan';
3337      document.getElementById('summary-other-income').textContent = formatRupiah(otherIncome);
3338      serviceFeeRow.style.display = serviceFee > 0 ? 'flex' : 'none';
3339      document.getElementById('summary-service-fee').textContent = formatRupiah(serviceFee);
3340    }
3341
3342    async function updateOrderSummary() {
3343      if (!state.selectedVariant) {
3344        document.getElementById('summary-total').textContent = 'Rp —';
3345        return;
3346      }
3347
3348      const productPrice = toNumber(state.selectedVariant.price);
3349      const bundlePrice = state.isUpsellSelected && state.selectedBundlePriceOption?.uniqueId
3350        ? toNumber(state.selectedBundlePriceOption.price)
3351        : 0;
3352      const localSubtotal = productPrice + bundlePrice;
3353      const requestId = ++state.summaryRequestId;
3354      const upsellRow = document.getElementById('summary-upsell-row');
3355
3356      const discountAmount = state.discountValid ? getDiscountAmount(state.discountData) : 0;
3357      const subtotalAfterDiscount = Math.max(0, localSubtotal - discountAmount);
3358      document.getElementById('summary-product-price').textContent = formatRupiah(productPrice);
3359      if (upsellRow) {
3360        upsellRow.style.display = bundlePrice > 0 ? 'flex' : 'none';
3361        document.getElementById('summary-upsell-name').textContent = state.upsellName;
3362        document.getElementById('summary-upsell-price').textContent = '+ ' + formatRupiah(bundlePrice);
3363      }
3364      const bundlePriceRow = document.getElementById('summary-bundle-price-row');
3365      bundlePriceRow.style.display = bundlePrice > 0 ? 'flex' : 'none';
3366      document.getElementById('summary-bundle-line-name').textContent = state.upsellName || 'Bundle';
3367      document.getElementById('summary-bundle-price').textContent = '+ ' + formatRupiah(bundlePrice);
3368
3369      if (!window.Scalev?.checkout?.estimateSummary) {
3370        renderSummaryFees({});
3371        const discountRow = document.getElementById('summary-discount-row');
3372        discountRow.style.display = discountAmount > 0 ? 'flex' : 'none';
3373        document.getElementById('summary-discount').textContent = '- ' + formatRupiah(discountAmount);
3374        document.getElementById('summary-total').textContent = formatRupiah(subtotalAfterDiscount);
3375        return;
3376      }
3377
3378      try {
3379        const payload = {
3380          items: getCheckoutItems(),
3381          paymentMethod: state.isPaymentLinkEnabled ? 'payment_link' : state.selectedPaymentMethod,
3382        };
3383        if (state.discountValid && state.discountCode) payload.discountCode = state.discountCode;
3384        const summary = await window.Scalev.checkout.estimateSummary(payload);
3385        if (requestId !== state.summaryRequestId) return;
3386
3387        const displayedSubtotal = Math.max(0, localSubtotal - discountAmount);
3388        if (state.discountValid && discountAmount > 0) {
3389          document.getElementById('summary-discount-row').style.display = 'flex';
3390          document.getElementById('summary-discount').textContent = '- ' + formatRupiah(discountAmount);
3391        } else {
3392          document.getElementById('summary-discount-row').style.display = 'none';
3393        }
3394        renderSummaryFees(summary);
3395        const grossRevenue = toNumber(summary?.grossRevenue);
3396        const total = grossRevenue || Math.max(0, displayedSubtotal + toNumber(summary?.otherIncome) + toNumber(summary?.serviceFee));
3397        document.getElementById('summary-total').textContent = formatRupiah(total);
3398      } catch (error) {
3399        console.warn('Scalev summary preview unavailable:', error);
3400        if (requestId !== state.summaryRequestId) return;
3401        renderSummaryFees({});
3402        const discountRow = document.getElementById('summary-discount-row');
3403        discountRow.style.display = discountAmount > 0 ? 'flex' : 'none';
3404        document.getElementById('summary-discount').textContent = '- ' + formatRupiah(discountAmount);
3405        document.getElementById('summary-total').textContent = formatRupiah(subtotalAfterDiscount);
3406      }
3407    }
3408
3409    // ===== Handle Prefill =====
3410    async function handlePrefill() {
3411      try {
3412        if (!window.Scalev?.prefill?.get) return;
3413        const prefill = await window.Scalev.prefill.get();
3414        if (!prefill) return;
3415
3416        if (prefill.customer) {
3417          if (prefill.customer.name) document.getElementById('cust-name').value = prefill.customer.name;
3418          if (prefill.customer.phone) document.getElementById('cust-phone').value = prefill.customer.phone;
3419          if (prefill.customer.email) document.getElementById('cust-email').value = prefill.customer.email;
3420        }
3421      } catch (error) { console.error('Prefill error:', error); }
3422    }
3423
3424    // ===== Setup Event Listeners =====
3425    function setupEventListeners() {
3426      ['cust-name', 'cust-phone', 'cust-email'].forEach(id => {
3427        const el = document.getElementById(id);
3428        if (el) el.addEventListener('input', () => clearFormError(id));
3429      });
3430
3431      document.getElementById('apply-discount').addEventListener('click', handleDiscountApply);
3432      document.getElementById('discount-code').addEventListener('keypress', function (e) {
3433        if (e.key === 'Enter') { e.preventDefault(); handleDiscountApply(); }
3434      });
3435      document.getElementById('checkout-form').addEventListener('submit', handleSubmit);
3436    }
3437
3438    // ===== Handle Discount Apply =====
3439    async function handleDiscountApply() {
3440      const code = document.getElementById('discount-code').value.trim();
3441      const msgEl = document.getElementById('discount-msg');
3442      const btn = document.getElementById('apply-discount');
3443
3444      if (!code) {
3445        msgEl.textContent = 'Masukkan kode diskon terlebih dahulu.';
3446        msgEl.className = 'discount-msg active error';
3447        return;
3448      }
3449
3450      if (!state.selectedVariant) {
3451        msgEl.textContent = 'Produk belum terdeteksi.';
3452        msgEl.className = 'discount-msg active error';
3453        return;
3454      }
3455
3456      btn.disabled = true;
3457      btn.textContent = 'Memeriksa...';
3458      msgEl.className = 'discount-msg';
3459
3460      try {
3461        const itemsPayload = [{ type: 'product', variantUniqueId: state.selectedVariant.uniqueId, quantity: 1 }];
3462        if (state.isUpsellSelected && state.isBundleUpsell && state.selectedBundlePriceOption?.uniqueId) {
3463          itemsPayload.push({ type: 'bundle', bundlePriceOptionUniqueId: state.selectedBundlePriceOption.uniqueId, quantity: 1 });
3464        }
3465        const grossRevenue = itemsPayload.reduce((total, item) => {
3466          if (item.type === 'product') return total + toNumber(state.selectedVariant?.price) * item.quantity;
3467          if (item.type === 'bundle') return total + toNumber(state.selectedBundlePriceOption?.price) * item.quantity;
3468          return total;
3469        }, 0);
3470        const payload = {
3471          discountCode: code,
3472          grossRevenue,
3473          netProductPrice: grossRevenue,
3474          shippingCost: 0,
3475          paymentMethod: state.isPaymentLinkEnabled ? 'payment_link' : (state.selectedPaymentMethod || 'cod'),
3476          items: itemsPayload,
3477        };
3478        const result = await window.Scalev.checkout.validateDiscount(payload);
3479
3480        if (result && result.isEligible === true) {
3481          state.discountCode = code;
3482          state.discountValid = true;
3483          state.discountData = result;
3484          const discountAmount = getDiscountAmount(result);
3485          msgEl.textContent = `Kode diskon berhasil diterapkan! Potongan ${formatRupiah(discountAmount)}`;
3486          msgEl.className = 'discount-msg active success';
3487          updateOrderSummary();
3488        } else {
3489          state.discountValid = false;
3490          state.discountCode = '';
3491          state.discountData = null;
3492          msgEl.textContent = result?.message || 'Kode tidak ditemukan atau tidak berlaku.';
3493          msgEl.className = 'discount-msg active error';
3494          updateOrderSummary();
3495        }
3496      } catch (error) {
3497        console.error('Discount validation error:', error);
3498        state.discountValid = false;
3499        state.discountCode = '';
3500        state.discountData = null;
3501        msgEl.textContent = error?.message || 'Kode tidak ditemukan.';
3502        msgEl.className = 'discount-msg active error';
3503        updateOrderSummary();
3504      } finally {
3505        btn.disabled = false;
3506        btn.textContent = 'Terapkan';
3507      }
3508    }
3509
3510    // ===== Validate Form =====
3511    function validateForm() {
3512      let isValid = true;
3513      const name = document.getElementById('cust-name').value.trim();
3514      if (!name || name.length < 3) { showFormError('cust-name', 'Nama lengkap wajib diisi (min. 3 karakter).'); isValid = false; }
3515
3516      const phone = document.getElementById('cust-phone').value.trim();
3517      if (!phone || phone.length < 8) { showFormError('cust-phone', 'Nomor WhatsApp wajib diisi.'); isValid = false; }
3518
3519      const email = document.getElementById('cust-email').value.trim();
3520      const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
3521      if (!email || !emailRegex.test(email)) { showFormError('cust-email', 'Email wajib diisi dan valid.'); isValid = false; }
3522
3523      if (!state.isPaymentLinkEnabled && !state.selectedPaymentMethod) { showFormError('payment', 'Metode pembayaran wajib dipilih.'); isValid = false; }
3524
3525      return isValid;
3526    }
3527
3528    // ===== Build Order Payload =====
3529    function buildOrderPayload() {
3530      const items = [];
3531      if (state.selectedProduct && state.selectedVariant) {
3532        items.push({ type: 'product', variantUniqueId: state.selectedVariant.uniqueId, quantity: 1 });
3533      }
3534
3535      // Masukkan Upsell (Bundle) jika dicentang
3536      if (state.isUpsellSelected) {
3537        if (state.isBundleUpsell && state.selectedBundlePriceOption?.uniqueId) {
3538          items.push({ type: 'bundle', bundlePriceOptionUniqueId: state.selectedBundlePriceOption.uniqueId, quantity: 1 });
3539        } else {
3540          console.warn('Upsell dummy dipilih, tapi tidak ada data bundle asli dari Scalev untuk dikirim.');
3541        }
3542      }
3543
3544      const payload = {
3545        customer: {
3546          name: document.getElementById('cust-name').value.trim(),
3547          phone: document.getElementById('cust-phone').value.trim(),
3548          email: document.getElementById('cust-email').value.trim(),
3549        },
3550        items,
3551        paymentMethod: state.isPaymentLinkEnabled ? 'payment_link' : state.selectedPaymentMethod,
3552      };
3553
3554      if (state.discountCode && state.discountValid) payload.discountCode = state.discountCode;
3555      return payload;
3556    }
3557
3558    // ===== Handle Submit =====
3559    async function handleSubmit(e) {
3560      e.preventDefault();
3561      if (state.isSubmitting) return;
3562      clearBanner();
3563
3564      if (!state.selectedProduct || !state.selectedVariant) { showBanner('Produk tidak tersedia. Silakan refresh halaman.'); return; }
3565      if (!validateForm()) { showBanner('Mohon lengkapi semua data yang wajib diisi.'); return; }
3566
3567      state.isSubmitting = true;
3568      const submitBtn = document.getElementById('submit-btn');
3569      submitBtn.classList.add('loading');
3570      submitBtn.disabled = true;
3571
3572      try {
3573        if (window.Scalev?.prefill?.save) {
3574          try {
3575            await window.Scalev.prefill.save({
3576              customer: {
3577                name: document.getElementById('cust-name').value.trim(),
3578                phone: document.getElementById('cust-phone').value.trim(),
3579                email: document.getElementById('cust-email').value.trim(),
3580              },
3581            });
3582          } catch (e) { console.warn('Prefill save error:', e); }
3583        }
3584
3585        const payload = buildOrderPayload();
3586        const order = await window.Scalev.checkout.createOrder(payload);
3587        handleOrderSuccess(order);
3588
3589      } catch (error) {
3590        console.error('Order creation error:', error);
3591        const message = error?.message || 'Terjadi kesalahan saat membuat pesanan. Silakan coba lagi.';
3592        showBanner(message);
3593      } finally {
3594        state.isSubmitting = false;
3595        submitBtn.classList.remove('loading');
3596        submitBtn.disabled = false;
3597      }
3598    }
3599
3600    // ===== Handle Order Success =====
3601    function handleOrderSuccess(order) {
3602      const afterCheckout = state.afterCheckout || { type: 'success_page' };
3603      const paymentMethod = normalizePaymentMethod(state.isPaymentLinkEnabled ? 'payment_link' : state.selectedPaymentMethod);
3604      const paymentInstructionMethods = new Set(['va', 'qris', 'card', 'invoice', 'alfamart', 'ovo', 'dana', 'shopeepay', 'linkaja', 'gopay', 'bank_transfer']);
3605      const finalType = paymentInstructionMethods.has(paymentMethod) ? 'success_page' : (afterCheckout.type || 'success_page');
3606      let redirectUrl = null;
3607
3608      if (finalType === 'success_page') redirectUrl = getPaymentInstructionUrl(order);
3609      else if (finalType === 'order_page') redirectUrl = getPublicOrderUrl(order);
3610      else if (finalType === 'direct_to_whatsapp') redirectUrl = getWhatsappUrl(order?.handlerPhone, order);
3611      else if (finalType === 'direct_to_custom_whatsapp') redirectUrl = getWhatsappUrl(afterCheckout.customWhatsappPhone, order);
3612      else if (finalType === 'other_page' && afterCheckout.otherPagePath) redirectUrl = new URL(afterCheckout.otherPagePath, window.location.href).toString();
3613      else if (finalType === 'custom_url' && afterCheckout.customUrl) redirectUrl = afterCheckout.customUrl;
3614      else redirectUrl = getPaymentInstructionUrl(order) || getPublicOrderUrl(order);
3615
3616      if (redirectUrl) { navigateTo(redirectUrl); return; }
3617      showInlineSuccess(order);
3618    }
3619
3620    function showInlineSuccess(order) {
3621      const overlay = document.getElementById('success-overlay');
3622      const orderId = order?.uniqueId || order?.id || order?.orderNumber || '—';
3623      const total = order?.totalAmount || order?.total || order?.grandTotal || 0;
3624
3625      document.getElementById('success-order-id').textContent = orderId;
3626      document.getElementById('success-total').textContent = formatRupiah(total);
3627      document.getElementById('success-status').textContent = order?.status || 'Menunggu Pembayaran';
3628      overlay.classList.add('active');
3629    }
3630
3631    // ===== Start =====
3632    if (document.readyState === 'loading') {
3633      document.addEventListener('DOMContentLoaded', init);
3634    } else {
3635      init();
3636    }
3637  
3638
3639</script>
3639
3640</body>
3641</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.