intlayer-editor 7.5.0-canary.0 → 7.5.0-canary.1
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/client/dist/assets/{CodeBlockShiki-75Nt4Gwt.js → CodeBlockShiki-BZrNB-hp.js} +3 -3
- package/client/dist/assets/{bundle-web-BBNmn0_H.js → bundle-web-XVNhfIcT.js} +1 -1
- package/client/dist/assets/{index-Br4JAuU5.js → index-BCw8xSvk.js} +815 -692
- package/client/dist/assets/{index-BzVHXaHc.css → index-C9tdC4Xg.css} +187 -20
- package/client/dist/index.html +2 -2
- package/package.json +23 -23
- package/server/dist/controllers/configuration.controller.cjs +1 -1
- package/server/dist/controllers/configuration.controller.d.ts +1 -1
- package/server/dist/controllers/configuration.controller.mjs +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +1 -1
- package/server/dist/controllers/dictionary.controller.d.ts +1 -1
- package/server/dist/controllers/dictionary.controller.mjs +1 -1
- package/server/dist/index.cjs +1 -1
- package/server/dist/index.mjs +1 -1
- package/server/dist/routes/config.routes.cjs +1 -1
- package/server/dist/routes/config.routes.d.ts +1 -1
- package/server/dist/routes/config.routes.mjs +1 -1
- package/server/dist/routes/dictionary.routes.cjs +1 -1
- package/server/dist/routes/dictionary.routes.d.ts +1 -1
- package/server/dist/routes/dictionary.routes.mjs +1 -1
- package/server/dist/types/Routes.d.ts +1 -1
- package/server/dist/utils/checkPortAvailability.cjs +1 -1
- package/server/dist/utils/checkPortAvailability.d.ts +1 -1
- package/server/dist/utils/checkPortAvailability.mjs +1 -1
- package/server/dist/utils/httpStatusCodes.cjs +1 -1
- package/server/dist/utils/httpStatusCodes.d.ts +1 -1
- package/server/dist/utils/httpStatusCodes.mjs +1 -1
- package/server/dist/utils/responseData.cjs +1 -1
- package/server/dist/utils/responseData.d.ts +1 -1
- package/server/dist/utils/responseData.mjs +1 -1
|
@@ -55,7 +55,7 @@ var hasRequiredReactJsxRuntime_production;
|
|
|
55
55
|
function requireReactJsxRuntime_production() {
|
|
56
56
|
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
57
57
|
hasRequiredReactJsxRuntime_production = 1;
|
|
58
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
58
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
59
59
|
function jsxProd(type, config2, maybeKey) {
|
|
60
60
|
var key2 = null;
|
|
61
61
|
void 0 !== maybeKey && (key2 = "" + maybeKey);
|
|
@@ -95,7 +95,7 @@ var hasRequiredReact_production;
|
|
|
95
95
|
function requireReact_production() {
|
|
96
96
|
if (hasRequiredReact_production) return react_production;
|
|
97
97
|
hasRequiredReact_production = 1;
|
|
98
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE2 = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
98
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE2 = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
99
99
|
function getIteratorFn(maybeIterable) {
|
|
100
100
|
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
101
101
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
@@ -512,7 +512,7 @@ function requireReact_production() {
|
|
|
512
512
|
react_production.useTransition = function() {
|
|
513
513
|
return ReactSharedInternals.H.useTransition();
|
|
514
514
|
};
|
|
515
|
-
react_production.version = "19.2.
|
|
515
|
+
react_production.version = "19.2.3";
|
|
516
516
|
return react_production;
|
|
517
517
|
}
|
|
518
518
|
var hasRequiredReact;
|
|
@@ -832,7 +832,7 @@ function requireReactDom_production() {
|
|
|
832
832
|
},
|
|
833
833
|
p: 0,
|
|
834
834
|
findDOMNode: null
|
|
835
|
-
}, REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
835
|
+
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
836
836
|
function createPortal$1(children, containerInfo, implementation) {
|
|
837
837
|
var key2 = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
838
838
|
return {
|
|
@@ -944,7 +944,7 @@ function requireReactDom_production() {
|
|
|
944
944
|
reactDom_production.useFormStatus = function() {
|
|
945
945
|
return ReactSharedInternals.H.useHostTransitionStatus();
|
|
946
946
|
};
|
|
947
|
-
reactDom_production.version = "19.2.
|
|
947
|
+
reactDom_production.version = "19.2.3";
|
|
948
948
|
return reactDom_production;
|
|
949
949
|
}
|
|
950
950
|
var hasRequiredReactDom;
|
|
@@ -1093,16 +1093,16 @@ function requireReactDomClient_production() {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
return null;
|
|
1095
1095
|
}
|
|
1096
|
-
var assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE2 = Symbol.for("react.lazy");
|
|
1097
|
-
var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
|
|
1098
|
-
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
|
|
1096
|
+
var assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE2 = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
1097
|
+
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
1098
|
+
var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
|
|
1099
1099
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
1100
1100
|
function getIteratorFn(maybeIterable) {
|
|
1101
1101
|
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
1102
1102
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
1103
1103
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
1104
1104
|
}
|
|
1105
|
-
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
|
1105
|
+
var REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
1106
1106
|
function getComponentNameFromType(type) {
|
|
1107
1107
|
if (null == type) return null;
|
|
1108
1108
|
if ("function" === typeof type)
|
|
@@ -12388,12 +12388,12 @@ function requireReactDomClient_production() {
|
|
|
12388
12388
|
}
|
|
12389
12389
|
};
|
|
12390
12390
|
var isomorphicReactPackageVersion$jscomp$inline_1840 = React2.version;
|
|
12391
|
-
if ("19.2.
|
|
12391
|
+
if ("19.2.3" !== isomorphicReactPackageVersion$jscomp$inline_1840)
|
|
12392
12392
|
throw Error(
|
|
12393
12393
|
formatProdErrorMessage(
|
|
12394
12394
|
527,
|
|
12395
12395
|
isomorphicReactPackageVersion$jscomp$inline_1840,
|
|
12396
|
-
"19.2.
|
|
12396
|
+
"19.2.3"
|
|
12397
12397
|
)
|
|
12398
12398
|
);
|
|
12399
12399
|
ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
|
|
@@ -12411,10 +12411,10 @@ function requireReactDomClient_production() {
|
|
|
12411
12411
|
};
|
|
12412
12412
|
var internals$jscomp$inline_2347 = {
|
|
12413
12413
|
bundleType: 0,
|
|
12414
|
-
version: "19.2.
|
|
12414
|
+
version: "19.2.3",
|
|
12415
12415
|
rendererPackageName: "react-dom",
|
|
12416
12416
|
currentDispatcherRef: ReactSharedInternals,
|
|
12417
|
-
reconcilerVersion: "19.2.
|
|
12417
|
+
reconcilerVersion: "19.2.3"
|
|
12418
12418
|
};
|
|
12419
12419
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
12420
12420
|
var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -12481,7 +12481,7 @@ function requireReactDomClient_production() {
|
|
|
12481
12481
|
listenToAllSupportedEvents(container);
|
|
12482
12482
|
return new ReactDOMHydrationRoot(initialChildren);
|
|
12483
12483
|
};
|
|
12484
|
-
reactDomClient_production.version = "19.2.
|
|
12484
|
+
reactDomClient_production.version = "19.2.3";
|
|
12485
12485
|
return reactDomClient_production;
|
|
12486
12486
|
}
|
|
12487
12487
|
var hasRequiredClient;
|
|
@@ -12583,12 +12583,14 @@ var __export$1 = (all, symbols) => {
|
|
|
12583
12583
|
return target;
|
|
12584
12584
|
};
|
|
12585
12585
|
var build_exports = /* @__PURE__ */ __export$1({
|
|
12586
|
+
BUILD_MODE: () => BUILD_MODE,
|
|
12586
12587
|
CACHE: () => CACHE,
|
|
12587
12588
|
IMPORT_MODE: () => IMPORT_MODE,
|
|
12588
12589
|
OPTIMIZE: () => OPTIMIZE,
|
|
12589
12590
|
OUTPUT_FORMAT: () => OUTPUT_FORMAT,
|
|
12590
12591
|
TRAVERSE_PATTERN: () => TRAVERSE_PATTERN
|
|
12591
12592
|
});
|
|
12593
|
+
const BUILD_MODE = "auto";
|
|
12592
12594
|
const OPTIMIZE = void 0;
|
|
12593
12595
|
const IMPORT_MODE = "static";
|
|
12594
12596
|
const TRAVERSE_PATTERN = ["**/*.{tsx,ts,js,mjs,cjs,jsx,mjx,cjx,vue,svelte,svte}", "!**/node_modules/**"];
|
|
@@ -12821,6 +12823,8 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12821
12823
|
ICELANDIC_ICELAND: () => ICELANDIC_ICELAND,
|
|
12822
12824
|
INDONESIAN: () => INDONESIAN,
|
|
12823
12825
|
INDONESIAN_INDONESIA: () => INDONESIAN_INDONESIA,
|
|
12826
|
+
IRISH: () => IRISH,
|
|
12827
|
+
IRISH_IRELAND: () => IRISH_IRELAND,
|
|
12824
12828
|
ITALIAN: () => ITALIAN,
|
|
12825
12829
|
ITALIAN_ITALY: () => ITALIAN_ITALY,
|
|
12826
12830
|
ITALIAN_SWITZERLAND: () => ITALIAN_SWITZERLAND,
|
|
@@ -12836,6 +12840,8 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12836
12840
|
KONKANI_INDIA: () => KONKANI_INDIA,
|
|
12837
12841
|
KOREAN: () => KOREAN,
|
|
12838
12842
|
KOREAN_KOREA: () => KOREAN_KOREA,
|
|
12843
|
+
KURDISH: () => KURDISH,
|
|
12844
|
+
KURDISH_TURKEY: () => KURDISH_TURKEY,
|
|
12839
12845
|
KYRGYZ: () => KYRGYZ,
|
|
12840
12846
|
KYRGYZ_KYRGYZSTAN: () => KYRGYZ_KYRGYZSTAN,
|
|
12841
12847
|
LAO: () => LAO,
|
|
@@ -12844,7 +12850,11 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12844
12850
|
LATVIAN_LATVIA: () => LATVIAN_LATVIA,
|
|
12845
12851
|
LITHUANIAN: () => LITHUANIAN,
|
|
12846
12852
|
LITHUANIAN_LITHUANIA: () => LITHUANIAN_LITHUANIA,
|
|
12853
|
+
LOWER_SORBIAN: () => LOWER_SORBIAN,
|
|
12854
|
+
LOWER_SORBIAN_GERMANY: () => LOWER_SORBIAN_GERMANY,
|
|
12847
12855
|
MALAY: () => MALAY,
|
|
12856
|
+
MALAYALAM: () => MALAYALAM,
|
|
12857
|
+
MALAYALAM_INDIA: () => MALAYALAM_INDIA,
|
|
12848
12858
|
MALAY_BRUNEI_DARUSSALAM: () => MALAY_BRUNEI_DARUSSALAM,
|
|
12849
12859
|
MALAY_MALAYSIA: () => MALAY_MALAYSIA,
|
|
12850
12860
|
MALTESE: () => MALTESE,
|
|
@@ -12859,8 +12869,10 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12859
12869
|
NEPALI_NEPAL: () => NEPALI_NEPAL,
|
|
12860
12870
|
NORTHERN_SOTHO: () => NORTHERN_SOTHO,
|
|
12861
12871
|
NORTHERN_SOTHO_SOUTH_AFRICA: () => NORTHERN_SOTHO_SOUTH_AFRICA,
|
|
12872
|
+
NORWEGIAN: () => NORWEGIAN,
|
|
12862
12873
|
NORWEGIAN_BOKMAL: () => NORWEGIAN_BOKMAL,
|
|
12863
12874
|
NORWEGIAN_BOKMAL_NORWAY: () => NORWEGIAN_BOKMAL_NORWAY,
|
|
12875
|
+
NORWEGIAN_NYNORSK: () => NORWEGIAN_NYNORSK,
|
|
12864
12876
|
NORWEGIAN_NYNORSK_NORWAY: () => NORWEGIAN_NYNORSK_NORWAY,
|
|
12865
12877
|
PASHTO: () => PASHTO,
|
|
12866
12878
|
PASHTO_AFGHANISTAN: () => PASHTO_AFGHANISTAN,
|
|
@@ -12882,8 +12894,12 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12882
12894
|
QUECHUA_ECUADOR: () => QUECHUA_ECUADOR,
|
|
12883
12895
|
QUECHUA_PERU: () => QUECHUA_PERU,
|
|
12884
12896
|
ROMANIAN: () => ROMANIAN,
|
|
12897
|
+
ROMANIAN_MOLDOVA: () => ROMANIAN_MOLDOVA,
|
|
12885
12898
|
ROMANIAN_ROMANIA: () => ROMANIAN_ROMANIA,
|
|
12899
|
+
ROMANSH: () => ROMANSH,
|
|
12900
|
+
ROMANSH_SWITZERLAND: () => ROMANSH_SWITZERLAND,
|
|
12886
12901
|
RUSSIAN: () => RUSSIAN,
|
|
12902
|
+
RUSSIAN_MOLDOVA: () => RUSSIAN_MOLDOVA,
|
|
12887
12903
|
RUSSIAN_RUSSIA: () => RUSSIAN_RUSSIA,
|
|
12888
12904
|
SAMI_NORTHERN: () => SAMI_NORTHERN,
|
|
12889
12905
|
SAMI_NORTHERN_FINLAND: () => SAMI_NORTHERN_FINLAND,
|
|
@@ -12891,6 +12907,8 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12891
12907
|
SAMI_NORTHERN_SWEDEN: () => SAMI_NORTHERN_SWEDEN,
|
|
12892
12908
|
SANSKRIT: () => SANSKRIT,
|
|
12893
12909
|
SANSKRIT_INDIA: () => SANSKRIT_INDIA,
|
|
12910
|
+
SCOTTISH_GAELIC: () => SCOTTISH_GAELIC,
|
|
12911
|
+
SCOTTISH_GAELIC_UNITED_KINGDOM: () => SCOTTISH_GAELIC_UNITED_KINGDOM,
|
|
12894
12912
|
SERBIAN_CYRILLIC: () => SERBIAN_CYRILLIC,
|
|
12895
12913
|
SERBIAN_CYRILLIC_BOSNIA_AND_HERZEGOVINA: () => SERBIAN_CYRILLIC_BOSNIA_AND_HERZEGOVINA,
|
|
12896
12914
|
SERBIAN_CYRILLIC_SERBIA: () => SERBIAN_CYRILLIC_SERBIA,
|
|
@@ -12949,16 +12967,22 @@ var locales_exports = /* @__PURE__ */ __export({
|
|
|
12949
12967
|
TURKISH_TURKEY: () => TURKISH_TURKEY,
|
|
12950
12968
|
UKRAINIAN: () => UKRAINIAN,
|
|
12951
12969
|
UKRAINIAN_UKRAINE: () => UKRAINIAN_UKRAINE,
|
|
12970
|
+
UPPER_SORBIAN: () => UPPER_SORBIAN,
|
|
12971
|
+
UPPER_SORBIAN_GERMANY: () => UPPER_SORBIAN_GERMANY,
|
|
12952
12972
|
URDU: () => URDU,
|
|
12953
12973
|
URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN: () => URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN,
|
|
12954
12974
|
UZBEK_LATIN: () => UZBEK_LATIN,
|
|
12955
12975
|
UZBEK_LATIN_UZBEKISTAN: () => UZBEK_LATIN_UZBEKISTAN,
|
|
12976
|
+
VENDA: () => VENDA,
|
|
12977
|
+
VENDA_SOUTH_AFRICA: () => VENDA_SOUTH_AFRICA,
|
|
12956
12978
|
VIETNAMESE: () => VIETNAMESE,
|
|
12957
12979
|
VIETNAMESE_VIET_NAM: () => VIETNAMESE_VIET_NAM,
|
|
12958
12980
|
WELSH: () => WELSH,
|
|
12959
12981
|
WELSH_UNITED_KINGDOM: () => WELSH_UNITED_KINGDOM,
|
|
12960
12982
|
XHOSA: () => XHOSA,
|
|
12961
12983
|
XHOSA_SOUTH_AFRICA: () => XHOSA_SOUTH_AFRICA,
|
|
12984
|
+
YIDDISH: () => YIDDISH,
|
|
12985
|
+
YIDDISH_WORLD: () => YIDDISH_WORLD,
|
|
12962
12986
|
YORUBA: () => YORUBA,
|
|
12963
12987
|
YORUBA_NIGERIA: () => YORUBA_NIGERIA,
|
|
12964
12988
|
ZULU: () => ZULU,
|
|
@@ -13061,6 +13085,10 @@ const FRENCH_SWITZERLAND = "fr-CH";
|
|
|
13061
13085
|
const FRENCH_FRANCE = "fr-FR";
|
|
13062
13086
|
const FRENCH_LUXEMBOURG = "fr-LU";
|
|
13063
13087
|
const FRENCH_PRINCIPALITY_OF_MONACO = "fr-MC";
|
|
13088
|
+
const IRISH = "ga";
|
|
13089
|
+
const IRISH_IRELAND = "ga-IE";
|
|
13090
|
+
const SCOTTISH_GAELIC = "gd";
|
|
13091
|
+
const SCOTTISH_GAELIC_UNITED_KINGDOM = "gd-GB";
|
|
13064
13092
|
const GALICIAN = "gl";
|
|
13065
13093
|
const GALICIAN_SPAIN = "gl-ES";
|
|
13066
13094
|
const GUJARATI = "gu";
|
|
@@ -13095,6 +13123,8 @@ const KOREAN = "ko";
|
|
|
13095
13123
|
const KOREAN_KOREA = "ko-KR";
|
|
13096
13124
|
const KONKANI = "kok";
|
|
13097
13125
|
const KONKANI_INDIA = "kok-IN";
|
|
13126
|
+
const KURDISH = "ku";
|
|
13127
|
+
const KURDISH_TURKEY = "ku-TR";
|
|
13098
13128
|
const KYRGYZ = "ky";
|
|
13099
13129
|
const KYRGYZ_KYRGYZSTAN = "ky-KG";
|
|
13100
13130
|
const LITHUANIAN = "lt";
|
|
@@ -13114,11 +13144,15 @@ const MALAY_BRUNEI_DARUSSALAM = "ms-BN";
|
|
|
13114
13144
|
const MALAY_MALAYSIA = "ms-MY";
|
|
13115
13145
|
const MALTESE = "mt";
|
|
13116
13146
|
const MALTESE_MALTA = "mt-MT";
|
|
13147
|
+
const MALAYALAM = "ml";
|
|
13148
|
+
const MALAYALAM_INDIA = "ml-IN";
|
|
13149
|
+
const NORWEGIAN = "no";
|
|
13117
13150
|
const NORWEGIAN_BOKMAL = "nb";
|
|
13118
13151
|
const NORWEGIAN_BOKMAL_NORWAY = "nb-NO";
|
|
13119
13152
|
const DUTCH = "nl";
|
|
13120
13153
|
const DUTCH_BELGIUM = "nl-BE";
|
|
13121
13154
|
const DUTCH_NETHERLANDS = "nl-NL";
|
|
13155
|
+
const NORWEGIAN_NYNORSK = "nn";
|
|
13122
13156
|
const NORWEGIAN_NYNORSK_NORWAY = "nn-NO";
|
|
13123
13157
|
const NORTHERN_SOTHO = "ns";
|
|
13124
13158
|
const NORTHERN_SOTHO_SOUTH_AFRICA = "ns-ZA";
|
|
@@ -13137,14 +13171,22 @@ const QUECHUA_ECUADOR = "qu-EC";
|
|
|
13137
13171
|
const QUECHUA_PERU = "qu-PE";
|
|
13138
13172
|
const ROMANIAN = "ro";
|
|
13139
13173
|
const ROMANIAN_ROMANIA = "ro-RO";
|
|
13174
|
+
const ROMANIAN_MOLDOVA = "ro-MD";
|
|
13175
|
+
const ROMANSH = "rm";
|
|
13176
|
+
const ROMANSH_SWITZERLAND = "rm-CH";
|
|
13140
13177
|
const RUSSIAN = "ru";
|
|
13141
13178
|
const RUSSIAN_RUSSIA = "ru-RU";
|
|
13179
|
+
const RUSSIAN_MOLDOVA = "ru-MD";
|
|
13142
13180
|
const SANSKRIT = "sa";
|
|
13143
13181
|
const SANSKRIT_INDIA = "sa-IN";
|
|
13144
13182
|
const SAMI_NORTHERN = "se";
|
|
13145
13183
|
const SAMI_NORTHERN_FINLAND = "se-FI";
|
|
13146
13184
|
const SAMI_NORTHERN_NORWAY = "se-NO";
|
|
13147
13185
|
const SAMI_NORTHERN_SWEDEN = "se-SE";
|
|
13186
|
+
const UPPER_SORBIAN = "hsb";
|
|
13187
|
+
const UPPER_SORBIAN_GERMANY = "hsb-DE";
|
|
13188
|
+
const LOWER_SORBIAN = "dsb";
|
|
13189
|
+
const LOWER_SORBIAN_GERMANY = "dsb-DE";
|
|
13148
13190
|
const SLOVAK = "sk";
|
|
13149
13191
|
const SLOVAK_SLOVAKIA = "sk-SK";
|
|
13150
13192
|
const SLOVENIAN = "sl";
|
|
@@ -13184,6 +13226,8 @@ const UZBEK_LATIN = "uz";
|
|
|
13184
13226
|
const UZBEK_LATIN_UZBEKISTAN = "uz-UZ";
|
|
13185
13227
|
const VIETNAMESE = "vi";
|
|
13186
13228
|
const VIETNAMESE_VIET_NAM = "vi-VN";
|
|
13229
|
+
const VENDA = "ve";
|
|
13230
|
+
const VENDA_SOUTH_AFRICA = "ve-ZA";
|
|
13187
13231
|
const XHOSA = "xh";
|
|
13188
13232
|
const XHOSA_SOUTH_AFRICA = "xh-ZA";
|
|
13189
13233
|
const CHINESE = "zh";
|
|
@@ -13207,6 +13251,8 @@ const LAO = "lo";
|
|
|
13207
13251
|
const LAO_LAOS = "lo-LA";
|
|
13208
13252
|
const YORUBA = "yo";
|
|
13209
13253
|
const YORUBA_NIGERIA = "yo-NG";
|
|
13254
|
+
const YIDDISH = "yi";
|
|
13255
|
+
const YIDDISH_WORLD = "yi-001";
|
|
13210
13256
|
const AMHARIC = "am";
|
|
13211
13257
|
const AMHARIC_ETHIOPIA = "am-ET";
|
|
13212
13258
|
const NEPALI = "ne";
|
|
@@ -13341,6 +13387,10 @@ const ALL_LOCALES = {
|
|
|
13341
13387
|
FRENCH_FRANCE,
|
|
13342
13388
|
FRENCH_LUXEMBOURG,
|
|
13343
13389
|
FRENCH_PRINCIPALITY_OF_MONACO,
|
|
13390
|
+
IRISH,
|
|
13391
|
+
IRISH_IRELAND,
|
|
13392
|
+
SCOTTISH_GAELIC,
|
|
13393
|
+
SCOTTISH_GAELIC_UNITED_KINGDOM,
|
|
13344
13394
|
GALICIAN,
|
|
13345
13395
|
GALICIAN_SPAIN,
|
|
13346
13396
|
GUJARATI,
|
|
@@ -13375,6 +13425,8 @@ const ALL_LOCALES = {
|
|
|
13375
13425
|
KOREAN_KOREA,
|
|
13376
13426
|
KONKANI,
|
|
13377
13427
|
KONKANI_INDIA,
|
|
13428
|
+
KURDISH,
|
|
13429
|
+
KURDISH_TURKEY,
|
|
13378
13430
|
KYRGYZ,
|
|
13379
13431
|
KYRGYZ_KYRGYZSTAN,
|
|
13380
13432
|
LITHUANIAN,
|
|
@@ -13394,11 +13446,15 @@ const ALL_LOCALES = {
|
|
|
13394
13446
|
MALAY_MALAYSIA,
|
|
13395
13447
|
MALTESE,
|
|
13396
13448
|
MALTESE_MALTA,
|
|
13449
|
+
MALAYALAM,
|
|
13450
|
+
MALAYALAM_INDIA,
|
|
13451
|
+
NORWEGIAN,
|
|
13397
13452
|
NORWEGIAN_BOKMAL,
|
|
13398
13453
|
NORWEGIAN_BOKMAL_NORWAY,
|
|
13399
13454
|
DUTCH,
|
|
13400
13455
|
DUTCH_BELGIUM,
|
|
13401
13456
|
DUTCH_NETHERLANDS,
|
|
13457
|
+
NORWEGIAN_NYNORSK,
|
|
13402
13458
|
NORWEGIAN_NYNORSK_NORWAY,
|
|
13403
13459
|
NORTHERN_SOTHO,
|
|
13404
13460
|
NORTHERN_SOTHO_SOUTH_AFRICA,
|
|
@@ -13417,14 +13473,22 @@ const ALL_LOCALES = {
|
|
|
13417
13473
|
QUECHUA_PERU,
|
|
13418
13474
|
ROMANIAN,
|
|
13419
13475
|
ROMANIAN_ROMANIA,
|
|
13476
|
+
ROMANIAN_MOLDOVA,
|
|
13477
|
+
ROMANSH,
|
|
13478
|
+
ROMANSH_SWITZERLAND,
|
|
13420
13479
|
RUSSIAN,
|
|
13421
13480
|
RUSSIAN_RUSSIA,
|
|
13481
|
+
RUSSIAN_MOLDOVA,
|
|
13422
13482
|
SANSKRIT,
|
|
13423
13483
|
SANSKRIT_INDIA,
|
|
13424
13484
|
SAMI_NORTHERN,
|
|
13425
13485
|
SAMI_NORTHERN_FINLAND,
|
|
13426
13486
|
SAMI_NORTHERN_NORWAY,
|
|
13427
13487
|
SAMI_NORTHERN_SWEDEN,
|
|
13488
|
+
UPPER_SORBIAN,
|
|
13489
|
+
UPPER_SORBIAN_GERMANY,
|
|
13490
|
+
LOWER_SORBIAN,
|
|
13491
|
+
LOWER_SORBIAN_GERMANY,
|
|
13428
13492
|
SLOVAK,
|
|
13429
13493
|
SLOVAK_SLOVAKIA,
|
|
13430
13494
|
SLOVENIAN,
|
|
@@ -13464,6 +13528,8 @@ const ALL_LOCALES = {
|
|
|
13464
13528
|
UZBEK_LATIN_UZBEKISTAN,
|
|
13465
13529
|
VIETNAMESE,
|
|
13466
13530
|
VIETNAMESE_VIET_NAM,
|
|
13531
|
+
VENDA,
|
|
13532
|
+
VENDA_SOUTH_AFRICA,
|
|
13467
13533
|
XHOSA,
|
|
13468
13534
|
XHOSA_SOUTH_AFRICA,
|
|
13469
13535
|
CHINESE,
|
|
@@ -13487,6 +13553,8 @@ const ALL_LOCALES = {
|
|
|
13487
13553
|
LAO_LAOS,
|
|
13488
13554
|
YORUBA,
|
|
13489
13555
|
YORUBA_NIGERIA,
|
|
13556
|
+
YIDDISH,
|
|
13557
|
+
YIDDISH_WORLD,
|
|
13490
13558
|
AMHARIC,
|
|
13491
13559
|
AMHARIC_ETHIOPIA,
|
|
13492
13560
|
NEPALI,
|
|
@@ -20878,6 +20946,7 @@ const containerVariants$1 = cva("flex flex-col text-text backdrop-blur", {
|
|
|
20878
20946
|
xl: "rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl",
|
|
20879
20947
|
"2xl": "rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl",
|
|
20880
20948
|
"3xl": "rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl",
|
|
20949
|
+
"4xl": "rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]",
|
|
20881
20950
|
full: "rounded-full [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-full"
|
|
20882
20951
|
},
|
|
20883
20952
|
transparency: {
|
|
@@ -20904,7 +20973,7 @@ const containerVariants$1 = cva("flex flex-col text-text backdrop-blur", {
|
|
|
20904
20973
|
},
|
|
20905
20974
|
border: {
|
|
20906
20975
|
none: "",
|
|
20907
|
-
with: "border-[1.
|
|
20976
|
+
with: "border-[1.3px]"
|
|
20908
20977
|
},
|
|
20909
20978
|
borderColor: {
|
|
20910
20979
|
primary: "border-primary",
|
|
@@ -20945,8 +21014,10 @@ let ContainerRoundedSize = /* @__PURE__ */ (function(ContainerRoundedSize$1) {
|
|
|
20945
21014
|
ContainerRoundedSize$1["MD"] = "md";
|
|
20946
21015
|
ContainerRoundedSize$1["LG"] = "lg";
|
|
20947
21016
|
ContainerRoundedSize$1["XL"] = "xl";
|
|
20948
|
-
ContainerRoundedSize$1["
|
|
20949
|
-
ContainerRoundedSize$1["
|
|
21017
|
+
ContainerRoundedSize$1["2xl"] = "2xl";
|
|
21018
|
+
ContainerRoundedSize$1["3xl"] = "3xl";
|
|
21019
|
+
ContainerRoundedSize$1["4xl"] = "4xl";
|
|
21020
|
+
ContainerRoundedSize$1["5xl"] = "5xl";
|
|
20950
21021
|
ContainerRoundedSize$1["FULL"] = "full";
|
|
20951
21022
|
return ContainerRoundedSize$1;
|
|
20952
21023
|
})({});
|
|
@@ -21118,10 +21189,10 @@ const buttonVariants = cva("relative inline-flex cursor-pointer items-center jus
|
|
|
21118
21189
|
[`${ButtonColor.NEUTRAL}`]: "text-neutral ring-neutral-500/20 *:text-text-light",
|
|
21119
21190
|
[`${ButtonColor.CARD}`]: "hover-card-500/20 text-card ring-card-500/20 *:text-text-light",
|
|
21120
21191
|
[`${ButtonColor.LIGHT}`]: "hover-white-500/20 text-white ring-white/20 *:text-text-light",
|
|
21121
|
-
[`${ButtonColor.DARK}`]: "text-neutral-800 ring-
|
|
21122
|
-
[`${ButtonColor.TEXT}`]: "text-text ring-
|
|
21123
|
-
[`${ButtonColor.CURRENT}`]: "hover-current-500/
|
|
21124
|
-
[`${ButtonColor.TEXT_INVERSE}`]: "text-text-opposite ring-
|
|
21192
|
+
[`${ButtonColor.DARK}`]: "text-neutral-800 ring-text-light/50 *:text-text-light",
|
|
21193
|
+
[`${ButtonColor.TEXT}`]: "text-text ring-text/20 *:text-text-opposite",
|
|
21194
|
+
[`${ButtonColor.CURRENT}`]: "hover-current-500/10 text-current ring-current/10 *:text-text-light",
|
|
21195
|
+
[`${ButtonColor.TEXT_INVERSE}`]: "text-text-opposite ring-text-opposite/20 *:text-text",
|
|
21125
21196
|
[`${ButtonColor.ERROR}`]: "hover-error-500/20 text-error ring-error/20 *:text-text-light",
|
|
21126
21197
|
[`${ButtonColor.SUCCESS}`]: "hover-success-500/20 text-success ring-success/20 *:text-text-light",
|
|
21127
21198
|
[`${ButtonColor.CUSTOM}`]: ""
|
|
@@ -21132,20 +21203,24 @@ const buttonVariants = cva("relative inline-flex cursor-pointer items-center jus
|
|
|
21132
21203
|
[`${ContainerRoundedSize.MD}`]: "rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl",
|
|
21133
21204
|
[`${ContainerRoundedSize.LG}`]: "rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl",
|
|
21134
21205
|
[`${ContainerRoundedSize.XL}`]: "rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl",
|
|
21206
|
+
[`${ContainerRoundedSize["2xl"]}`]: "rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]",
|
|
21207
|
+
[`${ContainerRoundedSize["3xl"]}`]: "rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]",
|
|
21208
|
+
[`${ContainerRoundedSize["4xl"]}`]: "rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]",
|
|
21209
|
+
[`${ContainerRoundedSize["5xl"]}`]: "rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]",
|
|
21135
21210
|
[`${ContainerRoundedSize.FULL}`]: "rounded-full"
|
|
21136
21211
|
},
|
|
21137
21212
|
variant: {
|
|
21138
21213
|
[`${ButtonVariant.DEFAULT}`]: [
|
|
21139
21214
|
"bg-current",
|
|
21140
21215
|
"hover:bg-current/90",
|
|
21141
|
-
"hover:ring-
|
|
21142
|
-
"aria-selected:ring-
|
|
21216
|
+
"hover:ring-5",
|
|
21217
|
+
"aria-selected:ring-5"
|
|
21143
21218
|
],
|
|
21144
21219
|
[`${ButtonVariant.OUTLINE}`]: [
|
|
21145
|
-
"rounded-2xl border-[1.
|
|
21146
|
-
"hover:bg-current/20",
|
|
21147
|
-
"hover:ring-
|
|
21148
|
-
"aria-selected:ring-
|
|
21220
|
+
"rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!",
|
|
21221
|
+
"hover:bg-current/20 focus-visible:bg-current/20",
|
|
21222
|
+
"hover:ring-5 focus-visible:ring-5",
|
|
21223
|
+
"aria-selected:ring-5"
|
|
21149
21224
|
],
|
|
21150
21225
|
[`${ButtonVariant.NONE}`]: "border-none bg-current/0 text-inherit hover:bg-current/0",
|
|
21151
21226
|
[`${ButtonVariant.LINK}`]: "h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline",
|
|
@@ -21189,7 +21264,7 @@ const buttonVariants = cva("relative inline-flex cursor-pointer items-center jus
|
|
|
21189
21264
|
isFullWidth: false
|
|
21190
21265
|
}
|
|
21191
21266
|
});
|
|
21192
|
-
const Button = ({ variant, size: size2, color: color2, children, Icon: Icon2, IconRight, iconClassName, isLoading = false, isActive
|
|
21267
|
+
const Button = ({ variant, size: size2, color: color2, children, Icon: Icon2, IconRight, iconClassName, isLoading = false, isActive, isSelected, isFullWidth, roundedSize, textAlign, disabled, label, className, type = "button", "aria-describedby": ariaDescribedBy, "aria-expanded": ariaExpanded, "aria-haspopup": ariaHasPopup, "aria-pressed": ariaPressed, ...props }) => {
|
|
21193
21268
|
const isLink = variant === `${ButtonVariant.LINK}` || variant === `${ButtonVariant.INVISIBLE_LINK}`;
|
|
21194
21269
|
const isIconOnly = !children && (Icon2 || IconRight);
|
|
21195
21270
|
const accessibilityProps = {
|
|
@@ -21360,10 +21435,10 @@ const __iconNode$o = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
|
21360
21435
|
const Check = createLucideIcon("check", __iconNode$o);
|
|
21361
21436
|
const __iconNode$n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
21362
21437
|
const ChevronDown = createLucideIcon("chevron-down", __iconNode$n);
|
|
21363
|
-
const __iconNode$m = [["path", { d: "
|
|
21364
|
-
const
|
|
21365
|
-
const __iconNode$l = [["path", { d: "
|
|
21366
|
-
const
|
|
21438
|
+
const __iconNode$m = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
21439
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$m);
|
|
21440
|
+
const __iconNode$l = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
21441
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$l);
|
|
21367
21442
|
const __iconNode$k = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
21368
21443
|
const ChevronUp = createLucideIcon("chevron-up", __iconNode$k);
|
|
21369
21444
|
const __iconNode$j = [
|
|
@@ -21607,7 +21682,7 @@ const badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-
|
|
|
21607
21682
|
variant: {
|
|
21608
21683
|
[BadgeVariant.DEFAULT]: "rounded-lg text-text-opposite",
|
|
21609
21684
|
[BadgeVariant.NONE]: "border-none bg-opacity-0 text-inherit hover:bg-opacity-0",
|
|
21610
|
-
[BadgeVariant.OUTLINE]: "rounded-lg border-[1.
|
|
21685
|
+
[BadgeVariant.OUTLINE]: "rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30",
|
|
21611
21686
|
[BadgeVariant.HOVERABLE]: "rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10"
|
|
21612
21687
|
},
|
|
21613
21688
|
size: {
|
|
@@ -21717,8 +21792,8 @@ const linkVariants = cva("gap-3 transition-all duration-300 focus-visible:outlin
|
|
|
21717
21792
|
variant: {
|
|
21718
21793
|
[`${LinkVariant.DEFAULT}`]: "h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline",
|
|
21719
21794
|
[`${LinkVariant.INVISIBLE_LINK}`]: "h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",
|
|
21720
|
-
[`${LinkVariant.BUTTON}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-
|
|
21721
|
-
[`${LinkVariant.BUTTON_OUTLINED}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.
|
|
21795
|
+
[`${LinkVariant.BUTTON}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5",
|
|
21796
|
+
[`${LinkVariant.BUTTON_OUTLINED}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5",
|
|
21722
21797
|
[`${LinkVariant.HOVERABLE}`]: "block rounded-lg border-none bg-current/0 hover:bg-current/10 aria-[current]:bg-current/5"
|
|
21723
21798
|
},
|
|
21724
21799
|
roundedSize: {
|
|
@@ -21848,10 +21923,8 @@ const Link = (props) => {
|
|
|
21848
21923
|
const isChildrenString = typeof children === "string";
|
|
21849
21924
|
const rel = isExternalLink ? "noopener noreferrer nofollow" : void 0;
|
|
21850
21925
|
const target = isExternalLink ? "_blank" : "_self";
|
|
21851
|
-
const href = locale && hrefProp && !isExternalLink && !isPageSection ? getLocalizedUrl(hrefProp, locale) : hrefProp;
|
|
21852
|
-
const isButton = variant === "button" || variant === "button-outlined";
|
|
21853
21926
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("a", {
|
|
21854
|
-
href,
|
|
21927
|
+
href: locale && hrefProp && !isExternalLink && !isPageSection ? getLocalizedUrl(hrefProp, locale) : hrefProp,
|
|
21855
21928
|
"aria-label": label,
|
|
21856
21929
|
rel,
|
|
21857
21930
|
target,
|
|
@@ -21862,14 +21935,11 @@ const Link = (props) => {
|
|
|
21862
21935
|
roundedSize,
|
|
21863
21936
|
underlined,
|
|
21864
21937
|
size: size2,
|
|
21865
|
-
className
|
|
21938
|
+
className
|
|
21866
21939
|
})),
|
|
21867
21940
|
...otherProps,
|
|
21868
21941
|
children: [
|
|
21869
|
-
|
|
21870
|
-
className,
|
|
21871
|
-
children
|
|
21872
|
-
}) : children,
|
|
21942
|
+
children,
|
|
21873
21943
|
isExternalLink && isChildrenString && /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "ml-2 inline-block size-4" }),
|
|
21874
21944
|
isPageSection && /* @__PURE__ */ jsxRuntimeExports.jsx(MoveRight, { className: "ml-2 inline-block size-4" })
|
|
21875
21945
|
]
|
|
@@ -21926,6 +21996,7 @@ const LinkLink = ({
|
|
|
21926
21996
|
...props,
|
|
21927
21997
|
label: `${linkLabel} ${children}`,
|
|
21928
21998
|
itemID: href,
|
|
21999
|
+
size: "sm",
|
|
21929
22000
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
21930
22001
|
itemProp: "name",
|
|
21931
22002
|
children
|
|
@@ -22308,7 +22379,7 @@ function createSlotClone$1(ownerName) {
|
|
|
22308
22379
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
22309
22380
|
return SlotClone;
|
|
22310
22381
|
}
|
|
22311
|
-
var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
|
|
22382
|
+
var SLOTTABLE_IDENTIFIER$1 = /* @__PURE__ */ Symbol("radix.slottable");
|
|
22312
22383
|
function isSlottable$1(child) {
|
|
22313
22384
|
return reactExports.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
|
|
22314
22385
|
}
|
|
@@ -22374,7 +22445,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
22374
22445
|
const { asChild, ...primitiveProps } = props;
|
|
22375
22446
|
const Comp = asChild ? Slot2 : node;
|
|
22376
22447
|
if (typeof window !== "undefined") {
|
|
22377
|
-
window[Symbol.for("radix-ui")] = true;
|
|
22448
|
+
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
22378
22449
|
}
|
|
22379
22450
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
22380
22451
|
});
|
|
@@ -27784,15 +27855,63 @@ function useCreateMotionContext(props) {
|
|
|
27784
27855
|
function variantLabelsAsDependency(prop) {
|
|
27785
27856
|
return Array.isArray(prop) ? prop.join(" ") : prop;
|
|
27786
27857
|
}
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27790
|
-
|
|
27791
|
-
|
|
27792
|
-
|
|
27858
|
+
function pixelsToPercent(pixels, axis) {
|
|
27859
|
+
if (axis.max === axis.min)
|
|
27860
|
+
return 0;
|
|
27861
|
+
return pixels / (axis.max - axis.min) * 100;
|
|
27862
|
+
}
|
|
27863
|
+
const correctBorderRadius = {
|
|
27864
|
+
correct: (latest, node) => {
|
|
27865
|
+
if (!node.target)
|
|
27866
|
+
return latest;
|
|
27867
|
+
if (typeof latest === "string") {
|
|
27868
|
+
if (px.test(latest)) {
|
|
27869
|
+
latest = parseFloat(latest);
|
|
27870
|
+
} else {
|
|
27871
|
+
return latest;
|
|
27872
|
+
}
|
|
27793
27873
|
}
|
|
27874
|
+
const x = pixelsToPercent(latest, node.target.x);
|
|
27875
|
+
const y = pixelsToPercent(latest, node.target.y);
|
|
27876
|
+
return `${x}% ${y}%`;
|
|
27794
27877
|
}
|
|
27795
|
-
}
|
|
27878
|
+
};
|
|
27879
|
+
const correctBoxShadow = {
|
|
27880
|
+
correct: (latest, { treeScale, projectionDelta }) => {
|
|
27881
|
+
const original = latest;
|
|
27882
|
+
const shadow = complex.parse(latest);
|
|
27883
|
+
if (shadow.length > 5)
|
|
27884
|
+
return original;
|
|
27885
|
+
const template = complex.createTransformer(latest);
|
|
27886
|
+
const offset2 = typeof shadow[0] !== "number" ? 1 : 0;
|
|
27887
|
+
const xScale = projectionDelta.x.scale * treeScale.x;
|
|
27888
|
+
const yScale = projectionDelta.y.scale * treeScale.y;
|
|
27889
|
+
shadow[0 + offset2] /= xScale;
|
|
27890
|
+
shadow[1 + offset2] /= yScale;
|
|
27891
|
+
const averageScale = mixNumber$1(xScale, yScale, 0.5);
|
|
27892
|
+
if (typeof shadow[2 + offset2] === "number")
|
|
27893
|
+
shadow[2 + offset2] /= averageScale;
|
|
27894
|
+
if (typeof shadow[3 + offset2] === "number")
|
|
27895
|
+
shadow[3 + offset2] /= averageScale;
|
|
27896
|
+
return template(shadow);
|
|
27897
|
+
}
|
|
27898
|
+
};
|
|
27899
|
+
const scaleCorrectors = {
|
|
27900
|
+
borderRadius: {
|
|
27901
|
+
...correctBorderRadius,
|
|
27902
|
+
applyTo: [
|
|
27903
|
+
"borderTopLeftRadius",
|
|
27904
|
+
"borderTopRightRadius",
|
|
27905
|
+
"borderBottomLeftRadius",
|
|
27906
|
+
"borderBottomRightRadius"
|
|
27907
|
+
]
|
|
27908
|
+
},
|
|
27909
|
+
borderTopLeftRadius: correctBorderRadius,
|
|
27910
|
+
borderTopRightRadius: correctBorderRadius,
|
|
27911
|
+
borderBottomLeftRadius: correctBorderRadius,
|
|
27912
|
+
borderBottomRightRadius: correctBorderRadius,
|
|
27913
|
+
boxShadow: correctBoxShadow
|
|
27914
|
+
};
|
|
27796
27915
|
function isForcedMotionValue(key2, { layout: layout2, layoutId }) {
|
|
27797
27916
|
return transformProps.has(key2) || key2.startsWith("origin") || (layout2 || layoutId !== void 0) && (!!scaleCorrectors[key2] || key2 === "opacity");
|
|
27798
27917
|
}
|
|
@@ -28163,7 +28282,7 @@ const useSVGVisualState = /* @__PURE__ */ makeUseVisualState({
|
|
|
28163
28282
|
scrapeMotionValuesFromProps,
|
|
28164
28283
|
createRenderState: createSvgRenderState
|
|
28165
28284
|
});
|
|
28166
|
-
const motionComponentSymbol = Symbol.for("motionComponentSymbol");
|
|
28285
|
+
const motionComponentSymbol = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
28167
28286
|
function isRefObject(ref) {
|
|
28168
28287
|
return ref && typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current");
|
|
28169
28288
|
}
|
|
@@ -30278,47 +30397,6 @@ const globalProjectionState = {
|
|
|
30278
30397
|
*/
|
|
30279
30398
|
hasEverUpdated: false
|
|
30280
30399
|
};
|
|
30281
|
-
function pixelsToPercent(pixels, axis) {
|
|
30282
|
-
if (axis.max === axis.min)
|
|
30283
|
-
return 0;
|
|
30284
|
-
return pixels / (axis.max - axis.min) * 100;
|
|
30285
|
-
}
|
|
30286
|
-
const correctBorderRadius = {
|
|
30287
|
-
correct: (latest, node) => {
|
|
30288
|
-
if (!node.target)
|
|
30289
|
-
return latest;
|
|
30290
|
-
if (typeof latest === "string") {
|
|
30291
|
-
if (px.test(latest)) {
|
|
30292
|
-
latest = parseFloat(latest);
|
|
30293
|
-
} else {
|
|
30294
|
-
return latest;
|
|
30295
|
-
}
|
|
30296
|
-
}
|
|
30297
|
-
const x = pixelsToPercent(latest, node.target.x);
|
|
30298
|
-
const y = pixelsToPercent(latest, node.target.y);
|
|
30299
|
-
return `${x}% ${y}%`;
|
|
30300
|
-
}
|
|
30301
|
-
};
|
|
30302
|
-
const correctBoxShadow = {
|
|
30303
|
-
correct: (latest, { treeScale, projectionDelta }) => {
|
|
30304
|
-
const original = latest;
|
|
30305
|
-
const shadow = complex.parse(latest);
|
|
30306
|
-
if (shadow.length > 5)
|
|
30307
|
-
return original;
|
|
30308
|
-
const template = complex.createTransformer(latest);
|
|
30309
|
-
const offset2 = typeof shadow[0] !== "number" ? 1 : 0;
|
|
30310
|
-
const xScale = projectionDelta.x.scale * treeScale.x;
|
|
30311
|
-
const yScale = projectionDelta.y.scale * treeScale.y;
|
|
30312
|
-
shadow[0 + offset2] /= xScale;
|
|
30313
|
-
shadow[1 + offset2] /= yScale;
|
|
30314
|
-
const averageScale = mixNumber$1(xScale, yScale, 0.5);
|
|
30315
|
-
if (typeof shadow[2 + offset2] === "number")
|
|
30316
|
-
shadow[2 + offset2] /= averageScale;
|
|
30317
|
-
if (typeof shadow[3 + offset2] === "number")
|
|
30318
|
-
shadow[3 + offset2] /= averageScale;
|
|
30319
|
-
return template(shadow);
|
|
30320
|
-
}
|
|
30321
|
-
};
|
|
30322
30400
|
let hasTakenAnySnapshot = false;
|
|
30323
30401
|
class MeasureLayoutWithContext extends reactExports.Component {
|
|
30324
30402
|
/**
|
|
@@ -30329,7 +30407,6 @@ class MeasureLayoutWithContext extends reactExports.Component {
|
|
|
30329
30407
|
componentDidMount() {
|
|
30330
30408
|
const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;
|
|
30331
30409
|
const { projection } = visualElement;
|
|
30332
|
-
addScaleCorrector(defaultScaleCorrectors);
|
|
30333
30410
|
if (projection) {
|
|
30334
30411
|
if (layoutGroup.group)
|
|
30335
30412
|
layoutGroup.group.add(projection);
|
|
@@ -30411,22 +30488,6 @@ function MeasureLayout(props) {
|
|
|
30411
30488
|
const layoutGroup = reactExports.useContext(LayoutGroupContext);
|
|
30412
30489
|
return jsxRuntimeExports.jsx(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: reactExports.useContext(SwitchLayoutGroupContext), isPresent, safeToRemove });
|
|
30413
30490
|
}
|
|
30414
|
-
const defaultScaleCorrectors = {
|
|
30415
|
-
borderRadius: {
|
|
30416
|
-
...correctBorderRadius,
|
|
30417
|
-
applyTo: [
|
|
30418
|
-
"borderTopLeftRadius",
|
|
30419
|
-
"borderTopRightRadius",
|
|
30420
|
-
"borderBottomLeftRadius",
|
|
30421
|
-
"borderBottomRightRadius"
|
|
30422
|
-
]
|
|
30423
|
-
},
|
|
30424
|
-
borderTopLeftRadius: correctBorderRadius,
|
|
30425
|
-
borderTopRightRadius: correctBorderRadius,
|
|
30426
|
-
borderBottomLeftRadius: correctBorderRadius,
|
|
30427
|
-
borderBottomRightRadius: correctBorderRadius,
|
|
30428
|
-
boxShadow: correctBoxShadow
|
|
30429
|
-
};
|
|
30430
30491
|
function animateSingleValue(value, keyframes2, options) {
|
|
30431
30492
|
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
|
|
30432
30493
|
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
|
|
@@ -32686,10 +32747,9 @@ const InputOTPSeparator = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("div"
|
|
|
32686
32747
|
...props,
|
|
32687
32748
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, {})
|
|
32688
32749
|
});
|
|
32689
|
-
const InputIndicator = (
|
|
32750
|
+
const InputIndicator = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
32690
32751
|
"data-indicator": true,
|
|
32691
32752
|
className: "absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none",
|
|
32692
|
-
ref,
|
|
32693
32753
|
...props
|
|
32694
32754
|
});
|
|
32695
32755
|
const SearchInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -32986,7 +33046,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
|
32986
33046
|
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
32987
33047
|
function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
|
|
32988
33048
|
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
32989
|
-
return object1
|
|
33049
|
+
return Object.is(object1, object2);
|
|
32990
33050
|
}
|
|
32991
33051
|
if (isDateObject(object1) && isDateObject(object2)) {
|
|
32992
33052
|
return object1.getTime() === object2.getTime();
|
|
@@ -33008,7 +33068,7 @@ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new W
|
|
|
33008
33068
|
}
|
|
33009
33069
|
if (key2 !== "ref") {
|
|
33010
33070
|
const val2 = object2[key2];
|
|
33011
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject$4(val1) && isObject$4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1
|
|
33071
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject$4(val1) && isObject$4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
|
|
33012
33072
|
return false;
|
|
33013
33073
|
}
|
|
33014
33074
|
}
|
|
@@ -33078,19 +33138,19 @@ function useWatch(props) {
|
|
|
33078
33138
|
}
|
|
33079
33139
|
function useController(props) {
|
|
33080
33140
|
const methods2 = useFormContext();
|
|
33081
|
-
const { name, disabled, control = methods2.control, shouldUnregister, defaultValue } = props;
|
|
33141
|
+
const { name, disabled, control = methods2.control, shouldUnregister, defaultValue, exact = true } = props;
|
|
33082
33142
|
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
33083
33143
|
const defaultValueMemo = We.useMemo(() => get$2(control._formValues, name, get$2(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
|
|
33084
33144
|
const value = useWatch({
|
|
33085
33145
|
control,
|
|
33086
33146
|
name,
|
|
33087
33147
|
defaultValue: defaultValueMemo,
|
|
33088
|
-
exact
|
|
33148
|
+
exact
|
|
33089
33149
|
});
|
|
33090
33150
|
const formState = useFormState({
|
|
33091
33151
|
control,
|
|
33092
33152
|
name,
|
|
33093
|
-
exact
|
|
33153
|
+
exact
|
|
33094
33154
|
});
|
|
33095
33155
|
const _props = We.useRef(props);
|
|
33096
33156
|
const _previousNameRef = We.useRef(void 0);
|
|
@@ -33307,10 +33367,11 @@ function isTraversable(value) {
|
|
|
33307
33367
|
}
|
|
33308
33368
|
function markFieldsDirty(data, fields = {}) {
|
|
33309
33369
|
for (const key2 in data) {
|
|
33310
|
-
|
|
33311
|
-
|
|
33312
|
-
|
|
33313
|
-
|
|
33370
|
+
const value = data[key2];
|
|
33371
|
+
if (isTraversable(value)) {
|
|
33372
|
+
fields[key2] = Array.isArray(value) ? [] : {};
|
|
33373
|
+
markFieldsDirty(value, fields[key2]);
|
|
33374
|
+
} else if (!isUndefined(value)) {
|
|
33314
33375
|
fields[key2] = true;
|
|
33315
33376
|
}
|
|
33316
33377
|
}
|
|
@@ -33321,14 +33382,16 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
|
33321
33382
|
dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
33322
33383
|
}
|
|
33323
33384
|
for (const key2 in data) {
|
|
33324
|
-
|
|
33385
|
+
const value = data[key2];
|
|
33386
|
+
if (isTraversable(value)) {
|
|
33325
33387
|
if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key2])) {
|
|
33326
|
-
dirtyFieldsFromValues[key2] = markFieldsDirty(
|
|
33388
|
+
dirtyFieldsFromValues[key2] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
|
|
33327
33389
|
} else {
|
|
33328
|
-
getDirtyFields(
|
|
33390
|
+
getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key2], dirtyFieldsFromValues[key2]);
|
|
33329
33391
|
}
|
|
33330
33392
|
} else {
|
|
33331
|
-
|
|
33393
|
+
const formValue = formValues[key2];
|
|
33394
|
+
dirtyFieldsFromValues[key2] = !deepEqual$1(value, formValue);
|
|
33332
33395
|
}
|
|
33333
33396
|
}
|
|
33334
33397
|
return dirtyFieldsFromValues;
|
|
@@ -33783,7 +33846,7 @@ function createFormControl(props = {}) {
|
|
|
33783
33846
|
if (field) {
|
|
33784
33847
|
const defaultValue = get$2(_formValues, name, isUndefined(value) ? get$2(_defaultValues, name) : value);
|
|
33785
33848
|
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
33786
|
-
_state.mount && _setValid();
|
|
33849
|
+
_state.mount && !_state.action && _setValid();
|
|
33787
33850
|
}
|
|
33788
33851
|
};
|
|
33789
33852
|
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
@@ -34396,6 +34459,10 @@ function createFormControl(props = {}) {
|
|
|
34396
34459
|
};
|
|
34397
34460
|
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
|
|
34398
34461
|
_state.watch = !!_options.shouldUnregister;
|
|
34462
|
+
_state.action = false;
|
|
34463
|
+
if (!keepStateOptions.keepErrors) {
|
|
34464
|
+
_formState.errors = {};
|
|
34465
|
+
}
|
|
34399
34466
|
_subjects.state.next({
|
|
34400
34467
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
34401
34468
|
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
|
|
@@ -34592,11 +34659,15 @@ function useForm$1(props = {}) {
|
|
|
34592
34659
|
}
|
|
34593
34660
|
}, [control, formState.isDirty]);
|
|
34594
34661
|
We.useEffect(() => {
|
|
34662
|
+
var _a2;
|
|
34595
34663
|
if (props.values && !deepEqual$1(props.values, _values.current)) {
|
|
34596
34664
|
control._reset(props.values, {
|
|
34597
34665
|
keepFieldsRef: true,
|
|
34598
34666
|
...control._options.resetOptions
|
|
34599
34667
|
});
|
|
34668
|
+
if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
|
|
34669
|
+
control._setValid();
|
|
34670
|
+
}
|
|
34600
34671
|
_values.current = props.values;
|
|
34601
34672
|
updateFormState((state) => ({ ...state }));
|
|
34602
34673
|
} else {
|
|
@@ -34960,7 +35031,7 @@ function addToStart(items, item, max2 = 0) {
|
|
|
34960
35031
|
const newItems = [item, ...items];
|
|
34961
35032
|
return max2 && newItems.length > max2 ? newItems.slice(0, -1) : newItems;
|
|
34962
35033
|
}
|
|
34963
|
-
var skipToken = Symbol();
|
|
35034
|
+
var skipToken = /* @__PURE__ */ Symbol();
|
|
34964
35035
|
function ensureQueryFn(options, fetchOptions) {
|
|
34965
35036
|
if (!options.queryFn && fetchOptions?.initialPromise) {
|
|
34966
35037
|
return () => fetchOptions.initialPromise;
|
|
@@ -38205,6 +38276,436 @@ async function startAuthentication(options) {
|
|
|
38205
38276
|
authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment)
|
|
38206
38277
|
};
|
|
38207
38278
|
}
|
|
38279
|
+
const kBroadcastChannel = /* @__PURE__ */ Symbol.for("better-auth:broadcast-channel");
|
|
38280
|
+
const now$1 = () => Math.floor(Date.now() / 1e3);
|
|
38281
|
+
var WindowBroadcastChannel = class {
|
|
38282
|
+
listeners = /* @__PURE__ */ new Set();
|
|
38283
|
+
name;
|
|
38284
|
+
constructor(name = "better-auth.message") {
|
|
38285
|
+
this.name = name;
|
|
38286
|
+
}
|
|
38287
|
+
subscribe(listener) {
|
|
38288
|
+
this.listeners.add(listener);
|
|
38289
|
+
return () => {
|
|
38290
|
+
this.listeners.delete(listener);
|
|
38291
|
+
};
|
|
38292
|
+
}
|
|
38293
|
+
post(message) {
|
|
38294
|
+
if (typeof window === "undefined") return;
|
|
38295
|
+
try {
|
|
38296
|
+
localStorage.setItem(this.name, JSON.stringify({
|
|
38297
|
+
...message,
|
|
38298
|
+
timestamp: now$1()
|
|
38299
|
+
}));
|
|
38300
|
+
} catch {
|
|
38301
|
+
}
|
|
38302
|
+
}
|
|
38303
|
+
setup() {
|
|
38304
|
+
if (typeof window === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
38305
|
+
};
|
|
38306
|
+
const handler = (event) => {
|
|
38307
|
+
if (event.key !== this.name) return;
|
|
38308
|
+
const message = JSON.parse(event.newValue ?? "{}");
|
|
38309
|
+
if (message?.event !== "session" || !message?.data) return;
|
|
38310
|
+
this.listeners.forEach((listener) => listener(message));
|
|
38311
|
+
};
|
|
38312
|
+
window.addEventListener("storage", handler);
|
|
38313
|
+
return () => {
|
|
38314
|
+
window.removeEventListener("storage", handler);
|
|
38315
|
+
};
|
|
38316
|
+
}
|
|
38317
|
+
};
|
|
38318
|
+
function getGlobalBroadcastChannel(name = "better-auth.message") {
|
|
38319
|
+
if (!globalThis[kBroadcastChannel]) globalThis[kBroadcastChannel] = new WindowBroadcastChannel(name);
|
|
38320
|
+
return globalThis[kBroadcastChannel];
|
|
38321
|
+
}
|
|
38322
|
+
const kFocusManager = /* @__PURE__ */ Symbol.for("better-auth:focus-manager");
|
|
38323
|
+
var WindowFocusManager = class {
|
|
38324
|
+
listeners = /* @__PURE__ */ new Set();
|
|
38325
|
+
subscribe(listener) {
|
|
38326
|
+
this.listeners.add(listener);
|
|
38327
|
+
return () => {
|
|
38328
|
+
this.listeners.delete(listener);
|
|
38329
|
+
};
|
|
38330
|
+
}
|
|
38331
|
+
setFocused(focused) {
|
|
38332
|
+
this.listeners.forEach((listener) => listener(focused));
|
|
38333
|
+
}
|
|
38334
|
+
setup() {
|
|
38335
|
+
if (typeof window === "undefined" || typeof document === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
38336
|
+
};
|
|
38337
|
+
const visibilityHandler = () => {
|
|
38338
|
+
if (document.visibilityState === "visible") this.setFocused(true);
|
|
38339
|
+
};
|
|
38340
|
+
document.addEventListener("visibilitychange", visibilityHandler, false);
|
|
38341
|
+
return () => {
|
|
38342
|
+
document.removeEventListener("visibilitychange", visibilityHandler, false);
|
|
38343
|
+
};
|
|
38344
|
+
}
|
|
38345
|
+
};
|
|
38346
|
+
function getGlobalFocusManager() {
|
|
38347
|
+
if (!globalThis[kFocusManager]) globalThis[kFocusManager] = new WindowFocusManager();
|
|
38348
|
+
return globalThis[kFocusManager];
|
|
38349
|
+
}
|
|
38350
|
+
const kOnlineManager = /* @__PURE__ */ Symbol.for("better-auth:online-manager");
|
|
38351
|
+
var WindowOnlineManager = class {
|
|
38352
|
+
listeners = /* @__PURE__ */ new Set();
|
|
38353
|
+
isOnline = typeof navigator !== "undefined" ? navigator.onLine : true;
|
|
38354
|
+
subscribe(listener) {
|
|
38355
|
+
this.listeners.add(listener);
|
|
38356
|
+
return () => {
|
|
38357
|
+
this.listeners.delete(listener);
|
|
38358
|
+
};
|
|
38359
|
+
}
|
|
38360
|
+
setOnline(online) {
|
|
38361
|
+
this.isOnline = online;
|
|
38362
|
+
this.listeners.forEach((listener) => listener(online));
|
|
38363
|
+
}
|
|
38364
|
+
setup() {
|
|
38365
|
+
if (typeof window === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
38366
|
+
};
|
|
38367
|
+
const onOnline = () => this.setOnline(true);
|
|
38368
|
+
const onOffline = () => this.setOnline(false);
|
|
38369
|
+
window.addEventListener("online", onOnline, false);
|
|
38370
|
+
window.addEventListener("offline", onOffline, false);
|
|
38371
|
+
return () => {
|
|
38372
|
+
window.removeEventListener("online", onOnline, false);
|
|
38373
|
+
window.removeEventListener("offline", onOffline, false);
|
|
38374
|
+
};
|
|
38375
|
+
}
|
|
38376
|
+
};
|
|
38377
|
+
function getGlobalOnlineManager() {
|
|
38378
|
+
if (!globalThis[kOnlineManager]) globalThis[kOnlineManager] = new WindowOnlineManager();
|
|
38379
|
+
return globalThis[kOnlineManager];
|
|
38380
|
+
}
|
|
38381
|
+
let listenerQueue = [];
|
|
38382
|
+
let lqIndex = 0;
|
|
38383
|
+
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
38384
|
+
const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
38385
|
+
let listeners2 = [];
|
|
38386
|
+
let $atom = {
|
|
38387
|
+
get() {
|
|
38388
|
+
if (!$atom.lc) {
|
|
38389
|
+
$atom.listen(() => {
|
|
38390
|
+
})();
|
|
38391
|
+
}
|
|
38392
|
+
return $atom.value;
|
|
38393
|
+
},
|
|
38394
|
+
lc: 0,
|
|
38395
|
+
listen(listener) {
|
|
38396
|
+
$atom.lc = listeners2.push(listener);
|
|
38397
|
+
return () => {
|
|
38398
|
+
for (let i2 = lqIndex + QUEUE_ITEMS_PER_LISTENER; i2 < listenerQueue.length; ) {
|
|
38399
|
+
if (listenerQueue[i2] === listener) {
|
|
38400
|
+
listenerQueue.splice(i2, QUEUE_ITEMS_PER_LISTENER);
|
|
38401
|
+
} else {
|
|
38402
|
+
i2 += QUEUE_ITEMS_PER_LISTENER;
|
|
38403
|
+
}
|
|
38404
|
+
}
|
|
38405
|
+
let index2 = listeners2.indexOf(listener);
|
|
38406
|
+
if (~index2) {
|
|
38407
|
+
listeners2.splice(index2, 1);
|
|
38408
|
+
if (!--$atom.lc) $atom.off();
|
|
38409
|
+
}
|
|
38410
|
+
};
|
|
38411
|
+
},
|
|
38412
|
+
notify(oldValue, changedKey) {
|
|
38413
|
+
let runListenerQueue = !listenerQueue.length;
|
|
38414
|
+
for (let listener of listeners2) {
|
|
38415
|
+
listenerQueue.push(listener, $atom.value, oldValue, changedKey);
|
|
38416
|
+
}
|
|
38417
|
+
if (runListenerQueue) {
|
|
38418
|
+
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER) {
|
|
38419
|
+
listenerQueue[lqIndex](
|
|
38420
|
+
listenerQueue[lqIndex + 1],
|
|
38421
|
+
listenerQueue[lqIndex + 2],
|
|
38422
|
+
listenerQueue[lqIndex + 3]
|
|
38423
|
+
);
|
|
38424
|
+
}
|
|
38425
|
+
listenerQueue.length = 0;
|
|
38426
|
+
}
|
|
38427
|
+
},
|
|
38428
|
+
/* It will be called on last listener unsubscribing.
|
|
38429
|
+
We will redefine it in onMount and onStop. */
|
|
38430
|
+
off() {
|
|
38431
|
+
},
|
|
38432
|
+
set(newValue) {
|
|
38433
|
+
let oldValue = $atom.value;
|
|
38434
|
+
if (oldValue !== newValue) {
|
|
38435
|
+
$atom.value = newValue;
|
|
38436
|
+
$atom.notify(oldValue);
|
|
38437
|
+
}
|
|
38438
|
+
},
|
|
38439
|
+
subscribe(listener) {
|
|
38440
|
+
let unbind = $atom.listen(listener);
|
|
38441
|
+
listener($atom.value);
|
|
38442
|
+
return unbind;
|
|
38443
|
+
},
|
|
38444
|
+
value: initialValue
|
|
38445
|
+
};
|
|
38446
|
+
return $atom;
|
|
38447
|
+
};
|
|
38448
|
+
const MOUNT = 5;
|
|
38449
|
+
const UNMOUNT = 6;
|
|
38450
|
+
const REVERT_MUTATION = 10;
|
|
38451
|
+
let on = (object2, listener, eventKey, mutateStore) => {
|
|
38452
|
+
object2.events = object2.events || {};
|
|
38453
|
+
if (!object2.events[eventKey + REVERT_MUTATION]) {
|
|
38454
|
+
object2.events[eventKey + REVERT_MUTATION] = mutateStore((eventProps) => {
|
|
38455
|
+
object2.events[eventKey].reduceRight((event, l2) => (l2(event), event), {
|
|
38456
|
+
shared: {},
|
|
38457
|
+
...eventProps
|
|
38458
|
+
});
|
|
38459
|
+
});
|
|
38460
|
+
}
|
|
38461
|
+
object2.events[eventKey] = object2.events[eventKey] || [];
|
|
38462
|
+
object2.events[eventKey].push(listener);
|
|
38463
|
+
return () => {
|
|
38464
|
+
let currentListeners = object2.events[eventKey];
|
|
38465
|
+
let index2 = currentListeners.indexOf(listener);
|
|
38466
|
+
currentListeners.splice(index2, 1);
|
|
38467
|
+
if (!currentListeners.length) {
|
|
38468
|
+
delete object2.events[eventKey];
|
|
38469
|
+
object2.events[eventKey + REVERT_MUTATION]();
|
|
38470
|
+
delete object2.events[eventKey + REVERT_MUTATION];
|
|
38471
|
+
}
|
|
38472
|
+
};
|
|
38473
|
+
};
|
|
38474
|
+
let STORE_UNMOUNT_DELAY = 1e3;
|
|
38475
|
+
let onMount = ($store, initialize) => {
|
|
38476
|
+
let listener = (payload) => {
|
|
38477
|
+
let destroy = initialize(payload);
|
|
38478
|
+
if (destroy) $store.events[UNMOUNT].push(destroy);
|
|
38479
|
+
};
|
|
38480
|
+
return on($store, listener, MOUNT, (runListeners) => {
|
|
38481
|
+
let originListen = $store.listen;
|
|
38482
|
+
$store.listen = (...args) => {
|
|
38483
|
+
if (!$store.lc && !$store.active) {
|
|
38484
|
+
$store.active = true;
|
|
38485
|
+
runListeners();
|
|
38486
|
+
}
|
|
38487
|
+
return originListen(...args);
|
|
38488
|
+
};
|
|
38489
|
+
let originOff = $store.off;
|
|
38490
|
+
$store.events[UNMOUNT] = [];
|
|
38491
|
+
$store.off = () => {
|
|
38492
|
+
originOff();
|
|
38493
|
+
setTimeout(() => {
|
|
38494
|
+
if ($store.active && !$store.lc) {
|
|
38495
|
+
$store.active = false;
|
|
38496
|
+
for (let destroy of $store.events[UNMOUNT]) destroy();
|
|
38497
|
+
$store.events[UNMOUNT] = [];
|
|
38498
|
+
}
|
|
38499
|
+
}, STORE_UNMOUNT_DELAY);
|
|
38500
|
+
};
|
|
38501
|
+
return () => {
|
|
38502
|
+
$store.listen = originListen;
|
|
38503
|
+
$store.off = originOff;
|
|
38504
|
+
};
|
|
38505
|
+
});
|
|
38506
|
+
};
|
|
38507
|
+
const isServer = () => typeof window === "undefined";
|
|
38508
|
+
const useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
38509
|
+
const value = /* @__PURE__ */ atom({
|
|
38510
|
+
data: null,
|
|
38511
|
+
error: null,
|
|
38512
|
+
isPending: true,
|
|
38513
|
+
isRefetching: false,
|
|
38514
|
+
refetch: (queryParams) => fn(queryParams)
|
|
38515
|
+
});
|
|
38516
|
+
const fn = async (queryParams) => {
|
|
38517
|
+
return new Promise((resolve) => {
|
|
38518
|
+
const opts = typeof options === "function" ? options({
|
|
38519
|
+
data: value.get().data,
|
|
38520
|
+
error: value.get().error,
|
|
38521
|
+
isPending: value.get().isPending
|
|
38522
|
+
}) : options;
|
|
38523
|
+
$fetch(path, {
|
|
38524
|
+
...opts,
|
|
38525
|
+
query: {
|
|
38526
|
+
...opts?.query,
|
|
38527
|
+
...queryParams?.query
|
|
38528
|
+
},
|
|
38529
|
+
async onSuccess(context) {
|
|
38530
|
+
value.set({
|
|
38531
|
+
data: context.data,
|
|
38532
|
+
error: null,
|
|
38533
|
+
isPending: false,
|
|
38534
|
+
isRefetching: false,
|
|
38535
|
+
refetch: value.value.refetch
|
|
38536
|
+
});
|
|
38537
|
+
await opts?.onSuccess?.(context);
|
|
38538
|
+
},
|
|
38539
|
+
async onError(context) {
|
|
38540
|
+
const { request } = context;
|
|
38541
|
+
const retryAttempts = typeof request.retry === "number" ? request.retry : request.retry?.attempts;
|
|
38542
|
+
const retryAttempt = request.retryAttempt || 0;
|
|
38543
|
+
if (retryAttempts && retryAttempt < retryAttempts) return;
|
|
38544
|
+
value.set({
|
|
38545
|
+
error: context.error,
|
|
38546
|
+
data: null,
|
|
38547
|
+
isPending: false,
|
|
38548
|
+
isRefetching: false,
|
|
38549
|
+
refetch: value.value.refetch
|
|
38550
|
+
});
|
|
38551
|
+
await opts?.onError?.(context);
|
|
38552
|
+
},
|
|
38553
|
+
async onRequest(context) {
|
|
38554
|
+
const currentValue = value.get();
|
|
38555
|
+
value.set({
|
|
38556
|
+
isPending: currentValue.data === null,
|
|
38557
|
+
data: currentValue.data,
|
|
38558
|
+
error: null,
|
|
38559
|
+
isRefetching: true,
|
|
38560
|
+
refetch: value.value.refetch
|
|
38561
|
+
});
|
|
38562
|
+
await opts?.onRequest?.(context);
|
|
38563
|
+
}
|
|
38564
|
+
}).catch((error) => {
|
|
38565
|
+
value.set({
|
|
38566
|
+
error,
|
|
38567
|
+
data: null,
|
|
38568
|
+
isPending: false,
|
|
38569
|
+
isRefetching: false,
|
|
38570
|
+
refetch: value.value.refetch
|
|
38571
|
+
});
|
|
38572
|
+
}).finally(() => {
|
|
38573
|
+
resolve(void 0);
|
|
38574
|
+
});
|
|
38575
|
+
});
|
|
38576
|
+
};
|
|
38577
|
+
initializedAtom = Array.isArray(initializedAtom) ? initializedAtom : [initializedAtom];
|
|
38578
|
+
let isMounted = false;
|
|
38579
|
+
for (const initAtom of initializedAtom) initAtom.subscribe(async () => {
|
|
38580
|
+
if (isServer()) return;
|
|
38581
|
+
if (isMounted) await fn();
|
|
38582
|
+
else onMount(value, () => {
|
|
38583
|
+
const timeoutId = setTimeout(async () => {
|
|
38584
|
+
if (!isMounted) {
|
|
38585
|
+
await fn();
|
|
38586
|
+
isMounted = true;
|
|
38587
|
+
}
|
|
38588
|
+
}, 0);
|
|
38589
|
+
return () => {
|
|
38590
|
+
value.off();
|
|
38591
|
+
initAtom.off();
|
|
38592
|
+
clearTimeout(timeoutId);
|
|
38593
|
+
};
|
|
38594
|
+
});
|
|
38595
|
+
});
|
|
38596
|
+
return value;
|
|
38597
|
+
};
|
|
38598
|
+
const now = () => Math.floor(Date.now() / 1e3);
|
|
38599
|
+
const FOCUS_REFETCH_RATE_LIMIT_SECONDS = 5;
|
|
38600
|
+
function createSessionRefreshManager(opts) {
|
|
38601
|
+
const { sessionAtom, sessionSignal, $fetch, options = {} } = opts;
|
|
38602
|
+
const refetchInterval = options.sessionOptions?.refetchInterval ?? 0;
|
|
38603
|
+
const refetchOnWindowFocus = options.sessionOptions?.refetchOnWindowFocus ?? true;
|
|
38604
|
+
const refetchWhenOffline = options.sessionOptions?.refetchWhenOffline ?? false;
|
|
38605
|
+
const state = {
|
|
38606
|
+
lastSync: 0,
|
|
38607
|
+
lastSessionRequest: 0,
|
|
38608
|
+
cachedSession: void 0
|
|
38609
|
+
};
|
|
38610
|
+
const shouldRefetch = () => {
|
|
38611
|
+
return refetchWhenOffline || getGlobalOnlineManager().isOnline;
|
|
38612
|
+
};
|
|
38613
|
+
const triggerRefetch = (event) => {
|
|
38614
|
+
if (!shouldRefetch()) return;
|
|
38615
|
+
if (event?.event === "storage") {
|
|
38616
|
+
state.lastSync = now();
|
|
38617
|
+
sessionSignal.set(!sessionSignal.get());
|
|
38618
|
+
return;
|
|
38619
|
+
}
|
|
38620
|
+
const currentSession = sessionAtom.get();
|
|
38621
|
+
if (event?.event === "poll") {
|
|
38622
|
+
state.lastSessionRequest = now();
|
|
38623
|
+
$fetch("/get-session").then((res) => {
|
|
38624
|
+
sessionAtom.set({
|
|
38625
|
+
...currentSession,
|
|
38626
|
+
data: res.data,
|
|
38627
|
+
error: res.error || null
|
|
38628
|
+
});
|
|
38629
|
+
state.lastSync = now();
|
|
38630
|
+
sessionSignal.set(!sessionSignal.get());
|
|
38631
|
+
}).catch(() => {
|
|
38632
|
+
});
|
|
38633
|
+
return;
|
|
38634
|
+
}
|
|
38635
|
+
if (event?.event === "visibilitychange") {
|
|
38636
|
+
if (now() - state.lastSessionRequest < FOCUS_REFETCH_RATE_LIMIT_SECONDS && currentSession?.data !== null && currentSession?.data !== void 0) return;
|
|
38637
|
+
}
|
|
38638
|
+
if (currentSession?.data === null || currentSession?.data === void 0 || event?.event === "visibilitychange") {
|
|
38639
|
+
if (event?.event === "visibilitychange") state.lastSessionRequest = now();
|
|
38640
|
+
state.lastSync = now();
|
|
38641
|
+
sessionSignal.set(!sessionSignal.get());
|
|
38642
|
+
}
|
|
38643
|
+
};
|
|
38644
|
+
const broadcastSessionUpdate = (trigger) => {
|
|
38645
|
+
getGlobalBroadcastChannel().post({
|
|
38646
|
+
event: "session",
|
|
38647
|
+
data: { trigger },
|
|
38648
|
+
clientId: Math.random().toString(36).substring(7)
|
|
38649
|
+
});
|
|
38650
|
+
};
|
|
38651
|
+
const setupPolling = () => {
|
|
38652
|
+
if (refetchInterval && refetchInterval > 0) state.pollInterval = setInterval(() => {
|
|
38653
|
+
if (sessionAtom.get()?.data) triggerRefetch({ event: "poll" });
|
|
38654
|
+
}, refetchInterval * 1e3);
|
|
38655
|
+
};
|
|
38656
|
+
const setupBroadcast = () => {
|
|
38657
|
+
state.unsubscribeBroadcast = getGlobalBroadcastChannel().subscribe(() => {
|
|
38658
|
+
triggerRefetch({ event: "storage" });
|
|
38659
|
+
});
|
|
38660
|
+
};
|
|
38661
|
+
const setupFocusRefetch = () => {
|
|
38662
|
+
if (!refetchOnWindowFocus) return;
|
|
38663
|
+
state.unsubscribeFocus = getGlobalFocusManager().subscribe(() => {
|
|
38664
|
+
triggerRefetch({ event: "visibilitychange" });
|
|
38665
|
+
});
|
|
38666
|
+
};
|
|
38667
|
+
const setupOnlineRefetch = () => {
|
|
38668
|
+
state.unsubscribeOnline = getGlobalOnlineManager().subscribe((online) => {
|
|
38669
|
+
if (online) triggerRefetch({ event: "visibilitychange" });
|
|
38670
|
+
});
|
|
38671
|
+
};
|
|
38672
|
+
const init2 = () => {
|
|
38673
|
+
setupPolling();
|
|
38674
|
+
setupBroadcast();
|
|
38675
|
+
setupFocusRefetch();
|
|
38676
|
+
setupOnlineRefetch();
|
|
38677
|
+
getGlobalBroadcastChannel().setup();
|
|
38678
|
+
getGlobalFocusManager().setup();
|
|
38679
|
+
getGlobalOnlineManager().setup();
|
|
38680
|
+
};
|
|
38681
|
+
const cleanup = () => {
|
|
38682
|
+
if (state.pollInterval) {
|
|
38683
|
+
clearInterval(state.pollInterval);
|
|
38684
|
+
state.pollInterval = void 0;
|
|
38685
|
+
}
|
|
38686
|
+
if (state.unsubscribeBroadcast) {
|
|
38687
|
+
state.unsubscribeBroadcast();
|
|
38688
|
+
state.unsubscribeBroadcast = void 0;
|
|
38689
|
+
}
|
|
38690
|
+
if (state.unsubscribeFocus) {
|
|
38691
|
+
state.unsubscribeFocus();
|
|
38692
|
+
state.unsubscribeFocus = void 0;
|
|
38693
|
+
}
|
|
38694
|
+
if (state.unsubscribeOnline) {
|
|
38695
|
+
state.unsubscribeOnline();
|
|
38696
|
+
state.unsubscribeOnline = void 0;
|
|
38697
|
+
}
|
|
38698
|
+
state.lastSync = 0;
|
|
38699
|
+
state.lastSessionRequest = 0;
|
|
38700
|
+
state.cachedSession = void 0;
|
|
38701
|
+
};
|
|
38702
|
+
return {
|
|
38703
|
+
init: init2,
|
|
38704
|
+
cleanup,
|
|
38705
|
+
triggerRefetch,
|
|
38706
|
+
broadcastSessionUpdate
|
|
38707
|
+
};
|
|
38708
|
+
}
|
|
38208
38709
|
var define_globalThis_process_env_default = {};
|
|
38209
38710
|
var define_process_env_default = {};
|
|
38210
38711
|
const _envShim = /* @__PURE__ */ Object.create(null);
|
|
@@ -38396,7 +38897,7 @@ var BetterAuthError = class extends Error {
|
|
|
38396
38897
|
function checkHasPath(url) {
|
|
38397
38898
|
try {
|
|
38398
38899
|
return (new URL(url).pathname.replace(/\/+$/, "") || "/") !== "/";
|
|
38399
|
-
} catch
|
|
38900
|
+
} catch {
|
|
38400
38901
|
throw new BetterAuthError(`Invalid base URL: ${url}. Please provide a valid base URL.`);
|
|
38401
38902
|
}
|
|
38402
38903
|
}
|
|
@@ -38425,6 +38926,20 @@ function getBaseURL(url, path, request, loadEnv, trustedProxyHeaders) {
|
|
|
38425
38926
|
}
|
|
38426
38927
|
if (typeof window !== "undefined" && window.location) return withPath(window.location.origin, path);
|
|
38427
38928
|
}
|
|
38929
|
+
const redirectPlugin = {
|
|
38930
|
+
id: "redirect",
|
|
38931
|
+
name: "Redirect",
|
|
38932
|
+
hooks: { onSuccess(context) {
|
|
38933
|
+
if (context.data?.url && context.data?.redirect) {
|
|
38934
|
+
if (typeof window !== "undefined" && window.location) {
|
|
38935
|
+
if (window.location) try {
|
|
38936
|
+
window.location.href = context.data.url;
|
|
38937
|
+
} catch {
|
|
38938
|
+
}
|
|
38939
|
+
}
|
|
38940
|
+
}
|
|
38941
|
+
} }
|
|
38942
|
+
};
|
|
38428
38943
|
const PROTO_POLLUTION_PATTERNS = {
|
|
38429
38944
|
proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
|
|
38430
38945
|
constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
|
|
@@ -38493,132 +39008,26 @@ function betterJSONParse(value, options = {}) {
|
|
|
38493
39008
|
function parseJSON(value, options = { strict: true }) {
|
|
38494
39009
|
return betterJSONParse(value, options);
|
|
38495
39010
|
}
|
|
38496
|
-
|
|
38497
|
-
|
|
38498
|
-
const
|
|
38499
|
-
|
|
38500
|
-
|
|
38501
|
-
|
|
38502
|
-
|
|
38503
|
-
|
|
38504
|
-
|
|
38505
|
-
})();
|
|
38506
|
-
}
|
|
38507
|
-
return $atom.value;
|
|
38508
|
-
},
|
|
38509
|
-
lc: 0,
|
|
38510
|
-
listen(listener) {
|
|
38511
|
-
$atom.lc = listeners2.push(listener);
|
|
38512
|
-
return () => {
|
|
38513
|
-
for (let i2 = lqIndex + QUEUE_ITEMS_PER_LISTENER; i2 < listenerQueue.length; ) {
|
|
38514
|
-
if (listenerQueue[i2] === listener) {
|
|
38515
|
-
listenerQueue.splice(i2, QUEUE_ITEMS_PER_LISTENER);
|
|
38516
|
-
} else {
|
|
38517
|
-
i2 += QUEUE_ITEMS_PER_LISTENER;
|
|
38518
|
-
}
|
|
38519
|
-
}
|
|
38520
|
-
let index2 = listeners2.indexOf(listener);
|
|
38521
|
-
if (~index2) {
|
|
38522
|
-
listeners2.splice(index2, 1);
|
|
38523
|
-
if (!--$atom.lc) $atom.off();
|
|
38524
|
-
}
|
|
38525
|
-
};
|
|
38526
|
-
},
|
|
38527
|
-
notify(oldValue, changedKey) {
|
|
38528
|
-
let runListenerQueue = !listenerQueue.length;
|
|
38529
|
-
for (let listener of listeners2) {
|
|
38530
|
-
listenerQueue.push(listener, $atom.value, oldValue, changedKey);
|
|
38531
|
-
}
|
|
38532
|
-
if (runListenerQueue) {
|
|
38533
|
-
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER) {
|
|
38534
|
-
listenerQueue[lqIndex](
|
|
38535
|
-
listenerQueue[lqIndex + 1],
|
|
38536
|
-
listenerQueue[lqIndex + 2],
|
|
38537
|
-
listenerQueue[lqIndex + 3]
|
|
38538
|
-
);
|
|
38539
|
-
}
|
|
38540
|
-
listenerQueue.length = 0;
|
|
38541
|
-
}
|
|
38542
|
-
},
|
|
38543
|
-
/* It will be called on last listener unsubscribing.
|
|
38544
|
-
We will redefine it in onMount and onStop. */
|
|
38545
|
-
off() {
|
|
38546
|
-
},
|
|
38547
|
-
set(newValue) {
|
|
38548
|
-
let oldValue = $atom.value;
|
|
38549
|
-
if (oldValue !== newValue) {
|
|
38550
|
-
$atom.value = newValue;
|
|
38551
|
-
$atom.notify(oldValue);
|
|
38552
|
-
}
|
|
38553
|
-
},
|
|
38554
|
-
subscribe(listener) {
|
|
38555
|
-
let unbind = $atom.listen(listener);
|
|
38556
|
-
listener($atom.value);
|
|
38557
|
-
return unbind;
|
|
38558
|
-
},
|
|
38559
|
-
value: initialValue
|
|
38560
|
-
};
|
|
38561
|
-
return $atom;
|
|
38562
|
-
};
|
|
38563
|
-
const MOUNT = 5;
|
|
38564
|
-
const UNMOUNT = 6;
|
|
38565
|
-
const REVERT_MUTATION = 10;
|
|
38566
|
-
let on = (object2, listener, eventKey, mutateStore) => {
|
|
38567
|
-
object2.events = object2.events || {};
|
|
38568
|
-
if (!object2.events[eventKey + REVERT_MUTATION]) {
|
|
38569
|
-
object2.events[eventKey + REVERT_MUTATION] = mutateStore((eventProps) => {
|
|
38570
|
-
object2.events[eventKey].reduceRight((event, l2) => (l2(event), event), {
|
|
38571
|
-
shared: {},
|
|
38572
|
-
...eventProps
|
|
38573
|
-
});
|
|
39011
|
+
function getSessionAtom($fetch, options) {
|
|
39012
|
+
const $signal = /* @__PURE__ */ atom(false);
|
|
39013
|
+
const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
|
|
39014
|
+
onMount(session, () => {
|
|
39015
|
+
const refreshManager = createSessionRefreshManager({
|
|
39016
|
+
sessionAtom: session,
|
|
39017
|
+
sessionSignal: $signal,
|
|
39018
|
+
$fetch,
|
|
39019
|
+
options
|
|
38574
39020
|
});
|
|
38575
|
-
|
|
38576
|
-
object2.events[eventKey] = object2.events[eventKey] || [];
|
|
38577
|
-
object2.events[eventKey].push(listener);
|
|
38578
|
-
return () => {
|
|
38579
|
-
let currentListeners = object2.events[eventKey];
|
|
38580
|
-
let index2 = currentListeners.indexOf(listener);
|
|
38581
|
-
currentListeners.splice(index2, 1);
|
|
38582
|
-
if (!currentListeners.length) {
|
|
38583
|
-
delete object2.events[eventKey];
|
|
38584
|
-
object2.events[eventKey + REVERT_MUTATION]();
|
|
38585
|
-
delete object2.events[eventKey + REVERT_MUTATION];
|
|
38586
|
-
}
|
|
38587
|
-
};
|
|
38588
|
-
};
|
|
38589
|
-
let STORE_UNMOUNT_DELAY = 1e3;
|
|
38590
|
-
let onMount = ($store, initialize) => {
|
|
38591
|
-
let listener = (payload) => {
|
|
38592
|
-
let destroy = initialize(payload);
|
|
38593
|
-
if (destroy) $store.events[UNMOUNT].push(destroy);
|
|
38594
|
-
};
|
|
38595
|
-
return on($store, listener, MOUNT, (runListeners) => {
|
|
38596
|
-
let originListen = $store.listen;
|
|
38597
|
-
$store.listen = (...args) => {
|
|
38598
|
-
if (!$store.lc && !$store.active) {
|
|
38599
|
-
$store.active = true;
|
|
38600
|
-
runListeners();
|
|
38601
|
-
}
|
|
38602
|
-
return originListen(...args);
|
|
38603
|
-
};
|
|
38604
|
-
let originOff = $store.off;
|
|
38605
|
-
$store.events[UNMOUNT] = [];
|
|
38606
|
-
$store.off = () => {
|
|
38607
|
-
originOff();
|
|
38608
|
-
setTimeout(() => {
|
|
38609
|
-
if ($store.active && !$store.lc) {
|
|
38610
|
-
$store.active = false;
|
|
38611
|
-
for (let destroy of $store.events[UNMOUNT]) destroy();
|
|
38612
|
-
$store.events[UNMOUNT] = [];
|
|
38613
|
-
}
|
|
38614
|
-
}, STORE_UNMOUNT_DELAY);
|
|
38615
|
-
};
|
|
39021
|
+
refreshManager.init();
|
|
38616
39022
|
return () => {
|
|
38617
|
-
|
|
38618
|
-
$store.off = originOff;
|
|
39023
|
+
refreshManager.cleanup();
|
|
38619
39024
|
};
|
|
38620
39025
|
});
|
|
38621
|
-
|
|
39026
|
+
return {
|
|
39027
|
+
session,
|
|
39028
|
+
$sessionSignal: $signal
|
|
39029
|
+
};
|
|
39030
|
+
}
|
|
38622
39031
|
var __defProp = Object.defineProperty;
|
|
38623
39032
|
var __defProps = Object.defineProperties;
|
|
38624
39033
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -38646,6 +39055,7 @@ var BetterFetchError = class extends Error {
|
|
|
38646
39055
|
this.status = status;
|
|
38647
39056
|
this.statusText = statusText;
|
|
38648
39057
|
this.error = error;
|
|
39058
|
+
Error.captureStackTrace(this, this.constructor);
|
|
38649
39059
|
}
|
|
38650
39060
|
};
|
|
38651
39061
|
var initializePlugins = async (url, options) => {
|
|
@@ -38747,18 +39157,23 @@ var getAuthHeader = async (options) => {
|
|
|
38747
39157
|
}
|
|
38748
39158
|
headers["authorization"] = `Bearer ${token}`;
|
|
38749
39159
|
} else if (options.auth.type === "Basic") {
|
|
38750
|
-
const username =
|
|
38751
|
-
|
|
39160
|
+
const [username, password] = await Promise.all([
|
|
39161
|
+
getValue(options.auth.username),
|
|
39162
|
+
getValue(options.auth.password)
|
|
39163
|
+
]);
|
|
38752
39164
|
if (!username || !password) {
|
|
38753
39165
|
return headers;
|
|
38754
39166
|
}
|
|
38755
39167
|
headers["authorization"] = `Basic ${btoa(`${username}:${password}`)}`;
|
|
38756
39168
|
} else if (options.auth.type === "Custom") {
|
|
38757
|
-
const value =
|
|
39169
|
+
const [prefix, value] = await Promise.all([
|
|
39170
|
+
getValue(options.auth.prefix),
|
|
39171
|
+
getValue(options.auth.value)
|
|
39172
|
+
]);
|
|
38758
39173
|
if (!value) {
|
|
38759
39174
|
return headers;
|
|
38760
39175
|
}
|
|
38761
|
-
headers["authorization"] = `${
|
|
39176
|
+
headers["authorization"] = `${prefix != null ? prefix : ""} ${value}`;
|
|
38762
39177
|
}
|
|
38763
39178
|
}
|
|
38764
39179
|
return headers;
|
|
@@ -38866,6 +39281,12 @@ function getBody(options) {
|
|
|
38866
39281
|
}
|
|
38867
39282
|
return JSON.stringify(options.body);
|
|
38868
39283
|
}
|
|
39284
|
+
if (headers.has("content-type") && headers.get("content-type") === "application/x-www-form-urlencoded") {
|
|
39285
|
+
if (isJSONSerializable(options.body)) {
|
|
39286
|
+
return new URLSearchParams(options.body).toString();
|
|
39287
|
+
}
|
|
39288
|
+
return options.body;
|
|
39289
|
+
}
|
|
38869
39290
|
return options.body;
|
|
38870
39291
|
}
|
|
38871
39292
|
function getMethod$1(url, options) {
|
|
@@ -38904,7 +39325,7 @@ var ValidationError = class _ValidationError extends Error {
|
|
|
38904
39325
|
}
|
|
38905
39326
|
};
|
|
38906
39327
|
async function parseStandardSchema(schema, input) {
|
|
38907
|
-
|
|
39328
|
+
const result = await schema["~standard"].validate(input);
|
|
38908
39329
|
if (result.issues) {
|
|
38909
39330
|
throw new ValidationError(result.issues);
|
|
38910
39331
|
}
|
|
@@ -38966,7 +39387,7 @@ var applySchemaPlugin = (config2) => ({
|
|
|
38966
39387
|
var createFetch = (config2) => {
|
|
38967
39388
|
async function $fetch(url, options) {
|
|
38968
39389
|
const opts = __spreadProps(__spreadValues(__spreadValues({}, config2), options), {
|
|
38969
|
-
plugins: [...(config2 == null ? void 0 : config2.plugins) || [], applySchemaPlugin(config2 || {})]
|
|
39390
|
+
plugins: [...(config2 == null ? void 0 : config2.plugins) || [], applySchemaPlugin(config2 || {}), ...(options == null ? void 0 : options.plugins) || []]
|
|
38970
39391
|
});
|
|
38971
39392
|
if (config2 == null ? void 0 : config2.catchAllError) {
|
|
38972
39393
|
try {
|
|
@@ -38988,7 +39409,7 @@ var createFetch = (config2) => {
|
|
|
38988
39409
|
return $fetch;
|
|
38989
39410
|
};
|
|
38990
39411
|
function getURL2(url, option) {
|
|
38991
|
-
|
|
39412
|
+
const { baseURL, params, query } = option || {
|
|
38992
39413
|
query: {},
|
|
38993
39414
|
params: {},
|
|
38994
39415
|
baseURL: ""
|
|
@@ -39005,7 +39426,18 @@ function getURL2(url, option) {
|
|
|
39005
39426
|
const queryParams = new URLSearchParams(urlQuery);
|
|
39006
39427
|
for (const [key2, value] of Object.entries(query || {})) {
|
|
39007
39428
|
if (value == null) continue;
|
|
39008
|
-
|
|
39429
|
+
let serializedValue;
|
|
39430
|
+
if (typeof value === "string") {
|
|
39431
|
+
serializedValue = value;
|
|
39432
|
+
} else if (Array.isArray(value)) {
|
|
39433
|
+
for (const val of value) {
|
|
39434
|
+
queryParams.append(key2, val);
|
|
39435
|
+
}
|
|
39436
|
+
continue;
|
|
39437
|
+
} else {
|
|
39438
|
+
serializedValue = JSON.stringify(value);
|
|
39439
|
+
}
|
|
39440
|
+
queryParams.set(key2, serializedValue);
|
|
39009
39441
|
}
|
|
39010
39442
|
if (params) {
|
|
39011
39443
|
if (Array.isArray(params)) {
|
|
@@ -39054,7 +39486,7 @@ var betterFetch = async (url, options) => {
|
|
|
39054
39486
|
for (const onRequest of hooks.onRequest) {
|
|
39055
39487
|
if (onRequest) {
|
|
39056
39488
|
const res = await onRequest(context);
|
|
39057
|
-
if (res
|
|
39489
|
+
if (typeof res === "object" && res !== null) {
|
|
39058
39490
|
context = res;
|
|
39059
39491
|
}
|
|
39060
39492
|
}
|
|
@@ -39078,7 +39510,7 @@ var betterFetch = async (url, options) => {
|
|
|
39078
39510
|
}));
|
|
39079
39511
|
if (r2 instanceof Response) {
|
|
39080
39512
|
response = r2;
|
|
39081
|
-
} else if (r2
|
|
39513
|
+
} else if (typeof r2 === "object" && r2 !== null) {
|
|
39082
39514
|
response = r2.response;
|
|
39083
39515
|
}
|
|
39084
39516
|
}
|
|
@@ -39093,15 +39525,14 @@ var betterFetch = async (url, options) => {
|
|
|
39093
39525
|
}
|
|
39094
39526
|
const responseType = detectResponseType(response);
|
|
39095
39527
|
const successContext = {
|
|
39096
|
-
data:
|
|
39528
|
+
data: null,
|
|
39097
39529
|
response,
|
|
39098
39530
|
request: context
|
|
39099
39531
|
};
|
|
39100
39532
|
if (responseType === "json" || responseType === "text") {
|
|
39101
39533
|
const text = await response.text();
|
|
39102
39534
|
const parser2 = (_d = context.jsonParser) != null ? _d : jsonParse;
|
|
39103
|
-
|
|
39104
|
-
successContext.data = data;
|
|
39535
|
+
successContext.data = await parser2(text);
|
|
39105
39536
|
} else {
|
|
39106
39537
|
successContext.data = await response[responseType]();
|
|
39107
39538
|
}
|
|
@@ -39179,344 +39610,6 @@ var betterFetch = async (url, options) => {
|
|
|
39179
39610
|
})
|
|
39180
39611
|
};
|
|
39181
39612
|
};
|
|
39182
|
-
const kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
|
|
39183
|
-
const now$1 = () => Math.floor(Date.now() / 1e3);
|
|
39184
|
-
var WindowBroadcastChannel = class {
|
|
39185
|
-
listeners = /* @__PURE__ */ new Set();
|
|
39186
|
-
name;
|
|
39187
|
-
constructor(name = "better-auth.message") {
|
|
39188
|
-
this.name = name;
|
|
39189
|
-
}
|
|
39190
|
-
subscribe(listener) {
|
|
39191
|
-
this.listeners.add(listener);
|
|
39192
|
-
return () => {
|
|
39193
|
-
this.listeners.delete(listener);
|
|
39194
|
-
};
|
|
39195
|
-
}
|
|
39196
|
-
post(message) {
|
|
39197
|
-
if (typeof window === "undefined") return;
|
|
39198
|
-
try {
|
|
39199
|
-
localStorage.setItem(this.name, JSON.stringify({
|
|
39200
|
-
...message,
|
|
39201
|
-
timestamp: now$1()
|
|
39202
|
-
}));
|
|
39203
|
-
} catch {
|
|
39204
|
-
}
|
|
39205
|
-
}
|
|
39206
|
-
setup() {
|
|
39207
|
-
if (typeof window === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
39208
|
-
};
|
|
39209
|
-
const handler = (event) => {
|
|
39210
|
-
if (event.key !== this.name) return;
|
|
39211
|
-
const message = JSON.parse(event.newValue ?? "{}");
|
|
39212
|
-
if (message?.event !== "session" || !message?.data) return;
|
|
39213
|
-
this.listeners.forEach((listener) => listener(message));
|
|
39214
|
-
};
|
|
39215
|
-
window.addEventListener("storage", handler);
|
|
39216
|
-
return () => {
|
|
39217
|
-
window.removeEventListener("storage", handler);
|
|
39218
|
-
};
|
|
39219
|
-
}
|
|
39220
|
-
};
|
|
39221
|
-
function getGlobalBroadcastChannel(name = "better-auth.message") {
|
|
39222
|
-
if (!globalThis[kBroadcastChannel]) globalThis[kBroadcastChannel] = new WindowBroadcastChannel(name);
|
|
39223
|
-
return globalThis[kBroadcastChannel];
|
|
39224
|
-
}
|
|
39225
|
-
const kFocusManager = Symbol.for("better-auth:focus-manager");
|
|
39226
|
-
var WindowFocusManager = class {
|
|
39227
|
-
listeners = /* @__PURE__ */ new Set();
|
|
39228
|
-
subscribe(listener) {
|
|
39229
|
-
this.listeners.add(listener);
|
|
39230
|
-
return () => {
|
|
39231
|
-
this.listeners.delete(listener);
|
|
39232
|
-
};
|
|
39233
|
-
}
|
|
39234
|
-
setFocused(focused) {
|
|
39235
|
-
this.listeners.forEach((listener) => listener(focused));
|
|
39236
|
-
}
|
|
39237
|
-
setup() {
|
|
39238
|
-
if (typeof window === "undefined" || typeof document === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
39239
|
-
};
|
|
39240
|
-
const visibilityHandler = () => {
|
|
39241
|
-
if (document.visibilityState === "visible") this.setFocused(true);
|
|
39242
|
-
};
|
|
39243
|
-
document.addEventListener("visibilitychange", visibilityHandler, false);
|
|
39244
|
-
return () => {
|
|
39245
|
-
document.removeEventListener("visibilitychange", visibilityHandler, false);
|
|
39246
|
-
};
|
|
39247
|
-
}
|
|
39248
|
-
};
|
|
39249
|
-
function getGlobalFocusManager() {
|
|
39250
|
-
if (!globalThis[kFocusManager]) globalThis[kFocusManager] = new WindowFocusManager();
|
|
39251
|
-
return globalThis[kFocusManager];
|
|
39252
|
-
}
|
|
39253
|
-
const kOnlineManager = Symbol.for("better-auth:online-manager");
|
|
39254
|
-
var WindowOnlineManager = class {
|
|
39255
|
-
listeners = /* @__PURE__ */ new Set();
|
|
39256
|
-
isOnline = typeof navigator !== "undefined" ? navigator.onLine : true;
|
|
39257
|
-
subscribe(listener) {
|
|
39258
|
-
this.listeners.add(listener);
|
|
39259
|
-
return () => {
|
|
39260
|
-
this.listeners.delete(listener);
|
|
39261
|
-
};
|
|
39262
|
-
}
|
|
39263
|
-
setOnline(online) {
|
|
39264
|
-
this.isOnline = online;
|
|
39265
|
-
this.listeners.forEach((listener) => listener(online));
|
|
39266
|
-
}
|
|
39267
|
-
setup() {
|
|
39268
|
-
if (typeof window === "undefined" || typeof window.addEventListener === "undefined") return () => {
|
|
39269
|
-
};
|
|
39270
|
-
const onOnline = () => this.setOnline(true);
|
|
39271
|
-
const onOffline = () => this.setOnline(false);
|
|
39272
|
-
window.addEventListener("online", onOnline, false);
|
|
39273
|
-
window.addEventListener("offline", onOffline, false);
|
|
39274
|
-
return () => {
|
|
39275
|
-
window.removeEventListener("online", onOnline, false);
|
|
39276
|
-
window.removeEventListener("offline", onOffline, false);
|
|
39277
|
-
};
|
|
39278
|
-
}
|
|
39279
|
-
};
|
|
39280
|
-
function getGlobalOnlineManager() {
|
|
39281
|
-
if (!globalThis[kOnlineManager]) globalThis[kOnlineManager] = new WindowOnlineManager();
|
|
39282
|
-
return globalThis[kOnlineManager];
|
|
39283
|
-
}
|
|
39284
|
-
const isServer = () => typeof window === "undefined";
|
|
39285
|
-
const useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
39286
|
-
const value = /* @__PURE__ */ atom({
|
|
39287
|
-
data: null,
|
|
39288
|
-
error: null,
|
|
39289
|
-
isPending: true,
|
|
39290
|
-
isRefetching: false,
|
|
39291
|
-
refetch: (queryParams) => fn(queryParams)
|
|
39292
|
-
});
|
|
39293
|
-
const fn = async (queryParams) => {
|
|
39294
|
-
return new Promise((resolve) => {
|
|
39295
|
-
const opts = typeof options === "function" ? options({
|
|
39296
|
-
data: value.get().data,
|
|
39297
|
-
error: value.get().error,
|
|
39298
|
-
isPending: value.get().isPending
|
|
39299
|
-
}) : options;
|
|
39300
|
-
$fetch(path, {
|
|
39301
|
-
...opts,
|
|
39302
|
-
query: {
|
|
39303
|
-
...opts?.query,
|
|
39304
|
-
...queryParams?.query
|
|
39305
|
-
},
|
|
39306
|
-
async onSuccess(context) {
|
|
39307
|
-
value.set({
|
|
39308
|
-
data: context.data,
|
|
39309
|
-
error: null,
|
|
39310
|
-
isPending: false,
|
|
39311
|
-
isRefetching: false,
|
|
39312
|
-
refetch: value.value.refetch
|
|
39313
|
-
});
|
|
39314
|
-
await opts?.onSuccess?.(context);
|
|
39315
|
-
},
|
|
39316
|
-
async onError(context) {
|
|
39317
|
-
const { request } = context;
|
|
39318
|
-
const retryAttempts = typeof request.retry === "number" ? request.retry : request.retry?.attempts;
|
|
39319
|
-
const retryAttempt = request.retryAttempt || 0;
|
|
39320
|
-
if (retryAttempts && retryAttempt < retryAttempts) return;
|
|
39321
|
-
value.set({
|
|
39322
|
-
error: context.error,
|
|
39323
|
-
data: null,
|
|
39324
|
-
isPending: false,
|
|
39325
|
-
isRefetching: false,
|
|
39326
|
-
refetch: value.value.refetch
|
|
39327
|
-
});
|
|
39328
|
-
await opts?.onError?.(context);
|
|
39329
|
-
},
|
|
39330
|
-
async onRequest(context) {
|
|
39331
|
-
const currentValue = value.get();
|
|
39332
|
-
value.set({
|
|
39333
|
-
isPending: currentValue.data === null,
|
|
39334
|
-
data: currentValue.data,
|
|
39335
|
-
error: null,
|
|
39336
|
-
isRefetching: true,
|
|
39337
|
-
refetch: value.value.refetch
|
|
39338
|
-
});
|
|
39339
|
-
await opts?.onRequest?.(context);
|
|
39340
|
-
}
|
|
39341
|
-
}).catch((error) => {
|
|
39342
|
-
value.set({
|
|
39343
|
-
error,
|
|
39344
|
-
data: null,
|
|
39345
|
-
isPending: false,
|
|
39346
|
-
isRefetching: false,
|
|
39347
|
-
refetch: value.value.refetch
|
|
39348
|
-
});
|
|
39349
|
-
}).finally(() => {
|
|
39350
|
-
resolve(void 0);
|
|
39351
|
-
});
|
|
39352
|
-
});
|
|
39353
|
-
};
|
|
39354
|
-
initializedAtom = Array.isArray(initializedAtom) ? initializedAtom : [initializedAtom];
|
|
39355
|
-
let isMounted = false;
|
|
39356
|
-
for (const initAtom of initializedAtom) initAtom.subscribe(async () => {
|
|
39357
|
-
if (isServer()) return;
|
|
39358
|
-
if (isMounted) await fn();
|
|
39359
|
-
else onMount(value, () => {
|
|
39360
|
-
const timeoutId = setTimeout(async () => {
|
|
39361
|
-
if (!isMounted) {
|
|
39362
|
-
await fn();
|
|
39363
|
-
isMounted = true;
|
|
39364
|
-
}
|
|
39365
|
-
}, 0);
|
|
39366
|
-
return () => {
|
|
39367
|
-
value.off();
|
|
39368
|
-
initAtom.off();
|
|
39369
|
-
clearTimeout(timeoutId);
|
|
39370
|
-
};
|
|
39371
|
-
});
|
|
39372
|
-
});
|
|
39373
|
-
return value;
|
|
39374
|
-
};
|
|
39375
|
-
const now = () => Math.floor(Date.now() / 1e3);
|
|
39376
|
-
const FOCUS_REFETCH_RATE_LIMIT_SECONDS = 5;
|
|
39377
|
-
function createSessionRefreshManager(opts) {
|
|
39378
|
-
const { sessionAtom, sessionSignal, $fetch, options = {} } = opts;
|
|
39379
|
-
const refetchInterval = options.sessionOptions?.refetchInterval ?? 0;
|
|
39380
|
-
const refetchOnWindowFocus = options.sessionOptions?.refetchOnWindowFocus ?? true;
|
|
39381
|
-
const refetchWhenOffline = options.sessionOptions?.refetchWhenOffline ?? false;
|
|
39382
|
-
const state = {
|
|
39383
|
-
lastSync: 0,
|
|
39384
|
-
lastSessionRequest: 0,
|
|
39385
|
-
cachedSession: void 0
|
|
39386
|
-
};
|
|
39387
|
-
const shouldRefetch = () => {
|
|
39388
|
-
return refetchWhenOffline || getGlobalOnlineManager().isOnline;
|
|
39389
|
-
};
|
|
39390
|
-
const triggerRefetch = (event) => {
|
|
39391
|
-
if (!shouldRefetch()) return;
|
|
39392
|
-
if (event?.event === "storage") {
|
|
39393
|
-
state.lastSync = now();
|
|
39394
|
-
sessionSignal.set(!sessionSignal.get());
|
|
39395
|
-
return;
|
|
39396
|
-
}
|
|
39397
|
-
const currentSession = sessionAtom.get();
|
|
39398
|
-
if (event?.event === "poll") {
|
|
39399
|
-
state.lastSessionRequest = now();
|
|
39400
|
-
$fetch("/get-session").then((res) => {
|
|
39401
|
-
sessionAtom.set({
|
|
39402
|
-
...currentSession,
|
|
39403
|
-
data: res.data,
|
|
39404
|
-
error: res.error || null
|
|
39405
|
-
});
|
|
39406
|
-
state.lastSync = now();
|
|
39407
|
-
sessionSignal.set(!sessionSignal.get());
|
|
39408
|
-
}).catch(() => {
|
|
39409
|
-
});
|
|
39410
|
-
return;
|
|
39411
|
-
}
|
|
39412
|
-
if (event?.event === "visibilitychange") {
|
|
39413
|
-
if (now() - state.lastSessionRequest < FOCUS_REFETCH_RATE_LIMIT_SECONDS && currentSession?.data !== null && currentSession?.data !== void 0) return;
|
|
39414
|
-
}
|
|
39415
|
-
if (currentSession?.data === null || currentSession?.data === void 0 || event?.event === "visibilitychange") {
|
|
39416
|
-
if (event?.event === "visibilitychange") state.lastSessionRequest = now();
|
|
39417
|
-
state.lastSync = now();
|
|
39418
|
-
sessionSignal.set(!sessionSignal.get());
|
|
39419
|
-
}
|
|
39420
|
-
};
|
|
39421
|
-
const broadcastSessionUpdate = (trigger) => {
|
|
39422
|
-
getGlobalBroadcastChannel().post({
|
|
39423
|
-
event: "session",
|
|
39424
|
-
data: { trigger },
|
|
39425
|
-
clientId: Math.random().toString(36).substring(7)
|
|
39426
|
-
});
|
|
39427
|
-
};
|
|
39428
|
-
const setupPolling = () => {
|
|
39429
|
-
if (refetchInterval && refetchInterval > 0) state.pollInterval = setInterval(() => {
|
|
39430
|
-
if (sessionAtom.get()?.data) triggerRefetch({ event: "poll" });
|
|
39431
|
-
}, refetchInterval * 1e3);
|
|
39432
|
-
};
|
|
39433
|
-
const setupBroadcast = () => {
|
|
39434
|
-
state.unsubscribeBroadcast = getGlobalBroadcastChannel().subscribe(() => {
|
|
39435
|
-
triggerRefetch({ event: "storage" });
|
|
39436
|
-
});
|
|
39437
|
-
};
|
|
39438
|
-
const setupFocusRefetch = () => {
|
|
39439
|
-
if (!refetchOnWindowFocus) return;
|
|
39440
|
-
state.unsubscribeFocus = getGlobalFocusManager().subscribe(() => {
|
|
39441
|
-
triggerRefetch({ event: "visibilitychange" });
|
|
39442
|
-
});
|
|
39443
|
-
};
|
|
39444
|
-
const setupOnlineRefetch = () => {
|
|
39445
|
-
state.unsubscribeOnline = getGlobalOnlineManager().subscribe((online) => {
|
|
39446
|
-
if (online) triggerRefetch({ event: "visibilitychange" });
|
|
39447
|
-
});
|
|
39448
|
-
};
|
|
39449
|
-
const init2 = () => {
|
|
39450
|
-
setupPolling();
|
|
39451
|
-
setupBroadcast();
|
|
39452
|
-
setupFocusRefetch();
|
|
39453
|
-
setupOnlineRefetch();
|
|
39454
|
-
getGlobalBroadcastChannel().setup();
|
|
39455
|
-
getGlobalFocusManager().setup();
|
|
39456
|
-
getGlobalOnlineManager().setup();
|
|
39457
|
-
};
|
|
39458
|
-
const cleanup = () => {
|
|
39459
|
-
if (state.pollInterval) {
|
|
39460
|
-
clearInterval(state.pollInterval);
|
|
39461
|
-
state.pollInterval = void 0;
|
|
39462
|
-
}
|
|
39463
|
-
if (state.unsubscribeBroadcast) {
|
|
39464
|
-
state.unsubscribeBroadcast();
|
|
39465
|
-
state.unsubscribeBroadcast = void 0;
|
|
39466
|
-
}
|
|
39467
|
-
if (state.unsubscribeFocus) {
|
|
39468
|
-
state.unsubscribeFocus();
|
|
39469
|
-
state.unsubscribeFocus = void 0;
|
|
39470
|
-
}
|
|
39471
|
-
if (state.unsubscribeOnline) {
|
|
39472
|
-
state.unsubscribeOnline();
|
|
39473
|
-
state.unsubscribeOnline = void 0;
|
|
39474
|
-
}
|
|
39475
|
-
state.lastSync = 0;
|
|
39476
|
-
state.lastSessionRequest = 0;
|
|
39477
|
-
state.cachedSession = void 0;
|
|
39478
|
-
};
|
|
39479
|
-
return {
|
|
39480
|
-
init: init2,
|
|
39481
|
-
cleanup,
|
|
39482
|
-
triggerRefetch,
|
|
39483
|
-
broadcastSessionUpdate
|
|
39484
|
-
};
|
|
39485
|
-
}
|
|
39486
|
-
const redirectPlugin = {
|
|
39487
|
-
id: "redirect",
|
|
39488
|
-
name: "Redirect",
|
|
39489
|
-
hooks: { onSuccess(context) {
|
|
39490
|
-
if (context.data?.url && context.data?.redirect) {
|
|
39491
|
-
if (typeof window !== "undefined" && window.location) {
|
|
39492
|
-
if (window.location) try {
|
|
39493
|
-
window.location.href = context.data.url;
|
|
39494
|
-
} catch {
|
|
39495
|
-
}
|
|
39496
|
-
}
|
|
39497
|
-
}
|
|
39498
|
-
} }
|
|
39499
|
-
};
|
|
39500
|
-
function getSessionAtom($fetch, options) {
|
|
39501
|
-
const $signal = /* @__PURE__ */ atom(false);
|
|
39502
|
-
const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
|
|
39503
|
-
onMount(session, () => {
|
|
39504
|
-
const refreshManager = createSessionRefreshManager({
|
|
39505
|
-
sessionAtom: session,
|
|
39506
|
-
sessionSignal: $signal,
|
|
39507
|
-
$fetch,
|
|
39508
|
-
options
|
|
39509
|
-
});
|
|
39510
|
-
refreshManager.init();
|
|
39511
|
-
return () => {
|
|
39512
|
-
refreshManager.cleanup();
|
|
39513
|
-
};
|
|
39514
|
-
});
|
|
39515
|
-
return {
|
|
39516
|
-
session,
|
|
39517
|
-
$sessionSignal: $signal
|
|
39518
|
-
};
|
|
39519
|
-
}
|
|
39520
39613
|
const getClientConfig = (options, loadEnv) => {
|
|
39521
39614
|
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
39522
39615
|
const baseURL = getBaseURL(options?.baseURL, options?.basePath) ?? "/api/auth";
|
|
@@ -39531,7 +39624,7 @@ const getClientConfig = (options, loadEnv) => {
|
|
|
39531
39624
|
onResponse: options?.fetchOptions?.onResponse
|
|
39532
39625
|
}
|
|
39533
39626
|
};
|
|
39534
|
-
const { onSuccess, onError, onRequest, onResponse, ...restOfFetchOptions } = options?.fetchOptions || {};
|
|
39627
|
+
const { onSuccess: _onSuccess, onError: _onError, onRequest: _onRequest, onResponse: _onResponse, ...restOfFetchOptions } = options?.fetchOptions || {};
|
|
39535
39628
|
const $fetch = createFetch({
|
|
39536
39629
|
baseURL,
|
|
39537
39630
|
...isCredentialsSupported ? { credentials: "include" } : {},
|
|
@@ -39600,7 +39693,7 @@ function isAtom(value) {
|
|
|
39600
39693
|
}
|
|
39601
39694
|
function getMethod(path, knownPathMethods, args) {
|
|
39602
39695
|
const method = knownPathMethods[path];
|
|
39603
|
-
const { fetchOptions, query, ...body } = args || {};
|
|
39696
|
+
const { fetchOptions, query: _query, ...body } = args || {};
|
|
39604
39697
|
if (method) return method;
|
|
39605
39698
|
if (fetchOptions?.method) return fetchOptions.method;
|
|
39606
39699
|
if (body && Object.keys(body).length > 0) return "POST";
|
|
@@ -39811,6 +39904,18 @@ const passkeyClient = () => {
|
|
|
39811
39904
|
}]
|
|
39812
39905
|
};
|
|
39813
39906
|
};
|
|
39907
|
+
const ssoClient = (options) => {
|
|
39908
|
+
return {
|
|
39909
|
+
id: "sso-client",
|
|
39910
|
+
$InferServerPlugin: {}
|
|
39911
|
+
};
|
|
39912
|
+
};
|
|
39913
|
+
const magicLinkClient = () => {
|
|
39914
|
+
return {
|
|
39915
|
+
id: "magic-link",
|
|
39916
|
+
$InferServerPlugin: {}
|
|
39917
|
+
};
|
|
39918
|
+
};
|
|
39814
39919
|
const twoFactorClient = (options) => {
|
|
39815
39920
|
return {
|
|
39816
39921
|
id: "two-factor",
|
|
@@ -39836,12 +39941,6 @@ const twoFactorClient = (options) => {
|
|
|
39836
39941
|
}]
|
|
39837
39942
|
};
|
|
39838
39943
|
};
|
|
39839
|
-
const magicLinkClient = () => {
|
|
39840
|
-
return {
|
|
39841
|
-
id: "magic-link",
|
|
39842
|
-
$InferServerPlugin: {}
|
|
39843
|
-
};
|
|
39844
|
-
};
|
|
39845
39944
|
const getAuthClient = (backendURL) => createAuthClient({
|
|
39846
39945
|
baseURL: backendURL,
|
|
39847
39946
|
withCredentials: true,
|
|
@@ -39852,7 +39951,8 @@ const getAuthClient = (backendURL) => createAuthClient({
|
|
|
39852
39951
|
window.location.href = twoFaUrl;
|
|
39853
39952
|
} }),
|
|
39854
39953
|
passkeyClient(),
|
|
39855
|
-
magicLinkClient()
|
|
39954
|
+
magicLinkClient(),
|
|
39955
|
+
ssoClient()
|
|
39856
39956
|
]
|
|
39857
39957
|
});
|
|
39858
39958
|
const getAuthAPI = (intlayerConfig) => {
|
|
@@ -39887,7 +39987,7 @@ const getAuthAPI = (intlayerConfig) => {
|
|
|
39887
39987
|
return client2.getSession(...args);
|
|
39888
39988
|
};
|
|
39889
39989
|
const forgetPassword = async (...args) => {
|
|
39890
|
-
return client2.
|
|
39990
|
+
return client2.requestPasswordReset(...args);
|
|
39891
39991
|
};
|
|
39892
39992
|
const sendVerificationEmail = async (...args) => {
|
|
39893
39993
|
return client2.sendVerificationEmail(...args);
|
|
@@ -39958,6 +40058,9 @@ const getAuthAPI = (intlayerConfig) => {
|
|
|
39958
40058
|
const signInMagicLink = async (...args) => {
|
|
39959
40059
|
return client2.signIn.magicLink(...args);
|
|
39960
40060
|
};
|
|
40061
|
+
const signInSSO = async (...args) => {
|
|
40062
|
+
return client2.sso.signIn(...args);
|
|
40063
|
+
};
|
|
39961
40064
|
return {
|
|
39962
40065
|
getAuthClient: () => client2,
|
|
39963
40066
|
signInEmail,
|
|
@@ -39992,7 +40095,8 @@ const getAuthAPI = (intlayerConfig) => {
|
|
|
39992
40095
|
signInPasskey,
|
|
39993
40096
|
deletePasskey,
|
|
39994
40097
|
listPasskeys,
|
|
39995
|
-
signInMagicLink
|
|
40098
|
+
signInMagicLink,
|
|
40099
|
+
signInSSO
|
|
39996
40100
|
};
|
|
39997
40101
|
};
|
|
39998
40102
|
function useSession(sessionProp, intlayerConfiguration) {
|
|
@@ -44056,42 +44160,57 @@ const useItemSelector = (optionsRefs, { selector: selector2 = selectorDefault, i
|
|
|
44056
44160
|
}) => {
|
|
44057
44161
|
const [choiceIndicatorPosition, setChoiceIndicatorPosition] = reactExports.useState(null);
|
|
44058
44162
|
const [hoveredItem, setHoveredItem] = reactExports.useState(null);
|
|
44163
|
+
const hideTimeoutRef = reactExports.useRef(null);
|
|
44164
|
+
const lastPositionRef = reactExports.useRef(null);
|
|
44059
44165
|
const itemsLength = optionsRefs.current.length;
|
|
44060
44166
|
const calculatePosition = () => {
|
|
44061
44167
|
let targetElement = null;
|
|
44062
|
-
if (hoveredItem)
|
|
44063
|
-
|
|
44168
|
+
if (hoveredItem) {
|
|
44169
|
+
targetElement = hoveredItem;
|
|
44170
|
+
if (hideTimeoutRef.current) {
|
|
44171
|
+
clearTimeout(hideTimeoutRef.current);
|
|
44172
|
+
hideTimeoutRef.current = null;
|
|
44173
|
+
}
|
|
44174
|
+
} else targetElement = optionsRefs.current.find(selector2) ?? null;
|
|
44064
44175
|
if (!targetElement) {
|
|
44065
|
-
if (orientation === "vertical") setChoiceIndicatorPosition((prev) =>
|
|
44066
|
-
|
|
44067
|
-
|
|
44068
|
-
|
|
44069
|
-
|
|
44070
|
-
|
|
44071
|
-
|
|
44072
|
-
|
|
44073
|
-
|
|
44074
|
-
|
|
44075
|
-
|
|
44076
|
-
|
|
44176
|
+
if (orientation === "vertical") setChoiceIndicatorPosition((prev) => {
|
|
44177
|
+
const verticalPrev = prev;
|
|
44178
|
+
const newPosition = {
|
|
44179
|
+
top: verticalPrev?.top ?? 0,
|
|
44180
|
+
height: verticalPrev?.height ?? 0,
|
|
44181
|
+
opacity: 0
|
|
44182
|
+
};
|
|
44183
|
+
lastPositionRef.current = newPosition;
|
|
44184
|
+
return newPosition;
|
|
44185
|
+
});
|
|
44186
|
+
else setChoiceIndicatorPosition((prev) => {
|
|
44187
|
+
const horizontalPrev = prev;
|
|
44188
|
+
const newPosition = {
|
|
44189
|
+
left: horizontalPrev?.left ?? 0,
|
|
44190
|
+
width: horizontalPrev?.width ?? 0,
|
|
44191
|
+
opacity: 0
|
|
44192
|
+
};
|
|
44193
|
+
lastPositionRef.current = newPosition;
|
|
44194
|
+
return newPosition;
|
|
44195
|
+
});
|
|
44077
44196
|
return;
|
|
44078
44197
|
}
|
|
44079
44198
|
if (orientation === "vertical") {
|
|
44080
|
-
const
|
|
44081
|
-
|
|
44082
|
-
|
|
44083
|
-
top,
|
|
44084
|
-
height,
|
|
44199
|
+
const newPosition = {
|
|
44200
|
+
top: targetElement.offsetTop,
|
|
44201
|
+
height: targetElement.offsetHeight,
|
|
44085
44202
|
opacity: 1
|
|
44086
|
-
}
|
|
44203
|
+
};
|
|
44204
|
+
setChoiceIndicatorPosition(newPosition);
|
|
44205
|
+
lastPositionRef.current = newPosition;
|
|
44087
44206
|
} else {
|
|
44088
|
-
const
|
|
44089
|
-
|
|
44090
|
-
|
|
44091
|
-
left,
|
|
44092
|
-
width,
|
|
44207
|
+
const newPosition = {
|
|
44208
|
+
left: targetElement.offsetLeft,
|
|
44209
|
+
width: targetElement.offsetWidth,
|
|
44093
44210
|
opacity: 1
|
|
44094
|
-
}
|
|
44211
|
+
};
|
|
44212
|
+
setChoiceIndicatorPosition(newPosition);
|
|
44213
|
+
lastPositionRef.current = newPosition;
|
|
44095
44214
|
}
|
|
44096
44215
|
};
|
|
44097
44216
|
reactExports.useEffect(() => {
|
|
@@ -44127,16 +44246,24 @@ const useItemSelector = (optionsRefs, { selector: selector2 = selectorDefault, i
|
|
|
44127
44246
|
if (selectedItem) observeSize(selectedItem);
|
|
44128
44247
|
if (hoveredItem) observeSize(hoveredItem);
|
|
44129
44248
|
const handleMouseEnter = (event) => {
|
|
44249
|
+
if (hideTimeoutRef.current) {
|
|
44250
|
+
clearTimeout(hideTimeoutRef.current);
|
|
44251
|
+
hideTimeoutRef.current = null;
|
|
44252
|
+
}
|
|
44130
44253
|
setHoveredItem(event.currentTarget);
|
|
44131
44254
|
};
|
|
44132
44255
|
const handleMouseLeave = () => {
|
|
44133
|
-
|
|
44256
|
+
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
44257
|
+
hideTimeoutRef.current = setTimeout(() => {
|
|
44258
|
+
setHoveredItem(null);
|
|
44259
|
+
}, 150);
|
|
44134
44260
|
};
|
|
44135
44261
|
if (isHoverable) optionsRefs.current.forEach((option) => {
|
|
44136
44262
|
option?.addEventListener("mouseenter", handleMouseEnter, { passive: true });
|
|
44137
44263
|
option?.addEventListener("mouseleave", handleMouseLeave, { passive: true });
|
|
44138
44264
|
});
|
|
44139
44265
|
return () => {
|
|
44266
|
+
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
44140
44267
|
window.removeEventListener("resize", calculatePosition);
|
|
44141
44268
|
window.removeEventListener("DOMContentLoaded", calculatePosition);
|
|
44142
44269
|
mutationObservers.forEach((observer) => {
|
|
@@ -44180,7 +44307,7 @@ let SwitchSelectorColor = /* @__PURE__ */ (function(SwitchSelectorColor$1) {
|
|
|
44180
44307
|
SwitchSelectorColor$1["TEXT"] = "text";
|
|
44181
44308
|
return SwitchSelectorColor$1;
|
|
44182
44309
|
})({});
|
|
44183
|
-
const switchSelectorVariant = cva("flex w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.
|
|
44310
|
+
const switchSelectorVariant = cva("flex w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]", {
|
|
44184
44311
|
variants: { color: {
|
|
44185
44312
|
[`${SwitchSelectorColor.PRIMARY}`]: "border-primary text-primary",
|
|
44186
44313
|
[`${SwitchSelectorColor.SECONDARY}`]: "border-secondary text-secondary",
|
|
@@ -44206,7 +44333,7 @@ const choiceVariant = cva("z-1 w-full flex-1 cursor-pointer font-medium text-sm
|
|
|
44206
44333
|
} },
|
|
44207
44334
|
defaultVariants: { size: `${SwitchSelectorSize.MD}` }
|
|
44208
44335
|
});
|
|
44209
|
-
const indicatorVariant$1 = cva("absolute top-0 z-
|
|
44336
|
+
const indicatorVariant$1 = cva("absolute top-0 z-0 h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none", { variants: { color: {
|
|
44210
44337
|
[`${SwitchSelectorColor.PRIMARY}`]: "bg-primary data-[indicator=true]:text-text",
|
|
44211
44338
|
[`${SwitchSelectorColor.SECONDARY}`]: "bg-secondary data-[indicator=true]:text-text",
|
|
44212
44339
|
[`${SwitchSelectorColor.DESTRUCTIVE}`]: "bg-destructive data-[indicator=true]:text-text",
|
|
@@ -44391,7 +44518,7 @@ function cleanRegex(source) {
|
|
|
44391
44518
|
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
44392
44519
|
return source.slice(start, end);
|
|
44393
44520
|
}
|
|
44394
|
-
const EVALUATING = Symbol("evaluating");
|
|
44521
|
+
const EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
44395
44522
|
function defineLazy(object2, key2, getter) {
|
|
44396
44523
|
let value = void 0;
|
|
44397
44524
|
Object.defineProperty(object2, key2, {
|
|
@@ -46918,7 +47045,6 @@ const selector = (option) => option?.getAttribute("aria-active") === "true";
|
|
|
46918
47045
|
const OTPFieldContent = ({ field, name, label, description, isRequired, info, showErrorMessage, children, slots = 6, maxLength = 6, ...props }) => {
|
|
46919
47046
|
const { error } = useFormField();
|
|
46920
47047
|
const optionsRefs = reactExports.useRef([]);
|
|
46921
|
-
const indicatorRef = reactExports.useRef(null);
|
|
46922
47048
|
const { choiceIndicatorPosition, calculatePosition } = useItemSelector(optionsRefs, {
|
|
46923
47049
|
selector,
|
|
46924
47050
|
isHoverable: true
|
|
@@ -46983,10 +47109,7 @@ const OTPFieldContent = ({ field, name, label, description, isRequired, info, sh
|
|
|
46983
47109
|
}
|
|
46984
47110
|
})
|
|
46985
47111
|
] }),
|
|
46986
|
-
choiceIndicatorPosition && /* @__PURE__ */ jsxRuntimeExports.jsx(InputIndicator, {
|
|
46987
|
-
style: choiceIndicatorPosition,
|
|
46988
|
-
ref: indicatorRef
|
|
46989
|
-
})
|
|
47112
|
+
choiceIndicatorPosition && /* @__PURE__ */ jsxRuntimeExports.jsx(InputIndicator, { style: choiceIndicatorPosition })
|
|
46990
47113
|
] })
|
|
46991
47114
|
})
|
|
46992
47115
|
});
|
|
@@ -47033,17 +47156,17 @@ const AutoSizedTextAreaElement = (props) => /* @__PURE__ */ jsxRuntimeExports.js
|
|
|
47033
47156
|
"data-testid": props.name,
|
|
47034
47157
|
...props
|
|
47035
47158
|
});
|
|
47036
|
-
const CheckboxComponent = ({ inputLabel, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, {
|
|
47159
|
+
const CheckboxComponent = ({ inputLabel, value, onChange, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, {
|
|
47037
47160
|
...props,
|
|
47038
|
-
label: inputLabel
|
|
47161
|
+
label: inputLabel,
|
|
47162
|
+
checked: Boolean(value),
|
|
47163
|
+
onChange
|
|
47039
47164
|
});
|
|
47040
47165
|
const CheckboxElement = ({ autoComplete, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(FormElement, {
|
|
47041
47166
|
Element: CheckboxComponent,
|
|
47042
47167
|
id: props.name,
|
|
47043
47168
|
"data-testid": props.name,
|
|
47044
47169
|
autoComplete,
|
|
47045
|
-
minLength: 6,
|
|
47046
|
-
maxLength: 255,
|
|
47047
47170
|
...props
|
|
47048
47171
|
});
|
|
47049
47172
|
const MultiSelectFieldContent = ({ field, name, label, description, isRequired, info, showErrorMessage, children, ...props }) => {
|
|
@@ -47153,7 +47276,7 @@ const SwitchSelectorElement = ({ name, description, label, isRequired, info, sho
|
|
|
47153
47276
|
})
|
|
47154
47277
|
});
|
|
47155
47278
|
};
|
|
47156
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
47279
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
47157
47280
|
var use = React[" use ".trim().toString()];
|
|
47158
47281
|
function isPromiseLike(value) {
|
|
47159
47282
|
return typeof value === "object" && value !== null && "then" in value;
|
|
@@ -47209,7 +47332,7 @@ function createSlotClone(ownerName) {
|
|
|
47209
47332
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
47210
47333
|
return SlotClone;
|
|
47211
47334
|
}
|
|
47212
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
47335
|
+
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
47213
47336
|
function isSlottable(child) {
|
|
47214
47337
|
return reactExports.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
47215
47338
|
}
|
|
@@ -48354,7 +48477,11 @@ const DropDown = ({ children, className, identifier, ...props }) => /* @__PURE__
|
|
|
48354
48477
|
children
|
|
48355
48478
|
});
|
|
48356
48479
|
const Trigger = ({ children, identifier, className, label, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
48357
|
-
className: cn$2(
|
|
48480
|
+
className: cn$2([
|
|
48481
|
+
"w-full cursor-pointer",
|
|
48482
|
+
"group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4",
|
|
48483
|
+
className
|
|
48484
|
+
]),
|
|
48358
48485
|
label: label ?? `Open panel ${identifier}`,
|
|
48359
48486
|
"aria-haspopup": "true",
|
|
48360
48487
|
"aria-controls": `dropdown-panel-${identifier}`,
|
|
@@ -48372,7 +48499,7 @@ let DropDownAlign = /* @__PURE__ */ (function(DropDownAlign$1) {
|
|
|
48372
48499
|
return DropDownAlign$1;
|
|
48373
48500
|
})({});
|
|
48374
48501
|
const Panel = ({ children, isHidden: isHidden2 = void 0, isOverable = false, isFocusable = false, align = DropDownAlign.START, identifier, className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
48375
|
-
className: cn$2("absolute top-[calc(100%+0.5rem)] z-
|
|
48502
|
+
className: cn$2("absolute top-[calc(100%+0.5rem)] z-100 min-w-full", align === DropDownAlign.START && "left-0", align === DropDownAlign.END && "right-0", className),
|
|
48376
48503
|
"aria-hidden": isHidden2,
|
|
48377
48504
|
role: "region",
|
|
48378
48505
|
"aria-labelledby": `dropdown-trigger-${identifier}`,
|
|
@@ -50005,7 +50132,7 @@ const CodeDefault = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div
|
|
|
50005
50132
|
}, `line-${index2}-${line.slice(0, 10)}`)) })
|
|
50006
50133
|
})
|
|
50007
50134
|
});
|
|
50008
|
-
const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-
|
|
50135
|
+
const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-BZrNB-hp.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
|
|
50009
50136
|
const CodeBlock = ({ className, onChange, isEditable, children, lang, isDarkMode, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
50010
50137
|
className: cn$2("flex w-full min-w-0 max-w-full overflow-x-auto", className),
|
|
50011
50138
|
...props,
|
|
@@ -50035,18 +50162,16 @@ const PopoverStatic = ({ children, className, identifier, ...props }) => /* @__P
|
|
|
50035
50162
|
...props,
|
|
50036
50163
|
children
|
|
50037
50164
|
});
|
|
50038
|
-
const Detail =
|
|
50039
|
-
ref,
|
|
50165
|
+
const Detail = ({ children, isHidden: isHidden2 = void 0, isOverable = true, isFocusable = false, xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, identifier, className, displayArrow = true, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Container, {
|
|
50040
50166
|
transparency: "sm",
|
|
50041
50167
|
role: "group",
|
|
50042
50168
|
"aria-hidden": isHidden2,
|
|
50043
50169
|
"aria-labelledby": `unrollable-panel-button-${identifier}`,
|
|
50044
50170
|
id: `unrollable-panel-${identifier}`,
|
|
50045
|
-
className: cn$2("absolute z-
|
|
50171
|
+
className: cn$2("absolute z-50 min-w-full rounded-md ring-1 ring-neutral", xAlign === "start" && "left-0", xAlign === "end" && "right-0", yAlign === "bellow" && "top-[calc(100%+1rem)]", yAlign === "above" && "bottom-[calc(100%+1rem)]", displayArrow && 'before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]', displayArrow && xAlign === "start" && "before:left-2", displayArrow && xAlign === "end" && "before:right-2", displayArrow && yAlign === "bellow" && "before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent", displayArrow && yAlign === "above" && "before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent", "overflow-x-visible opacity-0 transition-all duration-400 ease-in-out", isHidden2 !== false ? "invisible" : "visible opacity-100 delay-800", isOverable && "group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800", isFocusable && "group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800", className),
|
|
50046
50172
|
...props,
|
|
50047
50173
|
children
|
|
50048
|
-
})
|
|
50049
|
-
Detail.displayName = "Popover.Detail";
|
|
50174
|
+
});
|
|
50050
50175
|
PopoverStatic.Detail = Detail;
|
|
50051
50176
|
const PopoverComponent = (props) => {
|
|
50052
50177
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverStatic, { ...props });
|
|
@@ -54676,9 +54801,7 @@ const DictionaryFieldEditor = ({
|
|
|
54676
54801
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchSelector, {
|
|
54677
54802
|
defaultValue: editorView,
|
|
54678
54803
|
onChange: (value) => setEditorView(value),
|
|
54679
|
-
color:
|
|
54680
|
-
size: SwitchSelectorSize.SM,
|
|
54681
|
-
className: "m-auto w-full max-w-xl",
|
|
54804
|
+
color: "text",
|
|
54682
54805
|
choices: [{
|
|
54683
54806
|
content: "Details",
|
|
54684
54807
|
value: EditorViewType.DetailsEditor
|
|
@@ -54716,17 +54839,6 @@ const DictionaryFieldEditor = ({
|
|
|
54716
54839
|
})
|
|
54717
54840
|
});
|
|
54718
54841
|
};
|
|
54719
|
-
const MaxWidthSmoother = ({ children, isHidden: isHidden2, minWidth = 0, align = "left", className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
54720
|
-
className: cn$2("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out", isHidden2 ? "" : "grid-cols-[1fr]", className),
|
|
54721
|
-
"aria-hidden": isHidden2,
|
|
54722
|
-
...props,
|
|
54723
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
54724
|
-
style: { minWidth: `${minWidth}px` },
|
|
54725
|
-
tabIndex: isHidden2 !== false ? void 0 : -1,
|
|
54726
|
-
className: cn$2(align === "right" && "ml-auto"),
|
|
54727
|
-
children
|
|
54728
|
-
})
|
|
54729
|
-
});
|
|
54730
54842
|
const getBreakpointFromSize = (breakpoint) => {
|
|
54731
54843
|
switch (breakpoint) {
|
|
54732
54844
|
case "xs":
|
|
@@ -54790,6 +54902,17 @@ const useDevice = (breakpoint = "md") => {
|
|
|
54790
54902
|
}, [breakpoint]);
|
|
54791
54903
|
return result;
|
|
54792
54904
|
};
|
|
54905
|
+
const MaxWidthSmoother = ({ children, isHidden: isHidden2, minWidth = 0, align = "left", className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
54906
|
+
className: cn$2("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out", isHidden2 ? "" : "grid-cols-[1fr]", className),
|
|
54907
|
+
"aria-hidden": isHidden2,
|
|
54908
|
+
...props,
|
|
54909
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
54910
|
+
style: { minWidth: `${minWidth}px` },
|
|
54911
|
+
tabIndex: isHidden2 !== false ? void 0 : -1,
|
|
54912
|
+
className: cn$2(align === "right" && "ml-auto"),
|
|
54913
|
+
children
|
|
54914
|
+
})
|
|
54915
|
+
});
|
|
54793
54916
|
const useRightDrawerStore = create$1((set2, get2) => ({
|
|
54794
54917
|
drawers: {},
|
|
54795
54918
|
open: (key2) => set2((state) => ({ drawers: {
|
|
@@ -55011,14 +55134,14 @@ const containerVariants = cva("w-fit backdrop-blur", {
|
|
|
55011
55134
|
},
|
|
55012
55135
|
size: {
|
|
55013
55136
|
[`${TagSize.XS}`]: "border-[1.2px] px-2 py-0.5 text-xs",
|
|
55014
|
-
[`${TagSize.SM}`]: "border-[1.
|
|
55137
|
+
[`${TagSize.SM}`]: "border-[1.3px] px-2 py-0.5 text-sm",
|
|
55015
55138
|
[`${TagSize.MD}`]: "border-2 px-2 py-1 text-base",
|
|
55016
55139
|
[`${TagSize.LG}`]: "border-2 px-3 py-2 text-lg",
|
|
55017
55140
|
[`${TagSize.XL}`]: "border-2 px-3 py-2 text-xl"
|
|
55018
55141
|
},
|
|
55019
55142
|
border: {
|
|
55020
55143
|
[`${TagBorder.NONE}`]: "border-none",
|
|
55021
|
-
[`${TagBorder.WITH}`]: "border-[1.
|
|
55144
|
+
[`${TagBorder.WITH}`]: "border-[1.3px] border-text"
|
|
55022
55145
|
},
|
|
55023
55146
|
background: {
|
|
55024
55147
|
[`${TagBackground.NONE}`]: "bg-none",
|
|
@@ -55935,7 +56058,7 @@ const AppProvider = (t0) => {
|
|
|
55935
56058
|
children
|
|
55936
56059
|
} = t0;
|
|
55937
56060
|
let t1;
|
|
55938
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56061
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
55939
56062
|
t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(Toaster, {});
|
|
55940
56063
|
$2[0] = t1;
|
|
55941
56064
|
} else {
|
|
@@ -56187,14 +56310,14 @@ const DictionaryEditionDrawerContent = (t0) => {
|
|
|
56187
56310
|
return t32;
|
|
56188
56311
|
}
|
|
56189
56312
|
let t3;
|
|
56190
|
-
if ($2[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56313
|
+
if ($2[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56191
56314
|
t3 = () => setEditionModalOpen(false);
|
|
56192
56315
|
$2[10] = t3;
|
|
56193
56316
|
} else {
|
|
56194
56317
|
t3 = $2[10];
|
|
56195
56318
|
}
|
|
56196
56319
|
let t4;
|
|
56197
|
-
if ($2[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56320
|
+
if ($2[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56198
56321
|
t4 = ["local", "remote"];
|
|
56199
56322
|
$2[11] = t4;
|
|
56200
56323
|
} else {
|
|
@@ -56212,7 +56335,7 @@ const DictionaryEditionDrawerContent = (t0) => {
|
|
|
56212
56335
|
t5 = $2[13];
|
|
56213
56336
|
}
|
|
56214
56337
|
let t6;
|
|
56215
|
-
if ($2[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56338
|
+
if ($2[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56216
56339
|
t6 = () => {
|
|
56217
56340
|
setEditionModalOpen(false);
|
|
56218
56341
|
};
|
|
@@ -56272,7 +56395,7 @@ const DictionaryEditionDrawerContent = (t0) => {
|
|
|
56272
56395
|
t10 = $2[25];
|
|
56273
56396
|
}
|
|
56274
56397
|
let t11;
|
|
56275
|
-
if ($2[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56398
|
+
if ($2[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56276
56399
|
t11 = () => setEditionModalOpen(true);
|
|
56277
56400
|
$2[26] = t11;
|
|
56278
56401
|
} else {
|
|
@@ -56358,7 +56481,7 @@ const DictionaryEditionDrawerContent = (t0) => {
|
|
|
56358
56481
|
t17 = $2[41];
|
|
56359
56482
|
}
|
|
56360
56483
|
let t18;
|
|
56361
|
-
if ($2[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56484
|
+
if ($2[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56362
56485
|
t18 = ["local", "remote"];
|
|
56363
56486
|
$2[42] = t18;
|
|
56364
56487
|
} else {
|
|
@@ -56491,7 +56614,7 @@ const DictionaryEditionDrawerController = (t0) => {
|
|
|
56491
56614
|
const dictionaryKey = focusedContent?.dictionaryKey;
|
|
56492
56615
|
if (!dictionaryKey) {
|
|
56493
56616
|
let t12;
|
|
56494
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56617
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56495
56618
|
t12 = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
56496
56619
|
$2[0] = t12;
|
|
56497
56620
|
} else {
|
|
@@ -56799,7 +56922,7 @@ const EditorLayout = (t0) => {
|
|
|
56799
56922
|
t2 = $2[3];
|
|
56800
56923
|
}
|
|
56801
56924
|
let t3;
|
|
56802
|
-
if ($2[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56925
|
+
if ($2[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56803
56926
|
t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(DictionaryListDrawer, {});
|
|
56804
56927
|
$2[4] = t3;
|
|
56805
56928
|
} else {
|
|
@@ -56827,7 +56950,7 @@ const useIntlayerConfig = () => {
|
|
|
56827
56950
|
const [intlayerConfig, setIntlayerConfig] = reactExports.useState();
|
|
56828
56951
|
let t0;
|
|
56829
56952
|
let t1;
|
|
56830
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56953
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56831
56954
|
t0 = () => {
|
|
56832
56955
|
fetch("/api/config").then(_temp).then((data) => setIntlayerConfig(data.data));
|
|
56833
56956
|
};
|
|
@@ -56855,7 +56978,7 @@ const EditorProvider = (t0) => {
|
|
|
56855
56978
|
const editorURL = intlayerConfig?.editor.editorURL ?? "*";
|
|
56856
56979
|
if (!intlayerConfig) {
|
|
56857
56980
|
let t12;
|
|
56858
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56981
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56859
56982
|
t12 = /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {});
|
|
56860
56983
|
$2[0] = t12;
|
|
56861
56984
|
} else {
|
|
@@ -56957,7 +57080,7 @@ const useEditedContentPersistence = () => {
|
|
|
56957
57080
|
t3 = $2[7];
|
|
56958
57081
|
}
|
|
56959
57082
|
let t4;
|
|
56960
|
-
if ($2[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57083
|
+
if ($2[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
56961
57084
|
t4 = [];
|
|
56962
57085
|
$2[8] = t4;
|
|
56963
57086
|
} else {
|
|
@@ -57048,7 +57171,7 @@ const IframeController = (t0) => {
|
|
|
57048
57171
|
useIframeClickMerger();
|
|
57049
57172
|
const [loading, setLoading] = reactExports.useState(true);
|
|
57050
57173
|
let t1;
|
|
57051
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57174
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
57052
57175
|
t1 = {
|
|
57053
57176
|
receive: true,
|
|
57054
57177
|
emit: false
|
|
@@ -57078,7 +57201,7 @@ const IframeController = (t0) => {
|
|
|
57078
57201
|
reactExports.useEffect(t2, t3);
|
|
57079
57202
|
if (!editor2.applicationURL) {
|
|
57080
57203
|
let t42;
|
|
57081
|
-
if ($2[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57204
|
+
if ($2[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
57082
57205
|
t42 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { className: "flex max-w-xl flex-col gap-4 p-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(NoApplicationURLView, {}) }) });
|
|
57083
57206
|
$2[4] = t42;
|
|
57084
57207
|
} else {
|
|
@@ -57157,7 +57280,7 @@ const AppContent = () => {
|
|
|
57157
57280
|
const App = () => {
|
|
57158
57281
|
const $2 = compilerRuntimeExports.c(1);
|
|
57159
57282
|
let t0;
|
|
57160
|
-
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57283
|
+
if ($2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
57161
57284
|
t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(AppRouter, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppContent, {}) }) });
|
|
57162
57285
|
$2[0] = t0;
|
|
57163
57286
|
} else {
|