@strapi/plugin-users-permissions 0.0.0-next.eedb036f0a7ac282d2a645d8a40625091bd28b1e → 0.0.0-next.f09127d8df0234ad0b771b931b044b7c2e09c686

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.
Files changed (39) hide show
  1. package/admin/src/components/Permissions/PermissionRow/SubCategory.jsx +1 -1
  2. package/admin/src/pages/EmailTemplates/components/EmailTable.jsx +2 -2
  3. package/admin/src/pages/Roles/pages/ListPage/components/TableBody.jsx +1 -1
  4. package/dist/_chunks/{index-ZbIIl-VI.js → index-BP1KkpZq.js} +3 -4
  5. package/dist/_chunks/{index-ZbIIl-VI.js.map → index-BP1KkpZq.js.map} +1 -1
  6. package/dist/_chunks/{index-Cl7wdD8l.js → index-BnvtBuUS.js} +7 -8
  7. package/dist/_chunks/index-BnvtBuUS.js.map +1 -0
  8. package/dist/_chunks/{index-pmesAsoW.js → index-BphRo4l2.js} +22 -17
  9. package/dist/_chunks/{index-pmesAsoW.js.map → index-BphRo4l2.js.map} +1 -1
  10. package/dist/_chunks/{index-kMqoQ8VX.mjs → index-C_5QiATG.mjs} +5 -5
  11. package/dist/_chunks/index-C_5QiATG.mjs.map +1 -0
  12. package/dist/_chunks/{index-CQ0jOkIC-C4oUQUND.js → index-Cn5HftCc-CvJvlZwK.js} +204 -1117
  13. package/dist/_chunks/index-Cn5HftCc-CvJvlZwK.js.map +1 -0
  14. package/dist/_chunks/{index-CQ0jOkIC-DAZ1lfuF.mjs → index-Cn5HftCc-Dku5eOkP.mjs} +203 -1115
  15. package/dist/_chunks/index-Cn5HftCc-Dku5eOkP.mjs.map +1 -0
  16. package/dist/_chunks/{index-DNKYHd4J.mjs → index-Cxhs260c.mjs} +4 -4
  17. package/dist/_chunks/index-Cxhs260c.mjs.map +1 -0
  18. package/dist/_chunks/{index-Cyk9nN3J.mjs → index-D4Ge_-Bp.mjs} +2 -2
  19. package/dist/_chunks/{index-Cyk9nN3J.mjs.map → index-D4Ge_-Bp.mjs.map} +1 -1
  20. package/dist/_chunks/{index-C5MSODBR.mjs → index-D5yExFYc.mjs} +22 -17
  21. package/dist/_chunks/{index-C5MSODBR.mjs.map → index-D5yExFYc.mjs.map} +1 -1
  22. package/dist/_chunks/{index-zaVC_4Mw.mjs → index-D_J3MMcj.mjs} +3 -3
  23. package/dist/_chunks/{index-zaVC_4Mw.mjs.map → index-D_J3MMcj.mjs.map} +1 -1
  24. package/dist/_chunks/{index-BtapqMRC.js → index-DoogNdMf.js} +8 -9
  25. package/dist/_chunks/{index-BtapqMRC.js.map → index-DoogNdMf.js.map} +1 -1
  26. package/dist/_chunks/{index-D_1N-X9K.js → index-iJPHXbGD.js} +5 -6
  27. package/dist/_chunks/index-iJPHXbGD.js.map +1 -0
  28. package/dist/admin/index.js +1 -1
  29. package/dist/admin/index.mjs +1 -1
  30. package/package.json +7 -7
  31. package/server/graphql/types/index.js +1 -0
  32. package/server/graphql/types/me.js +1 -0
  33. package/server/graphql/types/user-input.js +20 -0
  34. package/dist/_chunks/index-CQ0jOkIC-C4oUQUND.js.map +0 -1
  35. package/dist/_chunks/index-CQ0jOkIC-DAZ1lfuF.mjs.map +0 -1
  36. package/dist/_chunks/index-Cl7wdD8l.js.map +0 -1
  37. package/dist/_chunks/index-DNKYHd4J.mjs.map +0 -1
  38. package/dist/_chunks/index-D_1N-X9K.js.map +0 -1
  39. package/dist/_chunks/index-kMqoQ8VX.mjs.map +0 -1
