@worldresources/wri-design-systems 2.211.0 → 2.211.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/dist/index.cjs.js +315 -302
- package/dist/index.esm.js +315 -302
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -965,15 +965,28 @@
|
|
|
965
965
|
border: ${j(100)} solid ${w("neutral",600)};
|
|
966
966
|
border-radius: ${$(300)};
|
|
967
967
|
padding: ${k(200)};
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
968
|
+
/* Elevation matches the shadow used across the button family
|
|
969
|
+
(Button/styled.ts). No shadow token exists in the theme yet. */
|
|
970
|
+
box-shadow: 0 0.25rem 0.375rem -0.0625rem #0000001a;
|
|
971
|
+
`,Yg=e=>{switch(e){case"secondary":return w("neutral",400);case"borderless":return"transparent";case"outline":return w("primary",900);case"negative":return w("error",500);default:return w("primary",800)}},Qg=(e,t)=>{if(t)return w("neutral",500);switch(e){case"secondary":return w("neutral",800);case"borderless":return w("neutral",900);case"outline":return w("primary",800);case"negative":return w("accessible","text-on-negative-mids")||w("error",900);default:return w("accessible","text-on-primary-mids")||w("primary",900)}},eb=e=>i.css`
|
|
972
|
+
/* Hover on the closed trigger: keep the Button hover background and
|
|
973
|
+
elevation, only emphasize the border. */
|
|
974
|
+
&:hover:not(:disabled):not([data-disabled]):not([data-state='open']) {
|
|
975
|
+
border-color: ${Yg(e)};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/* Open (menu expanded): default background + emphasized border, no
|
|
979
|
+
elevation. The doubled ampersand doubles the class specificity so this
|
|
980
|
+
rule also wins over the Button hover styles while the menu is open. */
|
|
981
|
+
&&[data-state='open']:not(:disabled):not([data-disabled]) {
|
|
982
|
+
background-color: ${(e=>{switch(e){case"secondary":return w("neutral",100);case"borderless":return`color-mix(in srgb, ${w("primary",500)} 40%, transparent)`;case"outline":return"transparent";case"negative":return w("error",100);default:return w("primary",500)}})(e)};
|
|
983
|
+
border-color: ${Yg(e)};
|
|
984
|
+
box-shadow: none;
|
|
972
985
|
}
|
|
973
|
-
`,
|
|
986
|
+
`,tb=e=>i.css`
|
|
974
987
|
font-size: ${C("small"===e?300:400)};
|
|
975
988
|
line-height: ${S("small"===e?500:600)};
|
|
976
|
-
color: ${w("neutral",
|
|
989
|
+
color: ${w("neutral",900)};
|
|
977
990
|
padding: ${k(100)};
|
|
978
991
|
cursor: pointer;
|
|
979
992
|
|
|
@@ -985,33 +998,33 @@
|
|
|
985
998
|
cursor: not-allowed;
|
|
986
999
|
color: ${w("neutral",500)};
|
|
987
1000
|
}
|
|
988
|
-
`,
|
|
1001
|
+
`,nb=i.css`
|
|
989
1002
|
&:focus-visible {
|
|
990
1003
|
outline-color: ${w("primary",700)};
|
|
991
1004
|
}
|
|
992
|
-
`,
|
|
1005
|
+
`,rb=e=>({padding:"small"===e?`0 ${k(200)}`:`0 ${k(300)}`}),ob=n.forwardRef(((t,n)=>{const{portalled:o=!0,portalRef:i,...s}=t;return r.jsx(e.Portal,{disabled:!o,container:i,children:r.jsx(e.Menu.Positioner,{children:r.jsx(e.Menu.Content,{css:Xg,ref:n,...s})})})})),ib=i.css`
|
|
993
1006
|
position: relative;
|
|
994
1007
|
width: 100%;
|
|
995
1008
|
padding-left: 1.1875rem;
|
|
996
|
-
`,
|
|
1009
|
+
`,sb=i.css`
|
|
997
1010
|
font-size: ${C(400)};
|
|
998
1011
|
line-height: ${S(600)};
|
|
999
1012
|
margin-bottom: ${k(100)};
|
|
1000
1013
|
color: ${w("neutral",900)};
|
|
1001
|
-
`,
|
|
1014
|
+
`,ab=i.css`
|
|
1002
1015
|
width: 0.1875rem;
|
|
1003
1016
|
height: 100%;
|
|
1004
1017
|
background-color: ${w("error",900)};
|
|
1005
1018
|
position: absolute;
|
|
1006
1019
|
top: 0;
|
|
1007
1020
|
left: 0;
|
|
1008
|
-
`,
|
|
1021
|
+
`,lb=i.css`
|
|
1009
1022
|
font-size: ${C(300)};
|
|
1010
1023
|
line-height: ${S(500)};
|
|
1011
1024
|
font-weight: 700;
|
|
1012
1025
|
color: ${w("error",900)};
|
|
1013
1026
|
margin-bottom: ${k(200)};
|
|
1014
|
-
`,
|
|
1027
|
+
`,cb=i.css`
|
|
1015
1028
|
.chakra-checkbox__control {
|
|
1016
1029
|
width: ${k(500)};
|
|
1017
1030
|
height: ${k(500)};
|
|
@@ -1086,7 +1099,7 @@
|
|
|
1086
1099
|
cursor: not-allowed;
|
|
1087
1100
|
}
|
|
1088
1101
|
}
|
|
1089
|
-
`,
|
|
1102
|
+
`,db=({name:t,value:n,checked:o,defaultChecked:i,disabled:s,indeterminate:a,onCheckedChange:l,children:c,tabIndex:d,...u})=>r.jsxs(e.Checkbox.Root,{css:cb,name:t,value:n,checked:a?"indeterminate":o,defaultChecked:i,disabled:s,onCheckedChange:l,gap:c?"0.625rem":"0",...u,children:[r.jsx(e.Checkbox.HiddenInput,{tabIndex:d}),r.jsx(e.Checkbox.Control,{children:a?r.jsx(Uf,{}):r.jsx(Wf,{})}),r.jsx(e.Checkbox.Label,{children:c})]}),ub=i.css`
|
|
1090
1103
|
width: 15.0625rem;
|
|
1091
1104
|
min-height: 4.375rem;
|
|
1092
1105
|
padding: ${k(300)};
|
|
@@ -1127,7 +1140,7 @@
|
|
|
1127
1140
|
color: ${w("neutral",600)};
|
|
1128
1141
|
cursor: not-allowed;
|
|
1129
1142
|
}
|
|
1130
|
-
`,
|
|
1143
|
+
`,hb=i.css`
|
|
1131
1144
|
width: 100%;
|
|
1132
1145
|
padding: 0;
|
|
1133
1146
|
display: flex;
|
|
@@ -1137,25 +1150,25 @@
|
|
|
1137
1150
|
&[data-disabled] {
|
|
1138
1151
|
background-color: ${w("neutral",100)};
|
|
1139
1152
|
}
|
|
1140
|
-
`,
|
|
1153
|
+
`,pb=i.css`
|
|
1141
1154
|
svg {
|
|
1142
1155
|
height: 2rem;
|
|
1143
1156
|
width: 2rem;
|
|
1144
1157
|
}
|
|
1145
|
-
`,
|
|
1158
|
+
`,fb=(e,t)=>i.css`
|
|
1146
1159
|
font-size: ${C(400)};
|
|
1147
1160
|
line-height: ${S(600)};
|
|
1148
1161
|
font-weight: 400;
|
|
1149
1162
|
color: ${w("neutral",t?600:900)};
|
|
1150
1163
|
text-align: ${"centered"===e?"center":"left"};
|
|
1151
1164
|
display: block;
|
|
1152
|
-
`,
|
|
1165
|
+
`,mb=(e,t)=>i.css`
|
|
1153
1166
|
font-size: ${C(300)};
|
|
1154
1167
|
line-height: ${S(500)};
|
|
1155
1168
|
font-weight: 400;
|
|
1156
1169
|
color: ${w("neutral",t?600:700)};
|
|
1157
1170
|
text-align: ${"centered"===e?"center":"left"};
|
|
1158
|
-
`,
|
|
1171
|
+
`,gb=e=>i.css`
|
|
1159
1172
|
position: ${"centered"===e?"absolute":"relative"};
|
|
1160
1173
|
top: 0;
|
|
1161
1174
|
right: 0;
|
|
@@ -1181,7 +1194,7 @@
|
|
|
1181
1194
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1182
1195
|
cursor: not-allowed;
|
|
1183
1196
|
}
|
|
1184
|
-
`,
|
|
1197
|
+
`,bb=i.css`
|
|
1185
1198
|
width: 100%;
|
|
1186
1199
|
padding: 0;
|
|
1187
1200
|
display: flex;
|
|
@@ -1191,31 +1204,31 @@
|
|
|
1191
1204
|
&[data-disabled] {
|
|
1192
1205
|
background-color: ${w("neutral",100)};
|
|
1193
1206
|
}
|
|
1194
|
-
`,
|
|
1207
|
+
`,vb=e=>i.css`
|
|
1195
1208
|
width: 100%;
|
|
1196
1209
|
display: flex;
|
|
1197
1210
|
flex-direction: ${"centered"===e?"column":"row"};
|
|
1198
1211
|
align-items: center;
|
|
1199
1212
|
gap: ${k(300)};
|
|
1200
|
-
`,
|
|
1213
|
+
`,yb=i.css`
|
|
1201
1214
|
svg {
|
|
1202
1215
|
height: 2rem;
|
|
1203
1216
|
width: 2rem;
|
|
1204
1217
|
color: ${w("neutral",400)};
|
|
1205
1218
|
}
|
|
1206
|
-
`,
|
|
1219
|
+
`,xb=(e,t)=>i.css`
|
|
1207
1220
|
font-size: ${C(400)};
|
|
1208
1221
|
line-height: ${S(600)};
|
|
1209
1222
|
font-weight: 400;
|
|
1210
1223
|
color: ${w("neutral",t?600:900)};
|
|
1211
1224
|
text-align: ${"centered"===e?"center":"left"};
|
|
1212
|
-
`,
|
|
1225
|
+
`,wb=(e,t)=>i.css`
|
|
1213
1226
|
font-size: ${C(300)};
|
|
1214
1227
|
line-height: ${S(500)};
|
|
1215
1228
|
font-weight: 400;
|
|
1216
1229
|
color: ${w("neutral",t?600:700)};
|
|
1217
1230
|
text-align: ${"centered"===e?"center":"left"};
|
|
1218
|
-
`,
|
|
1231
|
+
`,Cb=e=>i.css`
|
|
1219
1232
|
position: ${"centered"===e?"absolute":"relative"};
|
|
1220
1233
|
top: 0;
|
|
1221
1234
|
right: 0;
|
|
@@ -1246,7 +1259,7 @@
|
|
|
1246
1259
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1247
1260
|
cursor: not-allowed;
|
|
1248
1261
|
}
|
|
1249
|
-
`,
|
|
1262
|
+
`,kb=i.css`
|
|
1250
1263
|
.ds-radio-item-indicator {
|
|
1251
1264
|
width: ${k(500)};
|
|
1252
1265
|
height: ${k(500)};
|
|
@@ -1312,30 +1325,30 @@
|
|
|
1312
1325
|
}
|
|
1313
1326
|
}
|
|
1314
1327
|
}
|
|
1315
|
-
`,
|
|
1328
|
+
`,Sb=i.css`
|
|
1316
1329
|
cursor: pointer;
|
|
1317
1330
|
|
|
1318
1331
|
&[data-disabled] {
|
|
1319
1332
|
color: ${w("neutral",500)};
|
|
1320
1333
|
cursor: not-allowed;
|
|
1321
1334
|
}
|
|
1322
|
-
|
|
1335
|
+
`,$b=i.css`
|
|
1323
1336
|
margin: 0 !important;
|
|
1324
1337
|
width: ${k(500)} !important;
|
|
1325
1338
|
height: ${k(500)} !important;
|
|
1326
|
-
|
|
1339
|
+
`,jb=({children:t,value:n,disabled:o,...i})=>r.jsxs(e.RadioGroup.Item,{css:kb,value:n,disabled:o,...i,children:[r.jsx(e.RadioGroup.ItemHiddenInput,{css:$b}),r.jsx(e.RadioGroup.ItemIndicator,{className:"ds-radio-item-indicator"}),t?r.jsx(e.RadioGroup.ItemText,{css:Sb,children:t}):null]}),Mb=({children:n,horizontal:r=!1,name:o,value:i="",onChange:s,customGap:a,...l})=>{let c=r?"1.25rem":"0.5rem";return c=a||c,t.jsx(e.RadioGroup.Root,{onValueChange:e=>{s&&s(o,e.value||"")},value:i,...l,children:t.jsx(e.HStack,{gap:c,flexDirection:r?"row":"column",alignItems:"flex-start",flexWrap:"wrap",children:n})})},Eb=i.css`
|
|
1327
1340
|
height: fit-content;
|
|
1328
|
-
`,
|
|
1341
|
+
`,Tb=i.css`
|
|
1329
1342
|
position: relative;
|
|
1330
1343
|
height: ${S(400)};
|
|
1331
|
-
`,
|
|
1344
|
+
`,Ob=i.css`
|
|
1332
1345
|
position: absolute;
|
|
1333
1346
|
top: 0;
|
|
1334
1347
|
font-size: ${C(200)};
|
|
1335
1348
|
line-height: ${S(400)};
|
|
1336
1349
|
color: ${w("neutral",800)};
|
|
1337
1350
|
white-space: nowrap;
|
|
1338
|
-
`,
|
|
1351
|
+
`,Lb=e=>i.css`
|
|
1339
1352
|
height: ${k(500)};
|
|
1340
1353
|
width: ${k(500)};
|
|
1341
1354
|
background-color: ${e?w("neutral",100):w("primary",500)};
|
|
@@ -1393,7 +1406,7 @@
|
|
|
1393
1406
|
outline: none;
|
|
1394
1407
|
cursor: not-allowed;
|
|
1395
1408
|
}
|
|
1396
|
-
`,
|
|
1409
|
+
`,Ab=i.css`
|
|
1397
1410
|
font-size: ${C(300)};
|
|
1398
1411
|
line-height: ${S(500)};
|
|
1399
1412
|
color: ${w("neutral",800)};
|
|
@@ -1412,20 +1425,20 @@
|
|
|
1412
1425
|
z-index: 2;
|
|
1413
1426
|
pointer-events: none;
|
|
1414
1427
|
white-space: nowrap;
|
|
1415
|
-
`,
|
|
1428
|
+
`,Rb=(e,t)=>i.css`
|
|
1416
1429
|
background-color: ${w("neutral",300)};
|
|
1417
1430
|
border: none;
|
|
1418
1431
|
box-shadow: none;
|
|
1419
1432
|
${e?.length?`background: linear-gradient(to right, ${e.join(", ")});`:""}
|
|
1420
1433
|
${t?`\n position: relative;\n height: ${k(500)};\n border-radius: ${$(500)};\n border: ${j(100)} solid ${w("neutral",300)};\n overflow: hidden;\n `:""}
|
|
1421
|
-
`,
|
|
1434
|
+
`,Nb=e=>i.css`
|
|
1422
1435
|
position: absolute;
|
|
1423
1436
|
top: 0;
|
|
1424
1437
|
bottom: 0;
|
|
1425
1438
|
${"start"===e?"left":"right"}: 0;
|
|
1426
1439
|
background-color: ${w("neutral",200)};
|
|
1427
1440
|
pointer-events: none;
|
|
1428
|
-
`,
|
|
1441
|
+
`,Db=(e,t)=>i.css`
|
|
1429
1442
|
background-color: ${t?"transparent":w("primary",500)};
|
|
1430
1443
|
border: ${t?"none":`${j(100)} solid ${w("primary",700)}`};
|
|
1431
1444
|
border-radius: ${e?"0":$(500)};
|
|
@@ -1438,7 +1451,7 @@
|
|
|
1438
1451
|
background-color: ${w("neutral",400)};
|
|
1439
1452
|
border: none;
|
|
1440
1453
|
}
|
|
1441
|
-
`,
|
|
1454
|
+
`,Ib=(e,t)=>i.css`
|
|
1442
1455
|
&[data-state='under-value'] {
|
|
1443
1456
|
.chakra-slider__markerIndicator {
|
|
1444
1457
|
background-color: ${w("neutral",e?500:200)};
|
|
@@ -1464,7 +1477,7 @@
|
|
|
1464
1477
|
}
|
|
1465
1478
|
|
|
1466
1479
|
${t?`\n --translate-y: -24% !important;\n\n .chakra-slider__markerIndicator {\n height: 1rem;\n width: 0.25rem;\n background-color: ${w("primary",700)} !important;\n }\n\n &[data-disabled] {\n .chakra-slider__markerIndicator {\n background-color: ${w("neutral",400)} !important;\n }\n }\n `:""};
|
|
1467
|
-
`,
|
|
1480
|
+
`,Pb=t=>{const{value:n,hasGradient:o}=t;return r.jsx(e.For,{each:n,children:(t,n)=>r.jsxs(e.Slider.Thumb,{css:Lb(o),index:n,children:[r.jsx("div",{css:Ab,className:"ds-slider-value-preview",children:t}),r.jsx(e.Slider.HiddenInput,{})]},n)})},zb=e=>{const{value:t,min:n,max:o}=e;if(!t?.length)return null;const i=o-n||1,s=(t[0]-n)/i*100,a=(t[t.length-1]-n)/i*100;return r.jsxs(r.Fragment,{children:[s>0&&r.jsx("div",{css:Nb("start"),style:{width:`${s}%`}}),a<100&&r.jsx("div",{css:Nb("end"),style:{width:100-a+"%"}})]})},Vb=n.forwardRef(((t,n)=>{const{marks:o,isCentred:i}=t;return o?.length?r.jsx(e.Slider.MarkerGroup,{ref:n,children:o.map(((t,n)=>{const o="number"==typeof t?t:t.value,s=i&&1===n;return r.jsx(e.Slider.Marker,{css:Ib(i,s),value:o,children:r.jsx(e.Slider.MarkerIndicator,{})},o)}))}):null})),Bb=e=>{const{marks:t,min:n,max:o}=e,i=t?.filter((e=>void 0!==e.label&&null!==e.label));if(!i?.length)return null;const s=o-n||1;return r.jsx("div",{css:Tb,children:i.map((e=>{let t="-50%";return e.value===n?t="0":e.value===o&&(t="-100%"),r.jsx("span",{css:Ob,style:{left:(e.value-n)/s*100+"%",transform:`translateX(${t})`},children:e.label},e.value)}))})},Hb=n.forwardRef(((t,o)=>{const{marks:i,onValueChange:s,isCentred:a,value:l,colors:c,...d}=t,[u,h]=n.useState(l||[0]),p=!!c?.length;n.useEffect((()=>{h(l||[0])}),[l]);const f=d.min??0,m=d.max??100;let g=i?.map((e=>"number"==typeof e?{value:e,label:void 0}:e));a&&(g=[f,(f+m)/2,m].map((e=>({value:e,label:void 0}))));const b=!!g?.some((e=>e.label));return r.jsxs(e.Slider.Root,{css:Eb,ref:o,thumbAlignment:"center",onValueChange:e=>{h(e.value),s&&s(e)},origin:a?"center":"start",value:u,...d,children:[r.jsx(Bb,{marks:g,min:f,max:m}),r.jsxs(e.Slider.Control,{"data-has-mark-label":b||void 0,children:[r.jsxs(e.Slider.Track,{css:Rb(c,p),children:[p&&r.jsx(zb,{value:u,min:f,max:m}),r.jsx(e.Slider.Range,{css:Db(a,p)})]}),r.jsx(Vb,{marks:g,isCentred:a}),r.jsx(Pb,{value:u,hasGradient:p})]})]})})),_b=i.css`
|
|
1468
1481
|
--switch-height: 1.5rem;
|
|
1469
1482
|
--switch-width: 2.5rem;
|
|
1470
1483
|
|
|
@@ -1564,26 +1577,26 @@
|
|
|
1564
1577
|
cursor: not-allowed;
|
|
1565
1578
|
}
|
|
1566
1579
|
}
|
|
1567
|
-
`,
|
|
1580
|
+
`,Fb=({name:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,isLabelOnLeft:s=!1,children:a,labels:l,...c})=>{const d=Vf("Switch",l);return r.jsx("div",{style:{display:"flex",alignItems:"center"},children:r.jsxs(e.Switch.Root,{css:_b,id:t,name:t,"aria-label":c["aria-label"]||d.defaultAriaLabel(t),defaultChecked:n,onCheckedChange:({checked:e})=>{o&&o(t,e)},disabled:i,...c,children:[s&&null!=a?r.jsx(e.Switch.Label,{children:a}):null,r.jsx(e.Switch.HiddenInput,{style:{width:"2.625rem",height:"1.625rem"}}),r.jsx("div",{className:"chakra-switch__control-container",children:r.jsx(e.Switch.Control,{children:r.jsx(e.Switch.Thumb,{children:r.jsx(e.Switch.ThumbIndicator,{display:"flex",children:r.jsx(Wf,{})})})})}),s||null==a?null:r.jsx(e.Switch.Label,{children:a})]})})},qb=e=>i.css`
|
|
1568
1581
|
display: grid;
|
|
1569
1582
|
grid-template-rows: ${e?"1fr":"0fr"};
|
|
1570
1583
|
opacity: ${e?1:0};
|
|
1571
1584
|
transition:
|
|
1572
1585
|
grid-template-rows 300ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
1573
1586
|
opacity 200ms ease;
|
|
1574
|
-
`,
|
|
1587
|
+
`,Wb=i.css`
|
|
1575
1588
|
overflow: hidden;
|
|
1576
1589
|
min-height: 0;
|
|
1577
|
-
`,
|
|
1590
|
+
`,Ub=e=>i.css`
|
|
1578
1591
|
display: flex;
|
|
1579
1592
|
flex-direction: ${e?"row":"column"};
|
|
1580
1593
|
flex-wrap: wrap;
|
|
1581
1594
|
gap: ${k(e?500:300)};
|
|
1582
1595
|
padding: ${k(100)};
|
|
1583
|
-
`,
|
|
1596
|
+
`,Kb=i.css`
|
|
1584
1597
|
color: ${w("neutral",700)};
|
|
1585
1598
|
margin-left: ${k(100)};
|
|
1586
|
-
`,
|
|
1599
|
+
`,Gb=i.css`
|
|
1587
1600
|
color: ${w("neutral",700)};
|
|
1588
1601
|
display: flex;
|
|
1589
1602
|
align-items: center;
|
|
@@ -1597,18 +1610,18 @@
|
|
|
1597
1610
|
display: inline-flex;
|
|
1598
1611
|
transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
1599
1612
|
}
|
|
1600
|
-
`,
|
|
1613
|
+
`,Zb=e=>i.css`
|
|
1601
1614
|
transform: rotate(${e?"180deg":"0deg"});
|
|
1602
|
-
`,
|
|
1615
|
+
`,Jb=i.css`
|
|
1603
1616
|
display: flex;
|
|
1604
1617
|
align-items: center;
|
|
1605
1618
|
justify-content: space-between;
|
|
1606
1619
|
width: 100%;
|
|
1607
|
-
`,
|
|
1620
|
+
`,Xb=i.css`
|
|
1608
1621
|
width: 100%;
|
|
1609
1622
|
max-width: 23.125rem;
|
|
1610
1623
|
position: relative;
|
|
1611
|
-
`,
|
|
1624
|
+
`,Yb=(e,t)=>i.css`
|
|
1612
1625
|
width: 100%;
|
|
1613
1626
|
|
|
1614
1627
|
.ds-text-input-container {
|
|
@@ -1643,7 +1656,7 @@
|
|
|
1643
1656
|
padding: 0 ${k(100)};
|
|
1644
1657
|
}
|
|
1645
1658
|
}
|
|
1646
|
-
`,
|
|
1659
|
+
`,Qb=l.forwardRef(((n,r)=>{const{children:o,...i}=n,{"aria-label":s,...a}=i;return t.jsxs(e.Select.Control,{...a,children:[t.jsx(e.Select.Trigger,{ref:r,"aria-label":s,focusVisibleRing:"none",children:o}),t.jsx(e.Select.IndicatorGroup,{children:t.jsx(e.Select.Indicator,{children:t.jsx(Gf,{})})})]})})),ev=l.forwardRef(((n,r)=>{const{onKeyDown:o,onPointerMove:i,...s}=n;return t.jsx(e.Portal,{children:t.jsx(e.Select.Positioner,{children:t.jsx(e.Select.Content,{...s,ref:r,onKeyDown:e=>{e.currentTarget.dataset.navSource="keyboard",o?.(e)},onPointerMove:e=>{e.currentTarget.dataset.navSource="pointer",i?.(e)}})})})})),tv=l.forwardRef(((n,r)=>{const{item:o,children:i,...s}=n;return t.jsx(e.Select.Item,{item:o,...s,ref:r,children:i},o.value)})),nv=l.forwardRef(((n,r)=>{const{children:o,...i}=n;return t.jsx(e.Select.ValueText,{...i,ref:r,children:t.jsx(e.Select.Context,{children:e=>{const t=e.selectedItems;return 0===t.length?n.placeholder:o?o(t):1===t.length?e.collection.stringifyItem(t[0]):`${t.length} selected`}})})})),rv=l.forwardRef(((n,r)=>t.jsx(e.Select.Root,{...n,ref:r,positioning:{sameWidth:!0,...n.positioning},children:n.asChild?n.children:t.jsxs(t.Fragment,{children:[t.jsx(e.Select.HiddenSelect,{}),n.children]})})));l.forwardRef(((n,r)=>{const{children:o,label:i,...s}=n;return t.jsxs(e.Select.ItemGroup,{...s,ref:r,children:[t.jsx(e.Select.ItemGroupLabel,{children:i}),o]})})),e.Select.Label,e.Select.ItemText;const ov=(e,t)=>t?w("error",900):w("neutral",e?700:400),iv=(e,t,n,r)=>i.css`
|
|
1647
1660
|
border-radius: ${$(300)};
|
|
1648
1661
|
overflow: visible;
|
|
1649
1662
|
|
|
@@ -1656,7 +1669,7 @@
|
|
|
1656
1669
|
border-radius: ${$(300)};
|
|
1657
1670
|
padding: ${k(50)} ${k(200)};
|
|
1658
1671
|
border: ${j(100)} solid
|
|
1659
|
-
${
|
|
1672
|
+
${ov(t,n)};
|
|
1660
1673
|
box-shadow: 0 0.0625rem 0.125rem 0 #0000000d;
|
|
1661
1674
|
cursor: pointer;
|
|
1662
1675
|
background-color: ${w("neutral",100)};
|
|
@@ -1681,7 +1694,7 @@
|
|
|
1681
1694
|
&[data-placement^='top'] {
|
|
1682
1695
|
border-bottom-left-radius: ${$(300)};
|
|
1683
1696
|
border-bottom-right-radius: ${$(300)};
|
|
1684
|
-
border-bottom-color: ${
|
|
1697
|
+
border-bottom-color: ${ov(t,n)};
|
|
1685
1698
|
|
|
1686
1699
|
border-top-left-radius: 0;
|
|
1687
1700
|
border-top-right-radius: 0;
|
|
@@ -1716,14 +1729,14 @@
|
|
|
1716
1729
|
}
|
|
1717
1730
|
}
|
|
1718
1731
|
}
|
|
1719
|
-
`,
|
|
1732
|
+
`,sv=(e,t)=>i.css`
|
|
1720
1733
|
margin-top: calc(${k(200)} * -1);
|
|
1721
1734
|
border-radius: ${$(300)};
|
|
1722
1735
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1723
1736
|
border-top-left-radius: 0;
|
|
1724
1737
|
border-top-right-radius: 0;
|
|
1725
1738
|
border-top: ${j(100)} solid
|
|
1726
|
-
${
|
|
1739
|
+
${ov(e,t)};
|
|
1727
1740
|
box-shadow:
|
|
1728
1741
|
0 0.25rem 0.375rem -0.25rem #0000001a,
|
|
1729
1742
|
0 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
@@ -1738,12 +1751,12 @@
|
|
|
1738
1751
|
border-bottom-left-radius: 0;
|
|
1739
1752
|
border-bottom-right-radius: 0;
|
|
1740
1753
|
border-bottom: ${j(100)} solid
|
|
1741
|
-
${
|
|
1754
|
+
${ov(e,t)};
|
|
1742
1755
|
box-shadow:
|
|
1743
1756
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
1744
1757
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
1745
1758
|
}
|
|
1746
|
-
`,
|
|
1759
|
+
`,av=e=>i.css`
|
|
1747
1760
|
align-items: flex-start;
|
|
1748
1761
|
&[data-highlighted] {
|
|
1749
1762
|
background-color: ${kf(20)};
|
|
@@ -1765,7 +1778,7 @@
|
|
|
1765
1778
|
&:active {
|
|
1766
1779
|
background-color: ${kf(40)};
|
|
1767
1780
|
}
|
|
1768
|
-
`,
|
|
1781
|
+
`,lv=(e,t)=>i.css`
|
|
1769
1782
|
font-size: ${C("small"===e?300:400)};
|
|
1770
1783
|
line-height: ${S("small"===e?500:600)};
|
|
1771
1784
|
color: ${w("neutral",800)};
|
|
@@ -1773,7 +1786,7 @@
|
|
|
1773
1786
|
margin: 0;
|
|
1774
1787
|
|
|
1775
1788
|
${t?`color: ${w("neutral",600)} !important;`:""}
|
|
1776
|
-
`,
|
|
1789
|
+
`,cv=(e,t)=>i.css`
|
|
1777
1790
|
font-size: ${C("small"===e?300:400)};
|
|
1778
1791
|
line-height: ${S("small"===e?500:600)};
|
|
1779
1792
|
color: ${w("neutral",700)};
|
|
@@ -1781,7 +1794,7 @@
|
|
|
1781
1794
|
margin: 0;
|
|
1782
1795
|
|
|
1783
1796
|
${t?`color: ${w("neutral",600)} !important;`:""}
|
|
1784
|
-
`,
|
|
1797
|
+
`,dv=e=>i.css`
|
|
1785
1798
|
max-width: 100%;
|
|
1786
1799
|
display: flex;
|
|
1787
1800
|
justify-content: center;
|
|
@@ -1854,28 +1867,28 @@
|
|
|
1854
1867
|
background-color: ${w("neutral",300)};
|
|
1855
1868
|
color: ${w("neutral",600)};
|
|
1856
1869
|
}
|
|
1857
|
-
`,
|
|
1870
|
+
`,uv=i.css`
|
|
1858
1871
|
background-color: ${w("neutral",100)};
|
|
1859
1872
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
1860
|
-
`,
|
|
1873
|
+
`,hv=i.css`
|
|
1861
1874
|
background-color: ${w("neutral",200)};
|
|
1862
1875
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1863
|
-
`,
|
|
1876
|
+
`,pv=i.css`
|
|
1864
1877
|
background-color: ${w("success",100)};
|
|
1865
1878
|
border: ${j(100)} solid ${w("success",300)};
|
|
1866
1879
|
color: ${w("success",900)};
|
|
1867
|
-
`,
|
|
1880
|
+
`,fv=i.css`
|
|
1868
1881
|
background-color: ${w("warning",100)};
|
|
1869
1882
|
border: ${j(100)} solid ${w("warning",300)};
|
|
1870
1883
|
color: ${w("warning",900)};
|
|
1871
|
-
`,
|
|
1884
|
+
`,mv=i.css`
|
|
1872
1885
|
background-color: ${w("error",100)};
|
|
1873
1886
|
border: ${j(100)} solid ${w("error",300)};
|
|
1874
1887
|
color: ${w("error",900)};
|
|
1875
|
-
`,
|
|
1888
|
+
`,gv=({label:t,size:n="default",variant:o,disabled:i,icon:s,onClose:a,closable:l,labels:c,...d})=>{const u=Vf("Tag",c);let h=uv;return"info-grey"===o?h=hv:"success"===o?h=pv:"warning"===o?h=fv:"error"===o&&(h=mv),r.jsxs(e.Tag.Root,{css:[dv(n),h],"data-disabled":i,...d,children:[s?r.jsx(e.Tag.StartElement,{"aria-hidden":"true",children:s}):null,r.jsx(e.Tag.Label,{"aria-label":t,children:t}),l&&!i&&"small"!==n?r.jsx(e.Tag.EndElement,{children:r.jsx("div",{className:"chakra-tag__closeTrigger",role:"button",tabIndex:0,onClick:a,onKeyDown:e=>{!a||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a())},"aria-label":u.closeButtonAriaLabel(t),children:r.jsx(Xf,{})})}):null]})},bv=({placeholder:t,size:n,disabled:o})=>r.jsx(nv,{placeholder:t,children:t=>{const{label:i,caption:s}=t[0];return r.jsxs(e.HStack,{flexDirection:"column",alignItems:"flex-start",children:[r.jsx("p",{css:lv(n,o),children:i}),s?r.jsx("p",{css:cv(n,o),children:s}):null]})}}),vv=({placeholder:t,removeItem:n,disabled:o})=>r.jsx(nv,{placeholder:t,children:t=>t.map((t=>r.jsx(e.HStack,{flexDirection:"row",alignItems:"flex-start",children:r.jsx(gv,{label:t.label,variant:"info-grey",disabled:o,onClose:()=>n(t.value),closable:!0},t.value)},t.value)))}),yv=({label:t,caption:o,placeholder:i="",items:s,size:a="default",required:l,disabled:c,onChange:d,errorMessage:u,multiple:h,labels:p,value:f,defaultValue:m,...g})=>{const b=Vf("Select",p),[v,y]=n.useState(m||[]),x=void 0!==f,w=x?f:v,C=(t=>e.createListCollection({items:t}))(s),k=e=>{x||y(e),d&&d(e)},S=`${t||b.defaultAriaLabel}${l?b.requiredSuffix:""}${o?` ${o}.`:""}${c?b.disabledSuffix:""}`.trim(),$=w.length>0;return r.jsx(ag,{className:"ds-select-input-container",label:t,caption:o,errorMessage:u,required:l,disabled:c,size:a,showOptionalLabel:!1,semantics:"group",containerProps:{tabIndex:c?0:void 0,"aria-disabled":c,"aria-label":c?S:void 0},children:r.jsxs(rv,{css:{},collection:C,disabled:c,required:l,multiple:h,"aria-label":g["aria-label"]||t,value:w,onValueChange:e=>k(e.value),...g,children:[r.jsx(Qb,{css:iv(a,$,!!u,h),"aria-label":g["aria-label"]||t||b.defaultAriaLabel,children:h?r.jsx(vv,{placeholder:i,disabled:c,removeItem:e=>{const t=w.filter((t=>t!==e));k(t)}}):r.jsx(bv,{placeholder:i,size:a,disabled:c})}),r.jsx(ev,{css:sv($,!!u),children:C.items.map((t=>r.jsxs(tv,{css:av(h),item:t,children:[r.jsxs(e.Box,{children:[r.jsx("p",{css:lv(a),children:t.label}),r.jsx("p",{css:cv(a),children:t.caption})]}),h?r.jsx(db,{checked:w.some((e=>e===t.value)),"aria-label":`Select ${t.label}`,tabIndex:-1}):null]},t.value)))})]})})},xv=i.css`
|
|
1876
1889
|
width: 100%;
|
|
1877
1890
|
max-width: 30.375rem;
|
|
1878
|
-
`,
|
|
1891
|
+
`,wv=i.css`
|
|
1879
1892
|
display: flex;
|
|
1880
1893
|
align-items: center;
|
|
1881
1894
|
justify-content: space-between;
|
|
@@ -1892,11 +1905,11 @@
|
|
|
1892
1905
|
button {
|
|
1893
1906
|
min-width: 6.125rem;
|
|
1894
1907
|
}
|
|
1895
|
-
`,
|
|
1908
|
+
`,Cv=i.css`
|
|
1896
1909
|
display: flex;
|
|
1897
1910
|
flex-direction: column;
|
|
1898
1911
|
gap: ${k(200)};
|
|
1899
|
-
`,
|
|
1912
|
+
`,kv=e=>i.css`
|
|
1900
1913
|
height: ${k(200)};
|
|
1901
1914
|
width: 100%;
|
|
1902
1915
|
background-color: ${w("neutral",300)};
|
|
@@ -1909,7 +1922,7 @@
|
|
|
1909
1922
|
background-color: ${w("medium"===e?"warning":"strong"===e||"very-strong"===e?"success":"error",900)};
|
|
1910
1923
|
border-radius: ${$(500)};
|
|
1911
1924
|
}
|
|
1912
|
-
`,
|
|
1925
|
+
`,Sv=e=>i.css`
|
|
1913
1926
|
display: flex;
|
|
1914
1927
|
align-items: center;
|
|
1915
1928
|
gap: ${k(100)};
|
|
@@ -1930,7 +1943,7 @@
|
|
|
1930
1943
|
p {
|
|
1931
1944
|
margin: 0;
|
|
1932
1945
|
}
|
|
1933
|
-
|
|
1946
|
+
`,$v=i.css`
|
|
1934
1947
|
height: 100%;
|
|
1935
1948
|
min-height: 3rem;
|
|
1936
1949
|
width: 100%;
|
|
@@ -1939,7 +1952,7 @@
|
|
|
1939
1952
|
border-radius: ${$(300)};
|
|
1940
1953
|
background-color: ${w("neutral",100)};
|
|
1941
1954
|
padding: ${k(300)};
|
|
1942
|
-
|
|
1955
|
+
`,jv=i.css`
|
|
1943
1956
|
display: flex;
|
|
1944
1957
|
align-items: center;
|
|
1945
1958
|
gap: ${k(300)};
|
|
@@ -1962,19 +1975,19 @@
|
|
|
1962
1975
|
.chakra-slider__root {
|
|
1963
1976
|
width: 100%;
|
|
1964
1977
|
}
|
|
1965
|
-
`,
|
|
1978
|
+
`,Mv=i.css`
|
|
1966
1979
|
color: ${w("neutral",600)};
|
|
1967
1980
|
font-size: ${C(200)};
|
|
1968
1981
|
font-weight: 400;
|
|
1969
1982
|
line-height: ${S(400)};
|
|
1970
1983
|
margin: 0;
|
|
1971
|
-
`,
|
|
1984
|
+
`,Ev=i.css`
|
|
1972
1985
|
color: ${w("error",900)};
|
|
1973
1986
|
font-size: ${C(300)};
|
|
1974
1987
|
font-weight: 700;
|
|
1975
1988
|
line-height: ${S(500)};
|
|
1976
1989
|
margin: 0;
|
|
1977
|
-
`,
|
|
1990
|
+
`,Tv=(e,t)=>i.css`
|
|
1978
1991
|
height: 6.5rem;
|
|
1979
1992
|
width: 100%;
|
|
1980
1993
|
border-radius: ${$(300)};
|
|
@@ -2014,20 +2027,20 @@
|
|
|
2014
2027
|
}
|
|
2015
2028
|
|
|
2016
2029
|
${t?`\n border: ${j(100)} solid ${w("neutral",700)};\n `:""}
|
|
2017
|
-
`,
|
|
2030
|
+
`,Ov=e=>(e.getAttribute("data-placement")||"bottom").startsWith("top")?"top":"bottom",Lv=()=>{const[e,t]=n.useState("bottom"),r=n.useRef(null);return{contentRef:n.useCallback((e=>{r.current?.disconnect(),r.current=null,e&&(t(Ov(e)),r.current=new MutationObserver((()=>{t(Ov(e))})),r.current.observe(e,{attributes:!0,attributeFilter:["data-placement"]}))}),[]),placement:e}},Av=e=>e?w("error",900):w("neutral",700),Rv=e=>i.css`
|
|
2018
2031
|
&[data-state='open'] {
|
|
2019
2032
|
${e.startsWith("top")?"\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-top-color: transparent;\n ":"\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-color: transparent;\n "}
|
|
2020
2033
|
}
|
|
2021
|
-
`,
|
|
2034
|
+
`,Nv=i.css`
|
|
2022
2035
|
&[data-disabled],
|
|
2023
2036
|
[data-disabled] & {
|
|
2024
2037
|
color: ${w("neutral",500)};
|
|
2025
2038
|
}
|
|
2026
|
-
`,
|
|
2039
|
+
`,Dv=i.css`
|
|
2027
2040
|
&:focus-visible {
|
|
2028
2041
|
${Cf}
|
|
2029
2042
|
}
|
|
2030
|
-
`,
|
|
2043
|
+
`,Iv=i.css`
|
|
2031
2044
|
cursor: pointer;
|
|
2032
2045
|
color: ${w("neutral",900)};
|
|
2033
2046
|
font-size: ${C(400)};
|
|
@@ -2052,8 +2065,8 @@
|
|
|
2052
2065
|
cursor: not-allowed;
|
|
2053
2066
|
color: ${w("neutral",600)};
|
|
2054
2067
|
}
|
|
2055
|
-
`,
|
|
2056
|
-
${
|
|
2068
|
+
`,Pv=i.css`
|
|
2069
|
+
${Iv}
|
|
2057
2070
|
|
|
2058
2071
|
svg {
|
|
2059
2072
|
width: ${k(200)};
|
|
@@ -2061,19 +2074,19 @@
|
|
|
2061
2074
|
flex-shrink: 0;
|
|
2062
2075
|
color: ${w("neutral",900)};
|
|
2063
2076
|
}
|
|
2064
|
-
`,
|
|
2077
|
+
`,zv=i.css`
|
|
2065
2078
|
color: ${w("neutral",700)};
|
|
2066
2079
|
font-size: ${C(400)};
|
|
2067
2080
|
line-height: ${S(600)};
|
|
2068
2081
|
padding: 0;
|
|
2069
|
-
`,
|
|
2082
|
+
`,Vv=i.css`
|
|
2070
2083
|
width: 100%;
|
|
2071
2084
|
display: flex;
|
|
2072
2085
|
align-items: flex-start;
|
|
2073
2086
|
flex-wrap: wrap;
|
|
2074
2087
|
gap: ${k(100)};
|
|
2075
2088
|
padding-top: ${k(100)};
|
|
2076
|
-
`,Vv=new Set(["ArrowDown","ArrowUp","Home","End"]),Bv="__create__",Hv=e=>e.startsWith(Bv);function _v(){return"undefined"!=typeof window}function Fv(e){return Uv(e)?(e.nodeName||"").toLowerCase():"#document"}function qv(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wv(e){var t;return null==(t=(Uv(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Uv(e){return!!_v()&&(e instanceof Node||e instanceof qv(e).Node)}function Kv(e){return!!_v()&&(e instanceof Element||e instanceof qv(e).Element)}function Gv(e){return!!_v()&&(e instanceof HTMLElement||e instanceof qv(e).HTMLElement)}function Zv(e){return!(!_v()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qv(e).ShadowRoot)}const Jv=new Set(["inline","contents"]);function Xv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cy(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jv.has(o)}const Yv=new Set(["table","td","th"]);function Qv(e){return Yv.has(Fv(e))}const ey=[":popover-open",":modal"];function ty(e){return ey.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ny=["transform","translate","scale","rotate","perspective"],ry=["transform","translate","scale","rotate","perspective","filter"],oy=["paint","layout","strict","content"];function iy(e){const t=sy(),n=Kv(e)?cy(e):e;return ny.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||ry.some((e=>(n.willChange||"").includes(e)))||oy.some((e=>(n.contain||"").includes(e)))}function sy(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ay=new Set(["html","body","#document"]);function ly(e){return ay.has(Fv(e))}function cy(e){return qv(e).getComputedStyle(e)}function dy(e){return Kv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uy(e){if("html"===Fv(e))return e;const t=e.assignedSlot||e.parentNode||Zv(e)&&e.host||Wv(e);return Zv(t)?t.host:t}function hy(e){const t=uy(e);return ly(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gv(t)&&Xv(t)?t:hy(t)}function py(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=hy(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=qv(o);if(i){const e=fy(s);return t.concat(s,s.visualViewport||[],Xv(o)?o:[],e&&n?py(e):[])}return t.concat(o,py(o,[],n))}function fy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const my=Math.min,gy=Math.max,by=Math.round,vy=Math.floor,yy=e=>({x:e,y:e}),xy={left:"right",right:"left",bottom:"top",top:"bottom"},wy={start:"end",end:"start"};function Cy(e,t,n){return gy(e,my(t,n))}function ky(e,t){return"function"==typeof e?e(t):e}function Sy(e){return e.split("-")[0]}function $y(e){return e.split("-")[1]}function jy(e){return"x"===e?"y":"x"}function My(e){return"y"===e?"height":"width"}const Ey=new Set(["top","bottom"]);function Ty(e){return Ey.has(Sy(e))?"y":"x"}function Oy(e){return jy(Ty(e))}function Ly(e){return e.replace(/start|end/g,(e=>wy[e]))}const Ay=["left","right"],Ry=["right","left"],Ny=["top","bottom"],Dy=["bottom","top"];function Iy(e,t,n,r){const o=$y(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ry:Ay:t?Ay:Ry;case"left":case"right":return t?Ny:Dy;default:return[]}}(Sy(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ly)))),i}function Py(e){return e.replace(/left|right|bottom|top/g,(e=>xy[e]))}function zy(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Vy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const By="data-floating-ui-focusable";function Hy(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Zv(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _y(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fy(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function qy(e){return(null==e?void 0:e.ownerDocument)||document}function Wy(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Wy(e,t.id,n)]))}var Uy="undefined"!=typeof document?n.useLayoutEffect:function(){};const Ky={...l}.useInsertionEffect||(e=>e());function Gy(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Ky((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Zy(e,t,n){let{reference:r,floating:o}=e;const i=Ty(t),s=Oy(t),a=My(s),l=Sy(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch($y(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Jy(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=ky(t,e),f=zy(p),m=a[h?"floating"===u?"reference":"floating":u],g=Vy(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=Vy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+f.top)/y.y,bottom:(x.bottom-g.bottom+f.bottom)/y.y,left:(g.left-x.left+f.left)/y.x,right:(x.right-g.right+f.right)/y.x}}const Xy=new Set(["left","top"]);function Yy(e){const t=cy(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gv(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=by(n)!==i||by(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Qy(e){return Kv(e)?e:e.contextElement}function ex(e){const t=Qy(e);if(!Gv(t))return yy(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Yy(t);let s=(i?by(n.width):n.width)/r,a=(i?by(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const tx=yy(0);function nx(e){const t=qv(e);return sy()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tx}function rx(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Qy(e);let s=yy(1);t&&(r?Kv(r)&&(s=ex(r)):s=ex(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==qv(e))&&t}(i,n,r)?nx(i):yy(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=qv(i),t=r&&Kv(r)?qv(r):r;let n=e,o=fy(n);for(;o&&r&&t!==n;){const e=ex(o),t=o.getBoundingClientRect(),r=cy(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=qv(o),o=fy(n)}}return Vy({width:d,height:u,x:l,y:c})}function ox(e,t){const n=dy(e).scrollLeft;return t?t.left+n:rx(Wv(e)).left+n}function ix(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ox(e,n),y:n.top+t.scrollTop}}const sx=new Set(["absolute","fixed"]);function ax(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=qv(e),r=Wv(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=sy();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=ox(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Wv(e),n=dy(e),r=e.ownerDocument.body,o=gy(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gy(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ox(e);const a=-n.scrollTop;return"rtl"===cy(r).direction&&(s+=gy(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Wv(e));else if(Kv(t))r=function(e,t){const n=rx(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Gv(e)?ex(e):yy(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=nx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Vy(r)}function lx(e,t){const n=uy(e);return!(n===t||!Kv(n)||ly(n))&&("fixed"===cy(n).position||lx(n,t))}function cx(e,t,n){const r=Gv(t),o=Wv(t),i="fixed"===n,s=rx(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=yy(0);function c(){l.x=ox(o)}if(r||!r&&!i)if(("body"!==Fv(t)||Xv(o))&&(a=dy(t)),r){const e=rx(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?yy(0):ix(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function dx(e){return"static"===cy(e).position}function ux(e,t){if(!Gv(e)||"fixed"===cy(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Wv(e)===n&&(n=n.ownerDocument.body),n}function hx(e,t){const n=qv(e);if(ty(e))return n;if(!Gv(e)){let t=uy(e);for(;t&&!ly(t);){if(Kv(t)&&!dx(t))return t;t=uy(t)}return n}let r=ux(e,t);for(;r&&Qv(r)&&dx(r);)r=ux(r,t);return r&&ly(r)&&dx(r)&&!iy(r)?n:r||function(e){let t=uy(e);for(;Gv(t)&&!ly(t);){if(iy(t))return t;if(ty(t))return null;t=uy(t)}return null}(e)||n}const px={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Wv(r),a=!!t&&ty(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=yy(1);const d=yy(0),u=Gv(r);if((u||!u&&!i)&&(("body"!==Fv(r)||Xv(s))&&(l=dy(r)),Gv(r))){const e=rx(r);c=ex(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?yy(0):ix(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:Wv,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?ty(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=py(e,[],!1).filter((e=>Kv(e)&&"body"!==Fv(e))),o=null;const i="fixed"===cy(e).position;let s=i?uy(e):e;for(;Kv(s)&&!ly(s);){const t=cy(s),n=iy(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&sx.has(o.position)||Xv(s)&&!n&&lx(e,s))?r=r.filter((e=>e!==s)):o=t,s=uy(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=ax(t,n,o);return e.top=gy(r.top,e.top),e.right=my(r.right,e.right),e.bottom=my(r.bottom,e.bottom),e.left=gy(r.left,e.left),e}),ax(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:hx,getElementRects:async function(e){const t=this.getOffsetParent||hx,n=this.getDimensions,r=await n(e.floating);return{reference:cx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Yy(e);return{width:t,height:n}},getScale:ex,isElement:Kv,isRTL:function(e){return"rtl"===cy(e).direction}};function fx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mx(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Qy(e),d=o||i?[...c?py(c):[],...py(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=Wv(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-vy(u)+"px "+-vy(o.clientWidth-(d+h))+"px "+-vy(o.clientHeight-(u+p))+"px "+-vy(d)+"px",threshold:gy(0,my(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||fx(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?rx(e):null;return l&&function t(){const r=rx(e);m&&!fx(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const gx=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Sy(n),a=$y(n),l="y"===Ty(n),c=Xy.has(s)?-1:1,d=i&&l?-1:1,u=ky(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},bx=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ky(e,t),c={x:n,y:r},d=await Jy(t,l),u=Ty(Sy(o)),h=jy(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=Cy(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=Cy(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},vx=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=ky(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=Sy(o),v=Ty(a),y=Sy(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(y||!m?[Py(a)]:function(e){const t=Py(e);return[Ly(e),t,Ly(t)]}(a)),C="none"!==f;!h&&C&&w.push(...Iy(a,m,f,x));const k=[a,...w],S=await Jy(t,g),$=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&$.push(S[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=$y(e),o=Oy(e),i=My(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Py(s)),[s,Py(s)]}(o,s,x);$.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:o,overflows:$}],!$.every((e=>e<=0))){var M,E;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&v!==Ty(t))||j.every((e=>Ty(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(E=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(C){const t=Ty(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},yx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ky(e,t)||{};if(null==c)return{};const u=zy(d),h={x:n,y:r},p=Oy(o),f=My(p),m=await s.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const S=x/2-w/2,$=k/2-m[f]/2-1,j=my(u[b],$),M=my(u[v],$),E=j,T=k-m[f]-M,O=k/2-m[f]/2+S,L=Cy(E,O,T),A=!l.arrow&&null!=$y(o)&&O!==L&&i.reference[f]/2-(O<E?j:M)-m[f]/2<0,R=A?O<E?O-E:O-T:0;return{[p]:h[p]+R,data:{[p]:L,centerOffset:O-L-R,...A&&{alignmentOffset:R}},reset:A}}}),xx=(e,t,n)=>{const r=new Map,o={platform:px,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Zy(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:b,data:v,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=b?b:u,p={...p,[i]:{...p[i],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=Zy(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var wx="undefined"!=typeof document?n.useLayoutEffect:function(){};function Cx(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Cx(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Cx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function kx(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sx(e,t){const n=kx(e);return Math.round(t*n)/n}function $x(e){const t=l.useRef(e);return wx((()=>{t.current=e})),t}const jx=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?yx({element:n.current,padding:r}).fn(t):{}:n?yx({element:n,padding:r}).fn(t):{};var o}}),Mx=(e,t)=>({...gx(e),options:[e,t]}),Ex=(e,t)=>({...bx(e),options:[e,t]}),Tx=(e,t)=>({...jx(e),options:[e,t]}),Ox="data-floating-ui-focusable",Lx="active",Ax="selected",Rx={...l};let Nx=!1,Dx=0;const Ix=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Dx++;const Px=Rx.useId||function(){const[e,t]=l.useState((()=>Nx?Ix():void 0));return Uy((()=>{null==e&&t(Ix())}),[]),l.useEffect((()=>{Nx=!0}),[]),e};let zx;"production"!==process.env.NODE_ENV&&(zx=new Set);const Vx=l.createContext(null),Bx=l.createContext(null),Hx=()=>{var e;return(null==(e=l.useContext(Vx))?void 0:e.id)||null},_x=()=>l.useContext(Bx);const Fx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},qx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Wx=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Ux(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Px(),i=l.useRef({}),[s]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=Hx();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Kv(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=zx)&&e.has(o)||(null==(i=zx)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=l.useState(r.reference),u=Gy(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),h=l.useMemo((()=>({setPositionReference:d})),[]),p=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:h})),[t,u,p,s,o,h])}function Kx(e){void 0===e&&(e={});const{nodeId:t}=e,n=Ux({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=l.useState(null),[a,d]=l.useState(null),u=(null==o?void 0:o.domReference)||i,h=l.useRef(null),p=_x();Uy((()=>{u&&(h.current=u)}),[u]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=l.useState(r);Cx(f,r)||m(r);const[g,b]=l.useState(null),[v,y]=l.useState(null),x=l.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,y(e))}),[]),C=i||g,k=s||v,S=l.useRef(null),$=l.useRef(null),j=l.useRef(h),M=null!=d,E=$x(d),T=$x(o),O=$x(u),L=l.useCallback((()=>{if(!S.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};T.current&&(e.platform=T.current),xx(S.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};A.current&&!Cx(j.current,t)&&(j.current=t,c.flushSync((()=>{p(t)})))}))}),[f,t,n,T,O]);wx((()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);wx((()=>(A.current=!0,()=>{A.current=!1})),[]),wx((()=>{if(C&&(S.current=C),k&&($.current=k),C&&k){if(E.current)return E.current(C,k,L);L()}}),[C,k,L,E,M]);const R=l.useMemo((()=>({reference:S,floating:$,setReference:x,setFloating:w})),[x,w]),N=l.useMemo((()=>({reference:C,floating:k})),[C,k]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Sx(N.floating,h.x),r=Sx(N.floating,h.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...kx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:L,refs:R,elements:N,floatingStyles:D})),[h,L,R,N,D])}({...e,elements:{...o,...a&&{reference:a}}}),m=l.useCallback((e=>{const t=Kv(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Kv(e)||null===e)&&(h.current=e,s(e)),(Kv(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Kv(e))&&f.refs.setReference(e)}),[f.refs]),b=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:m,domReference:h})),[f.refs,g,m]),v=l.useMemo((()=>({...f.elements,domReference:u})),[f.elements,u]),y=l.useMemo((()=>({...f,...r,refs:b,elements:v,nodeId:t})),[f,b,v,t,r]);return Uy((()=>{r.dataRef.current.floatingContext=y;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),l.useMemo((()=>({...f,context:y,refs:b,elements:v})),[f,b,v,y])}function Gx(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Lx]:t,[Ax]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Ox]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[Lx,Ax].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Zx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Jx(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:c="dialog"}=t,d=Px(),u=(null==(n=i.domReference)?void 0:n.id)||d,h=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(By)?t:t.querySelector("["+By+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),p=null!=(r=Zx.get(c))?r:c,f=null!=Hx(),m=l.useMemo((()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?h:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?h:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:u},..."menu"===p&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[p,h,f,o,u,c]),g=l.useMemo((()=>{const e={id:h,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":u}}}),[p,h,u,c]),b=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:h+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[h,c]);return l.useMemo((()=>a?{reference:m,floating:g,item:b}:{}),[a,m,g,b])}const Xx=e=>w("neutral","dark"===e?900:300),Yx=e=>i.css`
|
|
2089
|
+
`,Bv=new Set(["ArrowDown","ArrowUp","Home","End"]),Hv="__create__",_v=e=>e.startsWith(Hv);function Fv(){return"undefined"!=typeof window}function qv(e){return Kv(e)?(e.nodeName||"").toLowerCase():"#document"}function Wv(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Uv(e){var t;return null==(t=(Kv(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Kv(e){return!!Fv()&&(e instanceof Node||e instanceof Wv(e).Node)}function Gv(e){return!!Fv()&&(e instanceof Element||e instanceof Wv(e).Element)}function Zv(e){return!!Fv()&&(e instanceof HTMLElement||e instanceof Wv(e).HTMLElement)}function Jv(e){return!(!Fv()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Wv(e).ShadowRoot)}const Xv=new Set(["inline","contents"]);function Yv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dy(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xv.has(o)}const Qv=new Set(["table","td","th"]);function ey(e){return Qv.has(qv(e))}const ty=[":popover-open",":modal"];function ny(e){return ty.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ry=["transform","translate","scale","rotate","perspective"],oy=["transform","translate","scale","rotate","perspective","filter"],iy=["paint","layout","strict","content"];function sy(e){const t=ay(),n=Gv(e)?dy(e):e;return ry.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||oy.some((e=>(n.willChange||"").includes(e)))||iy.some((e=>(n.contain||"").includes(e)))}function ay(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ly=new Set(["html","body","#document"]);function cy(e){return ly.has(qv(e))}function dy(e){return Wv(e).getComputedStyle(e)}function uy(e){return Gv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hy(e){if("html"===qv(e))return e;const t=e.assignedSlot||e.parentNode||Jv(e)&&e.host||Uv(e);return Jv(t)?t.host:t}function py(e){const t=hy(e);return cy(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zv(t)&&Yv(t)?t:py(t)}function fy(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=py(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Wv(o);if(i){const e=my(s);return t.concat(s,s.visualViewport||[],Yv(o)?o:[],e&&n?fy(e):[])}return t.concat(o,fy(o,[],n))}function my(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const gy=Math.min,by=Math.max,vy=Math.round,yy=Math.floor,xy=e=>({x:e,y:e}),wy={left:"right",right:"left",bottom:"top",top:"bottom"},Cy={start:"end",end:"start"};function ky(e,t,n){return by(e,gy(t,n))}function Sy(e,t){return"function"==typeof e?e(t):e}function $y(e){return e.split("-")[0]}function jy(e){return e.split("-")[1]}function My(e){return"x"===e?"y":"x"}function Ey(e){return"y"===e?"height":"width"}const Ty=new Set(["top","bottom"]);function Oy(e){return Ty.has($y(e))?"y":"x"}function Ly(e){return My(Oy(e))}function Ay(e){return e.replace(/start|end/g,(e=>Cy[e]))}const Ry=["left","right"],Ny=["right","left"],Dy=["top","bottom"],Iy=["bottom","top"];function Py(e,t,n,r){const o=jy(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ny:Ry:t?Ry:Ny;case"left":case"right":return t?Dy:Iy;default:return[]}}($y(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ay)))),i}function zy(e){return e.replace(/left|right|bottom|top/g,(e=>wy[e]))}function Vy(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function By(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Hy="data-floating-ui-focusable";function _y(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Jv(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fy(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qy(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Wy(e){return(null==e?void 0:e.ownerDocument)||document}function Uy(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Uy(e,t.id,n)]))}var Ky="undefined"!=typeof document?n.useLayoutEffect:function(){};const Gy={...l}.useInsertionEffect||(e=>e());function Zy(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Gy((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Jy(e,t,n){let{reference:r,floating:o}=e;const i=Oy(t),s=Ly(t),a=Ey(s),l=$y(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(jy(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Xy(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Sy(t,e),f=Vy(p),m=a[h?"floating"===u?"reference":"floating":u],g=By(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=By(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+f.top)/y.y,bottom:(x.bottom-g.bottom+f.bottom)/y.y,left:(g.left-x.left+f.left)/y.x,right:(x.right-g.right+f.right)/y.x}}const Yy=new Set(["left","top"]);function Qy(e){const t=dy(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zv(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vy(n)!==i||vy(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ex(e){return Gv(e)?e:e.contextElement}function tx(e){const t=ex(e);if(!Zv(t))return xy(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Qy(t);let s=(i?vy(n.width):n.width)/r,a=(i?vy(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const nx=xy(0);function rx(e){const t=Wv(e);return ay()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:nx}function ox(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ex(e);let s=xy(1);t&&(r?Gv(r)&&(s=tx(r)):s=tx(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Wv(e))&&t}(i,n,r)?rx(i):xy(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=Wv(i),t=r&&Gv(r)?Wv(r):r;let n=e,o=my(n);for(;o&&r&&t!==n;){const e=tx(o),t=o.getBoundingClientRect(),r=dy(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=Wv(o),o=my(n)}}return By({width:d,height:u,x:l,y:c})}function ix(e,t){const n=uy(e).scrollLeft;return t?t.left+n:ox(Uv(e)).left+n}function sx(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ix(e,n),y:n.top+t.scrollTop}}const ax=new Set(["absolute","fixed"]);function lx(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Wv(e),r=Uv(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=ay();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=ix(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Uv(e),n=uy(e),r=e.ownerDocument.body,o=by(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=by(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ix(e);const a=-n.scrollTop;return"rtl"===dy(r).direction&&(s+=by(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Uv(e));else if(Gv(t))r=function(e,t){const n=ox(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zv(e)?tx(e):xy(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=rx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return By(r)}function cx(e,t){const n=hy(e);return!(n===t||!Gv(n)||cy(n))&&("fixed"===dy(n).position||cx(n,t))}function dx(e,t,n){const r=Zv(t),o=Uv(t),i="fixed"===n,s=ox(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=xy(0);function c(){l.x=ix(o)}if(r||!r&&!i)if(("body"!==qv(t)||Yv(o))&&(a=uy(t)),r){const e=ox(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?xy(0):sx(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function ux(e){return"static"===dy(e).position}function hx(e,t){if(!Zv(e)||"fixed"===dy(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Uv(e)===n&&(n=n.ownerDocument.body),n}function px(e,t){const n=Wv(e);if(ny(e))return n;if(!Zv(e)){let t=hy(e);for(;t&&!cy(t);){if(Gv(t)&&!ux(t))return t;t=hy(t)}return n}let r=hx(e,t);for(;r&&ey(r)&&ux(r);)r=hx(r,t);return r&&cy(r)&&ux(r)&&!sy(r)?n:r||function(e){let t=hy(e);for(;Zv(t)&&!cy(t);){if(sy(t))return t;if(ny(t))return null;t=hy(t)}return null}(e)||n}const fx={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Uv(r),a=!!t&&ny(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=xy(1);const d=xy(0),u=Zv(r);if((u||!u&&!i)&&(("body"!==qv(r)||Yv(s))&&(l=uy(r)),Zv(r))){const e=ox(r);c=tx(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?xy(0):sx(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:Uv,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?ny(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=fy(e,[],!1).filter((e=>Gv(e)&&"body"!==qv(e))),o=null;const i="fixed"===dy(e).position;let s=i?hy(e):e;for(;Gv(s)&&!cy(s);){const t=dy(s),n=sy(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ax.has(o.position)||Yv(s)&&!n&&cx(e,s))?r=r.filter((e=>e!==s)):o=t,s=hy(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=lx(t,n,o);return e.top=by(r.top,e.top),e.right=gy(r.right,e.right),e.bottom=gy(r.bottom,e.bottom),e.left=by(r.left,e.left),e}),lx(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:px,getElementRects:async function(e){const t=this.getOffsetParent||px,n=this.getDimensions,r=await n(e.floating);return{reference:dx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Qy(e);return{width:t,height:n}},getScale:tx,isElement:Gv,isRTL:function(e){return"rtl"===dy(e).direction}};function mx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gx(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=ex(e),d=o||i?[...c?fy(c):[],...fy(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=Uv(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-yy(u)+"px "+-yy(o.clientWidth-(d+h))+"px "+-yy(o.clientHeight-(u+p))+"px "+-yy(d)+"px",threshold:by(0,gy(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||mx(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?ox(e):null;return l&&function t(){const r=ox(e);m&&!mx(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const bx=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=$y(n),a=jy(n),l="y"===Oy(n),c=Yy.has(s)?-1:1,d=i&&l?-1:1,u=Sy(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},vx=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Sy(e,t),c={x:n,y:r},d=await Xy(t,l),u=Oy($y(o)),h=My(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=ky(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=ky(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},yx=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Sy(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=$y(o),v=Oy(a),y=$y(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(y||!m?[zy(a)]:function(e){const t=zy(e);return[Ay(e),t,Ay(t)]}(a)),C="none"!==f;!h&&C&&w.push(...Py(a,m,f,x));const k=[a,...w],S=await Xy(t,g),$=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&$.push(S[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=jy(e),o=Ly(e),i=Ey(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=zy(s)),[s,zy(s)]}(o,s,x);$.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:o,overflows:$}],!$.every((e=>e<=0))){var M,E;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&v!==Oy(t))||j.every((e=>Oy(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(E=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(C){const t=Oy(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},xx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Sy(e,t)||{};if(null==c)return{};const u=Vy(d),h={x:n,y:r},p=Ly(o),f=Ey(p),m=await s.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const S=x/2-w/2,$=k/2-m[f]/2-1,j=gy(u[b],$),M=gy(u[v],$),E=j,T=k-m[f]-M,O=k/2-m[f]/2+S,L=ky(E,O,T),A=!l.arrow&&null!=jy(o)&&O!==L&&i.reference[f]/2-(O<E?j:M)-m[f]/2<0,R=A?O<E?O-E:O-T:0;return{[p]:h[p]+R,data:{[p]:L,centerOffset:O-L-R,...A&&{alignmentOffset:R}},reset:A}}}),wx=(e,t,n)=>{const r=new Map,o={platform:fx,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Jy(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:b,data:v,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=b?b:u,p={...p,[i]:{...p[i],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=Jy(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Cx="undefined"!=typeof document?n.useLayoutEffect:function(){};function kx(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!kx(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!kx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Sx(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $x(e,t){const n=Sx(e);return Math.round(t*n)/n}function jx(e){const t=l.useRef(e);return Cx((()=>{t.current=e})),t}const Mx=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?xx({element:n.current,padding:r}).fn(t):{}:n?xx({element:n,padding:r}).fn(t):{};var o}}),Ex=(e,t)=>({...bx(e),options:[e,t]}),Tx=(e,t)=>({...vx(e),options:[e,t]}),Ox=(e,t)=>({...Mx(e),options:[e,t]}),Lx="data-floating-ui-focusable",Ax="active",Rx="selected",Nx={...l};let Dx=!1,Ix=0;const Px=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ix++;const zx=Nx.useId||function(){const[e,t]=l.useState((()=>Dx?Px():void 0));return Ky((()=>{null==e&&t(Px())}),[]),l.useEffect((()=>{Dx=!0}),[]),e};let Vx;"production"!==process.env.NODE_ENV&&(Vx=new Set);const Bx=l.createContext(null),Hx=l.createContext(null),_x=()=>{var e;return(null==(e=l.useContext(Bx))?void 0:e.id)||null},Fx=()=>l.useContext(Hx);const qx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Wx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ux=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Kx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=zx(),i=l.useRef({}),[s]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=_x();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Gv(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Vx)&&e.has(o)||(null==(i=Vx)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=l.useState(r.reference),u=Zy(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),h=l.useMemo((()=>({setPositionReference:d})),[]),p=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:h})),[t,u,p,s,o,h])}function Gx(e){void 0===e&&(e={});const{nodeId:t}=e,n=Kx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=l.useState(null),[a,d]=l.useState(null),u=(null==o?void 0:o.domReference)||i,h=l.useRef(null),p=Fx();Ky((()=>{u&&(h.current=u)}),[u]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=l.useState(r);kx(f,r)||m(r);const[g,b]=l.useState(null),[v,y]=l.useState(null),x=l.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,y(e))}),[]),C=i||g,k=s||v,S=l.useRef(null),$=l.useRef(null),j=l.useRef(h),M=null!=d,E=jx(d),T=jx(o),O=jx(u),L=l.useCallback((()=>{if(!S.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};T.current&&(e.platform=T.current),wx(S.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};A.current&&!kx(j.current,t)&&(j.current=t,c.flushSync((()=>{p(t)})))}))}),[f,t,n,T,O]);Cx((()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);Cx((()=>(A.current=!0,()=>{A.current=!1})),[]),Cx((()=>{if(C&&(S.current=C),k&&($.current=k),C&&k){if(E.current)return E.current(C,k,L);L()}}),[C,k,L,E,M]);const R=l.useMemo((()=>({reference:S,floating:$,setReference:x,setFloating:w})),[x,w]),N=l.useMemo((()=>({reference:C,floating:k})),[C,k]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=$x(N.floating,h.x),r=$x(N.floating,h.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Sx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:L,refs:R,elements:N,floatingStyles:D})),[h,L,R,N,D])}({...e,elements:{...o,...a&&{reference:a}}}),m=l.useCallback((e=>{const t=Gv(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Gv(e)||null===e)&&(h.current=e,s(e)),(Gv(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Gv(e))&&f.refs.setReference(e)}),[f.refs]),b=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:m,domReference:h})),[f.refs,g,m]),v=l.useMemo((()=>({...f.elements,domReference:u})),[f.elements,u]),y=l.useMemo((()=>({...f,...r,refs:b,elements:v,nodeId:t})),[f,b,v,t,r]);return Ky((()=>{r.dataRef.current.floatingContext=y;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),l.useMemo((()=>({...f,context:y,refs:b,elements:v})),[f,b,v,y])}function Zx(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ax]:t,[Rx]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Lx]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[Ax,Rx].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Jx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xx(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:c="dialog"}=t,d=zx(),u=(null==(n=i.domReference)?void 0:n.id)||d,h=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(Hy)?t:t.querySelector("["+Hy+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),p=null!=(r=Jx.get(c))?r:c,f=null!=_x(),m=l.useMemo((()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?h:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?h:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:u},..."menu"===p&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[p,h,f,o,u,c]),g=l.useMemo((()=>{const e={id:h,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":u}}}),[p,h,u,c]),b=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:h+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[h,c]);return l.useMemo((()=>a?{reference:m,floating:g,item:b}:{}),[a,m,g,b])}const Yx=e=>w("neutral","dark"===e?900:300),Qx=e=>i.css`
|
|
2077
2090
|
height: auto;
|
|
2078
2091
|
max-height: 32rem;
|
|
2079
2092
|
width: 100%;
|
|
@@ -2081,7 +2094,7 @@
|
|
|
2081
2094
|
position: absolute;
|
|
2082
2095
|
z-index: 1000;
|
|
2083
2096
|
background-color: ${(e=>w("neutral","dark"===e?800:100))(e)};
|
|
2084
|
-
border: ${j(100)} solid ${
|
|
2097
|
+
border: ${j(100)} solid ${Yx(e)};
|
|
2085
2098
|
border-radius: ${$(300)};
|
|
2086
2099
|
box-shadow:
|
|
2087
2100
|
0 0.25rem 0.375rem -0.25rem #0000001a,
|
|
@@ -2119,19 +2132,19 @@
|
|
|
2119
2132
|
}
|
|
2120
2133
|
}
|
|
2121
2134
|
`}
|
|
2122
|
-
`,
|
|
2135
|
+
`,ew=e=>i.css`
|
|
2123
2136
|
display: flex;
|
|
2124
2137
|
align-items: flex-start;
|
|
2125
2138
|
justify-content: space-between;
|
|
2126
2139
|
gap: ${k(300)};
|
|
2127
2140
|
padding: ${k(200)} ${k(300)};
|
|
2128
|
-
border-bottom: ${j(100)} solid ${
|
|
2141
|
+
border-bottom: ${j(100)} solid ${Yx(e)};
|
|
2129
2142
|
min-height: ${k(1e3)};
|
|
2130
2143
|
|
|
2131
2144
|
.ds-map-pop-up-close-button {
|
|
2132
2145
|
margin-top: ${k(100)};
|
|
2133
2146
|
}
|
|
2134
|
-
`,
|
|
2147
|
+
`,tw=i.css`
|
|
2135
2148
|
height: 100%;
|
|
2136
2149
|
max-height: 25rem;
|
|
2137
2150
|
overflow-y: auto;
|
|
@@ -2139,11 +2152,11 @@
|
|
|
2139
2152
|
&:focus-visible {
|
|
2140
2153
|
outline-color: ${w("primary",700)};
|
|
2141
2154
|
}
|
|
2142
|
-
`,
|
|
2155
|
+
`,nw=e=>i.css`
|
|
2143
2156
|
padding: ${k(200)} ${k(300)};
|
|
2144
|
-
border-top: ${j(100)} solid ${
|
|
2157
|
+
border-top: ${j(100)} solid ${Yx(e)};
|
|
2145
2158
|
min-height: 2.75rem;
|
|
2146
|
-
`,
|
|
2159
|
+
`,rw=(e,t,n,r,o,s,a)=>i.css`
|
|
2147
2160
|
height: ${e}px;
|
|
2148
2161
|
width: ${t}px;
|
|
2149
2162
|
position: absolute;
|
|
@@ -2151,27 +2164,27 @@
|
|
|
2151
2164
|
top: ${null!=r?`${r}px`:""};
|
|
2152
2165
|
${`${o}: -${s-1}px`};
|
|
2153
2166
|
background-color: ${w("neutral","dark"===a?900:100)};
|
|
2154
|
-
border: ${j(100)} solid ${
|
|
2155
|
-
`,
|
|
2167
|
+
border: ${j(100)} solid ${Yx(a)};
|
|
2168
|
+
`,ow=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",variant:d="default",offset:u=30,closeOnEscape:h=!0,closeOnOutsideClick:p=!1,labels:f})=>{const m=Vf("MapPopUp",f),g=n.useRef(null),{refs:b,floatingStyles:v,context:y,middlewareData:x,placement:w}=Gx({open:e,onOpenChange:t,placement:c,whileElementsMounted:gx,middleware:[Ex(u),(C={fallbackAxisSideDirection:"start"},{...yx(C),options:[C,k]}),Tx({padding:8}),Ox({element:g})]});var C,k;const S=o?.current??null;n.useEffect((()=>{S&&b.setReference(S)}),[S]);const $=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=Fx(),b=Zy("function"==typeof c?c:()=>!1),v="function"==typeof c?b:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Ux(f),{escapeKey:C,outsidePress:k}=Ux(m),S=l.useRef(!1),$=Zy((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Uy(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=Zy((e=>{var t;const n=()=>{var t;$(e),null==(t=Fy(e))||t.removeEventListener("keydown",n)};null==(t=Fy(e))||t.addEventListener("keydown",n)})),M=Zy((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=Fy(e),l="[data-floating-ui-inert]",c=Wy(o.floating).querySelectorAll(l);let u=Gv(a)?a:null;for(;u&&!cy(u);){const e=hy(u);if(cy(e)||!Gv(e))break;u=e}if(c.length&&Gv(a)&&!a.matches("html,body")&&!_y(a,o.floating)&&Array.from(c).every((e=>!_y(u,e))))return;if(Zv(a)&&O){const t=cy(a),n=dy(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Uy(g.nodesRef.current,h).some((t=>{var n;return qy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(qy(e,o.floating)||qy(e,o.domReference)||p)return;const f=g?Uy(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=Zy((e=>{var t;const n=()=>{var t;M(e),null==(t=Fy(e))||t.removeEventListener(d,n)};null==(t=Fy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),ay()?5:0)}const u=Wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),v&&u.addEventListener(d,k?E:M,k);let h=[];return p&&(Gv(o.domReference)&&(h=fy(o.domReference)),Gv(o.floating)&&(h=h.concat(fy(o.floating))),!Gv(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(fy(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),v&&u.removeEventListener(d,k?E:M,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,v,d,n,r,p,s,x,w,$,C,j,M,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,v,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[qx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(y,{escapeKey:h,outsidePress:p}),j=Xx(y,{role:"dialog"}),{getFloatingProps:M}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Zx(t,e,"reference")),t),i=l.useCallback((t=>Zx(t,e,"floating")),n),s=l.useCallback((t=>Zx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([$,j]),{x:E,y:T}=x.arrow??{x:null,y:null},O={top:"bottom",right:"left",bottom:"top",left:"right"}[w.split("-")[0]];if(!e)return null;let L=u-1,A=4;return"left"!==O&&"right"!==O||(L=4,A=u-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b.setFloating,style:v,"aria-label":m.dialogAriaLabel,"aria-modal":!0,...M(),css:Qx(d),children:[r.jsxs("div",{css:ew(d),children:[i,r.jsx(Sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":m.closeLabel})]}),r.jsx("div",{css:tw,children:s}),a?r.jsx("div",{css:nw(d),children:a}):null,r.jsx("div",{ref:g,css:rw(L,A,E,T,O,u,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&t(!1)})]})},iw=i.css`
|
|
2156
2169
|
display: flex;
|
|
2157
2170
|
flex-direction: column;
|
|
2158
2171
|
gap: ${k(200)};
|
|
2159
|
-
`,
|
|
2172
|
+
`,sw=i.css`
|
|
2160
2173
|
display: flex;
|
|
2161
2174
|
align-items: center;
|
|
2162
2175
|
justify-content: space-between;
|
|
2163
2176
|
gap: ${k(200)};
|
|
2164
|
-
`,
|
|
2177
|
+
`,aw=i.css`
|
|
2165
2178
|
display: flex;
|
|
2166
2179
|
align-items: center;
|
|
2167
2180
|
gap: ${k(100)};
|
|
2168
|
-
`,
|
|
2181
|
+
`,lw=e=>i.css`
|
|
2169
2182
|
font-size: ${C(300)};
|
|
2170
2183
|
line-height: ${S(500)};
|
|
2171
2184
|
font-weight: 400;
|
|
2172
2185
|
color: ${w("neutral",e?100:800)};
|
|
2173
2186
|
padding: 0 ${k(100)};
|
|
2174
|
-
`,
|
|
2187
|
+
`,cw=e=>i.css`
|
|
2175
2188
|
background-color: transparent;
|
|
2176
2189
|
color: ${w("neutral",500)};
|
|
2177
2190
|
|
|
@@ -2196,9 +2209,9 @@
|
|
|
2196
2209
|
}
|
|
2197
2210
|
}
|
|
2198
2211
|
}
|
|
2199
|
-
`,
|
|
2212
|
+
`,dw=e=>i.css`
|
|
2200
2213
|
color: ${w("neutral",e?100:800)};
|
|
2201
|
-
`,
|
|
2214
|
+
`,uw=(e,t)=>i.css`
|
|
2202
2215
|
height: ${e};
|
|
2203
2216
|
width: ${t};
|
|
2204
2217
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -2212,7 +2225,7 @@
|
|
|
2212
2225
|
height: 100%;
|
|
2213
2226
|
overflow-y: scroll;
|
|
2214
2227
|
}
|
|
2215
|
-
`,
|
|
2228
|
+
`,hw=i.css`
|
|
2216
2229
|
padding: ${k(400)} ${k(300)};
|
|
2217
2230
|
border-bottom: ${j(100)} solid
|
|
2218
2231
|
${w("neutral",300)};
|
|
@@ -2236,17 +2249,17 @@
|
|
|
2236
2249
|
color: ${w("neutral",700)};
|
|
2237
2250
|
text-align: left;
|
|
2238
2251
|
}
|
|
2239
|
-
`,
|
|
2252
|
+
`,pw=i.css``,fw=i.css`
|
|
2240
2253
|
display: flex;
|
|
2241
2254
|
flex-direction: column;
|
|
2242
2255
|
gap: ${k(300)};
|
|
2243
2256
|
padding: ${k(300)};
|
|
2244
2257
|
border-bottom: ${j(100)} solid
|
|
2245
2258
|
${w("neutral",300)};
|
|
2246
|
-
`,
|
|
2259
|
+
`,mw=i.css`
|
|
2247
2260
|
padding-top: ${k(300)};
|
|
2248
2261
|
padding-left: ${k(200)};
|
|
2249
|
-
`,
|
|
2262
|
+
`,gw=i.css``,bw=e=>i.css`
|
|
2250
2263
|
display: flex;
|
|
2251
2264
|
gap: ${k(300)};
|
|
2252
2265
|
padding: ${k(300)} ${k(200)};
|
|
@@ -2271,7 +2284,7 @@
|
|
|
2271
2284
|
background-color: ${w("primary",100)};
|
|
2272
2285
|
width: 99.8%;
|
|
2273
2286
|
}
|
|
2274
|
-
`,
|
|
2287
|
+
`,vw=i.css`
|
|
2275
2288
|
width: 100%;
|
|
2276
2289
|
max-width: calc(100% - 2.75rem);
|
|
2277
2290
|
|
|
@@ -2302,7 +2315,7 @@
|
|
|
2302
2315
|
.ds-base-map-children {
|
|
2303
2316
|
margin-top: 0.625rem;
|
|
2304
2317
|
}
|
|
2305
|
-
`,
|
|
2318
|
+
`,yw=(e,t,n,r,o,s="icon")=>{let a="1rem",l=`${j(300)} solid ${w("neutral",100)}`;if("cluster"===s){const e=1.75,t=6,n=.03125;if(l=`${j(300)} solid ${w("neutral",100)}`,void 0!==o&&o>1){const r=e+(o-1)*n;a=`${Math.min(r,t)}rem`}else a=`${e}rem`}else"simple-pin"===s?(l=`${j(300)} solid ${w("error",500)}`,a="1.5rem"):n&&(a="1.75rem",l=`${j(200)} solid ${w("neutral",100)}`);return i.css`
|
|
2306
2319
|
text-overflow: ellipsis;
|
|
2307
2320
|
height: ${a};
|
|
2308
2321
|
width: ${a};
|
|
@@ -2343,22 +2356,22 @@
|
|
|
2343
2356
|
height: 0.875rem;
|
|
2344
2357
|
width: 0.875rem;
|
|
2345
2358
|
}
|
|
2346
|
-
`},
|
|
2359
|
+
`},xw=n.forwardRef((({ariaLabel:e,icon:t,backgroundColor:n,onClick:o,showFocusState:s,count:a,mode:l,variant:c="icon",labels:d},u)=>{const h=Vf("MapMarker",d),p=a?(f=a)>=1e8?"99M+":f>=1e6?`${(f/1e6).toFixed(0)}M`:f>=1e5?`${(f/1e3).toFixed(0)}K`:f.toString():void 0;var f;return r.jsx("div",{css:s?i.css`
|
|
2347
2360
|
outline: ${j(200)} solid ${w("primary",700)};
|
|
2348
2361
|
outline-offset: ${k(50)};
|
|
2349
2362
|
border-radius: 50%;
|
|
2350
2363
|
box-shadow:
|
|
2351
2364
|
0 0 0 0.125rem ${w("neutral",100)},
|
|
2352
2365
|
rgba(0, 0, 0, 0.05) 0 0.125rem 0.125rem 0.25rem;
|
|
2353
|
-
`:"",children:r.jsxs("button",{type:"button",css:
|
|
2366
|
+
`:"",children:r.jsxs("button",{type:"button",css:yw(n,!!o,!!t,l,a,c),"aria-label":e||(a?h.clusterAriaLabel(a):"simple-pin"===c?h.pinAriaLabel:h.pointAriaLabel),ref:u,onClick:o,children:["cluster"===c&&p,"icon"===c&&t]})})})),ww={Paper:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(xw,{ariaLabel:e||"paper icon",icon:t.jsx(fm,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:n,ref:r,showFocusState:o}),Drop:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(xw,{ariaLabel:e||"drop icon",icon:t.jsx(mm,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:n,ref:r,showFocusState:o}),Plant:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(xw,{ariaLabel:e||"plant icon",icon:t.jsx(gm,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:n,ref:r,showFocusState:o}),Point:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(xw,{ariaLabel:e||"point icon",backgroundColor:w("primary",500),onClick:n,ref:r,showFocusState:o})},Cw=i.css`
|
|
2354
2367
|
background-color: ${w("neutral",100)};
|
|
2355
|
-
`,
|
|
2368
|
+
`,kw=i.css`
|
|
2356
2369
|
padding: ${k(400)} ${k(400)} 0
|
|
2357
2370
|
${k(400)};
|
|
2358
2371
|
&:focus-visible {
|
|
2359
2372
|
outline-color: ${w("primary",700)};
|
|
2360
2373
|
}
|
|
2361
|
-
`,
|
|
2374
|
+
`,Sw=i.css`
|
|
2362
2375
|
font-size: ${C(400)};
|
|
2363
2376
|
font-weight: 700;
|
|
2364
2377
|
line-height: ${S(600)};
|
|
@@ -2368,14 +2381,14 @@
|
|
|
2368
2381
|
align-items: center;
|
|
2369
2382
|
text-align: left;
|
|
2370
2383
|
gap: 0.625rem;
|
|
2371
|
-
|
|
2384
|
+
`,$w=i.css`
|
|
2372
2385
|
font-size: ${C(200)};
|
|
2373
2386
|
font-weight: 400;
|
|
2374
2387
|
line-height: ${S(400)};
|
|
2375
2388
|
text-align: left;
|
|
2376
2389
|
color: ${w("neutral",700)};
|
|
2377
2390
|
margin-bottom: ${k(200)};
|
|
2378
|
-
|
|
2391
|
+
`,jw=i.css`
|
|
2379
2392
|
width: 100%;
|
|
2380
2393
|
padding: ${k(400)} 0;
|
|
2381
2394
|
border-bottom: ${j(100)} solid
|
|
@@ -2384,32 +2397,32 @@
|
|
|
2384
2397
|
&:last-of-type {
|
|
2385
2398
|
border-bottom: none;
|
|
2386
2399
|
}
|
|
2387
|
-
`,
|
|
2400
|
+
`,Mw=i.css`
|
|
2388
2401
|
display: flex;
|
|
2389
2402
|
align-items: flex-start;
|
|
2390
2403
|
justify-content: space-between;
|
|
2391
|
-
`,
|
|
2404
|
+
`,Ew=i.css`
|
|
2392
2405
|
display: flex;
|
|
2393
2406
|
flex-direction: column;
|
|
2394
|
-
`,
|
|
2407
|
+
`,Tw=e=>i.css`
|
|
2395
2408
|
font-size: ${C(400)};
|
|
2396
2409
|
font-weight: 400;
|
|
2397
2410
|
line-height: ${S(600)};
|
|
2398
2411
|
text-align: left;
|
|
2399
2412
|
color: ${w("neutral",e?500:800)};
|
|
2400
|
-
`,
|
|
2413
|
+
`,Ow=e=>i.css`
|
|
2401
2414
|
font-size: ${C(300)};
|
|
2402
2415
|
font-weight: 400;
|
|
2403
2416
|
line-height: ${S(500)};
|
|
2404
2417
|
text-align: left;
|
|
2405
2418
|
color: ${w("neutral",e?500:700)};
|
|
2406
|
-
`,
|
|
2419
|
+
`,Lw=({name:t,label:n,caption:o,showInfoButton:i=!0,infoButtonLabel:s,variant:a="switch",disabled:l,onInfoClick:c,isDefaultSelected:d=!1,onChange:u,labels:h})=>{const p=Vf("LayerItem",h),f="switch"===a;return r.jsxs("div",{css:jw,children:[f?r.jsxs("div",{css:Mw,children:[r.jsxs("div",{css:Ew,children:[r.jsx("p",{css:Tw(l),"aria-label":n,"aria-disabled":l,children:n}),r.jsx("p",{"aria-label":o,css:Ow(l),children:o})]}),r.jsx(Fb,{"aria-label":`${n}, ${o}`,name:t,disabled:l,defaultChecked:d,onChange:u})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[r.jsx(jb,{value:t,disabled:l,fontSize:"1rem",color:"var(--chakra-colors-neutral-800)",children:n}),r.jsx("p",{style:{marginLeft:"1.75rem"},css:Ow(l),children:o})]}),i?r.jsx(e.Box,{display:"flex",justifyContent:"flex-start",marginTop:"0.5rem",marginLeft:f?0:"1.75rem",children:r.jsx(Bf,{variant:"secondary",label:s??p.aboutDataLabel,rightIcon:r.jsx(Kf,{}),size:"small",onClick:c,disabled:l})}):null]})},Aw=i.css`
|
|
2407
2420
|
margin-bottom: ${k(400)};
|
|
2408
2421
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2409
2422
|
border-radius: ${$(300)};
|
|
2410
2423
|
box-shadow: 0 1px 0.125rem 0 #0000000d;
|
|
2411
2424
|
background-color: ${w("neutral",100)};
|
|
2412
|
-
`,
|
|
2425
|
+
`,Rw=i.css`
|
|
2413
2426
|
padding: 0.375rem ${k(200)};
|
|
2414
2427
|
align-items: center;
|
|
2415
2428
|
background-color: ${w("neutral",100)};
|
|
@@ -2433,12 +2446,12 @@
|
|
|
2433
2446
|
0 0 0 0.125rem ${w("neutral",100)},
|
|
2434
2447
|
rgba(0, 0, 0, 0.05) 0 0.125rem 0.125rem 0.25rem;
|
|
2435
2448
|
}
|
|
2436
|
-
`,
|
|
2449
|
+
`,Nw=i.css`
|
|
2437
2450
|
font-size: ${C(200)};
|
|
2438
2451
|
font-weight: 700;
|
|
2439
2452
|
line-height: ${S(400)};
|
|
2440
2453
|
color: ${w("neutral",800)};
|
|
2441
|
-
`,
|
|
2454
|
+
`,Dw=i.css`
|
|
2442
2455
|
padding: ${k(300)} ${k(200)};
|
|
2443
2456
|
display: flex;
|
|
2444
2457
|
flex-direction: column;
|
|
@@ -2455,7 +2468,7 @@
|
|
|
2455
2468
|
margin-bottom: 0;
|
|
2456
2469
|
}
|
|
2457
2470
|
}
|
|
2458
|
-
`,
|
|
2471
|
+
`,Iw=i.css`
|
|
2459
2472
|
padding: ${k(300)};
|
|
2460
2473
|
padding-bottom: ${k(500)};
|
|
2461
2474
|
display: flex;
|
|
@@ -2463,7 +2476,7 @@
|
|
|
2463
2476
|
border-bottom: ${j(100)} solid
|
|
2464
2477
|
${w("neutral",300)};
|
|
2465
2478
|
background-color: ${w("neutral",100)};
|
|
2466
|
-
`,
|
|
2479
|
+
`,Pw=i.css`
|
|
2467
2480
|
display: flex;
|
|
2468
2481
|
flex-direction: column;
|
|
2469
2482
|
|
|
@@ -2472,13 +2485,13 @@
|
|
|
2472
2485
|
fill: ${w("neutral",700)} !important;
|
|
2473
2486
|
}
|
|
2474
2487
|
}
|
|
2475
|
-
`,
|
|
2488
|
+
`,zw=i.css`
|
|
2476
2489
|
display: flex;
|
|
2477
2490
|
align-items: flex-start;
|
|
2478
2491
|
justify-content: space-between;
|
|
2479
2492
|
gap: ${k(300)};
|
|
2480
2493
|
margin-bottom: ${k(400)};
|
|
2481
|
-
`,
|
|
2494
|
+
`,Vw=i.css`
|
|
2482
2495
|
display: flex;
|
|
2483
2496
|
flex-direction: column;
|
|
2484
2497
|
gap: ${k(400)};
|
|
@@ -2486,30 +2499,30 @@
|
|
|
2486
2499
|
> :not(:last-child) {
|
|
2487
2500
|
margin-bottom: 0;
|
|
2488
2501
|
}
|
|
2489
|
-
`,
|
|
2502
|
+
`,Bw=i.css`
|
|
2490
2503
|
font-size: ${C(400)};
|
|
2491
2504
|
line-height: ${S(600)};
|
|
2492
2505
|
font-weight: 400;
|
|
2493
2506
|
text-align: left;
|
|
2494
2507
|
color: ${w("neutral",900)};
|
|
2495
|
-
`,
|
|
2508
|
+
`,Hw=i.css`
|
|
2496
2509
|
font-size: ${C(300)};
|
|
2497
2510
|
line-height: ${S(500)};
|
|
2498
2511
|
font-weight: 400;
|
|
2499
2512
|
text-align: left;
|
|
2500
2513
|
color: ${w("neutral",700)};
|
|
2501
|
-
`,
|
|
2514
|
+
`,_w=i.css`
|
|
2502
2515
|
display: flex;
|
|
2503
2516
|
justify-content: space-between;
|
|
2504
2517
|
|
|
2505
2518
|
button {
|
|
2506
2519
|
width: 46%;
|
|
2507
2520
|
}
|
|
2508
|
-
`,
|
|
2521
|
+
`,Fw=i.css`
|
|
2509
2522
|
width: 14.625rem;
|
|
2510
2523
|
border: ${j(100)} solid ${w("neutral",600)};
|
|
2511
2524
|
border-radius: ${$(300)};
|
|
2512
|
-
`,
|
|
2525
|
+
`,qw=i.css`
|
|
2513
2526
|
.ds-opacity-control-trigger {
|
|
2514
2527
|
&:not(:disabled):not([data-disabled])[data-state='open'],
|
|
2515
2528
|
&:not(:disabled):not([data-disabled])[aria-expanded='true'],
|
|
@@ -2526,15 +2539,15 @@
|
|
|
2526
2539
|
0 0.125rem 0.25rem -0.125rem rgba(0, 0, 0, 0.1);
|
|
2527
2540
|
}
|
|
2528
2541
|
}
|
|
2529
|
-
`,qw=i.css`
|
|
2530
|
-
padding: ${k(300)};
|
|
2531
2542
|
`,Ww=i.css`
|
|
2543
|
+
padding: ${k(300)};
|
|
2544
|
+
`,Uw=i.css`
|
|
2532
2545
|
font-size: ${C(300)};
|
|
2533
2546
|
line-height: ${S(500)};
|
|
2534
2547
|
font-weight: 400;
|
|
2535
2548
|
text-align: left;
|
|
2536
2549
|
color: ${w("neutral",900)};
|
|
2537
|
-
`,
|
|
2550
|
+
`,Kw=i.css`
|
|
2538
2551
|
display: flex;
|
|
2539
2552
|
align-items: center;
|
|
2540
2553
|
gap: ${k(300)};
|
|
@@ -2562,20 +2575,20 @@
|
|
|
2562
2575
|
margin-top: 1.125rem;
|
|
2563
2576
|
width: 100%;
|
|
2564
2577
|
}
|
|
2565
|
-
`,
|
|
2578
|
+
`,Gw=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Vf("OpacityControl",i),[a,l]=n.useState(t);return r.jsx("span",{css:qw,style:{display:"contents"},children:r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Bf,{className:"ds-opacity-control-trigger",label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:Fw,children:r.jsxs(e.Popover.Body,{css:Ww,children:[r.jsx("p",{css:Uw,children:s.opacityHeading}),r.jsxs("div",{css:Kw,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(gg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"50%",right:"0.3125rem",transform:"translateY(-50%)",margin:0},children:s.percentSuffix})]}),r.jsx(Hb,{min:0,max:100,value:[a],onValueChangeEnd:({value:e})=>{l(e[0]),o&&o(e[0])}})]})]})})})]})})},Zw=e=>i.css`
|
|
2566
2579
|
width: ${k(500)};
|
|
2567
2580
|
height: ${k(500)};
|
|
2568
2581
|
border-radius: 50%;
|
|
2569
2582
|
background-color: ${e};
|
|
2570
2583
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
2571
|
-
`,
|
|
2584
|
+
`,Jw=e=>i.css`
|
|
2572
2585
|
width: ${k(500)};
|
|
2573
2586
|
height: ${k(200)};
|
|
2574
2587
|
border-radius: ${$(200)};
|
|
2575
2588
|
background-color: ${e};
|
|
2576
2589
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
2577
2590
|
margin-top: 0.375rem;
|
|
2578
|
-
`,
|
|
2591
|
+
`,Xw=e=>i.css`
|
|
2579
2592
|
width: ${k(500)};
|
|
2580
2593
|
height: ${k(500)};
|
|
2581
2594
|
border-radius: 50%;
|
|
@@ -2588,26 +2601,26 @@
|
|
|
2588
2601
|
width: 0.625rem;
|
|
2589
2602
|
height: 0.625rem;
|
|
2590
2603
|
}
|
|
2591
|
-
`,
|
|
2604
|
+
`,Yw=i.css`
|
|
2592
2605
|
width: 100%;
|
|
2593
2606
|
display: flex;
|
|
2594
2607
|
justify-content: space-between;
|
|
2595
2608
|
gap: ${k(200)};
|
|
2596
2609
|
margin-bottom: ${k(400)};
|
|
2597
|
-
`,
|
|
2610
|
+
`,Qw=i.css`
|
|
2598
2611
|
display: flex;
|
|
2599
2612
|
gap: ${k(200)};
|
|
2600
|
-
`,
|
|
2613
|
+
`,eC=i.css`
|
|
2601
2614
|
font-size: ${C(300)};
|
|
2602
2615
|
line-height: ${S(500)};
|
|
2603
2616
|
font-weight: 400;
|
|
2604
2617
|
color: ${w("neutral",800)};
|
|
2605
|
-
`,
|
|
2618
|
+
`,tC=i.css`
|
|
2606
2619
|
font-size: ${C(200)};
|
|
2607
2620
|
line-height: ${S(400)};
|
|
2608
2621
|
font-weight: 400;
|
|
2609
2622
|
color: ${w("neutral",700)};
|
|
2610
|
-
`,
|
|
2623
|
+
`,nC=i.css`
|
|
2611
2624
|
button {
|
|
2612
2625
|
height: 1.5625rem;
|
|
2613
2626
|
font-size: ${C(200)};
|
|
@@ -2616,12 +2629,12 @@
|
|
|
2616
2629
|
color: ${w("neutral",600)};
|
|
2617
2630
|
padding: 0 0.625rem;
|
|
2618
2631
|
}
|
|
2619
|
-
`,
|
|
2632
|
+
`,rC=i.css`
|
|
2620
2633
|
width: 100%;
|
|
2621
2634
|
display: flex;
|
|
2622
2635
|
flex-direction: column;
|
|
2623
2636
|
margin-bottom: ${k(400)};
|
|
2624
|
-
`,
|
|
2637
|
+
`,oC=i.css`
|
|
2625
2638
|
height: ${k(500)};
|
|
2626
2639
|
width: 100%;
|
|
2627
2640
|
margin-bottom: ${k(200)};
|
|
@@ -2639,27 +2652,27 @@
|
|
|
2639
2652
|
border-top-right-radius: 0.1875rem;
|
|
2640
2653
|
border-bottom-right-radius: 0.1875rem;
|
|
2641
2654
|
}
|
|
2642
|
-
`,
|
|
2655
|
+
`,iC=i.css`
|
|
2643
2656
|
display: flex;
|
|
2644
2657
|
justify-content: space-between;
|
|
2645
2658
|
align-items: flex-start;
|
|
2646
|
-
`,
|
|
2659
|
+
`,sC=i.css`
|
|
2647
2660
|
width: 100%;
|
|
2648
2661
|
font-size: ${C(200)};
|
|
2649
2662
|
line-height: ${S(400)};
|
|
2650
2663
|
font-weight: 400;
|
|
2651
2664
|
color: ${w("neutral",800)};
|
|
2652
2665
|
text-align: center;
|
|
2653
|
-
`,
|
|
2666
|
+
`,aC=i.css`
|
|
2654
2667
|
font-size: ${C(200)};
|
|
2655
2668
|
line-height: ${S(400)};
|
|
2656
2669
|
font-weight: 400;
|
|
2657
2670
|
color: ${w("neutral",700)};
|
|
2658
2671
|
text-align: center;
|
|
2659
|
-
`,
|
|
2672
|
+
`,lC=e=>{const t=e.map(((t,n)=>`${n/(e.length-1)*100}%`));return`linear-gradient(to right, ${e.map(((e,n)=>`${e} ${t[n]}`)).join(", ")})`},cC=i.css`
|
|
2660
2673
|
display: flex;
|
|
2661
2674
|
flex-direction: column;
|
|
2662
|
-
`,
|
|
2675
|
+
`,dC=i.css`
|
|
2663
2676
|
display: flex;
|
|
2664
2677
|
gap: ${k(400)};
|
|
2665
2678
|
align-items: center;
|
|
@@ -2667,46 +2680,46 @@
|
|
|
2667
2680
|
.ds-select-input-container {
|
|
2668
2681
|
margin-bottom: 0rem;
|
|
2669
2682
|
}
|
|
2670
|
-
`,
|
|
2683
|
+
`,uC=i.css`
|
|
2671
2684
|
font-size: ${C(500)};
|
|
2672
2685
|
line-height: ${S(700)};
|
|
2673
2686
|
font-weight: 400;
|
|
2674
2687
|
color: ${w("neutral",700)};
|
|
2675
|
-
`,
|
|
2688
|
+
`,hC=i.css`
|
|
2676
2689
|
font-size: ${C(500)};
|
|
2677
2690
|
line-height: ${S(700)};
|
|
2678
2691
|
font-weight: 400;
|
|
2679
2692
|
color: ${w("neutral",700)};
|
|
2680
|
-
`,
|
|
2693
|
+
`,pC=({pageSize:e,currentPage:t,totalItems:n,onPageSizeChange:o,showItemCountText:i,labels:s})=>{const a=Vf("ItemCount",s),l=0===n?0:(t-1)*e+1,c=0===n?0:Math.min(l+e-1,n);return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:cC,children:r.jsxs("div",{css:dC,children:[r.jsx("div",{style:{width:"5rem"},children:r.jsx(yv,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{o&&o(parseInt(e[0],10))},required:!0})}),r.jsx("p",{css:uC,children:a.perPageLabel})]})}),i?r.jsx("p",{css:hC,children:a.showingLabel(l,c,n)}):null]})},fC=e=>i.css`
|
|
2681
2694
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2682
2695
|
${e?"border: none;":""}
|
|
2683
|
-
`,
|
|
2696
|
+
`,mC=e=>i.css`
|
|
2684
2697
|
color: ${w("neutral",e?400:700)};
|
|
2685
2698
|
line-height: ${S(500)};
|
|
2686
2699
|
white-space: nowrap;
|
|
2687
2700
|
overflow: hidden;
|
|
2688
2701
|
text-overflow: ellipsis;
|
|
2689
|
-
`,
|
|
2702
|
+
`,gC=i.css`
|
|
2690
2703
|
font-weight: 400;
|
|
2691
2704
|
color: ${w("neutral",700)};
|
|
2692
2705
|
white-space: nowrap;
|
|
2693
2706
|
overflow: hidden;
|
|
2694
2707
|
text-overflow: ellipsis;
|
|
2695
|
-
`,
|
|
2708
|
+
`,bC=i.css`
|
|
2696
2709
|
color: ${w("neutral",700)};
|
|
2697
2710
|
text-align: right;
|
|
2698
2711
|
font-weight: 700;
|
|
2699
2712
|
white-space: nowrap;
|
|
2700
2713
|
overflow: hidden;
|
|
2701
2714
|
text-overflow: ellipsis;
|
|
2702
|
-
`,
|
|
2715
|
+
`,vC=e=>i.css`
|
|
2703
2716
|
width: ${k(400)};
|
|
2704
2717
|
height: ${k(400)};
|
|
2705
2718
|
|
|
2706
2719
|
path {
|
|
2707
2720
|
fill: ${w("neutral",e?400:700)};
|
|
2708
2721
|
}
|
|
2709
|
-
`,
|
|
2722
|
+
`,yC=i.css`
|
|
2710
2723
|
display: flex;
|
|
2711
2724
|
align-items: center;
|
|
2712
2725
|
justify-content: space-between;
|
|
@@ -2716,7 +2729,7 @@
|
|
|
2716
2729
|
${w("neutral",200)};
|
|
2717
2730
|
width: 100%;
|
|
2718
2731
|
text-align: left;
|
|
2719
|
-
`,
|
|
2732
|
+
`,xC=i.css`
|
|
2720
2733
|
display: flex;
|
|
2721
2734
|
align-items: center;
|
|
2722
2735
|
justify-content: space-between;
|
|
@@ -2752,19 +2765,19 @@
|
|
|
2752
2765
|
&:disabled {
|
|
2753
2766
|
background-color: ${w("neutral",200)};
|
|
2754
2767
|
}
|
|
2755
|
-
`,
|
|
2768
|
+
`,wC=({id:t,label:n,caption:o,icon:i,value:s,variant:a="data",onItemClick:l,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:h=!1})=>{const p=("navigation"===a||"select"===a)&&!!l,f=p?e.chakra.button:e.chakra.div,m="string"==typeof n||"number"==typeof n||"bigint"==typeof n?String(n):"",g="string"==typeof s||"number"==typeof s||"bigint"==typeof s?String(s):"",b=d||("data"===a&&g?`${m}, ${g}`:m);return r.jsxs(f,{id:t,css:["data"===a?yC:xC,h&&{backgroundColor:w("neutral",200)}],onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l?.()))},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":b,disabled:u,"data-selected":h||void 0,"data-highlighted":h||void 0,children:[r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i,r.jsxs(e.Box,{flex:"1",minWidth:0,children:[r.jsx(e.Text,{fontWeight:"data"===a?"400":"700",css:mC(u),children:n}),o&&r.jsx(e.Text,{css:gC,children:o})]})]}),"data"===a&&s&&r.jsx(e.Text,{css:bC,children:s}),"navigation"===a&&r.jsx(e.Icon,{as:Zf,boxSize:4,"aria-hidden":"true",css:vC(u)})]})},CC=({items:t,noBorder:n,highlightedIndex:o})=>r.jsx(e.Box,{css:fC(n),children:t.map(((e,t)=>r.jsx(wC,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===o||e.isHighlighted},e.id??e.label)))}),kC=i.css`
|
|
2756
2769
|
background: transparent;
|
|
2757
2770
|
svg {
|
|
2758
2771
|
path {
|
|
2759
2772
|
fill: ${w("primary",500)};
|
|
2760
2773
|
}
|
|
2761
2774
|
}
|
|
2762
|
-
`,
|
|
2775
|
+
`,SC=i.css`
|
|
2763
2776
|
font-size: ${C(400)};
|
|
2764
2777
|
line-height: ${S(600)};
|
|
2765
2778
|
font-weight: 700;
|
|
2766
2779
|
color: ${w("neutral",900)};
|
|
2767
|
-
|
|
2780
|
+
`,$C=i.css`
|
|
2768
2781
|
span {
|
|
2769
2782
|
height: ${k(500)};
|
|
2770
2783
|
width: ${k(500)};
|
|
@@ -2774,7 +2787,7 @@
|
|
|
2774
2787
|
background-color: transparent;
|
|
2775
2788
|
}
|
|
2776
2789
|
}
|
|
2777
|
-
|
|
2790
|
+
`,jC=i.css`
|
|
2778
2791
|
font-size: ${C(400)};
|
|
2779
2792
|
line-height: ${S(600)};
|
|
2780
2793
|
font-weight: 400;
|
|
@@ -2784,7 +2797,7 @@
|
|
|
2784
2797
|
color: ${w("neutral",900)};
|
|
2785
2798
|
font-weight: 700;
|
|
2786
2799
|
}
|
|
2787
|
-
`,
|
|
2800
|
+
`,MC=({totalItems:t,pageSize:n,currentPage:o,variant:i="default",onPageChange:s,labels:a})=>{const l=Vf("Pagination",a),c="compact"===i||"compact-with-buttons"===i,d="compact-with-buttons"===i;return r.jsx("div",{"aria-label":l.paginationLabel,children:r.jsx(e.Pagination.Root,{count:t,pageSize:n,defaultPage:o,onPageChange:e=>s&&s(e.page),siblingCount:1,children:r.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:$C,children:[r.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.previousLabel,size:"small",leftIcon:r.jsx(Gf,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:kC,style:{rotate:"90deg"},icon:r.jsx(Gf,{}),"aria-label":l.previousPageLabel})}),c?r.jsx(e.Pagination.PageText,{css:SC}):r.jsx(e.Pagination.Items,{render:e=>r.jsx(_f,{css:jC,"aria-label":l.pageLabel(e.value),icon:r.jsx("p",{children:e.value})})}),r.jsx(e.Pagination.NextTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.nextLabel,size:"small",rightIcon:r.jsx(Gf,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:kC,style:{rotate:"270deg"},icon:r.jsx(Gf,{}),"aria-label":l.nextPageLabel})})]})})})},EC=(e,t)=>i.css`
|
|
2788
2801
|
border: ${"full-width"===e?"none":`${j(100)} solid ${w("neutral",300)}`};
|
|
2789
2802
|
border-radius: ${$(200)};
|
|
2790
2803
|
box-shadow: ${"full-width"===e?"none":`0 0 0 0.0625rem ${w("neutral",300)}`};
|
|
@@ -2842,7 +2855,7 @@
|
|
|
2842
2855
|
[data-sticky-last='true'] {
|
|
2843
2856
|
border-inline-end: 0.0625rem solid ${w("neutral",400)};
|
|
2844
2857
|
}
|
|
2845
|
-
`,
|
|
2858
|
+
`,TC=e=>i.css`
|
|
2846
2859
|
tr {
|
|
2847
2860
|
background-color: ${w("neutral","full-width"===e?100:200)};
|
|
2848
2861
|
|
|
@@ -2851,14 +2864,14 @@
|
|
|
2851
2864
|
box-shadow: inset 0 -0.0625rem 0 ${w("neutral",300)};
|
|
2852
2865
|
}
|
|
2853
2866
|
}
|
|
2854
|
-
`,
|
|
2867
|
+
`,OC=i.css`
|
|
2855
2868
|
font-size: ${C(400)};
|
|
2856
2869
|
line-height: ${S(600)};
|
|
2857
2870
|
font-weight: 700;
|
|
2858
2871
|
color: ${w("neutral",800)};
|
|
2859
2872
|
display: flex;
|
|
2860
2873
|
align-items: center;
|
|
2861
|
-
`,
|
|
2874
|
+
`,LC=i.css`
|
|
2862
2875
|
height: ${S(600)};
|
|
2863
2876
|
width: 0.625rem;
|
|
2864
2877
|
display: flex;
|
|
@@ -2880,20 +2893,20 @@
|
|
|
2880
2893
|
}
|
|
2881
2894
|
}
|
|
2882
2895
|
}
|
|
2883
|
-
`,
|
|
2896
|
+
`,AC=e=>i.css`
|
|
2884
2897
|
svg {
|
|
2885
2898
|
path {
|
|
2886
2899
|
fill: ${w("accessible",e?"controls-on-neutral-lights":100)} !important;
|
|
2887
2900
|
}
|
|
2888
2901
|
}
|
|
2889
|
-
`,
|
|
2902
|
+
`,RC=i.css`
|
|
2890
2903
|
margin-top: ${k(300)};
|
|
2891
2904
|
display: flex;
|
|
2892
2905
|
justify-content: space-between;
|
|
2893
2906
|
align-items: center;
|
|
2894
|
-
`,
|
|
2907
|
+
`,NC=i.css`
|
|
2895
2908
|
margin-top: 0.5625rem;
|
|
2896
|
-
`,
|
|
2909
|
+
`,DC=e=>i.css`
|
|
2897
2910
|
tr {
|
|
2898
2911
|
height: ${k(1200)};
|
|
2899
2912
|
|
|
@@ -2920,18 +2933,18 @@
|
|
|
2920
2933
|
}
|
|
2921
2934
|
}
|
|
2922
2935
|
}
|
|
2923
|
-
`,
|
|
2936
|
+
`,IC=e=>i.css`
|
|
2924
2937
|
overflow: auto;
|
|
2925
2938
|
height: ${e};
|
|
2926
2939
|
width: 100%;
|
|
2927
|
-
`,
|
|
2940
|
+
`,PC=i.css`
|
|
2928
2941
|
height: 30rem;
|
|
2929
2942
|
display: flex;
|
|
2930
2943
|
align-items: center;
|
|
2931
2944
|
justify-content: center;
|
|
2932
|
-
`,
|
|
2945
|
+
`,zC="__checkbox__",VC=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},BC=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},HC=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},_C=e.Table.Row,FC=e.Table.Cell,qC=i.css`
|
|
2933
2946
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2934
|
-
`,
|
|
2947
|
+
`,WC=i.css`
|
|
2935
2948
|
padding: ${k(400)};
|
|
2936
2949
|
cursor: pointer;
|
|
2937
2950
|
&:focus-visible {
|
|
@@ -2946,9 +2959,9 @@
|
|
|
2946
2959
|
transparent
|
|
2947
2960
|
);
|
|
2948
2961
|
}
|
|
2949
|
-
`,WC=i.css`
|
|
2950
|
-
border: ${j(100)} solid ${w("neutral",300)};
|
|
2951
2962
|
`,UC=i.css`
|
|
2963
|
+
border: ${j(100)} solid ${w("neutral",300)};
|
|
2964
|
+
`,KC=i.css`
|
|
2952
2965
|
padding: ${k(400)};
|
|
2953
2966
|
cursor: pointer;
|
|
2954
2967
|
border-bottom: ${j(100)} solid
|
|
@@ -2970,7 +2983,7 @@
|
|
|
2970
2983
|
transparent
|
|
2971
2984
|
);
|
|
2972
2985
|
}
|
|
2973
|
-
`,
|
|
2986
|
+
`,GC=i.css`
|
|
2974
2987
|
.item-content-open > * {
|
|
2975
2988
|
max-height: auto;
|
|
2976
2989
|
|
|
@@ -2991,10 +3004,10 @@
|
|
|
2991
3004
|
padding-bottom 0.2s ease,
|
|
2992
3005
|
padding-top 0.2s ease;
|
|
2993
3006
|
}
|
|
2994
|
-
`,
|
|
3007
|
+
`,ZC=i.css`
|
|
2995
3008
|
border-top: ${j(100)} solid
|
|
2996
3009
|
${w("neutral",300)};
|
|
2997
|
-
`;var
|
|
3010
|
+
`;var JC,XC={exports:{}},YC={},QC={exports:{}},ek={exports:{}},tk={};var nk,rk,ok,ik,sk,ak,lk,ck,dk,uk,hk,pk,fk,mk={};
|
|
2998
3011
|
/** @license React v16.13.1
|
|
2999
3012
|
* react-is.development.js
|
|
3000
3013
|
*
|
|
@@ -3002,7 +3015,7 @@
|
|
|
3002
3015
|
*
|
|
3003
3016
|
* This source code is licensed under the MIT license found in the
|
|
3004
3017
|
* LICENSE file in the root directory of this source tree.
|
|
3005
|
-
*/function mk(){return nk||(nk=1,"production"===process.env.NODE_ENV?QC.exports=function(){if(ZC)return ek;ZC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return ek.AsyncMode=l,ek.ConcurrentMode=c,ek.ContextConsumer=a,ek.ContextProvider=s,ek.Element=t,ek.ForwardRef=d,ek.Fragment=r,ek.Lazy=f,ek.Memo=p,ek.Portal=n,ek.Profiler=i,ek.StrictMode=o,ek.Suspense=u,ek.isAsyncMode=function(e){return x(e)||y(e)===l},ek.isConcurrentMode=x,ek.isContextConsumer=function(e){return y(e)===a},ek.isContextProvider=function(e){return y(e)===s},ek.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ek.isForwardRef=function(e){return y(e)===d},ek.isFragment=function(e){return y(e)===r},ek.isLazy=function(e){return y(e)===f},ek.isMemo=function(e){return y(e)===p},ek.isPortal=function(e){return y(e)===n},ek.isProfiler=function(e){return y(e)===i},ek.isStrictMode=function(e){return y(e)===o},ek.isSuspense=function(e){return y(e)===u},ek.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},ek.typeOf=y,ek}():QC.exports=(tk||(tk=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}fk.AsyncMode=x,fk.ConcurrentMode=w,fk.ContextConsumer=C,fk.ContextProvider=k,fk.Element=S,fk.ForwardRef=$,fk.Fragment=j,fk.Lazy=M,fk.Memo=E,fk.Portal=T,fk.Profiler=O,fk.StrictMode=L,fk.Suspense=A,fk.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},fk.isConcurrentMode=N,fk.isContextConsumer=function(e){return y(e)===a},fk.isContextProvider=function(e){return y(e)===s},fk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fk.isForwardRef=function(e){return y(e)===d},fk.isFragment=function(e){return y(e)===r},fk.isLazy=function(e){return y(e)===f},fk.isMemo=function(e){return y(e)===p},fk.isPortal=function(e){return y(e)===n},fk.isProfiler=function(e){return y(e)===i},fk.isStrictMode=function(e){return y(e)===o},fk.isSuspense=function(e){return y(e)===u},fk.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},fk.typeOf=y}()),fk)),QC.exports}function gk(){if(ok)return rk;ok=1;return rk="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function bk(){return sk?ik:(sk=1,ik=Function.call.bind(Object.prototype.hasOwnProperty))}function vk(){if(dk)return ck;dk=1;var e=mk(),t=s,n=gk(),r=bk(),o=function(){if(lk)return ak;lk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=gk(),n={},r=bk();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ak=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ck=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+v(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+v(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return b(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=v(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=v(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=v(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return v(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ck}function yk(){if(pk)return YC.exports;if(pk=1,"production"!==process.env.NODE_ENV){var e=mk();YC.exports=vk()(e.isElement,!0)}else YC.exports=function(){if(hk)return uk;hk=1;var e=gk();function t(){}function n(){}return n.resetWarningCache=t,uk=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},uk}()();return YC.exports}var xk,wk={exports:{}};var Ck,kk={},Sk={};function $k(){if(Ck)return Sk;return Ck=1,Object.defineProperty(Sk,"__esModule",{value:!0}),Sk.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Sk.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Sk.int=function(e){return parseInt(e,10)},Sk.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Sk.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Sk}var jk,Mk,Ek={};function Tk(){if(Mk)return kk;Mk=1,Object.defineProperty(kk,"__esModule",{value:!0}),kk.addClassName=s,kk.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},kk.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},kk.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},kk.createSVGTransform=function(e,t){return o(e,t,"")},kk.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},kk.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},kk.getTranslation=o,kk.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},kk.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},kk.matchesSelector=r,kk.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},kk.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},kk.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},kk.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},kk.removeClassName=a,kk.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},kk.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=$k(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(jk)return Ek;jk=1,Object.defineProperty(Ek,"__esModule",{value:!0}),Ek.browserPrefixToKey=n,Ek.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Ek.default=void 0,Ek.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return Ek.default=t(),Ek}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return kk}var Ok,Lk={};function Ak(){if(Ok)return Lk;Ok=1,Object.defineProperty(Lk,"__esModule",{value:!0}),Lk.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Lk.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Lk.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Lk.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Lk.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},Lk.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},Lk.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=$k(),t=Tk();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Lk}var Rk,Nk,Dk,Ik,Pk={},zk={};function Vk(){if(Rk)return zk;return Rk=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.default=function(){},zk}function Bk(){if(Nk)return Pk;Nk=1,Object.defineProperty(Pk,"__esModule",{value:!0}),Pk.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(yk()),r=c(o),i=Tk(),s=Ak(),a=$k(),l=c(Vk());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Pk.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Pk}function Hk(){return Dk||(Dk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(yk()),i=h(o),s=function(){if(xk)return wk.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return xk=1,wk.exports=t,wk.exports.clsx=t,wk.exports}(),a=Tk(),l=Ak(),c=$k(),d=h(Bk()),u=h(Vk());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let b={},v=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(w,f):b=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...b},transform:v}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(XC)),XC}var _k=function(){if(Ik)return JC.exports;Ik=1;const{default:e,DraggableCore:t}=Hk();return JC.exports=e,JC.exports.default=e,JC.exports.DraggableCore=t,JC.exports}(),Fk=lp(_k);const qk=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
|
|
3018
|
+
*/function gk(){return rk||(rk=1,"production"===process.env.NODE_ENV?ek.exports=function(){if(JC)return tk;JC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return tk.AsyncMode=l,tk.ConcurrentMode=c,tk.ContextConsumer=a,tk.ContextProvider=s,tk.Element=t,tk.ForwardRef=d,tk.Fragment=r,tk.Lazy=f,tk.Memo=p,tk.Portal=n,tk.Profiler=i,tk.StrictMode=o,tk.Suspense=u,tk.isAsyncMode=function(e){return x(e)||y(e)===l},tk.isConcurrentMode=x,tk.isContextConsumer=function(e){return y(e)===a},tk.isContextProvider=function(e){return y(e)===s},tk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},tk.isForwardRef=function(e){return y(e)===d},tk.isFragment=function(e){return y(e)===r},tk.isLazy=function(e){return y(e)===f},tk.isMemo=function(e){return y(e)===p},tk.isPortal=function(e){return y(e)===n},tk.isProfiler=function(e){return y(e)===i},tk.isStrictMode=function(e){return y(e)===o},tk.isSuspense=function(e){return y(e)===u},tk.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},tk.typeOf=y,tk}():ek.exports=(nk||(nk=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}mk.AsyncMode=x,mk.ConcurrentMode=w,mk.ContextConsumer=C,mk.ContextProvider=k,mk.Element=S,mk.ForwardRef=$,mk.Fragment=j,mk.Lazy=M,mk.Memo=E,mk.Portal=T,mk.Profiler=O,mk.StrictMode=L,mk.Suspense=A,mk.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},mk.isConcurrentMode=N,mk.isContextConsumer=function(e){return y(e)===a},mk.isContextProvider=function(e){return y(e)===s},mk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},mk.isForwardRef=function(e){return y(e)===d},mk.isFragment=function(e){return y(e)===r},mk.isLazy=function(e){return y(e)===f},mk.isMemo=function(e){return y(e)===p},mk.isPortal=function(e){return y(e)===n},mk.isProfiler=function(e){return y(e)===i},mk.isStrictMode=function(e){return y(e)===o},mk.isSuspense=function(e){return y(e)===u},mk.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},mk.typeOf=y}()),mk)),ek.exports}function bk(){if(ik)return ok;ik=1;return ok="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function vk(){return ak?sk:(ak=1,sk=Function.call.bind(Object.prototype.hasOwnProperty))}function yk(){if(uk)return dk;uk=1;var e=gk(),t=s,n=bk(),r=vk(),o=function(){if(ck)return lk;ck=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=bk(),n={},r=vk();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},lk=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),dk=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+v(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+v(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return b(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=v(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=v(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=v(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return v(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},dk}function xk(){if(fk)return QC.exports;if(fk=1,"production"!==process.env.NODE_ENV){var e=gk();QC.exports=yk()(e.isElement,!0)}else QC.exports=function(){if(pk)return hk;pk=1;var e=bk();function t(){}function n(){}return n.resetWarningCache=t,hk=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},hk}()();return QC.exports}var wk,Ck={exports:{}};var kk,Sk={},$k={};function jk(){if(kk)return $k;return kk=1,Object.defineProperty($k,"__esModule",{value:!0}),$k.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},$k.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},$k.int=function(e){return parseInt(e,10)},$k.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},$k.isNum=function(e){return"number"==typeof e&&!isNaN(e)},$k}var Mk,Ek,Tk={};function Ok(){if(Ek)return Sk;Ek=1,Object.defineProperty(Sk,"__esModule",{value:!0}),Sk.addClassName=s,Sk.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Sk.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},Sk.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Sk.createSVGTransform=function(e,t){return o(e,t,"")},Sk.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},Sk.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Sk.getTranslation=o,Sk.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},Sk.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},Sk.matchesSelector=r,Sk.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},Sk.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},Sk.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},Sk.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},Sk.removeClassName=a,Sk.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Sk.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=jk(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(Mk)return Tk;Mk=1,Object.defineProperty(Tk,"__esModule",{value:!0}),Tk.browserPrefixToKey=n,Tk.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Tk.default=void 0,Tk.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return Tk.default=t(),Tk}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Sk}var Lk,Ak={};function Rk(){if(Lk)return Ak;Lk=1,Object.defineProperty(Ak,"__esModule",{value:!0}),Ak.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ak.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ak.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Ak.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Ak.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},Ak.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},Ak.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=jk(),t=Ok();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ak}var Nk,Dk,Ik,Pk,zk={},Vk={};function Bk(){if(Nk)return Vk;return Nk=1,Object.defineProperty(Vk,"__esModule",{value:!0}),Vk.default=function(){},Vk}function Hk(){if(Dk)return zk;Dk=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(xk()),r=c(o),i=Ok(),s=Rk(),a=jk(),l=c(Bk());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return zk.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),zk}function _k(){return Ik||(Ik=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(xk()),i=h(o),s=function(){if(wk)return Ck.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return wk=1,Ck.exports=t,Ck.exports.clsx=t,Ck.exports}(),a=Ok(),l=Rk(),c=jk(),d=h(Hk()),u=h(Bk());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let b={},v=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(w,f):b=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...b},transform:v}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(YC)),YC}var Fk=function(){if(Pk)return XC.exports;Pk=1;const{default:e,DraggableCore:t}=_k();return XC.exports=e,XC.exports.default=e,XC.exports.DraggableCore=t,XC.exports}(),qk=lp(Fk);const Wk=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
|
|
3006
3019
|
max-width: 100%;
|
|
3007
3020
|
width: ${o};
|
|
3008
3021
|
height: ${l};
|
|
@@ -3012,7 +3025,7 @@
|
|
|
3012
3025
|
border-radius: ${$(300)};
|
|
3013
3026
|
box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
|
|
3014
3027
|
box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
3015
|
-
`},
|
|
3028
|
+
`},Uk=i.css`
|
|
3016
3029
|
height: 100%;
|
|
3017
3030
|
min-height: ${k(1e3)};
|
|
3018
3031
|
display: flex;
|
|
@@ -3021,11 +3034,11 @@
|
|
|
3021
3034
|
padding: ${k(200)};
|
|
3022
3035
|
border-bottom: ${j(100)} solid
|
|
3023
3036
|
${w("neutral",300)};
|
|
3024
|
-
`,Uk=i.css`
|
|
3025
|
-
top: ${k(300)};
|
|
3026
3037
|
`,Kk=i.css`
|
|
3038
|
+
top: ${k(300)};
|
|
3039
|
+
`,Gk=i.css`
|
|
3027
3040
|
padding: 0;
|
|
3028
|
-
`,
|
|
3041
|
+
`,Zk=e=>i.css`
|
|
3029
3042
|
display: flex;
|
|
3030
3043
|
flex-direction: column;
|
|
3031
3044
|
height: 100%;
|
|
@@ -3033,19 +3046,19 @@
|
|
|
3033
3046
|
background-color: ${w("neutral",100)};
|
|
3034
3047
|
box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
|
|
3035
3048
|
box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
|
|
3036
|
-
`,
|
|
3049
|
+
`,Jk=i.css`
|
|
3037
3050
|
border-right: ${j(100)} solid
|
|
3038
3051
|
${w("neutral",300)};
|
|
3039
|
-
`,
|
|
3052
|
+
`,Xk=i.css`
|
|
3040
3053
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
3041
3054
|
border-radius: ${$(300)};
|
|
3042
|
-
`,
|
|
3055
|
+
`,Yk=i.css`
|
|
3043
3056
|
flex-shrink: 0;
|
|
3044
3057
|
min-height: ${k(1200)};
|
|
3045
3058
|
width: 100%;
|
|
3046
3059
|
border-bottom: ${j(100)} solid
|
|
3047
3060
|
${w("neutral",300)};
|
|
3048
|
-
`,
|
|
3061
|
+
`,Qk=i.css`
|
|
3049
3062
|
flex: 1;
|
|
3050
3063
|
min-height: 0;
|
|
3051
3064
|
width: 100%;
|
|
@@ -3054,7 +3067,7 @@
|
|
|
3054
3067
|
&:focus-visible {
|
|
3055
3068
|
outline-color: ${w("primary",700)};
|
|
3056
3069
|
}
|
|
3057
|
-
`,
|
|
3070
|
+
`,eS=i.css`
|
|
3058
3071
|
flex-shrink: 0;
|
|
3059
3072
|
min-height: ${k(1600)};
|
|
3060
3073
|
width: 100%;
|
|
@@ -3063,7 +3076,7 @@
|
|
|
3063
3076
|
justify-content: flex-start;
|
|
3064
3077
|
border-top: ${j(100)} solid
|
|
3065
3078
|
${w("neutral",300)};
|
|
3066
|
-
`;var
|
|
3079
|
+
`;var tS,nS;!function(){if(nS)return tS;nS=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}tS=e}();var rS=oS()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function oS(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var iS=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return rS((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(iS.displayName="Portal");
|
|
3067
3080
|
/*! *****************************************************************************
|
|
3068
3081
|
Copyright (c) Microsoft Corporation.
|
|
3069
3082
|
|
|
@@ -3077,16 +3090,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
3077
3090
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3078
3091
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3079
3092
|
PERFORMANCE OF THIS SOFTWARE.
|
|
3080
|
-
***************************************************************************** */var iS,sS,aS=function(){return aS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},aS.apply(this,arguments)};function lS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function cS(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dS(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function uS(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(iS||(iS={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(sS||(sS={}));var hS=iS.Start,pS=iS.Stop,fS=iS.Raise,mS=iS.Send,gS=iS.Cancel,bS=iS.NullEvent,vS=iS.Assign;iS.After,iS.DoneState;var yS=iS.Log,xS=iS.Init,wS=iS.Invoke;iS.ErrorExecution;var CS,kS=iS.ErrorPlatform,SS=iS.ErrorCustom,$S=iS.Update,jS=iS.Choose,MS=iS.Pure,ES={},TS="xstate.guard",OS="production"===process.env.NODE_ENV;function LS(e,t,n){void 0===n&&(n=".");var r=NS(e,n),o=NS(t,n);return JS(o)?!!JS(r)&&o===r:JS(r)?r in o:Object.keys(r).every((function(e){return e in o&&LS(r[e],o[e])}))}function AS(e){try{return JS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function RS(e,t){try{return GS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function NS(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:GS(e)?DS(e):"string"!=typeof e?e:DS(RS(e,t));var n}function DS(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function IS(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function PS(e,t,n){var r,o,i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var zS=function(e){return function(t){var n,r,o=t;try{for(var i=cS(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function VS(e){return e?JS(e)?[[e]]:BS(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?VS(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function BS(e){var t;return(t=[]).concat.apply(t,uS([],dS(e),!1))}function HS(e){return GS(e)?e:[e]}function _S(e){return void 0===e?[]:HS(e)}function FS(e,t,n){var r,o;if(ZS(e))return e(t,n.data);var i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];ZS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function qS(e){return e instanceof Promise||!(null===e||!ZS(e)&&"object"!=typeof e||!ZS(e.then))}function WS(e,t){return IS(e.states,(function(e,n){if(e){var r=(JS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:WS(e,r)}}}))}function US(e,t,n,r){OS||KS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(ZS(s))l=s(e,t.data,a);else try{for(var c=cS(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=ZS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var KS=function(){};function GS(e){return Array.isArray(e)}function ZS(e){return"function"==typeof e}function JS(e){return"string"==typeof e}function XS(e,t){if(e)return JS(e)?{type:TS,name:e,predicate:t?t[e]:void 0}:ZS(e)?{type:TS,name:e.name,predicate:e}:e}OS||(KS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var YS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function QS(e){return!!e&&"__xstatenode"in e}function e$(e,t){return JS(e)||"number"==typeof e?aS({type:e},t):e}function t$(e,t){if(!JS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=e$(e);return aS({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function n$(e,t){return HS(t).map((function(t){return void 0===t||"string"==typeof t||QS(t)?{target:t,event:e}:aS(aS({},t),{event:e})}))}function r$(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===TS)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function o$(e){return"string"==typeof e?{type:e}:e}function i$(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function s$(e,t){return"".concat(e,":invocation[").concat(t,"]")}function a$(e){return(e.type===fS||e.type===mS&&e.to===sS.Internal)&&"number"!=typeof e.delay}(CS={})[YS]=function(){return this},CS[Symbol.observable]=function(){return this};var l$=t$({type:xS});function c$(e,t){return t&&t[e]||void 0}function d$(e,t){var n;if(JS(e)||"number"==typeof e)n=ZS(r=c$(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(ZS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(ZS(r=c$(e.type,t)))n=aS(aS({},e),{exec:r});else if(r){var o=r.type||e.type;n=aS(aS(aS({},r),e),{type:o})}else n=e}return n}var u$=function(e,t){return e?(GS(e)?e:[e]).map((function(e){return d$(e,t)})):[]};function h$(e){var t=d$(e);return aS(aS({id:JS(e)?e:t.id},t),{type:t.type})}function p$(e,t){var n="".concat(iS.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function f$(e,t){var n="".concat(iS.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function m$(e,t){var n="".concat(iS.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function g$(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=cS(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==vS?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?US(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case fS:var h=function(e,t,n,r){var o,i={_event:n},s=t$(ZS(e.event)?e.event(t,n.data,i):e.event);if(JS(e.delay)){var a=r&&r[e.delay];o=ZS(a)?a(t,n.data,i):a}else o=ZS(e.delay)?e.delay(t,n.data,i):e.delay;return aS(aS({},e),{type:fS,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case mS:var p=function(e,t,n,r){var o,i={_event:n},s=t$(ZS(e.event)?e.event(t,n.data,i):e.event);if(JS(e.delay)){var a=r&&r[e.delay];o=ZS(a)?a(t,n.data,i):a}else o=ZS(e.delay)?e.delay(t,n.data,i):e.delay;var l=ZS(e.to)?e.to(t,n.data,i):e.to;return aS(aS({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!OS){var f=a.delay;KS(!JS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==sS.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case yS:var m=function(e,t,n){return aS(aS({},e),{value:JS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case jS:if(!(y=null===(u=a.conds.find((function(n){var o=XS(n.cond,e.options.guards);return!o||r$(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=dS(g$(e,t,l,r,[{type:o,actions:u$(_S(y),e.options.actions)}],i,s),2),b=g[0],v=g[1];return l=v,null==c||c.push(l),b;case MS:var y;if(!(y=a.get(l,r.data)))return[];var x=dS(g$(e,t,l,r,[{type:o,actions:u$(_S(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case pS:m=function(e,t,n){var r=ZS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:iS.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case vS:l=US(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=d$(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=aS(aS({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,uS([c[$]],dS(t),!1))}});k=j}return k}}var h=BS(o.map((function(e){var t,n,o=[];try{for(var s=cS(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var b$=function(e,t){return t(e)};function v$(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[YS]=function(){return this},t}function y$(e,t,n){var r=v$(t);if(r.deferred=!0,QS(e)){var o=r.state=b$(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var x$=function(e){return"atomic"===e.type||"final"===e.type};function w$(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function C$(e){return w$(e).filter((function(e){return"history"!==e.type}))}function k$(e){var t=[e];return x$(e)?t:t.concat(BS(C$(e).map(k$)))}function S$(e,t){var n,r,o,i,s,a,l,c,d=j$(new Set(e)),u=new Set(t);try{for(var h=cS(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=j$(u);try{for(var g=cS(u),b=g.next();!b.done;b=g.next()){if("compound"!==(k=b.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var v=(s=void 0,cS(C$(k))),y=v.next();!y.done;y=v.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=cS(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function $$(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(x$(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=$$(e,t)})),o}function j$(e){var t,n,r=new Map;try{for(var o=cS(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function M$(e,t){return $$(e,j$(S$([e],t)))}function E$(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function T$(e,t){return"compound"===t.type?C$(t).some((function(t){return"final"===t.type&&E$(e,t)})):"parallel"===t.type&&C$(t).every((function(t){return T$(e,t)}))}function O$(e){return new Set(BS(e.map((function(e){return e.tags}))))}function L$(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(JS(e)||JS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return L$(e[n],t[n])}))}var A$=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=ES,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||ES,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return uS([],dS(new Set(BS(uS([],dS(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:l$,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=l$;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),JS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,uS([],dS(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=lS(e,["configuration","transitions","tags","machine"]);return aS(aS({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return LS(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;OS&&KS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),R$={deferEvents:!1},N$=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=aS(aS({},R$),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),D$=new Map,I$=0,P$=function(){return"x:".concat(I$++)},z$=function(e,t){return D$.set(e,t),e},V$=function(e){return D$.get(e)},B$=function(e){D$.delete(e)};function H$(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(OS||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function _$(e){if(H$()){var t=function(){var e=H$();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function F$(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return aS(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[YS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=i$(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var q$,W$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(q$||(q$={}));var U$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=q$.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(GS(e))return r.batch(e),r.state;var n=t$(e$(e,t));if(r.status===q$.Stopped)return OS||KS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==q$.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===sS.Parent||r.parent.id===t),s=i?r.parent:JS(t)?t===sS.Internal?r:r.children.get(t)||V$(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==q$.Stopped||r.parent!==s||r.state.done){var a=aS(aS({},e),{name:e.name===SS?"".concat(m$(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));OS||KS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||c$(e.type,o),s=ZS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case fS:var a=e;r.defer(a);break;case mS:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===l$):r.send(l._event);break;case gS:r.cancel(e.sendId);break;case hS:if(r.status!==q$.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===iS.Invoke){var d=o$(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;OS||KS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(OS||KS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?FS(p,t,n):void 0;if("string"==typeof u)return;var g=ZS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var b=void 0;QS(g)&&(g=m?g.withContext(m):g,b={autoForward:f}),r.spawn(g,h,b)}else r.spawnActivity(c);break;case pS:r.stopChild(e.activity.id);break;case yS:var v=e,y=v.label,x=v.value;y?r.logger(y,x):r.logger(x);break;default:OS||KS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=aS(aS({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new N$({deferEvents:this.options.deferEvents}),this.sessionId=P$()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:b$(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return OS||KS(this.status!==q$.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=cS(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==l$||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=cS(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=cS(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=cS(this.contextListeners),b=g.next();!b.done;b=g.next()){(0,b.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var v=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=v&&v.doneData?FS(v.doneData,e.context,t):void 0;this._doneEvent=f$(this.id,y);try{for(var x=cS(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),B$(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===q$.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=i$(e,t,n);this.listeners.add(o.next),this.status!==q$.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===q$.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===q$.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===q$.Running)return this;this.machine._init(),z$(this.sessionId,this),this.initialized=!0,this.status=q$.Running;var n=void 0===e?this.initialState:b$(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(A$.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,l$)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){ZS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=cS(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=cS(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=cS(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var b=cS(this.doneListeners),v=b.next();!v.done;v=b.next()){h=v.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=q$.Stopped,this._initialState=void 0;try{for(var y=cS(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new N$({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=t$({type:"xstate.stop"}),r=b$(e,(function(){var t=BS(uS([],dS(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return u$(t.onExit,e.machine.options.actions)}))),r=dS(g$(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new A$({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!a$(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),B$(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===q$.NotStarted&&this.options.deferEvents)OS||KS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==q$.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=t$(e);t.forward(r),i=b$(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,uS([],dS(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return aS(aS({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=cS(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,t$(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=t$(e);if(0===r.name.indexOf(kS)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(kS)})))throw r.data.data;return b$(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=cS(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),ZS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==q$.Running)return y$(e,t);if(qS(e))return this.spawnPromise(Promise.resolve(e),t);if(ZS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&ZS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(QS(e))return this.spawnMachine(e,aS(aS({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,aS(aS({},this.options),{parent:this,id:n.id||t.id})),i=aS(aS({},W$),n);i.sync&&o.onTransition((function(e){r.send($S,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(t$(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=F$(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(t$(f$(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=m$(t,e);try{o.send(t$(n,{origin:t}))}catch(r){!function(e,t,n){if(!OS){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=i$(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[YS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(t$(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(m$(t,e))}if(qS(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=i$(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,ZS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[YS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(t$(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(t$(m$(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(t$(f$(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[YS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else OS||KS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[YS]=function(){return this},n))},e.prototype.attachDev=function(){var e=H$();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(aS(aS({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:aS({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}_$(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[YS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===q$.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=K$,e}();function K$(e,t){return new U$(e,t)}function G$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Z$(e){return aS(aS({type:wS},e),{toJSON:function(){e.onDone,e.onError;var t=lS(e,["onDone","onError"]);return aS(aS({},t),{type:wS,src:G$(e.src)})}})}var J$="",X$="*",Y$={},Q$=function(e){return"#"===e[0]},ej=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||uS([this.machine.key],dS(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,OS||KS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?IS(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,aS(((r={})[o.id]=o,r),o.idMap)),o})):Y$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=cS(w$(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===J$})):J$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=_S(this.config.entry||this.config.onEntry).map((function(e){return d$(e)})),this.onExit=_S(this.config.exit||this.config.onExit).map((function(e){return d$(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=_S(this.config.invoke).map((function(e,t){var n,r;if(QS(e)){var o=s$(s.id,t);return s.machine.options.services=aS(((n={})[o]=e,n),s.machine.options.services),Z$({src:o,id:o})}if(JS(e.src)){o=e.id||s$(s.id,t);return Z$(aS(aS({},e),{id:o,src:e.src}))}if(QS(e.src)||ZS(e.src)){o=e.id||s$(s.id,t);return s.machine.options.services=aS(((r={})[o]=e.src,r),s.machine.options.services),Z$(aS(aS({id:o},e),{src:o}))}var i=e.src;return Z$(aS(aS({id:s$(s.id,t)},e),{src:i}))})),this.activities=_S(this.config.activities).concat(this.invoke).map((function(e){return h$(e)})),this.transition=this.transition.bind(this),this.tags=_S(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||k$(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:aS(aS({},o),t.actions),activities:aS(aS({},i),t.activities),guards:aS(aS({},s),t.guards),services:aS(aS({},a),t.services),delays:aS(aS({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return ZS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:IS(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===J$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===X$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(iS.After,"(").concat(e,")").concat(n)}(ZS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:mS,event:ZS(e)?e:e$(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:ZS(e)?e.name:AS(e)}}(r,{delay:t})),e.onExit.push({type:gS,sendId:r}),r},r=GS(t)?t.map((function(e,t){var r=n(e.delay,t);return aS(aS({},e),{event:r})})):BS(Object.keys(t).map((function(e,r){var o=t[e],i=JS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return _S(i).map((function(e){return aS(aS({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return aS(aS({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof A$?e.value:NS(e,this.delimiter);if(JS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,uS([],dS(BS(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=AS(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof A$?e:A$.create(e),n=Array.from(S$([],this.getStateNodes(t.value)));return new A$(aS(aS({},t),{value:this.resolve(t.value),configuration:n,done:T$(n,this),tags:O$(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=BS(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=BS(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:BS(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:BS(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return JS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,t$(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=cS(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(JS(p)&&Q$(p)?e.matches(NS(this.getStateNodeById(p).path,this.delimiter)):LS(NS(p,this.delimiter),zS(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||r$(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,uS([],dS(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=BS(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:BS(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:b,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?S$([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=cS(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!E$(h,v=m.value)||E$(n.exitSet,v)||v.parent&&p.has(v.parent))&&p.add(v)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=cS(h),b=g.next();!b.done;b=g.next()){var v;E$(e,v=b.value)&&!E$(n.exitSet,v.parent)||n.exitSet.push(v)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=BS(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(p$(e.id,e.doneData),p$(i.id,e.doneData?FS(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&C$(s).every((function(e){return T$(n.configuration,e)}))&&t.push(p$(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=h$(e);return{type:iS.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:u$(s?uS(uS([],dS(t),!1),dS(n),!1):uS(uS([],dS(n),!1),dS(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:fS,event:"function"==typeof e?e:e$(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:u$(uS(uS([],dS(e.onExit),!1),dS(e.activities.map((function(e){return function(e){var t=ZS(e)?e:h$(e);return{type:iS.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:u$(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=u$(BS(uS([],dS(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!a$(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=t$(t);if(e instanceof A$)o=void 0===n?e:this.resolveState(A$.from(e,n));else{var a=JS(e)?this.resolve(DS(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(A$.from(a,l))}if(!OS&&s.name===X$)throw new Error("An event cannot have the wildcard type ('".concat(X$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=S$([],this.getStateNodes(o.value)),u=c.configuration.length?S$(d,c.configuration):d;return c.configuration=uS([],dS(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,uS([],dS(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=l$);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=T$(h,this),f=u?M$(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),b=t?aS({},t.activities):{};try{for(var v=cS(g),y=v.next();!y.done;y=v.next()){var x=y.value;try{for(var w=(a=void 0,cS(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===hS?b[k.activity.id||k.activity.type]=k:k.type===pS&&(b[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}var S,$,j=dS(g$(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=dS(function(e,t){var n,r,o=dS([[],[]],2),i=o[0],s=o[1];try{for(var a=cS(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,a$),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===hS&&(null===(t=e.activity)||void 0===t?void 0:t.type)===wS})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=o$(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?FS(e.data,n,r):void 0,l=s?y$(s,e.id,a):v$(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?aS({},t.children):{}),N=new A$({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:WS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?b:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:O$(h),machine:this}),D=n!==E;N.changed=o.name===$S||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==J$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:bS},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!L$(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(Q$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Q$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Q$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=RS(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Y$;switch(this.type){case"parallel":return IS(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Y$}));case"compound":if(JS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?IS(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Y$})):this.initialStateValue||{};default:return e||Y$}},e.prototype.getResolvedPath=function(e){if(Q$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return RS(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=PS(this.states,(function(e){return e.initialStateValue||Y$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=x$(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=JS(t.target)&&Q$(t.target)?DS(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return x$(this)?[this]:"compound"!==this.type||this.initial?BS(VS(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(OS||KS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=dS(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:PS(this.states,(function(t,n){if(!e)return t.historyValue();var r=JS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?BS(VS(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=cS(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return JS(s)?[n.getStateNode(s)]:BS(VS(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=BS(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=cS(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,cS(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!JS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return _S(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return JS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=aS(aS({},e),{actions:u$(_S(e.actions)),cond:XS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return aS(aS({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=X$,s=o[i],a=void 0===s?[]:s,l=lS(o,["*"]);n=BS(Object.keys(l).map((function(e){OS||e!==J$||KS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=n$(e,l[e]);return OS||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(JS(e.target)||QS(e.target))})),o=t===J$?"the transient event":"event '".concat(t,"'");KS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(n$(X$,a)))}else n=[];var c=this.config.always?n$("",this.config.always):[],d=this.config.onDone?n$(String(p$(this.id)),this.config.onDone):[];OS||KS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=BS(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,uS([],dS(n$(String(f$(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,uS([],dS(n$(String(m$(e.id)),e.onError)),!1)),t}))),h=this.after,p=BS(uS(uS(uS(uS([],dS(d),!1),dS(u),!1),dS(n),!1),dS(c),!1).map((function(e){return _S(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=cS(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var tj,nj=function(e){return{type:vS,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(tj||(tj={}));var rj="undefined"!=typeof document?n.useLayoutEffect:function(){};function oj(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var ij=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},sj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var aj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},lj=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function cj(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function dj(e){var t=n.useRef([]),r=n.useRef([]);rj((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=aj(function(e,t){var n,r,o=ij([[],[]],2),i=o[0],s=o[1];try{for(var a=sj(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===tj.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,lj([],aj(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,lj([],aj(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),rj((function(){for(;r.current.length;){var e=aj(r.current.shift(),2);cj(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=aj(t.current.shift(),2);cj(e[0],e[1])}}))}var uj=function(){return uj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uj.apply(this,arguments)},hj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var fj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function mj(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=oj((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=pj(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=hj(t,["context","guards","actions","activities","services","delays","state"]),f=oj((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return K$(o.withConfig(e,(function(){return uj(uj({},o.context),s)})),uj({deferEvents:!0},p))}));return rj((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),rj((function(){return f.start(h?A$.create(h):void 0),function(){f.stop()}}),[]),rj((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),dj(f),f}(e,t,r),i=fj(n.useState((function(){var e=o.machine.initialState;return t.state?A$.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function gj(){return gj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gj.apply(null,arguments)}function bj(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const vj={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(vj.str(e)||vj.num(e))return e===t;if(vj.obj(e)&&vj.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!vj.und(n)||e===t}};function yj(e,t){return vj.und(e)||vj.nul(e)?t:e}function xj(e){return vj.und(e)?[]:vj.arr(e)?e:[e]}function wj(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vj.fun(e)?e(...n):e}function Cj(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,bj(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(vj.und(t))return gj({to:t},e);const n=Object.keys(e).reduce(((n,r)=>vj.und(t[r])?gj({},n,{[r]:e[r]}):n),{});return gj({to:t},n)}class kj{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class Sj extends kj{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof kj&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof kj&&e.removeChild(this)))}}class $j extends kj{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof kj&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof kj&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof kj)&&(t[n]=r instanceof kj?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let jj,Mj;let Ej,Tj=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Oj,Lj=()=>Date.now();class Aj extends $j{constructor(e,t){super(),this.update=void 0,this.payload=e.style?gj({},e,{style:Oj(e.style)}):e,this.update=t,this.attach()}}let Rj=!1;const Nj=new Set,Dj=()=>{if(!Rj)return!1;let e=Lj();for(let t of Nj){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof kj,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Nj.delete(t),t.stop(!0))}return Nj.size?Tj(Dj):Rj=!1,Rj};function Ij(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Ij({range:e,output:t,extrapolate:n});if(Ej&&"string"==typeof e.output[0])return Ej(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class Pj extends Sj{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Sj&&!(e instanceof Pj)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Ij(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Ij(e,t,n)}interpolate(e,t,n){return new Pj(this,e,t,n)}}const zj=(e,t,n)=>e&&new Pj(e,t,n);function Vj(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Vj(e,t)))}class Bj extends kj{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Vj(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Pj(this,e,t,n)}}class Hj extends Sj{constructor(e){super(),this.payload=e.map((e=>new Bj(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Pj(this,e,t)}}let _j=0,Fj=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=_j++}update(e){if(!e)return this;const t=Cj(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=bj(t,["delay","to"]);if(vj.arr(o)||vj.fun(o))this.queue.push(gj({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=gj({to:{[n]:o},delay:wj(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=gj({},e[s.delay],s,{to:gj({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;vj.obj(n)&&(this.merged=gj({},n,this.merged)),vj.obj(o)&&(this.merged=gj({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=bj(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=vj.arr(s.to)||vj.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else vj.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Nj.has(t)||Nj.add(t),Rj||(Rj=!0,Tj(Dj));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Nj.has(t)&&Nj.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=bj(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(vj.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=gj({},r,Cj(r.to[t]));vj.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(vj.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=gj({},r,Cj(n));if(vj.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=gj({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=gj({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=vj.num(o),l=vj.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Mj[o],c=vj.arr(o),h=!s&&!c&&!l;let f=vj.und(r[n])?o:r[n],m=s||c||l?o:1,g=wj(a,n);p&&(m=p.animations[n].parent);let b,v=i.parent,y=i.interpolation,x=xj(p?m.getPayload():m),w=o;h&&(w=Ej({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!vj.und(v)&&i.animatedValues.some((e=>!e.done)),S=!vj.equ(w,C),$=!vj.equ(w,i.previous),j=!vj.equ(g,i.config);if(d||$&&S||j){if(s||l)v=y=i.parent||new Bj(f);else if(c)v=y=i.parent||new Hj(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(v=i.parent,v.setValue(0,!1)):v=new Bj(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=v.interpolate(t)}return x=xj(p?m.getPayload():m),b=xj(v.getPayload()),d&&!h&&v.setValue(f,!1),this.hasChanged=!0,b.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=Lj(),e.done=!1,e.animatedStyles.clear()})),wj(u,n)&&v.setValue(h?m:o,!1),gj({},e,{[n]:gj({},i,{name:n,parent:v,interpolation:y,animatedValues:b,toValues:x,previous:w,config:g,fromValues:xj(v.getValue()),immediate:wj(u,n),initialVelocity:yj(g.velocity,0),clamp:yj(g.clamp,!1),precision:yj(g.precision,.01),tension:yj(g.tension,170),friction:yj(g.friction,26),mass:yj(g.mass,1),duration:g.duration,easing:yj(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(v.setValue(1,!1),y.updateConfig({output:[w,w]})),v.done=!0,this.hasChanged=!0,gj({},e,{[n]:gj({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const qj=e=>{const t=vj.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=vj.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Fj,s=i?wj(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?wj(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Wj extends $j{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof kj||(e=jj.transform(e)),this.payload=e}}const Uj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Kj="[-+]?\\d*\\.?\\d+",Gj=Kj+"%";function Zj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Jj=new RegExp("rgb"+Zj(Kj,Kj,Kj)),Xj=new RegExp("rgba"+Zj(Kj,Kj,Kj,Kj)),Yj=new RegExp("hsl"+Zj(Kj,Gj,Gj)),Qj=new RegExp("hsla"+Zj(Kj,Gj,Gj,Kj)),eM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nM=/^#([0-9a-fA-F]{6})$/,rM=/^#([0-9a-fA-F]{8})$/;function oM(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iM(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oM(o,r,e+1/3),s=oM(o,r,e),a=oM(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function sM(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function aM(e){return(parseFloat(e)%360+360)%360/360}function lM(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function cM(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function dM(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=nM.exec(e))?parseInt(t[1]+"ff",16)>>>0:Uj.hasOwnProperty(e)?Uj[e]:(t=Jj.exec(e))?(sM(t[1])<<24|sM(t[2])<<16|sM(t[3])<<8|255)>>>0:(t=Xj.exec(e))?(sM(t[1])<<24|sM(t[2])<<16|sM(t[3])<<8|lM(t[4]))>>>0:(t=eM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=rM.exec(e))?parseInt(t[1],16)>>>0:(t=tM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Yj.exec(e))?(255|iM(aM(t[1]),cM(t[2]),cM(t[3])))>>>0:(t=Qj.exec(e))?(iM(aM(t[1]),cM(t[2]),cM(t[3]))|lM(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const uM=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,hM=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pM=new RegExp(`(${Object.keys(Uj).join("|")})`,"g");let fM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const mM=["Webkit","Ms","Moz","O"];function gM(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fM.hasOwnProperty(e)&&fM[e]?(""+t).trim():t+"px"}fM=Object.keys(fM).reduce(((e,t)=>(mM.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),fM);const bM={};var vM,yM;vM=e=>new Wj(e),Oj=vM,yM=e=>{const t=e.output.map((e=>e.replace(hM,dM))).map((e=>e.replace(pM,dM))),n=t[0].match(uM).map((()=>[]));t.forEach((e=>{e.match(uM).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(uM).map(((t,r)=>Ij(gj({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(uM,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Ej=yM,Mj=Uj,function(e,t){jj={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=bj(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=gM(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:bM[t]||(bM[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var xM;const wM=(xM=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new Aj(e,(()=>{let e=!1;a.current&&(e=jj.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=bj(c,["scrollTop","scrollLeft"]),u=(h=e,!vj.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(vj.fun(t)?t(e):vj.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,gj({},d,{ref:u}))})),e=>(vj.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=xM(n),e}),xM))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function CM(e,t){return e.map((function(e,n){return e+t[n]}))}function kM(e,t){return e.map((function(e,n){return e-t[n]}))}function SM(e){return Math.hypot.apply(Math,e)}function $M(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function jM(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function MM(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-jM(t-e,n-t,r)+t:e>n?+jM(e-n,n-t,r)+n:e}function EM(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function TM(){return TM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TM.apply(this,arguments)}function OM(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function LM(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RM(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return AM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AM(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function NM(){}function DM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?NM:1===t.length?t[0]:function(){for(var e,n,r=RM(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function IM(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function PM(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function zM(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=zM(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var VM=TM({},{threshold:function(e){return void 0===e&&(e=0),IM(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return IM(.15);case!1:return IM(0);default:return IM(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:IM(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return VM.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),BM="undefined"!=typeof window&&window.document&&window.document.createElement,HM={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=BM?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},_M=TM({},VM,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=IM(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),IM(e)},swipeDistance:function(e){return void 0===e&&(e=60),IM(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function FM(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),zM(e,HM)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),zM(e,_M)}(i),s}function qM(e){return TM({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:NM,canceled:!1,memo:void 0,args:void 0},e)}function WM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:qM({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var UM=new Map,KM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=TM({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?GM(p[0],i[0]):d[0],m=!1===d[1]?GM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return TM({},g,{_movement:p,delta:[0,0]});var b,v,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(v=PM(n,this.state),b=PM(r,this.state),l[0]=v[0],a[0]=b[0]),!1!==w[1]&&!1===d[1])&&(v=null!=(y=v)?y:PM(n,this.state),b=null!=(x=b)?x:PM(r,this.state),l[1]=v[1],a[1]=b[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=CM(k,u),$=c?o:[0,0];return k=ZM(a,CM(k,l),$),TM({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:ZM(a,S,$),delta:kM(k,h)})},t.clean=function(){this.clearTimeout()},EM(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function GM(e,t){return Math.abs(e)>=t&&$M(e)*t}function ZM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[MM(r,l,c,i),MM(o,u,h,s)]}function JM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function XM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,TM({},t,{event:n})].concat(o))}}var YM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=RM(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];tE(e,c[0],XM(c[1],TM({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=eE(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;rE(o,QM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,DM.apply(void 0,d)])}nE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=DM.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=eE(t.config),n=t.config.eventOptions;e&&rE(e,QM(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){rE(n,o[i],r)}e.windowListeners={}}(t)},this.state=WM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function QM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function eE(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function tE(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function nE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=RM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function rE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=RM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function oE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(UM.get("drag"));e.wheel&&t.add(UM.get("wheel"));e.scroll&&t.add(UM.get("scroll"));e.move&&t.add(UM.get("move"));e.pinch&&t.add(UM.get("pinch"));e.hover&&t.add(UM.get("hover"));return t}(e),i=n.useMemo((function(){return new YM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?iE:i.bind}function iE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var sE=function(e){function t(){return e.apply(this,arguments)||this}OM(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return kM(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=SM(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:SM(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(KM);function aE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function lE(e){var t="buttons"in e?e.buttons:0,n=aE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function cE(e){var t=aE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var dE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(rE(r.window,o[t],r.eventOptions),nE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(LM(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=lE(e);if(n.down){t.updateSharedState(n);var r=cE(e),o=t.getKinematics(r,e),i=JM(LM(t),e),s=t.state._isTap,a=SM(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(TM({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],b=m[1],v=TM({},JM(LM(t),e),t.getMovement(t.state.values)),y=[0,0];v.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=$M(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>b&&(y[1]=$M(i))),t.updateGestureState(TM({},v,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(LM(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(rE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}OM(t,e);var n=t.prototype;return n.startDrag=function(e){var t=cE(e);this.updateSharedState(lE(e)),this.updateGestureState(TM({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return TM({},WM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),JM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(tE(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&tE(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(sE);function uE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!uE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!uE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||uE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function hE(e,t){try{return uE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function pE(e,t){void 0===t&&(t={}),UM.set("drag",dE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(FM,hE)),oE({drag:e},r.current(t))}
|
|
3093
|
+
***************************************************************************** */var sS,aS,lS=function(){return lS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lS.apply(this,arguments)};function cS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function dS(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function uS(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function hS(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(sS||(sS={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(aS||(aS={}));var pS=sS.Start,fS=sS.Stop,mS=sS.Raise,gS=sS.Send,bS=sS.Cancel,vS=sS.NullEvent,yS=sS.Assign;sS.After,sS.DoneState;var xS=sS.Log,wS=sS.Init,CS=sS.Invoke;sS.ErrorExecution;var kS,SS=sS.ErrorPlatform,$S=sS.ErrorCustom,jS=sS.Update,MS=sS.Choose,ES=sS.Pure,TS={},OS="xstate.guard",LS="production"===process.env.NODE_ENV;function AS(e,t,n){void 0===n&&(n=".");var r=DS(e,n),o=DS(t,n);return XS(o)?!!XS(r)&&o===r:XS(r)?r in o:Object.keys(r).every((function(e){return e in o&&AS(r[e],o[e])}))}function RS(e){try{return XS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function NS(e,t){try{return ZS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function DS(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:ZS(e)?IS(e):"string"!=typeof e?e:IS(NS(e,t));var n}function IS(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function PS(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function zS(e,t,n){var r,o,i={};try{for(var s=dS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var VS=function(e){return function(t){var n,r,o=t;try{for(var i=dS(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function BS(e){return e?XS(e)?[[e]]:HS(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?BS(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function HS(e){var t;return(t=[]).concat.apply(t,hS([],uS(e),!1))}function _S(e){return ZS(e)?e:[e]}function FS(e){return void 0===e?[]:_S(e)}function qS(e,t,n){var r,o;if(JS(e))return e(t,n.data);var i={};try{for(var s=dS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];JS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function WS(e){return e instanceof Promise||!(null===e||!JS(e)&&"object"!=typeof e||!JS(e.then))}function US(e,t){return PS(e.states,(function(e,n){if(e){var r=(XS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:US(e,r)}}}))}function KS(e,t,n,r){LS||GS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(JS(s))l=s(e,t.data,a);else try{for(var c=dS(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=JS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var GS=function(){};function ZS(e){return Array.isArray(e)}function JS(e){return"function"==typeof e}function XS(e){return"string"==typeof e}function YS(e,t){if(e)return XS(e)?{type:OS,name:e,predicate:t?t[e]:void 0}:JS(e)?{type:OS,name:e.name,predicate:e}:e}LS||(GS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var QS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function e$(e){return!!e&&"__xstatenode"in e}function t$(e,t){return XS(e)||"number"==typeof e?lS({type:e},t):e}function n$(e,t){if(!XS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=t$(e);return lS({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function r$(e,t){return _S(t).map((function(t){return void 0===t||"string"==typeof t||e$(t)?{target:t,event:e}:lS(lS({},t),{event:e})}))}function o$(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===OS)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function i$(e){return"string"==typeof e?{type:e}:e}function s$(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function a$(e,t){return"".concat(e,":invocation[").concat(t,"]")}function l$(e){return(e.type===mS||e.type===gS&&e.to===aS.Internal)&&"number"!=typeof e.delay}(kS={})[QS]=function(){return this},kS[Symbol.observable]=function(){return this};var c$=n$({type:wS});function d$(e,t){return t&&t[e]||void 0}function u$(e,t){var n;if(XS(e)||"number"==typeof e)n=JS(r=d$(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(JS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(JS(r=d$(e.type,t)))n=lS(lS({},e),{exec:r});else if(r){var o=r.type||e.type;n=lS(lS(lS({},r),e),{type:o})}else n=e}return n}var h$=function(e,t){return e?(ZS(e)?e:[e]).map((function(e){return u$(e,t)})):[]};function p$(e){var t=u$(e);return lS(lS({id:XS(e)?e:t.id},t),{type:t.type})}function f$(e,t){var n="".concat(sS.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function m$(e,t){var n="".concat(sS.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function g$(e,t){var n="".concat(sS.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function b$(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=dS(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==yS?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?KS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case mS:var h=function(e,t,n,r){var o,i={_event:n},s=n$(JS(e.event)?e.event(t,n.data,i):e.event);if(XS(e.delay)){var a=r&&r[e.delay];o=JS(a)?a(t,n.data,i):a}else o=JS(e.delay)?e.delay(t,n.data,i):e.delay;return lS(lS({},e),{type:mS,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case gS:var p=function(e,t,n,r){var o,i={_event:n},s=n$(JS(e.event)?e.event(t,n.data,i):e.event);if(XS(e.delay)){var a=r&&r[e.delay];o=JS(a)?a(t,n.data,i):a}else o=JS(e.delay)?e.delay(t,n.data,i):e.delay;var l=JS(e.to)?e.to(t,n.data,i):e.to;return lS(lS({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!LS){var f=a.delay;GS(!XS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==aS.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case xS:var m=function(e,t,n){return lS(lS({},e),{value:XS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case MS:if(!(y=null===(u=a.conds.find((function(n){var o=YS(n.cond,e.options.guards);return!o||o$(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=uS(b$(e,t,l,r,[{type:o,actions:h$(FS(y),e.options.actions)}],i,s),2),b=g[0],v=g[1];return l=v,null==c||c.push(l),b;case ES:var y;if(!(y=a.get(l,r.data)))return[];var x=uS(b$(e,t,l,r,[{type:o,actions:h$(FS(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case fS:m=function(e,t,n){var r=JS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:sS.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case yS:l=KS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=u$(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=lS(lS({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,hS([c[$]],uS(t),!1))}});k=j}return k}}var h=HS(o.map((function(e){var t,n,o=[];try{for(var s=dS(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var v$=function(e,t){return t(e)};function y$(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[QS]=function(){return this},t}function x$(e,t,n){var r=y$(t);if(r.deferred=!0,e$(e)){var o=r.state=v$(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var w$=function(e){return"atomic"===e.type||"final"===e.type};function C$(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function k$(e){return C$(e).filter((function(e){return"history"!==e.type}))}function S$(e){var t=[e];return w$(e)?t:t.concat(HS(k$(e).map(S$)))}function $$(e,t){var n,r,o,i,s,a,l,c,d=M$(new Set(e)),u=new Set(t);try{for(var h=dS(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=M$(u);try{for(var g=dS(u),b=g.next();!b.done;b=g.next()){if("compound"!==(k=b.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var v=(s=void 0,dS(k$(k))),y=v.next();!y.done;y=v.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=dS(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function j$(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(w$(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=j$(e,t)})),o}function M$(e){var t,n,r=new Map;try{for(var o=dS(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function E$(e,t){return j$(e,M$($$([e],t)))}function T$(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function O$(e,t){return"compound"===t.type?k$(t).some((function(t){return"final"===t.type&&T$(e,t)})):"parallel"===t.type&&k$(t).every((function(t){return O$(e,t)}))}function L$(e){return new Set(HS(e.map((function(e){return e.tags}))))}function A$(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(XS(e)||XS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return A$(e[n],t[n])}))}var R$=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=TS,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||TS,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return hS([],uS(new Set(HS(hS([],uS(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:c$,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=c$;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),XS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,hS([],uS(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=cS(e,["configuration","transitions","tags","machine"]);return lS(lS({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return AS(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;LS&&GS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),N$={deferEvents:!1},D$=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=lS(lS({},N$),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),I$=new Map,P$=0,z$=function(){return"x:".concat(P$++)},V$=function(e,t){return I$.set(e,t),e},B$=function(e){return I$.get(e)},H$=function(e){I$.delete(e)};function _$(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(LS||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function F$(e){if(_$()){var t=function(){var e=_$();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function q$(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return lS(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[QS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=s$(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var W$,U$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(W$||(W$={}));var K$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=W$.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(ZS(e))return r.batch(e),r.state;var n=n$(t$(e,t));if(r.status===W$.Stopped)return LS||GS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==W$.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===aS.Parent||r.parent.id===t),s=i?r.parent:XS(t)?t===aS.Internal?r:r.children.get(t)||B$(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==W$.Stopped||r.parent!==s||r.state.done){var a=lS(lS({},e),{name:e.name===$S?"".concat(g$(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));LS||GS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||d$(e.type,o),s=JS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case mS:var a=e;r.defer(a);break;case gS:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===c$):r.send(l._event);break;case bS:r.cancel(e.sendId);break;case pS:if(r.status!==W$.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===sS.Invoke){var d=i$(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;LS||GS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(LS||GS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?qS(p,t,n):void 0;if("string"==typeof u)return;var g=JS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var b=void 0;e$(g)&&(g=m?g.withContext(m):g,b={autoForward:f}),r.spawn(g,h,b)}else r.spawnActivity(c);break;case fS:r.stopChild(e.activity.id);break;case xS:var v=e,y=v.label,x=v.value;y?r.logger(y,x):r.logger(x);break;default:LS||GS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=lS(lS({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new D$({deferEvents:this.options.deferEvents}),this.sessionId=z$()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:v$(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return LS||GS(this.status!==W$.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=dS(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==c$||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=dS(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=dS(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=dS(this.contextListeners),b=g.next();!b.done;b=g.next()){(0,b.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var v=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=v&&v.doneData?qS(v.doneData,e.context,t):void 0;this._doneEvent=m$(this.id,y);try{for(var x=dS(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),H$(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===W$.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=s$(e,t,n);this.listeners.add(o.next),this.status!==W$.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===W$.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===W$.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===W$.Running)return this;this.machine._init(),V$(this.sessionId,this),this.initialized=!0,this.status=W$.Running;var n=void 0===e?this.initialState:v$(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(R$.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,c$)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){JS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=dS(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=dS(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=dS(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var b=dS(this.doneListeners),v=b.next();!v.done;v=b.next()){h=v.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=W$.Stopped,this._initialState=void 0;try{for(var y=dS(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new D$({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=n$({type:"xstate.stop"}),r=v$(e,(function(){var t=HS(hS([],uS(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return h$(t.onExit,e.machine.options.actions)}))),r=uS(b$(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new R$({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!l$(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),H$(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===W$.NotStarted&&this.options.deferEvents)LS||GS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==W$.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=n$(e);t.forward(r),i=v$(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,hS([],uS(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return lS(lS({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=dS(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,n$(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=n$(e);if(0===r.name.indexOf(SS)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(SS)})))throw r.data.data;return v$(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=dS(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),JS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==W$.Running)return x$(e,t);if(WS(e))return this.spawnPromise(Promise.resolve(e),t);if(JS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&JS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(e$(e))return this.spawnMachine(e,lS(lS({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,lS(lS({},this.options),{parent:this,id:n.id||t.id})),i=lS(lS({},U$),n);i.sync&&o.onTransition((function(e){r.send(jS,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(n$(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=q$(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(n$(m$(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=g$(t,e);try{o.send(n$(n,{origin:t}))}catch(r){!function(e,t,n){if(!LS){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=s$(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[QS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(n$(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(g$(t,e))}if(WS(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=s$(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,JS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[QS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(n$(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(n$(g$(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(n$(m$(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[QS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else LS||GS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[QS]=function(){return this},n))},e.prototype.attachDev=function(){var e=_$();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(lS(lS({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:lS({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}F$(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[QS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===W$.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=G$,e}();function G$(e,t){return new K$(e,t)}function Z$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function J$(e){return lS(lS({type:CS},e),{toJSON:function(){e.onDone,e.onError;var t=cS(e,["onDone","onError"]);return lS(lS({},t),{type:CS,src:Z$(e.src)})}})}var X$="",Y$="*",Q$={},ej=function(e){return"#"===e[0]},tj=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||hS([this.machine.key],uS(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,LS||GS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?PS(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,lS(((r={})[o.id]=o,r),o.idMap)),o})):Q$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=dS(C$(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===X$})):X$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=FS(this.config.entry||this.config.onEntry).map((function(e){return u$(e)})),this.onExit=FS(this.config.exit||this.config.onExit).map((function(e){return u$(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=FS(this.config.invoke).map((function(e,t){var n,r;if(e$(e)){var o=a$(s.id,t);return s.machine.options.services=lS(((n={})[o]=e,n),s.machine.options.services),J$({src:o,id:o})}if(XS(e.src)){o=e.id||a$(s.id,t);return J$(lS(lS({},e),{id:o,src:e.src}))}if(e$(e.src)||JS(e.src)){o=e.id||a$(s.id,t);return s.machine.options.services=lS(((r={})[o]=e.src,r),s.machine.options.services),J$(lS(lS({id:o},e),{src:o}))}var i=e.src;return J$(lS(lS({id:a$(s.id,t)},e),{src:i}))})),this.activities=FS(this.config.activities).concat(this.invoke).map((function(e){return p$(e)})),this.transition=this.transition.bind(this),this.tags=FS(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||S$(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:lS(lS({},o),t.actions),activities:lS(lS({},i),t.activities),guards:lS(lS({},s),t.guards),services:lS(lS({},a),t.services),delays:lS(lS({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return JS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:PS(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===X$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Y$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(sS.After,"(").concat(e,")").concat(n)}(JS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:gS,event:JS(e)?e:t$(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:JS(e)?e.name:RS(e)}}(r,{delay:t})),e.onExit.push({type:bS,sendId:r}),r},r=ZS(t)?t.map((function(e,t){var r=n(e.delay,t);return lS(lS({},e),{event:r})})):HS(Object.keys(t).map((function(e,r){var o=t[e],i=XS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return FS(i).map((function(e){return lS(lS({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return lS(lS({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof R$?e.value:DS(e,this.delimiter);if(XS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,hS([],uS(HS(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=RS(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof R$?e:R$.create(e),n=Array.from($$([],this.getStateNodes(t.value)));return new R$(lS(lS({},t),{value:this.resolve(t.value),configuration:n,done:O$(n,this),tags:L$(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=dS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=HS(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=HS(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:HS(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:HS(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return XS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,n$(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=dS(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(XS(p)&&ej(p)?e.matches(DS(this.getStateNodeById(p).path,this.delimiter)):AS(DS(p,this.delimiter),VS(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||o$(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,hS([],uS(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=HS(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:HS(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:b,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?$$([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=dS(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!T$(h,v=m.value)||T$(n.exitSet,v)||v.parent&&p.has(v.parent))&&p.add(v)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=dS(h),b=g.next();!b.done;b=g.next()){var v;T$(e,v=b.value)&&!T$(n.exitSet,v.parent)||n.exitSet.push(v)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=HS(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(f$(e.id,e.doneData),f$(i.id,e.doneData?qS(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&k$(s).every((function(e){return O$(n.configuration,e)}))&&t.push(f$(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=p$(e);return{type:sS.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:h$(s?hS(hS([],uS(t),!1),uS(n),!1):hS(hS([],uS(n),!1),uS(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:mS,event:"function"==typeof e?e:t$(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:h$(hS(hS([],uS(e.onExit),!1),uS(e.activities.map((function(e){return function(e){var t=JS(e)?e:p$(e);return{type:sS.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:h$(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=h$(HS(hS([],uS(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!l$(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=n$(t);if(e instanceof R$)o=void 0===n?e:this.resolveState(R$.from(e,n));else{var a=XS(e)?this.resolve(IS(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(R$.from(a,l))}if(!LS&&s.name===Y$)throw new Error("An event cannot have the wildcard type ('".concat(Y$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=$$([],this.getStateNodes(o.value)),u=c.configuration.length?$$(d,c.configuration):d;return c.configuration=hS([],uS(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,hS([],uS(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=c$);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=O$(h,this),f=u?E$(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),b=t?lS({},t.activities):{};try{for(var v=dS(g),y=v.next();!y.done;y=v.next()){var x=y.value;try{for(var w=(a=void 0,dS(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===pS?b[k.activity.id||k.activity.type]=k:k.type===fS&&(b[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}var S,$,j=uS(b$(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=uS(function(e,t){var n,r,o=uS([[],[]],2),i=o[0],s=o[1];try{for(var a=dS(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,l$),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===pS&&(null===(t=e.activity)||void 0===t?void 0:t.type)===CS})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=i$(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?qS(e.data,n,r):void 0,l=s?x$(s,e.id,a):y$(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?lS({},t.children):{}),N=new R$({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:US(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?b:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:L$(h),machine:this}),D=n!==E;N.changed=o.name===jS||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==X$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:vS},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!A$(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(ej(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=ej(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&ej(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=NS(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Q$;switch(this.type){case"parallel":return PS(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Q$}));case"compound":if(XS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?PS(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Q$})):this.initialStateValue||{};default:return e||Q$}},e.prototype.getResolvedPath=function(e){if(ej(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return NS(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=zS(this.states,(function(e){return e.initialStateValue||Q$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=w$(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=XS(t.target)&&ej(t.target)?IS(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return w$(this)?[this]:"compound"!==this.type||this.initial?HS(BS(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(LS||GS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=uS(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:zS(this.states,(function(t,n){if(!e)return t.historyValue();var r=XS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?HS(BS(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=dS(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return XS(s)?[n.getStateNode(s)]:HS(BS(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=HS(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=dS(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,dS(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!XS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return FS(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return XS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=lS(lS({},e),{actions:h$(FS(e.actions)),cond:YS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return lS(lS({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=Y$,s=o[i],a=void 0===s?[]:s,l=cS(o,["*"]);n=HS(Object.keys(l).map((function(e){LS||e!==X$||GS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=r$(e,l[e]);return LS||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(XS(e.target)||e$(e.target))})),o=t===X$?"the transient event":"event '".concat(t,"'");GS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(r$(Y$,a)))}else n=[];var c=this.config.always?r$("",this.config.always):[],d=this.config.onDone?r$(String(f$(this.id)),this.config.onDone):[];LS||GS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=HS(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,hS([],uS(r$(String(m$(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,hS([],uS(r$(String(g$(e.id)),e.onError)),!1)),t}))),h=this.after,p=HS(hS(hS(hS(hS([],uS(d),!1),uS(u),!1),uS(n),!1),uS(c),!1).map((function(e){return FS(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=dS(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var nj,rj=function(e){return{type:yS,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(nj||(nj={}));var oj="undefined"!=typeof document?n.useLayoutEffect:function(){};function ij(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var sj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},aj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var lj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},cj=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function dj(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function uj(e){var t=n.useRef([]),r=n.useRef([]);oj((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=lj(function(e,t){var n,r,o=sj([[],[]],2),i=o[0],s=o[1];try{for(var a=aj(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===nj.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,cj([],lj(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,cj([],lj(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),oj((function(){for(;r.current.length;){var e=lj(r.current.shift(),2);dj(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=lj(t.current.shift(),2);dj(e[0],e[1])}}))}var hj=function(){return hj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hj.apply(this,arguments)},pj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},fj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var mj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function gj(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=ij((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=fj(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=pj(t,["context","guards","actions","activities","services","delays","state"]),f=ij((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return G$(o.withConfig(e,(function(){return hj(hj({},o.context),s)})),hj({deferEvents:!0},p))}));return oj((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),oj((function(){return f.start(h?R$.create(h):void 0),function(){f.stop()}}),[]),oj((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),uj(f),f}(e,t,r),i=mj(n.useState((function(){var e=o.machine.initialState;return t.state?R$.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function bj(){return bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bj.apply(null,arguments)}function vj(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const yj={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(yj.str(e)||yj.num(e))return e===t;if(yj.obj(e)&&yj.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!yj.und(n)||e===t}};function xj(e,t){return yj.und(e)||yj.nul(e)?t:e}function wj(e){return yj.und(e)?[]:yj.arr(e)?e:[e]}function Cj(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return yj.fun(e)?e(...n):e}function kj(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,vj(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(yj.und(t))return bj({to:t},e);const n=Object.keys(e).reduce(((n,r)=>yj.und(t[r])?bj({},n,{[r]:e[r]}):n),{});return bj({to:t},n)}class Sj{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class $j extends Sj{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof Sj&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof Sj&&e.removeChild(this)))}}class jj extends Sj{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof Sj&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof Sj&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof Sj)&&(t[n]=r instanceof Sj?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Mj,Ej;let Tj,Oj=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Lj,Aj=()=>Date.now();class Rj extends jj{constructor(e,t){super(),this.update=void 0,this.payload=e.style?bj({},e,{style:Lj(e.style)}):e,this.update=t,this.attach()}}let Nj=!1;const Dj=new Set,Ij=()=>{if(!Nj)return!1;let e=Aj();for(let t of Dj){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof Sj,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Dj.delete(t),t.stop(!0))}return Dj.size?Oj(Ij):Nj=!1,Nj};function Pj(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Pj({range:e,output:t,extrapolate:n});if(Tj&&"string"==typeof e.output[0])return Tj(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class zj extends $j{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof $j&&!(e instanceof zj)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Pj(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Pj(e,t,n)}interpolate(e,t,n){return new zj(this,e,t,n)}}const Vj=(e,t,n)=>e&&new zj(e,t,n);function Bj(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Bj(e,t)))}class Hj extends Sj{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Bj(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new zj(this,e,t,n)}}class _j extends $j{constructor(e){super(),this.payload=e.map((e=>new Hj(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new zj(this,e,t)}}let Fj=0,qj=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Fj++}update(e){if(!e)return this;const t=kj(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=vj(t,["delay","to"]);if(yj.arr(o)||yj.fun(o))this.queue.push(bj({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=bj({to:{[n]:o},delay:Cj(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=bj({},e[s.delay],s,{to:bj({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;yj.obj(n)&&(this.merged=bj({},n,this.merged)),yj.obj(o)&&(this.merged=bj({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=vj(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=yj.arr(s.to)||yj.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else yj.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Dj.has(t)||Dj.add(t),Nj||(Nj=!0,Oj(Ij));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Dj.has(t)&&Dj.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=vj(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(yj.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=bj({},r,kj(r.to[t]));yj.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(yj.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=bj({},r,kj(n));if(yj.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=bj({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=bj({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=yj.num(o),l=yj.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Ej[o],c=yj.arr(o),h=!s&&!c&&!l;let f=yj.und(r[n])?o:r[n],m=s||c||l?o:1,g=Cj(a,n);p&&(m=p.animations[n].parent);let b,v=i.parent,y=i.interpolation,x=wj(p?m.getPayload():m),w=o;h&&(w=Tj({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!yj.und(v)&&i.animatedValues.some((e=>!e.done)),S=!yj.equ(w,C),$=!yj.equ(w,i.previous),j=!yj.equ(g,i.config);if(d||$&&S||j){if(s||l)v=y=i.parent||new Hj(f);else if(c)v=y=i.parent||new _j(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(v=i.parent,v.setValue(0,!1)):v=new Hj(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=v.interpolate(t)}return x=wj(p?m.getPayload():m),b=wj(v.getPayload()),d&&!h&&v.setValue(f,!1),this.hasChanged=!0,b.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=Aj(),e.done=!1,e.animatedStyles.clear()})),Cj(u,n)&&v.setValue(h?m:o,!1),bj({},e,{[n]:bj({},i,{name:n,parent:v,interpolation:y,animatedValues:b,toValues:x,previous:w,config:g,fromValues:wj(v.getValue()),immediate:Cj(u,n),initialVelocity:xj(g.velocity,0),clamp:xj(g.clamp,!1),precision:xj(g.precision,.01),tension:xj(g.tension,170),friction:xj(g.friction,26),mass:xj(g.mass,1),duration:g.duration,easing:xj(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(v.setValue(1,!1),y.updateConfig({output:[w,w]})),v.done=!0,this.hasChanged=!0,bj({},e,{[n]:bj({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Wj=e=>{const t=yj.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=yj.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new qj,s=i?Cj(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?Cj(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Uj extends jj{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof Sj||(e=Mj.transform(e)),this.payload=e}}const Kj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Gj="[-+]?\\d*\\.?\\d+",Zj=Gj+"%";function Jj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Xj=new RegExp("rgb"+Jj(Gj,Gj,Gj)),Yj=new RegExp("rgba"+Jj(Gj,Gj,Gj,Gj)),Qj=new RegExp("hsl"+Jj(Gj,Zj,Zj)),eM=new RegExp("hsla"+Jj(Gj,Zj,Zj,Gj)),tM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,rM=/^#([0-9a-fA-F]{6})$/,oM=/^#([0-9a-fA-F]{8})$/;function iM(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sM(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=iM(o,r,e+1/3),s=iM(o,r,e),a=iM(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function aM(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function lM(e){return(parseFloat(e)%360+360)%360/360}function cM(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function dM(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function uM(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=rM.exec(e))?parseInt(t[1]+"ff",16)>>>0:Kj.hasOwnProperty(e)?Kj[e]:(t=Xj.exec(e))?(aM(t[1])<<24|aM(t[2])<<16|aM(t[3])<<8|255)>>>0:(t=Yj.exec(e))?(aM(t[1])<<24|aM(t[2])<<16|aM(t[3])<<8|cM(t[4]))>>>0:(t=tM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=oM.exec(e))?parseInt(t[1],16)>>>0:(t=nM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qj.exec(e))?(255|sM(lM(t[1]),dM(t[2]),dM(t[3])))>>>0:(t=eM.exec(e))?(sM(lM(t[1]),dM(t[2]),dM(t[3]))|cM(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const hM=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,pM=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,fM=new RegExp(`(${Object.keys(Kj).join("|")})`,"g");let mM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const gM=["Webkit","Ms","Moz","O"];function bM(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||mM.hasOwnProperty(e)&&mM[e]?(""+t).trim():t+"px"}mM=Object.keys(mM).reduce(((e,t)=>(gM.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),mM);const vM={};var yM,xM;yM=e=>new Uj(e),Lj=yM,xM=e=>{const t=e.output.map((e=>e.replace(pM,uM))).map((e=>e.replace(fM,uM))),n=t[0].match(hM).map((()=>[]));t.forEach((e=>{e.match(hM).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(hM).map(((t,r)=>Pj(bj({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(hM,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Tj=xM,Ej=Kj,function(e,t){Mj={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=vj(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=bM(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:vM[t]||(vM[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var wM;const CM=(wM=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new Rj(e,(()=>{let e=!1;a.current&&(e=Mj.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=vj(c,["scrollTop","scrollLeft"]),u=(h=e,!yj.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(yj.fun(t)?t(e):yj.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,bj({},d,{ref:u}))})),e=>(yj.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=wM(n),e}),wM))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function kM(e,t){return e.map((function(e,n){return e+t[n]}))}function SM(e,t){return e.map((function(e,n){return e-t[n]}))}function $M(e){return Math.hypot.apply(Math,e)}function jM(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function MM(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function EM(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-MM(t-e,n-t,r)+t:e>n?+MM(e-n,n-t,r)+n:e}function TM(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function OM(){return OM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OM.apply(this,arguments)}function LM(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function AM(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function NM(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return RM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RM(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function DM(){}function IM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?DM:1===t.length?t[0]:function(){for(var e,n,r=NM(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function PM(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function zM(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function VM(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=VM(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var BM=OM({},{threshold:function(e){return void 0===e&&(e=0),PM(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return PM(.15);case!1:return PM(0);default:return PM(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:PM(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return BM.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),HM="undefined"!=typeof window&&window.document&&window.document.createElement,_M={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=HM?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},FM=OM({},BM,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=PM(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),PM(e)},swipeDistance:function(e){return void 0===e&&(e=60),PM(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function qM(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),VM(e,_M)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),VM(e,FM)}(i),s}function WM(e){return OM({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:DM,canceled:!1,memo:void 0,args:void 0},e)}function UM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:WM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:WM({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:WM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:WM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:WM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var KM=new Map,GM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=OM({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?ZM(p[0],i[0]):d[0],m=!1===d[1]?ZM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return OM({},g,{_movement:p,delta:[0,0]});var b,v,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(v=zM(n,this.state),b=zM(r,this.state),l[0]=v[0],a[0]=b[0]),!1!==w[1]&&!1===d[1])&&(v=null!=(y=v)?y:zM(n,this.state),b=null!=(x=b)?x:zM(r,this.state),l[1]=v[1],a[1]=b[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=kM(k,u),$=c?o:[0,0];return k=JM(a,kM(k,l),$),OM({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:JM(a,S,$),delta:SM(k,h)})},t.clean=function(){this.clearTimeout()},TM(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function ZM(e,t){return Math.abs(e)>=t&&jM(e)*t}function JM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[EM(r,l,c,i),EM(o,u,h,s)]}function XM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function YM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,OM({},t,{event:n})].concat(o))}}var QM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=NM(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];nE(e,c[0],YM(c[1],OM({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=tE(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;oE(o,eE(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,IM.apply(void 0,d)])}rE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=IM.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=tE(t.config),n=t.config.eventOptions;e&&oE(e,eE(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){oE(n,o[i],r)}e.windowListeners={}}(t)},this.state=UM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function eE(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function tE(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function nE(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function rE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=NM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function oE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=NM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function iE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(KM.get("drag"));e.wheel&&t.add(KM.get("wheel"));e.scroll&&t.add(KM.get("scroll"));e.move&&t.add(KM.get("move"));e.pinch&&t.add(KM.get("pinch"));e.hover&&t.add(KM.get("hover"));return t}(e),i=n.useMemo((function(){return new QM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?sE:i.bind}function sE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var aE=function(e){function t(){return e.apply(this,arguments)||this}LM(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return SM(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=$M(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:$M(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(GM);function lE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function cE(e){var t="buttons"in e?e.buttons:0,n=lE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function dE(e){var t=lE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var uE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(oE(r.window,o[t],r.eventOptions),rE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(AM(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=cE(e);if(n.down){t.updateSharedState(n);var r=dE(e),o=t.getKinematics(r,e),i=XM(AM(t),e),s=t.state._isTap,a=$M(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(OM({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],b=m[1],v=OM({},XM(AM(t),e),t.getMovement(t.state.values)),y=[0,0];v.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=jM(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>b&&(y[1]=jM(i))),t.updateGestureState(OM({},v,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(AM(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(oE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}LM(t,e);var n=t.prototype;return n.startDrag=function(e){var t=dE(e);this.updateSharedState(cE(e)),this.updateGestureState(OM({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return OM({},UM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),XM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(nE(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&nE(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(aE);function hE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!hE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!hE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||hE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function pE(e,t){try{return hE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function fE(e,t){void 0===t&&(t={}),KM.set("drag",uE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(qM,pE)),iE({drag:e},r.current(t))}
|
|
3081
3094
|
/*!
|
|
3082
3095
|
* tabbable 5.3.3
|
|
3083
3096
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
3084
|
-
*/var
|
|
3097
|
+
*/var mE=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],gE=mE.join(","),bE="undefined"==typeof Element,vE=bE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,yE=!bE&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},xE=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(gE));return t&&vE.call(e,gE)&&r.unshift(e),r=r.filter(n)},wE=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{vE.call(s,gE)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},CE=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},kE=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},SE=function(e){return"INPUT"===e.tagName},$E=function(e){return function(e){return SE(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||yE(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},jE=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ME=function(e,t){return!(t.disabled||function(e){return SE(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=vE.call(e,"details>summary:first-of-type")?e.parentElement:e;if(vE.call(o,"details:not([open]) *"))return!0;var i=yE(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return jE(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=yE(e);if(l&&!l.shadowRoot&&!0===r(l))return jE(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!vE.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},EE=function(e,t){return!($E(t)||CE(t)<0||!ME(e,t))},TE=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},OE=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=CE(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(kE).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},LE=function(e,t){var n;return n=(t=t||{}).getShadowRoot?wE([e],t.includeContainer,{filter:EE.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:TE}):xE(e,t.includeContainer,EE.bind(null,t)),OE(n)},AE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==vE.call(e,gE)&&EE(t,e)},RE=mE.concat("iframe").join(","),NE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==vE.call(e,RE)&&ME(t,e)};
|
|
3085
3098
|
/*!
|
|
3086
3099
|
* focus-trap 6.9.4
|
|
3087
3100
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
3088
3101
|
*/
|
|
3089
|
-
function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NE(Object(n),!0).forEach((function(t){IE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function IE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var PE,zE=(PE=[],{activateTrap:function(e){if(PE.length>0){var t=PE[PE.length-1];t!==e&&t.pause()}var n=PE.indexOf(e);-1===n||PE.splice(n,1),PE.push(e)},deactivateTrap:function(e){var t=PE.indexOf(e);-1!==t&&PE.splice(t,1),PE.length>0&&PE[PE.length-1].unpause()}}),VE=function(e){return setTimeout(e,0)},BE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},HE=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},_E=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},FE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=DE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=OE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?xE([t],n.includeContainer,{filter:jE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):yE(t,n.includeContainer,jE.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return LE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return LE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=_E(e);a(t)>=0||(HE(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!RE(t,o.tabbableOptions)}):HE(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=_E(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==HE(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=_E(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=BE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||RE(t,o.tabbableOptions)&&!LE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=BE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||RE(t,o.tabbableOptions)&&!LE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=_E(e);a(t)>=0||HE(o.clickOutsideDeactivates,e)||HE(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},b=function(){if(i.active)return zE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?VE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},v=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),b(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=DE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,v(),i.active=!1,i.paused=!1,zE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){VE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,v()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),b(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var qE=!1;if("undefined"!=typeof window){var WE={get passive(){qE=!0}};window.addEventListener("testPassive",null,WE),window.removeEventListener("testPassive",null,WE)}var UE,KE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),GE=[],ZE=!1,JE=-1,XE=void 0,YE=void 0,QE=function(e){return GE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},eT=function(e){var t=e||window.event;return!!QE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},tT=function(e,t){if(e){if(!GE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};GE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(GE),[n]),KE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(JE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-JE;!QE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?eT(e):e.stopPropagation())}(t,e)},ZE||(document.addEventListener("touchmove",eT,qE?{passive:!1}:void 0),ZE=!0)):function(e){if(void 0===YE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(YE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===XE&&(XE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},nT=function(e){e?(GE=GE.filter((function(t){return t.targetElement!==e})),KE?(e.ontouchstart=null,e.ontouchmove=null,ZE&&0===GE.length&&(document.removeEventListener("touchmove",eT,qE?{passive:!1}:void 0),ZE=!1)):GE.length||(void 0!==YE&&(document.body.style.paddingRight=YE,YE=void 0),void 0!==XE&&(document.body.style.overflow=XE,XE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},rT=[],oT="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(UE||(UE={}));var iT,sT=function(e){return Object.freeze(e)},aT=function(e,t){this.inlineSize=e,this.blockSize=t,sT(this)},lT=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,sT(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),cT=function(e){return e instanceof SVGElement&&"getBBox"in e},dT=function(e){if(cT(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},uT=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},hT="undefined"!=typeof window?window:{},pT=new WeakMap,fT=/auto|scroll/,mT=/^tb|vertical/,gT=/msie|trident/i.test(hT.navigator&&hT.navigator.userAgent),bT=function(e){return parseFloat(e||"0")},vT=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new aT((n?t:e)||0,(n?e:t)||0)},yT=sT({devicePixelContentBoxSize:vT(),borderBoxSize:vT(),contentBoxSize:vT(),contentRect:new lT(0,0,0,0)}),xT=function(e,t){if(void 0===t&&(t=!1),pT.has(e)&&!t)return pT.get(e);if(dT(e))return pT.set(e,yT),yT;var n=getComputedStyle(e),r=cT(e)&&e.ownerSVGElement&&e.getBBox(),o=!gT&&"border-box"===n.boxSizing,i=mT.test(n.writingMode||""),s=!r&&fT.test(n.overflowY||""),a=!r&&fT.test(n.overflowX||""),l=r?0:bT(n.paddingTop),c=r?0:bT(n.paddingRight),d=r?0:bT(n.paddingBottom),u=r?0:bT(n.paddingLeft),h=r?0:bT(n.borderTopWidth),p=r?0:bT(n.borderRightWidth),f=r?0:bT(n.borderBottomWidth),m=u+c,g=l+d,b=(r?0:bT(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,x=s?e.offsetWidth-b-e.clientWidth:0,w=o?m+b:0,C=o?g+v:0,k=r?r.width:bT(n.width)-w-x,S=r?r.height:bT(n.height)-C-y,$=k+m+x+b,j=S+g+y+v,M=sT({devicePixelContentBoxSize:vT(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:vT($,j,i),contentBoxSize:vT(k,S,i),contentRect:new lT(u,l,k,S)});return pT.set(e,M),M},wT=function(e,t,n){var r=xT(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case UE.DEVICE_PIXEL_CONTENT_BOX:return s;case UE.BORDER_BOX:return o;default:return i}},CT=function(e){var t=xT(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=sT([t.borderBoxSize]),this.contentBoxSize=sT([t.contentBoxSize]),this.devicePixelContentBoxSize=sT([t.devicePixelContentBoxSize])},kT=function(e){if(dT(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ST=function(){var e=1/0,t=[];rT.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new CT(t.target),o=kT(t.target);r.push(n),t.lastReportedSize=wT(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},$T=function(e){rT.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(kT(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},jT=function(){var e=0;for($T(e);rT.some((function(e){return e.activeTargets.length>0}));)e=ST(),$T(e);return rT.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:oT}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=oT),window.dispatchEvent(e)}(),e>0},MT=[],ET=function(e){if(!iT){var t=0,n=document.createTextNode("");new MutationObserver((function(){return MT.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),iT=function(){n.textContent="".concat(t?t--:t++)}}MT.push(e),iT()},TT=0,OT={attributes:!0,characterData:!0,childList:!0,subtree:!0},LT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],AT=function(e){return void 0===e&&(e=0),Date.now()+e},RT=!1,NT=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!RT){RT=!0;var n,r=AT(e);n=function(){var n=!1;try{n=jT()}finally{if(RT=!1,e=r-AT(),!TT)return;n?t.run(1e3):e>0?t.run(e):t.start()}},ET((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,OT)};document.body?t():hT.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),LT.forEach((function(t){return hT.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),LT.forEach((function(t){return hT.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),DT=function(e){!TT&&e>0&&NT.start(),!(TT+=e)&&NT.stop()},IT=function(){function e(e,t){this.target=e,this.observedBox=t||UE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=wT(this.target,this.observedBox,!0);return function(e){return!cT(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),PT=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},zT=new WeakMap,VT=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},BT=function(){function e(){}return e.connect=function(e,t){var n=new PT(e,t);zT.set(e,n)},e.observe=function(e,t,n){var r=zT.get(e),o=0===r.observationTargets.length;VT(r.observationTargets,t)<0&&(o&&rT.push(r),r.observationTargets.push(new IT(t,n&&n.box)),DT(1),NT.schedule())},e.unobserve=function(e,t){var n=zT.get(e),r=VT(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&rT.splice(rT.indexOf(n),1),n.observationTargets.splice(r,1),DT(-1))},e.disconnect=function(e){var t=this,n=zT.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),HT=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");BT.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!uT(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");BT.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!uT(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");BT.unobserve(this,e)},e.prototype.disconnect=function(){BT.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function _T(){return _T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_T.apply(this,arguments)}function FT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var qT="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function WT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function UT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var KT={box:"border-box"};function GT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return qT((function(){if(e.current&&o){var t=new HT(c);return t.observe(e.current,KT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function ZT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var JT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},XT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},YT=function(e,t,n){return void 0===n&&(n=e.context),new ej(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:_T({},JT,XT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:_T({},JT,XT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:_T({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[nj({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),QT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],eO=["velocity"],tO=["onRest","config"],nO={tension:170,friction:26},rO=nO.tension,oO=nO.friction,iO=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?aO:f,g=e.snapPoints,b=void 0===g?lO:g,v=e.blocking,y=void 0===v||v,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=FT(e,QT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return _T({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return _T({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=qj((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,tT(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,nT(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=FE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return UT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),qT((function(){if(e)return a(UT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=GT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=GT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=GT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(UT).reduce((function(e,n){return e.add(WT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=UT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:b,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);qT((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=FT(n,eO),s=FT(e,tO);return new Promise((function(e){return _(_T({},s,{config:_T({velocity:o},i,{mass:1,tension:rO,friction:Math.max(oO,oO+(oO-oO*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=mj(YT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),qT((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=pE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,b=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var v=f+b,y=b*g,x=Math.max(le.current,Math.min(ce.current,v+2*y));if(!c&&h&&l>0&&v+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?MM(v,h?0:le.current,ce.current,.55):v<le.current?MM(v,le.current,2*ce.current,.55):MM(v,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var be=function(e){var t,n=e.spring,r=zj([n.y,n.maxHeight],(function(e,t){return Math.round(WT(t-e,0,16))+"px"})),o=zj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return WT(e,t,n)+"px"})),i=zj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=zj([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=zj([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return WT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=zj([n.y,n.minSnap],(function(e,t){return t?WT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(wM.div,_T({},O,{"data-rsbs-root":!0,"data-rsbs-state":sO.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:_T({},be,C,{opacity:H.ready})}),o,y&&n.createElement("div",_T({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",_T({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",_T({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",_T({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),sO=["closed","opening","open","closing","dragging","snapping","resizing"];function aO(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function lO(e){return e.minHeight}var cO=["onSpringStart","onSpringEnd","skipInitialTransition"],dO=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=FT(e,cO),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");qT((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(oS,{"data-rsbs-portal":!0},n.createElement(iO,_T({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const uO=i.css`
|
|
3102
|
+
function DE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DE(Object(n),!0).forEach((function(t){PE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zE,VE=(zE=[],{activateTrap:function(e){if(zE.length>0){var t=zE[zE.length-1];t!==e&&t.pause()}var n=zE.indexOf(e);-1===n||zE.splice(n,1),zE.push(e)},deactivateTrap:function(e){var t=zE.indexOf(e);-1!==t&&zE.splice(t,1),zE.length>0&&zE[zE.length-1].unpause()}}),BE=function(e){return setTimeout(e,0)},HE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},_E=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},FE=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},qE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=IE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=LE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?wE([t],n.includeContainer,{filter:ME.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):xE(t,n.includeContainer,ME.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return AE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return AE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=FE(e);a(t)>=0||(_E(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!NE(t,o.tabbableOptions)}):_E(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=FE(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==_E(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=FE(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=HE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||NE(t,o.tabbableOptions)&&!AE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=HE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||NE(t,o.tabbableOptions)&&!AE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=FE(e);a(t)>=0||_E(o.clickOutsideDeactivates,e)||_E(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},b=function(){if(i.active)return VE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?BE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},v=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),b(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=IE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,v(),i.active=!1,i.paused=!1,VE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){BE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,v()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),b(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var WE=!1;if("undefined"!=typeof window){var UE={get passive(){WE=!0}};window.addEventListener("testPassive",null,UE),window.removeEventListener("testPassive",null,UE)}var KE,GE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),ZE=[],JE=!1,XE=-1,YE=void 0,QE=void 0,eT=function(e){return ZE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},tT=function(e){var t=e||window.event;return!!eT(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},nT=function(e,t){if(e){if(!ZE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};ZE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(ZE),[n]),GE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(XE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-XE;!eT(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?tT(e):e.stopPropagation())}(t,e)},JE||(document.addEventListener("touchmove",tT,WE?{passive:!1}:void 0),JE=!0)):function(e){if(void 0===QE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(QE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===YE&&(YE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},rT=function(e){e?(ZE=ZE.filter((function(t){return t.targetElement!==e})),GE?(e.ontouchstart=null,e.ontouchmove=null,JE&&0===ZE.length&&(document.removeEventListener("touchmove",tT,WE?{passive:!1}:void 0),JE=!1)):ZE.length||(void 0!==QE&&(document.body.style.paddingRight=QE,QE=void 0),void 0!==YE&&(document.body.style.overflow=YE,YE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},oT=[],iT="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(KE||(KE={}));var sT,aT=function(e){return Object.freeze(e)},lT=function(e,t){this.inlineSize=e,this.blockSize=t,aT(this)},cT=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,aT(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),dT=function(e){return e instanceof SVGElement&&"getBBox"in e},uT=function(e){if(dT(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},hT=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},pT="undefined"!=typeof window?window:{},fT=new WeakMap,mT=/auto|scroll/,gT=/^tb|vertical/,bT=/msie|trident/i.test(pT.navigator&&pT.navigator.userAgent),vT=function(e){return parseFloat(e||"0")},yT=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new lT((n?t:e)||0,(n?e:t)||0)},xT=aT({devicePixelContentBoxSize:yT(),borderBoxSize:yT(),contentBoxSize:yT(),contentRect:new cT(0,0,0,0)}),wT=function(e,t){if(void 0===t&&(t=!1),fT.has(e)&&!t)return fT.get(e);if(uT(e))return fT.set(e,xT),xT;var n=getComputedStyle(e),r=dT(e)&&e.ownerSVGElement&&e.getBBox(),o=!bT&&"border-box"===n.boxSizing,i=gT.test(n.writingMode||""),s=!r&&mT.test(n.overflowY||""),a=!r&&mT.test(n.overflowX||""),l=r?0:vT(n.paddingTop),c=r?0:vT(n.paddingRight),d=r?0:vT(n.paddingBottom),u=r?0:vT(n.paddingLeft),h=r?0:vT(n.borderTopWidth),p=r?0:vT(n.borderRightWidth),f=r?0:vT(n.borderBottomWidth),m=u+c,g=l+d,b=(r?0:vT(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,x=s?e.offsetWidth-b-e.clientWidth:0,w=o?m+b:0,C=o?g+v:0,k=r?r.width:vT(n.width)-w-x,S=r?r.height:vT(n.height)-C-y,$=k+m+x+b,j=S+g+y+v,M=aT({devicePixelContentBoxSize:yT(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:yT($,j,i),contentBoxSize:yT(k,S,i),contentRect:new cT(u,l,k,S)});return fT.set(e,M),M},CT=function(e,t,n){var r=wT(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case KE.DEVICE_PIXEL_CONTENT_BOX:return s;case KE.BORDER_BOX:return o;default:return i}},kT=function(e){var t=wT(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=aT([t.borderBoxSize]),this.contentBoxSize=aT([t.contentBoxSize]),this.devicePixelContentBoxSize=aT([t.devicePixelContentBoxSize])},ST=function(e){if(uT(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},$T=function(){var e=1/0,t=[];oT.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new kT(t.target),o=ST(t.target);r.push(n),t.lastReportedSize=CT(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},jT=function(e){oT.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(ST(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},MT=function(){var e=0;for(jT(e);oT.some((function(e){return e.activeTargets.length>0}));)e=$T(),jT(e);return oT.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:iT}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=iT),window.dispatchEvent(e)}(),e>0},ET=[],TT=function(e){if(!sT){var t=0,n=document.createTextNode("");new MutationObserver((function(){return ET.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),sT=function(){n.textContent="".concat(t?t--:t++)}}ET.push(e),sT()},OT=0,LT={attributes:!0,characterData:!0,childList:!0,subtree:!0},AT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],RT=function(e){return void 0===e&&(e=0),Date.now()+e},NT=!1,DT=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!NT){NT=!0;var n,r=RT(e);n=function(){var n=!1;try{n=MT()}finally{if(NT=!1,e=r-RT(),!OT)return;n?t.run(1e3):e>0?t.run(e):t.start()}},TT((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,LT)};document.body?t():pT.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),AT.forEach((function(t){return pT.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),AT.forEach((function(t){return pT.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),IT=function(e){!OT&&e>0&&DT.start(),!(OT+=e)&&DT.stop()},PT=function(){function e(e,t){this.target=e,this.observedBox=t||KE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=CT(this.target,this.observedBox,!0);return function(e){return!dT(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),zT=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},VT=new WeakMap,BT=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},HT=function(){function e(){}return e.connect=function(e,t){var n=new zT(e,t);VT.set(e,n)},e.observe=function(e,t,n){var r=VT.get(e),o=0===r.observationTargets.length;BT(r.observationTargets,t)<0&&(o&&oT.push(r),r.observationTargets.push(new PT(t,n&&n.box)),IT(1),DT.schedule())},e.unobserve=function(e,t){var n=VT.get(e),r=BT(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&oT.splice(oT.indexOf(n),1),n.observationTargets.splice(r,1),IT(-1))},e.disconnect=function(e){var t=this,n=VT.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),_T=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");HT.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hT(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");HT.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hT(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");HT.unobserve(this,e)},e.prototype.disconnect=function(){HT.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function FT(){return FT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FT.apply(this,arguments)}function qT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var WT="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function UT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function KT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var GT={box:"border-box"};function ZT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return WT((function(){if(e.current&&o){var t=new _T(c);return t.observe(e.current,GT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function JT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var XT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},YT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},QT=function(e,t,n){return void 0===n&&(n=e.context),new tj(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:FT({},XT,YT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:FT({},XT,YT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:FT({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[rj({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(JT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),eO=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],tO=["velocity"],nO=["onRest","config"],rO={tension:170,friction:26},oO=rO.tension,iO=rO.friction,sO=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?lO:f,g=e.snapPoints,b=void 0===g?cO:g,v=e.blocking,y=void 0===v||v,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=qT(e,eO),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return FT({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return FT({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=Wj((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,nT(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,rT(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=qE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return KT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),WT((function(){if(e)return a(KT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=ZT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=ZT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=ZT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(KT).reduce((function(e,n){return e.add(UT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=KT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:b,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);WT((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=qT(n,tO),s=qT(e,nO);return new Promise((function(e){return _(FT({},s,{config:FT({velocity:o},i,{mass:1,tension:oO,friction:Math.max(iO,iO+(iO-iO*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=gj(QT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),WT((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=fE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,b=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var v=f+b,y=b*g,x=Math.max(le.current,Math.min(ce.current,v+2*y));if(!c&&h&&l>0&&v+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?EM(v,h?0:le.current,ce.current,.55):v<le.current?EM(v,le.current,2*ce.current,.55):EM(v,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var be=function(e){var t,n=e.spring,r=Vj([n.y,n.maxHeight],(function(e,t){return Math.round(UT(t-e,0,16))+"px"})),o=Vj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return UT(e,t,n)+"px"})),i=Vj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=Vj([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=Vj([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return UT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=Vj([n.y,n.minSnap],(function(e,t){return t?UT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(CM.div,FT({},O,{"data-rsbs-root":!0,"data-rsbs-state":aO.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:FT({},be,C,{opacity:H.ready})}),o,y&&n.createElement("div",FT({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",FT({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",FT({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",FT({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),aO=["closed","opening","open","closing","dragging","snapping","resizing"];function lO(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function cO(e){return e.minHeight}var dO=["onSpringStart","onSpringEnd","skipInitialTransition"],uO=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=qT(e,dO),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");WT((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(iS,{"data-rsbs-portal":!0},n.createElement(sO,FT({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const hO=i.css`
|
|
3090
3103
|
width: ${k(1e3)};
|
|
3091
3104
|
border-radius: ${$(300)};
|
|
3092
3105
|
background: transparent;
|
|
@@ -3100,7 +3113,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3100
3113
|
margin: 0;
|
|
3101
3114
|
background: ${w("neutral",300)};
|
|
3102
3115
|
}
|
|
3103
|
-
`,
|
|
3116
|
+
`,pO=(e,t)=>i.css`
|
|
3104
3117
|
[data-rsbs-overlay] {
|
|
3105
3118
|
border-top-left-radius: ${$(500)};
|
|
3106
3119
|
border-top-right-radius: ${$(500)};
|
|
@@ -3126,11 +3139,11 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3126
3139
|
padding: 0;
|
|
3127
3140
|
min-height: ${k(1600)};
|
|
3128
3141
|
}
|
|
3129
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const
|
|
3142
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const fO=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},mO=e=>"small"===e||"small-full-width"===e,gO=(e,t)=>{let n="14.875rem";return(e=>"full-width"===e||"small-full-width"===e)(e)?n="100%":"large"===e&&(n="22.875rem"),i.css`
|
|
3130
3143
|
width: 100%;
|
|
3131
3144
|
max-width: ${n};
|
|
3132
3145
|
border-radius: ${$(300)};
|
|
3133
|
-
padding: ${
|
|
3146
|
+
padding: ${mO(e)?`${k(200)} ${k(200)} ${k(300)} ${k(200)}`:`${k(200)} ${k(300)} ${k(300)} ${k(300)}`};
|
|
3134
3147
|
display: flex;
|
|
3135
3148
|
align-items: ${t?"center":"flex-start"};
|
|
3136
3149
|
justify-content: ${t?"space-between":"flex-start"};
|
|
@@ -3140,7 +3153,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3140
3153
|
button {
|
|
3141
3154
|
margin-left: ${t?0:k(600)};
|
|
3142
3155
|
}
|
|
3143
|
-
`},
|
|
3156
|
+
`},bO=i.css`
|
|
3144
3157
|
display: flex;
|
|
3145
3158
|
align-items: baseline;
|
|
3146
3159
|
gap: ${k(200)};
|
|
@@ -3148,35 +3161,35 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3148
3161
|
svg {
|
|
3149
3162
|
margin-top: 0.1875rem;
|
|
3150
3163
|
}
|
|
3151
|
-
`,
|
|
3164
|
+
`,vO=e=>i.css`
|
|
3152
3165
|
color: ${w("neutral",800)};
|
|
3153
|
-
font-size: ${
|
|
3154
|
-
line-height: ${
|
|
3166
|
+
font-size: ${mO(e)?C(300):C(500)};
|
|
3167
|
+
line-height: ${mO(e)?S(500):S(700)};
|
|
3155
3168
|
font-weight: 400;
|
|
3156
3169
|
text-align: left;
|
|
3157
|
-
`,
|
|
3170
|
+
`,yO=(e,t)=>i.css`
|
|
3158
3171
|
color: ${w("neutral",700)};
|
|
3159
|
-
font-size: ${
|
|
3160
|
-
line-height: ${
|
|
3172
|
+
font-size: ${mO(e)?C(200):C(400)};
|
|
3173
|
+
line-height: ${mO(e)?S(400):S(600)};
|
|
3161
3174
|
font-weight: 400;
|
|
3162
3175
|
margin-left: ${t?k(600):"0"};
|
|
3163
3176
|
text-align: left;
|
|
3164
|
-
`,
|
|
3177
|
+
`,xO=(e,t)=>i.css`
|
|
3165
3178
|
color: ${w("neutral",700)};
|
|
3166
|
-
font-size: ${
|
|
3167
|
-
line-height: ${
|
|
3179
|
+
font-size: ${mO(e)?C(200):C(400)};
|
|
3180
|
+
line-height: ${mO(e)?S(400):S(600)};
|
|
3168
3181
|
font-weight: 400;
|
|
3169
3182
|
margin-left: ${t?k(600):"0"};
|
|
3170
3183
|
text-align: left;
|
|
3171
|
-
`,
|
|
3184
|
+
`,wO=i.css`
|
|
3172
3185
|
background-color: ${w("neutral",100)};
|
|
3173
3186
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
3174
3187
|
color: ${w("neutral",700)};
|
|
3175
|
-
`,
|
|
3188
|
+
`,CO=i.css`
|
|
3176
3189
|
background-color: ${w("neutral",200)};
|
|
3177
3190
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
3178
3191
|
color: ${w("neutral",700)};
|
|
3179
|
-
`,
|
|
3192
|
+
`,kO=i.css`
|
|
3180
3193
|
background-color: ${w("success",100)};
|
|
3181
3194
|
border: ${j(100)} solid ${w("success",300)};
|
|
3182
3195
|
color: ${w("success",500)};
|
|
@@ -3184,7 +3197,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3184
3197
|
p {
|
|
3185
3198
|
color: ${w("success",900)};
|
|
3186
3199
|
}
|
|
3187
|
-
`,
|
|
3200
|
+
`,SO=i.css`
|
|
3188
3201
|
background-color: ${w("warning",100)};
|
|
3189
3202
|
border: ${j(100)} solid ${w("warning",300)};
|
|
3190
3203
|
color: ${w("warning",500)};
|
|
@@ -3192,7 +3205,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3192
3205
|
p {
|
|
3193
3206
|
color: ${w("warning",900)};
|
|
3194
3207
|
}
|
|
3195
|
-
|
|
3208
|
+
`,$O=i.css`
|
|
3196
3209
|
background-color: ${w("error",100)};
|
|
3197
3210
|
border: ${j(100)} solid ${w("error",300)};
|
|
3198
3211
|
color: ${w("error",500)};
|
|
@@ -3200,52 +3213,52 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3200
3213
|
p {
|
|
3201
3214
|
color: ${w("error",900)};
|
|
3202
3215
|
}
|
|
3203
|
-
|
|
3216
|
+
`,jO=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,actionButtonVariant:l="secondary",isButtonRight:c,buttonLeftIcon:d,buttonRightIcon:u,labels:h})=>{const p=Vf("InlineMessage",h);let f=wO;"info-grey"===n?f=CO:"success"===n?f=kO:"warning"===n?f=SO:"error"===n&&(f=$O);const m="error"===n||"warning"===n?"alert":"status",g="alert"===m?"assertive":"polite";return r.jsxs("div",{css:[gO(o,c),f],role:m,"aria-live":g,"aria-roledescription":p.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:bO,children:[i,"string"==typeof e?r.jsx("p",{css:vO(o),children:e}):r.jsx("div",{css:vO(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:yO(o,!!i),children:t}):t?r.jsx("div",{css:xO(o,!!i),children:t}):null]}),a?r.jsx(Bf,{label:a,variant:l,size:"large"===o||"full-width"===o?"default":"small",onClick:s,leftIcon:d,rightIcon:u}):null]})},MO=i.css`
|
|
3204
3217
|
width: 100%;
|
|
3205
3218
|
min-height: calc(${k(1200)} * 12);
|
|
3206
3219
|
background-color: ${w("neutral",100)};
|
|
3207
3220
|
display: flex;
|
|
3208
3221
|
flex-direction: column;
|
|
3209
|
-
`,
|
|
3222
|
+
`,EO=i.css`
|
|
3210
3223
|
background-color: ${w("neutral",200)};
|
|
3211
3224
|
padding: ${k(300)};
|
|
3212
3225
|
display: flex;
|
|
3213
3226
|
align-items: center;
|
|
3214
3227
|
gap: ${k(300)};
|
|
3215
|
-
`,
|
|
3228
|
+
`,TO=i.css`
|
|
3216
3229
|
flex: 1;
|
|
3217
3230
|
|
|
3218
3231
|
.ds-text-input-container {
|
|
3219
3232
|
margin-bottom: 0;
|
|
3220
3233
|
}
|
|
3221
|
-
`,
|
|
3234
|
+
`,OO=i.css`
|
|
3222
3235
|
flex-shrink: 0;
|
|
3223
3236
|
color: ${w("neutral",700)};
|
|
3224
3237
|
font-size: ${C(400)};
|
|
3225
3238
|
font-style: normal;
|
|
3226
3239
|
font-weight: 400;
|
|
3227
|
-
`,
|
|
3240
|
+
`,LO=i.css`
|
|
3228
3241
|
flex: 1;
|
|
3229
3242
|
min-height: 0;
|
|
3230
3243
|
padding: ${k(400)};
|
|
3231
3244
|
display: flex;
|
|
3232
3245
|
flex-direction: column;
|
|
3233
3246
|
gap: ${k(300)};
|
|
3234
|
-
`,
|
|
3247
|
+
`,AO=i.css`
|
|
3235
3248
|
color: ${w("neutral",700)};
|
|
3236
3249
|
font-size: ${C(400)};
|
|
3237
3250
|
line-height: ${S(600)};
|
|
3238
3251
|
font-weight: 700;
|
|
3239
|
-
`,AO=i.css`
|
|
3240
|
-
width: 100%;
|
|
3241
3252
|
`,RO=i.css`
|
|
3253
|
+
width: 100%;
|
|
3254
|
+
`,NO=i.css`
|
|
3242
3255
|
flex: 1;
|
|
3243
3256
|
min-height: 0;
|
|
3244
3257
|
overflow-y: auto;
|
|
3245
3258
|
display: flex;
|
|
3246
3259
|
flex-direction: column;
|
|
3247
3260
|
gap: ${k(200)};
|
|
3248
|
-
`,
|
|
3261
|
+
`,DO=i.css`
|
|
3249
3262
|
background-color: ${w("neutral",200)};
|
|
3250
3263
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
3251
3264
|
border-radius: ${$(300)};
|
|
@@ -3271,13 +3284,13 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3271
3284
|
&:active {
|
|
3272
3285
|
background-color: ${w("neutral",300)};
|
|
3273
3286
|
}
|
|
3274
|
-
`,
|
|
3287
|
+
`,IO=i.css`
|
|
3275
3288
|
display: flex;
|
|
3276
3289
|
flex: 1;
|
|
3277
3290
|
min-width: 0;
|
|
3278
3291
|
flex-direction: column;
|
|
3279
3292
|
gap: ${k(50)};
|
|
3280
|
-
`,
|
|
3293
|
+
`,PO=i.css`
|
|
3281
3294
|
color: ${w("neutral",900)};
|
|
3282
3295
|
font-size: ${C(300)};
|
|
3283
3296
|
line-height: ${S(500)};
|
|
@@ -3285,7 +3298,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3285
3298
|
overflow: hidden;
|
|
3286
3299
|
text-overflow: ellipsis;
|
|
3287
3300
|
white-space: nowrap;
|
|
3288
|
-
`,
|
|
3301
|
+
`,zO=i.css`
|
|
3289
3302
|
color: ${w("neutral",700)};
|
|
3290
3303
|
font-size: ${C(300)};
|
|
3291
3304
|
line-height: ${S(500)};
|
|
@@ -3293,7 +3306,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3293
3306
|
overflow: hidden;
|
|
3294
3307
|
text-overflow: ellipsis;
|
|
3295
3308
|
white-space: nowrap;
|
|
3296
|
-
`,
|
|
3309
|
+
`,VO=e=>i.css`
|
|
3297
3310
|
a,
|
|
3298
3311
|
p {
|
|
3299
3312
|
font-size: ${C("small"===e?200:400)};
|
|
@@ -3325,19 +3338,19 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3325
3338
|
a:hover {
|
|
3326
3339
|
text-decoration: underline;
|
|
3327
3340
|
}
|
|
3328
|
-
`,
|
|
3341
|
+
`,BO=e=>i.css`
|
|
3329
3342
|
svg {
|
|
3330
3343
|
height: ${k("small"===e?200:300)};
|
|
3331
3344
|
width: ${k("small"===e?200:300)};
|
|
3332
3345
|
color: ${w("neutral",600)};
|
|
3333
3346
|
}
|
|
3334
|
-
`,
|
|
3347
|
+
`,HO=i.css`
|
|
3335
3348
|
cursor: pointer;
|
|
3336
3349
|
color: ${w("neutral",600)};
|
|
3337
3350
|
display: flex;
|
|
3338
3351
|
justify-content: center;
|
|
3339
3352
|
align-items: center;
|
|
3340
|
-
`,
|
|
3353
|
+
`,_O=(e,t)=>i.css`
|
|
3341
3354
|
min-height: ${k(1400)};
|
|
3342
3355
|
width: 100vw;
|
|
3343
3356
|
position: ${e?"sticky":"absolute"};
|
|
@@ -3347,7 +3360,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3347
3360
|
border-top: ${j(100)} solid
|
|
3348
3361
|
${w("neutral",400)};
|
|
3349
3362
|
z-index: 101;
|
|
3350
|
-
`,
|
|
3363
|
+
`,FO=e=>i.css`
|
|
3351
3364
|
height: 100%;
|
|
3352
3365
|
width: 100%;
|
|
3353
3366
|
max-width: ${null!=e?u(e):"100%"};
|
|
@@ -3362,7 +3375,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3362
3375
|
flex-direction: column;
|
|
3363
3376
|
align-items: flex-start;
|
|
3364
3377
|
}
|
|
3365
|
-
`,
|
|
3378
|
+
`,qO=i.css`
|
|
3366
3379
|
display: flex;
|
|
3367
3380
|
align-items: center;
|
|
3368
3381
|
flex-wrap: wrap;
|
|
@@ -3375,7 +3388,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3375
3388
|
color: ${w("neutral",700)};
|
|
3376
3389
|
text-decoration: underline;
|
|
3377
3390
|
}
|
|
3378
|
-
`,
|
|
3391
|
+
`,WO=i.css`
|
|
3379
3392
|
width: 15rem;
|
|
3380
3393
|
font-size: ${C(300)};
|
|
3381
3394
|
line-height: ${S(500)};
|
|
@@ -3386,17 +3399,17 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3386
3399
|
@media screen and (max-width: 48rem) {
|
|
3387
3400
|
text-align: left;
|
|
3388
3401
|
}
|
|
3389
|
-
`,
|
|
3402
|
+
`,UO=i.css`
|
|
3390
3403
|
display: flex;
|
|
3391
3404
|
align-items: center;
|
|
3392
3405
|
gap: ${k(400)};
|
|
3393
|
-
`,
|
|
3406
|
+
`,KO=i.css`
|
|
3394
3407
|
width: 100%;
|
|
3395
3408
|
display: flex;
|
|
3396
3409
|
align-items: center;
|
|
3397
3410
|
height: ${k(1400)};
|
|
3398
3411
|
background-color: ${w("neutral",200)};
|
|
3399
|
-
`,
|
|
3412
|
+
`,GO=i.css`
|
|
3400
3413
|
height: ${k(1400)};
|
|
3401
3414
|
width: 99%;
|
|
3402
3415
|
background-color: ${w("neutral",200)};
|
|
@@ -3492,9 +3505,9 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3492
3505
|
opacity: 1;
|
|
3493
3506
|
}
|
|
3494
3507
|
}
|
|
3495
|
-
`,GO=i.css`
|
|
3496
|
-
position: relative;
|
|
3497
3508
|
`,ZO=i.css`
|
|
3509
|
+
position: relative;
|
|
3510
|
+
`,JO=i.css`
|
|
3498
3511
|
position: absolute;
|
|
3499
3512
|
top: -0.3125rem;
|
|
3500
3513
|
right: -0.3125rem;
|
|
@@ -3509,7 +3522,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3509
3522
|
display: flex;
|
|
3510
3523
|
justify-content: center;
|
|
3511
3524
|
align-items: center;
|
|
3512
|
-
`,
|
|
3525
|
+
`,XO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),YO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
|
|
3513
3526
|
max-height: ${s};
|
|
3514
3527
|
width: 100%;
|
|
3515
3528
|
background-color: ${n??w("neutral","dark"===r?800:100)};
|
|
@@ -3519,7 +3532,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3519
3532
|
z-index: 102;
|
|
3520
3533
|
border-bottom: ${j(100)} solid
|
|
3521
3534
|
${w("neutral",400)};
|
|
3522
|
-
`},
|
|
3535
|
+
`},QO=(e,t)=>i.css`
|
|
3523
3536
|
height: ${k(t?700:1200)};
|
|
3524
3537
|
width: 100%;
|
|
3525
3538
|
background-color: ${w("neutral","dark"===e?800:100)};
|
|
@@ -3530,7 +3543,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3530
3543
|
justify-content: flex-start;
|
|
3531
3544
|
gap: 0;
|
|
3532
3545
|
padding: ${t?0:`${k(200)} ${k(400)}`};
|
|
3533
|
-
`,
|
|
3546
|
+
`,eL=(e,t,n)=>i.css`
|
|
3534
3547
|
height: ${k(n?700:1200)};
|
|
3535
3548
|
width: 100%;
|
|
3536
3549
|
max-width: ${t?u(t):"100%"};
|
|
@@ -3541,13 +3554,13 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3541
3554
|
justify-content: space-between;
|
|
3542
3555
|
margin: 0 auto;
|
|
3543
3556
|
padding: ${n?0:`${k(200)} ${k(400)}`};
|
|
3544
|
-
`,
|
|
3557
|
+
`,tL=(e,t)=>i.css`
|
|
3545
3558
|
display: flex;
|
|
3546
3559
|
margin: ${t?"-0.0625rem":"0rem"};
|
|
3547
3560
|
justify-content: flex-start;
|
|
3548
3561
|
gap: ${k(300)};
|
|
3549
3562
|
color: ${w("neutral",e?100:900)};
|
|
3550
|
-
`,
|
|
3563
|
+
`,nL=i.css`
|
|
3551
3564
|
outline: none;
|
|
3552
3565
|
|
|
3553
3566
|
a {
|
|
@@ -3559,12 +3572,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3559
3572
|
outline-width: ${k(50)};
|
|
3560
3573
|
}
|
|
3561
3574
|
}
|
|
3562
|
-
`,
|
|
3575
|
+
`,rL=e=>i.css`
|
|
3563
3576
|
display: ${e?"none":"flex"};
|
|
3564
3577
|
align-items: center;
|
|
3565
3578
|
justify-content: flex-start;
|
|
3566
3579
|
gap: 0rem;
|
|
3567
|
-
`,
|
|
3580
|
+
`,oL=(e,t,n)=>i.css`
|
|
3568
3581
|
font-size: ${C(n?300:400)};
|
|
3569
3582
|
line-height: ${S(600)};
|
|
3570
3583
|
font-weight: 400;
|
|
@@ -3589,12 +3602,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3589
3602
|
font-weight: 700;
|
|
3590
3603
|
color: ${w("accessible","controls-on-neutral-lights")};
|
|
3591
3604
|
`:""}
|
|
3592
|
-
`,
|
|
3605
|
+
`,iL=e=>i.css`
|
|
3593
3606
|
height: ${k(e?700:1200)};
|
|
3594
3607
|
display: flex;
|
|
3595
3608
|
align-items: center;
|
|
3596
3609
|
justify-content: flex-end;
|
|
3597
|
-
`,
|
|
3610
|
+
`,sL=e=>i.css`
|
|
3598
3611
|
height: 100%;
|
|
3599
3612
|
font-size: ${C(400)};
|
|
3600
3613
|
line-height: ${S(600)};
|
|
@@ -3614,7 +3627,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3614
3627
|
}
|
|
3615
3628
|
}
|
|
3616
3629
|
`:""}
|
|
3617
|
-
`,
|
|
3630
|
+
`,aL=e=>i.css`
|
|
3618
3631
|
height: 100%;
|
|
3619
3632
|
display: flex;
|
|
3620
3633
|
align-items: center;
|
|
@@ -3623,7 +3636,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3623
3636
|
padding-left: ${k(400)};
|
|
3624
3637
|
border-left: ${j(100)} solid
|
|
3625
3638
|
${w("neutral",e?700:300)};
|
|
3626
|
-
`,
|
|
3639
|
+
`,lL=(e="light",t)=>i.css`
|
|
3627
3640
|
background-color: none;
|
|
3628
3641
|
border: none;
|
|
3629
3642
|
cursor: pointer;
|
|
@@ -3649,7 +3662,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3649
3662
|
outline-width: ${j(200)};
|
|
3650
3663
|
background-color: ${w("neutral",200)};
|
|
3651
3664
|
}
|
|
3652
|
-
`,
|
|
3665
|
+
`,cL=(e,t)=>i.css`
|
|
3653
3666
|
position: absolute;
|
|
3654
3667
|
top: ${k(t?700:1200)};
|
|
3655
3668
|
right: 0;
|
|
@@ -3664,10 +3677,10 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3664
3677
|
justify-content: flex-start;
|
|
3665
3678
|
gap: ${k(400)};
|
|
3666
3679
|
transition: width 0.5s ease-in-out;
|
|
3667
|
-
`,
|
|
3680
|
+
`,dL=i.css`
|
|
3668
3681
|
height: 100%;
|
|
3669
3682
|
width: 100%;
|
|
3670
|
-
`,
|
|
3683
|
+
`,uL=e=>i.css`
|
|
3671
3684
|
background-color: ${w("neutral","dark"===e?800:200)};
|
|
3672
3685
|
border-bottom: ${j(100)} solid
|
|
3673
3686
|
${w("neutral",300)};
|
|
@@ -3688,13 +3701,13 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3688
3701
|
margin-left: -${k(300)};
|
|
3689
3702
|
}
|
|
3690
3703
|
}
|
|
3691
|
-
`,uL=i.css`
|
|
3692
|
-
background-color: ${w("neutral",100)};
|
|
3693
3704
|
`,hL=i.css`
|
|
3705
|
+
background-color: ${w("neutral",100)};
|
|
3706
|
+
`,pL=i.css`
|
|
3694
3707
|
min-height: 100vh;
|
|
3695
3708
|
width: 100%;
|
|
3696
3709
|
overflow-y: scroll;
|
|
3697
|
-
`;i.css``;const
|
|
3710
|
+
`;i.css``;const fL=e=>i.css`
|
|
3698
3711
|
display: inline-block;
|
|
3699
3712
|
width: 100%;
|
|
3700
3713
|
padding: ${k(300)} ${k(400)};
|
|
@@ -3723,7 +3736,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3723
3736
|
outline-width: ${j(200)};
|
|
3724
3737
|
background-color: ${w("neutral",200)};
|
|
3725
3738
|
}
|
|
3726
|
-
`,
|
|
3739
|
+
`,mL=i.css`
|
|
3727
3740
|
width: 100%;
|
|
3728
3741
|
padding: ${k(300)} ${k(400)};
|
|
3729
3742
|
display: flex;
|
|
@@ -3747,7 +3760,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3747
3760
|
outline-width: ${j(200)};
|
|
3748
3761
|
background-color: ${w("neutral",200)};
|
|
3749
3762
|
}
|
|
3750
|
-
`,
|
|
3763
|
+
`,gL=e=>i.css`
|
|
3751
3764
|
position: absolute;
|
|
3752
3765
|
top: 0rem;
|
|
3753
3766
|
right: 0;
|
|
@@ -3759,7 +3772,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3759
3772
|
align-items: flex-start;
|
|
3760
3773
|
justify-content: flex-start;
|
|
3761
3774
|
transition: width 0.5s ease-in-out;
|
|
3762
|
-
`,
|
|
3775
|
+
`,bL=i.css`
|
|
3763
3776
|
height: ${k(1200)};
|
|
3764
3777
|
width: 100%;
|
|
3765
3778
|
display: flex;
|
|
@@ -3771,7 +3784,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3771
3784
|
position: relative;
|
|
3772
3785
|
top: 0;
|
|
3773
3786
|
left: 0;
|
|
3774
|
-
`,
|
|
3787
|
+
`,vL=i.css`
|
|
3775
3788
|
position: absolute;
|
|
3776
3789
|
bottom: 0;
|
|
3777
3790
|
left: 0;
|
|
@@ -3786,7 +3799,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3786
3799
|
button {
|
|
3787
3800
|
width: calc(48% - 1.5rem);
|
|
3788
3801
|
}
|
|
3789
|
-
`,
|
|
3802
|
+
`,yL=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),b=n.useRef(null),v=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:cL(l,h),children:l&&r.jsxs("div",{css:dL,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:uL(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:hL,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:fL(d===e.link),children:e.label},e.label):r.jsxs("button",{css:mL,type:"button",ref:e=>{v.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{b.current?.focus()}),100))},children:[e.label,e.items?r.jsx(Gf,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:vL,children:s.map((e=>r.jsx(Bf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:gL(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:bL,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),v.current[m]?.focus()},"aria-label":u.goBackLabel,css:lL(e),ref:b,children:[r.jsx(Gf,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:lL(e),children:[u.closeButtonText,r.jsx(Xf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:pL,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:fL(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},xL=1023,wL=i.css`
|
|
3790
3803
|
width: ${k(1600)};
|
|
3791
3804
|
height: 100%;
|
|
3792
3805
|
z-index: 100;
|
|
@@ -3796,7 +3809,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3796
3809
|
display: flex;
|
|
3797
3810
|
flex-direction: column;
|
|
3798
3811
|
justify-content: space-between;
|
|
3799
|
-
`,
|
|
3812
|
+
`,CL=i.css`
|
|
3800
3813
|
width: ${k(1600)};
|
|
3801
3814
|
height: ${k(1600)};
|
|
3802
3815
|
background-color: ${w("neutral",200)};
|
|
@@ -3887,7 +3900,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3887
3900
|
}
|
|
3888
3901
|
}
|
|
3889
3902
|
}
|
|
3890
|
-
`,
|
|
3903
|
+
`,kL=i.css`
|
|
3891
3904
|
display: flex;
|
|
3892
3905
|
justify-content: center;
|
|
3893
3906
|
align-items: center;
|
|
@@ -3900,7 +3913,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3900
3913
|
fill: ${w("neutral",600)};
|
|
3901
3914
|
}
|
|
3902
3915
|
}
|
|
3903
|
-
`,
|
|
3916
|
+
`,SL=i.css`
|
|
3904
3917
|
width: ${k(1600)};
|
|
3905
3918
|
height: ${k(1600)};
|
|
3906
3919
|
background-color: ${w("neutral",200)};
|
|
@@ -3938,7 +3951,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3938
3951
|
text-align: center;
|
|
3939
3952
|
color: ${w("neutral",600)};
|
|
3940
3953
|
}
|
|
3941
|
-
|
|
3954
|
+
`,$L=i.css`
|
|
3942
3955
|
width: 20rem;
|
|
3943
3956
|
height: 100%;
|
|
3944
3957
|
z-index: 100;
|
|
@@ -3948,7 +3961,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3948
3961
|
overflow-x: hidden;
|
|
3949
3962
|
border-right: ${j(100)} solid
|
|
3950
3963
|
${w("neutral",300)};
|
|
3951
|
-
|
|
3964
|
+
`,jL=e=>i.css`
|
|
3952
3965
|
width: 100%;
|
|
3953
3966
|
display: flex;
|
|
3954
3967
|
align-items: center;
|
|
@@ -3957,7 +3970,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3957
3970
|
${"view"===e&&`\n border: ${j(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
|
|
3958
3971
|
|
|
3959
3972
|
${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
|
|
3960
|
-
`,
|
|
3973
|
+
`,ML=i.css`
|
|
3961
3974
|
width: 99%;
|
|
3962
3975
|
height: ${k(1e3)};
|
|
3963
3976
|
padding: ${k(200)} ${k(400)};
|
|
@@ -3973,7 +3986,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3973
3986
|
&:focus-visible {
|
|
3974
3987
|
box-shadow: none;
|
|
3975
3988
|
}
|
|
3976
|
-
`,
|
|
3989
|
+
`,EL=i.css`
|
|
3977
3990
|
background-color: ${w("neutral",200)};
|
|
3978
3991
|
color: ${w("neutral",700)};
|
|
3979
3992
|
|
|
@@ -4030,11 +4043,11 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4030
4043
|
opacity: 1;
|
|
4031
4044
|
}
|
|
4032
4045
|
}
|
|
4033
|
-
`,
|
|
4046
|
+
`,TL=i.css`
|
|
4034
4047
|
width: ${k(100)};
|
|
4035
4048
|
height: ${k(600)};
|
|
4036
4049
|
background-color: ${w("neutral",400)};
|
|
4037
|
-
`,
|
|
4050
|
+
`,OL=i.css`
|
|
4038
4051
|
height: ${k(800)};
|
|
4039
4052
|
border-radius: ${$(200)};
|
|
4040
4053
|
background-color: ${w("neutral",200)};
|
|
@@ -4109,7 +4122,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4109
4122
|
opacity: 1;
|
|
4110
4123
|
}
|
|
4111
4124
|
}
|
|
4112
|
-
`,
|
|
4125
|
+
`,LL=i.css`
|
|
4113
4126
|
background-color: transparent;
|
|
4114
4127
|
color: ${w("neutral",600)};
|
|
4115
4128
|
width: auto;
|
|
@@ -4186,7 +4199,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4186
4199
|
}
|
|
4187
4200
|
}
|
|
4188
4201
|
}
|
|
4189
|
-
`,
|
|
4202
|
+
`,AL=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),RL=e=>1===e?"none":2===e?"left":"right",NL=w("neutral",700),DL=i.css`
|
|
4190
4203
|
position: relative;
|
|
4191
4204
|
width: 100%;
|
|
4192
4205
|
|
|
@@ -4199,12 +4212,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4199
4212
|
&[data-open='true'][data-placement='top'] input {
|
|
4200
4213
|
border-bottom-left-radius: ${$(300)};
|
|
4201
4214
|
border-bottom-right-radius: ${$(300)};
|
|
4202
|
-
border-bottom-color: ${
|
|
4215
|
+
border-bottom-color: ${NL};
|
|
4203
4216
|
border-top-left-radius: 0;
|
|
4204
4217
|
border-top-right-radius: 0;
|
|
4205
4218
|
border-top-color: transparent;
|
|
4206
4219
|
}
|
|
4207
|
-
`,
|
|
4220
|
+
`,IL=i.css`
|
|
4208
4221
|
width: 100%;
|
|
4209
4222
|
z-index: 1000;
|
|
4210
4223
|
overflow-y: auto;
|
|
@@ -4218,7 +4231,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4218
4231
|
margin-top: calc(${j(100)} * -1);
|
|
4219
4232
|
border-top-left-radius: 0;
|
|
4220
4233
|
border-top-right-radius: 0;
|
|
4221
|
-
border-top: ${j(100)} solid ${
|
|
4234
|
+
border-top: ${j(100)} solid ${NL};
|
|
4222
4235
|
|
|
4223
4236
|
&[data-placement^='top'] {
|
|
4224
4237
|
margin-top: 0;
|
|
@@ -4229,12 +4242,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4229
4242
|
${w("neutral",400)};
|
|
4230
4243
|
border-bottom-left-radius: 0;
|
|
4231
4244
|
border-bottom-right-radius: 0;
|
|
4232
|
-
border-bottom: ${j(100)} solid ${
|
|
4245
|
+
border-bottom: ${j(100)} solid ${NL};
|
|
4233
4246
|
box-shadow:
|
|
4234
4247
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
4235
4248
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4236
4249
|
}
|
|
4237
|
-
`,
|
|
4250
|
+
`,PL=i.css`
|
|
4238
4251
|
padding: ${k(200)};
|
|
4239
4252
|
border-radius: ${$(300)};
|
|
4240
4253
|
cursor: pointer;
|
|
@@ -4255,7 +4268,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4255
4268
|
&:active {
|
|
4256
4269
|
background-color: ${kf(40)};
|
|
4257
4270
|
}
|
|
4258
|
-
`,
|
|
4271
|
+
`,zL=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),o=e.split(n);return r.jsx(r.Fragment,{children:o.map((e=>n.test(e)?r.jsx("strong",{children:e},e):r.jsx("span",{children:e},e)))})},VL=({items:t,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),r.jsx(e.Box,{ref:a,padding:"0.5rem",children:t.map(((t,n)=>{const a=t.searchLabel||("string"==typeof t.label||"number"==typeof t.label?String(t.label):"");return r.jsx(e.Box,{css:PL,"data-highlighted":n===s||void 0,onClick:()=>i(t.id||a),children:"string"==typeof t.label||"number"==typeof t.label?r.jsx(zL,{text:String(t.label),query:o}):t.label},t.id)}))})},BL=e=>e.searchLabel?e.searchLabel:"string"==typeof e.label||"number"==typeof e.label?String(e.label):"",HL={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function _L(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&HL[e]?HL[e]:HL.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r||s,l=r&&n?"opacity: 0.7;":"",c=n?w("neutral",400):w("primary",800),d=n?w("neutral",400):w("primary",800);return i.css`
|
|
4259
4272
|
height: ${o};
|
|
4260
4273
|
width: ${o};
|
|
4261
4274
|
border-radius: 50%;
|
|
@@ -4290,20 +4303,20 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4290
4303
|
background-color: ${w("primary",500)};
|
|
4291
4304
|
}
|
|
4292
4305
|
}
|
|
4293
|
-
`}const
|
|
4306
|
+
`}const FL=i.css`
|
|
4294
4307
|
font-size: ${C(200)};
|
|
4295
4308
|
line-height: ${S(400)};
|
|
4296
4309
|
font-weight: 700;
|
|
4297
4310
|
color: inherit;
|
|
4298
|
-
`,
|
|
4311
|
+
`,qL={small:{fontSize:h(8),boxSize:h(10),padding:h(2)},large:{fontSize:h(12),boxSize:h(20),padding:`${h(2)} ${h(4)}`}},WL=i.css`
|
|
4299
4312
|
display: flex;
|
|
4300
4313
|
justify-content: flex-start;
|
|
4301
4314
|
align-items: center;
|
|
4302
4315
|
gap: ${k(200)};
|
|
4303
|
-
`,
|
|
4316
|
+
`,UL=e=>i.css`
|
|
4304
4317
|
position: relative;
|
|
4305
4318
|
display: flex;
|
|
4306
|
-
`,
|
|
4319
|
+
`,KL=(e="large")=>{const t=k("small"===e?100:200);return i.css`
|
|
4307
4320
|
height: ${t};
|
|
4308
4321
|
width: ${t};
|
|
4309
4322
|
background-color: ${w("error",500)};
|
|
@@ -4312,7 +4325,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4312
4325
|
top: 0rem;
|
|
4313
4326
|
right: 0rem;
|
|
4314
4327
|
z-index: 1;
|
|
4315
|
-
`},
|
|
4328
|
+
`},GL=(e="large")=>{const{boxSize:t,padding:n}=qL[e];return i.css`
|
|
4316
4329
|
background-color: ${w("error",500)};
|
|
4317
4330
|
padding: ${n};
|
|
4318
4331
|
border-radius: 9999px;
|
|
@@ -4327,12 +4340,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4327
4340
|
min-width: ${t};
|
|
4328
4341
|
height: ${t};
|
|
4329
4342
|
z-index: 1;
|
|
4330
|
-
`},
|
|
4343
|
+
`},ZL=(e="large")=>{const{fontSize:t}=qL[e];return i.css`
|
|
4331
4344
|
font-size: ${t};
|
|
4332
4345
|
line-height: 1;
|
|
4333
4346
|
font-weight: 700;
|
|
4334
4347
|
color: ${w("error",100)};
|
|
4335
|
-
`},
|
|
4348
|
+
`},JL=(e="large")=>{const{boxSize:t}=qL[e];return i.css`
|
|
4336
4349
|
height: ${t};
|
|
4337
4350
|
min-width: ${t};
|
|
4338
4351
|
background-color: ${w("error",500)};
|
|
@@ -4341,12 +4354,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4341
4354
|
justify-content: center;
|
|
4342
4355
|
align-items: center;
|
|
4343
4356
|
padding: 0rem ${k(100)} 0.0625rem ${k(100)};
|
|
4344
|
-
`},
|
|
4357
|
+
`},XL=(e="large")=>{const{fontSize:t}=qL[e];return i.css`
|
|
4345
4358
|
font-size: ${t};
|
|
4346
4359
|
line-height: ${S(600)};
|
|
4347
4360
|
font-weight: 700;
|
|
4348
4361
|
color: ${w("error",100)};
|
|
4349
|
-
`},
|
|
4362
|
+
`},YL=({hasNotification:e,notificationCount:t,label:o,labels:i,children:s,size:a="large"})=>{const l=Vf("Badge",i),[c,d]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?d(!0):d(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const u=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})(),h="small"===a?"1rem":"1.5rem";return c&&null==s?r.jsxs("div",{css:WL,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:UL(),children:[r.jsx(im,{color:"currentColor",height:h,width:h}),!e||t||o?null:r.jsx("div",{css:KL(a),"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,u.length>0?r.jsx("div",{css:JL(a),children:r.jsx("p",{css:XL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null]}):r.jsxs("div",{css:WL,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:UL(),children:[u.length>0?r.jsx("div",{css:GL(a),children:r.jsx("p",{css:ZL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null,e&&!t?r.jsx("div",{css:KL(a),"aria-hidden":!0}):null,s??r.jsx(im,{color:"currentColor",height:h,width:h})]})]})},QL=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:i,src:s,srcSet:a,onClick:l,notificationCount:c,badgeSize:d="large",disabled:u=!1,customBackgroundColor:h="",labels:p},f)=>{const m=Vf("Avatar",p),g=()=>{u||l?.()},b=!!s||!!a,v=!!l&&!u,y=!!c&&c>0,x=r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:_L(o,i,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:v?"button":"img",tabIndex:v?0:void 0,"aria-disabled":l?u:void 0,children:[b&&r.jsx(e.Avatar.Image,{src:s,srcSet:a,alt:n||t||"Avatar image"}),!b&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:FL}),!b&&!t&&r.jsx(Cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):w("primary",800)}})]});return y?r.jsx(YL,{notificationCount:c,size:d,labels:{unreadMessagesLabel:m.unreadMessagesLabel},children:x}):x})),eA=e=>{switch(e){case"success":return{backgroundColor:w("success",100),textColor:w("success",900),borderColor:w("success",300),iconColor:w("success",500)};case"warning":return{backgroundColor:w("warning",100),textColor:w("warning",900),borderColor:w("warning",300),iconColor:w("warning",500)};case"error":return{backgroundColor:w("error",100),textColor:w("error",900),borderColor:w("error",300),iconColor:w("error",500)};case"information":return{backgroundColor:w("information",100),textColor:w("information",900),borderColor:w("information",300),iconColor:w("information",500)};case"general-grey":return{backgroundColor:w("neutral",200),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)};default:return{backgroundColor:w("neutral",100),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)}}},tA=(e,t="full-width",n=!1)=>{const{backgroundColor:r,textColor:o,borderColor:s}=eA(e),a="inline"===t,l=j(100),c=a?`calc(${k(200)} - ${l})`:k(200),d=`calc(${k(200)} - ${l})`;return i.css`
|
|
4350
4363
|
display: ${a?"inline-flex":"flex"};
|
|
4351
4364
|
width: ${a?"fit-content":"100%"};
|
|
4352
4365
|
max-width: 100%;
|
|
@@ -4364,7 +4377,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4364
4377
|
line-height: ${S(600)};
|
|
4365
4378
|
font-weight: 400;
|
|
4366
4379
|
}
|
|
4367
|
-
`},
|
|
4380
|
+
`},nA=e=>{const{iconColor:t}=eA(e);return i.css`
|
|
4368
4381
|
display: flex;
|
|
4369
4382
|
align-items: center;
|
|
4370
4383
|
justify-content: center;
|
|
@@ -4376,32 +4389,32 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4376
4389
|
width: ${k(400)};
|
|
4377
4390
|
height: ${k(400)};
|
|
4378
4391
|
}
|
|
4379
|
-
`},
|
|
4392
|
+
`},rA=l.forwardRef((({children:t,icon:n,variant:o,onClose:i,labels:s,isCentered:a=!1,width:c="full-width"},d)=>{const u=Vf("AlertBanner",s),[h,p]=l.useState(!0),f="success"===o?r.jsx(tm,{}):"warning"===o?r.jsx(nm,{}):"error"===o?r.jsx(rm,{}):r.jsx(Kf,{});return h?r.jsxs(e.Alert.Root,{css:tA(o,c,a),children:[r.jsx(e.Alert.Indicator,{css:nA(o),children:n||f}),r.jsx(e.Alert.Content,{flex:a?"initial":"1",children:t}),r.jsx(Sg,{"aria-label":u.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{p(!1),i?.()}})]}):null})),oA=i.css`
|
|
4380
4393
|
height: ${k(200)};
|
|
4381
4394
|
width: 100%;
|
|
4382
4395
|
background-color: ${w("neutral",300)};
|
|
4383
4396
|
display: flex;
|
|
4384
4397
|
align-items: center;
|
|
4385
4398
|
justify-content: flex-start;
|
|
4386
|
-
`,
|
|
4399
|
+
`,iA=(e,t)=>i.css`
|
|
4387
4400
|
height: 100%;
|
|
4388
4401
|
width: ${e}%;
|
|
4389
4402
|
background-color: ${t??w("primary",500)};
|
|
4390
4403
|
transition: width 0.5s ease-in-out;
|
|
4391
|
-
`,
|
|
4404
|
+
`,sA=i.css`
|
|
4392
4405
|
width: 100%;
|
|
4393
4406
|
display: flex;
|
|
4394
4407
|
align-items: center;
|
|
4395
4408
|
justify-content: space-between;
|
|
4396
4409
|
position: relative;
|
|
4397
|
-
`,
|
|
4410
|
+
`,aA=i.css`
|
|
4398
4411
|
height: 3.75rem;
|
|
4399
4412
|
width: ${k(2e3)};
|
|
4400
4413
|
display: flex;
|
|
4401
4414
|
flex-direction: column;
|
|
4402
4415
|
align-items: center;
|
|
4403
4416
|
justify-content: space-between;
|
|
4404
|
-
`,
|
|
4417
|
+
`,lA=(e,t)=>i.css`
|
|
4405
4418
|
height: ${k(800)};
|
|
4406
4419
|
width: ${k(800)};
|
|
4407
4420
|
display: flex;
|
|
@@ -4437,12 +4450,12 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4437
4450
|
}
|
|
4438
4451
|
|
|
4439
4452
|
${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
4440
|
-
`,
|
|
4453
|
+
`,cA=e=>i.css`
|
|
4441
4454
|
color: ${w("neutral",e?800:600)};
|
|
4442
4455
|
font-size: ${C(300)};
|
|
4443
4456
|
line-height: ${S(500)};
|
|
4444
4457
|
font-weight: 400;
|
|
4445
|
-
`,
|
|
4458
|
+
`,dA=i.css`
|
|
4446
4459
|
height: ${j(100)};
|
|
4447
4460
|
width: 100%;
|
|
4448
4461
|
padding: 0 1.875rem;
|
|
@@ -4450,25 +4463,25 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4450
4463
|
top: ${k(400)};
|
|
4451
4464
|
left: 0;
|
|
4452
4465
|
z-index: -1;
|
|
4453
|
-
`,
|
|
4466
|
+
`,uA=i.css`
|
|
4454
4467
|
height: ${j(100)};
|
|
4455
4468
|
width: 100%;
|
|
4456
4469
|
background-color: ${w("neutral",400)};
|
|
4457
|
-
`,
|
|
4470
|
+
`,hA=i.css`
|
|
4458
4471
|
font-size: ${C(500)};
|
|
4459
4472
|
line-height: ${S(700)};
|
|
4460
4473
|
font-weight: 400;
|
|
4461
4474
|
color: ${w("neutral",800)};
|
|
4462
|
-
`,
|
|
4475
|
+
`,pA=i.css`
|
|
4463
4476
|
font-size: ${C(400)};
|
|
4464
4477
|
line-height: ${S(600)};
|
|
4465
4478
|
font-weight: 400;
|
|
4466
4479
|
color: ${w("neutral",700)};
|
|
4467
|
-
`,pA=i.css`
|
|
4468
|
-
padding: 0.375rem;
|
|
4469
4480
|
`,fA=i.css`
|
|
4470
4481
|
padding: 0.375rem;
|
|
4471
|
-
|
|
4482
|
+
`,mA=i.css`
|
|
4483
|
+
padding: 0.375rem;
|
|
4484
|
+
`;let gA=!1;const bA=new Set,vA=e=>{let t,n=!1;const r=()=>{n&&(n=!1,(()=>{gA=!1;const[e]=bA;e&&(bA.delete(e),e())})())},o=()=>{gA=!0,n=!0,t=void 0,e()};return gA?(t=()=>o(),bA.add(t)):o(),()=>{n?r():t&&bA.delete(t)}},yA={pauseOnPageIdle:!0,offsets:"1.5rem"},xA={"top-start":e.createToaster({placement:"top-start",...yA}),top:e.createToaster({placement:"top",...yA}),"top-end":e.createToaster({placement:"top-end",...yA}),"bottom-start":e.createToaster({placement:"bottom-start",...yA}),bottom:e.createToaster({placement:"bottom",...yA}),"bottom-end":e.createToaster({placement:"bottom-end",...yA})};exports.AlertBanner=rA,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Vf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:UC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:GC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:KC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Bf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(Gf,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:ZC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:ZC,children:i})]})})},exports.Avatar=QL,exports.Badge=YL,exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Vf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:uw(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:hw,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:pw,children:[o?r.jsx("div",{css:fw,children:o.map((e=>r.jsxs("div",{children:[r.jsx(db,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:mw,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:gw,children:s.map((e=>{return r.jsxs("div",{css:bw(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
|
|
4472
4485
|
height: ${k(800)};
|
|
4473
4486
|
width: ${k(800)};
|
|
4474
4487
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -4476,27 +4489,27 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4476
4489
|
background-image: url(${t});
|
|
4477
4490
|
background-size: cover;
|
|
4478
4491
|
background-position: center;
|
|
4479
|
-
`)}),r.jsxs("div",{css:
|
|
4492
|
+
`)}),r.jsxs("div",{css:vw,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(gv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Wf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:VO(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:BO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:HO,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:BO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:VO(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:VO(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:BO(a),children:o||r.jsx(Gf,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Bf,exports.Checkbox=db,exports.CheckboxList=({label:e,caption:t,checkboxes:o,defaultValues:i,onCheckedChange:s,errorMessage:a,horizontal:l,required:c,hideCheckedCounter:d=!1,hideExpandToggle:u=!1,labels:h})=>{const p=Vf("CheckboxList",h),f=Array.isArray(i)?i:[],m=n.useMemo((()=>new Set(f)),[f]),[g,b]=n.useState((()=>o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:m.has(n),e}),{}))),[v,y]=n.useState(!0);n.useEffect((()=>{b((e=>{const t=o.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??m.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[o,m]);const x="string"!=typeof e,w=o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!g[n],e}),{}),C=o.length>0&&o.every((e=>e.name&&w[e.name])),k=o.some((e=>e.name&&w[e.name]))&&!C,S=o.length,$=`${o.filter((e=>e?.name&&w[e.name])).length} / ${S}`,j=t?`${t}.`:"",M=c?p.requiredLabel:p.optionalLabel,E=a?`${p.errorPrefix} ${a}.`:"",T=`${x?e.label:e}. ${j} ${M} ${E} `,O="string"==typeof e?e:r.jsxs("div",{css:Jb,children:[r.jsxs(db,{checked:C,indeterminate:k,onCheckedChange:e=>(e=>{const t=o.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});b(t),s?.(t)})(!!e.checked),children:[e.label," ",!d&&r.jsx("span",{"aria-hidden":"true",css:Kb,children:$})]}),!u&&r.jsxs("button",{type:"button",onClick:()=>y((e=>!e)),"aria-expanded":v,"aria-controls":"checkbox-list",css:Gb,children:[v?p.hideLabel:p.expandLabel,r.jsx("span",{"aria-hidden":"true",css:Zb(v),children:r.jsx(Gf,{})})]})]});return r.jsx(ag,{label:O,caption:t,errorMessage:a,required:"string"==typeof e&&c,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:p.requiredSymbolLabel},containerProps:{"aria-label":T},children:r.jsx("div",{id:"checkbox-list",css:qb(v),children:r.jsx("div",{css:Wb,children:r.jsx("div",{css:Ub(l),children:o.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(db,{ms:x&&!l?"6":"",css:{},checked:!!e?.name&&!!w[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...g};t&&(n[t]=e,b(n)),s&&s(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})})})})},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:ub,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:hb,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
|
|
4480
4493
|
width: 100%;
|
|
4481
4494
|
display: flex;
|
|
4482
4495
|
flex-direction: ${"centered"===s?"column":"row"};
|
|
4483
4496
|
align-items: center;
|
|
4484
4497
|
gap: ${k(300)};
|
|
4485
|
-
`),children:[r.jsx("div",{css:
|
|
4498
|
+
`),children:[r.jsx("div",{css:pb,children:n.icon}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx(e.CheckboxCard.Label,{css:fb(n.variant,n.disabled),children:n.label}),n.caption?r.jsx(e.CheckboxCard.Description,{css:mb(n.variant,n.disabled),children:n.caption}):null]})]}),r.jsx(e.CheckboxCard.Indicator,{css:gb(n.variant)})]}),n.children&&"expanded"===n.variant?r.jsx(e.CheckboxCard.Addon,{css:(o=n.disabled,i.css`
|
|
4486
4499
|
width: 100%;
|
|
4487
4500
|
border-color: ${w("neutral",300)};
|
|
4488
4501
|
margin-top: ${k(300)};
|
|
4489
4502
|
padding: 0;
|
|
4490
4503
|
padding-top: ${k(200)};
|
|
4491
4504
|
color: ${o?w("neutral",500):"inherit"};
|
|
4492
|
-
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=Sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(
|
|
4505
|
+
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=Sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(xw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:s,errorMessage:a,size:l,disabled:c,showOptionalLabel:d=!0,placeholder:u,labels:h,noMarginBottom:p,initialItems:f=[],multiple:m=!1,showSelectedItems:g=!1,value:b,defaultValue:v,onChange:y,creatable:x=!1})=>{const[C,S]=n.useState([]),[M,E]=n.useState(v??[]),[T,O]=n.useState(""),L=void 0!==b,A=L?b:M,R=e=>{L||E(e),y?.(e)},N=Vf("Combobox",h),{contains:D}=e.useFilter({sensitivity:"base"}),{collection:I,filter:P,upsert:z}=e.useListCollection({initialItems:f,filter:D}),V=T.trim(),B=(e=>`${Hv}${e}`)(V),H=x&&V.length>0&&!I.items.some((e=>e.label.toLowerCase()===V.toLowerCase())),_=n.useMemo((()=>H?e.createListCollection({items:[{label:V,value:B},...I.items]}):null),[H,B,V,I])??I,F=n.useMemo((()=>[...C,...f]),[C,f]),q=n.useMemo((()=>A.map((e=>({value:e,label:F.find((t=>t.value===e))?.label??e})))),[A,F]),W=A.length>0,U=!!a,K=mg(),{contentRef:G,placement:Z}=Lv(),[J,X]=n.useState("pointer"),Y=()=>X("pointer");return r.jsx(ag,{className:"ds-text-input-container",label:t,caption:s,errorMessage:a,required:o,disabled:c,size:l,showOptionalLabel:d,noMarginBottom:p,labels:{requiredSymbolLabel:N.requiredSymbolLabel,optionalSuffix:N.optionalSuffix},semantics:"field",children:r.jsxs(e.Combobox.Root,{multiple:m,invalid:U,disabled:c,collection:_,value:A,onValueChange:e=>{const t=e.value.filter(_v);t.length>0?(t.forEach((e=>{const t=e.slice(10),n={label:t,value:t};z(n.value,n,"prepend"),S((e=>e.some((e=>e.value===n.value))?e:[n,...e]))})),R(e.value.map((e=>_v(e)?e.slice(10):e)))):R(e.value),g&&O("")},inputValue:T,onInputValueChange:e=>{O(e.inputValue),P(e.inputValue)},selectionBehavior:g?"clear":"replace",width:"100%",positioning:{sameWidth:!0},size:"small"===l?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:u,focusVisibleRing:"none",css:[sg(l,W),Rv(Z)],disabled:c,"aria-label":t||u||N.defaultInputAriaLabel,"data-focus-visible":K.isTabFocused||void 0,onFocus:K.onFocus,onBlur:K.onBlur,onKeyDown:e=>{Bv.has(e.key)&&X("keyboard")},onPointerDown:Y,_placeholder:{color:"var(--chakra-colors-neutral-700)"}}),r.jsxs(e.Combobox.IndicatorGroup,{css:Nv,children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":N.clearSelectionLabel,tabIndex:0,focusVisibleRing:"none",css:Dv}),r.jsx(e.Combobox.Trigger,{"aria-label":N.toggleOptionsLabel})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{ref:G,css:(Q=U,i.css`
|
|
4493
4506
|
margin-top: calc(${k(200)} * -1);
|
|
4494
4507
|
border-radius: ${$(300)};
|
|
4495
4508
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
4496
4509
|
border-top-left-radius: 0;
|
|
4497
4510
|
border-top-right-radius: 0;
|
|
4498
4511
|
border-top: ${j(100)} solid
|
|
4499
|
-
${
|
|
4512
|
+
${Av(Q)};
|
|
4500
4513
|
background-color: ${w("neutral",100)};
|
|
4501
4514
|
padding: ${k(300)};
|
|
4502
4515
|
gap: ${k(200)};
|
|
@@ -4514,14 +4527,14 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4514
4527
|
border-bottom-left-radius: 0;
|
|
4515
4528
|
border-bottom-right-radius: 0;
|
|
4516
4529
|
border-bottom: ${j(100)} solid
|
|
4517
|
-
${
|
|
4530
|
+
${Av(Q)};
|
|
4518
4531
|
box-shadow:
|
|
4519
4532
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
4520
4533
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4521
4534
|
}
|
|
4522
|
-
`),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:
|
|
4535
|
+
`),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:zv,children:N.noItemsFoundLabel}),H?r.jsxs(e.Combobox.Item,{css:Pv,item:{label:V,value:B},children:[r.jsx(sm,{}),N.createOptionLabel(V)]},B):null,_.items.map((t=>r.jsxs(e.Combobox.Item,{css:Iv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g&&q.length>0?r.jsx("div",{css:Vv,children:q.map((e=>r.jsx(gv,{label:e.label,variant:"info-white",onClose:()=>R(A.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var Q},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:qC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:WC,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=ag,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:_O(n,o),children:r.jsxs("div",{css:FO(i),children:[r.jsxs("div",{css:UO,children:[r.jsx(om,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:qO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:WO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:ib,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:ab}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:sb,children:e}):null,t?r.jsx("p",{id:a,css:lb,children:t}):null,o]})]})},exports.GuidedTour=({open:e,onOpenChange:t,steps:n,activeStepIndex:o,onStepChange:s,onFinish:a,onSkip:l,variant:c="dark",closeOnEscape:d=!0,closeOnOutsideClick:u=!1,labels:h})=>{const p=Vf("GuidedTour",h),f=n.length,m=n[o];if(!e||!m||0===f)return null;const g=0===o,b=o===f-1,v="dark"===c,y=()=>{a?a():t(!1)},x=r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem"},children:[m.icon,r.jsx("p",{style:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"bold",marginBottom:m.caption?"0.25rem":0,color:w("neutral",v?100:800)},children:m.title})]}),m.caption?r.jsx("p",{style:{fontSize:"0.875rem",lineHeight:"1.25rem",color:w("neutral",v?200:700)},children:m.caption}):null]}),C=r.jsxs("div",{css:iw,children:[r.jsxs("div",{css:sw,children:[r.jsxs("div",{css:aw,children:[r.jsx(_f,{css:cw(v),icon:r.jsx(Jf,{}),"aria-label":p.previousStepLabel,disabled:g,onClick:()=>s(o-1)}),r.jsx("p",{css:lw(v),children:p.stepCounterLabel(o+1,f)}),r.jsx(_f,{css:[cw(v),i.css`
|
|
4523
4536
|
color: ${w("primary",600)};
|
|
4524
|
-
`],icon:r.jsx(Zf,{}),"aria-label":b?p.finishLabel:p.nextStepLabel,onClick:b?y:()=>s(o+1)})]}),b?r.jsx(Bf,{variant:"primary",size:"small",label:p.startExploringLabel,onClick:y}):r.jsx(Bf,{css:cw(v),variant:"borderless",size:"small",label:p.skipAllLabel,onClick:()=>{l?l():t(!1)}})]}),m.footer]});return r.jsx(rw,{open:e,onOpenChange:t,anchorRef:m.anchorRef,placement:m.placement,offset:m.offset,variant:c,closeOnEscape:d,closeOnOutsideClick:u,header:x,content:m.content,footer:C,labels:m.labels})},exports.IconButton=_f,exports.InlineMessage=$O,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Jb,children:r.jsx(ag,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Xb(!!i,a),attached:!0,children:["start"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(gg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=hC,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h,p]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const f=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},m=Object.values(d).filter((e=>!0===e)).length,g=c.groupAriaLabel(t,m,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Cw,alignItems:"flex-start","aria-label":g,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:kw,children:[t,r.jsx(mv,{label:c.activeTagLabel(m),size:"small",variant:m>0?"success":"info-grey"})]}),r.jsx("div",{css:Sw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(jb,{name:t,value:h,customGap:"0",onChange:(e,t)=>{p(t),f(e,!!t,a,t)},children:s.map((e=>r.jsx(Ow,{...e,onChange:(t,n)=>f(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ww,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=Ow,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Lw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Aw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Rw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Nw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:Dw,children:[r.jsx("div",{css:Iw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Pw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Vw,children:e}),r.jsx("p",{css:Bw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Xf,{}),onClick:s})]}),a?r.jsx("div",{css:zw,children:a}):null,r.jsxs("div",{css:Hw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Kw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=wC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(sm,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(am,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(lm,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(cm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(dm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(um,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(hm,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Jg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=yw,exports.MapMarkers=xw,exports.MapPopUp=rw,exports.Menu=Bm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(Sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:jO,children:[r.jsxs("div",{css:MO,children:[r.jsx("div",{css:EO,children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(gg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:TO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:OO,children:[r.jsx("h3",{css:LO,children:A}),i?r.jsx("div",{css:AO,children:r.jsx($O,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:RO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:NO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:DO,children:[r.jsx("p",{css:IO,children:t.label}),r.jsx("p",{css:PO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>JO(o,t)));return r.jsx("div",{css:UO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=JO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:KO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:GO,children:[i,a?r.jsx("div",{css:ZO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Fk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:qk(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Wk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:Uk,asChild:!0,children:r.jsx(Sg,{})})]}),r.jsx(e.Dialog.Body,{css:Kk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,labels:u,...h})=>{const p=Vf("MultiActionButton",u),[f,m]=n.useState(!1),g=l?p.disabledAriaLabel(i):void 0;return r.jsxs(e.Group,{css:tb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":g,role:"group",children:[r.jsx(Bf,{...h,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>m(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Qg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:nb,"aria-label":p.openOptionsLabel(i),"aria-haspopup":"menu","aria-expanded":f,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:f?"180":"0",color:Yg(t,l)}),disabled:l})}),r.jsx(rb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:eb(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=yL),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=yL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>yL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=yL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:XO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:QO(y&&!k,d,T),children:[r.jsxs("div",{css:eL(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:tL,children:o}):null,r.jsx("div",{css:nL(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:rL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:oL(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:aL(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Xf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(wm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:oL(T),children:l?.map(((e,t)=>r.jsx("div",{css:iL(y),children:e},t)))}),c?.length?r.jsx("div",{css:sL(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:YO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:rL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(vL,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:xL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:wL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:CL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:kL,children:[r.jsx("div",{css:CL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:SL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Kw,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4537
|
+
`],icon:r.jsx(Zf,{}),"aria-label":b?p.finishLabel:p.nextStepLabel,onClick:b?y:()=>s(o+1)})]}),b?r.jsx(Bf,{variant:"primary",size:"small",label:p.startExploringLabel,onClick:y}):r.jsx(Bf,{css:dw(v),variant:"borderless",size:"small",label:p.skipAllLabel,onClick:()=>{l?l():t(!1)}})]}),m.footer]});return r.jsx(ow,{open:e,onOpenChange:t,anchorRef:m.anchorRef,placement:m.placement,offset:m.offset,variant:c,closeOnEscape:d,closeOnOutsideClick:u,header:x,content:m.content,footer:C,labels:m.labels})},exports.IconButton=_f,exports.InlineMessage=jO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Xb,children:r.jsx(ag,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Yb(!!i,a),attached:!0,children:["start"===a?r.jsx(yv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(gg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(yv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=pC,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h,p]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const f=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},m=Object.values(d).filter((e=>!0===e)).length,g=c.groupAriaLabel(t,m,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:kw,alignItems:"flex-start","aria-label":g,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Sw,children:[t,r.jsx(gv,{label:c.activeTagLabel(m),size:"small",variant:m>0?"success":"info-grey"})]}),r.jsx("div",{css:$w,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Mb,{name:t,value:h,customGap:"0",onChange:(e,t)=>{p(t),f(e,!!t,a,t)},children:s.map((e=>r.jsx(Lw,{...e,onChange:(t,n)=>f(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Cw,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=Lw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Aw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Rw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Nw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Dw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:Iw,children:[r.jsx("div",{css:Pw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:zw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Bw,children:e}),r.jsx("p",{css:Hw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Xf,{}),onClick:s})]}),a?r.jsx("div",{css:Vw,children:a}):null,r.jsxs("div",{css:_w,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Gw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=CC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(sm,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(am,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(lm,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(cm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(dm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(um,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(hm,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Jg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=xw,exports.MapMarkers=ww,exports.MapPopUp=ow,exports.Menu=Bm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(Sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:MO,children:[r.jsxs("div",{css:EO,children:[r.jsx("div",{css:TO,children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(gg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:OO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:LO,children:[r.jsx("h3",{css:AO,children:A}),i?r.jsx("div",{css:RO,children:r.jsx(jO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:NO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:DO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:IO,children:[r.jsx("p",{css:PO,children:t.label}),r.jsx("p",{css:zO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>XO(o,t)));return r.jsx("div",{css:KO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=XO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:GO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:ZO,children:[i,a?r.jsx("div",{css:JO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(qk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:Wk(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Uk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:Kk,asChild:!0,children:r.jsx(Sg,{})})]}),r.jsx(e.Dialog.Body,{css:Gk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,labels:u,...h})=>{const p=Vf("MultiActionButton",u),[f,m]=n.useState(!1),g=l?p.disabledAriaLabel(i):void 0;return r.jsxs(e.Group,{css:nb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":g,role:"group",children:[r.jsx(Bf,{...h,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>m(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:eb(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:rb(o),"aria-label":p.openOptionsLabel(i),"aria-haspopup":"menu","aria-expanded":f,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:f?"180":"0",color:Qg(t,l)}),disabled:l})}),r.jsx(ob,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:tb(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=xL),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=xL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>xL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=xL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:YO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:eL(y&&!k,d,T),children:[r.jsxs("div",{css:tL(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:nL,children:o}):null,r.jsx("div",{css:rL(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:oL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:iL(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:lL(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Xf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(wm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:iL(T),children:l?.map(((e,t)=>r.jsx("div",{css:sL(y),children:e},t)))}),c?.length?r.jsx("div",{css:aL(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:QO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:oL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(yL,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:wL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:CL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:kL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:SL,children:[r.jsx("div",{css:kL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:$L,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Gw,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4525
4538
|
width: ${o||"15.0625rem"};
|
|
4526
4539
|
min-height: 4.375rem;
|
|
4527
4540
|
padding: ${k(300)};
|
|
@@ -4580,7 +4593,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4580
4593
|
}
|
|
4581
4594
|
}
|
|
4582
4595
|
}
|
|
4583
|
-
`),value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:
|
|
4596
|
+
`),value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:bb,children:[r.jsxs("div",{css:vb(s),children:[r.jsx("div",{css:yb,className:"option-card-icon-container",children:t.icon}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("p",{css:xb(s,t.disabled),"aria-label":t.label,"aria-disabled":t.disabled,children:t.label}),r.jsx("p",{css:wb(s,t.disabled),"aria-label":t.caption,"aria-disabled":t.disabled,children:t.caption})]})]}),l?null:r.jsx(e.RadioCard.ItemIndicator,{css:Cb(s)})]}),t.children&&"expanded"===s?r.jsx(e.RadioCard.ItemAddon,{css:(n=t.disabled,i.css`
|
|
4584
4597
|
width: 100%;
|
|
4585
4598
|
border-top: ${j(100)} solid
|
|
4586
4599
|
${w("neutral",300)};
|
|
@@ -4588,7 +4601,7 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4588
4601
|
padding: 0;
|
|
4589
4602
|
padding-top: ${k(200)};
|
|
4590
4603
|
color: ${n?w("neutral",500):"inherit"};
|
|
4591
|
-
`),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=
|
|
4604
|
+
`),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=MC,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId();return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[Zk(s),"fixed"===i?Jk:Xk],children:[e?r.jsx("div",{id:a,css:Yk,children:e}):null,r.jsx("div",{css:Qk,children:t}),o?r.jsx("div",{css:eS,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Vf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,b]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),v={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsx("div",{css:xv,children:r.jsxs(ag,{label:e,caption:t,required:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:[r.jsxs("div",{css:wv,children:[r.jsx(gg,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),b(t),a&&a({...t,password:e})})(e.target.value),noMarginBottom:!0}),r.jsx(Bf,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:Cv,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
|
|
4592
4605
|
font-size: ${C(400)};
|
|
4593
4606
|
line-height: ${S(600)};
|
|
4594
4607
|
font-weight: 400;
|
|
@@ -4600,14 +4613,14 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4600
4613
|
font-weight: 700;
|
|
4601
4614
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
4602
4615
|
}
|
|
4603
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:
|
|
4616
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:kv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Sv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Sv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Sv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Sv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Sv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:oA,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:iA(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(pm,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Vf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,b="line"===e,v="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return b&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:Yw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:Qw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:Zw(i)}),b&&r.jsx("div",{css:Jw(i)}),v&&r.jsx("div",{css:Xw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:eC,children:t}),o?r.jsx("p",{id:m,css:tC,children:o}):null]})]}),s&&a?r.jsx("div",{css:nC,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=jb,exports.RadioGroup=Mb,exports.RadioList=({label:e,caption:t,name:n,radios:o,defaultValue:i,onCheckedChange:s,errorMessage:a,horizontal:l,variant:c="default",required:d,labels:u})=>{const h=Vf("RadioList",u),p=`${e}. ${t?`${t}.`:""} ${d?h.requiredLabel:h.optionalLabel} ${a?`${h.errorPrefix} ${a}.`:""} `;return r.jsx(ag,{label:e,caption:t,errorMessage:a,required:d,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:h.requiredSymbolLabel},containerProps:{"aria-roledescription":"group","aria-label":p},children:r.jsx(Mb,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx(jb,{css:"card"===c?$v:{},...e},e.value)))})})},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=wg,onChange:a,labels:c})=>{const d=Vf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(xg.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(xg.Toolbar,{children:r.jsxs(xg.ControlGroup,{children:[s.includes("undo")?r.jsx(ng,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(rg,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Km,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(ig,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Gm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Zm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Jm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Xm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Ym,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Qm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(eg,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(bg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(tg,{label:d.imageTooltip}):null]})}),r.jsx(xg.Content,{})]})},exports.SSOButtons=Cg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:rC,children:[o?r.jsx("div",{css:(s=lC(e),i.css`
|
|
4604
4617
|
height: ${k(500)};
|
|
4605
4618
|
width: 100%;
|
|
4606
4619
|
margin-bottom: ${k(200)};
|
|
4607
4620
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
4608
4621
|
border-radius: ${$(300)};
|
|
4609
4622
|
${s?`background: ${s};`:""}
|
|
4610
|
-
`)}):r.jsx("div",{css:rC,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:oC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:iC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:oC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:sC,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Ov(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||VL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||VL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??VL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||VL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):M&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:NL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||VL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:DL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(zL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(wC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=vv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=pO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||pO(v,w)!==w.length-1);return r.jsx(dO,{ref:g,css:hO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:uO,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(yw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Bb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:$v,children:[i.step&&i.marks?r.jsx(vv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Bb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:iA,children:[e.map(((e,n)=>r.jsxs("div",{css:sA,children:[r.jsx("button",{css:aA(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:lA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:cA,children:r.jsx("div",{css:dA})})]})},exports.Switch=_b,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(LL(i,o)||0);return r.jsx("div",{css:$L(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(LL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===AL(l)?r.jsx("div",{css:EL}):null,r.jsx(e.Tabs.Trigger,{css:[jL,"view"===t&&TL,"panel"===t&&ML,"transparent"===t&&OL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===s&&s<i.length-1&&"right"===AL(l)?r.jsx("div",{css:EL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>BC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[PC]?[PC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[PC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>VC(M,e.key,q),K=e=>((e,t,n,r)=>({...zC(e,n),...VC(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...VC(s,PC,a),children:t.jsx(cb,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?DC(y):void 0,children:r.jsxs(e.Table.Root,{css:MC(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:EC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...VC(M,PC,q),children:r.jsx(cb,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,zC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:TC,children:[t.label,t.sortable?r.jsxs("div",{css:OC,children:[r.jsx(_f,{css:LC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:LC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:NC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:IC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:AC,children:[N?r.jsx(hC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:RC,children:r.jsx(jC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=_C,exports.TableRow=HC,exports.Tag=mv,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,j]=n.useState(!1),[M,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:jv,"aria-live":"polite",children:M}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Ev(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=bA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(yA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:yA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
|
|
4623
|
+
`)}):r.jsx("div",{css:oC,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:iC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:sC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:iC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:aC,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Lv(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||BL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||BL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??BL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||BL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):M&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:DL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||BL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:IL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(VL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(CC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=yv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=fO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||fO(v,w)!==w.length-1);return r.jsx(uO,{ref:g,css:pO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:hO,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(xw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Hb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:jv,children:[i.step&&i.marks?r.jsx(yv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Hb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:sA,children:[e.map(((e,n)=>r.jsxs("div",{css:aA,children:[r.jsx("button",{css:lA(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:cA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:dA,children:r.jsx("div",{css:uA})})]})},exports.Switch=Fb,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(AL(i,o)||0);return r.jsx("div",{css:jL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(AL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===RL(l)?r.jsx("div",{css:TL}):null,r.jsx(e.Tabs.Trigger,{css:[ML,"view"===t&&OL,"panel"===t&&EL,"transparent"===t&&LL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===s&&s<i.length-1&&"right"===RL(l)?r.jsx("div",{css:TL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>HC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[zC]?[zC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[zC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>BC(M,e.key,q),K=e=>((e,t,n,r)=>({...VC(e,n),...BC(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...BC(s,zC,a),children:t.jsx(db,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?IC(y):void 0,children:r.jsxs(e.Table.Root,{css:EC(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:TC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...BC(M,zC,q),children:r.jsx(db,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,VC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:OC,children:[t.label,t.sortable?r.jsxs("div",{css:LC,children:[r.jsx(_f,{css:AC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:AC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:DC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:PC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:RC,children:[N?r.jsx(pC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:NC,children:r.jsx(MC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=FC,exports.TableRow=_C,exports.Tag=gv,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,j]=n.useState(!1),[M,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Ev,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Ev,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:Mv,"aria-live":"polite",children:M}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Tv(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=vA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(xA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:xA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
|
|
4611
4624
|
justify-content: space-between;
|
|
4612
4625
|
align-items: center;
|
|
4613
4626
|
gap: ${k(200)};
|
|
@@ -4651,4 +4664,4 @@ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4651
4664
|
color: ${w("error",900)};
|
|
4652
4665
|
}
|
|
4653
4666
|
}
|
|
4654
|
-
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:
|
|
4667
|
+
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:hA,"aria-label":`${n.title}`,children:n.title}),n.description?r.jsx(e.Toast.Title,{css:pA,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[n.action?r.jsx(Bf,{css:fA,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),xA[t].dismiss(n.id)}}):null,n.meta?.closable?r.jsx(Bf,{css:mA,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||o.dismissLabel,leftIcon:r.jsx(Xf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),xA[t].dismiss(n.id)}}):null]}):null]});var s}})},t))):null},exports.Toolbar=Jg,exports.Tooltip=Fm,exports.closeToast=e=>{Object.values(xA).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{xA[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
|