vendor: 8,697 bytes, lines 1-321
1function zs(e) { 2 return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; 3} 4var Gs = { exports: {} }, K = {}; 5/** 6 * @license React 7 * react.production.js 8 * 9 * Copyright (c) Meta Platforms, Inc. and affiliates. 10 * 11 * This source code is licensed under the MIT license found in the 12 * LICENSE file in the root directory of this source tree. 13 */ 14var hr = Symbol.for("react.transitional.element"), ha = Symbol.for("react.portal"), ma = Symbol.for("react.fragment"), pa = Symbol.for("react.strict_mode"), ga = Symbol.for("react.profiler"), ya = Symbol.for("react.consumer"), va = Symbol.for("react.context"), ba = Symbol.for("react.forward_ref"), _a = Symbol.for("react.suspense"), xa = Symbol.for("react.memo"), Ys = Symbol.for("react.lazy"), Ca = Symbol.for("react.activity"), Fr = Symbol.iterator; 15function wa(e) { 16 return e === null || typeof e != "object" ? null : (e = Fr && e[Fr] || e["@@iterator"], typeof e == "function" ? e : null); 17} 18var Xs = { 19 isMounted: function() { 20 return !1; 21 }, 22 enqueueForceUpdate: function() { 23 }, 24 enqueueReplaceState: function() { 25 }, 26 enqueueSetState: function() { 27 } 28}, Js = Object.assign, qs = {}; 29function Vt(e, t, n) { 30 this.props = e, this.context = t, this.refs = qs, this.updater = n || Xs; 31} 32Vt.prototype.isReactComponent = {}; 33Vt.prototype.setState = function(e, t) { 34 if (typeof e != "object" && typeof e != "function" && e != null) 35 throw Error( 36 "takes an object of state variables to update or a function which returns an object of state variables." 37 ); 38 this.updater.enqueueSetState(this, e, t, "setState"); 39}; 40Vt.prototype.forceUpdate = function(e) { 41 this.updater.enqueueForceUpdate(this, e, "forceUpdate"); 42}; 43function Ks() { 44} 45Ks.prototype = Vt.prototype; 46function mr(e, t, n) { 47 this.props = e, this.context = t, this.refs = qs, this.updater = n || Xs; 48} 49var pr = mr.prototype = new Ks(); 50pr.constructor = mr; 51Js(pr, Vt.prototype); 52pr.isPureReactComponent = !0; 53var $r = Array.isArray; 54function Gn() { 55} 56var de = { H: null, A: null, T: null, S: null }, Qs = Object.prototype.hasOwnProperty; 57function gr(e, t, n) { 58 var r = n.ref; 59 return { 60 $$typeof: hr, 61 type: e, 62 key: t, 63 ref: r !== void 0 ? r : null, 64 props: n 65 }; 66} 67function ka(e, t) { 68 return gr(e.type, t, e.props); 69} 70function yr(e) { 71 return typeof e == "object" && e !== null && e.$$typeof === hr; 72} 73function ja(e) { 74 var t = { "=": "=0", ":": "=2" }; 75 return "$" + e.replace(/[=:]/g, function(n) { 76 return t[n]; 77 }); 78} 79var Zr = /\/+/g; 80function Mn(e, t) { 81 return typeof e == "object" && e !== null && e.key != null ? ja("" + e.key) : t.toString(36); 82} 83function Sa(e) { 84 switch (e.status) { 85 case "fulfilled": 86 return e.value; 87 case "rejected": 88 throw e.reason; 89 default: 90 switch (typeof e.status == "string" ? e.then(Gn, Gn) : (e.status = "pending", e.then( 91 function(t) { 92 e.status === "pending" && (e.status = "fulfilled", e.value = t); 93 }, 94 function(t) { 95 e.status === "pending" && (e.status = "rejected", e.reason = t); 96 } 97 )), e.status) { 98 case "fulfilled": 99 return e.value; 100 case "rejected": 101 throw e.reason; 102 } 103 } 104 throw e; 105} 106function St(e, t, n, r, s) { 107 var i = typeof e; 108 (i === "undefined" || i === "boolean") && (e = null); 109 var a = !1; 110 if (e === null) a = !0; 111 else 112 switch (i) { 113 case "bigint": 114 case "string": 115 case "number": 116 a = !0; 117 break; 118 case "object": 119 switch (e.$$typeof) { 120 case hr: 121 case ha: 122 a = !0; 123 break; 124 case Ys: 125 return a = e._init, St( 126 a(e._payload), 127 t, 128 n, 129 r, 130 s 131 ); 132 } 133 } 134 if (a) 135 return s = s(e), a = r === "" ? "." + Mn(e, 0) : r, $r(s) ? (n = "", a != null && (n = a.replace(Zr, "$&/") + "/"), St(s, t, n, "", function(u) { 136 return u; 137 })) : s != null && (yr(s) && (s = ka( 138 s, 139 n + (s.key == null || e && e.key === s.key ? "" : ("" + s.key).replace( 140 Zr, 141 "$&/" 142 ) + "/") + a 143 )), t.push(s)), 1; 144 a = 0; 145 var o = r === "" ? "." : r + ":"; 146 if ($r(e)) 147 for (var c = 0; c < e.length; c++) 148 r = e[c], i = o + Mn(r, c), a += St( 149 r, 150 t, 151 n, 152 i, 153 s 154 ); 155 else if (c = wa(e), typeof c == "function") 156 for (e = c.call(e), c = 0; !(r = e.next()).done; ) 157 r = r.value, i = o + Mn(r, c++), a += St( 158 r, 159 t, 160 n, 161 i, 162 s 163 ); 164 else if (i === "object") { 165 if (typeof e.then == "function") 166 return St( 167 Sa(e), 168 t, 169 n, 170 r, 171 s 172 ); 173 throw t = String(e), Error( 174 "Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead." 175 ); 176 } 177 return a; 178} 179function an(e, t, n) { 180 if (e == null) return e; 181 var r = [], s = 0; 182 return St(e, r, "", "", function(i) { 183 return t.call(n, i, s++); 184 }), r; 185} 186function Ea(e) { 187 if (e._status === -1) { 188 var t = e._result; 189 t = t(), t.then( 190 function(n) { 191 (e._status === 0 || e._status === -1) && (e._status = 1, e._result = n); 192 }, 193 function(n) { 194 (e._status === 0 || e._status === -1) && (e._status = 2, e._result = n); 195 } 196 ), e._status === -1 && (e._status = 0, e._result = t); 197 } 198 if (e._status === 1) return e._result.default; 199 throw e._result; 200} 201var Hr = typeof reportError == "function" ? reportError : function(e) { 202 if (typeof window == "object" && typeof window.ErrorEvent == "function") { 203 var t = new window.ErrorEvent("error", { 204 bubbles: !0, 205 cancelable: !0, 206 message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e), 207 error: e 208 }); 209 if (!window.dispatchEvent(t)) return; 210 } else if (typeof process == "object" && typeof process.emit == "function") { 211 process.emit("uncaughtException", e); 212 return; 213 } 214 console.error(e); 215}, Na = { 216 map: an, 217 forEach: function(e, t, n) { 218 an( 219 e, 220 function() { 221 t.apply(this, arguments); 222 }, 223 n 224 ); 225 }, 226 count: function(e) { 227 var t = 0; 228 return an(e, function() { 229 t++; 230 }), t; 231 }, 232 toArray: function(e) { 233 return an(e, function(t) { 234 return t; 235 }) || []; 236 }, 237 only: function(e) { 238 if (!yr(e)) 239 throw Error( 240 "React.Children.only expected to receive a single React element child." 241 ); 242 return e; 243 } 244}; 245K.Activity = Ca; 246K.Children = Na; 247K.Component = Vt; 248K.Fragment = ma; 249K.Profiler = ga; 250K.PureComponent = mr; 251K.StrictMode = pa; 252K.Suspense = _a; 253K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = de; 254K.__COMPILER_RUNTIME = { 255 __proto__: null, 256 c: function(e) { 257 return de.H.useMemoCache(e); 258 } 259}; 260K.cache = function(e) { 261 return function() { 262 return e.apply(null, arguments); 263 }; 264}; 265K.cacheSignal = function() { 266 return null; 267}; 268K.cloneElement = function(e, t, n) { 269 if (e == null) 270 throw Error( 271 "The argument must be a React element, but you passed " + e + "." 272 ); 273 var r = Js({}, e.props), s = e.key; 274 if (t != null) 275 for (i in t.key !== void 0 && (s = "" + t.key), t) 276 !Qs.call(t, i) || i === "key" || i === "__self" || i === "__source" || i === "ref" && t.ref === void 0 || (r[i] = t[i]); 277 var i = arguments.length - 2; 278 if (i === 1) r.children = n; 279 else if (1 < i) { 280 for (var a = Array(i), o = 0; o < i; o++) 281 a[o] = arguments[o + 2]; 282 r.children = a; 283 } 284 return gr(e.type, s, r); 285}; 286K.createContext = function(e) { 287 return e = { 288 $$typeof: va, 289 _currentValue: e, 290 _currentValue2: e, 291 _threadCount: 0, 292 Provider: null, 293 Consumer: null 294 }, e.Provider = e, e.Consumer = { 295 $$typeof: ya, 296 _context: e 297 }, e; 298}; 299K.createElement = function(e, t, n) { 300 var r, s = {}, i = null; 301 if (t != null) 302 for (r in t.key !== void 0 && (i = "" + t.key), t) 303 Qs.call(t, r) && r !== "key" && r !== "__self" && r !== "__source" && (s[r] = t[r]); 304 var a = arguments.length - 2; 305 if (a === 1) s.children = n; 306 else if (1 < a) { 307 for (var o = Array(a), c = 0; c < a; c++) 308 o[c] = arguments[c + 2]; 309 s.children = o; 310 } 311 if (e && e.defaultProps) 312 for (r in a = e.defaultProps, a) 313 s[r] === void 0 && (s[r] = a[r]); 314 return gr(e, i, s); 315}; 316K.createRef = function() { 317 return { current: null }; 318}; 319K.forwardRef = function(e) { 320 return { $$typeof: ba, render: e }; 321};
322K.isValidElement = yr; 323K.lazy = function(e) { 324 return { 325 $$typeof: Ys, 326 _payload: { _status: -1, _result: e }, 327 _init: Ea 328 }; 329}; 330K.memo = function(e, t) { 331 return { 332 $$typeof: xa, 333 type: e, 334 compare: t === void 0 ? null : t 335 }; 336}; 337K.startTransition = function(e) { 338 var t = de.T, n = {}; 339 de.T = n; 340 try { 341 var r = e(), s = de.S; 342 s !== null && s(n, r), typeof r == "object" && r !== null && typeof r.then == "function" && r.then(Gn, Hr); 343 } catch (i) { 344 Hr(i); 345 } finally { 346 t !== null && n.types !== null && (t.types = n.types), de.T = t; 347 } 348}; 349K.unstable_useCacheRefresh = function() { 350 return de.H.useCacheRefresh(); 351}; 352K.use = function(e) { 353 return de.H.use(e); 354}; 355K.useActionState = function(e, t, n) { 356 return de.H.useActionState(e, t, n); 357}; 358K.useCallback = function(e, t) { 359 return de.H.useCallback(e, t); 360}; 361K.useContext = function(e) { 362 return de.H.useContext(e); 363}; 364K.useDebugValue = function() { 365}; 366K.useDeferredValue = function(e, t) { 367 return de.H.useDeferredValue(e, t); 368}; 369K.useEffect = function(e, t) { 370 return de.H.useEffect(e, t); 371}; 372K.useEffectEvent = function(e) { 373 return de.H.useEffectEvent(e); 374}; 375K.useId = function() { 376 return de.H.useId(); 377}; 378K.useImperativeHandle = function(e, t, n) { 379 return de.H.useImperativeHandle(e, t, n); 380}; 381K.useInsertionEffect = function(e, t) { 382 return de.H.useInsertionEffect(e, t); 383}; 384K.useLayoutEffect = function(e, t) { 385 return de.H.useLayoutEffect(e, t); 386}; 387K.useMemo = function(e, t) { 388 return de.H.useMemo(e, t); 389}; 390K.useOptimistic = function(e, t) { 391 return de.H.useOptimistic(e, t); 392}; 393K.useReducer = function(e, t, n) { 394 return de.H.useReducer(e, t, n); 395}; 396K.useRef = function(e) { 397 return de.H.useRef(e); 398}; 399K.useState = function(e) { 400 return de.H.useState(e); 401}; 402K.useSyncExternalStore = function(e, t, n) { 403 return de.H.useSyncExternalStore( 404 e, 405 t, 406 n 407 ); 408}; 409K.useTransition = function() { 410 return de.H.useTransition(); 411}; 412K.version = "19.2.3"; 413Gs.exports = K; 414var I = Gs.exports; 415const z = /* @__PURE__ */ zs(I); 416var ei = { exports: {} }, On = {}; 417/** 418 * @license React 419 * react-jsx-runtime.production.js 420 * 421 * Copyright (c) Meta Platforms, Inc. and affiliates. 422 * 423 * This source code is licensed under the MIT license found in the 424 * LICENSE file in the root directory of this source tree. 425 */ 426var Ta = Symbol.for("react.transitional.element"), Oa = Symbol.for("react.fragment"); 427function ti(e, t, n) { 428 var r = null; 429 if (n !== void 0 && (r = "" + n), t.key !== void 0 && (r = "" + t.key), "key" in t) { 430 n = {}; 431 for (var s in t) 432 s !== "key" && (n[s] = t[s]); 433 } else n = t; 434 return t = n.ref, { 435 $$typeof: Ta, 436 type: e, 437 key: r, 438 ref: t !== void 0 ? t : null, 439 props: n 440 }; 441} 442On.Fragment = Oa; 443On.jsx = ti; 444On.jsxs = ti; 445ei.exports = On; 446var l = ei.exports; 447function on(e) { 448 throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); 449} 450var ni = { exports: {} }; 451(function(e, t) { 452 (function(n) { 453 e.exports = n(); 454 })(function() { 455 return function n(r, s, i) { 456 function a(u, d) { 457 if (!s[u]) { 458 if (!r[u]) { 459 var h = typeof on == "function" && on; 460 if (!d && h) return h(u, !0); 461 if (o) return o(u, !0); 462 var g = new Error("Cannot find module '" + u + "'"); 463 throw g.code = "MODULE_NOT_FOUND", g; 464 } 465 var y = s[u] = { exports: {} }; 466 r[u][0].call(y.exports, function(v) { 467 var b = r[u][1][v]; 468 return a(b || v); 469 }, y, y.exports, n, r, s, i); 470 } 471 return s[u].exports; 472 } 473 for (var o = typeof on == "function" && on, c = 0; c < i.length; c++) a(i[c]); 474 return a; 475 }({ 1: [function(n, r, s) { 476 var i = n("./init"), a = { 477 init: function(o) { 478 this.get = i(o), o && o.callback && typeof o.callback == "function" && o.callback(this.get); 479 } 480 }; 481 r.exports = a; 482 }, { "./init": 6 }], 2: [function(n, r, s) { 483 var i = n("./terms"), a = n("./helpers/utils"), o = { 484 containers: { 485 current: "sbjs_current", 486 current_extra: "sbjs_current_add", 487 first: "sbjs_first", 488 first_extra: "sbjs_first_add", 489 session: "sbjs_session", 490 udata: "sbjs_udata", 491 promocode: "sbjs_promo" 492 }, 493 service: { 494 migrations: "sbjs_migrations" 495 }, 496 delimiter: "|||", 497 aliases: { 498 main: { 499 type: "typ", 500 source: "src", 501 medium: "mdm", 502 campaign: "cmp", 503 content: "cnt", 504 term: "trm" 505 }, 506 extra: { 507 fire_date: "fd", 508 entrance_point: "ep", 509 referer: "rf" 510 }, 511 session: { 512 pages_seen: "pgs", 513 current_page: "cpg" 514 }, 515 udata: { 516 visits: "vst", 517 ip: "uip", 518 agent: "uag" 519 }, 520 promo: "code" 521 }, 522 pack: { 523 main: function(c) { 524 return o.aliases.main.type + "=" + c.type + o.delimiter + o.aliases.main.source + "=" + c.source + o.delimiter + o.aliases.main.medium + "=" + c.medium + o.delimiter + o.aliases.main.campaign + "=" + c.campaign + o.delimiter + o.aliases.main.content + "=" + c.content + o.delimiter + o.aliases.main.term + "=" + c.term; 525 }, 526 extra: function(c) { 527 return o.aliases.extra.fire_date + "=" + a.setDate(/* @__PURE__ */ new Date(), c) + o.delimiter + o.aliases.extra.entrance_point + "=" + document.location.href + o.delimiter + o.aliases.extra.referer + "=" + (document.referrer || i.none); 528 }, 529 user: function(c, u) { 530 return o.aliases.udata.visits + "=" + c + o.delimiter + o.aliases.udata.ip + "=" + u + o.delimiter + o.aliases.udata.agent + "=" + navigator.userAgent; 531 }, 532 session: function(c) { 533 return o.aliases.session.pages_seen + "=" + c + o.delimiter + o.aliases.session.current_page + "=" + document.location.href; 534 }, 535 promo: function(c) { 536 return o.aliases.promo + "=" + a.setLeadingZeroToInt(a.randomInt(c.min, c.max), c.max.toString().length); 537 } 538 } 539 }; 540 r.exports = o; 541 }, { "./helpers/utils": 5, "./terms": 9 }], 3: [function(n, r, s) { 542 var i = n("../data").delimiter; 543 r.exports = { 544 encodeData: function(a) { 545 return encodeURIComponent(a).replace(/\!/g, "%21").replace(/\~/g, "%7E").replace(/\*/g, "%2A").replace(/\'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"); 546 }, 547 decodeData: function(a) { 548 try { 549 return decodeURIComponent(a).replace(/\%21/g, "!").replace(/\%7E/g, "~").replace(/\%2A/g, "*").replace(/\%27/g, "'").replace(/\%28/g, "(").replace(/\%29/g, ")"); 550 } catch { 551 try { 552 return unescape(a); 553 } catch { 554 return ""; 555 } 556 } 557 }, 558 set: function(a, o, c, u, d) { 559 var h, g; 560 if (c) { 561 var y = /* @__PURE__ */ new Date(); 562 y.setTime(y.getTime() + c * 60 * 1e3), h = "; expires=" + y.toGMTString(); 563 } else 564 h = ""; 565 u && !d ? g = ";domain=." + u : g = "", document.cookie = this.encodeData(a) + "=" + this.encodeData(o) + h + g + "; path=/"; 566 }, 567 get: function(a) { 568 for (var o = this.encodeData(a) + "=", c = document.cookie.split(";"), u = 0; u < c.length; u++) { 569 for (var d = c[u]; d.charAt(0) === " "; ) 570 d = d.substring(1, d.length); 571 if (d.indexOf(o) === 0) 572 return this.decodeData(d.substring(o.length, d.length)); 573 } 574 return null; 575 }, 576 destroy: function(a, o, c) { 577 this.set(a, "", -1, o, c); 578 }, 579 parse: function(a) { 580 var o = [], c = {}; 581 if (typeof a == "string") 582 o.push(a); 583 else 584 for (var u in a) 585 a.hasOwnProperty(u) && o.push(a[u]); 586 for (var d = 0; d < o.length; d++) { 587 var h; 588 c[this.unsbjs(o[d])] = {}, this.get(o[d]) ? h = this.get(o[d]).split(i) : h = []; 589 for (var g = 0; g < h.length; g++) { 590 var y = h[g].split("="), v = y.splice(0, 1); 591 v.push(y.join("=")), c[this.unsbjs(o[d])][v[0]] = this.decodeData(v[1]); 592 } 593 } 594 return c; 595 }, 596 unsbjs: function(a) { 597 return a.replace("sbjs_", ""); 598 } 599 }; 600 }, { "../data": 2 }], 4: [function(n, r, s) { 601 r.exports = { 602 parse: function(i) { 603 for (var a = this.parseOptions, o = a.parser[a.strictMode ? "strict" : "loose"].exec(i), c = {}, u = 14; u--; ) 604 c[a.key[u]] = o[u] || ""; 605 return c[a.q.name] = {}, c[a.key[12]].replace(a.q.parser, function(d, h, g) { 606 h && (c[a.q.name][h] = g); 607 }), c; 608 }, 609 parseOptions: {
610 strictMode: !1, 611 key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], 612 q: { 613 name: "queryKey", 614 parser: /(?:^|&)([^&=]*)=?([^&]*)/g 615 }, 616 parser: { 617 strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, 618 loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ 619 } 620 }, 621 getParam: function(i) { 622 for (var a = {}, o = i || window.location.search.substring(1), c = o.split("&"), u = 0; u < c.length; u++) { 623 var d = c[u].split("="); 624 if (typeof a[d[0]] > "u") 625 a[d[0]] = d[1]; 626 else if (typeof a[d[0]] == "string") { 627 var h = [a[d[0]], d[1]]; 628 a[d[0]] = h; 629 } else 630 a[d[0]].push(d[1]); 631 } 632 return a; 633 }, 634 getHost: function(i) { 635 return this.parse(i).host.replace("www.", ""); 636 } 637 }; 638 }, {}], 5: [function(n, r, s) { 639 r.exports = { 640 escapeRegexp: function(i) { 641 return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); 642 }, 643 setDate: function(i, a) { 644 var o = i.getTimezoneOffset() / 60, c = i.getHours(), u = a || a === 0 ? a : -o; 645 i.setHours(c + o + u); 646 var d = i.getFullYear(), h = this.setLeadingZeroToInt(i.getMonth() + 1, 2), g = this.setLeadingZeroToInt(i.getDate(), 2), y = this.setLeadingZeroToInt(i.getHours(), 2), v = this.setLeadingZeroToInt(i.getMinutes(), 2), b = this.setLeadingZeroToInt(i.getSeconds(), 2); 647 return d + "-" + h + "-" + g + " " + y + ":" + v + ":" + b; 648 }, 649 setLeadingZeroToInt: function(i, a) { 650 for (var o = i + ""; o.length < a; ) 651 o = "0" + o; 652 return o; 653 }, 654 randomInt: function(i, a) { 655 return Math.floor(Math.random() * (a - i + 1)) + i; 656 } 657 }; 658 }, {}], 6: [function(n, r, s) { 659 var i = n("./data"), a = n("./terms"), o = n("./helpers/cookies"), c = n("./helpers/uri"), u = n("./helpers/utils"), d = n("./params"), h = n("./migrations"); 660 r.exports = function(g) { 661 var y = d.fetch(g), v = c.getParam(), b = y.domain.host, x = y.domain.isolate, j = y.lifetime; 662 h.go(j, b, x); 663 var _, T, E, O, A, W; 664 function B() { 665 var Z; 666 if (typeof v.utm_source < "u" || typeof v.utm_medium < "u" || typeof v.utm_campaign < "u" || typeof v.utm_content < "u" || typeof v.utm_term < "u" || typeof v.gclid < "u" || typeof v.yclid < "u" || typeof v[y.campaign_param] < "u") 667 re(), Z = q(a.traffic.utm); 668 else if (fe(a.traffic.organic)) 669 re(), Z = q(a.traffic.organic); 670 else if (!o.get(i.containers.session) && fe(a.traffic.referral)) 671 re(), Z = q(a.traffic.referral); 672 else if (!o.get(i.containers.first) && !o.get(i.containers.current)) 673 re(), Z = q(a.traffic.typein); 674 else 675 return o.get(i.containers.current); 676 return Z; 677 } 678 function q(Z) { 679 switch (Z) { 680 case a.traffic.utm: 681 _ = a.traffic.utm, typeof v.utm_source < "u" ? T = v.utm_source : typeof v.gclid < "u" ? T = "google" : typeof v.yclid < "u" ? T = "yandex" : T = a.none, typeof v.utm_medium < "u" ? E = v.utm_medium : typeof v.gclid < "u" || typeof v.yclid < "u" ? E = "cpc" : E = a.none, typeof v.utm_campaign < "u" ? O = v.utm_campaign : typeof v[y.campaign_param] < "u" ? O = v[y.campaign_param] : typeof v.gclid < "u" ? O = "google_cpc" : typeof v.yclid < "u" ? O = "yandex_cpc" : O = a.none, A = v.utm_content || a.none, W = oe() || a.none; 682 break; 683 case a.traffic.organic: 684 _ = a.traffic.organic, T = T || c.getHost(document.referrer), E = a.referer.organic, O = a.none, A = a.none, W = a.none; 685 break; 686 case a.traffic.referral: 687 _ = a.traffic.referral, T = T || c.getHost(document.referrer), E = E || a.referer.referral, O = a.none, A = c.parse(document.referrer).path, W = a.none; 688 break; 689 case a.traffic.typein: 690 _ = a.traffic.typein, T = y.typein_attributes.source, E = y.typein_attributes.medium, O = a.none, A = a.none, W = a.none; 691 break; 692 default: 693 _ = a.oops, T = a.oops, E = a.oops, O = a.oops, A = a.oops, W = a.oops; 694 } 695 var H = { 696 type: _, 697 source: T, 698 medium: E, 699 campaign: O, 700 content: A, 701 term: W 702 }; 703 return i.pack.main(H); 704 } 705 function oe() { 706 var Z = document.referrer; 707 if (v.utm_term) 708 return v.utm_term; 709 if (Z && c.parse(Z).host && c.parse(Z).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)) 710 try { 711 return c.getParam(c.parse(document.referrer).query).text; 712 } catch { 713 return !1; 714 } 715 else 716 return !1; 717 } 718 function fe(Z) { 719 var H = document.referrer; 720 switch (Z) { 721 case a.traffic.organic: 722 return !!H && U(H) && N(H); 723 case a.traffic.referral: 724 return !!H && U(H) && G(H); 725 default: 726 return !1; 727 } 728 } 729 function U(Z) { 730 if (y.domain) { 731 if (x) 732 return c.getHost(Z) !== c.getHost(b); 733 var H = new RegExp("^(?:.*\\.)?" + u.escapeRegexp(b) + "$", "i"); 734 return !c.getHost(Z).match(H); 735 } else 736 return c.getHost(Z) !== c.getHost(document.location.href); 737 } 738 function N(Z) { 739 var H = "yandex", ce = "text", le = "google", Ce = new RegExp("^(?:.*\\.)?" + u.escapeRegexp(H) + "\\..{2,9}$"), ee = new RegExp(".*" + u.escapeRegexp(ce) + "=.*"), je = new RegExp("^(?:www\\.)?" + u.escapeRegexp(le) + "\\..{2,9}$"); 740 if (c.parse(Z).query && c.parse(Z).host.match(Ce) && c.parse(Z).query.match(ee)) 741 return T = H, !0; 742 if (c.parse(Z).host.match(je)) 743 return T = le, !0;
744 if (c.parse(Z).query) 745 for (var Oe = 0; Oe < y.organics.length; Oe++) { 746 if (c.parse(Z).host.match(new RegExp("^(?:.*\\.)?" + u.escapeRegexp(y.organics[Oe].host) + "$", "i")) && c.parse(Z).query.match(new RegExp(".*" + u.escapeRegexp(y.organics[Oe].param) + "=.*", "i"))) 747 return T = y.organics[Oe].display || y.organics[Oe].host, !0; 748 if (Oe + 1 === y.organics.length) 749 return !1; 750 } 751 else 752 return !1; 753 } 754 function G(Z) { 755 if (y.referrals.length > 0) 756 for (var H = 0; H < y.referrals.length; H++) { 757 if (c.parse(Z).host.match(new RegExp("^(?:.*\\.)?" + u.escapeRegexp(y.referrals[H].host) + "$", "i"))) 758 return T = y.referrals[H].display || y.referrals[H].host, E = y.referrals[H].medium || a.referer.referral, !0; 759 if (H + 1 === y.referrals.length) 760 return T = c.getHost(Z), !0; 761 } 762 else 763 return T = c.getHost(Z), !0; 764 } 765 function re() { 766 o.set(i.containers.current_extra, i.pack.extra(y.timezone_offset), j, b, x), o.get(i.containers.first_extra) || o.set(i.containers.first_extra, i.pack.extra(y.timezone_offset), j, b, x); 767 } 768 return function() { 769 o.set(i.containers.current, B(), j, b, x), o.get(i.containers.first) || o.set(i.containers.first, o.get(i.containers.current), j, b, x); 770 var H, ce; 771 o.get(i.containers.udata) ? (H = parseInt(o.parse(i.containers.udata)[o.unsbjs(i.containers.udata)][i.aliases.udata.visits]) || 1, H = o.get(i.containers.session) ? H : H + 1, ce = i.pack.user(H, y.user_ip)) : (H = 1, ce = i.pack.user(H, y.user_ip)), o.set(i.containers.udata, ce, j, b, x); 772 var le; 773 o.get(i.containers.session) ? (le = parseInt(o.parse(i.containers.session)[o.unsbjs(i.containers.session)][i.aliases.session.pages_seen]) || 1, le += 1) : le = 1, o.set(i.containers.session, i.pack.session(le), y.session_length, b, x), y.promocode && !o.get(i.containers.promocode) && o.set(i.containers.promocode, i.pack.promo(y.promocode), j, b, x); 774 }(), o.parse(i.containers); 775 }; 776 }, { "./data": 2, "./helpers/cookies": 3, "./helpers/uri": 4, "./helpers/utils": 5, "./migrations": 7, "./params": 8, "./terms": 9 }], 7: [function(n, r, s) { 777 var i = n("./data"), a = n("./helpers/cookies"); 778 r.exports = { 779 go: function(o, c, u) { 780 var d = this.migrations, h = { l: o, d: c, i: u }, g; 781 if (!a.get(i.containers.first) && !a.get(i.service.migrations)) { 782 var y = []; 783 for (g = 0; g < d.length; g++) 784 y.push(d[g].id); 785 var v = ""; 786 for (g = 0; g < y.length; g++) 787 v += y[g] + "=1", g < y.length - 1 && (v += i.delimiter); 788 a.set(i.service.migrations, v, h.l, h.d, h.i); 789 } else if (!a.get(i.service.migrations)) 790 for (g = 0; g < d.length; g++) 791 d[g].go(d[g].id, h); 792 }, 793 migrations: [ 794 { 795 id: "1418474375998", 796 version: "1.0.0-beta", 797 go: function(o, c) { 798 var u = o + "=1", d = o + "=0", h = function(x, j, _) { 799 return j || _ ? x : i.delimiter; 800 }; 801 try { 802 var g = []; 803 for (var y in i.containers) 804 i.containers.hasOwnProperty(y) && g.push(i.containers[y]); 805 for (var v = 0; v < g.length; v++) 806 if (a.get(g[v])) { 807 var b = a.get(g[v]).replace(/(\|)?\|(\|)?/g, h); 808 a.destroy(g[v], c.d, c.i), a.destroy(g[v], c.d, !c.i), a.set(g[v], b, c.l, c.d, c.i); 809 } 810 a.get(i.containers.session) && a.set(i.containers.session, i.pack.session(0), c.l, c.d, c.i), a.set(i.service.migrations, u, c.l, c.d, c.i); 811 } catch { 812 a.set(i.service.migrations, d, c.l, c.d, c.i); 813 } 814 } 815 } 816 ] 817 }; 818 }
818, { "./data": 2, "./helpers/cookies": 3 }], 8: [function(n, r, s) { 819 var i = n("./terms"), a = n("./helpers/uri"); 820 r.exports = { 821 fetch: function(o) { 822 var c = o || {}, u = {}; 823 if (u.lifetime = this.validate.checkFloat(c.lifetime) || 6, u.lifetime = parseInt(u.lifetime * 30 * 24 * 60), u.session_length = this.validate.checkInt(c.session_length) || 30, u.timezone_offset = this.validate.checkInt(c.timezone_offset), u.campaign_param = c.campaign_param || !1, u.user_ip = c.user_ip || i.none, c.promocode ? (u.promocode = {}, u.promocode.min = parseInt(c.promocode.min) || 1e5, u.promocode.max = parseInt(c.promocode.max) || 999999) : u.promocode = !1, c.typein_attributes && c.typein_attributes.source && c.typein_attributes.medium ? (u.typein_attributes = {}, u.typein_attributes.source = c.typein_attributes.source, u.typein_attributes.medium = c.typein_attributes.medium) : u.typein_attributes = { source: "(direct)", medium: "(none)" }, c.domain && this.validate.isString(c.domain) ? u.domain = { host: c.domain, isolate: !1 } : c.domain && c.domain.host ? u.domain = c.domain : u.domain = { host: a.getHost(document.location.hostname), isolate: !1 }, u.referrals = [], c.referrals && c.referrals.length > 0) 824 for (var d = 0; d < c.referrals.length; d++) 825 c.referrals[d].host && u.referrals.push(c.referrals[d]); 826 if (u.organics = [], c.organics && c.organics.length > 0) 827 for (var h = 0; h < c.organics.length; h++) 828 c.organics[h].host && c.organics[h].param && u.organics.push(c.organics[h]); 829 return u.organics.push({ host: "bing.com", param: "q", display: "bing" }), u.organics.push({ host: "yahoo.com", param: "p", display: "yahoo" }), u.organics.push({ host: "about.com", param: "q", display: "about" }), u.organics.push({ host: "aol.com", param: "q", display: "aol" }), u.organics.push({ host: "ask.com", param: "q", display: "ask" }), u.organics.push({ host: "globososo.com", param: "q", display: "globo" }), u.organics.push({ host: "go.mail.ru", param: "q", display: "go.mail.ru" }), u.organics.push({ host: "rambler.ru", param: "query", display: "rambler" }), u.organics.push({ host: "tut.by", param: "query", display: "tut.by" }), u.referrals.push({ host: "t.co", display: "twitter.com" }), u.referrals.push({ host: "plus.url.google.com", display: "plus.google.com" }), u; 830 }, 831 validate: { 832 checkFloat: function(o) { 833 return o && this.isNumeric(parseFloat(o)) ? parseFloat(o) : !1; 834 }, 835 checkInt: function(o) { 836 return o && this.isNumeric(parseInt(o)) ? parseInt(o) : !1; 837 }, 838 isNumeric: function(o) { 839 return !isNaN(o); 840 }, 841 isString: function(o) { 842 return Object.prototype.toString.call(o) === "[object String]"; 843 } 844 } 845 }; 846 }, { "./helpers/uri": 4, "./terms": 9 }], 9: [function(n, r, s) { 847 r.exports = { 848 traffic: { 849 utm: "utm", 850 organic: "organic", 851 referral: "referral", 852 typein: "typein" 853 }, 854 referer: { 855 referral: "referral", 856 organic: "organic", 857 social: "social" 858 }, 859 none: "(none)", 860 oops: "(Houston, we have a problem)" 861 }; 862 }, {}] }, {}, [1])(1); 863 }); 864})(ni); 865var La = ni.exports; 866const hn = /* @__PURE__ */ zs(La); 867function Va() { 868 return /* @__PURE__ */ l.jsxs( 869 "svg", 870 { 871 xmlns: "http://www.w3.org/2000/svg", 872 style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, 873 children: [
874 /* @__PURE__ */ l.jsxs("symbol", { id: "icon-vk", viewBox: "0 0 16 16", fill: "none", children: [ 875 /* @__PURE__ */ l.jsx( 876 "path", 877 { 878 fillRule: "evenodd", 879 clipRule: "evenodd", 880 d: "M1.12471 1.12471C1.05964e-07 2.24942 0 4.05961 0 7.68V8.32C0 11.9404 1.05964e-07 13.7506 1.12471 14.8753C2.24942 16 4.05961 16 7.68 16H8.32C11.9404 16 13.7506 16 14.8753 14.8753C16 13.7506 16 11.9404 16 8.32V7.68C16 4.05961 16 2.24942 14.8753 1.12471C13.7506 0 11.9404 0 8.32 0H7.68C4.05961 0 2.24942 0 1.12471 1.12471Z", 881 fill: "var(--icon-accent, #0077FF)" 882 } 883 ), 884 /* @__PURE__ */ l.jsx( 885 "path", 886 { 887 d: "M8.5417 11.5573C4.93841 11.5573 2.75228 9.05265 2.66663 4.89062H4.4916C4.54849 7.94794 5.93688 9.24349 7.00118 9.5099V4.89062H8.75008V7.52911C9.77667 7.41512 10.8512 6.21499 11.2124 4.89062H12.9338C12.6583 6.51919 11.4885 7.71931 10.662 8.21435C11.4891 8.61461 12.82 9.66232 13.3333 11.5573H11.4412C11.0417 10.2906 10.063 9.30945 8.75072 9.17625V11.5573H8.5417Z", 888 fill: "var(--icon-bg, white)" 889 } 890 ) 891 ] }),
892 /* @__PURE__ */ l.jsxs("symbol", { id: "icon-yandex", viewBox: "0 0 16 16", fill: "none", children: [ 893 /* @__PURE__ */ l.jsx( 894 "path", 895 { 896 d: "M16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16C12.4183 16 16 12.4183 16 8Z", 897 fill: "var(--icon-accent, #FC3F1D)" 898 } 899 ), 900 /* @__PURE__ */ l.jsx( 901 "path", 902 { 903 d: "M9.12738 12.807H10.7987V3.20703H8.36765C5.92271 3.20703 4.63811 4.46403 4.63811 6.31496C4.63811 7.79296 5.34258 8.66316 6.59958 9.56096L4.41711 12.807H6.22665L8.65771 9.17423L7.81511 8.6079C6.79298 7.91723 6.29571 7.37856 6.29571 6.21823C6.29571 5.1961 7.01398 4.50543 8.38145 4.50543H9.12738V12.807Z", 904 fill: "var(--icon-bg, white)" 905 } 906 ) 907 ] }), 908 /* @__PURE__ */ l.jsxs("symbol", { id: "icon-sber", viewBox: "0 0 16 16", fill: "none", children: [ 909 /* @__PURE__ */ l.jsxs("g", { clipPath: "url(#clip0_40000111_135488)", children: [
910 /* @__PURE__ */ l.jsx( 911 "path", 912 { 913 d: "M14.3309 3.10883C14.7089 3.59697 15.0319 4.13009 15.2897 4.69924L7.99996 10.0714L4.95464 8.16225V5.86558L7.99996 7.77473L14.3309 3.10883Z", 914 fill: "var(--icon-accent, #21A038)" 915 } 916 ), 917 /* @__PURE__ */ l.jsx( 918 "path", 919 { 920 d: "M1.84797 8.00027C1.84797 7.89704 1.85061 7.79486 1.85591 7.69268L0.0103034 7.60056C0.00395019 7.73291 0.000244141 7.86632 0.000244141 8.00027C0.000244141 10.2096 0.895514 12.2098 2.34351 13.6573L3.65228 12.3485C2.53782 11.2346 1.84797 9.69659 1.84797 8.00027Z", 921 fill: "var(--icon-accent, #21A038)" 922 } 923 ), 924 /* @__PURE__ */ l.jsx( 925 "path", 926 { 927 d: "M8.00002 1.84825C8.10325 1.84825 8.20543 1.85196 8.30761 1.85672L8.39973 0.0100592C8.26738 0.00370604 8.13397 0 8.00002 0C5.79068 0 3.79048 0.89527 2.34302 2.34327L3.65176 3.65204C4.76572 2.5381 6.3037 1.84825 8.00002 1.84825Z", 928 fill: "var(--icon-accent, #21A038)" 929 } 930 ),
931 /* @__PURE__ */ l.jsx( 932 "path", 933 { 934 d: "M7.99996 14.1523C7.89672 14.1523 7.79455 14.1496 7.69237 14.1443L7.60024 15.9899C7.7326 15.9963 7.866 16 7.99996 16C10.2093 16 12.2095 15.1047 13.6569 13.6567L12.3482 12.348C11.2343 13.4624 9.69628 14.1523 7.99996 14.1523Z", 935 fill: "var(--icon-accent, #21A038)" 936 } 937 ), 938 /* @__PURE__ */ l.jsx( 939 "path", 940 { 941 d: "M11.4683 2.92194L13.0243 1.77519C11.6509 0.665497 9.90335 0 8.00002 0V1.84825C9.28549 1.84825 10.4804 2.2448 11.4683 2.92194Z", 942 fill: "var(--icon-accent, #21A038)" 943 } 944 ), 945 /* @__PURE__ */ l.jsx( 946 "path", 947 { 948 d: "M16.0002 8.00027C16.0002 7.51108 15.9563 7.03192 15.8721 6.56708L14.1499 7.83614C14.1515 7.89067 14.152 7.9452 14.152 8.00027C14.152 9.8067 13.3695 11.4336 12.1253 12.5603L13.3668 13.9326C14.9843 12.4692 16.0002 10.3531 16.0002 8.00027Z", 949 fill: "var(--icon-accent, #21A038)" 950 } 951 ),
952 /* @__PURE__ */ l.jsx( 953 "path", 954 { 955 d: "M7.99996 14.1523C6.19352 14.1523 4.56658 13.3698 3.43996 12.1256L2.06766 13.3671C3.53154 14.984 5.64716 16 7.99996 16V14.1523Z", 956 fill: "var(--icon-accent, #21A038)" 957 } 958 ), 959 /* @__PURE__ */ l.jsx( 960 "path", 961 { 962 d: "M3.87464 3.44027L2.63311 2.06797C1.01623 3.53185 0.000244141 5.64747 0.000244141 8.00027H1.84797C1.84743 6.19384 2.63047 4.56689 3.87464 3.44027Z", 963 fill: "var(--icon-accent, #21A038)" 964 } 965 ) 966 ] }), 967 /* @__PURE__ */ l.jsx("defs", { children: /* @__PURE__ */ l.jsx("clipPath", { id: "clip0_40000111_135488", children: /* @__PURE__ */ l.jsx("rect", { width: "16", height: "16", fill: "white" }) }) }) 968 ] }), 969 /* @__PURE__ */ l.jsx("symbol", { id: "icon-arrow-left", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ l.jsx( 970 "path", 971 { 972 d: "M12.7012 8.00058C12.7009 8.27653 12.4772 8.50058 12.2012 8.50058L5.91699 8.50058C6.13198 8.67385 6.33277 8.86211 6.5166 9.0582C7.31271 9.9074 7.90137 11.0244 7.90137 12.0006C7.9013 12.2767 7.67747 12.5006 7.40137 12.5006C7.1253 12.5005 6.90143 12.2766 6.90137 12.0006C6.90137 11.3768 6.48998 10.4936 5.78613 9.74277C5.08663 8.99668 4.20975 8.50058 3.40137 8.50058C3.1253 8.50055 2.90143 8.27665 2.90137 8.00058C2.90137 7.93172 2.91525 7.86594 2.94043 7.80624C2.95319 7.77592 2.96908 7.74723 2.9873 7.72031C3.00515 7.69398 3.02545 7.66948 3.04785 7.64706C3.11574 7.57904 3.20301 7.53037 3.30078 7.51035L3.40137 7.50058C4.20972 7.50058 5.08664 7.00443 5.78613 6.25839C6.48995 5.50765 6.90131 4.6244 6.90137 4.00058C6.90137 3.72446 7.12525 3.50062 7.40137 3.50058C7.67751 3.50058 7.90137 3.72444 7.90137 4.00058C7.90132 4.97672 7.31269 6.09379 6.5166 6.94296C6.33259 7.
97213923 6.13124 7.32718 5.91602 7.50058L12.2012 7.50058C12.4773 7.50058 12.7012 7.72444 12.7012 8.00058Z", 973 fill: "currentColor" 974 } 975 ) }), 976 /* @__PURE__ */ l.jsx("symbol", { id: "icon-load", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ l.jsx( 977 "path", 978 { 979 d: "M7.81082 13.8333C4.67622 13.8333 2.13513 11.2216 2.13513 8C2.13513 4.77834 4.67622 2.16667 7.81082 2.16667C10.0643 2.16667 12.011 3.51642 12.9274 5.47222H10.8378C10.5244 5.47222 10.2703 5.73339 10.2703 6.05556C10.2703 6.37772 10.5244 6.63889 10.8378 6.63889H14.4324C14.583 6.63889 14.7273 6.57744 14.8337 6.46801C14.9402 6.35864 15 6.21026 15 6.05556V2.36111C15 2.03895 14.7459 1.77778 14.4324 1.77778C14.119 1.77778 13.8649 2.03895 13.8649 2.36111V4.78996C12.7326 2.53879 10.4465 1 7.81082 1C4.0493 1 1 4.13401 1 8C1 11.866 4.0493 15 7.81082 15C11.0228 15 13.7155 12.7147 14.4336 9.63994C14.5152 9.29064 14.2447 8.97222 13.8952 8.97222C13.614 8.97222 13.3771 9.18214 13.3068 9.46199C12.6755 11.9761 10.4542 13.8333 7.81082 13.8333Z", 980 fill: "currentColor" 981 } 982 ) }),
983 /* @__PURE__ */ l.jsx("symbol", { id: "icon-check", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ l.jsx( 984 "path", 985 { 986 d: "M12.4922 3.86523C12.7511 3.76918 13.0387 3.90128 13.1348 4.16016C13.2306 4.41898 13.0986 4.70671 12.8398 4.80273C12.1048 5.07561 11.3118 5.63725 10.5215 6.36328C9.73653 7.0845 8.98184 7.94222 8.32227 8.77051C7.6638 9.59744 7.10558 10.3884 6.71191 10.9727C6.51534 11.2644 6.35954 11.5048 6.25391 11.6709C6.20126 11.7537 6.16074 11.8188 6.13379 11.8623C6.12049 11.8838 6.11013 11.9003 6.10352 11.9111L6.09375 11.9258C5.99929 12.0812 5.82728 12.1744 5.64551 12.167C5.46394 12.1593 5.30011 12.0531 5.21875 11.8906C4.75532 10.9639 4.22543 10.4422 3.83105 10.1553C3.63261 10.011 3.46477 9.92347 3.35352 9.87402C3.29807 9.8494 3.25614 9.83454 3.23145 9.82617C3.21952 9.82213 3.2116 9.81942 3.20801 9.81836H3.20898C2.94301 9.75023 2.78134 9.47962 2.84766 9.21289C2.9146 8.94511 3.18632 8.78188 3.4541 8.84863H3.45508V8.84961H3.45703C3.4579 8.84983 3.45895 8.85031 3.45996 8.85059C3.46214 8.85115 3.46496 8.85178 3.46777 8.85254C3.47338 8.85406 3.48029 8.85606 3.48828 8.8584C3.50482 8.86324 3.52673 8.87009 3.55273 8.87891C3.60471 8.89653 3.67502 8.92231 3.75977 8.95996C3.92976 9.03551 4.15905 9.15767 4.41895 9.34668C4.80854 9.63008 5.26179 10.0609 5.68945 10.707C5.74892 10.6169 5.81197 10.5178 5.88184 10.4141C6.28584 9.81446 6.86061 9.00072 7.54004 8.14746C8.21851 7.29544 9.00862 6.39516 9.84473 5.62695C10.6752 4.86402 11.5807 4.20355 12.4922 3.86523Z", 987 fill: "currentColor" 988 } 989 ) }) 990 ] 991 } 992 ); 993} 994function ri(e) { 995 var t, n, r = ""; 996 if (typeof e == "string" || typeof e == "number") r += e; 997 else if (typeof e == "object") if (Array.isArray(e)) { 998 var s = e.length; 999 for (t = 0; t < s; t++) e[t] && (n = ri(e[t])) && (r && (r += " "), r += n); 1000 } else for (n in e) e[n] && (r && (r += " "), r += n); 1001 return r; 1002} 1003function si() { 1004 for (var e, t, n = 0, r = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = ri(e)) && (r && (r += " "), r += t); 1005 return r; 1006} 1007const vr = ({ children: e, className: t }) => /* @__PURE__ */ l.jsx("div", { className: si("container", t), children: e }), Dt = new Proxy({}, { 1008 get: (e, t) => t 1009}), In = (e) => { 1010 const t = Math.floor(e / 60).toString().padStart(2, "0"), n = (e % 60).toString().padStart(2, "0"); 1011 return `${t}:${n}`; 1012}, Ra = ({ consultation: e }) => { 1013 const [t, n] = I.useState("00:00"), r = e && ["active", "paused", "suspended", "pending"].includes(e.status) && ["consultation", "call", "request"].includes(e.type); 1014 if (I.useEffect(() => { 1015 if (!(!r || !e)) { 1016 if (["paused", "suspended"].includes(e.status)) { 1017 const c = e.duration || e.totalDuration; 1018 c && n(In(c)); 1019 return; 1020 } 1021 if (e.status === "active") { 1022 const c = () => { 1023 if (e.paymentLogic === "unlimited" && e.startedAt) { 1024 const h = new Date(e.startedAt).getTime(), g = Date.now(), y = Math.max(0, Math.floor((g - h) / 1e3)); 1025 n(In(y)); 1026 return; 1027 } 1028 let d = null; 1029 if (e.endingAt) 1030 d = new Date(e.endingAt).getTime(); 1031 else if (e.startedAt) { 1032 const h = e.duration || e.totalDuration; 1033 if (h) { 1034 const g = new Date(e.startedAt).getTime(), y = h * 1e3; 1035 d = g + y; 1036 } 1037 } 1038 if (d) { 1039 const h = Date.now(), g = Math.max(0, Math.floor((d - h) / 1e3)); 1040 n(In(g)); 1041 } 1042 }; 1043 c(); 1044 const u = setInterval(c, 1e3); 1045 return () => clearInterval(u); 1046 } 1047 } 1048 }, [e, r]), !r || !e) return null; 1049 let s = "", i = !1; 1050 const a = "ÐеÑнÑÑÑÑÑ", o = `/consultation/${e.consultationId}`; 1051 switch (e.status) { 1052 case "pending": 1053 s = e.type === "request" ? "Ðжидание подÑвеÑÐ¶Ð´ÐµÐ½Ð¸Ñ Ð·Ð°Ñвки ÑкÑпеÑÑом" : "Ðжидание подклÑÑÐµÐ½Ð¸Ñ Ðº звонкÑ"; 1054 break; 1055 case "suspended": 1056 s = "Ðжидание оплаÑÑ", i = !0; 1057 break; 1058 case "paused": 1059 s = "ÐонÑÑлÑÑаÑÐ¸Ñ Ð½Ð° паÑзе", i = !0; 1060 break; 1061 case "active": 1062 default: 1063 s = 'ÐдÑÑ ÐºÐ¾Ð½ÑÑлÑÑаÑиÑ. СÑеÑÑ Ð¿ÑодолжаÑÑ ÑпиÑÑваÑÑÑÑ. <span class="for-tablet-and-desktop">ÐеÑнÑÑÑÑÑ Ðº диалогÑ?</span>', i = !0; 1064 break; 1065 } 1066 return /* @__PURE__ */ l.jsx("div", { className: Dt.warningBanner, children: /* @__PURE__ */ l.jsxs(vr, { className: Dt.content, children: [
1067 /* @__PURE__ */ l.jsxs("div", { className: Dt.left, children: [ 1068 i && /* @__PURE__ */ l.jsx("div", { className: Dt.time, children: t }), 1069 /* @__PURE__ */ l.jsx("p", { dangerouslySetInnerHTML: { __html: s } }) 1070 ] }), 1071 e.type !== "request" && /* @__PURE__ */ l.jsx("a", { href: o, className: Dt.bannerButton, children: a }) 1072 ] }) }); 1073}, st = new Proxy({}, { 1074 get: (e, t) => t 1075}), ii = "#login", Aa = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx( 1076 "path", 1077 { 1078 d: "M11.6465 3.64642C11.8417 3.45121 12.1583 3.45118 12.3535 3.64642C12.5487 3.84167 12.5487 4.15822 12.3535 4.35345L8.70604 7.99994L12.3525 11.6464C12.5477 11.8417 12.5477 12.1582 12.3525 12.3535C12.1573 12.5485 11.8407 12.5486 11.6455 12.3535L7.99901 8.70697L4.35447 12.3525C4.15924 12.5477 3.84271 12.5476 3.64744 12.3525C3.45218 12.1572 3.45218 11.8407 3.64744 11.6454L7.29197 7.99994L3.64647 4.35443C3.45127 4.15924 3.45141 3.84268 3.64647 3.6474C3.84173 3.45219 4.15825 3.45215 4.3535 3.6474L7.99901 7.29291L11.6465 3.64642Z", 1079 fill: "currentColor" 1080 } 1081) }), Ma = () => /* @__PURE__ */ l.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx( 1082 "path", 1083 { 1084 d: "M12.375 2.25C9.88943 2.25273 7.50645 3.24133 5.74889 4.99889C3.99133 6.75645 3.00273 9.13943 3 11.625V19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72064 20.842 4.10218 21 4.5 21H12.375C14.8614 21 17.246 20.0123 19.0041 18.2541C20.7623 16.496 21.75 14.1114 21.75 11.625C21.75 9.1386 20.7623 6.75403 19.0041 4.99587C17.246 3.23772 14.8614 2.25 12.375 2.25ZM8.25 13.125C8.0275 13.125 7.80999 13.059 7.62498 12.9354C7.43998 12.8118 7.29578 12.6361 7.21064 12.4305C7.12549 12.225 7.10321 11.9988 7.14662 11.7805C7.19002 11.5623 7.29717 11.3618 7.4545 11.2045C7.61184 11.0472 7.81229 10.94 8.03052 10.8966C8.24875 10.8532 8.47495 10.8755 8.68052 10.9606C8.88609 11.0458 9.06179 11.19 9.1854 11.375C9.30902 11.56 9.375 11.7775 9.375 12C9.375 12.2984 9.25647 12.5845 9.0455 12.7955C8.83452 13.0065 8.54837 13.125 8.25 13.125ZM12.375 13.125C12.1525 13.125 11.935 13.059 11.75 12.9354C11.565 12.8118 11.4208 12.6361 11.3356 12.4305C11.2505 12.225 11.2282 11.9988 11.2716 11.7805C11.315 11.5623 11.4222 11.3618 11.5795 11.2045C11.7368 11.0472 11.9373 10.94 12.1555 10.8966C12.3738 10.8532 12.6 10.8755 12.8055 10.9606C13.0111 11.0458 13.1868 11.19 13.3104 11.375C13.434 11.56 13.5 11.7775 13.5 12C13.5 12.2984 13.3815 12.5845 13.1705 12.7955C12.9595 13.0065 12.6734 13.125 12.375 13.125ZM16.5 13.125C16.2775 13.125 16.06 13.059 15.875 12.9354C15.69 12.8118 15.5458 12.6361 15.4606 12.4305C15.3755 12.225 15.3532 11.9988 15.3966 11.7805C15.44 11.5623 15.5472 11.3618 15.7045 11.2045C15.8618 11.0472 16.0623 10.94 16.2805 10.8966C16.4988 10.8532 16.725 10.8755 16.9305 10.9606C17.1361 11.0458 17.3118 11.19 17.4354 11.375C17.559 11.56 17.625 11.7775 17.625 12C17.625 12.2984 17.5065 12.5845 17.2955 12.7955C17.0845 13.0065 16.7984 13.125 16.5 13.125Z", 1085 fill: "#7134C4" 1086 } 1087) }), Br = ({ content: e, onDismiss: t, onAction: n }) => { 1088 const [r, s] = I.useState(!1); 1089 if (r) return null; 1090 const i = () => { 1091 s(!0), t == null || t(); 1092 }, a = e.buttonLink === ii, o = (c) => { 1093 if (a) { 1094 c.preventDefault(), window.dispatchEvent(new Event("vedora:login")); 1095 return; 1096 } 1097 s(!0), n == null || n(); 1098 }; 1099 return /* @__PURE__ */ l.jsxs("div", { className: st.headerBanner, children: [ 1100 /* @__PURE__ */ l.jsxs(vr, { className: st.headerBannerContent, children: [
1101 /* @__PURE__ */ l.jsxs("div", { className: st.headerBannerLeft, children: [ 1102 /* @__PURE__ */ l.jsx("span", { className: st.headerBannerIcon, children: e.imageUrl ? /* @__PURE__ */ l.jsx("img", { src: e.imageUrl, alt: "" }) : /* @__PURE__ */ l.jsx(Ma, {}) }), 1103 /* @__PURE__ */ l.jsx("p", { className: st.headerBannerText, children: e.text }) 1104 ] }), 1105 /* @__PURE__ */ l.jsx("div", { className: st.headerBannerAction, children: /* @__PURE__ */ l.jsx( 1106 "a", 1107 { 1108 href: e.buttonLink, 1109 className: st.headerBannerActionBtn, 1110 onClick: o, 1111 children: e.buttonText 1112 } 1113 ) }) 1114 ] }), 1115 /* @__PURE__ */ l.jsx( 1116 "button", 1117 { 1118 type: "button", 1119 className: st.headerBannerCloseBtn, 1120 "aria-label": "ÐакÑÑÑÑ", 1121 onClick: i, 1122 children: /* @__PURE__ */ l.jsx(Aa, {}) 1123 } 1124 ) 1125 ] }); 1126}, gn = (e, t = {}, n = {}) => { 1127 if (!(typeof window > "u")) { 1128 if (n.once) { 1129 const r = `analytics_sent_${e}`; 1130 if (sessionStorage.getItem(r)) 1131 return; 1132 sessionStorage.setItem(r, "true"); 1133 } 1134 window.dataLayer = window.dataLayer || [], window.dataLayer.push({ 1135 event: e, 1136 ...t 1137 }); 1138 } 1139}; 1140function ai({ name: e, width: t, height: n, size: r, className: s }) { 1141 return /* @__PURE__ */ l.jsx("svg", { className: s, width: r ?? t, height: r ?? n, children: /* @__PURE__ */ l.jsx("use", { xlinkHref: `#icon-${e}`, href: `#icon-${e}` }) }); 1142} 1143function Fe(...e) { 1144 return si(e); 1145} 1146const gt = { 1147 "tab-tab": "tab-tab", 1148 "tab-active": "tab-active", 1149 "tab-tab--secondary": "tab-tab--secondary", 1150 "tab-tab--sm": "tab-tab--sm", 1151 "tab-menu": "tab-menu", 1152 "tab-fullWidth": "tab-fullWidth" 1153}; 1154function Ia({ 1155 children: e, 1156 className: t, 1157 size: n = "sm", 1158 fullWidth: r = !1, 1159 active: s = !1, 1160 ref: i, 1161 tabVariant: a, 1162 ...o 1163}) { 1164 return /* @__PURE__ */ l.jsx( 1165 "button", 1166 { 1167 ref: i, 1168 type: "button", 1169 className: Fe( 1170 gt["tab-tab"], 1171 n && gt[`tab-tab--${n}`], 1172 r && gt["tab-fullWidth"], 1173 a && gt[`tab-tab--${a}`], 1174 s && gt["tab-active"], 1175 t 1176 ), 1177 ...o, 1178 children: e 1179 } 1180 ); 1181} 1182function Pa({ children: e, className: t, fullWidth: n = !0 }) { 1183 return /* @__PURE__ */ l.jsx("div", { className: Fe(gt["tab-menu"], n && gt["tab-fullWidth"], t), children: e }); 1184} 1185const Pn = { 1186 "tabs-bg": "tabs-bg", 1187 "tabs-active": "tabs-active", 1188 "tabs-secondary": "tabs-secondary" 1189}; 1190function Da({ 1191 tabState: e, 1192 tabsData: t, 1193 setTabState: n, 1194 tabFullWidth: r, 1195 menuFullWidth: s, 1196 tabVariant: i = "primary" 1197}) { 1198 const a = I.useRef(/* @__PURE__ */ new Map()), [o, c] = I.useState(!1), [u, d] = I.useState({ 1199 width: 0, 1200 height: 0, 1201 transform: "translateX(0px)", 1202 opacity: 0 1203 }); 1204 I.useEffect(() => { 1205 const g = () => { 1206 const v = t[0]; 1207 if (!v) return; 1208 const b = a.current.get(e), x = a.current.get(v.value); 1209 if (!b || !x) return; 1210 const { offsetWidth: j, offsetHeight: _, offsetLeft: T } = b, E = x.offsetLeft; 1211 d({ 1212 width: j, 1213 height: _, 1214 transform: `translateX(${T - E}px)`, 1215 opacity: 1 1216 }), c((O) => !O || !0); 1217 }; 1218 g(), window.addEventListener("resize", g); 1219 const y = new ResizeObserver(() => { 1220 g(); 1221 }); 1222 return a.current.forEach((v) => { 1223 y.observe(v); 1224 }), () => { 1225 window.removeEventListener("resize", g), y.disconnect(); 1226 }; 1227 }, [e, t]); 1228 const h = (g) => { 1229 g !== e && n(g); 1230 }; 1231 return /* @__PURE__ */ l.jsxs(Pa, { fullWidth: s, children: [
vendor: 14,547 bytes, lines 1232-1741
1232 o && /* @__PURE__ */ l.jsx( 1233 "div", 1234 { 1235 className: Fe(Pn["tabs-bg"], i && Pn[`tabs-${i}`]), 1236 style: { 1237 width: `${u.width}px`, 1238 height: `${u.height}px`, 1239 transform: u.transform, 1240 opacity: u.opacity, 1241 transition: "all 0.3s ease" 1242 } 1243 } 1244 ), 1245 t.map((g) => /* @__PURE__ */ l.jsx( 1246 Ia, 1247 { 1248 ref: (y) => { 1249 y ? a.current.set(g.value, y) : a.current.delete(g.value); 1250 }, 1251 onClick: () => { 1252 var y; 1253 h(g.value), (y = g.actionFn) == null || y.call(g); 1254 }, 1255 className: Fe(e === g.value && o && Pn["tabs-active"]), 1256 "data-active": e === g.value && o ? "true" : void 0, 1257 fullWidth: r, 1258 tabVariant: i, 1259 children: g.content 1260 }, 1261 g.value 1262 )) 1263 ] }); 1264} 1265var Qt = (e) => e.type === "checkbox", ct = (e) => e instanceof Date, ke = (e) => e == null; 1266const br = (e) => typeof e == "object"; 1267var pe = (e) => !ke(e) && !Array.isArray(e) && br(e) && !ct(e), Yn = (e) => pe(e) && e.target ? Qt(e.target) ? e.target.checked : e.target.value : e, oi = (e, t) => t.split(".").some((n, r, s) => !isNaN(Number(n)) && e.has(s.slice(0, r).join("."))), ci = (e) => { 1268 const t = e.constructor && e.constructor.prototype; 1269 return pe(t) && t.hasOwnProperty("isPrototypeOf"); 1270}, Ln = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u"; 1271function ge(e) { 1272 if (e instanceof Date) 1273 return new Date(e); 1274 const t = typeof FileList < "u" && e instanceof FileList; 1275 if (Ln && (e instanceof Blob || t)) 1276 return e; 1277 const n = Array.isArray(e); 1278 if (!n && !(pe(e) && ci(e))) 1279 return e; 1280 const r = n ? [] : Object.create(Object.getPrototypeOf(e)); 1281 for (const s in e) 1282 Object.prototype.hasOwnProperty.call(e, s) && (r[s] = ge(e[s])); 1283 return r; 1284} 1285const at = { 1286 BLUR: "blur", 1287 FOCUS_OUT: "focusout", 1288 CHANGE: "change", 1289 SUBMIT: "submit", 1290 TRIGGER: "trigger", 1291 VALID: "valid" 1292}, Ge = { 1293 onBlur: "onBlur", 1294 onChange: "onChange", 1295 onSubmit: "onSubmit", 1296 onTouched: "onTouched", 1297 all: "all" 1298}, Ue = { 1299 max: "max", 1300 min: "min", 1301 maxLength: "maxLength", 1302 minLength: "minLength", 1303 pattern: "pattern", 1304 required: "required", 1305 validate: "validate" 1306}, li = "root", _r = ["__proto__", "constructor", "prototype"], Fa = /^\w*$/; 1307var en = (e) => Fa.test(e), ue = (e) => e === void 0; 1308const $a = /[.[\]'"]/; 1309var Vn = (e) => e.split($a).filter(Boolean), L = (e, t, n) => { 1310 if (!t || !pe(e)) 1311 return n; 1312 const r = en(t) ? [t] : Vn(t); 1313 if (r.some((i) => _r.includes(i))) 1314 return n; 1315 const s = r.reduce((i, a) => ke(i) ? void 0 : i[a], e); 1316 return ue(s) || s === e ? ue(e[t]) ? n : e[t] : s; 1317}, Pe = (e) => typeof e == "boolean", Ne = (e) => typeof e == "function", ae = (e, t, n) => { 1318 let r = -1; 1319 const s = en(t) ? [t] : Vn(t), i = s.length, a = i - 1; 1320 for (; ++r < i; ) { 1321 const o = s[r]; 1322 let c = n; 1323 if (r !== a) { 1324 const u = e[o]; 1325 c = pe(u) || Array.isArray(u) ? u : isNaN(+s[r + 1]) ? {} : []; 1326 } 1327 if (_r.includes(o)) 1328 return; 1329 e[o] = c, e = e[o]; 1330 } 1331}; 1332const xr = z.createContext(null); 1333xr.displayName = "HookFormControlContext"; 1334const Cr = () => z.useContext(xr); 1335var ui = (e, t, n, r = !0) => { 1336 const s = {}; 1337 for (const i in e) 1338 Object.defineProperty(s, i, { 1339 get: () => { 1340 const a = i; 1341 return t._proxyFormState[a] !== Ge.all && (t._proxyFormState[a] = !r || Ge.all), n && (n[a] = !0), e[a]; 1342 } 1343 }); 1344 return s; 1345}; 1346const wr = Ln ? z.useLayoutEffect : z.useEffect; 1347function Za(e) { 1348 const t = Cr(), { control: n = t, disabled: r, name: s, exact: i } = e || {}, [a, o] = z.useState(() => ({ 1349 ...n._formState, 1350 defaultValues: n._defaultValues 1351 })), c = z.useRef({ 1352 isDirty: !1, 1353 isLoading: !1, 1354 dirtyFields: !1, 1355 touchedFields: !1, 1356 validatingFields: !1, 1357 isValidating: !1, 1358 isValid: !1, 1359 errors: !1 1360 }); 1361 return wr(() => n._subscribe({ 1362 name: s, 1363 formState: c.current, 1364 exact: i, 1365 callback: (u) => { 1366 !r && o({ 1367 ...n._formState, 1368 ...u, 1369 defaultValues: n._defaultValues 1370 }); 1371 } 1372 }), [s, r, i]), z.useEffect(() => { 1373 c.current.isValid && n._setValid(!0); 1374 }, [n]), z.useMemo(() => ui(a, n, c.current, !1), [a, n]); 1375} 1376var Te = (e) => typeof e == "string", Xn = (e, t, n, r, s) => Te(e) ? (r && t.watch.add(e), L(n, e, s)) : Array.isArray(e) ? e.map((i) => (r && t.watch.add(i), L(n, i))) : (r && (t.watchAll = !0), n), Jn = (e) => ke(e) || !br(e); 1377const Wr = (e, t) => t.length === 0 && !Array.isArray(e) && !ci(e); 1378function De(e, t, n = /* @__PURE__ */ new WeakMap()) { 1379 if (e === t) 1380 return !0; 1381 if (Jn(e) || Jn(t)) 1382 return Object.is(e, t); 1383 if (ct(e) && ct(t)) 1384 return Object.is(e.getTime(), t.getTime()); 1385 const r = Object.keys(e), s = Object.keys(t); 1386 if (r.length !== s.length) 1387 return !1; 1388 if (Wr(e, r) || Wr(t, s)) 1389 return Object.is(e, t); 1390 if (!r.length && Array.isArray(e) !== Array.isArray(t)) 1391 return !1; 1392 const i = n.get(e); 1393 if (i && i.has(t)) 1394 return !0; 1395 if (i) 1396 i.add(t); 1397 else { 1398 const a = /* @__PURE__ */ new WeakSet(); 1399 a.add(t), n.set(e, a); 1400 } 1401 for (const a of r) { 1402 const o = e[a]; 1403 if (!(a in t)) 1404 return !1; 1405 if (a !== "ref") { 1406 const c = t[a]; 1407 if (ct(o) && ct(c) || (pe(o) || Array.isArray(o)) && (pe(c) || Array.isArray(c)) ? !De(o, c, n) : !Object.is(o, c)) 1408 return !1; 1409 } 1410 } 1411 return !0; 1412} 1413function Ha(e) { 1414 const t = Cr(), { control: n = t, name: r, defaultValue: s, disabled: i, exact: a, compute: o } = e || {}, c = z.useRef(s), u = z.useRef(o), d = z.useRef(void 0), h = z.useRef(n), g = z.useRef(r); 1415 u.current = o; 1416 const [y, v] = z.useState(() => { 1417 const E = n._getWatch(r, c.current); 1418 return u.current ? u.current(E) : E; 1419 }), b = z.useCallback((E) => { 1420 const O = Xn(r, n._names, E || n._formValues, !1, c.current); 1421 return u.current ? u.current(O) : O; 1422 }, [n._formValues, n._names, r]), x = z.useCallback((E) => { 1423 if (!i) { 1424 const O = Xn(r, n._names, E || n._formValues, !1, c.current); 1425 if (u.current) { 1426 const A = u.current(O); 1427 De(A, d.current) || (v(A), d.current = A); 1428 } else 1429 v(O); 1430 } 1431 }, [n._formValues, n._names, i, r]); 1432 wr(() => ((h.current !== n || !De(g.current, r)) && (h.current = n, g.current = r, x()), n._subscribe({ 1433 name: r, 1434 formState: { 1435 values: !0 1436 }, 1437 exact: a, 1438 callback: (E) => { 1439 x(E.values); 1440 } 1441 })), [n, a, r, x]), z.useEffect(() => n._removeUnmounted()); 1442 const j = h.current !== n, _ = g.current, T = z.useMemo(() => { 1443 if (i) 1444 return null; 1445 const E = !j && !De(_, r); 1446 return j || E ? b() : null; 1447 }, [i, j, r, _, b]); 1448 return T !== null ? T : y; 1449} 1450function Ba(e) { 1451 const t = Cr(), { name: n, disabled: r, control: s = t, shouldUnregister: i, defaultValue: a, exact: o = !0 } = e, c = oi(s._names.array, n), u = z.useMemo(() => L(s._formValues, n, L(s._defaultValues, n, a)), [s, n, a]), d = Ha({ 1452 control: s, 1453 name: n, 1454 defaultValue: u, 1455 exact: o 1456 }), h = Za({ 1457 control: s, 1458 name: n, 1459 exact: o 1460 }), g = z.useRef(e), y = z.useRef(null), v = z.useRef(s.register(n, { 1461 ...e.rules, 1462 value: d, 1463 ...Pe(e.disabled) ? { disabled: e.disabled } : {} 1464 })); 1465 g.current = e; 1466 const b = z.useMemo(() => Object.defineProperties({}, { 1467 invalid: { 1468 enumerable: !0, 1469 get: () => !!L(h.errors, n) 1470 }, 1471 isDirty: { 1472 enumerable: !0, 1473 get: () => !!L(h.dirtyFields, n) 1474 }, 1475 isTouched: { 1476 enumerable: !0, 1477 get: () => !!L(h.touchedFields, n) 1478 }, 1479 isValidating: { 1480 enumerable: !0, 1481 get: () => !!L(h.validatingFields, n) 1482 }, 1483 error: { 1484 enumerable: !0, 1485 get: () => L(h.errors, n) 1486 } 1487 }), [h, n]), x = z.useCallback((E) => { 1488 const O = Yn(E); 1489 return L(s._fields, n) || (v.current = s.register(n, { 1490 ...g.current.rules, 1491 value: O 1492 })), v.current.onChange({ 1493 target: { 1494 value: Yn(E), 1495 name: n 1496 }, 1497 type: at.CHANGE 1498 }); 1499 }, [n, s]), j = z.useCallback(() => v.current.onBlur({ 1500 target: { 1501 value: L(s._formValues, n), 1502 name: n 1503 }, 1504 type: at.BLUR 1505 }), [n, s._formValues]), _ = z.useCallback((E) => { 1506 E && (y.current = { 1507 focus: () => Ne(E.focus) && E.focus(), 1508 select: () => Ne(E.select) && E.select(), 1509 setCustomValidity: (A) => Ne(E.setCustomValidity) && E.setCustomValidity(A), 1510 reportValidity: () => Ne(E.reportValidity) && E.reportValidity() 1511 }); 1512 const O = L(s._fields, n); 1513 O && O._f && E && (O._f.ref = y.current); 1514 }, [s._fields, n]), T = z.useMemo(() => ({ 1515 name: n, 1516 value: d, 1517 ...Pe(r) || h.disabled ? { disabled: h.disabled || r } : {}, 1518 onChange: x, 1519 onBlur: j, 1520 ref: _ 1521 }), [n, r, h.disabled, x, j, _, d]); 1522 return z.useEffect(() => { 1523 const E = s._options.shouldUnregister || i; 1524 s.register(n, { 1525 ...g.current.rules, 1526 ...Pe(g.current.disabled) ? { disabled: g.current.disabled } : {} 1527 }); 1528 const O = (A, W) => { 1529 const B = L(s._fields, A); 1530 B && B._f && (B._f.mount = W); 1531 }; 1532 if (O(n, !0), E) { 1533 const A = ge(L(i ? s._defaultValues : s._options.values || s._defaultValues, n, L(s._options.defaultValues, n, g.current.defaultValue))); 1534 ae(s._defaultValues, n, A), ue(L(s._formValues, n)) && ae(s._formValues, n, A); 1535 } 1536 if (!c && s.register(n), y.current) { 1537 const A = L(s._fields, n); 1538 A && A._f && (A._f.ref = y.current); 1539 } 1540 return () => { 1541 (c ? E && !s._state.action : E) ? s.unregister(n) : O(n, !1); 1542 }; 1543 }, [n, s, c, i]), z.useEffect(() => { 1544 s._setDisabledField({ 1545 disabled: r, 1546 name: n 1547 }); 1548 }, [r, n, s]), z.useMemo(() => ({ 1549 field: T, 1550 formState: h, 1551 fieldState: b 1552 }), [T, h, b]); 1553} 1554const Wa = (e) => e.render(Ba(e)), di = (e) => { 1555 const t = {}; 1556 for (const n of Object.keys(e)) 1557 if (br(e[n]) && e[n] !== null && !ct(e[n])) { 1558 const r = di(e[n]); 1559 for (const s of Object.keys(r)) 1560 t[`${n}.${s}`] = r[s]; 1561 } else 1562 t[n] = e[n]; 1563 return t; 1564}, kr = z.createContext(null); 1565kr.displayName = "HookFormContext"; 1566const fi = () => z.useContext(kr), Ua = ({ children: e, watch: t, getValues: n, getFieldState: r, setError: s, clearErrors: i, setValue: a, setValues: o, trigger: c, formState: u, resetField: d, reset: h, handleSubmit: g, unregister: y, control: v, register: b, setFocus: x, subscribe: j }) => { 1567 const _ = z.useMemo(() => ({ 1568 watch: t, 1569 getValues: n, 1570 getFieldState: r, 1571 setError: s, 1572 clearErrors: i, 1573 setValue: a, 1574 setValues: o, 1575 trigger: c, 1576 formState: u, 1577 resetField: d, 1578 reset: h, 1579 handleSubmit: g, 1580 unregister: y, 1581 control: v, 1582 register: b, 1583 setFocus: x, 1584 subscribe: j 1585 }), [ 1586 i, 1587 v, 1588 u, 1589 r, 1590 n, 1591 g, 1592 b, 1593 h, 1594 d, 1595 s, 1596 x, 1597 a, 1598 o, 1599 j, 1600 c, 1601 y, 1602 t 1603 ]); 1604 return z.createElement( 1605 kr.Provider, 1606 { value: _ }, 1607 z.createElement(xr.Provider, { value: _.control }, e) 1608 ); 1609}; 1610var jr = (e, t, n, r, s) => t ? { 1611 ...n[e], 1612 types: { 1613 ...n[e] && n[e].types ? n[e].types : {}, 1614 [r]: s || !0 1615 } 1616} : {}, hi = (e) => Array.isArray(e) ? e.filter(Boolean) : [], mn = (e) => Array.isArray(e) ? e : [e], Ur = () => { 1617 let e = []; 1618 return { 1619 get observers() { 1620 return e; 1621 }, 1622 next: (s) => { 1623 for (const i of e) 1624 i.next && i.next(s); 1625 }, 1626 subscribe: (s) => (e.push(s), { 1627 unsubscribe: () => { 1628 e = e.filter((i) => i !== s); 1629 } 1630 }), 1631 unsubscribe: () => { 1632 e = []; 1633 } 1634 }; 1635}; 1636function mi(e, t) { 1637 const n = {}; 1638 for (const r in e) 1639 if (e.hasOwnProperty(r)) { 1640 const s = e[r], i = t[r]; 1641 if (s && pe(s) && i) { 1642 const a = mi(s, i); 1643 pe(a) && (n[r] = a); 1644 } else e[r] && (n[r] = i); 1645 } 1646 return n; 1647} 1648var we = (e) => pe(e) && !Object.keys(e).length, Sr = (e) => e.type === "file", yn = (e) => { 1649 if (!Ln) 1650 return !1; 1651 const t = e ? e.ownerDocument : 0; 1652 return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement); 1653}, pi = (e) => e.type === "select-multiple", Er = (e) => e.type === "radio", za = (e) => Er(e) || Qt(e), Dn = (e) => yn(e) && e.isConnected; 1654function Ga(e, t) { 1655 const n = t.slice(0, -1).length; 1656 let r = 0; 1657 for (; r < n; ) { 1658 if (ke(e)) { 1659 e = void 0; 1660 break; 1661 } 1662 e = e[t[r]], r++; 1663 } 1664 return e; 1665} 1666function Ya(e) { 1667 for (const t in e) 1668 if (e.hasOwnProperty(t) && !ue(e[t])) 1669 return !1; 1670 return !0; 1671} 1672function ve(e, t) { 1673 if (Te(t) && Object.prototype.hasOwnProperty.call(e, t)) 1674 return delete e[t], e; 1675 const n = Array.isArray(t) ? t : en(t) ? [t] : Vn(t); 1676 if (n.some((a) => _r.includes(String(a)))) 1677 return e; 1678 const r = n.length === 1 ? e : Ga(e, n), s = n.length - 1, i = n[s]; 1679 return r && delete r[i], s !== 0 && (pe(r) && we(r) || Array.isArray(r) && Ya(r)) && ve(e, n.slice(0, -1)), e; 1680} 1681var Xa = (e) => { 1682 for (const t in e) 1683 if (Ne(e[t])) 1684 return !0; 1685 return !1; 1686}; 1687function gi(e) { 1688 return Array.isArray(e) || pe(e) && !Xa(e); 1689} 1690function qn(e, t = {}) { 1691 for (const n in e) { 1692 const r = e[n]; 1693 gi(r) ? (t[n] = Array.isArray(r) ? [] : {}, qn(r, t[n])) : ue(r) || (t[n] = !0); 1694 } 1695 return t; 1696} 1697function Kn(e) { 1698 if (e !== !1) { 1699 if (e === !0) 1700 return !0; 1701 if (Array.isArray(e)) { 1702 const t = e.map((n) => Kn(n)); 1703 return t.some((n) => n !== void 0) ? t : void 0; 1704 } 1705 if (pe(e)) { 1706 const t = {}; 1707 for (const n in e) { 1708 const r = Kn(e[n]); 1709 ue(r) || (t[n] = r); 1710 } 1711 return Object.keys(t).length ? t : void 0; 1712 } 1713 } 1714} 1715function pt(e, t, n) { 1716 n || (n = qn(t)); 1717 for (const r in e) { 1718 const s = e[r]; 1719 if (gi(s)) 1720 ue(t) || Jn(n[r]) ? n[r] = qn(s, Array.isArray(s) ? [] : {}) : pt(s, ke(t) ? {} : t[r], n[r]); 1721 else { 1722 const i = t[r]; 1723 n[r] = !De(s, i); 1724 } 1725 } 1726 return Kn(n) || {}; 1727} 1728const zr = { 1729 value: !1, 1730 isValid: !1 1731}, Gr = { value: !0, isValid: !0 }; 1732var yi = (e) => { 1733 if (Array.isArray(e)) { 1734 if (e.length > 1) { 1735 const t = e.filter((n) => n && n.checked && !n.disabled).map((n) => n.value); 1736 return { value: t, isValid: !!t.length }; 1737 } 1738 return e[0].checked && !e[0].disabled ? ( 1739 // @ts-expect-error expected to work in the browser 1740 e[0].attributes && !ue(e[0].attributes.value) ? ue(e[0].value) || e[0].value === "" ? Gr : { value: e[0].value, isValid: !0 } : Gr 1741 ) : zr;
1742 } 1743 return zr; 1744}, vi = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => ue(e) ? e : t ? e === "" ? NaN : e && +e : n && Te(e) ? new Date(e) : r ? r(e) : e; 1745const Yr = { 1746 isValid: !1, 1747 value: null 1748}; 1749var bi = (e) => Array.isArray(e) ? e.reduce((t, n) => n && n.checked && !n.disabled ? { 1750 isValid: !0, 1751 value: n.value 1752} : t, Yr) : Yr; 1753function Xr(e) { 1754 const t = e.ref; 1755 return Sr(t) ? t.files : Er(t) ? bi(e.refs).value : pi(t) ? [...t.selectedOptions].map(({ value: n }) => n) : Qt(t) ? yi(e.refs).value : vi(ue(t.value) ? e.ref.value : t.value, e); 1756} 1757var Ja = (e, t, n, r) => { 1758 const s = {}; 1759 for (const i of e) { 1760 const a = L(t, i); 1761 a && ae(s, i, a._f); 1762 } 1763 return { 1764 criteriaMode: n, 1765 names: [...e], 1766 fields: s, 1767 shouldUseNativeValidation: r 1768 }; 1769}, vn = (e) => e instanceof RegExp, Ft = (e) => ue(e) ? e : vn(e) ? e.source : pe(e) ? vn(e.value) ? e.value.source : e.value : e, cn = (e) => ({ 1770 isOnSubmit: !e || e === Ge.onSubmit, 1771 isOnBlur: e === Ge.onBlur, 1772 isOnChange: e === Ge.onChange, 1773 isOnAll: e === Ge.all, 1774 isOnTouch: e === Ge.onTouched 1775}); 1776const Jr = "AsyncFunction"; 1777var qa = (e) => { 1778 if (!e || !e.validate) 1779 return !1; 1780 if (Ne(e.validate)) 1781 return e.validate.constructor.name === Jr; 1782 if (pe(e.validate)) { 1783 for (const t in e.validate) 1784 if (e.validate[t].constructor.name === Jr) 1785 return !0; 1786 } 1787 return !1; 1788}, Ka = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Fn = (e, t, n) => { 1789 if (n) 1790 return !1; 1791 if (t.watchAll || t.watch.has(e)) 1792 return !0; 1793 for (const r of t.watch) 1794 if (e.startsWith(r) && e.charAt(r.length) === ".") 1795 return !0; 1796 return !1; 1797}; 1798const Wt = (e, t, n, r) => { 1799 for (const s of n || Object.keys(e)) { 1800 const i = L(e, s); 1801 if (i) { 1802 const { _f: a, ...o } = i; 1803 if (a) { 1804 if (a.refs && a.refs[0] && t(a.refs[0], s) && !r) 1805 return !0; 1806 if (a.ref && t(a.ref, a.name) && !r) 1807 return !0; 1808 if (Wt(o, t)) 1809 break; 1810 } else if (pe(o) && Wt(o, t)) 1811 break; 1812 } 1813 } 1814}; 1815function qr(e, t, n) { 1816 const r = L(e, n); 1817 if (r || en(n)) 1818 return { 1819 error: r, 1820 name: n 1821 }; 1822 const s = n.split("."); 1823 for (; s.length; ) { 1824 const i = s.join("."), a = L(t, i), o = L(e, i); 1825 if (a && !Array.isArray(a) && n !== i) 1826 return { name: n }; 1827 if (o && o.type) 1828 return { 1829 name: i, 1830 error: o 1831 }; 1832 if (o && o.root && o.root.type) 1833 return { 1834 name: `${i}.root`, 1835 error: o.root 1836 }; 1837 s.pop(); 1838 } 1839 return { 1840 name: n 1841 }; 1842} 1843var Qa = (e, t, n, r) => { 1844 n(e); 1845 const { name: s, ...i } = e, a = Object.keys(i); 1846 return !a.length || r && a.length >= Object.keys(t).length || a.find((o) => t[o] === (!r || Ge.all)); 1847}, eo = (e, t, n) => !e || !t || e === t || mn(e).some((r) => r && (n ? r === t || r.startsWith(t + ".") : r.startsWith(t) || t.startsWith(r))), to = (e, t, n, r, s) => s.isOnAll ? !1 : !n && s.isOnTouch ? !(t || e) : (n ? r.isOnBlur : s.isOnBlur) ? !e : (n ? r.isOnChange : s.isOnChange) ? e : !0, no = (e, t) => !hi(L(e, t)).length && ve(e, t), Kr = (e, t, n) => { 1848 const r = L(e, n), s = Array.isArray(r) ? r : []; 1849 return ae(s, li, t[n]), ae(e, n, s), e; 1850}; 1851function Qr(e, t, n = "validate") { 1852 if (Te(e) || Array.isArray(e) && e.every(Te) || Pe(e) && !e) 1853 return { 1854 type: n, 1855 message: Te(e) ? e : "", 1856 ref: t 1857 }; 1858} 1859var _t = (e) => pe(e) && !vn(e) ? e : { 1860 value: e, 1861 message: "" 1862}, es = async (e, t, n, r, s, i) => { 1863 const { ref: a, refs: o, required: c, maxLength: u, minLength: d, min: h, max: g, pattern: y, validate: v, name: b, valueAsNumber: x, mount: j } = e._f, _ = L(n, b); 1864 if (!j || t.has(b)) 1865 return {}; 1866 const T = o ? o[0] : a, E = (U) => { 1867 if (s && T.reportValidity) { 1868 const N = Pe(U) ? "" : U || ""; 1869 o ? o.forEach((G) => G.setCustomValidity(N)) : T.setCustomValidity(N), T.reportValidity(); 1870 } 1871 }, O = {}, A = Er(a), W = Qt(a), B = A || W, q = (x || Sr(a)) && ue(a.value) && ue(_) || yn(a) && a.value === "" || _ === "" || Array.isArray(_) && !_.length, oe = jr.bind(null, b, r, O), fe = (U, N, G, re = Ue.maxLength, Z
vendor: 33,419 bytes, lines 1871-2862
1871= Ue.minLength) => { 1872 const H = U ? N : G; 1873 O[b] = { 1874 type: U ? re : Z, 1875 message: H, 1876 ref: a, 1877 ...oe(U ? re : Z, H) 1878 }; 1879 }; 1880 if (i ? !Array.isArray(_) || !_.length : c && (!B && (q || ke(_)) || Pe(_) && !_ || W && !yi(o).isValid || A && !bi(o).isValid)) { 1881 const { value: U, message: N } = Te(c) ? { value: !!c, message: c } : _t(c); 1882 if (U && (O[b] = { 1883 type: Ue.required, 1884 message: N, 1885 ref: T, 1886 ...oe(Ue.required, N) 1887 }, !r)) 1888 return E(N), O; 1889 } 1890 if (!q && (!ke(h) || !ke(g))) { 1891 let U, N; 1892 const G = _t(g), re = _t(h); 1893 if (!ke(_) && !isNaN(_)) { 1894 const Z = a.valueAsNumber || _ && +_; 1895 ke(G.value) || (U = Z > G.value), ke(re.value) || (N = Z < re.value); 1896 } else { 1897 const Z = a.valueAsDate || new Date(_), H = (Ce) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Ce), ce = a.type == "time", le = a.type == "week"; 1898 Te(G.value) && _ && (U = ce ? H(_) > H(G.value) : le ? _ > G.value : Z > new Date(G.value)), Te(re.value) && _ && (N = ce ? H(_) < H(re.value) : le ? _ < re.value : Z < new Date(re.value)); 1899 } 1900 if ((U || N) && (fe(!!U, G.message, re.message, Ue.max, Ue.min), !r)) 1901 return E(O[b].message), O; 1902 } 1903 if ((u || d) && !q && (Te(_) || i && Array.isArray(_))) { 1904 const U = _t(u), N = _t(d), G = !ke(U.value) && _.length > +U.value, re = !ke(N.value) && _.length < +N.value; 1905 if ((G || re) && (fe(G, U.message, N.message), !r)) 1906 return E(O[b].message), O; 1907 } 1908 if (y && !q && Te(_)) { 1909 const { value: U, message: N } = _t(y); 1910 if (vn(U) && !_.match(U) && (O[b] = { 1911 type: Ue.pattern, 1912 message: N, 1913 ref: a, 1914 ...oe(Ue.pattern, N) 1915 }, !r)) 1916 return E(N), O; 1917 } 1918 if (v) { 1919 if (Ne(v)) { 1920 const U = await v(_, n), N = Qr(U, T); 1921 if (N && (O[b] = { 1922 ...N, 1923 ...oe(Ue.validate, N.message) 1924 }, !r)) 1925 return E(N.message), O; 1926 } else if (pe(v)) { 1927 let U = {}; 1928 for (const N in v) { 1929 if (!we(U) && !r) 1930 break; 1931 const G = Qr(await v[N](_, n), T, N); 1932 G && (U = { 1933 ...G, 1934 ...oe(N, G.message) 1935 }, E(G.message), r && (O[b] = U)); 1936 } 1937 if (!we(U) && (O[b] = { 1938 ref: T, 1939 ...U 1940 }, !r)) 1941 return O; 1942 } 1943 } 1944 return E(!0), O; 1945}; 1946const ro = { 1947 mode: Ge.onSubmit, 1948 reValidateMode: Ge.onChange, 1949 shouldFocusError: !0 1950}, $n = "form", _i = { 1951 submitCount: 0, 1952 isDirty: !1, 1953 isReady: !1, 1954 isValidating: !1, 1955 isSubmitted: !1, 1956 isSubmitting: !1, 1957 isSubmitSuccessful: !1, 1958 isValid: !1, 1959 touchedFields: {}, 1960 dirtyFields: {}, 1961 validatingFields: {} 1962}; 1963function so(e = {}) { 1964 let t = { 1965 ...ro, 1966 ...e 1967 }, n = { 1968 ...ge(_i), 1969 isLoading: Ne(t.defaultValues), 1970 errors: t.errors || {}, 1971 disabled: t.disabled || !1 1972 }, r = {}, s = pe(t.defaultValues) || pe(t.values) ? ge(t.defaultValues || t.values) || {} : {}, i = t.shouldUnregister ? {} : ge(s), a = { 1973 action: !1, 1974 mount: !1, 1975 watch: !1, 1976 keepIsValid: !1 1977 }, o = { 1978 mount: /* @__PURE__ */ new Set(), 1979 disabled: /* @__PURE__ */ new Set(), 1980 unMount: /* @__PURE__ */ new Set(), 1981 array: /* @__PURE__ */ new Set(), 1982 watch: /* @__PURE__ */ new Set(), 1983 registerName: /* @__PURE__ */ new Set() 1984 }, c, u = 0, d = 0, h = cn(t.mode), g = cn(t.reValidateMode); 1985 const y = { 1986 isDirty: !1, 1987 dirtyFields: !1, 1988 validatingFields: !1, 1989 touchedFields: !1, 1990 isValidating: !1, 1991 isValid: !1, 1992 errors: !1 1993 }, v = { 1994 ...y 1995 }; 1996 let b = { 1997 ...v 1998 }; 1999 const x = { 2000 array: Ur(), 2001 state: Ur() 2002 }, j = t.criteriaMode === Ge.all, _ = (f) => (m) => { 2003 clearTimeout(u), u = setTimeout(f, m); 2004 }, T = async (f) => { 2005 if (!a.keepIsValid && !t.disabled && (v.isValid || b.isValid || f)) { 2006 let m; 2007 t.resolver ? (m = we((await N()).errors), E()) : m = await Z({ 2008 fields: r, 2009 onlyCheckValid: !0, 2010 eventType: at.VALID 2011 }), m !== n.isValid && x.state.next({ 2012 isValid: m 2013 }); 2014 } 2015 }, E = (f, m) => { 2016 !t.disabled && (v.isValidating || v.validatingFields || b.isValidating || b.validatingFields) && ((f || Array.from(o.mount)).forEach((p) => { 2017 p && (m ? ae(n.validatingFields, p, m) : ve(n.validatingFields, p)); 2018 }), x.state.next({ 2019 validatingFields: n.validatingFields, 2020 isValidating: !we(n.validatingFields) 2021 })); 2022 }, O = () => { 2023 n.dirtyFields = pt(s, i); 2024 }, A = (f, m = [], p, w, k = !0, M = !0) => { 2025 if (w && p && !t.disabled) { 2026 if (a.action = !0, M && Array.isArray(L(r, f))) { 2027 const V = p(L(r, f), w.argA, w.argB); 2028 k && ae(r, f, V); 2029 } 2030 if (M && Array.isArray(L(n.errors, f))) { 2031 const V = p(L(n.errors, f), w.argA, w.argB); 2032 k && ae(n.errors, f, V), no(n.errors, f); 2033 } 2034 if ((v.touchedFields || b.touchedFields) && M && Array.isArray(L(n.touchedFields, f))) { 2035 const V = p(L(n.touchedFields, f), w.argA, w.argB); 2036 k && ae(n.touchedFields, f, V); 2037 } 2038 (v.dirtyFields || b.dirtyFields) && O(), x.state.next({ 2039 name: f, 2040 isDirty: ce(f, m), 2041 dirtyFields: n.dirtyFields, 2042 errors: n.errors, 2043 isValid: n.isValid 2044 }); 2045 } else 2046 ae(i, f, m); 2047 }, W = (f, m) => { 2048 ae(n.errors, f, m), n.errors = { ...n.errors }, x.state.next({ 2049 errors: n.errors 2050 }); 2051 }, B = (f) => { 2052 n.errors = f, x.state.next({ 2053 errors: n.errors, 2054 isValid: !1 2055 }); 2056 }, q = (f) => { 2057 const m = en(f) ? [f] : Vn(f); 2058 let p = i, w = s; 2059 for (let k = 0; k < m.length - 1; k++) { 2060 const M = m[k]; 2061 if (p = ke(p) ? p : p[M], w = ke(w) ? w : w[M], p === null && w !== null) 2062 return !0; 2063 } 2064 return !1; 2065 }, oe = (f, m, p, w) => { 2066 const k = L(r, f); 2067 if (k) { 2068 if (q(f)) 2069 return; 2070 const M = ue(L(i, f)), V = L(i, f, ue(p) ? L(s, f) : p); 2071 ue(V) || w && w.defaultChecked || m ? ae(i, f, m ? V : Xr(k._f)) : ee(f, V), a.mount && !a.action && (T(), M && n.isDirty && (v.isDirty || b.isDirty) && (ce() || (n.isDirty = !1, x.state.next({ ...n }))), e.shouldUnregister && M && !ue(L(i, f)) && Fn(f, o) && (a.watch = !0)); 2072 } 2073 }, fe = (f, m, p, w, k) => { 2074 let M = !1, V = !1; 2075 const D = { 2076 name: f 2077 }; 2078 if (!t.disabled) { 2079 if (!p || w) { 2080 const Y = De(L(s, f), m); 2081 (v.isDirty || b.isDirty) && (V = n.isDirty, n.isDirty = D.isDirty = !Y || ce(), M = V !== D.isDirty), V = !!L(n.dirtyFields, f), Y !== n.isDirty ? n.dirtyFields = pt(s, i) : Y ? ve(n.dirtyFields, f) : ae(n.dirtyFields, f, !0), D.dirtyFields = n.dirtyFields, M = M || (v.dirtyFields || b.dirtyFields) && V !== !Y; 2082 } 2083 if (p) { 2084 const Y = L(n.touchedFields, f); 2085 Y || (ae(n.touchedFields, f, p), D.touchedFields = n.touchedFields, M = M || (v.touchedFields || b.touchedFields) && Y !== p); 2086 } 2087 M && k && x.state.next(D); 2088 } 2089 return M ? D : {}; 2090 }, U = (f, m, p, w) => { 2091 const k = L(n.errors, f), M = (v.isValid || b.isValid) && Pe(m) && n.isValid !== m; 2092 if (t.delayError && p ? (c = _(() => W(f, p)), c(t.delayError)) : (clearTimeout(u), c = null, p ? ae(n.errors, f, p) : ve(n.errors, f), n.errors = { ...n.errors }), (p ? !De(k, p) : k) || !we(w) || M) { 2093 const V = { 2094 ...w, 2095 ...M && Pe(m) ? { isValid: m } : {}, 2096 errors: n.errors, 2097 name: f 2098 }; 2099 n = { 2100 ...n, 2101 ...V 2102 }, x.state.next(V); 2103 } 2104 }, N = async (f) => (E(f, !0), await t.resolver(i, t.context, Ja(f || o.mount, r, t.criteriaMode, t.shouldUseNativeValidation))), G = async (f) => { 2105 const { errors: m } = await N(f); 2106 if (E(f), f) { 2107 for (const p of f) { 2108 const w = L(m, p); 2109 w ? o.array.has(p) && pe(w) && !Object.keys(w).some((k) => !Number.isNaN(Number(k))) ? Kr(n.errors, { [p]: w }, p) : ae(n.errors, p, w) : ve(n.errors, p); 2110 } 2111 n.errors = { ...n.errors }; 2112 } else 2113 n.errors = m; 2114 return m; 2115 }, re = async ({ name: f, eventType: m }) => { 2116 if (e.validate) { 2117 const p = await e.validate({ 2118 formValues: i, 2119 formState: n, 2120 name: f, 2121 eventType: m 2122 }); 2123 if (pe(p)) 2124 for (const w in p) { 2125 const k = p[w]; 2126 k && ye(`${$n}.${w}`, { 2127 message: Te(k.message) ? k.message : "", 2128 type: k.type || Ue.validate 2129 }); 2130 } 2131 else Te(p) || !p ? ye($n, { 2132 message: p || "", 2133 type: Ue.validate 2134 }) : Q($n); 2135 return p; 2136 } 2137 return !0; 2138 }, Z = async ({ fields: f, onlyCheckValid: m, name: p, eventType: w, context: k = { 2139 valid: !0, 2140 runRootValidation: !1 2141 } }) => { 2142 if (e.validate && (k.runRootValidation = !0, !await re({ 2143 name: p, 2144 eventType: w 2145 }) && (k.valid = !1, m))) 2146 return k.valid; 2147 for (const M in f) { 2148 const V = f[M]; 2149 if (V) { 2150 const { _f: D, ...Y } = V; 2151 if (D) { 2152 const he = o.array.has(D.name), Me = V._f && qa(V._f), bt = v.validatingFields || v.isValidating || b.validatingFields || b.isValidating; 2153 Me && bt && E([D.name], !0); 2154 const Ke = await es(V, o.disabled, i, j, t.shouldUseNativeValidation && !m, he); 2155 if (Me && bt && E([D.name]), Ke[D.name] && (k.valid = !1, m) || (!m && (L(Ke, D.name) ? he ? Kr(n.errors, Ke, D.name) : ae(n.errors, D.name, Ke[D.name]) : ve(n.errors, D.name)), e.shouldUseNativeValidation && Ke[D.name])) 2156 break; 2157 } 2158 !we(Y) && await Z({ 2159 context: k, 2160 onlyCheckValid: m, 2161 fields: Y, 2162 name: M, 2163 eventType: w 2164 }); 2165 } 2166 } 2167 return k.valid; 2168 }, H = () => { 2169 for (const f of o.unMount) { 2170 const m = L(r, f); 2171 m && (m._f.refs ? m._f.refs.every((p) => !Dn(p)) : !Dn(m._f.ref)) && _e(f); 2172 } 2173 o.unMount = /* @__PURE__ */ new Set(); 2174 }, ce = (f, m) => !t.disabled && (f && m && ae(i, f, m), !De(a.mount ? i : s, s)), le = (f, m, p) => Xn(f, o, { 2175 ...a.mount ? i : ue(m) ? s : Te(f) ? { [f]: m } : m 2176 }, p, m), Ce = (f) => hi(L(a.mount ? i : s, f, t.shouldUnregister ? L(s, f, []) : [])), ee = (f, m, p = {}, w = !1, k = !1) => { 2177 const M = L(r, f); 2178 let V = m; 2179 if (M) { 2180 const D = M._f; 2181 D && (!D.disabled && ae(i, f, vi(m, D)), V = yn(D.ref) && ke(m) ? "" : m, pi(D.ref) ? [...D.ref.options].forEach((Y) => Y.selected = V.includes(Y.value)) : D.refs ? Qt(D.ref) ? D.refs.forEach((Y) => { 2182 (!Y.defaultChecked || !Y.disabled) && (Array.isArray(V) ? Y.checked = !!V.find((he) => he === Y.value) : Y.checked = V === Y.value || !!V); 2183 }) : D.refs.forEach((Y) => Y.checked = Y.value === V) : Sr(D.ref) ? D.ref.value = "" : (D.ref.value = V, !D.ref.type && !k && x.state.next({ 2184 name: f, 2185 values: w ? i : ge(i) 2186 }))); 2187 } 2188 (p.shouldDirty || p.shouldTouch) && fe(f, V, p.shouldTouch, p.shouldDirty, !k), p.shouldValidate && He(f); 2189 }, je = (f, m, p, w = !1, k = !1) => { 2190 for (const M in m) { 2191 if (!m.hasOwnProperty(M)) 2192 return; 2193 const V = m[M], D = f + "." + M, Y = L(r, D); 2194 (o.array.has(f) || pe(V) || Y && !Y._f) && !ct(V) ? je(D, V, p, w, k) : ee(D, V, p, w, k); 2195 } 2196 }, Oe = (f, m, p, w, k = !1) => { 2197 const M = L(r, f), V = o.array.has(f), D = w ? m : ge(m), Y = L(i, f), he = De(Y, D); 2198 if (he || ae(i, f, D), V) 2199 x.array.next({ 2200 name: f, 2201 values: w ? i : ge(i) 2202 }), (v.isDirty || v.dirtyFields || b.isDirty || b.dirtyFields) && p.shouldDirty && (O(), k || x.state.next({ 2203 name: f, 2204 dirtyFields: n.dirtyFields, 2205 isDirty: ce(f, D) 2206 })); 2207 else { 2208 const Me = Array.isArray(D) && !D.length || we(D); 2209 !M || M._f || ke(D) || Me ? ee(f, D, p, w, k) : je(f, D, p, w, k); 2210 } 2211 if (!he && !k) { 2212 const Me = Fn(f, o), bt = w ? i : ge(i); 2213 x.state.next({ 2214 ...Me && n, 2215 name: a.mount || Me ? f : void 0, 2216 values: bt 2217 }); 2218 } 2219 }, qe = (f, m, p = {}) => Oe(f, m, p, !1), tt = (f, m = {}) => { 2220 const p = Ne(f) ? f(i) : f; 2221 if (!De(i, p)) { 2222 i = { 2223 ...i, 2224 ...p 2225 }; 2226 const w = di(p); 2227 for (const k of o.mount) 2228 k in w && Oe(k, w[k], m, !0, !0); 2229 x.state.next({ 2230 ...n, 2231 name: void 0, 2232 type: void 0, 2233 ...d ? { values: i } : {} 2234 }), m.shouldValidate && T(); 2235 } 2236 }, ht = async (f) => { 2237 a.mount = !0; 2238 const m = f.target; 2239 let p = m.name, w = !0; 2240 const k = L(r, p), M = (V) => { 2241 w = Number.isNaN(V) || ct(V) && isNaN(V.getTime()) || De(V, L(i, p, V)); 2242 }; 2243 if (k) { 2244 let V, D; 2245 const Y = m.type ? Xr(k._f) : Yn(f), he = f.type === at.BLUR || f.type === at.FOCUS_OUT, Me = !Ka(k._f) && !e.validate && !t.resolver && !L(n.errors, p) && !k._f.deps, bt = Me || to(he, L(n.touchedFields, p), n.isSubmitted, g, h), Ke = Fn(p, o, he); 2246 ae(i, p, Y), he ? (!m || !m.readOnly) && (k._f.onBlur && k._f.onBlur(f), c && c(0)) : k._f.onChange && k._f.onChange(f); 2247 const Pt = fe(p, Y, he), da = !we(Pt) || Ke; 2248 if (!he && x.state.next({ 2249 name: p, 2250 type: f.type, 2251 ...d ? { values: ge(i) } : {} 2252 }), bt) 2253 return (!Me || !n.isValid) && (v.isValid || b.isValid) && (t.mode === "onBlur" ? he && T() : he || T()), da && x.state.next({ name: p, ...Ke ? {} : Pt }); 2254 if (!t.resolver && e.validate && await re({ 2255 name: p, 2256 eventType: f.type 2257 }), !he && Ke && x.state.next({ ...n }), t.resolver) { 2258 const { errors: Pr } = await N([p]); 2259 if (E([p]), M(Y), !w) { 2260 !we(Pt) && x.state.next(Pt); 2261 return; 2262 } 2263 const fa = qr(n.errors, r, p), Dr = qr(Pr, r, fa.name || p); 2264 V = Dr.error, p = Dr.name, D = we(Pr); 2265 } else 2266 E([p], !0), V = (await es(k, o.disabled, i, j, t.shouldUseNativeValidation))[p], E([p]), M(Y), w && (V ? D = !1 : (v.isValid || b.isValid) && (D = await Z({ 2267 fields: r, 2268 onlyCheckValid: !0, 2269 name: p, 2270 eventType: f.type 2271 }))); 2272 w && (k._f.deps && (!Array.isArray(k._f.deps) || k._f.deps.length > 0) && He(k._f.deps), U(p, D, V, Pt)); 2273 } 2274 }, Ze = (f, m) => { 2275 if (L(n.errors, m) && f.focus) 2276 return f.focus(), 1; 2277 }, He = async (f, m = {}) => { 2278 let p, w; 2279 const k = mn(f); 2280 if (t.resolver) { 2281 const M = await G(ue(f) ? f : k); 2282 p = we(M), w = f ? !k.some((V) => L(M, V)) : p; 2283 } else f ? (w = (await Promise.all(k.map(async (M) => { 2284 const V = L(r, M); 2285 return await Z({ 2286 fields: V && V._f ? { [M]: V } : V, 2287 eventType: at.TRIGGER 2288 }); 2289 }))).every(Boolean), !(!w && !n.isValid) && T()) : w = p = await Z({ 2290 fields: r, 2291 name: f, 2292 eventType: at.TRIGGER 2293 }); 2294 return x.state.next({ 2295 ...!Te(f) || (v.isValid || b.isValid) && p !== n.isValid ? {} : { name: f }, 2296 ...t.resolver || !f ? { isValid: p } : {}, 2297 errors: n.errors 2298 }), m.shouldFocus && !w && Wt(r, Ze, f ? k : o.mount), w; 2299 }, vt = (f, m) => { 2300 let p = { 2301 ...a.mount ? i : s 2302 }; 2303 return m && (p = mi(m.dirtyFields ? n.dirtyFields : n.touchedFields, p)), ue(f) ? p : Te(f) ? L(p, f) : f.map((w) => L(p, w)); 2304 }, R = (f, m) => ({ 2305 invalid: !!L((m || n).errors, f), 2306 isDirty: !!L((m || n).dirtyFields, f), 2307 error: L((m || n).errors, f), 2308 isValidating: !!L(n.validatingFields, f), 2309 isTouched: !!L((m || n).touchedFields, f) 2310 }), Q = (f) => { 2311 const m = f ? mn(f) : void 0; 2312 m == null || m.forEach((p) => ve(n.errors, p)), m ? m.forEach((p) => { 2313 x.state.next({ 2314 name: p, 2315 errors: n.errors 2316 }); 2317 }) : x.state.next({ 2318 errors: {} 2319 }); 2320 }, ye = (f, m, p) => { 2321 const w = (L(r, f, { _f: {} })._f || {}).ref, k = L(n.errors, f) || {}, { ref: M, message: V, type: D, ...Y } = k; 2322 ae(n.errors, f, { 2323 ...Y, 2324 ...m, 2325 ref: w 2326 }), x.state.next({ 2327 name: f, 2328 errors: n.errors, 2329 isValid: !1 2330 }), p && p.shouldFocus && w && w.focus && w.focus(); 2331 }, Ae = (f, m) => { 2332 if (Ne(f)) { 2333 d++; 2334 const { unsubscribe: p } = x.state.subscribe({ 2335 next: (k) => "values" in k && f(k.values || le(void 0, m), k) 2336 }); 2337 let w = !1; 2338 return { 2339 unsubscribe: () => { 2340 w || (w = !0, d--, p()); 2341 } 2342 }; 2343 } 2344 return le(f, m, !0); 2345 }, Xe = (f) => { 2346 var m; 2347 const p = !!(!((m = f.formState) === null || m === void 0) && m.values); 2348 p && d++; 2349 const { unsubscribe: w } = x.state.subscribe({ 2350 next: (M) => { 2351 if (eo(f.name, M.name, f.exact) && Qa(M, f.formState || v, ua, f.reRenderRoot)) { 2352 const V = { ...i }; 2353 f.callback({ 2354 values: V, 2355 ...n, 2356 ...M, 2357 defaultValues: s 2358 }); 2359 } 2360 } 2361 }); 2362 if (!p) 2363 return w; 2364 let k = !1; 2365 return () => { 2366 k || (k = !0, d--, w()); 2367 }; 2368 }, nt = (f) => (a.mount = !0, b = { 2369 ...b, 2370 ...f.formState 2371 }, Xe({ 2372 ...f, 2373 formState: { 2374 ...y, 2375 ...f.formState 2376 } 2377 })), _e = (f, m = {}) => { 2378 for (const p of f ? mn(f) : o.mount) 2379 o.mount.delete(p), o.array.delete(p), m.keepValue || (ve(r, p), ve(i, p)), !m.keepError && ve(n.errors, p), !m.keepDirty && ve(n.dirtyFields, p), !m.keepTouched && ve(n.touchedFields, p), !m.keepIsValidating && ve(n.validatingFields, p), !t.shouldUnregister && !m.keepDefaultValue && ve(s, p); 2380 x.state.next({ 2381 values: ge(i) 2382 }), x.state.next({ 2383 ...n, 2384 ...m.keepDirty ? { isDirty: ce() } : {} 2385 }), !m.keepIsValid && T(); 2386 }, rt = ({ disabled: f, name: m }) => { 2387 if (Pe(f) && a.mount || f || o.disabled.has(m)) { 2388 const k = o.disabled.has(m) !== !!f; 2389 f ? o.disabled.add(m) : o.disabled.delete(m), k && a.mount && !a.action && T(); 2390 } 2391 }, Mt = (f, m = {}) => { 2392 let p = L(r, f); 2393 const w = Pe(m.disabled) || Pe(t.disabled), k = !o.registerName.has(f) && p && p._f && !p._f.mount; 2394 return ae(r, f, { 2395 ...p || {}, 2396 _f: { 2397 ...p && p._f ? p._f : { ref: { name: f } }, 2398 name: f, 2399 mount: !0, 2400 ...m 2401 } 2402 }), o.mount.add(f), p && !k ? rt({ 2403 disabled: Pe(m.disabled) ? m.disabled : t.disabled, 2404 name: f 2405 }) : oe(f, !0, m.value), { 2406 ...w ? { disabled: m.disabled || t.disabled } : {}, 2407 ...t.progressive ? { 2408 required: !!m.required, 2409 min: Ft(m.min), 2410 max: Ft(m.max), 2411 minLength: Ft(m.minLength), 2412 maxLength: Ft(m.maxLength), 2413 pattern: Ft(m.pattern) 2414 } : {}, 2415 name: f, 2416 onChange: ht, 2417 onBlur: ht, 2418 ref: (M) => { 2419 if (M) { 2420 o.registerName.add(f), Mt(f, m), o.registerName.delete(f), p = L(r, f); 2421 const V = ue(M.value) && M.querySelectorAll && M.querySelectorAll("input,select,textarea")[0] || M, D = za(V), Y = p._f.refs || []; 2422 if (D ? Y.find((he) => he === V) : V === p._f.ref) 2423 return; 2424 ae(r, f, { 2425 _f: { 2426 ...p._f, 2427 ...D ? { 2428 refs: [ 2429 ...Y.filter(Dn), 2430 V, 2431 ...Array.isArray(L(s, f)) ? [{}] : [] 2432 ], 2433 ref: { type: V.type, name: f } 2434 } : { ref: V } 2435 } 2436 }), oe(f, !1, void 0, V); 2437 } else 2438 p = L(r, f, {}), p._f && (p._f.mount = !1), (t.shouldUnregister || m.shouldUnregister) && !(oi(o.array, f) && a.action) && o.unMount.add(f); 2439 } 2440 }; 2441 }, It = () => t.shouldFocusError && !t.shouldUseNativeValidation && Wt(r, Ze, o.mount), sn = (f) => { 2442 Pe(f) && (x.state.next({ disabled: f }), Wt(r, (m, p) => { 2443 const w = L(r, p); 2444 w && (m.disabled = w._f.disabled || f, Array.isArray(w._f.refs) && w._f.refs.forEach((k) => { 2445 k.disabled = w._f.disabled || f; 2446 })); 2447 }, 0, !1)); 2448 }, Rr = (f, m) => async (p) => { 2449 let w; 2450 p && (p.preventDefault && p.preventDefault(), p.persist && p.persist()); 2451 let k = ge(i); 2452 if (x.state.next({ 2453 isSubmitting: !0 2454 }), t.resolver) { 2455 const { errors: M, values: V } = await N(); 2456 E(), n.errors = M, k = ge(V); 2457 } else 2458 await Z({ 2459 fields: r, 2460 eventType: at.SUBMIT 2461 }); 2462 if (o.disabled.size) 2463 for (const M of o.disabled) 2464 ve(k, M); 2465 if (ve(n.errors, li), we(n.errors)) { 2466 x.state.next({ 2467 errors: {} 2468 }); 2469 try { 2470 await f(k, p); 2471 } catch (M) { 2472 w = M; 2473 } 2474 } else 2475 m && await m({ ...n.errors }, p), It(), setTimeout(It); 2476 if (x.state.next({ 2477 isSubmitted: !0, 2478 isSubmitting: !1, 2479 isSubmitSuccessful: we(n.errors) && !w, 2480 submitCount: n.submitCount + 1, 2481 errors: n.errors 2482 }), w) 2483 throw w; 2484 }, ca = (f, m = {}) => { 2485 L(r, f) && (ue(m.defaultValue) ? qe(f, ge(L(s, f))) : (qe(f, m.defaultValue), ae(s, f, ge(m.defaultValue))), m.keepTouched || ve(n.touchedFields, f), m.keepDirty || (ve(n.dirtyFields, f), n.isDirty = m.defaultValue ? ce(f, ge(L(s, f))) : ce()), m.keepError || (ve(n.errors, f), v.isValid && T()), x.state.next({ ...n })); 2486 }, Ar = (f, m = {}) => { 2487 const p = f ? ge(f) : s, w = ge(p), k = we(f), M = w; 2488 if (m.keepDefaultValues || (s = p), !m.keepValues) { 2489 if (m.keepDirtyValues) { 2490 const V = /* @__PURE__ */ new Set([ 2491 ...o.mount, 2492 ...Object.keys(pt(s, i)) 2493 ]); 2494 for (const D of Array.from(V)) { 2495 const Y = L(n.dirtyFields, D), he = L(i, D), Me = L(M, D); 2496 Y && !ue(he) ? ae(M, D, he) : !Y && !ue(Me) && qe(D, Me); 2497 } 2498 } else { 2499 if (Ln && ue(f)) 2500 for (const V of o.mount) { 2501 const D = L(r, V); 2502 if (D && D._f) { 2503 const Y = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref; 2504 if (yn(Y)) { 2505 const he = Y.closest("form"); 2506 if (he) { 2507 he.reset(); 2508 break; 2509 } 2510 } 2511 } 2512 } 2513 if (m.keepFieldsRef) 2514 for (const V of o.mount) 2515 qe(V, L(M, V)); 2516 else 2517 r = {}; 2518 } 2519 if (t.shouldUnregister) { 2520 if (i = m.keepDefaultValues ? ge(s) : {}, m.keepFieldsRef) 2521 for (const V of o.mount) 2522 ae(i, V, L(M, V)); 2523 } else 2524 i = ge(M); 2525 x.array.next({ 2526 values: { ...M } 2527 }), x.state.next({ 2528 name: void 0, 2529 type: void 0, 2530 values: { ...M } 2531 }); 2532 } 2533 o = { 2534 mount: m.keepDirtyValues ? o.mount : /* @__PURE__ */ new Set(), 2535 unMount: /* @__PURE__ */ new Set(), 2536 array: /* @__PURE__ */ new Set(), 2537 registerName: /* @__PURE__ */ new Set(), 2538 disabled: /* @__PURE__ */ new Set(), 2539 watch: /* @__PURE__ */ new Set(), 2540 watchAll: !1, 2541 focus: "" 2542 }, a.mount = !v.isValid || !!m.keepIsValid || !!m.keepDirtyValues || !t.shouldUnregister && !we(M), a.watch = !!t.shouldUnregister, a.keepIsValid = !!m.keepIsValid, a.action = !1, m.keepErrors || (n.errors = {}), x.state.next({ 2543 submitCount: m.keepSubmitCount ? n.submitCount : 0, 2544 isDirty: k ? !1 : m.keepDirty ? n.isDirty : m.keepValues ? ce() : !!(m.keepDefaultValues && !De(f, s)), 2545 isSubmitted: m.keepIsSubmitted ? n.isSubmitted : !1, 2546 dirtyFields: k ? {} : m.keepDirtyValues ? m.keepDefaultValues && i ? pt(s, i) : n.dirtyFields : m.keepDefaultValues && f ? pt(s, f) : m.keepDirty ? n.dirtyFields : {}, 2547 touchedFields: m.keepTouched ? n.touchedFields : {}, 2548 errors: m.keepErrors ? n.errors : {}, 2549 isSubmitSuccessful: m.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1, 2550 isSubmitting: !1, 2551 defaultValues: s 2552 }); 2553 }, Mr = (f, m) => Ar(Ne(f) ? f(i) : f, { ...t.resetOptions, ...m }), la = (f, m = {}) => { 2554 const p = L(r, f), w = p && p._f; 2555 if (w) { 2556 const k = w.refs ? w.refs[0] : w.ref; 2557 k.focus && setTimeout(() => { 2558 k.focus(), m.shouldSelect && Ne(k.select) && k.select(); 2559 }); 2560 } 2561 }, ua = (f) => { 2562 const { name: m, type: p, values: w, ...k } = f; 2563 n = { 2564 ...n, 2565 ...k 2566 }; 2567 }, Ir = { 2568 control: { 2569 register: Mt, 2570 unregister: _e, 2571 getFieldState: R, 2572 handleSubmit: Rr, 2573 setError: ye, 2574 _subscribe: Xe, 2575 _runSchema: N, 2576 _updateIsValidating: E, 2577 _focusError: It, 2578 _getWatch: le, 2579 _getDirty: ce, 2580 _setValid: T, 2581 _setFieldArray: A, 2582 _setDisabledField: rt, 2583 _setErrors: B, 2584 _getFieldArray: Ce, 2585 _reset: Ar, 2586 _resetDefaultValues: () => Ne(t.defaultValues) && t.defaultValues().then((f) => { 2587 Mr(f, t.resetOptions), x.state.next({ 2588 isLoading: !1 2589 }); 2590 }), 2591 _removeUnmounted: H, 2592 _disableForm: sn, 2593 _subjects: x, 2594 _proxyFormState: v, 2595 get _fields() { 2596 return r; 2597 }, 2598 get _formValues() { 2599 return i; 2600 }, 2601 get _state() { 2602 return a; 2603 }, 2604 set _state(f) { 2605 a = f; 2606 }, 2607 get _defaultValues() { 2608 return s; 2609 }, 2610 get _names() { 2611 return o; 2612 }, 2613 set _names(f) { 2614 o = f; 2615 }, 2616 get _formState() { 2617 return n; 2618 }, 2619 get _options() { 2620 return t; 2621 }, 2622 set _options(f) { 2623 t = { 2624 ...t, 2625 ...f 2626 }, h = cn(t.mode), g = cn(t.reValidateMode); 2627 } 2628 }, 2629 subscribe: nt, 2630 trigger: He, 2631 register: Mt, 2632 handleSubmit: Rr, 2633 watch: Ae, 2634 setValue: qe, 2635 setValues: tt, 2636 getValues: vt, 2637 reset: Mr, 2638 resetField: ca, 2639 resetDefaultValues: (f, m = {}) => { 2640 if (s = ge(f), !m.keepDirty) { 2641 const p = pt(s, i); 2642 n.dirtyFields = p, n.isDirty = !we(p); 2643 } 2644 m.keepIsValid || T(), x.state.next({ 2645 ...n, 2646 defaultValues: s 2647 }); 2648 }, 2649 clearErrors: Q, 2650 unregister: _e, 2651 setError: ye, 2652 setFocus: la, 2653 getFieldState: R 2654 }; 2655 return { 2656 ...Ir, 2657 formControl: Ir 2658 }; 2659} 2660function io(e = {}) { 2661 const t = z.useRef(void 0), n = z.useRef(void 0), r = z.useRef(e.formControl), [s, i] = z.useState(() => ({ 2662 ...ge(_i), 2663 isLoading: Ne(e.defaultValues), 2664 errors: e.errors || {}, 2665 disabled: e.disabled || !1, 2666 defaultValues: Ne(e.defaultValues) ? void 0 : e.defaultValues 2667 })); 2668 if (!t.current || e.formControl && r.current !== e.formControl) 2669 if (r.current = e.formControl, e.formControl) 2670 t.current = { 2671 ...e.formControl, 2672 formState: s 2673 }, e.defaultValues && !Ne(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions); 2674 else { 2675 const { formControl: o, ...c } = so(e); 2676 t.current = { 2677 ...c, 2678 formState: s 2679 }; 2680 } 2681 const a = t.current.control; 2682 return a._options = e, wr(() => { 2683 const o = a._subscribe({ 2684 formState: a._proxyFormState, 2685 callback: () => i({ 2686 ...a._formState, 2687 defaultValues: a._defaultValues 2688 }), 2689 reRenderRoot: !0 2690 }); 2691 return i((c) => ({ 2692 ...c, 2693 isReady: !0 2694 })), a._formState.isReady = !0, o; 2695 }, [a]), z.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), z.useEffect(() => { 2696 e.mode && (a._options.mode = e.mode), e.reValidateMode && (a._options.reValidateMode = e.reValidateMode); 2697 }, [a, e.mode, e.reValidateMode]), z.useEffect(() => { 2698 e.errors && (a._setErrors(e.errors), a._focusError()); 2699 }, [a, e.errors]), z.useEffect(() => { 2700 e.shouldUnregister && a._subjects.state.next({ 2701 values: a._getWatch() 2702 }); 2703 }, [a, e.shouldUnregister]), z.useEffect(() => { 2704 if (a._proxyFormState.isDirty) { 2705 const o = a._getDirty(); 2706 o !== s.isDirty && a._subjects.state.next({ 2707 isDirty: o 2708 }); 2709 } 2710 }, [a, s.isDirty]), z.useEffect(() => { 2711 var o; 2712 e.values && !De(e.values, n.current) ? (a._reset(e.values, { 2713 keepFieldsRef: !0, 2714 ...a._options.resetOptions 2715 }), !((o = a._options.resetOptions) === null || o === void 0) && o.keepIsValid || a._setValid(), n.current = e.values, i((c) => ({ ...c }))) : a._resetDefaultValues(); 2716 }, [a, e.values]), z.useEffect(() => { 2717 a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted(); 2718 }), t.current.formState = z.useMemo(() => ui(s, a), [a, s]), t.current; 2719} 2720const ts = (e, t, n) => { 2721 if (e && "reportValidity" in e) { 2722 const r = L(n, t); 2723 e.setCustomValidity(r && r.message || ""), e.reportValidity(); 2724 } 2725}, Qn = (e, t) => { 2726 for (const n in t.fields) { 2727 const r = t.fields[n]; 2728 r && r.ref && "reportValidity" in r.ref ? ts(r.ref, n, e) : r && r.refs && r.refs.forEach((s) => ts(s, n, e)); 2729 } 2730}, ns = (e, t) => { 2731 t.shouldUseNativeValidation && Qn(e, t); 2732 const n = {}; 2733 for (const r in e) { 2734 const s = L(t.fields, r), i = Object.assign(e[r] || {}, { ref: s && s.ref }); 2735 if (ao(t.names || Object.keys(e), r)) { 2736 const a = Object.assign({}, L(n, r)); 2737 ae(a, "root", i), ae(n, r, a); 2738 } else ae(n, r, i); 2739 } 2740 return n; 2741}, ao = (e, t) => { 2742 const n = rs(t).replace(/[.*+?^${}()|\\]/g, "\\$&"); 2743 return e.some((r) => rs(r).match(`^${n}\\.\\d+`)); 2744}; 2745function rs(e) { 2746 return e.replace(/[\[\]]/g, ""); 2747} 2748function xi(e, t, n) { 2749 function r(o, c) { 2750 var u; 2751 Object.defineProperty(o, "_zod", { 2752 value: o._zod ?? {}, 2753 enumerable: !1 2754 }), (u = o._zod).traits ?? (u.traits = /* @__PURE__ */ new Set()), o._zod.traits.add(e), t(o, c); 2755 for (const d in a.prototype) 2756 d in o || Object.defineProperty(o, d, { value: a.prototype[d].bind(o) }); 2757 o._zod.constr = a, o._zod.def = c; 2758 } 2759 const s = (n == null ? void 0 : n.Parent) ?? Object; 2760 class i extends s { 2761 } 2762 Object.defineProperty(i, "name", { value: e }); 2763 function a(o) { 2764 var c; 2765 const u = n != null && n.Parent ? new i() : this; 2766 r(u, o), (c = u._zod).deferred ?? (c.deferred = []); 2767 for (const d of u._zod.deferred) 2768 d(); 2769 return u; 2770 } 2771 return Object.defineProperty(a, "init", { value: r }), Object.defineProperty(a, Symbol.hasInstance, { 2772 value: (o) => { 2773 var c, u; 2774 return n != null && n.Parent && o instanceof n.Parent ? !0 : (u = (c = o == null ? void 0 : o._zod) == null ? void 0 : c.traits) == null ? void 0 : u.has(e); 2775 } 2776 }), Object.defineProperty(a, "name", { value: e }), a; 2777} 2778class oo extends Error { 2779 constructor() { 2780 super("Encountered Promise during synchronous parse. Use .parseAsync() instead."); 2781 } 2782} 2783const co = {}; 2784function Ci(e) { 2785 return co; 2786} 2787function lo(e, t) { 2788 return typeof t == "bigint" ? t.toString() : t; 2789} 2790const wi = Error.captureStackTrace ? Error.captureStackTrace : (...e) => { 2791}; 2792function ln(e) { 2793 return typeof e == "string" ? e : e == null ? void 0 : e.message; 2794} 2795function ki(e, t, n) { 2796 var s, i, a, o, c, u; 2797 const r = { ...e, path: e.path ?? [] }; 2798 if (!e.message) { 2799 const d = ln((a = (i = (s = e.inst) == null ? void 0 : s._zod.def) == null ? void 0 : i.error) == null ? void 0 : a.call(i, e)) ?? ln((o = t == null ? void 0 : t.error) == null ? void 0 : o.call(t, e)) ?? ln((c = n.customError) == null ? void 0 : c.call(n, e)) ?? ln((u = n.localeError) == null ? void 0 : u.call(n, e)) ?? "Invalid input"; 2800 r.message = d; 2801 } 2802 return delete r.inst, delete r.continue, t != null && t.reportInput || delete r.input, r; 2803} 2804const ji = (e, t) => { 2805 e.name = "$ZodError", Object.defineProperty(e, "_zod", { 2806 value: e._zod, 2807 enumerable: !1 2808 }), Object.defineProperty(e, "issues", { 2809 value: t, 2810 enumerable: !1 2811 }), Object.defineProperty(e, "message", { 2812 get() { 2813 return JSON.stringify(t, lo, 2); 2814 }, 2815 enumerable: !0 2816 // configurable: false, 2817 }), Object.defineProperty(e, "toString", { 2818 value: () => e.message, 2819 enumerable: !1 2820 }); 2821}, uo = xi("$ZodError", ji), Si = xi("$ZodError", ji, { Parent: Error }), fo = (e) => (t, n, r, s) => { 2822 const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i); 2823 if (a instanceof Promise) 2824 throw new oo(); 2825 if (a.issues.length) { 2826 const o = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((c) => ki(c, i, Ci()))); 2827 throw wi(o, s == null ? void 0 : s.callee), o; 2828 } 2829 return a.value; 2830}, ho = /* @__PURE__ */ fo(Si), mo = (e) => async (t, n, r, s) => { 2831 const i = r ? Object.assign(r, { async: !0 }) : { async: !0 }; 2832 let a = t._zod.run({ value: n, issues: [] }, i); 2833 if (a instanceof Promise && (a = await a), a.issues.length) { 2834 const o = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((c) => ki(c, i, Ci()))); 2835 throw wi(o, s == null ? void 0 : s.callee), o; 2836 } 2837 return a.value; 2838}, po = /* @__PURE__ */ mo(Si); 2839function er() { 2840 return er = Object.assign ? Object.assign.bind() : function(e) { 2841 for (var t = 1; t < arguments.length; t++) { 2842 var n = arguments[t]; 2843 for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); 2844 } 2845 return e; 2846 }, er.apply(null, arguments); 2847} 2848function ss(e, t) { 2849 try { 2850 var n = e(); 2851 } catch (r) { 2852 return t(r); 2853 } 2854 return n && n.then ? n.then(void 0, t) : n; 2855} 2856function go(e, t) { 2857 for (var n = {}; e.length; ) { 2858 var r = e[0], s = r.code, i = r.message, a = r.path.join("."); 2859 if (!n[a]) if ("unionErrors" in r) { 2860 var o = r.unionErrors[0].errors[0]; 2861 n[a] = { message: o.message, type: o.code }; 2862 } else n[a] = { message: i, type: s };
2863 if ("unionErrors" in r && r.unionErrors.forEach(function(d) { 2864 return d.errors.forEach(function(h) { 2865 return e.push(h); 2866 }); 2867 }), t) { 2868 var c = n[a].types, u = c && c[r.code]; 2869 n[a] = jr(a, t, n, s, u ? [].concat(u, r.message) : r.message); 2870 } 2871 e.shift(); 2872 } 2873 return n; 2874} 2875function yo(e, t) { 2876 for (var n = {}, r = function() { 2877 var s = e[0], i = s.code, a = s.message, o = s.path.join("."); 2878 if (!n[o]) if (s.code === "invalid_union" && s.errors.length > 0) { 2879 var c = s.errors[0][0]; 2880 n[o] = { message: c.message, type: c.code }; 2881 } else n[o] = { message: a, type: i }; 2882 if (s.code === "invalid_union" && s.errors.forEach(function(h) { 2883 return h.forEach(function(g) { 2884 return e.push(er({}, g, { path: [].concat(s.path, g.path) })); 2885 }); 2886 }), t) { 2887 var u = n[o].types, d = u && u[s.code]; 2888 n[o] = jr(o, t, n, i, d ? [].concat(d, s.message) : s.message); 2889 } 2890 e.shift(); 2891 }; e.length; ) r(); 2892 return n; 2893} 2894function vo(e, t, n) { 2895 if (n === void 0 && (n = {}), function(r) { 2896 return "_def" in r && typeof r._def == "object" && "typeName" in r._def; 2897 }(e)) return function(r, s, i) { 2898 try { 2899 return Promise.resolve(ss(function() { 2900 return Promise.resolve(e[n.mode === "sync" ? "parse" : "parseAsync"](r, t)).then(function(a) { 2901 return i.shouldUseNativeValidation && Qn({}, i), { errors: {}, values: n.raw ? Object.assign({}, r) : a }; 2902 }); 2903 }, function(a) { 2904 if (function(o) { 2905 return Array.isArray(o == null ? void 0 : o.issues); 2906 }(a)) return { values: {}, errors: ns(go(a.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) }; 2907 throw a; 2908 })); 2909 } catch (a) { 2910 return Promise.reject(a); 2911 } 2912 }; 2913 if (function(r) { 2914 return "_zod" in r && typeof r._zod == "object"; 2915 }(e)) return function(r, s, i) { 2916 try { 2917 return Promise.resolve(ss(function() { 2918 return Promise.resolve((n.mode === "sync" ? ho : po)(e, r, t)).then(function(a) { 2919 return i.shouldUseNativeValidation && Qn({}, i), { errors: {}, values: n.raw ? Object.assign({}, r) : a }; 2920 }); 2921 }, function(a) { 2922 if (function(o) { 2923 return o instanceof uo; 2924 }(a)) return { values: {}, errors: ns(yo(a.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) }; 2925 throw a; 2926 })); 2927 } catch (a) { 2928 return Promise.reject(a); 2929 } 2930 }; 2931 throw new Error("Invalid input: not a Zod schema"); 2932} 2933function is(e, t) { 2934 (t == null || t > e.length) && (t = e.length); 2935 for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n]; 2936 return r; 2937} 2938function bo(e, t, n) { 2939 return t = _n(t), function(r, s) { 2940 if (s && (typeof s == "object" || typeof s == "function")) return s; 2941 if (s !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); 2942 return function(i) { 2943 if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 2944 return i; 2945 }(r); 2946 }(e, Ti() ? Reflect.construct(t, n || [], _n(e).constructor) : t.apply(e, n)); 2947} 2948function _o(e, t) { 2949 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 2950} 2951function xo(e, t, n) { 2952 return Object.defineProperty(e, "prototype", { writable: !1 }), e; 2953} 2954function Ei(e, t) { 2955 var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; 2956 if (!n) { 2957 if (Array.isArray(e) || (n = function(c, u) { 2958 if (c) { 2959 if (typeof c == "string") return is(c, u); 2960 var d = {}.toString.call(c).slice(8, -1); 2961 return d === "Object" && c.constructor && (d = c.constructor.name), d === "Map" || d === "Set" ? Array.from(c) : d === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d) ? is(c, u) : void 0; 2962 } 2963 }(e)) || t) { 2964 n && (e = n); 2965 var r = 0, s = function() { 2966 }; 2967 return { s, n: function() { 2968 return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; 2969 }, e: function(c) { 2970 throw c; 2971 }, f: s }; 2972 } 2973 throw new TypeError(`Invalid attempt to iterate non-iterable instance. 2974In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); 2975 } 2976 var i, a = !0, o = !1; 2977 return { s: function() { 2978 n = n.call(e); 2979 }, n: function() { 2980 var c = n.next(); 2981 return a = c.done, c; 2982 }, e: function(c) { 2983 o = !0, i = c; 2984 }, f: function() { 2985 try { 2986 a || n.return == null || n.return(); 2987 } finally { 2988 if (o) throw i; 2989 } 2990 } }; 2991} 2992function Ni(e, t, n) { 2993 return (t = function(r) { 2994 var s = function(i, a) { 2995 if (typeof i != "object" || !i) return i; 2996 var o = i[Symbol.toPrimitive]; 2997 if (o !== void 0) { 2998 var c = o.call(i, a); 2999 if (typeof c != "object") return c; 3000 throw new TypeError("@@toPrimitive must return a primitive value."); 3001 } 3002 return (a === "string" ? String : Number)(i); 3003 }(r, "string"); 3004 return typeof s == "symbol" ? s : s + ""; 3005 }(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; 3006} 3007function bn() { 3008 return bn = Object.assign ? Object.assign.bind() : function(e) { 3009 for (var t = 1; t < arguments.length; t++) { 3010 var n = arguments[t]; 3011 for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); 3012 } 3013 return e; 3014 }, bn.apply(null, arguments); 3015} 3016function _n(e) { 3017 return _n = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { 3018 return t.__proto__ || Object.getPrototypeOf(t); 3019 }, _n(e); 3020} 3021function Co(e, t) { 3022 if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
3023 e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && tr(e, t); 3024} 3025function Ti() { 3026 try { 3027 var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { 3028 })); 3029 } catch { 3030 } 3031 return (Ti = function() { 3032 return !!e; 3033 })(); 3034} 3035function as(e, t) { 3036 var n = Object.keys(e); 3037 if (Object.getOwnPropertySymbols) { 3038 var r = Object.getOwnPropertySymbols(e); 3039 t && (r = r.filter(function(s) { 3040 return Object.getOwnPropertyDescriptor(e, s).enumerable; 3041 })), n.push.apply(n, r); 3042 } 3043 return n; 3044} 3045function un(e) { 3046 for (var t = 1; t < arguments.length; t++) { 3047 var n = arguments[t] != null ? arguments[t] : {}; 3048 t % 2 ? as(Object(n), !0).forEach(function(r) { 3049 Ni(e, r, n[r]); 3050 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : as(Object(n)).forEach(function(r) { 3051 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r)); 3052 }); 3053 } 3054 return e; 3055} 3056function Oi(e, t) { 3057 if (e == null) return {}; 3058 var n, r, s = function(a, o) { 3059 if (a == null) return {}; 3060 var c = {}; 3061 for (var u in a) if ({}.hasOwnProperty.call(a, u)) { 3062 if (o.includes(u)) continue; 3063 c[u] = a[u]; 3064 } 3065 return c; 3066 }(e, t); 3067 if (Object.getOwnPropertySymbols) { 3068 var i = Object.getOwnPropertySymbols(e); 3069 for (r = 0; r < i.length; r++) n = i[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]); 3070 } 3071 return s; 3072} 3073function tr(e, t) { 3074 return tr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { 3075 return n.__proto__ = r, n; 3076 }, tr(e, t); 3077} 3078function Ut(e, t) { 3079 var n, r = t.replacementChars, s = t.replacement, i = t.separate, a = r, o = "", c = Ei(e); 3080 try { 3081 for (c.s(); !(n = c.n()).done; ) { 3082 var u, d = n.value, h = !Object.prototype.hasOwnProperty.call(s, d) && ((u = s[a[0]]) === null || u === void 0 ? void 0 : u.test(d)); 3083 (i && d === a[0] || h) && (a = a.slice(1), o += d); 3084 } 3085 } catch (g) { 3086 c.e(g); 3087 } finally { 3088 c.f(); 3089 } 3090 return o; 3091} 3092function Li(e, t) { 3093 var n, r = t.mask, s = t.replacement, i = t.separate, a = t.showMask, o = 0, c = "", u = Ei(r); 3094 try { 3095 for (u.s(); !(n = u.n()).done; ) { 3096 var d = n.value; 3097 if (!a && e[o] === void 0) break; 3098 Object.prototype.hasOwnProperty.call(s, d) && e[o] !== void 0 ? c += e[o++] : c += d; 3099 } 3100 } catch (g) { 3101 u.e(g); 3102 } finally { 3103 u.f(); 3104 } 3105 if (i && !a) { 3106 for (var h = r.length - 1; h >= 0 && c[h] === r[h]; h--) ; 3107 c = c.slice(0, h + 1); 3108 } 3109 return c; 3110} 3111function Vi(e, t) { 3112 for (var n = t.mask, r = t.replacement, s = [], i = 0; i < n.length; i++) { 3113 var a, o = (a = e[i]) !== null && a !== void 0 ? a : n[i], c = Object.prototype.hasOwnProperty.call(r, o) ? "replacement" : e[i] !== void 0 && e[i] !== n[i] ? "input" : "mask"; 3114 s.push({ type: c, value: o, index: i }); 3115 } 3116 return s; 3117} 3118function Rt(e) { 3119 return e.length > 0 ? Ni({}, e, /./) : {}; 3120} 3121function nr(e, t) { 3122 for (var n = t.start, r = n === void 0 ? 0 : n, s = t.end, i = t.mask, a = t.replacement, o = t.separate, c = e.slice(r, s), u = i.slice(r, s), d = "", h = 0; h < u.length; h++) { 3123 var g = Object.prototype.hasOwnProperty.call(a, u[h]); 3124 g && c[h] !== void 0 && c[h] !== u[h] ? d += c[h] : g && o && (d += u[h]); 3125 } 3126 return d; 3127} 3128function Nr(e, t) { 3129 var n = t.mask, r = t.replacement, s = typeof r == "string" ? Rt(r) : r, i = RegExp("[^".concat(Object.keys(s).join(""), "]"), "g"); 3130 return Li(Ut(e, { replacementChars: n.replace(i, ""), replacement: s, separate: !1 }), { mask: n, replacement: s, separate: !1, showMask: !1 }); 3131} 3132function wo(e, t) { 3133 var n = t.mask, r = t.replacement, s = typeof r == "string" ? Rt(r) : r, i = nr(e, { mask: n, replacement: s, separate: !1 }), a = RegExp("[^".concat(Object.keys(s).join(""), "]"), "g"); 3134 return Ut(i, { replacementChars: n.replace(a, ""), replacement: s, separate: !1 }); 3135} 3136function ko(e, t) { 3137 var n = t.mask, r = t.replacement, s = typeof r == "string" ? Rt(r) : r; 3138 return Vi(Nr(e, { mask: n, replacement: s }), { mask: n, replacement: s }); 3139} 3140var jo = ["[", "]", "\\", "/", "^", "$", ".", "|", "?", "*", "+", "(", ")", "{", "}"]; 3141function os(e) { 3142 return jo.includes(e) ? "\\".concat(e) : e; 3143} 3144function So(e, t) { 3145 for (var n = t.mask, r = t.replacement, s = typeof r == "string" ? Rt(r) : r, i = e === "partial" || e === "partial-inexact", a = e === "full" || e === "partial", o = "", c = 0; c < n.length; c++) { 3146 var u = n[c]; 3147 c === 0 && (o = "^"), i && (o += "("), o += Object.prototype.hasOwnProperty.call(s, u) ? "".concat(a ? "(?!".concat(os(u), ")") : "", "(").concat(s[u].source, ")") : os(u), c === n.length - 1 && (i && (
3147o += ")?".repeat(n.length)), o += "$"); 3148 } 3149 return o; 3150} 3151function Eo(e, t) { 3152 return new Proxy(e, { set: function(n, r, s) { 3153 return r === "current" && (s !== e.current && (e.current !== null && t.unregister(e.current), s !== null && t.register(s)), n[r] = s, !0); 3154 } }); 3155} 3156function No(e, t, n) { 3157 return t = Gt(t), function(r, s) { 3158 if (s && (typeof s == "object" || typeof s == "function")) return s; 3159 if (s !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); 3160 return function(i) { 3161 if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 3162 return i; 3163 }(r); 3164 }(e, Tr() ? Reflect.construct(t, n || [], Gt(e).constructor) : t.apply(e, n)); 3165} 3166function Ri(e, t) { 3167 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 3168} 3169function Ai(e, t, n) { 3170 return Object.defineProperty(e, "prototype", { writable: !1 }), e; 3171} 3172function To(e, t, n) { 3173 return (t = function(r) { 3174 var s = function(i, a) { 3175 if (typeof i != "object" || !i) return i; 3176 var o = i[Symbol.toPrimitive]; 3177 if (o !== void 0) { 3178 var c = o.call(i, a); 3179 if (typeof c != "object") return c; 3180 throw new TypeError("@@toPrimitive must return a primitive value."); 3181 } 3182 return (a === "string" ? String : Number)(i); 3183 }(r, "string"); 3184 return typeof s == "symbol" ? s : s + ""; 3185 }(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; 3186} 3187function Gt(e) { 3188 return Gt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { 3189 return t.__proto__ || Object.getPrototypeOf(t); 3190 }, Gt(e); 3191} 3192function Oo(e, t) { 3193 if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function"); 3194 e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && Yt(e, t); 3195} 3196function Tr() { 3197 try { 3198 var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { 3199 })); 3200 } catch { 3201 } 3202 return (Tr = function() { 3203 return !!e; 3204 })(); 3205} 3206function cs(e, t) { 3207 var n = Object.keys(e); 3208 if (Object.getOwnPropertySymbols) { 3209 var r = Object.getOwnPropertySymbols(e); 3210 t && (r = r.filter(function(s) { 3211 return Object.getOwnPropertyDescriptor(e, s).enumerable; 3212 })), n.push.apply(n, r); 3213 } 3214 return n; 3215} 3216function ls(e) { 3217 for (var t = 1; t < arguments.length; t++) { 3218 var n = arguments[t] != null ? arguments[t] : {}; 3219 t % 2 ? cs(Object(n), !0).forEach(function(r) { 3220 To(e, r, n[r]); 3221 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : cs(Object(n)).forEach(function(r) { 3222 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r)); 3223 }); 3224 } 3225 return e; 3226} 3227function Lo(e, t) { 3228 if (e == null) return {}; 3229 var n, r, s = function(a, o) { 3230 if (a == null) return {}; 3231 var c = {}; 3232 for (var u in a) if ({}.hasOwnProperty.call(a, u)) { 3233 if (o.includes(u)) continue; 3234 c[u] = a[u]; 3235 } 3236 return c; 3237 }(e, t); 3238 if (Object.getOwnPropertySymbols) { 3239 var i = Object.getOwnPropertySymbols(e); 3240 for (r = 0; r < i.length; r++) n = i[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]); 3241 } 3242 return s; 3243} 3244function Yt(e, t) { 3245 return Yt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { 3246 return n.__proto__ = r, n; 3247 }, Yt(e, t); 3248} 3249function rr(e) { 3250 return rr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { 3251 return typeof t; 3252 } : function(t) { 3253 return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; 3254 }, rr(e); 3255} 3256function sr(e) {
3257 var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; 3258 return sr = function(n) { 3259 if (n === null || !function(s) { 3260 try { 3261 return Function.toString.call(s).indexOf("[native code]") !== -1; 3262 } catch { 3263 return typeof s == "function"; 3264 } 3265 }(n)) return n; 3266 if (typeof n != "function") throw new TypeError("Super expression must either be null or a function"); 3267 if (t !== void 0) { 3268 if (t.has(n)) return t.get(n); 3269 t.set(n, r); 3270 } 3271 function r() { 3272 return function(s, i, a) { 3273 if (Tr()) return Reflect.construct.apply(null, arguments); 3274 var o = [null]; 3275 o.push.apply(o, i); 3276 var c = new (s.bind.apply(s, o))(); 3277 return a && Yt(c, a.prototype), c; 3278 }(n, arguments, Gt(this).constructor); 3279 } 3280 return r.prototype = Object.create(n.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), Yt(r, n); 3281 }, sr(e); 3282} 3283var zt = function(e) { 3284 function t(n) { 3285 var r; 3286 return Ri(this, t), (r = No(this, t, [n])).name = "SyntheticChangeError", r; 3287 } 3288 return Oo(t, e), Ai(t); 3289}(sr(Error)), us, Vo = ["options"], Ro = ["text", "email", "tel", "search", "url"], Mi = Ai(function e(t) { 3290 var n = t.init, r = t.tracking; 3291 Ri(this, e); 3292 var s = /* @__PURE__ */ new WeakMap(); 3293 this.register = function(i) { 3294 var a; 3295 if (Ro.includes(i.type)) { 3296 var o = (a = i._wrapperState) !== null && a !== void 0 ? a : {}, c = o.initialValue, u = c === void 0 ? "" : c, d = o.controlled, h = d !== void 0 && d, g = n({ initialValue: i.value || u, controlled: h }), y = g.value, v = g.options, b = { value: y, options: v, fallbackOptions: v }, x = { id: -1, cachedId: -1 }, j = { value: "", selectionStart: 0, selectionEnd: 0 }, _ = Object.getOwnPropertyDescriptor("_valueTracker" in i ? i : HTMLInputElement.prototype, "value"); 3297 Object.defineProperty(i, "value", ls(ls({}, _), {}, { set: function(A) { 3298 var W; 3299 j.value = A, _ == null || (W = _.set) === null || W === void 0 || W.call(i, A); 3300 } })), i.value = y; 3301 var T = function() { 3302 var A = function() { 3303 var W, B; 3304 j.selectionStart = (W = i.selectionStart) !== null && W !== void 0 ? W : 0, j.selectionEnd = (B = i.selectionEnd) !== null && B !== void 0 ? B : 0, x.id = window.setTimeout(A); 3305 }; 3306 x.id = window.setTimeout(A); 3307 }, E = function() { 3308 window.clearTimeout(x.id), x.id = -1, x.cachedId = -1; 3309 }, O = function(A) { 3310 try { 3311 var W, B; 3312 if (x.cachedId === x.id) throw new zt("The input selection has not been updated."); 3313 x.cachedId = x.id; 3314 var q = i.value, oe = i.selectionStart, fe = i.selectionEnd; 3315 if (oe === null || fe === null) throw new zt("The selection attributes have not been initialized."); 3316 var U, N = j.value; 3317 if (A.inputType === void 0 && (j.selectionStart = 0, j.selectionEnd = N.length), oe > j.selectionStart ? U = "insert" : oe <= j.selectionStart && oe < j.selectionEnd ? U = "deleteBackward" : oe === j.selectionEnd && q.length < N.length && (U = "deleteForward"), U === void 0 || (U === "deleteBackward" || U === "deleteForward") && q.length > N.length) throw new zt("Input type detection error."); 3318 var G = "", re = j.selectionStart, Z = j.selectionEnd; 3319 if (U === "insert") G = q.slice(j.selectionStart, oe); 3320 else { 3321 var H = N.length - q.length; 3322 re = oe, Z = oe + H; 3323 } 3324 b.value !== N ? b.options = b.fallbackOptions : b.fallbackOptions = b.options; 3325 var ce = b.options, le = r({ inputType: U, previousValue: N, previousOptions: ce, value: q, addedValue: G, changeStart: re, changeEnd: Z, selectionStart: oe, selectionEnd: fe }), Ce = le.options, ee = Lo(le, Vo); 3326 i.value = ee.value, i.setSelectionRange(ee.selectionStart, ee.selectionEnd), b.value = ee.value, b.options = Ce, j.selectionStart = ee.selectionStart, j.selectionEnd = ee.selectionEnd, (W = i._valueTracker) === null || W === void 0 || (B = W.setValue) === null || B === void 0 || B.call(W, N); 3327 } catch (je) { 3328 if (i.value = j.value, i.setSelectionRange(j.selectionStart, j.selectionEnd), A.preventDefault(), A.stopPropagation(), je.name !== "SyntheticChangeError") throw je; 3329 } 3330 }; 3331 document.activeElement === i && T(), i.addEventListener("focus", T), i.addEventListener("blur", E), i.addEventListener("input", O), s.set(i, { onFocus: T, onBlur: E, onInput: O }); 3332 } 3333 }, this.unregister = function(i) { 3334 var a = s.get(i); 3335 a !== void 0 && (i.removeEventListener("focus", a.onFocus), i.removeEventListener("blur", a.onBlur), i.removeEventListener("input", a.onInput), s.delete(i)); 3336 }; 3337}); 3338us = Mi, Object.defineProperty(us.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Input" }); 3339function Ao(e, t) { 3340 return I.useCallback(function(n) { 3341 e.current = n, typeof t == "function" ? t(n) : rr(t) === "object" && t !== null && (t.current = n); 3342 }, [e, t]); 3343} 3344var ds, Mo = ["track", "modify"]; 3345function xt(e) { 3346 var t, n, r, s; 3347 return { mask: (t = e.mask) !== null && t !== void 0 ? t : "", replacement: typeof e.replacement == "string" ? Rt(e.replacement) : (n = e.replacement) !== null && n !== void 0 ? n : {}, showMask: (r = e.showMask) !== null && r !== void 0 && r, separate: (s = e.separate) !== null && s !== void 0 && s, track: e.track, modify: e.modify }; 3348} 3349var Ii = function(e) { 3350 function t() { 3351 var n, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; 3352 return _o(this, t), (n = bo(this, t, [{ init: function(s) { 3353 var i = s.initialValue, a = s.controlled, o = xt(r), c = o.mask, u = o.replacement, d = o.separate, h = o.showMask; 3354 return i = a || i ? i : h ? c : "", { value: i, options: { mask: c, replacement: u, separate: d } }; 3355 }, tracking: function(s) { 3356 var i = s.inputType, a = s.previousValue, o = s.previousOptions, c = s.addedValue, u = s.changeStart, d = s.changeEnd, h = xt(r), g = h.track, y = h.modify, v = Oi(h, Mo), b = v.mask, x = v.replacement, j = v.showMask, _ = v.separate, T = un(un({}, i === "insert" ? { inputType: i, data: c } : { inputType: i, data: null }), {}, { value: a, selectionStart: u, selectionEnd: d }), E = g == null ? void 0 : g(T); 3357 if (E === !1) throw new zt("Custom tracking stop."); 3358 E === null ? c = "" : E !== !0 && E !== void 0 && (c = E); 3359 var O = y == null ? void 0 : y(T); 3360 (O == null ? void 0 : O.mask) !== void 0 && (b = O.mask), (O == null ? void 0 : O.replacement) !== void 0 && (x = typeof (O == null ? void 0 : O.replacement) == "string" ? Rt(O == null ? void 0 : O.replacement) : O.replacement), (O == null ? void 0 : O.showMask) !== void 0 && (j = O.showMask), (O == null ? void 0 : O.separate) !== void 0 && (_ = O.separate); 3361 var A = nr(a, un({ end: u }, o)), W = nr(a, un({ start: d }, o)), B = RegExp("[^".concat(Object.keys(x).join(""), "]"), "g"), q = b.replace(B, ""); 3362 if (A && (A = Ut(A, { replacementChars: q, replacement: x, separate: _ }), q = q.slice(A.length)), c && (c = Ut(c, { replacementChars: q, replacement: x, separate: !1 }), q = q.slice(c.length)), i === "insert" && c === "") throw new zt("The character does not match the key value of the `replacement` object."); 3363 if (_) { 3364 var oe = b.slice(u, d).replace(B, ""), fe = oe.length - c.length; 3365 fe < 0 ? W = W.slice(-fe) : fe > 0 && (W = oe.slice(-fe) + W); 3366 } 3367 W && (W = Ut(W, { replacementChars: q, replacement: x, separate: _ })); 3368 var U = Li(A + c + W, { mask: b, replacement: x, separate: _, showMask: j }), N = function(G) { 3369 var re, Z, H, ce = G.inputType, le = G.value, Ce = G.addedValue, ee = G.beforeChangeValue, je = G.mask, Oe = G.replacement, qe = G.separate, tt = Vi(le, { mask: je, replacement: Oe }).filter(function(R) { 3370 var Q = R.type; 3371 return Q === "input" || qe && Q === "replacement"; 3372 }), ht = (re = tt[ee.length + Ce.length - 1]) === null || re === void 0 ? void 0 : re.index, Ze = (Z = tt[ee.length - 1]) === null || Z === void 0 ? void 0 : Z.index, He = (H = tt[ee.length + Ce.length]) === null || H === void 0 ? void 0 : H.index; 3373 if (ce === "insert") {
3374 if (ht !== void 0) return ht + 1; 3375 if (He !== void 0) return He; 3376 if (Ze !== void 0) return Ze + 1; 3377 } 3378 if (ce === "deleteForward") { 3379 if (He !== void 0) return He; 3380 if (Ze !== void 0) return Ze + 1; 3381 } 3382 if (ce === "deleteBackward") { 3383 if (Ze !== void 0) return Ze + 1; 3384 if (He !== void 0) return He; 3385 } 3386 var vt = le.split("").findIndex(function(R) { 3387 return Object.prototype.hasOwnProperty.call(Oe, R); 3388 }); 3389 return vt !== -1 ? vt : le.length; 3390 }({ inputType: i, value: U, addedValue: c, beforeChangeValue: A, mask: b, replacement: x, separate: _ }); 3391 return { value: U, selectionStart: N, selectionEnd: N, options: { mask: b, replacement: x, separate: _ } }; 3392 } }])).format = function(s) { 3393 return Nr(s, xt(r)); 3394 }, n.formatToParts = function(s) { 3395 return ko(s, xt(r)); 3396 }, n.unformat = function(s) { 3397 return wo(s, xt(r)); 3398 }, n.generatePattern = function(s) { 3399 return So(s, xt(r)); 3400 }, n; 3401 } 3402 return Co(t, Mi), xo(t); 3403}(); 3404ds = Ii, Object.defineProperty(ds.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Mask" }); 3405function Io() { 3406 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mask, n = e.replacement, r = e.showMask, s = e.separate, i = e.track, a = e.modify, o = I.useRef(null), c = I.useRef({ mask: t, replacement: n, showMask: r, separate: s, track: i, modify: a }); 3407 return c.current.mask = t, c.current.replacement = n, c.current.showMask = r, c.current.separate = s, c.current.track = i, c.current.modify = a, I.useMemo(function() { 3408 return Eo(o, new Ii(c.current)); 3409 }, []); 3410} 3411var Po = ["component", "mask", "replacement", "showMask", "separate", "track", "modify"]; 3412function Do(e, t) { 3413 var n = e.component, r = e.mask, s = e.replacement, i = e.showMask, a = e.separate, o = e.track, c = e.modify, u = Oi(e, Po), d = Io({ mask: r, replacement: s, showMask: i, separate: a, track: o, modify: c }), h = Ao(d, t); 3414 return n ? z.createElement(n, bn({ ref: h }, u)) : z.createElement("input", bn({ ref: h }, u)); 3415} 3416var Fo = I.forwardRef(Do); 3417const $t = { 3418 "cb-label": "cb-label", 3419 "cb-input": "cb-input", 3420 "cb-box": "cb-box", 3421 "cb-icon": "cb-icon", 3422 "cb-text": "cb-text" 3423}, Pi = I.forwardRef(({ label: e, className: t, ...n }, r) => /* @__PURE__ */ l.jsxs("label", { className: Fe($t["cb-label"], t), children: [ 3424 /* @__PURE__ */ l.jsx("input", { ref: r, type: "checkbox", className: $t["cb-input"], ...n }), 3425 /* @__PURE__ */ l.jsx("span", { className: $t["cb-box"], children: /* @__PURE__ */ l.jsx("svg", { width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", className: $t["cb-icon"], children: /* @__PURE__ */ l.jsx( 3426 "path", 3427 { 3428 d: "M1 5L4.5 8.5L11 1.5", 3429 stroke: "currentColor", 3430 strokeWidth: "1.6", 3431 strokeLinecap: "round", 3432 strokeLinejoin: "round" 3433 } 3434 ) }) }), 3435 /* @__PURE__ */ l.jsx("span", { className: $t["cb-text"], children: e }) 3436] })); 3437Pi.displayName = "Checkbox"; 3438const Zn = { 3439 "ac-checkbox": "ac-checkbox", 3440 "ac-link": "ac-link" 3441}; 3442function $o({ checked: e, onChange: t, className: n }) { 3443 const [r, s] = I.useState(!1), i = e !== void 0, a = i ? e : r, o = (c) => { 3444 const u = c.target.checked; 3445 i || s(u), t == null || t(u); 3446 }; 3447 return /* @__PURE__ */ l.jsx( 3448 Pi, 3449 { 3450 checked: a, 3451 onChange: o, 3452 className: Fe(Zn["ac-checkbox"], n), 3453 label: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [ 3454 "ÐÐ°Ñ ÑоглаÑие Ñ ÑÑловиÑми", 3455 " ",
3456 /* @__PURE__ */ l.jsx( 3457 "a", 3458 { 3459 className: Zn["ac-link"], 3460 href: "https://vedora.ru/legal-user-agreement/", 3461 target: "_blank", 3462 rel: "noreferrer", 3463 onClick: (c) => c.stopPropagation(), 3464 children: "ÐолÑзоваÑелÑÑкого ÑоглаÑениÑ" 3465 } 3466 ), 3467 " ", 3468 "и на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ Ð² ÑооÑвеÑÑÑвии Ñ", 3469 " ", 3470 /* @__PURE__ */ l.jsx( 3471 "a", 3472 { 3473 className: Zn["ac-link"], 3474 href: "https://vedora.ru/legal-privacy-policy/", 3475 target: "_blank", 3476 rel: "noreferrer", 3477 onClick: (c) => c.stopPropagation(), 3478 children: "ÐолиÑикой обÑабоÑки пеÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ " 3479 } 3480 ) 3481 ] }) 3482 } 3483 ); 3484} 3485const fs = { 3486 "spin-spinner": "spin-spinner", 3487 "spin-circle": "spin-circle" 3488}; 3489function Zo() { 3490 return /* @__PURE__ */ l.jsx("div", { className: fs["spin-spinner"], children: /* @__PURE__ */ l.jsx("div", { className: fs["spin-circle"] }) }); 3491} 3492const Zt = { 3493 "btn-button": "btn-button", 3494 "btn-button--fullWidth": "btn-button--fullWidth", 3495 "btn-content": "btn-content", 3496 "btn-button--primary": "btn-button--primary", 3497 "btn-button--surface": "btn-button--surface", 3498 "btn-isDisabled": "btn-isDisabled" 3499}, Rn = I.forwardRef( 3500 ({ variant: e = "primary", fullWidth: t = !1, loading: n = !1, disabled: r = !1, className: s, children: i, ...a }, o) => { 3501 const c = r || n; 3502 return /* @__PURE__ */ l.jsx( 3503 "button", 3504 { 3505 ref: o, 3506 type: a.type ?? "button", 3507 disabled: c, 3508 "aria-busy": n || void 0, 3509 className: Fe( 3510 Zt["btn-button"], 3511 Zt[`btn-button--${e}`], 3512 t && Zt["btn-button--fullWidth"], 3513 c && Zt["btn-isDisabled"], 3514 s 3515 ), 3516 ...a, 3517 children: n ? /* @__PURE__ */ l.jsx(Zo, {}) : /* @__PURE__ */ l.jsx("span", { className: Zt["btn-content"], children: i }) 3518 } 3519 ); 3520 } 3521); 3522Rn.displayName = "Button"; 3523const Ee = { 3524 "field-wrapper": "field-wrapper", 3525 "field-label": "field-label", 3526 "field-control": "field-control", 3527 "field-controlError": "field-controlError", 3528 "field-inputContainer": "field-inputContainer", 3529 "field-meta": "field-meta", 3530 "field-hint": "field-hint", 3531 "field-errorText": "field-errorText" 3532}; 3533function Ho({ name: e, label: t, hint: n, className: r, ...s }) { 3534 var c; 3535 const { 3536 register: i, 3537 formState: { errors: a } 3538 } = fi(), o = (c = a == null ? void 0 : a[e]) == null ? void 0 : c.message; 3539 return /* @__PURE__ */ l.jsxs("div", { className: Ee["field-wrapper"], children: [ 3540 t && /* @__PURE__ */ l.jsx("label", { className: Ee["field-label"], htmlFor: String(e), children: t }), 3541 /* @__PURE__ */ l.jsx("div", { className: Ee["field-inputContainer"], children: /* @__PURE__ */ l.jsx( 3542 "input", 3543 { 3544 id: String(e), 3545 className: Fe(Ee["field-control"], o && Ee["field-controlError"], r), 3546 ...i(e), 3547 ...s 3548 } 3549 ) }), 3550 (o || n) && /* @__PURE__ */ l.jsx("div", { className: Ee["field-meta"], children: /* @__PURE__ */ l.jsx("span", { className: o ? Ee["field-errorText"] : Ee["field-hint"], children: o ?? n ?? "" }) }) 3551 ] }); 3552} 3553const xn = "+_ (___) ___-__-__", Cn = { _: /\d/ }, Bo = `+${"_".repeat(14)}`, Wo = { _: /\d/ }, ir = /^[78]/, Uo = ({ inputType: e, value: t, data: n, selectionStart: r }) => { 3554 if (e !== "insert" || !n || r > 1) return; 3555 const s = n.replace(/\D/g, ""); 3556 if (s) { 3557 if (t === "") 3558 return n.startsWith("+") ? s : ir.test(s) ? `7${s.slice(1)}` : `7${s}`; 3559 if (t === "+" && ir.test(s)) 3560 return `7${s.slice(1)}`; 3561 } 3562}; 3563function zo(e, t, n) { 3564 if (e.key !== "+" || t !== "") return; 3565 e.preventDefault(), n("+"); 3566 const r = e.currentTarget; 3567 requestAnimationFrame(() => { 3568 r.setSelectionRange(1, 1); 3569 }); 3570} 3571function Go(e, t, n) { 3572 if (e.key !== "Backspace" && e.key !== "Delete" || !/^\+\d$/.test(t)) return; 3573 e.preventDefault(), n("+"); 3574 const r = e.currentTarget; 3575 requestAnimationFrame(() => { 3576 r.setSelectionRange(1, 1); 3577 }); 3578} 3579const Yo = ({ value: e, data: t, inputType: n, selectionStart: r, selectionEnd: s }) => { 3580 const i = n === "insert" ? e.slice(0, r) + (t ?? "") + e.slice(s) : e.slice(0, r) + e.slice(s); 3581 return i.startsWith("+7") || i.startsWith("+8") ? { mask: xn, replacement: Cn } : i.startsWith("+") ? { mask: Bo, replacement: Wo, separate: !1 } : { mask: xn, replacement: Cn }; 3582}; 3583function Di(e) { 3584 const t = e.trim(), n = t.replace(/\D/g, ""); 3585 return n.length === 0 ? !1 : (t.startsWith("+") ? t.startsWith("+7") || t.startsWith("+8") : ir.test(n)) ? n.length === 11 : n.length >= 8 && n.length <= 15; 3586} 3587const Xo = "ÐÐ¾Ñ Ð¾Ð¶Ðµ, номеÑа ÑÑой ÑÑÑÐ°Ð½Ñ Ð¿Ð¾ÐºÐ° не поддеÑживаÑÑÑÑ"; 3588function Jo() { 3589 const [e, t] = I.useState(null), n = I.useCallback(() => t(null), []), r = I.useCallback((s) => { 3590 t(null); 3591 const i = (s ?? "").trim(); 3592 !i.startsWith("+") || i.startsWith("+7") || i.startsWith("+8") || Di(i) && fetch("/auth/phone-country-check", { 3593 method: "POST", 3594 headers: { "Content-Type": "application/json" }, 3595 body: JSON.stringify({ value: i }) 3596 }).then((a) => a.json()).then((a) => { 3597 (a == null ? void 0 : a.allowed) === !1 && t((a == null ? void 0 : a.message) ?? Xo); 3598 }).catch(() => { 3599 }); 3600 }, []); 3601 return { hint: e, checkOnBlur: r, clearHint: n }; 3602} 3603const qo = xn, Ko = Cn; 3604function Qo({ name: e, label: t, hint: n, className: r, placeholder: s }) { 3605 var h; 3606 const { 3607 control: i, 3608 formState: { errors: a } 3609 } = fi(), o = (h = a == null ? void 0 : a[e]) == null ? void 0 : h.message, { hint: c, checkOnBlur: u, clearHint: d } = Jo(); 3610 return /* @__PURE__ */ l.jsxs("div", { className: Ee["field-wrapper"], children: [
vendor: 14,875 bytes, lines 3611-4068
3611 t && /* @__PURE__ */ l.jsx("label", { className: Ee["field-label"], htmlFor: String(e), children: t }), 3612 /* @__PURE__ */ l.jsx("div", { className: Ee["field-inputContainer"], children: /* @__PURE__ */ l.jsx( 3613 Wa, 3614 { 3615 name: e, 3616 control: i, 3617 render: ({ field: g }) => /* @__PURE__ */ l.jsx( 3618 Fo, 3619 { 3620 mask: xn, 3621 replacement: Cn, 3622 track: Uo, 3623 modify: Yo, 3624 value: g.value ?? "", 3625 onChange: (y) => { 3626 d(), g.onChange(y); 3627 }, 3628 onBlur: (y) => { 3629 g.onBlur(), u(y.target.value); 3630 }, 3631 onKeyDown: (y) => { 3632 zo(y, g.value ?? "", g.onChange), Go(y, g.value ?? "", g.onChange); 3633 }, 3634 className: Fe(Ee["field-control"], o && Ee["field-controlError"], r), 3635 inputMode: "tel", 3636 placeholder: s 3637 } 3638 ) 3639 } 3640 ) }), 3641 (o || c || n) && /* @__PURE__ */ l.jsx("div", { className: Ee["field-meta"], children: /* @__PURE__ */ l.jsx("span", { className: o ? Ee["field-errorText"] : Ee["field-hint"], children: o ?? c ?? n ?? "" }) }) 3642 ] }); 3643} 3644var se; 3645(function(e) { 3646 e.assertEqual = (s) => { 3647 }; 3648 function t(s) { 3649 } 3650 e.assertIs = t; 3651 function n(s) { 3652 throw new Error(); 3653 } 3654 e.assertNever = n, e.arrayToEnum = (s) => { 3655 const i = {}; 3656 for (const a of s) 3657 i[a] = a; 3658 return i; 3659 }, e.getValidEnumValues = (s) => { 3660 const i = e.objectKeys(s).filter((o) => typeof s[s[o]] != "number"), a = {}; 3661 for (const o of i) 3662 a[o] = s[o]; 3663 return e.objectValues(a); 3664 }, e.objectValues = (s) => e.objectKeys(s).map(function(i) { 3665 return s[i]; 3666 }), e.objectKeys = typeof Object.keys == "function" ? (s) => Object.keys(s) : (s) => { 3667 const i = []; 3668 for (const a in s) 3669 Object.prototype.hasOwnProperty.call(s, a) && i.push(a); 3670 return i; 3671 }, e.find = (s, i) => { 3672 for (const a of s) 3673 if (i(a)) 3674 return a; 3675 }, e.isInteger = typeof Number.isInteger == "function" ? (s) => Number.isInteger(s) : (s) => typeof s == "number" && Number.isFinite(s) && Math.floor(s) === s; 3676 function r(s, i = " | ") { 3677 return s.map((a) => typeof a == "string" ? `'${a}'` : a).join(i); 3678 } 3679 e.joinValues = r, e.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i; 3680})(se || (se = {})); 3681var hs; 3682(function(e) { 3683 e.mergeShapes = (t, n) => ({ 3684 ...t, 3685 ...n 3686 // second overwrites first 3687 }); 3688})(hs || (hs = {})); 3689const F = se.arrayToEnum([ 3690 "string", 3691 "nan", 3692 "number", 3693 "integer", 3694 "float", 3695 "boolean", 3696 "date", 3697 "bigint", 3698 "symbol", 3699 "function", 3700 "undefined", 3701 "null", 3702 "array", 3703 "object", 3704 "unknown", 3705 "promise", 3706 "void", 3707 "never", 3708 "map", 3709 "set" 3710]), ot = (e) => { 3711 switch (typeof e) { 3712 case "undefined": 3713 return F.undefined; 3714 case "string": 3715 return F.string; 3716 case "number": 3717 return Number.isNaN(e) ? F.nan : F.number; 3718 case "boolean": 3719 return F.boolean; 3720 case "function": 3721 return F.function; 3722 case "bigint": 3723 return F.bigint; 3724 case "symbol": 3725 return F.symbol; 3726 case "object": 3727 return Array.isArray(e) ? F.array : e === null ? F.null : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? F.promise : typeof Map < "u" && e instanceof Map ? F.map : typeof Set < "u" && e instanceof Set ? F.set : typeof Date < "u" && e instanceof Date ? F.date : F.object; 3728 default: 3729 return F.unknown; 3730 } 3731}, S = se.arrayToEnum([ 3732 "invalid_type", 3733 "invalid_literal", 3734 "custom", 3735 "invalid_union", 3736 "invalid_union_discriminator", 3737 "invalid_enum_value", 3738 "unrecognized_keys", 3739 "invalid_arguments", 3740 "invalid_return_type", 3741 "invalid_date", 3742 "invalid_string", 3743 "too_small", 3744 "too_big", 3745 "invalid_intersection_types", 3746 "not_multiple_of", 3747 "not_finite" 3748]); 3749class et extends Error { 3750 get errors() { 3751 return this.issues; 3752 } 3753 constructor(t) { 3754 super(), this.issues = [], this.addIssue = (r) => { 3755 this.issues = [...this.issues, r]; 3756 }, this.addIssues = (r = []) => { 3757 this.issues = [...this.issues, ...r]; 3758 }; 3759 const n = new.target.prototype; 3760 Object.setPrototypeOf ? Object.setPrototypeOf(this, n) : this.__proto__ = n, this.name = "ZodError", this.issues = t; 3761 } 3762 format(t) { 3763 const n = t || function(i) { 3764 return i.message; 3765 }, r = { _errors: [] }, s = (i) => { 3766 for (const a of i.issues) 3767 if (a.code === "invalid_union") 3768 a.unionErrors.map(s); 3769 else if (a.code === "invalid_return_type") 3770 s(a.returnTypeError); 3771 else if (a.code === "invalid_arguments") 3772 s(a.argumentsError); 3773 else if (a.path.length === 0) 3774 r._errors.push(n(a)); 3775 else { 3776 let o = r, c = 0; 3777 for (; c < a.path.length; ) { 3778 const u = a.path[c]; 3779 c === a.path.length - 1 ? (o[u] = o[u] || { _errors: [] }, o[u]._errors.push(n(a))) : o[u] = o[u] || { _errors: [] }, o = o[u], c++; 3780 } 3781 } 3782 }; 3783 return s(this), r; 3784 } 3785 static assert(t) { 3786 if (!(t instanceof et)) 3787 throw new Error(`Not a ZodError: ${t}`); 3788 } 3789 toString() { 3790 return this.message; 3791 } 3792 get message() { 3793 return JSON.stringify(this.issues, se.jsonStringifyReplacer, 2); 3794 } 3795 get isEmpty() { 3796 return this.issues.length === 0; 3797 } 3798 flatten(t = (n) => n.message) { 3799 const n = {}, r = []; 3800 for (const s of this.issues) 3801 if (s.path.length > 0) { 3802 const i = s.path[0]; 3803 n[i] = n[i] || [], n[i].push(t(s)); 3804 } else 3805 r.push(t(s)); 3806 return { formErrors: r, fieldErrors: n }; 3807 } 3808 get formErrors() { 3809 return this.flatten(); 3810 } 3811} 3812et.create = (e) => new et(e); 3813const ar = (e, t) => { 3814 let n; 3815 switch (e.code) { 3816 case S.invalid_type: 3817 e.received === F.undefined ? n = "Required" : n = `Expected ${e.expected}, received ${e.received}`; 3818 break; 3819 case S.invalid_literal: 3820 n = `Invalid literal value, expected ${JSON.stringify(e.expected, se.jsonStringifyReplacer)}`; 3821 break; 3822 case S.unrecognized_keys: 3823 n = `Unrecognized key(s) in object: ${se.joinValues(e.keys, ", ")}`; 3824 break; 3825 case S.invalid_union: 3826 n = "Invalid input"; 3827 break; 3828 case S.invalid_union_discriminator: 3829 n = `Invalid discriminator value. Expected ${se.joinValues(e.options)}`; 3830 break; 3831 case S.invalid_enum_value: 3832 n = `Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`; 3833 break; 3834 case S.invalid_arguments: 3835 n = "Invalid function arguments"; 3836 break; 3837 case S.invalid_return_type: 3838 n = "Invalid function return type"; 3839 break; 3840 case S.invalid_date: 3841 n = "Invalid date"; 3842 break; 3843 case S.invalid_string: 3844 typeof e.validation == "object" ? "includes" in e.validation ? (n = `Invalid input: must include "${e.validation.includes}"`, typeof e.validation.position == "number" && (n = `${n} at one or more positions greater than or equal to ${e.validation.position}`)) : "startsWith" in e.validation ? n = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? n = `Invalid input: must end with "${e.validation.endsWith}"` : se.assertNever(e.validation) : e.validation !== "regex" ? n = `Invalid ${e.validation}` : n = "Invalid"; 3845 break; 3846 case S.too_small: 3847 e.type === "array" ? n = `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? n = `String must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? n = `Number must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${e.minimum}` : e.type === "bigint" ? n = `Number must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${e.minimum}` : e.type === "date" ? n = `Date must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(e.minimum))}` : n = "Invalid input"; 3848 break; 3849 case S.too_big: 3850 e.type === "array" ? n = `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "less than"} ${e.maximum} element(s)` : e.type === "string" ? n = `String must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "under"} ${e.maximum} character(s)` : e.type === "number" ? n = `Number must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "bigint" ? n = `BigInt must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "date" ? n = `Date must be ${e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(e.maximum))}` : n = "Invalid input"; 3851 break; 3852 case S.custom: 3853 n = "Invalid input"; 3854 break; 3855 case S.invalid_intersection_types: 3856 n = "Intersection results could not be merged"; 3857 break; 3858 case S.not_multiple_of: 3859 n = `Number must be a multiple of ${e.multipleOf}`; 3860 break; 3861 case S.not_finite: 3862 n = "Number must be finite"; 3863 break; 3864 default: 3865 n = t.defaultError, se.assertNever(e); 3866 } 3867 return { message: n }; 3868}; 3869let ec = ar; 3870function tc() { 3871 return ec; 3872} 3873const nc = (e) => { 3874 const { data: t, path: n, errorMaps: r, issueData: s } = e, i = [...n, ...s.path || []], a = { 3875 ...s, 3876 path: i 3877 }; 3878 if (s.message !== void 0) 3879 return { 3880 ...s, 3881 path: i, 3882 message: s.message 3883 }; 3884 let o = ""; 3885 const c = r.filter((u) => !!u).slice().reverse(); 3886 for (const u of c) 3887 o = u(a, { data: t, defaultError: o }).message; 3888 return { 3889 ...s, 3890 path: i, 3891 message: o 3892 }; 3893}; 3894function P(e, t) { 3895 const n = tc(), r = nc({ 3896 issueData: t, 3897 data: e.data, 3898 path: e.path, 3899 errorMaps: [ 3900 e.common.contextualErrorMap, 3901 // contextual error map is first priority 3902 e.schemaErrorMap, 3903 // then schema-bound map if available 3904 n, 3905 // then global override map 3906 n === ar ? void 0 : ar 3907 // then global default map 3908 ].filter((s) => !!s) 3909 }); 3910 e.common.issues.push(r); 3911} 3912class $e { 3913 constructor() { 3914 this.value = "valid"; 3915 } 3916 dirty() { 3917 this.value === "valid" && (this.value = "dirty"); 3918 } 3919 abort() { 3920 this.value !== "aborted" && (this.value = "aborted"); 3921 } 3922 static mergeArray(t, n) { 3923 const r = []; 3924 for (const s of n) { 3925 if (s.status === "aborted") 3926 return X; 3927 s.status === "dirty" && t.dirty(), r.push(s.value); 3928 } 3929 return { status: t.value, value: r }; 3930 } 3931 static async mergeObjectAsync(t, n) { 3932 const r = []; 3933 for (const s of n) { 3934 const i = await s.key, a = await s.value; 3935 r.push({ 3936 key: i, 3937 value: a 3938 }); 3939 } 3940 return $e.mergeObjectSync(t, r); 3941 } 3942 static mergeObjectSync(t, n) { 3943 const r = {}; 3944 for (const s of n) { 3945 const { key: i, value: a } = s; 3946 if (i.status === "aborted" || a.status === "aborted") 3947 return X; 3948 i.status === "dirty" && t.dirty(), a.status === "dirty" && t.dirty(), i.value !== "__proto__" && (typeof a.value < "u" || s.alwaysSet) && (r[i.value] = a.value); 3949 } 3950 return { status: t.value, value: r }; 3951 } 3952} 3953const X = Object.freeze({ 3954 status: "aborted" 3955}), Bt = (e) => ({ status: "dirty", value: e }), We = (e) => ({ status: "valid", value: e }), ms = (e) => e.status === "aborted", ps = (e) => e.status === "dirty", Nt = (e) => e.status === "valid", wn = (e) => typeof Promise < "u" && e instanceof Promise; 3956var $; 3957(function(e) { 3958 e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message; 3959})($ || ($ = {})); 3960class dt { 3961 constructor(t, n, r, s) { 3962 this._cachedPath = [], this.parent = t, this.data = n, this._path = r, this._key = s; 3963 } 3964 get path() { 3965 return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; 3966 } 3967} 3968const gs = (e, t) => { 3969 if (Nt(t)) 3970 return { success: !0, data: t.value }; 3971 if (!e.common.issues.length) 3972 throw new Error("Validation failed but no issues detected."); 3973 return { 3974 success: !1, 3975 get error() { 3976 if (this._error) 3977 return this._error; 3978 const n = new et(e.common.issues); 3979 return this._error = n, this._error; 3980 } 3981 }; 3982}; 3983function te(e) { 3984 if (!e) 3985 return {}; 3986 const { errorMap: t, invalid_type_error: n, required_error: r, description: s } = e; 3987 if (t && (n || r)) 3988 throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); 3989 return t ? { errorMap: t, description: s } : { errorMap: (a, o) => { 3990 const { message: c } = e; 3991 return a.code === "invalid_enum_value" ? { message: c ?? o.defaultError } : typeof o.data > "u" ? { message: c ?? r ?? o.defaultError } : a.code !== "invalid_type" ? { message: o.defaultError } : { message: c ?? n ?? o.defaultError }; 3992 }, description: s }; 3993} 3994class ne { 3995 get description() { 3996 return this._def.description; 3997 } 3998 _getType(t) { 3999 return ot(t.data); 4000 } 4001 _getOrReturnCtx(t, n) { 4002 return n || { 4003 common: t.parent.common, 4004 data: t.data, 4005 parsedType: ot(t.data), 4006 schemaErrorMap: this._def.errorMap, 4007 path: t.path, 4008 parent: t.parent 4009 }; 4010 } 4011 _processInputParams(t) { 4012 return { 4013 status: new $e(), 4014 ctx: { 4015 common: t.parent.common, 4016 data: t.data, 4017 parsedType: ot(t.data), 4018 schemaErrorMap: this._def.errorMap, 4019 path: t.path, 4020 parent: t.parent 4021 } 4022 }; 4023 } 4024 _parseSync(t) { 4025 const n = this._parse(t); 4026 if (wn(n)) 4027 throw new Error("Synchronous parse encountered promise."); 4028 return n; 4029 } 4030 _parseAsync(t) { 4031 const n = this._parse(t); 4032 return Promise.resolve(n); 4033 } 4034 parse(t, n) { 4035 const r = this.safeParse(t, n); 4036 if (r.success) 4037 return r.data; 4038 throw r.error; 4039 } 4040 safeParse(t, n) { 4041 const r = { 4042 common: { 4043 issues: [], 4044 async: (n == null ? void 0 : n.async) ?? !1, 4045 contextualErrorMap: n == null ? void 0 : n.errorMap 4046 }, 4047 path: (n == null ? void 0 : n.path) || [], 4048 schemaErrorMap: this._def.errorMap, 4049 parent: null, 4050 data: t, 4051 parsedType: ot(t) 4052 }, s = this._parseSync({ data: t, path: r.path, parent: r }); 4053 return gs(r, s); 4054 } 4055 "~validate"(t) { 4056 var r, s; 4057 const n = { 4058 common: { 4059 issues: [], 4060 async: !!this["~standard"].async 4061 }, 4062 path: [], 4063 schemaErrorMap: this._def.errorMap, 4064 parent: null, 4065 data: t, 4066 parsedType: ot(t) 4067 }; 4068 if (!this["~standard"].async)
vendor: 10,518 bytes, lines 4069-4314
4069 try { 4070 const i = this._parseSync({ data: t, path: [], parent: n }); 4071 return Nt(i) ? { 4072 value: i.value 4073 } : { 4074 issues: n.common.issues 4075 }; 4076 } catch (i) { 4077 (s = (r = i == null ? void 0 : i.message) == null ? void 0 : r.toLowerCase()) != null && s.includes("encountered") && (this["~standard"].async = !0), n.common = { 4078 issues: [], 4079 async: !0 4080 }; 4081 } 4082 return this._parseAsync({ data: t, path: [], parent: n }).then((i) => Nt(i) ? { 4083 value: i.value 4084 } : { 4085 issues: n.common.issues 4086 }); 4087 } 4088 async parseAsync(t, n) { 4089 const r = await this.safeParseAsync(t, n); 4090 if (r.success) 4091 return r.data; 4092 throw r.error; 4093 } 4094 async safeParseAsync(t, n) { 4095 const r = { 4096 common: { 4097 issues: [], 4098 contextualErrorMap: n == null ? void 0 : n.errorMap, 4099 async: !0 4100 }, 4101 path: (n == null ? void 0 : n.path) || [], 4102 schemaErrorMap: this._def.errorMap, 4103 parent: null, 4104 data: t, 4105 parsedType: ot(t) 4106 }, s = this._parse({ data: t, path: r.path, parent: r }), i = await (wn(s) ? s : Promise.resolve(s)); 4107 return gs(r, i); 4108 } 4109 refine(t, n) { 4110 const r = (s) => typeof n == "string" || typeof n > "u" ? { message: n } : typeof n == "function" ? n(s) : n; 4111 return this._refinement((s, i) => { 4112 const a = t(s), o = () => i.addIssue({ 4113 code: S.custom, 4114 ...r(s) 4115 }); 4116 return typeof Promise < "u" && a instanceof Promise ? a.then((c) => c ? !0 : (o(), !1)) : a ? !0 : (o(), !1); 4117 }); 4118 } 4119 refinement(t, n) { 4120 return this._refinement((r, s) => t(r) ? !0 : (s.addIssue(typeof n == "function" ? n(r, s) : n), !1)); 4121 } 4122 _refinement(t) { 4123 return new Ot({ 4124 schema: this, 4125 typeName: J.ZodEffects, 4126 effect: { type: "refinement", refinement: t } 4127 }); 4128 } 4129 superRefine(t) { 4130 return this._refinement(t); 4131 } 4132 constructor(t) { 4133 this.spa = this.safeParseAsync, this._def = t, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = { 4134 version: 1, 4135 vendor: "zod", 4136 validate: (n) => this["~validate"](n) 4137 }; 4138 } 4139 optional() { 4140 return ut.create(this, this._def); 4141 } 4142 nullable() { 4143 return Lt.create(this, this._def); 4144 } 4145 nullish() { 4146 return this.nullable().optional(); 4147 } 4148 array() { 4149 return Je.create(this); 4150 } 4151 promise() { 4152 return En.create(this, this._def); 4153 } 4154 or(t) { 4155 return jn.create([this, t], this._def); 4156 } 4157 and(t) { 4158 return Sn.create(this, t, this._def); 4159 } 4160 transform(t) { 4161 return new Ot({ 4162 ...te(this._def), 4163 schema: this, 4164 typeName: J.ZodEffects, 4165 effect: { type: "transform", transform: t } 4166 }); 4167 } 4168 default(t) { 4169 const n = typeof t == "function" ? t : () => t; 4170 return new cr({ 4171 ...te(this._def), 4172 innerType: this, 4173 defaultValue: n, 4174 typeName: J.ZodDefault 4175 }); 4176 } 4177 brand() { 4178 return new jc({ 4179 typeName: J.ZodBranded, 4180 type: this, 4181 ...te(this._def) 4182 }); 4183 } 4184 catch(t) { 4185 const n = typeof t == "function" ? t : () => t; 4186 return new lr({ 4187 ...te(this._def), 4188 innerType: this, 4189 catchValue: n, 4190 typeName: J.ZodCatch 4191 }); 4192 } 4193 describe(t) { 4194 const n = this.constructor; 4195 return new n({ 4196 ...this._def, 4197 description: t 4198 }); 4199 } 4200 pipe(t) { 4201 return Or.create(this, t); 4202 } 4203 readonly() { 4204 return ur.create(this); 4205 } 4206 isOptional() { 4207 return this.safeParse(void 0).success; 4208 } 4209 isNullable() { 4210 return this.safeParse(null).success; 4211 } 4212} 4213const rc = /^c[^\s-]{8,}$/i, sc = /^[0-9a-z]+$/, ic = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ac = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, oc = /^[a-z0-9_-]{21}$/i, cc = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, lc = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, uc = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, dc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$"; 4214let Hn; 4215const fc = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, hc = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, mc = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, pc = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, gc = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, yc = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Fi = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", vc = new RegExp(`^${Fi}$`); 4216function $i(e) { 4217 let t = "[0-5]\\d"; 4218 e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`); 4219 const n = e.precision ? "+" : "?"; 4220 return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`; 4221} 4222function bc(e) { 4223 return new RegExp(`^${$i(e)}$`); 4224} 4225function _c(e) { 4226 let t = `${Fi}T${$i(e)}`; 4227 const n = []; 4228 return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, new RegExp(`^${t}$`); 4229} 4230function xc(e, t) { 4231 return !!((t === "v4" || !t) && fc.test(e) || (t === "v6" || !t) && mc.test(e)); 4232} 4233function Cc(e, t) { 4234 if (!cc.test(e)) 4235 return !1; 4236 try { 4237 const [n] = e.split("."); 4238 if (!n) 4239 return !1; 4240 const r = n.replace(/-/g, "+").replace(/_/g, "/").padEnd(n.length + (4 - n.length % 4) % 4, "="), s = JSON.parse(atob(r)); 4241 return !(typeof s != "object" || s === null || "typ" in s && (s == null ? void 0 : s.typ) !== "JWT" || !s.alg || t && s.alg !== t); 4242 } catch { 4243 return !1; 4244 } 4245} 4246function wc(e, t) { 4247 return !!((t === "v4" || !t) && hc.test(e) || (t === "v6" || !t) && pc.test(e)); 4248} 4249class lt extends ne { 4250 _parse(t) { 4251 if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== F.string) { 4252 const i = this._getOrReturnCtx(t); 4253 return P(i, { 4254 code: S.invalid_type, 4255 expected: F.string, 4256 received: i.parsedType 4257 }), X; 4258 } 4259 const r = new $e(); 4260 let s; 4261 for (const i of this._def.checks) 4262 if (i.kind === "min") 4263 t.data.length < i.value && (s = this._getOrReturnCtx(t, s), P(s, { 4264 code: S.too_small, 4265 minimum: i.value, 4266 type: "string", 4267 inclusive: !0, 4268 exact: !1, 4269 message: i.message 4270 }), r.dirty()); 4271 else if (i.kind === "max") 4272 t.data.length > i.value && (s = this._getOrReturnCtx(t, s), P(s, { 4273 code: S.too_big, 4274 maximum: i.value, 4275 type: "string", 4276 inclusive: !0, 4277 exact: !1, 4278 message: i.message 4279 }), r.dirty()); 4280 else if (i.kind === "length") { 4281 const a = t.data.length > i.value, o = t.data.length < i.value; 4282 (a || o) && (s = this._getOrReturnCtx(t, s), a ? P(s, { 4283 code: S.too_big, 4284 maximum: i.value, 4285 type: "string", 4286 inclusive: !0, 4287 exact: !0, 4288 message: i.message 4289 }) : o && P(s, { 4290 code: S.too_small, 4291 minimum: i.value, 4292 type: "string", 4293 inclusive: !0, 4294 exact: !0, 4295 message: i.message 4296 }), r.dirty()); 4297 } else if (i.kind === "email") 4298 uc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4299 validation: "email", 4300 code: S.invalid_string, 4301 message: i.message 4302 }), r.dirty()); 4303 else if (i.kind === "emoji") 4304 Hn || (Hn = new RegExp(dc, "u")), Hn.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4305 validation: "emoji", 4306 code: S.invalid_string, 4307 message: i.message 4308 }), r.dirty()); 4309 else if (i.kind === "uuid") 4310 ac.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4311 validation: "uuid", 4312 code: S.invalid_string, 4313 message: i.message 4314 }), r.dirty());
vendor: 3,191 bytes, lines 4315-4385
4315 else if (i.kind === "nanoid") 4316 oc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4317 validation: "nanoid", 4318 code: S.invalid_string, 4319 message: i.message 4320 }), r.dirty()); 4321 else if (i.kind === "cuid") 4322 rc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4323 validation: "cuid", 4324 code: S.invalid_string, 4325 message: i.message 4326 }), r.dirty()); 4327 else if (i.kind === "cuid2") 4328 sc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4329 validation: "cuid2", 4330 code: S.invalid_string, 4331 message: i.message 4332 }), r.dirty()); 4333 else if (i.kind === "ulid") 4334 ic.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4335 validation: "ulid", 4336 code: S.invalid_string, 4337 message: i.message 4338 }), r.dirty()); 4339 else if (i.kind === "url") 4340 try { 4341 new URL(t.data); 4342 } catch { 4343 s = this._getOrReturnCtx(t, s), P(s, { 4344 validation: "url", 4345 code: S.invalid_string, 4346 message: i.message 4347 }), r.dirty(); 4348 } 4349 else i.kind === "regex" ? (i.regex.lastIndex = 0, i.regex.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4350 validation: "regex", 4351 code: S.invalid_string, 4352 message: i.message 4353 }), r.dirty())) : i.kind === "trim" ? t.data = t.data.trim() : i.kind === "includes" ? t.data.includes(i.value, i.position) || (s = this._getOrReturnCtx(t, s), P(s, { 4354 code: S.invalid_string, 4355 validation: { includes: i.value, position: i.position }, 4356 message: i.message 4357 }), r.dirty()) : i.kind === "toLowerCase" ? t.data = t.data.toLowerCase() : i.kind === "toUpperCase" ? t.data = t.data.toUpperCase() : i.kind === "startsWith" ? t.data.startsWith(i.value) || (s = this._getOrReturnCtx(t, s), P(s, { 4358 code: S.invalid_string, 4359 validation: { startsWith: i.value }, 4360 message: i.message 4361 }), r.dirty()) : i.kind === "endsWith" ? t.data.endsWith(i.value) || (s = this._getOrReturnCtx(t, s), P(s, { 4362 code: S.invalid_string, 4363 validation: { endsWith: i.value }, 4364 message: i.message 4365 }), r.dirty()) : i.kind === "datetime" ? _c(i).test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4366 code: S.invalid_string, 4367 validation: "datetime", 4368 message: i.message 4369 }), r.dirty()) : i.kind === "date" ? vc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4370 code: S.invalid_string, 4371 validation: "date", 4372 message: i.message 4373 }), r.dirty()) : i.kind === "time" ? bc(i).test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4374 code: S.invalid_string, 4375 validation: "time", 4376 message: i.message 4377 }), r.dirty()) : i.kind === "duration" ? lc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4378 validation: "duration", 4379 code: S.invalid_string, 4380 message: i.message 4381 }), r.dirty()) : i.kind === "ip" ? xc(t.data, i.version) || (s = this._getOrReturnCtx(t, s), P(s, { 4382 validation: "ip", 4383 code: S.invalid_string, 4384 message: i.message 4385 }
vendor: 16,416 bytes, lines 4385-5017
4385), r.dirty()) : i.kind === "jwt" ? Cc(t.data, i.alg) || (s = this._getOrReturnCtx(t, s), P(s, { 4386 validation: "jwt", 4387 code: S.invalid_string, 4388 message: i.message 4389 }), r.dirty()) : i.kind === "cidr" ? wc(t.data, i.version) || (s = this._getOrReturnCtx(t, s), P(s, { 4390 validation: "cidr", 4391 code: S.invalid_string, 4392 message: i.message 4393 }), r.dirty()) : i.kind === "base64" ? gc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4394 validation: "base64", 4395 code: S.invalid_string, 4396 message: i.message 4397 }), r.dirty()) : i.kind === "base64url" ? yc.test(t.data) || (s = this._getOrReturnCtx(t, s), P(s, { 4398 validation: "base64url", 4399 code: S.invalid_string, 4400 message: i.message 4401 }), r.dirty()) : se.assertNever(i); 4402 return { status: r.value, value: t.data }; 4403 } 4404 _regex(t, n, r) { 4405 return this.refinement((s) => t.test(s), { 4406 validation: n, 4407 code: S.invalid_string, 4408 ...$.errToObj(r) 4409 }); 4410 } 4411 _addCheck(t) { 4412 return new lt({ 4413 ...this._def, 4414 checks: [...this._def.checks, t] 4415 }); 4416 } 4417 email(t) { 4418 return this._addCheck({ kind: "email", ...$.errToObj(t) }); 4419 } 4420 url(t) { 4421 return this._addCheck({ kind: "url", ...$.errToObj(t) }); 4422 } 4423 emoji(t) { 4424 return this._addCheck({ kind: "emoji", ...$.errToObj(t) }); 4425 } 4426 uuid(t) { 4427 return this._addCheck({ kind: "uuid", ...$.errToObj(t) }); 4428 } 4429 nanoid(t) { 4430 return this._addCheck({ kind: "nanoid", ...$.errToObj(t) }); 4431 } 4432 cuid(t) { 4433 return this._addCheck({ kind: "cuid", ...$.errToObj(t) }); 4434 } 4435 cuid2(t) { 4436 return this._addCheck({ kind: "cuid2", ...$.errToObj(t) }); 4437 } 4438 ulid(t) { 4439 return this._addCheck({ kind: "ulid", ...$.errToObj(t) }); 4440 } 4441 base64(t) { 4442 return this._addCheck({ kind: "base64", ...$.errToObj(t) }); 4443 } 4444 base64url(t) { 4445 return this._addCheck({ 4446 kind: "base64url", 4447 ...$.errToObj(t) 4448 }); 4449 } 4450 jwt(t) { 4451 return this._addCheck({ kind: "jwt", ...$.errToObj(t) }); 4452 } 4453 ip(t) { 4454 return this._addCheck({ kind: "ip", ...$.errToObj(t) }); 4455 } 4456 cidr(t) { 4457 return this._addCheck({ kind: "cidr", ...$.errToObj(t) }); 4458 } 4459 datetime(t) { 4460 return typeof t == "string" ? this._addCheck({ 4461 kind: "datetime", 4462 precision: null, 4463 offset: !1, 4464 local: !1, 4465 message: t 4466 }) : this._addCheck({ 4467 kind: "datetime", 4468 precision: typeof (t == null ? void 0 : t.precision) > "u" ? null : t == null ? void 0 : t.precision, 4469 offset: (t == null ? void 0 : t.offset) ?? !1, 4470 local: (t == null ? void 0 : t.local) ?? !1, 4471 ...$.errToObj(t == null ? void 0 : t.message) 4472 }); 4473 } 4474 date(t) { 4475 return this._addCheck({ kind: "date", message: t }); 4476 } 4477 time(t) { 4478 return typeof t == "string" ? this._addCheck({ 4479 kind: "time", 4480 precision: null, 4481 message: t 4482 }) : this._addCheck({ 4483 kind: "time", 4484 precision: typeof (t == null ? void 0 : t.precision) > "u" ? null : t == null ? void 0 : t.precision, 4485 ...$.errToObj(t == null ? void 0 : t.message) 4486 }); 4487 } 4488 duration(t) { 4489 return this._addCheck({ kind: "duration", ...$.errToObj(t) }); 4490 } 4491 regex(t, n) { 4492 return this._addCheck({ 4493 kind: "regex", 4494 regex: t, 4495 ...$.errToObj(n) 4496 }); 4497 } 4498 includes(t, n) { 4499 return this._addCheck({ 4500 kind: "includes", 4501 value: t, 4502 position: n == null ? void 0 : n.position, 4503 ...$.errToObj(n == null ? void 0 : n.message) 4504 }); 4505 } 4506 startsWith(t, n) { 4507 return this._addCheck({ 4508 kind: "startsWith", 4509 value: t, 4510 ...$.errToObj(n) 4511 }); 4512 } 4513 endsWith(t, n) { 4514 return this._addCheck({ 4515 kind: "endsWith", 4516 value: t, 4517 ...$.errToObj(n) 4518 }); 4519 } 4520 min(t, n) { 4521 return this._addCheck({ 4522 kind: "min", 4523 value: t, 4524 ...$.errToObj(n) 4525 }); 4526 } 4527 max(t, n) { 4528 return this._addCheck({ 4529 kind: "max", 4530 value: t, 4531 ...$.errToObj(n) 4532 }); 4533 } 4534 length(t, n) { 4535 return this._addCheck({ 4536 kind: "length", 4537 value: t, 4538 ...$.errToObj(n) 4539 }); 4540 } 4541 /** 4542 * Equivalent to `.min(1)` 4543 */ 4544 nonempty(t) { 4545 return this.min(1, $.errToObj(t)); 4546 } 4547 trim() { 4548 return new lt({ 4549 ...this._def, 4550 checks: [...this._def.checks, { kind: "trim" }] 4551 }); 4552 } 4553 toLowerCase() { 4554 return new lt({ 4555 ...this._def, 4556 checks: [...this._def.checks, { kind: "toLowerCase" }] 4557 }); 4558 } 4559 toUpperCase() { 4560 return new lt({ 4561 ...this._def, 4562 checks: [...this._def.checks, { kind: "toUpperCase" }] 4563 }); 4564 } 4565 get isDatetime() { 4566 return !!this._def.checks.find((t) => t.kind === "datetime"); 4567 } 4568 get isDate() { 4569 return !!this._def.checks.find((t) => t.kind === "date"); 4570 } 4571 get isTime() { 4572 return !!this._def.checks.find((t) => t.kind === "time"); 4573 } 4574 get isDuration() { 4575 return !!this._def.checks.find((t) => t.kind === "duration"); 4576 } 4577 get isEmail() { 4578 return !!this._def.checks.find((t) => t.kind === "email"); 4579 } 4580 get isURL() { 4581 return !!this._def.checks.find((t) => t.kind === "url"); 4582 } 4583 get isEmoji() { 4584 return !!this._def.checks.find((t) => t.kind === "emoji"); 4585 } 4586 get isUUID() { 4587 return !!this._def.checks.find((t) => t.kind === "uuid"); 4588 } 4589 get isNANOID() { 4590 return !!this._def.checks.find((t) => t.kind === "nanoid"); 4591 } 4592 get isCUID() { 4593 return !!this._def.checks.find((t) => t.kind === "cuid"); 4594 } 4595 get isCUID2() { 4596 return !!this._def.checks.find((t) => t.kind === "cuid2"); 4597 } 4598 get isULID() { 4599 return !!this._def.checks.find((t) => t.kind === "ulid"); 4600 } 4601 get isIP() { 4602 return !!this._def.checks.find((t) => t.kind === "ip"); 4603 } 4604 get isCIDR() { 4605 return !!this._def.checks.find((t) => t.kind === "cidr"); 4606 } 4607 get isBase64() { 4608 return !!this._def.checks.find((t) => t.kind === "base64"); 4609 } 4610 get isBase64url() { 4611 return !!this._def.checks.find((t) => t.kind === "base64url"); 4612 } 4613 get minLength() { 4614 let t = null; 4615 for (const n of this._def.checks) 4616 n.kind === "min" && (t === null || n.value > t) && (t = n.value); 4617 return t; 4618 } 4619 get maxLength() { 4620 let t = null; 4621 for (const n of this._def.checks) 4622 n.kind === "max" && (t === null || n.value < t) && (t = n.value); 4623 return t; 4624 } 4625} 4626lt.create = (e) => new lt({ 4627 checks: [], 4628 typeName: J.ZodString, 4629 coerce: (e == null ? void 0 : e.coerce) ?? !1, 4630 ...te(e) 4631}); 4632function kc(e, t) { 4633 const n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, s = n > r ? n : r, i = Number.parseInt(e.toFixed(s).replace(".", "")), a = Number.parseInt(t.toFixed(s).replace(".", "")); 4634 return i % a / 10 ** s; 4635} 4636class Xt extends ne { 4637 constructor() { 4638 super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; 4639 } 4640 _parse(t) { 4641 if (this._def.coerce && (t.data = Number(t.data)), this._getType(t) !== F.number) { 4642 const i = this._getOrReturnCtx(t); 4643 return P(i, { 4644 code: S.invalid_type, 4645 expected: F.number, 4646 received: i.parsedType 4647 }), X; 4648 } 4649 let r; 4650 const s = new $e(); 4651 for (const i of this._def.checks) 4652 i.kind === "int" ? se.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), P(r, { 4653 code: S.invalid_type, 4654 expected: "integer", 4655 received: "float", 4656 message: i.message 4657 }), s.dirty()) : i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), P(r, { 4658 code: S.too_small, 4659 minimum: i.value, 4660 type: "number", 4661 inclusive: i.inclusive, 4662 exact: !1, 4663 message: i.message 4664 }), s.dirty()) : i.kind === "max" ? (i.inclusive ? t.data > i.value : t.data >= i.value) && (r = this._getOrReturnCtx(t, r), P(r, { 4665 code: S.too_big, 4666 maximum: i.value, 4667 type: "number", 4668 inclusive: i.inclusive, 4669 exact: !1, 4670 message: i.message 4671 }), s.dirty()) : i.kind === "multipleOf" ? kc(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), P(r, { 4672 code: S.not_multiple_of, 4673 multipleOf: i.value, 4674 message: i.message 4675 }), s.dirty()) : i.kind === "finite" ? Number.isFinite(t.data) || (r = this._getOrReturnCtx(t, r), P(r, { 4676 code: S.not_finite, 4677 message: i.message 4678 }), s.dirty()) : se.assertNever(i); 4679 return { status: s.value, value: t.data }; 4680 } 4681 gte(t, n) { 4682 return this.setLimit("min", t, !0, $.toString(n)); 4683 } 4684 gt(t, n) { 4685 return this.setLimit("min", t, !1, $.toString(n)); 4686 } 4687 lte(t, n) { 4688 return this.setLimit("max", t, !0, $.toString(n)); 4689 } 4690 lt(t, n) { 4691 return this.setLimit("max", t, !1, $.toString(n)); 4692 } 4693 setLimit(t, n, r, s) { 4694 return new Xt({ 4695 ...this._def, 4696 checks: [ 4697 ...this._def.checks, 4698 { 4699 kind: t, 4700 value: n, 4701 inclusive: r, 4702 message: $.toString(s) 4703 } 4704 ] 4705 }); 4706 } 4707 _addCheck(t) { 4708 return new Xt({ 4709 ...this._def, 4710 checks: [...this._def.checks, t] 4711 }); 4712 } 4713 int(t) { 4714 return this._addCheck({ 4715 kind: "int", 4716 message: $.toString(t) 4717 }); 4718 } 4719 positive(t) { 4720 return this._addCheck({ 4721 kind: "min", 4722 value: 0, 4723 inclusive: !1, 4724 message: $.toString(t) 4725 }); 4726 } 4727 negative(t) { 4728 return this._addCheck({ 4729 kind: "max", 4730 value: 0, 4731 inclusive: !1, 4732 message: $.toString(t) 4733 }); 4734 } 4735 nonpositive(t) { 4736 return this._addCheck({ 4737 kind: "max", 4738 value: 0, 4739 inclusive: !0, 4740 message: $.toString(t) 4741 }); 4742 } 4743 nonnegative(t) { 4744 return this._addCheck({ 4745 kind: "min", 4746 value: 0, 4747 inclusive: !0, 4748 message: $.toString(t) 4749 }); 4750 } 4751 multipleOf(t, n) { 4752 return this._addCheck({ 4753 kind: "multipleOf", 4754 value: t, 4755 message: $.toString(n) 4756 }); 4757 } 4758 finite(t) { 4759 return this._addCheck({ 4760 kind: "finite", 4761 message: $.toString(t) 4762 }); 4763 } 4764 safe(t) { 4765 return this._addCheck({ 4766 kind: "min", 4767 inclusive: !0, 4768 value: Number.MIN_SAFE_INTEGER, 4769 message: $.toString(t) 4770 })._addCheck({ 4771 kind: "max", 4772 inclusive: !0, 4773 value: Number.MAX_SAFE_INTEGER, 4774 message: $.toString(t) 4775 }); 4776 } 4777 get minValue() { 4778 let t = null; 4779 for (const n of this._def.checks) 4780 n.kind === "min" && (t === null || n.value > t) && (t = n.value); 4781 return t; 4782 } 4783 get maxValue() { 4784 let t = null; 4785 for (const n of this._def.checks) 4786 n.kind === "max" && (t === null || n.value < t) && (t = n.value); 4787 return t; 4788 } 4789 get isInt() { 4790 return !!this._def.checks.find((t) => t.kind === "int" || t.kind === "multipleOf" && se.isInteger(t.value)); 4791 } 4792 get isFinite() { 4793 let t = null, n = null; 4794 for (const r of this._def.checks) { 4795 if (r.kind === "finite" || r.kind === "int" || r.kind === "multipleOf") 4796 return !0; 4797 r.kind === "min" ? (n === null || r.value > n) && (n = r.value) : r.kind === "max" && (t === null || r.value < t) && (t = r.value); 4798 } 4799 return Number.isFinite(n) && Number.isFinite(t); 4800 } 4801} 4802Xt.create = (e) => new Xt({ 4803 checks: [], 4804 typeName: J.ZodNumber, 4805 coerce: (e == null ? void 0 : e.coerce) || !1, 4806 ...te(e) 4807}); 4808class Jt extends ne { 4809 constructor() { 4810 super(...arguments), this.min = this.gte, this.max = this.lte; 4811 } 4812 _parse(t) { 4813 if (this._def.coerce) 4814 try { 4815 t.data = BigInt(t.data); 4816 } catch { 4817 return this._getInvalidInput(t); 4818 } 4819 if (this._getType(t) !== F.bigint) 4820 return this._getInvalidInput(t); 4821 let r; 4822 const s = new $e(); 4823 for (const i of this._def.checks) 4824 i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), P(r, { 4825 code: S.too_small, 4826 type: "bigint", 4827 minimum: i.value, 4828 inclusive: i.inclusive, 4829 message: i.message 4830 }), s.dirty()) : i.kind === "max" ? (i.inclusive ? t.data > i.value : t.data >= i.value) && (r = this._getOrReturnCtx(t, r), P(r, { 4831 code: S.too_big, 4832 type: "bigint", 4833 maximum: i.value, 4834 inclusive: i.inclusive, 4835 message: i.message 4836 }), s.dirty()) : i.kind === "multipleOf" ? t.data % i.value !== BigInt(0) && (r = this._getOrReturnCtx(t, r), P(r, { 4837 code: S.not_multiple_of, 4838 multipleOf: i.value, 4839 message: i.message 4840 }), s.dirty()) : se.assertNever(i); 4841 return { status: s.value, value: t.data }; 4842 } 4843 _getInvalidInput(t) { 4844 const n = this._getOrReturnCtx(t); 4845 return P(n, { 4846 code: S.invalid_type, 4847 expected: F.bigint, 4848 received: n.parsedType 4849 }), X; 4850 } 4851 gte(t, n) { 4852 return this.setLimit("min", t, !0, $.toString(n)); 4853 } 4854 gt(t, n) { 4855 return this.setLimit("min", t, !1, $.toString(n)); 4856 } 4857 lte(t, n) { 4858 return this.setLimit("max", t, !0, $.toString(n)); 4859 } 4860 lt(t, n) { 4861 return this.setLimit("max", t, !1, $.toString(n)); 4862 } 4863 setLimit(t, n, r, s) { 4864 return new Jt({ 4865 ...this._def, 4866 checks: [ 4867 ...this._def.checks, 4868 { 4869 kind: t, 4870 value: n, 4871 inclusive: r, 4872 message: $.toString(s) 4873 } 4874 ] 4875 }); 4876 } 4877 _addCheck(t) { 4878 return new Jt({ 4879 ...this._def, 4880 checks: [...this._def.checks, t] 4881 }); 4882 } 4883 positive(t) { 4884 return this._addCheck({ 4885 kind: "min", 4886 value: BigInt(0), 4887 inclusive: !1, 4888 message: $.toString(t) 4889 }); 4890 } 4891 negative(t) { 4892 return this._addCheck({ 4893 kind: "max", 4894 value: BigInt(0), 4895 inclusive: !1, 4896 message: $.toString(t) 4897 }); 4898 } 4899 nonpositive(t) { 4900 return this._addCheck({ 4901 kind: "max", 4902 value: BigInt(0), 4903 inclusive: !0, 4904 message: $.toString(t) 4905 }); 4906 } 4907 nonnegative(t) { 4908 return this._addCheck({ 4909 kind: "min", 4910 value: BigInt(0), 4911 inclusive: !0, 4912 message: $.toString(t) 4913 }); 4914 } 4915 multipleOf(t, n) { 4916 return this._addCheck({ 4917 kind: "multipleOf", 4918 value: t, 4919 message: $.toString(n) 4920 }); 4921 } 4922 get minValue() { 4923 let t = null; 4924 for (const n of this._def.checks) 4925 n.kind === "min" && (t === null || n.value > t) && (t = n.value); 4926 return t; 4927 } 4928 get maxValue() { 4929 let t = null; 4930 for (const n of this._def.checks) 4931 n.kind === "max" && (t === null || n.value < t) && (t = n.value); 4932 return t; 4933 } 4934} 4935Jt.create = (e) => new Jt({ 4936 checks: [], 4937 typeName: J.ZodBigInt, 4938 coerce: (e == null ? void 0 : e.coerce) ?? !1, 4939 ...te(e) 4940}); 4941class ys extends ne { 4942 _parse(t) { 4943 if (this._def.coerce && (t.data = !!t.data), this._getType(t) !== F.boolean) { 4944 const r = this._getOrReturnCtx(t); 4945 return P(r, { 4946 code: S.invalid_type, 4947 expected: F.boolean, 4948 received: r.parsedType 4949 }), X; 4950 } 4951 return We(t.data); 4952 } 4953} 4954ys.create = (e) => new ys({ 4955 typeName: J.ZodBoolean, 4956 coerce: (e == null ? void 0 : e.coerce) || !1, 4957 ...te(e) 4958}); 4959class kn extends ne { 4960 _parse(t) { 4961 if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== F.date) { 4962 const i = this._getOrReturnCtx(t); 4963 return P(i, { 4964 code: S.invalid_type, 4965 expected: F.date, 4966 received: i.parsedType 4967 }), X; 4968 } 4969 if (Number.isNaN(t.data.getTime())) { 4970 const i = this._getOrReturnCtx(t); 4971 return P(i, { 4972 code: S.invalid_date 4973 }), X; 4974 } 4975 const r = new $e(); 4976 let s; 4977 for (const i of this._def.checks) 4978 i.kind === "min" ? t.data.getTime() < i.value && (s = this._getOrReturnCtx(t, s), P(s, { 4979 code: S.too_small, 4980 message: i.message, 4981 inclusive: !0, 4982 exact: !1, 4983 minimum: i.value, 4984 type: "date" 4985 }), r.dirty()) : i.kind === "max" ? t.data.getTime() > i.value && (s = this._getOrReturnCtx(t, s), P(s, { 4986 code: S.too_big, 4987 message: i.message, 4988 inclusive: !0, 4989 exact: !1, 4990 maximum: i.value, 4991 type: "date" 4992 }), r.dirty()) : se.assertNever(i); 4993 return { 4994 status: r.value, 4995 value: new Date(t.data.getTime()) 4996 }; 4997 } 4998 _addCheck(t) { 4999 return new kn({ 5000 ...this._def, 5001 checks: [...this._def.checks, t] 5002 }); 5003 } 5004 min(t, n) { 5005 return this._addCheck({ 5006 kind: "min", 5007 value: t.getTime(), 5008 message: $.toString(n) 5009 }); 5010 } 5011 max(t, n) { 5012 return this._addCheck({ 5013 kind: "max", 5014 value: t.getTime(), 5015 message: $.toString(n) 5016 }); 5017 }
vendor: 4,566 bytes, lines 5018-5212
5018 get minDate() { 5019 let t = null; 5020 for (const n of this._def.checks) 5021 n.kind === "min" && (t === null || n.value > t) && (t = n.value); 5022 return t != null ? new Date(t) : null; 5023 } 5024 get maxDate() { 5025 let t = null; 5026 for (const n of this._def.checks) 5027 n.kind === "max" && (t === null || n.value < t) && (t = n.value); 5028 return t != null ? new Date(t) : null; 5029 } 5030} 5031kn.create = (e) => new kn({ 5032 checks: [], 5033 coerce: (e == null ? void 0 : e.coerce) || !1, 5034 typeName: J.ZodDate, 5035 ...te(e) 5036}); 5037class vs extends ne { 5038 _parse(t) { 5039 if (this._getType(t) !== F.symbol) { 5040 const r = this._getOrReturnCtx(t); 5041 return P(r, { 5042 code: S.invalid_type, 5043 expected: F.symbol, 5044 received: r.parsedType 5045 }), X; 5046 } 5047 return We(t.data); 5048 } 5049} 5050vs.create = (e) => new vs({ 5051 typeName: J.ZodSymbol, 5052 ...te(e) 5053}); 5054class bs extends ne { 5055 _parse(t) { 5056 if (this._getType(t) !== F.undefined) { 5057 const r = this._getOrReturnCtx(t); 5058 return P(r, { 5059 code: S.invalid_type, 5060 expected: F.undefined, 5061 received: r.parsedType 5062 }), X; 5063 } 5064 return We(t.data); 5065 } 5066} 5067bs.create = (e) => new bs({ 5068 typeName: J.ZodUndefined, 5069 ...te(e) 5070}); 5071class _s extends ne { 5072 _parse(t) { 5073 if (this._getType(t) !== F.null) { 5074 const r = this._getOrReturnCtx(t); 5075 return P(r, { 5076 code: S.invalid_type, 5077 expected: F.null, 5078 received: r.parsedType 5079 }), X; 5080 } 5081 return We(t.data); 5082 } 5083} 5084_s.create = (e) => new _s({ 5085 typeName: J.ZodNull, 5086 ...te(e) 5087}); 5088class xs extends ne { 5089 constructor() { 5090 super(...arguments), this._any = !0; 5091 } 5092 _parse(t) { 5093 return We(t.data); 5094 } 5095} 5096xs.create = (e) => new xs({ 5097 typeName: J.ZodAny, 5098 ...te(e) 5099}); 5100class Cs extends ne { 5101 constructor() { 5102 super(...arguments), this._unknown = !0; 5103 } 5104 _parse(t) { 5105 return We(t.data); 5106 } 5107} 5108Cs.create = (e) => new Cs({ 5109 typeName: J.ZodUnknown, 5110 ...te(e) 5111}); 5112class ft extends ne { 5113 _parse(t) { 5114 const n = this._getOrReturnCtx(t); 5115 return P(n, { 5116 code: S.invalid_type, 5117 expected: F.never, 5118 received: n.parsedType 5119 }), X; 5120 } 5121} 5122ft.create = (e) => new ft({ 5123 typeName: J.ZodNever, 5124 ...te(e) 5125}); 5126class ws extends ne { 5127 _parse(t) { 5128 if (this._getType(t) !== F.undefined) { 5129 const r = this._getOrReturnCtx(t); 5130 return P(r, { 5131 code: S.invalid_type, 5132 expected: F.void, 5133 received: r.parsedType 5134 }), X; 5135 } 5136 return We(t.data); 5137 } 5138} 5139ws.create = (e) => new ws({ 5140 typeName: J.ZodVoid, 5141 ...te(e) 5142}); 5143class Je extends ne { 5144 _parse(t) { 5145 const { ctx: n, status: r } = this._processInputParams(t), s = this._def; 5146 if (n.parsedType !== F.array) 5147 return P(n, { 5148 code: S.invalid_type, 5149 expected: F.array, 5150 received: n.parsedType 5151 }), X; 5152 if (s.exactLength !== null) { 5153 const a = n.data.length > s.exactLength.value, o = n.data.length < s.exactLength.value; 5154 (a || o) && (P(n, { 5155 code: a ? S.too_big : S.too_small, 5156 minimum: o ? s.exactLength.value : void 0, 5157 maximum: a ? s.exactLength.value : void 0, 5158 type: "array", 5159 inclusive: !0, 5160 exact: !0, 5161 message: s.exactLength.message 5162 }), r.dirty()); 5163 } 5164 if (s.minLength !== null && n.data.length < s.minLength.value && (P(n, { 5165 code: S.too_small, 5166 minimum: s.minLength.value, 5167 type: "array", 5168 inclusive: !0, 5169 exact: !1, 5170 message: s.minLength.message 5171 }), r.dirty()), s.maxLength !== null && n.data.length > s.maxLength.value && (P(n, { 5172 code: S.too_big, 5173 maximum: s.maxLength.value, 5174 type: "array", 5175 inclusive: !0, 5176 exact: !1, 5177 message: s.maxLength.message 5178 }), r.dirty()), n.common.async) 5179 return Promise.all([...n.data].map((a, o) => s.type._parseAsync(new dt(n, a, n.path, o)))).then((a) => $e.mergeArray(r, a)); 5180 const i = [...n.data].map((a, o) => s.type._parseSync(new dt(n, a, n.path, o))); 5181 return $e.mergeArray(r, i); 5182 } 5183 get element() { 5184 return this._def.type; 5185 } 5186 min(t, n) { 5187 return new Je({ 5188 ...this._def, 5189 minLength: { value: t, message: $.toString(n) } 5190 }); 5191 } 5192 max(t, n) { 5193 return new Je({ 5194 ...this._def, 5195 maxLength: { value: t, message: $.toString(n) } 5196 }); 5197 } 5198 length(t, n) { 5199 return new Je({ 5200 ...this._def, 5201 exactLength: { value: t, message: $.toString(n) } 5202 }); 5203 } 5204 nonempty(t) { 5205 return this.min(1, t); 5206 } 5207} 5208Je.create = (e, t) => new Je({ 5209 type: e, 5210 minLength: null, 5211 maxLength: null, 5212 exactLength: null,
vendor: 21,763 bytes, lines 5213-6027
5213 typeName: J.ZodArray, 5214 ...te(t) 5215}); 5216function Et(e) { 5217 if (e instanceof be) { 5218 const t = {}; 5219 for (const n in e.shape) { 5220 const r = e.shape[n]; 5221 t[n] = ut.create(Et(r)); 5222 } 5223 return new be({ 5224 ...e._def, 5225 shape: () => t 5226 }); 5227 } else return e instanceof Je ? new Je({ 5228 ...e._def, 5229 type: Et(e.element) 5230 }) : e instanceof ut ? ut.create(Et(e.unwrap())) : e instanceof Lt ? Lt.create(Et(e.unwrap())) : e instanceof yt ? yt.create(e.items.map((t) => Et(t))) : e; 5231} 5232class be extends ne { 5233 constructor() { 5234 super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; 5235 } 5236 _getCached() { 5237 if (this._cached !== null) 5238 return this._cached; 5239 const t = this._def.shape(), n = se.objectKeys(t); 5240 return this._cached = { shape: t, keys: n }, this._cached; 5241 } 5242 _parse(t) { 5243 if (this._getType(t) !== F.object) { 5244 const u = this._getOrReturnCtx(t); 5245 return P(u, { 5246 code: S.invalid_type, 5247 expected: F.object, 5248 received: u.parsedType 5249 }), X; 5250 } 5251 const { status: r, ctx: s } = this._processInputParams(t), { shape: i, keys: a } = this._getCached(), o = []; 5252 if (!(this._def.catchall instanceof ft && this._def.unknownKeys === "strip")) 5253 for (const u in s.data) 5254 a.includes(u) || o.push(u); 5255 const c = []; 5256 for (const u of a) { 5257 const d = i[u], h = s.data[u]; 5258 c.push({ 5259 key: { status: "valid", value: u }, 5260 value: d._parse(new dt(s, h, s.path, u)), 5261 alwaysSet: u in s.data 5262 }); 5263 } 5264 if (this._def.catchall instanceof ft) { 5265 const u = this._def.unknownKeys; 5266 if (u === "passthrough") 5267 for (const d of o) 5268 c.push({ 5269 key: { status: "valid", value: d }, 5270 value: { status: "valid", value: s.data[d] } 5271 }); 5272 else if (u === "strict") 5273 o.length > 0 && (P(s, { 5274 code: S.unrecognized_keys, 5275 keys: o 5276 }), r.dirty()); 5277 else if (u !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value."); 5278 } else { 5279 const u = this._def.catchall; 5280 for (const d of o) { 5281 const h = s.data[d]; 5282 c.push({ 5283 key: { status: "valid", value: d }, 5284 value: u._parse( 5285 new dt(s, h, s.path, d) 5286 //, ctx.child(key), value, getParsedType(value) 5287 ), 5288 alwaysSet: d in s.data 5289 }); 5290 } 5291 } 5292 return s.common.async ? Promise.resolve().then(async () => { 5293 const u = []; 5294 for (const d of c) { 5295 const h = await d.key, g = await d.value; 5296 u.push({ 5297 key: h, 5298 value: g, 5299 alwaysSet: d.alwaysSet 5300 }); 5301 } 5302 return u; 5303 }).then((u) => $e.mergeObjectSync(r, u)) : $e.mergeObjectSync(r, c); 5304 } 5305 get shape() { 5306 return this._def.shape(); 5307 } 5308 strict(t) { 5309 return $.errToObj, new be({ 5310 ...this._def, 5311 unknownKeys: "strict", 5312 ...t !== void 0 ? { 5313 errorMap: (n, r) => { 5314 var i, a; 5315 const s = ((a = (i = this._def).errorMap) == null ? void 0 : a.call(i, n, r).message) ?? r.defaultError; 5316 return n.code === "unrecognized_keys" ? { 5317 message: $.errToObj(t).message ?? s 5318 } : { 5319 message: s 5320 }; 5321 } 5322 } : {} 5323 }); 5324 } 5325 strip() { 5326 return new be({ 5327 ...this._def, 5328 unknownKeys: "strip" 5329 }); 5330 } 5331 passthrough() { 5332 return new be({ 5333 ...this._def, 5334 unknownKeys: "passthrough" 5335 }); 5336 } 5337 // const AugmentFactory = 5338 // <Def extends ZodObjectDef>(def: Def) => 5339 // <Augmentation extends ZodRawShape>( 5340 // augmentation: Augmentation 5341 // ): ZodObject< 5342 // extendShape<ReturnType<Def["shape"]>, Augmentation>, 5343 // Def["unknownKeys"], 5344 // Def["catchall"] 5345 // > => { 5346 // return new ZodObject({ 5347 // ...def, 5348 // shape: () => ({ 5349 // ...def.shape(), 5350 // ...augmentation, 5351 // }), 5352 // }) as any; 5353 // }; 5354 extend(t) { 5355 return new be({ 5356 ...this._def, 5357 shape: () => ({ 5358 ...this._def.shape(), 5359 ...t 5360 }) 5361 }); 5362 } 5363 /** 5364 * Prior to [email protected] there was a bug in the 5365 * inferred type of merged objects. Please 5366 * upgrade if you are experiencing issues. 5367 */ 5368 merge(t) { 5369 return new be({ 5370 unknownKeys: t._def.unknownKeys, 5371 catchall: t._def.catchall, 5372 shape: () => ({ 5373 ...this._def.shape(), 5374 ...t._def.shape() 5375 }), 5376 typeName: J.ZodObject 5377 }); 5378 } 5379 // merge< 5380 // Incoming extends AnyZodObject, 5381 // Augmentation extends Incoming["shape"], 5382 // NewOutput extends { 5383 // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation 5384 // ? Augmentation[k]["_output"] 5385 // : k extends keyof Output 5386 // ? Output[k] 5387 // : never; 5388 // }, 5389 // NewInput extends { 5390 // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation 5391 // ? Augmentation[k]["_input"] 5392 // : k extends keyof Input 5393 // ? Input[k] 5394 // : never; 5395 // } 5396 // >( 5397 // merging: Incoming 5398 // ): ZodObject< 5399 // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>, 5400 // Incoming["_def"]["unknownKeys"], 5401 // Incoming["_def"]["catchall"], 5402 // NewOutput, 5403 // NewInput 5404 // > { 5405 // const merged: any = new ZodObject({ 5406 // unknownKeys: merging._def.unknownKeys, 5407 // catchall: merging._def.catchall, 5408 // shape: () => 5409 // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), 5410 // typeName: ZodFirstPartyTypeKind.ZodObject, 5411 // }) as any; 5412 // return merged; 5413 // } 5414 setKey(t, n) { 5415 return this.augment({ [t]: n }); 5416 } 5417 // merge<Incoming extends AnyZodObject>( 5418 // merging: Incoming 5419 // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => { 5420 // ZodObject< 5421 // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>, 5422 // Incoming["_def"]["unknownKeys"], 5423 // Incoming["_def"]["catchall"] 5424 // > { 5425 // // const mergedShape = objectUtil.mergeShapes( 5426 // // this._def.shape(), 5427 // // merging._def.shape() 5428 // // ); 5429 // const merged: any = new ZodObject({ 5430 // unknownKeys: merging._def.unknownKeys, 5431 // catchall: merging._def.catchall, 5432 // shape: () => 5433 // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), 5434 // typeName: ZodFirstPartyTypeKind.ZodObject, 5435 // }) as any; 5436 // return merged; 5437 // } 5438 catchall(t) { 5439 return new be({ 5440 ...this._def, 5441 catchall: t 5442 }); 5443 } 5444 pick(t) { 5445 const n = {}; 5446 for (const r of se.objectKeys(t)) 5447 t[r] && this.shape[r] && (n[r] = this.shape[r]); 5448 return new be({ 5449 ...this._def, 5450 shape: () => n 5451 }); 5452 } 5453 omit(t) { 5454 const n = {}; 5455 for (const r of se.objectKeys(this.shape)) 5456 t[r] || (n[r] = this.shape[r]); 5457 return new be({ 5458 ...this._def, 5459 shape: () => n 5460 }); 5461 } 5462 /** 5463 * @deprecated 5464 */ 5465 deepPartial() { 5466 return Et(this); 5467 } 5468 partial(t) { 5469 const n = {}; 5470 for (const r of se.objectKeys(this.shape)) { 5471 const s = this.shape[r]; 5472 t && !t[r] ? n[r] = s : n[r] = s.optional(); 5473 } 5474 return new be({ 5475 ...this._def, 5476 shape: () => n 5477 }); 5478 } 5479 required(t) { 5480 const n = {}; 5481 for (const r of se.objectKeys(this.shape)) 5482 if (t && !t[r]) 5483 n[r] = this.shape[r]; 5484 else { 5485 let i = this.shape[r]; 5486 for (; i instanceof ut; ) 5487 i = i._def.innerType; 5488 n[r] = i; 5489 } 5490 return new be({ 5491 ...this._def, 5492 shape: () => n 5493 }); 5494 } 5495 keyof() { 5496 return Zi(se.objectKeys(this.shape)); 5497 } 5498} 5499be.create = (e, t) => new be({ 5500 shape: () => e, 5501 unknownKeys: "strip", 5502 catchall: ft.create(), 5503 typeName: J.ZodObject, 5504 ...te(t) 5505}); 5506be.strictCreate = (e, t) => new be({ 5507 shape: () => e, 5508 unknownKeys: "strict", 5509 catchall: ft.create(), 5510 typeName: J.ZodObject, 5511 ...te(t) 5512}); 5513be.lazycreate = (e, t) => new be({ 5514 shape: e, 5515 unknownKeys: "strip", 5516 catchall: ft.create(), 5517 typeName: J.ZodObject, 5518 ...te(t) 5519}); 5520class jn extends ne { 5521 _parse(t) { 5522 const { ctx: n } = this._processInputParams(t), r = this._def.options; 5523 function s(i) { 5524 for (const o of i) 5525 if (o.result.status === "valid") 5526 return o.result; 5527 for (const o of i) 5528 if (o.result.status === "dirty") 5529 return n.common.issues.push(...o.ctx.common.issues), o.result; 5530 const a = i.map((o) => new et(o.ctx.common.issues)); 5531 return P(n, { 5532 code: S.invalid_union, 5533 unionErrors: a 5534 }), X; 5535 } 5536 if (n.common.async) 5537 return Promise.all(r.map(async (i) => { 5538 const a = { 5539 ...n, 5540 common: { 5541 ...n.common, 5542 issues: [] 5543 }, 5544 parent: null 5545 }; 5546 return { 5547 result: await i._parseAsync({ 5548 data: n.data, 5549 path: n.path, 5550 parent: a 5551 }), 5552 ctx: a 5553 }; 5554 })).then(s); 5555 { 5556 let i; 5557 const a = []; 5558 for (const c of r) { 5559 const u = { 5560 ...n, 5561 common: { 5562 ...n.common, 5563 issues: [] 5564 }, 5565 parent: null 5566 }, d = c._parseSync({ 5567 data: n.data, 5568 path: n.path, 5569 parent: u 5570 }); 5571 if (d.status === "valid") 5572 return d; 5573 d.status === "dirty" && !i && (i = { result: d, ctx: u }), u.common.issues.length && a.push(u.common.issues); 5574 } 5575 if (i) 5576 return n.common.issues.push(...i.ctx.common.issues), i.result; 5577 const o = a.map((c) => new et(c)); 5578 return P(n, { 5579 code: S.invalid_union, 5580 unionErrors: o 5581 }), X; 5582 } 5583 } 5584 get options() { 5585 return this._def.options; 5586 } 5587} 5588jn.create = (e, t) => new jn({ 5589 options: e, 5590 typeName: J.ZodUnion, 5591 ...te(t) 5592}); 5593function or(e, t) { 5594 const n = ot(e), r = ot(t); 5595 if (e === t) 5596 return { valid: !0, data: e }; 5597 if (n === F.object && r === F.object) { 5598 const s = se.objectKeys(t), i = se.objectKeys(e).filter((o) => s.indexOf(o) !== -1), a = { ...e, ...t }; 5599 for (const o of i) { 5600 const c = or(e[o], t[o]); 5601 if (!c.valid) 5602 return { valid: !1 }; 5603 a[o] = c.data; 5604 } 5605 return { valid: !0, data: a }; 5606 } else if (n === F.array && r === F.array) { 5607 if (e.length !== t.length) 5608 return { valid: !1 }; 5609 const s = []; 5610 for (let i = 0; i < e.length; i++) { 5611 const a = e[i], o = t[i], c = or(a, o); 5612 if (!c.valid) 5613 return { valid: !1 }; 5614 s.push(c.data); 5615 } 5616 return { valid: !0, data: s }; 5617 } else return n === F.date && r === F.date && +e == +t ? { valid: !0, data: e } : { valid: !1 }; 5618} 5619class Sn extends ne { 5620 _parse(t) { 5621 const { status: n, ctx: r } = this._processInputParams(t), s = (i, a) => { 5622 if (ms(i) || ms(a)) 5623 return X; 5624 const o = or(i.value, a.value); 5625 return o.valid ? ((ps(i) || ps(a)) && n.dirty(), { status: n.value, value: o.data }) : (P(r, { 5626 code: S.invalid_intersection_types 5627 }), X); 5628 }; 5629 return r.common.async ? Promise.all([ 5630 this._def.left._parseAsync({ 5631 data: r.data, 5632 path: r.path, 5633 parent: r 5634 }), 5635 this._def.right._parseAsync({ 5636 data: r.data, 5637 path: r.path, 5638 parent: r 5639 }) 5640 ]).then(([i, a]) => s(i, a)) : s(this._def.left._parseSync({ 5641 data: r.data, 5642 path: r.path, 5643 parent: r 5644 }), this._def.right._parseSync({ 5645 data: r.data, 5646 path: r.path, 5647 parent: r 5648 })); 5649 } 5650} 5651Sn.create = (e, t, n) => new Sn({ 5652 left: e, 5653 right: t, 5654 typeName: J.ZodIntersection, 5655 ...te(n) 5656}); 5657class yt extends ne { 5658 _parse(t) { 5659 const { status: n, ctx: r } = this._processInputParams(t); 5660 if (r.parsedType !== F.array) 5661 return P(r, { 5662 code: S.invalid_type, 5663 expected: F.array, 5664 received: r.parsedType 5665 }), X; 5666 if (r.data.length < this._def.items.length) 5667 return P(r, { 5668 code: S.too_small, 5669 minimum: this._def.items.length, 5670 inclusive: !0, 5671 exact: !1, 5672 type: "array" 5673 }), X; 5674 !this._def.rest && r.data.length > this._def.items.length && (P(r, { 5675 code: S.too_big, 5676 maximum: this._def.items.length, 5677 inclusive: !0, 5678 exact: !1, 5679 type: "array" 5680 }), n.dirty()); 5681 const i = [...r.data].map((a, o) => { 5682 const c = this._def.items[o] || this._def.rest; 5683 return c ? c._parse(new dt(r, a, r.path, o)) : null; 5684 }).filter((a) => !!a); 5685 return r.common.async ? Promise.all(i).then((a) => $e.mergeArray(n, a)) : $e.mergeArray(n, i); 5686 } 5687 get items() { 5688 return this._def.items; 5689 } 5690 rest(t) { 5691 return new yt({ 5692 ...this._def, 5693 rest: t 5694 }); 5695 } 5696} 5697yt.create = (e, t) => { 5698 if (!Array.isArray(e)) 5699 throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); 5700 return new yt({ 5701 items: e, 5702 typeName: J.ZodTuple, 5703 rest: null, 5704 ...te(t) 5705 }); 5706}; 5707class ks extends ne { 5708 get keySchema() { 5709 return this._def.keyType; 5710 } 5711 get valueSchema() { 5712 return this._def.valueType; 5713 } 5714 _parse(t) { 5715 const { status: n, ctx: r } = this._processInputParams(t); 5716 if (r.parsedType !== F.map) 5717 return P(r, { 5718 code: S.invalid_type, 5719 expected: F.map, 5720 received: r.parsedType 5721 }), X; 5722 const s = this._def.keyType, i = this._def.valueType, a = [...r.data.entries()].map(([o, c], u) => ({ 5723 key: s._parse(new dt(r, o, r.path, [u, "key"])), 5724 value: i._parse(new dt(r, c, r.path, [u, "value"])) 5725 })); 5726 if (r.common.async) { 5727 const o = /* @__PURE__ */ new Map(); 5728 return Promise.resolve().then(async () => { 5729 for (const c of a) { 5730 const u = await c.key, d = await c.value; 5731 if (u.status === "aborted" || d.status === "aborted") 5732 return X; 5733 (u.status === "dirty" || d.status === "dirty") && n.dirty(), o.set(u.value, d.value); 5734 } 5735 return { status: n.value, value: o }; 5736 }); 5737 } else { 5738 const o = /* @__PURE__ */ new Map(); 5739 for (const c of a) { 5740 const u = c.key, d = c.value; 5741 if (u.status === "aborted" || d.status === "aborted") 5742 return X; 5743 (u.status === "dirty" || d.status === "dirty") && n.dirty(), o.set(u.value, d.value); 5744 } 5745 return { status: n.value, value: o }; 5746 } 5747 } 5748} 5749ks.create = (e, t, n) => new ks({ 5750 valueType: t, 5751 keyType: e, 5752 typeName: J.ZodMap, 5753 ...te(n) 5754}); 5755class qt extends ne { 5756 _parse(t) { 5757 const { status: n, ctx: r } = this._processInputParams(t); 5758 if (r.parsedType !== F.set) 5759 return P(r, { 5760 code: S.invalid_type, 5761 expected: F.set, 5762 received: r.parsedType 5763 }), X; 5764 const s = this._def; 5765 s.minSize !== null && r.data.size < s.minSize.value && (P(r, { 5766 code: S.too_small, 5767 minimum: s.minSize.value, 5768 type: "set", 5769 inclusive: !0, 5770 exact: !1, 5771 message: s.minSize.message 5772 }), n.dirty()), s.maxSize !== null && r.data.size > s.maxSize.value && (P(r, { 5773 code: S.too_big, 5774 maximum: s.maxSize.value, 5775 type: "set", 5776 inclusive: !0, 5777 exact: !1, 5778 message: s.maxSize.message 5779 }), n.dirty()); 5780 const i = this._def.valueType; 5781 function a(c) { 5782 const u = /* @__PURE__ */ new Set(); 5783 for (const d of c) { 5784 if (d.status === "aborted") 5785 return X; 5786 d.status === "dirty" && n.dirty(), u.add(d.value); 5787 } 5788 return { status: n.value, value: u }; 5789 } 5790 const o = [...r.data.values()].map((c, u) => i._parse(new dt(r, c, r.path, u))); 5791 return r.common.async ? Promise.all(o).then((c) => a(c)) : a(o); 5792 } 5793 min(t, n) { 5794 return new qt({ 5795 ...this._def, 5796 minSize: { value: t, message: $.toString(n) } 5797 }); 5798 } 5799 max(t, n) { 5800 return new qt({ 5801 ...this._def, 5802 maxSize: { value: t, message: $.toString(n) } 5803 }); 5804 } 5805 size(t, n) { 5806 return this.min(t, n).max(t, n); 5807 } 5808 nonempty(t) { 5809 return this.min(1, t); 5810 } 5811} 5812qt.create = (e, t) => new qt({ 5813 valueType: e, 5814 minSize: null, 5815 maxSize: null, 5816 typeName: J.ZodSet, 5817 ...te(t) 5818}); 5819class js extends ne { 5820 get schema() { 5821 return this._def.getter(); 5822 } 5823 _parse(t) { 5824 const { ctx: n } = this._processInputParams(t); 5825 return this._def.getter()._parse({ data: n.data, path: n.path, parent: n }); 5826 } 5827} 5828js.create = (e, t) => new js({ 5829 getter: e, 5830 typeName: J.ZodLazy, 5831 ...te(t) 5832}); 5833class Ss extends ne { 5834 _parse(t) { 5835 if (t.data !== this._def.value) { 5836 const n = this._getOrReturnCtx(t); 5837 return P(n, { 5838 received: n.data, 5839 code: S.invalid_literal, 5840 expected: this._def.value 5841 }), X; 5842 } 5843 return { status: "valid", value: t.data }; 5844 } 5845 get value() { 5846 return this._def.value; 5847 } 5848} 5849Ss.create = (e, t) => new Ss({ 5850 value: e, 5851 typeName: J.ZodLiteral, 5852 ...te(t) 5853}); 5854function Zi(e, t) { 5855 return new Tt({ 5856 values: e, 5857 typeName: J.ZodEnum, 5858 ...te(t) 5859 }); 5860} 5861class Tt extends ne { 5862 _parse(t) { 5863 if (typeof t.data != "string") { 5864 const n = this._getOrReturnCtx(t), r = this._def.values; 5865 return P(n, { 5866 expected: se.joinValues(r), 5867 received: n.parsedType, 5868 code: S.invalid_type 5869 }), X; 5870 } 5871 if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(t.data)) { 5872 const n = this._getOrReturnCtx(t), r = this._def.values; 5873 return P(n, { 5874 received: n.data, 5875 code: S.invalid_enum_value, 5876 options: r 5877 }), X; 5878 } 5879 return We(t.data); 5880 } 5881 get options() { 5882 return this._def.values; 5883 } 5884 get enum() { 5885 const t = {}; 5886 for (const n of this._def.values) 5887 t[n] = n; 5888 return t; 5889 } 5890 get Values() { 5891 const t = {}; 5892 for (const n of this._def.values) 5893 t[n] = n; 5894 return t; 5895 } 5896 get Enum() { 5897 const t = {}; 5898 for (const n of this._def.values) 5899 t[n] = n; 5900 return t; 5901 } 5902 extract(t, n = this._def) { 5903 return Tt.create(t, { 5904 ...this._def, 5905 ...n 5906 }); 5907 } 5908 exclude(t, n = this._def) { 5909 return Tt.create(this.options.filter((r) => !t.includes(r)), { 5910 ...this._def, 5911 ...n 5912 }); 5913 } 5914} 5915Tt.create = Zi; 5916class Es extends ne { 5917 _parse(t) { 5918 const n = se.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t); 5919 if (r.parsedType !== F.string && r.parsedType !== F.number) { 5920 const s = se.objectValues(n); 5921 return P(r, { 5922 expected: se.joinValues(s), 5923 received: r.parsedType, 5924 code: S.invalid_type 5925 }), X; 5926 } 5927 if (this._cache || (this._cache = new Set(se.getValidEnumValues(this._def.values))), !this._cache.has(t.data)) { 5928 const s = se.objectValues(n); 5929 return P(r, { 5930 received: r.data, 5931 code: S.invalid_enum_value, 5932 options: s 5933 }), X; 5934 } 5935 return We(t.data); 5936 } 5937 get enum() { 5938 return this._def.values; 5939 } 5940} 5941Es.create = (e, t) => new Es({ 5942 values: e, 5943 typeName: J.ZodNativeEnum, 5944 ...te(t) 5945}); 5946class En extends ne { 5947 unwrap() { 5948 return this._def.type; 5949 } 5950 _parse(t) { 5951 const { ctx: n } = this._processInputParams(t); 5952 if (n.parsedType !== F.promise && n.common.async === !1) 5953 return P(n, { 5954 code: S.invalid_type, 5955 expected: F.promise, 5956 received: n.parsedType 5957 }), X; 5958 const r = n.parsedType === F.promise ? n.data : Promise.resolve(n.data); 5959 return We(r.then((s) => this._def.type.parseAsync(s, { 5960 path: n.path, 5961 errorMap: n.common.contextualErrorMap 5962 }))); 5963 } 5964} 5965En.create = (e, t) => new En({ 5966 type: e, 5967 typeName: J.ZodPromise, 5968 ...te(t) 5969}); 5970class Ot extends ne { 5971 innerType() { 5972 return this._def.schema; 5973 } 5974 sourceType() { 5975 return this._def.schema._def.typeName === J.ZodEffects ? this._def.schema.sourceType() : this._def.schema; 5976 } 5977 _parse(t) { 5978 const { status: n, ctx: r } = this._processInputParams(t), s = this._def.effect || null, i = { 5979 addIssue: (a) => { 5980 P(r, a), a.fatal ? n.abort() : n.dirty(); 5981 }, 5982 get path() { 5983 return r.path; 5984 } 5985 }; 5986 if (i.addIssue = i.addIssue.bind(i), s.type === "preprocess") { 5987 const a = s.transform(r.data, i); 5988 if (r.common.async) 5989 return Promise.resolve(a).then(async (o) => { 5990 if (n.value === "aborted") 5991 return X; 5992 const c = await this._def.schema._parseAsync({ 5993 data: o, 5994 path: r.path, 5995 parent: r 5996 }); 5997 return c.status === "aborted" ? X : c.status === "dirty" || n.value === "dirty" ? Bt(c.value) : c; 5998 }); 5999 { 6000 if (n.value === "aborted") 6001 return X; 6002 const o = this._def.schema._parseSync({ 6003 data: a, 6004 path: r.path, 6005 parent: r 6006 }); 6007 return o.status === "aborted" ? X : o.status === "dirty" || n.value === "dirty" ? Bt(o.value) : o; 6008 } 6009 } 6010 if (s.type === "refinement") { 6011 const a = (o) => { 6012 const c = s.refinement(o, i); 6013 if (r.common.async) 6014 return Promise.resolve(c); 6015 if (c instanceof Promise) 6016 throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); 6017 return o; 6018 }; 6019 if (r.common.async === !1) { 6020 const o = this._def.schema._parseSync({ 6021 data: r.data, 6022 path: r.path, 6023 parent: r 6024 }); 6025 return o.status === "aborted" ? X : (o.status === "dirty" && n.dirty(), a(o.value), { status: n.value, value: o.value }); 6026 } else 6027 return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => o.status === "aborted" ? X : (o.status === "dirty" && n.dirty(), a(o.value).then(() => ({ status: n.value, value: o.value }
vendor: 6,014 bytes, lines 6027-6241
6027)))); 6028 } 6029 if (s.type === "transform") 6030 if (r.common.async === !1) { 6031 const a = this._def.schema._parseSync({ 6032 data: r.data, 6033 path: r.path, 6034 parent: r 6035 }); 6036 if (!Nt(a)) 6037 return X; 6038 const o = s.transform(a.value, i); 6039 if (o instanceof Promise) 6040 throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); 6041 return { status: n.value, value: o }; 6042 } else 6043 return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((a) => Nt(a) ? Promise.resolve(s.transform(a.value, i)).then((o) => ({ 6044 status: n.value, 6045 value: o 6046 })) : X); 6047 se.assertNever(s); 6048 } 6049} 6050Ot.create = (e, t, n) => new Ot({ 6051 schema: e, 6052 typeName: J.ZodEffects, 6053 effect: t, 6054 ...te(n) 6055}); 6056Ot.createWithPreprocess = (e, t, n) => new Ot({ 6057 schema: t, 6058 effect: { type: "preprocess", transform: e }, 6059 typeName: J.ZodEffects, 6060 ...te(n) 6061}); 6062class ut extends ne { 6063 _parse(t) { 6064 return this._getType(t) === F.undefined ? We(void 0) : this._def.innerType._parse(t); 6065 } 6066 unwrap() { 6067 return this._def.innerType; 6068 } 6069} 6070ut.create = (e, t) => new ut({ 6071 innerType: e, 6072 typeName: J.ZodOptional, 6073 ...te(t) 6074}); 6075class Lt extends ne { 6076 _parse(t) { 6077 return this._getType(t) === F.null ? We(null) : this._def.innerType._parse(t); 6078 } 6079 unwrap() { 6080 return this._def.innerType; 6081 } 6082} 6083Lt.create = (e, t) => new Lt({ 6084 innerType: e, 6085 typeName: J.ZodNullable, 6086 ...te(t) 6087}); 6088class cr extends ne { 6089 _parse(t) { 6090 const { ctx: n } = this._processInputParams(t); 6091 let r = n.data; 6092 return n.parsedType === F.undefined && (r = this._def.defaultValue()), this._def.innerType._parse({ 6093 data: r, 6094 path: n.path, 6095 parent: n 6096 }); 6097 } 6098 removeDefault() { 6099 return this._def.innerType; 6100 } 6101} 6102cr.create = (e, t) => new cr({ 6103 innerType: e, 6104 typeName: J.ZodDefault, 6105 defaultValue: typeof t.default == "function" ? t.default : () => t.default, 6106 ...te(t) 6107}); 6108class lr extends ne { 6109 _parse(t) { 6110 const { ctx: n } = this._processInputParams(t), r = { 6111 ...n, 6112 common: { 6113 ...n.common, 6114 issues: [] 6115 } 6116 }, s = this._def.innerType._parse({ 6117 data: r.data, 6118 path: r.path, 6119 parent: { 6120 ...r 6121 } 6122 }); 6123 return wn(s) ? s.then((i) => ({ 6124 status: "valid", 6125 value: i.status === "valid" ? i.value : this._def.catchValue({ 6126 get error() { 6127 return new et(r.common.issues); 6128 }, 6129 input: r.data 6130 }) 6131 })) : { 6132 status: "valid", 6133 value: s.status === "valid" ? s.value : this._def.catchValue({ 6134 get error() { 6135 return new et(r.common.issues); 6136 }, 6137 input: r.data 6138 }) 6139 }; 6140 } 6141 removeCatch() { 6142 return this._def.innerType; 6143 } 6144} 6145lr.create = (e, t) => new lr({ 6146 innerType: e, 6147 typeName: J.ZodCatch, 6148 catchValue: typeof t.catch == "function" ? t.catch : () => t.catch, 6149 ...te(t) 6150}); 6151class Ns extends ne { 6152 _parse(t) { 6153 if (this._getType(t) !== F.nan) { 6154 const r = this._getOrReturnCtx(t); 6155 return P(r, { 6156 code: S.invalid_type, 6157 expected: F.nan, 6158 received: r.parsedType 6159 }), X; 6160 } 6161 return { status: "valid", value: t.data }; 6162 } 6163} 6164Ns.create = (e) => new Ns({ 6165 typeName: J.ZodNaN, 6166 ...te(e) 6167}); 6168class jc extends ne { 6169 _parse(t) { 6170 const { ctx: n } = this._processInputParams(t), r = n.data; 6171 return this._def.type._parse({ 6172 data: r, 6173 path: n.path, 6174 parent: n 6175 }); 6176 } 6177 unwrap() { 6178 return this._def.type; 6179 } 6180} 6181class Or extends ne { 6182 _parse(t) { 6183 const { status: n, ctx: r } = this._processInputParams(t); 6184 if (r.common.async) 6185 return (async () => { 6186 const i = await this._def.in._parseAsync({ 6187 data: r.data, 6188 path: r.path, 6189 parent: r 6190 }); 6191 return i.status === "aborted" ? X : i.status === "dirty" ? (n.dirty(), Bt(i.value)) : this._def.out._parseAsync({ 6192 data: i.value, 6193 path: r.path, 6194 parent: r 6195 }); 6196 })(); 6197 { 6198 const s = this._def.in._parseSync({ 6199 data: r.data, 6200 path: r.path, 6201 parent: r 6202 }); 6203 return s.status === "aborted" ? X : s.status === "dirty" ? (n.dirty(), { 6204 status: "dirty", 6205 value: s.value 6206 }) : this._def.out._parseSync({ 6207 data: s.value, 6208 path: r.path, 6209 parent: r 6210 }); 6211 } 6212 } 6213 static create(t, n) { 6214 return new Or({ 6215 in: t, 6216 out: n, 6217 typeName: J.ZodPipeline 6218 }); 6219 } 6220} 6221class ur extends ne { 6222 _parse(t) { 6223 const n = this._def.innerType._parse(t), r = (s) => (Nt(s) && (s.value = Object.freeze(s.value)), s); 6224 return wn(n) ? n.then((s) => r(s)) : r(n); 6225 } 6226 unwrap() { 6227 return this._def.innerType; 6228 } 6229} 6230ur.create = (e, t) => new ur({ 6231 innerType: e, 6232 typeName: J.ZodReadonly, 6233 ...te(t) 6234}); 6235var J; 6236(function(e) { 6237 e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly"; 6238})(J || (J = {})); 6239const Nn = lt.create; 6240ft.create; 6241Je.create;
6242const Hi = be.create; 6243jn.create; 6244Sn.create; 6245yt.create; 6246Tt.create; 6247En.create; 6248ut.create; 6249Lt.create; 6250const Bi = "Ðоле должно бÑÑÑ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¾", Sc = Hi({ 6251 phone: Nn().min(1, Bi).refine(Di, "ÐведиÑе Ð½Ð¾Ð¼ÐµÑ Ð¿Ð¾Ð»Ð½Ð¾ÑÑÑÑ"), 6252 email: Nn() 6253}), Ec = Hi({ 6254 phone: Nn(), 6255 email: Nn().min(1, Bi).email("ÐÑовеÑÑÑе пÑавилÑноÑÑÑ Ð°Ð´ÑеÑа") 6256}); 6257function Nc() { 6258 return new Promise((e) => { 6259 try { 6260 if (!window.indexedDB) { 6261 e(!0); 6262 return; 6263 } 6264 const t = window.indexedDB.open("__incognito_test__", 1); 6265 t.onerror = () => e(!0), t.onsuccess = () => { 6266 try { 6267 localStorage.setItem("__incognito_test__", "1"), localStorage.removeItem("__incognito_test__"), e(!1); 6268 } catch { 6269 e(!0); 6270 } 6271 }; 6272 } catch { 6273 e(!0); 6274 } 6275 }); 6276} 6277async function Tc() { 6278 if (!("storage" in navigator) || !("estimate" in navigator.storage)) 6279 return !1; 6280 const { quota: e } = await navigator.storage.estimate(); 6281 return typeof e == "number" && e < 120 * 1024 * 1024; 6282} 6283const Oc = 1500; 6284async function Wi() { 6285 const e = new Promise((t) => setTimeout(() => t(!1), Oc)); 6286 try { 6287 const t = Promise.all([Nc(), Tc()]).then(([n, r]) => n || r); 6288 return await Promise.race([t, e]); 6289 } catch { 6290 return !1; 6291 } 6292} 6293var Ui = "5.2.0"; 6294function Tn(e, t) { 6295 return new Promise((n) => setTimeout(n, e, t)); 6296} 6297function Lc() { 6298 return new Promise((e) => { 6299 const t = new MessageChannel(); 6300 t.port1.onmessage = () => e(), t.port2.postMessage(null); 6301 }); 6302} 6303function Vc(e, t = 1 / 0) { 6304 const { requestIdleCallback: n } = window; 6305 return n ? new Promise((r) => n.call(window, () => r(), { timeout: t })) : Tn(Math.min(e, t)); 6306} 6307function zi(e) { 6308 return !!e && typeof e.then == "function"; 6309} 6310function Ts(e, t) { 6311 try { 6312 const n = e(); 6313 zi(n) ? n.then((r) => t(!0, r), (r) => t(!1, r)) : t(!0, n); 6314 } catch (n) { 6315 t(!1, n); 6316 } 6317} 6318async function Os(e, t, n = 16) { 6319 const r = Array(e.length); 6320 let s = Date.now(); 6321 for (let i = 0; i < e.length; ++i) { 6322 r[i] = t(e[i], i); 6323 const a = Date.now(); 6324 a >= s + n && (s = a, await Lc()); 6325 } 6326 return r; 6327} 6328function Kt(e) { 6329 return e.then(void 0, () => { 6330 }), e; 6331} 6332function Rc(e, t) { 6333 for (let n = 0, r = e.length; n < r; ++n) 6334 if (e[n] === t) 6335 return !0; 6336 return !1; 6337} 6338function Ac(e, t) { 6339 return !Rc(e, t); 6340} 6341function Lr(e) { 6342 return parseInt(e); 6343} 6344function ze(e) { 6345 return parseFloat(e); 6346} 6347function Qe(e, t) { 6348 return typeof e == "number" && isNaN(e) ? t : e; 6349} 6350function xe(e) { 6351 return e.reduce((t, n) => t + (n ? 1 : 0), 0); 6352} 6353function Gi(e, t = 1) { 6354 if (Math.abs(t) >= 1) 6355 return Math.round(e / t) * t; 6356 { 6357 const n = 1 / t; 6358 return Math.round(e * n) / n; 6359 } 6360} 6361function Mc(e) { 6362 var t, n; 6363 const r = `Unexpected syntax '${e}'`, s = /^\s*([a-z-]*)(.*)$/i.exec(e), i = s[1] || void 0, a = {}, o = /([.:#][\w-]+|\[.+?\])/gi, c = (u, d) => { 6364 a[u] = a[u] || [], a[u].push(d); 6365 }; 6366 for (; ; ) { 6367 const u = o.exec(s[2]); 6368 if (!u) 6369 break; 6370 const d = u[0]; 6371 switch (d[0]) { 6372 case ".": 6373 c("class", d.slice(1)); 6374 break; 6375 case "#": 6376 c("id", d.slice(1)); 6377 break; 6378 case "[": { 6379 const h = /^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(d); 6380 if (h) 6381 c(h[1], (n = (t = h[4]) !== null && t !== void 0 ? t : h[5]) !== null && n !== void 0 ? n : ""); 6382 else 6383 throw new Error(r); 6384 break; 6385 } 6386 default: 6387 throw new Error(r); 6388 } 6389 } 6390 return [i, a]; 6391} 6392function Ic(e) { 6393 const t = new Uint8Array(e.length); 6394 for (let n = 0; n < e.length; n++) { 6395 const r = e.charCodeAt(n); 6396 if (r > 127) 6397 return new TextEncoder().encode(e); 6398 t[n] = r; 6399 } 6400 return t; 6401} 6402function it(e, t) { 6403 const n = e[0] >>> 16, r = e[0] & 65535, s = e[1] >>> 16, i = e[1] & 65535, a = t[0] >>> 16, o = t[0] & 65535, c = t[1] >>> 16, u = t[1] & 65535; 6404 let d = 0, h = 0, g = 0, y = 0; 6405 y += i + u, g += y >>> 16, y &= 65535, g += s + c, h += g >>> 16, g &= 65535, h += r + o, d += h >>> 16, h &= 65535, d += n + a, d &= 65535, e[0] = d << 16 | h, e[1] = g << 16 | y; 6406} 6407function Be(e, t) { 6408 const n = e[0] >>> 16, r = e[0] & 65535, s = e[1] >>> 16, i = e[1] & 65535, a = t[0] >>> 16, o = t[0] & 65535, c = t[1] >>> 16, u = t[1] & 65535; 6409 let d = 0, h = 0, g = 0, y = 0; 6410 y += i * u, g += y >>> 16, y &= 65535, g += s * u, h += g >>> 16, g &= 65535, g += i * c, h += g >>> 16, g &= 65535, h += r * u, d += h >>> 16, h &= 65535, h += s * c, d += h >>>
6410 16, h &= 65535, h += i * o, d += h >>> 16, h &= 65535, d += n * u + r * c + s * o + i * a, d &= 65535, e[0] = d << 16 | h, e[1] = g << 16 | y; 6411} 6412function Ct(e, t) { 6413 const n = e[0]; 6414 t %= 64, t === 32 ? (e[0] = e[1], e[1] = n) : t < 32 ? (e[0] = n << t | e[1] >>> 32 - t, e[1] = e[1] << t | n >>> 32 - t) : (t -= 32, e[0] = e[1] << t | n >>> 32 - t, e[1] = n << t | e[1] >>> 32 - t); 6415} 6416function Ie(e, t) { 6417 t %= 64, t !== 0 && (t < 32 ? (e[0] = e[1] >>> 32 - t, e[1] = e[1] << t) : (e[0] = e[1] << t - 32, e[1] = 0)); 6418} 6419function me(e, t) { 6420 e[0] ^= t[0], e[1] ^= t[1]; 6421} 6422const Pc = [4283543511, 3981806797], Dc = [3301882366, 444984403]; 6423function Ls(e) { 6424 const t = [0, e[0] >>> 1]; 6425 me(e, t), Be(e, Pc), t[1] = e[0] >>> 1, me(e, t), Be(e, Dc), t[1] = e[0] >>> 1, me(e, t); 6426} 6427const dn = [2277735313, 289559509], fn = [1291169091, 658871167], Vs = [0, 5], Fc = [0, 1390208809], $c = [0, 944331445]; 6428function Zc(e, t) { 6429 const n = Ic(e); 6430 t = t || 0; 6431 const r = [0, n.length], s = r[1] % 16, i = r[1] - s, a = [0, t], o = [0, t], c = [0, 0], u = [0, 0]; 6432 let d; 6433 for (d = 0; d < i; d = d + 16) 6434 c[0] = n[d + 4] | n[d + 5] << 8 | n[d + 6] << 16 | n[d + 7] << 24, c[1] = n[d] | n[d + 1] << 8 | n[d + 2] << 16 | n[d + 3] << 24, u[0] = n[d + 12] | n[d + 13] << 8 | n[d + 14] << 16 | n[d + 15] << 24, u[1] = n[d + 8] | n[d + 9] << 8 | n[d + 10] << 16 | n[d + 11] << 24, Be(c, dn), Ct(c, 31), Be(c, fn), me(a, c), Ct(a, 27), it(a, o), Be(a, Vs), it(a, Fc), Be(u, fn), Ct(u, 33), Be(u, dn), me(o, u), Ct(o, 31), it(o, a), Be(o, Vs), it(o, $c); 6435 c[0] = 0, c[1] = 0, u[0] = 0, u[1] = 0; 6436 const h = [0, 0]; 6437 switch (s) { 6438 case 15: 6439 h[1] = n[d + 14], Ie(h, 48), me(u, h); 6440 case 14: 6441 h[1] = n[d + 13], Ie(h, 40), me(u, h); 6442 case 13: 6443 h[1] = n[d + 12], Ie(h, 32), me(u, h); 6444 case 12: 6445 h[1] = n[d + 11], Ie(h, 24), me(u, h); 6446 case 11: 6447 h[1] = n[d + 10], Ie(h, 16), me(u, h); 6448 case 10: 6449 h[1] = n[d + 9], Ie(h, 8), me(u, h); 6450 case 9: 6451 h[1] = n[d + 8], me(u, h), Be(u, fn), Ct(u, 33), Be(u, dn), me(o, u); 6452 case 8: 6453 h[1] = n[d + 7], Ie(h, 56), me(c, h); 6454 case 7: 6455 h[1] = n[d + 6], Ie(h, 48), me(c, h); 6456 case 6: 6457 h[1] = n[d + 5], Ie(h, 40), me(c, h); 6458 case 5: 6459 h[1] = n[d + 4], Ie(h, 32), me(c, h); 6460 case 4: 6461 h[1] = n[d + 3], Ie(h, 24), me(c, h); 6462 case 3: 6463 h[1] = n[d + 2], Ie(h, 16), me(c, h); 6464 case 2: 6465 h[1] = n[d + 1], Ie(h, 8), me(c, h); 6466 case 1: 6467 h[1] = n[d], me(c, h), Be(c, dn), Ct(c, 31), Be(c, fn), me(a, c); 6468 } 6469 return me(a, r), me(o, r), it(a, o), it(o, a), Ls(a), Ls(o), it(a, o), it(o, a), ("00000000" + (a[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (a[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8); 6470} 6471function Hc(e) { 6472 var t; 6473 return { 6474 name: e.name, 6475 message: e.message, 6476 stack: (t = e.stack) === null || t === void 0 ? void 0 : t.split(` 6477`), 6478 // The fields are not enumerable, so TS is wrong saying that they will be overridden 6479 ...e 6480 }; 6481} 6482function Bc(e) { 6483 return /^function\s.*?\{\s*\[native code]\s*}$/.test(String(e)); 6484} 6485function Wc(e) { 6486 return typeof e != "function"; 6487} 6488function Uc(e, t) { 6489 const n = Kt(new Promise((r) => { 6490 const s = Date.now(); 6491 Ts(e.bind(null, t), (...i) => { 6492 const a = Date.now() - s; 6493 if (!i[0]) 6494 return r(() => ({ error: i[1], duration: a })); 6495 const o = i[1]; 6496 if (Wc(o)) 6497 return r(() => ({ value: o, duration: a })); 6498 r(() => new Promise((c) => { 6499 const u = Date.now(); 6500 Ts(o, (...d) => { 6501 const h = a + Date.now() - u; 6502 if (!d[0]) 6503 return c({ error: d[1], duration: h }); 6504 c({ value: d[1], duration: h }); 6505 }); 6506 })); 6507 }); 6508 })); 6509 return function() { 6510 return n.then((s) => s()); 6511 }; 6512} 6513function zc(e, t, n, r) { 6514 const s = Object.keys(e).filter((a) => Ac(n, a)), i = Kt(Os(s, (a) => Uc(e[a], t), r)); 6515 return async function() { 6516 const o = await i, c = await Os(o, (h) => Kt(h()), r), u = await Promise.all(c), d = {}; 6517 for (let h = 0; h < s.length; ++h) 6518 d[s[h]] = u[h]; 6519 return d; 6520 }; 6521} 6522function Yi() { 6523 const e = window, t = navigator; 6524 return xe([ 6525 "MSCSSMatrix" in e, 6526 "msSetImmediate" in e, 6527 "msIndexedDB" in e, 6528 "msMaxTouchPoints" in t, 6529 "msPointerEnabled" in t 6530 ]) >= 4; 6531} 6532function Gc() { 6533 const e = window, t = navigator; 6534 return xe(["msWriteProfilerMark" in e, "MSStream" in e, "msLaunchUri" in t, "msSaveBlob" in t]) >= 3 && !Yi(); 6535} 6536function At() { 6537 const e = window, t = navigator; 6538 return xe([ 6539 "webkitPersistentStorage" in t, 6540 "webkitTemporaryStorage" in t, 6541 (t.vendor || "").indexOf("Google") === 0, 6542 "webkitResolveLocalFileSystemURL" in e, 6543 "BatteryManager" in e, 6544 "webkitMediaStream" in e, 6545 "webkitSpeechGrammar" in e 6546 ]) >= 5; 6547} 6548function Ye() { 6549 const e = window, t = navigator; 6550 return xe([ 6551 "ApplePayError" in e, 6552 "CSSPrimitiveValue" in e, 6553 "Counter" in e, 6554 t.vendor.indexOf("Apple") === 0, 6555 "RGBColor" in e, 6556 "WebKitMediaKeys" in e 6557 ]) >= 4; 6558} 6559function Vr() { 6560 const e = window, { HTMLElement: t, Document: n } = e; 6561 return xe([ 6562 "safari" in e, 6563 !("ongestureend" in e), 6564 !("TouchEvent" in e), 6565 !("orientation" in e), 6566 t && !("autocapitalize" in t.prototype), 6567 n && "pointerLockElement" in n.prototype 6568 ]) >= 4; 6569} 6570function tn() { 6571 const e = window; 6572 return ( 6573 // Filters-out Chrome, Yandex, DuckDuckGo (macOS and iOS), Edge 6574 Bc(e.print) && // Doesn't work in Safari < 15.4 6575 String(e.browser) === "[object WebPageNamespace]" 6576 ); 6577} 6578function nn() { 6579 var e, t; 6580 const n = window; 6581 return xe([ 6582 "buildID" in navigator, 6583 "MozAppearance" in ((t = (e = document.documentElement) === null || e === void 0 ? void 0 : e.style) !== null && t !== void 0 ? t : {}), 6584 "onmozfullscreenchange" in n, 6585 "mozInnerScreenX" in n, 6586 "CSSMozDocumentRule" in n, 6587 "CanvasCaptureMediaStream" in n 6588 ]) >= 4; 6589} 6590function Yc() { 6591 const e = window, t = navigator, { CSS: n } = e; 6592 return xe([ 6593 // User Activation API - added in Firefox 120 6594 "userActivation" in t, 6595 // CSS light-dark() function - added in Firefox 120 6596 n.supports("color", "light-dark(#000, #fff)"), 6597 // CSS lh unit - added in Firefox 120 6598 n.supports("height", "1lh"), 6599 // Global Privacy Control - added in Firefox 120 (desktop) / Firefox 122 (mobile) 6600 "globalPrivacyControl" in t 6601 ]) >= 3; 6602} 6603function Xi() { 6604 const { CSS: e } = window; 6605 return xe([ 6606 // CSS ::details-content pseudo-element - added in Firefox 143
6607 e.supports("selector(::details-content)"), 6608 // CSS ::before::marker nested pseudo-element - added in Firefox 143 6609 e.supports("selector(::before::marker)"), 6610 // CSS ::after::marker nested pseudo-element - added in Firefox 143 6611 e.supports("selector(::after::marker)"), 6612 // CompositionEvent.locale property - removed in Firefox 143 (Bug 1700969) 6613 !("locale" in CompositionEvent.prototype) 6614 ]) >= 3; 6615} 6616function Xc() { 6617 const e = window; 6618 return xe([ 6619 !("MediaSettingsRange" in e), 6620 "RTCEncodedAudioFrame" in e, 6621 "" + e.Intl == "[object Intl]", 6622 "" + e.Reflect == "[object Reflect]" 6623 ]) >= 3; 6624} 6625function Jc() { 6626 const e = window, { URLPattern: t } = e; 6627 return xe([ 6628 "union" in Set.prototype, 6629 "Iterator" in e, 6630 t && "hasRegExpGroups" in t.prototype, 6631 "RGB8" in WebGLRenderingContext.prototype 6632 ]) >= 3; 6633} 6634function qc() { 6635 const e = window, t = document, { CSS: n, Promise: r, AudioContext: s } = e; 6636 return xe([ 6637 r && "try" in r, 6638 "caretPositionFromPoint" in t, 6639 s && "onerror" in s.prototype, 6640 n.supports("ruby-align", "space-around") 6641 ]) >= 3; 6642} 6643function Kc() { 6644 const e = window; 6645 return xe([ 6646 "DOMRectList" in e, 6647 "RTCPeerConnectionIceEvent" in e, 6648 "SVGGeometryElement" in e, 6649 "ontransitioncancel" in e 6650 ]) >= 3; 6651} 6652function rn() { 6653 const e = window, t = navigator, { CSS: n, HTMLButtonElement: r } = e; 6654 return xe([ 6655 !("getStorageUpdates" in t), 6656 r && "popover" in r.prototype, 6657 "CSSCounterStyleRule" in e, 6658 n.supports("font-size-adjust: ex-height 0.5"), 6659 n.supports("text-transform: full-width") 6660 ]) >= 4; 6661} 6662function Qc() { 6663 if (navigator.platform === "iPad") 6664 return !0; 6665 const e = screen, t = e.width / e.height; 6666 return xe([ 6667 // Since iOS 13. Doesn't work in Chrome on iPadOS <15, but works in desktop mode. 6668 "MediaSource" in window, 6669 // Since iOS 12. Doesn't work in Chrome on iPadOS. 6670 !!Element.prototype.webkitRequestFullscreen, 6671 // iPhone 4S that runs iOS 9 matches this, but it is not supported 6672 // Doesn't work in incognito mode of Safari â¥17 with split screen because of tracking prevention 6673 t > 0.65 && t < 1.53 6674 ]) >= 2; 6675} 6676function el() { 6677 const e = document; 6678 return e.fullscreenElement || e.msFullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || null; 6679} 6680function tl() { 6681 const e = document; 6682 return (e.exitFullscreen || e.msExitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen).call(e); 6683} 6684function An() { 6685 const e = At(), t = nn(), n = window, r = navigator, s = "connection"; 6686 return e ? xe([ 6687 !("SharedWorker" in n), 6688 // `typechange` is deprecated, but it's still present on Android (tested on Chrome Mobile 117) 6689 // Removal proposal https://bugs.chromium.org/p/chromium/issues/detail?id=699892 6690 // Note: this expression returns true on ChromeOS, so additional detectors are required to avoid false-positives 6691 r[s] && "ontypechange" in r[s], 6692 !("sinkId" in new Audio()) 6693 ]) >= 2 : t ? xe(["onorientationchange" in n, "orientation" in n, /android/i.test(r.appVersion)]) >= 2 : !1; 6694} 6695function nl() { 6696 const e = navigator, t = window, n = Audio.prototype, { visualViewport: r } = t; 6697 return xe([ 6698 "srLatency" in n, 6699 "srChannelCount" in n, 6700 "devicePosture" in e, 6701 r && "segments" in r, 6702 "getTextInformation" in Image.prototype 6703 // Not available in Samsung Internet 21 6704 ]) >= 3; 6705} 6706function rl() { 6707 return al() ? -4 : sl(); 6708} 6709function sl() { 6710 const e = window, t = e.OfflineAudioContext || e.webkitOfflineAudioContext; 6711 if (!t) 6712 return -2; 6713 if (il()) 6714 return -1; 6715 const n = 4500, r = 5e3, s = new t(1, r, 44100), i = s.createOscillator(); 6716 i.type = "triangle", i.frequency.value = 1e4; 6717 const a = s.createDynamicsCompressor(); 6718 a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = 0.25, i.connect(a), a.connect(s.destination), i.start(0); 6719 const [o, c] = ol(s), u = Kt(o.then((d) => cl(d.getChannelData(0).subarray(n)), (d) => { 6720 if (d.name === "timeout" || d.name === "suspended") 6721 return -3; 6722 throw d; 6723 })); 6724 return () => (c(), u); 6725} 6726function il() { 6727 return Ye() && !Vr() && !Kc(); 6728} 6729function al() { 6730 return ( 6731 // Safari â¥17 6732 Ye() && rn() && tn() || // Samsung Internet â¥26 6733 At() && nl() && Jc() 6734 ); 6735} 6736function ol(e) { 6737 let i = () => { 6738 }; 6739 return [new Promise((o, c) => { 6740 let u = !1, d = 0, h = 0; 6741 e.oncomplete = (v) => o(v.renderedBuffer); 6742 const g = () => { 6743 setTimeout(() => c(Rs( 6744 "timeout" 6745 /* InnerErrorName.Timeout */ 6746 )), Math.min(500, h + 5e3 - Date.now())); 6747 }, y = () => {
6748 try { 6749 const v = e.startRendering(); 6750 switch (zi(v) && Kt(v), e.state) { 6751 case "running": 6752 h = Date.now(), u && g(); 6753 break; 6754 case "suspended": 6755 document.hidden || d++, u && d >= 3 ? c(Rs( 6756 "suspended" 6757 /* InnerErrorName.Suspended */ 6758 )) : setTimeout(y, 500); 6759 break; 6760 } 6761 } catch (v) { 6762 c(v); 6763 } 6764 }; 6765 y(), i = () => { 6766 u || (u = !0, h > 0 && g()); 6767 }; 6768 }), i]; 6769} 6770function cl(e) { 6771 let t = 0; 6772 for (let n = 0; n < e.length; ++n) 6773 t += Math.abs(e[n]); 6774 return t; 6775} 6776function Rs(e) { 6777 const t = new Error(e); 6778 return t.name = e, t; 6779} 6780async function Ji(e, t, n = 50) { 6781 var r, s, i; 6782 const a = document; 6783 for (; !a.body; ) 6784 await Tn(n); 6785 const o = a.createElement("iframe"); 6786 try { 6787 for (await new Promise((c, u) => { 6788 let d = !1; 6789 const h = () => { 6790 d = !0, c(); 6791 }, g = (b) => { 6792 d = !0, u(b); 6793 }; 6794 o.onload = h, o.onerror = g; 6795 const { style: y } = o; 6796 y.setProperty("display", "block", "important"), y.position = "absolute", y.top = "0", y.left = "0", y.visibility = "hidden", t && "srcdoc" in o ? o.srcdoc = t : o.src = "about:blank", a.body.appendChild(o); 6797 const v = () => { 6798 var b, x; 6799 d || (((x = (b = o.contentWindow) === null || b === void 0 ? void 0 : b.document) === null || x === void 0 ? void 0 : x.readyState) === "complete" ? h() : setTimeout(v, 10)); 6800 }; 6801 v(); 6802 }); !(!((s = (r = o.contentWindow) === null || r === void 0 ? void 0 : r.document) === null || s === void 0) && s.body); ) 6803 await Tn(n); 6804 return await e(o, o.contentWindow); 6805 } finally { 6806 (i = o.parentNode) === null || i === void 0 || i.removeChild(o); 6807 } 6808} 6809function ll(e) { 6810 const [t, n] = Mc(e), r = document.createElement(t ?? "div"); 6811 for (const s of Object.keys(n)) { 6812 const i = n[s].join(" "); 6813 s === "style" ? ul(r.style, i) : r.setAttribute(s, i); 6814 } 6815 return r; 6816} 6817function ul(e, t) { 6818 for (const n of t.split(";")) { 6819 const r = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(n); 6820 if (r) { 6821 const [, s, i, , a] = r; 6822 e.setProperty(s, i, a || ""); 6823 } 6824 } 6825} 6826function dl() { 6827 let e = window; 6828 for (; ; ) { 6829 const t = e.parent; 6830 if (!t || t === e) 6831 return !1; 6832 try { 6833 if (t.location.origin !== e.location.origin) 6834 return !0; 6835 } catch (n) { 6836 if (n instanceof Error && n.name === "SecurityError") 6837 return !0; 6838 throw n; 6839 } 6840 e = t; 6841 } 6842} 6843const fl = "mmMwWLliI0O&1", hl = "48px", wt = ["monospace", "sans-serif", "serif"], As = [ 6844 // This is android-specific font from "Roboto" family 6845 "sans-serif-thin", 6846 "ARNO PRO", 6847 "Agency FB", 6848 "Arabic Typesetting", 6849 "Arial Unicode MS", 6850 "AvantGarde Bk BT", 6851 "BankGothic Md BT", 6852 "Batang", 6853 "Bitstream Vera Sans Mono", 6854 "Calibri", 6855 "Century", 6856 "Century Gothic", 6857 "Clarendon", 6858 "EUROSTILE", 6859 "Franklin Gothic", 6860 "Futura Bk BT", 6861 "Futura Md BT", 6862 "GOTHAM", 6863 "Gill Sans", 6864 "HELV", 6865 "Haettenschweiler", 6866 "Helvetica Neue", 6867 "Humanst521 BT", 6868 "Leelawadee", 6869 "Letter Gothic", 6870 "Levenim MT", 6871 "Lucida Bright", 6872 "Lucida Sans", 6873 "Menlo", 6874 "MS Mincho", 6875 "MS Outlook", 6876 "MS Reference Specialty", 6877 "MS UI Gothic", 6878 "MT Extra", 6879 "MYRIAD PRO", 6880 "Marlett", 6881 "Meiryo UI", 6882 "Microsoft Uighur", 6883 "Minion Pro", 6884 "Monotype Corsiva", 6885 "PMingLiU", 6886 "Pristina", 6887 "SCRIPTINA", 6888 "Segoe UI Light", 6889 "Serifa", 6890 "SimHei", 6891 "Small Fonts", 6892 "Staccato222 BT", 6893 "TRAJAN PRO", 6894 "Univers CE 55 Medium", 6895 "Vrinda", 6896 "ZWAdobeF" 6897]; 6898function ml() { 6899 return Ji(async (e, { document: t }) => { 6900 const n = t.body; 6901 n.style.fontSize = hl; 6902 const r = t.createElement("div"); 6903 r.style.setProperty("visibility", "hidden", "important"); 6904 const s = {}, i = {}, a = (y) => { 6905 const v = t.createElement("span"), { style: b } = v; 6906 return b.position = "absolute", b.top = "0", b.left = "0", b.fontFamily = y, v.textContent = fl, r.appendChild(v), v; 6907 }, o = (y, v) => a(`'${y}',${v}`), c = () => wt.map(a), u = () => { 6908 const y = {}; 6909 for (const v of As) 6910 y[v] = wt.map((b) => o(v, b)); 6911 return y; 6912 }, d = (y) => wt.some((v, b) => y[b].offsetWidth !== s[v] || y[b].offsetHeight !== i[v]), h = c(), g = u(); 6913 n.appendChild(r); 6914 for (let y = 0; y < wt.length; y++) 6915 s[wt[y]] = h[y].offsetWidth, i[wt[y]] = h[y].offsetHeight; 6916 return As.filter((y) => d(g[y])); 6917 }); 6918} 6919function pl() { 6920 const e = navigator.plugins; 6921 if (!e) 6922 return; 6923 const t = []; 6924 for (let n = 0; n < e.length; ++n) { 6925 const r = e[n]; 6926 if (!r) 6927 continue; 6928 const s = []; 6929 for (let i = 0; i < r.length; ++i) { 6930 const a = r[i]; 6931 s.push({ 6932 type: a.type, 6933 suffixes: a.suffixes 6934 }); 6935 } 6936 t.push({ 6937 name: r.name, 6938 description: r.description, 6939 mimeTypes: s 6940 }); 6941 } 6942 return t; 6943} 6944function gl() { 6945 return yl(kl()); 6946} 6947function yl(e) { 6948 let t = !1, n, r;
6949 const [s, i] = vl(); 6950 return bl(s, i) ? (t = _l(i), e ? n = r = "skipped" : [n, r] = xl(s, i)) : n = r = "unsupported", { winding: t, geometry: n, text: r }; 6951} 6952function vl() { 6953 const e = document.createElement("canvas"); 6954 return e.width = 1, e.height = 1, [e, e.getContext("2d")]; 6955} 6956function bl(e, t) { 6957 return !!(t && e.toDataURL); 6958} 6959function _l(e) { 6960 return e.rect(0, 0, 10, 10), e.rect(2, 2, 6, 6), !e.isPointInPath(5, 5, "evenodd"); 6961} 6962function xl(e, t) { 6963 Cl(e, t); 6964 const n = Bn(e), r = Bn(e); 6965 return n !== r ? [ 6966 "unstable", 6967 "unstable" 6968 /* ImageStatus.Unstable */ 6969 ] : (wl(e, t), [Bn(e), n]); 6970} 6971function Cl(e, t) { 6972 e.width = 240, e.height = 60, t.textBaseline = "alphabetic", t.fillStyle = "#f60", t.fillRect(100, 1, 62, 20), t.fillStyle = "#069", t.font = '11pt "Times New Roman"'; 6973 const n = "Cwm fjordbank gly ð"; 6974 t.fillText(n, 2, 15), t.fillStyle = "rgba(102, 204, 0, 0.2)", t.font = "18pt Arial", t.fillText(n, 4, 45); 6975} 6976function wl(e, t) { 6977 e.width = 122, e.height = 110, t.globalCompositeOperation = "multiply"; 6978 for (const [n, r, s] of [ 6979 ["#f2f", 40, 40], 6980 ["#2ff", 80, 40], 6981 ["#ff2", 60, 80] 6982 ]) 6983 t.fillStyle = n, t.beginPath(), t.arc(r, s, 40, 0, Math.PI * 2, !0), t.closePath(), t.fill(); 6984 t.fillStyle = "#f9c", t.arc(60, 60, 60, 0, Math.PI * 2, !0), t.arc(60, 60, 20, 0, Math.PI * 2, !0), t.fill("evenodd"); 6985} 6986function Bn(e) { 6987 return e.toDataURL(); 6988} 6989function kl() { 6990 const e = Ye() && rn() && tn(), t = nn() && Yc(); 6991 return e || t; 6992} 6993function jl() { 6994 const e = navigator; 6995 let t = 0, n; 6996 e.maxTouchPoints !== void 0 ? t = Lr(e.maxTouchPoints) : e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints); 6997 try { 6998 document.createEvent("TouchEvent"), n = !0; 6999 } catch { 7000 n = !1; 7001 } 7002 const r = "ontouchstart" in window; 7003 return { 7004 maxTouchPoints: t, 7005 touchEvent: n, 7006 touchStart: r 7007 }; 7008} 7009function Sl() { 7010 return navigator.oscpu; 7011} 7012function El() { 7013 const e = navigator, t = [], n = e.language || e.userLanguage || e.browserLanguage || e.systemLanguage; 7014 if (n !== void 0 && t.push([n]), Array.isArray(e.languages)) 7015 At() && Xc() || t.push(e.languages); 7016 else if (typeof e.languages == "string") { 7017 const r = e.languages; 7018 r && t.push(r.split(",")); 7019 } 7020 return t; 7021} 7022function Nl() { 7023 return window.screen.colorDepth; 7024} 7025function Tl() { 7026 return Qe(ze(navigator.deviceMemory), void 0); 7027} 7028function Ol() { 7029 if (!(Ye() && rn() && tn())) 7030 return Ll(); 7031} 7032function Ll() { 7033 const e = screen, t = (r) => Qe(Lr(r), null), n = [t(e.width), t(e.height)]; 7034 return n.sort().reverse(), n; 7035} 7036const Vl = 2500, Rl = 10; 7037let pn, Wn; 7038function Al() { 7039 if (Wn !== void 0) 7040 return; 7041 const e = () => { 7042 const t = dr(); 7043 fr(t) ? Wn = setTimeout(e, Vl) : (pn = t, Wn = void 0); 7044 }; 7045 e(); 7046} 7047function Ml() { 7048 return Al(), async () => { 7049 let e = dr(); 7050 if (fr(e)) { 7051 if (pn) 7052 return [...pn]; 7053 el() && (await tl(), e = dr()); 7054 } 7055 return fr(e) || (pn = e), e; 7056 }; 7057} 7058function Il() { 7059 const e = Ye() && rn() && tn(), t = nn() && Xi(); 7060 if (e || t) 7061 return () => Promise.resolve(void 0); 7062 const n = Ml(); 7063 return async () => { 7064 const r = await n(), s = (i) => i === null ? null : Gi(i, Rl); 7065 return [s(r[0]), s(r[1]), s(r[2]), s(r[3])]; 7066 }; 7067} 7068function dr() { 7069 const e = screen; 7070 return [ 7071 Qe(ze(e.availTop), null), 7072 Qe(ze(e.width) - ze(e.availWidth) - Qe(ze(e.availLeft), 0), null), 7073 Qe(ze(e.height) - ze(e.availHeight) - Qe(ze(e.availTop), 0), null), 7074 Qe(ze(e.availLeft), null) 7075 ]; 7076} 7077function fr(e) { 7078 for (let t = 0; t < 4; ++t) 7079 if (e[t]) 7080 return !1; 7081 return !0; 7082} 7083function Pl() { 7084 const e = Dl(); 7085 return e !== void 0 && nn() && Xi() ? e >= 8 ? 8 : 4 : e; 7086} 7087function Dl() { 7088 return Qe(Lr(navigator.hardwareConcurrency), void 0); 7089} 7090function Fl() { 7091 var e; 7092 const t = (e = window.Intl) === null || e === void 0 ? void 0 : e.DateTimeFormat; 7093 if (t) { 7094 const r = new t().resolvedOptions().timeZone; 7095 if (r) 7096 return r; 7097 } 7098 const n = -$l(); 7099 return `UTC${n >= 0 ? "+" : ""}${n}`; 7100} 7101function $l() { 7102 const e = (/* @__PURE__ */ new Date()).getFullYear(); 7103 return Math.max( 7104 // `getTimezoneOffset` returns a number as a string in some unidentified cases 7105 ze(new Date(e, 0, 1).getTimezoneOffset()), 7106 ze(new Date(e, 6, 1).getTimezoneOffset()) 7107 ); 7108} 7109function Zl() { 7110 try { 7111 return !!window.sessionStorage; 7112 } catch { 7113 return !0; 7114 } 7115} 7116function Hl() { 7117 try { 7118 return !!window.localStorage; 7119 } catch { 7120 return !0; 7121 } 7122} 7123function Bl() { 7124 if (!(Yi() || Gc())) 7125 try { 7126 return !!window.indexedDB; 7127 } catch { 7128 return !0; 7129 } 7130} 7131function Wl() {
7132 return !!window.openDatabase; 7133} 7134function Ul() { 7135 return navigator.cpuClass; 7136} 7137function zl() { 7138 const { platform: e } = navigator; 7139 return e === "MacIntel" && Ye() && !Vr() ? Qc() ? "iPad" : "iPhone" : e; 7140} 7141function Gl() { 7142 return navigator.vendor || ""; 7143} 7144function Yl() { 7145 const e = []; 7146 for (const t of [ 7147 // Blink and some browsers on iOS 7148 "chrome", 7149 // Safari on macOS 7150 "safari", 7151 // Chrome on iOS (checked in 85 on 13 and 87 on 14) 7152 "__crWeb", 7153 "__gCrWeb", 7154 // Yandex Browser on iOS, macOS and Android (checked in 21.2 on iOS 14, macOS and Android) 7155 "yandex", 7156 // Yandex Browser on iOS (checked in 21.2 on 14) 7157 "__yb", 7158 "__ybro", 7159 // Firefox on iOS (checked in 32 on 14) 7160 "__firefox__", 7161 // Edge on iOS (checked in 46 on 14) 7162 "__edgeTrackingPreventionStatistics", 7163 "webkit", 7164 // Opera Touch on iOS (checked in 2.6 on 14) 7165 "oprt", 7166 // Samsung Internet on Android (checked in 11.1) 7167 "samsungAr", 7168 // UC Browser on Android (checked in 12.10 and 13.0) 7169 "ucweb", 7170 "UCShellJava", 7171 // Puffin on Android (checked in 9.0) 7172 "puffinDevice" 7173 // UC on iOS and Opera on Android have no specific global variables 7174 // Edge for Android isn't checked 7175 ]) { 7176 const n = window[t]; 7177 n && typeof n == "object" && e.push(t); 7178 } 7179 return e.sort(); 7180} 7181function Xl() { 7182 const e = document; 7183 try { 7184 e.cookie = "cookietest=1; SameSite=Strict;"; 7185 const t = e.cookie.indexOf("cookietest=") !== -1; 7186 return e.cookie = "cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT", t; 7187 } catch { 7188 return !1; 7189 } 7190} 7191function Jl() { 7192 const e = atob; 7193 return { 7194 abpIndo: [ 7195 "#Iklan-Melayang", 7196 "#Kolom-Iklan-728", 7197 "#SidebarIklan-wrapper", 7198 '[title="ALIENBOLA" i]', 7199 e("I0JveC1CYW5uZXItYWRz") 7200 ], 7201 abpvn: [".quangcao", "#mobileCatfish", e("LmNsb3NlLWFkcw=="), '[id^="bn_bottom_fixed_"]', "#pmadv"], 7202 adBlockFinland: [ 7203 ".mainostila", 7204 e("LnNwb25zb3JpdA=="), 7205 ".ylamainos", 7206 e("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"), 7207 e("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd") 7208 ], 7209 adBlockPersian: [ 7210 "#navbar_notice_50", 7211 ".kadr", 7212 'TABLE[width="140px"]', 7213 "#divAgahi", 7214 e("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd") 7215 ], 7216 adBlockWarningRemoval: [ 7217 "#adblock-honeypot", 7218 ".adblocker-root", 7219 ".wp_adblock_detect", 7220 e("LmhlYWRlci1ibG9ja2VkLWFk"), 7221 e("I2FkX2Jsb2NrZXI=") 7222 ], 7223 adGuardAnnoyances: [ 7224 ".hs-sosyal", 7225 "#cookieconsentdiv", 7226 'div[class^="app_gdpr"]', 7227 ".as-oil", 7228 '[data-cypress="soft-push-notification-modal"]' 7229 ], 7230 adGuardBase: [ 7231 ".BetterJsPopOverlay", 7232 e("I2FkXzMwMFgyNTA="), 7233 e("I2Jhbm5lcmZsb2F0MjI="), 7234 e("I2NhbXBhaWduLWJhbm5lcg=="), 7235 e("I0FkLUNvbnRlbnQ=") 7236 ], 7237 adGuardChinese: [ 7238 e("LlppX2FkX2FfSA=="), 7239 e("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"), 7240 "#widget-quan", 7241 e("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"), 7242 e("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=") 7243 ], 7244 adGuardFrench: [ 7245 "#pavePub", 7246 e("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"), 7247 ".mobile_adhesion", 7248 ".widgetadv", 7249 e("LmFkc19iYW4=") 7250 ], 7251 adGuardGerman: ['aside[data-portal-id="leaderboard"]'], 7252 adGuardJapanese: [ 7253 "#kauli_yad_1", 7254 e("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="), 7255 e("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="), 7256 e("LmFkZ29vZ2xl"), 7257 e("Ll9faXNib29zdFJldHVybkFk") 7258 ], 7259 adGuardMobile: [ 7260 e("YW1wLWF1dG8tYWRz"), 7261 e("LmFtcF9hZA=="), 7262 'amp-embed[type="24smi"]', 7263 "#mgid_iframe1", 7264 e("I2FkX2ludmlld19hcmVh") 7265 ], 7266 adGuardRussian: [ 7267 e("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="), 7268 e("LnJlY2xhbWE="), 7269 'div[id^="smi2adblock"]', 7270 e("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"), 7271 "#psyduckpockeball" 7272 ], 7273 adGuardSocial: [ 7274 e("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="), 7275 e("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="), 7276 ".etsy-tweet", 7277 "#inlineShare", 7278 ".popup-social" 7279 ], 7280 adGuardSpanishPortuguese: ["#barraPublicidade", "#Publicidade", "#publiEspecial", "#queTooltip", ".cnt-publi"], 7281 adGuardTrackingProtection: [ 7282 "#qoo-counter", 7283 e("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="), 7284 e("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="), 7285 e("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="), 7286 "#top100counter" 7287 ], 7288 adGuardTurkish: [ 7289 "#backkapat", 7290 e("I3Jla2xhbWk="),
vendor: 4,156 bytes, lines 7291-7398
7291 e("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="), 7292 e("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"), 7293 e("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==") 7294 ], 7295 bulgarian: [e("dGQjZnJlZW5ldF90YWJsZV9hZHM="), "#ea_intext_div", ".lapni-pop-over", "#xenium_hot_offers"], 7296 easyList: [ 7297 ".yb-floorad", 7298 e("LndpZGdldF9wb19hZHNfd2lkZ2V0"), 7299 e("LnRyYWZmaWNqdW5reS1hZA=="), 7300 ".textad_headline", 7301 e("LnNwb25zb3JlZC10ZXh0LWxpbmtz") 7302 ], 7303 easyListChina: [ 7304 e("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="), 7305 e("LmZyb250cGFnZUFkdk0="), 7306 "#taotaole", 7307 "#aafoot.top_box", 7308 ".cfa_popup" 7309 ], 7310 easyListCookie: [ 7311 ".ezmob-footer", 7312 ".cc-CookieWarning", 7313 "[data-cookie-number]", 7314 e("LmF3LWNvb2tpZS1iYW5uZXI="), 7315 ".sygnal24-gdpr-modal-wrap" 7316 ], 7317 easyListCzechSlovak: [ 7318 "#onlajny-stickers", 7319 e("I3Jla2xhbW5pLWJveA=="), 7320 e("LnJla2xhbWEtbWVnYWJvYXJk"), 7321 ".sklik", 7322 e("W2lkXj0ic2tsaWtSZWtsYW1hIl0=") 7323 ], 7324 easyListDutch: [ 7325 e("I2FkdmVydGVudGll"), 7326 e("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="), 7327 ".adstekst", 7328 e("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="), 7329 "#semilo-lrectangle" 7330 ], 7331 easyListGermany: [ 7332 "#SSpotIMPopSlider", 7333 e("LnNwb25zb3JsaW5rZ3J1ZW4="), 7334 e("I3dlcmJ1bmdza3k="), 7335 e("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"), 7336 e("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=") 7337 ], 7338 easyListItaly: [ 7339 e("LmJveF9hZHZfYW5udW5jaQ=="), 7340 ".sb-box-pubbliredazionale", 7341 e("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"), 7342 e("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"), 7343 e("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==") 7344 ], 7345 easyListLithuania: [ 7346 e("LnJla2xhbW9zX3RhcnBhcw=="), 7347 e("LnJla2xhbW9zX251b3JvZG9z"), 7348 e("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"), 7349 e("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"), 7350 e("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd") 7351 ], 7352 estonian: [e("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")], 7353 fanboyAnnoyances: ["#ac-lre-player", ".navigate-to-top", "#subscribe_popup", ".newsletter_holder", "#back-top"], 7354 fanboyAntiFacebook: [".util-bar-module-firefly-visible"], 7355 fanboyEnhancedTrackers: [ 7356 ".open.pushModal", 7357 "#issuem-leaky-paywall-articles-zero-remaining-nag", 7358 "#sovrn_container", 7359 'div[class$="-hide"][zoompage-fontsize][style="display: block;"]', 7360 ".BlockNag__Card" 7361 ], 7362 fanboySocial: ["#FollowUs", "#meteored_share", "#social_follow", ".article-sharer", ".community__social-desc"], 7363 frellwitSwedish: [ 7364 e("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="), 7365 e("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="), 7366 "article.category-samarbete", 7367 e("ZGl2LmhvbGlkQWRz"), 7368 "ul.adsmodern" 7369 ], 7370 greekAdBlock: [ 7371 e("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"), 7372 e("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="), 7373 e("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"), 7374 "DIV.agores300", 7375 "TABLE.advright" 7376 ], 7377 hungarian: [ 7378 "#cemp_doboz", 7379 ".optimonk-iframe-container", 7380 e("LmFkX19tYWlu"), 7381 e("W2NsYXNzKj0iR29vZ2xlQWRzIl0="), 7382 "#hirdetesek_box" 7383 ], 7384 iDontCareAboutCookies: [ 7385 '.alert-info[data-block-track*="CookieNotice"]', 7386 ".ModuleTemplateCookieIndicator", 7387 ".o--cookies--container", 7388 "#cookies-policy-sticky", 7389 "#stickyCookieBar" 7390 ], 7391 icelandicAbp: [e("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")], 7392 latvian: [ 7393 e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="), 7394 e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==") 7395 ], 7396 listKr: [ 7397 e("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="), 7398 e("I2xpdmVyZUFkV3JhcHBlcg=="),
7399 e("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="), 7400 e("aW5zLmZhc3R2aWV3LWFk"), 7401 ".revenue_unit_item.dable" 7402 ], 7403 listeAr: [ 7404 e("LmdlbWluaUxCMUFk"), 7405 ".right-and-left-sponsers", 7406 e("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="), 7407 e("YVtocmVmKj0iYm9vcmFxLm9yZyJd"), 7408 e("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd") 7409 ], 7410 listeFr: [ 7411 e("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="), 7412 e("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="), 7413 e("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="), 7414 ".site-pub-interstitiel", 7415 'div[id^="crt-"][data-criteo-id]' 7416 ], 7417 officialPolish: [ 7418 "#ceneo-placeholder-ceneo-12", 7419 e("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"), 7420 e("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="), 7421 e("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="), 7422 e("ZGl2I3NrYXBpZWNfYWQ=") 7423 ], 7424 ro: [ 7425 e("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"), 7426 e("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"), 7427 e("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="), 7428 e("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"), 7429 'a[href^="/url/"]' 7430 ], 7431 ruAd: [ 7432 e("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"), 7433 e("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="), 7434 e("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="), 7435 "#pgeldiz", 7436 ".yandex-rtb-block" 7437 ], 7438 thaiAds: [ 7439 "a[href*=macau-uta-popup]", 7440 e("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="), 7441 e("LmFkczMwMHM="), 7442 ".bumq", 7443 ".img-kosana" 7444 ], 7445 webAnnoyancesUltralist: [ 7446 "#mod-social-share-2", 7447 "#social-tools", 7448 e("LmN0cGwtZnVsbGJhbm5lcg=="), 7449 ".zergnet-recommend", 7450 ".yt.btn-link.btn-md.btn" 7451 ] 7452 }; 7453} 7454async function ql({ debug: e } = {}) { 7455 if (!Kl()) 7456 return; 7457 const t = Jl(), n = Object.keys(t), r = [].concat(...n.map((a) => t[a])), s = await Ql(r); 7458 e && eu(t, s); 7459 const i = n.filter((a) => { 7460 const o = t[a]; 7461 return xe(o.map((u) => s[u])) > o.length * 0.6; 7462 }); 7463 return i.sort(), i; 7464} 7465function Kl() { 7466 return Ye() || An(); 7467} 7468async function Ql(e) { 7469 var t; 7470 const n = document, r = n.createElement("div"), s = new Array(e.length), i = {}; 7471 Ms(r); 7472 for (let a = 0; a < e.length; ++a) { 7473 const o = ll(e[a]); 7474 o.tagName === "DIALOG" && o.show(); 7475 const c = n.createElement("div"); 7476 Ms(c), c.appendChild(o), r.appendChild(c), s[a] = o; 7477 } 7478 for (; !n.body; ) 7479 await Tn(50); 7480 n.body.appendChild(r); 7481 try { 7482 for (let a = 0; a < e.length; ++a) 7483 s[a].offsetParent || (i[e[a]] = !0); 7484 } finally { 7485 (t = r.parentNode) === null || t === void 0 || t.removeChild(r); 7486 } 7487 return i; 7488} 7489function Ms(e) { 7490 e.style.setProperty("visibility", "hidden", "important"), e.style.setProperty("display", "block", "important"); 7491} 7492function eu(e, t) { 7493 let n = "DOM blockers debug:\n```"; 7494 for (const r of Object.keys(e)) { 7495 n += ` 7496${r}:`; 7497 for (const s of e[r]) 7498 n += ` 7499 ${t[s] ? "ð«" : "â¡ï¸"} ${s}`; 7500 } 7501 console.log(`${n} 7502\`\`\``); 7503} 7504function tu() { 7505 for (const e of ["rec2020", "p3", "srgb"]) 7506 if (matchMedia(`(color-gamut: ${e})`).matches) 7507 return e; 7508} 7509function nu() { 7510 if (Is("inverted")) 7511 return !0; 7512 if (Is("none")) 7513 return !1; 7514} 7515function Is(e) { 7516 return matchMedia(`(inverted-colors: ${e})`).matches; 7517} 7518function ru() { 7519 if (Ps("active")) 7520 return !0; 7521 if (Ps("none")) 7522 return !1; 7523} 7524function Ps(e) { 7525 return matchMedia(`(forced-colors: ${e})`).matches; 7526} 7527const su = 100; 7528function iu() { 7529 if (matchMedia("(min-monochrome: 0)").matches) { 7530 for (let e = 0; e <= su; ++e) 7531 if (matchMedia(`(max-monochrome: ${e})`).matches) 7532 return e; 7533 throw new Error("Too high value"); 7534 } 7535} 7536function au() { 7537 if (kt("no-preference")) 7538 return 0; 7539 if (kt("high") || kt("more")) 7540 return 1; 7541 if (kt("low") || kt("less")) 7542 return -1; 7543 if (kt("forced")) 7544 return 10; 7545} 7546function kt(e) { 7547 return matchMedia(`(prefers-contrast: ${e})`).matches; 7548} 7549function ou() { 7550 if (Ds("reduce")) 7551 return !0; 7552 if (Ds("no-preference")) 7553 return !1; 7554} 7555function Ds(e) { 7556 return matchMedia(`(prefers-reduced-motion: ${e})`).matches; 7557} 7558function cu() { 7559 if (Fs("reduce")) 7560 return !0; 7561 if (Fs("no-preference")) 7562 return !1; 7563} 7564function Fs(e) { 7565 return matchMedia(`(prefers-reduced-transparency: ${e})`).matches; 7566} 7567function lu() { 7568 if ($s("high")) 7569 return !0; 7570 if ($s("standard")) 7571 return !1; 7572} 7573function $s(e) { 7574 return matchMedia(`(dynamic-range: ${e})`).matches; 7575} 7576const ie = Math, Le = () => 0; 7577function uu() { 7578 const e = ie.acos || Le, t = ie.acosh || Le, n = ie.asin || Le, r = ie.asinh || Le, s = ie.atanh || Le, i = ie.atan || Le, a = ie.sin || Le, o = ie.sinh || Le, c = ie.cos || Le, u = ie.cosh || Le, d = ie.tan || Le, h = ie.tan
7578h || Le, g = ie.exp || Le, y = ie.expm1 || Le, v = ie.log1p || Le, b = (B) => ie.pow(ie.PI, B), x = (B) => ie.log(B + ie.sqrt(B * B - 1)), j = (B) => ie.log(B + ie.sqrt(B * B + 1)), _ = (B) => ie.log((1 + B) / (1 - B)) / 2, T = (B) => ie.exp(B) - 1 / ie.exp(B) / 2, E = (B) => (ie.exp(B) + 1 / ie.exp(B)) / 2, O = (B) => ie.exp(B) - 1, A = (B) => (ie.exp(2 * B) - 1) / (ie.exp(2 * B) + 1), W = (B) => ie.log(1 + B); 7579 return { 7580 acos: e(0.12312423423423424), 7581 acosh: t(1e308), 7582 acoshPf: x(1e154), 7583 asin: n(0.12312423423423424), 7584 asinh: r(1), 7585 asinhPf: j(1), 7586 atanh: s(0.5), 7587 atanhPf: _(0.5), 7588 atan: i(0.5), 7589 sin: a(-1e300), 7590 sinh: o(1), 7591 sinhPf: T(1), 7592 cos: c(10.000000000123), 7593 cosh: u(1), 7594 coshPf: E(1), 7595 tan: d(-1e300), 7596 tanh: h(1), 7597 tanhPf: A(1), 7598 exp: g(1), 7599 expm1: y(1), 7600 expm1Pf: O(1), 7601 log1p: v(10), 7602 log1pPf: W(10), 7603 powPI: b(-100) 7604 }; 7605} 7606const du = "mmMwWLliI0fiflO&1", Un = { 7607 /** 7608 * The default font. User can change it in desktop Chrome, desktop Firefox, IE 11, 7609 * Android Chrome (but only when the size is ⥠than the default) and Android Firefox. 7610 */ 7611 default: [], 7612 /** OS font on macOS. User can change its size and weight. Applies after Safari restart. */ 7613 apple: [{ font: "-apple-system-body" }], 7614 /** User can change it in desktop Chrome and desktop Firefox. */ 7615 serif: [{ fontFamily: "serif" }], 7616 /** User can change it in desktop Chrome and desktop Firefox. */ 7617 sans: [{ fontFamily: "sans-serif" }], 7618 /** User can change it in desktop Chrome and desktop Firefox. */ 7619 mono: [{ fontFamily: "monospace" }], 7620 /** 7621 * Check the smallest allowed font size. User can change it in desktop Chrome, desktop Firefox and desktop Safari. 7622 * The height can be 0 in Chrome on a retina display. 7623 */ 7624 min: [{ fontSize: "1px" }], 7625 /** Tells one OS from another in desktop Chrome. */ 7626 system: [{ fontFamily: "system-ui" }] 7627}; 7628function fu() { 7629 return mu((e, t, n) => { 7630 const r = {}, s = {}; 7631 for (const a of Object.keys(Un)) { 7632 const [o = {}, c = du] = Un[a], u = e.createElement("span"); 7633 u.textContent = c, u.style.whiteSpace = "nowrap"; 7634 for (const d of Object.keys(o)) { 7635 const h = o[d]; 7636 h !== void 0 && (u.style[d] = h); 7637 } 7638 r[a] = u, t.append(e.createElement("br"), u); 7639 } 7640 const i = At() && qc(); 7641 for (const a of Object.keys(Un)) { 7642 const o = r[a].getBoundingClientRect().width; 7643 s[a] = i ? hu(o * n.devicePixelRatio) : o; 7644 } 7645 return s; 7646 }); 7647} 7648function hu(e) { 7649 const t = An() ? 0 : 3, n = Math.pow(10, t); 7650 return Math.floor(e * n) / n; 7651} 7652function mu(e, t = 4e3) { 7653 return Ji((n, r) => { 7654 const s = r.document, i = s.body, a = i.style; 7655 a.width = `${t}px`, a.webkitTextSizeAdjust = a.textSizeAdjust = "none", At() ? i.style.zoom = `${1 / r.devicePixelRatio}` : Ye() && (i.style.zoom = "reset"); 7656 const o = s.createElement("div"); 7657 return o.textContent = [...Array(t / 20 << 0)].map(() => "word").join(" "), i.appendChild(o), e(s, i, r); 7658 }, '<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">'); 7659} 7660function pu() { 7661 return navigator.pdfViewerEnabled; 7662} 7663function gu() { 7664 const e = new Float32Array(1), t = new Uint8Array(e.buffer); 7665 return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3]; 7666} 7667function yu() { 7668 const { ApplePaySession: e } = window; 7669 if (typeof (e == null ? void 0 : e.canMakePayments) != "function") 7670 return -1; 7671 if (vu()) 7672 return -3; 7673 try { 7674 return e.canMakePayments() ? 1 : 0; 7675 } catch (t) { 7676 return bu(t); 7677 } 7678} 7679const vu = dl; 7680function bu(e) { 7681 if (e instanceof Error && e.name === "InvalidAccessError" && /\bfrom\b.*\binsecure\b/i.test(e.message)) 7682 return -2; 7683 throw e; 7684} 7685function _u() { 7686 var e; 7687 const t = document.createElement("a"), n = (e = t.attributionSourceId) !== null && e !== void 0 ? e : t.attributionsourceid; 7688 return n === void 0 ? void 0 : String(n); 7689} 7690const qi = -1, Ki = -2, xu = /* @__PURE__ */ new Set([ 7691 10752, 7692 2849, 7693 2884, 7694 2885, 7695 2886, 7696 2928, 7697 2929, 7698 2930, 7699 2931, 7700 2932, 7701 2960, 7702 2961, 7703 2962, 7704 2963, 7705 2964, 7706 2965, 7707 2966, 7708 2967, 7709 2968, 7710 2978, 7711 3024, 7712 3042, 7713 3088, 7714 3089, 7715 3106, 7716 3107, 7717 32773, 7718 32777, 7719 32777, 7720 32823, 7721 32824, 7722 32936, 7723 32937, 7724 32938, 7725 32939, 7726 32968, 7727 32969, 7728 32970, 7729 32971, 7730 3317, 7731 33170, 7732 3333, 7733 3379, 7734 3386, 7735 33901, 7736 33902, 7737 34016, 7738 34024, 7739 34076, 7740 3408, 7741 3410, 7742 3411, 7743 3412, 7744 3413, 7745 3414, 7746 3415, 7747 34467, 7748 34816, 7749 34817, 7750 34818, 7751 34819, 7752 34877, 7753 34921, 7754 34930, 7755 35660, 7756 35661, 7757 35724, 7758 35738, 7759 35739, 7760 36003, 7761 36004, 7762 36005, 7763 36347, 7764 36348, 7765 36349, 7766 37440, 7767 37441, 7768 37443, 7769 7936, 7770 7937, 7771 7938 7772 // SAMPLE_ALPHA_TO_COVERAGE (32926) and SAMPLE_COVERAGE (32928) are excluded because they trigger a console warning
7773 // in IE, Chrome ⤠59 and Safari ⤠13 and give no entropy. 7774]), Cu = /* @__PURE__ */ new Set([ 7775 34047, 7776 35723, 7777 36063, 7778 34852, 7779 34853, 7780 34854, 7781 34229, 7782 36392, 7783 36795, 7784 38449 7785 // MAX_VIEWS_OVR 7786]), wu = ["FRAGMENT_SHADER", "VERTEX_SHADER"], ku = ["LOW_FLOAT", "MEDIUM_FLOAT", "HIGH_FLOAT", "LOW_INT", "MEDIUM_INT", "HIGH_INT"], Qi = "WEBGL_debug_renderer_info", ju = "WEBGL_polygon_mode"; 7787function Su({ cache: e }) { 7788 var t, n, r, s, i, a; 7789 const o = ea(e); 7790 if (!o) 7791 return qi; 7792 if (!na(o)) 7793 return Ki; 7794 const c = ta() ? null : o.getExtension(Qi); 7795 return { 7796 version: ((t = o.getParameter(o.VERSION)) === null || t === void 0 ? void 0 : t.toString()) || "", 7797 vendor: ((n = o.getParameter(o.VENDOR)) === null || n === void 0 ? void 0 : n.toString()) || "", 7798 vendorUnmasked: c ? (r = o.getParameter(c.UNMASKED_VENDOR_WEBGL)) === null || r === void 0 ? void 0 : r.toString() : "", 7799 renderer: ((s = o.getParameter(o.RENDERER)) === null || s === void 0 ? void 0 : s.toString()) || "", 7800 rendererUnmasked: c ? (i = o.getParameter(c.UNMASKED_RENDERER_WEBGL)) === null || i === void 0 ? void 0 : i.toString() : "", 7801 shadingLanguageVersion: ((a = o.getParameter(o.SHADING_LANGUAGE_VERSION)) === null || a === void 0 ? void 0 : a.toString()) || "" 7802 }; 7803} 7804function Eu({ cache: e }) { 7805 const t = ea(e); 7806 if (!t) 7807 return qi; 7808 if (!na(t)) 7809 return Ki; 7810 const n = t.getSupportedExtensions(), r = t.getContextAttributes(), s = [], i = [], a = [], o = [], c = []; 7811 if (r) 7812 for (const d of Object.keys(r)) 7813 i.push(`${d}=${r[d]}`); 7814 const u = Zs(t); 7815 for (const d of u) { 7816 const h = t[d]; 7817 a.push(`${d}=${h}${xu.has(h) ? `=${t.getParameter(h)}` : ""}`); 7818 } 7819 if (n) 7820 for (const d of n) { 7821 if (d === Qi && ta() || d === ju && Ou()) 7822 continue; 7823 const h = t.getExtension(d); 7824 if (!h) { 7825 s.push(d); 7826 continue; 7827 } 7828 for (const g of Zs(h)) { 7829 const y = h[g]; 7830 o.push(`${g}=${y}${Cu.has(y) ? `=${t.getParameter(y)}` : ""}`); 7831 } 7832 } 7833 for (const d of wu) 7834 for (const h of ku) { 7835 const g = Nu(t, d, h); 7836 c.push(`${d}.${h}=${g.join(",")}`); 7837 } 7838 return o.sort(), a.sort(), { 7839 contextAttributes: i, 7840 parameters: a, 7841 shaderPrecisions: c, 7842 extensions: n, 7843 extensionParameters: o, 7844 unsupportedExtensions: s 7845 }; 7846} 7847function ea(e) { 7848 if (e.webgl) 7849 return e.webgl.context; 7850 const t = document.createElement("canvas"); 7851 let n; 7852 t.addEventListener("webglCreateContextError", () => n = void 0); 7853 for (const r of ["webgl", "experimental-webgl"]) { 7854 try { 7855 n = t.getContext(r); 7856 } catch { 7857 } 7858 if (n) 7859 break; 7860 } 7861 return e.webgl = { context: n }, n; 7862} 7863function Nu(e, t, n) { 7864 const r = e.getShaderPrecisionFormat(e[t], e[n]); 7865 return r ? [r.rangeMin, r.rangeMax, r.precision] : []; 7866} 7867function Zs(e) { 7868 return Object.keys(e.__proto__).filter(Tu); 7869} 7870function Tu(e) { 7871 return typeof e == "string" && !e.match(/[^A-Z0-9_x]/); 7872} 7873function ta() { 7874 return nn(); 7875} 7876function Ou() { 7877 return At() || Ye(); 7878} 7879function na(e) { 7880 return typeof e.getParameter == "function"; 7881} 7882function Lu() { 7883 if (!(An() || Ye())) 7884 return -2; 7885 if (!window.AudioContext) 7886 return -1; 7887 const t = new AudioContext().baseLatency; 7888 return t == null ? -1 : isFinite(t) ? t : -3; 7889} 7890function Vu() { 7891 if (!window.Intl) 7892 return -1; 7893 const e = window.Intl.DateTimeFormat; 7894 if (!e) 7895 return -2; 7896 const t = e().resolvedOptions().locale; 7897 return !t && t !== "" ? -3 : t; 7898} 7899function Ru(e) { 7900 return /not/i.test(e); 7901} 7902async function Au() { 7903 const e = navigator.userAgentData; 7904 if (!e) 7905 return; 7906 const t = e.brands.filter(({ brand: s }) => !Ru(s)).map(({ brand: s }) => s), r = { 7907 brands: t.length > 1 ? t.filter((s) => s !== "Chromium") : t, 7908 mobile: e.mobile, 7909 platform: e.platform 7910 }; 7911 if (e.getHighEntropyValues) 7912 try { 7913 const s = await e.getHighEntropyValues(["architecture", "bitness", "model", "platformVersion"]); 7914 r.architecture = s.architecture, r.bitness = s.bitness, r.model = s.model, r.platformVersion = s.platformVersion; 7915 } catch (s) { 7916 if (s instanceof DOMException && s.name === "NotAllowedError") 7917 r.highEntropyStatus = "not_allowed"; 7918 else 7919 throw s; 7920 } 7921 return r; 7922} 7923const Mu = { 7924 // READ FIRST: 7925 // See https://github.com/fingerprintjs/fingerprintjs/blob/master/contributing.md#how-to-add-an-entropy-source 7926 // to learn how entropy source works and how to make your own. 7927 // The sources run in this exact order. 7928 // The asynchronous sources are at the start to run in parallel with other sources. 7929 userAgentData: Au, 7930 fonts: ml, 7931 domBlockers: ql, 7932 fontPreferences: fu, 7933 audio: rl, 7934 screenFrame: Il, 7935 canvas: gl, 7936 osCpu: Sl, 7937 languages: El, 7938 colorDepth: Nl, 7939 deviceMemory: Tl, 7940 screenResolution: Ol, 7941 hardwareConcurrency: Pl, 7942 timezone: Fl, 7943 sessionStorage: Zl, 7944 localStorage: Hl, 7945 indexedDB: Bl, 7946 openDatabase: Wl, 7947 cpuClass: Ul, 7948 platform: zl, 7949 plugins: pl, 7950 touchSupport: jl, 7951 vendor: Gl, 7952 vendorFlavors: Yl, 7953 cookiesEnabled: Xl, 7954 colorGamut: tu, 7955 invertedColors: nu, 7956 forcedColors: ru, 7957 monochrome: iu, 7958 contrast: au, 7959 reducedMotion: ou, 7960 reducedTransparency: cu, 7961 hdr: lu, 7962 math: uu, 7963 pdfViewerEnabled: pu, 7964 architecture: gu, 7965 applePay: yu, 7966 privateClickMeasurement: _u, 7967 audioBaseLatency: Lu, 7968 dateTimeLocale: Vu, 7969 // Some sources can affect other sources (e.g. WebGL can affect canvas), so it's important to run these sources 7970 // after other sources. 7971 webGlBasics: Su, 7972 webGlExtensions: Eu 7973}; 7974function Iu(e) { 7975 return zc(Mu, e, []); 7976} 7977const Pu = "$ if upgrade to Pro: https://fingerprint.com/github/?utm_source=oss&utm_medium=referral&utm_campaign=confidence_score"; 7978function Du(e) { 7979 const t = Fu(e), n = $u(t); 7980 return { score: t, comment: Pu.replace(/\$/g, `${n}`) }; 7981} 7982function Fu(e) { 7983 if (An()) 7984 return 0.4; 7985 if (Ye()) 7986 return Vr() && !(rn() && tn()) ? 0.5 : 0.3; 7987 const t = "value" in e.platform ? e.platform.value : ""; 7988 return /^Win/.test(t) ? 0.6 : /^Mac/.test(t) ? 0.5 : 0.7; 7989} 7990function $u(e) { 7991 return Gi(0.99 + 0.01 * e, 1e-4); 7992} 7993function Zu(e) { 7994 let t = ""; 7995 for (const n of Object.keys(e).sort()) { 7996 const r = e[n], s = "error" in r ? "error" : JSON.stringify(r.value); 7997 t += `${t ? "|" : ""}${n.replace(/([:|\\])/g, "\\$1")}:${s}`; 7998 } 7999 return t; 8000} 8001function ra(e) { 8002 return JSON.stringify(e, (t, n) => n instanceof Error ? Hc(n) : n, 2); 8003} 8004function sa(e) { 8005 return Zc(Zu(e)); 8006} 8007function Hu(e) { 8008 let t; 8009 const n = Du(e); 8010 return { 8011 get visitorId() { 8012 return t === void 0 && (t = sa(this.components)), t; 8013 }, 8014 set visitorId(r) { 8015 t = r; 8016 }, 8017 confidence: n, 8018 components: e, 8019 version: Ui 8020 }; 8021} 8022function Bu(e = 50) { 8023 return Vc(e, e * 2); 8024} 8025function Wu(e, t) { 8026 const n = Date.now(); 8027 return { 8028 async get(r) { 8029 const s = Date.now(), i = await e(), a = Hu(i); 8030 return (t || r != null && r.debug) && console.log(`Copy the text below to get the debug data: 8031 8032\`\`\` 8033version: ${a.version} 8034userAgent: ${navigator.userAgent} 8035timeBetweenLoadAndGet: ${s - n} 8036visitorId: ${a.visitorId} 8037components: ${ra(i)} 8038\`\`\``), a; 8039 } 8040 }; 8041} 8042function Uu() { 8043 if (!(window.__fpjs_d_m || Math.random() >= 1e-3)) 8044 try { 8045 const e = new XMLHttpRequest(); 8046 e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${Ui}/npm-monitoring`, !0), e.send(); 8047 } catch (e) { 8048 console.error(e); 8049 } 8050} 8051async function zu(e = {}) { 8052 const { delayFallback: t, debug: n, monitoring: r = !0 } = e; 8053 r && Uu(), await Bu(t); 8054 const s = Iu({ cache: {}, debug: n }); 8055 return Wu(s, n); 8056} 8057var Gu = { load: zu, hashComponents: sa, componentsToDebugString: ra }; 8058let zn = null; 8059async function ia() { 8060 if (typeof window > "u") return null; 8061 zn || (zn = Gu.load()); 8062 try { 8063 return (await (await zn).get()).visitorId; 8064 } catch (e) { 8065 return console.error("Failed to get fingerprint:", e), null; 8066 } 8067} 8068function Yu() { 8069 var e, t; 8070 if (!(typeof document > "u")) 8071 return (t = (e = document.cookie.split("; ").find((n) => n.startsWith("_ym_uid="))) == null ? void 0 : e.split("=")[1]) == null ? void 0 : t.replace(/^"|"$/g, ""); 8072} 8073function Hs(e) { 8074 const t = document.cookie.split("; ").find((r) => r.startsWith(`${e}=`)); 8075 if (!t) return null; 8076 const n = {}; 8077 return decodeURIComponent(t.slice(e.length + 1)).split("|||").forEach((r) => { 8078 const s = r.indexOf("="); 8079 if (s === -1) return; 8080 const i = r.slice(0, s); 8081 i && (n[i] = r.slice(s + 1)); 8082 }), n; 8083} 8084function Bs(e, t) { 8085 t === "organic" ? (e.utm_medium = "organic", e.utm_campaign = "not_set") : t === "typein" ? (e.utm_source = "(direct)", e.utm_medium = "type_in", e.utm_campaign = "not_set") : t === "referral" && (e.utm_medium = "referral", e.utm_campaign = "not_set"); 8086} 8087function aa() { 8088 if (typeof window > "u" || typeof document > "u") return {}; 8089 const e = {}; 8090 try { 8091 let t = hn.get; 8092 if (!t) { 8093 const r = window.location.hostname, s = r.includes(".") ? r.split(".").slice(-2).join(".") : r; 8094 hn.init({ domain: s }), t = hn.get; 8095 } 8096 if (t != null && t.first && (e.utm_source = t.first.src || void 0, e.utm_medium = t.first.mdm || void 0, e.utm_campaign = t.first.cmp || void 0, e.utm_content = t.first.cnt || void 0, e.utm_term = t.first.trm || void 0, Bs(e, t.first.typ)), !e.utm_source) { 8097 const r = Hs("sbjs_first") ?? Hs("sbjs_current"); 8098 r && (e.utm_source = r.src || void 0, e.utm_medium = r.mdm || void 0, e.utm_campaign = r.cmp || void 0, e.utm_content = r.cnt || void 0, e.utm_term = r.trm || void 0, Bs(e, r.typ)); 8099 } 8100 const n = Yu(); 8101 if (n && (e.ym_cid = n), document.referrer)
8102 try { 8103 new URL(document.referrer).host !== window.location.host && (e.referrer = document.referrer); 8104 } catch { 8105 e.referrer = document.referrer; 8106 } 8107 } catch (t) { 8108 console.error("Failed to collect marketing data", t); 8109 } 8110 return e; 8111} 8112const oa = "header_otp", Ve = { 8113 "af-wrapper": "af-wrapper", 8114 "af-title": "af-title", 8115 "af-block": "af-block", 8116 "af-backButton": "af-backButton", 8117 "af-text": "af-text", 8118 "af-hint": "af-hint", 8119 "af-link": "af-link" 8120}; 8121function Xu(e) { 8122 const t = e.replace(/\D/g, ""); 8123 if (t.length === 0) return ""; 8124 const n = t.length >= 11 ? t.slice(-11) : `7${t.slice(-10)}`; 8125 return Nr(n, { mask: qo, replacement: Ko }); 8126} 8127function Ju({ 8128 loginVariant: e, 8129 setAuthState: t, 8130 setContact: n, 8131 registrationSource: r = oa, 8132 initialValue: s 8133}) { 8134 const [i, a] = I.useState(!1), [o, c] = I.useState(!1), u = I.useMemo( 8135 () => vo(e === "phone" ? Sc : Ec), 8136 [e] 8137 ), d = io({ 8138 mode: "onSubmit", 8139 reValidateMode: "onChange", 8140 resolver: u, 8141 defaultValues: { 8142 phone: e === "phone" && s ? Xu(s) : "", 8143 email: e === "email" && s ? s : "" 8144 } 8145 }), { handleSubmit: h, clearErrors: g, setError: y } = d; 8146 I.useEffect(() => () => { 8147 g(); 8148 }, [e]); 8149 const v = async (b) => { 8150 a(!0); 8151 const x = e === "phone" ? b.phone : b.email, [j, _] = await Promise.all([ia(), Wi()]), T = aa(), E = T.ym_cid; 8152 try { 8153 const O = await fetch("/auth/otp/start", { 8154 method: "POST", 8155 headers: { "Content-Type": "application/json" }, 8156 // fingerprint ?? undefined â не null: ÑÑ ÐµÐ¼Ð° на бÑкенде (`otpStartSchema`) обÑÑвлÑÐµÑ Ð¿Ð¾Ð»Ðµ 8157 // `.optional()`, не `.nullable()`, а JSON.stringify (в оÑлиÑие Ð¾Ñ undefined) null не 8158 // оÑбÑаÑÑÐ²Ð°ÐµÑ â ÑÑÑой null Ñпал Ð±Ñ Ð²Ñем запÑоÑом в 400 Ñовно Ñогда, когда бÑаÑÐ·ÐµÑ Ð¸ Ñак 8159 // не Ñмог ÑнÑÑÑ Ð¾ÑпеÑаÑок (заблокиÑованнÑй localStorage/Ñбой FingerprintJS). 8160 // 8161 // registrationSource/marketing_data на `start` ÑакÑиÑеÑки не ÑиÑаÑÑÑÑ (startLoginCode 8162 // не ÑегиÑÑÑиÑÑÐµÑ â ÑегиÑÑÑаÑÐ¸Ñ Ð¿ÑоиÑÑ Ð¾Ð´Ð¸Ñ Ð½Ð° verify), но ÑлÑм ÑиммеÑÑиÑно Ñ verify ниже: 8163 // деÑевле деÑжаÑÑ Ð¾Ð±Ð° запÑоÑа одинаковÑми, Ñем обÑÑÑнÑÑÑ, поÑÐµÐ¼Ñ Ð¾Ð´Ð¸Ð½ коÑоÑе дÑÑгого. 8164 body: JSON.stringify({ 8165 channel: e, 8166 value: x, 8167 fingerprint: j ?? void 0, 8168 isIncognito: _, 8169 ymCid: E, 8170 registrationSource: r, 8171 marketing_data: Object.keys(T).length > 0 ? T : void 0 8172 }) 8173 }), A = await O.json().catch(() => null); 8174 if (!O.ok || !(A != null && A.success)) { 8175 y(e, { message: (A == null ? void 0 : A.error) ?? "Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ ÐºÐ¾Ð´. ÐопÑобÑйÑе еÑÑ Ñаз" }), a(!1); 8176 return; 8177 } 8178 gn("AUTH_START", { channel: e, source: r }), n(x), t("code"); 8179 } catch { 8180 y(e, { message: "Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ ÐºÐ¾Ð´. ÐÑовеÑÑÑе Ñоединение и попÑобÑйÑе еÑÑ Ñаз" }), a(!1); 8181 } 8182 }; 8183 return /* @__PURE__ */ l.jsx(Ua, { ...d, children: /* @__PURE__ */ l.jsxs("form", { className: Ve["af-block"], onSubmit: h(v), children: [ 8184 e === "phone" && /* @__PURE__ */ l.jsx(Qo, { name: "phone", placeholder: "+7 (XXX) XXX-XX-XX" }), 8185 e === "email" && /* @__PURE__ */ l.jsx(Ho, { type: "email", name: "email", placeholder: "ÐÐ°Ñ e-mail" }), 8186 /* @__PURE__ */ l.jsx($o, { checked: o, onChange: c }), 8187 /* @__PURE__ */ l.jsx(Rn, { type: "submit", fullWidth: !0, loading: i, disabled: !o, children: "ÐÑодолжиÑÑ" }) 8188 ] }) }); 8189} 8190const qu = "ÐойдиÑе или ÑоздайÑе аккаÑнÑ", jt = { 8191 "otp-inputs": "otp-inputs", 8192 "otp-inputs--success": "otp-inputs--success", 8193 "otp-input": "otp-input", 8194 "otp-inputs--error": "otp-inputs--error", 8195 "otp-shake": "otp-shake", 8196 "otp-inputWrapper": "otp-inputWrapper", 8197 "otp-filled": "otp-filled", 8198 "otp-caret": "otp-caret" 8199}; 8200function Ku({ 8201 value: e, 8202 onChange: t, 8203 onComplete: n, 8204 codeLength: r = 4, 8205 status: s = "idle", 8206 disabled: i = !1, 8207 autoFocus: a = !0, 8208 caret: o = !0, 8209 className: c 8210}) { 8211 const u = I.useRef([]), d = Array.from({ length: r }, (j, _) => e[_] ?? ""), h = (j) => { 8212 const _ = u.current[j]; 8213 _ == null || _.focus(), _ == null || _.select(); 8214 }, g = (j) => { 8215 const _ = j.join(""); 8216 t(_), _.length === r && (n == null || n(_)); 8217 }, y = (j) => { 8218 const _ = j.replace(/\D/g, "").slice(0, r); 8219 if (!_) return; 8220 const T = [...d]; 8221 _.split("").forEach((E, O) => { 8222 T[O] = E; 8223 }), g(T), h(Math.min(_.length, r - 1)); 8224 }; 8225 I.useEffect(() => { 8226 a && h(Math.min(e.length, r - 1)); 8227 }, [a]); 8228 const v = (j, _) => { 8229 if (i) return; 8230 if (j.length > 1) { 8231 y(j); 8232 return; 8233 } 8234 if (!/^\d?$/.test(j)) return; 8235 const T = [...d]; 8236 T[_] = j, g(T), j && _ < r - 1 && h(_ + 1); 8237 }, b = (j, _) => { 8238 if (j.key === "Backspace") { 8239 if (!d[_] && _ > 0) { 8240 j.preventDefault(); 8241 const T = [...d]; 8242 T[_ - 1] = "", g(T), h(_ - 1); 8243 } 8244 return; 8245 } 8246 if (j.key === "ArrowLeft" && _ > 0) { 8247 j.preventDefault(), h(_ - 1); 8248 return; 8249 } 8250 j.key === "ArrowRight" && _ < r - 1 && (j.preventDefault(), h(_ + 1)); 8251 }, x = (j) => { 8252 j.preventDefault(), y(j.clipboardData.getData("text")); 8253 }; 8254 return /* @__PURE__ */ l.jsx("div", { className: Fe(jt["otp-inputs"], s !== "idle" && jt[`otp-inputs--${s}`], c), children: d.map((j, _) => /* @__PURE__ */ l.jsxs("div", { className: jt["otp-inputWrapper"], children: [
8255 /* @__PURE__ */ l.jsx( 8256 "input", 8257 { 8258 ref: (T) => { 8259 u.current[_] = T; 8260 }, 8261 id: `otp-code-${_}`, 8262 value: j, 8263 onChange: (T) => v(T.target.value, _), 8264 onKeyDown: (T) => b(T, _), 8265 onPaste: x, 8266 onClick: (T) => T.currentTarget.select(), 8267 onFocus: (T) => T.currentTarget.select(), 8268 maxLength: _ === 0 ? r : 1, 8269 inputMode: "numeric", 8270 autoComplete: _ === 0 ? "one-time-code" : "off", 8271 "aria-label": `${_ + 1} из ${r}`, 8272 className: Fe(jt["otp-input"], j !== "" && jt["otp-filled"]), 8273 readOnly: i 8274 } 8275 ), 8276 o && /* @__PURE__ */ l.jsx("span", { className: jt["otp-caret"] }) 8277 ] }, _)) }); 8278} 8279const Re = { 8280 "cs-wrapper": "cs-wrapper", 8281 "cs-block": "cs-block", 8282 "cs-title": "cs-title", 8283 "cs-subtitle": "cs-subtitle", 8284 "cs-link": "cs-link", 8285 "cs-otp": "cs-otp", 8286 "cs-button": "cs-button", 8287 "cs-hint": "cs-hint", 8288 "cs-time": "cs-time" 8289}, Qu = { 8290 phone: "ÑмÑ", 8291 email: "поÑÑÑ" 8292}, ed = { 8293 phone: "ÐзмениÑÑ Ð½Ð¾Ð¼ÐµÑ?", 8294 email: "ÐзмениÑÑ Ð¿Ð¾ÑÑÑ?" 8295}, td = { 8296 phone: "ÑказаннÑй номеÑ", 8297 email: "ÑказаннÑÑ Ð¿Ð¾ÑÑÑ" 8298}; 8299function nd({ stage: e, channel: t, contact: n }) { 8300 const r = n || td[t], s = { 8301 title: `ÐведиÑе код из ${Qu[t]}`, 8302 subtitle: `ÐÑпÑавили код на ${r}.`, 8303 changeContact: ed[t] 8304 }; 8305 switch (e) { 8306 case "idle": 8307 return { ...s, buttonLabel: "ÐÑодолжиÑÑ" }; 8308 case "long-idle": 8309 return { ...s, buttonLabel: "ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно" }; 8310 case "loading": 8311 return { ...s, buttonLabel: "ÐÑовеÑка...", buttonIcon: "load" }; 8312 case "success": 8313 return { ...s, buttonLabel: "УÑпеÑно", buttonIcon: "check" }; 8314 case "invalid": 8315 return { 8316 title: "ÐевеÑнÑй код", 8317 subtitle: "ÐÑовеÑÑÑе ÑиÑÑÑ Ð¸ попÑобÑйÑе еÑÑ Ñаз", 8318 buttonLabel: "ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно" 8319 }; 8320 case "expired": 8321 return { 8322 title: "СÑок дейÑÑÐ²Ð¸Ñ ÐºÐ¾Ð´Ð° иÑÑÑк", 8323 subtitle: "ÐолÑÑиÑе новÑй код и попÑобÑйÑе еÑÑ Ñаз", 8324 buttonLabel: "ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно" 8325 }; 8326 case "throttled": 8327 return { 8328 title: "ÐÑ Ð²Ð²ÐµÐ»Ð¸ невеÑнÑй код ÑлиÑком много Ñаз", 8329 subtitle: "ÐолÑÑиÑе новÑй код и попÑобÑйÑе еÑÑ Ñаз", 8330 buttonLabel: "ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно" 8331 }; 8332 case "error": 8333 return { 8334 title: "Ðе ÑдалоÑÑ Ð²Ð¾Ð¹Ñи", 8335 subtitle: "ÐопÑобÑйÑе еÑÑ Ñаз ÑеÑез неÑколÑко минÑÑ", 8336 buttonLabel: "ÐовÑоÑиÑÑ Ð¿Ð¾Ð¿ÑÑкÑ" 8337 }; 8338 } 8339} 8340const rd = { 8341 idle: "idle", 8342 "long-idle": "idle",
8343 loading: "idle", 8344 success: "success", 8345 invalid: "error", 8346 expired: "error", 8347 throttled: "error", 8348 error: "error" 8349}, sd = { 8350 phone: "/login/phone-help", 8351 email: "/login/email-help" 8352}; 8353function id({ 8354 channel: e, 8355 contact: t, 8356 onVerify: n, 8357 onResend: r, 8358 onSuccess: s, 8359 onChangeContact: i, 8360 helpHref: a = !0, 8361 onNoCode: o, 8362 codeLength: c = 4, 8363 resendDelay: u = 11, 8364 showTitle: d = !0, 8365 succesDelay: h = 1500, 8366 className: g 8367}) { 8368 const [y, v] = I.useState(""), [b, x] = I.useState("idle"), [j, _] = I.useState(u), [T, E] = I.useState(!1), [O, A] = I.useState(0), W = I.useRef(s); 8369 I.useEffect(() => { 8370 W.current = s; 8371 }); 8372 const B = b === "idle" && j === 0 && !T, q = B ? "long-idle" : b, oe = q === "long-idle" || q === "invalid" || q === "expired" || q === "throttled", fe = b === "loading" || b === "success", U = b === "loading" || b === "success", N = nd({ stage: q, channel: e, contact: t }); 8373 I.useEffect(() => { 8374 if (j === 0) return; 8375 const ee = setTimeout(() => _((je) => je - 1), 1e3); 8376 return () => clearTimeout(ee); 8377 }, [j]), I.useEffect(() => { 8378 if (b !== "success") return; 8379 const ee = setTimeout(() => W.current(), h); 8380 return () => clearTimeout(ee); 8381 }, [b, h]); 8382 const G = () => { 8383 v(""), A((ee) => ee + 1); 8384 }, re = async (ee) => { 8385 x("loading"); 8386 try { 8387 switch ((await n(ee)).status) { 8388 case "ok": 8389 x("success"); 8390 break; 8391 case "invalid": 8392 x("invalid"), G(); 8393 break; 8394 case "expired": 8395 x("expired"), G(); 8396 break; 8397 case "throttled": 8398 x("throttled"), G(); 8399 break; 8400 case "error": 8401 x("error"); 8402 break; 8403 } 8404 } catch (je) { 8405 console.error(je), x("invalid"), G(); 8406 } 8407 }, Z = async () => { 8408 await r() !== !1 && (G(), x("idle"), E(!1), _(u)); 8409 }, H = (ee) => { 8410 v(ee), (b === "invalid" || b === "error" || b === "expired" || b === "throttled") && x("idle"); 8411 }, ce = (ee) => { 8412 if (!(b === "loading" || b === "success")) { 8413 if (oe) { 8414 Z(); 8415 return; 8416 } 8417 E(!0), ee.length === c && re(ee); 8418 } 8419 }, le = (ee) => { 8420 ee.preventDefault(), ce(y); 8421 }, Ce = (ee) => { 8422 b === "loading" || b === "success" || (E(!0), re(ee)); 8423 }; 8424 return /* @__PURE__ */ l.jsxs("div", { className: Fe(Re["cs-wrapper"], g), children: [ 8425 /* @__PURE__ */ l.jsxs("div", { className: Re["cs-block"], children: [
8426 d && /* @__PURE__ */ l.jsx("h2", { className: Re["cs-title"], children: N.title }), 8427 N.subtitle && /* @__PURE__ */ l.jsxs("div", { className: Re["cs-subtitle"], children: [ 8428 N.subtitle, 8429 " ", 8430 N.changeContact && i && /* @__PURE__ */ l.jsx("button", { className: Re["cs-link"], onClick: i, children: N.changeContact }) 8431 ] }) 8432 ] }), 8433 /* @__PURE__ */ l.jsxs("div", { className: Re["cs-block"], children: [ 8434 /* @__PURE__ */ l.jsxs("form", { className: Re["cs-block"], onSubmit: le, children: [ 8435 /* @__PURE__ */ l.jsx("div", { className: Re["cs-otp"], children: /* @__PURE__ */ l.jsx( 8436 Ku, 8437 { 8438 value: y, 8439 onChange: H, 8440 onComplete: Ce, 8441 codeLength: c, 8442 status: rd[q], 8443 disabled: fe, 8444 autoFocus: !0 8445 }, 8446 O 8447 ) }), 8448 /* @__PURE__ */ l.jsxs(Rn, { type: "submit", fullWidth: !0, className: Re["cs-button"], disabled: U, children: [ 8449 N.buttonIcon && /* @__PURE__ */ l.jsx(ai, { name: N.buttonIcon, size: 16 }), 8450 N.buttonLabel 8451 ] }) 8452 ] }), 8453 j > 0 && /* @__PURE__ */ l.jsxs("div", { className: Re["cs-hint"], children: [ 8454 "ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно ÑеÑез ",
8455 /* @__PURE__ */ l.jsx("span", { className: Re["cs-time"], children: j }), 8456 " ÑекÑнд" 8457 ] }), 8458 B && a && /* @__PURE__ */ l.jsx("div", { className: Re["cs-hint"], children: o ? /* @__PURE__ */ l.jsx("button", { type: "button", className: Re["cs-link"], onClick: o, children: "Ðе пÑÐ¸Ñ Ð¾Ð´Ð¸Ñ ÐºÐ¾Ð´?" }) : /* @__PURE__ */ l.jsx("a", { className: Re["cs-link"], href: sd[e], target: "_blank", children: "Ðе пÑÐ¸Ñ Ð¾Ð´Ð¸Ñ ÐºÐ¾Ð´?" }) }) 8459 ] }) 8460 ] }); 8461} 8462const ad = "https://t.me/VedoraHelpBot?start=start", od = "https://max.ru/u/f9LHodD0cOJ60WzqwmehfP-Ba0gw7NXhDfVsiChdN2STpS24O_-IO6NusYE", cd = { 8463 phone: { 8464 text: "ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸Ð»Ð¸ войдиÑе Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ Ð¿Ð¾ÑÑÑ. Ðод в ÑÑом ÑлÑÑае пÑидÑÑ Ð½Ð° ÑказаннÑй email.", 8465 buttonLabel: "ÐаÑегиÑÑÑиÑоваÑÑÑÑ ÑеÑез поÑÑÑ", 8466 onlyChannel: "ÑелеÑон" 8467 }, 8468 email: { 8469 text: "ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð¸Ð»Ð¸ войдиÑе Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ ÑелеÑона. Ðод в ÑÑом ÑлÑÑае пÑидÑÑ Ð¿Ð¾ СÐС.", 8470 buttonLabel: "ÐаÑегиÑÑÑиÑоваÑÑÑÑ Ð¿Ð¾ ÑелеÑонÑ", 8471 onlyChannel: "поÑÑÑ" 8472 } 8473}; 8474function ld({ channel: e, showTitle: t = !0, onSwitchChannel: n }) { 8475 const r = cd[e]; 8476 return /* @__PURE__ */ l.jsxs("div", { className: Ve["af-wrapper"], children: [ 8477 /* @__PURE__ */ l.jsxs("div", { className: Ve["af-block"], children: [ 8478 t && /* @__PURE__ */ l.jsx("h2", { className: Ve["af-title"], children: "Ðе пÑÐ¸Ñ Ð¾Ð´Ð¸Ñ ÐºÐ¾Ð´?" }),
8479 /* @__PURE__ */ l.jsx("p", { className: Ve["af-text"], children: r.text }), 8480 /* @__PURE__ */ l.jsxs("p", { className: Ve["af-text"], children: [ 8481 "ÐÑли Ð²Ñ Ñ Ð¾ÑиÑе полÑзоваÑÑÑÑ ÑеÑвиÑом ÑолÑко ÑеÑез ", 8482 r.onlyChannel, 8483 ", напиÑиÑе в ÑÐµÑ Ð¿Ð¾Ð´Ð´ÐµÑжкÑ. ÐÑ ÑеÑим вопÑоÑ" 8484 ] }) 8485 ] }), 8486 /* @__PURE__ */ l.jsxs("div", { className: Ve["af-block"], children: [ 8487 /* @__PURE__ */ l.jsx(Rn, { fullWidth: !0, onClick: n, children: r.buttonLabel }), 8488 /* @__PURE__ */ l.jsxs("p", { className: Ve["af-hint"], children: [ 8489 "ÐапиÑаÑÑ Ð² поддеÑÐ¶ÐºÑ Ð²", 8490 " ", 8491 /* @__PURE__ */ l.jsx( 8492 "a", 8493 { 8494 className: Ve["af-link"], 8495 href: ad, 8496 target: "_blank", 8497 rel: "noreferrer", 8498 children: "Telegram" 8499 } 8500 ), 8501 " ", 8502 "или", 8503 " ", 8504 /* @__PURE__ */ l.jsx("a", { className: Ve["af-link"], href: od, target: "_blank", rel: "noreferrer", children: "Max" }) 8505 ] }) 8506 ] }) 8507 ] }); 8508} 8509function ud({ 8510 showTitle: e = !0, 8511 onAuthComplete: t, 8512 registrationSource: n = oa, 8513 initialVariant: r, 8514 initialContact: s, 8515 cdpSlug: i, 8516 cdpUrl: a, 8517 onStepChange: o 8518}) { 8519 const [c, u] = I.useState(r ?? "phone"), [d, h] = I.useState("init"), [g, y] = I.useState(""), v = [ 8520 { value: "phone", content: "ТелеÑон" }, 8521 { value: "email", content: "ÐоÑÑа" } 8522 ]; 8523 I.useEffect(() => { 8524 d === "finished" && t && t(); 8525 }, [d, t]); 8526 const b = (A) => { 8527 h(A), o == null || o(A); 8528 }, x = () => { 8529 b("init"); 8530 }, j = () => { 8531 if (d === "no-code-help") { 8532 b("code"); 8533 return; 8534 } 8535 x(); 8536 }, _ = () => b("no-code-help"), T = () => { 8537 u(c === "phone" ? "email" : "phone"), b("init"), y(""); 8538 }, E = async (A) => { 8539 try { 8540 const [W, B] = await Promise.all([ia(), Wi()]), q = aa(), oe = q.ym_cid, fe = a ?? (typeof window < "u" ? window.location.pathname : void 0), N = await (await fetch("/auth/otp/verify", { 8541 method: "POST", 8542 headers: { "Content-Type": "application/json" }, 8543 body: JSON.stringify({ 8544 channel: c, 8545 value: g, 8546 code: A, 8547 fingerprint: W ?? void 0, 8548 isIncognito: B, 8549 ymCid: oe, 8550 // Ðайдено ÑевÑÑ (Low/Medium): без ÑÑÐ¸Ñ Ð´Ð²ÑÑ Ð¿Ð¾Ð»ÐµÐ¹ иÑÑоÑник и маÑкеÑинговÑе меÑки 8551 // OTP-ÑегиÑÑÑаÑии ÑеÑÑлиÑÑ Ð¼Ð¾Ð»Ñа â verifyLoginCode Ð¸Ñ ÑеÑÑно пиÑÐµÑ Ð² registrations/ 8552 // client_metas (system-auth-service.ts), но ÑолÑко еÑли полÑÑÐ¸Ñ Ð½Ð° Ð²Ñ Ð¾Ð´Ðµ. 8553 registrationSource: n, 8554 marketing_data: Object.keys(q).length > 0 ? q : void 0, 8555 // cdpSlug/cdpUrl â пÑиоÑиÑеÑÐ½Ð°Ñ CDP-аÑÑибÑÑÐ¸Ñ Ð´Ð»Ñ Sendsay q1/q4 (Ñм. jsdoc 8556 // verifyLoginCode); registrationSource вÑÑе â ÑолÑко Ñег Ð´Ð»Ñ registrations.source/ 8557 // бизнеÑ-ÑобÑÑиÑ, он Ð´Ð»Ñ q1/q4 болÑÑе не иÑполÑзÑеÑÑÑ. 8558 cdpSlug: i, 8559 cdpUrl: fe 8560 }) 8561 })).json().catch(() => null); 8562 return N != null && N.success ? (gn(N.isNewRegistration ? "REGISTRATION_COMPLETE" : "LOGIN_COMPLETE", { 8563 channel: c, 8564 source: n 8565 }), { status: "ok" }) : (N == null ? void 0 : N.reason) === "expired" ? { status: "expired" } : (N == null ? void 0 : N.reason) === "too_many_attempts" ? { status: "throttled" } : { status: (N == null ? void 0 : N.reason) === "invalid_code" || (N == null ? void 0 : N.reason) === "not_found" || (N == null ? void 0 : N.reason) === "used" || (N == null ? void 0 : N.reason) === "invalid_email" || (N == null ? void 0 : N.reason) === "invalid_phone" ? "invalid" : "error" }; 8566 } catch (W) { 8567 return console.error("verifyCode", W), { status: "error" }; 8568 } 8569 }, O = async () => { 8570 try { 8571 const A = await fetch("/auth/otp/resend", { 8572 method: "POST", 8573 headers: { "Content-Type": "application/json" }, 8574 body: JSON.stringify({ channel: c, value: g }) 8575 }), W = await A.json().catch(() => null); 8576 return A.ok && !!(W != null && W.success); 8577 } catch (A) { 8578 return console.error("resendCode", A), !1; 8579 } 8580 }; 8581 return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8582 d !== "init" && /* @__PURE__ */ l.jsx("button", { className: Ve["af-backButton"], onClick: j, children: /* @__PURE__ */ l.jsx(ai, { name: "arrow-left", size: 16 }) }), 8583 /* @__PURE__ */ l.jsx("div", { className: Ve["af-wrapper"], children: d === "init" ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [ 8584 /* @__PURE__ */ l.jsxs("div", { className: Ve["af-block"], children: [ 8585 e && /* @__PURE__ */ l.jsx("h2", { className: Ve["af-title"], children: qu }), 8586 /* @__PURE__ */ l.jsx( 8587 Da, 8588 { 8589 tabState: c, 8590 setTabState: (A) => u(A), 8591 tabsData: v, 8592 tabFullWidth: !0, 8593 tabVariant: "secondary" 8594 } 8595 ) 8596 ] }), 8597 /* @__PURE__ */ l.jsx("div", { className: Ve["af-block"], children: /* @__PURE__ */ l.jsx( 8598 Ju, 8599 { 8600 loginVariant: c, 8601 setAuthState: b, 8602 setContact: y, 8603 registrationSource: n, 8604 initialValue: g || s 8605 } 8606 ) }) 8607 ] }) : d === "no-code-help" ? /* @__P
8607URE__ */ l.jsx( 8608 ld, 8609 { 8610 channel: c, 8611 showTitle: e, 8612 onSwitchChannel: T 8613 } 8614 ) : /* @__PURE__ */ l.jsx( 8615 id, 8616 { 8617 channel: c, 8618 contact: g, 8619 onVerify: E, 8620 onResend: O, 8621 onSuccess: () => b("finished"), 8622 onChangeContact: x, 8623 onNoCode: _, 8624 showTitle: e, 8625 resendDelay: 60 8626 } 8627 ) }) 8628 ] }); 8629} 8630const Ht = { 8631 "am-overlay": "am-overlay", 8632 "am-modal": "am-modal", 8633 "am-modal--wide": "am-modal--wide", 8634 "am-content": "am-content", 8635 "am-close": "am-close" 8636}; 8637function dd({ onClose: e, cdpSlug: t, cdpUrl: n }) { 8638 const [r, s] = I.useState(!1), i = (o) => s(o === "no-code-help"), a = () => { 8639 e(), window.location.reload(); 8640 }; 8641 return I.useEffect(() => { 8642 const o = (c) => { 8643 c.key === "Escape" && e(); 8644 }; 8645 return document.addEventListener("keydown", o), document.body.style.overflow = "hidden", () => { 8646 document.removeEventListener("keydown", o), document.body.style.overflow = ""; 8647 }; 8648 }, [e]), /* @__PURE__ */ l.jsx("div", { className: Ht["am-overlay"], onClick: e, children: /* @__PURE__ */ l.jsxs( 8649 "div", 8650 { 8651 className: Fe(Ht["am-modal"], r && Ht["am-modal--wide"]), 8652 onClick: (o) => o.stopPropagation(), 8653 children: [
8654 /* @__PURE__ */ l.jsx("button", { type: "button", className: Ht["am-close"], "aria-label": "ÐакÑÑÑÑ", onClick: e, children: /* @__PURE__ */ l.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx( 8655 "path", 8656 { 8657 d: "M15 5L5 15M5 5L15 15", 8658 stroke: "currentColor", 8659 strokeWidth: "1.5", 8660 strokeLinecap: "round", 8661 strokeLinejoin: "round" 8662 } 8663 ) }) }), 8664 /* @__PURE__ */ l.jsx("div", { className: Ht["am-content"], children: /* @__PURE__ */ l.jsx( 8665 ud, 8666 { 8667 onAuthComplete: a, 8668 cdpSlug: t, 8669 cdpUrl: n, 8670 onStepChange: i 8671 } 8672 ) }) 8673 ] 8674 } 8675 ) }); 8676} 8677const C = new Proxy({}, { 8678 get: (e, t) => t 8679}), Se = { 8680 EXPERTS: "/consultants", 8681 PROFILE: "/profile", 8682 BILLING: "/profile/topup", 8683 BILLING_HISTORY: "/profile/billing-history", 8684 FAVORITES: "/profile/favorites", 8685 CONSULTATION_HISTORY: "/profile/consultations", 8686 UPCOMING_CONSULTATIONS: "/profile/upcoming-consultations", 8687 NATAL_CHART: "/profile/natal-chart", 8688 TRANSITS: "/profile/transits", 8689 SUBSCRIPTION: "/profile/subscription", 8690 SUBSCRIPTION_MATERIALS: "/profile/materials", 8691 TG_SUPPORT: "https://t.me/vedoratech" 8692}, fd = (e) => { 8693 const t = e.replace(/\D/g, ""); 8694 if (t[0] !== "7") return `+${t}`; 8695 const n = t.slice(1); 8696 return `+7 (${n.slice(0, 3)}) ${n.slice(3, 6)}-${n.slice(6, 8)}-${n.slice(8, 10)}`; 8697}, hd = (e, t, n, r) => { 8698 let s = Math.abs(e); 8699 return s %= 100, s >= 5 && s <= 20 ? r : (s %= 10, s === 1 ? t : s >= 2 && s <= 4 ? n : r); 8700}; 8701function md(e) { 8702 const t = e.getDate(), n = e.getMonth() + 1; 8703 return n === 3 && t >= 21 || n === 4 && t <= 19 ? "aries" : n === 4 && t >= 20 || n === 5 && t <= 20 ? "taurus" : n === 5 && t >= 21 || n === 6 && t <= 20 ? "gemini" : n === 6 && t >= 21 || n === 7 && t <= 22 ? "cancer" : n === 7 && t >= 23 || n === 8 && t <= 22 ? "leo" : n === 8 && t >= 23 || n === 9 && t <= 22 ? "virgo" : n === 9 && t >= 23 || n === 10 && t <= 22 ? "libra" : n === 10 && t >= 23 || n === 11 && t <= 21 ? "scorpio" : n === 11 && t >= 22 || n === 12 && t <= 21 ? "sagittarius" : n === 12 && t >= 22 || n === 1 && t <= 19 ? "capricorn" : n === 1 && t >= 20 || n === 2 && t <= 18 ? "aquarius" : "pisces"; 8704} 8705function Ws(e, t) { 8706 const r = (e == null ? void 0 : e.toLowerCase()) === "male" ? "male" : "female"; 8707 let s = "aries"; 8708 if (t) { 8709 const i = new Date(t); 8710 isNaN(i.getTime()) || (s = md(i)); 8711 } 8712 return `/images/avatars/${r}-${s}.png`; 8713} 8714const pd = ({ 8715 className: e = "", 8716 size: t = 32 8717}) => /* @__PURE__ */ l.jsx( 8718 "svg", 8719 { 8720 width: t, 8721 height: t, 8722 viewBox: "0 0 32 32", 8723 fill: "none", 8724 xmlns: "http://www.w3.org/2000/svg", 8725 className: e, 8726 children: /* @__PURE__ */ l.jsx( 8727 "path", 8728 { 8729 d: "M21.333 2.16699C23.0818 2.16717 24.499 3.58519 24.499 5.33398V7.5H27.626C28.8185 7.50024 29.6936 8.62129 29.4043 9.77832L24.7373 28.4443C24.5333 29.2605 23.8003 29.833 22.959 29.833H21.374C21.3604 29.8332 21.3467 29.834 21.333 29.834H5.33301C3.58411 29.834 2.16602 28.4159 2.16602 26.667V5.33398C2.16602 3.58508 3.58411 2.16699 5.33301 2.16699H21.333ZM5.33301 3.16699C4.13639 3.16699 3.16602 4.13737 3.16602 5.33398V26.667C3.16602 27.8636 4.13639 28.834 5.33301 28.834H17.9902C17.9935 28.8339 17.9967 28.833 18 28.833H21.3535C22.5406 28.8218 23.499 27.8567 23.499 26.667V5.33398C23.499 4.13747 22.5295 3.16717 21.333 3.16699H5.33301ZM24.499 25.2764L28.4346 9.53516C28.5657 9.0095 28.1679 8.50024 27.626 8.5H24.499V25.2764ZM17.999 23.5C18.2752 23.5 18.499 23.7239 18.499 24C18.499 24.2761 18.2752 24.5 17.999 24.5H8.66602C8.38987 24.5 8.16602 24.2761 8.16602 24C8.16602 23.7239 8.38987 23.5 8.66602 23.5H17.999ZM13.333 7.5C13.5667 7.5 13.7698 7.66177 13.8213 7.88965C14.1722 9.44738 14.6353 10.4863 15.3633 11.2295C16.0902 11.9714 17.1376 12.4765 18.7764 12.8457C19.0044 12.8971 19.1668 13.0993 19.167 13.333C19.167 13.5668 19.0045 13.7699 18.7764 13.8213C17.2189 14.1722 16.1806 14.6354 15.4375 15.3633C14.6956 16.0902 14.1905 17.1376 13.8213 18.7764C13.7699 19.0045 13.5668 19.167 13.333 19.167C13.0993 19.1668 12.8971 19.0044 12.8457 18.7764C12.4948 17.2186 12.0308 16.1806 11.3027 15.4375C10.5758 14.6956 9.52853 14.1905 7.88965 13.8213C7.66177 13.7698 7.5 13.5667 7.5 13.333C7.50015 13.0995 7.66192 12.8972 7.88965 12.8457C9.5285 12.4765 10.5758 11.9714 11.3027 11.2295C12.0309 10.4863 12.4948 9.44757 12.8457 7.88965L12.8721 7.80762C12.9485 7.62409 13.1287 7.50013 13.333 7.5ZM13.333 9.78027C13.01 10.6319 12.5926 11.3428 12.0176 11.9297C11.4236 12.5359 10.6855 12.9849 9.77051 13.333C10.6856 13.6812 11.4236 14.1311 12.0176 14.7373C12.5933 15.325 13.0118 16.0366 13.335 16.8896C13.6828 15.9775 14.1325 15.242 14.7373 14.6494C15.3251 14.0735 16.0364 13.6543 16.8896 13.3311C15.9776 12.9833 15.242 12.5344 14.6494 11.9297C14.0743 11.3427 13.656 10.632 13.333 9.78027Z", 8730 fill: "#7134C4" 8731 } 8732 ) 8733 } 8734), gd = ({ 8735 className: e = "", 8736 size: t = 16 8737}) => /* @__PURE__ */ l.jsxs("svg", { width: t, height: t, fill: "none", className: e, children: [
8738 /* @__PURE__ */ l.jsx( 8739 "path", 8740 { 8741 d: "M8.2287 11.6575C10.5991 11.5014 12.4872 9.60427 12.6426 7.22261C12.673 6.75654 12.673 6.27386 12.6426 5.80778C12.4872 3.42613 10.5991 1.52901 8.2287 1.37291C7.42003 1.31965 6.57574 1.31976 5.76869 1.37291C3.39832 1.52901 1.5102 3.42613 1.35483 5.80778C1.32443 6.27386 1.32443 6.75654 1.35483 7.22261C1.41142 8.09007 1.79864 8.89321 2.25451 9.57141C2.5192 10.0461 2.34452 10.6387 2.06882 11.1563C1.87003 11.5295 1.77064 11.7161 1.85044 11.8509C1.93025 11.9857 2.10851 11.9901 2.46504 11.9987C3.17011 12.0157 3.64555 11.8176 4.02295 11.5419C4.23699 11.3855 4.34402 11.3073 4.41778 11.2983C4.49154 11.2894 4.6367 11.3486 4.92697 11.4671C5.18786 11.5735 5.49077 11.6392 5.76869 11.6575C6.57574 11.7107 7.42003 11.7107 8.2287 11.6575Z", 8742 stroke: "#17161D", 8743 strokeLinecap: "round", 8744 strokeLinejoin: "round" 8745 } 8746 ), 8747 /* @__PURE__ */ l.jsx( 8748 "path", 8749 { 8750 d: "M5.33203 13.4531C6.02727 13.9512 6.86276 14.2652 7.7687 14.3248C8.57736 14.3781 9.42163 14.378 10.2287 14.3248C10.5066 14.3065 10.8096 14.2408 11.0704 14.1344C11.3607 14.0159 11.5058 13.9567 11.5796 13.9657C11.6534 13.9747 11.7606 14.0531 11.9744 14.2092C12.3518 14.4849 12.8273 14.683 13.5324 14.666C13.8889 14.6574 14.0672 14.6531 14.147 14.5183C14.2268 14.3835 14.1274 14.1969 13.9286 13.8237C13.6529 13.3061 13.4782 12.7135 13.7429 12.2387C14.1988 11.5605 14.586 10.7574 14.6426 9.88993C14.673 9.42386 14.673 8.94119 14.6426 8.47513C14.6245 8.19853 14.5831 7.92853 14.5203 7.66699", 8751 stroke: "#17161D", 8752 strokeLinecap: "round", 8753 strokeLinejoin: "round" 8754 } 8755 ), 8756 /* @__PURE__ */ l.jsx( 8757 "path", 8758 { 8759 d: "M4.66797 7.99967H9.33464M4.66797 5.33301H7.33464", 8760 stroke: "#17161D", 8761 strokeLinecap: "round", 8762 strokeLinejoin: "round" 8763 } 8764 ) 8765] }), yd = ({ 8766 className: e = "", 8767 size: t = 16 8768}) => /* @__PURE__ */ l.jsxs("svg", { width: t, height: t, fill: "none", className: e, children: [ 8769 /* @__PURE__ */ l.jsx( 8770 "path", 8771 { 8772 d: "M6.08789 0.681396C6.46237 0.557194 6.86767 0.557353 7.24219 0.681396C7.43701 0.746012 7.60452 0.848842 7.76953 0.971436C7.93018 1.09084 8.11449 1.24912 8.33398 1.43726C8.69774 1.74905 8.80018 1.82952 8.90234 1.8728C9.03323 1.92811 9.17711 1.9488 9.31836 1.93335C9.42862 1.92114 9.54977 1.8739 9.9873 1.67944L11.7959 0.875732C11.9504 0.807107 12.1297 0.820782 12.2715 0.912842C12.4134 1.00508 12.499 1.16354 12.499 1.33276V7.49878H12.5322C12.8973 7.49878 13.2018 7.4981 13.4492 7.51831C13.7023 7.53902 13.9403 7.58447 14.165 7.69897C14.5098 7.87475 14.7901 8.15498 14.9658 8.49976C15.0803 8.72453 15.1248 8.96241 15.1455 9.21558C15.1657 9.46297 15.166 9.76753 15.166 10.1326V13.3318C15.1659 14.2809 14.444 15.062 13.5195 15.156L13.332 15.1658H5.59863C4.86042 15.1658 4.27628 15.166 3.80664 15.1277C3.33145 15.0888 2.92873 15.008 2.56152 14.821C1.9658 14.5174 1.48031 14.032 1.17676 13.4363C0.989767 13.069 0.908954 12.6665 0.870117 12.1912C0.831748 11.7215 0.832031 11.1375 0.832031 10.3992V1.33276C0.832031 1.16364 0.917841 1.0051 1.05957 0.912842C1.20137 0.820764 1.38061 0.807166 1.53516 0.875732L3.34375 1.67944C3.7813 1.87391 3.90244 1.92113 4.0127 1.93335C4.1538 1.94885 4.29693 1.92793 4.42773 1.8728C4.53003 1.82957 4.63298 1.74933 4.99707 1.43726C5.2164 1.24926 5.39998 1.09081 5.56055 0.971436C5.72558 0.848771 5.89309 0.7461 6.08789 0.681396ZM6.92773 1.63062C6.75763 1.57429 6.57342 1.57428 6.40332 1.63062C6.34953 1.64851 6.27885 1.68377 6.15723 1.77417C6.03091 1.86808 5.8774 1.99993 5.64746 2.19702C5.33455 2.46524 5.09724 2.67543 4.81738 2.7937C4.52926 2.91539 4.21422 2.96165 3.90332 2.92749C3.60151 2.89418 3.31394 2.76082 2.9375 2.59351L1.83203 2.10132V10.3992C1.83203 11.1541 1.83291 11.6905 1.86719 12.1101C1.90099 12.5236 1.96499 12.7802 2.06836 12.9832C2.27598 13.3904 2.6074 13.7218 3.01465 13.9294C3.21752 14.0328 3.47434 14.0968 3.8877 14.1306C4.3072 14.1649 4.84389 14.1658 5.59863 14.1658H11.7012C11.5729 13.9154 11.4991 13.6324 11.499 13.3318V2.10132L10.3936 2.59351C10.0169 2.76092 9.72879 2.89431 9.42676 2.92749C9.11605 2.9615 8.8016 2.91533 8.51367 2.7937C8.23392 2.6754 7.99645 2.46518 7.68359 2.19702C7.45357 1.99986 7.29919 1.86807 7.17285 1.77417C7.05132 1.68389 6.98148 1.64844 6.92773
87721.63062ZM12.499 13.3318C12.4991 13.7918 12.872 14.1656 13.332 14.1658C13.7922 14.1658 14.1659 13.7919 14.166 13.3318V10.1326C14.166 9.75106 14.1655 9.49386 14.1494 9.29663C14.1338 9.10585 14.1059 9.01419 14.0752 8.95386C13.9953 8.79714 13.8676 8.6695 13.7109 8.5896C13.6506 8.55884 13.5586 8.53102 13.3672 8.51538C13.17 8.49928 12.9137 8.49878 12.5322 8.49878H12.499V13.3318Z", 8773 fill: "#17161D" 8774 } 8775 ), 8776 /* @__PURE__ */ l.jsx("path", { d: "M5 6V12", stroke: "#17161D", strokeLinecap: "round" }), 8777 /* @__PURE__ */ l.jsx( 8778 "path", 8779 { 8780 d: "M6.00391 10.9951L4.00391 10.9951", 8781 stroke: "#17161D", 8782 strokeLinecap: "round" 8783 } 8784 ), 8785 /* @__PURE__ */ l.jsx( 8786 "path", 8787 { 8788 d: "M4.99902 6H7.49902C8.32745 6 8.99902 6.67157 8.99902 7.5C8.99902 8.32843 8.32745 9 7.49902 9H4.00391", 8789 stroke: "#17161D", 8790 strokeLinecap: "round" 8791 } 8792 ) 8793] }), vd = ({ 8794 className: e = "", 8795 size: t = 16 8796}) => /* @__PURE__ */ l.jsx("svg", { width: t, height: t, viewBox: "0 0 16 16", className: e, children: /* @__PURE__ */ l.jsx( 8797 "path", 8798 { 8799 d: "M9.75 1.41431C9.88836 1.17873 10.1901 1.09788 10.4277 1.23267L12.7373 2.54419C12.8534 2.61028 12.939 2.71985 12.9736 2.84888C13.0082 2.97806 12.9896 3.11635 12.9219 3.23169C12.1629 4.52448 13.1323 6.18946 14.6689 6.1897C14.9449 6.18996 15.1689 6.41372 15.1689 6.6897V9.31177C15.1689 9.58767 14.9448 9.8115 14.6689 9.81177C13.1328 9.812 12.1637 11.4767 12.9229 12.7698C12.9903 12.885 13.0091 13.0226 12.9746 13.1516C12.94 13.2808 12.8545 13.3912 12.7383 13.4573L10.4287 14.7688C10.1912 14.9034 9.88939 14.8224 9.75098 14.5872C8.96764 13.2529 7.03826 13.2529 6.25488 14.5872C6.11655 14.8225 5.81468 14.9033 5.57715 14.7688L3.26758 13.4573C3.15135 13.3912 3.06592 13.2807 3.03125 13.1516C2.99684 13.0226 3.01549 12.885 3.08301 12.7698C3.84187 11.477 2.8724 9.81212 1.33594 9.81177C1.05985 9.81177 0.835048 9.58784 0.834961 9.31177V6.6897C0.834961 6.41355 1.0598 6.1897 1.33594 6.1897C2.87269 6.18934 3.84243 4.52412 3.08398 3.23169C3.01627 3.11628 2.99761 2.97813 3.03223 2.84888C3.06688 2.7196 3.15216 2.6093 3.26855 2.54321L5.57812 1.23267C5.81576 1.09796 6.11754 1.17871 6.25586 1.41431C7.03886 2.74745 8.96721 2.74753 9.75 1.41431ZM10.3271 2.32446C9.131 3.77522 6.87404 3.77598 5.67773 2.32544L4.16504 3.18384C4.82385 4.92233 3.65754 6.84409 1.83594 7.14673V8.85376C3.65721 9.1563 4.8219 11.0777 4.16406 12.8157L5.67676 13.675C6.87331 12.2243 9.1313 12.2246 10.3281 13.675L11.8418 12.8167C11.1833 11.0786 12.3472 9.15625 14.1689 8.85376V7.14575C12.3472 6.84309 11.1818 4.92218 11.8408 3.18384L10.3271 2.32446ZM8.00195 5.16724C9.56643 5.1675 10.8358 6.43575 10.8359 8.00024C10.8359 9.56482 9.56648 10.834 8.00195 10.8342C6.43735 10.8341 5.16903 9.56487 5.16895 8.00024C5.16912 6.43569 6.4374 5.16741 8.00195 5.16724ZM8.00195 6.16724C6.98969 6.16741 6.16912 6.98798 6.16895 8.00024C6.16903 9.01259 6.98963 9.83405 8.00195 9.83423C9.0142 9.83396 9.83585 9.01253 9.83594 8.00024C9.83576 6.98803 9.01414 6.1675 8.00195 6.16724Z", 8800 fill: "#17161D" 8801 } 8802) }), mt = ({ 8803 className: e = "", 8804 size: t = 16 8805}) => /* @__PURE__ */ l.jsx("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: /* @__PURE__ */ l.jsx( 8806 "path", 8807 { 8808 d: "M13 4.99854C13.276 4.99854 13.4997 5.22262 13.5 5.49854C13.5 5.77468 13.2761 5.99854 13 5.99854C12.1762 5.99854 11.0425 6.53504 10.0918 7.42627C9.14596 8.31311 8.5002 9.44037 8.5 10.4985C8.5 10.7747 8.27614 10.9985 8 10.9985C7.72386 10.9985 7.5 10.7747 7.5 10.4985C7.4998 9.44037 6.85404 8.31311 5.9082 7.42627C4.95746 6.53504 3.82376 5.99854 3 5.99854C2.72386 5.99854 2.5 5.77468 2.5 5.49854C2.50026 5.22262 2.72402 4.99854 3 4.99854C4.17596 4.99854 5.54266 5.71244 6.5918 6.6958C7.14984 7.21896 7.65111 7.85144 8 8.54346C8.34889 7.85144 8.85016 7.21896 9.4082 6.6958C10.4573 5.71244 11.824 4.99854 13 4.99854Z", 8809 fill: "#17161D" 8810 } 8811) }), bd = ({ 8812 className: e = "", 8813 size: t = 16 8814}) => /* @__PURE__ */ l.jsx( 8815 "svg", 8816 { 8817 width: t, 8818 height: t, 8819 fill: "none", 8820 viewBox: "0 0 16 16", 8821 className: e, 8822 children: /* @__PURE__ */ l.jsx( 8823 "path", 8824 { 8825 d: "M13 0.5C14.3807 0.5 15.5 1.61929 15.5 3V13C15.5 14.3807 14.3807 15.5 13 15.5H3C1.61929 15.5 0.5 14.3807 0.5 13V3C0.5 1.61929 1.61929 0.5 3 0.5H13ZM3 1.5C2.17157 1.5 1.5 2.17157 1.5 3V13C1.5 13.8284 2.17157 14.5 3 14.5H13C13.8284 14.5 14.5 13.8284 14.5 13V3C14.5 2.17157 13.8284 1.5 13 1.5H3ZM8.0127 3C8.28856 3.00024 8.51257 3.22411 8.5127 3.5V5.51367C8.5127 6.61824 9.40813 7.51367 10.5127 7.51367H12.5273C12.8033 7.51391 13.0273 7.73768 13.0273 8.01367C13.0273 8.28967 12.8033 8.51343 12.5273 8.51367H10.5127C9.40813 8.51367 8.5127 9.4091 8.5127 10.5137V12.5264C8.5127 12.8024 8.28863
882513.0261 8.0127 13.0264C7.73655 13.0264 7.5127 12.8025 7.5127 12.5264V10.5137C7.5127 9.4091 6.61726 8.51367 5.5127 8.51367H3.5C3.22396 8.51355 3 8.28974 3 8.01367C3 7.7376 3.22396 7.51379 3.5 7.51367H5.5127C6.61726 7.51367 7.5127 6.61824 7.5127 5.51367V3.5C7.51282 3.22396 7.73663 3 8.0127 3Z", 8826 fill: "#17161D" 8827 } 8828 ) 8829 } 8830), _d = ({ 8831 className: e = "", 8832 size: t = 16 8833}) => /* @__PURE__ */ l.jsx( 8834 "svg", 8835 { 8836 width: t, 8837 height: t, 8838 fill: "none", 8839 viewBox: "0 0 16 16", 8840 className: e, 8841 children: /* @__PURE__ */ l.jsx( 8842 "path", 8843 { 8844 d: "M8 2.82422C8.27614 2.82422 8.5 3.04808 8.5 3.32422V5.5C8.5 6.60457 9.39543 7.5 10.5 7.5H12.6768C12.9528 7.5001 13.1768 7.72392 13.1768 8C13.1767 8.27603 12.9528 8.4999 12.6768 8.5H10.5C9.39543 8.5 8.5 9.39543 8.5 10.5V12.6758C8.4997 12.9517 8.27596 13.1758 8 13.1758C7.72412 13.1757 7.5003 12.9516 7.5 12.6758V10.5C7.5 9.39543 6.60457 8.5 5.5 8.5H3.32324C3.04713 8.5 2.8233 8.2761 2.82324 8C2.82324 7.72386 3.0471 7.5 3.32324 7.5H5.5C6.60457 7.5 7.5 6.60457 7.5 5.5V3.32422C7.5 3.04813 7.72393 2.8243 8 2.82422Z", 8845 fill: "#7134C4" 8846 } 8847 ) 8848 } 8849); 8850function xd(e, t) { 8851 return [ 8852 ...t ? [{ 8853 type: "section", 8854 id: "subscription", 8855 icon: /* @__PURE__ */ l.jsx(bd, {}), 8856 label: "ÐодпиÑка", 8857 subscription: "paid", 8858 links: [ 8859 { label: "УпÑавление подпиÑкой", href: Se.SUBSCRIPTION }, 8860 ...e ? [{ label: "ÐаÑеÑиалÑ", href: Se.SUBSCRIPTION_MATERIALS }] : [] 8861 ] 8862 }] : [], 8863 { 8864 type: "section", 8865 id: "pasport", 8866 icon: /* @__PURE__ */ l.jsx(pd, { size: 16, className: C["magic-icon"] }), 8867 label: "ÐзоÑеÑиÑеÑкий паÑпоÑÑ", 8868 links: [ 8869 // { label: "ÐоÑмиÑеÑкий пÑоÑилÑ", href: "#", soon: true }, 8870 { label: "ÐаÑалÑÐ½Ð°Ñ ÐºÐ°ÑÑа", href: Se.NATAL_CHART, soon: !1 }, 8871 { label: "ТÑанзиÑÑ", href: Se.TRANSITS, soon: !1 } 8872 // { label: "ÐаÑÑиÑа ÑÑдÑбÑ", href: "#", soon: true }, 8873 // { label: "Human Design", href: "#", soon: true }, 8874 // { label: "ТаÑо", href: "#", soon: true }, 8875 ] 8876 }, 8877 { 8878 type: "section", 8879 id: "consultations", 8880 icon: /* @__PURE__ */ l.jsx(gd, {}), 8881 label: "ÐонÑÑлÑÑаÑии", 8882 links: [ 8883 { 8884 label: "ÐÑедÑÑоÑÑие конÑÑлÑÑаÑии", 8885 href: Se.UPCOMING_CONSULTATIONS 8886 }, 8887 { 8888 label: "ÐзбÑаннÑе ÑкÑпеÑÑÑ", 8889 href: Se.FAVORITES 8890 }, 8891 { 8892 label: "Ðои конÑÑлÑÑаÑии", 8893 href: Se.CONSULTATION_HISTORY 8894 } 8895 ] 8896 }, 8897 { 8898 type: "section", 8899 id: "balance", 8900 icon: /* @__PURE__ */ l.jsx(yd, {}), 8901 label: "ÐаланÑ", 8902 links: [ 8903 { label: "ÐополниÑÑ Ð±Ð°Ð»Ð°Ð½Ñ", href: Se.BILLING }, 8904 { 8905 label: "ÐÑÑоÑÐ¸Ñ Ð±Ð°Ð»Ð°Ð½Ñа", 8906 href: Se.BILLING_HISTORY 8907 } 8908 ] 8909 }, 8910 { 8911 type: "section", 8912 id: "settings", 8913 icon: /* @__PURE__ */ l.jsx(vd, {}), 8914 label: "ÐаÑÑÑойки", 8915 links: [ 8916 { label: "ÐÑоÑилÑ", href: Se.PROFILE } 8917 // ÐÑÐ½ÐºÑ Ð²Ñеменно ÑкÑÑÑ. 8918 // { label: "СмениÑÑ Ð¿Ð°ÑолÑ", href: PAGES_URL.CHANGE_PASSWORD }, 8919 ] 8920 } 8921 ]; 8922} 8923const Us = "crab:unauthorized", Cd = "crab:authorized", wd = { 8924 imageUrl: null, 8925 text: "ÐопÑобÑйÑе конÑÑлÑÑаÑии Ñ Ð°ÑÑÑологами и ÑаÑологами", 8926 buttonText: "ÐеÑвÑе 7 минÑÑ Ð±ÐµÑплаÑно", 8927 buttonLink: ii 8928}, Sd = (e) => { 8929 const [t, n] = I.useState(e.user || null), r = xd((t == null ? void 0 : t.hasActiveSubscription) ?? !1, (t == null ? void 0 : t.isSubscriptionVisible) ?? !0), [s, i] = I.useState(!1), [a, o] = I.useState(null), [c, u] = I.useState(!1), [d, h] = I.useState({}), g = I.useRef(null), [y, v] = I.useState(e.isConsultation || !1), [b, x] = I.useState(e.consultation || null); 8930 I.useEffect(() => { 8931 const R = (Q) => { 8932 Q.detail && n((ye) => ye ? { ...ye, ...Q.detail } : Q.detail); 8933 }; 8934 return window.addEventListener("oracul:user-update", R), () => window.removeEventListener("oracul:user-update", R); 8935 }, []), I.useEffect(() => { 8936 const R = (Q) => { 8937 const ye = Q.detail; 8938 h(ye ?? {}), u(!0); 8939 }; 8940 return window.addEventListener("vedora:login", R), () => window.removeEventListener("vedora:login", R); 8941 }, []), I.useEffect(() => { 8942 try { 8943 const R = window.location.hostname, Q = R.includes(".") ? R.split(".").slice(-2).join(".") : R; 8944 hn.init({ domain: Q }); 8945 } catch (R) { 8946 console.error("Failed to initialize sourcebuster", R); 8947 } 8948 }, []), I.useEffect(() => { 8949 window !== void 0 && t && gn("setUserId", { 8950 user_id: t == null ? void 0 : t.id 8951 }); 8952 }, [t == null ? void 0 : t.id]); 8953 const [j, _] = I.useState({}), [T, E] = I.useState(!1), [O, A] = I.useState(!1), [W, B] = I.useState(!1), [q, oe] = I.useState({}), fe = I.useRef(null), U = I.useRef(null), N = I.useRef(null), G = (R) => { 8954 oe((Q) => ({ ...Q, [R]: !Q[R] })); 8955 }; 8956 I.useEffect(() => { 8957 if (!T) return; 8958 const R = (Q) => { 8959 fe.current && !fe.current.contains(Q.target) && E(!1); 8960 }; 8961 return document.addEventListener("click", R), () => document.removeEventListener("click", R); 8962 }, [T]), I.useEffect(() => { 8963 if (!O) return; 8964 const R = (Q) => { 8965 U.current && !U.current.contains(Q.target) && A(!1); 8966 }; 8967 return document.addEventListener("click", R), () => document.removeEventListener("click", R); 8968 }, [O]), I.useEffect(() => { 8969 if (!W) return; 8970 const R = (Q) => { 8971 N.current && !N.current.contains(Q.target) && B(!1); 8972 }; 8973 return document.addEventListener("click", R), () => document.removeEventListener("click", R); 8974 }, [W]); 8975 const re = (R) => { 8976 _((Q) => ({ 8977 ...Q, 8978 [R]: !Q[R] 8979 })); 8980 }, Z = () => { 8981 _({}), o(null); 8982 }; 8983 I.useEffect(() => { 8984 const R = (Q) => { 8985 x(Q.detail); 8986 }; 8987 return window.addEventListener("oracul:banner-update", R), () => window.removeEventListener("oracul:banner-update", R); 8988 }, []), I.useEffect(() => { 8989 const R = () => { 8990 if (g.current) { 8991 const ye = g.current.offsetHeight; 8992 document.documentElement.style.setProperty( 8993 "--header-height", 8994 `${ye}px` 8995 ); 8996 const Ae = g.current.querySelector(".warningBanner"), Xe = g.current.querySelector(".headerBanner"), nt = (Ae ? Ae.offsetHeight : 0) + (Xe ? Xe.offsetHeight : 0); 8997 document.documentElement.style.setProperty( 8998 "--banner-height", 8999 `${nt}px` 9000 ); 9001 const _e = document.querySelector(".page"); 9002 _e && (nt > 0 ? _e.style.paddingTop = `${nt}px` : _e.style.removeProperty("padding-top")); 9003 } 9004 }; 9005 R(); 9006 const Q = new ResizeObserver(R); 9007 return g.current && Q.observe(g.current), () => Q.disconnect(); 9008 }, [b]), I.useEffect(() => { 9009 document.body.classList.toggle("menu-open", s), document.body.classList.toggle("search-open", a === "search"), document.body.classList.toggle("user-authorized", !!t); 9010 }, [s, a, t]); 9011 const [H, ce] = I.useState(!1); 9012 I.useEffect(() => { 9013 if (typeof window < "u") { 9014 const R = window.matchMedia("(hover: none)"); 9015 ce(R.matches); 9016 const Q = (ye) => ce(ye.matches); 9017 return R.addEventListener("change", Q), () => R.removeEventListener("change", Q); 9018 } 9019 }, []); 9020 const le = (R) => { 9021 H || o(R); 9022 }, Ce = () => { 9023 H || o(null); 9024 }, ee = (R) => { 9025 o((Q) => Q === R ? null : R); 9026 }, je = async () => { 9027 try { 9028 await fetch("/auth/logout", { method: "POST" }), window.location.reload(); 9029 } catch (R) { 9030 console.error("Logout failed", R); 9031 } 9032 }; 9033 I.useEffect(() => { 9034 typeof window < "u" && v(window.location.pathname.includes("/consultation/")); 9035 }, []); 9036 const Oe = (R) => { 9037 var Ae, Xe, nt; 9038 const ye = R.target.closest("a"); 9039 if (ye) { 9040 const _e = ye.getAttribute("href"); 9041 if (_e && !_e.startsWith("mailto:") && !_e.startsWith("tel:") && !_e.startsWith("#")) { 9042 let rt; 9043 try { 9044 if (_e.startsWith("http")) { 9045 const sn = new URL(_e); 9046 typeof window < "u" && sn.hostname === window.location.hostname ? rt = sn.pathname : rt = _e; 9047 } else _e.length > 0 && (rt = (nt = (Xe = (Ae = _e.split("?")) == null ? void 0 : Ae[0]) == null ? void 0 : Xe.split("#")) == null ? void 0 : nt[0]); 9048 } catch { 9049 } 9050 rt && gn("headerClick", { 9051 route: rt || "/" 9052 }); 9053 const Mt = ye.getAttribute("target") === "_blank", It = R.metaKey || R.ctrlKey || R.shiftKey || R.button !== 0; 9054 !Mt && !It && (R.preventDefault(), setTimeout(() => { 9055 window.location.href = _e; 9056 }, 200)); 9057 } 9058 } 9059 }, qe = !!t && !!e.contactBanner && !(b && !y), tt = () => {
9060 document.cookie = `${Cd}=1; path=/; max-age=${60 * 60 * 24 * 30}`; 9061 }, [ht, Ze] = I.useState(!1); 9062 I.useEffect(() => { 9063 if (t) return; 9064 const R = document.cookie.split("; ").some((Q) => Q.startsWith(`${Us}=`)); 9065 Ze(!R); 9066 }, [t]); 9067 const He = () => { 9068 document.cookie = `${Us}=1; path=/; max-age=${60 * 60 * 24 * 30}`, Ze(!1); 9069 }, vt = !t && ht && !(b && !y); 9070 return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [ 9071 /* @__PURE__ */ l.jsx(Va, {}), 9072 /* @__PURE__ */ l.jsxs("header", { id: "masthead", className: `header ${s ? "header--menu-open" : ""}`, ref: g, onClick: Oe, children: [ 9073 qe && e.contactBanner && /* @__PURE__ */ l.jsx( 9074 Br, 9075 { 9076 content: e.contactBanner, 9077 onDismiss: tt, 9078 onAction: tt 9079 } 9080 ), 9081 vt && /* @__PURE__ */ l.jsx(Br, { content: wd, onDismiss: He }), 9082 b && !y && /* @__PURE__ */ l.jsx(Ra, { consultation: b }), 9083 /* @__PURE__ */ l.jsx("div", { className: "header__wrap", children: /* @__PURE__ */ l.jsxs(vr, { children: [
9084 /* @__PURE__ */ l.jsxs("div", { className: "header__content", children: [ 9085 /* @__PURE__ */ l.jsxs("div", { className: "header__item header__item--logo", children: [ 9086 /* @__PURE__ */ l.jsx("a", { href: "/", rel: "home", className: "header__logo", children: /* @__PURE__ */ l.jsx( 9087 "img", 9088 { 9089 src: "https://vedora.ru/wp-content/themes/vedoradev/theme/images/header/logo.svg", 9090 alt: "Vedora" 9091 } 9092 ) }), 9093 /* @__PURE__ */ l.jsxs( 9094 "button", 9095 { 9096 className: "header__menu-btn header__menu-btn--mobile header__menu-btn--mobile-open", 9097 onClick: () => i(!s), 9098 children: [ 9099 /* @__PURE__ */ l.jsx( 9100 "svg", 9101 { 9102 width: "20", 9103 height: "20", 9104 viewBox: "0 0 20 20", 9105 fill: "none", 9106 xmlns: "http://www.w3.org/2000/svg", 9107 className: "header__menu-btn__icon-open", 9108 children: /* @__PURE__ */ l.jsx( 9109 "path", 9110 { 9111 d: "M16.666 15.083C17.0801 15.083 17.4159 15.4189 17.416 15.833C17.416 16.2472 17.0802 16.583 16.666 16.583H3.33301C2.91879 16.583 2.58301 16.2472 2.58301 15.833C2.58314 15.4189 2.91888 15.083 3.33301 15.083H16.666ZM16.666 9.25C17.0802 9.25 17.416 9.58579 17.416 10C17.416 10.4142 17.0802 10.75 16.666 10.75H3.33301C2.91879 10.75 2.58301 10.4142 2.58301 10C2.58301 9.58579 2.91879 9.25 3.33301 9.25H16.666ZM16.666 3.41699C17.0802 3.41699 17.416 3.75278 17.416 4.16699C17.4159 4.58109 17.0801 4.91699 16.666 4.91699H3.33301C2.91888 4.91699 2.58314 4.58109 2.58301 4.16699C2.58301 3.75278 2.91879 3.41699 3.33301 3.41699H16.666Z", 9112 fill: "#7134C4" 9113 } 9114 ) 9115 } 9116 ),
9117 /* @__PURE__ */ l.jsx( 9118 "svg", 9119 { 9120 width: "20", 9121 height: "20", 9122 viewBox: "0 0 20 20", 9123 fill: "none", 9124 xmlns: "http://www.w3.org/2000/svg", 9125 className: "header__menu-btn__icon-close", 9126 children: /* @__PURE__ */ l.jsx( 9127 "path", 9128 { 9129 d: "M14.4697 4.46973C14.7626 4.17692 15.2374 4.17686 15.5303 4.46973C15.8229 4.76261 15.823 5.23747 15.5303 5.53027L11.0596 10L15.5293 14.4697C15.8219 14.7626 15.822 15.2375 15.5293 15.5303C15.2365 15.8229 14.7616 15.8228 14.4688 15.5303L9.99902 11.0605L5.53125 15.5293C5.23845 15.8221 4.76362 15.8219 4.4707 15.5293C4.17781 15.2364 4.17781 14.7616 4.4707 14.4688L8.93848 10L4.46973 5.53125C4.17688 5.2384 4.17697 4.76361 4.46973 4.4707C4.76263 4.1779 5.23741 4.17784 5.53027 4.4707L9.99902 8.93945L14.4697 4.46973Z", 9130 fill: "#7134C4" 9131 } 9132 ) 9133 } 9134 ) 9135 ] 9136 } 9137 ) 9138 ] }),
9139 /* @__PURE__ */ l.jsx("div", { className: "header__item", children: /* @__PURE__ */ l.jsx("nav", { className: "header__nav", children: /* @__PURE__ */ l.jsxs("ul", { id: "menu-glavnaya", className: "menu", style: { alignItems: "center" }, children: [ 9140 /* @__PURE__ */ l.jsx("li", { id: "", className: "menu-item", children: /* @__PURE__ */ l.jsxs("a", { id: "header__button", href: Se.EXPERTS, children: [ 9141 /* @__PURE__ */ l.jsx( 9142 "svg", 9143 { 9144 width: "16", 9145 height: "16", 9146 viewBox: "0 0 16 16", 9147 fill: "none", 9148 xmlns: "http://www.w3.org/2000/svg", 9149 className: "header__button-icon", 9150 children: /* @__PURE__ */ l.jsx( 9151 "path", 9152 { 9153 d: "M6 8.5C6.82843 8.5 7.5 9.17157 7.5 10V14C7.5 14.8284 6.82843 15.5 6 15.5H2C1.17157 15.5 0.5 14.8284 0.5 14V10C0.5 9.17157 1.17157 8.5 2 8.5H6ZM14 8.5C14.8284 8.5 15.5 9.17157 15.5 10V14C15.5 14.8284 14.8284 15.5 14 15.5H10C9.17157 15.5 8.5 14.8284 8.5 14V10C8.5 9.17157 9.17157 8.5 10 8.5H14ZM2 9.5C1.72386 9.5 1.5 9.72386 1.5 10V14C1.5 14.2761 1.72386 14.5 2 14.5H6C6.27614 14.5 6.5 14.2761 6.5 14V10C6.5 9.72386 6.27614 9.5 6 9.5H2ZM10 9.5C9.72386 9.5 9.5 9.72386 9.5 10V14C9.5 14.2761 9.72386 14.5 10 14.5H14C14.2761 14.5 14.5 14.2761 14.5 14V10C14.5 9.72386 14.2761 9.5 14 9.5H10ZM6 0.5C6.82843 0.5 7.5 1.17157 7.5 2V6C7.5 6.82843 6.82843 7.5 6 7.5H2C1.17157 7.5 0.5 6.82843 0.5 6V2C0.5 1.17157 1.17157 0.5 2 0.5H6ZM14 0.5C14.8284 0.5 15.5 1.17157 15.5 2V6C15.5 6.82843 14.8284 7.5 14 7.5H10C9.17157 7.5 8.5 6.82843 8.5 6V2C8.5 1.17157 9.17157 0.5 10 0.5H14ZM2 1.5C1.72386 1.5 1.5 1.72386 1.5 2V6C1.5 6.27614 1.72386 6.5 2 6.5H6C6.27614 6.5 6.5 6.27614 6.5 6V2C6.5 1.72386 6.27614 1.5 6 1.5H2ZM10 1.5C9.72386 1.5 9.5 1.72386 9.5 2V6C9.5 6.27614 9.72386 6.5 10 6.5H14C14.2761 6.5 14.5 6.27614 14.5 6V2C14.5 1.72386 14.2761 1.5 14 1.5H10Z", 9154 fill: "white" 9155 } 9156 ) 9157 } 9158 ), 9159 "ÐонÑÑлÑÑаÑии" 9160 ] }) }),
9161 /* @__PURE__ */ l.jsx( 9162 "li", 9163 { 9164 id: "menu-item-697", 9165 className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-697", 9166 children: /* @__PURE__ */ l.jsx("a", { href: "/news/", children: "ÐовоÑÑи" }) 9167 } 9168 ), 9169 /* @__PURE__ */ l.jsxs( 9170 "li", 9171 { 9172 id: "menu-item-696", 9173 ref: fe, 9174 className: `menu-item menu-item-type-taxonomy menu-item-object-category menu-item-696 ${C["nav-item-has-dropdown"]}`, 9175 onMouseEnter: () => { 9176 H || E(!0); 9177 }, 9178 onMouseLeave: () => { 9179 H || E(!1); 9180 }, 9181 children: [ 9182 /* @__PURE__ */ l.jsxs( 9183 "button", 9184 { 9185 className: "header__nav-toggle", 9186 onClick: () => E((R) => !R), 9187 children: [ 9188 "ÐоÑоÑкоп",
9189 /* @__PURE__ */ l.jsx( 9190 mt, 9191 { 9192 className: `${C["nav-chevron"]} ${T ? C.rotated : ""}` 9193 } 9194 ) 9195 ] 9196 } 9197 ), 9198 /* @__PURE__ */ l.jsxs("div", { className: `${C["nav-menu-dropdown"]} ${T ? C.active : ""}`, children: [ 9199 /* @__PURE__ */ l.jsx("a", { href: "/horoscope/", className: C["nav-menu-dropdown__link"], children: "ÐоÑоÑкоп" }), 9200 /* @__PURE__ */ l.jsx("a", { href: "https://lp.vedora.ru/services", target: "_blank", className: C["nav-menu-dropdown__link"], children: "ÐÑÑÑоÑÑлÑги" }) 9201 ] }) 9202 ] 9203 } 9204 ), 9205 /* @__PURE__ */ l.jsxs( 9206 "li", 9207 { 9208 id: "menu-item-701", 9209 ref: U, 9210 className: `menu-item menu-item-type-custom menu-item-object-custom menu-item-701 ${C["nav-item-has-dropdown"]}`, 9211 onMouseEnter: () => { 9212 H || A(!0); 9213 }, 9214 onMouseLeave: () => { 9215 H || A(!1); 9216 }, 9217 children: [
9218 /* @__PURE__ */ l.jsxs( 9219 "button", 9220 { 9221 className: "header__nav-toggle", 9222 onClick: () => A((R) => !R), 9223 children: [ 9224 "ТаÑо и ÐÑмеÑо", 9225 /* @__PURE__ */ l.jsx( 9226 mt, 9227 { 9228 className: `${C["nav-chevron"]} ${O ? C.rotated : ""}` 9229 } 9230 ) 9231 ] 9232 } 9233 ), 9234 /* @__PURE__ */ l.jsxs("div", { className: `${C["nav-menu-dropdown"]} ${O ? C.active : ""}`, children: [ 9235 /* @__PURE__ */ l.jsx("a", { href: "https://lp.vedora.ru/services/tarot", className: C["nav-menu-dropdown__link"], children: "ТаÑо ÑÑлÑги" }), 9236 /* @__PURE__ */ l.jsx("a", { href: "/main/karta-dnya-taro/", className: C["nav-menu-dropdown__link"], children: "ÐаÑÑа днÑ" }),
9237 /* @__PURE__ */ l.jsx("a", { href: "/numerologiya/", className: C["nav-menu-dropdown__link"], children: "ÐÑмеÑологиÑ" }) 9238 ] }) 9239 ] 9240 } 9241 ), 9242 /* @__PURE__ */ l.jsx( 9243 "li", 9244 { 9245 id: "menu-item-698", 9246 className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-698", 9247 children: /* @__PURE__ */ l.jsx("a", { href: "/gadaniya/", children: "ÐаданиÑ" }) 9248 } 9249 ), 9250 /* @__PURE__ */ l.jsxs( 9251 "li", 9252 { 9253 id: "menu-item-700", 9254 ref: N, 9255 className: `menu-item menu-item-type-taxonomy menu-item-object-category ${C["nav-item-has-dropdown"]}`, 9256 onMouseEnter: () => { 9257 H || B(!0); 9258 }, 9259 onMouseLeave: () => { 9260 H || B(!1); 9261 }, 9262 children: [
9263 /* @__PURE__ */ l.jsxs( 9264 "button", 9265 { 9266 className: "header__nav-toggle", 9267 onClick: () => B((R) => !R), 9268 children: [ 9269 "Ðнлайн-ÑаÑÑеÑ", 9270 /* @__PURE__ */ l.jsx( 9271 mt, 9272 { 9273 className: `${C["nav-chevron"]} ${W ? C.rotated : ""}` 9274 } 9275 ) 9276 ] 9277 } 9278 ), 9279 /* @__PURE__ */ l.jsxs("div", { className: `${C["nav-menu-dropdown"]} ${W ? C.active : ""}`, children: [ 9280 /* @__PURE__ */ l.jsx("a", { href: "/tools/synastry", className: C["nav-menu-dropdown__link"], children: "ÐÑÑÑологиÑеÑÐºÐ°Ñ ÑинаÑÑÑиÑ" }), 9281 /* @__PURE__ */ l.jsx("a", { href: "/horoscope/sovmestimost-znakov-zodiaka/", className: C["nav-menu-dropdown__link"], children: "СовмеÑÑимоÑÑÑ Ð·Ð½Ð°ÐºÐ¾Ð² зодиака" }),
9282 /* @__PURE__ */ l.jsx("a", { href: "/tools/numerology", className: C["nav-menu-dropdown__link"], children: "ÐвадÑÐ°Ñ ÐиÑагоÑа" }), 9283 /* @__PURE__ */ l.jsx("a", { href: "/tools/taro", className: C["nav-menu-dropdown__link"], children: "ÐоÑÑÑÐµÑ ÐиÑноÑÑи" }), 9284 /* @__PURE__ */ l.jsx("a", { href: "/taro/", className: C["nav-menu-dropdown__link"], children: "Ðнлайн-ÑаÑклад ÑаÑо" }), 9285 /* @__PURE__ */ l.jsx("a", { href: "/tools/name", className: C["nav-menu-dropdown__link"], children: "ÐÑмеÑÐ¾Ð»Ð¾Ð³Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸" }) 9286 ] }) 9287 ] 9288 } 9289 ), 9290 /* @__PURE__ */ l.jsx( 9291 "li", 9292 { 9293 id: "menu-item-702", 9294 className: "menu-item menu-item-type-custom menu-item-object-custom menu-item-702", 9295 children: /* @__PURE__ */ l.jsx("a", { href: "/tools/human-design", children: "Ðизайн Ñеловека" }) 9296 } 9297 ) 9298 ] }) }) }),
9299 /* @__PURE__ */ l.jsxs("div", { className: "header__item header__item--search", children: [ 9300 /* @__PURE__ */ l.jsx("button", { className: "header__search-btn", onClick: () => ee("search"), children: /* @__PURE__ */ l.jsx( 9301 "svg", 9302 { 9303 width: "20", 9304 height: "20", 9305 viewBox: "0 0 20 20", 9306 fill: "none", 9307 xmlns: "http://www.w3.org/2000/svg", 9308 children: /* @__PURE__ */ l.jsx( 9309 "path", 9310 { 9311 d: "M9.16699 1.75C13.263 1.75018 16.583 5.07099 16.583 9.16699C16.5829 10.945 15.9563 12.576 14.9131 13.8535L18.0293 16.9697C18.3221 17.2626 18.3222 17.7374 18.0293 18.0303C17.7364 18.3228 17.2615 18.323 16.9688 18.0303L13.8525 14.9141C12.5752 15.9567 10.9445 16.5829 9.16699 16.583C5.07099 16.583 1.75018 13.263 1.75 9.16699C1.75 5.07088 5.07088 1.75 9.16699 1.75ZM9.16699 3.25C5.89931 3.25 3.25 5.89931 3.25 9.16699C3.25018 12.4345 5.89941 15.083 9.16699 15.083C12.4344 15.0828 15.0828 12.4344 15.083 9.16699C15.083 5.89941 12.4345 3.25018 9.16699 3.25Z", 9312 fill: "#7134C4" 9313 } 9314 ) 9315 } 9316 ) }), 9317 t ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
9318 /* @__PURE__ */ l.jsxs( 9319 "div", 9320 { 9321 className: `header__score ${a === "balance" ? "active" : ""}`, 9322 onClick: () => ee("balance"), 9323 onMouseEnter: () => le("balance"), 9324 onMouseLeave: Ce, 9325 children: [ 9326 /* @__PURE__ */ l.jsxs("span", { className: "header__score-main", children: [ 9327 /* @__PURE__ */ l.jsxs( 9328 "svg", 9329 { 9330 width: "24", 9331 height: "24", 9332 viewBox: "0 0 24 24", 9333 fill: "none", 9334 xmlns: "http://www.w3.org/2000/svg", 9335 children: [ 9336 /* @__PURE__ */ l.jsx( 9337 "path", 9338 { 9339 d: "M12 22.3635C17.799 22.3635 22.5 17.7236 22.5 12.0001C22.5 6.27656 17.799 1.63672 12 1.63672C6.20101 1.63672 1.5 6.27656 1.5 12.0001C1.5 17.7236 6.20101 22.3635 12 22.3635Z", 9340 fill: "url(#paint0_radial_12108_55363)" 9341 } 9342 ),
9343 /* @__PURE__ */ l.jsx("defs", { children: /* @__PURE__ */ l.jsxs( 9344 "radialGradient", 9345 { 9346 id: "paint0_radial_12108_55363", 9347 cx: "0", 9348 cy: "0", 9349 r: "1", 9350 gradientUnits: "userSpaceOnUse", 9351 gradientTransform: "translate(8.26744 6.93161) rotate(24.4867) scale(18.455 18.2149)", 9352 children: [ 9353 /* @__PURE__ */ l.jsx("stop", { offset: "0.0920692", stopColor: "#FFB9AC" }), 9354 /* @__PURE__ */ l.jsx("stop", { offset: "0.740385", stopColor: "#6320D8" }), 9355 /* @__PURE__ */ l.jsx("stop", { offset: "1", stopColor: "#21054B" }) 9356 ] 9357 } 9358 ) }) 9359 ] 9360 } 9361 ),
9362 /* @__PURE__ */ l.jsx("span", { children: t.balance || 0 }) 9363 ] }), 9364 t.lockedBalance && t.lockedBalance > 0 ? /* @__PURE__ */ l.jsxs("span", { className: "header__score-locked", children: [ 9365 "(", 9366 t.lockedBalance, 9367 " ð)" 9368 ] }) : null 9369 ] 9370 } 9371 ), 9372 /* @__PURE__ */ l.jsx( 9373 "div", 9374 { 9375 className: `header__profile-avatar ${a === "profile" ? "active" : ""}`, 9376 onClick: () => ee("profile"), 9377 onMouseEnter: () => le("profile"), 9378 onMouseLeave: Ce, 9379 children: /* @__PURE__ */ l.jsx( 9380 "img", 9381 { 9382 src: t.pictureUrl || Ws(t.gender, t.birthDate), 9383 alt: "avatar" 9384 } 9385 ) 9386 } 9387 ) 9388 ] }) : /* @__PURE__ */ l.jsxs( 9389 "button", 9390 { 9391 type: "button", 9392 className: "header__auth-btn header__login-btn", 9393 "aria-label": "ÐойÑи", 9394 onClick: () => u(!0), 9395 children: [
9396 /* @__PURE__ */ l.jsxs( 9397 "svg", 9398 { 9399 className: "header__login-icon", 9400 width: "20", 9401 height: "20", 9402 viewBox: "0 0 20 20", 9403 fill: "none", 9404 xmlns: "http://www.w3.org/2000/svg", 9405 "aria-hidden": "true", 9406 children: [ 9407 /* @__PURE__ */ l.jsx( 9408 "path", 9409 { 9410 d: "M7.91602 14.9997V16.6663C7.91602 17.3567 8.47568 17.9163 9.16602 17.9163H16.666C17.3564 17.9163 17.916 17.3567 17.916 16.6663V3.33301C17.916 2.64265 17.3564 2.08301 16.666 2.08301H9.16602C8.47568 2.08301 7.91602 2.64265 7.91602 3.33301V4.99967", 9411 stroke: "#7134C4", 9412 strokeWidth: "1.5", 9413 strokeLinecap: "round", 9414 strokeLinejoin: "round" 9415 } 9416 ),
9417 /* @__PURE__ */ l.jsx( 9418 "path", 9419 { 9420 d: "M9.99967 12.9163L12.9163 9.99967L9.99967 7.08301M12.083 9.99967H2.08301", 9421 stroke: "#7134C4", 9422 strokeWidth: "1.5", 9423 strokeLinecap: "round", 9424 strokeLinejoin: "round" 9425 } 9426 ) 9427 ] 9428 } 9429 ), 9430 /* @__PURE__ */ l.jsx("span", { className: "header__login-text", children: "ÐойÑи" }) 9431 ] 9432 } 9433 ) 9434 ] }) 9435 ] }), 9436 t && /* @__PURE__ */ l.jsxs( 9437 "div", 9438 { 9439 className: `${C["profile-dropdown"]} ${a === "profile" ? C.active : ""}`, 9440 onMouseEnter: () => le("profile"), 9441 onMouseLeave: Ce, 9442 children: [ 9443 /* @__PURE__ */ l.jsxs("a", { href: Se.PROFILE, className: C.profile, children: [
9444 /* @__PURE__ */ l.jsx( 9445 "img", 9446 { 9447 src: t.pictureUrl || Ws(t.gender, t.birthDate), 9448 alt: "avatar", 9449 className: C.avatar 9450 } 9451 ), 9452 /* @__PURE__ */ l.jsxs("div", { className: C["profile-info"], children: [ 9453 /* @__PURE__ */ l.jsx("div", { className: C.name, children: t.name }), 9454 /* @__PURE__ */ l.jsx("div", { className: C.email, children: t.email || (t.phone ? fd(t.phone) : "") }) 9455 ] }) 9456 ] }), 9457 /* @__PURE__ */ l.jsx("div", { className: C.links, children: r.map((R, Q) => { 9458 var ye; 9459 return /* @__PURE__ */ l.jsx("div", { children: R.type === "link" ? /* @__PURE__ */ l.jsx( 9460 "a", 9461 { 9462 href: R.href, 9463 className: C["nav-link"], 9464 onClick: Z, 9465 children: /* @__PURE__ */ l.jsxs("div", { className: C["nav-item-left"], children: [
9466 /* @__PURE__ */ l.jsx("span", { className: C.icon, children: R.icon }), 9467 /* @__PURE__ */ l.jsx("span", { className: C.label, children: R.label }) 9468 ] }) 9469 } 9470 ) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [ 9471 /* @__PURE__ */ l.jsxs( 9472 "button", 9473 { 9474 className: `${C["nav-link"]} ${C["section-button"]}`, 9475 onClick: () => re(R.id), 9476 "aria-expanded": j[R.id], 9477 children: [ 9478 /* @__PURE__ */ l.jsxs("div", { className: C["nav-item-left"], children: [ 9479 /* @__PURE__ */ l.jsx("span", { className: C.icon, children: R.icon }), 9480 /* @__PURE__ */ l.jsx("span", { className: C.label, children: R.label }), 9481 R.subscription === "paid" && /* @__PURE__ */ l.jsxs("span", { className: `${C.tag} ${C["tag--secondary"]}`, children: [ 9482 "Vedora ",
9483 /* @__PURE__ */ l.jsx(_d, { size: 14 }) 9484 ] }) 9485 ] }), 9486 /* @__PURE__ */ l.jsx( 9487 mt, 9488 { 9489 className: `${C.chevron} ${j[R.id] ? C.rotated : ""}` 9490 } 9491 ) 9492 ] 9493 } 9494 ), 9495 /* @__PURE__ */ l.jsx( 9496 "div", 9497 { 9498 className: `${C["links-wrapper"]} ${j[R.id] ? C.open : ""}`, 9499 children: /* @__PURE__ */ l.jsx( 9500 "div", 9501 { 9502 className: `${C["links-container"]} ${j[R.id] ? C.open : ""}`, 9503 children: (ye = R.links) == null ? void 0 : ye.map((Ae, Xe) => /* @__PURE__ */ l.jsxs( 9504 "a", 9505 { 9506 href: Ae.href, 9507 className: `${C["nav-link"]} ${C["menu-link"]}`, 9508 onClick: Z, 9509 children: [
9510 /* @__PURE__ */ l.jsxs("div", { className: C["nav-item-left"], children: [ 9511 Ae.icon && /* @__PURE__ */ l.jsx("span", { className: C.icon, children: Ae.icon }), 9512 /* @__PURE__ */ l.jsx("span", { className: C.label, children: Ae.label }) 9513 ] }), 9514 Ae.soon && /* @__PURE__ */ l.jsx("span", { className: C.tag, children: "ÑкоÑо" }) 9515 ] 9516 }, 9517 Xe 9518 )) 9519 } 9520 ) 9521 } 9522 ) 9523 ] }) }, Q); 9524 }) }), 9525 /* @__PURE__ */ l.jsxs("div", { className: C.bottom, children: [ 9526 /* @__PURE__ */ l.jsxs("a", { href: Se.TG_SUPPORT, className: C.link, target: "_blank", children: [ 9527 /* @__PURE__ */ l.jsxs( 9528 "svg", 9529 { 9530 width: "16", 9531 height: "16",
9532 viewBox: "0 0 16 16", 9533 fill: "none", 9534 xmlns: "http://www.w3.org/2000/svg", 9535 children: [ 9536 /* @__PURE__ */ l.jsx( 9537 "path", 9538 { 9539 d: "M3.33301 6C3.33301 3.79086 5.42235 2 7.99967 2C10.577 2 12.6663 3.79086 12.6663 6", 9540 stroke: "#17161D", 9541 strokeLinecap: "round", 9542 strokeLinejoin: "round" 9543 } 9544 ), 9545 /* @__PURE__ */ l.jsx( 9546 "path", 9547 { 9548 d: "M12.6667 11.3334V12.6667C12.6667 13.4031 12.0697 14 11.3333 14H8", 9549 stroke: "#17161D", 9550 strokeLinecap: "round", 9551 strokeLinejoin: "round" 9552 } 9553 ), 9554 /* @__P
9554URE__ */ l.jsx( 9555 "path", 9556 { 9557 d: "M2.73631 6.39907L1.63021 7.13551C1.44455 7.25911 1.33301 7.46738 1.33301 7.69044V9.64298C1.33301 9.86604 1.44455 10.0743 1.63021 10.1979L2.73631 10.9344C3.10697 11.1811 3.58137 11.2106 3.97969 11.0115C4.4005 10.8012 4.66634 10.3711 4.66634 9.90071V7.43271C4.66634 6.96231 4.4005 6.53224 3.97969 6.32193C3.58137 6.12286 3.10697 6.15229 2.73631 6.39907Z", 9558 stroke: "#17161D", 9559 strokeLinecap: "round", 9560 strokeLinejoin: "round" 9561 } 9562 ), 9563 /* @__PURE__ */ l.jsx( 9564 "path", 9565 { 9566 d: "M12.0197 6.32193C12.4179 6.12286 12.8924 6.15229 13.263 6.39907L14.3691 7.13551C14.5548 7.25911 14.6663 7.46738 14.6663 7.69044V9.64298C14.6663 9.86604 14.5548 10.0743 14.3691 10.1979L13.263 10.9344C12.8924 11.1811 12.4179 11.2106 12.0197 11.0115C11.5989 10.8012 11.333 10.3711 11.333 9.90071V7.43271C11.333 6.96231 11.5989 6.53224 12.0197 6.32193Z", 9567 stroke: "#17161D", 9568 strokeLinecap: "round", 9569 strokeLinejoin: "round" 9570 } 9571 ) 9572 ] 9573 } 9574 ), 9575 "ÐоддеÑжка" 9576 ] }),
9577 /* @__PURE__ */ l.jsxs( 9578 "button", 9579 { 9580 className: `${C.link} ${C.logout} js-logout`, 9581 onClick: je, 9582 children: [ 9583 /* @__PURE__ */ l.jsxs( 9584 "svg", 9585 { 9586 width: "16", 9587 height: "16", 9588 viewBox: "0 0 16 16", 9589 fill: "none", 9590 xmlns: "http://www.w3.org/2000/svg", 9591 children: [ 9592 /* @__PURE__ */ l.jsx( 9593 "path", 9594 { 9595 d: "M9.66699 11.9998V13.3332C9.66699 13.8854 9.21926 14.3332 8.66699 14.3332H2.66699C2.11471 14.3332 1.66699 13.8854 1.66699 13.3332V2.6665C1.66699 2.11422 2.11471 1.6665 2.66699 1.6665H8.66699C9.21926 1.6665 9.66699 2.11422 9.66699 2.6665V3.99984", 9596 stroke: "#17161D", 9597 strokeLinecap: "round", 9598 strokeLinejoin: "round" 9599 } 9600 ),
9601 /* @__PURE__ */ l.jsx( 9602 "path", 9603 { 9604 d: "M12.0003 10.3332L14.3337 7.99984L12.0003 5.6665M13.667 7.99984H5.66699", 9605 stroke: "#17161D", 9606 strokeLinecap: "round", 9607 strokeLinejoin: "round" 9608 } 9609 ) 9610 ] 9611 } 9612 ), 9613 "ÐÑйÑи" 9614 ] 9615 } 9616 ) 9617 ] }) 9618 ] 9619 } 9620 ), 9621 t && /* @__PURE__ */ l.jsxs( 9622 "div", 9623 { 9624 className: `${C["balance-dropdown"]} ${a === "balance" ? C.active : ""}`, 9625 onMouseEnter: () => le("balance"), 9626 onMouseLeave: Ce, 9627 children: [ 9628 /* @__PURE__ */ l.jsx("div", { className: C["balance-dropdown__title"], children: "ÐÐÐÐÐС СФÐÐ " }),
9629 /* @__PURE__ */ l.jsxs("div", { className: C["balance-dropdown__info"], children: [ 9630 /* @__PURE__ */ l.jsxs("div", { className: C["balance-dropdown__info-amount"], children: [ 9631 /* @__PURE__ */ l.jsxs( 9632 "svg", 9633 { 9634 width: "24", 9635 height: "24", 9636 viewBox: "0 0 24 24", 9637 fill: "none", 9638 xmlns: "http://www.w3.org/2000/svg", 9639 children: [ 9640 /* @__PURE__ */ l.jsx( 9641 "path", 9642 { 9643 d: "M12 22.3635C17.799 22.3635 22.5 17.7236 22.5 12.0001C22.5 6.27656 17.799 1.63672 12 1.63672C6.20101 1.63672 1.5 6.27656 1.5 12.0001C1.5 17.7236 6.20101 22.3635 12 22.3635Z", 9644 fill: "url(#paint0_radial_8347_76718)" 9645 } 9646 ), 9647 /* @__PURE__ */ l.jsx("defs", { children: /* @__PURE__ */ l.jsxs( 9648 "radialGradient", 9649 { 9650 id: "paint0_radial_8347_76718", 9651 cx: "0", 9652 cy: "0", 9653 r: "1", 9654 gradientUnits: "userSpaceOnUse", 9655 gradientTransform: "translate(8.26744 6.93161) rotate(24.4867) scale(18.455 18.2149)", 9656 children: [
9657 /* @__PURE__ */ l.jsx("stop", { offset: "0.0920692", stopColor: "#FFB9AC" }), 9658 /* @__PURE__ */ l.jsx("stop", { offset: "0.740385", stopColor: "#6320D8" }), 9659 /* @__PURE__ */ l.jsx("stop", { offset: "1", stopColor: "#21054B" }) 9660 ] 9661 } 9662 ) }) 9663 ] 9664 } 9665 ), 9666 /* @__PURE__ */ l.jsxs("div", { className: "js-amount", children: [ 9667 t.balance || 0, 9668 " = ", 9669 Math.floor((t.balance || 0) / 100), 9670 " мин." 9671 ] }) 9672 ] }), 9673 t.lockedBalance && t.lockedBalance > 0 ? /* @__PURE__ */ l.jsxs("div", { className: C["balance-dropdown__info-locked"], children: [ 9674 "Ðз Ð½Ð¸Ñ Ð·Ð°ÑезеÑвиÑовано: ", 9675 /* @__PURE__ */ l.jsx("strong", { children: t.lockedBalance }) 9676 ] }) : null, 9677 t.freeMinutes && t.freeMinutes > 0 ? /* @__PURE__ */ l.jsxs("div", { className: C["balance-dropdown__info-free-minutes"], children: [ 9678 "+ ", 9679 t.freeMinutes, 9680 " ", 9681 hd(t.freeMinutes, "беÑплаÑÐ½Ð°Ñ Ð¼Ð¸Ð½ÑÑа", "беÑплаÑнÑе минÑÑÑ", "беÑплаÑнÑÑ Ð¼Ð¸Ð½ÑÑ") 9682 ] }) : null 9683 ] }),
9684 /* @__PURE__ */ l.jsxs("div", { className: C["balance-dropdown__actions"], children: [ 9685 /* @__PURE__ */ l.jsx( 9686 "a", 9687 { 9688 href: Se.BILLING, 9689 className: C.button, 9690 target: b && y && !["finished", "stopped", "completed"].includes(b.status) ? "_blank" : "_self", 9691 children: "ÐополниÑÑ" 9692 } 9693 ), 9694 /* @__PURE__ */ l.jsx("a", { href: Se.BILLING_HISTORY, className: C["balance-dropdown__link"], children: "СмоÑÑеÑÑ Ð¸ÑÑоÑÐ¸Ñ Ð±Ð°Ð»Ð°Ð½Ñа" }) 9695 ] }) 9696 ] 9697 } 9698 ) 9699 ] }) }), 9700 /* @__PURE__ */ l.jsx("div", { className: `${C.search} ${a === "search" ? C.active : ""}`, children: /* @__PURE__ */ l.jsx("div", { className: C.search__wrap, children: /* @__PURE__ */ l.jsxs( 9701 "form", 9702 { 9703 role: "search", 9704 method: "get", 9705 id: "searchform", 9706 className: C.search__form, 9707 action: "/", 9708 children: [
9709 /* @__PURE__ */ l.jsx("input", { type: "hidden", value: "post", name: "post_type" }), 9710 /* @__PURE__ */ l.jsx( 9711 "input", 9712 { 9713 className: C.search__input, 9714 placeholder: "ÐоиÑк", 9715 type: "text", 9716 defaultValue: "", 9717 name: "s", 9718 id: "s" 9719 } 9720 ), 9721 /* @__PURE__ */ l.jsx( 9722 "button", 9723 { 9724 className: `${C.button} ${C.search__btn}`, 9725 type: "submit", 9726 id: "searchsubmit", 9727 children: "ÐÑкаÑÑ" 9728 } 9729 ) 9730 ] 9731 } 9732 ) }) }), 9733 /* @__PURE__ */ l.jsx("div", { className: `header__item header__item--menu-mobile ${s ? "active" : ""}`, children: /* @__PURE__ */ l.jsx("nav", { className: "header__nav header__nav--mobile", children: /* @__PURE__ */ l.jsxs("ul", { id: "menu-glavnaya-1", className: "menu", children: [ 9734 /* @__PURE__ */ l.jsx("li", { id: "", className: "menu-item", children: /* @__PURE__ */ l.jsxs("a", { id: "header__button", href: Se.EXPERTS, children: [
9735 /* @__PURE__ */ l.jsx( 9736 "svg", 9737 { 9738 width: "16", 9739 height: "16", 9740 viewBox: "0 0 16 16", 9741 fill: "none", 9742 xmlns: "http://www.w3.org/2000/svg", 9743 children: /* @__PURE__ */ l.jsx( 9744 "path", 9745 { 9746 d: "M6 8.5C6.82843 8.5 7.5 9.17157 7.5 10V14C7.5 14.8284 6.82843 15.5 6 15.5H2C1.17157 15.5 0.5 14.8284 0.5 14V10C0.5 9.17157 1.17157 8.5 2 8.5H6ZM14 8.5C14.8284 8.5 15.5 9.17157 15.5 10V14C15.5 14.8284 14.8284 15.5 14 15.5H10C9.17157 15.5 8.5 14.8284 8.5 14V10C8.5 9.17157 9.17157 8.5 10 8.5H14ZM2 9.5C1.72386 9.5 1.5 9.72386 1.5 10V14C1.5 14.2761 1.72386 14.5 2 14.5H6C6.27614 14.5 6.5 14.2761 6.5 14V10C6.5 9.72386 6.27614 9.5 6 9.5H2ZM10 9.5C9.72386 9.5 9.5 9.72386 9.5 10V14C9.5 14.2761 9.72386 14.5 10 14.5H14C14.2761 14.5 14.5 14.2761 14.5 14V10C14.5 9.72386 14.2761 9.5 14 9.5H10ZM6 0.5C6.82843 0.5 7.5 1.17157 7.5 2V6C7.5 6.82843 6.82843 7.5 6 7.5H2C1.17157 7.5 0.5 6.82843 0.5 6V2C0.5 1.17157 1.17157 0.5 2 0.5H6ZM14 0.5C14.8284 0.5 15.5 1.17157 15.5 2V6C15.5 6.82843 14.8284 7.5 14 7.5H10C9.17157 7.5 8.5 6.82843 8.5 6V2C8.5 1.17157 9.17157 0.5 10 0.5H14ZM2 1.5C1.72386 1.5 1.5 1.72386 1.5 2V6C1.5 6.27614 1.72386 6.5 2 6.5H6C6.27614 6.5 6.5 6.27614 6.5 6V2C6.5 1.72386 6.27614 1.5 6 1.5H2ZM10 1.5C9.72386 1.5 9.5 1.72386 9.5 2V6C9.5 6.27614 9.72386 6.5 10 6.5H14C14.2761 6.5 14.5 6.27614 14.5 6V2C14.5 1.72386 14.2761 1.5 14 1.5H10Z", 9747 fill: "white" 9748 } 9749 ) 9750 } 9751 ), 9752 "ÐонÑÑлÑÑаÑии" 9753 ] }) }),
9754 /* @__PURE__ */ l.jsx("li", { className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-697", children: /* @__PURE__ */ l.jsx("a", { href: "/news/", children: "ÐовоÑÑи" }) }), 9755 /* @__PURE__ */ l.jsxs("li", { className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-696", children: [ 9756 /* @__PURE__ */ l.jsxs( 9757 "button", 9758 { 9759 className: C["mobile-nav-toggle"], 9760 onClick: () => G("horoscope"), 9761 children: [ 9762 "ÐоÑоÑкоп", 9763 /* @__PURE__ */ l.jsx( 9764 mt, 9765 { 9766 size: 12, 9767 className: `${C.chevron} ${q.horoscope ? C.rotated : ""}` 9768 } 9769 ) 9770 ] 9771 } 9772 ), 9773 /* @__PURE__ */ l.jsx("div", { className: `${C["links-wrapper"]} ${q.horoscope ? C.open : ""}`, children: /* @__PURE__ */ l.jsxs("div", { className: C["links-container"], children: [
9774 /* @__PURE__ */ l.jsx("a", { href: "/horoscope/", className: C["mobile-sub-link"], children: "ÐоÑоÑкоп" }), 9775 /* @__PURE__ */ l.jsx("a", { href: "https://lp.vedora.ru/services", target: "_blank", className: C["mobile-sub-link"], children: "ÐÑÑÑоÑÑлÑги" }) 9776 ] }) }) 9777 ] }), 9778 /* @__PURE__ */ l.jsxs("li", { className: "menu-item menu-item-type-custom menu-item-object-custom menu-item-701", children: [ 9779 /* @__PURE__ */ l.jsxs( 9780 "button", 9781 { 9782 className: C["mobile-nav-toggle"], 9783 onClick: () => G("taroNumerology"), 9784 children: [ 9785 "ТаÑо и ÐÑмеÑо", 9786 /* @__PURE__ */ l.jsx( 9787 mt, 9788 { 9789 size: 12, 9790 className: `${C.chevron} ${q.taroNumerology ? C.rotated : ""}` 9791 } 9792 ) 9793 ] 9794 } 9795 ), 9796 /* @__PURE__ */ l.jsx("div", { className: `${C["links-wrapper"]} ${q.taroNumerology ? C.open : ""}`, children: /* @__PURE__ */ l.jsxs("div", { className: C["links-container"], children: [
9797 /* @__PURE__ */ l.jsx("a", { href: "https://lp.vedora.ru/services/tarot", className: C["mobile-sub-link"], children: "ТаÑо ÑÑлÑги" }), 9798 /* @__PURE__ */ l.jsx("a", { href: "/main/karta-dnya-taro/", className: C["mobile-sub-link"], children: "ÐаÑÑа днÑ" }), 9799 /* @__PURE__ */ l.jsx("a", { href: "/numerologiya/", className: C["mobile-sub-link"], children: "ÐÑмеÑологиÑ" }) 9800 ] }) }) 9801 ] }), 9802 /* @__PURE__ */ l.jsx("li", { className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-698", children: /* @__PURE__ */ l.jsx("a", { href: "/gadaniya/", children: "ÐаданиÑ" }) }), 9803 /* @__PURE__ */ l.jsxs("li", { className: "menu-item menu-item-type-taxonomy menu-item-object-category menu-item-700", children: [ 9804 /* @__PURE__ */ l.jsxs( 9805 "button", 9806 { 9807 className: C["mobile-nav-toggle"], 9808 onClick: () => G("onlineCalc"), 9809 children: [ 9810 "Ðнлайн-ÑаÑÑеÑ",
9811 /* @__PURE__ */ l.jsx( 9812 mt, 9813 { 9814 size: 12, 9815 className: `${C.chevron} ${q.onlineCalc ? C.rotated : ""}` 9816 } 9817 ) 9818 ] 9819 } 9820 ), 9821 /* @__PURE__ */ l.jsx("div", { className: `${C["links-wrapper"]} ${q.onlineCalc ? C.open : ""}`, children: /* @__PURE__ */ l.jsxs("div", { className: C["links-container"], children: [ 9822 /* @__PURE__ */ l.jsx("a", { href: "/tools/synastry", className: C["mobile-sub-link"], children: "ÐÑÑÑологиÑеÑÐºÐ°Ñ ÑинаÑÑÑиÑ" }), 9823 /* @__PURE__ */ l.jsx("a", { href: "/horoscope/sovmestimost-znakov-zodiaka/", className: C["mobile-sub-link"], children: "СовмеÑÑимоÑÑÑ Ð·Ð½Ð°ÐºÐ¾Ð² зодиака" }), 9824 /* @__PURE__ */ l.jsx("a", { href: "/tools/numerology", className: C["mobile-sub-link"], children: "ÐвадÑÐ°Ñ ÐиÑагоÑа" }), 9825 /* @__PURE__ */ l.jsx("a", { href: "/tools/taro", className: C["mobile-sub-link"], children: "ÐоÑÑÑÐµÑ ÐиÑноÑÑи" }),
9826 /* @__PURE__ */ l.jsx("a", { href: "/taro/", className: C["mobile-sub-link"], children: "Ðнлайн-ÑаÑклад ÑаÑо" }), 9827 /* @__PURE__ */ l.jsx("a", { href: "/tools/name", className: C["mobile-sub-link"], children: "ÐÑмеÑÐ¾Ð»Ð¾Ð³Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸" }) 9828 ] }) }) 9829 ] }), 9830 /* @__PURE__ */ l.jsx("li", { className: "menu-item menu-item-type-custom menu-item-object-custom menu-item-702", children: /* @__PURE__ */ l.jsx("a", { href: "/tools/human-design", children: "Ðизайн Ñеловека" }) }) 9831 ] }) }) }) 9832 ] }), 9833 c && /* @__PURE__ */ l.jsx( 9834 dd, 9835 { 9836 onClose: () => u(!1), 9837 cdpSlug: d.cdpSlug, 9838 cdpUrl: d.cdpUrl 9839 } 9840 ) 9841 ] }); 9842}; 9843export { 9844 Sd as H, 9845 z as R, 9846 I as r 9847};
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.