@@ -10,6 +10,7 @@ import { useCallback, useMemo, useDebugValue, useState, useEffect, useRef, useLa
10
10
  import { useIntl } from "react-intl";
11
11
  import { ArrowLeft, Eye, EyeStriked, WarningCircle, Filter, CaretDown } from "@strapi/icons";
12
12
  import "@strapi/icons/symbols";
13
+ import "lodash/trimEnd";
13
14
  import createNextState2, { enableES5, isDraftable, isDraft, enablePatches, applyPatches, produceWithPatches, original, produce } from "immer";
14
15
  import { shallowEqual, batch, useDispatch, useSelector, useStore } from "react-redux";
15
16
  import pipe from "lodash/fp/pipe";
@@ -32,8 +33,7 @@ function getDefaultExportFromCjs(x) {
32
33
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
33
34
  }
34
35
  function getAugmentedNamespace(n) {
35
- if (n.__esModule)
36
- return n;
36
+ if (n.__esModule) return n;
37
37
  var f2 = n.default;
38
38
  if (typeof f2 == "function") {
39
39
  var a2 = function a3() {
@@ -43,8 +43,7 @@ function getAugmentedNamespace(n) {
43
43
  return f2.apply(this, arguments);
44
44
  };
45
45
  a2.prototype = f2.prototype;
46
- } else
47
- a2 = {};
46
+ } else a2 = {};
48
47
  Object.defineProperty(a2, "__esModule", { value: true });
49
48
  Object.keys(n).forEach(function(k) {
50
49
  var d2 = Object.getOwnPropertyDescriptor(n, k);
@@ -127,11 +126,12 @@ var hasSymbols$1 = function hasNativeSymbols() {
127
126
  return hasSymbolSham();
128
127
  };
129
128
  var test$1 = {
129
+ __proto__: null,
130
130
  foo: {}
131
131
  };
132
132
  var $Object = Object;
133
133
  var hasProto$1 = function hasProto() {
134
- return { __proto__: test$1 }.foo === test$1.foo && !({ __proto__: null } instanceof $Object);
134
+ return { __proto__: test$1 }.foo === test$1.foo && !(test$1 instanceof $Object);
135
135
  };
136
136
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
137
137
  var toStr$1 = Object.prototype.toString;
@@ -518,8 +518,7 @@ var callBind$1 = { exports: {} };
518
518
  var esDefineProperty;
519
519
  var hasRequiredEsDefineProperty;
520
520
  function requireEsDefineProperty() {
521
- if (hasRequiredEsDefineProperty)
522
- return esDefineProperty;
521
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
523
522
  hasRequiredEsDefineProperty = 1;
524
523
  var GetIntrinsic3 = getIntrinsic;
525
524
  var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
@@ -1988,8 +1987,7 @@ var ActionTypes = {
1988
1987
  }
1989
1988
  };
1990
1989
  function isPlainObject$3(obj) {
1991
- if (typeof obj !== "object" || obj === null)
1992
- return false;
1990
+ if (typeof obj !== "object" || obj === null) return false;
1993
1991
  var proto = obj;
1994
1992
  while (Object.getPrototypeOf(proto) !== null) {
1995
1993
  proto = Object.getPrototypeOf(proto);
@@ -1997,10 +1995,8 @@ function isPlainObject$3(obj) {
1997
1995
  return Object.getPrototypeOf(obj) === proto;
1998
1996
  }
1999
1997
  function miniKindOf(val) {
2000
- if (val === void 0)
2001
- return "undefined";
2002
- if (val === null)
2003
- return "null";
1998
+ if (val === void 0) return "undefined";
1999
+ if (val === null) return "null";
2004
2000
  var type2 = typeof val;
2005
2001
  switch (type2) {
2006
2002
  case "boolean":
@@ -2011,12 +2007,9 @@ function miniKindOf(val) {
2011
2007
  return type2;
2012
2008
  }
2013
2009
  }
2014
- if (Array.isArray(val))
2015
- return "array";
2016
- if (isDate$1(val))
2017
- return "date";
2018
- if (isError(val))
2019
- return "error";
2010
+ if (Array.isArray(val)) return "array";
2011
+ if (isDate$1(val)) return "date";
2012
+ if (isError(val)) return "error";
2020
2013
  var constructorName = ctorName(val);
2021
2014
  switch (constructorName) {
2022
2015
  case "Symbol":
@@ -2036,8 +2029,7 @@ function isError(val) {
2036
2029
  return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
2037
2030
  }
2038
2031
  function isDate$1(val) {
2039
- if (val instanceof Date)
2040
- return true;
2032
+ if (val instanceof Date) return true;
2041
2033
  return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
2042
2034
  }
2043
2035
  function kindOf$1(val) {
@@ -2071,8 +2063,7 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une
2071
2063
  unexpectedKeys.forEach(function(key) {
2072
2064
  unexpectedKeyCache[key] = true;
2073
2065
  });
2074
- if (action && action.type === ActionTypes.REPLACE)
2075
- return;
2066
+ if (action && action.type === ActionTypes.REPLACE) return;
2076
2067
  if (unexpectedKeys.length > 0) {
2077
2068
  return "Unexpected " + (unexpectedKeys.length > 1 ? "keys" : "key") + " " + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
2078
2069
  }
@@ -2332,9 +2323,7 @@ var __extends = /* @__PURE__ */ function() {
2332
2323
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b2) {
2333
2324
  d3.__proto__ = b2;
2334
2325
  } || function(d3, b2) {
2335
- for (var p in b2)
2336
- if (Object.prototype.hasOwnProperty.call(b2, p))
2337
- d3[p] = b2[p];
2326
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d3[p] = b2[p];
2338
2327
  };
2339
2328
  return extendStatics(d2, b);
2340
2329
  };
@@ -2350,8 +2339,7 @@ var __extends = /* @__PURE__ */ function() {
2350
2339
  }();
2351
2340
  var __generator$1 = function(thisArg, body) {
2352
2341
  var _ = { label: 0, sent: function() {
2353
- if (t[0] & 1)
2354
- throw t[1];
2342
+ if (t[0] & 1) throw t[1];
2355
2343
  return t[1];
2356
2344
  }, trys: [], ops: [] }, f2, y, t, g;
2357
2345
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
@@ -2363,64 +2351,58 @@ var __generator$1 = function(thisArg, body) {
2363
2351
  };
2364
2352
  }
2365
2353
  function step(op) {
2366
- if (f2)
2367
- throw new TypeError("Generator is already executing.");
2368
- while (_)
2369
- try {
2370
- if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
2371
- return t;
2372
- if (y = 0, t)
2373
- op = [op[0] & 2, t.value];
2374
- switch (op[0]) {
2375
- case 0:
2376
- case 1:
2354
+ if (f2) throw new TypeError("Generator is already executing.");
2355
+ while (_) try {
2356
+ if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2357
+ if (y = 0, t) op = [op[0] & 2, t.value];
2358
+ switch (op[0]) {
2359
+ case 0:
2360
+ case 1:
2361
+ t = op;
2362
+ break;
2363
+ case 4:
2364
+ _.label++;
2365
+ return { value: op[1], done: false };
2366
+ case 5:
2367
+ _.label++;
2368
+ y = op[1];
2369
+ op = [0];
2370
+ continue;
2371
+ case 7:
2372
+ op = _.ops.pop();
2373
+ _.trys.pop();
2374
+ continue;
2375
+ default:
2376
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2377
+ _ = 0;
2378
+ continue;
2379
+ }
2380
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2381
+ _.label = op[1];
2382
+ break;
2383
+ }
2384
+ if (op[0] === 6 && _.label < t[1]) {
2385
+ _.label = t[1];
2377
2386
  t = op;
2378
2387
  break;
2379
- case 4:
2380
- _.label++;
2381
- return { value: op[1], done: false };
2382
- case 5:
2383
- _.label++;
2384
- y = op[1];
2385
- op = [0];
2386
- continue;
2387
- case 7:
2388
- op = _.ops.pop();
2389
- _.trys.pop();
2390
- continue;
2391
- default:
2392
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2393
- _ = 0;
2394
- continue;
2395
- }
2396
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2397
- _.label = op[1];
2398
- break;
2399
- }
2400
- if (op[0] === 6 && _.label < t[1]) {
2401
- _.label = t[1];
2402
- t = op;
2403
- break;
2404
- }
2405
- if (t && _.label < t[2]) {
2406
- _.label = t[2];
2407
- _.ops.push(op);
2408
- break;
2409
- }
2410
- if (t[2])
2411
- _.ops.pop();
2412
- _.trys.pop();
2413
- continue;
2414
- }
2415
- op = body.call(thisArg, _);
2416
- } catch (e) {
2417
- op = [6, e];
2418
- y = 0;
2419
- } finally {
2420
- f2 = t = 0;
2388
+ }
2389
+ if (t && _.label < t[2]) {
2390
+ _.label = t[2];
2391
+ _.ops.push(op);
2392
+ break;
2393
+ }
2394
+ if (t[2]) _.ops.pop();
2395
+ _.trys.pop();
2396
+ continue;
2421
2397
  }
2422
- if (op[0] & 5)
2423
- throw op[1];
2398
+ op = body.call(thisArg, _);
2399
+ } catch (e) {
2400
+ op = [6, e];
2401
+ y = 0;
2402
+ } finally {
2403
+ f2 = t = 0;
2404
+ }
2405
+ if (op[0] & 5) throw op[1];
2424
2406
  return { value: op[0] ? op[1] : void 0, done: true };
2425
2407
  }
2426
2408
  };
@@ -2931,8 +2913,7 @@ var createAsyncThunk = function() {
2931
2913
  case 0:
2932
2914
  _c.trys.push([0, 4, , 5]);
2933
2915
  conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState, extra });
2934
- if (!isThenable$1(conditionResult))
2935
- return [3, 2];
2916
+ if (!isThenable$1(conditionResult)) return [3, 2];
2936
2917
  return [4, conditionResult];
2937
2918
  case 1:
2938
2919
  conditionResult = _c.sent();
@@ -3201,8 +3182,7 @@ typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "un
3201
3182
  enableES5();
3202
3183
  var __generator = function(thisArg, body) {
3203
3184
  var _ = { label: 0, sent: function() {
3204
- if (t[0] & 1)
3205
- throw t[1];
3185
+ if (t[0] & 1) throw t[1];
3206
3186
  return t[1];
3207
3187
  }, trys: [], ops: [] }, f2, y, t, g;
3208
3188
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
@@ -3214,64 +3194,58 @@ var __generator = function(thisArg, body) {
3214
3194
  };
3215
3195
  }
3216
3196
  function step(op) {
3217
- if (f2)
3218
- throw new TypeError("Generator is already executing.");
3219
- while (_)
3220
- try {
3221
- if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
3222
- return t;
3223
- if (y = 0, t)
3224
- op = [op[0] & 2, t.value];
3225
- switch (op[0]) {
3226
- case 0:
3227
- case 1:
3197
+ if (f2) throw new TypeError("Generator is already executing.");
3198
+ while (_) try {
3199
+ if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
3200
+ if (y = 0, t) op = [op[0] & 2, t.value];
3201
+ switch (op[0]) {
3202
+ case 0:
3203
+ case 1:
3204
+ t = op;
3205
+ break;
3206
+ case 4:
3207
+ _.label++;
3208
+ return { value: op[1], done: false };
3209
+ case 5:
3210
+ _.label++;
3211
+ y = op[1];
3212
+ op = [0];
3213
+ continue;
3214
+ case 7:
3215
+ op = _.ops.pop();
3216
+ _.trys.pop();
3217
+ continue;
3218
+ default:
3219
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3220
+ _ = 0;
3221
+ continue;
3222
+ }
3223
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
3224
+ _.label = op[1];
3225
+ break;
3226
+ }
3227
+ if (op[0] === 6 && _.label < t[1]) {
3228
+ _.label = t[1];
3228
3229
  t = op;
3229
3230
  break;
3230
- case 4:
3231
- _.label++;
3232
- return { value: op[1], done: false };
3233
- case 5:
3234
- _.label++;
3235
- y = op[1];
3236
- op = [0];
3237
- continue;
3238
- case 7:
3239
- op = _.ops.pop();
3240
- _.trys.pop();
3241
- continue;
3242
- default:
3243
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3244
- _ = 0;
3245
- continue;
3246
- }
3247
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
3248
- _.label = op[1];
3249
- break;
3250
- }
3251
- if (op[0] === 6 && _.label < t[1]) {
3252
- _.label = t[1];
3253
- t = op;
3254
- break;
3255
- }
3256
- if (t && _.label < t[2]) {
3257
- _.label = t[2];
3258
- _.ops.push(op);
3259
- break;
3260
- }
3261
- if (t[2])
3262
- _.ops.pop();
3263
- _.trys.pop();
3264
- continue;
3265
- }
3266
- op = body.call(thisArg, _);
3267
- } catch (e) {
3268
- op = [6, e];
3269
- y = 0;
3270
- } finally {
3271
- f2 = t = 0;
3231
+ }
3232
+ if (t && _.label < t[2]) {
3233
+ _.label = t[2];
3234
+ _.ops.push(op);
3235
+ break;
3236
+ }
3237
+ if (t[2]) _.ops.pop();
3238
+ _.trys.pop();
3239
+ continue;
3272
3240
  }
3273
- if (op[0] & 5)
3274
- throw op[1];
3241
+ op = body.call(thisArg, _);
3242
+ } catch (e) {
3243
+ op = [6, e];
3244
+ y = 0;
3245
+ } finally {
3246
+ f2 = t = 0;
3247
+ }
3248
+ if (op[0] & 5) throw op[1];
3275
3249
  return { value: op[0] ? op[1] : void 0, done: true };
3276
3250
  }
