@yenio-pld/blocks 1.2.0-rc.3 → 1.2.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1301 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +1195 -2
- package/dist/index.js.map +1 -1
- package/dist/ui/combobox.d.ts +1 -0
- package/dist/ui/combobox.js +4 -0
- package/dist/ui/combobox.js.map +1 -0
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var skeleton_js = require('./ui/skeleton.js');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
@@ -19,15 +19,36 @@ var card_js = require('./ui/card.js');
|
|
|
19
19
|
var classVarianceAuthority = require('class-variance-authority');
|
|
20
20
|
var alertDialog_js = require('./ui/alert-dialog.js');
|
|
21
21
|
var nextThemes = require('next-themes');
|
|
22
|
+
var combobox_js = require('./ui/combobox.js');
|
|
22
23
|
var slider_js = require('./ui/slider.js');
|
|
23
24
|
var toggle_js = require('./ui/toggle.js');
|
|
24
25
|
var dialog_js = require('./ui/dialog.js');
|
|
25
26
|
var drawer_js = require('./ui/drawer.js');
|
|
26
27
|
var framerMotion = require('framer-motion');
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
function _interopNamespace(e) {
|
|
30
|
+
if (e && e.__esModule) return e;
|
|
31
|
+
var n = Object.create(null);
|
|
32
|
+
if (e) {
|
|
33
|
+
Object.keys(e).forEach(function (k) {
|
|
34
|
+
if (k !== 'default') {
|
|
35
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
36
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return e[k]; }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
n.default = e;
|
|
44
|
+
return Object.freeze(n);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
48
|
+
|
|
49
|
+
var LanguageContext = React.createContext(null);
|
|
29
50
|
function useLanguageContext() {
|
|
30
|
-
return
|
|
51
|
+
return React.useContext(LanguageContext);
|
|
31
52
|
}
|
|
32
53
|
function PageTitle({
|
|
33
54
|
title,
|
|
@@ -257,8 +278,8 @@ function renderShellLink({
|
|
|
257
278
|
}
|
|
258
279
|
function DismissMobileSidebar({ pathname }) {
|
|
259
280
|
const { setOpenMobile } = sidebar_js.useSidebar();
|
|
260
|
-
const previous =
|
|
261
|
-
|
|
281
|
+
const previous = React.useRef(pathname);
|
|
282
|
+
React.useEffect(() => {
|
|
262
283
|
if (previous.current === pathname) return;
|
|
263
284
|
previous.current = pathname;
|
|
264
285
|
setOpenMobile(false);
|
|
@@ -376,7 +397,7 @@ function NavTabs({
|
|
|
376
397
|
"aria-current": active ? "page" : void 0,
|
|
377
398
|
children: tab.label
|
|
378
399
|
});
|
|
379
|
-
return
|
|
400
|
+
return React.cloneElement(link, { key: tab.href });
|
|
380
401
|
})
|
|
381
402
|
}
|
|
382
403
|
);
|
|
@@ -682,15 +703,15 @@ function NavigationProgress({
|
|
|
682
703
|
ariaLabel = "Loading",
|
|
683
704
|
forceVisible = false
|
|
684
705
|
}) {
|
|
685
|
-
const [visible, setVisible] =
|
|
686
|
-
const [runId, setRunId] =
|
|
687
|
-
const startedAt =
|
|
688
|
-
const startedRoute =
|
|
689
|
-
const committedRoute =
|
|
690
|
-
|
|
706
|
+
const [visible, setVisible] = React.useState(forceVisible);
|
|
707
|
+
const [runId, setRunId] = React.useState(0);
|
|
708
|
+
const startedAt = React.useRef(0);
|
|
709
|
+
const startedRoute = React.useRef(null);
|
|
710
|
+
const committedRoute = React.useRef(null);
|
|
711
|
+
React.useEffect(() => {
|
|
691
712
|
committedRoute.current = routeKey(pathname, search);
|
|
692
713
|
}, [pathname, search]);
|
|
693
|
-
|
|
714
|
+
React.useEffect(() => {
|
|
694
715
|
if (forceVisible) return;
|
|
695
716
|
function begin(route) {
|
|
696
717
|
if (navigationSuppressed) return;
|
|
@@ -727,12 +748,12 @@ function NavigationProgress({
|
|
|
727
748
|
window.removeEventListener("popstate", onPopState);
|
|
728
749
|
};
|
|
729
750
|
}, [forceVisible, pathname, search]);
|
|
730
|
-
|
|
751
|
+
React.useEffect(() => {
|
|
731
752
|
if (forceVisible || !visible) return;
|
|
732
753
|
const safety = window.setTimeout(() => setVisible(false), SAFETY_MS);
|
|
733
754
|
return () => window.clearTimeout(safety);
|
|
734
755
|
}, [forceVisible, runId, visible]);
|
|
735
|
-
|
|
756
|
+
React.useEffect(() => {
|
|
736
757
|
if (forceVisible || !visible) return;
|
|
737
758
|
const started = startedRoute.current;
|
|
738
759
|
if (!started) return;
|
|
@@ -1152,20 +1173,20 @@ function useEditableSection({
|
|
|
1152
1173
|
...DEFAULT_EDITABLE_SECTION_LABELS,
|
|
1153
1174
|
...labels
|
|
1154
1175
|
};
|
|
1155
|
-
const [mode, setMode] =
|
|
1156
|
-
const [status, setStatus] =
|
|
1157
|
-
const [confirmOpen, setConfirmOpen] =
|
|
1158
|
-
const [minHeightPx, setMinHeightPx] =
|
|
1159
|
-
const contentRef =
|
|
1160
|
-
const editButtonRef =
|
|
1161
|
-
const measuredHeightRef =
|
|
1162
|
-
const shouldFocusEditRef =
|
|
1163
|
-
const shouldFocusFirstFieldRef =
|
|
1164
|
-
const editButtonId =
|
|
1165
|
-
const contentFormId =
|
|
1176
|
+
const [mode, setMode] = React.useState("reading");
|
|
1177
|
+
const [status, setStatus] = React.useState(null);
|
|
1178
|
+
const [confirmOpen, setConfirmOpen] = React.useState(false);
|
|
1179
|
+
const [minHeightPx, setMinHeightPx] = React.useState(void 0);
|
|
1180
|
+
const contentRef = React.useRef(null);
|
|
1181
|
+
const editButtonRef = React.useRef(null);
|
|
1182
|
+
const measuredHeightRef = React.useRef(0);
|
|
1183
|
+
const shouldFocusEditRef = React.useRef(false);
|
|
1184
|
+
const shouldFocusFirstFieldRef = React.useRef(false);
|
|
1185
|
+
const editButtonId = React.useId();
|
|
1186
|
+
const contentFormId = React.useId();
|
|
1166
1187
|
const isEditing = mode === "editing" || mode === "saving";
|
|
1167
1188
|
const isSaving = mode === "saving";
|
|
1168
|
-
|
|
1189
|
+
React.useEffect(() => {
|
|
1169
1190
|
if (mode === "reading" && shouldFocusEditRef.current) {
|
|
1170
1191
|
shouldFocusEditRef.current = false;
|
|
1171
1192
|
editButtonRef.current?.focus();
|
|
@@ -1183,18 +1204,18 @@ function useEditableSection({
|
|
|
1183
1204
|
focusFirstField(contentRef.current);
|
|
1184
1205
|
}
|
|
1185
1206
|
}, [mode]);
|
|
1186
|
-
const exitToReading =
|
|
1207
|
+
const exitToReading = React.useCallback(() => {
|
|
1187
1208
|
setConfirmOpen(false);
|
|
1188
1209
|
shouldFocusEditRef.current = true;
|
|
1189
1210
|
setMode("reading");
|
|
1190
1211
|
onDiscard?.();
|
|
1191
1212
|
}, [onDiscard]);
|
|
1192
|
-
const startEdit =
|
|
1213
|
+
const startEdit = React.useCallback(() => {
|
|
1193
1214
|
setStatus(null);
|
|
1194
1215
|
shouldFocusFirstFieldRef.current = true;
|
|
1195
1216
|
setMode("editing");
|
|
1196
1217
|
}, []);
|
|
1197
|
-
const requestCancel =
|
|
1218
|
+
const requestCancel = React.useCallback(() => {
|
|
1198
1219
|
if (isSaving) return;
|
|
1199
1220
|
if (isDirty) {
|
|
1200
1221
|
setConfirmOpen(true);
|
|
@@ -1202,7 +1223,7 @@ function useEditableSection({
|
|
|
1202
1223
|
}
|
|
1203
1224
|
exitToReading();
|
|
1204
1225
|
}, [exitToReading, isDirty, isSaving]);
|
|
1205
|
-
const handleSubmit =
|
|
1226
|
+
const handleSubmit = React.useCallback(
|
|
1206
1227
|
(event) => {
|
|
1207
1228
|
event.preventDefault();
|
|
1208
1229
|
if (isSaving) return;
|
|
@@ -1222,7 +1243,7 @@ function useEditableSection({
|
|
|
1222
1243
|
},
|
|
1223
1244
|
[isSaving, onSave, resolvedLabels.saved]
|
|
1224
1245
|
);
|
|
1225
|
-
const handleFormKeyDown =
|
|
1246
|
+
const handleFormKeyDown = React.useCallback(
|
|
1226
1247
|
(event) => {
|
|
1227
1248
|
if (event.key !== "Escape") return;
|
|
1228
1249
|
event.preventDefault();
|
|
@@ -1230,7 +1251,7 @@ function useEditableSection({
|
|
|
1230
1251
|
},
|
|
1231
1252
|
[requestCancel]
|
|
1232
1253
|
);
|
|
1233
|
-
|
|
1254
|
+
React.useEffect(() => {
|
|
1234
1255
|
if (!stableHeight || !isEditing) return;
|
|
1235
1256
|
const el = contentRef.current;
|
|
1236
1257
|
if (!el) return;
|
|
@@ -1469,13 +1490,13 @@ function SafeImage({
|
|
|
1469
1490
|
onError,
|
|
1470
1491
|
...imgProps
|
|
1471
1492
|
}) {
|
|
1472
|
-
const [failed, setFailed] =
|
|
1473
|
-
const imgRef =
|
|
1493
|
+
const [failed, setFailed] = React.useState(false);
|
|
1494
|
+
const imgRef = React.useRef(null);
|
|
1474
1495
|
const resolvedSrc = typeof src === "string" && src.length > 0 ? src : null;
|
|
1475
|
-
|
|
1496
|
+
React.useLayoutEffect(() => {
|
|
1476
1497
|
setFailed(false);
|
|
1477
1498
|
}, [resolvedSrc]);
|
|
1478
|
-
|
|
1499
|
+
React.useLayoutEffect(() => {
|
|
1479
1500
|
const img = imgRef.current;
|
|
1480
1501
|
if (img && isBrokenImage(img)) {
|
|
1481
1502
|
setFailed(true);
|
|
@@ -1537,17 +1558,17 @@ function ThemeSwitcher({
|
|
|
1537
1558
|
labels: userLabels
|
|
1538
1559
|
}) {
|
|
1539
1560
|
const { theme, setTheme } = nextThemes.useTheme();
|
|
1540
|
-
const [mounted, setMounted] =
|
|
1561
|
+
const [mounted, setMounted] = React.useState(false);
|
|
1541
1562
|
const sizes = sizeClasses[size];
|
|
1542
1563
|
const shapeClass = shapeClasses[shape];
|
|
1543
1564
|
const labels = { ...defaultLabels, ...userLabels };
|
|
1544
|
-
const handleThemeClick =
|
|
1565
|
+
const handleThemeClick = React.useCallback(
|
|
1545
1566
|
(themeKey) => {
|
|
1546
1567
|
setTheme(themeKey);
|
|
1547
1568
|
},
|
|
1548
1569
|
[setTheme]
|
|
1549
1570
|
);
|
|
1550
|
-
|
|
1571
|
+
React.useEffect(() => {
|
|
1551
1572
|
setMounted(true);
|
|
1552
1573
|
}, []);
|
|
1553
1574
|
if (!mounted) {
|
|
@@ -1698,6 +1719,1197 @@ function LanguageSwitcher({
|
|
|
1698
1719
|
)
|
|
1699
1720
|
] });
|
|
1700
1721
|
}
|
|
1722
|
+
|
|
1723
|
+
// src/data/countries.json
|
|
1724
|
+
var countries_default = [
|
|
1725
|
+
{
|
|
1726
|
+
code: "AF",
|
|
1727
|
+
labelEs: "AFGANISTAN"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
code: "AL",
|
|
1731
|
+
labelEs: "ALBANIA"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
code: "DE",
|
|
1735
|
+
labelEs: "ALEMANIA"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
code: "AD",
|
|
1739
|
+
labelEs: "ANDORRA"
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
code: "AO",
|
|
1743
|
+
labelEs: "ANGOLA"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
code: "AI",
|
|
1747
|
+
labelEs: "ANGUILA"
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
code: "AQ",
|
|
1751
|
+
labelEs: "ANTARTIDA"
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
code: "AG",
|
|
1755
|
+
labelEs: "ANTIGUA Y BARBUDA"
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
code: "AN",
|
|
1759
|
+
labelEs: "ANTILLAS NEERLANDESAS"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
code: "SA",
|
|
1763
|
+
labelEs: "ARABIA SAUDI"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
code: "DZ",
|
|
1767
|
+
labelEs: "ARGELIA"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
code: "AR",
|
|
1771
|
+
labelEs: "ARGENTINA"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
code: "AM",
|
|
1775
|
+
labelEs: "ARMENIA"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
code: "AW",
|
|
1779
|
+
labelEs: "ARUBA"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
code: "AU",
|
|
1783
|
+
labelEs: "AUSTRALIA"
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
code: "AT",
|
|
1787
|
+
labelEs: "AUSTRIA"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
code: "AZ",
|
|
1791
|
+
labelEs: "AZERBAIYAN"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
code: "BS",
|
|
1795
|
+
labelEs: "BAHAMAS"
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
code: "BH",
|
|
1799
|
+
labelEs: "BAHREIN"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
code: "BD",
|
|
1803
|
+
labelEs: "BANGLADESH"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
code: "BB",
|
|
1807
|
+
labelEs: "BARBADOS"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
code: "BY",
|
|
1811
|
+
labelEs: "BELARUS"
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
code: "BE",
|
|
1815
|
+
labelEs: "BELGICA"
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
code: "BZ",
|
|
1819
|
+
labelEs: "BELICE"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
code: "BJ",
|
|
1823
|
+
labelEs: "BENIN"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
code: "BM",
|
|
1827
|
+
labelEs: "BERMUDAS"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
code: "BT",
|
|
1831
|
+
labelEs: "BHUTAN"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
code: "BO",
|
|
1835
|
+
labelEs: "BOLIVIA"
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
code: "BA",
|
|
1839
|
+
labelEs: "BOSNIA Y HERZEGOVINA"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
code: "BW",
|
|
1843
|
+
labelEs: "BOTSUANA"
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
code: "BR",
|
|
1847
|
+
labelEs: "BRASIL"
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
code: "BN",
|
|
1851
|
+
labelEs: "BRUNEI"
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
code: "BG",
|
|
1855
|
+
labelEs: "BULGARIA"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
code: "BF",
|
|
1859
|
+
labelEs: "BURKINA FASO"
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
code: "BI",
|
|
1863
|
+
labelEs: "BURUNDI"
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
code: "CV",
|
|
1867
|
+
labelEs: "CABO VERDE"
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
code: "KH",
|
|
1871
|
+
labelEs: "CAMBOYA"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
code: "CM",
|
|
1875
|
+
labelEs: "CAMERUN"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
code: "CA",
|
|
1879
|
+
labelEs: "CANADA"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
code: "TD",
|
|
1883
|
+
labelEs: "CHAD"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
code: "CZ",
|
|
1887
|
+
labelEs: "CHEQUIA"
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
code: "CL",
|
|
1891
|
+
labelEs: "CHILE"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
code: "CN",
|
|
1895
|
+
labelEs: "CHINA"
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
code: "CY",
|
|
1899
|
+
labelEs: "CHIPRE"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
code: "CP",
|
|
1903
|
+
labelEs: "CLIPPERTON"
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
code: "CO",
|
|
1907
|
+
labelEs: "COLOMBIA"
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
code: "KM",
|
|
1911
|
+
labelEs: "COMORAS"
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
code: "CG",
|
|
1915
|
+
labelEs: "CONGO"
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
code: "KP",
|
|
1919
|
+
labelEs: "COREA DEL NORTE"
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
code: "KR",
|
|
1923
|
+
labelEs: "COREA DEL SUR"
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
code: "CI",
|
|
1927
|
+
labelEs: "COSTA DE MARFIL"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
code: "CR",
|
|
1931
|
+
labelEs: "COSTA RICA"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
code: "HR",
|
|
1935
|
+
labelEs: "CROACIA"
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
code: "CU",
|
|
1939
|
+
labelEs: "CUBA"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
code: "CW",
|
|
1943
|
+
labelEs: "CURAZAO"
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
code: "DK",
|
|
1947
|
+
labelEs: "DINAMARCA"
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
code: "DM",
|
|
1951
|
+
labelEs: "DOMINICA"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
code: "EC",
|
|
1955
|
+
labelEs: "ECUADOR"
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
code: "EG",
|
|
1959
|
+
labelEs: "EGIPTO"
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
code: "SV",
|
|
1963
|
+
labelEs: "EL SALVADOR"
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
code: "AE",
|
|
1967
|
+
labelEs: "EMIRATOS ARABES UNIDOS"
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
code: "ER",
|
|
1971
|
+
labelEs: "ERITREA"
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
code: "SK",
|
|
1975
|
+
labelEs: "ESLOVAQUIA"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
code: "SI",
|
|
1979
|
+
labelEs: "ESLOVENIA"
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
code: "ES",
|
|
1983
|
+
labelEs: "ESPA\xD1A"
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
code: "US",
|
|
1987
|
+
labelEs: "ESTADOS UNIDOS"
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
code: "EE",
|
|
1991
|
+
labelEs: "ESTONIA"
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
code: "ET",
|
|
1995
|
+
labelEs: "ETIOPIA"
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
code: "PH",
|
|
1999
|
+
labelEs: "FILIPINAS"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
code: "FI",
|
|
2003
|
+
labelEs: "FINLANDIA"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
code: "FJ",
|
|
2007
|
+
labelEs: "FIYI"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
code: "FR",
|
|
2011
|
+
labelEs: "FRANCIA"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
code: "GA",
|
|
2015
|
+
labelEs: "GABON"
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
code: "GM",
|
|
2019
|
+
labelEs: "GAMBIA"
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
code: "GE",
|
|
2023
|
+
labelEs: "GEORGIA"
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
code: "GS",
|
|
2027
|
+
labelEs: "GEORGIA DEL SUR E ISLAS SANDWICH DEL SUR"
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
code: "GH",
|
|
2031
|
+
labelEs: "GHANA"
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
code: "GI",
|
|
2035
|
+
labelEs: "GIBRALTAR"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
code: "GD",
|
|
2039
|
+
labelEs: "GRANADA"
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
code: "EL",
|
|
2043
|
+
labelEs: "GRECIA"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
code: "GL",
|
|
2047
|
+
labelEs: "GROENLANDIA"
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
code: "GP",
|
|
2051
|
+
labelEs: "GUADALUPE"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
code: "GU",
|
|
2055
|
+
labelEs: "GUAM"
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
code: "GT",
|
|
2059
|
+
labelEs: "GUATEMALA"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
code: "GF",
|
|
2063
|
+
labelEs: "GUAYANA FRANCESA"
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
code: "GG",
|
|
2067
|
+
labelEs: "GUERNESEY"
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
code: "GN",
|
|
2071
|
+
labelEs: "GUINEA"
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
code: "GQ",
|
|
2075
|
+
labelEs: "GUINEA ECUATORIAL"
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
code: "GW",
|
|
2079
|
+
labelEs: "GUINEA-BISSAU"
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
code: "GY",
|
|
2083
|
+
labelEs: "GUYANA"
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
code: "HT",
|
|
2087
|
+
labelEs: "HAITI"
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
code: "HN",
|
|
2091
|
+
labelEs: "HONDURAS"
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
code: "HK",
|
|
2095
|
+
labelEs: "HONG KONG"
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
code: "HU",
|
|
2099
|
+
labelEs: "HUNGRIA"
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
code: "IN",
|
|
2103
|
+
labelEs: "INDIA"
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
code: "ID",
|
|
2107
|
+
labelEs: "INDONESIA"
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
code: "IR",
|
|
2111
|
+
labelEs: "IRAN"
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
code: "IQ",
|
|
2115
|
+
labelEs: "IRAQ"
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
code: "IE",
|
|
2119
|
+
labelEs: "IRLANDA"
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
code: "BV",
|
|
2123
|
+
labelEs: "ISLA BOUVET"
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
code: "CX",
|
|
2127
|
+
labelEs: "ISLA CHRISTMAS"
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
code: "IM",
|
|
2131
|
+
labelEs: "ISLA DE MAN"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
code: "NF",
|
|
2135
|
+
labelEs: "ISLA NORFOLK"
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
code: "IS",
|
|
2139
|
+
labelEs: "ISLANDIA"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
code: "AX",
|
|
2143
|
+
labelEs: "ISLAS \xC5LAND"
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
code: "KY",
|
|
2147
|
+
labelEs: "ISLAS CAIMAN"
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
code: "CC",
|
|
2151
|
+
labelEs: "ISLAS COCOS"
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
code: "CK",
|
|
2155
|
+
labelEs: "ISLAS COOK"
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
code: "FO",
|
|
2159
|
+
labelEs: "ISLAS FEROE"
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
code: "HM",
|
|
2163
|
+
labelEs: "ISLAS HEARD Y MCDONALD"
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
code: "FK",
|
|
2167
|
+
labelEs: "ISLAS MALVINAS"
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
code: "MP",
|
|
2171
|
+
labelEs: "ISLAS MARIANAS DEL NORTE"
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
code: "MH",
|
|
2175
|
+
labelEs: "ISLAS MARSHALL"
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
code: "UM",
|
|
2179
|
+
labelEs: "ISLAS MENORES ALEJADAS DE LOS ESTADOS UNIDOS"
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
code: "PN",
|
|
2183
|
+
labelEs: "ISLAS PITCAIRN"
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
code: "SB",
|
|
2187
|
+
labelEs: "ISLAS SALOMON"
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
code: "TC",
|
|
2191
|
+
labelEs: "ISLAS TURCAS Y CAICOS"
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
code: "VG",
|
|
2195
|
+
labelEs: "ISLAS VIRGENES BRITANICAS"
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
code: "VI",
|
|
2199
|
+
labelEs: "ISLAS VIRGENES DE LOS ESTADOS UNIDOS"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
code: "IL",
|
|
2203
|
+
labelEs: "ISRAEL"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
code: "IT",
|
|
2207
|
+
labelEs: "ITALIA"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
code: "JM",
|
|
2211
|
+
labelEs: "JAMAICA"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
code: "JP",
|
|
2215
|
+
labelEs: "JAPON"
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
code: "JE",
|
|
2219
|
+
labelEs: "JERSEY"
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
code: "JO",
|
|
2223
|
+
labelEs: "JORDANIA"
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
code: "KZ",
|
|
2227
|
+
labelEs: "KAZAJSTAN"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
code: "KE",
|
|
2231
|
+
labelEs: "KENIA"
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
code: "KG",
|
|
2235
|
+
labelEs: "KIRGUISTAN"
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
code: "KI",
|
|
2239
|
+
labelEs: "KIRIBATI"
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
code: "XK",
|
|
2243
|
+
labelEs: "KOSOVO"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
code: "KW",
|
|
2247
|
+
labelEs: "KUWAIT"
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
code: "LA",
|
|
2251
|
+
labelEs: "LAOS"
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
code: "LS",
|
|
2255
|
+
labelEs: "LESOTHO"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
code: "LV",
|
|
2259
|
+
labelEs: "LETONIA"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
code: "LB",
|
|
2263
|
+
labelEs: "LIBANO"
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
code: "LR",
|
|
2267
|
+
labelEs: "LIBERIA"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
code: "LY",
|
|
2271
|
+
labelEs: "LIBIA"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
code: "LI",
|
|
2275
|
+
labelEs: "LIECHTENSTEIN"
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
code: "LT",
|
|
2279
|
+
labelEs: "LITUANIA"
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
code: "LU",
|
|
2283
|
+
labelEs: "LUXEMBURGO"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
code: "MO",
|
|
2287
|
+
labelEs: "MACAO"
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
code: "MK",
|
|
2291
|
+
labelEs: "MACEDONIA"
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
code: "MG",
|
|
2295
|
+
labelEs: "MADAGASCAR"
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
code: "MY",
|
|
2299
|
+
labelEs: "MALASIA"
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
code: "MW",
|
|
2303
|
+
labelEs: "MALAWI"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
code: "MV",
|
|
2307
|
+
labelEs: "MALDIVAS"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
code: "ML",
|
|
2311
|
+
labelEs: "MALI"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
code: "MT",
|
|
2315
|
+
labelEs: "MALTA"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
code: "MA",
|
|
2319
|
+
labelEs: "MARRUECOS"
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
code: "MQ",
|
|
2323
|
+
labelEs: "MARTINICA"
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
code: "MU",
|
|
2327
|
+
labelEs: "MAURICIO"
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
code: "MR",
|
|
2331
|
+
labelEs: "MAURITANIA"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
code: "YT",
|
|
2335
|
+
labelEs: "MAYOTTE"
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
code: "MX",
|
|
2339
|
+
labelEs: "MEXICO"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
code: "FM",
|
|
2343
|
+
labelEs: "MICRONESIA"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
code: "MD",
|
|
2347
|
+
labelEs: "MOLDOVA"
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
code: "MC",
|
|
2351
|
+
labelEs: "MONACO"
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
code: "MN",
|
|
2355
|
+
labelEs: "MONGOLIA"
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
code: "ME",
|
|
2359
|
+
labelEs: "MONTENEGRO"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
code: "MS",
|
|
2363
|
+
labelEs: "MONTSERRAT"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
code: "MZ",
|
|
2367
|
+
labelEs: "MOZAMBIQUE"
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
code: "MM",
|
|
2371
|
+
labelEs: "MYANMAR"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
code: "NA",
|
|
2375
|
+
labelEs: "NAMIBIA"
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
code: "NR",
|
|
2379
|
+
labelEs: "NAURU"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
code: "NP",
|
|
2383
|
+
labelEs: "NEPAL"
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
code: "NI",
|
|
2387
|
+
labelEs: "NICARAGUA"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
code: "NE",
|
|
2391
|
+
labelEs: "NIGER"
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
code: "NG",
|
|
2395
|
+
labelEs: "NIGERIA"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
code: "NU",
|
|
2399
|
+
labelEs: "NIUE"
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
code: "NO",
|
|
2403
|
+
labelEs: "NORUEGA"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
code: "NC",
|
|
2407
|
+
labelEs: "NUEVA CALEDONIA"
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
code: "NZ",
|
|
2411
|
+
labelEs: "NUEVA ZELANDA"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
code: "OM",
|
|
2415
|
+
labelEs: "OMAN"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
code: "NL",
|
|
2419
|
+
labelEs: "PAISES BAJOS"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
code: "PK",
|
|
2423
|
+
labelEs: "PAKISTAN"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
code: "PW",
|
|
2427
|
+
labelEs: "PALAOS"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
code: "PA",
|
|
2431
|
+
labelEs: "PANAMA"
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
code: "PG",
|
|
2435
|
+
labelEs: "PAPUA NUEVA GUINEA"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
code: "PY",
|
|
2439
|
+
labelEs: "PARAGUAY"
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
code: "PE",
|
|
2443
|
+
labelEs: "PERU"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
code: "PF",
|
|
2447
|
+
labelEs: "POLINESIA FRANCESA"
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
code: "PL",
|
|
2451
|
+
labelEs: "POLONIA"
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
code: "PT",
|
|
2455
|
+
labelEs: "PORTUGAL"
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
code: "PR",
|
|
2459
|
+
labelEs: "PUERTO RICO"
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
code: "QA",
|
|
2463
|
+
labelEs: "QATAR"
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
code: "UK",
|
|
2467
|
+
labelEs: "REINO UNIDO"
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
code: "CF",
|
|
2471
|
+
labelEs: "REPUBLICA CENTROAFRICANA"
|
|
2472
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
code: "CD",
|
|
2475
|
+
labelEs: "REPUBLICA DEMOCRATICA DEL CONGO"
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
code: "DO",
|
|
2479
|
+
labelEs: "REPUBLICA DOMINICANA"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
code: "RE",
|
|
2483
|
+
labelEs: "REUNION"
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
code: "RW",
|
|
2487
|
+
labelEs: "RUANDA"
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
code: "RO",
|
|
2491
|
+
labelEs: "RUMANIA"
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
code: "RU",
|
|
2495
|
+
labelEs: "RUSIA"
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
code: "EH",
|
|
2499
|
+
labelEs: "SAHARA OCCIDENTAL"
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
code: "WS",
|
|
2503
|
+
labelEs: "SAMOA"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
code: "AS",
|
|
2507
|
+
labelEs: "SAMOA AMERICANA"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
code: "BL",
|
|
2511
|
+
labelEs: "SAN BARTOLOME"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
code: "KN",
|
|
2515
|
+
labelEs: "SAN CRISTOBAL Y NIEVES"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
code: "SM",
|
|
2519
|
+
labelEs: "SAN MARINO"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
code: "MF",
|
|
2523
|
+
labelEs: "SAN MARTIN"
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
code: "PM",
|
|
2527
|
+
labelEs: "SAN PEDRO Y MIQUELON"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
code: "VC",
|
|
2531
|
+
labelEs: "SAN VICENTE Y LAS GRANADINAS"
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
code: "SH",
|
|
2535
|
+
labelEs: "SANTA ELENA"
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
code: "LC",
|
|
2539
|
+
labelEs: "SANTA LUCIA"
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
code: "VA",
|
|
2543
|
+
labelEs: "SANTA SEDE / ESTADO DE LA CIUDAD DEL VATICANO"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
code: "ST",
|
|
2547
|
+
labelEs: "SANTO TOME Y PRINCIPE"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
code: "SN",
|
|
2551
|
+
labelEs: "SENEGAL"
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
code: "RS",
|
|
2555
|
+
labelEs: "SERBIA"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
code: "SC",
|
|
2559
|
+
labelEs: "SEYCHELLES"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
code: "SL",
|
|
2563
|
+
labelEs: "SIERRA LEONA"
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
code: "SG",
|
|
2567
|
+
labelEs: "SINGAPUR"
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
code: "SY",
|
|
2571
|
+
labelEs: "SIRIA"
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
code: "SO",
|
|
2575
|
+
labelEs: "SOMALIA"
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
code: "LK",
|
|
2579
|
+
labelEs: "SRI LANKA"
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
code: "SZ",
|
|
2583
|
+
labelEs: "SUAZILANDIA"
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
code: "ZA",
|
|
2587
|
+
labelEs: "SUDAFRICA"
|
|
2588
|
+
},
|
|
2589
|
+
{
|
|
2590
|
+
code: "SD",
|
|
2591
|
+
labelEs: "SUDAN"
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
code: "SE",
|
|
2595
|
+
labelEs: "SUECIA"
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
code: "CH",
|
|
2599
|
+
labelEs: "SUIZA"
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
code: "SR",
|
|
2603
|
+
labelEs: "SURINAM"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
code: "SJ",
|
|
2607
|
+
labelEs: "SVALBARD Y JAN MAYEN"
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
code: "TH",
|
|
2611
|
+
labelEs: "TAILANDIA"
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
code: "TW",
|
|
2615
|
+
labelEs: "TAIWAN"
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
code: "TZ",
|
|
2619
|
+
labelEs: "TANZANIA"
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
code: "TJ",
|
|
2623
|
+
labelEs: "TAYIKISTAN"
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
code: "IO",
|
|
2627
|
+
labelEs: "TERRITORIO BRITANICO DEL OCEANO INDICO"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
code: "TF",
|
|
2631
|
+
labelEs: "TERRITORIOS AUSTRALES FRANCESES"
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
code: "PS",
|
|
2635
|
+
labelEs: "TERRITORIOS PALESTINOS"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
code: "TL",
|
|
2639
|
+
labelEs: "TIMOR ORIENTAL"
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
code: "TG",
|
|
2643
|
+
labelEs: "TOGO"
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
code: "TK",
|
|
2647
|
+
labelEs: "TOKELAU"
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
code: "TO",
|
|
2651
|
+
labelEs: "TONGA"
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
code: "TT",
|
|
2655
|
+
labelEs: "TRINIDAD Y TOBAGO"
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
code: "TN",
|
|
2659
|
+
labelEs: "TUNEZ"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
code: "TM",
|
|
2663
|
+
labelEs: "TURKMENISTAN"
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
code: "TR",
|
|
2667
|
+
labelEs: "TURQUIA"
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
code: "TV",
|
|
2671
|
+
labelEs: "TUVALU"
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
code: "UA",
|
|
2675
|
+
labelEs: "UCRANIA"
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
code: "UG",
|
|
2679
|
+
labelEs: "UGANDA"
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
code: "UY",
|
|
2683
|
+
labelEs: "URUGUAY"
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
code: "UZ",
|
|
2687
|
+
labelEs: "UZBEKISTAN"
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
code: "VU",
|
|
2691
|
+
labelEs: "VANUATU"
|
|
2692
|
+
},
|
|
2693
|
+
{
|
|
2694
|
+
code: "VE",
|
|
2695
|
+
labelEs: "VENEZUELA"
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
code: "VN",
|
|
2699
|
+
labelEs: "VIETNAM"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
code: "WF",
|
|
2703
|
+
labelEs: "WALLIS Y FUTUNA"
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
code: "YE",
|
|
2707
|
+
labelEs: "YEMEN"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
code: "DJ",
|
|
2711
|
+
labelEs: "YIBUTI"
|
|
2712
|
+
},
|
|
2713
|
+
{
|
|
2714
|
+
code: "ZM",
|
|
2715
|
+
labelEs: "ZAMBIA"
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
code: "ZW",
|
|
2719
|
+
labelEs: "ZIMBABUE"
|
|
2720
|
+
}
|
|
2721
|
+
];
|
|
2722
|
+
|
|
2723
|
+
// src/lib/countries.ts
|
|
2724
|
+
var ITEMS = countries_default;
|
|
2725
|
+
var COUNTRY_OPTIONS = Object.freeze(
|
|
2726
|
+
[...ITEMS].sort(
|
|
2727
|
+
(left, right) => left.labelEs.localeCompare(right.labelEs, "es")
|
|
2728
|
+
)
|
|
2729
|
+
);
|
|
2730
|
+
var CODE_SET = new Set(ITEMS.map((item) => item.code));
|
|
2731
|
+
var BY_CODE = new Map(ITEMS.map((item) => [item.code, item]));
|
|
2732
|
+
var englishDisplayNames;
|
|
2733
|
+
function englishRegionName(code) {
|
|
2734
|
+
try {
|
|
2735
|
+
englishDisplayNames ??= new Intl.DisplayNames(["en"], { type: "region" });
|
|
2736
|
+
return englishDisplayNames.of(code);
|
|
2737
|
+
} catch {
|
|
2738
|
+
return void 0;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
function titleCaseEs(labelEs) {
|
|
2742
|
+
return labelEs.toLocaleLowerCase("es-MX").split(/\s+/).filter(Boolean).map((word) => word.charAt(0).toLocaleUpperCase("es-MX") + word.slice(1)).join(" ");
|
|
2743
|
+
}
|
|
2744
|
+
function isKnownCountryCode(code) {
|
|
2745
|
+
return CODE_SET.has(code.trim().toUpperCase());
|
|
2746
|
+
}
|
|
2747
|
+
function countryLabel(code, locale) {
|
|
2748
|
+
const normalized = code.trim().toUpperCase();
|
|
2749
|
+
const record = BY_CODE.get(normalized);
|
|
2750
|
+
if (!record) return normalized;
|
|
2751
|
+
if (locale === "es-MX") {
|
|
2752
|
+
return titleCaseEs(record.labelEs);
|
|
2753
|
+
}
|
|
2754
|
+
return englishRegionName(normalized) ?? titleCaseEs(record.labelEs);
|
|
2755
|
+
}
|
|
2756
|
+
function formatCountryOptionLabel(code, locale) {
|
|
2757
|
+
const normalized = code.trim().toUpperCase();
|
|
2758
|
+
return `${normalized} \u2014 ${countryLabel(normalized, locale)}`;
|
|
2759
|
+
}
|
|
2760
|
+
function countryPickerItems(locale) {
|
|
2761
|
+
return COUNTRY_OPTIONS.map((item) => ({
|
|
2762
|
+
value: item.code,
|
|
2763
|
+
label: formatCountryOptionLabel(item.code, locale)
|
|
2764
|
+
}));
|
|
2765
|
+
}
|
|
2766
|
+
function foldForSearch(text) {
|
|
2767
|
+
return text.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase();
|
|
2768
|
+
}
|
|
2769
|
+
function filterCountries(query, locale) {
|
|
2770
|
+
const items = countryPickerItems(locale);
|
|
2771
|
+
const trimmed = query.trim();
|
|
2772
|
+
if (!trimmed) return items;
|
|
2773
|
+
const needle = foldForSearch(trimmed);
|
|
2774
|
+
return items.filter((item) => {
|
|
2775
|
+
const code = foldForSearch(item.value);
|
|
2776
|
+
const label = foldForSearch(item.label);
|
|
2777
|
+
return code.includes(needle) || label.includes(needle);
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
var INPUT_CLASS = "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
2781
|
+
function defaultLabels2(purpose, locale) {
|
|
2782
|
+
const es = locale === "es-MX";
|
|
2783
|
+
if (purpose === "nationality") {
|
|
2784
|
+
return {
|
|
2785
|
+
placeholder: es ? "Buscar pa\xEDs\u2026" : "Search country\u2026",
|
|
2786
|
+
search: es ? "Buscar pa\xEDs" : "Search country",
|
|
2787
|
+
noResults: es ? "Sin resultados" : "No results",
|
|
2788
|
+
clear: es ? "Limpiar" : "Clear",
|
|
2789
|
+
open: es ? "Abrir lista" : "Open list"
|
|
2790
|
+
};
|
|
2791
|
+
}
|
|
2792
|
+
return {
|
|
2793
|
+
placeholder: es ? "Buscar pa\xEDs\u2026" : "Search country\u2026",
|
|
2794
|
+
search: es ? "Buscar pa\xEDs" : "Search country",
|
|
2795
|
+
noResults: es ? "Sin resultados" : "No results",
|
|
2796
|
+
clear: es ? "Limpiar" : "Clear",
|
|
2797
|
+
open: es ? "Abrir lista" : "Open list"
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
function findItem(items, code) {
|
|
2801
|
+
const normalized = code.trim().toUpperCase();
|
|
2802
|
+
if (!normalized) return null;
|
|
2803
|
+
return items.find((item) => item.value === normalized) ?? null;
|
|
2804
|
+
}
|
|
2805
|
+
function CountryPicker({
|
|
2806
|
+
value,
|
|
2807
|
+
onValueChange,
|
|
2808
|
+
purpose,
|
|
2809
|
+
locale = "es-MX",
|
|
2810
|
+
id,
|
|
2811
|
+
name,
|
|
2812
|
+
disabled,
|
|
2813
|
+
required,
|
|
2814
|
+
allowEmpty = true,
|
|
2815
|
+
className,
|
|
2816
|
+
labels: labelsProp,
|
|
2817
|
+
"aria-invalid": ariaInvalid
|
|
2818
|
+
}) {
|
|
2819
|
+
const labels = { ...defaultLabels2(purpose, locale), ...labelsProp };
|
|
2820
|
+
const items = React__namespace.useMemo(() => countryPickerItems(locale), [locale]);
|
|
2821
|
+
const selected = React__namespace.useMemo(() => findItem(items, value), [items, value]);
|
|
2822
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2823
|
+
name ? /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: value.trim().toUpperCase() }) : null,
|
|
2824
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2825
|
+
combobox_js.Combobox.Root,
|
|
2826
|
+
{
|
|
2827
|
+
items,
|
|
2828
|
+
value: selected,
|
|
2829
|
+
onValueChange: (item) => {
|
|
2830
|
+
onValueChange(item?.value ?? "");
|
|
2831
|
+
},
|
|
2832
|
+
disabled,
|
|
2833
|
+
itemToStringLabel: (item) => item.label,
|
|
2834
|
+
itemToStringValue: (item) => item.value,
|
|
2835
|
+
isItemEqualToValue: (item, current) => item.value === current.value,
|
|
2836
|
+
children: [
|
|
2837
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2838
|
+
combobox_js.Combobox.InputGroup,
|
|
2839
|
+
{
|
|
2840
|
+
className: cn("relative flex w-full items-center", className),
|
|
2841
|
+
children: [
|
|
2842
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2843
|
+
combobox_js.Combobox.Input,
|
|
2844
|
+
{
|
|
2845
|
+
id,
|
|
2846
|
+
required,
|
|
2847
|
+
"aria-invalid": ariaInvalid,
|
|
2848
|
+
...labels.ariaLabel ? { "aria-label": labels.ariaLabel } : {},
|
|
2849
|
+
placeholder: labels.placeholder,
|
|
2850
|
+
className: cn(INPUT_CLASS, "pr-16")
|
|
2851
|
+
}
|
|
2852
|
+
),
|
|
2853
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-y-0 right-0 flex items-center gap-0.5 pr-1.5", children: [
|
|
2854
|
+
allowEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2855
|
+
combobox_js.Combobox.Clear,
|
|
2856
|
+
{
|
|
2857
|
+
className: "inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
2858
|
+
"aria-label": labels.clear,
|
|
2859
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "size-4", "aria-hidden": true })
|
|
2860
|
+
}
|
|
2861
|
+
) : null,
|
|
2862
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2863
|
+
combobox_js.Combobox.Trigger,
|
|
2864
|
+
{
|
|
2865
|
+
className: "inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
2866
|
+
"aria-label": labels.open,
|
|
2867
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4", "aria-hidden": true })
|
|
2868
|
+
}
|
|
2869
|
+
)
|
|
2870
|
+
] })
|
|
2871
|
+
]
|
|
2872
|
+
}
|
|
2873
|
+
),
|
|
2874
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox_js.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2875
|
+
combobox_js.Combobox.Positioner,
|
|
2876
|
+
{
|
|
2877
|
+
className: "isolate z-50 outline-none",
|
|
2878
|
+
sideOffset: 4,
|
|
2879
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2880
|
+
combobox_js.Combobox.Popup,
|
|
2881
|
+
{
|
|
2882
|
+
className: cn(
|
|
2883
|
+
"z-50 max-h-60 w-(--anchor-width) min-w-[16rem] overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
2884
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95"
|
|
2885
|
+
),
|
|
2886
|
+
children: [
|
|
2887
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox_js.Combobox.Empty, { className: "px-3 py-2 text-sm text-muted-foreground", children: labels.noResults }),
|
|
2888
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox_js.Combobox.List, { className: "max-h-60 overflow-y-auto p-1 outline-none", children: (item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2889
|
+
combobox_js.Combobox.Item,
|
|
2890
|
+
{
|
|
2891
|
+
value: item,
|
|
2892
|
+
className: cn(
|
|
2893
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-none select-none",
|
|
2894
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground"
|
|
2895
|
+
),
|
|
2896
|
+
children: [
|
|
2897
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox_js.Combobox.ItemIndicator, { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4", "aria-hidden": true }) }),
|
|
2898
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label })
|
|
2899
|
+
]
|
|
2900
|
+
},
|
|
2901
|
+
item.value
|
|
2902
|
+
) })
|
|
2903
|
+
]
|
|
2904
|
+
}
|
|
2905
|
+
)
|
|
2906
|
+
}
|
|
2907
|
+
) })
|
|
2908
|
+
]
|
|
2909
|
+
}
|
|
2910
|
+
)
|
|
2911
|
+
] });
|
|
2912
|
+
}
|
|
1701
2913
|
var DEFAULT_LABELS = {
|
|
1702
2914
|
uploadAria: "Upload image",
|
|
1703
2915
|
uploadHint: "Click to upload",
|
|
@@ -1726,18 +2938,18 @@ function AvatarEditor({
|
|
|
1726
2938
|
labels
|
|
1727
2939
|
}) {
|
|
1728
2940
|
const t = { ...DEFAULT_LABELS, ...labels };
|
|
1729
|
-
const canvasRef =
|
|
1730
|
-
const fileInputRef =
|
|
1731
|
-
const containerRef =
|
|
1732
|
-
const [image, setImage] =
|
|
1733
|
-
const [imageLoaded, setImageLoaded] =
|
|
1734
|
-
const [zoom, setZoom] =
|
|
1735
|
-
const [rotation, setRotation] =
|
|
1736
|
-
const [position, setPosition] =
|
|
1737
|
-
const [isDragging, setIsDragging] =
|
|
1738
|
-
const [dragStart, setDragStart] =
|
|
1739
|
-
const [showGrid, setShowGrid] =
|
|
1740
|
-
const generateOutput =
|
|
2941
|
+
const canvasRef = React.useRef(null);
|
|
2942
|
+
const fileInputRef = React.useRef(null);
|
|
2943
|
+
const containerRef = React.useRef(null);
|
|
2944
|
+
const [image, setImage] = React.useState(null);
|
|
2945
|
+
const [imageLoaded, setImageLoaded] = React.useState(false);
|
|
2946
|
+
const [zoom, setZoom] = React.useState(1);
|
|
2947
|
+
const [rotation, setRotation] = React.useState(0);
|
|
2948
|
+
const [position, setPosition] = React.useState({ x: 0, y: 0 });
|
|
2949
|
+
const [isDragging, setIsDragging] = React.useState(false);
|
|
2950
|
+
const [dragStart, setDragStart] = React.useState({ x: 0, y: 0 });
|
|
2951
|
+
const [showGrid, setShowGrid] = React.useState(initialShowGrid);
|
|
2952
|
+
const generateOutput = React.useCallback(() => {
|
|
1741
2953
|
if (!canvasRef.current || !image) return null;
|
|
1742
2954
|
const outputCanvas = document.createElement("canvas");
|
|
1743
2955
|
outputCanvas.width = outputSize;
|
|
@@ -1748,7 +2960,7 @@ function AvatarEditor({
|
|
|
1748
2960
|
const mimeType = `image/${outputFormat}`;
|
|
1749
2961
|
return outputCanvas.toDataURL(mimeType, outputQuality);
|
|
1750
2962
|
}, [image, outputSize, outputFormat, outputQuality]);
|
|
1751
|
-
|
|
2963
|
+
React.useEffect(() => {
|
|
1752
2964
|
if (!canvasRef.current || !image || !imageLoaded) return;
|
|
1753
2965
|
const canvas = canvasRef.current;
|
|
1754
2966
|
const ctx = canvas.getContext("2d");
|
|
@@ -1792,12 +3004,12 @@ function AvatarEditor({
|
|
|
1792
3004
|
generateOutput,
|
|
1793
3005
|
onChange
|
|
1794
3006
|
]);
|
|
1795
|
-
const resetTransforms =
|
|
3007
|
+
const resetTransforms = React.useCallback(() => {
|
|
1796
3008
|
setZoom(1);
|
|
1797
3009
|
setRotation(0);
|
|
1798
3010
|
setPosition({ x: 0, y: 0 });
|
|
1799
3011
|
}, []);
|
|
1800
|
-
const handleFileSelect =
|
|
3012
|
+
const handleFileSelect = React.useCallback(
|
|
1801
3013
|
(e) => {
|
|
1802
3014
|
const file = e.target.files?.[0];
|
|
1803
3015
|
if (!file) return;
|
|
@@ -1816,7 +3028,7 @@ function AvatarEditor({
|
|
|
1816
3028
|
},
|
|
1817
3029
|
[resetTransforms]
|
|
1818
3030
|
);
|
|
1819
|
-
const handleMouseDown =
|
|
3031
|
+
const handleMouseDown = React.useCallback(
|
|
1820
3032
|
(e) => {
|
|
1821
3033
|
if (!imageLoaded) return;
|
|
1822
3034
|
setIsDragging(true);
|
|
@@ -1824,7 +3036,7 @@ function AvatarEditor({
|
|
|
1824
3036
|
},
|
|
1825
3037
|
[imageLoaded, position]
|
|
1826
3038
|
);
|
|
1827
|
-
const handleMouseMove =
|
|
3039
|
+
const handleMouseMove = React.useCallback(
|
|
1828
3040
|
(e) => {
|
|
1829
3041
|
if (!isDragging) return;
|
|
1830
3042
|
setPosition({
|
|
@@ -1834,10 +3046,10 @@ function AvatarEditor({
|
|
|
1834
3046
|
},
|
|
1835
3047
|
[isDragging, dragStart]
|
|
1836
3048
|
);
|
|
1837
|
-
const handleMouseUp =
|
|
3049
|
+
const handleMouseUp = React.useCallback(() => {
|
|
1838
3050
|
setIsDragging(false);
|
|
1839
3051
|
}, []);
|
|
1840
|
-
const handleTouchStart =
|
|
3052
|
+
const handleTouchStart = React.useCallback(
|
|
1841
3053
|
(e) => {
|
|
1842
3054
|
if (!imageLoaded) return;
|
|
1843
3055
|
const touch = e.touches[0];
|
|
@@ -1849,7 +3061,7 @@ function AvatarEditor({
|
|
|
1849
3061
|
},
|
|
1850
3062
|
[imageLoaded, position]
|
|
1851
3063
|
);
|
|
1852
|
-
const handleTouchMove =
|
|
3064
|
+
const handleTouchMove = React.useCallback(
|
|
1853
3065
|
(e) => {
|
|
1854
3066
|
if (!isDragging) return;
|
|
1855
3067
|
const touch = e.touches[0];
|
|
@@ -1860,7 +3072,7 @@ function AvatarEditor({
|
|
|
1860
3072
|
},
|
|
1861
3073
|
[isDragging, dragStart]
|
|
1862
3074
|
);
|
|
1863
|
-
const handleDiscard =
|
|
3075
|
+
const handleDiscard = React.useCallback(() => {
|
|
1864
3076
|
setImage(null);
|
|
1865
3077
|
setImageLoaded(false);
|
|
1866
3078
|
resetTransforms();
|
|
@@ -2231,8 +3443,8 @@ function AvatarEditor({
|
|
|
2231
3443
|
);
|
|
2232
3444
|
}
|
|
2233
3445
|
function useMediaQuery(query) {
|
|
2234
|
-
const [matches, setMatches] =
|
|
2235
|
-
|
|
3446
|
+
const [matches, setMatches] = React.useState(false);
|
|
3447
|
+
React.useEffect(() => {
|
|
2236
3448
|
const media = window.matchMedia(query);
|
|
2237
3449
|
if (media.matches !== matches) {
|
|
2238
3450
|
setMatches(media.matches);
|
|
@@ -2262,17 +3474,17 @@ function AvatarEditorDialog({
|
|
|
2262
3474
|
className,
|
|
2263
3475
|
editorLabels
|
|
2264
3476
|
}) {
|
|
2265
|
-
const [isOpen, setIsOpen] =
|
|
2266
|
-
const [editedValue, setEditedValue] =
|
|
2267
|
-
const [displaySrc, setDisplaySrc] =
|
|
2268
|
-
const [isSaving, setIsSaving] =
|
|
2269
|
-
const [feedback, setFeedback] =
|
|
2270
|
-
|
|
3477
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
3478
|
+
const [editedValue, setEditedValue] = React.useState(value ?? null);
|
|
3479
|
+
const [displaySrc, setDisplaySrc] = React.useState(value ?? null);
|
|
3480
|
+
const [isSaving, setIsSaving] = React.useState(false);
|
|
3481
|
+
const [feedback, setFeedback] = React.useState(null);
|
|
3482
|
+
React.useEffect(() => {
|
|
2271
3483
|
setDisplaySrc(value ?? null);
|
|
2272
3484
|
}, [value]);
|
|
2273
3485
|
const isMobile = useMediaQuery("(max-width: 640px)");
|
|
2274
3486
|
const caption = (placeholder ?? "").trim();
|
|
2275
|
-
const handleOpenChange =
|
|
3487
|
+
const handleOpenChange = React.useCallback(
|
|
2276
3488
|
(open) => {
|
|
2277
3489
|
if (open) {
|
|
2278
3490
|
setEditedValue(value ?? null);
|
|
@@ -2282,7 +3494,7 @@ function AvatarEditorDialog({
|
|
|
2282
3494
|
},
|
|
2283
3495
|
[value]
|
|
2284
3496
|
);
|
|
2285
|
-
const handleAccept =
|
|
3497
|
+
const handleAccept = React.useCallback(async () => {
|
|
2286
3498
|
if (!editedValue) return;
|
|
2287
3499
|
setIsSaving(true);
|
|
2288
3500
|
setFeedback(null);
|
|
@@ -2548,10 +3760,10 @@ function FileDropzone({
|
|
|
2548
3760
|
className
|
|
2549
3761
|
}) {
|
|
2550
3762
|
const labels = { ...DEFAULT_FILE_DROPZONE_LABELS, ...labelOverrides };
|
|
2551
|
-
const inputId =
|
|
2552
|
-
const inputRef =
|
|
2553
|
-
const [dragging, setDragging] =
|
|
2554
|
-
const [message, setMessage] =
|
|
3763
|
+
const inputId = React.useId();
|
|
3764
|
+
const inputRef = React.useRef(null);
|
|
3765
|
+
const [dragging, setDragging] = React.useState(false);
|
|
3766
|
+
const [message, setMessage] = React.useState(null);
|
|
2555
3767
|
function takeFile(file) {
|
|
2556
3768
|
if (!file || disabled) return;
|
|
2557
3769
|
if (!fileMatchesAccept(file, accept)) {
|
|
@@ -2799,7 +4011,7 @@ function FileUploadMenu({
|
|
|
2799
4011
|
}) {
|
|
2800
4012
|
const labels = { ...DEFAULT_FILE_UPLOAD_TRAY_LABELS, ...labelOverrides };
|
|
2801
4013
|
const visible = jobs.filter((job) => job.status !== "cancelled");
|
|
2802
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
4014
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
2803
4015
|
const isControlled = open !== void 0;
|
|
2804
4016
|
const resolvedOpen = isControlled ? open : uncontrolledOpen;
|
|
2805
4017
|
function setResolvedOpen(next) {
|
|
@@ -3056,8 +4268,8 @@ function createMultipartUploadController(options) {
|
|
|
3056
4268
|
};
|
|
3057
4269
|
}
|
|
3058
4270
|
function useMediaQuery2(query) {
|
|
3059
|
-
const [matches, setMatches] =
|
|
3060
|
-
|
|
4271
|
+
const [matches, setMatches] = React.useState(false);
|
|
4272
|
+
React.useEffect(() => {
|
|
3061
4273
|
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
3062
4274
|
const mql = window.matchMedia(query);
|
|
3063
4275
|
const onChange = () => setMatches(mql.matches);
|
|
@@ -3422,10 +4634,10 @@ function CookieConsentBanner({
|
|
|
3422
4634
|
className
|
|
3423
4635
|
}) {
|
|
3424
4636
|
const copy = { ...DEFAULT_COOKIE_CONSENT_BANNER_LABELS, ...labels };
|
|
3425
|
-
const [consent, setConsent] =
|
|
4637
|
+
const [consent, setConsent] = React.useState(
|
|
3426
4638
|
"pending"
|
|
3427
4639
|
);
|
|
3428
|
-
|
|
4640
|
+
React.useEffect(() => {
|
|
3429
4641
|
if (variant === "embed" || isEmbeddedWindow()) {
|
|
3430
4642
|
setConsent("necessary");
|
|
3431
4643
|
return;
|
|
@@ -4003,8 +5215,8 @@ function MatchReview({
|
|
|
4003
5215
|
className
|
|
4004
5216
|
}) {
|
|
4005
5217
|
const copy = { ...DEFAULT_MATCH_REVIEW_LABELS, ...labels };
|
|
4006
|
-
const reasonId =
|
|
4007
|
-
const [reason, setReason] =
|
|
5218
|
+
const reasonId = React.useId();
|
|
5219
|
+
const [reason, setReason] = React.useState("");
|
|
4008
5220
|
const trimmed = reason.trim();
|
|
4009
5221
|
if (!hit) {
|
|
4010
5222
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4115,9 +5327,11 @@ exports.AvatarEditorDialog = AvatarEditorDialog;
|
|
|
4115
5327
|
exports.COOKIE_CONSENT_MAX_AGE = COOKIE_CONSENT_MAX_AGE;
|
|
4116
5328
|
exports.COOKIE_CONSENT_NAME = COOKIE_CONSENT_NAME;
|
|
4117
5329
|
exports.COOKIE_CONSENT_VALUES = COOKIE_CONSENT_VALUES;
|
|
5330
|
+
exports.COUNTRY_OPTIONS = COUNTRY_OPTIONS;
|
|
4118
5331
|
exports.ConfirmDestructiveDialog = ConfirmDestructiveDialog;
|
|
4119
5332
|
exports.CookieConsentBanner = CookieConsentBanner;
|
|
4120
5333
|
exports.CostBreakdownCard = CostBreakdownCard;
|
|
5334
|
+
exports.CountryPicker = CountryPicker;
|
|
4121
5335
|
exports.DATA_TABLE_ROW_CLASS = DATA_TABLE_ROW_CLASS;
|
|
4122
5336
|
exports.DEFAULT_AUDIT_TIMELINE_LABELS = DEFAULT_AUDIT_TIMELINE_LABELS;
|
|
4123
5337
|
exports.DEFAULT_COOKIE_CONSENT_BANNER_LABELS = DEFAULT_COOKIE_CONSENT_BANNER_LABELS;
|
|
@@ -4187,13 +5401,18 @@ exports.avatarFallbackStyle = avatarFallbackStyle;
|
|
|
4187
5401
|
exports.cn = cn;
|
|
4188
5402
|
exports.cookieConsentAllowsReplay = cookieConsentAllowsReplay;
|
|
4189
5403
|
exports.cookieDomainFromHostname = cookieDomainFromHostname;
|
|
5404
|
+
exports.countryLabel = countryLabel;
|
|
5405
|
+
exports.countryPickerItems = countryPickerItems;
|
|
4190
5406
|
exports.createMultipartUploadController = createMultipartUploadController;
|
|
4191
5407
|
exports.defaultLanguages = defaultLanguages;
|
|
4192
5408
|
exports.fileMatchesAccept = fileMatchesAccept;
|
|
5409
|
+
exports.filterCountries = filterCountries;
|
|
5410
|
+
exports.formatCountryOptionLabel = formatCountryOptionLabel;
|
|
4193
5411
|
exports.getAvatarColors = getAvatarColors;
|
|
4194
5412
|
exports.getInitials = getInitials;
|
|
4195
5413
|
exports.isCookieConsentValue = isCookieConsentValue;
|
|
4196
5414
|
exports.isEmbeddedWindow = isEmbeddedWindow;
|
|
5415
|
+
exports.isKnownCountryCode = isKnownCountryCode;
|
|
4197
5416
|
exports.matchClaimIsUnverified = matchClaimIsUnverified;
|
|
4198
5417
|
exports.parseCookieConsent = parseCookieConsent;
|
|
4199
5418
|
exports.partRanges = partRanges;
|