@worldresources/wri-design-systems 2.166.0 → 2.168.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +257 -234
- package/dist/index.d.ts +9 -2
- package/dist/index.esm.js +254 -231
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -992,6 +992,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
992
992
|
`,vn=({name:e,defaultChecked:t=!1,onChange:n,disabled:r=!1,isLabelOnLeft:i=!1,children:o,...a})=>G("div",{style:{display:"flex",alignItems:"center"},children:q(x.Root,{css:gn,id:e,name:e,"aria-label":a["aria-label"]||e,defaultChecked:t,onCheckedChange:({checked:t})=>{n&&n(e,t)},disabled:r,...a,children:[i&&null!=o?G(x.Label,{children:o}):null,G(x.HiddenInput,{style:{width:"42px",height:"26px"}}),G("div",{className:"chakra-switch__control-container",children:G(x.Control,{children:G(x.Thumb,{children:G(x.ThumbIndicator,{display:"flex",children:G(Te,{})})})})}),i||null==o?null:G(x.Label,{children:o})]})}),mn=de`
|
|
993
993
|
position: relative;
|
|
994
994
|
height: 100%;
|
|
995
|
+
width: 100%;
|
|
995
996
|
&:focus-visible {
|
|
996
997
|
outline-color: ${we("primary",700)};
|
|
997
998
|
}
|
|
@@ -1000,8 +1001,8 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1000
1001
|
line-height: 24px;
|
|
1001
1002
|
color: ${we("neutral",900)};
|
|
1002
1003
|
text-align: left;
|
|
1003
|
-
|
|
1004
|
-
|
|
1004
|
+
width: 100%;
|
|
1005
|
+
#required-symbol {
|
|
1005
1006
|
color: ${we("error",500)};
|
|
1006
1007
|
margin-right: 3px;
|
|
1007
1008
|
}
|
|
@@ -1010,12 +1011,18 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1010
1011
|
line-height: 20px;
|
|
1011
1012
|
color: ${we("neutral",700)};
|
|
1012
1013
|
text-align: left;
|
|
1013
|
-
`,yn=e=>de`
|
|
1014
|
+
`,yn=(e,t)=>de`
|
|
1014
1015
|
margin-top: 12px;
|
|
1015
1016
|
display: flex;
|
|
1016
1017
|
flex-direction: ${e?"row":"column"};
|
|
1017
1018
|
flex-wrap: wrap;
|
|
1018
1019
|
gap: ${e?"20px":"12px"};
|
|
1020
|
+
max-height: ${t?"1000px":"0"};
|
|
1021
|
+
overflow: hidden;
|
|
1022
|
+
opacity: ${t?1:0};
|
|
1023
|
+
transition:
|
|
1024
|
+
max-height 250ms ease,
|
|
1025
|
+
opacity 200ms ease;
|
|
1019
1026
|
`,wn=de`
|
|
1020
1027
|
width: 3px;
|
|
1021
1028
|
height: 100%;
|
|
@@ -1029,13 +1036,29 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1029
1036
|
font-weight: 700;
|
|
1030
1037
|
color: ${we("error",900)};
|
|
1031
1038
|
text-align: left;
|
|
1032
|
-
`,$n=
|
|
1033
|
-
|
|
1034
|
-
|
|
1039
|
+
`,$n=de`
|
|
1040
|
+
color: ${we("neutral",700)};
|
|
1041
|
+
margin-left: 4px;
|
|
1042
|
+
`,kn=de`
|
|
1043
|
+
color: ${we("neutral",700)};
|
|
1044
|
+
display: flex;
|
|
1045
|
+
align-items: center;
|
|
1046
|
+
gap: 4;
|
|
1047
|
+
font-size: 14;
|
|
1048
|
+
background: none;
|
|
1049
|
+
border: none;
|
|
1050
|
+
cursor: pointer;
|
|
1051
|
+
> span {
|
|
1052
|
+
margin-left: 6px;
|
|
1053
|
+
}
|
|
1054
|
+
`,Sn=({label:e,caption:t,checkboxes:n,defaultValue:r,onCheckedChange:i,errorMessage:o,horizontal:a,required:l,hideCheckedCounter:c=!1,hideExpandToggle:d=!1})=>{const[u,p]=J(r?{[r]:!0}:{}),[h,f]=J(!0),g="string"!=typeof e,v=n.length>0&&n.every((e=>e.name&&u[e.name])),m=n.some((e=>e.name&&u[e.name]))&&!v,x=n.length,b=`${n.filter((e=>e?.name&&u[e.name])).length} / ${x}`,y=t?`${t}.`:"",w=l?"Required.":"Optional",C=o?`Error: ${o}.`:"",$=`${g?e.label:e}. ${y} ${w} ${C} `;return q(s,{css:mn,"aria-label":$,children:[o?G("div",{css:wn}):null,q("div",{css:(k=!!o,de`
|
|
1055
|
+
margin-left: ${k?"19px":"0px"};
|
|
1056
|
+
width: 100%;
|
|
1057
|
+
`),children:[G("div",{css:xn,children:"string"==typeof e?q(U,{children:[l&&G("span",{id:"required-symbol","aria-label":"required",children:"*"}),e]}):q("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[q(At,{checked:v,indeterminate:m,onCheckedChange:e=>(e=>{const t=n.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});p(t),i?.(t)})(!!e.checked),children:[e.label," ",!c&&G("span",{"aria-hidden":"true",css:$n,children:b})]}),!d&&q("button",{type:"button",onClick:()=>f((e=>!e)),"aria-expanded":h,"aria-controls":"checkbox-list",css:kn,children:[h?"Hide":"Expand",G("span",{"aria-hidden":"true",children:G(Me,h?{style:{transform:"rotate(180deg)"}}:{})})]})]})}),G("p",{css:bn,"aria-label":t,children:t}),o?G("p",{css:Cn,"aria-label":o,children:o}):null,G("div",{id:"checkbox-list",css:yn(a,h),children:n.map((e=>G(At,{ms:g&&!a?"6":"",css:{},checked:!!e?.name&&!!u[e.name],onCheckedChange:({checked:t})=>((e,t)=>{const n={...u};t&&(n[t]=e,p(n)),i&&i(n)})(t,e.name),...e},e.name)))})]})]});var k},En=de`
|
|
1035
1058
|
width: 100%;
|
|
1036
1059
|
max-width: 370px;
|
|
1037
1060
|
position: relative;
|
|
1038
|
-
`,
|
|
1061
|
+
`,Ln=e=>de`
|
|
1039
1062
|
font-size: 16px;
|
|
1040
1063
|
line-height: 24px;
|
|
1041
1064
|
font-weight: 400;
|
|
@@ -1046,26 +1069,26 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1046
1069
|
color: ${e?we("neutral",600):we("error",500)};
|
|
1047
1070
|
margin-right: 3px;
|
|
1048
1071
|
}
|
|
1049
|
-
`,
|
|
1072
|
+
`,On=e=>de`
|
|
1050
1073
|
font-size: 14px;
|
|
1051
1074
|
line-height: 20px;
|
|
1052
1075
|
font-weight: 400;
|
|
1053
1076
|
color: ${we("neutral",e?600:700)};
|
|
1054
1077
|
text-align: left;
|
|
1055
|
-
`,
|
|
1078
|
+
`,Rn=de`
|
|
1056
1079
|
width: 3px;
|
|
1057
1080
|
height: 100%;
|
|
1058
1081
|
background-color: ${we("error",900)};
|
|
1059
1082
|
position: absolute;
|
|
1060
1083
|
top: 0;
|
|
1061
1084
|
left: 0;
|
|
1062
|
-
`,
|
|
1085
|
+
`,Tn=de`
|
|
1063
1086
|
font-size: 14px;
|
|
1064
1087
|
line-height: 20px;
|
|
1065
1088
|
font-weight: 700;
|
|
1066
1089
|
color: ${we("error",900)};
|
|
1067
1090
|
text-align: left;
|
|
1068
|
-
`,
|
|
1091
|
+
`,Pn=(e,t)=>de`
|
|
1069
1092
|
width: 100%;
|
|
1070
1093
|
margin-top: 8px;
|
|
1071
1094
|
|
|
@@ -1101,7 +1124,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1101
1124
|
padding: 0 4px;
|
|
1102
1125
|
}
|
|
1103
1126
|
}
|
|
1104
|
-
`,
|
|
1127
|
+
`,_n=e=>de`
|
|
1105
1128
|
position: relative;
|
|
1106
1129
|
height: 100%;
|
|
1107
1130
|
width: 100%;
|
|
@@ -1110,14 +1133,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1110
1133
|
align-items: flex-start;
|
|
1111
1134
|
gap: ${"small"===e?"12px":"16px"};
|
|
1112
1135
|
margin-bottom: 20px;
|
|
1113
|
-
`,
|
|
1136
|
+
`,Mn=de`
|
|
1114
1137
|
width: 3px;
|
|
1115
1138
|
height: 100%;
|
|
1116
1139
|
background-color: ${we("error",900)};
|
|
1117
1140
|
position: absolute;
|
|
1118
1141
|
top: 0;
|
|
1119
1142
|
left: 0;
|
|
1120
|
-
`,
|
|
1143
|
+
`,Dn=(e,t)=>de`
|
|
1121
1144
|
color: ${we("neutral",t?600:900)};
|
|
1122
1145
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1123
1146
|
font-weight: 400;
|
|
@@ -1139,7 +1162,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1139
1162
|
margin-top: 4px;
|
|
1140
1163
|
color: ${t?we("neutral",600):we("error",500)};
|
|
1141
1164
|
}
|
|
1142
|
-
`,
|
|
1165
|
+
`,Nn=(e,t)=>de`
|
|
1143
1166
|
color: ${we("neutral",t?600:700)};
|
|
1144
1167
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1145
1168
|
font-weight: 400;
|
|
@@ -1148,13 +1171,13 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1148
1171
|
&:first-letter {
|
|
1149
1172
|
text-transform: uppercase;
|
|
1150
1173
|
}
|
|
1151
|
-
`,
|
|
1174
|
+
`,Vn=e=>de`
|
|
1152
1175
|
color: ${we("error",900)};
|
|
1153
1176
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1154
1177
|
font-weight: 700;
|
|
1155
1178
|
line-height: ${"small"===e?"16px":"20px"};
|
|
1156
1179
|
margin-top: 2px;
|
|
1157
|
-
`,
|
|
1180
|
+
`,jn=(e,t,n)=>de`
|
|
1158
1181
|
height: ${"small"===e?"28px":"40px"};
|
|
1159
1182
|
width: 100%;
|
|
1160
1183
|
border-radius: 4px;
|
|
@@ -1192,7 +1215,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1192
1215
|
}
|
|
1193
1216
|
|
|
1194
1217
|
${t||n?`\n border: 1px solid ${we("neutral",700)};\n `:""}
|
|
1195
|
-
`,
|
|
1218
|
+
`,In=({label:e,caption:t,placeholder:n,errorMessage:r,required:i,disabled:o,size:a="default",defaultValue:l="",onChange:s,...c})=>{const[d,u]=J(l);return q("div",{css:_n(a),className:"ds-text-input-container",children:[r?G("div",{css:Mn}):null,q(b.Root,{required:i,invalid:!!r,gap:"0",style:{marginLeft:r?"19px":"0px"},children:[e?q(b.Label,{css:Dn(a,o),"aria-label":e,children:[G(b.RequiredIndicator,{"aria-label":"required"}),e,i?"":G("span",{children:" (Optional)"})]}):null,t?G(b.HelperText,{css:Nn(a,o),"aria-label":t,children:t}):null,r?G(b.ErrorText,{css:Vn(a),"aria-label":r,children:r}):null,G(y,{placeholder:n,disabled:o,css:jn(a,d,l),onChange:e=>{u(e.target.value),s&&s(e)},value:d,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...c})]})]})},An=X.forwardRef(((e,t)=>{const{children:n,...r}=e;return pe(w.Control,{...r,children:[ue(w.Trigger,{ref:t,children:n}),ue(w.IndicatorGroup,{children:ue(w.Indicator,{children:ue(Me,{})})})]})})),zn=X.forwardRef(((e,t)=>{const{...n}=e;return ue(l,{children:ue(w.Positioner,{children:ue(w.Content,{...n,ref:t})})})})),Hn=X.forwardRef(((e,t)=>{const{item:n,children:r,...i}=e;return ue(w.Item,{item:n,...i,ref:t,children:r},n.value)})),Bn=X.forwardRef(((e,t)=>{const{children:n,...r}=e;return ue(w.ValueText,{...r,ref:t,children:ue(w.Context,{children:t=>{const r=t.selectedItems;return 0===r.length?e.placeholder:n?n(r):1===r.length?t.collection.stringifyItem(r[0]):`${r.length} selected`}})})})),Fn=X.forwardRef(((e,t)=>ue(w.Root,{...e,ref:t,positioning:{sameWidth:!0,...e.positioning},children:e.asChild?e.children:pe(he,{children:[ue(w.HiddenSelect,{}),e.children]})})));X.forwardRef(((e,t)=>{const{children:n,label:r,...i}=e;return pe(w.ItemGroup,{...i,ref:t,children:[ue(w.ItemGroupLabel,{children:r}),n]})}));const Zn=w.Label;w.ItemText;const Wn=e=>de`
|
|
1196
1219
|
position: relative;
|
|
1197
1220
|
height: 100%;
|
|
1198
1221
|
width: 100%;
|
|
@@ -1204,14 +1227,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1204
1227
|
&:focus-visible {
|
|
1205
1228
|
outline-color: ${we("primary",700)};
|
|
1206
1229
|
}
|
|
1207
|
-
`,
|
|
1230
|
+
`,qn=de`
|
|
1208
1231
|
width: 3px;
|
|
1209
1232
|
height: 100%;
|
|
1210
1233
|
background-color: ${we("error",900)};
|
|
1211
1234
|
position: absolute;
|
|
1212
1235
|
top: 0;
|
|
1213
1236
|
left: 0;
|
|
1214
|
-
`,
|
|
1237
|
+
`,Gn=e=>de`
|
|
1215
1238
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1216
1239
|
line-height: ${"small"===e?"20px":"24px"};
|
|
1217
1240
|
font-weight: 400;
|
|
@@ -1230,7 +1253,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1230
1253
|
color: ${we("neutral",600)};
|
|
1231
1254
|
}
|
|
1232
1255
|
}
|
|
1233
|
-
`,
|
|
1256
|
+
`,Un=(e,t)=>de`
|
|
1234
1257
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1235
1258
|
line-height: ${"small"===e?"16px":"20px"};
|
|
1236
1259
|
font-weight: 400;
|
|
@@ -1238,7 +1261,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1238
1261
|
text-align: left;
|
|
1239
1262
|
|
|
1240
1263
|
${t?`color: ${we("neutral",600)} !important;`:""}
|
|
1241
|
-
`,
|
|
1264
|
+
`,Xn=(e,t,n,r)=>de`
|
|
1242
1265
|
.chakra-select__trigger {
|
|
1243
1266
|
min-height: ${"small"===e?"32px":"40px"};
|
|
1244
1267
|
border-radius: 4px;
|
|
@@ -1293,40 +1316,40 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1293
1316
|
}
|
|
1294
1317
|
}
|
|
1295
1318
|
}
|
|
1296
|
-
`,
|
|
1319
|
+
`,Yn=de`
|
|
1297
1320
|
margin-top: -8px;
|
|
1298
1321
|
border-radius: 4px;
|
|
1299
1322
|
border: 1px solid ${we("neutral",400)};
|
|
1300
1323
|
border-top-left-radius: 0px;
|
|
1301
1324
|
border-top-right-radius: 0px;
|
|
1302
1325
|
border-top: none;
|
|
1303
|
-
`,
|
|
1326
|
+
`,Kn=de`
|
|
1304
1327
|
align-items: flex-start;
|
|
1305
1328
|
&[data-highlighted] {
|
|
1306
1329
|
background-color: ${we("neutral",200)};
|
|
1307
1330
|
cursor: pointer;
|
|
1308
1331
|
}
|
|
1309
|
-
`,
|
|
1332
|
+
`,Jn=(e,t)=>de`
|
|
1310
1333
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1311
1334
|
line-height: ${"small"===e?"20px":"24px"};
|
|
1312
1335
|
color: ${we("neutral",800)};
|
|
1313
1336
|
text-align: left;
|
|
1314
1337
|
|
|
1315
1338
|
${t?`color: ${we("neutral",600)} !important;`:""}
|
|
1316
|
-
`,
|
|
1339
|
+
`,Qn=(e,t)=>de`
|
|
1317
1340
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1318
1341
|
line-height: ${"small"===e?"20px":"24px"};
|
|
1319
1342
|
color: ${we("neutral",700)};
|
|
1320
1343
|
text-align: left;
|
|
1321
1344
|
|
|
1322
1345
|
${t?`color: ${we("neutral",600)} !important;`:""}
|
|
1323
|
-
`,
|
|
1346
|
+
`,er=e=>de`
|
|
1324
1347
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1325
1348
|
line-height: ${"small"===e?"16px":"20px"};
|
|
1326
1349
|
font-weight: 700;
|
|
1327
1350
|
color: ${we("error",900)};
|
|
1328
1351
|
text-align: left;
|
|
1329
|
-
`,
|
|
1352
|
+
`,tr=e=>de`
|
|
1330
1353
|
max-width: 100%;
|
|
1331
1354
|
display: flex;
|
|
1332
1355
|
justify-content: center;
|
|
@@ -1398,28 +1421,28 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1398
1421
|
background-color: ${we("neutral",300)};
|
|
1399
1422
|
color: ${we("neutral",600)};
|
|
1400
1423
|
}
|
|
1401
|
-
`,
|
|
1424
|
+
`,nr=de`
|
|
1402
1425
|
background-color: ${we("neutral",100)};
|
|
1403
1426
|
border: 1px solid ${we("neutral",300)};
|
|
1404
|
-
`,
|
|
1427
|
+
`,rr=de`
|
|
1405
1428
|
background-color: ${we("neutral",200)};
|
|
1406
1429
|
border: 1px solid ${we("neutral",400)};
|
|
1407
|
-
`,
|
|
1430
|
+
`,ir=de`
|
|
1408
1431
|
background-color: ${we("success",100)};
|
|
1409
1432
|
border: 1px solid ${we("success",300)};
|
|
1410
1433
|
color: ${we("success",900)};
|
|
1411
|
-
`,
|
|
1434
|
+
`,or=de`
|
|
1412
1435
|
background-color: ${we("warning",100)};
|
|
1413
1436
|
border: 1px solid ${we("warning",300)};
|
|
1414
1437
|
color: ${we("warning",900)};
|
|
1415
|
-
`,
|
|
1438
|
+
`,ar=de`
|
|
1416
1439
|
background-color: ${we("error",100)};
|
|
1417
1440
|
border: 1px solid ${we("error",300)};
|
|
1418
1441
|
color: ${we("error",900)};
|
|
1419
|
-
`,
|
|
1442
|
+
`,lr=({label:e,size:t="default",variant:n,disabled:r,icon:i,onClose:o,closable:a,...l})=>{let s=nr;return"info-grey"===n?s=rr:"success"===n?s=ir:"warning"===n?s=or:"error"===n&&(s=ar),q(C.Root,{css:[tr(t),s],"data-disabled":r,...l,children:[i?G(C.StartElement,{"aria-label":`${e} tag icon`,children:i}):null,G(C.Label,{"aria-label":e,children:e}),a&&!r&&"small"!==t?G(C.EndElement,{children:G("div",{className:"chakra-tag__closeTrigger",role:"button",tabIndex:0,onClick:o,onKeyDown:e=>{!o||"Enter"!==e.key&&" "!==e.key||o()},"aria-label":`${e} tag close button`,children:G(Ne,{})})}):null]})},sr=({placeholder:e,size:t,disabled:n})=>G(Bn,{placeholder:e,children:e=>{const{label:r,caption:i}=e[0];return q(p,{flexDirection:"column",alignItems:"flex-start",children:[G("p",{css:Jn(t,n),children:r}),i?G("p",{css:Qn(t,n),children:i}):null]})}}),cr=({placeholder:e,removeItem:t,disabled:n})=>G(Bn,{placeholder:e,children:e=>e.map((e=>G(p,{flexDirection:"row",alignItems:"flex-start",children:G(lr,{label:e.label,variant:"info-grey",disabled:n,onClose:()=>t(e.value),closable:!0},e.value)},e.value)))}),dr=({label:e,caption:t,placeholder:n="",items:i,size:o="default",required:a,disabled:l,onChange:c,errorMessage:d,multiple:u,...p})=>{const[h,f]=J(p.defaultValue||[]),g=(e=>$({items:e}))(i),v=e=>{f(e),c&&c(e)},m=`${e||"Select input"}${a?" required.":""}${t?` ${t}.`:""}${l?" Disabled.":""}`.trim();return q(s,{css:Wn(o),style:p.style,className:"ds-select-input-container",tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":l?m:void 0,children:[d?G("div",{css:qn}):null,q(Fn,{css:{},collection:g,disabled:l,required:a,multiple:u,"aria-label":p["aria-label"]||e,value:h,onValueChange:e=>v(e.value),style:{marginLeft:d?"19px":"0px"},...p,children:[e?q(Zn,{css:Gn(o),children:[a?G("span",{children:"*"}):null,e]}):null,t?G("p",{css:Un(o,l),children:t}):null,d&&G("p",{css:er(o),children:d}),G(An,{css:Xn(o,h.length>0,!!d,u),children:u?G(cr,{placeholder:n,disabled:l,removeItem:e=>{const t=h.filter((t=>t!==e));v(t)}}):G(sr,{placeholder:n,size:o,disabled:l})}),G(zn,{css:Yn,children:g.items.map((e=>q(Hn,{css:Kn,item:e,children:[q(r,{children:[G("p",{css:Jn(o),children:e.label}),G("p",{css:Qn(o),children:e.caption})]}),u?G(At,{checked:h.some((t=>t===e.value))}):null]},e.value)))})]})]})},ur=({label:e,caption:t,errorMessage:n,units:r,unitsPosition:i="end",defaultUnit:o="",defaultValue:a="",onChange:l,required:c,disabled:d})=>{const[u,p]=J(a),[h,f]=J(o?[o]:[r[0].value]),g=(e,t)=>{l&&l("end"===i?""+(t?`${u} ${e}`:`${e} ${h}`):""+(t?`${e} ${u}`:`${h} ${e}`))};return q("div",{css:En,children:[n?G("div",{css:Rn}):null,q("div",{style:{marginLeft:n?"19px":"0px"},children:[q("p",{css:Ln(d),"aria-label":e,children:[c?G("span",{children:"*"}):null,e]}),G("p",{css:On(d),"aria-label":t,children:t}),n?G("p",{css:Tn,"aria-label":n,children:n}):null,q(s,{css:Pn(!!n,i),attached:!0,children:["start"===i?G(dr,{placeholder:"",value:h,items:r,disabled:d,onChange:e=>{f(e),g(e?.[0],!0)}}):null,G(In,{type:"number",value:u,disabled:d,onChange:e=>{p(e.target.value),g(e.target.value)}}),"end"===i?G(dr,{placeholder:"",value:h,items:r,disabled:d,onChange:e=>{f(e),g(e?.[0],!0)}}):null]})]})]})},pr=de`
|
|
1420
1443
|
width: 100%;
|
|
1421
1444
|
max-width: 486px;
|
|
1422
|
-
`,
|
|
1445
|
+
`,hr=de`
|
|
1423
1446
|
font-size: 16px;
|
|
1424
1447
|
line-height: 24px;
|
|
1425
1448
|
font-weight: 400;
|
|
@@ -1430,13 +1453,13 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1430
1453
|
color: ${we("error",500)};
|
|
1431
1454
|
margin-right: 3px;
|
|
1432
1455
|
}
|
|
1433
|
-
`,
|
|
1456
|
+
`,fr=de`
|
|
1434
1457
|
font-size: 14px;
|
|
1435
1458
|
line-height: 20px;
|
|
1436
1459
|
font-weight: 400;
|
|
1437
1460
|
color: ${we("neutral",700)};
|
|
1438
1461
|
text-align: left;
|
|
1439
|
-
`,
|
|
1462
|
+
`,gr=de`
|
|
1440
1463
|
display: flex;
|
|
1441
1464
|
align-items: center;
|
|
1442
1465
|
justify-content: space-between;
|
|
@@ -1454,9 +1477,9 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1454
1477
|
button {
|
|
1455
1478
|
width: 98px;
|
|
1456
1479
|
}
|
|
1457
|
-
`,
|
|
1480
|
+
`,vr=de`
|
|
1458
1481
|
margin-top: 12px;
|
|
1459
|
-
`,
|
|
1482
|
+
`,mr=e=>de`
|
|
1460
1483
|
height: 8px;
|
|
1461
1484
|
width: 100%;
|
|
1462
1485
|
background-color: ${we("neutral",300)};
|
|
@@ -1470,7 +1493,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1470
1493
|
background-color: ${we("Medium"===e?"warning":"Strong"===e||"Very Strong"===e?"success":"error",900)};
|
|
1471
1494
|
border-radius: 8px;
|
|
1472
1495
|
}
|
|
1473
|
-
`,
|
|
1496
|
+
`,xr=e=>de`
|
|
1474
1497
|
display: flex;
|
|
1475
1498
|
align-items: center;
|
|
1476
1499
|
gap: 4px;
|
|
@@ -1487,7 +1510,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1487
1510
|
justify-content: center;
|
|
1488
1511
|
align-items: center;
|
|
1489
1512
|
}
|
|
1490
|
-
`,
|
|
1513
|
+
`,br=({label:e,caption:t,required:n,disabledRules:r,onChange:i,minLength:o=8,hideValidations:a})=>{const[l,s]=J(!1),[c,d]=J(""),[u,p]=J({strength:"Very weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1});return q("div",{css:pr,children:[q("p",{css:hr,"aria-label":e,children:[n?G("span",{children:"*"}):null,e]}),G("p",{css:fr,"aria-label":t,children:t}),q("div",{css:gr,children:[G(In,{type:l?"text":"password",value:c,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...u};let n=0,r=!1;t.length=e.length>=o,n+=e.length>=o?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>=o&&n>=4&&(t.strength="Strong"),e.length>=o+2&&n>=5&&(t.strength="Very Strong"),d(e),p(t),i&&i(t)})(e.target.value)}),G(Le,{label:l?"Hide":"Show",variant:"secondary",leftIcon:G(l?Ie:je,{}),"aria-label":l?"Hide password":"Show password",onClick:()=>s(!l),type:"button"})]}),c&&!a?q("div",{id:"password-guidelines",css:vr,"aria-live":"polite",children:[q("p",{css:(h=u.strength,de`
|
|
1491
1514
|
font-size: 16px;
|
|
1492
1515
|
line-height: 24px;
|
|
1493
1516
|
font-weight: 400;
|
|
@@ -1498,13 +1521,13 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1498
1521
|
font-weight: 700;
|
|
1499
1522
|
color: ${we("Medium"===h?"warning":"Strong"===h||"Very Strong"===h?"success":"error",900)};
|
|
1500
1523
|
}
|
|
1501
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",G("span",{children:u.strength})]}),G("div",{css:
|
|
1524
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",G("span",{children:u.strength})]}),G("div",{css:mr(u.strength),children:G("div",{})}),q("div",{css:xr(u.length),"aria-label":`Use a minimum of ${o} characters. ${u.length?"Requirement met.":"Requirement not met."}`,children:[G("div",{children:u.length?G(Te,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):G(Ne,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),q("p",{children:["Use a minimum of ",o," characters"]})]}),r?.uppercase?null:q("div",{css:xr(u.uppercase),"aria-label":"Use an uppercase letter. "+(u.uppercase?"Requirement met.":"Requirement not met."),children:[G("div",{children:u.uppercase?G(Te,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):G(Ne,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),G("p",{children:"Use an uppercase letter"})]}),r?.lowercase?null:q("div",{css:xr(u.lowercase),"aria-label":"Use a lowercase letter. "+(u.lowercase?"Requirement met.":"Requirement not met."),children:[G("div",{children:u.lowercase?G(Te,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):G(Ne,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),G("p",{children:"Use a lowercase letter"})]}),r?.numbers?null:q("div",{css:xr(u.numbers),"aria-label":"Use a number. "+(u.numbers?"Requirement met.":"Requirement not met."),children:[G("div",{children:u.numbers?G(Te,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):G(Ne,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),G("p",{children:"Use a number"})]}),r?.specialCharacters?null:q("div",{css:xr(u.specialCharacters),"aria-label":"Use a special character. "+(u.specialCharacters?"Requirement met.":"Requirement not met."),children:[G("div",{children:u.specialCharacters?G(Te,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):G(Ne,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),G("p",{children:"Use a special character"})]})]}):null]});var h},yr=de`
|
|
1502
1525
|
position: relative;
|
|
1503
1526
|
height: 100%;
|
|
1504
1527
|
&:focus-visible {
|
|
1505
1528
|
outline-color: ${we("primary",700)};
|
|
1506
1529
|
}
|
|
1507
|
-
`,
|
|
1530
|
+
`,wr=de`
|
|
1508
1531
|
font-size: 16px;
|
|
1509
1532
|
line-height: 24px;
|
|
1510
1533
|
color: ${we("neutral",900)};
|
|
@@ -1514,27 +1537,27 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1514
1537
|
color: ${we("error",500)};
|
|
1515
1538
|
margin-right: 3px;
|
|
1516
1539
|
}
|
|
1517
|
-
`,
|
|
1540
|
+
`,Cr=de`
|
|
1518
1541
|
font-size: 14px;
|
|
1519
1542
|
line-height: 20px;
|
|
1520
1543
|
color: ${we("neutral",700)};
|
|
1521
1544
|
text-align: left;
|
|
1522
|
-
|
|
1545
|
+
`,$r=de`
|
|
1523
1546
|
margin-top: 12px;
|
|
1524
|
-
`,
|
|
1547
|
+
`,kr=de`
|
|
1525
1548
|
width: 3px;
|
|
1526
1549
|
height: 100%;
|
|
1527
1550
|
background-color: ${we("error",900)};
|
|
1528
1551
|
position: absolute;
|
|
1529
1552
|
top: 0;
|
|
1530
1553
|
left: 0;
|
|
1531
|
-
|
|
1554
|
+
`,Sr=de`
|
|
1532
1555
|
font-size: 14px;
|
|
1533
1556
|
line-height: 20px;
|
|
1534
1557
|
font-weight: 700;
|
|
1535
1558
|
color: ${we("error",900)};
|
|
1536
1559
|
text-align: left;
|
|
1537
|
-
`,
|
|
1560
|
+
`,Er=de`
|
|
1538
1561
|
height: 100%;
|
|
1539
1562
|
min-height: 48px;
|
|
1540
1563
|
width: 100%;
|
|
@@ -1543,9 +1566,9 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1543
1566
|
border-radius: 4px;
|
|
1544
1567
|
background-color: ${we("neutral",100)};
|
|
1545
1568
|
padding: 12px;
|
|
1546
|
-
`,
|
|
1569
|
+
`,Lr=({label:e,caption:t,name:n,radios:r,defaultValue:i,onCheckedChange:o,errorMessage:a,horizontal:l,variant:c="default",required:d})=>{return q(s,{css:yr,"aria-roledescription":"group","aria-label":`${e}. ${t?`${t}.`:""} ${d?"Required.":"Optional."} ${a?`Error: ${a}.`:""} `,children:[a?G("div",{css:kr}):null,q("div",{css:(u=!!a,de`
|
|
1547
1570
|
margin-left: ${u?"19px":"0px"};
|
|
1548
|
-
`),children:[q("p",{css:
|
|
1571
|
+
`),children:[q("p",{css:wr,"aria-label":e,children:[d&&G("span",{"aria-label":"required",children:"*"}),e]}),G("p",{css:Cr,"aria-label":t,children:t}),a?G("p",{css:Sr,"aria-label":a,children:a}):null,G("div",{css:$r,children:G(on,{name:n,defaultValue:i,onChange:o,horizontal:l&&"card"!==c,children:r.map((e=>G(rn,{css:"card"===c?Er:{},...e},e.value)))})})]})]});var u},Or=e=>de`
|
|
1549
1572
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1550
1573
|
line-height: ${"small"===e?"20px":"24px"};
|
|
1551
1574
|
font-weight: 400;
|
|
@@ -1556,13 +1579,13 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1556
1579
|
color: ${we("error",500)};
|
|
1557
1580
|
margin-right: 3px;
|
|
1558
1581
|
}
|
|
1559
|
-
`,
|
|
1582
|
+
`,Rr=e=>de`
|
|
1560
1583
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1561
1584
|
line-height: ${"small"===e?"16px":"20px"};
|
|
1562
1585
|
font-weight: 400;
|
|
1563
1586
|
color: ${we("neutral",700)};
|
|
1564
1587
|
text-align: left;
|
|
1565
|
-
`,
|
|
1588
|
+
`,Tr=de`
|
|
1566
1589
|
display: flex;
|
|
1567
1590
|
align-items: center;
|
|
1568
1591
|
gap: 12px;
|
|
@@ -1583,7 +1606,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1583
1606
|
margin-top: 18px;
|
|
1584
1607
|
width: 100%;
|
|
1585
1608
|
}
|
|
1586
|
-
`,
|
|
1609
|
+
`,Pr=({label:e,caption:t,size:n="default",sliderItem:r,required:i,onChange:o})=>{const[a,l]=J(r.value||[]),s=(e,t)=>{const n=e.target.value,i=[...a];let o=n?parseInt(n,10):n;const s=r.min||0,c=r.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>c?c:o,i[t]=o,l(i)},c=(e,t)=>{const n=e.target.value||"0",i=[...a];let s=parseInt(n,10);const c=r.min||0,d=r.max||100;if(s=Number.isNaN(s)?c:s,s=s<c?c:s,s=s>d?d:s,2===a?.length){s=Number.isNaN(s)?c:s;const e=a[0],n=a[1];0===t?(s=s<c?c:s,s=s>n?n:s):1===t&&(s=s<e?e:s,s=s>d?d:s)}i[t]=s,l(i),o&&o(i)};return q("div",{children:[q("p",{css:Or(n),"aria-label":e,children:[i?G("span",{children:"*"}):null,e]}),t?G("p",{css:Rr(n),"aria-label":t,children:t}):null,q("div",{css:Tr,children:[r.step&&r.marks?G(dr,{items:r.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${a?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));l(t),o&&o(t)}}):G(In,{"aria-label":e,min:r.min,max:r.max,value:a?.[0],type:"number",onChange:e=>s(e,0),onBlur:e=>c(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),G(fn,{css:{},...r,value:a,onValueChangeEnd:e=>{l(e.value),o&&o(e.value)}}),2===a?.length?G(In,{"aria-label":e,min:r.min,max:r.max,value:a?.[1],type:"number",onChange:e=>s(e,1),onBlur:e=>c(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},_r=e=>de`
|
|
1587
1610
|
position: relative;
|
|
1588
1611
|
height: 100%;
|
|
1589
1612
|
width: 100%;
|
|
@@ -1592,14 +1615,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1592
1615
|
align-items: flex-start;
|
|
1593
1616
|
gap: ${"small"===e?"12px":"16px"};
|
|
1594
1617
|
margin-bottom: 16px;
|
|
1595
|
-
`,
|
|
1618
|
+
`,Mr=de`
|
|
1596
1619
|
width: 3px;
|
|
1597
1620
|
height: 100%;
|
|
1598
1621
|
background-color: ${we("error",900)};
|
|
1599
1622
|
position: absolute;
|
|
1600
1623
|
top: 0;
|
|
1601
1624
|
left: 0;
|
|
1602
|
-
`,
|
|
1625
|
+
`,Dr=(e,t)=>de`
|
|
1603
1626
|
color: ${we("neutral",t?600:900)};
|
|
1604
1627
|
font-size: ${"small"===e?"14px":"16px"};
|
|
1605
1628
|
font-weight: 400;
|
|
@@ -1613,24 +1636,24 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1613
1636
|
.chakra-field__requiredIndicator {
|
|
1614
1637
|
color: ${t?we("neutral",600):we("error",500)};
|
|
1615
1638
|
}
|
|
1616
|
-
`,
|
|
1639
|
+
`,Nr=(e,t)=>de`
|
|
1617
1640
|
color: ${we("neutral",t?600:700)};
|
|
1618
1641
|
font-size: ${"small"===e?"12px":"14px"};
|
|
1619
1642
|
font-weight: 400;
|
|
1620
1643
|
line-height: ${"small"===e?"16px":"20px"};
|
|
1621
|
-
`,
|
|
1644
|
+
`,Vr=de`
|
|
1622
1645
|
color: ${we("neutral",600)};
|
|
1623
1646
|
font-size: 12px;
|
|
1624
1647
|
font-weight: 400;
|
|
1625
1648
|
line-height: 16px;
|
|
1626
1649
|
margin-top: 8px;
|
|
1627
|
-
`,
|
|
1650
|
+
`,jr=de`
|
|
1628
1651
|
color: ${we("error",900)};
|
|
1629
1652
|
font-size: 14px;
|
|
1630
1653
|
font-weight: 700;
|
|
1631
1654
|
line-height: 20px;
|
|
1632
1655
|
margin-top: 2px;
|
|
1633
|
-
`,
|
|
1656
|
+
`,Ir=(e,t,n)=>de`
|
|
1634
1657
|
height: 104px;
|
|
1635
1658
|
width: 100%;
|
|
1636
1659
|
border-radius: 4px;
|
|
@@ -1667,7 +1690,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1667
1690
|
}
|
|
1668
1691
|
|
|
1669
1692
|
${t||n?`\n border: 1px solid ${we("neutral",700)};\n `:""}
|
|
1670
|
-
`,
|
|
1693
|
+
`,Ar=({label:e,caption:t,placeholder:n,errorMessage:r,required:i,disabled:o,size:a="default",defaultValue:l="",onChange:s,minLength:c,maxLength:d,...u})=>{const[p,h]=J(l),[f,g]=J(!1),[v,m]=J(!1),[x,y]=J(""),w=te(),C=te(),$=te();ee((()=>{const{length:e}=l;c&&e<c&&e>0?(g(e<c),m(!1),y(`Enter at least ${c-e} characters`)):c&&0===e&&y(`Min ${c} characters`),d&&e>0?(g(!1),m(e>d),y(`You have ${d-e} characters remaining`)):d&&0===e&&y(`Max ${d} characters`)}),[]);const S=!!r||f||v,E=[t?w:null,S?C:null,x?$:null].filter(Boolean).join(" ")||void 0;return q("div",{css:_r(a),children:[S?G("div",{css:Mr}):null,q(b.Root,{required:i,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[e?q(b.Label,{css:Dr(a,o),"aria-label":e,children:[G(b.RequiredIndicator,{"aria-label":"required"}),e,i?"":G("span",{children:" (Optional)"})]}):null,t?G(b.HelperText,{id:w,css:Nr(a,o),children:t}):null,r?G(b.ErrorText,{id:C,css:jr,"aria-label":`Error: ${r}`,"aria-live":"polite",children:r}):null,G(k,{placeholder:n,disabled:o,css:Ir(a,p,l),onChange:e=>{h(e.target.value);const{length:t}=e.target.value;c&&d?(g(t<c),m(t>d),y(`You have ${d-t} characters remaining`)):c?(g(t<c),m(!1),y(t<c?`Enter at least ${c-t} characters`:"")):d&&(m(t>d),g(!1),y(`You have ${d-t} characters remaining`)),s&&s(e)},value:p,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...u}),f&&c?q(b.ErrorText,{id:C,css:jr,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",c-p.length," more characters"]}):null,v&&d?q(b.ErrorText,{id:C,css:jr,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",p.length-d," characters too many"]}):null,!x||v||f?null:G(b.HelperText,{id:$,css:Vr,"aria-live":"polite",children:x})]})]})},zr=(e,t)=>de`
|
|
1671
1694
|
height: ${e};
|
|
1672
1695
|
width: ${t};
|
|
1673
1696
|
border: 1px solid ${we("neutral",300)};
|
|
@@ -1681,7 +1704,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1681
1704
|
height: 100%;
|
|
1682
1705
|
overflow-y: scroll;
|
|
1683
1706
|
}
|
|
1684
|
-
`,
|
|
1707
|
+
`,Hr=de`
|
|
1685
1708
|
padding: 16px 12px;
|
|
1686
1709
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
1687
1710
|
|
|
@@ -1704,16 +1727,16 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1704
1727
|
color: ${we("neutral",700)};
|
|
1705
1728
|
text-align: left;
|
|
1706
1729
|
}
|
|
1707
|
-
`,
|
|
1730
|
+
`,Br=de``,Fr=de`
|
|
1708
1731
|
display: flex;
|
|
1709
1732
|
flex-direction: column;
|
|
1710
1733
|
gap: 12px;
|
|
1711
1734
|
padding: 12px;
|
|
1712
1735
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
1713
|
-
`,
|
|
1736
|
+
`,Zr=de`
|
|
1714
1737
|
padding-top: 12px;
|
|
1715
1738
|
padding-left: 8px;
|
|
1716
|
-
`,
|
|
1739
|
+
`,Wr=de``,qr=e=>de`
|
|
1717
1740
|
display: flex;
|
|
1718
1741
|
gap: 12px;
|
|
1719
1742
|
padding: 12px 8px;
|
|
@@ -1737,7 +1760,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1737
1760
|
background-color: ${we("primary",100)};
|
|
1738
1761
|
width: 99.8%;
|
|
1739
1762
|
}
|
|
1740
|
-
`,
|
|
1763
|
+
`,Gr=de`
|
|
1741
1764
|
width: 100%;
|
|
1742
1765
|
max-width: calc(100% - 44px);
|
|
1743
1766
|
|
|
@@ -1768,7 +1791,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1768
1791
|
.ds-base-map-children {
|
|
1769
1792
|
margin-top: 10px;
|
|
1770
1793
|
}
|
|
1771
|
-
`,
|
|
1794
|
+
`,Ur=({title:e,caption:t,additionalSettings:n,options:r,onOptionSelected:i,maxHeight:o="400px",maxWidth:a="260px"})=>{const l=Q(null),s=Q(null);return ee((()=>{const e=l.current,t=s.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)}),[]),G("div",{ref:s,css:zr(o,a),children:q("div",{className:"ds-base-map-scroll-content",children:[q("div",{css:Hr,children:[G("h2",{ref:l,className:"ds-base-map-header-title",tabIndex:-1,children:e}),G("p",{className:"ds-base-map-header-caption",children:t})]}),q("div",{css:Br,children:[n?G("div",{css:Fr,children:n.map((e=>q("div",{children:[G(At,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?G("div",{css:Zr,children:e.children}):null]},e.label)))}):null,r?G("div",{css:Wr,children:r.map((e=>{return q("div",{css:qr(e.active),role:"button",onClick:()=>i?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||i?.(e)},children:[G("div",{css:(t=e.imageUrl,de`
|
|
1772
1795
|
height: 32px;
|
|
1773
1796
|
width: 32px;
|
|
1774
1797
|
border: 1px solid ${we("neutral",300)};
|
|
@@ -1776,7 +1799,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1776
1799
|
background-image: url(${t});
|
|
1777
1800
|
background-size: cover;
|
|
1778
1801
|
background-position: center;
|
|
1779
|
-
`)}),q("div",{css:
|
|
1802
|
+
`)}),q("div",{css:Gr,children:[q("div",{className:"ds-base-map-title-container",children:[G("p",{className:"ds-base-map-title",children:e.label}),e.active?G(lr,{label:"Active",variant:"warning",size:"small",icon:G(Te,{})}):null]}),G("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?G("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},Xr=(e,t,n,r,i,o="icon")=>{let a="16px",l=`4px solid ${we("neutral",100)}`;if("cluster"===o){const e=28,t=96,n=.5;if(l=`4px solid ${we("neutral",100)}`,void 0!==i&&i>1){const r=e+(i-1)*n;a=`${Math.min(r,t)}px`}else a=`${e}px`}else"simple-pin"===o?(l=`4px solid ${we("error",500)}`,a="24px"):n&&(a="28px",l=`2px solid ${we("neutral",100)}`);return de`
|
|
1780
1803
|
text-overflow: ellipsis;
|
|
1781
1804
|
height: ${a};
|
|
1782
1805
|
width: ${a};
|
|
@@ -1816,14 +1839,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1816
1839
|
height: 14px;
|
|
1817
1840
|
width: 14px;
|
|
1818
1841
|
}
|
|
1819
|
-
`},
|
|
1842
|
+
`},Yr=K((({ariaLabel:e,icon:t,backgroundColor:n,onClick:r,showFocusState:i,count:o,mode:a,variant:l="icon"},s)=>{const c=o?(d=o)>=1e8?"99M+":d>=1e6?`${(d/1e6).toFixed(0)}M`:d>=1e5?`${(d/1e3).toFixed(0)}K`:d.toString():void 0;var d;return G("div",{css:i?de`
|
|
1820
1843
|
outline: 2px solid ${we("primary",700)};
|
|
1821
1844
|
outline-offset: 2px;
|
|
1822
1845
|
border-radius: 50%;
|
|
1823
1846
|
box-shadow:
|
|
1824
1847
|
0 0 0 2px ${we("neutral",100)},
|
|
1825
1848
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1826
|
-
`:"",children:q("button",{type:"button",css:Gr(n,!!r,!!t,a,o,l),"aria-label":e||(o?`Cluster of ${o} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})})})),Xr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="cluster"})=>ue(Ur,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Yr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="simple-pin"})=>ue(Ur,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Kr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Ur,{ariaLabel:e||"paper icon",icon:ue(Qe,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Ur,{ariaLabel:e||"drop icon",icon:ue(et,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Ur,{ariaLabel:e||"plant icon",icon:ue(tt,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Ur,{ariaLabel:e||"point icon",backgroundColor:we("primary",500),onClick:t,ref:n,showFocusState:r})};function Jr(){return"undefined"!=typeof window}function Qr(e){return ni(e)?(e.nodeName||"").toLowerCase():"#document"}function ei(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ti(e){var t;return null==(t=(ni(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ni(e){return!!Jr()&&(e instanceof Node||e instanceof ei(e).Node)}function ri(e){return!!Jr()&&(e instanceof Element||e instanceof ei(e).Element)}function ii(e){return!!Jr()&&(e instanceof HTMLElement||e instanceof ei(e).HTMLElement)}function oi(e){return!(!Jr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ei(e).ShadowRoot)}const ai=new Set(["inline","contents"]);function li(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ai.has(i)}const si=new Set(["table","td","th"]);function ci(e){return si.has(Qr(e))}const di=[":popover-open",":modal"];function ui(e){return di.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const pi=["transform","translate","scale","rotate","perspective"],hi=["transform","translate","scale","rotate","perspective","filter"],fi=["paint","layout","strict","content"];function gi(e){const t=vi(),n=ri(e)?bi(e):e;return pi.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||hi.some((e=>(n.willChange||"").includes(e)))||fi.some((e=>(n.contain||"").includes(e)))}function vi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const mi=new Set(["html","body","#document"]);function xi(e){return mi.has(Qr(e))}function bi(e){return ei(e).getComputedStyle(e)}function yi(e){return ri(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if("html"===Qr(e))return e;const t=e.assignedSlot||e.parentNode||oi(e)&&e.host||ti(e);return oi(t)?t.host:t}function Ci(e){const t=wi(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ii(t)&&li(t)?t:Ci(t)}function $i(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=Ci(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=ei(i);if(o){const e=ki(a);return t.concat(a,a.visualViewport||[],li(i)?i:[],e&&n?$i(e):[])}return t.concat(i,$i(i,[],n))}function ki(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Si=Math.min,Ei=Math.max,Li=Math.round,Oi=Math.floor,Ri=e=>({x:e,y:e}),Ti={left:"right",right:"left",bottom:"top",top:"bottom"},Pi={start:"end",end:"start"};function _i(e,t,n){return Ei(e,Si(t,n))}function Mi(e,t){return"function"==typeof e?e(t):e}function Di(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function Vi(e){return"x"===e?"y":"x"}function ji(e){return"y"===e?"height":"width"}const Ii=new Set(["top","bottom"]);function Ai(e){return Ii.has(Di(e))?"y":"x"}function zi(e){return Vi(Ai(e))}function Hi(e){return e.replace(/start|end/g,(e=>Pi[e]))}const Bi=["left","right"],Fi=["right","left"],Zi=["top","bottom"],Wi=["bottom","top"];function qi(e,t,n,r){const i=Ni(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Fi:Bi:t?Bi:Fi;case"left":case"right":return t?Zi:Wi;default:return[]}}(Di(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Hi)))),o}function Gi(e){return e.replace(/left|right|bottom|top/g,(e=>Ti[e]))}function Ui(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 Xi(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const Yi="data-floating-ui-focusable";function Ki(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&oi(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ji(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qi(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 eo(e){return(null==e?void 0:e.ownerDocument)||document}function to(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,...to(e,t.id,n)]))}var no="undefined"!=typeof document?ne:function(){};const ro={...X}.useInsertionEffect||(e=>e());function io(e){const t=X.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return ro((()=>{t.current=e})),X.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 oo(e,t,n){let{reference:r,floating:i}=e;const o=Ai(t),a=zi(t),l=ji(a),s=Di(t),c="y"===o,d=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Ni(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function ao(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Mi(t,e),f=Ui(h),g=l[p?"floating"===u?"reference":"floating":u],v=Xi(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(x))&&await(null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},y=Xi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const lo=new Set(["left","top"]);function so(e){const t=bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ii(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Li(n)!==o||Li(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function co(e){return ri(e)?e:e.contextElement}function uo(e){const t=co(e);if(!ii(t))return Ri(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=so(t);let a=(o?Li(n.width):n.width)/r,l=(o?Li(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const po=Ri(0);function ho(e){const t=ei(e);return vi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:po}function fo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=co(e);let a=Ri(1);t&&(r?ri(r)&&(a=uo(r)):a=uo(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ei(e))&&t}(o,n,r)?ho(o):Ri(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(o){const e=ei(o),t=r&&ri(r)?ei(r):r;let n=e,i=ki(n);for(;i&&r&&t!==n;){const e=uo(i),t=i.getBoundingClientRect(),r=bi(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=a,n=ei(i),i=ki(n)}}return Xi({width:d,height:u,x:s,y:c})}function go(e,t){const n=yi(e).scrollLeft;return t?t.left+n:fo(ti(e)).left+n}function vo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-go(e,n),y:n.top+t.scrollTop}}const mo=new Set(["absolute","fixed"]);function xo(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ei(e),r=ti(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;const e=vi();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}const c=go(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=ti(e),n=yi(e),r=e.ownerDocument.body,i=Ei(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ei(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+go(e);const l=-n.scrollTop;return"rtl"===bi(r).direction&&(a+=Ei(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(ti(e));else if(ri(t))r=function(e,t){const n=fo(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ii(e)?uo(e):Ri(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=ho(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xi(r)}function bo(e,t){const n=wi(e);return!(n===t||!ri(n)||xi(n))&&("fixed"===bi(n).position||bo(n,t))}function yo(e,t,n){const r=ii(t),i=ti(t),o="fixed"===n,a=fo(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const s=Ri(0);function c(){s.x=go(i)}if(r||!r&&!o)if(("body"!==Qr(t)||li(i))&&(l=yi(t)),r){const e=fo(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?Ri(0):vo(i,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function wo(e){return"static"===bi(e).position}function Co(e,t){if(!ii(e)||"fixed"===bi(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function $o(e,t){const n=ei(e);if(ui(e))return n;if(!ii(e)){let t=wi(e);for(;t&&!xi(t);){if(ri(t)&&!wo(t))return t;t=wi(t)}return n}let r=Co(e,t);for(;r&&ci(r)&&wo(r);)r=Co(r,t);return r&&xi(r)&&wo(r)&&!gi(r)?n:r||function(e){let t=wi(e);for(;ii(t)&&!xi(t);){if(gi(t))return t;if(ui(t))return null;t=wi(t)}return null}(e)||n}const ko={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=ti(r),l=!!t&&ui(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},c=Ri(1);const d=Ri(0),u=ii(r);if((u||!u&&!o)&&(("body"!==Qr(r)||li(a))&&(s=yi(r)),ii(r))){const e=fo(r);c=uo(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||o?Ri(0):vo(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:ti,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?ui(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=$i(e,[],!1).filter((e=>ri(e)&&"body"!==Qr(e))),i=null;const o="fixed"===bi(e).position;let a=o?wi(e):e;for(;ri(a)&&!xi(a);){const t=bi(a),n=gi(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&mo.has(i.position)||li(a)&&!n&&bo(e,a))?r=r.filter((e=>e!==a)):i=t,a=wi(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],l=a[0],s=a.reduce(((e,n)=>{const r=xo(t,n,i);return e.top=Ei(r.top,e.top),e.right=Si(r.right,e.right),e.bottom=Si(r.bottom,e.bottom),e.left=Ei(r.left,e.left),e}),xo(t,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:$o,getElementRects:async function(e){const t=this.getOffsetParent||$o,n=this.getDimensions,r=await n(e.floating);return{reference:yo(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}=so(e);return{width:t,height:n}},getScale:uo,isElement:ri,isRTL:function(e){return"rtl"===bi(e).direction}};function So(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=co(e),d=i||o?[...c?$i(c):[],...$i(t)]:[];d.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const i=ti(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-Oi(u)+"px "+-Oi(i.clientWidth-(d+p))+"px "+-Oi(i.clientHeight-(u+h))+"px "+-Oi(d)+"px",threshold:Ei(0,Si(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||So(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?fo(e):null;return s&&function t(){const r=fo(e);g&&!So(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const Lo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Di(n),l=Ni(n),s="y"===Ai(n),c=lo.has(a)?-1:1,d=o&&s?-1:1,u=Mi(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},Oo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Mi(e,t),c={x:n,y:r},d=await ao(t,s),u=Ai(Di(i)),p=Vi(u);let h=c[p],f=c[u];if(o){const e="y"===p?"bottom":"right";h=_i(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=_i(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[u]:a}}}}}},Ro=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Mi(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const m=Di(i),x=Ai(l),b=Di(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Gi(l)]:function(e){const t=Gi(e);return[Hi(e),t,Hi(t)]}(l)),C="none"!==f;!p&&C&&w.push(...qi(l,g,f,y));const $=[l,...w],k=await ao(t,v),S=[];let E=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Ni(e),i=zi(e),o=ji(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Gi(a)),[a,Gi(a)]}(i,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:i,overflows:S}],!S.every((e=>e<=0))){var L,O;const e=((null==(L=o.flip)?void 0:L.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Ai(t))||E.every((e=>Ai(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(O=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(h){case"bestFit":{var R;const e=null==(R=E.filter((e=>{if(C){const t=Ai(e.placement);return t===x||"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:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}},To=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Mi(e,t)||{};if(null==c)return{};const u=Ui(d),p={x:n,y:r},h=zi(i),f=ji(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=o.reference[f]+o.reference[h]-p[h]-o.floating[f],w=p[h]-o.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||o.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=Si(u[m],S),L=Si(u[x],S),O=E,R=$-g[f]-L,T=$/2-g[f]/2+k,P=_i(O,T,R),_=!s.arrow&&null!=Ni(i)&&T!==P&&o.reference[f]/2-(T<O?E:L)-g[f]/2<0,M=_?T<O?T-O:T-R:0;return{[h]:p[h]+M,data:{[h]:P,centerOffset:T-P-M,..._&&{alignmentOffset:M}},reset:_}}}),Po=(e,t,n)=>{const r=new Map,i={platform:ko,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=oo(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:o,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[o]:{...h[o],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:d,y:u}=oo(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var _o="undefined"!=typeof document?ne:function(){};function Mo(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,i;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(!Mo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Mo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Do(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function No(e,t){const n=Do(e);return Math.round(t*n)/n}function Vo(e){const t=X.useRef(e);return _o((()=>{t.current=e})),t}const jo=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?To({element:n.current,padding:r}).fn(t):{}:n?To({element:n,padding:r}).fn(t):{};var i}}),Io=(e,t)=>({...Lo(e),options:[e,t]}),Ao=(e,t)=>({...Oo(e),options:[e,t]}),zo=(e,t)=>({...jo(e),options:[e,t]}),Ho="data-floating-ui-focusable",Bo="active",Fo="selected",Zo={...X};let Wo=!1,qo=0;const Go=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qo++;const Uo=Zo.useId||function(){const[e,t]=X.useState((()=>Wo?Go():void 0));return no((()=>{null==e&&t(Go())}),[]),X.useEffect((()=>{Wo=!0}),[]),e};let Xo;"production"!==process.env.NODE_ENV&&(Xo=new Set);const Yo=X.createContext(null),Ko=X.createContext(null),Jo=()=>{var e;return(null==(e=X.useContext(Yo))?void 0:e.id)||null},Qo=()=>X.useContext(Ko);const ea={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ta={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},na=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 ra(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Uo(),o=X.useRef({}),[a]=X.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)}}}())),l=null!=Jo();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!ri(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");var o;null!=(e=Xo)&&e.has(i)||(null==(o=Xo)||o.add(i),console.error(i))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=X.useState(r.reference),d=io(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=X.useMemo((()=>({setPositionReference:c})),[]),p=X.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return X.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:u})),[t,d,p,a,i,u])}function ia(e){void 0===e&&(e={});const{nodeId:t}=e,n=ra({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=X.useState(null),[l,s]=X.useState(null),c=(null==i?void 0:i.domReference)||o,d=X.useRef(null),u=Qo();no((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=X.useState(r);Mo(p,r)||h(r);const[f,g]=X.useState(null),[v,m]=X.useState(null),x=X.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=X.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=o||f,w=a||v,C=X.useRef(null),$=X.useRef(null),k=X.useRef(d),S=null!=s,E=Vo(s),L=Vo(i),O=Vo(c),R=X.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};L.current&&(e.platform=L.current),Po(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!Mo(k.current,t)&&(k.current=t,fe.flushSync((()=>{u(t)})))}))}),[p,t,n,L,O]);_o((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=X.useRef(!1);_o((()=>(T.current=!0,()=>{T.current=!1})),[]),_o((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,R);R()}}),[y,w,R,E,S]);const P=X.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),_=X.useMemo((()=>({reference:y,floating:w})),[y,w]),M=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=No(_.floating,d.x),r=No(_.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Do(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,_.floating,d.x,d.y]);return X.useMemo((()=>({...d,update:R,refs:P,elements:_,floatingStyles:M})),[d,R,P,_,M])}({...e,elements:{...i,...l&&{reference:l}}}),h=X.useCallback((e=>{const t=ri(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=X.useCallback((e=>{(ri(e)||null===e)&&(d.current=e,a(e)),(ri(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!ri(e))&&p.refs.setReference(e)}),[p.refs]),g=X.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=X.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=X.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return no((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),X.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function oa(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Bo]:t,[Fo]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Ho]:""},...o,...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,o]=t;var a;i&&[Bo,Fo].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(a=r.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}const aa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function la(e,t){var n,r;void 0===t&&(t={});const{open:i,elements:o,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=Uo(),d=(null==(n=o.domReference)?void 0:n.id)||c,u=X.useMemo((()=>{var e,t;return(null==(e=(t=o.floating)?t.hasAttribute(Yi)?t:t.querySelector("["+Yi+"]")||t:null)?void 0:e.id)||a}),[o.floating,a]),p=null!=(r=aa.get(s))?r:s,h=null!=Jo(),f=X.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?u:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,i,d,s]),g=X.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=X.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return X.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const sa=de`
|
|
1849
|
+
`:"",children:q("button",{type:"button",css:Xr(n,!!r,!!t,a,o,l),"aria-label":e||(o?`Cluster of ${o} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})})})),Kr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="cluster"})=>ue(Yr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Jr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="simple-pin"})=>ue(Yr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Qr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"paper icon",icon:ue(Qe,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"drop icon",icon:ue(et,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"plant icon",icon:ue(tt,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"point icon",backgroundColor:we("primary",500),onClick:t,ref:n,showFocusState:r})};function ei(){return"undefined"!=typeof window}function ti(e){return ii(e)?(e.nodeName||"").toLowerCase():"#document"}function ni(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ri(e){var t;return null==(t=(ii(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ii(e){return!!ei()&&(e instanceof Node||e instanceof ni(e).Node)}function oi(e){return!!ei()&&(e instanceof Element||e instanceof ni(e).Element)}function ai(e){return!!ei()&&(e instanceof HTMLElement||e instanceof ni(e).HTMLElement)}function li(e){return!(!ei()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ni(e).ShadowRoot)}const si=new Set(["inline","contents"]);function ci(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=wi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!si.has(i)}const di=new Set(["table","td","th"]);function ui(e){return di.has(ti(e))}const pi=[":popover-open",":modal"];function hi(e){return pi.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const fi=["transform","translate","scale","rotate","perspective"],gi=["transform","translate","scale","rotate","perspective","filter"],vi=["paint","layout","strict","content"];function mi(e){const t=xi(),n=oi(e)?wi(e):e;return fi.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||gi.some((e=>(n.willChange||"").includes(e)))||vi.some((e=>(n.contain||"").includes(e)))}function xi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const bi=new Set(["html","body","#document"]);function yi(e){return bi.has(ti(e))}function wi(e){return ni(e).getComputedStyle(e)}function Ci(e){return oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $i(e){if("html"===ti(e))return e;const t=e.assignedSlot||e.parentNode||li(e)&&e.host||ri(e);return li(t)?t.host:t}function ki(e){const t=$i(e);return yi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&ci(t)?t:ki(t)}function Si(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=ki(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=ni(i);if(o){const e=Ei(a);return t.concat(a,a.visualViewport||[],ci(i)?i:[],e&&n?Si(e):[])}return t.concat(i,Si(i,[],n))}function Ei(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Li=Math.min,Oi=Math.max,Ri=Math.round,Ti=Math.floor,Pi=e=>({x:e,y:e}),_i={left:"right",right:"left",bottom:"top",top:"bottom"},Mi={start:"end",end:"start"};function Di(e,t,n){return Oi(e,Li(t,n))}function Ni(e,t){return"function"==typeof e?e(t):e}function Vi(e){return e.split("-")[0]}function ji(e){return e.split("-")[1]}function Ii(e){return"x"===e?"y":"x"}function Ai(e){return"y"===e?"height":"width"}const zi=new Set(["top","bottom"]);function Hi(e){return zi.has(Vi(e))?"y":"x"}function Bi(e){return Ii(Hi(e))}function Fi(e){return e.replace(/start|end/g,(e=>Mi[e]))}const Zi=["left","right"],Wi=["right","left"],qi=["top","bottom"],Gi=["bottom","top"];function Ui(e,t,n,r){const i=ji(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Wi:Zi:t?Zi:Wi;case"left":case"right":return t?qi:Gi;default:return[]}}(Vi(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Fi)))),o}function Xi(e){return e.replace(/left|right|bottom|top/g,(e=>_i[e]))}function Yi(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 Ki(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const Ji="data-floating-ui-focusable";function Qi(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&li(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function eo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function to(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 no(e){return(null==e?void 0:e.ownerDocument)||document}function ro(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,...ro(e,t.id,n)]))}var io="undefined"!=typeof document?ne:function(){};const oo={...X}.useInsertionEffect||(e=>e());function ao(e){const t=X.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return oo((()=>{t.current=e})),X.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 lo(e,t,n){let{reference:r,floating:i}=e;const o=Hi(t),a=Bi(t),l=Ai(a),s=Vi(t),c="y"===o,d=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(ji(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function so(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Ni(t,e),f=Yi(h),g=l[p?"floating"===u?"reference":"floating":u],v=Ki(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(x))&&await(null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},y=Ki(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const co=new Set(["left","top"]);function uo(e){const t=wi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ai(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Ri(n)!==o||Ri(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function po(e){return oi(e)?e:e.contextElement}function ho(e){const t=po(e);if(!ai(t))return Pi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=uo(t);let a=(o?Ri(n.width):n.width)/r,l=(o?Ri(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const fo=Pi(0);function go(e){const t=ni(e);return xi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fo}function vo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=po(e);let a=Pi(1);t&&(r?oi(r)&&(a=ho(r)):a=ho(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ni(e))&&t}(o,n,r)?go(o):Pi(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(o){const e=ni(o),t=r&&oi(r)?ni(r):r;let n=e,i=Ei(n);for(;i&&r&&t!==n;){const e=ho(i),t=i.getBoundingClientRect(),r=wi(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=a,n=ni(i),i=Ei(n)}}return Ki({width:d,height:u,x:s,y:c})}function mo(e,t){const n=Ci(e).scrollLeft;return t?t.left+n:vo(ri(e)).left+n}function xo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mo(e,n),y:n.top+t.scrollTop}}const bo=new Set(["absolute","fixed"]);function yo(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ni(e),r=ri(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;const e=xi();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}const c=mo(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=ri(e),n=Ci(e),r=e.ownerDocument.body,i=Oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mo(e);const l=-n.scrollTop;return"rtl"===wi(r).direction&&(a+=Oi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(ri(e));else if(oi(t))r=function(e,t){const n=vo(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ai(e)?ho(e):Pi(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=go(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ki(r)}function wo(e,t){const n=$i(e);return!(n===t||!oi(n)||yi(n))&&("fixed"===wi(n).position||wo(n,t))}function Co(e,t,n){const r=ai(t),i=ri(t),o="fixed"===n,a=vo(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const s=Pi(0);function c(){s.x=mo(i)}if(r||!r&&!o)if(("body"!==ti(t)||ci(i))&&(l=Ci(t)),r){const e=vo(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?Pi(0):xo(i,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function $o(e){return"static"===wi(e).position}function ko(e,t){if(!ai(e)||"fixed"===wi(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ri(e)===n&&(n=n.ownerDocument.body),n}function So(e,t){const n=ni(e);if(hi(e))return n;if(!ai(e)){let t=$i(e);for(;t&&!yi(t);){if(oi(t)&&!$o(t))return t;t=$i(t)}return n}let r=ko(e,t);for(;r&&ui(r)&&$o(r);)r=ko(r,t);return r&&yi(r)&&$o(r)&&!mi(r)?n:r||function(e){let t=$i(e);for(;ai(t)&&!yi(t);){if(mi(t))return t;if(hi(t))return null;t=$i(t)}return null}(e)||n}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=ri(r),l=!!t&&hi(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},c=Pi(1);const d=Pi(0),u=ai(r);if((u||!u&&!o)&&(("body"!==ti(r)||ci(a))&&(s=Ci(r)),ai(r))){const e=vo(r);c=ho(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||o?Pi(0):xo(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:ri,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?hi(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Si(e,[],!1).filter((e=>oi(e)&&"body"!==ti(e))),i=null;const o="fixed"===wi(e).position;let a=o?$i(e):e;for(;oi(a)&&!yi(a);){const t=wi(a),n=mi(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&bo.has(i.position)||ci(a)&&!n&&wo(e,a))?r=r.filter((e=>e!==a)):i=t,a=$i(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],l=a[0],s=a.reduce(((e,n)=>{const r=yo(t,n,i);return e.top=Oi(r.top,e.top),e.right=Li(r.right,e.right),e.bottom=Li(r.bottom,e.bottom),e.left=Oi(r.left,e.left),e}),yo(t,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:So,getElementRects:async function(e){const t=this.getOffsetParent||So,n=this.getDimensions,r=await n(e.floating);return{reference:Co(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}=uo(e);return{width:t,height:n}},getScale:ho,isElement:oi,isRTL:function(e){return"rtl"===wi(e).direction}};function Lo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Oo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=po(e),d=i||o?[...c?Si(c):[],...Si(t)]:[];d.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const i=ri(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-Ti(u)+"px "+-Ti(i.clientWidth-(d+p))+"px "+-Ti(i.clientHeight-(u+h))+"px "+-Ti(d)+"px",threshold:Oi(0,Li(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Lo(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?vo(e):null;return s&&function t(){const r=vo(e);g&&!Lo(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const Ro=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Vi(n),l=ji(n),s="y"===Hi(n),c=co.has(a)?-1:1,d=o&&s?-1:1,u=Ni(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},To=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Ni(e,t),c={x:n,y:r},d=await so(t,s),u=Hi(Vi(i)),p=Ii(u);let h=c[p],f=c[u];if(o){const e="y"===p?"bottom":"right";h=Di(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=Di(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[u]:a}}}}}},Po=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Ni(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const m=Vi(i),x=Hi(l),b=Vi(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Xi(l)]:function(e){const t=Xi(e);return[Fi(e),t,Fi(t)]}(l)),C="none"!==f;!p&&C&&w.push(...Ui(l,g,f,y));const $=[l,...w],k=await so(t,v),S=[];let E=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=ji(e),i=Bi(e),o=Ai(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Xi(a)),[a,Xi(a)]}(i,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:i,overflows:S}],!S.every((e=>e<=0))){var L,O;const e=((null==(L=o.flip)?void 0:L.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Hi(t))||E.every((e=>Hi(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(O=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(h){case"bestFit":{var R;const e=null==(R=E.filter((e=>{if(C){const t=Hi(e.placement);return t===x||"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:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}},_o=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Ni(e,t)||{};if(null==c)return{};const u=Yi(d),p={x:n,y:r},h=Bi(i),f=Ai(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=o.reference[f]+o.reference[h]-p[h]-o.floating[f],w=p[h]-o.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||o.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=Li(u[m],S),L=Li(u[x],S),O=E,R=$-g[f]-L,T=$/2-g[f]/2+k,P=Di(O,T,R),_=!s.arrow&&null!=ji(i)&&T!==P&&o.reference[f]/2-(T<O?E:L)-g[f]/2<0,M=_?T<O?T-O:T-R:0;return{[h]:p[h]+M,data:{[h]:P,centerOffset:T-P-M,..._&&{alignmentOffset:M}},reset:_}}}),Mo=(e,t,n)=>{const r=new Map,i={platform:Eo,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=lo(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:o,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[o]:{...h[o],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:d,y:u}=lo(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Do="undefined"!=typeof document?ne:function(){};function No(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,i;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(!No(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!No(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Vo(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jo(e,t){const n=Vo(e);return Math.round(t*n)/n}function Io(e){const t=X.useRef(e);return Do((()=>{t.current=e})),t}const Ao=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?_o({element:n.current,padding:r}).fn(t):{}:n?_o({element:n,padding:r}).fn(t):{};var i}}),zo=(e,t)=>({...Ro(e),options:[e,t]}),Ho=(e,t)=>({...To(e),options:[e,t]}),Bo=(e,t)=>({...Ao(e),options:[e,t]}),Fo="data-floating-ui-focusable",Zo="active",Wo="selected",qo={...X};let Go=!1,Uo=0;const Xo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Uo++;const Yo=qo.useId||function(){const[e,t]=X.useState((()=>Go?Xo():void 0));return io((()=>{null==e&&t(Xo())}),[]),X.useEffect((()=>{Go=!0}),[]),e};let Ko;"production"!==process.env.NODE_ENV&&(Ko=new Set);const Jo=X.createContext(null),Qo=X.createContext(null),ea=()=>{var e;return(null==(e=X.useContext(Jo))?void 0:e.id)||null},ta=()=>X.useContext(Qo);const na={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ra={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ia=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 oa(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Yo(),o=X.useRef({}),[a]=X.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)}}}())),l=null!=ea();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!oi(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");var o;null!=(e=Ko)&&e.has(i)||(null==(o=Ko)||o.add(i),console.error(i))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=X.useState(r.reference),d=ao(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=X.useMemo((()=>({setPositionReference:c})),[]),p=X.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return X.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:u})),[t,d,p,a,i,u])}function aa(e){void 0===e&&(e={});const{nodeId:t}=e,n=oa({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=X.useState(null),[l,s]=X.useState(null),c=(null==i?void 0:i.domReference)||o,d=X.useRef(null),u=ta();io((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=X.useState(r);No(p,r)||h(r);const[f,g]=X.useState(null),[v,m]=X.useState(null),x=X.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=X.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=o||f,w=a||v,C=X.useRef(null),$=X.useRef(null),k=X.useRef(d),S=null!=s,E=Io(s),L=Io(i),O=Io(c),R=X.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};L.current&&(e.platform=L.current),Mo(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!No(k.current,t)&&(k.current=t,fe.flushSync((()=>{u(t)})))}))}),[p,t,n,L,O]);Do((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=X.useRef(!1);Do((()=>(T.current=!0,()=>{T.current=!1})),[]),Do((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,R);R()}}),[y,w,R,E,S]);const P=X.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),_=X.useMemo((()=>({reference:y,floating:w})),[y,w]),M=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=jo(_.floating,d.x),r=jo(_.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Vo(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,_.floating,d.x,d.y]);return X.useMemo((()=>({...d,update:R,refs:P,elements:_,floatingStyles:M})),[d,R,P,_,M])}({...e,elements:{...i,...l&&{reference:l}}}),h=X.useCallback((e=>{const t=oi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=X.useCallback((e=>{(oi(e)||null===e)&&(d.current=e,a(e)),(oi(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!oi(e))&&p.refs.setReference(e)}),[p.refs]),g=X.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=X.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=X.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return io((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),X.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function la(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Zo]:t,[Wo]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Fo]:""},...o,...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,o]=t;var a;i&&[Zo,Wo].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(a=r.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}const sa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ca(e,t){var n,r;void 0===t&&(t={});const{open:i,elements:o,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=Yo(),d=(null==(n=o.domReference)?void 0:n.id)||c,u=X.useMemo((()=>{var e,t;return(null==(e=(t=o.floating)?t.hasAttribute(Ji)?t:t.querySelector("["+Ji+"]")||t:null)?void 0:e.id)||a}),[o.floating,a]),p=null!=(r=sa.get(s))?r:s,h=null!=ea(),f=X.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?u:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,i,d,s]),g=X.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=X.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return X.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const da=de`
|
|
1827
1850
|
height: auto;
|
|
1828
1851
|
max-height: 512px;
|
|
1829
1852
|
width: 100%;
|
|
@@ -1837,7 +1860,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1837
1860
|
0px 4px 6px -4px #0000001a,
|
|
1838
1861
|
0px 10px 15px -3px #0000001a;
|
|
1839
1862
|
outline: 0;
|
|
1840
|
-
`,
|
|
1863
|
+
`,ua=de`
|
|
1841
1864
|
display: flex;
|
|
1842
1865
|
align-items: flex-start;
|
|
1843
1866
|
justify-content: space-between;
|
|
@@ -1849,7 +1872,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1849
1872
|
.ds-map-pop-up-close-button {
|
|
1850
1873
|
margin-top: 4px;
|
|
1851
1874
|
}
|
|
1852
|
-
`,
|
|
1875
|
+
`,pa=de`
|
|
1853
1876
|
height: 100%;
|
|
1854
1877
|
max-height: 400px;
|
|
1855
1878
|
overflow-y: auto;
|
|
@@ -1857,11 +1880,11 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1857
1880
|
&:focus-visible {
|
|
1858
1881
|
outline-color: ${we("primary",700)};
|
|
1859
1882
|
}
|
|
1860
|
-
`,
|
|
1883
|
+
`,ha=de`
|
|
1861
1884
|
padding: 8px 12px;
|
|
1862
1885
|
border-top: 1px solid ${we("neutral",300)};
|
|
1863
1886
|
min-height: 44px;
|
|
1864
|
-
`,
|
|
1887
|
+
`,fa=(e,t,n,r,i,o)=>de`
|
|
1865
1888
|
height: ${e}px;
|
|
1866
1889
|
width: ${t}px;
|
|
1867
1890
|
position: absolute;
|
|
@@ -1870,14 +1893,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1870
1893
|
${`${i}: -${o-1}px`};
|
|
1871
1894
|
background-color: ${we("neutral",100)};
|
|
1872
1895
|
border: 1px solid ${we("neutral",300)};
|
|
1873
|
-
`,
|
|
1896
|
+
`,ga=({open:e,onOpenChange:t,anchorRef:n,header:r,content:i,footer:o,placement:a="bottom",offset:l=30,closeOnEscape:s=!0,closeOnOutsideClick:c=!1})=>{const d=Q(null),{refs:u,floatingStyles:p,context:h,middlewareData:f,placement:g}=aa({open:e,onOpenChange:t,placement:a,whileElementsMounted:Oo,middleware:[zo(l),(v={fallbackAxisSideDirection:"start"},{...Po(v),options:[v,m]}),Ho({padding:8}),Bo({element:d})]});var v,m;Y.useEffect((()=>{n?.current&&u.setReference(n.current)}),[n,u]);const x=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:s=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:f}=t,g=ta(),v=ao("function"==typeof s?s:()=>!1),m="function"==typeof s?v:s,x=X.useRef(!1),{escapeKey:b,outsidePress:y}=ia(h),{escapeKey:w,outsidePress:C}=ia(f),$=X.useRef(!1),k=ao((e=>{var t;if(!n||!a||!l||"Escape"!==e.key)return;if($.current)return;const i=null==(t=o.current.floatingContext)?void 0:t.nodeId,s=g?ro(g.nodesRef.current,i):[];if(!b&&(e.stopPropagation(),s.length>0)){let e=!0;if(s.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")})),S=ao((e=>{var t;const n=()=>{var t;k(e),null==(t=eo(e))||t.removeEventListener("keydown",n)};null==(t=eo(e))||t.addEventListener("keydown",n)})),E=ao((e=>{var t;const n=o.current.insideReactTree;o.current.insideReactTree=!1;const a=x.current;if(x.current=!1,"click"===c&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const l=eo(e),s="[data-floating-ui-inert]",d=no(i.floating).querySelectorAll(s);let u=oi(l)?l:null;for(;u&&!yi(u);){const e=$i(u);if(yi(e)||!oi(e))break;u=e}if(d.length&&oi(l)&&!l.matches("html,body")&&!Qi(l,i.floating)&&Array.from(d).every((e=>!Qi(u,e))))return;if(ai(l)&&R){const t=yi(l),n=wi(l),r=/auto|scroll/,i=t||r.test(n.overflowX),o=t||r.test(n.overflowY),a=i&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,s=o&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,c="rtl"===n.direction,d=s&&(c?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),u=a&&e.offsetY>l.clientHeight;if(d||u)return}const p=null==(t=o.current.floatingContext)?void 0:t.nodeId,h=g&&ro(g.nodesRef.current,p).some((t=>{var n;return to(e,null==(n=t.context)?void 0:n.elements.floating)}));if(to(e,i.floating)||to(e,i.domReference)||h)return;const f=g?ro(g.nodesRef.current,p):[];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")})),L=ao((e=>{var t;const n=()=>{var t;E(e),null==(t=eo(e))||t.removeEventListener(c,n)};null==(t=eo(e))||t.addEventListener(c,n)}));X.useEffect((()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=b,o.current.__outsidePressBubbles=y;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function s(){window.clearTimeout(e),$.current=!0}function d(){e=window.setTimeout((()=>{$.current=!1}),xi()?5:0)}const u=no(i.floating);l&&(u.addEventListener("keydown",w?S:k,w),u.addEventListener("compositionstart",s),u.addEventListener("compositionend",d)),m&&u.addEventListener(c,C?L:E,C);let h=[];return p&&(oi(i.domReference)&&(h=Si(i.domReference)),oi(i.floating)&&(h=h.concat(Si(i.floating))),!oi(i.reference)&&i.reference&&i.reference.contextElement&&(h=h.concat(Si(i.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})})),()=>{l&&(u.removeEventListener("keydown",w?S:k,w),u.removeEventListener("compositionstart",s),u.removeEventListener("compositionend",d)),m&&u.removeEventListener(c,C?L:E,C),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[o,i,l,m,c,n,r,p,a,b,y,k,w,S,E,C,L]),X.useEffect((()=>{o.current.insideReactTree=!1}),[o,m,c]);const O=X.useMemo((()=>({onKeyDown:k,...d&&{[na[u]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==u&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[k,r,d,u]),R=X.useMemo((()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[ra[c]]:()=>{o.current.insideReactTree=!0}})),[k,c,o]);return X.useMemo((()=>a?{reference:O,floating:R}:{}),[a,O,R])}(h,{escapeKey:s,outsidePress:c}),b=ca(h,{role:"dialog"}),{getFloatingProps:y}=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)),i=X.useCallback((t=>la(t,e,"reference")),t),o=X.useCallback((t=>la(t,e,"floating")),n),a=X.useCallback((t=>la(t,e,"item")),r);return X.useMemo((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a})),[i,o,a])}([x,b]),{x:w,y:C}=f.arrow??{x:null,y:null},$={top:"bottom",right:"left",bottom:"top",left:"right"}[g.split("-")[0]];if(!e)return null;let k=l-1,S=4;return"left"!==$&&"right"!==$||(k=4,S=l-1),q(U,{children:[q("div",{ref:u.setFloating,style:p,"aria-modal":!0,...y(),css:da,children:[q("div",{css:ua,children:[r,G(gt,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),G("div",{css:pa,children:i}),o?G("div",{css:ha,children:o}):null,G("div",{ref:d,css:fa(k,S,w,C,$,l)})]}),G("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>c&&t(!1)})]})},va=de`
|
|
1874
1897
|
background-color: ${we("neutral",100)};
|
|
1875
|
-
`,
|
|
1898
|
+
`,ma=de`
|
|
1876
1899
|
padding: 16px 16px 0px 16px;
|
|
1877
1900
|
&:focus-visible {
|
|
1878
1901
|
outline-color: ${we("primary",700)};
|
|
1879
1902
|
}
|
|
1880
|
-
`,
|
|
1903
|
+
`,xa=de`
|
|
1881
1904
|
font-size: 16px;
|
|
1882
1905
|
font-weight: 700;
|
|
1883
1906
|
line-height: 24px;
|
|
@@ -1887,14 +1910,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1887
1910
|
align-items: center;
|
|
1888
1911
|
text-align: left;
|
|
1889
1912
|
gap: 10px;
|
|
1890
|
-
`,
|
|
1913
|
+
`,ba=de`
|
|
1891
1914
|
font-size: 12px;
|
|
1892
1915
|
font-weight: 400;
|
|
1893
1916
|
line-height: 16px;
|
|
1894
1917
|
text-align: left;
|
|
1895
1918
|
color: ${we("neutral",700)};
|
|
1896
1919
|
margin-bottom: 8px;
|
|
1897
|
-
`,
|
|
1920
|
+
`,ya=de`
|
|
1898
1921
|
width: 100%;
|
|
1899
1922
|
padding: 16px 0;
|
|
1900
1923
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
@@ -1902,32 +1925,32 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1902
1925
|
&:last-of-type {
|
|
1903
1926
|
border-bottom: none;
|
|
1904
1927
|
}
|
|
1905
|
-
`,
|
|
1928
|
+
`,wa=de`
|
|
1906
1929
|
display: flex;
|
|
1907
1930
|
align-items: flex-start;
|
|
1908
1931
|
justify-content: space-between;
|
|
1909
|
-
`,
|
|
1932
|
+
`,Ca=de`
|
|
1910
1933
|
display: flex;
|
|
1911
1934
|
flex-direction: column;
|
|
1912
|
-
|
|
1935
|
+
`,$a=e=>de`
|
|
1913
1936
|
font-size: 16px;
|
|
1914
1937
|
font-weight: 400;
|
|
1915
1938
|
line-height: 24px;
|
|
1916
1939
|
text-align: left;
|
|
1917
1940
|
color: ${we("neutral",e?500:800)};
|
|
1918
|
-
`,
|
|
1941
|
+
`,ka=e=>de`
|
|
1919
1942
|
font-size: 14px;
|
|
1920
1943
|
font-weight: 400;
|
|
1921
1944
|
line-height: 20px;
|
|
1922
1945
|
text-align: left;
|
|
1923
1946
|
color: ${we("neutral",e?500:700)};
|
|
1924
|
-
|
|
1947
|
+
`,Sa=({name:e,label:t,caption:n,showInfoButton:i=!0,infoButtonLabel:o="About data",variant:a="switch",disabled:l,onInfoClick:s,isDefaultSelected:c=!1,onChange:d})=>{const u="switch"===a;return q("div",{css:ya,children:[q("div",u?{css:wa,children:[q("div",{css:Ca,children:[G("p",{css:$a(l),"aria-label":t,"aria-disabled":l,children:t}),G("p",{"aria-label":n,css:ka(l),children:n})]}),G(vn,{"aria-label":`${t}, ${n}`,name:e,disabled:l,defaultChecked:c,onChange:d,role:"switch"})]}:{style:{display:"flex",flexDirection:"column"},children:[G(rn,{value:e,disabled:l,fontSize:"16px",color:"var(--chakra-colors-neutral-800)",children:t}),G("p",{style:{marginLeft:"28px"},css:ka(l),children:n})]}),i?G(r,{display:"flex",justifyContent:"flex-start",marginTop:"8px",marginLeft:u?0:"28px",children:G(Le,{variant:"secondary",label:o,rightIcon:G(_e,{}),size:"small",onClick:s,disabled:l})}):null]})},Ea=({label:e,caption:t,value:n,layerItems:i,onChangeForRadioVariant:o})=>{const[a,l]=J({}),[s]=J((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(i));ee((()=>{let t={...a};i.forEach((n=>{n.isDefaultSelected&&(t={...t,["radio"===n.variant?e:n.name]:n.isDefaultSelected})})),l(t)}),[]);const c=(e,t,n,r)=>{const i={...a,[e]:t};l(i),n&&n(e,t,r)},d=Object.values(a).filter((e=>!0===e)).length,u=`${e}, ${d} Active layers on the map${t?`, ${t}`:""}`;return q(S.Item,{value:n,width:"100%",children:[q(S.ItemTrigger,{css:ma,alignItems:"flex-start","aria-label":u,children:[q(r,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[q("span",{css:xa,children:[e,G(lr,{label:`${d} Active`,size:"small",variant:d>0?"success":"info-grey"})]}),G("div",{css:ba,children:t})]}),G(S.ItemIndicator,{display:"flex",children:G(Me,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),G(S.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:G(on,{name:e,defaultValue:s,customGap:"0px",onChange:(e,t)=>c(e,!!t,o,t),children:i.map((e=>G(Sa,{...e,onChange:(t,n)=>c(t,n,e.onChange)},e.label)))})})]})},La=({children:e,defaultValue:t,...n})=>G("div",{css:va,style:{width:"100%"},children:G(S.Root,{css:{},defaultValue:t,multiple:!0,...n,children:e})}),Oa=de`
|
|
1925
1948
|
margin-bottom: 16px;
|
|
1926
1949
|
border: 1px solid ${we("neutral",300)};
|
|
1927
1950
|
border-radius: 4px;
|
|
1928
1951
|
box-shadow: 0px 1px 2px 0px #0000000d;
|
|
1929
1952
|
background-color: ${we("neutral",100)};
|
|
1930
|
-
`,
|
|
1953
|
+
`,Ra=de`
|
|
1931
1954
|
padding: 6px 8px;
|
|
1932
1955
|
align-items: center;
|
|
1933
1956
|
background-color: ${we("neutral",100)};
|
|
@@ -1950,12 +1973,12 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1950
1973
|
0 0 0 2px ${we("neutral",100)},
|
|
1951
1974
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1952
1975
|
}
|
|
1953
|
-
`,
|
|
1976
|
+
`,Ta=de`
|
|
1954
1977
|
font-size: 12px;
|
|
1955
1978
|
font-weight: 700;
|
|
1956
1979
|
line-height: 16px;
|
|
1957
1980
|
color: ${we("neutral",800)};
|
|
1958
|
-
`,
|
|
1981
|
+
`,Pa=de`
|
|
1959
1982
|
padding: 12px 8px;
|
|
1960
1983
|
display: flex;
|
|
1961
1984
|
flex-direction: column;
|
|
@@ -1971,14 +1994,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1971
1994
|
margin-bottom: 0px;
|
|
1972
1995
|
}
|
|
1973
1996
|
}
|
|
1974
|
-
`,
|
|
1997
|
+
`,_a=({label:e,children:t,openedByDefault:n})=>G("div",{children:G(S.Root,{defaultValue:n?[e]:[],multiple:!0,children:q(S.Item,{css:Oa,value:e,children:[q(S.ItemTrigger,{css:Ra,children:[G(r,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:G("p",{css:Ta,children:e})}),G(S.ItemIndicator,{display:"flex",children:G(Me,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),G(S.ItemContent,{css:Pa,children:re.map(t,(e=>G("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),Ma=de`
|
|
1975
1998
|
padding: 12px;
|
|
1976
1999
|
padding-bottom: 20px;
|
|
1977
2000
|
display: flex;
|
|
1978
2001
|
gap: 12px;
|
|
1979
2002
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
1980
2003
|
background-color: ${we("neutral",100)};
|
|
1981
|
-
`,
|
|
2004
|
+
`,Da=de`
|
|
1982
2005
|
display: flex;
|
|
1983
2006
|
flex-direction: column;
|
|
1984
2007
|
|
|
@@ -1987,44 +2010,44 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1987
2010
|
fill: ${we("neutral",700)} !important;
|
|
1988
2011
|
}
|
|
1989
2012
|
}
|
|
1990
|
-
`,
|
|
2013
|
+
`,Na=de`
|
|
1991
2014
|
display: flex;
|
|
1992
2015
|
align-items: flex-start;
|
|
1993
2016
|
justify-content: space-between;
|
|
1994
2017
|
gap: 12px;
|
|
1995
2018
|
margin-bottom: 16px;
|
|
1996
|
-
`,
|
|
2019
|
+
`,Va=de`
|
|
1997
2020
|
font-size: 16px;
|
|
1998
2021
|
line-height: 24px;
|
|
1999
2022
|
font-weight: 400;
|
|
2000
2023
|
text-align: left;
|
|
2001
2024
|
color: ${we("neutral",900)};
|
|
2002
|
-
`,
|
|
2025
|
+
`,ja=de`
|
|
2003
2026
|
font-size: 14px;
|
|
2004
2027
|
line-height: 20px;
|
|
2005
2028
|
font-weight: 400;
|
|
2006
2029
|
text-align: left;
|
|
2007
2030
|
color: ${we("neutral",700)};
|
|
2008
|
-
`,
|
|
2031
|
+
`,Ia=de`
|
|
2009
2032
|
display: flex;
|
|
2010
2033
|
justify-content: space-between;
|
|
2011
2034
|
|
|
2012
2035
|
button {
|
|
2013
2036
|
width: 46%;
|
|
2014
2037
|
}
|
|
2015
|
-
`,
|
|
2038
|
+
`,Aa=de`
|
|
2016
2039
|
width: 234px;
|
|
2017
2040
|
border: 1px solid ${we("neutral",600)};
|
|
2018
2041
|
border-radius: 4px;
|
|
2019
|
-
`,
|
|
2042
|
+
`,za=de`
|
|
2020
2043
|
padding: 12px;
|
|
2021
|
-
`,
|
|
2044
|
+
`,Ha=de`
|
|
2022
2045
|
font-size: 14px;
|
|
2023
2046
|
line-height: 20px;
|
|
2024
2047
|
font-weight: 400;
|
|
2025
2048
|
text-align: left;
|
|
2026
2049
|
color: ${we("neutral",900)};
|
|
2027
|
-
`,
|
|
2050
|
+
`,Ba=de`
|
|
2028
2051
|
display: flex;
|
|
2029
2052
|
align-items: center;
|
|
2030
2053
|
gap: 12px;
|
|
@@ -2045,20 +2068,20 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2045
2068
|
margin-top: 18px;
|
|
2046
2069
|
width: 100%;
|
|
2047
2070
|
}
|
|
2048
|
-
`,
|
|
2071
|
+
`,Fa=({defaultValue:e,onOpacityChanged:t})=>{const[n,r]=J(e);return q(E.Root,{positioning:{placement:"bottom-end"},children:[G(E.Trigger,{asChild:!0,children:G(Le,{label:"Opacity",size:"small",variant:"secondary",leftIcon:G(_e,{})})}),G(E.Positioner,{children:G(E.Content,{css:Aa,children:q(E.Body,{css:za,children:[G("p",{css:Ha,children:"Opacity"}),q("div",{css:Ba,children:[q("div",{style:{position:"relative"},children:[G(In,{"aria-label":"Opacity",min:"0",max:"100",value:n,onChange:e=>{const n=e.target.value||"0";let i=parseInt(n,10);i=Number.isNaN(i)?0:i,i=i<0?0:i,i=i>100?100:i,r(i),t&&t(i)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),G("p",{style:{position:"absolute",top:"18.5px",right:"5px"},children:"%"})]}),G(fn,{min:0,max:100,value:[n],onValueChangeEnd:({value:e})=>{r(e[0]),t&&t(e[0])}})]})]})})})]})},Za=({layerName:e,dataUnit:t,onDrag:n,onUpClick:r,onDownClick:i,onRemoveClick:o,children:a,onInfoClick:l,onOpacityChanged:s})=>q("div",{css:Ma,children:[q("div",{css:Da,children:[G(ft,{icon:G(Ae,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:n,style:{display:"none",marginBottom:"12px"}}),q("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[G(ft,{icon:G(Me,{rotate:"180"}),"aria-label":"Up",onClick:r}),G(ft,{icon:G(Me,{}),"aria-label":"Down",onClick:i})]})]}),q("div",{style:{width:"100%"},children:[q("div",{css:Na,children:[q("div",{children:[G("h3",{css:Va,children:e}),G("p",{css:ja,children:t})]}),G(Le,{label:"Remove",size:"small",variant:"secondary",rightIcon:G(Ne,{}),onClick:o})]}),a,q("div",{css:Ia,children:[G(Le,{label:"About data",size:"small",variant:"secondary",leftIcon:G(_e,{}),onClick:l}),G(Fa,{defaultValue:80,onOpacityChanged:s})]})]})]}),Wa=e=>de`
|
|
2049
2072
|
width: 20px;
|
|
2050
2073
|
height: 20px;
|
|
2051
2074
|
border-radius: 50%;
|
|
2052
2075
|
background-color: ${e};
|
|
2053
2076
|
border: 1px solid ${we("neutral",400)};
|
|
2054
|
-
`,
|
|
2077
|
+
`,qa=e=>de`
|
|
2055
2078
|
width: 20px;
|
|
2056
2079
|
height: 8px;
|
|
2057
2080
|
border-radius: 2px;
|
|
2058
2081
|
background-color: ${e};
|
|
2059
2082
|
border: 1px solid ${we("neutral",400)};
|
|
2060
2083
|
margin-top: 6px;
|
|
2061
|
-
`,
|
|
2084
|
+
`,Ga=e=>de`
|
|
2062
2085
|
width: 20px;
|
|
2063
2086
|
height: 20px;
|
|
2064
2087
|
border-radius: 50%;
|
|
@@ -2071,26 +2094,26 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2071
2094
|
width: 10px;
|
|
2072
2095
|
height: 10px;
|
|
2073
2096
|
}
|
|
2074
|
-
`,
|
|
2097
|
+
`,Ua=de`
|
|
2075
2098
|
width: 100%;
|
|
2076
2099
|
display: flex;
|
|
2077
2100
|
justify-content: space-between;
|
|
2078
2101
|
gap: 8px;
|
|
2079
2102
|
margin-bottom: 16px;
|
|
2080
|
-
`,
|
|
2103
|
+
`,Xa=de`
|
|
2081
2104
|
display: flex;
|
|
2082
2105
|
gap: 8px;
|
|
2083
|
-
`,
|
|
2106
|
+
`,Ya=de`
|
|
2084
2107
|
font-size: 14px;
|
|
2085
2108
|
line-height: 20px;
|
|
2086
2109
|
font-weight: 400;
|
|
2087
2110
|
color: ${we("neutral",800)};
|
|
2088
|
-
`,
|
|
2111
|
+
`,Ka=de`
|
|
2089
2112
|
font-size: 12px;
|
|
2090
2113
|
line-height: 16px;
|
|
2091
2114
|
font-weight: 400;
|
|
2092
2115
|
color: ${we("neutral",700)};
|
|
2093
|
-
`,
|
|
2116
|
+
`,Ja=de`
|
|
2094
2117
|
button {
|
|
2095
2118
|
height: 25px;
|
|
2096
2119
|
font-size: 12px;
|
|
@@ -2099,12 +2122,12 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2099
2122
|
color: ${we("neutral",600)};
|
|
2100
2123
|
padding: 0 10px;
|
|
2101
2124
|
}
|
|
2102
|
-
`,
|
|
2125
|
+
`,Qa=({type:e,label:t,caption:n,color:r,onActionClick:i,showActionButton:o,pointIcon:a=G(Je,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=J(!0),d=te(),u=te(),p="raster"===e,h="line"===e,f="point"===e,g=te(),v=ie((()=>{let e=l??`${l},`;h&&(e="line,");return`${e} ${t}${n?`, ${n}`:""}. Currently ${s?"visible":"hidden"}.`}),[s,e,t,n]),m=s?"Hide":"Show";return q("div",{css:Ua,children:[G("p",{id:g,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:v}),q("div",{css:Xa,children:[q("div",{children:[p&&G("div",{css:Wa(r)}),h&&G("div",{css:qa(r)}),f&&G("div",{css:Ga(r),children:a})]}),q("div",{children:[G("p",{id:d,css:Ya,children:t}),n?G("p",{id:u,css:Ka,children:n}):null]})]}),i&&o?G("div",{css:Ja,children:G(Le,{type:"button",variant:"borderless",label:m,rightIcon:G(s?Ie:je,{}),"aria-pressed":s,"aria-labelledby":`${g} ${d}`,onClick:()=>{c((e=>!e)),i?.()}})}):null]})},el=de`
|
|
2103
2126
|
width: 100%;
|
|
2104
2127
|
display: flex;
|
|
2105
2128
|
flex-direction: column;
|
|
2106
2129
|
margin-bottom: 16px;
|
|
2107
|
-
`,
|
|
2130
|
+
`,tl=de`
|
|
2108
2131
|
height: 20px;
|
|
2109
2132
|
width: 100%;
|
|
2110
2133
|
margin-bottom: 8px;
|
|
@@ -2122,34 +2145,34 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2122
2145
|
border-top-right-radius: 3px;
|
|
2123
2146
|
border-bottom-right-radius: 3px;
|
|
2124
2147
|
}
|
|
2125
|
-
`,
|
|
2148
|
+
`,nl=de`
|
|
2126
2149
|
display: flex;
|
|
2127
2150
|
justify-content: space-between;
|
|
2128
2151
|
align-items: flex-start;
|
|
2129
|
-
`,
|
|
2152
|
+
`,rl=de`
|
|
2130
2153
|
width: 100%;
|
|
2131
2154
|
font-size: 12px;
|
|
2132
2155
|
line-height: 16px;
|
|
2133
2156
|
font-weight: 400;
|
|
2134
2157
|
color: ${we("neutral",800)};
|
|
2135
2158
|
text-align: center;
|
|
2136
|
-
`,
|
|
2159
|
+
`,il=de`
|
|
2137
2160
|
font-size: 12px;
|
|
2138
2161
|
line-height: 16px;
|
|
2139
2162
|
font-weight: 400;
|
|
2140
2163
|
color: ${we("neutral",700)};
|
|
2141
2164
|
text-align: center;
|
|
2142
|
-
`,
|
|
2165
|
+
`,ol=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(", ")})`},al=({colors:e,values:t,subLabels:n,isGradient:r})=>{return q("div",{css:el,children:[G("div",r?{css:(i=ol(e),de`
|
|
2143
2166
|
height: 20px;
|
|
2144
2167
|
width: 100%;
|
|
2145
2168
|
margin-bottom: 8px;
|
|
2146
2169
|
border: 1px solid ${we("neutral",300)};
|
|
2147
2170
|
border-radius: 4px;
|
|
2148
2171
|
${i?`background: ${i};`:""}
|
|
2149
|
-
`)}:{css:
|
|
2172
|
+
`)}:{css:tl,children:e?.map(((e,n)=>G("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),G("div",{css:nl,children:t?.map((e=>G("div",{style:{width:r?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:G("p",{css:rl,children:e})},e)))}),n&&n.length?G("div",{css:nl,children:n.map((e=>G("div",{style:{width:r?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:G("p",{css:il,style:{width:"100%"},children:e})},e)))}):null]});var i},ll=de`
|
|
2150
2173
|
display: flex;
|
|
2151
2174
|
flex-direction: column;
|
|
2152
|
-
`,
|
|
2175
|
+
`,sl=de`
|
|
2153
2176
|
display: flex;
|
|
2154
2177
|
gap: 16px;
|
|
2155
2178
|
align-items: center;
|
|
@@ -2158,41 +2181,41 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2158
2181
|
.ds-select-input-container {
|
|
2159
2182
|
margin-bottom: 0px;
|
|
2160
2183
|
}
|
|
2161
|
-
`,
|
|
2184
|
+
`,cl=de`
|
|
2162
2185
|
font-size: 18px;
|
|
2163
2186
|
line-height: 28px;
|
|
2164
2187
|
font-weight: 400;
|
|
2165
2188
|
color: ${we("neutral",700)};
|
|
2166
|
-
`,
|
|
2189
|
+
`,dl=({pageSize:e,currentPage:t,totalItems:n,onPageSizeChange:r,showItemCountText:i})=>q("div",{css:ll,children:[q("div",{css:sl,children:[G("div",{style:{width:"80px"},children:G(dr,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{r&&r(parseInt(e[0],10))},required:!0})}),G("p",{css:cl,children:"Per Page"})]}),i?G("p",{css:cl,children:(()=>{const r=e,i=(t-1)*r+1;return`Showing ${i}-${Math.min(i+r-1,n)} of ${n}`})()}):null]}),ul=e=>de`
|
|
2167
2190
|
border: 1px solid ${we("neutral",300)};
|
|
2168
2191
|
${e?"border: none;":""}
|
|
2169
|
-
`,
|
|
2192
|
+
`,pl=e=>de`
|
|
2170
2193
|
color: ${we("neutral",e?400:700)};
|
|
2171
2194
|
line-height: 20px;
|
|
2172
2195
|
white-space: nowrap;
|
|
2173
2196
|
overflow: hidden;
|
|
2174
2197
|
text-overflow: ellipsis;
|
|
2175
|
-
`,
|
|
2198
|
+
`,hl=de`
|
|
2176
2199
|
font-weight: 400;
|
|
2177
2200
|
color: ${we("neutral",700)};
|
|
2178
2201
|
white-space: nowrap;
|
|
2179
2202
|
overflow: hidden;
|
|
2180
2203
|
text-overflow: ellipsis;
|
|
2181
|
-
`,
|
|
2204
|
+
`,fl=de`
|
|
2182
2205
|
color: ${we("neutral",700)};
|
|
2183
2206
|
text-align: right;
|
|
2184
2207
|
font-weight: 700;
|
|
2185
2208
|
white-space: nowrap;
|
|
2186
2209
|
overflow: hidden;
|
|
2187
2210
|
text-overflow: ellipsis;
|
|
2188
|
-
`,
|
|
2211
|
+
`,gl=e=>de`
|
|
2189
2212
|
width: 16px;
|
|
2190
2213
|
height: 16px;
|
|
2191
2214
|
|
|
2192
2215
|
path {
|
|
2193
2216
|
fill: ${we("neutral",e?400:700)};
|
|
2194
2217
|
}
|
|
2195
|
-
`,
|
|
2218
|
+
`,vl=de`
|
|
2196
2219
|
display: flex;
|
|
2197
2220
|
align-items: center;
|
|
2198
2221
|
justify-content: space-between;
|
|
@@ -2201,7 +2224,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2201
2224
|
border-bottom: 1px solid ${we("neutral",200)};
|
|
2202
2225
|
width: 100%;
|
|
2203
2226
|
text-align: left;
|
|
2204
|
-
`,
|
|
2227
|
+
`,ml=de`
|
|
2205
2228
|
display: flex;
|
|
2206
2229
|
align-items: center;
|
|
2207
2230
|
justify-content: space-between;
|
|
@@ -2234,18 +2257,18 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2234
2257
|
&:disabled {
|
|
2235
2258
|
background-color: ${we("neutral",200)};
|
|
2236
2259
|
}
|
|
2237
|
-
`,
|
|
2260
|
+
`,xl=({id:e,label:t,caption:n,icon:i,value:a,variant:l="data",onItemClick:s,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:p=!1})=>{const h=("navigation"===l||"select"===l)&&!!s,f=h?L.button:L.div,g=d||("data"===l&&a?`${t}, ${a}`:t);return q(f,{id:e,css:["data"===l?vl:ml,p&&{backgroundColor:we("neutral",200)}],onClick:h?s:void 0,tabIndex:h?0:void 0,onKeyDown:e=>{h&&("Enter"!==e.key&&" "!==e.key||s?.())},role:h?"button":void 0,"aria-expanded":h?c:void 0,"aria-label":g,disabled:u,"aria-selected":p,children:[q(O,{gap:3,flex:"1",overflow:"hidden",children:[i,q(r,{flex:"1",minWidth:0,children:[G(R,{fontWeight:"data"===l?"400":"700",css:pl(u),children:t}),n&&G(R,{css:hl,children:n})]})]}),"data"===l&&a&&G(R,{css:fl,children:a}),"navigation"===l&&G(o,{as:De,boxSize:4,"aria-hidden":"true",css:gl(u)})]})},bl=({items:e,noBorder:t,highlightedIndex:n})=>G(r,{css:ul(t),children:e.map(((e,t)=>G(xl,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===n},e.id??e.label)))}),yl=de`
|
|
2238
2261
|
svg {
|
|
2239
2262
|
path {
|
|
2240
2263
|
fill: ${we("primary",500)};
|
|
2241
2264
|
}
|
|
2242
2265
|
}
|
|
2243
|
-
`,
|
|
2266
|
+
`,wl=de`
|
|
2244
2267
|
font-size: 16px;
|
|
2245
2268
|
line-height: 24px;
|
|
2246
2269
|
font-weight: 700;
|
|
2247
2270
|
color: ${we("neutral",900)};
|
|
2248
|
-
`,
|
|
2271
|
+
`,Cl=de`
|
|
2249
2272
|
span {
|
|
2250
2273
|
height: 20px;
|
|
2251
2274
|
width: 20px;
|
|
@@ -2255,7 +2278,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2255
2278
|
background-color: transparent;
|
|
2256
2279
|
}
|
|
2257
2280
|
}
|
|
2258
|
-
|
|
2281
|
+
`,$l=de`
|
|
2259
2282
|
font-size: 16px;
|
|
2260
2283
|
line-height: 24px;
|
|
2261
2284
|
font-weight: 400;
|
|
@@ -2265,11 +2288,11 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2265
2288
|
color: ${we("neutral",900)};
|
|
2266
2289
|
font-weight: 700;
|
|
2267
2290
|
}
|
|
2268
|
-
`,
|
|
2291
|
+
`,kl=({totalItems:e,pageSize:t,currentPage:n,variant:r="default",onPageChange:i})=>{const o="compact"===r||"compact-with-buttons"===r,a="compact-with-buttons"===r;return G("div",{"aria-label":"Pagination",children:G(T.Root,{count:e,pageSize:t,defaultPage:n,onPageChange:e=>i&&i(e.page),siblingCount:1,children:q(P,{gap:"2",size:"sm",variant:"ghost",css:Cl,children:[G(T.PrevTrigger,{asChild:!0,children:a?G(Le,{variant:"secondary",label:"Previous",size:"small",leftIcon:G(Me,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):G(ft,{css:yl,style:{rotate:"90deg"},icon:G(Me,{}),"aria-label":"Previous page"})}),o?G(T.PageText,{css:wl}):G(T.Items,{render:e=>G(ft,{css:$l,"aria-label":`Page ${e.value}`,icon:G("p",{children:e.value})})}),G(T.NextTrigger,{asChild:!0,children:a?G(Le,{variant:"secondary",label:"Next",size:"small",rightIcon:G(Me,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):G(ft,{css:yl,style:{rotate:"270deg"},icon:G(Me,{}),"aria-label":"Next page"})})]})})})},Sl=e=>de`
|
|
2269
2292
|
border: ${"full-width"===e?"none":`1px solid ${we("neutral",300)}`};
|
|
2270
2293
|
border-radius: 2px;
|
|
2271
2294
|
box-shadow: ${"full-width"===e?"none":`0 0 0 1px ${we("neutral",300)}`};
|
|
2272
|
-
`,
|
|
2295
|
+
`,El=e=>de`
|
|
2273
2296
|
tr {
|
|
2274
2297
|
background-color: ${we("neutral","full-width"===e?100:200)};
|
|
2275
2298
|
|
|
@@ -2277,14 +2300,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2277
2300
|
border-color: ${we("neutral",300)};
|
|
2278
2301
|
}
|
|
2279
2302
|
}
|
|
2280
|
-
`,
|
|
2303
|
+
`,Ll=de`
|
|
2281
2304
|
font-size: 16px;
|
|
2282
2305
|
line-height: 24px;
|
|
2283
2306
|
font-weight: 700;
|
|
2284
2307
|
color: ${we("neutral",800)};
|
|
2285
2308
|
display: flex;
|
|
2286
2309
|
align-items: center;
|
|
2287
|
-
`,
|
|
2310
|
+
`,Ol=de`
|
|
2288
2311
|
height: 24px;
|
|
2289
2312
|
width: 10px;
|
|
2290
2313
|
display: flex;
|
|
@@ -2306,19 +2329,19 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2306
2329
|
}
|
|
2307
2330
|
}
|
|
2308
2331
|
}
|
|
2309
|
-
`,
|
|
2332
|
+
`,Rl=e=>de`
|
|
2310
2333
|
svg {
|
|
2311
2334
|
path {
|
|
2312
2335
|
fill: ${e?we("primary",600):we("accessible","controls-on-neutral-lights")} !important;
|
|
2313
2336
|
}
|
|
2314
2337
|
}
|
|
2315
|
-
`,
|
|
2338
|
+
`,Tl=de`
|
|
2316
2339
|
margin-top: 12px;
|
|
2317
2340
|
display: flex;
|
|
2318
2341
|
justify-content: space-between;
|
|
2319
|
-
`,
|
|
2342
|
+
`,Pl=de`
|
|
2320
2343
|
margin-top: 9px;
|
|
2321
|
-
`,
|
|
2344
|
+
`,_l=de`
|
|
2322
2345
|
tr {
|
|
2323
2346
|
height: 48px;
|
|
2324
2347
|
|
|
@@ -2330,14 +2353,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2330
2353
|
background-color: ${we("neutral",200)};
|
|
2331
2354
|
}
|
|
2332
2355
|
}
|
|
2333
|
-
`,
|
|
2356
|
+
`,Ml=de`
|
|
2334
2357
|
height: 480px;
|
|
2335
2358
|
display: flex;
|
|
2336
2359
|
align-items: center;
|
|
2337
2360
|
justify-content: center;
|
|
2338
|
-
`,
|
|
2361
|
+
`,Dl=({columns:e,data:t=[],renderRow:n,striped:r,stickyHeader:o,pagination:a,selectable:l,selectedRows:s,variant:c="default",onSortColumn:d,onPageSizeChange:u,onPageChange:p,onAllItemsSelected:h,loading:f})=>{const[g,v]=J({key:"",order:""}),{totalItems:m=t.length,currentPage:x=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=a||{},C=(e,t)=>{v({key:e,order:t}),d&&d({key:e,order:t})},$=s?.length===t?.length,k=s&&s.length>0&&!$;return q("div",{children:[q(_.Root,{css:Sl(c),striped:r,stickyHeader:o,interactive:!0,children:[G(_.Header,{css:El(c),children:q(_.Row,{children:[l?G(_.ColumnHeader,{children:G(At,{name:"header-checkbox",checked:$,indeterminate:k,onCheckedChange:({checked:e})=>{h&&h(e)}})}):null,e.map((e=>G(_.ColumnHeader,{role:e.sortable?"columnheader":void 0,"aria-sort":e.sortable&&"asc"===g.order?"ascending":e.sortable&&"desc"===g.order?"descending":void 0,children:q("div",{css:Ll,children:[e.label,e.sortable?q("div",{css:Ol,children:[G(ft,{css:Rl(g.key===e.key&&"asc"===g.order),icon:G(Me,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(e.key,"asc"),"aria-label":"Ascending"}),G(ft,{css:Rl(g.key===e.key&&"desc"===g.order),icon:G(Me,{}),onClick:()=>C(e.key,"desc"),"aria-label":"Descending"})]}):null]})},e.key)))]})}),G(_.Body,{css:_l,children:t.map((e=>G(Y.Fragment,{children:n(e)},e.id)))})]}),f?G("div",{css:Ml,children:G(i,{size:"lg",color:we("primary",500)})}):null,q("div",{css:Tl,children:[G("div",{children:y?G(dl,{pageSize:b,currentPage:x,totalItems:m,onPageSizeChange:u,showItemCountText:w}):null}),a?G("div",{css:Pl,children:G(kl,{totalItems:m,pageSize:b,currentPage:x,onPageChange:p})}):null]})]})},Nl=_.Row,Vl=_.Cell,jl=de`
|
|
2339
2362
|
border: 1px solid ${we("neutral",300)};
|
|
2340
|
-
`,
|
|
2363
|
+
`,Il=de`
|
|
2341
2364
|
padding: 16px;
|
|
2342
2365
|
cursor: pointer;
|
|
2343
2366
|
&:focus-visible {
|
|
@@ -2352,9 +2375,9 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2352
2375
|
transparent
|
|
2353
2376
|
);
|
|
2354
2377
|
}
|
|
2355
|
-
`,
|
|
2378
|
+
`,Al=({children:e,header:t,footer:n})=>G(r,{css:jl,children:G(S.Root,{multiple:!0,children:q(S.Item,{value:"extendable-card-item",children:[q(S.ItemTrigger,{css:Il,alignItems:"center",children:[G(O,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:t}),G(S.ItemIndicator,{children:G(Me,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),q(S.ItemContent,{children:[e,n]})]})})}),zl=de`
|
|
2356
2379
|
border: 1px solid ${we("neutral",300)};
|
|
2357
|
-
`,
|
|
2380
|
+
`,Hl=de`
|
|
2358
2381
|
padding: 16px;
|
|
2359
2382
|
cursor: pointer;
|
|
2360
2383
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
@@ -2374,7 +2397,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2374
2397
|
transparent
|
|
2375
2398
|
);
|
|
2376
2399
|
}
|
|
2377
|
-
`,
|
|
2400
|
+
`,Bl=de`
|
|
2378
2401
|
.item-content-open > * {
|
|
2379
2402
|
max-height: auto;
|
|
2380
2403
|
|
|
@@ -2395,9 +2418,9 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2395
2418
|
padding-bottom 0.2s ease,
|
|
2396
2419
|
padding-top 0.2s ease;
|
|
2397
2420
|
}
|
|
2398
|
-
`,
|
|
2421
|
+
`,Fl=de`
|
|
2399
2422
|
border-top: 1px solid ${we("neutral",300)};
|
|
2400
|
-
`,
|
|
2423
|
+
`,Zl=({children:e,header:t,footer:n,expanded:i=!0,collapsible:o=!0,actions:a,showFooterOnCollapsed:l=!1})=>{const s="analysis-widget-item",[c,d]=J(i),u=`analysis-widget-header-${s}`;return G(r,{as:"section","aria-labelledby":u,css:zl,children:q(S.Root,{multiple:!0,value:o?void 0:[s],defaultValue:i?[s]:[],children:[q(S.Item,{css:Bl,value:s,children:[t&&G(S.ItemTrigger,{id:u,role:"button","aria-expanded":c,tabIndex:0,css:Hl,pointerEvents:o?"auto":"none",onClick:o?()=>{d(!c)}:void 0,children:q(O,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[t,a&&a.map((e=>G(Le,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),o&&G(S.ItemIndicator,{height:"16px",marginTop:"8px",display:"flex",children:G(Me,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),q("div",{className:c?"item-content-open":"item-content-closed","aria-hidden":!c,children:[e,!l&&n&&G(r,{css:Fl,children:n})]})]}),l&&n&&G(r,{css:Fl,children:n})]})})};function Wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ql(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Gl,Ul={exports:{}},Xl={},Yl={exports:{}},Kl={exports:{}},Jl={};var Ql,es,ts,ns,rs,is,os,as,ls,ss,cs,ds,us,ps={};
|
|
2401
2424
|
/** @license React v16.13.1
|
|
2402
2425
|
* react-is.development.js
|
|
2403
2426
|
*
|
|
@@ -2405,7 +2428,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2405
2428
|
*
|
|
2406
2429
|
* This source code is licensed under the MIT license found in the
|
|
2407
2430
|
* LICENSE file in the root directory of this source tree.
|
|
2408
|
-
*/function us(){return Jl||(Jl=1,"production"===process.env.NODE_ENV?Xl.exports=function(){if(Wl)return Yl;Wl=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,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case c:case r:case o:case i:case u:return e;default:switch(e=e&&e.$$typeof){case l:case d:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return b(e)===c}return Yl.AsyncMode=s,Yl.ConcurrentMode=c,Yl.ContextConsumer=l,Yl.ContextProvider=a,Yl.Element=t,Yl.ForwardRef=d,Yl.Fragment=r,Yl.Lazy=f,Yl.Memo=h,Yl.Portal=n,Yl.Profiler=o,Yl.StrictMode=i,Yl.Suspense=u,Yl.isAsyncMode=function(e){return y(e)||b(e)===s},Yl.isConcurrentMode=y,Yl.isContextConsumer=function(e){return b(e)===l},Yl.isContextProvider=function(e){return b(e)===a},Yl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Yl.isForwardRef=function(e){return b(e)===d},Yl.isFragment=function(e){return b(e)===r},Yl.isLazy=function(e){return b(e)===f},Yl.isMemo=function(e){return b(e)===h},Yl.isPortal=function(e){return b(e)===n},Yl.isProfiler=function(e){return b(e)===o},Yl.isStrictMode=function(e){return b(e)===i},Yl.isSuspense=function(e){return b(e)===u},Yl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x||e.$$typeof===g)},Yl.typeOf=b,Yl}():Xl.exports=(Kl||(Kl=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,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var g=e.type;switch(g){case s:case c:case r:case o:case i:case u:return g;default:var v=g&&g.$$typeof;switch(v){case l:case d:case f:case h:case a:return v;default:return p}}case n:return p}}}var y=s,w=c,C=l,$=a,k=t,S=d,E=r,L=f,O=h,R=n,T=o,P=i,_=u,M=!1;function D(e){return b(e)===c}ds.AsyncMode=y,ds.ConcurrentMode=w,ds.ContextConsumer=C,ds.ContextProvider=$,ds.Element=k,ds.ForwardRef=S,ds.Fragment=E,ds.Lazy=L,ds.Memo=O,ds.Portal=R,ds.Profiler=T,ds.StrictMode=P,ds.Suspense=_,ds.isAsyncMode=function(e){return M||(M=!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.")),D(e)||b(e)===s},ds.isConcurrentMode=D,ds.isContextConsumer=function(e){return b(e)===l},ds.isContextProvider=function(e){return b(e)===a},ds.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ds.isForwardRef=function(e){return b(e)===d},ds.isFragment=function(e){return b(e)===r},ds.isLazy=function(e){return b(e)===f},ds.isMemo=function(e){return b(e)===h},ds.isPortal=function(e){return b(e)===n},ds.isProfiler=function(e){return b(e)===o},ds.isStrictMode=function(e){return b(e)===i},ds.isSuspense=function(e){return b(e)===u},ds.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x||e.$$typeof===g)},ds.typeOf=b}()),ds)),Xl.exports}function ps(){if(es)return Ql;es=1;return Ql="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function hs(){return ns?ts:(ns=1,ts=Function.call.bind(Object.prototype.hasOwnProperty))}function fs(){if(as)return os;as=1;var e=us(),t=me,n=ps(),r=hs(),i=function(){if(is)return rs;is=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ps(),n={},r=hs();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,l,s){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var d;try{if("function"!=typeof i[c]){var u=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=i[c](o,c,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+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 p=s?s():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},rs=i}(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),os=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+o+" `"+a+"` of type `"+x(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,o,a+"["+s+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,i){var o=e[t];return l(o)?null:new h("Invalid "+r+" `"+i+"` of type `"+x(o)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+x(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||d;return new h("Invalid "+i+" `"+o+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null}))},node:f((function(e,t,n,r,i){return m(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,i,o,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[i],c=x(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,o,a,l+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o(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,i,o){for(var a=t[n],l=0;l<e.length;l++)if(p(a,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),a}return f((function(t,i,o,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,o,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,i,o,a){var l=t[r],s=x(l);if("object"!==s)return new h("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return v(i,o,a,c,b(d));var u=d(l,c,i,o,a+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(i,o,a,l,s){var c=i[o],d=x(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},i[o],e);for(var p in u){var f=e[p];if(r(e,p)&&"function"!=typeof f)return v(a,l,s,p,b(f));if(!f)return new h("Invalid "+l+" `"+s+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,a,l,s+"."+p,n);if(g)return g}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(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 i(i,a,l,c,u,p,f){if(c=c||d,p=p||l,f!==n){if(s){var g=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 g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+l;!t[v]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+p+"` 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[v]=!0,r++)}}return null==a[l]?i?null===a[l]?new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,p)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function g(e){return f((function(t,n,r,i,o,a){var l=t[n];return x(l)!==e?new h("Invalid "+i+" `"+o+"` of type `"+b(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function m(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(m);if(null===e||l(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(!m(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function x(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 b(e){if(null==e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},os}function gs(){if(cs)return Ul.exports;if(cs=1,"production"!==process.env.NODE_ENV){var e=us();Ul.exports=fs()(e.isElement,!0)}else Ul.exports=function(){if(ss)return ls;ss=1;var e=ps();function t(){}function n(){}return n.resetWarningCache=t,ls=function(){function r(t,n,r,i,o,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();return Ul.exports}function vs(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=vs(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ms(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=vs(e))&&(r&&(r+=" "),r+=t);return r}var xs,bs=Zl(Object.freeze({__proto__:null,clsx:ms,default:ms})),ys={},ws={};function Cs(){if(xs)return ws;return xs=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},ws.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]},ws.int=function(e){return parseInt(e,10)},ws.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},ws.isNum=function(e){return"number"==typeof e&&!isNaN(e)},ws}var $s,ks,Ss={};function Es(){if(ks)return ys;ks=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.addClassName=a,ys.addEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},ys.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&&a(e.body,"react-draggable-transparent-selection")},ys.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},ys.createSVGTransform=function(e,t){return o(e,t,"")},ys.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))},ys.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},ys.getTranslation=o,ys.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},ys.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},ys.matchesSelector=i,ys.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},ys.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},ys.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},ys.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},ys.removeClassName=l,ys.removeEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},ys.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&l(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){}};var e=Cs(),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(function(){if($s)return Ss;$s=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.browserPrefixToKey=n,Ss.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Ss.default=void 0,Ss.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!i)return"";if(r in i)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in i)return e[t];return""}function n(e,t){return t?"".concat(t).concat(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 Ss.default=t(),Ss}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function i(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function o(e,t,n){let{x:r,y:i}=e,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(e,", ").concat(r,")")+o}return o}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function l(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return ys}var Ls,Os={};function Rs(){if(Ls)return Os;Ls=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Os.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Os.createCoreData=function(t,r,i){const o=!(0,e.isNum)(t.lastX),a=n(t);return o?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:i,x:r,y:i}:{node:a,deltaX:r-t.lastX,deltaY:i-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:i}},Os.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}},Os.getBoundPosition=function(r,i,o){if(!r.props.bounds)return[i,o];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const l=n(r);if("string"==typeof a){const{ownerDocument:n}=l,r=n.defaultView;let i;if(i="parent"===a?l.parentNode:n.querySelector(a),!(i instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const o=i,s=r.getComputedStyle(l),c=r.getComputedStyle(o);a={left:-l.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(s.marginLeft),top:-l.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(s.marginTop),right:(0,t.innerWidth)(o)-(0,t.outerWidth)(l)-l.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(s.marginRight),bottom:(0,t.innerHeight)(o)-(0,t.outerHeight)(l)-l.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(s.marginBottom)}}(0,e.isNum)(a.right)&&(i=Math.min(i,a.right));(0,e.isNum)(a.bottom)&&(o=Math.min(o,a.bottom));(0,e.isNum)(a.left)&&(i=Math.max(i,a.left));(0,e.isNum)(a.top)&&(o=Math.max(o,a.top));return[i,o]},Os.getControlPosition=function(e,r,i){const o="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!o)return null;const a=n(i),l=i.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(o||e,l,i.props.scale)},Os.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]};var e=Cs(),t=Es();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Os}var Ts,Ps,_s,Ms,Ds={},Ns={};function Vs(){if(Ts)return Ns;return Ts=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=function(){},Ns}function js(){if(Ps)return Ds;Ps=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(Y),t=l(gs()),n=l(ge),r=Es(),i=Rs(),o=Cs(),a=l(Vs());function l(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},u={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=u,h=class extends e.Component{constructor(){super(...arguments),c(this,"dragging",!1),c(this,"lastX",NaN),c(this,"lastY",NaN),c(this,"touchIdentifier",null),c(this,"mounted",!1),c(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,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const l=(0,i.getControlPosition)(e,o,this);if(null==l)return;const{x:s,y:c}=l,d=(0,i.createCoreData)(this,s,c);(0,a.default)("DraggableCore: handleDragStart: %j",d),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),c(this,"handleDrag",(e=>{const t=(0,i.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,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,a.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)}})),c(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const l=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,l)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(s.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(s.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(s.ownerDocument,p.stop,this.handleDragStop))})),c(this,"onMouseDown",(e=>(p=u,this.handleDragStart(e)))),c(this,"onMouseUp",(e=>(p=u,this.handleDragStop(e)))),c(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),c(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,u.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,u.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ds.default=h,c(h,"displayName","DraggableCore"),c(h,"propTypes",{allowAnyClick: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:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),c(h,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ds}function Is(){return _s||(_s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.default}}),e.default=void 0;var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(Y),n=d(gs()),r=d(ge),i=d(bs),o=Es(),a=Rs(),l=Cs(),s=d(js()),c=d(Vs());function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f 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,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),h(this,"onDragStart",((e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),h(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.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[i,o]=(0,a.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=o,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)})),h(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.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.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:u,position:h,positionOffset:f,scale:g,...v}=this.props;let m={},x=null;const b=!Boolean(h)||this.state.dragging,y=h||l,w={x:(0,a.canDragX)(this)&&b?this.state.x:y.x,y:(0,a.canDragY)(this)&&b?this.state.y:y.y};this.state.isElementSVG?x=(0,o.createSVGTransform)(w,f):m=(0,o.createCSSTransform)(w,f);const C=(0,i.default)(r.props.className||"",c,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(s.default,p({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...m},transform:x}))}}e.default=f,h(f,"displayName","Draggable"),h(f,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(f,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(Gl)),Gl}var As=function(){if(Ms)return ql.exports;Ms=1;const{default:e,DraggableCore:t}=Is();return ql.exports=e,ql.exports.default=e,ql.exports.DraggableCore=t,ql.exports}(),zs=Fl(As);const Hs=e=>de`
|
|
2431
|
+
*/function hs(){return es||(es=1,"production"===process.env.NODE_ENV?Kl.exports=function(){if(Gl)return Jl;Gl=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,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case c:case r:case o:case i:case u:return e;default:switch(e=e&&e.$$typeof){case l:case d:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return b(e)===c}return Jl.AsyncMode=s,Jl.ConcurrentMode=c,Jl.ContextConsumer=l,Jl.ContextProvider=a,Jl.Element=t,Jl.ForwardRef=d,Jl.Fragment=r,Jl.Lazy=f,Jl.Memo=h,Jl.Portal=n,Jl.Profiler=o,Jl.StrictMode=i,Jl.Suspense=u,Jl.isAsyncMode=function(e){return y(e)||b(e)===s},Jl.isConcurrentMode=y,Jl.isContextConsumer=function(e){return b(e)===l},Jl.isContextProvider=function(e){return b(e)===a},Jl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Jl.isForwardRef=function(e){return b(e)===d},Jl.isFragment=function(e){return b(e)===r},Jl.isLazy=function(e){return b(e)===f},Jl.isMemo=function(e){return b(e)===h},Jl.isPortal=function(e){return b(e)===n},Jl.isProfiler=function(e){return b(e)===o},Jl.isStrictMode=function(e){return b(e)===i},Jl.isSuspense=function(e){return b(e)===u},Jl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x||e.$$typeof===g)},Jl.typeOf=b,Jl}():Kl.exports=(Ql||(Ql=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,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var g=e.type;switch(g){case s:case c:case r:case o:case i:case u:return g;default:var v=g&&g.$$typeof;switch(v){case l:case d:case f:case h:case a:return v;default:return p}}case n:return p}}}var y=s,w=c,C=l,$=a,k=t,S=d,E=r,L=f,O=h,R=n,T=o,P=i,_=u,M=!1;function D(e){return b(e)===c}ps.AsyncMode=y,ps.ConcurrentMode=w,ps.ContextConsumer=C,ps.ContextProvider=$,ps.Element=k,ps.ForwardRef=S,ps.Fragment=E,ps.Lazy=L,ps.Memo=O,ps.Portal=R,ps.Profiler=T,ps.StrictMode=P,ps.Suspense=_,ps.isAsyncMode=function(e){return M||(M=!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.")),D(e)||b(e)===s},ps.isConcurrentMode=D,ps.isContextConsumer=function(e){return b(e)===l},ps.isContextProvider=function(e){return b(e)===a},ps.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ps.isForwardRef=function(e){return b(e)===d},ps.isFragment=function(e){return b(e)===r},ps.isLazy=function(e){return b(e)===f},ps.isMemo=function(e){return b(e)===h},ps.isPortal=function(e){return b(e)===n},ps.isProfiler=function(e){return b(e)===o},ps.isStrictMode=function(e){return b(e)===i},ps.isSuspense=function(e){return b(e)===u},ps.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x||e.$$typeof===g)},ps.typeOf=b}()),ps)),Kl.exports}function fs(){if(ns)return ts;ns=1;return ts="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function gs(){return is?rs:(is=1,rs=Function.call.bind(Object.prototype.hasOwnProperty))}function vs(){if(ss)return ls;ss=1;var e=hs(),t=me,n=fs(),r=gs(),i=function(){if(as)return os;as=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=fs(),n={},r=gs();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,l,s){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var d;try{if("function"!=typeof i[c]){var u=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=i[c](o,c,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+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 p=s?s():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},os=i}(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ls=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+o+" `"+a+"` of type `"+x(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,o,a+"["+s+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,i){var o=e[t];return l(o)?null:new h("Invalid "+r+" `"+i+"` of type `"+x(o)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+x(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||d;return new h("Invalid "+i+" `"+o+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null}))},node:f((function(e,t,n,r,i){return m(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,i,o,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[i],c=x(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,o,a,l+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o(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,i,o){for(var a=t[n],l=0;l<e.length;l++)if(p(a,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),a}return f((function(t,i,o,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,o,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,i,o,a){var l=t[r],s=x(l);if("object"!==s)return new h("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return v(i,o,a,c,b(d));var u=d(l,c,i,o,a+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(i,o,a,l,s){var c=i[o],d=x(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},i[o],e);for(var p in u){var f=e[p];if(r(e,p)&&"function"!=typeof f)return v(a,l,s,p,b(f));if(!f)return new h("Invalid "+l+" `"+s+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,a,l,s+"."+p,n);if(g)return g}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(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 i(i,a,l,c,u,p,f){if(c=c||d,p=p||l,f!==n){if(s){var g=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 g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+l;!t[v]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+p+"` 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[v]=!0,r++)}}return null==a[l]?i?null===a[l]?new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,p)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function g(e){return f((function(t,n,r,i,o,a){var l=t[n];return x(l)!==e?new h("Invalid "+i+" `"+o+"` of type `"+b(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function m(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(m);if(null===e||l(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(!m(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function x(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 b(e){if(null==e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},ls}function ms(){if(us)return Yl.exports;if(us=1,"production"!==process.env.NODE_ENV){var e=hs();Yl.exports=vs()(e.isElement,!0)}else Yl.exports=function(){if(ds)return cs;ds=1;var e=fs();function t(){}function n(){}return n.resetWarningCache=t,cs=function(){function r(t,n,r,i,o,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();return Yl.exports}function xs(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=xs(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function bs(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=xs(e))&&(r&&(r+=" "),r+=t);return r}var ys,ws=ql(Object.freeze({__proto__:null,clsx:bs,default:bs})),Cs={},$s={};function ks(){if(ys)return $s;return ys=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},$s.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]},$s.int=function(e){return parseInt(e,10)},$s.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},$s.isNum=function(e){return"number"==typeof e&&!isNaN(e)},$s}var Ss,Es,Ls={};function Os(){if(Es)return Cs;Es=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.addClassName=a,Cs.addEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Cs.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&&a(e.body,"react-draggable-transparent-selection")},Cs.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Cs.createSVGTransform=function(e,t){return o(e,t,"")},Cs.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))},Cs.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},Cs.getTranslation=o,Cs.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},Cs.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},Cs.matchesSelector=i,Cs.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Cs.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},Cs.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},Cs.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},Cs.removeClassName=l,Cs.removeEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Cs.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&l(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){}};var e=ks(),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(function(){if(Ss)return Ls;Ss=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.browserPrefixToKey=n,Ls.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Ls.default=void 0,Ls.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!i)return"";if(r in i)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in i)return e[t];return""}function n(e,t){return t?"".concat(t).concat(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 Ls.default=t(),Ls}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function i(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function o(e,t,n){let{x:r,y:i}=e,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(e,", ").concat(r,")")+o}return o}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function l(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return Cs}var Rs,Ts={};function Ps(){if(Rs)return Ts;Rs=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ts.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ts.createCoreData=function(t,r,i){const o=!(0,e.isNum)(t.lastX),a=n(t);return o?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:i,x:r,y:i}:{node:a,deltaX:r-t.lastX,deltaY:i-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:i}},Ts.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}},Ts.getBoundPosition=function(r,i,o){if(!r.props.bounds)return[i,o];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const l=n(r);if("string"==typeof a){const{ownerDocument:n}=l,r=n.defaultView;let i;if(i="parent"===a?l.parentNode:n.querySelector(a),!(i instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const o=i,s=r.getComputedStyle(l),c=r.getComputedStyle(o);a={left:-l.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(s.marginLeft),top:-l.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(s.marginTop),right:(0,t.innerWidth)(o)-(0,t.outerWidth)(l)-l.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(s.marginRight),bottom:(0,t.innerHeight)(o)-(0,t.outerHeight)(l)-l.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(s.marginBottom)}}(0,e.isNum)(a.right)&&(i=Math.min(i,a.right));(0,e.isNum)(a.bottom)&&(o=Math.min(o,a.bottom));(0,e.isNum)(a.left)&&(i=Math.max(i,a.left));(0,e.isNum)(a.top)&&(o=Math.max(o,a.top));return[i,o]},Ts.getControlPosition=function(e,r,i){const o="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!o)return null;const a=n(i),l=i.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(o||e,l,i.props.scale)},Ts.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]};var e=ks(),t=Os();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ts}var _s,Ms,Ds,Ns,Vs={},js={};function Is(){if(_s)return js;return _s=1,Object.defineProperty(js,"__esModule",{value:!0}),js.default=function(){},js}function As(){if(Ms)return Vs;Ms=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(Y),t=l(ms()),n=l(ge),r=Os(),i=Ps(),o=ks(),a=l(Is());function l(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},u={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=u,h=class extends e.Component{constructor(){super(...arguments),c(this,"dragging",!1),c(this,"lastX",NaN),c(this,"lastY",NaN),c(this,"touchIdentifier",null),c(this,"mounted",!1),c(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,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const l=(0,i.getControlPosition)(e,o,this);if(null==l)return;const{x:s,y:c}=l,d=(0,i.createCoreData)(this,s,c);(0,a.default)("DraggableCore: handleDragStart: %j",d),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),c(this,"handleDrag",(e=>{const t=(0,i.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,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,a.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)}})),c(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const l=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,l)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(s.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(s.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(s.ownerDocument,p.stop,this.handleDragStop))})),c(this,"onMouseDown",(e=>(p=u,this.handleDragStart(e)))),c(this,"onMouseUp",(e=>(p=u,this.handleDragStop(e)))),c(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),c(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,u.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,u.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Vs.default=h,c(h,"displayName","DraggableCore"),c(h,"propTypes",{allowAnyClick: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:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),c(h,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Vs}function zs(){return Ds||(Ds=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.default}}),e.default=void 0;var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(Y),n=d(ms()),r=d(ge),i=d(ws),o=Os(),a=Ps(),l=ks(),s=d(As()),c=d(Is());function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===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:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f 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,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),h(this,"onDragStart",((e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),h(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.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[i,o]=(0,a.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=o,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)})),h(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.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.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:u,position:h,positionOffset:f,scale:g,...v}=this.props;let m={},x=null;const b=!Boolean(h)||this.state.dragging,y=h||l,w={x:(0,a.canDragX)(this)&&b?this.state.x:y.x,y:(0,a.canDragY)(this)&&b?this.state.y:y.y};this.state.isElementSVG?x=(0,o.createSVGTransform)(w,f):m=(0,o.createCSSTransform)(w,f);const C=(0,i.default)(r.props.className||"",c,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(s.default,p({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...m},transform:x}))}}e.default=f,h(f,"displayName","Draggable"),h(f,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(f,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(Xl)),Xl}var Hs=function(){if(Ns)return Ul.exports;Ns=1;const{default:e,DraggableCore:t}=zs();return Ul.exports=e,Ul.exports.default=e,Ul.exports.DraggableCore=t,Ul.exports}(),Bs=Wl(Hs);const Fs=e=>de`
|
|
2409
2432
|
width: 240px;
|
|
2410
2433
|
${"medium"===e&&"width: 320px;"}
|
|
2411
2434
|
${"large"===e&&"width: 440px;"}
|
|
@@ -2416,7 +2439,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2416
2439
|
border-radius: 4px;
|
|
2417
2440
|
box-shadow: 0px 4px 6px -4px #0000001a;
|
|
2418
2441
|
box-shadow: 0px 10px 15px -3px #0000001a;
|
|
2419
|
-
`,
|
|
2442
|
+
`,Zs=de`
|
|
2420
2443
|
height: 100%;
|
|
2421
2444
|
min-height: 40px;
|
|
2422
2445
|
display: flex;
|
|
@@ -2424,27 +2447,27 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2424
2447
|
justify-content: space-between;
|
|
2425
2448
|
padding: 8px;
|
|
2426
2449
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
2427
|
-
`,
|
|
2450
|
+
`,Ws=de`
|
|
2428
2451
|
top: 10px;
|
|
2429
|
-
`,
|
|
2452
|
+
`,qs=de`
|
|
2430
2453
|
padding: 12px;
|
|
2431
|
-
`,
|
|
2454
|
+
`,Gs=({header:e,content:t,footer:n,size:r="medium",draggable:i,blocking:o,open:a,onClose:s})=>a?G(M.Root,{open:a,onOpenChange:s,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!i&&!o,preventScroll:!i&&!o,closeOnEscape:!o,defaultOpen:!0,children:q(l,{children:[i?null:G(M.Backdrop,{}),G(Bs,{disabled:!i,children:G(M.Positioner,{children:q(M.Content,{css:Fs(r),children:[q(M.Header,{css:Zs,children:[e,o?null:G(M.CloseTrigger,{css:Ws,asChild:!0,children:G(gt,{})})]}),G(M.Body,{css:qs,children:t}),n?G(M.Footer,{padding:"12px",children:n}):null]})})})]})}):null,Us=e=>de`
|
|
2432
2455
|
height: 100%;
|
|
2433
2456
|
width: ${e||"320px"};
|
|
2434
2457
|
background-color: ${we("neutral",100)};
|
|
2435
2458
|
box-shadow: 0px 1px 2px -1px #0000001a;
|
|
2436
2459
|
box-shadow: 0px 1px 3px 0px #0000001a;
|
|
2437
2460
|
position: relative;
|
|
2438
|
-
`,
|
|
2461
|
+
`,Xs=de`
|
|
2439
2462
|
border-right: 1px solid ${we("neutral",300)};
|
|
2440
|
-
`,
|
|
2463
|
+
`,Ys=de`
|
|
2441
2464
|
border: 1px solid ${we("neutral",300)};
|
|
2442
2465
|
border-radius: 4px;
|
|
2443
|
-
`,
|
|
2466
|
+
`,Ks=de`
|
|
2444
2467
|
min-height: 48px;
|
|
2445
2468
|
width: 100%;
|
|
2446
2469
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
2447
|
-
`,
|
|
2470
|
+
`,Js=(e,t)=>de`
|
|
2448
2471
|
height: ${((e,t)=>e&&t?`calc(100% - ${e+t}px)`:e?`calc(100% - ${e}px)`:t?`calc(100% - ${t}px)`:"100%")(e,t)};
|
|
2449
2472
|
width: 100%;
|
|
2450
2473
|
overflow-y: auto;
|
|
@@ -2452,7 +2475,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2452
2475
|
&:focus-visible {
|
|
2453
2476
|
outline-color: ${we("primary",700)};
|
|
2454
2477
|
}
|
|
2455
|
-
`,
|
|
2478
|
+
`,Qs=de`
|
|
2456
2479
|
min-height: 64px;
|
|
2457
2480
|
width: 100%;
|
|
2458
2481
|
display: flex;
|
|
@@ -2462,7 +2485,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2462
2485
|
bottom: 0;
|
|
2463
2486
|
left: 0;
|
|
2464
2487
|
border-top: 1px solid ${we("neutral",300)};
|
|
2465
|
-
`,
|
|
2488
|
+
`,ec=({header:e,content:t,footer:n,variant:r="fixed",width:i})=>{const[o,a]=J(void 0),[l,s]=J(void 0),c=Q(null),d=Q(null);ee((()=>{a(c?.current?.getBoundingClientRect()?.height),s(d?.current?.getBoundingClientRect()?.height)}),[e,n]);return q("div",{css:[Us(i),"fixed"===r?Xs:Ys],children:[e?G("div",{css:Ks,ref:c,children:e}):null,G("div",{css:Js(o,l),children:t}),n?G("div",{css:Qs,ref:d,children:n}):null]})};var tc,nc;!function(){if(nc)return tc;nc=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 i=0,o="Warning: "+e.replace(/%s/g,(function(){return t[i++]}));"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};e=function(e,n,r){var i=arguments.length;r=new Array(i>2?i-2:0);for(var o=2;o<i;o++)r[o-2]=arguments[o];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}tc=e}();var rc=ic()?ne:ee;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function ic(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var oc=function(e){var t,n=e.children,r=e.type,i=void 0===r?"reach-portal":r,o=Q(null),a=Q(null),l=(t=J(Object.create(null))[1],oe((function(){t(Object.create(null))}),[]));return rc((function(){if(o.current){var e=o.current.ownerDocument;return a.current=null==e?void 0:e.createElement(i),e.body.appendChild(a.current),l(),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}}),[i,l]),a.current?ve(n,a.current):ae("span",{ref:o})};"production"!==process.env.NODE_ENV&&(oc.displayName="Portal");
|
|
2466
2489
|
/*! *****************************************************************************
|
|
2467
2490
|
Copyright (c) Microsoft Corporation.
|
|
2468
2491
|
|
|
@@ -2476,16 +2499,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
2476
2499
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2477
2500
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2478
2501
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2479
|
-
***************************************************************************** */var ic,oc,ac=function(){return ac=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ac.apply(this,arguments)};function lc(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function sc(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 cc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function dc(e,t,n){if(2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);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"}(ic||(ic={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(oc||(oc={}));var uc=ic.Start,pc=ic.Stop,hc=ic.Raise,fc=ic.Send,gc=ic.Cancel,vc=ic.NullEvent,mc=ic.Assign;ic.After,ic.DoneState;var xc=ic.Log,bc=ic.Init,yc=ic.Invoke;ic.ErrorExecution;var wc,Cc=ic.ErrorPlatform,$c=ic.ErrorCustom,kc=ic.Update,Sc=ic.Choose,Ec=ic.Pure,Lc={},Oc="xstate.guard",Rc="production"===process.env.NODE_ENV;function Tc(e,t,n){void 0===n&&(n=".");var r=Mc(e,n),i=Mc(t,n);return Xc(i)?!!Xc(r)&&i===r:Xc(r)?r in i:Object.keys(r).every((function(e){return e in i&&Tc(r[e],i[e])}))}function Pc(e){try{return Xc(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 _c(e,t){try{return Gc(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Mc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Gc(e)?Dc(e):"string"!=typeof e?e:Dc(_c(e,t));var n}function Dc(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 Nc(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var o=r[i];n[o]=t(e[o],o,e,i)}return n}function Vc(e,t,n){var r,i,o={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(o[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var jc=function(e){return function(t){var n,r,i=t;try{for(var o=sc(e),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Ic(e){return e?Xc(e)?[[e]]:Ac(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Ic(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Ac(e){var t;return(t=[]).concat.apply(t,dc([],cc(e),!1))}function zc(e){return Gc(e)?e:[e]}function Hc(e){return void 0===e?[]:zc(e)}function Bc(e,t,n){var r,i;if(Uc(e))return e(t,n.data);var o={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];Uc(c)?o[s]=c(t,n.data):o[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function Fc(e){return e instanceof Promise||!(null===e||!Uc(e)&&"object"!=typeof e||!Uc(e.then))}function Zc(e,t){return Nc(e.states,(function(e,n){if(e){var r=(Xc(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Zc(e,r)}}}))}function Wc(e,t,n,r){Rc||qc(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,o,a=n.assignment,l={state:r,action:n,_event:t},s={};if(Uc(a))s=a(e,t.data,l);else try{for(var c=sc(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=Uc(p)?p(e,t.data,l):p}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return Object.assign({},e,s)}),e):e;return i}var qc=function(){};function Gc(e){return Array.isArray(e)}function Uc(e){return"function"==typeof e}function Xc(e){return"string"==typeof e}function Yc(e,t){if(e)return Xc(e)?{type:Oc,name:e,predicate:t?t[e]:void 0}:Uc(e)?{type:Oc,name:e.name,predicate:e}:e}Rc||(qc=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 Kc=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Jc(e){return!!e&&"__xstatenode"in e}function Qc(e,t){return Xc(e)||"number"==typeof e?ac({type:e},t):e}function ed(e,t){if(!Xc(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=Qc(e);return ac({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function td(e,t){return zc(t).map((function(t){return void 0===t||"string"==typeof t||Jc(t)?{target:t,event:e}:ac(ac({},t),{event:e})}))}function nd(e,t,n,r,i){var o=e.options.guards,a={state:i,cond:t,_event:r};if(t.type===Oc)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,a);var l=null==o?void 0:o[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function rd(e){return"string"==typeof e?{type:e}:e}function id(e,t,n){var r=function(){},i="object"==typeof e,o=i?e:null;return{next:((i?e.next:e)||r).bind(o),error:((i?e.error:t)||r).bind(o),complete:((i?e.complete:n)||r).bind(o)}}function od(e,t){return"".concat(e,":invocation[").concat(t,"]")}function ad(e){return(e.type===hc||e.type===fc&&e.to===oc.Internal)&&"number"!=typeof e.delay}(wc={})[Kc]=function(){return this},wc[Symbol.observable]=function(){return this};var ld=ed({type:bc});function sd(e,t){return t&&t[e]||void 0}function cd(e,t){var n;if(Xc(e)||"number"==typeof e)n=Uc(r=sd(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Uc(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Uc(r=sd(e.type,t)))n=ac(ac({},e),{exec:r});else if(r){var i=r.type||e.type;n=ac(ac(ac({},r),e),{type:i})}else n=e}return n}var dd=function(e,t){return e?(Gc(e)?e:[e]).map((function(e){return cd(e,t)})):[]};function ud(e){var t=cd(e);return ac(ac({id:Xc(e)?e:t.id},t),{type:t.type})}function pd(e,t){var n="".concat(ic.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function hd(e,t){var n="".concat(ic.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function fd(e,t){var n="".concat(ic.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function gd(e,t,n,r,i,o,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var i=sc(e),o=i.next();!o.done;o=i.next())for(var a=o.value,l=0;l<a.actions.length;)a.actions[l].type!==mc?l++:(r.push(a.actions[l]),a.actions.splice(l,1))}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(i),s=l.length?Wc(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(i,l){var u;switch(l.type){case hc:var p=function(e,t,n,r){var i,o={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,o):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];i=Uc(l)?l(t,n.data,o):l}else i=Uc(e.delay)?e.delay(t,n.data,o):e.delay;return ac(ac({},e),{type:hc,_event:a,delay:i})}(l,s,r,e.options.delays);return o&&"number"==typeof p.delay&&o(p,s,r),p;case fc:var h=function(e,t,n,r){var i,o={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,o):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];i=Uc(l)?l(t,n.data,o):l}else i=Uc(e.delay)?e.delay(t,n.data,o):e.delay;var s=Uc(e.to)?e.to(t,n.data,o):e.to;return ac(ac({},e),{to:s,_event:a,event:a.data,delay:i})}(l,s,r,e.options.delays);if(!Rc){var f=l.delay;qc(!Xc(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return o&&h.to!==oc.Internal&&("entry"===i?d.push(h):o(h,s,r)),h;case xc:var g=function(e,t,n){return ac(ac({},e),{value:Xc(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==o||o(g,s,r),g;case Sc:if(!(b=null===(u=l.conds.find((function(n){var i=Yc(n.cond,e.options.guards);return!i||nd(e,i,s,r,o?void 0:t)})))||void 0===u?void 0:u.actions))return[];var v=cc(gd(e,t,s,r,[{type:i,actions:dd(Hc(b),e.options.actions)}],o,a),2),m=v[0],x=v[1];return s=x,null==c||c.push(s),m;case Ec:var b;if(!(b=l.get(s,r.data)))return[];var y=cc(gd(e,t,s,r,[{type:i,actions:dd(Hc(b),e.options.actions)}],o,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case pc:g=function(e,t,n){var r=Uc(e.activity)?e.activity(t,n.data):e.activity,i="string"==typeof r?{id:r}:r;return{type:ic.Stop,activity:i}}(l,s,r);return null==o||o(g,n,r),g;case mc:s=Wc(s,r,[l],o?void 0:t),null==c||c.push(s);break;default:var $=cd(l,e.options.actions),k=$.exec;if(o)o($,s,r);else if(k&&c){var S=c.length-1,E=ac(ac({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,dc([c[S]],cc(t),!1))}});$=E}return $}}var p=Ac(i.map((function(e){var t,n,i=[];try{for(var a=sc(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(i=i.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){o(e,s,r)})),d.length=0,i})));return[p,s]}var vd=function(e,t){return t(e)};function md(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Kc]=function(){return this},t}function xd(e,t,n){var r=md(t);if(r.deferred=!0,Jc(e)){var i=r.state=vd(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var bd=function(e){return"atomic"===e.type||"final"===e.type};function yd(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function wd(e){return yd(e).filter((function(e){return"history"!==e.type}))}function Cd(e){var t=[e];return bd(e)?t:t.concat(Ac(wd(e).map(Cd)))}function $d(e,t){var n,r,i,o,a,l,s,c,d=Sd(new Set(e)),u=new Set(t);try{for(var p=sc(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Sd(u);try{for(var v=sc(u),m=v.next();!m.done;m=v.next()){if("compound"!==($=m.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var x=(a=void 0,sc(wd($))),b=x.next();!b.done;b=x.next()){var y=b.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var w=sc(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function kd(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(bd(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=kd(e,t)})),i}function Sd(e){var t,n,r=new Map;try{for(var i=sc(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Ed(e,t){return kd(e,Sd($d([e],t)))}function Ld(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Od(e,t){return"compound"===t.type?wd(t).some((function(t){return"final"===t.type&&Ld(e,t)})):"parallel"===t.type&&wd(t).every((function(t){return Od(e,t)}))}function Rd(e){return new Set(Ac(e.map((function(e){return e.tags}))))}function Td(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Xc(e)||Xc(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Td(e[n],t[n])}))}var Pd=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Lc,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||Lc,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 dc([],cc(new Set(Ac(dc([],cc(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:ld,_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=ld;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="."),Xc(e))return[e];var r=Object.keys(e);return r.concat.apply(r,dc([],cc(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=lc(e,["configuration","transitions","tags","machine"]);return ac(ac({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Tc(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Rc&&qc(!!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}(),_d={deferEvents:!1},Md=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ac(ac({},_d),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}(),Dd=new Map,Nd=0,Vd=function(){return"x:".concat(Nd++)},jd=function(e,t){return Dd.set(e,t),e},Id=function(e){return Dd.get(e)},Ad=function(e){Dd.delete(e)};function zd(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Rc||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 Hd(e){if(zd()){var t=function(){var e=zd();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Bd(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],o=!1,a=function(e){var t;return ac(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Kc]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!o){for(o=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,l),r.forEach((function(e){return e.next(n)}))}o=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var o=id(e,t,i);return r.add(o),o.next(n),{unsubscribe:function(){r.delete(o)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var Fd,Zd={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Fd||(Fd={}));var Wd=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=Fd.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Gc(e))return r.batch(e),r.state;var n=ed(Qc(e,t));if(r.status===Fd.Stopped)return Rc||qc(!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!==Fd.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 i,o=r.parent&&(t===oc.Parent||r.parent.id===t),a=o?r.parent:Xc(t)?t===oc.Internal?r:r.children.get(t)||Id(t):(i=t)&&"function"==typeof i.send?t:void 0;if(a)if("machine"in a){if(r.status!==Fd.Stopped||r.parent!==a||r.state.done){var l=ac(ac({},e),{name:e.name===$c?"".concat(fd(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Rc||qc(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=r.machine.options.actions);var o=e.exec||sd(e.type,i),a=Uc(o)?o:o?o.exec:e.exec;if(a)try{return a(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 hc:var l=e;r.defer(l);break;case fc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===ld):r.send(s._event);break;case gc:r.cancel(e.sendId);break;case uc:if(r.status!==Fd.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===ic.Invoke){var d=rd(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Rc||qc(!("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(Rc||qc(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?Bc(h,t,n):void 0;if("string"==typeof u)return;var v=Uc(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!v)return;var m=void 0;Jc(v)&&(v=g?v.withContext(g):v,m={autoForward:f}),r.spawn(v,p,m)}else r.spawnActivity(c);break;case pc:r.stopChild(e.activity.id);break;case xc:var x=e,b=x.label,y=x.value;b?r.logger(b,y):r.logger(y);break;default:Rc||qc(!1,"No implementation found for action type '".concat(e.type,"'"))}};var i=ac(ac({},e.defaultOptions),n),o=i.clock,a=i.logger,l=i.parent,s=i.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=o,this.parent=l,this.options=i,this.scheduler=new Md({deferEvents:this.options.deferEvents}),this.sessionId=Vd()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:vd(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Rc||qc(this.status!==Fd.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 i=sc(e.actions),o=i.next();!o.done;o=i.next()){var a=o.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,o,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==ld||!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 p=sc(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=sc(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}try{for(var v=sc(this.contextListeners),m=v.next();!m.done;m=v.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),b=x&&x.doneData?Bc(x.doneData,e.context,t):void 0;this._doneEvent=hd(this.id,b);try{for(var y=sc(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),Ad(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Fd.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=id(e,t,n);this.listeners.add(i.next),this.status!==Fd.NotStarted&&i.next(this.state);var o=function(){r.doneListeners.delete(o),r.stopListeners.delete(o),i.complete()};return this.status===Fd.Stopped?i.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(o),r.stopListeners.delete(o)}}},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===Fd.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===Fd.Running)return this;this.machine._init(),jd(this.sessionId,this),this.initialized=!0,this.status=Fd.Running;var n=void 0===e?this.initialState:vd(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Pd.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,ld)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Uc(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,o,a,l,s,c;try{for(var d=sc(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}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 h=sc(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=sc(this.contextListeners),v=g.next();!v.done;v=g.next()){p=v.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var m=sc(this.doneListeners),x=m.next();!x.done;x=m.next()){p=x.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Fd.Stopped,this._initialState=void 0;try{for(var b=sc(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Md({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=ed({type:"xstate.stop"}),r=vd(e,(function(){var t=Ac(dc([],cc(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return dd(t.onExit,e.machine.options.actions)}))),r=cc(gd(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),i=r[0],o=r[1],a=new Pd({value:e.state.value,context:o,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!ad(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),Ad(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Fd.NotStarted&&this.options.deferEvents)Rc||qc(!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!==Fd.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,i,o=t.state,a=!1,l=[],s=function(e){var r=ed(e);t.forward(r),o=vd(t,(function(){return t.machine.transition(o,r,void 0,n||void 0)})),l.push.apply(l,dc([],cc(t.machine.config.predictableActionArguments?o.actions:o.actions.map((function(e){return function(e,t){var n=e.exec;return ac(ac({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,o)}))),!1)),a=a||!!o.changed};try{for(var c=sc(e),d=c.next();!d.done;d=c.next()){s(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}o.changed=a,o.actions=l,t.update(o,ed(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=ed(e);if(0===r.name.indexOf(Cc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Cc)})))throw r.data.data;return vd(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=sc(this.forwardTo),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.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),Uc(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Fd.Running)return xd(e,t);if(Fc(e))return this.spawnPromise(Promise.resolve(e),t);if(Uc(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Uc(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(Jc(e))return this.spawnMachine(e,ac(ac({},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,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,ac(ac({},this.options),{parent:this,id:n.id||t.id})),o=ac(ac({},Zd),n);o.sync&&i.onTransition((function(e){r.send(kc,{state:e,id:i.id})}));var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(ed(e,{origin:i.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Bd(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,o=!1;e.then((function(e){o||(r=e,i.removeChild(t),i.send(ed(hd(t,e),{origin:t})))}),(function(e){if(!o){i.removeChild(t);var n=fd(t,e);try{i.send(ed(n,{origin:t}))}catch(r){!function(e,t,n){if(!Rc){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 i=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(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=id(t,n,r),o=!1;return e.then((function(e){o||(i.next(e),o||i.complete())}),(function(e){o||i.error(e)})),{unsubscribe:function(){return o=!0}}},stop:function(){o=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,i,o=this,a=!1,l=new Set,s=new Set;try{i=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||o.send(ed(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(fd(t,e))}if(Fc(i))return this.spawnPromise(i,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=id(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,Uc(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,i=this,o=e.subscribe((function(e){r=e,i.send(ed(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(ed(fd(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(ed(hd(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Kc]=function(){return this},n);return this.children.set(t,a),a},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 Rc||qc(!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}}})[Kc]=function(){return this},n))},e.prototype.attachDev=function(){var e=zd();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(ac(ac({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:ac({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}Hd(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Kc]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Fd.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=qd,e}();function qd(e,t){return new Wd(e,t)}function Gd(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Ud(e){return ac(ac({type:yc},e),{toJSON:function(){e.onDone,e.onError;var t=lc(e,["onDone","onError"]);return ac(ac({},t),{type:yc,src:Gd(e.src)})}})}var Xd="",Yd="*",Kd={},Jd=function(e){return"#"===e[0]},Qd=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var o,a=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==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.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||dc([this.machine.key],cc(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!==(o=this.config.schema)&&void 0!==o?o:{},this.description=this.config.description,Rc||qc(!("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?Nc(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,ac(((r={})[i.id]=i,r),i.idMap)),i})):Kd;var l=0;!function e(t){var n,r;t.order=l++;try{for(var i=sc(yd(t)),o=i.next();!o.done;o=i.next()){e(o.value)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}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===Xd})):Xd in this.config.on),this.strict=!!this.config.strict,this.onEntry=Hc(this.config.entry||this.config.onEntry).map((function(e){return cd(e)})),this.onExit=Hc(this.config.exit||this.config.onExit).map((function(e){return cd(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Hc(this.config.invoke).map((function(e,t){var n,r;if(Jc(e)){var i=od(a.id,t);return a.machine.options.services=ac(((n={})[i]=e,n),a.machine.options.services),Ud({src:i,id:i})}if(Xc(e.src)){i=e.id||od(a.id,t);return Ud(ac(ac({},e),{id:i,src:e.src}))}if(Jc(e.src)||Uc(e.src)){i=e.id||od(a.id,t);return a.machine.options.services=ac(((r={})[i]=e.src,r),a.machine.options.services),Ud(ac(ac({id:i},e),{src:i}))}var o=e.src;return Ud(ac(ac({id:od(a.id,t)},e),{src:o}))})),this.activities=Hc(this.config.activities).concat(this.invoke).map((function(e){return ud(e)})),this.transition=this.transition.bind(this),this.tags=Hc(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Cd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:ac(ac({},i),t.actions),activities:ac(ac({},o),t.activities),guards:ac(ac({},a),t.guards),services:ac(ac({},l),t.services),delays:ac(ac({},s),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 Uc(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:Nc(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===Xd,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Yd}));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(ic.After,"(").concat(e,")").concat(n)}(Uc(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:fc,event:Uc(e)?e:Qc(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Uc(e)?e.name:Pc(e)}}(r,{delay:t})),e.onExit.push({type:gc,sendId:r}),r},r=Gc(t)?t.map((function(e,t){var r=n(e.delay,t);return ac(ac({},e),{event:r})})):Ac(Object.keys(t).map((function(e,r){var i=t[e],o=Xc(i)?{target:i}:i,a=isNaN(+e)?e:+e,l=n(a,r);return Hc(o).map((function(e){return ac(ac({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return ac(ac({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Pd?e.value:Mc(e,this.delimiter);if(Xc(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var o=Object.keys(r),a=[this];return a.push.apply(a,dc([],cc(Ac(o.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Pc(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Pd?e:Pd.create(e),n=Array.from($d([],this.getStateNodes(t.value)));return new Pd(ac(ac({},t),{value:this.resolve(t.value),configuration:n,done:Od(n,this),tags:Rd(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),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,o={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(o[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var u=Object.keys(o).map((function(e){return o[e]})),p=Ac(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Ac(Object.keys(o).map((function(e){return o[e].configuration})));return{transitions:p,exitSet:Ac(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Ac(Object.keys(o).map((function(e){return o[e].actions})))}},e.prototype._transition=function(e,t,n){return Xc(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,ed(t))},e.prototype.next=function(e,t){var n,r,i,o=this,a=t.name,l=[],s=[];try{for(var c=sc(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(Xc(h)&&Jd(h)?e.matches(Mc(this.getStateNodeById(h).path,this.delimiter)):Tc(Mc(h,this.delimiter),jc(this.path.slice(0,-2))(e.value))),v=!1;try{v=!p||nd(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(v&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,dc([],cc(u.actions),!1)),i=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(i){if(!s.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var m=Ac(s.map((function(t){return o.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:Ac(s.map((function(e){return o.getPotentiallyReenteringNodes(e)}))),configuration:m,source:e,actions:l}}},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,i,o,a){var l,s,c,d,u=this,p=o?$d([],this.getStateNodes(o.value)):[],h=new Set;try{for(var f=sc(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!Ld(p,x=g.value)||Ld(n.exitSet,x)||x.parent&&h.has(x.parent))&&h.add(x)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var v=sc(p),m=v.next();!m.done;m=v.next()){var x;Ld(e,x=m.value)&&!Ld(n.exitSet,x.parent)||n.exitSet.push(x)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=v.return)&&d.call(v)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=Ac(b.map((function(e){var t=[];if("final"!==e.type)return t;var o=e.parent;if(!o.parent)return t;t.push(pd(e.id,e.doneData),pd(o.id,e.doneData?Bc(e.doneData,r,i):void 0));var a=o.parent;return"parallel"===a.type&&wd(a).every((function(e){return Od(n.configuration,e)}))&&t.push(pd(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=ud(e);return{type:ic.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:dd(a?dc(dc([],cc(t),!1),cc(n),!1):dc(dc([],cc(n),!1),cc(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:hc,event:"function"==typeof e?e:Qc(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:dd(dc(dc([],cc(e.onExit),!1),cc(e.activities.map((function(e){return function(e){var t=Uc(e)?e:ud(e);return{type:ic.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:dd(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=dd(Ac(dc([],cc(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!ad(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,o,a=ed(t);if(e instanceof Pd)i=void 0===n?e:this.resolveState(Pd.from(e,n));else{var l=Xc(e)?this.resolve(Dc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;i=this.resolveState(Pd.from(l,s))}if(!Rc&&a.name===Yd)throw new Error("An event cannot have the wildcard type ('".concat(Yd,"')"));if(this.strict&&!this.events.includes(a.name)&&(o=a.name,!/^(done|error)\./.test(o)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(i.value,i,a)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},d=$d([],this.getStateNodes(i.value)),u=c.configuration.length?$d(d,c.configuration):d;return c.configuration=dc([],cc(u),!1),this.resolveTransition(c,i,i.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,o=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,dc([],cc(o),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var o,a,l,s,c=this;void 0===i&&(i=ld);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Od(p,this),f=u?Ed(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,v=this.getActions(new Set(p),h,e,n,i,t,r),m=t?ac({},t.activities):{};try{for(var x=sc(v),b=x.next();!b.done;b=x.next()){var y=b.value;try{for(var w=(l=void 0,sc(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===uc?m[$.activity.id||$.activity.type]=$:$.type===pc&&(m[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=x.return)&&a.call(x)}finally{if(o)throw o.error}}var k,S,E=cc(gd(this,t,n,i,v,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],O=E[1],R=cc(function(e,t){var n,r,i=cc([[],[]],2),o=i[0],a=i[1];try{for(var l=sc(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,a]}(L,ad),2),T=R[0],P=R[1],_=L.filter((function(e){var t;return e.type===uc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===yc})),M=_.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,o=rd(e.src),a=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[o.type],l=e.data?Bc(e.data,n,r):void 0,s=a?xd(a,e.id,l):md(e.id);return s.meta=e,s}(t.activity,c.machine,O,i),e}),t?ac({},t.children):{}),D=new Pd({value:f||t.value,context:O,_event:i,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:Zc(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?P:[],activities:f?m:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:M,done:h,tags:Rd(p),machine:this}),N=n!==O;D.changed=i.name===kc||N;var V=D.history;V&&delete V.history;var j=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||j&&i.name!==Xd))return D;var I=D;if(!h)for(j&&(I=this.resolveRaisedTransition(I,{type:vc},i,r));T.length;){var A=T.shift();I=this.resolveRaisedTransition(I,A._event,i,r)}var z=I.changed||(V?!!I.actions.length||N||typeof V.value!=typeof I.value||!Td(I.value,V.value):void 0);return I.changed=z,I.history=V,I},e.prototype.getStateNode=function(e){if(Jd(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=Jd(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&&Jd(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=_c(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||Kd;switch(this.type){case"parallel":return Nc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Kd}));case"compound":if(Xc(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Nc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Kd})):this.initialStateValue||{};default:return e||Kd}},e.prototype.getResolvedPath=function(e){if(Jd(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 _c(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=Vc(this.states,(function(e){return e.initialStateValue||Kd}),(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=bd(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=Xc(t.target)&&Jd(t.target)?Dc(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 bd(this)?[this]:"compound"!==this.type||this.initial?Ac(Ic(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Rc||qc(!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=cc(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 i=this.getStateNode(n);if("history"===i.type)return i.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:Vc(this.states,(function(t,n){if(!e)return t.historyValue();var r=Xc(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?Ac(Ic(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(e){var t,n,r=e;try{for(var a=sc(i),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[o][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Xc(a)?[n.getStateNode(a)]:Ac(Ic(a).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=Ac(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 i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=sc(Object.keys(i)),l=a.next();!l.done;l=a.next()){var s=i[l.value];if(s.states)try{for(var c=(n=void 0,sc(s.events)),d=c.next();!d.done;d=c.next()){var u=d.value;o.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{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},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(!Xc(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 Hc(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Xc(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=ac(ac({},e),{actions:dd(Hc(e.actions)),cond:Yc(e.cond,i),target:o,source:this,internal:r,eventType:e.event,toJSON:function(){return ac(ac({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},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 i=this.config.on,o=Yd,a=i[o],l=void 0===a?[]:a,s=lc(i,["*"]);n=Ac(Object.keys(s).map((function(e){Rc||e!==Xd||qc(!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=td(e,s[e]);return Rc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Xc(e.target)||Jc(e.target))})),i=t===Xd?"the transient event":"event '".concat(t,"'");qc(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(td(Yd,l)))}else n=[];var c=this.config.always?td("",this.config.always):[],d=this.config.onDone?td(String(pd(this.id)),this.config.onDone):[];Rc||qc(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Ac(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,dc([],cc(td(String(hd(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,dc([],cc(td(String(fd(e.id)),e.onError)),!1)),t}))),p=this.after,h=Ac(dc(dc(dc(dc([],cc(d),!1),cc(u),!1),cc(n),!1),cc(c),!1).map((function(e){return Hc(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=sc(p),g=f.next();!g.done;g=f.next()){var v=g.value;h.push(v)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var eu,tu=function(e){return{type:mc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(eu||(eu={}));var nu="undefined"!=typeof document?ne:function(){};function ru(e){var t=X.useRef();return t.current||(t.current={v:e()}),t.current.v}var iu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},ou=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 au=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},lu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function su(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function cu(e){var t=Q([]),n=Q([]);nu((function(){var r=e.subscribe((function(e){var r,i;if(e.actions.length){var o=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=au(function(e,t){var n,r,i=iu([[],[]],2),o=i[0],a=i[1];try{for(var l=ou(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,a]}(o,(function(e){return e.exec.__effect===eu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,lu([],au(l.map((function(t){return[t,e]}))),!1)),(i=n.current).push.apply(i,lu([],au(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),nu((function(){for(;n.current.length;){var e=au(n.current.shift(),2);su(e[0],e[1])}})),ee((function(){for(;t.current.length;){var e=au(t.current.shift(),2);su(e[0],e[1])}}))}var du=function(){return du=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},du.apply(this,arguments)},uu=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};var hu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function fu(e,t){void 0===t&&(t={});var n=oe((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=ru((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=pu(J(r),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 o=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=uu(t,["context","guards","actions","activities","services","delays","state"]),h=ru((function(){var e={context:o,guards:a,actions:l,activities:s,services:c,delays:d};return qd(r.withConfig(e,(function(){return du(du({},r.context),o)})),du({deferEvents:!0},p))}));return nu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),nu((function(){return h.start(u?Pd.create(u):void 0),function(){h.stop()}}),[]),nu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),cu(h),h}(e,t,n),i=hu(J((function(){var e=r.machine.initialState;return t.state?Pd.create(t.state):e})),2),o=i[0],a=i[1];return[o,r.send,r]}function gu(){return gu=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},gu.apply(null,arguments)}function vu(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 mu={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(mu.str(e)||mu.num(e))return e===t;if(mu.obj(e)&&mu.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!mu.und(n)||e===t}};function xu(e,t){return mu.und(e)||mu.nul(e)?t:e}function bu(e){return mu.und(e)?[]:mu.arr(e)?e:[e]}function yu(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 mu.fun(e)?e(...n):e}function wu(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,vu(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(mu.und(t))return gu({to:t},e);const n=Object.keys(e).reduce(((n,r)=>mu.und(t[r])?gu({},n,{[r]:e[r]}):n),{});return gu({to:t},n)}class Cu{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 $u extends Cu{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof Cu&&e.removeChild(this)))}}class ku extends Cu{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&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 Cu)&&(t[n]=r instanceof Cu?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Su,Eu;let Lu,Ou=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Ru,Tu=()=>Date.now();class Pu extends ku{constructor(e,t){super(),this.update=void 0,this.payload=e.style?gu({},e,{style:Ru(e.style)}):e,this.update=t,this.attach()}}let _u=!1;const Mu=new Set,Du=()=>{if(!_u)return!1;let e=Tu();for(let t of Mu){let n=!1;for(let r=0;r<t.configs.length;r++){let i,o,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof Cu,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),i=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),i=Math.abs(r.lastPosition-c)<.1,i&&(s=c);else{o=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>o+64&&(o=e);let t=Math.floor(e-o);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;i=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(i=!1),i?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Mu.delete(t),t.stop(!0))}return Mu.size?Ou(Du):_u=!1,_u};function Nu(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Nu({range:e,output:t,extrapolate:n});if(Lu&&"string"==typeof e.output[0])return Lu(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=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,o);return function(e,t,n,r,i,o,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],s,a,l,r.map)}}class Vu extends $u{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof $u&&!(e instanceof Vu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Nu(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Nu(e,t,n)}interpolate(e,t,n){return new Vu(this,e,t,n)}}const ju=(e,t,n)=>e&&new Vu(e,t,n);function Iu(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Iu(e,t)))}class Au extends Cu{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&&Iu(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Vu(this,e,t,n)}}class zu extends $u{constructor(e){super(),this.payload=e.map((e=>new Au(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 Vu(this,e,t)}}let Hu=0,Bu=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=Hu++}update(e){if(!e)return this;const t=wu(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=vu(t,["delay","to"]);if(mu.arr(i)||mu.fun(i))this.queue.push(gu({},o,{delay:r,to:i}));else if(i){let e={};Object.entries(i).forEach((t=>{let n=t[0],i=t[1];const a=gu({to:{[n]:i},delay:yu(r,n)},o),l=e[a.delay]&&e[a.delay].to;e[a.delay]=gu({},e[a.delay],a,{to:gu({},l,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(o),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,i=void 0===r?{}:r;mu.obj(n)&&(this.merged=gu({},n,this.merged)),mu.obj(i)&&(this.merged=gu({},this.merged,i))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,i)=>{let o=r.delay,a=vu(r,["delay"]);const l=r=>{i===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=mu.arr(a.to)||mu.fun(a.to);o?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),o):s?this.runAsync(a,l):this.diff(a).start(l)}))}else mu.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Mu.has(t)||Mu.add(t),_u||(_u=!0,Ou(Du));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,Mu.has(t)&&Mu.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=vu(e,["delay"]);const i=this.local;let o=Promise.resolve(void 0);if(mu.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=gu({},r,wu(r.to[t]));mu.arr(n.config)&&(n.config=n.config[t]),o=o.then((()=>{if(i===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(mu.fun(r.to)){let e,t=0;o=o.then((()=>r.to((n=>{const o=gu({},r,wu(n));if(mu.arr(o.config)&&(o.config=o.config[t]),t++,i===this.guid)return e=new Promise((e=>this.diff(o).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}o.then(t)}diff(e){this.props=gu({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,i=t.to,o=void 0===i?{}:i,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[o,r];r=p[0],o=p[1]}this.merged=gu({},r,this.merged,o),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],i=t[1],o=e[n]||{};const a=mu.num(i),s=mu.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!Eu[i],c=mu.arr(i),p=!a&&!c&&!s;let f=mu.und(r[n])?i:r[n],g=a||c||s?i:1,v=yu(l,n);h&&(g=h.animations[n].parent);let m,x=o.parent,b=o.interpolation,y=bu(h?g.getPayload():g),w=i;p&&(w=Lu({range:[0,1],output:[i,i]})(1));let C=b&&b.getValue();const $=!mu.und(x)&&o.animatedValues.some((e=>!e.done)),k=!mu.equ(w,C),S=!mu.equ(w,o.previous),E=!mu.equ(v,o.config);if(d||S&&k||E){if(a||s)x=b=o.parent||new Au(f);else if(c)x=b=o.parent||new zu(f);else if(p){let e=o.interpolation&&o.interpolation.calc(o.parent.value);e=void 0===e||d?f:e,o.parent?(x=o.parent,x.setValue(0,!1)):x=new Au(0);const t={output:[e,i]};o.interpolation?(b=o.interpolation,o.interpolation.updateConfig(t)):b=x.interpolate(t)}return y=bu(h?g.getPayload():g),m=bu(x.getPayload()),d&&!p&&x.setValue(f,!1),this.hasChanged=!0,m.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=Tu(),e.done=!1,e.animatedStyles.clear()})),yu(u,n)&&x.setValue(p?g:i,!1),gu({},e,{[n]:gu({},o,{name:n,parent:x,interpolation:b,animatedValues:m,toValues:y,previous:w,config:v,fromValues:bu(x.getValue()),immediate:yu(u,n),initialVelocity:xu(v.velocity,0),clamp:xu(v.clamp,!1),precision:xu(v.precision,.01),tension:xu(v.tension,170),friction:xu(v.friction,26),mass:xu(v.mass,1),duration:v.duration,easing:xu(v.easing,(e=>e)),decay:v.decay})})}return k?e:(p&&(x.setValue(1,!1),b.updateConfig({output:[w,w]})),x.done=!0,this.hasChanged=!0,gu({},e,{[n]:gu({},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 Fu=e=>{const t=mu.fun(e),n=((e,t)=>{const n=Q(!1),r=Q(),i=mu.fun(t),o=ie((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Bu,a=i?yu(t,r,o):t[r];return 0===r&&(n=a.ref),o.update(a),n||o.start(),o})),n]}),[e]),a=o[0],l=o[1];r.current=a,le(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=ie((()=>e=>r.current.map(((t,n)=>{t.update(i?yu(e,n,t):e[n]),l||t.start()}))),[e]);ee((()=>{n.current?i||s(t):l||r.current.forEach((e=>e.start()))})),ee((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return i?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],i=n[1],o=n[2];return t?[r[0],i,o]:r};class Zu extends ku{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof Cu||(e=Su.transform(e)),this.payload=e}}const Wu={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},qu="[-+]?\\d*\\.?\\d+",Gu=qu+"%";function Uu(){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 Xu=new RegExp("rgb"+Uu(qu,qu,qu)),Yu=new RegExp("rgba"+Uu(qu,qu,qu,qu)),Ku=new RegExp("hsl"+Uu(qu,Gu,Gu)),Ju=new RegExp("hsla"+Uu(qu,Gu,Gu,qu)),Qu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ep=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tp=/^#([0-9a-fA-F]{6})$/,np=/^#([0-9a-fA-F]{8})$/;function rp(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 ip(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=rp(i,r,e+1/3),a=rp(i,r,e),l=rp(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function op(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ap(e){return(parseFloat(e)%360+360)%360/360}function lp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function sp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cp(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=tp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wu.hasOwnProperty(e)?Wu[e]:(t=Xu.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|255)>>>0:(t=Yu.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|lp(t[4]))>>>0:(t=Qu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=np.exec(e))?parseInt(t[1],16)>>>0:(t=ep.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ku.exec(e))?(255|ip(ap(t[1]),sp(t[2]),sp(t[3])))>>>0:(t=Ju.exec(e))?(ip(ap(t[1]),sp(t[2]),sp(t[3]))|lp(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 dp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,up=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pp=new RegExp(`(${Object.keys(Wu).join("|")})`,"g");let hp={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 fp=["Webkit","Ms","Moz","O"];function gp(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||hp.hasOwnProperty(e)&&hp[e]?(""+t).trim():t+"px"}hp=Object.keys(hp).reduce(((e,t)=>(fp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),hp);const vp={};var mp;Ru=e=>new Zu(e),mp=e=>{const t=e.output.map((e=>e.replace(up,cp))).map((e=>e.replace(pp,cp))),n=t[0].match(dp).map((()=>[]));t.forEach((e=>{e.match(dp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(dp).map(((t,r)=>Nu(gu({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(dp,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`))}},Lu=mp,Eu=Wu,function(e,t){Su={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const i=t.style,o=t.children,a=t.scrollTop,l=t.scrollLeft,s=vu(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=gp(t,i[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:vp[t]||(vp[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var xp;const bp=(xp=e=>K(((t,n)=>{const r=function(){const e=J(!1)[1];return oe((()=>e((e=>!e))),[])}(),i=Q(!0),o=Q(null),a=Q(null),l=oe((e=>{const t=o.current;o.current=new Pu(e,(()=>{let e=!1;a.current&&(e=Su.fn(a.current,o.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);ee((()=>()=>{i.current=!1,o.current&&o.current.detach()}),[]),le(n,(()=>(e=>e.current)(a))),l(t);const s=o.current.getValue();s.scrollTop,s.scrollLeft;const c=vu(s,["scrollTop","scrollLeft"]),d=(u=e,!mu.fun(u)||u.prototype instanceof Y.Component?e=>a.current=function(e,t){return t&&(mu.fun(t)?t(e):mu.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return Y.createElement(e,gu({},c,{ref:d}))})),e=>(mu.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=xp(n),e}),xp))(["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 yp(e,t){return e.map((function(e,n){return e+t[n]}))}function wp(e,t){return e.map((function(e,n){return e-t[n]}))}function Cp(e){return Math.hypot.apply(Math,e)}function $p(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function kp(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 Sp(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?-kp(t-e,n-t,r)+t:e>n?+kp(e-n,n-t,r)+n:e}function Ep(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 Lp(){return Lp=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},Lp.apply(this,arguments)}function Op(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Rp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(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 Pp(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 Tp(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)?Tp(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 _p(){}function Mp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?_p:1===t.length?t[0]:function(){for(var e,n,r=Pp(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Dp(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 Np(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 Vp(e,t){void 0===e&&(e={});for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],l=o[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Vp(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var jp=Lp({},{threshold:function(e){return void 0===e&&(e=0),Dp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Dp(.15);case!1:return Dp(0);default:return Dp(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:Dp(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 jp.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,i=t.right,o=void 0===i?1/0:i,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,o],[l,void 0===s?1/0:s]]}}),Ip="undefined"!=typeof window&&window.document&&window.document.createElement,Ap={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=Ip?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,i=t.capture;return{passive:r,capture:void 0!==i&&i}}},zp=Lp({},jp,{threshold:function(e,t,n){var r=n.filterTaps,i=void 0!==r&&r,o=n.lockDirection,a=void 0!==o&&o,l=n.axis,s=Dp(e,i?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=i||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Dp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Dp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Hp(e){var t=e.domTarget,n=e.eventOptions,r=e.window,i=e.enabled,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Vp(e,Ap)}({domTarget:t,eventOptions:n,window:r,enabled:i});return a.drag=function(e){return void 0===e&&(e={}),Vp(e,zp)}(o),a}function Bp(e){return Lp({_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:_p,canceled:!1,memo:void 0,args:void 0},e)}function Fp(){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:Bp({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:Bp({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Zp=new Map,Wp=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 i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},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 i=Lp({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),o=n.handler(i);return n.state.memo=void 0!==o?o:n.state.memo,n.state._active||n.clean(),i}}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,i=t.rubberband,o=t.threshold,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?qp(h[0],o[0]):d[0],g=!1===d[1]?qp(h[1],o[1]):d[1],v=this.checkIntentionality([f,g],h);if(v._blocked)return Lp({},v,{_movement:h,delta:[0,0]});var m,x,b,y,w=v._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(x=Np(n,this.state),m=Np(r,this.state),s[0]=x[0],l[0]=m[0]),!1!==w[1]&&!1===d[1])&&(x=null!=(b=x)?b:Np(n,this.state),m=null!=(y=m)?y:Np(r,this.state),s[1]=x[1],l[1]=m[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=yp($,u),S=c?i:[0,0];return $=Gp(l,yp($,s),S),Lp({},v,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:Gp(l,k,S),delta:wp($,p)})},t.clean=function(){this.clearTimeout()},Ep(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 qp(e,t){return Math.abs(e)>=t&&$p(e)*t}function Gp(e,t,n){var r=t[0],i=t[1],o=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Sp(r,s,c,o),Sp(i,u,p,a)]}function Up(e,t,n){var r=e.state,i=e.args,o=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,args:i,previous:l}}function Xp(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.call.apply(e,[this,Lp({},t,{event:n})].concat(i))}}var Yp=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o,a=Pp(t.classes);!(o=a()).done;){new(0,o.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];Qp(e,c[0],Xp(c[1],Lp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,i=Jp(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;th(i,Kp(r),o);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Mp.apply(void 0,d)])}eh(i,r,o)}(t,e):function(e,t){for(var n=e.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,a=Object.entries(t);o<a.length;o++){var l=a[o],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+i]=Mp.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Jp(t.config),n=t.config.eventOptions;e&&th(e,Kp(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,i=e.windowListeners;if(!n)return;for(var o in i){th(n,i[o],r)}e.windowListeners={}}(t)},this.state=Fp(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Kp(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Jp(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Qp(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function eh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=Pp(t);!(r=i()).done;){var o=r.value,a=o[0],l=o[1];e.addEventListener(a,l,n)}}function th(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=Pp(t);!(r=i()).done;){var o=r.value,a=o[0],l=o[1];e.removeEventListener(a,l,n)}}function nh(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(Zp.get("drag"));e.wheel&&t.add(Zp.get("wheel"));e.scroll&&t.add(Zp.get("scroll"));e.move&&t.add(Zp.get("move"));e.pinch&&t.add(Zp.get("pinch"));e.hover&&t.add(Zp.get("hover"));return t}(e),i=Y.useMemo((function(){return new Yp(r)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=n,Y.useEffect(i.effect,[]),i.config.domTarget?rh:i.bind}function rh(){"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`.")}function ih(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function oh(e){var t="buttons"in e?e.buttons:0,n=ih(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 ah(e){var t=ih(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var lh=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,i=e.windowListeners;void 0===n&&(n=[]),r.window&&(th(r.window,i[t],r.eventOptions),eh(r.window,i[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(Rp(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=oh(e);if(n.down){t.updateSharedState(n);var r=ah(e),i=t.getKinematics(r,e),o=Up(Rp(t),e),a=t.state._isTap,l=Cp(i._movement);a&&l>=3&&(a=!1),t.updateGestureState(Lp({},o,i,{_isTap:a})),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,i=r[0],o=r[1],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,v=g[0],m=g[1],x=Lp({},Up(Rp(t),e),t.getMovement(t.state.values)),b=[0,0];x.elapsedTime<220&&(!1!==d&&Math.abs(i)>h&&Math.abs(l)>v&&(b[0]=$p(i)),!1!==u&&Math.abs(o)>f&&Math.abs(s)>m&&(b[1]=$p(o))),t.updateGestureState(Lp({},x,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Rp(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(th(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}Op(t,e);var n=t.prototype;return n.startDrag=function(e){var t=ah(e);this.updateSharedState(oh(e)),this.updateGestureState(Lp({},function(e,t,n){var r=e.state.offset,i=n.timeStamp;return Lp({},Fp()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:i})}(this,t,e),Up(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(Qp(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&Qp(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Op(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return wp(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],i=n[1],o=this.state.axis||(r>i?"x":r<i?"y":void 0);return this.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},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=Cp(t),i=0===r?0:1/r,o=0===n?0:1/n,a=o*r,l=t.map((function(e){return o*e})),s=t.map((function(e){return i*e}));return{velocities:l,velocity:a,distance:Cp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Wp));function sh(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,i,o;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!sh(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(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!sh(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(o=e.entries();!(r=o.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=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===i[r]&&e.$$typeof||sh(e[i[r]],t[i[r]])))return!1;return!0}return e!=e&&t!=t}function ch(e,t){try{return sh(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 dh(e,t){void 0===t&&(t={}),Zp.set("drag",lh);var n=Q();return n.current||(n.current=function(e,t){var n,r,i=[],o=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return o&&n===this&&t(l,i)||(r=e.apply(this,l),o=!0,n=this,i=l),r}}(Hp,ch)),nh({drag:e},n.current(t))}
|
|
2502
|
+
***************************************************************************** */var ac,lc,sc=function(){return sc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sc.apply(this,arguments)};function cc(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function dc(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 uc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function pc(e,t,n){if(2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);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"}(ac||(ac={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(lc||(lc={}));var hc=ac.Start,fc=ac.Stop,gc=ac.Raise,vc=ac.Send,mc=ac.Cancel,xc=ac.NullEvent,bc=ac.Assign;ac.After,ac.DoneState;var yc=ac.Log,wc=ac.Init,Cc=ac.Invoke;ac.ErrorExecution;var $c,kc=ac.ErrorPlatform,Sc=ac.ErrorCustom,Ec=ac.Update,Lc=ac.Choose,Oc=ac.Pure,Rc={},Tc="xstate.guard",Pc="production"===process.env.NODE_ENV;function _c(e,t,n){void 0===n&&(n=".");var r=Nc(e,n),i=Nc(t,n);return Kc(i)?!!Kc(r)&&i===r:Kc(r)?r in i:Object.keys(r).every((function(e){return e in i&&_c(r[e],i[e])}))}function Mc(e){try{return Kc(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 Dc(e,t){try{return Xc(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Nc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Xc(e)?Vc(e):"string"!=typeof e?e:Vc(Dc(e,t));var n}function Vc(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 jc(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var o=r[i];n[o]=t(e[o],o,e,i)}return n}function Ic(e,t,n){var r,i,o={};try{for(var a=dc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(o[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var Ac=function(e){return function(t){var n,r,i=t;try{for(var o=dc(e),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function zc(e){return e?Kc(e)?[[e]]:Hc(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?zc(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Hc(e){var t;return(t=[]).concat.apply(t,pc([],uc(e),!1))}function Bc(e){return Xc(e)?e:[e]}function Fc(e){return void 0===e?[]:Bc(e)}function Zc(e,t,n){var r,i;if(Yc(e))return e(t,n.data);var o={};try{for(var a=dc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];Yc(c)?o[s]=c(t,n.data):o[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function Wc(e){return e instanceof Promise||!(null===e||!Yc(e)&&"object"!=typeof e||!Yc(e.then))}function qc(e,t){return jc(e.states,(function(e,n){if(e){var r=(Kc(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:qc(e,r)}}}))}function Gc(e,t,n,r){Pc||Uc(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,o,a=n.assignment,l={state:r,action:n,_event:t},s={};if(Yc(a))s=a(e,t.data,l);else try{for(var c=dc(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=Yc(p)?p(e,t.data,l):p}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return Object.assign({},e,s)}),e):e;return i}var Uc=function(){};function Xc(e){return Array.isArray(e)}function Yc(e){return"function"==typeof e}function Kc(e){return"string"==typeof e}function Jc(e,t){if(e)return Kc(e)?{type:Tc,name:e,predicate:t?t[e]:void 0}:Yc(e)?{type:Tc,name:e.name,predicate:e}:e}Pc||(Uc=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 Qc=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function ed(e){return!!e&&"__xstatenode"in e}function td(e,t){return Kc(e)||"number"==typeof e?sc({type:e},t):e}function nd(e,t){if(!Kc(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=td(e);return sc({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function rd(e,t){return Bc(t).map((function(t){return void 0===t||"string"==typeof t||ed(t)?{target:t,event:e}:sc(sc({},t),{event:e})}))}function id(e,t,n,r,i){var o=e.options.guards,a={state:i,cond:t,_event:r};if(t.type===Tc)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,a);var l=null==o?void 0:o[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function od(e){return"string"==typeof e?{type:e}:e}function ad(e,t,n){var r=function(){},i="object"==typeof e,o=i?e:null;return{next:((i?e.next:e)||r).bind(o),error:((i?e.error:t)||r).bind(o),complete:((i?e.complete:n)||r).bind(o)}}function ld(e,t){return"".concat(e,":invocation[").concat(t,"]")}function sd(e){return(e.type===gc||e.type===vc&&e.to===lc.Internal)&&"number"!=typeof e.delay}($c={})[Qc]=function(){return this},$c[Symbol.observable]=function(){return this};var cd=nd({type:wc});function dd(e,t){return t&&t[e]||void 0}function ud(e,t){var n;if(Kc(e)||"number"==typeof e)n=Yc(r=dd(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Yc(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Yc(r=dd(e.type,t)))n=sc(sc({},e),{exec:r});else if(r){var i=r.type||e.type;n=sc(sc(sc({},r),e),{type:i})}else n=e}return n}var pd=function(e,t){return e?(Xc(e)?e:[e]).map((function(e){return ud(e,t)})):[]};function hd(e){var t=ud(e);return sc(sc({id:Kc(e)?e:t.id},t),{type:t.type})}function fd(e,t){var n="".concat(ac.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function gd(e,t){var n="".concat(ac.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function vd(e,t){var n="".concat(ac.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function md(e,t,n,r,i,o,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var i=dc(e),o=i.next();!o.done;o=i.next())for(var a=o.value,l=0;l<a.actions.length;)a.actions[l].type!==bc?l++:(r.push(a.actions[l]),a.actions.splice(l,1))}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(i),s=l.length?Gc(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(i,l){var u;switch(l.type){case gc:var p=function(e,t,n,r){var i,o={_event:n},a=nd(Yc(e.event)?e.event(t,n.data,o):e.event);if(Kc(e.delay)){var l=r&&r[e.delay];i=Yc(l)?l(t,n.data,o):l}else i=Yc(e.delay)?e.delay(t,n.data,o):e.delay;return sc(sc({},e),{type:gc,_event:a,delay:i})}(l,s,r,e.options.delays);return o&&"number"==typeof p.delay&&o(p,s,r),p;case vc:var h=function(e,t,n,r){var i,o={_event:n},a=nd(Yc(e.event)?e.event(t,n.data,o):e.event);if(Kc(e.delay)){var l=r&&r[e.delay];i=Yc(l)?l(t,n.data,o):l}else i=Yc(e.delay)?e.delay(t,n.data,o):e.delay;var s=Yc(e.to)?e.to(t,n.data,o):e.to;return sc(sc({},e),{to:s,_event:a,event:a.data,delay:i})}(l,s,r,e.options.delays);if(!Pc){var f=l.delay;Uc(!Kc(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return o&&h.to!==lc.Internal&&("entry"===i?d.push(h):o(h,s,r)),h;case yc:var g=function(e,t,n){return sc(sc({},e),{value:Kc(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==o||o(g,s,r),g;case Lc:if(!(b=null===(u=l.conds.find((function(n){var i=Jc(n.cond,e.options.guards);return!i||id(e,i,s,r,o?void 0:t)})))||void 0===u?void 0:u.actions))return[];var v=uc(md(e,t,s,r,[{type:i,actions:pd(Fc(b),e.options.actions)}],o,a),2),m=v[0],x=v[1];return s=x,null==c||c.push(s),m;case Oc:var b;if(!(b=l.get(s,r.data)))return[];var y=uc(md(e,t,s,r,[{type:i,actions:pd(Fc(b),e.options.actions)}],o,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case fc:g=function(e,t,n){var r=Yc(e.activity)?e.activity(t,n.data):e.activity,i="string"==typeof r?{id:r}:r;return{type:ac.Stop,activity:i}}(l,s,r);return null==o||o(g,n,r),g;case bc:s=Gc(s,r,[l],o?void 0:t),null==c||c.push(s);break;default:var $=ud(l,e.options.actions),k=$.exec;if(o)o($,s,r);else if(k&&c){var S=c.length-1,E=sc(sc({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,pc([c[S]],uc(t),!1))}});$=E}return $}}var p=Hc(i.map((function(e){var t,n,i=[];try{for(var a=dc(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(i=i.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){o(e,s,r)})),d.length=0,i})));return[p,s]}var xd=function(e,t){return t(e)};function bd(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Qc]=function(){return this},t}function yd(e,t,n){var r=bd(t);if(r.deferred=!0,ed(e)){var i=r.state=xd(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var wd=function(e){return"atomic"===e.type||"final"===e.type};function Cd(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function $d(e){return Cd(e).filter((function(e){return"history"!==e.type}))}function kd(e){var t=[e];return wd(e)?t:t.concat(Hc($d(e).map(kd)))}function Sd(e,t){var n,r,i,o,a,l,s,c,d=Ld(new Set(e)),u=new Set(t);try{for(var p=dc(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Ld(u);try{for(var v=dc(u),m=v.next();!m.done;m=v.next()){if("compound"!==($=m.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var x=(a=void 0,dc($d($))),b=x.next();!b.done;b=x.next()){var y=b.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var w=dc(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function Ed(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(wd(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=Ed(e,t)})),i}function Ld(e){var t,n,r=new Map;try{for(var i=dc(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Od(e,t){return Ed(e,Ld(Sd([e],t)))}function Rd(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Td(e,t){return"compound"===t.type?$d(t).some((function(t){return"final"===t.type&&Rd(e,t)})):"parallel"===t.type&&$d(t).every((function(t){return Td(e,t)}))}function Pd(e){return new Set(Hc(e.map((function(e){return e.tags}))))}function _d(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Kc(e)||Kc(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return _d(e[n],t[n])}))}var Md=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Rc,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||Rc,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 pc([],uc(new Set(Hc(pc([],uc(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:cd,_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=cd;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="."),Kc(e))return[e];var r=Object.keys(e);return r.concat.apply(r,pc([],uc(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=cc(e,["configuration","transitions","tags","machine"]);return sc(sc({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return _c(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Pc&&Uc(!!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}(),Dd={deferEvents:!1},Nd=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=sc(sc({},Dd),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}(),Vd=new Map,jd=0,Id=function(){return"x:".concat(jd++)},Ad=function(e,t){return Vd.set(e,t),e},zd=function(e){return Vd.get(e)},Hd=function(e){Vd.delete(e)};function Bd(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Pc||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 Fd(e){if(Bd()){var t=function(){var e=Bd();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Zd(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],o=!1,a=function(e){var t;return sc(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Qc]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!o){for(o=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,l),r.forEach((function(e){return e.next(n)}))}o=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var o=ad(e,t,i);return r.add(o),o.next(n),{unsubscribe:function(){r.delete(o)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var Wd,qd={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Wd||(Wd={}));var Gd=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=Wd.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Xc(e))return r.batch(e),r.state;var n=nd(td(e,t));if(r.status===Wd.Stopped)return Pc||Uc(!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!==Wd.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 i,o=r.parent&&(t===lc.Parent||r.parent.id===t),a=o?r.parent:Kc(t)?t===lc.Internal?r:r.children.get(t)||zd(t):(i=t)&&"function"==typeof i.send?t:void 0;if(a)if("machine"in a){if(r.status!==Wd.Stopped||r.parent!==a||r.state.done){var l=sc(sc({},e),{name:e.name===Sc?"".concat(vd(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Pc||Uc(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=r.machine.options.actions);var o=e.exec||dd(e.type,i),a=Yc(o)?o:o?o.exec:e.exec;if(a)try{return a(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 gc:var l=e;r.defer(l);break;case vc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===cd):r.send(s._event);break;case mc:r.cancel(e.sendId);break;case hc:if(r.status!==Wd.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===ac.Invoke){var d=od(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Pc||Uc(!("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(Pc||Uc(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?Zc(h,t,n):void 0;if("string"==typeof u)return;var v=Yc(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!v)return;var m=void 0;ed(v)&&(v=g?v.withContext(g):v,m={autoForward:f}),r.spawn(v,p,m)}else r.spawnActivity(c);break;case fc:r.stopChild(e.activity.id);break;case yc:var x=e,b=x.label,y=x.value;b?r.logger(b,y):r.logger(y);break;default:Pc||Uc(!1,"No implementation found for action type '".concat(e.type,"'"))}};var i=sc(sc({},e.defaultOptions),n),o=i.clock,a=i.logger,l=i.parent,s=i.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=o,this.parent=l,this.options=i,this.scheduler=new Nd({deferEvents:this.options.deferEvents}),this.sessionId=Id()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:xd(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Pc||Uc(this.status!==Wd.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 i=dc(e.actions),o=i.next();!o.done;o=i.next()){var a=o.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,o,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==cd||!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 p=dc(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=dc(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}try{for(var v=dc(this.contextListeners),m=v.next();!m.done;m=v.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),b=x&&x.doneData?Zc(x.doneData,e.context,t):void 0;this._doneEvent=gd(this.id,b);try{for(var y=dc(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),Hd(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Wd.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=ad(e,t,n);this.listeners.add(i.next),this.status!==Wd.NotStarted&&i.next(this.state);var o=function(){r.doneListeners.delete(o),r.stopListeners.delete(o),i.complete()};return this.status===Wd.Stopped?i.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(o),r.stopListeners.delete(o)}}},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===Wd.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===Wd.Running)return this;this.machine._init(),Ad(this.sessionId,this),this.initialized=!0,this.status=Wd.Running;var n=void 0===e?this.initialState:xd(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Md.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,cd)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Yc(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,o,a,l,s,c;try{for(var d=dc(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}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 h=dc(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=dc(this.contextListeners),v=g.next();!v.done;v=g.next()){p=v.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var m=dc(this.doneListeners),x=m.next();!x.done;x=m.next()){p=x.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Wd.Stopped,this._initialState=void 0;try{for(var b=dc(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Nd({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=nd({type:"xstate.stop"}),r=xd(e,(function(){var t=Hc(pc([],uc(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return pd(t.onExit,e.machine.options.actions)}))),r=uc(md(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),i=r[0],o=r[1],a=new Md({value:e.state.value,context:o,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!sd(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),Hd(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Wd.NotStarted&&this.options.deferEvents)Pc||Uc(!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!==Wd.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,i,o=t.state,a=!1,l=[],s=function(e){var r=nd(e);t.forward(r),o=xd(t,(function(){return t.machine.transition(o,r,void 0,n||void 0)})),l.push.apply(l,pc([],uc(t.machine.config.predictableActionArguments?o.actions:o.actions.map((function(e){return function(e,t){var n=e.exec;return sc(sc({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,o)}))),!1)),a=a||!!o.changed};try{for(var c=dc(e),d=c.next();!d.done;d=c.next()){s(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}o.changed=a,o.actions=l,t.update(o,nd(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=nd(e);if(0===r.name.indexOf(kc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(kc)})))throw r.data.data;return xd(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=dc(this.forwardTo),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.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),Yc(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Wd.Running)return yd(e,t);if(Wc(e))return this.spawnPromise(Promise.resolve(e),t);if(Yc(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Yc(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(ed(e))return this.spawnMachine(e,sc(sc({},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,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,sc(sc({},this.options),{parent:this,id:n.id||t.id})),o=sc(sc({},qd),n);o.sync&&i.onTransition((function(e){r.send(Ec,{state:e,id:i.id})}));var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(nd(e,{origin:i.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Zd(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,o=!1;e.then((function(e){o||(r=e,i.removeChild(t),i.send(nd(gd(t,e),{origin:t})))}),(function(e){if(!o){i.removeChild(t);var n=vd(t,e);try{i.send(nd(n,{origin:t}))}catch(r){!function(e,t,n){if(!Pc){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 i=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(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=ad(t,n,r),o=!1;return e.then((function(e){o||(i.next(e),o||i.complete())}),(function(e){o||i.error(e)})),{unsubscribe:function(){return o=!0}}},stop:function(){o=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Qc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,i,o=this,a=!1,l=new Set,s=new Set;try{i=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||o.send(nd(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(vd(t,e))}if(Wc(i))return this.spawnPromise(i,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=ad(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,Yc(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Qc]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,i=this,o=e.subscribe((function(e){r=e,i.send(nd(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(nd(vd(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(nd(gd(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Qc]=function(){return this},n);return this.children.set(t,a),a},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 Pc||Uc(!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}}})[Qc]=function(){return this},n))},e.prototype.attachDev=function(){var e=Bd();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(sc(sc({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:sc({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}Fd(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Qc]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Wd.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=Ud,e}();function Ud(e,t){return new Gd(e,t)}function Xd(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Yd(e){return sc(sc({type:Cc},e),{toJSON:function(){e.onDone,e.onError;var t=cc(e,["onDone","onError"]);return sc(sc({},t),{type:Cc,src:Xd(e.src)})}})}var Kd="",Jd="*",Qd={},eu=function(e){return"#"===e[0]},tu=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var o,a=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==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.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||pc([this.machine.key],uc(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!==(o=this.config.schema)&&void 0!==o?o:{},this.description=this.config.description,Pc||Uc(!("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?jc(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,sc(((r={})[i.id]=i,r),i.idMap)),i})):Qd;var l=0;!function e(t){var n,r;t.order=l++;try{for(var i=dc(Cd(t)),o=i.next();!o.done;o=i.next()){e(o.value)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}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===Kd})):Kd in this.config.on),this.strict=!!this.config.strict,this.onEntry=Fc(this.config.entry||this.config.onEntry).map((function(e){return ud(e)})),this.onExit=Fc(this.config.exit||this.config.onExit).map((function(e){return ud(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Fc(this.config.invoke).map((function(e,t){var n,r;if(ed(e)){var i=ld(a.id,t);return a.machine.options.services=sc(((n={})[i]=e,n),a.machine.options.services),Yd({src:i,id:i})}if(Kc(e.src)){i=e.id||ld(a.id,t);return Yd(sc(sc({},e),{id:i,src:e.src}))}if(ed(e.src)||Yc(e.src)){i=e.id||ld(a.id,t);return a.machine.options.services=sc(((r={})[i]=e.src,r),a.machine.options.services),Yd(sc(sc({id:i},e),{src:i}))}var o=e.src;return Yd(sc(sc({id:ld(a.id,t)},e),{src:o}))})),this.activities=Fc(this.config.activities).concat(this.invoke).map((function(e){return hd(e)})),this.transition=this.transition.bind(this),this.tags=Fc(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||kd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:sc(sc({},i),t.actions),activities:sc(sc({},o),t.activities),guards:sc(sc({},a),t.guards),services:sc(sc({},l),t.services),delays:sc(sc({},s),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 Yc(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:jc(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===Kd,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Jd}));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(ac.After,"(").concat(e,")").concat(n)}(Yc(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:vc,event:Yc(e)?e:td(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Yc(e)?e.name:Mc(e)}}(r,{delay:t})),e.onExit.push({type:mc,sendId:r}),r},r=Xc(t)?t.map((function(e,t){var r=n(e.delay,t);return sc(sc({},e),{event:r})})):Hc(Object.keys(t).map((function(e,r){var i=t[e],o=Kc(i)?{target:i}:i,a=isNaN(+e)?e:+e,l=n(a,r);return Fc(o).map((function(e){return sc(sc({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return sc(sc({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Md?e.value:Nc(e,this.delimiter);if(Kc(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var o=Object.keys(r),a=[this];return a.push.apply(a,pc([],uc(Hc(o.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Mc(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Md?e:Md.create(e),n=Array.from(Sd([],this.getStateNodes(t.value)));return new Md(sc(sc({},t),{value:this.resolve(t.value),configuration:n,done:Td(n,this),tags:Pd(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),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,o={};try{for(var a=dc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(o[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var u=Object.keys(o).map((function(e){return o[e]})),p=Hc(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Hc(Object.keys(o).map((function(e){return o[e].configuration})));return{transitions:p,exitSet:Hc(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Hc(Object.keys(o).map((function(e){return o[e].actions})))}},e.prototype._transition=function(e,t,n){return Kc(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,nd(t))},e.prototype.next=function(e,t){var n,r,i,o=this,a=t.name,l=[],s=[];try{for(var c=dc(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(Kc(h)&&eu(h)?e.matches(Nc(this.getStateNodeById(h).path,this.delimiter)):_c(Nc(h,this.delimiter),Ac(this.path.slice(0,-2))(e.value))),v=!1;try{v=!p||id(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(v&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,pc([],uc(u.actions),!1)),i=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(i){if(!s.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var m=Hc(s.map((function(t){return o.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:Hc(s.map((function(e){return o.getPotentiallyReenteringNodes(e)}))),configuration:m,source:e,actions:l}}},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,i,o,a){var l,s,c,d,u=this,p=o?Sd([],this.getStateNodes(o.value)):[],h=new Set;try{for(var f=dc(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!Rd(p,x=g.value)||Rd(n.exitSet,x)||x.parent&&h.has(x.parent))&&h.add(x)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var v=dc(p),m=v.next();!m.done;m=v.next()){var x;Rd(e,x=m.value)&&!Rd(n.exitSet,x.parent)||n.exitSet.push(x)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=v.return)&&d.call(v)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=Hc(b.map((function(e){var t=[];if("final"!==e.type)return t;var o=e.parent;if(!o.parent)return t;t.push(fd(e.id,e.doneData),fd(o.id,e.doneData?Zc(e.doneData,r,i):void 0));var a=o.parent;return"parallel"===a.type&&$d(a).every((function(e){return Td(n.configuration,e)}))&&t.push(fd(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=hd(e);return{type:ac.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:pd(a?pc(pc([],uc(t),!1),uc(n),!1):pc(pc([],uc(n),!1),uc(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:gc,event:"function"==typeof e?e:td(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:pd(pc(pc([],uc(e.onExit),!1),uc(e.activities.map((function(e){return function(e){var t=Yc(e)?e:hd(e);return{type:ac.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:pd(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=pd(Hc(pc([],uc(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!sd(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,o,a=nd(t);if(e instanceof Md)i=void 0===n?e:this.resolveState(Md.from(e,n));else{var l=Kc(e)?this.resolve(Vc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;i=this.resolveState(Md.from(l,s))}if(!Pc&&a.name===Jd)throw new Error("An event cannot have the wildcard type ('".concat(Jd,"')"));if(this.strict&&!this.events.includes(a.name)&&(o=a.name,!/^(done|error)\./.test(o)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(i.value,i,a)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},d=Sd([],this.getStateNodes(i.value)),u=c.configuration.length?Sd(d,c.configuration):d;return c.configuration=pc([],uc(u),!1),this.resolveTransition(c,i,i.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,o=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,pc([],uc(o),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var o,a,l,s,c=this;void 0===i&&(i=cd);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Td(p,this),f=u?Od(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,v=this.getActions(new Set(p),h,e,n,i,t,r),m=t?sc({},t.activities):{};try{for(var x=dc(v),b=x.next();!b.done;b=x.next()){var y=b.value;try{for(var w=(l=void 0,dc(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===hc?m[$.activity.id||$.activity.type]=$:$.type===fc&&(m[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=x.return)&&a.call(x)}finally{if(o)throw o.error}}var k,S,E=uc(md(this,t,n,i,v,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],O=E[1],R=uc(function(e,t){var n,r,i=uc([[],[]],2),o=i[0],a=i[1];try{for(var l=dc(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,a]}(L,sd),2),T=R[0],P=R[1],_=L.filter((function(e){var t;return e.type===hc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Cc})),M=_.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,o=od(e.src),a=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[o.type],l=e.data?Zc(e.data,n,r):void 0,s=a?yd(a,e.id,l):bd(e.id);return s.meta=e,s}(t.activity,c.machine,O,i),e}),t?sc({},t.children):{}),D=new Md({value:f||t.value,context:O,_event:i,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:qc(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?P:[],activities:f?m:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:M,done:h,tags:Pd(p),machine:this}),N=n!==O;D.changed=i.name===Ec||N;var V=D.history;V&&delete V.history;var j=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||j&&i.name!==Kd))return D;var I=D;if(!h)for(j&&(I=this.resolveRaisedTransition(I,{type:xc},i,r));T.length;){var A=T.shift();I=this.resolveRaisedTransition(I,A._event,i,r)}var z=I.changed||(V?!!I.actions.length||N||typeof V.value!=typeof I.value||!_d(I.value,V.value):void 0);return I.changed=z,I.history=V,I},e.prototype.getStateNode=function(e){if(eu(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=eu(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&&eu(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Dc(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||Qd;switch(this.type){case"parallel":return jc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Qd}));case"compound":if(Kc(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?jc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Qd})):this.initialStateValue||{};default:return e||Qd}},e.prototype.getResolvedPath=function(e){if(eu(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 Dc(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=Ic(this.states,(function(e){return e.initialStateValue||Qd}),(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=wd(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=Kc(t.target)&&eu(t.target)?Vc(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 wd(this)?[this]:"compound"!==this.type||this.initial?Hc(zc(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Pc||Uc(!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=uc(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 i=this.getStateNode(n);if("history"===i.type)return i.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:Ic(this.states,(function(t,n){if(!e)return t.historyValue();var r=Kc(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?Hc(zc(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(e){var t,n,r=e;try{for(var a=dc(i),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[o][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Kc(a)?[n.getStateNode(a)]:Hc(zc(a).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=Hc(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 i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=dc(Object.keys(i)),l=a.next();!l.done;l=a.next()){var s=i[l.value];if(s.states)try{for(var c=(n=void 0,dc(s.events)),d=c.next();!d.done;d=c.next()){var u=d.value;o.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{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},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(!Kc(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 Fc(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Kc(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=sc(sc({},e),{actions:pd(Fc(e.actions)),cond:Jc(e.cond,i),target:o,source:this,internal:r,eventType:e.event,toJSON:function(){return sc(sc({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},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 i=this.config.on,o=Jd,a=i[o],l=void 0===a?[]:a,s=cc(i,["*"]);n=Hc(Object.keys(s).map((function(e){Pc||e!==Kd||Uc(!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=rd(e,s[e]);return Pc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Kc(e.target)||ed(e.target))})),i=t===Kd?"the transient event":"event '".concat(t,"'");Uc(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(rd(Jd,l)))}else n=[];var c=this.config.always?rd("",this.config.always):[],d=this.config.onDone?rd(String(fd(this.id)),this.config.onDone):[];Pc||Uc(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Hc(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,pc([],uc(rd(String(gd(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,pc([],uc(rd(String(vd(e.id)),e.onError)),!1)),t}))),p=this.after,h=Hc(pc(pc(pc(pc([],uc(d),!1),uc(u),!1),uc(n),!1),uc(c),!1).map((function(e){return Fc(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=dc(p),g=f.next();!g.done;g=f.next()){var v=g.value;h.push(v)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var nu,ru=function(e){return{type:bc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(nu||(nu={}));var iu="undefined"!=typeof document?ne:function(){};function ou(e){var t=X.useRef();return t.current||(t.current={v:e()}),t.current.v}var au=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},lu=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 su=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},cu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function du(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function uu(e){var t=Q([]),n=Q([]);iu((function(){var r=e.subscribe((function(e){var r,i;if(e.actions.length){var o=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=su(function(e,t){var n,r,i=au([[],[]],2),o=i[0],a=i[1];try{for(var l=lu(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,a]}(o,(function(e){return e.exec.__effect===nu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,cu([],su(l.map((function(t){return[t,e]}))),!1)),(i=n.current).push.apply(i,cu([],su(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),iu((function(){for(;n.current.length;){var e=su(n.current.shift(),2);du(e[0],e[1])}})),ee((function(){for(;t.current.length;){var e=su(t.current.shift(),2);du(e[0],e[1])}}))}var pu=function(){return pu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pu.apply(this,arguments)},hu=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},fu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};var gu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function vu(e,t){void 0===t&&(t={});var n=oe((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=ou((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=fu(J(r),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 o=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=hu(t,["context","guards","actions","activities","services","delays","state"]),h=ou((function(){var e={context:o,guards:a,actions:l,activities:s,services:c,delays:d};return Ud(r.withConfig(e,(function(){return pu(pu({},r.context),o)})),pu({deferEvents:!0},p))}));return iu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),iu((function(){return h.start(u?Md.create(u):void 0),function(){h.stop()}}),[]),iu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),uu(h),h}(e,t,n),i=gu(J((function(){var e=r.machine.initialState;return t.state?Md.create(t.state):e})),2),o=i[0],a=i[1];return[o,r.send,r]}function mu(){return mu=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},mu.apply(null,arguments)}function xu(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 bu={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(bu.str(e)||bu.num(e))return e===t;if(bu.obj(e)&&bu.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!bu.und(n)||e===t}};function yu(e,t){return bu.und(e)||bu.nul(e)?t:e}function wu(e){return bu.und(e)?[]:bu.arr(e)?e:[e]}function Cu(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 bu.fun(e)?e(...n):e}function $u(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,xu(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(bu.und(t))return mu({to:t},e);const n=Object.keys(e).reduce(((n,r)=>bu.und(t[r])?mu({},n,{[r]:e[r]}):n),{});return mu({to:t},n)}class ku{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 Su extends ku{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof ku&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof ku&&e.removeChild(this)))}}class Eu extends ku{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof ku&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof ku&&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 ku)&&(t[n]=r instanceof ku?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Lu,Ou;let Ru,Tu=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Pu,_u=()=>Date.now();class Mu extends Eu{constructor(e,t){super(),this.update=void 0,this.payload=e.style?mu({},e,{style:Pu(e.style)}):e,this.update=t,this.attach()}}let Du=!1;const Nu=new Set,Vu=()=>{if(!Du)return!1;let e=_u();for(let t of Nu){let n=!1;for(let r=0;r<t.configs.length;r++){let i,o,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof ku,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),i=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),i=Math.abs(r.lastPosition-c)<.1,i&&(s=c);else{o=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>o+64&&(o=e);let t=Math.floor(e-o);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;i=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(i=!1),i?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Nu.delete(t),t.stop(!0))}return Nu.size?Tu(Vu):Du=!1,Du};function ju(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return ju({range:e,output:t,extrapolate:n});if(Ru&&"string"==typeof e.output[0])return Ru(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=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,o);return function(e,t,n,r,i,o,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],s,a,l,r.map)}}class Iu extends Su{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Su&&!(e instanceof Iu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=ju(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=ju(e,t,n)}interpolate(e,t,n){return new Iu(this,e,t,n)}}const Au=(e,t,n)=>e&&new Iu(e,t,n);function zu(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>zu(e,t)))}class Hu extends ku{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&&zu(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Iu(this,e,t,n)}}class Bu extends Su{constructor(e){super(),this.payload=e.map((e=>new Hu(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 Iu(this,e,t)}}let Fu=0,Zu=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=Fu++}update(e){if(!e)return this;const t=$u(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=xu(t,["delay","to"]);if(bu.arr(i)||bu.fun(i))this.queue.push(mu({},o,{delay:r,to:i}));else if(i){let e={};Object.entries(i).forEach((t=>{let n=t[0],i=t[1];const a=mu({to:{[n]:i},delay:Cu(r,n)},o),l=e[a.delay]&&e[a.delay].to;e[a.delay]=mu({},e[a.delay],a,{to:mu({},l,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(o),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,i=void 0===r?{}:r;bu.obj(n)&&(this.merged=mu({},n,this.merged)),bu.obj(i)&&(this.merged=mu({},this.merged,i))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,i)=>{let o=r.delay,a=xu(r,["delay"]);const l=r=>{i===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=bu.arr(a.to)||bu.fun(a.to);o?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),o):s?this.runAsync(a,l):this.diff(a).start(l)}))}else bu.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Nu.has(t)||Nu.add(t),Du||(Du=!0,Tu(Vu));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,Nu.has(t)&&Nu.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=xu(e,["delay"]);const i=this.local;let o=Promise.resolve(void 0);if(bu.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=mu({},r,$u(r.to[t]));bu.arr(n.config)&&(n.config=n.config[t]),o=o.then((()=>{if(i===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(bu.fun(r.to)){let e,t=0;o=o.then((()=>r.to((n=>{const o=mu({},r,$u(n));if(bu.arr(o.config)&&(o.config=o.config[t]),t++,i===this.guid)return e=new Promise((e=>this.diff(o).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}o.then(t)}diff(e){this.props=mu({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,i=t.to,o=void 0===i?{}:i,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[o,r];r=p[0],o=p[1]}this.merged=mu({},r,this.merged,o),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],i=t[1],o=e[n]||{};const a=bu.num(i),s=bu.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!Ou[i],c=bu.arr(i),p=!a&&!c&&!s;let f=bu.und(r[n])?i:r[n],g=a||c||s?i:1,v=Cu(l,n);h&&(g=h.animations[n].parent);let m,x=o.parent,b=o.interpolation,y=wu(h?g.getPayload():g),w=i;p&&(w=Ru({range:[0,1],output:[i,i]})(1));let C=b&&b.getValue();const $=!bu.und(x)&&o.animatedValues.some((e=>!e.done)),k=!bu.equ(w,C),S=!bu.equ(w,o.previous),E=!bu.equ(v,o.config);if(d||S&&k||E){if(a||s)x=b=o.parent||new Hu(f);else if(c)x=b=o.parent||new Bu(f);else if(p){let e=o.interpolation&&o.interpolation.calc(o.parent.value);e=void 0===e||d?f:e,o.parent?(x=o.parent,x.setValue(0,!1)):x=new Hu(0);const t={output:[e,i]};o.interpolation?(b=o.interpolation,o.interpolation.updateConfig(t)):b=x.interpolate(t)}return y=wu(h?g.getPayload():g),m=wu(x.getPayload()),d&&!p&&x.setValue(f,!1),this.hasChanged=!0,m.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=_u(),e.done=!1,e.animatedStyles.clear()})),Cu(u,n)&&x.setValue(p?g:i,!1),mu({},e,{[n]:mu({},o,{name:n,parent:x,interpolation:b,animatedValues:m,toValues:y,previous:w,config:v,fromValues:wu(x.getValue()),immediate:Cu(u,n),initialVelocity:yu(v.velocity,0),clamp:yu(v.clamp,!1),precision:yu(v.precision,.01),tension:yu(v.tension,170),friction:yu(v.friction,26),mass:yu(v.mass,1),duration:v.duration,easing:yu(v.easing,(e=>e)),decay:v.decay})})}return k?e:(p&&(x.setValue(1,!1),b.updateConfig({output:[w,w]})),x.done=!0,this.hasChanged=!0,mu({},e,{[n]:mu({},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 Wu=e=>{const t=bu.fun(e),n=((e,t)=>{const n=Q(!1),r=Q(),i=bu.fun(t),o=ie((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Zu,a=i?Cu(t,r,o):t[r];return 0===r&&(n=a.ref),o.update(a),n||o.start(),o})),n]}),[e]),a=o[0],l=o[1];r.current=a,le(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=ie((()=>e=>r.current.map(((t,n)=>{t.update(i?Cu(e,n,t):e[n]),l||t.start()}))),[e]);ee((()=>{n.current?i||s(t):l||r.current.forEach((e=>e.start()))})),ee((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return i?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],i=n[1],o=n[2];return t?[r[0],i,o]:r};class qu extends Eu{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof ku||(e=Lu.transform(e)),this.payload=e}}const Gu={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},Uu="[-+]?\\d*\\.?\\d+",Xu=Uu+"%";function Yu(){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 Ku=new RegExp("rgb"+Yu(Uu,Uu,Uu)),Ju=new RegExp("rgba"+Yu(Uu,Uu,Uu,Uu)),Qu=new RegExp("hsl"+Yu(Uu,Xu,Xu)),ep=new RegExp("hsla"+Yu(Uu,Xu,Xu,Uu)),tp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,np=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,rp=/^#([0-9a-fA-F]{6})$/,ip=/^#([0-9a-fA-F]{8})$/;function op(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 ap(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=op(i,r,e+1/3),a=op(i,r,e),l=op(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function lp(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function sp(e){return(parseFloat(e)%360+360)%360/360}function cp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function dp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function up(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=rp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Gu.hasOwnProperty(e)?Gu[e]:(t=Ku.exec(e))?(lp(t[1])<<24|lp(t[2])<<16|lp(t[3])<<8|255)>>>0:(t=Ju.exec(e))?(lp(t[1])<<24|lp(t[2])<<16|lp(t[3])<<8|cp(t[4]))>>>0:(t=tp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ip.exec(e))?parseInt(t[1],16)>>>0:(t=np.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qu.exec(e))?(255|ap(sp(t[1]),dp(t[2]),dp(t[3])))>>>0:(t=ep.exec(e))?(ap(sp(t[1]),dp(t[2]),dp(t[3]))|cp(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 pp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,hp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,fp=new RegExp(`(${Object.keys(Gu).join("|")})`,"g");let gp={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 vp=["Webkit","Ms","Moz","O"];function mp(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||gp.hasOwnProperty(e)&&gp[e]?(""+t).trim():t+"px"}gp=Object.keys(gp).reduce(((e,t)=>(vp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),gp);const xp={};var bp;Pu=e=>new qu(e),bp=e=>{const t=e.output.map((e=>e.replace(hp,up))).map((e=>e.replace(fp,up))),n=t[0].match(pp).map((()=>[]));t.forEach((e=>{e.match(pp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(pp).map(((t,r)=>ju(mu({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(pp,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`))}},Ru=bp,Ou=Gu,function(e,t){Lu={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const i=t.style,o=t.children,a=t.scrollTop,l=t.scrollLeft,s=xu(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=mp(t,i[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:xp[t]||(xp[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var yp;const wp=(yp=e=>K(((t,n)=>{const r=function(){const e=J(!1)[1];return oe((()=>e((e=>!e))),[])}(),i=Q(!0),o=Q(null),a=Q(null),l=oe((e=>{const t=o.current;o.current=new Mu(e,(()=>{let e=!1;a.current&&(e=Lu.fn(a.current,o.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);ee((()=>()=>{i.current=!1,o.current&&o.current.detach()}),[]),le(n,(()=>(e=>e.current)(a))),l(t);const s=o.current.getValue();s.scrollTop,s.scrollLeft;const c=xu(s,["scrollTop","scrollLeft"]),d=(u=e,!bu.fun(u)||u.prototype instanceof Y.Component?e=>a.current=function(e,t){return t&&(bu.fun(t)?t(e):bu.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return Y.createElement(e,mu({},c,{ref:d}))})),e=>(bu.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=yp(n),e}),yp))(["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 Cp(e,t){return e.map((function(e,n){return e+t[n]}))}function $p(e,t){return e.map((function(e,n){return e-t[n]}))}function kp(e){return Math.hypot.apply(Math,e)}function Sp(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Ep(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 Lp(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?-Ep(t-e,n-t,r)+t:e>n?+Ep(e-n,n-t,r)+n:e}function Op(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 Rp(){return Rp=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},Rp.apply(this,arguments)}function Tp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Pp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _p(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 Mp(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 _p(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)?_p(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 Dp(){}function Np(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Dp:1===t.length?t[0]:function(){for(var e,n,r=Mp(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Vp(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 jp(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 Ip(e,t){void 0===e&&(e={});for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],l=o[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Ip(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var Ap=Rp({},{threshold:function(e){return void 0===e&&(e=0),Vp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Vp(.15);case!1:return Vp(0);default:return Vp(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:Vp(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 Ap.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,i=t.right,o=void 0===i?1/0:i,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,o],[l,void 0===s?1/0:s]]}}),zp="undefined"!=typeof window&&window.document&&window.document.createElement,Hp={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=zp?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,i=t.capture;return{passive:r,capture:void 0!==i&&i}}},Bp=Rp({},Ap,{threshold:function(e,t,n){var r=n.filterTaps,i=void 0!==r&&r,o=n.lockDirection,a=void 0!==o&&o,l=n.axis,s=Vp(e,i?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=i||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Vp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Vp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Fp(e){var t=e.domTarget,n=e.eventOptions,r=e.window,i=e.enabled,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Ip(e,Hp)}({domTarget:t,eventOptions:n,window:r,enabled:i});return a.drag=function(e){return void 0===e&&(e={}),Ip(e,Bp)}(o),a}function Zp(e){return Rp({_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:Dp,canceled:!1,memo:void 0,args:void 0},e)}function Wp(){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:Zp({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:Zp({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Zp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Zp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Zp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var qp=new Map,Gp=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 i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},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 i=Rp({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),o=n.handler(i);return n.state.memo=void 0!==o?o:n.state.memo,n.state._active||n.clean(),i}}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,i=t.rubberband,o=t.threshold,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?Up(h[0],o[0]):d[0],g=!1===d[1]?Up(h[1],o[1]):d[1],v=this.checkIntentionality([f,g],h);if(v._blocked)return Rp({},v,{_movement:h,delta:[0,0]});var m,x,b,y,w=v._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(x=jp(n,this.state),m=jp(r,this.state),s[0]=x[0],l[0]=m[0]),!1!==w[1]&&!1===d[1])&&(x=null!=(b=x)?b:jp(n,this.state),m=null!=(y=m)?y:jp(r,this.state),s[1]=x[1],l[1]=m[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=Cp($,u),S=c?i:[0,0];return $=Xp(l,Cp($,s),S),Rp({},v,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:Xp(l,k,S),delta:$p($,p)})},t.clean=function(){this.clearTimeout()},Op(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 Up(e,t){return Math.abs(e)>=t&&Sp(e)*t}function Xp(e,t,n){var r=t[0],i=t[1],o=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Lp(r,s,c,o),Lp(i,u,p,a)]}function Yp(e,t,n){var r=e.state,i=e.args,o=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,args:i,previous:l}}function Kp(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.call.apply(e,[this,Rp({},t,{event:n})].concat(i))}}var Jp=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o,a=Mp(t.classes);!(o=a()).done;){new(0,o.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];th(e,c[0],Kp(c[1],Rp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,i=eh(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;rh(i,Qp(r),o);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Np.apply(void 0,d)])}nh(i,r,o)}(t,e):function(e,t){for(var n=e.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,a=Object.entries(t);o<a.length;o++){var l=a[o],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+i]=Np.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=eh(t.config),n=t.config.eventOptions;e&&rh(e,Qp(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,i=e.windowListeners;if(!n)return;for(var o in i){rh(n,i[o],r)}e.windowListeners={}}(t)},this.state=Wp(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Qp(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function eh(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function th(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function nh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=Mp(t);!(r=i()).done;){var o=r.value,a=o[0],l=o[1];e.addEventListener(a,l,n)}}function rh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=Mp(t);!(r=i()).done;){var o=r.value,a=o[0],l=o[1];e.removeEventListener(a,l,n)}}function ih(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(qp.get("drag"));e.wheel&&t.add(qp.get("wheel"));e.scroll&&t.add(qp.get("scroll"));e.move&&t.add(qp.get("move"));e.pinch&&t.add(qp.get("pinch"));e.hover&&t.add(qp.get("hover"));return t}(e),i=Y.useMemo((function(){return new Jp(r)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=n,Y.useEffect(i.effect,[]),i.config.domTarget?oh:i.bind}function oh(){"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`.")}function ah(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function lh(e){var t="buttons"in e?e.buttons:0,n=ah(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 sh(e){var t=ah(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var ch=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,i=e.windowListeners;void 0===n&&(n=[]),r.window&&(rh(r.window,i[t],r.eventOptions),nh(r.window,i[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(Pp(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=lh(e);if(n.down){t.updateSharedState(n);var r=sh(e),i=t.getKinematics(r,e),o=Yp(Pp(t),e),a=t.state._isTap,l=kp(i._movement);a&&l>=3&&(a=!1),t.updateGestureState(Rp({},o,i,{_isTap:a})),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,i=r[0],o=r[1],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,v=g[0],m=g[1],x=Rp({},Yp(Pp(t),e),t.getMovement(t.state.values)),b=[0,0];x.elapsedTime<220&&(!1!==d&&Math.abs(i)>h&&Math.abs(l)>v&&(b[0]=Sp(i)),!1!==u&&Math.abs(o)>f&&Math.abs(s)>m&&(b[1]=Sp(o))),t.updateGestureState(Rp({},x,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Pp(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(rh(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}Tp(t,e);var n=t.prototype;return n.startDrag=function(e){var t=sh(e);this.updateSharedState(lh(e)),this.updateGestureState(Rp({},function(e,t,n){var r=e.state.offset,i=n.timeStamp;return Rp({},Wp()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:i})}(this,t,e),Yp(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(th(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&th(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Tp(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return $p(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],i=n[1],o=this.state.axis||(r>i?"x":r<i?"y":void 0);return this.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},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=kp(t),i=0===r?0:1/r,o=0===n?0:1/n,a=o*r,l=t.map((function(e){return o*e})),s=t.map((function(e){return i*e}));return{velocities:l,velocity:a,distance:kp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Gp));function dh(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,i,o;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!dh(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(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!dh(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(o=e.entries();!(r=o.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=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===i[r]&&e.$$typeof||dh(e[i[r]],t[i[r]])))return!1;return!0}return e!=e&&t!=t}function uh(e,t){try{return dh(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 ph(e,t){void 0===t&&(t={}),qp.set("drag",ch);var n=Q();return n.current||(n.current=function(e,t){var n,r,i=[],o=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return o&&n===this&&t(l,i)||(r=e.apply(this,l),o=!0,n=this,i=l),r}}(Fp,uh)),ih({drag:e},n.current(t))}
|
|
2480
2503
|
/*!
|
|
2481
2504
|
* tabbable 5.3.3
|
|
2482
2505
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
2483
|
-
*/var
|
|
2506
|
+
*/var hh=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],fh=hh.join(","),gh="undefined"==typeof Element,vh=gh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,mh=!gh&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},xh=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(fh));return t&&vh.call(e,fh)&&r.unshift(e),r=r.filter(n)},bh=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?i.push.apply(i,s):i.push({scope:a,candidates:s})}else{vh.call(a,fh)&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!r.shadowRootFilter||r.shadowRootFilter(a);if(c&&d){var u=e(!0===c?a.children:c.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:a,candidates:u})}else o.unshift.apply(o,a.children)}}return i},yh=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},wh=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ch=function(e){return"INPUT"===e.tagName},$h=function(e){return function(e){return Ch(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||mh(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 i=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!i||i===e}(e)},kh=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Sh=function(e,t){return!(t.disabled||function(e){return Ch(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=vh.call(e,"details>summary:first-of-type")?e.parentElement:e;if(vh.call(i,"details:not([open]) *"))return!0;var o=mh(e).host,a=(null==o?void 0:o.ownerDocument.contains(o))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return kh(e)}else{if("function"==typeof r){for(var l=e;e;){var s=e.parentElement,c=mh(e);if(s&&!s.shadowRoot&&!0===r(s))return kh(e);e=e.assignedSlot?e.assignedSlot:s||c===e.ownerDocument?s:c.host}e=l}if(a)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!!vh.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Eh=function(e,t){return!($h(t)||yh(t)<0||!Sh(e,t))},Lh=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Oh=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scope,a=o?t.scope:t,l=yh(a,o),s=o?e(t.candidates):a;0===l?o?n.push.apply(n,s):n.push(a):r.push({documentOrder:i,tabIndex:l,item:t,isScope:o,content:s})})),r.sort(wh).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Rh=function(e,t){var n;return n=(t=t||{}).getShadowRoot?bh([e],t.includeContainer,{filter:Eh.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Lh}):xh(e,t.includeContainer,Eh.bind(null,t)),Oh(n)},Th=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==vh.call(e,fh)&&Eh(t,e)},Ph=hh.concat("iframe").join(","),_h=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==vh.call(e,Ph)&&Sh(t,e)};
|
|
2484
2507
|
/*!
|
|
2485
2508
|
* focus-trap 6.9.4
|
|
2486
2509
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2487
2510
|
*/
|
|
2488
|
-
function Ph(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 _h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ph(Object(n),!0).forEach((function(t){Mh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ph(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dh,Nh=(Dh=[],{activateTrap:function(e){if(Dh.length>0){var t=Dh[Dh.length-1];t!==e&&t.pause()}var n=Dh.indexOf(e);-1===n||Dh.splice(n,1),Dh.push(e)},deactivateTrap:function(e){var t=Dh.indexOf(e);-1!==t&&Dh.splice(t,1),Dh.length>0&&Dh[Dh.length-1].unpause()}}),Vh=function(e){return setTimeout(e,0)},jh=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},Ih=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},Ah=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},zh=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=_h({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},l=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},s=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}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 l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=Lh(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?mh([t],n.includeContainer,{filter:$h.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):vh(t,n.includeContainer,$h.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,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=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return Oh(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return Oh(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!s("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:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Ah(e);l(t)>=0||(Ih(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Th(t,i.tabbableOptions)}):Ih(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Ah(e),n=l(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(o.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==Ih(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Ah(e);d();var n=null;if(o.tabbableGroups.length>0){var r=l(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=jh(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Th(t,i.tabbableOptions)&&!Oh(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=jh(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Th(t,i.tabbableOptions)&&!Oh(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},v=function(e){var t=Ah(e);l(t)>=0||Ih(i.clickOutsideDeactivates,e)||Ih(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},m=function(){if(o.active)return Nh.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Vh((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},x=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){i&&d(),m(),n&&n()};return i?(i(o.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!o.active)return this;var t=_h({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,x(),o.active=!1,o.paused=!1,Nh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){Vh((function(){c&&u(p(o.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(o.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,x()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,d(),m(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&d(),this}}).updateContainerElements(e),n};var Hh=!1;if("undefined"!=typeof window){var Bh={get passive(){Hh=!0}};window.addEventListener("testPassive",null,Bh),window.removeEventListener("testPassive",null,Bh)}var Fh,Zh="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Wh=[],qh=!1,Gh=-1,Uh=void 0,Xh=void 0,Yh=function(e){return Wh.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Kh=function(e){var t=e||window.event;return!!Yh(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Jh=function(e,t){if(e){if(!Wh.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Wh=[].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)}(Wh),[n]),Zh?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Gh=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Gh;!Yh(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Kh(e):e.stopPropagation())}(t,e)},qh||(document.addEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!0)):function(e){if(void 0===Xh){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Xh=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Uh&&(Uh=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.")},Qh=function(e){e?(Wh=Wh.filter((function(t){return t.targetElement!==e})),Zh?(e.ontouchstart=null,e.ontouchmove=null,qh&&0===Wh.length&&(document.removeEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!1)):Wh.length||(void 0!==Xh&&(document.body.style.paddingRight=Xh,Xh=void 0),void 0!==Uh&&(document.body.style.overflow=Uh,Uh=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},ef=[],tf="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"}(Fh||(Fh={}));var nf,rf=function(e){return Object.freeze(e)},of=function(e,t){this.inlineSize=e,this.blockSize=t,rf(this)},af=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,rf(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}(),lf=function(e){return e instanceof SVGElement&&"getBBox"in e},sf=function(e){if(lf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},cf=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)},df="undefined"!=typeof window?window:{},uf=new WeakMap,pf=/auto|scroll/,hf=/^tb|vertical/,ff=/msie|trident/i.test(df.navigator&&df.navigator.userAgent),gf=function(e){return parseFloat(e||"0")},vf=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new of((n?t:e)||0,(n?e:t)||0)},mf=rf({devicePixelContentBoxSize:vf(),borderBoxSize:vf(),contentBoxSize:vf(),contentRect:new af(0,0,0,0)}),xf=function(e,t){if(void 0===t&&(t=!1),uf.has(e)&&!t)return uf.get(e);if(sf(e))return uf.set(e,mf),mf;var n=getComputedStyle(e),r=lf(e)&&e.ownerSVGElement&&e.getBBox(),i=!ff&&"border-box"===n.boxSizing,o=hf.test(n.writingMode||""),a=!r&&pf.test(n.overflowY||""),l=!r&&pf.test(n.overflowX||""),s=r?0:gf(n.paddingTop),c=r?0:gf(n.paddingRight),d=r?0:gf(n.paddingBottom),u=r?0:gf(n.paddingLeft),p=r?0:gf(n.borderTopWidth),h=r?0:gf(n.borderRightWidth),f=r?0:gf(n.borderBottomWidth),g=u+c,v=s+d,m=(r?0:gf(n.borderLeftWidth))+h,x=p+f,b=l?e.offsetHeight-x-e.clientHeight:0,y=a?e.offsetWidth-m-e.clientWidth:0,w=i?g+m:0,C=i?v+x:0,$=r?r.width:gf(n.width)-w-y,k=r?r.height:gf(n.height)-C-b,S=$+g+y+m,E=k+v+b+x,L=rf({devicePixelContentBoxSize:vf(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:vf(S,E,o),contentBoxSize:vf($,k,o),contentRect:new af(u,s,$,k)});return uf.set(e,L),L},bf=function(e,t,n){var r=xf(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Fh.DEVICE_PIXEL_CONTENT_BOX:return a;case Fh.BORDER_BOX:return i;default:return o}},yf=function(e){var t=xf(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=rf([t.borderBoxSize]),this.contentBoxSize=rf([t.contentBoxSize]),this.devicePixelContentBoxSize=rf([t.devicePixelContentBoxSize])},wf=function(e){if(sf(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Cf=function(){var e=1/0,t=[];ef.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new yf(t.target),i=wf(t.target);r.push(n),t.lastReportedSize=bf(t.target,t.observedBox),i<e&&(e=i)})),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},$f=function(e){ef.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(wf(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},kf=function(){var e=0;for($f(e);ef.some((function(e){return e.activeTargets.length>0}));)e=Cf(),$f(e);return ef.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:tf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=tf),window.dispatchEvent(e)}(),e>0},Sf=[],Ef=function(e){if(!nf){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Sf.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),nf=function(){n.textContent="".concat(t?t--:t++)}}Sf.push(e),nf()},Lf=0,Of={attributes:!0,characterData:!0,childList:!0,subtree:!0},Rf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tf=function(e){return void 0===e&&(e=0),Date.now()+e},Pf=!1,_f=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),!Pf){Pf=!0;var n,r=Tf(e);n=function(){var n=!1;try{n=kf()}finally{if(Pf=!1,e=r-Tf(),!Lf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Ef((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,Of)};document.body?t():df.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Rf.forEach((function(t){return df.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Rf.forEach((function(t){return df.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Mf=function(e){!Lf&&e>0&&_f.start(),!(Lf+=e)&&_f.stop()},Df=function(){function e(e,t){this.target=e,this.observedBox=t||Fh.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=bf(this.target,this.observedBox,!0);return function(e){return!lf(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}(),Nf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Vf=new WeakMap,jf=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},If=function(){function e(){}return e.connect=function(e,t){var n=new Nf(e,t);Vf.set(e,n)},e.observe=function(e,t,n){var r=Vf.get(e),i=0===r.observationTargets.length;jf(r.observationTargets,t)<0&&(i&&ef.push(r),r.observationTargets.push(new Df(t,n&&n.box)),Mf(1),_f.schedule())},e.unobserve=function(e,t){var n=Vf.get(e),r=jf(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&ef.splice(ef.indexOf(n),1),n.observationTargets.splice(r,1),Mf(-1))},e.disconnect=function(e){var t=this,n=Vf.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Af=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.");If.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(!cf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");If.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(!cf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");If.unobserve(this,e)},e.prototype.disconnect=function(){If.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function zf(){return zf=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},zf.apply(this,arguments)}function Hf(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Bf="undefined"!=typeof window?ne:ee;function Ff(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 Zf(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Wf={box:"border-box"};function qf(e,t){var n=t.label,r=t.enabled,i=t.resizeSourceRef,o=J(0),a=o[0],l=o[1];se(n+": "+a);var s=oe((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return Bf((function(){if(e.current&&r){var t=new Af(s);return t.observe(e.current,Wf),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function Gf(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Uf={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Xf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Yf=function(e,t,n){return void 0===n&&(n=e.context),new Qd(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:zf({},Uf,Xf)}}},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:zf({},Uf,Xf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:zf({},{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:[tu({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(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),Kf=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Jf=["velocity"],Qf=["onRest","config"],eg={tension:170,friction:26},tg=eg.tension,ng=eg.friction,rg=Y.forwardRef((function(e,t){var n=e.children,r=e.sibling,i=e.className,o=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?og:h,g=e.snapPoints,v=void 0===g?ag:g,m=e.blocking,x=void 0===m||m,b=e.scrollLocking,y=void 0===b||b,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?x:S,L=e.expandOnContentDrag,O=void 0!==L&&L,R=Hf(e,Kf),T=function(){var e=J(!1),t=e[0],n=e[1],r=J({}),i=r[0],o=r[1],a=oe((function(e){return o((function(t){var n;return zf({},t,((n={})[e]=!1,n))})),function(){o((function(t){var n;return zf({},t,((n={})[e]=!0,n))}))}}),[]);return ee((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&n(!0)}),[i]),{ready:t,registerReady:a}}(),P=T.ready,_=T.registerReady,M=Q(!1),D=Q(C),N=Q($),V=Q(k);ee((function(){D.current=C,N.current=$,V.current=k}),[$,C,k]);var j,I,A=Fu((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=A[0],H=A[1],B=Q(null),F=Q(null),Z=Q(null),W=Q(null),q=Q(null),G=Q(null),U=Q(0),X=Q(),K=Q(!1),te=(j=ie((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),I=Q(null==j?void 0:j.matches),se(I.current?"reduce":"no-preference"),ee((function(){var e=function(e){I.current=e.matches};return null==j||j.addListener(e),function(){return null==j?void 0:j.removeListener(e)}}),[j]),I),ne=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,i=Q({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1;i.current={activate:function(){o||(o=!0,Jh(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){o&&(o=!1,Qh(e))}}}),[n,t,r]),i}({targetRef:F,enabled:P&&y,reserveScrollBarGap:E}),re=function(e){var t=e.targetRef,n=e.enabled,r=Q({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1,o=[],a=[];r.current={activate:function(){if(!i){i=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){i&&(i=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:P&&x}),ae=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,i=e.enabled,o=Q({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return se(i?"Enabled":"Disabled"),ee((function(){if(!i)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=n.current,a=zh(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;o.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.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(){l&&(l=!1,a.deactivate())}}}),[i,n,r,t]),o}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:P&&x&&!1!==d}),ce=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,i=e.ready,o=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,i=e.footerRef,o=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=ie((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=ie((function(){return t("maxHeight")}),[t]),i=J((function(){return Zf(e)||"undefined"!=typeof window?window.innerHeight:0})),o=i[0],a=i[1],l=o>0,s=Q(0);return se(e?"controlled":"auto"),ee((function(){l&&r()}),[l,r]),Bf((function(){if(e)return a(Zf(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),o}(n,l,s),u=qf(a,{label:"headerHeight",enabled:o,resizeSourceRef:s}),p=qf(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=qf(i,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;se("minHeight: "+f);var g=p>0;return ee((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({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=o.maxHeight,l=o.minHeight,s=o.headerHeight,c=o.footerHeight,d=function(e,t){var n=[].concat(e).map(Zf).reduce((function(e,n){return e.add(Ff(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(i?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return se("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=Zf("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:Z,controlledMaxHeight:p,footerEnabled:!!o,footerRef:q,getSnapPoints:v,headerEnabled:!1!==a,headerRef:W,heightRef:U,lastSnapRef:c,ready:P,registerReady:_,resizeSourceRef:X}),de=ce.minSnap,ue=ce.maxSnap,pe=ce.maxHeight,he=ce.findSnap,fe=Q(pe),ge=Q(de),ve=Q(ue),me=Q(he),xe=Q(0);Bf((function(){fe.current=pe,ve.current=ue,ge.current=de,me.current=he,xe.current=he(f)}),[he,f,pe,ue,de]);var be=oe((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Hf(n,Jf),a=Hf(e,Qf);return new Promise((function(e){return H(zf({},a,{config:zf({velocity:i},o,{mass:1,tension:tg,friction:Math.max(ng,ng+(ng-ng*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=fu(Yf,{devTools:!1,actions:{onOpenCancel:oe((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:oe((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:oe((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:oe((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:oe((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:oe((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:oe((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:oe((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:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:oe((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:oe((function(e,t){try{return Promise.resolve(be({y:xe.current,ready:0,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),activate:oe((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([ne.current.activate(),ae.current.activate(),re.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[re,ae,ne]),deactivate:oe((function(){try{return ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[re,ae,ne]),openImmediately:oe((function(){try{return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),openSmoothly:oe((function(){try{return Promise.resolve(be({y:0,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:te.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te]),snapSmoothly:oe((function(e,t){try{var n=me.current(e.y);return U.current=n,c.current=n,Promise.resolve(be({y:n,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:te.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),resizeSmoothly:oe((function(){try{var e=me.current(U.current);return U.current=e,c.current=e,Promise.resolve(be({y:e,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:"element"!==X.current||te.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),closeSmoothly:oe((function(e,t){try{return be({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(be({y:0,maxHeight:fe.current,maxSnap:ve.current,immediate:te.current})).then((function(){return Promise.resolve(be({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te])}}),we=ye[0],Ce=ye[1];ee((function(){P&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,P]),Bf((function(){(pe||ue||de)&&Ce("RESIZE")}),[pe,ue,de,Ce]),ee((function(){return function(){ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate()}}),[re,ae,ne]),le(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;Ce("SNAP",{payload:{y:me.current(e),velocity:i,source:a}})},get height(){return U.current}}}),[Ce]),ee((function(){var e=F.current,t=function(e){K.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 O&&(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)}}),[O,F]);var $e=dh((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,v=e.velocity,m=-1*e.movement[1];if(!M.current)return l(),f;if(u&&i&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var x=f+m,b=m*v,y=Math.max(ge.current,Math.min(ve.current,x+2*b));if(!c&&u&&s>0&&x+b<ge.current/2)return l(),u(),f;var w=c?u||ge.current!==ve.current?Sp(x,u?0:ge.current,ve.current,.55):x<ge.current?Sp(x,ge.current,2*ve.current,.55):Sp(x,ge.current/2,ve.current,.55):y;return O&&a?(w>=ve.current&&(w=ve.current),f===ve.current&&F.current.scrollTop>0&&(w=ve.current),K.current=w<ve.current):K.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:v>.05?v:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:!0,config:{velocity:v}}),f)}),{filterTaps:!0});if(Number.isNaN(ve.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ge.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=ju([n.y,n.maxHeight],(function(e,t){return Math.round(Ff(t-e,0,16))+"px"})),i=ju([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Ff(e,t,n)+"px"})),o=ju([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=ju([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=ju([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Ff((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=ju([n.y,n.minSnap],(function(e,t){return t?Ff(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:z});return Y.createElement(bp.div,zf({},R,{"data-rsbs-root":!0,"data-rsbs-state":ig.find(we.matches),"data-rsbs-is-blocking":x,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!o,className:i,ref:B,style:zf({},ke,w,{opacity:z.ready})}),r,x&&Y.createElement("div",zf({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),Y.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(),u&&u())}},!1!==a&&Y.createElement("div",zf({key:"header","data-rsbs-header":!0,ref:W},$e()),a),Y.createElement("div",zf({key:"scroll","data-rsbs-scroll":!0,ref:F},O?$e({isContentDragging:!0}):{}),Y.createElement("div",{"data-rsbs-content":!0,ref:Z},n)),o&&Y.createElement("div",zf({key:"footer",ref:q,"data-rsbs-footer":!0},$e()),o)))})),ig=["closed","opening","open","closing","dragging","snapping","resizing"];function og(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function ag(e){return e.minHeight}var lg=["onSpringStart","onSpringEnd","skipInitialTransition"],sg=K((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,i=e.skipInitialTransition,o=Hf(e,lg),a=J(!1),l=a[0],s=a[1],c=Q(),d=Q(null),u=Q(i&&o.open?"OPEN":"CLOSED");Bf((function(){if(o.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[o.open]);var p=oe((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=oe((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?Y.createElement(rc,{"data-rsbs-portal":!0},Y.createElement(rg,zf({},o,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const cg=de`
|
|
2511
|
+
function Mh(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 Dh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mh(Object(n),!0).forEach((function(t){Nh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vh,jh=(Vh=[],{activateTrap:function(e){if(Vh.length>0){var t=Vh[Vh.length-1];t!==e&&t.pause()}var n=Vh.indexOf(e);-1===n||Vh.splice(n,1),Vh.push(e)},deactivateTrap:function(e){var t=Vh.indexOf(e);-1!==t&&Vh.splice(t,1),Vh.length>0&&Vh[Vh.length-1].unpause()}}),Ih=function(e){return setTimeout(e,0)},Ah=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},zh=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},Hh=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Bh=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=Dh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},l=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},s=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}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 l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=Rh(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?bh([t],n.includeContainer,{filter:Sh.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):xh(t,n.includeContainer,Sh.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,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=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return Th(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return Th(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!s("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:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Hh(e);l(t)>=0||(zh(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!_h(t,i.tabbableOptions)}):zh(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Hh(e),n=l(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(o.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==zh(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Hh(e);d();var n=null;if(o.tabbableGroups.length>0){var r=l(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=Ah(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||_h(t,i.tabbableOptions)&&!Th(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=Ah(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||_h(t,i.tabbableOptions)&&!Th(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},v=function(e){var t=Hh(e);l(t)>=0||zh(i.clickOutsideDeactivates,e)||zh(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},m=function(){if(o.active)return jh.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Ih((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},x=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){i&&d(),m(),n&&n()};return i?(i(o.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!o.active)return this;var t=Dh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,x(),o.active=!1,o.paused=!1,jh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){Ih((function(){c&&u(p(o.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(o.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,x()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,d(),m(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&d(),this}}).updateContainerElements(e),n};var Fh=!1;if("undefined"!=typeof window){var Zh={get passive(){Fh=!0}};window.addEventListener("testPassive",null,Zh),window.removeEventListener("testPassive",null,Zh)}var Wh,qh="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Gh=[],Uh=!1,Xh=-1,Yh=void 0,Kh=void 0,Jh=function(e){return Gh.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Qh=function(e){var t=e||window.event;return!!Jh(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},ef=function(e,t){if(e){if(!Gh.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Gh=[].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)}(Gh),[n]),qh?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Xh=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Xh;!Jh(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Qh(e):e.stopPropagation())}(t,e)},Uh||(document.addEventListener("touchmove",Qh,Fh?{passive:!1}:void 0),Uh=!0)):function(e){if(void 0===Kh){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Kh=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Yh&&(Yh=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.")},tf=function(e){e?(Gh=Gh.filter((function(t){return t.targetElement!==e})),qh?(e.ontouchstart=null,e.ontouchmove=null,Uh&&0===Gh.length&&(document.removeEventListener("touchmove",Qh,Fh?{passive:!1}:void 0),Uh=!1)):Gh.length||(void 0!==Kh&&(document.body.style.paddingRight=Kh,Kh=void 0),void 0!==Yh&&(document.body.style.overflow=Yh,Yh=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},nf=[],rf="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"}(Wh||(Wh={}));var of,af=function(e){return Object.freeze(e)},lf=function(e,t){this.inlineSize=e,this.blockSize=t,af(this)},sf=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,af(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}(),cf=function(e){return e instanceof SVGElement&&"getBBox"in e},df=function(e){if(cf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},uf=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)},pf="undefined"!=typeof window?window:{},hf=new WeakMap,ff=/auto|scroll/,gf=/^tb|vertical/,vf=/msie|trident/i.test(pf.navigator&&pf.navigator.userAgent),mf=function(e){return parseFloat(e||"0")},xf=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new lf((n?t:e)||0,(n?e:t)||0)},bf=af({devicePixelContentBoxSize:xf(),borderBoxSize:xf(),contentBoxSize:xf(),contentRect:new sf(0,0,0,0)}),yf=function(e,t){if(void 0===t&&(t=!1),hf.has(e)&&!t)return hf.get(e);if(df(e))return hf.set(e,bf),bf;var n=getComputedStyle(e),r=cf(e)&&e.ownerSVGElement&&e.getBBox(),i=!vf&&"border-box"===n.boxSizing,o=gf.test(n.writingMode||""),a=!r&&ff.test(n.overflowY||""),l=!r&&ff.test(n.overflowX||""),s=r?0:mf(n.paddingTop),c=r?0:mf(n.paddingRight),d=r?0:mf(n.paddingBottom),u=r?0:mf(n.paddingLeft),p=r?0:mf(n.borderTopWidth),h=r?0:mf(n.borderRightWidth),f=r?0:mf(n.borderBottomWidth),g=u+c,v=s+d,m=(r?0:mf(n.borderLeftWidth))+h,x=p+f,b=l?e.offsetHeight-x-e.clientHeight:0,y=a?e.offsetWidth-m-e.clientWidth:0,w=i?g+m:0,C=i?v+x:0,$=r?r.width:mf(n.width)-w-y,k=r?r.height:mf(n.height)-C-b,S=$+g+y+m,E=k+v+b+x,L=af({devicePixelContentBoxSize:xf(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:xf(S,E,o),contentBoxSize:xf($,k,o),contentRect:new sf(u,s,$,k)});return hf.set(e,L),L},wf=function(e,t,n){var r=yf(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Wh.DEVICE_PIXEL_CONTENT_BOX:return a;case Wh.BORDER_BOX:return i;default:return o}},Cf=function(e){var t=yf(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=af([t.borderBoxSize]),this.contentBoxSize=af([t.contentBoxSize]),this.devicePixelContentBoxSize=af([t.devicePixelContentBoxSize])},$f=function(e){if(df(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},kf=function(){var e=1/0,t=[];nf.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Cf(t.target),i=$f(t.target);r.push(n),t.lastReportedSize=wf(t.target,t.observedBox),i<e&&(e=i)})),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},Sf=function(e){nf.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&($f(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Ef=function(){var e=0;for(Sf(e);nf.some((function(e){return e.activeTargets.length>0}));)e=kf(),Sf(e);return nf.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:rf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=rf),window.dispatchEvent(e)}(),e>0},Lf=[],Of=function(e){if(!of){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Lf.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),of=function(){n.textContent="".concat(t?t--:t++)}}Lf.push(e),of()},Rf=0,Tf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Pf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],_f=function(e){return void 0===e&&(e=0),Date.now()+e},Mf=!1,Df=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),!Mf){Mf=!0;var n,r=_f(e);n=function(){var n=!1;try{n=Ef()}finally{if(Mf=!1,e=r-_f(),!Rf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Of((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,Tf)};document.body?t():pf.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Pf.forEach((function(t){return pf.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Pf.forEach((function(t){return pf.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Nf=function(e){!Rf&&e>0&&Df.start(),!(Rf+=e)&&Df.stop()},Vf=function(){function e(e,t){this.target=e,this.observedBox=t||Wh.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=wf(this.target,this.observedBox,!0);return function(e){return!cf(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}(),jf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},If=new WeakMap,Af=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},zf=function(){function e(){}return e.connect=function(e,t){var n=new jf(e,t);If.set(e,n)},e.observe=function(e,t,n){var r=If.get(e),i=0===r.observationTargets.length;Af(r.observationTargets,t)<0&&(i&&nf.push(r),r.observationTargets.push(new Vf(t,n&&n.box)),Nf(1),Df.schedule())},e.unobserve=function(e,t){var n=If.get(e),r=Af(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&nf.splice(nf.indexOf(n),1),n.observationTargets.splice(r,1),Nf(-1))},e.disconnect=function(e){var t=this,n=If.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Hf=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.");zf.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(!uf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zf.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(!uf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zf.unobserve(this,e)},e.prototype.disconnect=function(){zf.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Bf(){return Bf=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},Bf.apply(this,arguments)}function Ff(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Zf="undefined"!=typeof window?ne:ee;function Wf(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 qf(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Gf={box:"border-box"};function Uf(e,t){var n=t.label,r=t.enabled,i=t.resizeSourceRef,o=J(0),a=o[0],l=o[1];se(n+": "+a);var s=oe((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return Zf((function(){if(e.current&&r){var t=new Hf(s);return t.observe(e.current,Gf),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function Xf(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Yf={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Kf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Jf=function(e,t,n){return void 0===n&&(n=e.context),new tu(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:Bf({},Yf,Kf)}}},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:Bf({},Yf,Kf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Bf({},{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:[ru({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(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Xf()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),Qf=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],eg=["velocity"],tg=["onRest","config"],ng={tension:170,friction:26},rg=ng.tension,ig=ng.friction,og=Y.forwardRef((function(e,t){var n=e.children,r=e.sibling,i=e.className,o=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?lg:h,g=e.snapPoints,v=void 0===g?sg:g,m=e.blocking,x=void 0===m||m,b=e.scrollLocking,y=void 0===b||b,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?x:S,L=e.expandOnContentDrag,O=void 0!==L&&L,R=Ff(e,Qf),T=function(){var e=J(!1),t=e[0],n=e[1],r=J({}),i=r[0],o=r[1],a=oe((function(e){return o((function(t){var n;return Bf({},t,((n={})[e]=!1,n))})),function(){o((function(t){var n;return Bf({},t,((n={})[e]=!0,n))}))}}),[]);return ee((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&n(!0)}),[i]),{ready:t,registerReady:a}}(),P=T.ready,_=T.registerReady,M=Q(!1),D=Q(C),N=Q($),V=Q(k);ee((function(){D.current=C,N.current=$,V.current=k}),[$,C,k]);var j,I,A=Wu((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=A[0],H=A[1],B=Q(null),F=Q(null),Z=Q(null),W=Q(null),q=Q(null),G=Q(null),U=Q(0),X=Q(),K=Q(!1),te=(j=ie((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),I=Q(null==j?void 0:j.matches),se(I.current?"reduce":"no-preference"),ee((function(){var e=function(e){I.current=e.matches};return null==j||j.addListener(e),function(){return null==j?void 0:j.removeListener(e)}}),[j]),I),ne=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,i=Q({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1;i.current={activate:function(){o||(o=!0,ef(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){o&&(o=!1,tf(e))}}}),[n,t,r]),i}({targetRef:F,enabled:P&&y,reserveScrollBarGap:E}),re=function(e){var t=e.targetRef,n=e.enabled,r=Q({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1,o=[],a=[];r.current={activate:function(){if(!i){i=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){i&&(i=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:P&&x}),ae=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,i=e.enabled,o=Q({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return se(i?"Enabled":"Disabled"),ee((function(){if(!i)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=n.current,a=Bh(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;o.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.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(){l&&(l=!1,a.deactivate())}}}),[i,n,r,t]),o}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:P&&x&&!1!==d}),ce=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,i=e.ready,o=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,i=e.footerRef,o=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=ie((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=ie((function(){return t("maxHeight")}),[t]),i=J((function(){return qf(e)||"undefined"!=typeof window?window.innerHeight:0})),o=i[0],a=i[1],l=o>0,s=Q(0);return se(e?"controlled":"auto"),ee((function(){l&&r()}),[l,r]),Zf((function(){if(e)return a(qf(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),o}(n,l,s),u=Uf(a,{label:"headerHeight",enabled:o,resizeSourceRef:s}),p=Uf(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=Uf(i,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;se("minHeight: "+f);var g=p>0;return ee((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({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=o.maxHeight,l=o.minHeight,s=o.headerHeight,c=o.footerHeight,d=function(e,t){var n=[].concat(e).map(qf).reduce((function(e,n){return e.add(Wf(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(i?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return se("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=qf("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:Z,controlledMaxHeight:p,footerEnabled:!!o,footerRef:q,getSnapPoints:v,headerEnabled:!1!==a,headerRef:W,heightRef:U,lastSnapRef:c,ready:P,registerReady:_,resizeSourceRef:X}),de=ce.minSnap,ue=ce.maxSnap,pe=ce.maxHeight,he=ce.findSnap,fe=Q(pe),ge=Q(de),ve=Q(ue),me=Q(he),xe=Q(0);Zf((function(){fe.current=pe,ve.current=ue,ge.current=de,me.current=he,xe.current=he(f)}),[he,f,pe,ue,de]);var be=oe((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Ff(n,eg),a=Ff(e,tg);return new Promise((function(e){return H(Bf({},a,{config:Bf({velocity:i},o,{mass:1,tension:rg,friction:Math.max(ig,ig+(ig-ig*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=vu(Jf,{devTools:!1,actions:{onOpenCancel:oe((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:oe((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:oe((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:oe((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:oe((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:oe((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:oe((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:oe((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:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:oe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:oe((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:oe((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:oe((function(e,t){try{return Promise.resolve(be({y:xe.current,ready:0,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),activate:oe((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([ne.current.activate(),ae.current.activate(),re.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[re,ae,ne]),deactivate:oe((function(){try{return ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[re,ae,ne]),openImmediately:oe((function(){try{return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),openSmoothly:oe((function(){try{return Promise.resolve(be({y:0,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:te.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te]),snapSmoothly:oe((function(e,t){try{var n=me.current(e.y);return U.current=n,c.current=n,Promise.resolve(be({y:n,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:te.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),resizeSmoothly:oe((function(){try{var e=me.current(U.current);return U.current=e,c.current=e,Promise.resolve(be({y:e,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:"element"!==X.current||te.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),closeSmoothly:oe((function(e,t){try{return be({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(be({y:0,maxHeight:fe.current,maxSnap:ve.current,immediate:te.current})).then((function(){return Promise.resolve(be({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te])}}),we=ye[0],Ce=ye[1];ee((function(){P&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,P]),Zf((function(){(pe||ue||de)&&Ce("RESIZE")}),[pe,ue,de,Ce]),ee((function(){return function(){ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate()}}),[re,ae,ne]),le(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;Ce("SNAP",{payload:{y:me.current(e),velocity:i,source:a}})},get height(){return U.current}}}),[Ce]),ee((function(){var e=F.current,t=function(e){K.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 O&&(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)}}),[O,F]);var $e=ph((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,v=e.velocity,m=-1*e.movement[1];if(!M.current)return l(),f;if(u&&i&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var x=f+m,b=m*v,y=Math.max(ge.current,Math.min(ve.current,x+2*b));if(!c&&u&&s>0&&x+b<ge.current/2)return l(),u(),f;var w=c?u||ge.current!==ve.current?Lp(x,u?0:ge.current,ve.current,.55):x<ge.current?Lp(x,ge.current,2*ve.current,.55):Lp(x,ge.current/2,ve.current,.55):y;return O&&a?(w>=ve.current&&(w=ve.current),f===ve.current&&F.current.scrollTop>0&&(w=ve.current),K.current=w<ve.current):K.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:v>.05?v:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:!0,config:{velocity:v}}),f)}),{filterTaps:!0});if(Number.isNaN(ve.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ge.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=Au([n.y,n.maxHeight],(function(e,t){return Math.round(Wf(t-e,0,16))+"px"})),i=Au([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Wf(e,t,n)+"px"})),o=Au([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=Au([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=Au([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Wf((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=Au([n.y,n.minSnap],(function(e,t){return t?Wf(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:z});return Y.createElement(wp.div,Bf({},R,{"data-rsbs-root":!0,"data-rsbs-state":ag.find(we.matches),"data-rsbs-is-blocking":x,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!o,className:i,ref:B,style:Bf({},ke,w,{opacity:z.ready})}),r,x&&Y.createElement("div",Bf({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),Y.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(),u&&u())}},!1!==a&&Y.createElement("div",Bf({key:"header","data-rsbs-header":!0,ref:W},$e()),a),Y.createElement("div",Bf({key:"scroll","data-rsbs-scroll":!0,ref:F},O?$e({isContentDragging:!0}):{}),Y.createElement("div",{"data-rsbs-content":!0,ref:Z},n)),o&&Y.createElement("div",Bf({key:"footer",ref:q,"data-rsbs-footer":!0},$e()),o)))})),ag=["closed","opening","open","closing","dragging","snapping","resizing"];function lg(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function sg(e){return e.minHeight}var cg=["onSpringStart","onSpringEnd","skipInitialTransition"],dg=K((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,i=e.skipInitialTransition,o=Ff(e,cg),a=J(!1),l=a[0],s=a[1],c=Q(),d=Q(null),u=Q(i&&o.open?"OPEN":"CLOSED");Zf((function(){if(o.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[o.open]);var p=oe((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=oe((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?Y.createElement(oc,{"data-rsbs-portal":!0},Y.createElement(og,Bf({},o,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const ug=de`
|
|
2489
2512
|
width: 40px;
|
|
2490
2513
|
border-radius: 4px;
|
|
2491
2514
|
background: transparent;
|
|
@@ -2499,7 +2522,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2499
2522
|
margin: 0px 0px;
|
|
2500
2523
|
background: ${we("neutral",300)};
|
|
2501
2524
|
}
|
|
2502
|
-
`,
|
|
2525
|
+
`,pg=(e,t)=>de`
|
|
2503
2526
|
[data-rsbs-overlay] {
|
|
2504
2527
|
border-top-left-radius: 16px;
|
|
2505
2528
|
border-top-right-radius: 16px;
|
|
@@ -2525,7 +2548,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2525
2548
|
padding: 0px;
|
|
2526
2549
|
min-height: 64px;
|
|
2527
2550
|
}
|
|
2528
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.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
|
|
2551
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.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 hg=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,i)=>{const o=Math.abs(t-e);o<r&&(r=o,n=i)})),n},fg=({header:e,content:t,footer:n,open:r=!1,onClose:i,minimizedHeight:o,midHeight:a=200,maxFullHeight:l,defaultSnap:s="minimized",className:c,blocking:d,zIndex:u=1e3})=>{const p=Q(null),h=Y.useRef([]),[f,g]=Y.useState(null),v=window.innerWidth>768,m=h.current;let x="Expand sheet";if(null!=f){const e=hg(f,m);e>0&&e<m.length-1?x="Make full screen":e===m.length-1&&(x="Expanded sheet")}const b=!(null==f||!m.length||hg(f,m)!==m.length-1);return G(dg,{ref:p,css:pg(!!e,u),className:c,open:r,onDismiss:i,header:q("div",{children:[G("button",{type:"button",disabled:b,"aria-label":x,css:ug,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=m[m.length-1];if(v)return void p.current?.snapTo?.((()=>t));const n=f??m[0];let r=m.findIndex((e=>e>n));-1===r&&(r=m.length-1);const i=m[r];p.current?.snapTo?.((()=>i))},children:G("div",{})}),G("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:x}),e]}),footer:n,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:r})=>{const i=[20,o||e,a+(n?r:0),l||t-t/6];return h.current=i,i},onSpringEnd:()=>{const e=p.current?.height;e&&g(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:r})=>{let i=20;return"minimized"===s?i=o||e:"mid"===s?i=a+(n?r:0):"full"===s&&(i=l||t-t/6),i},blocking:d,children:r?t:null})},gg=de`
|
|
2529
2552
|
a,
|
|
2530
2553
|
p {
|
|
2531
2554
|
font-size: 16px;
|
|
@@ -2557,19 +2580,19 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2557
2580
|
a:hover {
|
|
2558
2581
|
text-decoration: underline;
|
|
2559
2582
|
}
|
|
2560
|
-
`,
|
|
2583
|
+
`,vg=de`
|
|
2561
2584
|
svg {
|
|
2562
2585
|
height: 12px;
|
|
2563
2586
|
width: 12px;
|
|
2564
2587
|
color: ${we("neutral",600)};
|
|
2565
2588
|
}
|
|
2566
|
-
`,
|
|
2589
|
+
`,mg=de`
|
|
2567
2590
|
cursor: pointer;
|
|
2568
2591
|
color: ${we("neutral",600)};
|
|
2569
2592
|
display: flex;
|
|
2570
2593
|
justify-content: center;
|
|
2571
2594
|
align-items: center;
|
|
2572
|
-
`,
|
|
2595
|
+
`,xg=({links:e,separator:t,maxItems:n=99,linkRouter:r})=>{const[i,o]=J(e.length>n);ee((()=>{o(e.length>n)}),[e.length]);const a=r;return G(D.Root,{children:G(D.List,{gap:"16px",children:i?q(U,{children:[G(D.Item,{css:gg,children:q(a,{to:e[0].link,href:e[0].link,children:[e[0].icon,e[0].label]})}),G(D.Separator,{css:vg,children:t||G(Me,{rotate:"270"})}),G("li",{className:"chakra-breadcrumb__item",children:G("button",{css:mg,type:"button",onClick:()=>o(!1),children:"..."})}),G(D.Separator,{css:vg,children:t||G(Me,{rotate:"270"})}),G(D.Item,{css:gg,children:q("p",{"aria-current":"page","aria-label":e[e.length-1].label,children:[e[e.length-1].icon,e[e.length-1].label]})})]}):e.map(((n,r)=>n?.label?q(ce,{children:[G(D.Item,{css:gg,children:r<e.length-1?q(a,{to:n.link,href:n.link,children:[n.icon,n.label]}):q("p",{"aria-current":"page","aria-label":n.label,children:[n.label&&n.icon?n.icon:"",n.label]})}),r<e.length-1?G(D.Separator,{css:vg,children:t||G(Me,{rotate:"270"})}):null]},n.label):null))})})},bg=(e,t)=>de`
|
|
2573
2596
|
min-height: 56px;
|
|
2574
2597
|
width: 100vw;
|
|
2575
2598
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2579,7 +2602,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2579
2602
|
background-color: ${we("neutral",t?200:100)};
|
|
2580
2603
|
border-top: 1px solid ${we("neutral",400)};
|
|
2581
2604
|
z-index: 101;
|
|
2582
|
-
`,
|
|
2605
|
+
`,yg=e=>de`
|
|
2583
2606
|
height: 100%;
|
|
2584
2607
|
width: 100%;
|
|
2585
2608
|
max-width: ${e?`${e}px`:"100%"};
|
|
@@ -2594,7 +2617,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2594
2617
|
flex-direction: column;
|
|
2595
2618
|
align-items: flex-start;
|
|
2596
2619
|
}
|
|
2597
|
-
`,
|
|
2620
|
+
`,wg=de`
|
|
2598
2621
|
display: flex;
|
|
2599
2622
|
align-items: center;
|
|
2600
2623
|
flex-wrap: wrap;
|
|
@@ -2607,7 +2630,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2607
2630
|
color: ${we("neutral",700)};
|
|
2608
2631
|
text-decoration: underline;
|
|
2609
2632
|
}
|
|
2610
|
-
`,
|
|
2633
|
+
`,Cg=de`
|
|
2611
2634
|
width: 240px;
|
|
2612
2635
|
font-size: 14px;
|
|
2613
2636
|
line-height: 20px;
|
|
@@ -2618,13 +2641,13 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2618
2641
|
@media screen and (max-width: 768px) {
|
|
2619
2642
|
text-align: left;
|
|
2620
2643
|
}
|
|
2621
|
-
|
|
2644
|
+
`,$g=({children:e,label:t="© World Resources Institute",fixed:n,filled:r,maxWidth:i})=>{const o=(new Date).getFullYear();return G("footer",{css:bg(n,r),children:q("div",{css:yg(i),children:[G("div",{children:G(Fe,{height:"32px",width:"91px"})}),G("div",{css:wg,children:e}),G("div",{children:q("p",{css:Cg,children:[t," ",o]})})]})})},kg=de`
|
|
2622
2645
|
width: 100%;
|
|
2623
2646
|
display: flex;
|
|
2624
2647
|
align-items: center;
|
|
2625
2648
|
height: 56px;
|
|
2626
2649
|
background-color: ${we("neutral",200)};
|
|
2627
|
-
|
|
2650
|
+
`,Sg=de`
|
|
2628
2651
|
height: 56px;
|
|
2629
2652
|
width: 99%;
|
|
2630
2653
|
background-color: ${we("neutral",200)};
|
|
@@ -2718,9 +2741,9 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2718
2741
|
opacity: 1;
|
|
2719
2742
|
}
|
|
2720
2743
|
}
|
|
2721
|
-
`,
|
|
2744
|
+
`,Eg=de`
|
|
2722
2745
|
position: relative;
|
|
2723
|
-
`,
|
|
2746
|
+
`,Lg=de`
|
|
2724
2747
|
position: absolute;
|
|
2725
2748
|
top: -5px;
|
|
2726
2749
|
right: -5px;
|
|
@@ -2735,7 +2758,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2735
2758
|
display: flex;
|
|
2736
2759
|
justify-content: center;
|
|
2737
2760
|
align-items: center;
|
|
2738
|
-
`,
|
|
2761
|
+
`,Og=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Rg=({defaultValue:e,tabs:t,onTabClick:n,hideLabels:r,activationMode:i="manual"})=>{const o=t.length,[a,l]=J((()=>Og(t,e)));return G("div",{css:kg,children:G(N.Root,{width:"full",defaultValue:e||t?.[0]?.value,onValueChange:({value:e})=>(e=>{const r=Og(t,e);l(r),n&&n(e)})(e),activationMode:i,children:G(N.List,{alignItems:"center",border:"none",children:t.map(((e,t)=>{const{label:n,icon:i,bagdeCount:l,"aria-label":s,"aria-describedby":c,disabled:d,...u}=e,p=`${e.value}-str-status`,h=[`tab ${t+1} of ${o}`,a===t?"selected":"not selected"];d&&h.push("disabled");const f=[c,p].filter(Boolean).join(" ")||void 0;return q(N.Trigger,{css:Sg,"aria-label":s||n,"aria-disabled":!!d||void 0,"aria-describedby":f,disabled:d,...u,children:[q("div",{css:Eg,children:[i,l?G("div",{css:Lg,className:"ds-badge-count",children:l}):null]}),r?null:G("p",{children:n}),G(V,{id:p,children:h.join(", ")})]},e.value)}))})})})},Tg=(e,t,n)=>de`
|
|
2739
2762
|
height: ${e?"96px":"48px"};
|
|
2740
2763
|
width: 100%;
|
|
2741
2764
|
background-color: ${n||we("neutral",100)};
|
|
@@ -2744,7 +2767,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2744
2767
|
left: 0;
|
|
2745
2768
|
z-index: 102;
|
|
2746
2769
|
border-bottom: 1px solid ${we("neutral",400)};
|
|
2747
|
-
`,
|
|
2770
|
+
`,Pg=de`
|
|
2748
2771
|
height: 48px;
|
|
2749
2772
|
width: 100%;
|
|
2750
2773
|
background-color: ${we("neutral",100)};
|
|
@@ -2754,7 +2777,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2754
2777
|
justify-content: flex-start;
|
|
2755
2778
|
gap: 0px;
|
|
2756
2779
|
padding: 8px 16px;
|
|
2757
|
-
`,
|
|
2780
|
+
`,_g=(e,t)=>de`
|
|
2758
2781
|
height: 48px;
|
|
2759
2782
|
width: 100%;
|
|
2760
2783
|
max-width: ${t?`${t}px`:"100%"};
|
|
@@ -2764,7 +2787,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2764
2787
|
justify-content: space-between;
|
|
2765
2788
|
margin: 0 auto;
|
|
2766
2789
|
padding: 8px 16px;
|
|
2767
|
-
`,
|
|
2790
|
+
`,Mg=de`
|
|
2768
2791
|
outline: none;
|
|
2769
2792
|
a {
|
|
2770
2793
|
&:focus-visible {
|
|
@@ -2775,12 +2798,12 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2775
2798
|
outline-width: 2px;
|
|
2776
2799
|
}
|
|
2777
2800
|
}
|
|
2778
|
-
`,
|
|
2801
|
+
`,Dg=e=>de`
|
|
2779
2802
|
display: ${e?"none":"flex"};
|
|
2780
2803
|
align-items: center;
|
|
2781
2804
|
justify-content: flex-start;
|
|
2782
2805
|
gap: 0px;
|
|
2783
|
-
`,
|
|
2806
|
+
`,Ng=e=>de`
|
|
2784
2807
|
font-size: 16px;
|
|
2785
2808
|
line-height: 24px;
|
|
2786
2809
|
font-weight: 400;
|
|
@@ -2805,12 +2828,12 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2805
2828
|
font-weight: 700;
|
|
2806
2829
|
color: ${we("accessible","controls-on-neutral-lights")};
|
|
2807
2830
|
`:""}
|
|
2808
|
-
`,
|
|
2831
|
+
`,Vg=de`
|
|
2809
2832
|
height: 48px;
|
|
2810
2833
|
display: flex;
|
|
2811
2834
|
align-items: center;
|
|
2812
2835
|
justify-content: flex-end;
|
|
2813
|
-
`,
|
|
2836
|
+
`,jg=e=>de`
|
|
2814
2837
|
height: 100%;
|
|
2815
2838
|
font-size: 16px;
|
|
2816
2839
|
line-height: 24px;
|
|
@@ -2829,7 +2852,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2829
2852
|
}
|
|
2830
2853
|
}
|
|
2831
2854
|
`:""}
|
|
2832
|
-
`,
|
|
2855
|
+
`,Ig=e=>de`
|
|
2833
2856
|
height: 100%;
|
|
2834
2857
|
display: flex;
|
|
2835
2858
|
align-items: center;
|
|
@@ -2837,7 +2860,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2837
2860
|
gap: 20px;
|
|
2838
2861
|
padding-left: 16px;
|
|
2839
2862
|
border-left: 1px solid ${we("neutral",e?700:300)};
|
|
2840
|
-
`,
|
|
2863
|
+
`,Ag=de`
|
|
2841
2864
|
background-color: none;
|
|
2842
2865
|
border: none;
|
|
2843
2866
|
cursor: pointer;
|
|
@@ -2862,7 +2885,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2862
2885
|
outline-width: 2px;
|
|
2863
2886
|
background-color: ${we("neutral",200)};
|
|
2864
2887
|
}
|
|
2865
|
-
`,
|
|
2888
|
+
`,zg=e=>de`
|
|
2866
2889
|
position: absolute;
|
|
2867
2890
|
top: 48px;
|
|
2868
2891
|
right: 0;
|
|
@@ -2875,10 +2898,10 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2875
2898
|
justify-content: flex-start;
|
|
2876
2899
|
gap: 16px;
|
|
2877
2900
|
transition: width 0.5s ease-in-out;
|
|
2878
|
-
`,
|
|
2901
|
+
`,Hg=de`
|
|
2879
2902
|
height: 100%;
|
|
2880
2903
|
width: 100%;
|
|
2881
|
-
`,
|
|
2904
|
+
`,Bg=de`
|
|
2882
2905
|
background-color: ${we("neutral",200)};
|
|
2883
2906
|
border-bottom: 1px solid ${we("neutral",300)};
|
|
2884
2907
|
|
|
@@ -2898,13 +2921,13 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2898
2921
|
margin-left: -12px;
|
|
2899
2922
|
}
|
|
2900
2923
|
}
|
|
2901
|
-
`,
|
|
2924
|
+
`,Fg=de`
|
|
2902
2925
|
background-color: ${we("neutral",100)};
|
|
2903
|
-
`,
|
|
2926
|
+
`,Zg=de`
|
|
2904
2927
|
min-height: 100vh;
|
|
2905
2928
|
width: 100%;
|
|
2906
2929
|
overflow-y: scroll;
|
|
2907
|
-
`;de``;const
|
|
2930
|
+
`;de``;const Wg=e=>de`
|
|
2908
2931
|
display: inline-block;
|
|
2909
2932
|
width: 100%;
|
|
2910
2933
|
padding: 12px 16px;
|
|
@@ -2933,7 +2956,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2933
2956
|
outline-width: 2px;
|
|
2934
2957
|
background-color: ${we("neutral",200)};
|
|
2935
2958
|
}
|
|
2936
|
-
`,
|
|
2959
|
+
`,qg=de`
|
|
2937
2960
|
width: 100%;
|
|
2938
2961
|
padding: 12px 16px;
|
|
2939
2962
|
display: flex;
|
|
@@ -2957,7 +2980,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2957
2980
|
outline-width: 2px;
|
|
2958
2981
|
background-color: ${we("neutral",200)};
|
|
2959
2982
|
}
|
|
2960
|
-
`,
|
|
2983
|
+
`,Gg=e=>de`
|
|
2961
2984
|
position: absolute;
|
|
2962
2985
|
top: 0px;
|
|
2963
2986
|
right: 0;
|
|
@@ -2969,7 +2992,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2969
2992
|
align-items: flex-start;
|
|
2970
2993
|
justify-content: flex-start;
|
|
2971
2994
|
transition: width 0.5s ease-in-out;
|
|
2972
|
-
`,
|
|
2995
|
+
`,Ug=de`
|
|
2973
2996
|
height: 48px;
|
|
2974
2997
|
width: 100%;
|
|
2975
2998
|
display: flex;
|
|
@@ -2980,7 +3003,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2980
3003
|
position: relative;
|
|
2981
3004
|
top: 0;
|
|
2982
3005
|
left: 0;
|
|
2983
|
-
`,
|
|
3006
|
+
`,Xg=de`
|
|
2984
3007
|
position: absolute;
|
|
2985
3008
|
bottom: 0;
|
|
2986
3009
|
left: 0;
|
|
@@ -2995,13 +3018,13 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2995
3018
|
button {
|
|
2996
3019
|
width: calc(48% - 24px);
|
|
2997
3020
|
}
|
|
2998
|
-
`,
|
|
3021
|
+
`,Yg=({navigationSection:e,utilitySection:t,actionsSection:n,linkRouter:r,isOpen:i,setIsOpen:o,pathname:a})=>{const[l,s]=J(void 0),[c,d]=J(-1),u=Q(null),p=Q([]),h=r;return q(U,{children:[G("div",{css:zg(i),children:i&&q("div",{css:Hg,children:[q("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[t?G("div",{css:Bg,children:t?.map((e=>G("div",{className:"ds-utility-item",children:e})))}):null,e?G("div",{css:Fg,children:e.map(((e,t)=>e.link?G(h,{to:e.link,href:e.link,onClick:()=>{s(void 0),d(-1),o(!1)},css:Wg(a===e.link),children:e.label},e.label):q("button",{css:qg,type:"button",ref:e=>p.current[t]=e,onClick:()=>{e.items&&(s(e),d(t),setTimeout((()=>{u.current?.focus()}),100))},children:[e.label,e.items?G(Me,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),n?G("div",{css:Xg,children:n.map((e=>G(Le,{...e,onClick:t=>{e?.onClick?.(t),s(void 0),d(-1),o(!1)}},e.ariaLabel)))}):null]})}),G("div",{css:Gg(!!l?.items),children:l?.items?q(U,{children:[q("div",{css:Ug,children:[q("button",{type:"button",onClick:()=>{s(void 0),d(-1),p.current[c]?.focus()},"aria-label":"Go back",css:Ag,ref:u,children:[G(Me,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),l?.label]}),q("button",{type:"button",onClick:()=>{s(void 0),d(-1),o(!1)},"aria-label":"Close menu",css:Ag,children:["Close",G(Ne,{height:"16px",width:"16px"})]})]}),G("div",{css:Zg,children:l?.items?.map((e=>G(h,{to:e.link,href:e.link,css:Wg(),onClick:()=>{s(void 0),d(-1),o(!1)},children:e.label},e.label)))})]}):null})]})},Kg=1023,Jg=({logo:e,linkRouter:t,pathname:n,navigationSection:r,utilitySection:i,actionsSection:o,maxWidth:a,fixed:l,onNavbarHeightChange:s,backgroundColor:c})=>{const d=Q(null),u=Q(null),p=Q(null),[h,f]=J(!1),[g,v]=J(-1),[m,x]=J("undefined"!=typeof window&&window?.innerWidth<=Kg),[b,y]=J(!1),w=t,C=oe((()=>{if(u.current&&d.current&&p.current){const e=d.current.getBoundingClientRect(),t=u.current.getBoundingClientRect(),n=p.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Kg||window.innerWidth<=g?(s?.(96),f(!0)):window.innerWidth>Kg&&window.innerWidth<=1440?e.right>=t.left?(s?.(96),f(!0),v(window.innerWidth)):window.innerWidth>g&&(s?.(48),f(!1),v(-1)):(s?.(48),f(!1),v(-1)),h&&(window.innerWidth<=Kg||n.right>=t.left?(x(!0),s?.(48)):(x(!1),s?.(96)))}}),[g,h]);return ee((()=>(C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)})),[C]),q("nav",{css:Tg(h&&!m,l,c),children:[q("div",{css:_g(h&&!m,a),children:[q("div",{css:($=h&&!m,de`
|
|
2999
3022
|
display: flex;
|
|
3000
3023
|
align-items: center;
|
|
3001
3024
|
justify-content: flex-start;
|
|
3002
3025
|
gap: 12px;
|
|
3003
3026
|
color: ${we("neutral",$?100:900)};
|
|
3004
|
-
`),ref:d,children:[e?G("div",{ref:p,css:
|
|
3027
|
+
`),ref:d,children:[e?G("div",{ref:p,css:Mg,children:e}):null,G("div",{css:Dg(h),children:r?.map((e=>e.link?G(w,{to:e.link,href:e.link,css:Ng(n===e.link),children:e.label},e.label):G(Pt,{label:e.label,items:e.items||[]},e.label)))})]}),G("div",{css:Vg,ref:u,children:m?q("button",{type:"button",onClick:()=>y(!b),"aria-label":"Open menu",css:Ag,children:[b?"Close":"Menu",G(b?Ne:at,{height:"16px",width:"16px"})]}):q(U,{children:[G("div",{css:Vg,children:i?.map(((e,t)=>G("div",{css:jg(h),children:e},t)))}),o?G("div",{css:Ig(h),children:o.map((e=>G(Le,{...e},e.ariaLabel)))}):null]})})]}),h&&!m?G("div",{css:Pg,children:r?.map((e=>e.link?G(w,{to:e.link,href:e.link,css:Ng(n===e.link),children:e.label},e.label):G(Pt,{label:e.label,items:e.items||[]},e.label)))}):null,m?G(Yg,{navigationSection:r,utilitySection:i,actionsSection:o,linkRouter:t,isOpen:b,setIsOpen:y,pathname:n}):null]});var $},Qg=de`
|
|
3005
3028
|
width: 64px;
|
|
3006
3029
|
height: 100%;
|
|
3007
3030
|
z-index: 100;
|
|
@@ -3010,7 +3033,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3010
3033
|
display: flex;
|
|
3011
3034
|
flex-direction: column;
|
|
3012
3035
|
justify-content: space-between;
|
|
3013
|
-
`,
|
|
3036
|
+
`,ev=de`
|
|
3014
3037
|
width: 64px;
|
|
3015
3038
|
height: 64px;
|
|
3016
3039
|
background-color: ${we("neutral",200)};
|
|
@@ -3100,7 +3123,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3100
3123
|
}
|
|
3101
3124
|
}
|
|
3102
3125
|
}
|
|
3103
|
-
`,
|
|
3126
|
+
`,tv=de`
|
|
3104
3127
|
display: flex;
|
|
3105
3128
|
justify-content: center;
|
|
3106
3129
|
align-items: center;
|
|
@@ -3113,7 +3136,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3113
3136
|
fill: ${we("neutral",600)};
|
|
3114
3137
|
}
|
|
3115
3138
|
}
|
|
3116
|
-
`,
|
|
3139
|
+
`,nv=de`
|
|
3117
3140
|
width: 64px;
|
|
3118
3141
|
height: 64px;
|
|
3119
3142
|
background-color: ${we("neutral",200)};
|
|
@@ -3151,7 +3174,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3151
3174
|
text-align: center;
|
|
3152
3175
|
color: ${we("neutral",600)};
|
|
3153
3176
|
}
|
|
3154
|
-
`,
|
|
3177
|
+
`,rv=de`
|
|
3155
3178
|
width: 320px;
|
|
3156
3179
|
height: 100%;
|
|
3157
3180
|
z-index: 100;
|
|
@@ -3160,14 +3183,14 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3160
3183
|
overflow-y: auto;
|
|
3161
3184
|
overflow-x: hidden;
|
|
3162
3185
|
border-right: 1px solid ${we("neutral",300)};
|
|
3163
|
-
`,
|
|
3186
|
+
`,iv=({tabs:e=[],defaultValue:t,onTabClick:n,children:i,onOpenChange:o})=>{const[a,l]=J(!1),[s,c]=J(t||e?.[0]?.value),d=e=>{c(e),n&&n(e)},[u]=j(["(max-width: 768px)"]);return u?q(N.Root,{defaultValue:s,onValueChange:({value:e})=>d(e),children:[G(N.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:e.map((e=>G(N.Trigger,{value:e.value,css:{"--indicator-color":we("primary",500),flexShrink:0,padding:"10px 16px",color:we("neutral",600),"&[data-selected]":{color:we("neutral",800),fontWeight:600}},children:e.label},e.value)))}),e.map((e=>G(N.Content,{value:e.value,children:i},e.value)))]}):q("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[q("div",{css:Qg,children:[G(N.Root,{defaultValue:t||e?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{d(e)},role:"tablist",children:G(N.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:e.map((e=>G(N.Trigger,{css:ev,"aria-label":e["aria-label"]||e.label,...e,children:q(r,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[e.icon?G("div",{css:tv,children:e.icon}):null,G("p",{children:e.label})]})},e.label)))})}),i?G(I.Root,{onOpenChange:({open:e})=>{l(e),o&&o(!e)},children:q(I.Trigger,{css:nv,children:[G("div",{css:tv,children:G(a?Re:Oe,{})}),q("div",{className:"ds-tab-label",children:[G("p",{children:a?"Show":"Hide"}),G("p",{children:"Sidebar"})]})]})}):null]}),i?G(I.Root,{defaultOpen:!0,open:!a,children:G(I.Content,{height:"100%",children:G("div",{css:rv,role:"tabpanel","aria-labelledby":s,children:i})})}):null]})},ov=e=>de`
|
|
3164
3187
|
width: 100%;
|
|
3165
3188
|
display: flex;
|
|
3166
3189
|
align-items: center;
|
|
3167
3190
|
height: 40px;
|
|
3168
3191
|
|
|
3169
3192
|
${"view"===e&&`\n border: 1px solid ${we("neutral",400)};\n background-color: ${we("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
3170
|
-
`,
|
|
3193
|
+
`,av=de`
|
|
3171
3194
|
width: 99%;
|
|
3172
3195
|
height: 40px;
|
|
3173
3196
|
padding: 8px 16px;
|
|
@@ -3183,7 +3206,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3183
3206
|
&:focus-visible {
|
|
3184
3207
|
box-shadow: none;
|
|
3185
3208
|
}
|
|
3186
|
-
`,
|
|
3209
|
+
`,lv=de`
|
|
3187
3210
|
background-color: ${we("neutral",200)};
|
|
3188
3211
|
color: ${we("neutral",700)};
|
|
3189
3212
|
|
|
@@ -3240,11 +3263,11 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3240
3263
|
opacity: 1;
|
|
3241
3264
|
}
|
|
3242
3265
|
}
|
|
3243
|
-
`,
|
|
3266
|
+
`,sv=de`
|
|
3244
3267
|
width: 4px;
|
|
3245
3268
|
height: 24px;
|
|
3246
3269
|
background-color: ${we("neutral",400)};
|
|
3247
|
-
`,
|
|
3270
|
+
`,cv=de`
|
|
3248
3271
|
height: 32px;
|
|
3249
3272
|
border-radius: 2px;
|
|
3250
3273
|
background-color: ${we("neutral",200)};
|
|
@@ -3317,7 +3340,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3317
3340
|
opacity: 1;
|
|
3318
3341
|
}
|
|
3319
3342
|
}
|
|
3320
|
-
`,
|
|
3343
|
+
`,dv=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),uv=e=>1===e?"none":2===e?"left":"right",pv=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:i,activationMode:o="manual"})=>{const[a,l]=J(dv(n,t)||0),s="view"===e;return G("div",{css:ov(e),children:G(N.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(dv(n,t=e)),void(i&&i(t));var t},activationMode:o,children:G(N.List,{alignItems:"center",border:"none",children:n.map(((e,t)=>q(ce,{children:[s&&1===t&&"left"===uv(a)?G("div",{css:sv}):null,G(N.Trigger,{css:[av,s?cv:lv],"aria-label":e["aria-label"]||e.label,...e,children:q(r,{display:"flex",alignItems:"center",gap:"5px",children:[e.icon,e.label]})},e.label),s&&1===t&&"right"===uv(a)?G("div",{css:sv}):null]},e.label)))})})})},hv=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return ue(he,{children:r.map((e=>n.test(e)?ue("strong",{children:e},e):ue("span",{children:e},e)))})},fv=({items:e,query:t,onSelect:n,highlightedIndex:i})=>{const o=Q(null);return ee((()=>{if(!o.current)return;const e=o.current.children[i];e&&e.scrollIntoView({block:"nearest"})}),[i]),ue(r,{padding:"8px",children:e.map(((e,a)=>ue(r,{ref:o,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:a===i?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:ue(hv,{text:e.label,query:t})},e.id)))})},gv=({placeholder:e,disabled:t,size:n="default",options:o=[],resultsMaxHeight:a="200px",isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h})=>{const[f,g]=J(""),{open:v,onOpen:m,onClose:x}=A(),[b,y]=J(o),[w,C]=J(-1),$=Q(null),k=`search-results-${te()}`,S=e=>{const t=o.find((t=>t.id===e||t.label===e));t&&(d?.(t),g(""),x())};ee((()=>{if(u?.(f),!f)return void y(o);const e=o.filter((e=>e.id?.toLowerCase().includes(f.toLowerCase())||e.label.toLowerCase().includes(f.toLowerCase())||e.caption?.toLowerCase().includes(f.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>S(e.id||e.label)})));y(e),m()}),[f]),ee((()=>{function e(e){v&&$.current&&!$.current.contains(e.target)&&x()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const E=f.length?G(gt,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,L="none"!==c&&!!f.length&&b.length>0&&v;return q("div",{ref:$,style:{position:"relative",width:"100%"},children:[G(z,{startElement:G(dt,{fill:t?we("neutral",500):we("primary",700),style:{marginTop:"-12px"}}),endElement:E,children:G(In,{autoComplete:"off",placeholder:e||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},value:f,label:"",style:{paddingLeft:"40px"},type:"search","aria-label":e||"Search filter","aria-expanded":L,"aria-controls":k,role:"combobox","aria-autocomplete":"list",disabled:t,size:n,onKeyDown:e=>{if(L){if("ArrowDown"===e.key&&(e.preventDefault(),C((e=>Math.min(e+1,b.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),C((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),w>=0)){const e=b[w];S(e.id||e.label)}"Escape"===e.key&&x()}}})}),(L||s&&!!f.length)&&"custom"===c&&h&&!s&&h({items:b,highlightedIndex:w,query:f,onSelect:S}),(L||s&&!!f.length)&&G(l,{container:$,children:q(r,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:a,children:[s&&G(r,{padding:"1rem",children:G(i,{})}),"text"===c&&!s&&G(fv,{highlightedIndex:w,items:b,query:f,onSelect:S}),"list"===c&&!s&&G(bl,{items:b,highlightedIndex:w})]})})]})},vv={small:"16px",medium:"24px",large:"40px",default:"16px"};function mv(e,t,n,r){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&vv[e]?vv[e]:vv.default}(e,t),o=n?we("neutral",200):we("primary",300),a=r??o,l=r&&n?"opacity: 0.7;":"",s=we("neutral",n?400:800);return de`
|
|
3321
3344
|
height: ${i};
|
|
3322
3345
|
width: ${i};
|
|
3323
3346
|
border-radius: 50%;
|
|
@@ -3351,17 +3374,17 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3351
3374
|
background-color: ${we("primary",500)};
|
|
3352
3375
|
}
|
|
3353
3376
|
}
|
|
3354
|
-
`}const
|
|
3377
|
+
`}const xv=e=>de`
|
|
3355
3378
|
width: ${e||"16px"};
|
|
3356
3379
|
position: absolute;
|
|
3357
3380
|
top: -8px;
|
|
3358
3381
|
left: 15px;
|
|
3359
|
-
`,
|
|
3382
|
+
`,bv=de`
|
|
3360
3383
|
font-size: 12px;
|
|
3361
3384
|
line-height: 16px;
|
|
3362
3385
|
font-weight: 700;
|
|
3363
3386
|
color: ${we("primary",800)};
|
|
3364
|
-
`,
|
|
3387
|
+
`,yv=K((({name:e,ariaLabel:t,size:n="medium",customSize:r="",src:i,srcSet:o,onClick:a,notificationCount:l,disabled:s=!0,customBackgroundColor:c=""},d)=>{const u=()=>{s||a?.()},p=(()=>{let e="";return l&&l>0&&(e=`${l>99?"99+":l}`),e})();let h="16px";l&&l>99?h="28px":l&&l>9&&(h="22px");const f=!!i||!!o,g=a&&!s;return q(H.Root,{"aria-label":t||e,ref:d,css:mv(n,r,s,c),onClick:u,onKeyDown:e=>{s||"Enter"!==e.key||u()},role:g?"button":void 0,tabIndex:g?0:void 0,"aria-disabled":s,children:[f&&G(H.Image,{src:i,srcSet:o}),!f&&e&&G(H.Fallback,{name:e,css:bv}),!f&&!e&&G(lt,{size:"100%",style:{padding:"15%",color:s?we("neutral",400):void 0}}),p.length>0?G("div",{css:xv(h),children:G("div",{css:de`
|
|
3365
3388
|
height: 16px;
|
|
3366
3389
|
width: auto;
|
|
3367
3390
|
background-color: ${we("error",500)};
|
|
@@ -3373,16 +3396,16 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3373
3396
|
font-size: 12px;
|
|
3374
3397
|
font-weight: 700;
|
|
3375
3398
|
color: ${we("error",100)};
|
|
3376
|
-
`,children:G("p",{"aria-label":`${l} unread message`,children:p})})}):null]})})),
|
|
3399
|
+
`,children:G("p",{"aria-label":`${l} unread message`,children:p})})}):null]})})),wv=de`
|
|
3377
3400
|
display: flex;
|
|
3378
3401
|
justify-content: flex-start;
|
|
3379
3402
|
align-items: center;
|
|
3380
3403
|
gap: 8px;
|
|
3381
|
-
`,
|
|
3404
|
+
`,Cv=e=>de`
|
|
3382
3405
|
width: ${e||"16px"};
|
|
3383
3406
|
position: relative;
|
|
3384
3407
|
display: flex;
|
|
3385
|
-
|
|
3408
|
+
`,$v=de`
|
|
3386
3409
|
height: 4px;
|
|
3387
3410
|
width: 4px;
|
|
3388
3411
|
background-color: ${we("error",500)};
|
|
@@ -3390,7 +3413,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3390
3413
|
position: absolute;
|
|
3391
3414
|
top: 0px;
|
|
3392
3415
|
right: 0px;
|
|
3393
|
-
`,
|
|
3416
|
+
`,kv=de`
|
|
3394
3417
|
height: 10px;
|
|
3395
3418
|
background-color: ${we("error",500)};
|
|
3396
3419
|
padding: 0 3px 1px 3px;
|
|
@@ -3401,11 +3424,11 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3401
3424
|
position: absolute;
|
|
3402
3425
|
top: -2px;
|
|
3403
3426
|
left: 9px;
|
|
3404
|
-
|
|
3427
|
+
`,Sv=de`
|
|
3405
3428
|
font-size: 9px;
|
|
3406
3429
|
font-weight: 700;
|
|
3407
3430
|
color: ${we("error",100)};
|
|
3408
|
-
`,
|
|
3431
|
+
`,Ev=de`
|
|
3409
3432
|
height: 16px;
|
|
3410
3433
|
min-width: 16px;
|
|
3411
3434
|
background-color: ${we("error",500)};
|
|
@@ -3414,11 +3437,11 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3414
3437
|
justify-content: center;
|
|
3415
3438
|
align-items: center;
|
|
3416
3439
|
padding: 0px 4px 1px 4px;
|
|
3417
|
-
`,
|
|
3440
|
+
`,Lv=de`
|
|
3418
3441
|
font-size: 16px;
|
|
3419
3442
|
font-weight: 700;
|
|
3420
3443
|
color: ${we("error",100)};
|
|
3421
|
-
`,
|
|
3444
|
+
`,Ov=({hasNotification:e,notificationCount:t,label:n})=>{const[r,i]=J(!1);ee((()=>{const e=()=>{window.innerWidth<1024?i(!0):i(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const o=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let a="16px";return t&&t>99?a="28px":t&&t>9&&(a="22px"),q("div",r?{css:wv,role:"status","aria-live":"polite",children:[q("div",{css:Cv(),children:[G(Ze,{color:"currentColor",height:"16px",width:"16px"}),!e||t||n?null:G("div",{css:$v,"aria-hidden":!0})]}),n?G("p",{children:n}):null,o.length>0?G("div",{css:Ev,children:G("p",{css:Lv,"aria-label":`${t} unread message`,children:o})}):null]}:{css:wv,role:"status","aria-live":"polite",children:[n?G("p",{children:n}):null,q("div",{css:Cv(a),children:[o.length>0?G("div",{css:kv,children:G("p",{css:Sv,"aria-label":`${t} unread message`,children:o})}):null,e&&!t?G("div",{css:$v,"aria-hidden":!0}):null,G(Ze,{color:"currentColor",height:"16px",width:"16px"})]})]})},Rv=(e,t)=>de`
|
|
3422
3445
|
width: 100%;
|
|
3423
3446
|
max-width: ${"small"===e?"234px":"320px"};
|
|
3424
3447
|
border-radius: 4px;
|
|
@@ -3433,7 +3456,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3433
3456
|
button {
|
|
3434
3457
|
margin-left: ${t?0:"24px"};
|
|
3435
3458
|
}
|
|
3436
|
-
`,
|
|
3459
|
+
`,Tv=de`
|
|
3437
3460
|
display: flex;
|
|
3438
3461
|
align-items: flex-start;
|
|
3439
3462
|
gap: 8px;
|
|
@@ -3441,28 +3464,28 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3441
3464
|
svg {
|
|
3442
3465
|
margin-top: 6px;
|
|
3443
3466
|
}
|
|
3444
|
-
`,
|
|
3467
|
+
`,Pv=e=>de`
|
|
3445
3468
|
color: ${we("neutral",800)};
|
|
3446
3469
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3447
3470
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3448
3471
|
font-weight: 400;
|
|
3449
3472
|
text-align: left;
|
|
3450
|
-
`,
|
|
3473
|
+
`,_v=e=>de`
|
|
3451
3474
|
color: ${we("neutral",700)};
|
|
3452
3475
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3453
3476
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3454
3477
|
font-weight: 400;
|
|
3455
3478
|
margin-left: 24px;
|
|
3456
3479
|
text-align: left;
|
|
3457
|
-
`,
|
|
3480
|
+
`,Mv=de`
|
|
3458
3481
|
background-color: ${we("neutral",100)};
|
|
3459
3482
|
border: 1px solid ${we("neutral",300)};
|
|
3460
3483
|
color: ${we("neutral",700)};
|
|
3461
|
-
`,
|
|
3484
|
+
`,Dv=de`
|
|
3462
3485
|
background-color: ${we("neutral",200)};
|
|
3463
3486
|
border: 1px solid ${we("neutral",300)};
|
|
3464
3487
|
color: ${we("neutral",700)};
|
|
3465
|
-
`,
|
|
3488
|
+
`,Nv=de`
|
|
3466
3489
|
background-color: ${we("success",100)};
|
|
3467
3490
|
border: 1px solid ${we("success",300)};
|
|
3468
3491
|
color: ${we("success",500)};
|
|
@@ -3470,7 +3493,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3470
3493
|
p {
|
|
3471
3494
|
color: ${we("success",900)};
|
|
3472
3495
|
}
|
|
3473
|
-
`,
|
|
3496
|
+
`,Vv=de`
|
|
3474
3497
|
background-color: ${we("warning",100)};
|
|
3475
3498
|
border: 1px solid ${we("warning",300)};
|
|
3476
3499
|
color: ${we("warning",500)};
|
|
@@ -3478,7 +3501,7 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3478
3501
|
p {
|
|
3479
3502
|
color: ${we("warning",900)};
|
|
3480
3503
|
}
|
|
3481
|
-
`,
|
|
3504
|
+
`,jv=de`
|
|
3482
3505
|
background-color: ${we("error",100)};
|
|
3483
3506
|
border: 1px solid ${we("error",300)};
|
|
3484
3507
|
color: ${we("error",500)};
|
|
@@ -3486,32 +3509,32 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3486
3509
|
p {
|
|
3487
3510
|
color: ${we("error",900)};
|
|
3488
3511
|
}
|
|
3489
|
-
`,
|
|
3512
|
+
`,Iv=({label:e,caption:t,variant:n,size:r="large",icon:i=G(_e,{height:"16px",width:"16px"}),onActionClick:o,actionLabel:a,isButtonRight:l})=>{let s=Mv;return"info-grey"===n?s=Dv:"success"===n?s=Nv:"warning"===n?s=Vv:"error"===n&&(s=jv),q("div",{css:[Rv(r,l),s],"aria-roledescription":"Note",children:[q("div",{children:[q("div",{css:Tv,children:[i,G("p",{css:Pv(r),children:e})]}),G("p",{css:_v(r),children:t})]}),a?G(Le,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===r?"default":"small",onClick:o}):null]})},Av=de`
|
|
3490
3513
|
height: 8px;
|
|
3491
3514
|
width: 100%;
|
|
3492
3515
|
background-color: ${we("neutral",300)};
|
|
3493
3516
|
display: flex;
|
|
3494
3517
|
align-items: center;
|
|
3495
3518
|
justify-content: flex-start;
|
|
3496
|
-
`,
|
|
3519
|
+
`,zv=e=>de`
|
|
3497
3520
|
height: 100%;
|
|
3498
3521
|
width: ${e}%;
|
|
3499
3522
|
background-color: ${we("primary",500)};
|
|
3500
3523
|
transition: width 0.5s ease-in-out;
|
|
3501
|
-
`,
|
|
3524
|
+
`,Hv=({progress:e})=>{let t=e;return t>100&&(t=100),t<0&&(t=0),G("div",{css:Av,role:"progressbar","aria-label":`Progress: ${t}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,children:G("div",{css:zv(t)})})},Bv=de`
|
|
3502
3525
|
width: 100%;
|
|
3503
3526
|
display: flex;
|
|
3504
3527
|
align-items: center;
|
|
3505
3528
|
justify-content: space-between;
|
|
3506
3529
|
position: relative;
|
|
3507
|
-
`,
|
|
3530
|
+
`,Fv=de`
|
|
3508
3531
|
height: 60px;
|
|
3509
3532
|
width: 80px;
|
|
3510
3533
|
display: flex;
|
|
3511
3534
|
flex-direction: column;
|
|
3512
3535
|
align-items: center;
|
|
3513
3536
|
justify-content: space-between;
|
|
3514
|
-
`,
|
|
3537
|
+
`,Zv=(e,t)=>de`
|
|
3515
3538
|
height: 32px;
|
|
3516
3539
|
width: 32px;
|
|
3517
3540
|
display: flex;
|
|
@@ -3547,12 +3570,12 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3547
3570
|
}
|
|
3548
3571
|
|
|
3549
3572
|
${t?`\n background-color: ${we("neutral",300)};\n \n &:hover {\n background-color: ${we("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3550
|
-
`,
|
|
3573
|
+
`,Wv=e=>de`
|
|
3551
3574
|
color: ${we("neutral",e?800:600)};
|
|
3552
3575
|
font-size: 14px;
|
|
3553
3576
|
line-height: 20px;
|
|
3554
3577
|
font-weight: 400;
|
|
3555
|
-
`,
|
|
3578
|
+
`,qv=de`
|
|
3556
3579
|
height: 1px;
|
|
3557
3580
|
width: 100%;
|
|
3558
3581
|
padding: 0 30px;
|
|
@@ -3560,11 +3583,11 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3560
3583
|
top: 16px;
|
|
3561
3584
|
left: 0;
|
|
3562
3585
|
z-index: -1;
|
|
3563
|
-
`,
|
|
3586
|
+
`,Gv=de`
|
|
3564
3587
|
height: 1px;
|
|
3565
3588
|
width: 100%;
|
|
3566
3589
|
background-color: ${we("neutral",400)};
|
|
3567
|
-
`,
|
|
3590
|
+
`,Uv=({steps:e,currentStep:t})=>q("div",{css:Bv,children:[e.map(((e,n)=>q("div",{css:Fv,children:[G("button",{css:Zv(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":`Current Step ${n}${e.label?` ${e.label}`:""}`,"data-active":t>=n+1,children:t>n+1?G(Te,{height:"16px",width:"16px"}):n+1}),e.label?G("p",{css:Wv(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),G("div",{css:qv,children:G("div",{css:Gv})})]}),Xv=de`
|
|
3568
3591
|
justify-content: space-between;
|
|
3569
3592
|
align-items: center;
|
|
3570
3593
|
gap: 8px;
|
|
@@ -3607,18 +3630,18 @@ function Ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3607
3630
|
color: ${we("error",900)};
|
|
3608
3631
|
}
|
|
3609
3632
|
}
|
|
3610
|
-
`,
|
|
3633
|
+
`,Yv=de`
|
|
3611
3634
|
font-size: 18px;
|
|
3612
3635
|
line-height: 28px;
|
|
3613
3636
|
font-weight: 400;
|
|
3614
3637
|
color: ${we("neutral",800)};
|
|
3615
|
-
`,
|
|
3638
|
+
`,Kv=de`
|
|
3616
3639
|
font-size: 16px;
|
|
3617
3640
|
line-height: 24px;
|
|
3618
3641
|
font-weight: 400;
|
|
3619
3642
|
color: ${we("neutral",700)};
|
|
3620
|
-
`,
|
|
3643
|
+
`,Jv=de`
|
|
3621
3644
|
padding: 6px;
|
|
3622
|
-
`,
|
|
3645
|
+
`,Qv=de`
|
|
3623
3646
|
padding: 6px;
|
|
3624
|
-
`,
|
|
3647
|
+
`,em={pauseOnPageIdle:!0,offsets:"24px"},tm={"top-start":B({placement:"top-start",...em}),"top-end":B({placement:"top-end",...em}),"bottom-start":B({placement:"bottom-start",...em}),"bottom-end":B({placement:"bottom-end",...em})},nm=e=>{tm[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},rm=()=>Object.keys(tm).map((e=>G(l,{children:G(F,{toaster:tm[e],insetInline:{mdDown:"4"},children:t=>q(Z.Root,{css:Xv,width:{md:"sm"},children:[q(W,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:G(_e,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?G(i,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:G(ze,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:G(He,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:G(Be,{color:"var(--chakra-colors-error-500)"}):null,q(W,{gap:"1",flex:"1",maxWidth:"100%",children:[G(Z.Title,{css:Yv,"aria-label":`${t.title}`,children:t.title}),t.description?G(Z.Title,{css:Kv,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?q(W,{flexDirection:"row",children:[t.action?G(Le,{css:Jv,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),tm[e].dismiss()}}):null,t.meta?.closable?G(Le,{css:Qv,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:G(Ne,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>tm[e].dismiss()}):null]}):null]})})},e)));export{Zl as AnalysisWidget,yv as Avatar,Ov as Badge,Ur as BaseMap,xg as Breadcrumb,Le as Button,At as Checkbox,Sn as CheckboxList,qt as CheckboxOptionCard,gt as CloseButton,Kr as ClusterPoint,Al as ExtendableCard,$g as Footer,ft as IconButton,Iv as InlineMessage,ur as InputWithUnits,dl as ItemCount,Ea as LayerGroup,La as LayerGroupContainer,Sa as LayerItem,_a as LayerParameters,Za as LegendItem,bl as List,$t as MapControlsToolbar,Yr as MapMarker,Qr as MapMarkers,ga as MapPopUp,Pt as Menu,Rg as MobileTabBar,Gs as Modal,jt as MultiActionButton,Jg as Navbar,iv as NavigationRail,Qt as OptionCard,kl as Pagination,ec as Panel,br as Password,Hv as ProgressBar,Qa as QualitativeAttribute,rn as Radio,on as RadioGroup,Lr as RadioList,ut as SSOButtons,al as ScaleBar,gv as Search,dr as Select,fg as Sheet,Jr as SimpleMapPin,fn as Slider,Pr as SliderInput,Uv as StepProgressIndicator,vn as Switch,pv as TabBar,Dl as Table,Vl as TableCell,Nl as TableRow,lr as Tag,In as TextInput,Ar as Textarea,rm as Toast,Ct as Toolbar,yt as Tooltip,ye as designSystemStyles,be as designSystemStylesForTailwind,we as getThemedColor,nm as showToast};
|