3277
3251
  };
@@ -3737,13 +3711,11 @@ function buildThunks(_j) {
3737
3711
  forced: arg.type === "query" ? isForcedQuery(arg, getState()) : void 0
3738
3712
  };
3739
3713
  forceQueryFn = arg.type === "query" ? arg[forceQueryFnSymbol] : void 0;
3740
- if (!forceQueryFn)
3741
- return [3, 2];
3714
+ if (!forceQueryFn) return [3, 2];
3742
3715
  result = forceQueryFn();
3743
3716
  return [3, 6];
3744
3717
  case 2:
3745
- if (!endpointDefinition.query)
3746
- return [3, 4];
3718
+ if (!endpointDefinition.query) return [3, 4];
3747
3719
  return [4, baseQuery(endpointDefinition.query(arg.originalArgs), baseQueryApi_1, endpointDefinition.extraOptions)];
3748
3720
  case 3:
3749
3721
  result = _r.sent();
@@ -3795,8 +3767,7 @@ function buildThunks(_j) {
3795
3767
  case 8:
3796
3768
  error_1 = _r.sent();
3797
3769
  catchedError = error_1;
3798
- if (!(catchedError instanceof HandledError))
3799
- return [3, 12];
3770
+ if (!(catchedError instanceof HandledError)) return [3, 12];
3800
3771
  transformErrorResponse = defaultTransformResponse;
3801
3772
  if (endpointDefinition.query && endpointDefinition.transformErrorResponse) {
3802
3773
  transformErrorResponse = endpointDefinition.transformErrorResponse;
@@ -4035,8 +4006,7 @@ function buildSlice(_j) {
4035
4006
  }).addCase(queryThunk.rejected, function(draft, _j2) {
4036
4007
  var _k2 = _j2.meta, condition = _k2.condition, arg = _k2.arg, requestId = _k2.requestId, error = _j2.error, payload = _j2.payload;
4037
4008
  updateQuerySubstateIfExists(draft, arg.queryCacheKey, function(substate) {
4038
- if (condition)
4039
- ;
4009
+ if (condition) ;
4040
4010
  else {
4041
4011
  if (substate.requestId !== requestId)
4042
4012
  return;
@@ -5661,6 +5631,9 @@ const getFetchClient = (defaultOptions = {}) => {
5661
5631
  };
5662
5632
  const paramsSerializer = (params) => (url) => {
5663
5633
  if (params) {
5634
+ if (typeof params === "string") {
5635
+ return `${url}?${params}`;
5636
+ }
5664
5637
  const serializedParams = qs__default.stringify(params, { encode: false });
5665
5638
  return `${url}?${serializedParams}`;
5666
5639
  }
@@ -5980,8 +5953,7 @@ function findKey(obj, key) {
5980
5953
  return null;
5981
5954
  }
5982
5955
  const _global = (() => {
5983
- if (typeof globalThis !== "undefined")
5984
- return globalThis;
5956
+ if (typeof globalThis !== "undefined") return globalThis;
5985
5957
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
5986
5958
  })();
5987
5959
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
@@ -6035,8 +6007,7 @@ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
6035
6007
  let prop;
6036
6008
  const merged = {};
6037
6009
  destObj = destObj || {};
6038
- if (sourceObj == null)
6039
- return destObj;
6010
+ if (sourceObj == null) return destObj;
6040
6011
  do {
6041
6012
  props = Object.getOwnPropertyNames(sourceObj);
6042
6013
  i = props.length;
@@ -6061,13 +6032,10 @@ const endsWith = (str, searchString, position) => {
6061
6032
  return lastIndex !== -1 && lastIndex === position;
6062
6033
  };
6063
6034
  const toArray = (thing) => {
6064
- if (!thing)
6065
- return null;
6066
- if (isArray(thing))
6067
- return thing;
6035
+ if (!thing) return null;
6036
+ if (isArray(thing)) return thing;
6068
6037
  let i = thing.length;
6069
- if (!isNumber(i))
6070
- return null;
6038
+ if (!isNumber(i)) return null;
6071
6039
  const arr = new Array(i);
6072
6040
  while (i-- > 0) {
6073
6041
  arr[i] = thing[i];
@@ -6124,8 +6092,7 @@ const freezeMethods = (obj) => {
6124
6092
  return false;
6125
6093
  }
6126
6094
  const value = obj[name];
6127
- if (!isFunction(value))
6128
- return;
6095
+ if (!isFunction(value)) return;
6129
6096
  descriptor.enumerable = false;
6130
6097
  if ("writable" in descriptor) {
6131
6098
  descriptor.writable = false;
@@ -6352,8 +6319,7 @@ function removeBrackets(key) {
6352
6319
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
6353
6320
  }
6354
6321
  function renderKey(path, key, dots) {
6355
- if (!path)
6356
- return key;
6322
+ if (!path) return key;
6357
6323
  return path.concat(key).map(function each(token, i) {
6358
6324
  token = removeBrackets(token);
6359
6325
  return !dots && i ? "[" + token + "]" : token;
@@ -6387,8 +6353,7 @@ function toFormData(obj, formData, options) {
6387
6353
  throw new TypeError("visitor must be a function");
6388
6354
  }
6389
6355
  function convertValue(value) {
6390
- if (value === null)
6391
- return "";
6356
+ if (value === null) return "";
6392
6357
  if (utils$1.isDate(value)) {
6393
6358
  return value.toISOString();
6394
6359
  }
@@ -6431,8 +6396,7 @@ function toFormData(obj, formData, options) {
6431
6396
  isVisitable
6432
6397
  });
6433
6398
  function build(value, path) {
6434
- if (utils$1.isUndefined(value))
6435
- return;
6399
+ if (utils$1.isUndefined(value)) return;
6436
6400
  if (stack.indexOf(value) !== -1) {
6437
6401
  throw Error("Circular reference detected in " + path.join("."));
6438
6402
  }
@@ -6640,8 +6604,7 @@ function arrayToObject2(arr) {
6640
6604
  function formDataToJSON(formData) {
6641
6605
  function buildPath(path, value, target, index) {
6642
6606
  let name = path[index++];
6643
- if (name === "__proto__")
6644
- return true;
6607
+ if (name === "__proto__") return true;
6645
6608
  const isNumericKey = Number.isFinite(+name);
6646
6609
  const isLast = index >= path.length;
6647
6610
  name = !name && utils$1.isArray(target) ? target.length : name;
@@ -6682,7 +6645,7 @@ function stringifySafely(rawValue, parser, encoder) {
6682
6645
  }
6683
6646
  }
6684
6647
  }
6685
- return (encoder || JSON.stringify)(rawValue);
6648
+ return (0, JSON.stringify)(rawValue);
6686
6649
  }
6687
6650
  const defaults = {
6688
6651
  transitional: transitionalDefaults,
@@ -6847,8 +6810,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
6847
6810
  if (isHeaderNameFilter) {
6848
6811
  value = header;
6849
6812
  }
6850
- if (!utils$1.isString(value))
6851
- return;
6813
+ if (!utils$1.isString(value)) return;
6852
6814
  if (utils$1.isString(filter2)) {
6853
6815
  return value.indexOf(filter2) !== -1;
6854
6816
  }
@@ -7526,7 +7488,7 @@ const composeSignals = (signals, timeout) => {
7526
7488
  };
7527
7489
  const streamChunk = function* (chunk, chunkSize) {
7528
7490
  let len = chunk.byteLength;
7529
- if (!chunkSize || len < chunkSize) {
7491
+ if (len < chunkSize) {
7530
7492
  yield chunk;
7531
7493
  return;
7532
7494
  }
@@ -8065,8 +8027,7 @@ class CancelToken {
8065
8027
  });
8066
8028
  const token = this;
8067
8029
  this.promise.then((cancel) => {
8068
- if (!token._listeners)
8069
- return;
8030
+ if (!token._listeners) return;
8070
8031
  let i = token._listeners.length;
8071
8032
  while (i-- > 0) {
8072
8033
  token._listeners[i](cancel);
@@ -8260,41 +8221,32 @@ var scheduler_production_min = {};
8260
8221
  */
8261
8222
  var hasRequiredScheduler_production_min;
8262
8223
  function requireScheduler_production_min() {
8263
- if (hasRequiredScheduler_production_min)
8264
- return scheduler_production_min;
8224
+ if (hasRequiredScheduler_production_min) return scheduler_production_min;
8265
8225
  hasRequiredScheduler_production_min = 1;
8266
8226
  (function(exports) {
8267
8227
  function f2(a2, b) {
8268
8228
  var c = a2.length;
8269
8229
  a2.push(b);
8270
- a:
8271
- for (; 0 < c; ) {
8272
- var d2 = c - 1 >>> 1, e = a2[d2];
8273
- if (0 < g(e, b))
8274
- a2[d2] = b, a2[c] = e, c = d2;
8275
- else
8276
- break a;
8277
- }
8230
+ a: for (; 0 < c; ) {
8231
+ var d2 = c - 1 >>> 1, e = a2[d2];
8232
+ if (0 < g(e, b)) a2[d2] = b, a2[c] = e, c = d2;
8233
+ else break a;
8234
+ }
8278
8235
  }
8279
8236
  function h2(a2) {
8280
8237
  return 0 === a2.length ? null : a2[0];
8281
8238
  }
8282
8239
  function k(a2) {
8283
- if (0 === a2.length)
8284
- return null;
8240
+ if (0 === a2.length) return null;
8285
8241
  var b = a2[0], c = a2.pop();
8286
8242
  if (c !== b) {
8287
8243
  a2[0] = c;
8288
- a:
8289
- for (var d2 = 0, e = a2.length, w = e >>> 1; d2 < w; ) {
8290
- var m = 2 * (d2 + 1) - 1, C = a2[m], n = m + 1, x = a2[n];
8291
- if (0 > g(C, c))
8292
- n < e && 0 > g(x, C) ? (a2[d2] = x, a2[n] = c, d2 = n) : (a2[d2] = C, a2[m] = c, d2 = m);
8293
- else if (n < e && 0 > g(x, c))
8294
- a2[d2] = x, a2[n] = c, d2 = n;
8295
- else
8296
- break a;
8297
- }
8244
+ a: for (var d2 = 0, e = a2.length, w = e >>> 1; d2 < w; ) {
8245
+ var m = 2 * (d2 + 1) - 1, C = a2[m], n = m + 1, x = a2[n];
8246
+ if (0 > g(C, c)) n < e && 0 > g(x, C) ? (a2[d2] = x, a2[n] = c, d2 = n) : (a2[d2] = C, a2[m] = c, d2 = m);
8247
+ else if (n < e && 0 > g(x, c)) a2[d2] = x, a2[n] = c, d2 = n;
8248
+ else break a;
8249
+ }
8298
8250
  }
8299
8251
  return b;
8300
8252
  }
@@ -8317,25 +8269,20 @@ function requireScheduler_production_min() {
8317
8269
  "undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
8318
8270
  function G(a2) {
8319
8271
  for (var b = h2(t); null !== b; ) {
8320
- if (null === b.callback)
8321
- k(t);
8322
- else if (b.startTime <= a2)
8323
- k(t), b.sortIndex = b.expirationTime, f2(r, b);
8324
- else
8325
- break;
8272
+ if (null === b.callback) k(t);
8273
+ else if (b.startTime <= a2) k(t), b.sortIndex = b.expirationTime, f2(r, b);
8274
+ else break;
8326
8275
  b = h2(t);
8327
8276
  }
8328
8277
  }
8329
8278
  function H(a2) {
8330
8279
  B = false;
8331
8280
  G(a2);
8332
- if (!A)
8333
- if (null !== h2(r))
8334
- A = true, I(J);
8335
- else {
8336
- var b = h2(t);
8337
- null !== b && K(H, b.startTime - a2);
8338
- }
8281
+ if (!A) if (null !== h2(r)) A = true, I(J);
8282
+ else {
8283
+ var b = h2(t);
8284
+ null !== b && K(H, b.startTime - a2);
8285
+ }
8339
8286
  }
8340
8287
  function J(a2, b) {
8341
8288
  A = false;
@@ -8353,12 +8300,10 @@ function requireScheduler_production_min() {
8353
8300
  b = exports.unstable_now();
8354
8301
  "function" === typeof e ? v2.callback = e : v2 === h2(r) && k(r);
8355
8302
  G(b);
8356
- } else
8357
- k(r);
8303
+ } else k(r);
8358
8304
  v2 = h2(r);
8359
8305
  }
8360
- if (null !== v2)
8361
- var w = true;
8306
+ if (null !== v2) var w = true;
8362
8307
  else {
8363
8308
  var m = h2(t);
8364
8309
  null !== m && K(H, m.startTime - b);
@@ -8383,24 +8328,21 @@ function requireScheduler_production_min() {
8383
8328
  } finally {
8384
8329
  b ? S() : (N = false, O = null);
8385
8330
  }
8386
- } else
8387
- N = false;
8331
+ } else N = false;
8388
8332
  }
8389
8333
  var S;
8390
- if ("function" === typeof F)
8391
- S = function() {
8392
- F(R);
8393
- };
8334
+ if ("function" === typeof F) S = function() {
8335
+ F(R);
8336
+ };
8394
8337
  else if ("undefined" !== typeof MessageChannel) {
8395
8338
  var T = new MessageChannel(), U = T.port2;
8396
8339
  T.port1.onmessage = R;
8397
8340
  S = function() {
8398
8341
  U.postMessage(null);
8399
8342
  };
8400
- } else
8401
- S = function() {
8402
- D(R, 0);
8403
- };
8343
+ } else S = function() {
8344
+ D(R, 0);
8345
+ };
8404
8346
  function I(a2) {
8405
8347
  O = a2;
8406
8348
  N || (N = true, S());
@@ -8524,8 +8466,7 @@ var scheduler_development = {};
8524
8466
  */
8525
8467
  var hasRequiredScheduler_development;
8526
8468
  function requireScheduler_development() {
8527
- if (hasRequiredScheduler_development)
8528
- return scheduler_development;
8469
+ if (hasRequiredScheduler_development) return scheduler_development;
8529
8470
  hasRequiredScheduler_development = 1;
8530
8471
  (function(exports) {
8531
8472
  if (process.env.NODE_ENV !== "production") {
@@ -8680,8 +8621,7 @@ function requireScheduler_development() {
8680
8621
  var previousPriorityLevel = currentPriorityLevel;
8681
8622
  try {
8682
8623
  var currentTime;
8683
- if (enableProfiling)
8684
- ;
8624
+ if (enableProfiling) ;
8685
8625
  else {
8686
8626
  return workLoop(hasTimeRemaining, initialTime2);
8687
8627
  }
@@ -9004,19 +8944,14 @@ function E(r) {
9004
8944
  }
9005
8945
  function h(e, n) {
9006
8946
  const o = useContext(e)[d];
9007
- if ("object" == typeof process && "production" !== process.env.NODE_ENV && !o)
9008
- throw new Error("useContextSelector requires special context");
8947
+ if ("object" == typeof process && "production" !== process.env.NODE_ENV && !o) throw new Error("useContextSelector requires special context");
9009
8948
  const { v: { current: c }, n: { current: u }, l: s } = o, i = n(c), [p, l] = useReducer((e2, r) => {
9010
- if (!r)
9011
- return [c, i];
9012
- if ("p" in r)
9013
- throw r.p;
9014
- if (r.n === u)
9015
- return Object.is(e2[1], i) ? e2 : [c, i];
8949
+ if (!r) return [c, i];
8950
+ if ("p" in r) throw r.p;
8951
+ if (r.n === u) return Object.is(e2[1], i) ? e2 : [c, i];
9016
8952
  try {
9017
8953
  if ("v" in r) {
9018
- if (Object.is(e2[0], r.v))
9019
- return e2;
8954
+ if (Object.is(e2[0], r.v)) return e2;
9020
8955
  const t = n(r.v);
9021
8956
  return Object.is(e2[1], t) ? e2 : [r.v, t];
9022
8957
  }
@@ -9567,869 +9502,6 @@ function generateNKeysBetween(a2, b, n, digits = BASE_62_DIGITS) {
9567
9502
  return [generateKeyBetween(a2, b, digits)];
9568
9503
  }
9569
9504
  }
9570
- function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
9571
- return amount - numerator * Math.floor(amount / numerator);
9572
- }
9573
- const $3b62074eb05584b2$var$EPOCH = 1721426;
9574
- function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
9575
- year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
9576
- let y1 = year - 1;
9577
- let monthOffset = -2;
9578
- if (month <= 2)
9579
- monthOffset = 0;
9580
- else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
9581
- monthOffset = -1;
9582
- return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
9583
- }
9584
- function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
9585
- return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
9586
- }
9587
- function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
9588
- return era === "BC" ? 1 - year : year;
9589
- }
9590
- function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
9591
- let era = "AD";
9592
- if (year <= 0) {
9593
- era = "BC";
9594
- year = 1 - year;
9595
- }
9596
- return [
9597
- era,
9598
- year
9599
- ];
9600
- }
9601
- const $3b62074eb05584b2$var$daysInMonth = {
9602
- standard: [
9603
- 31,
9604
- 28,
9605
- 31,
9606
- 30,
9607
- 31,
9608
- 30,
9609
- 31,
9610
- 31,
9611
- 30,
9612
- 31,
9613
- 30,
9614
- 31
9615
- ],
9616
- leapyear: [
9617
- 31,
9618
- 29,
9619
- 31,
9620
- 30,
9621
- 31,
9622
- 30,
9623
- 31,
9624
- 31,
9625
- 30,
9626
- 31,
9627
- 30,
9628
- 31
9629
- ]
9630
- };
9631
- class $3b62074eb05584b2$export$80ee6245ec4f29ec {
9632
- fromJulianDay(jd) {
9633
- let jd0 = jd;
9634
- let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
9635
- let quadricent = Math.floor(depoch / 146097);
9636
- let dqc = $2b4dce13dd5a17fa$export$842a2cf37af977e1(depoch, 146097);
9637
- let cent = Math.floor(dqc / 36524);
9638
- let dcent = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dqc, 36524);
9639
- let quad = Math.floor(dcent / 1461);
9640
- let dquad = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dcent, 1461);
9641
- let yindex = Math.floor(dquad / 365);
9642
- let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
9643
- let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
9644
- let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
9645
- let leapAdj = 2;
9646
- if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1))
9647
- leapAdj = 0;
9648
- else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
9649
- leapAdj = 1;
9650
- let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
9651
- let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
9652
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era, year, month, day);
9653
- }
9654
- toJulianDay(date) {
9655
- return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
9656
- }
9657
- getDaysInMonth(date) {
9658
- return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
9659
- }
9660
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9661
- getMonthsInYear(date) {
9662
- return 12;
9663
- }
9664
- getDaysInYear(date) {
9665
- return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
9666
- }
9667
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9668
- getYearsInEra(date) {
9669
- return 9999;
9670
- }
9671
- getEras() {
9672
- return [
9673
- "BC",
9674
- "AD"
9675
- ];
9676
- }
9677
- isInverseEra(date) {
9678
- return date.era === "BC";
9679
- }
9680
- balanceDate(date) {
9681
- if (date.year <= 0) {
9682
- date.era = date.era === "BC" ? "AD" : "BC";
9683
- date.year = 1 - date.year;
9684
- }
9685
- }
9686
- constructor() {
9687
- this.identifier = "gregory";
9688
- }
9689
- }
9690
- function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a2, b) {
9691
- return a2.calendar.toJulianDay(a2) - b.calendar.toJulianDay(b);
9692
- }
9693
- function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a2, b) {
9694
- return $14e0f24ef4ac5c92$var$timeToMs(a2) - $14e0f24ef4ac5c92$var$timeToMs(b);
9695
- }
9696
- function $14e0f24ef4ac5c92$var$timeToMs(a2) {
9697
- return a2.hour * 36e5 + a2.minute * 6e4 + a2.second * 1e3 + a2.millisecond;
9698
- }
9699
- let $14e0f24ef4ac5c92$var$localTimeZone = null;
9700
- function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
9701
- if ($14e0f24ef4ac5c92$var$localTimeZone == null)
9702
- $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
9703
- return $14e0f24ef4ac5c92$var$localTimeZone;
9704
- }
9705
- function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
9706
- date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
9707
- let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era, date.year);
9708
- return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
9709
- }
9710
- function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
9711
- let date = /* @__PURE__ */ new Date();
9712
- date.setUTCHours(hour, minute, second, millisecond);
9713
- date.setUTCFullYear(year, month - 1, day);
9714
- return date.getTime();
9715
- }
9716
- function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
9717
- if (timeZone === "UTC")
9718
- return 0;
9719
- if (ms > 0 && timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2())
9720
- return new Date(ms).getTimezoneOffset() * -6e4;
9721
- let { year, month, day, hour, minute, second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
9722
- let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
9723
- return utc - Math.floor(ms / 1e3) * 1e3;
9724
- }
9725
- const $11d87f3f76e88657$var$formattersByTimeZone = /* @__PURE__ */ new Map();
9726
- function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
9727
- let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
9728
- if (!formatter) {
9729
- formatter = new Intl.DateTimeFormat("en-US", {
9730
- timeZone,
9731
- hour12: false,
9732
- era: "short",
9733
- year: "numeric",
9734
- month: "numeric",
9735
- day: "numeric",
9736
- hour: "numeric",
9737
- minute: "numeric",
9738
- second: "numeric"
9739
- });
9740
- $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
9741
- }
9742
- let parts = formatter.formatToParts(new Date(ms));
9743
- let namedParts = {};
9744
- for (let part of parts)
9745
- if (part.type !== "literal")
9746
- namedParts[part.type] = part.value;
9747
- return {
9748
- // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
9749
- year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
9750
- month: +namedParts.month,
9751
- day: +namedParts.day,
9752
- hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
9753
- minute: +namedParts.minute,
9754
- second: +namedParts.second
9755
- };
9756
- }
9757
- const $11d87f3f76e88657$var$DAYMILLIS = 864e5;
9758
- function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
9759
- let found = earlier === later ? [
9760
- earlier
9761
- ] : [
9762
- earlier,
9763
- later
9764
- ];
9765
- return found.filter((absolute) => $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
9766
- }
9767
- function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
9768
- let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
9769
- return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
9770
- }
9771
- function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
9772
- let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
9773
- if (timeZone === "UTC")
9774
- return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
9775
- if (timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2() && disambiguation === "compatible") {
9776
- dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
9777
- let date2 = /* @__PURE__ */ new Date();
9778
- let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
9779
- date2.setFullYear(year, dateTime.month - 1, dateTime.day);
9780
- date2.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
9781
- return date2.getTime();
9782
- }
9783
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
9784
- let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
9785
- let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
9786
- let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
9787
- if (valid.length === 1)
9788
- return valid[0];
9789
- if (valid.length > 1)
9790
- switch (disambiguation) {
9791
- case "compatible":
9792
- case "earlier":
9793
- return valid[0];
9794
- case "later":
9795
- return valid[valid.length - 1];
9796
- case "reject":
9797
- throw new RangeError("Multiple possible absolute times found");
9798
- }
9799
- switch (disambiguation) {
9800
- case "earlier":
9801
- return Math.min(ms - offsetBefore, ms - offsetAfter);
9802
- case "compatible":
9803
- case "later":
9804
- return Math.max(ms - offsetBefore, ms - offsetAfter);
9805
- case "reject":
9806
- throw new RangeError("No such absolute time found");
9807
- }
9808
- }
9809
- function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
9810
- return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
9811
- }
9812
- function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
9813
- let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
9814
- let date = new Date(ms + offset);
9815
- let year = date.getUTCFullYear();
9816
- let month = date.getUTCMonth() + 1;
9817
- let day = date.getUTCDate();
9818
- let hour = date.getUTCHours();
9819
- let minute = date.getUTCMinutes();
9820
- let second = date.getUTCSeconds();
9821
- let millisecond = date.getUTCMilliseconds();
9822
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(year, month, day, timeZone, offset, hour, minute, second, millisecond);
9823
- }
9824
- function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
9825
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
9826
- }
9827
- function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
9828
- let hour = 0, minute = 0, second = 0, millisecond = 0;
9829
- if ("timeZone" in date)
9830
- ({ hour, minute, second, millisecond } = date);
9831
- else if ("hour" in date && !time)
9832
- return date;
9833
- if (time)
9834
- ({ hour, minute, second, millisecond } = time);
9835
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
9836
- }
9837
- function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
9838
- if (date.calendar.identifier === calendar.identifier)
9839
- return date;
9840
- let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
9841
- let copy = date.copy();
9842
- copy.calendar = calendar;
9843
- copy.era = calendarDate.era;
9844
- copy.year = calendarDate.year;
9845
- copy.month = calendarDate.month;
9846
- copy.day = calendarDate.day;
9847
- $735220c2d4774dd3$export$c4e2ecac49351ef2(copy);
9848
- return copy;
9849
- }
9850
- function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
9851
- if (date instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea) {
9852
- if (date.timeZone === timeZone)
9853
- return date;
9854
- return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
9855
- }
9856
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
9857
- return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
9858
- }
9859
- function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
9860
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
9861
- return new Date(ms);
9862
- }
9863
- function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
9864
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
9865
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
9866
- }
9867
- const $735220c2d4774dd3$var$ONE_HOUR = 36e5;
9868
- function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
9869
- let mutableDate = date.copy();
9870
- let days = "hour" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
9871
- $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
9872
- if (mutableDate.calendar.balanceYearMonth)
9873
- mutableDate.calendar.balanceYearMonth(mutableDate, date);
9874
- mutableDate.month += duration.months || 0;
9875
- $735220c2d4774dd3$var$balanceYearMonth(mutableDate);
9876
- $735220c2d4774dd3$var$constrainMonthDay(mutableDate);
9877
- mutableDate.day += (duration.weeks || 0) * 7;
9878
- mutableDate.day += duration.days || 0;
9879
- mutableDate.day += days;
9880
- $735220c2d4774dd3$var$balanceDay(mutableDate);
9881
- if (mutableDate.calendar.balanceDate)
9882
- mutableDate.calendar.balanceDate(mutableDate);
9883
- if (mutableDate.year < 1) {
9884
- mutableDate.year = 1;
9885
- mutableDate.month = 1;
9886
- mutableDate.day = 1;
9887
- }
9888
- let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
9889
- if (mutableDate.year > maxYear) {
9890
- var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
9891
- let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
9892
- mutableDate.year = maxYear;
9893
- mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
9894
- mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
9895
- }
9896
- if (mutableDate.month < 1) {
9897
- mutableDate.month = 1;
9898
- mutableDate.day = 1;
9899
- }
9900
- let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
9901
- if (mutableDate.month > maxMonth) {
9902
- mutableDate.month = maxMonth;
9903
- mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
9904
- }
9905
- mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
9906
- return mutableDate;
9907
- }
9908
- function $735220c2d4774dd3$var$addYears(date, years) {
9909
- var _date_calendar_isInverseEra, _date_calendar;
9910
- if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date))
9911
- years = -years;
9912
- date.year += years;
9913
- }
9914
- function $735220c2d4774dd3$var$balanceYearMonth(date) {
9915
- while (date.month < 1) {
9916
- $735220c2d4774dd3$var$addYears(date, -1);
9917
- date.month += date.calendar.getMonthsInYear(date);
9918
- }
9919
- let monthsInYear = 0;
9920
- while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
9921
- date.month -= monthsInYear;
9922
- $735220c2d4774dd3$var$addYears(date, 1);
9923
- }
9924
- }
9925
- function $735220c2d4774dd3$var$balanceDay(date) {
9926
- while (date.day < 1) {
9927
- date.month--;
9928
- $735220c2d4774dd3$var$balanceYearMonth(date);
9929
- date.day += date.calendar.getDaysInMonth(date);
9930
- }
9931
- while (date.day > date.calendar.getDaysInMonth(date)) {
9932
- date.day -= date.calendar.getDaysInMonth(date);
9933
- date.month++;
9934
- $735220c2d4774dd3$var$balanceYearMonth(date);
9935
- }
9936
- }
9937
- function $735220c2d4774dd3$var$constrainMonthDay(date) {
9938
- date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
9939
- date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
9940
- }
9941
- function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
9942
- if (date.calendar.constrainDate)
9943
- date.calendar.constrainDate(date);
9944
- date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
9945
- $735220c2d4774dd3$var$constrainMonthDay(date);
9946
- }
9947
- function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
9948
- let inverseDuration = {};
9949
- for (let key in duration)
9950
- if (typeof duration[key] === "number")
9951
- inverseDuration[key] = -duration[key];
9952
- return inverseDuration;
9953
- }
9954
- function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
9955
- return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
9956
- }
9957
- function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
9958
- let mutableDate = date.copy();
9959
- if (fields.era != null)
9960
- mutableDate.era = fields.era;
9961
- if (fields.year != null)
9962
- mutableDate.year = fields.year;
9963
- if (fields.month != null)
9964
- mutableDate.month = fields.month;
9965
- if (fields.day != null)
9966
- mutableDate.day = fields.day;
9967
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
9968
- return mutableDate;
9969
- }
9970
- function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
9971
- let mutableValue = value.copy();
9972
- if (fields.hour != null)
9973
- mutableValue.hour = fields.hour;
9974
- if (fields.minute != null)
9975
- mutableValue.minute = fields.minute;
9976
- if (fields.second != null)
9977
- mutableValue.second = fields.second;
9978
- if (fields.millisecond != null)
9979
- mutableValue.millisecond = fields.millisecond;
9980
- $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
9981
- return mutableValue;
9982
- }
9983
- function $735220c2d4774dd3$var$balanceTime(time) {
9984
- time.second += Math.floor(time.millisecond / 1e3);
9985
- time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1e3);
9986
- time.minute += Math.floor(time.second / 60);
9987
- time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
9988
- time.hour += Math.floor(time.minute / 60);
9989
- time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
9990
- let days = Math.floor(time.hour / 24);
9991
- time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
9992
- return days;
9993
- }
9994
- function $735220c2d4774dd3$export$7555de1e070510cb(time) {
9995
- time.millisecond = Math.max(0, Math.min(time.millisecond, 1e3));
9996
- time.second = Math.max(0, Math.min(time.second, 59));
9997
- time.minute = Math.max(0, Math.min(time.minute, 59));
9998
- time.hour = Math.max(0, Math.min(time.hour, 23));
9999
- }
10000
- function $735220c2d4774dd3$var$nonNegativeMod(a2, b) {
10001
- let result = a2 % b;
10002
- if (result < 0)
10003
- result += b;
10004
- return result;
10005
- }
10006
- function $735220c2d4774dd3$var$addTimeFields(time, duration) {
10007
- time.hour += duration.hours || 0;
10008
- time.minute += duration.minutes || 0;
10009
- time.second += duration.seconds || 0;
10010
- time.millisecond += duration.milliseconds || 0;
10011
- return $735220c2d4774dd3$var$balanceTime(time);
10012
- }
10013
- function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
10014
- let mutable = value.copy();
10015
- switch (field) {
10016
- case "era": {
10017
- let eras = value.calendar.getEras();
10018
- let eraIndex = eras.indexOf(value.era);
10019
- if (eraIndex < 0)
10020
- throw new Error("Invalid era: " + value.era);
10021
- eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
10022
- mutable.era = eras[eraIndex];
10023
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
10024
- break;
10025
- }
10026
- case "year":
10027
- var _mutable_calendar_isInverseEra, _mutable_calendar;
10028
- if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable))
10029
- amount = -amount;
10030
- mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
10031
- if (mutable.year === -Infinity)
10032
- mutable.year = 1;
10033
- if (mutable.calendar.balanceYearMonth)
10034
- mutable.calendar.balanceYearMonth(mutable, value);
10035
- break;
10036
- case "month":
10037
- mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
10038
- break;
10039
- case "day":
10040
- mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
10041
- break;
10042
- default:
10043
- throw new Error("Unsupported field " + field);
10044
- }
10045
- if (value.calendar.balanceDate)
10046
- value.calendar.balanceDate(mutable);
10047
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
10048
- return mutable;
10049
- }
10050
- function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
10051
- let mutable = value.copy();
10052
- switch (field) {
10053
- case "hour": {
10054
- let hours = value.hour;
10055
- let min = 0;
10056
- let max2 = 23;
10057
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
10058
- let isPM = hours >= 12;
10059
- min = isPM ? 12 : 0;
10060
- max2 = isPM ? 23 : 11;
10061
- }
10062
- mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max2, options === null || options === void 0 ? void 0 : options.round);
10063
- break;
10064
- }
10065
- case "minute":
10066
- mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
10067
- break;
10068
- case "second":
10069
- mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
10070
- break;
10071
- case "millisecond":
10072
- mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
10073
- break;
10074
- default:
10075
- throw new Error("Unsupported field " + field);
10076
- }
10077
- return mutable;
10078
- }
10079
- function $735220c2d4774dd3$var$cycleValue(value, amount, min, max2, round = false) {
10080
- if (round) {
10081
- value += Math.sign(amount);
10082
- if (value < min)
10083
- value = max2;
10084
- let div = Math.abs(amount);
10085
- if (amount > 0)
10086
- value = Math.ceil(value / div) * div;
10087
- else
10088
- value = Math.floor(value / div) * div;
10089
- if (value > max2)
10090
- value = min;
10091
- } else {
10092
- value += amount;
10093
- if (value < min)
10094
- value = max2 - (min - value - 1);
10095
- else if (value > max2)
10096
- value = min + (value - max2 - 1);
10097
- }
10098
- return value;
10099
- }
10100
- function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
10101
- let ms;
10102
- if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
10103
- let res2 = $735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(dateTime), {
10104
- years: duration.years,
10105
- months: duration.months,
10106
- weeks: duration.weeks,
10107
- days: duration.days
10108
- });
10109
- ms = $11d87f3f76e88657$export$5107c82f94518f5c(res2, dateTime.timeZone);
10110
- } else
10111
- ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
10112
- ms += duration.milliseconds || 0;
10113
- ms += (duration.seconds || 0) * 1e3;
10114
- ms += (duration.minutes || 0) * 6e4;
10115
- ms += (duration.hours || 0) * 36e5;
10116
- let res = $11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone);
10117
- return $11d87f3f76e88657$export$b4a036af3fc0b032(res, dateTime.calendar);
10118
- }
10119
- function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
10120
- return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
10121
- }
10122
- function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) {
10123
- switch (field) {
10124
- case "hour": {
10125
- let min = 0;
10126
- let max2 = 23;
10127
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
10128
- let isPM = dateTime.hour >= 12;
10129
- min = isPM ? 12 : 0;
10130
- max2 = isPM ? 23 : 11;
10131
- }
10132
- let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
10133
- let minDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
10134
- hour: min
10135
- }), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10136
- let minAbsolute = [
10137
- $11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"),
10138
- $11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")
10139
- ].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === minDate.day)[0];
10140
- let maxDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
10141
- hour: max2
10142
- }), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10143
- let maxAbsolute = [
10144
- $11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"),
10145
- $11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")
10146
- ].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === maxDate.day).pop();
10147
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
10148
- let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);
10149
- let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;
10150
- ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;
10151
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10152
- }
10153
- case "minute":
10154
- case "second":
10155
- case "millisecond":
10156
- return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options);
10157
- case "era":
10158
- case "year":
10159
- case "month":
10160
- case "day": {
10161
- let res = $735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(dateTime), field, amount, options);
10162
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone);
10163
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10164
- }
10165
- default:
10166
- throw new Error("Unsupported field " + field);
10167
- }
10168
- }
10169
- function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
10170
- let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
10171
- let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
10172
- if (res.compare(plainDateTime) === 0)
10173
- return dateTime;
10174
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation);
10175
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10176
- }
10177
- const $fae977aafc393c5c$var$ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
10178
- function $fae977aafc393c5c$export$5adfdab05168c219(value, timeZone) {
10179
- let m = value.match($fae977aafc393c5c$var$ABSOLUTE_RE);
10180
- if (!m)
10181
- throw new Error("Invalid ISO 8601 date time string: " + value);
10182
- let date = new $35ea8db9cb2ccb90$export$d3b7288e7994edea($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1e3 : 0);
10183
- date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
10184
- var _m_;
10185
- if (m[8])
10186
- date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 36e5 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 6e4;
10187
- return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
10188
- }
10189
- function $fae977aafc393c5c$var$parseNumber(value, min, max2) {
10190
- let val = Number(value);
10191
- if (val < min || val > max2)
10192
- throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max2}`);
10193
- return val;
10194
- }
10195
- function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
10196
- return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
10197
- }
10198
- function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
10199
- let gregorianDate = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10200
- return `${String(gregorianDate.year).padStart(4, "0")}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
10201
- }
10202
- function $fae977aafc393c5c$export$4223de14708adc63(date) {
10203
- return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
10204
- }
10205
- function $fae977aafc393c5c$var$offsetToString(offset) {
10206
- let sign = Math.sign(offset) < 0 ? "-" : "+";
10207
- offset = Math.abs(offset);
10208
- let offsetHours = Math.floor(offset / 36e5);
10209
- let offsetMinutes = offset % 36e5 / 6e4;
10210
- return `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
10211
- }
10212
- function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
10213
- return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
10214
- }
10215
- function _check_private_redeclaration(obj, privateCollection) {
10216
- if (privateCollection.has(obj)) {
10217
- throw new TypeError("Cannot initialize the same private elements twice on an object");
10218
- }
10219
- }
10220
- function _class_private_field_init(obj, privateMap, value) {
10221
- _check_private_redeclaration(obj, privateMap);
10222
- privateMap.set(obj, value);
10223
- }
10224
- function $35ea8db9cb2ccb90$var$shiftArgs(args) {
10225
- let calendar = typeof args[0] === "object" ? args.shift() : new $3b62074eb05584b2$export$80ee6245ec4f29ec();
10226
- let era;
10227
- if (typeof args[0] === "string")
10228
- era = args.shift();
10229
- else {
10230
- let eras = calendar.getEras();
10231
- era = eras[eras.length - 1];
10232
- }
10233
- let year = args.shift();
10234
- let month = args.shift();
10235
- let day = args.shift();
10236
- return [
10237
- calendar,
10238
- era,
10239
- year,
10240
- month,
10241
- day
10242
- ];
10243
- }
10244
- var $35ea8db9cb2ccb90$var$_type = /* @__PURE__ */ new WeakMap();
10245
- class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
10246
- /** Returns a copy of this date. */
10247
- copy() {
10248
- if (this.era)
10249
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
10250
- else
10251
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
10252
- }
10253
- /** Returns a new `CalendarDate` with the given duration added to it. */
10254
- add(duration) {
10255
- return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
10256
- }
10257
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
10258
- subtract(duration) {
10259
- return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
10260
- }
10261
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10262
- set(fields) {
10263
- return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this, fields);
10264
- }
10265
- /**
10266
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
10267
- * When the resulting value reaches the limits of the field, it wraps around.
10268
- */
10269
- cycle(field, amount, options) {
10270
- return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
10271
- }
10272
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
10273
- toDate(timeZone) {
10274
- return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone);
10275
- }
10276
- /** Converts the date to an ISO 8601 formatted string. */
10277
- toString() {
10278
- return $fae977aafc393c5c$export$60dfd74aa96791bd(this);
10279
- }
10280
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10281
- compare(b) {
10282
- return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
10283
- }
10284
- constructor(...args) {
10285
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type, {
10286
- writable: true,
10287
- value: void 0
10288
- });
10289
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10290
- this.calendar = calendar;
10291
- this.era = era;
10292
- this.year = year;
10293
- this.month = month;
10294
- this.day = day;
10295
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10296
- }
10297
- }
10298
- var $35ea8db9cb2ccb90$var$_type2 = /* @__PURE__ */ new WeakMap();
10299
- class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
10300
- /** Returns a copy of this date. */
10301
- copy() {
10302
- if (this.era)
10303
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
10304
- else
10305
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
10306
- }
10307
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
10308
- add(duration) {
10309
- return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
10310
- }
10311
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
10312
- subtract(duration) {
10313
- return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
10314
- }
10315
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10316
- set(fields) {
10317
- return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this, fields), fields);
10318
- }
10319
- /**
10320
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
10321
- * When the resulting value reaches the limits of the field, it wraps around.
10322
- */
10323
- cycle(field, amount, options) {
10324
- switch (field) {
10325
- case "era":
10326
- case "year":
10327
- case "month":
10328
- case "day":
10329
- return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
10330
- default:
10331
- return $735220c2d4774dd3$export$dd02b3e0007dfe28(this, field, amount, options);
10332
- }
10333
- }
10334
- /** Converts the date to a native JavaScript Date object in the given time zone. */
10335
- toDate(timeZone, disambiguation) {
10336
- return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone, disambiguation);
10337
- }
10338
- /** Converts the date to an ISO 8601 formatted string. */
10339
- toString() {
10340
- return $fae977aafc393c5c$export$4223de14708adc63(this);
10341
- }
10342
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10343
- compare(b) {
10344
- let res = $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
10345
- if (res === 0)
10346
- return $14e0f24ef4ac5c92$export$c19a80a9721b80f6(this, $11d87f3f76e88657$export$b21e0b124e224484(b));
10347
- return res;
10348
- }
10349
- constructor(...args) {
10350
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type2, {
10351
- writable: true,
10352
- value: void 0
10353
- });
10354
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10355
- this.calendar = calendar;
10356
- this.era = era;
10357
- this.year = year;
10358
- this.month = month;
10359
- this.day = day;
10360
- this.hour = args.shift() || 0;
10361
- this.minute = args.shift() || 0;
10362
- this.second = args.shift() || 0;
10363
- this.millisecond = args.shift() || 0;
10364
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10365
- }
10366
- }
10367
- var $35ea8db9cb2ccb90$var$_type3 = /* @__PURE__ */ new WeakMap();
10368
- class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
10369
- /** Returns a copy of this date. */
10370
- copy() {
10371
- if (this.era)
10372
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
10373
- else
10374
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
10375
- }
10376
- /** Returns a new `ZonedDateTime` with the given duration added to it. */
10377
- add(duration) {
10378
- return $735220c2d4774dd3$export$96b1d28349274637(this, duration);
10379
- }
10380
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
10381
- subtract(duration) {
10382
- return $735220c2d4774dd3$export$6814caac34ca03c7(this, duration);
10383
- }
10384
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10385
- set(fields, disambiguation) {
10386
- return $735220c2d4774dd3$export$31b5430eb18be4f8(this, fields, disambiguation);
10387
- }
10388
- /**
10389
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
10390
- * When the resulting value reaches the limits of the field, it wraps around.
10391
- */
10392
- cycle(field, amount, options) {
10393
- return $735220c2d4774dd3$export$9a297d111fc86b79(this, field, amount, options);
10394
- }
10395
- /** Converts the date to a native JavaScript Date object. */
10396
- toDate() {
10397
- return $11d87f3f76e88657$export$83aac07b4c37b25(this);
10398
- }
10399
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
10400
- toString() {
10401
- return $fae977aafc393c5c$export$bf79f1ebf4b18792(this);
10402
- }
10403
- /** Converts the date to an ISO 8601 formatted string in UTC. */
10404
- toAbsoluteString() {
10405
- return this.toDate().toISOString();
10406
- }
10407
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10408
- compare(b) {
10409
- return this.toDate().getTime() - $11d87f3f76e88657$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
10410
- }
10411
- constructor(...args) {
10412
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type3, {
10413
- writable: true,
10414
- value: void 0
10415
- });
10416
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10417
- let timeZone = args.shift();
10418
- let offset = args.shift();
10419
- this.calendar = calendar;
10420
- this.era = era;
10421
- this.year = year;
10422
- this.month = month;
10423
- this.day = day;
10424
- this.timeZone = timeZone;
10425
- this.offset = offset;
10426
- this.hour = args.shift() || 0;
10427
- this.minute = args.shift() || 0;
10428
- this.second = args.shift() || 0;
10429
- this.millisecond = args.shift() || 0;
10430
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10431
- }
10432
- }
10433
9505
  const [Provider, useHistory] = createContext("History", {
10434
9506
  history: [],
10435
9507
  currentLocationIndex: 0,
@@ -10449,6 +9521,7 @@ React.forwardRef(
10449
9521
  const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
10450
9522
  const goBack = useHistory("BackButton", (state) => state.goBack);
10451
9523
  const history = useHistory("BackButton", (state) => state.history);
9524
+ const currentLocationIndex = useHistory("BackButton", (state) => state.currentLocationIndex);
10452
9525
  const hasFallback = fallback !== "";
10453
9526
  const shouldBeDisabled = disabled || !canGoBack && !hasFallback;
10454
9527
  const handleClick = (e) => {
@@ -10459,7 +9532,7 @@ React.forwardRef(
10459
9532
  navigate(fallback);
10460
9533
  }
10461
9534
  };
10462
- const historyTo = canGoBack ? history.at(-1) : void 0;
9535
+ const historyTo = canGoBack ? history.at(currentLocationIndex - 2) : void 0;
10463
9536
  const toWithFallback = historyTo ?? fallback;
10464
9537
  return /* @__PURE__ */ jsx(
10465
9538
  Link,
@@ -11163,13 +10236,24 @@ const CheckboxInput = forwardRef(
11163
10236
  }
11164
10237
  );
11165
10238
  const MemoizedCheckboxInput = memo(CheckboxInput);
11166
- const DateInput = forwardRef(
10239
+ const DateInput = React.forwardRef(
11167
10240
  ({ name, required, label, hint, labelAction, type: _type, ...props }, ref2) => {
11168
10241
  const { formatMessage } = useIntl();
11169
10242
  const field = useField(name);
11170
10243
  const fieldRef = useFocusInputField(name);
11171
10244
  const composedRefs = useComposedRefs(ref2, fieldRef);
10245
+ const [lastValidDate, setLastValidDate] = React.useState(null);
11172
10246
  const value = typeof field.value === "string" ? new Date(field.value) : field.value;
10247
+ const handleDateChange = (date) => {
10248
+ if (!date) {
10249
+ field.onChange(name, null);
10250
+ setLastValidDate(null);
10251
+ return;
10252
+ }
10253
+ const utcDate = toUTCMidnight(date);
10254
+ field.onChange(name, utcDate.toISOString());
10255
+ setLastValidDate(utcDate);
10256
+ };
11173
10257
  return /* @__PURE__ */ jsxs(Field.Root, { error: field.error, name, hint, required, children: [
11174
10258
  /* @__PURE__ */ jsx(Field.Label, { action: labelAction, children: label }),
11175
10259
  /* @__PURE__ */ jsx(
@@ -11177,11 +10261,18 @@ const DateInput = forwardRef(
11177
10261
  {
11178
10262
  ref: composedRefs,
11179
10263
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
11180
- onChange: (date) => {
11181
- field.onChange(name, date ? convertLocalDateToUTCDate(date).toISOString() : null);
10264
+ onChange: handleDateChange,
10265
+ onClear: () => {
10266
+ field.onChange(name, null);
10267
+ setLastValidDate(null);
10268
+ return;
11182
10269
  },
11183
- onClear: () => field.onChange(name, null),
11184
- value: value ? convertLocalDateToUTCDate(value) : value,
10270
+ onBlur: () => {
10271
+ if (field.value && !value) {
10272
+ field.onChange(name, lastValidDate?.toISOString() ?? null);
10273
+ }
10274
+ },
10275
+ value,
11185
10276
  ...props
11186
10277
  }
11187
10278
  ),
@@ -11190,13 +10281,10 @@ const DateInput = forwardRef(
11190
10281
  ] });
11191
10282
  }
11192
10283
  );
11193
- const convertLocalDateToUTCDate = (date) => {
11194
- const utcDateString = date.toISOString();
11195
- const timeZone = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
11196
- const zonedDateTime = $fae977aafc393c5c$export$5adfdab05168c219(utcDateString, timeZone);
11197
- return $11d87f3f76e88657$export$93522d1a439f3617(zonedDateTime).toDate("UTC");
10284
+ const toUTCMidnight = (date) => {
10285
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
11198
10286
  };
11199
- const MemoizedDateInput = memo(DateInput);
10287
+ const MemoizedDateInput = React.memo(DateInput);
11200
10288
  const DateTimeInput = forwardRef(
11201
10289
  ({ name, required, label, hint, labelAction, ...props }, ref2) => {
11202
10290
  const { formatMessage } = useIntl();
@@ -11999,4 +11087,4 @@ export {
11999
11087
  Layouts as L,
12000
11088
  useTracking as u
12001
11089
  };
12002
- //# sourceMappingURL=index-CQ0jOkIC-DAZ1lfuF.mjs.map
11090
+ //# sourceMappingURL=index-Cn5HftCc-Dku5eOkP.mjs.map