@thirstie/thirstievalidators 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/coverage/clover.xml +7 -7
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/agegate.js.html +1 -1
- package/coverage/lcov-report/emailLists.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/index.js.html +7 -7
- package/coverage/lcov-report/iso3166codes.js.html +1 -1
- package/coverage/lcov-report/passwordcheck.js.html +1 -1
- package/coverage/lcov.info +12 -12
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.iife.js +1 -1
- package/dist/bundle.mjs +1 -1
- package/package.json +2 -2
- package/src/index.js +1 -1
- package/tests/unit/validators.email.unit.test.js +124 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.11.0](https://github.com/ThirstieAdmin/thirstiejs-monorepo/compare/@thirstie/thirstievalidators@0.0.3...@thirstie/thirstievalidators@0.11.0) (2025-03-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* age gate validation ([6f88a6f](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/6f88a6fb88d4a2b02807eb457efbf28e95d2b232))
|
|
12
|
+
* SUPPORT-851 update email validator ([9513d0c](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/9513d0c71077e682a57adf8a17e27bd5cd0d97cb))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add state code, email domain checkers ([e5590ba](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/e5590ba6f3e2dd5b6f0952a39ca0b595aa08ed21))
|
|
18
|
+
* trusted email domain ([bd36a3c](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/bd36a3c6b2044d0acfa1d3c0250c68d3b46975fa))
|
|
19
|
+
* validator package ([7cc609a](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/7cc609a78cd030c866542a629d6bf307ad9b08c8))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.10.1](https://github.com/ThirstieAdmin/thirstiejs-monorepo/compare/@thirstie/thirstievalidators@0.0.3...@thirstie/thirstievalidators@0.10.1) (2025-02-18)
|
|
7
26
|
|
|
8
27
|
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1741041686558" clover="3.2.0">
|
|
3
|
+
<project timestamp="1741041686558" name="All files">
|
|
4
4
|
<metrics statements="93" coveredstatements="77" conditionals="69" coveredconditionals="46" methods="16" coveredmethods="13" elements="178" coveredelements="136" complexity="0" loc="93" ncloc="93" packages="1" files="5" classes="5"/>
|
|
5
5
|
<file name="agegate.js" path="/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/agegate.js">
|
|
6
6
|
<metrics statements="20" coveredstatements="19" conditionals="11" coveredconditionals="9" methods="1" coveredmethods="1"/>
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
<file name="index.js" path="/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/index.js">
|
|
34
34
|
<metrics statements="45" coveredstatements="31" conditionals="45" coveredconditionals="28" methods="10" coveredmethods="7"/>
|
|
35
35
|
<line num="8" count="4" type="stmt"/>
|
|
36
|
-
<line num="10" count="
|
|
37
|
-
<line num="11" count="
|
|
38
|
-
<line num="12" count="
|
|
39
|
-
<line num="13" count="
|
|
36
|
+
<line num="10" count="125" type="cond" truecount="4" falsecount="0"/>
|
|
37
|
+
<line num="11" count="125" type="stmt"/>
|
|
38
|
+
<line num="12" count="125" type="stmt"/>
|
|
39
|
+
<line num="13" count="125" type="cond" truecount="4" falsecount="0"/>
|
|
40
40
|
<line num="14" count="2" type="stmt"/>
|
|
41
41
|
<line num="15" count="2" type="stmt"/>
|
|
42
|
-
<line num="17" count="
|
|
42
|
+
<line num="17" count="125" type="stmt"/>
|
|
43
43
|
<line num="20" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
44
44
|
<line num="21" count="3" type="cond" truecount="3" falsecount="1"/>
|
|
45
45
|
<line num="22" count="3" type="stmt"/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/agegate.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/agegate.js","statementMap":{"0":{"start":{"line":3,"column":23},"end":{"line":31,"column":1}},"1":{"start":{"line":4,"column":32},"end":{"line":4,"column":58}},"2":{"start":{"line":5,"column":28},"end":{"line":5,"column":43}},"3":{"start":{"line":6,"column":2},"end":{"line":6,"column":28}},"4":{"start":{"line":8,"column":14},"end":{"line":8,"column":18}},"5":{"start":{"line":9,"column":2},"end":{"line":13,"column":3}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":67}},"7":{"start":{"line":12,"column":4},"end":{"line":12,"column":14}},"8":{"start":{"line":15,"column":16},"end":{"line":15,"column":21}},"9":{"start":{"line":16,"column":35},"end":{"line":16,"column":76}},"10":{"start":{"line":17,"column":2},"end":{"line":29,"column":3}},"11":{"start":{"line":19,"column":6},"end":{"line":19,"column":31}},"12":{"start":{"line":20,"column":6},"end":{"line":20,"column":21}},"13":{"start":{"line":21,"column":6},"end":{"line":21,"column":12}},"14":{"start":{"line":23,"column":6},"end":{"line":27,"column":7}},"15":{"start":{"line":24,"column":22},"end":{"line":24,"column":32}},"16":{"start":{"line":25,"column":26},"end":{"line":25,"column":107}},"17":{"start":{"line":26,"column":8},"end":{"line":26,"column":58}},"18":{"start":{"line":28,"column":6},"end":{"line":28,"column":12}},"19":{"start":{"line":30,"column":2},"end":{"line":30,"column":85}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":23},"end":{"line":3,"column":24}},"loc":{"start":{"line":3,"column":71},"end":{"line":31,"column":1}},"line":3}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":51},"end":{"line":3,"column":66}},"type":"default-arg","locations":[{"start":{"line":3,"column":62},"end":{"line":3,"column":66}}],"line":3},"1":{"loc":{"start":{"line":6,"column":13},"end":{"line":6,"column":27}},"type":"binary-expr","locations":[{"start":{"line":6,"column":13},"end":{"line":6,"column":21}},{"start":{"line":6,"column":25},"end":{"line":6,"column":27}}],"line":6},"2":{"loc":{"start":{"line":17,"column":2},"end":{"line":29,"column":3}},"type":"switch","locations":[{"start":{"line":18,"column":4},"end":{"line":21,"column":12}},{"start":{"line":22,"column":4},"end":{"line":28,"column":12}}],"line":17},"3":{"loc":{"start":{"line":23,"column":6},"end":{"line":27,"column":7}},"type":"if","locations":[{"start":{"line":23,"column":6},"end":{"line":27,"column":7}},{"start":{},"end":{}}],"line":23},"4":{"loc":{"start":{"line":26,"column":18},"end":{"line":26,"column":57}},"type":"cond-expr","locations":[{"start":{"line":26,"column":31},"end":{"line":26,"column":36}},{"start":{"line":26,"column":39},"end":{"line":26,"column":57}}],"line":26},"5":{"loc":{"start":{"line":30,"column":67},"end":{"line":30,"column":82}},"type":"binary-expr","locations":[{"start":{"line":30,"column":67},"end":{"line":30,"column":74}},{"start":{"line":30,"column":78},"end":{"line":30,"column":82}}],"line":30}},"s":{"0":5,"1":8,"2":8,"3":8,"4":8,"5":8,"6":8,"7":0,"8":8,"9":8,"10":8,"11":5,"12":5,"13":5,"14":3,"15":3,"16":3,"17":3,"18":3,"19":8},"f":{"0":8},"b":{"0":[8],"1":[8,8],"2":[5,3],"3":[3,0],"4":[0,3],"5":[8,5]},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a1c457f372d56a1d82eaec8e240162e9cdf98cc7"}
|
|
2
2
|
,"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/emailLists.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/emailLists.js","statementMap":{"0":{"start":{"line":1,"column":29},"end":{"line":25,"column":1}},"1":{"start":{"line":27,"column":35},"end":{"line":58,"column":1}}},"fnMap":{},"branchMap":{},"s":{"0":4,"1":4},"f":{},"b":{},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d8c64d2cce29e8de088dd23782f6f2e3ddff93d1"}
|
|
3
|
-
,"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/index.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/index.js","statementMap":{"0":{"start":{"line":8,"column":19},"end":{"line":70,"column":1}},"1":{"start":{"line":10,"column":27},"end":{"line":10,"column":89}},"2":{"start":{"line":11,"column":23},"end":{"line":11,"column":134}},"3":{"start":{"line":12,"column":18},"end":{"line":12,"column":40}},"4":{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},"5":{"start":{"line":14,"column":26},"end":{"line":14,"column":59}},"6":{"start":{"line":15,"column":6},"end":{"line":15,"column":53}},"7":{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},"8":{"start":{"line":20,"column":23},"end":{"line":20,"column":62}},"9":{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},"10":{"start":{"line":22,"column":26},"end":{"line":22,"column":39}},"11":{"start":{"line":23,"column":6},"end":{"line":23,"column":55}},"12":{"start":{"line":25,"column":4},"end":{"line":25,"column":17}},"13":{"start":{"line":28,"column":23},"end":{"line":28,"column":112}},"14":{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},"15":{"start":{"line":30,"column":24},"end":{"line":30,"column":60}},"16":{"start":{"line":31,"column":6},"end":{"line":31,"column":40}},"17":{"start":{"line":33,"column":4},"end":{"line":33,"column":17}},"18":{"start":{"line":36,"column":20},"end":{"line":36,"column":98}},"19":{"start":{"line":37,"column":18},"end":{"line":40,"column":14}},"20":{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},"21":{"start":{"line":42,"column":6},"end":{"line":42,"column":31}},"22":{"start":{"line":44,"column":4},"end":{"line":44,"column":17}},"23":{"start":{"line":47,"column":24},"end":{"line":47,"column":102}},"24":{"start":{"line":48,"column":18},"end":{"line":48,"column":73}},"25":{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},"26":{"start":{"line":50,"column":6},"end":{"line":50,"column":19}},"27":{"start":{"line":52,"column":6},"end":{"line":52,"column":18}},"28":{"start":{"line":56,"column":24},"end":{"line":56,"column":102}},"29":{"start":{"line":57,"column":26},"end":{"line":57,"column":52}},"30":{"start":{"line":58,"column":28},"end":{"line":58,"column":50}},"31":{"start":{"line":60,"column":23},"end":{"line":60,"column":105}},"32":{"start":{"line":60,"column":60},"end":{"line":60,"column":80}},"33":{"start":{"line":62,"column":18},"end":{"line":62,"column":28}},"34":{"start":{"line":63,"column":17},"end":{"line":63,"column":28}},"35":{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},"36":{"start":{"line":65,"column":6},"end":{"line":65,"column":35}},"37":{"start":{"line":67,"column":6},"end":{"line":67,"column":19}},"38":{"start":{"line":72,"column":17},"end":{"line":84,"column":1}},"39":{"start":{"line":73,"column":49},"end":{"line":73,"column":77}},"40":{"start":{"line":75,"column":20},"end":{"line":75,"column":66}},"41":{"start":{"line":76,"column":22},"end":{"line":76,"column":61}},"42":{"start":{"line":77,"column":4},"end":{"line":77,"column":34}},"43":{"start":{"line":80,"column":24},"end":{"line":80,"column":52}},"44":{"start":{"line":81,"column":21},"end":{"line":81,"column":37}},"45":{"start":{"line":82,"column":4},"end":{"line":82,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":10}},"loc":{"start":{"line":9,"column":36},"end":{"line":18,"column":3}},"line":9},"1":{"name":"(anonymous_1)","decl":{"start":{"line":19,"column":25},"end":{"line":19,"column":26}},"loc":{"start":{"line":19,"column":52},"end":{"line":26,"column":3}},"line":19},"2":{"name":"(anonymous_2)","decl":{"start":{"line":27,"column":15},"end":{"line":27,"column":16}},"loc":{"start":{"line":27,"column":42},"end":{"line":34,"column":3}},"line":27},"3":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":14},"end":{"line":35,"column":15}},"loc":{"start":{"line":35,"column":41},"end":{"line":45,"column":3}},"line":35},"4":{"name":"(anonymous_4)","decl":{"start":{"line":46,"column":21},"end":{"line":46,"column":22}},"loc":{"start":{"line":46,"column":48},"end":{"line":54,"column":3}},"line":46},"5":{"name":"(anonymous_5)","decl":{"start":{"line":55,"column":17},"end":{"line":55,"column":18}},"loc":{"start":{"line":55,"column":44},"end":{"line":69,"column":3}},"line":55},"6":{"name":"(anonymous_6)","decl":{"start":{"line":60,"column":46},"end":{"line":60,"column":47}},"loc":{"start":{"line":60,"column":60},"end":{"line":60,"column":80}},"line":60},"7":{"name":"(anonymous_7)","decl":{"start":{"line":73,"column":20},"end":{"line":73,"column":21}},"loc":{"start":{"line":73,"column":47},"end":{"line":73,"column":79}},"line":73},"8":{"name":"(anonymous_8)","decl":{"start":{"line":74,"column":14},"end":{"line":74,"column":15}},"loc":{"start":{"line":74,"column":41},"end":{"line":78,"column":3}},"line":74},"9":{"name":"(anonymous_9)","decl":{"start":{"line":79,"column":11},"end":{"line":79,"column":12}},"loc":{"start":{"line":79,"column":38},"end":{"line":83,"column":3}},"line":79}},"branchMap":{"0":{"loc":{"start":{"line":9,"column":17},"end":{"line":9,"column":31}},"type":"default-arg","locations":[{"start":{"line":9,"column":27},"end":{"line":9,"column":31}}],"line":9},"1":{"loc":{"start":{"line":10,"column":27},"end":{"line":10,"column":89}},"type":"cond-expr","locations":[{"start":{"line":10,"column":62},"end":{"line":10,"column":81}},{"start":{"line":10,"column":84},"end":{"line":10,"column":89}}],"line":10},"2":{"loc":{"start":{"line":10,"column":28},"end":{"line":10,"column":58}},"type":"binary-expr","locations":[{"start":{"line":10,"column":28},"end":{"line":10,"column":35}},{"start":{"line":10,"column":39},"end":{"line":10,"column":58}}],"line":10},"3":{"loc":{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},{"start":{},"end":{}}],"line":13},"4":{"loc":{"start":{"line":13,"column":8},"end":{"line":13,"column":33}},"type":"binary-expr","locations":[{"start":{"line":13,"column":8},"end":{"line":13,"column":15}},{"start":{"line":13,"column":19},"end":{"line":13,"column":33}}],"line":13},"5":{"loc":{"start":{"line":19,"column":33},"end":{"line":19,"column":47}},"type":"default-arg","locations":[{"start":{"line":19,"column":43},"end":{"line":19,"column":47}}],"line":19},"6":{"loc":{"start":{"line":20,"column":23},"end":{"line":20,"column":62}},"type":"binary-expr","locations":[{"start":{"line":20,"column":23},"end":{"line":20,"column":28}},{"start":{"line":20,"column":32},"end":{"line":20,"column":62}}],"line":20},"7":{"loc":{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},{"start":{},"end":{}}],"line":21},"8":{"loc":{"start":{"line":21,"column":8},"end":{"line":21,"column":45}},"type":"binary-expr","locations":[{"start":{"line":21,"column":8},"end":{"line":21,"column":18}},{"start":{"line":21,"column":22},"end":{"line":21,"column":45}}],"line":21},"9":{"loc":{"start":{"line":27,"column":23},"end":{"line":27,"column":37}},"type":"default-arg","locations":[{"start":{"line":27,"column":33},"end":{"line":27,"column":37}}],"line":27},"10":{"loc":{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},{"start":{},"end":{}}],"line":29},"11":{"loc":{"start":{"line":35,"column":22},"end":{"line":35,"column":36}},"type":"default-arg","locations":[{"start":{"line":35,"column":32},"end":{"line":35,"column":36}}],"line":35},"12":{"loc":{"start":{"line":36,"column":20},"end":{"line":36,"column":98}},"type":"cond-expr","locations":[{"start":{"line":36,"column":55},"end":{"line":36,"column":88}},{"start":{"line":36,"column":91},"end":{"line":36,"column":98}}],"line":36},"13":{"loc":{"start":{"line":36,"column":21},"end":{"line":36,"column":51}},"type":"binary-expr","locations":[{"start":{"line":36,"column":21},"end":{"line":36,"column":28}},{"start":{"line":36,"column":32},"end":{"line":36,"column":51}}],"line":36},"14":{"loc":{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},"type":"if","locations":[{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},{"start":{},"end":{}}],"line":41},"15":{"loc":{"start":{"line":46,"column":29},"end":{"line":46,"column":43}},"type":"default-arg","locations":[{"start":{"line":46,"column":39},"end":{"line":46,"column":43}}],"line":46},"16":{"loc":{"start":{"line":47,"column":24},"end":{"line":47,"column":102}},"type":"cond-expr","locations":[{"start":{"line":47,"column":59},"end":{"line":47,"column":92}},{"start":{"line":47,"column":95},"end":{"line":47,"column":102}}],"line":47},"17":{"loc":{"start":{"line":47,"column":25},"end":{"line":47,"column":55}},"type":"binary-expr","locations":[{"start":{"line":47,"column":25},"end":{"line":47,"column":32}},{"start":{"line":47,"column":36},"end":{"line":47,"column":55}}],"line":47},"18":{"loc":{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},{"start":{"line":51,"column":11},"end":{"line":53,"column":5}}],"line":49},"19":{"loc":{"start":{"line":55,"column":25},"end":{"line":55,"column":39}},"type":"default-arg","locations":[{"start":{"line":55,"column":35},"end":{"line":55,"column":39}}],"line":55},"20":{"loc":{"start":{"line":56,"column":24},"end":{"line":56,"column":102}},"type":"cond-expr","locations":[{"start":{"line":56,"column":59},"end":{"line":56,"column":92}},{"start":{"line":56,"column":95},"end":{"line":56,"column":102}}],"line":56},"21":{"loc":{"start":{"line":56,"column":25},"end":{"line":56,"column":55}},"type":"binary-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":32}},{"start":{"line":56,"column":36},"end":{"line":56,"column":55}}],"line":56},"22":{"loc":{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},"type":"if","locations":[{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},{"start":{"line":66,"column":11},"end":{"line":68,"column":5}}],"line":64},"23":{"loc":{"start":{"line":73,"column":28},"end":{"line":73,"column":42}},"type":"default-arg","locations":[{"start":{"line":73,"column":38},"end":{"line":73,"column":42}}],"line":73},"24":{"loc":{"start":{"line":74,"column":22},"end":{"line":74,"column":36}},"type":"default-arg","locations":[{"start":{"line":74,"column":32},"end":{"line":74,"column":36}}],"line":74},"25":{"loc":{"start":{"line":79,"column":19},"end":{"line":79,"column":33}},"type":"default-arg","locations":[{"start":{"line":79,"column":29},"end":{"line":79,"column":33}}],"line":79},"26":{"loc":{"start":{"line":80,"column":24},"end":{"line":80,"column":52}},"type":"binary-expr","locations":[{"start":{"line":80,"column":24},"end":{"line":80,"column":43}},{"start":{"line":80,"column":47},"end":{"line":80,"column":52}}],"line":80}},"s":{"0":4,"1":8,"2":8,"3":8,"4":8,"5":2,"6":2,"7":8,"8":3,"9":3,"10":3,"11":3,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":6,"24":6,"25":6,"26":2,"27":4,"28":2,"29":2,"30":2,"31":2,"32":4,"33":2,"34":2,"35":2,"36":1,"37":1,"38":4,"39":2,"40":0,"41":0,"42":0,"43":5,"44":5,"45":5},"f":{"0":8,"1":3,"2":0,"3":0,"4":6,"5":2,"6":4,"7":2,"8":0,"9":5},"b":{"0":[6],"1":[2,6],"2":[8,2],"3":[2,6],"4":[8,5],"5":[0],"6":[3,3],"7":[3,0],"8":[3,3],"9":[0],"10":[0,0],"11":[0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[3],"16":[3,3],"17":[6,3],"18":[2,4],"19":[2],"20":[0,2],"21":[2,0],"22":[1,1],"23":[2],"24":[0],"25":[0],"26":[5,0]},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"668042b8ebc34ff5660b25277ec0581b1c9ba93a"}
|
|
3
|
+
,"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/index.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/index.js","statementMap":{"0":{"start":{"line":8,"column":19},"end":{"line":70,"column":1}},"1":{"start":{"line":10,"column":27},"end":{"line":10,"column":89}},"2":{"start":{"line":11,"column":23},"end":{"line":11,"column":169}},"3":{"start":{"line":12,"column":18},"end":{"line":12,"column":40}},"4":{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},"5":{"start":{"line":14,"column":26},"end":{"line":14,"column":59}},"6":{"start":{"line":15,"column":6},"end":{"line":15,"column":53}},"7":{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},"8":{"start":{"line":20,"column":23},"end":{"line":20,"column":62}},"9":{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},"10":{"start":{"line":22,"column":26},"end":{"line":22,"column":39}},"11":{"start":{"line":23,"column":6},"end":{"line":23,"column":55}},"12":{"start":{"line":25,"column":4},"end":{"line":25,"column":17}},"13":{"start":{"line":28,"column":23},"end":{"line":28,"column":112}},"14":{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},"15":{"start":{"line":30,"column":24},"end":{"line":30,"column":60}},"16":{"start":{"line":31,"column":6},"end":{"line":31,"column":40}},"17":{"start":{"line":33,"column":4},"end":{"line":33,"column":17}},"18":{"start":{"line":36,"column":20},"end":{"line":36,"column":98}},"19":{"start":{"line":37,"column":18},"end":{"line":40,"column":14}},"20":{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},"21":{"start":{"line":42,"column":6},"end":{"line":42,"column":31}},"22":{"start":{"line":44,"column":4},"end":{"line":44,"column":17}},"23":{"start":{"line":47,"column":24},"end":{"line":47,"column":102}},"24":{"start":{"line":48,"column":18},"end":{"line":48,"column":73}},"25":{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},"26":{"start":{"line":50,"column":6},"end":{"line":50,"column":19}},"27":{"start":{"line":52,"column":6},"end":{"line":52,"column":18}},"28":{"start":{"line":56,"column":24},"end":{"line":56,"column":102}},"29":{"start":{"line":57,"column":26},"end":{"line":57,"column":52}},"30":{"start":{"line":58,"column":28},"end":{"line":58,"column":50}},"31":{"start":{"line":60,"column":23},"end":{"line":60,"column":105}},"32":{"start":{"line":60,"column":60},"end":{"line":60,"column":80}},"33":{"start":{"line":62,"column":18},"end":{"line":62,"column":28}},"34":{"start":{"line":63,"column":17},"end":{"line":63,"column":28}},"35":{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},"36":{"start":{"line":65,"column":6},"end":{"line":65,"column":35}},"37":{"start":{"line":67,"column":6},"end":{"line":67,"column":19}},"38":{"start":{"line":72,"column":17},"end":{"line":84,"column":1}},"39":{"start":{"line":73,"column":49},"end":{"line":73,"column":77}},"40":{"start":{"line":75,"column":20},"end":{"line":75,"column":66}},"41":{"start":{"line":76,"column":22},"end":{"line":76,"column":61}},"42":{"start":{"line":77,"column":4},"end":{"line":77,"column":34}},"43":{"start":{"line":80,"column":24},"end":{"line":80,"column":52}},"44":{"start":{"line":81,"column":21},"end":{"line":81,"column":37}},"45":{"start":{"line":82,"column":4},"end":{"line":82,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":10}},"loc":{"start":{"line":9,"column":36},"end":{"line":18,"column":3}},"line":9},"1":{"name":"(anonymous_1)","decl":{"start":{"line":19,"column":25},"end":{"line":19,"column":26}},"loc":{"start":{"line":19,"column":52},"end":{"line":26,"column":3}},"line":19},"2":{"name":"(anonymous_2)","decl":{"start":{"line":27,"column":15},"end":{"line":27,"column":16}},"loc":{"start":{"line":27,"column":42},"end":{"line":34,"column":3}},"line":27},"3":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":14},"end":{"line":35,"column":15}},"loc":{"start":{"line":35,"column":41},"end":{"line":45,"column":3}},"line":35},"4":{"name":"(anonymous_4)","decl":{"start":{"line":46,"column":21},"end":{"line":46,"column":22}},"loc":{"start":{"line":46,"column":48},"end":{"line":54,"column":3}},"line":46},"5":{"name":"(anonymous_5)","decl":{"start":{"line":55,"column":17},"end":{"line":55,"column":18}},"loc":{"start":{"line":55,"column":44},"end":{"line":69,"column":3}},"line":55},"6":{"name":"(anonymous_6)","decl":{"start":{"line":60,"column":46},"end":{"line":60,"column":47}},"loc":{"start":{"line":60,"column":60},"end":{"line":60,"column":80}},"line":60},"7":{"name":"(anonymous_7)","decl":{"start":{"line":73,"column":20},"end":{"line":73,"column":21}},"loc":{"start":{"line":73,"column":47},"end":{"line":73,"column":79}},"line":73},"8":{"name":"(anonymous_8)","decl":{"start":{"line":74,"column":14},"end":{"line":74,"column":15}},"loc":{"start":{"line":74,"column":41},"end":{"line":78,"column":3}},"line":74},"9":{"name":"(anonymous_9)","decl":{"start":{"line":79,"column":11},"end":{"line":79,"column":12}},"loc":{"start":{"line":79,"column":38},"end":{"line":83,"column":3}},"line":79}},"branchMap":{"0":{"loc":{"start":{"line":9,"column":17},"end":{"line":9,"column":31}},"type":"default-arg","locations":[{"start":{"line":9,"column":27},"end":{"line":9,"column":31}}],"line":9},"1":{"loc":{"start":{"line":10,"column":27},"end":{"line":10,"column":89}},"type":"cond-expr","locations":[{"start":{"line":10,"column":62},"end":{"line":10,"column":81}},{"start":{"line":10,"column":84},"end":{"line":10,"column":89}}],"line":10},"2":{"loc":{"start":{"line":10,"column":28},"end":{"line":10,"column":58}},"type":"binary-expr","locations":[{"start":{"line":10,"column":28},"end":{"line":10,"column":35}},{"start":{"line":10,"column":39},"end":{"line":10,"column":58}}],"line":10},"3":{"loc":{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":16,"column":5}},{"start":{},"end":{}}],"line":13},"4":{"loc":{"start":{"line":13,"column":8},"end":{"line":13,"column":33}},"type":"binary-expr","locations":[{"start":{"line":13,"column":8},"end":{"line":13,"column":15}},{"start":{"line":13,"column":19},"end":{"line":13,"column":33}}],"line":13},"5":{"loc":{"start":{"line":19,"column":33},"end":{"line":19,"column":47}},"type":"default-arg","locations":[{"start":{"line":19,"column":43},"end":{"line":19,"column":47}}],"line":19},"6":{"loc":{"start":{"line":20,"column":23},"end":{"line":20,"column":62}},"type":"binary-expr","locations":[{"start":{"line":20,"column":23},"end":{"line":20,"column":28}},{"start":{"line":20,"column":32},"end":{"line":20,"column":62}}],"line":20},"7":{"loc":{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":24,"column":5}},{"start":{},"end":{}}],"line":21},"8":{"loc":{"start":{"line":21,"column":8},"end":{"line":21,"column":45}},"type":"binary-expr","locations":[{"start":{"line":21,"column":8},"end":{"line":21,"column":18}},{"start":{"line":21,"column":22},"end":{"line":21,"column":45}}],"line":21},"9":{"loc":{"start":{"line":27,"column":23},"end":{"line":27,"column":37}},"type":"default-arg","locations":[{"start":{"line":27,"column":33},"end":{"line":27,"column":37}}],"line":27},"10":{"loc":{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},{"start":{},"end":{}}],"line":29},"11":{"loc":{"start":{"line":35,"column":22},"end":{"line":35,"column":36}},"type":"default-arg","locations":[{"start":{"line":35,"column":32},"end":{"line":35,"column":36}}],"line":35},"12":{"loc":{"start":{"line":36,"column":20},"end":{"line":36,"column":98}},"type":"cond-expr","locations":[{"start":{"line":36,"column":55},"end":{"line":36,"column":88}},{"start":{"line":36,"column":91},"end":{"line":36,"column":98}}],"line":36},"13":{"loc":{"start":{"line":36,"column":21},"end":{"line":36,"column":51}},"type":"binary-expr","locations":[{"start":{"line":36,"column":21},"end":{"line":36,"column":28}},{"start":{"line":36,"column":32},"end":{"line":36,"column":51}}],"line":36},"14":{"loc":{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},"type":"if","locations":[{"start":{"line":41,"column":4},"end":{"line":43,"column":5}},{"start":{},"end":{}}],"line":41},"15":{"loc":{"start":{"line":46,"column":29},"end":{"line":46,"column":43}},"type":"default-arg","locations":[{"start":{"line":46,"column":39},"end":{"line":46,"column":43}}],"line":46},"16":{"loc":{"start":{"line":47,"column":24},"end":{"line":47,"column":102}},"type":"cond-expr","locations":[{"start":{"line":47,"column":59},"end":{"line":47,"column":92}},{"start":{"line":47,"column":95},"end":{"line":47,"column":102}}],"line":47},"17":{"loc":{"start":{"line":47,"column":25},"end":{"line":47,"column":55}},"type":"binary-expr","locations":[{"start":{"line":47,"column":25},"end":{"line":47,"column":32}},{"start":{"line":47,"column":36},"end":{"line":47,"column":55}}],"line":47},"18":{"loc":{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":53,"column":5}},{"start":{"line":51,"column":11},"end":{"line":53,"column":5}}],"line":49},"19":{"loc":{"start":{"line":55,"column":25},"end":{"line":55,"column":39}},"type":"default-arg","locations":[{"start":{"line":55,"column":35},"end":{"line":55,"column":39}}],"line":55},"20":{"loc":{"start":{"line":56,"column":24},"end":{"line":56,"column":102}},"type":"cond-expr","locations":[{"start":{"line":56,"column":59},"end":{"line":56,"column":92}},{"start":{"line":56,"column":95},"end":{"line":56,"column":102}}],"line":56},"21":{"loc":{"start":{"line":56,"column":25},"end":{"line":56,"column":55}},"type":"binary-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":32}},{"start":{"line":56,"column":36},"end":{"line":56,"column":55}}],"line":56},"22":{"loc":{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},"type":"if","locations":[{"start":{"line":64,"column":4},"end":{"line":68,"column":5}},{"start":{"line":66,"column":11},"end":{"line":68,"column":5}}],"line":64},"23":{"loc":{"start":{"line":73,"column":28},"end":{"line":73,"column":42}},"type":"default-arg","locations":[{"start":{"line":73,"column":38},"end":{"line":73,"column":42}}],"line":73},"24":{"loc":{"start":{"line":74,"column":22},"end":{"line":74,"column":36}},"type":"default-arg","locations":[{"start":{"line":74,"column":32},"end":{"line":74,"column":36}}],"line":74},"25":{"loc":{"start":{"line":79,"column":19},"end":{"line":79,"column":33}},"type":"default-arg","locations":[{"start":{"line":79,"column":29},"end":{"line":79,"column":33}}],"line":79},"26":{"loc":{"start":{"line":80,"column":24},"end":{"line":80,"column":52}},"type":"binary-expr","locations":[{"start":{"line":80,"column":24},"end":{"line":80,"column":43}},{"start":{"line":80,"column":47},"end":{"line":80,"column":52}}],"line":80}},"s":{"0":4,"1":125,"2":125,"3":125,"4":125,"5":2,"6":2,"7":125,"8":3,"9":3,"10":3,"11":3,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":6,"24":6,"25":6,"26":2,"27":4,"28":2,"29":2,"30":2,"31":2,"32":4,"33":2,"34":2,"35":2,"36":1,"37":1,"38":4,"39":2,"40":0,"41":0,"42":0,"43":5,"44":5,"45":5},"f":{"0":125,"1":3,"2":0,"3":0,"4":6,"5":2,"6":4,"7":2,"8":0,"9":5},"b":{"0":[123],"1":[2,123],"2":[125,2],"3":[2,123],"4":[125,113],"5":[0],"6":[3,3],"7":[3,0],"8":[3,3],"9":[0],"10":[0,0],"11":[0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[3],"16":[3,3],"17":[6,3],"18":[2,4],"19":[2],"20":[0,2],"21":[2,0],"22":[1,1],"23":[2],"24":[0],"25":[0],"26":[5,0]},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"cf2d7a19a6546d39c1551758fb55222fdf121dbc"}
|
|
4
4
|
,"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/iso3166codes.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/iso3166codes.js","statementMap":{"0":{"start":{"line":1,"column":25},"end":{"line":53,"column":1}},"1":{"start":{"line":55,"column":28},"end":{"line":66,"column":1}},"2":{"start":{"line":69,"column":29},"end":{"line":72,"column":1}},"3":{"start":{"line":74,"column":37},"end":{"line":82,"column":1}},"4":{"start":{"line":75,"column":18},"end":{"line":75,"column":67}},"5":{"start":{"line":76,"column":24},"end":{"line":76,"column":46}},"6":{"start":{"line":77,"column":2},"end":{"line":81,"column":3}},"7":{"start":{"line":78,"column":4},"end":{"line":78,"column":52}},"8":{"start":{"line":80,"column":4},"end":{"line":80,"column":17}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":74,"column":37},"end":{"line":74,"column":38}},"loc":{"start":{"line":74,"column":68},"end":{"line":82,"column":1}},"line":74}},"branchMap":{"0":{"loc":{"start":{"line":74,"column":45},"end":{"line":74,"column":63}},"type":"default-arg","locations":[{"start":{"line":74,"column":59},"end":{"line":74,"column":63}}],"line":74},"1":{"loc":{"start":{"line":75,"column":18},"end":{"line":75,"column":67}},"type":"cond-expr","locations":[{"start":{"line":75,"column":32},"end":{"line":75,"column":57}},{"start":{"line":75,"column":60},"end":{"line":75,"column":67}}],"line":75},"2":{"loc":{"start":{"line":77,"column":2},"end":{"line":81,"column":3}},"type":"if","locations":[{"start":{"line":77,"column":2},"end":{"line":81,"column":3}},{"start":{"line":79,"column":9},"end":{"line":81,"column":3}}],"line":77}},"s":{"0":4,"1":4,"2":4,"3":4,"4":6,"5":6,"6":6,"7":6,"8":0},"f":{"0":6},"b":{"0":[0],"1":[6,0],"2":[6,0]},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"b5f16430aa93421684b4805c385c7f2cd0fe7c40"}
|
|
5
5
|
,"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/passwordcheck.js": {"path":"/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/passwordcheck.js","statementMap":{"0":{"start":{"line":1,"column":20},"end":{"line":1,"column":35}},"1":{"start":{"line":2,"column":26},"end":{"line":2,"column":60}},"2":{"start":{"line":5,"column":20},"end":{"line":5,"column":36}},"3":{"start":{"line":6,"column":19},"end":{"line":6,"column":42}},"4":{"start":{"line":7,"column":2},"end":{"line":10,"column":4}},"5":{"start":{"line":13,"column":21},"end":{"line":22,"column":1}},"6":{"start":{"line":14,"column":29},"end":{"line":14,"column":58}},"7":{"start":{"line":15,"column":32},"end":{"line":15,"column":61}},"8":{"start":{"line":16,"column":32},"end":{"line":16,"column":61}},"9":{"start":{"line":17,"column":34},"end":{"line":17,"column":70}},"10":{"start":{"line":19,"column":23},"end":{"line":19,"column":115}},"11":{"start":{"line":20,"column":19},"end":{"line":20,"column":28}},"12":{"start":{"line":21,"column":2},"end":{"line":21,"column":45}},"13":{"start":{"line":24,"column":21},"end":{"line":29,"column":1}},"14":{"start":{"line":25,"column":14},"end":{"line":25,"column":56}},"15":{"start":{"line":25,"column":41},"end":{"line":25,"column":55}},"16":{"start":{"line":27,"column":19},"end":{"line":27,"column":47}},"17":{"start":{"line":28,"column":2},"end":{"line":28,"column":18}}},"fnMap":{"0":{"name":"passwordcheck","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":22}},"loc":{"start":{"line":4,"column":28},"end":{"line":11,"column":1}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":13,"column":21},"end":{"line":13,"column":22}},"loc":{"start":{"line":13,"column":29},"end":{"line":22,"column":1}},"line":13},"2":{"name":"(anonymous_2)","decl":{"start":{"line":24,"column":21},"end":{"line":24,"column":22}},"loc":{"start":{"line":24,"column":36},"end":{"line":29,"column":1}},"line":24},"3":{"name":"(anonymous_3)","decl":{"start":{"line":25,"column":36},"end":{"line":25,"column":37}},"loc":{"start":{"line":25,"column":41},"end":{"line":25,"column":55}},"line":25}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":29},"end":{"line":14,"column":58}},"type":"cond-expr","locations":[{"start":{"line":14,"column":52},"end":{"line":14,"column":54}},{"start":{"line":14,"column":57},"end":{"line":14,"column":58}}],"line":14},"1":{"loc":{"start":{"line":15,"column":32},"end":{"line":15,"column":61}},"type":"cond-expr","locations":[{"start":{"line":15,"column":55},"end":{"line":15,"column":57}},{"start":{"line":15,"column":60},"end":{"line":15,"column":61}}],"line":15},"2":{"loc":{"start":{"line":16,"column":32},"end":{"line":16,"column":61}},"type":"cond-expr","locations":[{"start":{"line":16,"column":55},"end":{"line":16,"column":57}},{"start":{"line":16,"column":60},"end":{"line":16,"column":61}}],"line":16},"3":{"loc":{"start":{"line":17,"column":34},"end":{"line":17,"column":70}},"type":"cond-expr","locations":[{"start":{"line":17,"column":64},"end":{"line":17,"column":66}},{"start":{"line":17,"column":69},"end":{"line":17,"column":70}}],"line":17}},"s":{"0":4,"1":4,"2":2,"3":2,"4":2,"5":4,"6":2,"7":2,"8":2,"9":2,"10":2,"11":2,"12":2,"13":4,"14":2,"15":4,"16":2,"17":2},"f":{"0":2,"1":2,"2":2,"3":4},"b":{"0":[2,0],"1":[1,1],"2":[1,1],"3":[1,1]},"inputSourceMap":null,"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"2741ced069733583b1abf7db7817199e14a8b8f5"}
|
|
6
6
|
}
|
|
@@ -163,7 +163,7 @@ export const ageGate = (ageGateType, ageGateValue, legalAge = null) => {
|
|
|
163
163
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
164
164
|
Code coverage generated by
|
|
165
165
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
166
|
-
at 2025-
|
|
166
|
+
at 2025-03-03T22:41:26.548Z
|
|
167
167
|
</div>
|
|
168
168
|
<script src="prettify.js"></script>
|
|
169
169
|
<script>
|
|
@@ -244,7 +244,7 @@ export const trustedEmailDomains = [
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at 2025-
|
|
247
|
+
at 2025-03-03T22:41:26.548Z
|
|
248
248
|
</div>
|
|
249
249
|
<script src="prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at 2025-
|
|
164
|
+
at 2025-03-03T22:41:26.548Z
|
|
165
165
|
</div>
|
|
166
166
|
<script src="prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -158,14 +158,14 @@
|
|
|
158
158
|
<span class="cline-any cline-neutral"> </span>
|
|
159
159
|
<span class="cline-any cline-yes">4x</span>
|
|
160
160
|
<span class="cline-any cline-neutral"> </span>
|
|
161
|
-
<span class="cline-any cline-yes">
|
|
162
|
-
<span class="cline-any cline-yes">
|
|
163
|
-
<span class="cline-any cline-yes">
|
|
164
|
-
<span class="cline-any cline-yes">
|
|
161
|
+
<span class="cline-any cline-yes">125x</span>
|
|
162
|
+
<span class="cline-any cline-yes">125x</span>
|
|
163
|
+
<span class="cline-any cline-yes">125x</span>
|
|
164
|
+
<span class="cline-any cline-yes">125x</span>
|
|
165
165
|
<span class="cline-any cline-yes">2x</span>
|
|
166
166
|
<span class="cline-any cline-yes">2x</span>
|
|
167
167
|
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-yes">
|
|
168
|
+
<span class="cline-any cline-yes">125x</span>
|
|
169
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
170
|
<span class="cline-any cline-neutral"> </span>
|
|
171
171
|
<span class="cline-any cline-yes">3x</span>
|
|
@@ -245,7 +245,7 @@ import { ageGate } from './agegate';
|
|
|
245
245
|
const Validators = {
|
|
246
246
|
email: (value, options = null) => {
|
|
247
247
|
const checkTypeoList = (options && options.checkTypeos) ? options.checkTypeos : false;
|
|
248
|
-
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,
|
|
248
|
+
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,63}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9.-]{0,250}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/;
|
|
249
249
|
let isValid = emailRegex.test(value);
|
|
250
250
|
if (isValid && checkTypeoList) {
|
|
251
251
|
const emailDomain = value.split('@')[1].toLowerCase();
|
|
@@ -328,7 +328,7 @@ export { Validators, Checkers };
|
|
|
328
328
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
329
329
|
Code coverage generated by
|
|
330
330
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
331
|
-
at 2025-
|
|
331
|
+
at 2025-03-03T22:41:26.548Z
|
|
332
332
|
</div>
|
|
333
333
|
<script src="prettify.js"></script>
|
|
334
334
|
<script>
|
|
@@ -316,7 +316,7 @@ export const getAdministrativeArea = (value, countryCode = <span class="branch-0
|
|
|
316
316
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
317
317
|
Code coverage generated by
|
|
318
318
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
319
|
-
at 2025-
|
|
319
|
+
at 2025-03-03T22:41:26.548Z
|
|
320
320
|
</div>
|
|
321
321
|
<script src="prettify.js"></script>
|
|
322
322
|
<script>
|
|
@@ -163,7 +163,7 @@ export default passwordcheck;
|
|
|
163
163
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
164
164
|
Code coverage generated by
|
|
165
165
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
166
|
-
at 2025-
|
|
166
|
+
at 2025-03-03T22:41:26.548Z
|
|
167
167
|
</div>
|
|
168
168
|
<script src="prettify.js"></script>
|
|
169
169
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -65,7 +65,7 @@ FN:74,(anonymous_8)
|
|
|
65
65
|
FN:79,(anonymous_9)
|
|
66
66
|
FNF:10
|
|
67
67
|
FNH:7
|
|
68
|
-
FNDA:
|
|
68
|
+
FNDA:125,(anonymous_0)
|
|
69
69
|
FNDA:3,(anonymous_1)
|
|
70
70
|
FNDA:0,(anonymous_2)
|
|
71
71
|
FNDA:0,(anonymous_3)
|
|
@@ -76,13 +76,13 @@ FNDA:2,(anonymous_7)
|
|
|
76
76
|
FNDA:0,(anonymous_8)
|
|
77
77
|
FNDA:5,(anonymous_9)
|
|
78
78
|
DA:8,4
|
|
79
|
-
DA:10,
|
|
80
|
-
DA:11,
|
|
81
|
-
DA:12,
|
|
82
|
-
DA:13,
|
|
79
|
+
DA:10,125
|
|
80
|
+
DA:11,125
|
|
81
|
+
DA:12,125
|
|
82
|
+
DA:13,125
|
|
83
83
|
DA:14,2
|
|
84
84
|
DA:15,2
|
|
85
|
-
DA:17,
|
|
85
|
+
DA:17,125
|
|
86
86
|
DA:20,3
|
|
87
87
|
DA:21,3
|
|
88
88
|
DA:22,3
|
|
@@ -122,15 +122,15 @@ DA:81,5
|
|
|
122
122
|
DA:82,5
|
|
123
123
|
LF:45
|
|
124
124
|
LH:31
|
|
125
|
-
BRDA:9,0,0,
|
|
125
|
+
BRDA:9,0,0,123
|
|
126
126
|
BRDA:10,1,0,2
|
|
127
|
-
BRDA:10,1,1,
|
|
128
|
-
BRDA:10,2,0,
|
|
127
|
+
BRDA:10,1,1,123
|
|
128
|
+
BRDA:10,2,0,125
|
|
129
129
|
BRDA:10,2,1,2
|
|
130
130
|
BRDA:13,3,0,2
|
|
131
|
-
BRDA:13,3,1,
|
|
132
|
-
BRDA:13,4,0,
|
|
133
|
-
BRDA:13,4,1,
|
|
131
|
+
BRDA:13,3,1,123
|
|
132
|
+
BRDA:13,4,0,125
|
|
133
|
+
BRDA:13,4,1,113
|
|
134
134
|
BRDA:19,5,0,0
|
|
135
135
|
BRDA:20,6,0,3
|
|
136
136
|
BRDA:20,6,1,3
|
package/dist/bundle.cjs
CHANGED
|
@@ -4439,7 +4439,7 @@ const ageGate = (ageGateType, ageGateValue, legalAge = null) => {
|
|
|
4439
4439
|
const Validators = {
|
|
4440
4440
|
email: (value, options = null) => {
|
|
4441
4441
|
const checkTypeoList = (options && options.checkTypeos) ? options.checkTypeos : false;
|
|
4442
|
-
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,
|
|
4442
|
+
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,63}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9.-]{0,250}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/;
|
|
4443
4443
|
let isValid = emailRegex.test(value);
|
|
4444
4444
|
if (isValid && checkTypeoList) {
|
|
4445
4445
|
const emailDomain = value.split('@')[1].toLowerCase();
|
package/dist/bundle.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var thirstievalidators=function(e){"use strict";const t=[78,52,0],a=["weak","acceptable","strong"];const s=e=>{const t=(/.*[0-9].*/.test(e)?10:0)+(/.*[a-z].*/.test(e)?26:0)+(/.*[A-Z].*/.test(e)?26:0)+(/.*[^a-zA-Z0-9].*/.test(e)?33:0),a=e.length;return Math.log2(t**a)},n=e=>{const a=t.findIndex((t=>e>=t));return t.length-1-a},r={"en-us":{name:"United States",alpha3:"USA",numeric:"840",administrativeAreas:{AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"},alpha2:"US",currency:["$","USD"]},"en-ca":{name:"Canada",alpha3:"CAN",numeric:"124",administrativeAreas:{AB:"Alberta",BC:"British Columbia",MB:"Manitoba",NB:"New Brunswick",NL:"Newfoundland and Labrador",NS:"Nova Scotia",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan"},alpha1:"CA",currency:["$","CAD"]}},i=["gnail.co","gmil.com","gmsil.com","gamil.com","gmai.com","gnail.com","gmail.co","gmail.cm","gmail.co","gmal.com","gmaill.com","gmail.ca","gmal.com","gmai.com","gmaiil.com","gmail.con","gmail.comm","gmaol.com","gmail.om","gmaol.co","gmall.com","gmal.co","ail.com"],o=["gmail.com","yahoo.com","hotmail.com","aol.com","comcast.net","icloud.com","me.com","msn.com","outlook.com","sbcglobal.net","live.com","att.net","verizon.net","mac.com","ymail.com","optonline.net","cox.net","bellsouth.net","charter.net","anheuser-busch.com","mail.com","rocketmail.com","earthlink.net","aim.com","cbrands.com","kdrp.com","protonmail.com","roadrunner.com","pacbell.net","yopmail.com"];var d,c;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(d||(d={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(c||(c={}));const u=d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),l=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(e)?u.array:null===e?u.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?u.promise:"undefined"!=typeof Map&&e instanceof Map?u.map:"undefined"!=typeof Set&&e instanceof Set?u.set:"undefined"!=typeof Date&&e instanceof Date?u.date:u.object;default:return u.unknown}},h=d.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class p extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}static assert(e){if(!(e instanceof p))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,d.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}p.create=e=>new p(e);const m=(e,t)=>{let a;switch(e.code){case h.invalid_type:a=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,d.jsonStringifyReplacer)}`;break;case h.unrecognized_keys:a=`Unrecognized key(s) in object: ${d.joinValues(e.keys,", ")}`;break;case h.invalid_union:a="Invalid input";break;case h.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${d.joinValues(e.options)}`;break;case h.invalid_enum_value:a=`Invalid enum value. Expected ${d.joinValues(e.options)}, received '${e.received}'`;break;case h.invalid_arguments:a="Invalid function arguments";break;case h.invalid_return_type:a="Invalid function return type";break;case h.invalid_date:a="Invalid date";break;case h.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:d.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.custom:a="Invalid input";break;case h.invalid_intersection_types:a="Intersection results could not be merged";break;case h.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case h.not_finite:a="Number must be finite";break;default:a=t.defaultError,d.assertNever(e)}return{message:a}};let f=m;function y(){return f}const _=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};if(void 0!==n.message)return{...n,path:r,message:n.message};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:o}};function g(e,t){const a=y(),s=_({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===m?void 0:m].filter((e=>!!e))});e.common.issues.push(s)}class v{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return k;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t){const t=await e.key,s=await e.value;a.push({key:t,value:s})}return v.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return k;if("aborted"===n.status)return k;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"===t.value||void 0===n.value&&!s.alwaysSet||(a[t.value]=n.value)}return{status:e.value,value:a}}}const k=Object.freeze({status:"aborted"}),b=e=>({status:"dirty",value:e}),x=e=>({status:"valid",value:e}),w=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,T=e=>"valid"===e.status,C=e=>"undefined"!=typeof Promise&&e instanceof Promise;function N(e,t,a,s){if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function O(e,t,a,s,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,a),a}var S,E,A;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(S||(S={}));class j{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const I=(e,t)=>{if(T(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new p(e.common.issues);return this._error=t,this._error}}};function P(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(t,n)=>{var r,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:n.defaultError}:void 0===n.data?{message:null!==(r=null!=o?o:s)&&void 0!==r?r:n.defaultError}:"invalid_type"!==t.code?{message:n.defaultError}:{message:null!==(i=null!=o?o:a)&&void 0!==i?i:n.defaultError}},description:n}}class R{constructor(e){this.spa=this.safeParseAsync,this._def=e,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)}get description(){return this._def.description}_getType(e){return l(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:l(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new v,ctx:{common:e.parent.common,data:e.data,parsedType:l(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(C(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:l(e)},n=this._parseSync({data:e,path:s.path,parent:s});return I(s,n)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:l(e)},s=this._parse({data:e,path:a.path,parent:a}),n=await(C(s)?s:Promise.resolve(s));return I(a,n)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),r=()=>s.addIssue({code:h.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(r(),!1))):!!n||(r(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new Se({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ee.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Oe.create(this,this._def)}or(e){return pe.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Se({...P(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new je({...P(this._def),innerType:this,defaultValue:t,typeName:ze.ZodDefault})}brand(){return new Me({typeName:ze.ZodBranded,type:this,...P(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...P(this._def),innerType:this,catchValue:t,typeName:ze.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M=/^c[^\s-]{8,}$/i,$=/^[0-9a-z]+$/,D=/^[0-9A-HJKMNP-TV-Z]{26}$/,L=/^[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,V=/^[a-z0-9_-]{21}$/i,z=/^[-+]?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)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let K;const B=/^(?:(?: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])$/,W=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,F=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q="((\\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])))",H=new RegExp(`^${q}$`);function Y(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function G(e){let t=`${q}T${Y(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}class J extends R{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==u.string){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.string,received:t.parsedType}),k}const t=new v;let a;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const s=e.data.length>r.value,n=e.data.length<r.value;(s||n)&&(a=this._getOrReturnCtx(e,a),s?g(a,{code:h.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&g(a,{code:h.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)U.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"email",code:h.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)K||(K=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),K.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"emoji",code:h.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)L.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"uuid",code:h.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"nanoid",code:h.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)M.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid",code:h.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)$.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid2",code:h.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)D.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"ulid",code:h.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(s){a=this._getOrReturnCtx(e,a),g(a,{validation:"url",code:h.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"regex",code:h.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){G(r).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else if("date"===r.kind){H.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"date",message:r.message}),t.dirty())}else if("time"===r.kind){new RegExp(`^${Y(r)}$`).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"time",message:r.message}),t.dirty())}else"duration"===r.kind?z.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"duration",code:h.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?(s=e.data,("v4"!==(n=r.version)&&n||!B.test(s))&&("v6"!==n&&n||!W.test(s))&&(a=this._getOrReturnCtx(e,a),g(a,{validation:"ip",code:h.invalid_string,message:r.message}),t.dirty())):"base64"===r.kind?F.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"base64",code:h.invalid_string,message:r.message}),t.dirty()):d.assertNever(r);var s,n;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:h.invalid_string,...S.errToObj(a)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}datetime(e){var t,a;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(a=null==e?void 0:e.local)&&void 0!==a&&a,...S.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...S.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Q(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}J.create=e=>{var t;return new J({checks:[],typeName:ze.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...P(e)})};class X extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==u.number){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.number,received:t.parsedType}),k}let t;const a=new v;for(const s of this._def.checks)if("int"===s.kind)d.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:h.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty());else if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else"multipleOf"===s.kind?0!==Q(e.data,s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_finite,message:s.message}),a.dirty()):d.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,s){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(s)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&d.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}X.create=e=>new X({checks:[],typeName:ze.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...P(e)});class ee extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==u.bigint){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.bigint,received:t.parsedType}),k}let t;const a=new v;for(const s of this._def.checks)if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):d.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,s){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(s)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>{var t;return new ee({checks:[],typeName:ze.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...P(e)})};class te extends R{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==u.boolean){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.boolean,received:t.parsedType}),k}return x(e.data)}}te.create=e=>new te({typeName:ze.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...P(e)});class ae extends R{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==u.date){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.date,received:t.parsedType}),k}if(isNaN(e.data.getTime())){return g(this._getOrReturnCtx(e),{code:h.invalid_date}),k}const t=new v;let a;for(const s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),t.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),t.dirty()):d.assertNever(s);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ae.create=e=>new ae({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ze.ZodDate,...P(e)});class se extends R{_parse(e){if(this._getType(e)!==u.symbol){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.symbol,received:t.parsedType}),k}return x(e.data)}}se.create=e=>new se({typeName:ze.ZodSymbol,...P(e)});class ne extends R{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.undefined,received:t.parsedType}),k}return x(e.data)}}ne.create=e=>new ne({typeName:ze.ZodUndefined,...P(e)});class re extends R{_parse(e){if(this._getType(e)!==u.null){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.null,received:t.parsedType}),k}return x(e.data)}}re.create=e=>new re({typeName:ze.ZodNull,...P(e)});class ie extends R{constructor(){super(...arguments),this._any=!0}_parse(e){return x(e.data)}}ie.create=e=>new ie({typeName:ze.ZodAny,...P(e)});class oe extends R{constructor(){super(...arguments),this._unknown=!0}_parse(e){return x(e.data)}}oe.create=e=>new oe({typeName:ze.ZodUnknown,...P(e)});class de extends R{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.never,received:t.parsedType}),k}}de.create=e=>new de({typeName:ze.ZodNever,...P(e)});class ce extends R{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.void,received:t.parsedType}),k}return x(e.data)}}ce.create=e=>new ce({typeName:ze.ZodVoid,...P(e)});class ue extends R{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==u.array)return g(t,{code:h.invalid_type,expected:u.array,received:t.parsedType}),k;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,n=t.data.length<s.exactLength.value;(e||n)&&(g(t,{code:e?h.too_big:h.too_small,minimum:n?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(g(t,{code:h.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(g(t,{code:h.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>s.type._parseAsync(new j(t,e,t.path,a))))).then((e=>v.mergeArray(a,e)));const n=[...t.data].map(((e,a)=>s.type._parseSync(new j(t,e,t.path,a))));return v.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function le(e){if(e instanceof he){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=Ee.create(le(s))}return new he({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:le(e.element)}):e instanceof Ee?Ee.create(le(e.unwrap())):e instanceof Ae?Ae.create(le(e.unwrap())):e instanceof ge?ge.create(e.items.map((e=>le(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...P(t)});class he extends R{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=d.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.object,received:t.parsedType}),k}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:n}=this._getCached(),r=[];if(!(this._def.catchall instanceof de&&"strip"===this._def.unknownKeys))for(const e in a.data)n.includes(e)||r.push(e);const i=[];for(const e of n){const t=s[e],n=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new j(a,n,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof de){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(g(a,{code:h.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const s=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new j(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key,s=await t.value;e.push({key:a,value:s,alwaysSet:t.alwaysSet})}return e})).then((e=>v.mergeObjectSync(t,e))):v.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new he({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=S.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new he({...this._def,unknownKeys:"strip"})}passthrough(){return new he({...this._def,unknownKeys:"passthrough"})}extend(e){return new he({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new he({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new he({...this._def,catchall:e})}pick(e){const t={};return d.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new he({...this._def,shape:()=>t})}omit(e){const t={};return d.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new he({...this._def,shape:()=>t})}deepPartial(){return le(this)}partial(e){const t={};return d.objectKeys(this.shape).forEach((a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()})),new he({...this._def,shape:()=>t})}required(e){const t={};return d.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Ee;)e=e._def.innerType;t[a]=e}})),new he({...this._def,shape:()=>t})}keyof(){return Te(d.objectKeys(this.shape))}}he.create=(e,t)=>new he({shape:()=>e,unknownKeys:"strip",catchall:de.create(),typeName:ze.ZodObject,...P(t)}),he.strictCreate=(e,t)=>new he({shape:()=>e,unknownKeys:"strict",catchall:de.create(),typeName:ze.ZodObject,...P(t)}),he.lazycreate=(e,t)=>new he({shape:e,unknownKeys:"strip",catchall:de.create(),typeName:ze.ZodObject,...P(t)});class pe extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new p(e.ctx.common.issues)));return g(t,{code:h.invalid_union,unionErrors:a}),k}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new p(e)));return g(t,{code:h.invalid_union,unionErrors:n}),k}}get options(){return this._def.options}}pe.create=(e,t)=>new pe({options:e,typeName:ze.ZodUnion,...P(t)});const me=e=>e instanceof we?me(e.schema):e instanceof Se?me(e.innerType()):e instanceof Ze?[e.value]:e instanceof Ce?e.options:e instanceof Ne?d.objectValues(e.enum):e instanceof je?me(e._def.innerType):e instanceof ne?[void 0]:e instanceof re?[null]:e instanceof Ee?[void 0,...me(e.unwrap())]:e instanceof Ae?[null,...me(e.unwrap())]:e instanceof Me||e instanceof De?me(e.unwrap()):e instanceof Ie?me(e._def.innerType):[];class fe extends R{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return g(t,{code:h.invalid_type,expected:u.object,received:t.parsedType}),k;const a=this.discriminator,s=t.data[a],n=this.optionsMap.get(s);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(g(t,{code:h.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),k)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=me(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new fe({typeName:ze.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...P(a)})}}function ye(e,t){const a=l(e),s=l(t);if(e===t)return{valid:!0,data:e};if(a===u.object&&s===u.object){const a=d.objectKeys(t),s=d.objectKeys(e).filter((e=>-1!==a.indexOf(e))),n={...e,...t};for(const a of s){const s=ye(e[a],t[a]);if(!s.valid)return{valid:!1};n[a]=s.data}return{valid:!0,data:n}}if(a===u.array&&s===u.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const n=ye(e[s],t[s]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}return a===u.date&&s===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _e extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(w(e)||w(s))return k;const n=ye(e.value,s.value);return n.valid?((Z(e)||Z(s))&&t.dirty(),{status:t.value,value:n.data}):(g(a,{code:h.invalid_intersection_types}),k)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}_e.create=(e,t,a)=>new _e({left:e,right:t,typeName:ze.ZodIntersection,...P(a)});class ge extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.array)return g(a,{code:h.invalid_type,expected:u.array,received:a.parsedType}),k;if(a.data.length<this._def.items.length)return g(a,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),k;!this._def.rest&&a.data.length>this._def.items.length&&(g(a,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new j(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(s).then((e=>v.mergeArray(t,e))):v.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ge({...this._def,rest:e})}}ge.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ge({items:e,typeName:ze.ZodTuple,rest:null,...P(t)})};class ve extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.object)return g(a,{code:h.invalid_type,expected:u.object,received:a.parsedType}),k;const s=[],n=this._def.keyType,r=this._def.valueType;for(const e in a.data)s.push({key:n._parse(new j(a,e,a.path,e)),value:r._parse(new j(a,a.data[e],a.path,e)),alwaysSet:e in a.data});return a.common.async?v.mergeObjectAsync(t,s):v.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new ve(t instanceof R?{keyType:e,valueType:t,typeName:ze.ZodRecord,...P(a)}:{keyType:J.create(),valueType:e,typeName:ze.ZodRecord,...P(t)})}}class ke extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.map)return g(a,{code:h.invalid_type,expected:u.map,received:a.parsedType}),k;const s=this._def.keyType,n=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:s._parse(new j(a,e,a.path,[r,"key"])),value:n._parse(new j(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return k;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return k;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}ke.create=(e,t,a)=>new ke({valueType:t,keyType:e,typeName:ze.ZodMap,...P(a)});class be extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.set)return g(a,{code:h.invalid_type,expected:u.set,received:a.parsedType}),k;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(g(a,{code:h.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(g(a,{code:h.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const n=this._def.valueType;function r(e){const a=new Set;for(const s of e){if("aborted"===s.status)return k;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>n._parse(new j(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new be({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new be({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}be.create=(e,t)=>new be({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...P(t)});class xe extends R{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return g(t,{code:h.invalid_type,expected:u.function,received:t.parsedType}),k;function a(e,a){return _({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),m].filter((e=>!!e)),issueData:{code:h.invalid_arguments,argumentsError:a}})}function s(e,a){return _({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),m].filter((e=>!!e)),issueData:{code:h.invalid_return_type,returnTypeError:a}})}const n={errorMap:t.common.contextualErrorMap},r=t.data;if(this._def.returns instanceof Oe){const e=this;return x((async function(...t){const i=new p([]),o=await e._def.args.parseAsync(t,n).catch((e=>{throw i.addIssue(a(t,e)),i})),d=await Reflect.apply(r,this,o);return await e._def.returns._def.type.parseAsync(d,n).catch((e=>{throw i.addIssue(s(d,e)),i}))}))}{const e=this;return x((function(...t){const i=e._def.args.safeParse(t,n);if(!i.success)throw new p([a(t,i.error)]);const o=Reflect.apply(r,this,i.data),d=e._def.returns.safeParse(o,n);if(!d.success)throw new p([s(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new xe({...this._def,args:ge.create(e).rest(oe.create())})}returns(e){return new xe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new xe({args:e||ge.create([]).rest(oe.create()),returns:t||oe.create(),typeName:ze.ZodFunction,...P(a)})}}class we extends R{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}we.create=(e,t)=>new we({getter:e,typeName:ze.ZodLazy,...P(t)});class Ze extends R{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),k}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Te(e,t){return new Ce({values:e,typeName:ze.ZodEnum,...P(t)})}Ze.create=(e,t)=>new Ze({value:e,typeName:ze.ZodLiteral,...P(t)});class Ce extends R{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{expected:d.joinValues(a),received:t.parsedType,code:h.invalid_type}),k}if(N(this,E)||O(this,E,new Set(this._def.values)),!N(this,E).has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{received:t.data,code:h.invalid_enum_value,options:a}),k}return x(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ce.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ce.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}E=new WeakMap,Ce.create=Te;class Ne extends R{constructor(){super(...arguments),A.set(this,void 0)}_parse(e){const t=d.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==u.string&&a.parsedType!==u.number){const e=d.objectValues(t);return g(a,{expected:d.joinValues(e),received:a.parsedType,code:h.invalid_type}),k}if(N(this,A)||O(this,A,new Set(d.getValidEnumValues(this._def.values))),!N(this,A).has(e.data)){const e=d.objectValues(t);return g(a,{received:a.data,code:h.invalid_enum_value,options:e}),k}return x(e.data)}get enum(){return this._def.values}}A=new WeakMap,Ne.create=(e,t)=>new Ne({values:e,typeName:ze.ZodNativeEnum,...P(t)});class Oe extends R{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&!1===t.common.async)return g(t,{code:h.invalid_type,expected:u.promise,received:t.parsedType}),k;const a=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return x(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Oe.create=(e,t)=>new Oe({type:e,typeName:ze.ZodPromise,...P(t)});class Se extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,n={addIssue:e=>{g(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===s.type){const e=s.transform(a.data,n);if(a.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return k;const s=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===s.status?k:"dirty"===s.status||"dirty"===t.value?b(s.value):s}));{if("aborted"===t.value)return k;const s=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===s.status?k:"dirty"===s.status||"dirty"===t.value?b(s.value):s}}if("refinement"===s.type){const e=e=>{const t=s.refinement(e,n);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===s.status?k:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?k:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===s.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!T(e))return e;const r=s.transform(e.value,n);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>T(e)?Promise.resolve(s.transform(e.value,n)).then((e=>({status:t.value,value:e}))):e))}d.assertNever(s)}}Se.create=(e,t,a)=>new Se({schema:e,typeName:ze.ZodEffects,effect:t,...P(a)}),Se.createWithPreprocess=(e,t,a)=>new Se({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...P(a)});class Ee extends R{_parse(e){return this._getType(e)===u.undefined?x(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ee.create=(e,t)=>new Ee({innerType:e,typeName:ze.ZodOptional,...P(t)});class Ae extends R{_parse(e){return this._getType(e)===u.null?x(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:ze.ZodNullable,...P(t)});class je extends R{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===u.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}je.create=(e,t)=>new je({innerType:e,typeName:ze.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...P(t)});class Ie extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return C(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:ze.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...P(t)});class Pe extends R{_parse(e){if(this._getType(e)!==u.nan){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.nan,received:t.parsedType}),k}return{status:"valid",value:e.data}}}Pe.create=e=>new Pe({typeName:ze.ZodNaN,...P(e)});const Re=Symbol("zod_brand");class Me extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class $e extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?k:"dirty"===e.status?(t.dirty(),b(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?k:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new $e({in:e,out:t,typeName:ze.ZodPipeline})}}class De extends R{_parse(e){const t=this._def.innerType._parse(e),a=e=>(T(e)&&(e.value=Object.freeze(e.value)),e);return C(t)?t.then((e=>a(e))):a(t)}unwrap(){return this._def.innerType}}function Le(e,t={},a){return e?ie.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):ie.create()}De.create=(e,t)=>new De({innerType:e,typeName:ze.ZodReadonly,...P(t)});const Ve={object:he.lazycreate};var ze;!function(e){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"}(ze||(ze={}));const Ue=J.create,Ke=X.create,Be=Pe.create,We=ee.create,Fe=te.create,qe=ae.create,He=se.create,Ye=ne.create,Ge=re.create,Je=ie.create,Qe=oe.create,Xe=de.create,et=ce.create,tt=ue.create,at=he.create,st=he.strictCreate,nt=pe.create,rt=fe.create,it=_e.create,ot=ge.create,dt=ve.create,ct=ke.create,ut=be.create,lt=xe.create,ht=we.create,pt=Ze.create,mt=Ce.create,ft=Ne.create,yt=Oe.create,_t=Se.create,gt=Ee.create,vt=Ae.create,kt=Se.createWithPreprocess,bt=$e.create,xt={string:e=>J.create({...e,coerce:!0}),number:e=>X.create({...e,coerce:!0}),boolean:e=>te.create({...e,coerce:!0}),bigint:e=>ee.create({...e,coerce:!0}),date:e=>ae.create({...e,coerce:!0})},wt=k;var Zt=Object.freeze({__proto__:null,defaultErrorMap:m,setErrorMap:function(e){f=e},getErrorMap:y,makeIssue:_,EMPTY_PATH:[],addIssueToContext:g,ParseStatus:v,INVALID:k,DIRTY:b,OK:x,isAborted:w,isDirty:Z,isValid:T,isAsync:C,get util(){return d},get objectUtil(){return c},ZodParsedType:u,getParsedType:l,ZodType:R,datetimeRegex:G,ZodString:J,ZodNumber:X,ZodBigInt:ee,ZodBoolean:te,ZodDate:ae,ZodSymbol:se,ZodUndefined:ne,ZodNull:re,ZodAny:ie,ZodUnknown:oe,ZodNever:de,ZodVoid:ce,ZodArray:ue,ZodObject:he,ZodUnion:pe,ZodDiscriminatedUnion:fe,ZodIntersection:_e,ZodTuple:ge,ZodRecord:ve,ZodMap:ke,ZodSet:be,ZodFunction:xe,ZodLazy:we,ZodLiteral:Ze,ZodEnum:Ce,ZodNativeEnum:Ne,ZodPromise:Oe,ZodEffects:Se,ZodTransformer:Se,ZodOptional:Ee,ZodNullable:Ae,ZodDefault:je,ZodCatch:Ie,ZodNaN:Pe,BRAND:Re,ZodBranded:Me,ZodPipeline:$e,ZodReadonly:De,custom:Le,Schema:R,ZodSchema:R,late:Ve,get ZodFirstPartyTypeKind(){return ze},coerce:xt,any:Je,array:tt,bigint:We,boolean:Fe,date:qe,discriminatedUnion:rt,effect:_t,enum:mt,function:lt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Le((t=>t instanceof e),t),intersection:it,lazy:ht,literal:pt,map:ct,nan:Be,nativeEnum:ft,never:Xe,null:Ge,nullable:vt,number:Ke,object:at,oboolean:()=>Fe().optional(),onumber:()=>Ke().optional(),optional:gt,ostring:()=>Ue().optional(),pipeline:bt,preprocess:kt,promise:yt,record:dt,set:ut,strictObject:st,string:Ue,symbol:He,transformer:_t,tuple:ot,undefined:Ye,union:nt,unknown:Qe,void:et,NEVER:wt,ZodIssueCode:h,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:p});const Tt={email:(e,t=null)=>{const a=!(!t||!t.checkTypeos)&&t.checkTypeos;let s=/^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}@[a-zA-Z0-9]{1,255}\.[a-zA-Z]{2,}$/.test(e);if(s&&a){const t=e.split("@")[1].toLowerCase();s=!i.includes(t)}return s},emailHasTrustedDomain:(e,t=null)=>{const a=e&&e.toLowerCase().split("@");if(a&&2===a.length){const e=a[1];return o.includes(e)}return!1},phoneNumber:(e,t=null)=>{const a=/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/;if(e){const t=String(e).replace(/[^0-9]/g,"");return a.test(t)}return!1},postalCode:(e,t=null)=>{const a={"en-us":/^\d{5}$/,"en-ca":/^[a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d$/}[t&&t.countryCode?t.countryCode.toLowerCase():"en-us"];return!!a&&a.test(e)},stateProvinceCode:(e,t=null)=>{const a=t&&t.countryCode?t.countryCode.toLowerCase():"en-us",s=((e,t=null)=>{const a=t?t.toLowerCase():"en-us",s=r[a];return!!s&&s.administrativeAreas[e]})(e.toUpperCase(),a);return!!s},currencyValue:(e,t=null)=>{const a=t&&t.countryCode?t.countryCode.toLowerCase():"en-us",s=r[a].currency.reduce(((e,t)=>e.replace(t,"")),e).replace(" ",""),n=/\d+\.+\d+/;return!/[^.^\d]+/.test(s)&&n.test(s)}},Ct={passwordStrength:(e,t=null)=>function(e){const t=s(e),r=n(t);return{strength:r,label:a[r]}}(e),emailCheck:(e,t=null)=>({isValid:Tt.email(e,{checkTypeos:!0}),isTrusted:Tt.emailHasTrustedDomain(e)}),ageGate:(e,t=null)=>((e,t,a=null)=>{const s=Zt.enum(["yesno","dob"]),n=Zt.coerce.date();a=a||21;let r=null;try{r=s.parse(e.toLowerCase())}catch{return{}}let i=!1,{success:o,data:d}=n.safeParse(t);switch(r){case"yesno":i=!!t,d=null;break;case"dob":if(o){const e=new Date,t=new Date(d.getFullYear()+a,d.getMonth(),d.getDate());i=!!t&&t<=e}}return{ageGateType:r,ageGatePassed:i,ageGateDOB:d||null}})(t.ageGateType||"dob",e,t.legalAge)};return e.Checkers=Ct,e.Validators=Tt,e}({});
|
|
1
|
+
var thirstievalidators=function(e){"use strict";const t=[78,52,0],a=["weak","acceptable","strong"];const s=e=>{const t=(/.*[0-9].*/.test(e)?10:0)+(/.*[a-z].*/.test(e)?26:0)+(/.*[A-Z].*/.test(e)?26:0)+(/.*[^a-zA-Z0-9].*/.test(e)?33:0),a=e.length;return Math.log2(t**a)},n=e=>{const a=t.findIndex((t=>e>=t));return t.length-1-a},r={"en-us":{name:"United States",alpha3:"USA",numeric:"840",administrativeAreas:{AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"},alpha2:"US",currency:["$","USD"]},"en-ca":{name:"Canada",alpha3:"CAN",numeric:"124",administrativeAreas:{AB:"Alberta",BC:"British Columbia",MB:"Manitoba",NB:"New Brunswick",NL:"Newfoundland and Labrador",NS:"Nova Scotia",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan"},alpha1:"CA",currency:["$","CAD"]}},i=["gnail.co","gmil.com","gmsil.com","gamil.com","gmai.com","gnail.com","gmail.co","gmail.cm","gmail.co","gmal.com","gmaill.com","gmail.ca","gmal.com","gmai.com","gmaiil.com","gmail.con","gmail.comm","gmaol.com","gmail.om","gmaol.co","gmall.com","gmal.co","ail.com"],o=["gmail.com","yahoo.com","hotmail.com","aol.com","comcast.net","icloud.com","me.com","msn.com","outlook.com","sbcglobal.net","live.com","att.net","verizon.net","mac.com","ymail.com","optonline.net","cox.net","bellsouth.net","charter.net","anheuser-busch.com","mail.com","rocketmail.com","earthlink.net","aim.com","cbrands.com","kdrp.com","protonmail.com","roadrunner.com","pacbell.net","yopmail.com"];var d,c;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(d||(d={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(c||(c={}));const u=d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),l=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(e)?u.array:null===e?u.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?u.promise:"undefined"!=typeof Map&&e instanceof Map?u.map:"undefined"!=typeof Set&&e instanceof Set?u.set:"undefined"!=typeof Date&&e instanceof Date?u.date:u.object;default:return u.unknown}},h=d.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class p extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}static assert(e){if(!(e instanceof p))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,d.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}p.create=e=>new p(e);const m=(e,t)=>{let a;switch(e.code){case h.invalid_type:a=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,d.jsonStringifyReplacer)}`;break;case h.unrecognized_keys:a=`Unrecognized key(s) in object: ${d.joinValues(e.keys,", ")}`;break;case h.invalid_union:a="Invalid input";break;case h.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${d.joinValues(e.options)}`;break;case h.invalid_enum_value:a=`Invalid enum value. Expected ${d.joinValues(e.options)}, received '${e.received}'`;break;case h.invalid_arguments:a="Invalid function arguments";break;case h.invalid_return_type:a="Invalid function return type";break;case h.invalid_date:a="Invalid date";break;case h.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:d.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.custom:a="Invalid input";break;case h.invalid_intersection_types:a="Intersection results could not be merged";break;case h.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case h.not_finite:a="Number must be finite";break;default:a=t.defaultError,d.assertNever(e)}return{message:a}};let f=m;function y(){return f}const _=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};if(void 0!==n.message)return{...n,path:r,message:n.message};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:o}};function g(e,t){const a=y(),s=_({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===m?void 0:m].filter((e=>!!e))});e.common.issues.push(s)}class v{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return k;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t){const t=await e.key,s=await e.value;a.push({key:t,value:s})}return v.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return k;if("aborted"===n.status)return k;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"===t.value||void 0===n.value&&!s.alwaysSet||(a[t.value]=n.value)}return{status:e.value,value:a}}}const k=Object.freeze({status:"aborted"}),b=e=>({status:"dirty",value:e}),x=e=>({status:"valid",value:e}),w=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,T=e=>"valid"===e.status,C=e=>"undefined"!=typeof Promise&&e instanceof Promise;function N(e,t,a,s){if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function O(e,t,a,s,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,a),a}var S,A,E;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(S||(S={}));class j{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const I=(e,t)=>{if(T(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new p(e.common.issues);return this._error=t,this._error}}};function P(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(t,n)=>{var r,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:n.defaultError}:void 0===n.data?{message:null!==(r=null!=o?o:s)&&void 0!==r?r:n.defaultError}:"invalid_type"!==t.code?{message:n.defaultError}:{message:null!==(i=null!=o?o:a)&&void 0!==i?i:n.defaultError}},description:n}}class R{constructor(e){this.spa=this.safeParseAsync,this._def=e,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)}get description(){return this._def.description}_getType(e){return l(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:l(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new v,ctx:{common:e.parent.common,data:e.data,parsedType:l(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(C(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:l(e)},n=this._parseSync({data:e,path:s.path,parent:s});return I(s,n)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:l(e)},s=this._parse({data:e,path:a.path,parent:a}),n=await(C(s)?s:Promise.resolve(s));return I(a,n)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),r=()=>s.addIssue({code:h.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(r(),!1))):!!n||(r(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new Se({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ae.create(this,this._def)}nullable(){return Ee.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Oe.create(this,this._def)}or(e){return pe.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Se({...P(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new je({...P(this._def),innerType:this,defaultValue:t,typeName:Ve.ZodDefault})}brand(){return new Me({typeName:Ve.ZodBranded,type:this,...P(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...P(this._def),innerType:this,catchValue:t,typeName:Ve.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M=/^c[^\s-]{8,}$/i,$=/^[0-9a-z]+$/,D=/^[0-9A-HJKMNP-TV-Z]{26}$/,L=/^[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,z=/^[a-z0-9_-]{21}$/i,V=/^[-+]?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)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let K;const B=/^(?:(?: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])$/,W=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,F=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q="((\\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])))",H=new RegExp(`^${q}$`);function Y(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function G(e){let t=`${q}T${Y(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}class J extends R{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==u.string){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.string,received:t.parsedType}),k}const t=new v;let a;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const s=e.data.length>r.value,n=e.data.length<r.value;(s||n)&&(a=this._getOrReturnCtx(e,a),s?g(a,{code:h.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&g(a,{code:h.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)U.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"email",code:h.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)K||(K=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),K.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"emoji",code:h.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)L.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"uuid",code:h.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)z.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"nanoid",code:h.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)M.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid",code:h.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)$.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid2",code:h.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)D.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"ulid",code:h.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(s){a=this._getOrReturnCtx(e,a),g(a,{validation:"url",code:h.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"regex",code:h.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){G(r).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else if("date"===r.kind){H.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"date",message:r.message}),t.dirty())}else if("time"===r.kind){new RegExp(`^${Y(r)}$`).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:h.invalid_string,validation:"time",message:r.message}),t.dirty())}else"duration"===r.kind?V.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"duration",code:h.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?(s=e.data,("v4"!==(n=r.version)&&n||!B.test(s))&&("v6"!==n&&n||!W.test(s))&&(a=this._getOrReturnCtx(e,a),g(a,{validation:"ip",code:h.invalid_string,message:r.message}),t.dirty())):"base64"===r.kind?F.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"base64",code:h.invalid_string,message:r.message}),t.dirty()):d.assertNever(r);var s,n;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:h.invalid_string,...S.errToObj(a)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}datetime(e){var t,a;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(a=null==e?void 0:e.local)&&void 0!==a&&a,...S.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...S.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Q(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}J.create=e=>{var t;return new J({checks:[],typeName:Ve.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...P(e)})};class X extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==u.number){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.number,received:t.parsedType}),k}let t;const a=new v;for(const s of this._def.checks)if("int"===s.kind)d.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:h.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty());else if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else"multipleOf"===s.kind?0!==Q(e.data,s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_finite,message:s.message}),a.dirty()):d.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,s){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(s)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&d.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}X.create=e=>new X({checks:[],typeName:Ve.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...P(e)});class ee extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==u.bigint){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.bigint,received:t.parsedType}),k}let t;const a=new v;for(const s of this._def.checks)if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),g(t,{code:h.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):d.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,a,s){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:S.toString(s)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>{var t;return new ee({checks:[],typeName:Ve.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...P(e)})};class te extends R{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==u.boolean){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.boolean,received:t.parsedType}),k}return x(e.data)}}te.create=e=>new te({typeName:Ve.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...P(e)});class ae extends R{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==u.date){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.date,received:t.parsedType}),k}if(isNaN(e.data.getTime())){return g(this._getOrReturnCtx(e),{code:h.invalid_date}),k}const t=new v;let a;for(const s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),t.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:h.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),t.dirty()):d.assertNever(s);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ae.create=e=>new ae({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...P(e)});class se extends R{_parse(e){if(this._getType(e)!==u.symbol){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.symbol,received:t.parsedType}),k}return x(e.data)}}se.create=e=>new se({typeName:Ve.ZodSymbol,...P(e)});class ne extends R{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.undefined,received:t.parsedType}),k}return x(e.data)}}ne.create=e=>new ne({typeName:Ve.ZodUndefined,...P(e)});class re extends R{_parse(e){if(this._getType(e)!==u.null){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.null,received:t.parsedType}),k}return x(e.data)}}re.create=e=>new re({typeName:Ve.ZodNull,...P(e)});class ie extends R{constructor(){super(...arguments),this._any=!0}_parse(e){return x(e.data)}}ie.create=e=>new ie({typeName:Ve.ZodAny,...P(e)});class oe extends R{constructor(){super(...arguments),this._unknown=!0}_parse(e){return x(e.data)}}oe.create=e=>new oe({typeName:Ve.ZodUnknown,...P(e)});class de extends R{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.never,received:t.parsedType}),k}}de.create=e=>new de({typeName:Ve.ZodNever,...P(e)});class ce extends R{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.void,received:t.parsedType}),k}return x(e.data)}}ce.create=e=>new ce({typeName:Ve.ZodVoid,...P(e)});class ue extends R{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==u.array)return g(t,{code:h.invalid_type,expected:u.array,received:t.parsedType}),k;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,n=t.data.length<s.exactLength.value;(e||n)&&(g(t,{code:e?h.too_big:h.too_small,minimum:n?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(g(t,{code:h.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(g(t,{code:h.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>s.type._parseAsync(new j(t,e,t.path,a))))).then((e=>v.mergeArray(a,e)));const n=[...t.data].map(((e,a)=>s.type._parseSync(new j(t,e,t.path,a))));return v.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function le(e){if(e instanceof he){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=Ae.create(le(s))}return new he({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:le(e.element)}):e instanceof Ae?Ae.create(le(e.unwrap())):e instanceof Ee?Ee.create(le(e.unwrap())):e instanceof ge?ge.create(e.items.map((e=>le(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...P(t)});class he extends R{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=d.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.object,received:t.parsedType}),k}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:n}=this._getCached(),r=[];if(!(this._def.catchall instanceof de&&"strip"===this._def.unknownKeys))for(const e in a.data)n.includes(e)||r.push(e);const i=[];for(const e of n){const t=s[e],n=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new j(a,n,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof de){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(g(a,{code:h.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const s=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new j(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key,s=await t.value;e.push({key:a,value:s,alwaysSet:t.alwaysSet})}return e})).then((e=>v.mergeObjectSync(t,e))):v.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new he({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=S.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new he({...this._def,unknownKeys:"strip"})}passthrough(){return new he({...this._def,unknownKeys:"passthrough"})}extend(e){return new he({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new he({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ve.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new he({...this._def,catchall:e})}pick(e){const t={};return d.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new he({...this._def,shape:()=>t})}omit(e){const t={};return d.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new he({...this._def,shape:()=>t})}deepPartial(){return le(this)}partial(e){const t={};return d.objectKeys(this.shape).forEach((a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()})),new he({...this._def,shape:()=>t})}required(e){const t={};return d.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Ae;)e=e._def.innerType;t[a]=e}})),new he({...this._def,shape:()=>t})}keyof(){return Te(d.objectKeys(this.shape))}}he.create=(e,t)=>new he({shape:()=>e,unknownKeys:"strip",catchall:de.create(),typeName:Ve.ZodObject,...P(t)}),he.strictCreate=(e,t)=>new he({shape:()=>e,unknownKeys:"strict",catchall:de.create(),typeName:Ve.ZodObject,...P(t)}),he.lazycreate=(e,t)=>new he({shape:e,unknownKeys:"strip",catchall:de.create(),typeName:Ve.ZodObject,...P(t)});class pe extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new p(e.ctx.common.issues)));return g(t,{code:h.invalid_union,unionErrors:a}),k}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new p(e)));return g(t,{code:h.invalid_union,unionErrors:n}),k}}get options(){return this._def.options}}pe.create=(e,t)=>new pe({options:e,typeName:Ve.ZodUnion,...P(t)});const me=e=>e instanceof we?me(e.schema):e instanceof Se?me(e.innerType()):e instanceof Ze?[e.value]:e instanceof Ce?e.options:e instanceof Ne?d.objectValues(e.enum):e instanceof je?me(e._def.innerType):e instanceof ne?[void 0]:e instanceof re?[null]:e instanceof Ae?[void 0,...me(e.unwrap())]:e instanceof Ee?[null,...me(e.unwrap())]:e instanceof Me||e instanceof De?me(e.unwrap()):e instanceof Ie?me(e._def.innerType):[];class fe extends R{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return g(t,{code:h.invalid_type,expected:u.object,received:t.parsedType}),k;const a=this.discriminator,s=t.data[a],n=this.optionsMap.get(s);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(g(t,{code:h.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),k)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=me(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new fe({typeName:Ve.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...P(a)})}}function ye(e,t){const a=l(e),s=l(t);if(e===t)return{valid:!0,data:e};if(a===u.object&&s===u.object){const a=d.objectKeys(t),s=d.objectKeys(e).filter((e=>-1!==a.indexOf(e))),n={...e,...t};for(const a of s){const s=ye(e[a],t[a]);if(!s.valid)return{valid:!1};n[a]=s.data}return{valid:!0,data:n}}if(a===u.array&&s===u.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const n=ye(e[s],t[s]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}return a===u.date&&s===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _e extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(w(e)||w(s))return k;const n=ye(e.value,s.value);return n.valid?((Z(e)||Z(s))&&t.dirty(),{status:t.value,value:n.data}):(g(a,{code:h.invalid_intersection_types}),k)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}_e.create=(e,t,a)=>new _e({left:e,right:t,typeName:Ve.ZodIntersection,...P(a)});class ge extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.array)return g(a,{code:h.invalid_type,expected:u.array,received:a.parsedType}),k;if(a.data.length<this._def.items.length)return g(a,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),k;!this._def.rest&&a.data.length>this._def.items.length&&(g(a,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new j(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(s).then((e=>v.mergeArray(t,e))):v.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ge({...this._def,rest:e})}}ge.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ge({items:e,typeName:Ve.ZodTuple,rest:null,...P(t)})};class ve extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.object)return g(a,{code:h.invalid_type,expected:u.object,received:a.parsedType}),k;const s=[],n=this._def.keyType,r=this._def.valueType;for(const e in a.data)s.push({key:n._parse(new j(a,e,a.path,e)),value:r._parse(new j(a,a.data[e],a.path,e)),alwaysSet:e in a.data});return a.common.async?v.mergeObjectAsync(t,s):v.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new ve(t instanceof R?{keyType:e,valueType:t,typeName:Ve.ZodRecord,...P(a)}:{keyType:J.create(),valueType:e,typeName:Ve.ZodRecord,...P(t)})}}class ke extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.map)return g(a,{code:h.invalid_type,expected:u.map,received:a.parsedType}),k;const s=this._def.keyType,n=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:s._parse(new j(a,e,a.path,[r,"key"])),value:n._parse(new j(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return k;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return k;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}ke.create=(e,t,a)=>new ke({valueType:t,keyType:e,typeName:Ve.ZodMap,...P(a)});class be extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.set)return g(a,{code:h.invalid_type,expected:u.set,received:a.parsedType}),k;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(g(a,{code:h.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(g(a,{code:h.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const n=this._def.valueType;function r(e){const a=new Set;for(const s of e){if("aborted"===s.status)return k;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>n._parse(new j(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new be({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new be({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}be.create=(e,t)=>new be({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...P(t)});class xe extends R{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return g(t,{code:h.invalid_type,expected:u.function,received:t.parsedType}),k;function a(e,a){return _({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),m].filter((e=>!!e)),issueData:{code:h.invalid_arguments,argumentsError:a}})}function s(e,a){return _({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),m].filter((e=>!!e)),issueData:{code:h.invalid_return_type,returnTypeError:a}})}const n={errorMap:t.common.contextualErrorMap},r=t.data;if(this._def.returns instanceof Oe){const e=this;return x((async function(...t){const i=new p([]),o=await e._def.args.parseAsync(t,n).catch((e=>{throw i.addIssue(a(t,e)),i})),d=await Reflect.apply(r,this,o);return await e._def.returns._def.type.parseAsync(d,n).catch((e=>{throw i.addIssue(s(d,e)),i}))}))}{const e=this;return x((function(...t){const i=e._def.args.safeParse(t,n);if(!i.success)throw new p([a(t,i.error)]);const o=Reflect.apply(r,this,i.data),d=e._def.returns.safeParse(o,n);if(!d.success)throw new p([s(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new xe({...this._def,args:ge.create(e).rest(oe.create())})}returns(e){return new xe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new xe({args:e||ge.create([]).rest(oe.create()),returns:t||oe.create(),typeName:Ve.ZodFunction,...P(a)})}}class we extends R{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}we.create=(e,t)=>new we({getter:e,typeName:Ve.ZodLazy,...P(t)});class Ze extends R{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),k}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Te(e,t){return new Ce({values:e,typeName:Ve.ZodEnum,...P(t)})}Ze.create=(e,t)=>new Ze({value:e,typeName:Ve.ZodLiteral,...P(t)});class Ce extends R{constructor(){super(...arguments),A.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{expected:d.joinValues(a),received:t.parsedType,code:h.invalid_type}),k}if(N(this,A)||O(this,A,new Set(this._def.values)),!N(this,A).has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{received:t.data,code:h.invalid_enum_value,options:a}),k}return x(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ce.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ce.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}A=new WeakMap,Ce.create=Te;class Ne extends R{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){const t=d.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==u.string&&a.parsedType!==u.number){const e=d.objectValues(t);return g(a,{expected:d.joinValues(e),received:a.parsedType,code:h.invalid_type}),k}if(N(this,E)||O(this,E,new Set(d.getValidEnumValues(this._def.values))),!N(this,E).has(e.data)){const e=d.objectValues(t);return g(a,{received:a.data,code:h.invalid_enum_value,options:e}),k}return x(e.data)}get enum(){return this._def.values}}E=new WeakMap,Ne.create=(e,t)=>new Ne({values:e,typeName:Ve.ZodNativeEnum,...P(t)});class Oe extends R{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&!1===t.common.async)return g(t,{code:h.invalid_type,expected:u.promise,received:t.parsedType}),k;const a=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return x(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Oe.create=(e,t)=>new Oe({type:e,typeName:Ve.ZodPromise,...P(t)});class Se extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,n={addIssue:e=>{g(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===s.type){const e=s.transform(a.data,n);if(a.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return k;const s=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===s.status?k:"dirty"===s.status||"dirty"===t.value?b(s.value):s}));{if("aborted"===t.value)return k;const s=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===s.status?k:"dirty"===s.status||"dirty"===t.value?b(s.value):s}}if("refinement"===s.type){const e=e=>{const t=s.refinement(e,n);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===s.status?k:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?k:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===s.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!T(e))return e;const r=s.transform(e.value,n);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>T(e)?Promise.resolve(s.transform(e.value,n)).then((e=>({status:t.value,value:e}))):e))}d.assertNever(s)}}Se.create=(e,t,a)=>new Se({schema:e,typeName:Ve.ZodEffects,effect:t,...P(a)}),Se.createWithPreprocess=(e,t,a)=>new Se({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...P(a)});class Ae extends R{_parse(e){return this._getType(e)===u.undefined?x(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ve.ZodOptional,...P(t)});class Ee extends R{_parse(e){return this._getType(e)===u.null?x(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ee.create=(e,t)=>new Ee({innerType:e,typeName:Ve.ZodNullable,...P(t)});class je extends R{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===u.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}je.create=(e,t)=>new je({innerType:e,typeName:Ve.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...P(t)});class Ie extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return C(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Ve.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...P(t)});class Pe extends R{_parse(e){if(this._getType(e)!==u.nan){const t=this._getOrReturnCtx(e);return g(t,{code:h.invalid_type,expected:u.nan,received:t.parsedType}),k}return{status:"valid",value:e.data}}}Pe.create=e=>new Pe({typeName:Ve.ZodNaN,...P(e)});const Re=Symbol("zod_brand");class Me extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class $e extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?k:"dirty"===e.status?(t.dirty(),b(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?k:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new $e({in:e,out:t,typeName:Ve.ZodPipeline})}}class De extends R{_parse(e){const t=this._def.innerType._parse(e),a=e=>(T(e)&&(e.value=Object.freeze(e.value)),e);return C(t)?t.then((e=>a(e))):a(t)}unwrap(){return this._def.innerType}}function Le(e,t={},a){return e?ie.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):ie.create()}De.create=(e,t)=>new De({innerType:e,typeName:Ve.ZodReadonly,...P(t)});const ze={object:he.lazycreate};var Ve;!function(e){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"}(Ve||(Ve={}));const Ue=J.create,Ke=X.create,Be=Pe.create,We=ee.create,Fe=te.create,qe=ae.create,He=se.create,Ye=ne.create,Ge=re.create,Je=ie.create,Qe=oe.create,Xe=de.create,et=ce.create,tt=ue.create,at=he.create,st=he.strictCreate,nt=pe.create,rt=fe.create,it=_e.create,ot=ge.create,dt=ve.create,ct=ke.create,ut=be.create,lt=xe.create,ht=we.create,pt=Ze.create,mt=Ce.create,ft=Ne.create,yt=Oe.create,_t=Se.create,gt=Ae.create,vt=Ee.create,kt=Se.createWithPreprocess,bt=$e.create,xt={string:e=>J.create({...e,coerce:!0}),number:e=>X.create({...e,coerce:!0}),boolean:e=>te.create({...e,coerce:!0}),bigint:e=>ee.create({...e,coerce:!0}),date:e=>ae.create({...e,coerce:!0})},wt=k;var Zt=Object.freeze({__proto__:null,defaultErrorMap:m,setErrorMap:function(e){f=e},getErrorMap:y,makeIssue:_,EMPTY_PATH:[],addIssueToContext:g,ParseStatus:v,INVALID:k,DIRTY:b,OK:x,isAborted:w,isDirty:Z,isValid:T,isAsync:C,get util(){return d},get objectUtil(){return c},ZodParsedType:u,getParsedType:l,ZodType:R,datetimeRegex:G,ZodString:J,ZodNumber:X,ZodBigInt:ee,ZodBoolean:te,ZodDate:ae,ZodSymbol:se,ZodUndefined:ne,ZodNull:re,ZodAny:ie,ZodUnknown:oe,ZodNever:de,ZodVoid:ce,ZodArray:ue,ZodObject:he,ZodUnion:pe,ZodDiscriminatedUnion:fe,ZodIntersection:_e,ZodTuple:ge,ZodRecord:ve,ZodMap:ke,ZodSet:be,ZodFunction:xe,ZodLazy:we,ZodLiteral:Ze,ZodEnum:Ce,ZodNativeEnum:Ne,ZodPromise:Oe,ZodEffects:Se,ZodTransformer:Se,ZodOptional:Ae,ZodNullable:Ee,ZodDefault:je,ZodCatch:Ie,ZodNaN:Pe,BRAND:Re,ZodBranded:Me,ZodPipeline:$e,ZodReadonly:De,custom:Le,Schema:R,ZodSchema:R,late:ze,get ZodFirstPartyTypeKind(){return Ve},coerce:xt,any:Je,array:tt,bigint:We,boolean:Fe,date:qe,discriminatedUnion:rt,effect:_t,enum:mt,function:lt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Le((t=>t instanceof e),t),intersection:it,lazy:ht,literal:pt,map:ct,nan:Be,nativeEnum:ft,never:Xe,null:Ge,nullable:vt,number:Ke,object:at,oboolean:()=>Fe().optional(),onumber:()=>Ke().optional(),optional:gt,ostring:()=>Ue().optional(),pipeline:bt,preprocess:kt,promise:yt,record:dt,set:ut,strictObject:st,string:Ue,symbol:He,transformer:_t,tuple:ot,undefined:Ye,union:nt,unknown:Qe,void:et,NEVER:wt,ZodIssueCode:h,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:p});const Tt={email:(e,t=null)=>{const a=!(!t||!t.checkTypeos)&&t.checkTypeos;let s=/^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,63}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9.-]{0,250}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/.test(e);if(s&&a){const t=e.split("@")[1].toLowerCase();s=!i.includes(t)}return s},emailHasTrustedDomain:(e,t=null)=>{const a=e&&e.toLowerCase().split("@");if(a&&2===a.length){const e=a[1];return o.includes(e)}return!1},phoneNumber:(e,t=null)=>{const a=/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/;if(e){const t=String(e).replace(/[^0-9]/g,"");return a.test(t)}return!1},postalCode:(e,t=null)=>{const a={"en-us":/^\d{5}$/,"en-ca":/^[a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d$/}[t&&t.countryCode?t.countryCode.toLowerCase():"en-us"];return!!a&&a.test(e)},stateProvinceCode:(e,t=null)=>{const a=t&&t.countryCode?t.countryCode.toLowerCase():"en-us",s=((e,t=null)=>{const a=t?t.toLowerCase():"en-us",s=r[a];return!!s&&s.administrativeAreas[e]})(e.toUpperCase(),a);return!!s},currencyValue:(e,t=null)=>{const a=t&&t.countryCode?t.countryCode.toLowerCase():"en-us",s=r[a].currency.reduce(((e,t)=>e.replace(t,"")),e).replace(" ",""),n=/\d+\.+\d+/;return!/[^.^\d]+/.test(s)&&n.test(s)}},Ct={passwordStrength:(e,t=null)=>function(e){const t=s(e),r=n(t);return{strength:r,label:a[r]}}(e),emailCheck:(e,t=null)=>({isValid:Tt.email(e,{checkTypeos:!0}),isTrusted:Tt.emailHasTrustedDomain(e)}),ageGate:(e,t=null)=>((e,t,a=null)=>{const s=Zt.enum(["yesno","dob"]),n=Zt.coerce.date();a=a||21;let r=null;try{r=s.parse(e.toLowerCase())}catch{return{}}let i=!1,{success:o,data:d}=n.safeParse(t);switch(r){case"yesno":i=!!t,d=null;break;case"dob":if(o){const e=new Date,t=new Date(d.getFullYear()+a,d.getMonth(),d.getDate());i=!!t&&t<=e}}return{ageGateType:r,ageGatePassed:i,ageGateDOB:d||null}})(t.ageGateType||"dob",e,t.legalAge)};return e.Checkers=Ct,e.Validators=Tt,e}({});
|
package/dist/bundle.mjs
CHANGED
|
@@ -4437,7 +4437,7 @@ const ageGate = (ageGateType, ageGateValue, legalAge = null) => {
|
|
|
4437
4437
|
const Validators = {
|
|
4438
4438
|
email: (value, options = null) => {
|
|
4439
4439
|
const checkTypeoList = (options && options.checkTypeos) ? options.checkTypeos : false;
|
|
4440
|
-
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,
|
|
4440
|
+
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,63}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9.-]{0,250}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/;
|
|
4441
4441
|
let isValid = emailRegex.test(value);
|
|
4442
4442
|
if (isValid && checkTypeoList) {
|
|
4443
4443
|
const emailDomain = value.split('@')[1].toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thirstie/thirstievalidators",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "A collection of data validators used by Thirstiejs modules",
|
|
5
5
|
"author": "Thirstie, Inc. <technology@thirstie.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"testEnvironment": "jsdom",
|
|
34
34
|
"transform": {}
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "ed7fb11b877996c6cdf3969f5f457c4694fef162"
|
|
37
37
|
}
|
package/src/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ageGate } from './agegate';
|
|
|
8
8
|
const Validators = {
|
|
9
9
|
email: (value, options = null) => {
|
|
10
10
|
const checkTypeoList = (options && options.checkTypeos) ? options.checkTypeos : false;
|
|
11
|
-
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,
|
|
11
|
+
const emailRegex = /^(?![.!#$%&'*+/=?^_`{|}~-])(?!.*\.{2})[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,63}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9.-]{0,250}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/;
|
|
12
12
|
let isValid = emailRegex.test(value);
|
|
13
13
|
if (isValid && checkTypeoList) {
|
|
14
14
|
const emailDomain = value.split('@')[1].toLowerCase();
|
|
@@ -10,11 +10,123 @@ describe('email validation', () => {
|
|
|
10
10
|
const fixtures = [
|
|
11
11
|
'localpart@domainname.tld',
|
|
12
12
|
'localpart+other@domainname.faketld',
|
|
13
|
-
'first.last@example.com'
|
|
13
|
+
'first.last@example.com',
|
|
14
|
+
'first.last@test-email.com',
|
|
15
|
+
'first.last@test.uk.co',
|
|
16
|
+
'firstpart@comcast.net',
|
|
17
|
+
'firstpart@sbcglobal.net',
|
|
18
|
+
'firstpart@att.net',
|
|
19
|
+
'firstpart@verizon.net',
|
|
20
|
+
'firstpart@optonline.net',
|
|
21
|
+
'firstpart@cox.net',
|
|
22
|
+
'firstpart@bellsouth.net',
|
|
23
|
+
'firstpart@charter.net',
|
|
24
|
+
'firstpart@gmail.con',
|
|
25
|
+
'firstpart@earthlink.net',
|
|
26
|
+
'firstpart@yahoo.con',
|
|
27
|
+
'firstpart@pacbell.net',
|
|
28
|
+
'firstpart@thebeerguy.ca',
|
|
29
|
+
'firstpart@nyu.edu',
|
|
30
|
+
'firstpart@gmail.co',
|
|
31
|
+
'firstpart@netscape.net',
|
|
32
|
+
'firstpart@yahoo.ca',
|
|
33
|
+
'firstpart@umn.edu',
|
|
34
|
+
'firstpart@prodigy.net',
|
|
35
|
+
'firstpart@frontiernet.net',
|
|
36
|
+
'firstpart@ameritech.net',
|
|
37
|
+
'firstpart@umich.edu',
|
|
38
|
+
'firstpart@live.ca',
|
|
39
|
+
'firstpart@cornell.edu',
|
|
40
|
+
'firstpart@ptd.net',
|
|
41
|
+
'firstpart@centurylink.net',
|
|
42
|
+
'firstpart@suddenlink.net',
|
|
43
|
+
'firstpart@swbell.net',
|
|
44
|
+
'firstpart@yahoo.co.uk',
|
|
45
|
+
'firstpart@hotmail.co.uk',
|
|
46
|
+
'firstpart@optimum.net',
|
|
47
|
+
'firstpart@netzero.net',
|
|
48
|
+
'firstpart@fiu.edu',
|
|
49
|
+
'firstpart@hotmail.con',
|
|
50
|
+
'firstpart@zoominternet.net',
|
|
51
|
+
'firstpart@windstream.net',
|
|
52
|
+
'firstpart@aol.con',
|
|
53
|
+
'firstpart@vt.edu',
|
|
54
|
+
'firstpart@yahoo.es',
|
|
55
|
+
'firstpart@mail.ru',
|
|
56
|
+
'firstpart@ucdavis.edu',
|
|
57
|
+
'firstpart@mail.usf.edu',
|
|
58
|
+
'firstpart@sonic.net',
|
|
59
|
+
'firstpart@berkeley.edu',
|
|
60
|
+
'firstpart@asu.edu',
|
|
61
|
+
'firstpart@mbox.re',
|
|
62
|
+
'firstpart@snet.net',
|
|
63
|
+
'firstpart@hotmail.ca',
|
|
64
|
+
'firstpart@columbia.edu',
|
|
65
|
+
'firstpart@usc.edu',
|
|
66
|
+
'firstpart@bu.edu',
|
|
67
|
+
'firstpart@buffalo.edu',
|
|
68
|
+
'firstpart@tds.net',
|
|
69
|
+
'firstpart@colorado.edu',
|
|
70
|
+
'firstpart@syr.edu',
|
|
71
|
+
'firstpart@usa.net',
|
|
72
|
+
'firstpart@yahoo.fr',
|
|
73
|
+
'firstpart@pm.me',
|
|
74
|
+
'firstpart@alumni.nd.edu',
|
|
75
|
+
'firstpart@utexas.edu',
|
|
76
|
+
'firstpart@virginia.edu',
|
|
77
|
+
'firstpart@aol.co',
|
|
78
|
+
'firstpart@miami.edu',
|
|
79
|
+
'firstpart@shaw.ca',
|
|
80
|
+
'firstpart@cableone.net',
|
|
81
|
+
'firstpart@centurytel.net',
|
|
82
|
+
'firstpart@fourpillarsgin.com.au',
|
|
83
|
+
'firstpart@fordham.edu',
|
|
84
|
+
'firstpart@wustl.edu',
|
|
85
|
+
'firstpart@luc.edu',
|
|
86
|
+
'firstpart@gmail.cm',
|
|
87
|
+
'firstpart@coasters.co',
|
|
88
|
+
'firstpart@sympatico.ca',
|
|
89
|
+
'firstpart@hotmail.fr',
|
|
90
|
+
'firstpart@ufl.edu',
|
|
91
|
+
'firstpart@email.arizona.edu',
|
|
92
|
+
'firstpart@sandiego.edu',
|
|
93
|
+
'firstpart@hotmail.es',
|
|
94
|
+
'firstpart@yahoo.co',
|
|
95
|
+
'firstpart@atlanticbb.net',
|
|
96
|
+
'firstpart@gmail.clm',
|
|
97
|
+
'firstpart@ncsu.edu',
|
|
98
|
+
'firstpart@illinois.edu',
|
|
99
|
+
'firstpart@icloud.con',
|
|
100
|
+
'firstpart@miamioh.edu',
|
|
101
|
+
'firstpart@gmail.vom',
|
|
102
|
+
'firstpart@colgate.edu',
|
|
103
|
+
'firstpart@surewest.net',
|
|
104
|
+
'firstpart@smu.edu',
|
|
105
|
+
'firstpart@my.fsu.edu',
|
|
106
|
+
'firstpart@mediacombb.net',
|
|
107
|
+
'firstpart@ucla.edu',
|
|
108
|
+
'firstpart@proton.me',
|
|
109
|
+
'firstpart@uci.edu',
|
|
110
|
+
'firstpart@loop.colum.edu',
|
|
111
|
+
'firstpart@bell.net',
|
|
112
|
+
'firstpart@gmail.cim',
|
|
113
|
+
'firstpart@georgetown.edu',
|
|
114
|
+
'firstpart@u.northwestern.edu',
|
|
115
|
+
'firstpart@bresnan.net',
|
|
116
|
+
'firstpart@example.uk.co',
|
|
117
|
+
'firstpart@example.net',
|
|
118
|
+
'firstpart@example.org',
|
|
119
|
+
'firstpart@example.io',
|
|
120
|
+
'first#part@example.uk.co',
|
|
121
|
+
'first~part@example.uk.co'
|
|
14
122
|
];
|
|
15
123
|
fixtures.forEach((fixture) => {
|
|
16
124
|
const validationCheck = Validators.email(fixture);
|
|
17
|
-
|
|
125
|
+
try {
|
|
126
|
+
expect(validationCheck).toBe(true);
|
|
127
|
+
} catch {
|
|
128
|
+
console.error(`email validation fail on ${fixture}: should be valid`);
|
|
129
|
+
}
|
|
18
130
|
});
|
|
19
131
|
});
|
|
20
132
|
|
|
@@ -22,7 +134,16 @@ describe('email validation', () => {
|
|
|
22
134
|
const fixtures = [
|
|
23
135
|
'localpart@domainname',
|
|
24
136
|
'first.läst.unicode@domainname.faketld',
|
|
25
|
-
'first.last@example.c'
|
|
137
|
+
'first.last@example.c',
|
|
138
|
+
'first.last@-example.com',
|
|
139
|
+
'first.last@example-.com',
|
|
140
|
+
'#firstpart@example.uk.co',
|
|
141
|
+
'.firstpart@example.uk.co',
|
|
142
|
+
'firstpart.@example.uk.co',
|
|
143
|
+
'firstpart#@example.uk.co',
|
|
144
|
+
'~firstpart@example.uk.co',
|
|
145
|
+
'firstpart@.uk.co',
|
|
146
|
+
'firstpart@.com'
|
|
26
147
|
];
|
|
27
148
|
fixtures.forEach((fixture) => {
|
|
28
149
|
const validationCheck = Validators.email(fixture);
|