@dovetail-v2/refine 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  (function(global2, factory) {
8
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("ky"), require("mitt")) : typeof define === "function" && define.amd ? define(["exports", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "ky", "mitt"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.require$$0, global2.require$$2));
9
- })(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, iconsReact, monaco, monacoYaml, ReactDOM, require$$0, require$$2) {
8
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("ky"), require("mitt"), require("i18next")) : typeof define === "function" && define.amd ? define(["exports", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "ky", "mitt", "i18next"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.require$$0, global2.require$$2, global2.i18n));
9
+ })(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, iconsReact, monaco, monacoYaml, ReactDOM, require$$0, require$$2, i18n) {
10
10
  "use strict";
11
11
  const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
12
  function _interopNamespace(e) {
@@ -33,6 +33,7 @@ var __publicField = (obj, key, value) => {
33
33
  const ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
34
34
  const require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
35
35
  const require$$2__default = /* @__PURE__ */ _interopDefaultLegacy(require$$2);
36
+ const i18n__default = /* @__PURE__ */ _interopDefaultLegacy(i18n);
36
37
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
37
38
  var jsxRuntime = { exports: {} };
38
39
  var reactJsxRuntime_production_min = {};
@@ -157,9 +158,9 @@ var __publicField = (obj, key, value) => {
157
158
  var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
158
159
  var stack = "";
159
160
  if (currentlyValidatingElement) {
160
- var name = getComponentName(currentlyValidatingElement.type);
161
+ var name2 = getComponentName(currentlyValidatingElement.type);
161
162
  var owner = currentlyValidatingElement._owner;
162
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
163
+ stack += describeComponentFrame(name2, currentlyValidatingElement._source, owner && getComponentName(owner.type));
163
164
  }
164
165
  stack += ReactDebugCurrentFrame.getStackAddendum();
165
166
  if (stack !== "") {
@@ -174,22 +175,22 @@ var __publicField = (obj, key, value) => {
174
175
  }
175
176
  }
176
177
  var enableScopeAPI = false;
177
- function isValidElementType(type) {
178
- if (typeof type === "string" || typeof type === "function") {
178
+ function isValidElementType(type2) {
179
+ if (typeof type2 === "string" || typeof type2 === "function") {
179
180
  return true;
180
181
  }
181
- if (type === exports3.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
182
+ if (type2 === exports3.Fragment || type2 === REACT_PROFILER_TYPE || type2 === REACT_DEBUG_TRACING_MODE_TYPE || type2 === REACT_STRICT_MODE_TYPE || type2 === REACT_SUSPENSE_TYPE || type2 === REACT_SUSPENSE_LIST_TYPE || type2 === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
182
183
  return true;
183
184
  }
184
- if (typeof type === "object" && type !== null) {
185
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
185
+ if (typeof type2 === "object" && type2 !== null) {
186
+ if (type2.$$typeof === REACT_LAZY_TYPE || type2.$$typeof === REACT_MEMO_TYPE || type2.$$typeof === REACT_PROVIDER_TYPE || type2.$$typeof === REACT_CONTEXT_TYPE || type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_FUNDAMENTAL_TYPE || type2.$$typeof === REACT_BLOCK_TYPE || type2[0] === REACT_SERVER_BLOCK_TYPE) {
186
187
  return true;
187
188
  }
188
189
  }
189
190
  return false;
190
191
  }
191
192
  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
192
- function describeComponentFrame(name, source, ownerName) {
193
+ function describeComponentFrame(name2, source, ownerName) {
193
194
  var sourceInfo = "";
194
195
  if (source) {
195
196
  var path = source.fileName;
@@ -210,7 +211,7 @@ var __publicField = (obj, key, value) => {
210
211
  } else if (ownerName) {
211
212
  sourceInfo = " (created by " + ownerName + ")";
212
213
  }
213
- return "\n in " + (name || "Unknown") + sourceInfo;
214
+ return "\n in " + (name2 || "Unknown") + sourceInfo;
214
215
  }
215
216
  var Resolved = 1;
216
217
  function refineResolvedLazyComponent(lazyComponent) {
@@ -220,22 +221,22 @@ var __publicField = (obj, key, value) => {
220
221
  var functionName = innerType.displayName || innerType.name || "";
221
222
  return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
222
223
  }
223
- function getComponentName(type) {
224
- if (type == null) {
224
+ function getComponentName(type2) {
225
+ if (type2 == null) {
225
226
  return null;
226
227
  }
227
228
  {
228
- if (typeof type.tag === "number") {
229
+ if (typeof type2.tag === "number") {
229
230
  error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue.");
230
231
  }
231
232
  }
232
- if (typeof type === "function") {
233
- return type.displayName || type.name || null;
233
+ if (typeof type2 === "function") {
234
+ return type2.displayName || type2.name || null;
234
235
  }
235
- if (typeof type === "string") {
236
- return type;
236
+ if (typeof type2 === "string") {
237
+ return type2;
237
238
  }
238
- switch (type) {
239
+ switch (type2) {
239
240
  case exports3.Fragment:
240
241
  return "Fragment";
241
242
  case REACT_PORTAL_TYPE:
@@ -249,20 +250,20 @@ var __publicField = (obj, key, value) => {
249
250
  case REACT_SUSPENSE_LIST_TYPE:
250
251
  return "SuspenseList";
251
252
  }
252
- if (typeof type === "object") {
253
- switch (type.$$typeof) {
253
+ if (typeof type2 === "object") {
254
+ switch (type2.$$typeof) {
254
255
  case REACT_CONTEXT_TYPE:
255
256
  return "Context.Consumer";
256
257
  case REACT_PROVIDER_TYPE:
257
258
  return "Context.Provider";
258
259
  case REACT_FORWARD_REF_TYPE:
259
- return getWrappedName(type, type.render, "ForwardRef");
260
+ return getWrappedName(type2, type2.render, "ForwardRef");
260
261
  case REACT_MEMO_TYPE:
261
- return getComponentName(type.type);
262
+ return getComponentName(type2.type);
262
263
  case REACT_BLOCK_TYPE:
263
- return getComponentName(type.render);
264
+ return getComponentName(type2.render);
264
265
  case REACT_LAZY_TYPE: {
265
- var thenable = type;
266
+ var thenable = type2;
266
267
  var resolvedThenable = refineResolvedLazyComponent(thenable);
267
268
  if (resolvedThenable) {
268
269
  return getComponentName(resolvedThenable);
@@ -389,10 +390,10 @@ var __publicField = (obj, key, value) => {
389
390
  });
390
391
  }
391
392
  }
392
- var ReactElement = function(type, key, ref, self2, source, owner, props) {
393
+ var ReactElement = function(type2, key, ref, self2, source, owner, props) {
393
394
  var element = {
394
395
  $$typeof: REACT_ELEMENT_TYPE,
395
- type,
396
+ type: type2,
396
397
  key,
397
398
  ref,
398
399
  props,
@@ -425,7 +426,7 @@ var __publicField = (obj, key, value) => {
425
426
  }
426
427
  return element;
427
428
  };
428
- function jsxDEV(type, config, maybeKey, source, self2) {
429
+ function jsxDEV(type2, config, maybeKey, source, self2) {
429
430
  {
430
431
  var propName;
431
432
  var props = {};
@@ -446,8 +447,8 @@ var __publicField = (obj, key, value) => {
446
447
  props[propName] = config[propName];
447
448
  }
448
449
  }
449
- if (type && type.defaultProps) {
450
- var defaultProps = type.defaultProps;
450
+ if (type2 && type2.defaultProps) {
451
+ var defaultProps = type2.defaultProps;
451
452
  for (propName in defaultProps) {
452
453
  if (props[propName] === void 0) {
453
454
  props[propName] = defaultProps[propName];
@@ -455,7 +456,7 @@ var __publicField = (obj, key, value) => {
455
456
  }
456
457
  }
457
458
  if (key || ref) {
458
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
459
+ var displayName = typeof type2 === "function" ? type2.displayName || type2.name || "Unknown" : type2;
459
460
  if (key) {
460
461
  defineKeyPropWarningGetter(props, displayName);
461
462
  }
@@ -463,7 +464,7 @@ var __publicField = (obj, key, value) => {
463
464
  defineRefPropWarningGetter(props, displayName);
464
465
  }
465
466
  }
466
- return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
467
+ return ReactElement(type2, key, ref, self2, source, ReactCurrentOwner.current, props);
467
468
  }
468
469
  }
469
470
  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
@@ -483,9 +484,9 @@ var __publicField = (obj, key, value) => {
483
484
  function getDeclarationErrorAddendum() {
484
485
  {
485
486
  if (ReactCurrentOwner$1.current) {
486
- var name = getComponentName(ReactCurrentOwner$1.current.type);
487
- if (name) {
488
- return "\n\nCheck the render method of `" + name + "`.";
487
+ var name2 = getComponentName(ReactCurrentOwner$1.current.type);
488
+ if (name2) {
489
+ return "\n\nCheck the render method of `" + name2 + "`.";
489
490
  }
490
491
  }
491
492
  return "";
@@ -568,27 +569,27 @@ var __publicField = (obj, key, value) => {
568
569
  }
569
570
  function validatePropTypes(element) {
570
571
  {
571
- var type = element.type;
572
- if (type === null || type === void 0 || typeof type === "string") {
572
+ var type2 = element.type;
573
+ if (type2 === null || type2 === void 0 || typeof type2 === "string") {
573
574
  return;
574
575
  }
575
576
  var propTypes;
576
- if (typeof type === "function") {
577
- propTypes = type.propTypes;
578
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) {
579
- propTypes = type.propTypes;
577
+ if (typeof type2 === "function") {
578
+ propTypes = type2.propTypes;
579
+ } else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_MEMO_TYPE)) {
580
+ propTypes = type2.propTypes;
580
581
  } else {
581
582
  return;
582
583
  }
583
584
  if (propTypes) {
584
- var name = getComponentName(type);
585
- checkPropTypes(propTypes, element.props, "prop", name, element);
586
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
585
+ var name2 = getComponentName(type2);
586
+ checkPropTypes(propTypes, element.props, "prop", name2, element);
587
+ } else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
587
588
  propTypesMisspellWarningShown = true;
588
- var _name = getComponentName(type);
589
+ var _name = getComponentName(type2);
589
590
  error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
590
591
  }
591
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
592
+ if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
592
593
  error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
593
594
  }
594
595
  }
@@ -612,12 +613,12 @@ var __publicField = (obj, key, value) => {
612
613
  }
613
614
  }
614
615
  }
615
- function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
616
+ function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
616
617
  {
617
- var validType = isValidElementType(type);
618
+ var validType = isValidElementType(type2);
618
619
  if (!validType) {
619
620
  var info = "";
620
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
621
+ if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
621
622
  info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
622
623
  }
623
624
  var sourceInfo = getSourceInfoErrorAddendum(source);
@@ -627,19 +628,19 @@ var __publicField = (obj, key, value) => {
627
628
  info += getDeclarationErrorAddendum();
628
629
  }
629
630
  var typeString;
630
- if (type === null) {
631
+ if (type2 === null) {
631
632
  typeString = "null";
632
- } else if (Array.isArray(type)) {
633
+ } else if (Array.isArray(type2)) {
633
634
  typeString = "array";
634
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
635
- typeString = "<" + (getComponentName(type.type) || "Unknown") + " />";
635
+ } else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
636
+ typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
636
637
  info = " Did you accidentally export a JSX literal instead of a component?";
637
638
  } else {
638
- typeString = typeof type;
639
+ typeString = typeof type2;
639
640
  }
640
641
  error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
641
642
  }
642
- var element = jsxDEV(type, props, key, source, self2);
643
+ var element = jsxDEV(type2, props, key, source, self2);
643
644
  if (element == null) {
644
645
  return element;
645
646
  }
@@ -649,7 +650,7 @@ var __publicField = (obj, key, value) => {
649
650
  if (isStaticChildren) {
650
651
  if (Array.isArray(children)) {
651
652
  for (var i = 0; i < children.length; i++) {
652
- validateChildKeys(children[i], type);
653
+ validateChildKeys(children[i], type2);
653
654
  }
654
655
  if (Object.freeze) {
655
656
  Object.freeze(children);
@@ -658,11 +659,11 @@ var __publicField = (obj, key, value) => {
658
659
  error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
659
660
  }
660
661
  } else {
661
- validateChildKeys(children, type);
662
+ validateChildKeys(children, type2);
662
663
  }
663
664
  }
664
665
  }
665
- if (type === exports3.Fragment) {
666
+ if (type2 === exports3.Fragment) {
666
667
  validateFragmentProps(element);
667
668
  } else {
668
669
  validatePropTypes(element);
@@ -670,14 +671,14 @@ var __publicField = (obj, key, value) => {
670
671
  return element;
671
672
  }
672
673
  }
673
- function jsxWithValidationStatic(type, props, key) {
674
+ function jsxWithValidationStatic(type2, props, key) {
674
675
  {
675
- return jsxWithValidation(type, props, key, true);
676
+ return jsxWithValidation(type2, props, key, true);
676
677
  }
677
678
  }
678
- function jsxWithValidationDynamic(type, props, key) {
679
+ function jsxWithValidationDynamic(type2, props, key) {
679
680
  {
680
- return jsxWithValidation(type, props, key, false);
681
+ return jsxWithValidation(type2, props, key, false);
681
682
  }
682
683
  }
683
684
  var jsx = jsxWithValidationDynamic;
@@ -718,7 +719,7 @@ var __publicField = (obj, key, value) => {
718
719
  const { search: existingSearch, hash: existingHash } = reactRouterDom.useLocation();
719
720
  const history2 = reactRouterDom.useHistory();
720
721
  const fn = React.useCallback(
721
- ({ to, type, query, hash, options: { keepQuery, keepHash } = {} }) => {
722
+ ({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
722
723
  const urlQuery = {
723
724
  ...keepQuery && existingSearch && qs.parse(existingSearch, { ignoreQueryPrefix: true }),
724
725
  ...query
@@ -734,10 +735,10 @@ var __publicField = (obj, key, value) => {
734
735
  const hasUrlHash = urlHash.length > 1;
735
736
  const urlTo = to || "";
736
737
  const fullPath = `${urlTo}${hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
737
- if (type === "path") {
738
+ if (type2 === "path") {
738
739
  return fullPath;
739
740
  }
740
- return history2[type || "push"](fullPath);
741
+ return history2[type2 || "push"](fullPath);
741
742
  },
742
743
  [existingHash, existingSearch, history2]
743
744
  );
@@ -754,10 +755,10 @@ var __publicField = (obj, key, value) => {
754
755
  var _a;
755
756
  let params = reactRouterDom.useParams();
756
757
  const { pathname, search } = reactRouterDom.useLocation();
757
- const { resources } = React.useContext(core.ResourceContext);
758
+ const { resources: resources2 } = React.useContext(core.ResourceContext);
758
759
  const { resource, action, matchedRoute } = React__default.default.useMemo(() => {
759
- return core.matchResourceFromRoute(pathname, resources);
760
- }, [resources, pathname]);
760
+ return core.matchResourceFromRoute(pathname, resources2);
761
+ }, [resources2, pathname]);
761
762
  if (Object.entries(params).length === 0 && matchedRoute) {
762
763
  params = ((_a = reactRouterDom.matchPath(matchedRoute, pathname)) == null ? void 0 : _a.params) || {};
763
764
  }
@@ -822,63 +823,63 @@ var __publicField = (obj, key, value) => {
822
823
  alreadyWarned[args[0]] = new Date();
823
824
  warn(...args);
824
825
  }
825
- const loadedClb = (i18n, cb) => () => {
826
- if (i18n.isInitialized) {
826
+ const loadedClb = (i18n2, cb) => () => {
827
+ if (i18n2.isInitialized) {
827
828
  cb();
828
829
  } else {
829
830
  const initialized = () => {
830
831
  setTimeout(() => {
831
- i18n.off("initialized", initialized);
832
+ i18n2.off("initialized", initialized);
832
833
  }, 0);
833
834
  cb();
834
835
  };
835
- i18n.on("initialized", initialized);
836
+ i18n2.on("initialized", initialized);
836
837
  }
837
838
  };
838
- function loadNamespaces(i18n, ns, cb) {
839
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
839
+ function loadNamespaces(i18n2, ns, cb) {
840
+ i18n2.loadNamespaces(ns, loadedClb(i18n2, cb));
840
841
  }
841
- function loadLanguages(i18n, lng, ns, cb) {
842
+ function loadLanguages(i18n2, lng, ns, cb) {
842
843
  if (typeof ns === "string")
843
844
  ns = [ns];
844
845
  ns.forEach((n) => {
845
- if (i18n.options.ns.indexOf(n) < 0)
846
- i18n.options.ns.push(n);
846
+ if (i18n2.options.ns.indexOf(n) < 0)
847
+ i18n2.options.ns.push(n);
847
848
  });
848
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
849
+ i18n2.loadLanguages(lng, loadedClb(i18n2, cb));
849
850
  }
850
- function oldI18nextHasLoadedNamespace(ns, i18n) {
851
+ function oldI18nextHasLoadedNamespace(ns, i18n2) {
851
852
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
852
- const lng = i18n.languages[0];
853
- const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
854
- const lastLng = i18n.languages[i18n.languages.length - 1];
853
+ const lng = i18n2.languages[0];
854
+ const fallbackLng = i18n2.options ? i18n2.options.fallbackLng : false;
855
+ const lastLng = i18n2.languages[i18n2.languages.length - 1];
855
856
  if (lng.toLowerCase() === "cimode")
856
857
  return true;
857
858
  const loadNotPending = (l, n) => {
858
- const loadState = i18n.services.backendConnector.state[`${l}|${n}`];
859
+ const loadState = i18n2.services.backendConnector.state[`${l}|${n}`];
859
860
  return loadState === -1 || loadState === 2;
860
861
  };
861
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns))
862
+ if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n2.services.backendConnector.backend && i18n2.isLanguageChangingTo && !loadNotPending(i18n2.isLanguageChangingTo, ns))
862
863
  return false;
863
- if (i18n.hasResourceBundle(lng, ns))
864
+ if (i18n2.hasResourceBundle(lng, ns))
864
865
  return true;
865
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages)
866
+ if (!i18n2.services.backendConnector.backend || i18n2.options.resources && !i18n2.options.partialBundledLanguages)
866
867
  return true;
867
868
  if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns)))
868
869
  return true;
869
870
  return false;
870
871
  }
871
- function hasLoadedNamespace(ns, i18n) {
872
+ function hasLoadedNamespace(ns, i18n2) {
872
873
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
873
- if (!i18n.languages || !i18n.languages.length) {
874
- warnOnce("i18n.languages were undefined or empty", i18n.languages);
874
+ if (!i18n2.languages || !i18n2.languages.length) {
875
+ warnOnce("i18n.languages were undefined or empty", i18n2.languages);
875
876
  return true;
876
877
  }
877
- const isNewerI18next = i18n.options.ignoreJSONStructure !== void 0;
878
+ const isNewerI18next = i18n2.options.ignoreJSONStructure !== void 0;
878
879
  if (!isNewerI18next) {
879
- return oldI18nextHasLoadedNamespace(ns, i18n, options);
880
+ return oldI18nextHasLoadedNamespace(ns, i18n2, options);
880
881
  }
881
- return i18n.hasLoadedNamespace(ns, {
882
+ return i18n2.hasLoadedNamespace(ns, {
882
883
  lng: options.lng,
883
884
  precheck: (i18nInstance2, loadNotPending) => {
884
885
  if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
@@ -921,13 +922,30 @@ var __publicField = (obj, key, value) => {
921
922
  useSuspense: true,
922
923
  unescape
923
924
  };
925
+ function setDefaults() {
926
+ let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
927
+ defaultOptions = {
928
+ ...defaultOptions,
929
+ ...options
930
+ };
931
+ }
924
932
  function getDefaults() {
925
933
  return defaultOptions;
926
934
  }
927
935
  let i18nInstance;
936
+ function setI18n(instance) {
937
+ i18nInstance = instance;
938
+ }
928
939
  function getI18n() {
929
940
  return i18nInstance;
930
941
  }
942
+ const initReactI18next = {
943
+ type: "3rdParty",
944
+ init(instance) {
945
+ setDefaults(instance.options.react);
946
+ setI18n(instance);
947
+ }
948
+ };
931
949
  const I18nContext = React.createContext();
932
950
  class ReportNamespaces {
933
951
  constructor() {
@@ -959,10 +977,10 @@ var __publicField = (obj, key, value) => {
959
977
  i18n: i18nFromContext,
960
978
  defaultNS: defaultNSFromContext
961
979
  } = React.useContext(I18nContext) || {};
962
- const i18n = i18nFromProps || i18nFromContext || getI18n();
963
- if (i18n && !i18n.reportNamespaces)
964
- i18n.reportNamespaces = new ReportNamespaces();
965
- if (!i18n) {
980
+ const i18n2 = i18nFromProps || i18nFromContext || getI18n();
981
+ if (i18n2 && !i18n2.reportNamespaces)
982
+ i18n2.reportNamespaces = new ReportNamespaces();
983
+ if (!i18n2) {
966
984
  warnOnce("You will need to pass in an i18next instance by using initReactI18next");
967
985
  const notReadyT = (k2, optsOrDefaultValue) => {
968
986
  if (typeof optsOrDefaultValue === "string")
@@ -977,24 +995,24 @@ var __publicField = (obj, key, value) => {
977
995
  retNotReady.ready = false;
978
996
  return retNotReady;
979
997
  }
980
- if (i18n.options.react && i18n.options.react.wait !== void 0)
998
+ if (i18n2.options.react && i18n2.options.react.wait !== void 0)
981
999
  warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
982
1000
  const i18nOptions = {
983
1001
  ...getDefaults(),
984
- ...i18n.options.react,
1002
+ ...i18n2.options.react,
985
1003
  ...props
986
1004
  };
987
1005
  const {
988
1006
  useSuspense,
989
1007
  keyPrefix
990
1008
  } = i18nOptions;
991
- let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
1009
+ let namespaces = ns || defaultNSFromContext || i18n2.options && i18n2.options.defaultNS;
992
1010
  namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
993
- if (i18n.reportNamespaces.addUsedNamespaces)
994
- i18n.reportNamespaces.addUsedNamespaces(namespaces);
995
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
1011
+ if (i18n2.reportNamespaces.addUsedNamespaces)
1012
+ i18n2.reportNamespaces.addUsedNamespaces(namespaces);
1013
+ const ready2 = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n2, i18nOptions));
996
1014
  function getT() {
997
- return i18n.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
1015
+ return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
998
1016
  }
999
1017
  const [t, setT] = React.useState(getT);
1000
1018
  let joinedNS = namespaces.join();
@@ -1008,58 +1026,58 @@ var __publicField = (obj, key, value) => {
1008
1026
  bindI18nStore
1009
1027
  } = i18nOptions;
1010
1028
  isMounted.current = true;
1011
- if (!ready && !useSuspense) {
1029
+ if (!ready2 && !useSuspense) {
1012
1030
  if (props.lng) {
1013
- loadLanguages(i18n, props.lng, namespaces, () => {
1031
+ loadLanguages(i18n2, props.lng, namespaces, () => {
1014
1032
  if (isMounted.current)
1015
1033
  setT(getT);
1016
1034
  });
1017
1035
  } else {
1018
- loadNamespaces(i18n, namespaces, () => {
1036
+ loadNamespaces(i18n2, namespaces, () => {
1019
1037
  if (isMounted.current)
1020
1038
  setT(getT);
1021
1039
  });
1022
1040
  }
1023
1041
  }
1024
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
1042
+ if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
1025
1043
  setT(getT);
1026
1044
  }
1027
1045
  function boundReset() {
1028
1046
  if (isMounted.current)
1029
1047
  setT(getT);
1030
1048
  }
1031
- if (bindI18n && i18n)
1032
- i18n.on(bindI18n, boundReset);
1033
- if (bindI18nStore && i18n)
1034
- i18n.store.on(bindI18nStore, boundReset);
1049
+ if (bindI18n && i18n2)
1050
+ i18n2.on(bindI18n, boundReset);
1051
+ if (bindI18nStore && i18n2)
1052
+ i18n2.store.on(bindI18nStore, boundReset);
1035
1053
  return () => {
1036
1054
  isMounted.current = false;
1037
- if (bindI18n && i18n)
1038
- bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
1039
- if (bindI18nStore && i18n)
1040
- bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
1055
+ if (bindI18n && i18n2)
1056
+ bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
1057
+ if (bindI18nStore && i18n2)
1058
+ bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
1041
1059
  };
1042
- }, [i18n, joinedNS]);
1060
+ }, [i18n2, joinedNS]);
1043
1061
  const isInitial = React.useRef(true);
1044
1062
  React.useEffect(() => {
1045
1063
  if (isMounted.current && !isInitial.current) {
1046
1064
  setT(getT);
1047
1065
  }
1048
1066
  isInitial.current = false;
1049
- }, [i18n, keyPrefix]);
1050
- const ret = [t, i18n, ready];
1067
+ }, [i18n2, keyPrefix]);
1068
+ const ret = [t, i18n2, ready2];
1051
1069
  ret.t = t;
1052
- ret.i18n = i18n;
1053
- ret.ready = ready;
1054
- if (ready)
1070
+ ret.i18n = i18n2;
1071
+ ret.ready = ready2;
1072
+ if (ready2)
1055
1073
  return ret;
1056
- if (!ready && !useSuspense)
1074
+ if (!ready2 && !useSuspense)
1057
1075
  return ret;
1058
1076
  throw new Promise((resolve) => {
1059
1077
  if (props.lng) {
1060
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
1078
+ loadLanguages(i18n2, props.lng, namespaces, () => resolve());
1061
1079
  } else {
1062
- loadNamespaces(i18n, namespaces, () => resolve());
1080
+ loadNamespaces(i18n2, namespaces, () => resolve());
1063
1081
  }
1064
1082
  });
1065
1083
  }
@@ -1681,9 +1699,9 @@ var __publicField = (obj, key, value) => {
1681
1699
  return reHasUnicodeWord.test(string);
1682
1700
  }
1683
1701
  function iteratorToArray(iterator) {
1684
- var data, result = [];
1685
- while (!(data = iterator.next()).done) {
1686
- result.push(data.value);
1702
+ var data2, result = [];
1703
+ while (!(data2 = iterator.next()).done) {
1704
+ result.push(data2.value);
1687
1705
  }
1688
1706
  return result;
1689
1707
  }
@@ -1892,11 +1910,11 @@ var __publicField = (obj, key, value) => {
1892
1910
  index += dir;
1893
1911
  var iterIndex = -1, value = array[index];
1894
1912
  while (++iterIndex < iterLength) {
1895
- var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
1896
- if (type == LAZY_MAP_FLAG) {
1913
+ var data2 = iteratees[iterIndex], iteratee2 = data2.iteratee, type2 = data2.type, computed = iteratee2(value);
1914
+ if (type2 == LAZY_MAP_FLAG) {
1897
1915
  value = computed;
1898
1916
  } else if (!computed) {
1899
- if (type == LAZY_FILTER_FLAG) {
1917
+ if (type2 == LAZY_FILTER_FLAG) {
1900
1918
  continue outer;
1901
1919
  } else {
1902
1920
  break outer;
@@ -1927,21 +1945,21 @@ var __publicField = (obj, key, value) => {
1927
1945
  return result2;
1928
1946
  }
1929
1947
  function hashGet(key) {
1930
- var data = this.__data__;
1948
+ var data2 = this.__data__;
1931
1949
  if (nativeCreate) {
1932
- var result2 = data[key];
1950
+ var result2 = data2[key];
1933
1951
  return result2 === HASH_UNDEFINED ? undefined$1 : result2;
1934
1952
  }
1935
- return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
1953
+ return hasOwnProperty.call(data2, key) ? data2[key] : undefined$1;
1936
1954
  }
1937
1955
  function hashHas(key) {
1938
- var data = this.__data__;
1939
- return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key);
1956
+ var data2 = this.__data__;
1957
+ return nativeCreate ? data2[key] !== undefined$1 : hasOwnProperty.call(data2, key);
1940
1958
  }
1941
1959
  function hashSet(key, value) {
1942
- var data = this.__data__;
1960
+ var data2 = this.__data__;
1943
1961
  this.size += this.has(key) ? 0 : 1;
1944
- data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
1962
+ data2[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
1945
1963
  return this;
1946
1964
  }
1947
1965
  Hash.prototype.clear = hashClear;
@@ -1962,33 +1980,33 @@ var __publicField = (obj, key, value) => {
1962
1980
  this.size = 0;
1963
1981
  }
1964
1982
  function listCacheDelete(key) {
1965
- var data = this.__data__, index = assocIndexOf(data, key);
1983
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1966
1984
  if (index < 0) {
1967
1985
  return false;
1968
1986
  }
1969
- var lastIndex = data.length - 1;
1987
+ var lastIndex = data2.length - 1;
1970
1988
  if (index == lastIndex) {
1971
- data.pop();
1989
+ data2.pop();
1972
1990
  } else {
1973
- splice.call(data, index, 1);
1991
+ splice.call(data2, index, 1);
1974
1992
  }
1975
1993
  --this.size;
1976
1994
  return true;
1977
1995
  }
1978
1996
  function listCacheGet(key) {
1979
- var data = this.__data__, index = assocIndexOf(data, key);
1980
- return index < 0 ? undefined$1 : data[index][1];
1997
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1998
+ return index < 0 ? undefined$1 : data2[index][1];
1981
1999
  }
1982
2000
  function listCacheHas(key) {
1983
2001
  return assocIndexOf(this.__data__, key) > -1;
1984
2002
  }
1985
2003
  function listCacheSet(key, value) {
1986
- var data = this.__data__, index = assocIndexOf(data, key);
2004
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1987
2005
  if (index < 0) {
1988
2006
  ++this.size;
1989
- data.push([key, value]);
2007
+ data2.push([key, value]);
1990
2008
  } else {
1991
- data[index][1] = value;
2009
+ data2[index][1] = value;
1992
2010
  }
1993
2011
  return this;
1994
2012
  }
@@ -2025,9 +2043,9 @@ var __publicField = (obj, key, value) => {
2025
2043
  return getMapData(this, key).has(key);
2026
2044
  }
2027
2045
  function mapCacheSet(key, value) {
2028
- var data = getMapData(this, key), size2 = data.size;
2029
- data.set(key, value);
2030
- this.size += data.size == size2 ? 0 : 1;
2046
+ var data2 = getMapData(this, key), size2 = data2.size;
2047
+ data2.set(key, value);
2048
+ this.size += data2.size == size2 ? 0 : 1;
2031
2049
  return this;
2032
2050
  }
2033
2051
  MapCache.prototype.clear = mapCacheClear;
@@ -2052,16 +2070,16 @@ var __publicField = (obj, key, value) => {
2052
2070
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
2053
2071
  SetCache.prototype.has = setCacheHas;
2054
2072
  function Stack(entries) {
2055
- var data = this.__data__ = new ListCache(entries);
2056
- this.size = data.size;
2073
+ var data2 = this.__data__ = new ListCache(entries);
2074
+ this.size = data2.size;
2057
2075
  }
2058
2076
  function stackClear() {
2059
2077
  this.__data__ = new ListCache();
2060
2078
  this.size = 0;
2061
2079
  }
2062
2080
  function stackDelete(key) {
2063
- var data = this.__data__, result2 = data["delete"](key);
2064
- this.size = data.size;
2081
+ var data2 = this.__data__, result2 = data2["delete"](key);
2082
+ this.size = data2.size;
2065
2083
  return result2;
2066
2084
  }
2067
2085
  function stackGet(key) {
@@ -2071,18 +2089,18 @@ var __publicField = (obj, key, value) => {
2071
2089
  return this.__data__.has(key);
2072
2090
  }
2073
2091
  function stackSet(key, value) {
2074
- var data = this.__data__;
2075
- if (data instanceof ListCache) {
2076
- var pairs = data.__data__;
2092
+ var data2 = this.__data__;
2093
+ if (data2 instanceof ListCache) {
2094
+ var pairs = data2.__data__;
2077
2095
  if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
2078
2096
  pairs.push([key, value]);
2079
- this.size = ++data.size;
2097
+ this.size = ++data2.size;
2080
2098
  return this;
2081
2099
  }
2082
- data = this.__data__ = new MapCache(pairs);
2100
+ data2 = this.__data__ = new MapCache(pairs);
2083
2101
  }
2084
- data.set(key, value);
2085
- this.size = data.size;
2102
+ data2.set(key, value);
2103
+ this.size = data2.size;
2086
2104
  return this;
2087
2105
  }
2088
2106
  Stack.prototype.clear = stackClear;
@@ -2501,15 +2519,15 @@ var __publicField = (obj, key, value) => {
2501
2519
  }
2502
2520
  object = Object2(object);
2503
2521
  while (index--) {
2504
- var data = matchData[index];
2505
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
2522
+ var data2 = matchData[index];
2523
+ if (noCustomizer && data2[2] ? data2[1] !== object[data2[0]] : !(data2[0] in object)) {
2506
2524
  return false;
2507
2525
  }
2508
2526
  }
2509
2527
  while (++index < length) {
2510
- data = matchData[index];
2511
- var key = data[0], objValue = object[key], srcValue = data[1];
2512
- if (noCustomizer && data[2]) {
2528
+ data2 = matchData[index];
2529
+ var key = data2[0], objValue = object[key], srcValue = data2[1];
2530
+ if (noCustomizer && data2[2]) {
2513
2531
  if (objValue === undefined$1 && !(key in object)) {
2514
2532
  return false;
2515
2533
  }
@@ -2812,8 +2830,8 @@ var __publicField = (obj, key, value) => {
2812
2830
  }
2813
2831
  return object;
2814
2832
  }
2815
- var baseSetData = !metaMap ? identity : function(func, data) {
2816
- metaMap.set(func, data);
2833
+ var baseSetData = !metaMap ? identity : function(func, data2) {
2834
+ metaMap.set(func, data2);
2817
2835
  return func;
2818
2836
  };
2819
2837
  var baseSetToString = !defineProperty ? identity : function(func, string) {
@@ -3317,9 +3335,9 @@ var __publicField = (obj, key, value) => {
3317
3335
  index = wrapper ? index : length;
3318
3336
  while (++index < length) {
3319
3337
  func = funcs[index];
3320
- var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
3321
- if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
3322
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
3338
+ var funcName = getFuncName(func), data2 = funcName == "wrapper" ? getData(func) : undefined$1;
3339
+ if (data2 && isLaziable(data2[0]) && data2[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data2[4].length && data2[9] == 1) {
3340
+ wrapper = wrapper[getFuncName(data2[0])].apply(wrapper, data2[3]);
3323
3341
  } else {
3324
3342
  wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
3325
3343
  }
@@ -3546,7 +3564,7 @@ var __publicField = (obj, key, value) => {
3546
3564
  var partialsRight = partials, holdersRight = holders;
3547
3565
  partials = holders = undefined$1;
3548
3566
  }
3549
- var data = isBindKey ? undefined$1 : getData(func);
3567
+ var data2 = isBindKey ? undefined$1 : getData(func);
3550
3568
  var newData = [
3551
3569
  func,
3552
3570
  bitmask,
@@ -3559,8 +3577,8 @@ var __publicField = (obj, key, value) => {
3559
3577
  ary2,
3560
3578
  arity
3561
3579
  ];
3562
- if (data) {
3563
- mergeData(newData, data);
3580
+ if (data2) {
3581
+ mergeData(newData, data2);
3564
3582
  }
3565
3583
  func = newData[0];
3566
3584
  bitmask = newData[1];
@@ -3580,7 +3598,7 @@ var __publicField = (obj, key, value) => {
3580
3598
  } else {
3581
3599
  result2 = createHybrid.apply(undefined$1, newData);
3582
3600
  }
3583
- var setter = data ? baseSetData : setData;
3601
+ var setter = data2 ? baseSetData : setData;
3584
3602
  return setWrapToString(setter(result2, newData), func, bitmask);
3585
3603
  }
3586
3604
  function customDefaultsAssignIn(objValue, srcValue, key, object) {
@@ -3747,9 +3765,9 @@ var __publicField = (obj, key, value) => {
3747
3765
  function getFuncName(func) {
3748
3766
  var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
3749
3767
  while (length--) {
3750
- var data = array[length], otherFunc = data.func;
3768
+ var data2 = array[length], otherFunc = data2.func;
3751
3769
  if (otherFunc == null || otherFunc == func) {
3752
- return data.name;
3770
+ return data2.name;
3753
3771
  }
3754
3772
  }
3755
3773
  return result2;
@@ -3764,8 +3782,8 @@ var __publicField = (obj, key, value) => {
3764
3782
  return arguments.length ? result2(arguments[0], arguments[1]) : result2;
3765
3783
  }
3766
3784
  function getMapData(map2, key) {
3767
- var data = map2.__data__;
3768
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
3785
+ var data2 = map2.__data__;
3786
+ return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
3769
3787
  }
3770
3788
  function getMatchData(object) {
3771
3789
  var result2 = keys(object), length = result2.length;
@@ -3837,8 +3855,8 @@ var __publicField = (obj, key, value) => {
3837
3855
  function getView(start, end, transforms) {
3838
3856
  var index = -1, length = transforms.length;
3839
3857
  while (++index < length) {
3840
- var data = transforms[index], size2 = data.size;
3841
- switch (data.type) {
3858
+ var data2 = transforms[index], size2 = data2.size;
3859
+ switch (data2.type) {
3842
3860
  case "drop":
3843
3861
  start += size2;
3844
3862
  break;
@@ -3933,16 +3951,16 @@ var __publicField = (obj, key, value) => {
3933
3951
  return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
3934
3952
  }
3935
3953
  function isIndex(value, length) {
3936
- var type = typeof value;
3954
+ var type2 = typeof value;
3937
3955
  length = length == null ? MAX_SAFE_INTEGER : length;
3938
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3956
+ return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3939
3957
  }
3940
3958
  function isIterateeCall(value, index, object) {
3941
3959
  if (!isObject(object)) {
3942
3960
  return false;
3943
3961
  }
3944
- var type = typeof index;
3945
- if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
3962
+ var type2 = typeof index;
3963
+ if (type2 == "number" ? isArrayLike(object) && isIndex(index, object.length) : type2 == "string" && index in object) {
3946
3964
  return eq(object[index], value);
3947
3965
  }
3948
3966
  return false;
@@ -3951,15 +3969,15 @@ var __publicField = (obj, key, value) => {
3951
3969
  if (isArray(value)) {
3952
3970
  return false;
3953
3971
  }
3954
- var type = typeof value;
3955
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
3972
+ var type2 = typeof value;
3973
+ if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value == null || isSymbol(value)) {
3956
3974
  return true;
3957
3975
  }
3958
3976
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
3959
3977
  }
3960
3978
  function isKeyable(value) {
3961
- var type = typeof value;
3962
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
3979
+ var type2 = typeof value;
3980
+ return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
3963
3981
  }
3964
3982
  function isLaziable(func) {
3965
3983
  var funcName = getFuncName(func), other = lodash2[funcName];
@@ -3969,8 +3987,8 @@ var __publicField = (obj, key, value) => {
3969
3987
  if (func === other) {
3970
3988
  return true;
3971
3989
  }
3972
- var data = getData(other);
3973
- return !!data && func === data[0];
3990
+ var data2 = getData(other);
3991
+ return !!data2 && func === data2[0];
3974
3992
  }
3975
3993
  function isMasked(func) {
3976
3994
  return !!maskSrcKey && maskSrcKey in func;
@@ -4001,41 +4019,41 @@ var __publicField = (obj, key, value) => {
4001
4019
  var cache = result2.cache;
4002
4020
  return result2;
4003
4021
  }
4004
- function mergeData(data, source) {
4005
- var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
4006
- var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
4022
+ function mergeData(data2, source) {
4023
+ var bitmask = data2[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
4024
+ var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data2[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
4007
4025
  if (!(isCommon || isCombo)) {
4008
- return data;
4026
+ return data2;
4009
4027
  }
4010
4028
  if (srcBitmask & WRAP_BIND_FLAG) {
4011
- data[2] = source[2];
4029
+ data2[2] = source[2];
4012
4030
  newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
4013
4031
  }
4014
4032
  var value = source[3];
4015
4033
  if (value) {
4016
- var partials = data[3];
4017
- data[3] = partials ? composeArgs(partials, value, source[4]) : value;
4018
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
4034
+ var partials = data2[3];
4035
+ data2[3] = partials ? composeArgs(partials, value, source[4]) : value;
4036
+ data2[4] = partials ? replaceHolders(data2[3], PLACEHOLDER) : source[4];
4019
4037
  }
4020
4038
  value = source[5];
4021
4039
  if (value) {
4022
- partials = data[5];
4023
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
4024
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
4040
+ partials = data2[5];
4041
+ data2[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
4042
+ data2[6] = partials ? replaceHolders(data2[5], PLACEHOLDER) : source[6];
4025
4043
  }
4026
4044
  value = source[7];
4027
4045
  if (value) {
4028
- data[7] = value;
4046
+ data2[7] = value;
4029
4047
  }
4030
4048
  if (srcBitmask & WRAP_ARY_FLAG) {
4031
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
4049
+ data2[8] = data2[8] == null ? source[8] : nativeMin(data2[8], source[8]);
4032
4050
  }
4033
- if (data[9] == null) {
4034
- data[9] = source[9];
4051
+ if (data2[9] == null) {
4052
+ data2[9] = source[9];
4035
4053
  }
4036
- data[0] = source[0];
4037
- data[1] = newBitmask;
4038
- return data;
4054
+ data2[0] = source[0];
4055
+ data2[1] = newBitmask;
4056
+ return data2;
4039
4057
  }
4040
4058
  function nativeKeysIn(object) {
4041
4059
  var result2 = [];
@@ -4904,7 +4922,7 @@ var __publicField = (obj, key, value) => {
4904
4922
  lastArgs = lastThis = undefined$1;
4905
4923
  return result2;
4906
4924
  }
4907
- function cancel() {
4925
+ function cancel2() {
4908
4926
  if (timerId !== undefined$1) {
4909
4927
  clearTimeout2(timerId);
4910
4928
  }
@@ -4934,7 +4952,7 @@ var __publicField = (obj, key, value) => {
4934
4952
  }
4935
4953
  return result2;
4936
4954
  }
4937
- debounced.cancel = cancel;
4955
+ debounced.cancel = cancel2;
4938
4956
  debounced.flush = flush;
4939
4957
  return debounced;
4940
4958
  }
@@ -5154,8 +5172,8 @@ var __publicField = (obj, key, value) => {
5154
5172
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
5155
5173
  }
5156
5174
  function isObject(value) {
5157
- var type = typeof value;
5158
- return value != null && (type == "object" || type == "function");
5175
+ var type2 = typeof value;
5176
+ return value != null && (type2 == "object" || type2 == "function");
5159
5177
  }
5160
5178
  function isObjectLike(value) {
5161
5179
  return value != null && typeof value == "object";
@@ -5301,7 +5319,7 @@ var __publicField = (obj, key, value) => {
5301
5319
  copyObject(source, keys(source), object, customizer);
5302
5320
  });
5303
5321
  var at = flatRest(baseAt);
5304
- function create(prototype, properties) {
5322
+ function create2(prototype, properties) {
5305
5323
  var result2 = baseCreate(prototype);
5306
5324
  return properties == null ? result2 : baseAssign(result2, properties);
5307
5325
  }
@@ -6048,7 +6066,7 @@ var __publicField = (obj, key, value) => {
6048
6066
  lodash2.conforms = conforms;
6049
6067
  lodash2.constant = constant;
6050
6068
  lodash2.countBy = countBy;
6051
- lodash2.create = create;
6069
+ lodash2.create = create2;
6052
6070
  lodash2.curry = curry;
6053
6071
  lodash2.curryRight = curryRight;
6054
6072
  lodash2.debounce = debounce;
@@ -6366,12 +6384,12 @@ var __publicField = (obj, key, value) => {
6366
6384
  };
6367
6385
  });
6368
6386
  arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
6369
- var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
6387
+ var type2 = index + 1, isFilter = type2 == LAZY_FILTER_FLAG || type2 == LAZY_WHILE_FLAG;
6370
6388
  LazyWrapper.prototype[methodName] = function(iteratee2) {
6371
6389
  var result2 = this.clone();
6372
6390
  result2.__iteratees__.push({
6373
6391
  "iteratee": getIteratee(iteratee2, 3),
6374
- "type": type
6392
+ "type": type2
6375
6393
  });
6376
6394
  result2.__filtered__ = result2.__filtered__ || isFilter;
6377
6395
  return result2;
@@ -6939,14 +6957,14 @@ var __publicField = (obj, key, value) => {
6939
6957
  function NamespaceSelectWidget(props) {
6940
6958
  const kit = eagle.useUIKit();
6941
6959
  const { action } = core.useResource();
6942
- const { data } = core.useList({
6960
+ const { data: data2 } = core.useList({
6943
6961
  resource: "namespaces",
6944
6962
  meta: {
6945
6963
  resourceBasePath: "/api/v1",
6946
6964
  kind: "Namespace"
6947
6965
  }
6948
6966
  });
6949
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.select, { input: props, disabled: action === "edit", children: data == null ? void 0 : data.data.map((namespace) => /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: namespace.metadata.name, children: namespace.metadata.name }, namespace.metadata.name)) });
6967
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.select, { input: props, disabled: action === "edit", children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name)) });
6950
6968
  }
6951
6969
  const namespaceRules = [
6952
6970
  {
@@ -7210,16 +7228,16 @@ var __publicField = (obj, key, value) => {
7210
7228
  }
7211
7229
  });
7212
7230
  class ResourceModel {
7213
- constructor(data) {
7231
+ constructor(data2) {
7214
7232
  __publicField(this, "id");
7215
7233
  __publicField(this, "apiVersion");
7216
7234
  __publicField(this, "kind");
7217
7235
  __publicField(this, "metadata");
7218
- this.data = data;
7219
- this.id = data.id;
7220
- this.apiVersion = data.apiVersion;
7221
- this.kind = data.kind;
7222
- this.metadata = data.metadata;
7236
+ this.data = data2;
7237
+ this.id = data2.id;
7238
+ this.apiVersion = data2.apiVersion;
7239
+ this.kind = data2.kind;
7240
+ this.metadata = data2.metadata;
7223
7241
  }
7224
7242
  get name() {
7225
7243
  var _a;
@@ -7552,7 +7570,7 @@ var __publicField = (obj, key, value) => {
7552
7570
  document.execCommand("copy");
7553
7571
  document.body.removeChild(input);
7554
7572
  }
7555
- function getCommonErrors(response, i18n) {
7573
+ function getCommonErrors(response, i18n2) {
7556
7574
  var _a;
7557
7575
  if (!((response == null ? void 0 : response.message) || (response == null ? void 0 : response.code) || (response == null ? void 0 : response.reason) || (response == null ? void 0 : response.details) || (response == null ? void 0 : response.graphQLErrors))) {
7558
7576
  return [];
@@ -7561,17 +7579,17 @@ var __publicField = (obj, key, value) => {
7561
7579
  if (causes.length) {
7562
7580
  return causes.map((cause) => {
7563
7581
  let params = {};
7564
- let message = cause.message;
7582
+ let message2 = cause.message;
7565
7583
  try {
7566
7584
  const info = JSON.parse(cause.message);
7567
7585
  params = info.params;
7568
- message = info.message;
7586
+ message2 = info.message;
7569
7587
  } catch {
7570
- return i18n.t(
7588
+ return i18n2.t(
7571
7589
  [
7572
7590
  `error.${cause.reason}`,
7573
7591
  `error.${cause.code}`,
7574
- `${message}${cause.field ? `(${cause.field})` : ""}`
7592
+ `${message2}${cause.field ? `(${cause.field})` : ""}`
7575
7593
  ],
7576
7594
  {
7577
7595
  ...params,
@@ -7579,11 +7597,11 @@ var __publicField = (obj, key, value) => {
7579
7597
  }
7580
7598
  );
7581
7599
  }
7582
- return i18n.t(
7600
+ return i18n2.t(
7583
7601
  [
7584
7602
  `error.${cause.reason}`,
7585
7603
  `error.${cause.code}`,
7586
- `${message}${cause.field ? `(${cause.field})` : ""}`
7604
+ `${message2}${cause.field ? `(${cause.field})` : ""}`
7587
7605
  ],
7588
7606
  {
7589
7607
  ...params,
@@ -7593,7 +7611,7 @@ var __publicField = (obj, key, value) => {
7593
7611
  });
7594
7612
  }
7595
7613
  return [
7596
- i18n.t(
7614
+ i18n2.t(
7597
7615
  [`error.${response.code}`, `error.${response.reason}`, response.message || ""],
7598
7616
  { fallbackLng: "" }
7599
7617
  )
@@ -7613,9 +7631,9 @@ var __publicField = (obj, key, value) => {
7613
7631
  const kit = eagle.useUIKit();
7614
7632
  const {
7615
7633
  t,
7616
- i18n
7634
+ i18n: i18n2
7617
7635
  } = useTranslation();
7618
- const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n) : [];
7636
+ const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n2) : [];
7619
7637
  return /* @__PURE__ */ jsxRuntime.exports.jsx(FormLayout, {
7620
7638
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(kit.form, {
7621
7639
  ...formProps,
@@ -7716,15 +7734,15 @@ var __publicField = (obj, key, value) => {
7716
7734
  }
7717
7735
  function useDownloadYAML() {
7718
7736
  return function(options) {
7719
- const { name, item } = options;
7737
+ const { name: name2, item } = options;
7720
7738
  const content = yaml__default.default.dump(item);
7721
- download(`${name}.yaml`, content);
7739
+ download(`${name2}.yaml`, content);
7722
7740
  };
7723
7741
  }
7724
7742
  function useEdit() {
7725
7743
  const { resource } = core.useParsed();
7726
7744
  const go = core.useGo();
7727
- const edit = React.useCallback(
7745
+ const edit2 = React.useCallback(
7728
7746
  (id) => {
7729
7747
  go({
7730
7748
  to: `/${resource == null ? void 0 : resource.name}/edit`,
@@ -7735,14 +7753,14 @@ var __publicField = (obj, key, value) => {
7735
7753
  },
7736
7754
  [go, resource == null ? void 0 : resource.name]
7737
7755
  );
7738
- return { edit };
7756
+ return { edit: edit2 };
7739
7757
  }
7740
7758
  function K8sDropdown(props) {
7741
- const { data } = props;
7759
+ const { data: data2 } = props;
7742
7760
  const kit = eagle.useUIKit();
7743
7761
  const useResourceResult = core.useResource();
7744
7762
  const resource = useResourceResult.resource;
7745
- const { edit } = useEdit();
7763
+ const { edit: edit2 } = useEdit();
7746
7764
  const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
7747
7765
  (resource == null ? void 0 : resource.name) || ""
7748
7766
  );
@@ -7757,8 +7775,8 @@ var __publicField = (obj, key, value) => {
7757
7775
  kit.menuItem,
7758
7776
  {
7759
7777
  onClick: () => {
7760
- if (data.id) {
7761
- edit(data.id);
7778
+ if (data2.id) {
7779
+ edit2(data2.id);
7762
7780
  }
7763
7781
  },
7764
7782
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: t("edit") })
@@ -7769,7 +7787,7 @@ var __publicField = (obj, key, value) => {
7769
7787
  {
7770
7788
  danger: true,
7771
7789
  onClick: () => {
7772
- openDeleteConfirmModal(data.id);
7790
+ openDeleteConfirmModal(data2.id);
7773
7791
  },
7774
7792
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.TrashBinDelete16Icon, children: t("delete") })
7775
7793
  }
@@ -7779,10 +7797,10 @@ var __publicField = (obj, key, value) => {
7779
7797
  {
7780
7798
  onClick: () => {
7781
7799
  var _a;
7782
- if (data.id) {
7800
+ if (data2.id) {
7783
7801
  download2({
7784
- name: ((_a = data.metadata) == null ? void 0 : _a.name) || data.kind || "",
7785
- item: data
7802
+ name: ((_a = data2.metadata) == null ? void 0 : _a.name) || data2.kind || "",
7803
+ item: data2
7786
7804
  });
7787
7805
  }
7788
7806
  },
@@ -7937,7 +7955,7 @@ var __publicField = (obj, key, value) => {
7937
7955
  const NamespacesFilter = () => {
7938
7956
  const kit = eagle.useUIKit();
7939
7957
  const { t } = useTranslation();
7940
- const { data } = core.useList({
7958
+ const { data: data2 } = core.useList({
7941
7959
  resource: "namespaces",
7942
7960
  meta: {
7943
7961
  resourceBasePath: "/api/v1",
@@ -7956,9 +7974,9 @@ var __publicField = (obj, key, value) => {
7956
7974
  },
7957
7975
  children: [
7958
7976
  /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: "_all", children: t("dovetail.all_namespaces") }, "_all"),
7959
- data == null ? void 0 : data.data.map((namespace) => {
7960
- const { name } = namespace.metadata;
7961
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: name, children: name }, name);
7977
+ data2 == null ? void 0 : data2.data.map((namespace2) => {
7978
+ const { name: name2 } = namespace2.metadata;
7979
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: name2, children: name2 }, name2);
7962
7980
  })
7963
7981
  ]
7964
7982
  }
@@ -8018,7 +8036,7 @@ var __publicField = (obj, key, value) => {
8018
8036
  return { tableProps: finalProps, selectedKeys, ...table };
8019
8037
  };
8020
8038
  const index_86mllf = "";
8021
- const StateTag = ({ state }) => {
8039
+ const StateTag = ({ state: state2 }) => {
8022
8040
  const kit = eagle.useUIKit();
8023
8041
  const colorMap = {
8024
8042
  running: "green",
@@ -8027,7 +8045,7 @@ var __publicField = (obj, key, value) => {
8027
8045
  terminated: "red",
8028
8046
  pending: "gray"
8029
8047
  };
8030
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.tag, { color: colorMap[(state == null ? void 0 : state.toLowerCase()) || ""] || "green", children: state || "Active" });
8048
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.tag, { color: colorMap[(state2 == null ? void 0 : state2.toLowerCase()) || ""] || "green", children: state2 || "Active" });
8031
8049
  };
8032
8050
  var dayjs_min = { exports: {} };
8033
8051
  (function(module2, exports3) {
@@ -8352,7 +8370,7 @@ var __publicField = (obj, key, value) => {
8352
8370
  const index_1wf16rt = "";
8353
8371
  const NameLink = (props) => {
8354
8372
  var _a;
8355
- const { name, id, resource } = props;
8373
+ const { name: name2, id, resource } = props;
8356
8374
  const kit = eagle.useUIKit();
8357
8375
  const go = core.useGo();
8358
8376
  const navigation = core.useNavigation();
@@ -8370,7 +8388,7 @@ var __publicField = (obj, key, value) => {
8370
8388
  }
8371
8389
  });
8372
8390
  },
8373
- children: name
8391
+ children: name2
8374
8392
  }
8375
8393
  );
8376
8394
  };
@@ -8526,13 +8544,13 @@ var __publicField = (obj, key, value) => {
8526
8544
  const { vars } = options;
8527
8545
  if (vars) {
8528
8546
  const style2 = {};
8529
- for (const name in vars) {
8530
- const variable = vars[name];
8547
+ for (const name2 in vars) {
8548
+ const variable = vars[name2];
8531
8549
  const result = variable[0];
8532
8550
  const unit = variable[1] || "";
8533
8551
  const value = typeof result === "function" ? result(props) : result;
8534
8552
  warnIfInvalid(value, options.name);
8535
- style2[`--${name}`] = `${value}${unit}`;
8553
+ style2[`--${name2}`] = `${value}${unit}`;
8536
8554
  }
8537
8555
  const ownStyle = filteredProps.style || {};
8538
8556
  const keys = Object.keys(ownStyle);
@@ -8649,14 +8667,14 @@ var __publicField = (obj, key, value) => {
8649
8667
  }
8650
8668
  function CreateButton() {
8651
8669
  const { resource } = core.useResource();
8652
- const { create } = core.useNavigation();
8670
+ const { create: create2 } = core.useNavigation();
8653
8671
  const kit = eagle.useUIKit();
8654
8672
  const { t } = useTranslation();
8655
8673
  const onClick = React.useCallback(() => {
8656
8674
  if (resource == null ? void 0 : resource.name) {
8657
- create(resource.name);
8675
+ create2(resource.name);
8658
8676
  }
8659
- }, [create, resource == null ? void 0 : resource.name]);
8677
+ }, [create2, resource == null ? void 0 : resource.name]);
8660
8678
  return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", onClick, children: t("create") });
8661
8679
  }
8662
8680
  const useDeleteManyModal = (resource, ids) => {
@@ -8747,14 +8765,14 @@ var __publicField = (obj, key, value) => {
8747
8765
  });
8748
8766
  }
8749
8767
  function ResourceList(props) {
8750
- const { formatter, name, columns, Dropdown } = props;
8751
- const { i18n } = useTranslation();
8768
+ const { formatter, name: name2, columns, Dropdown } = props;
8769
+ const { i18n: i18n2 } = useTranslation();
8752
8770
  const { tableProps, selectedKeys } = useEagleTable({
8753
8771
  useTableParams: {},
8754
8772
  columns: [
8755
- PhaseColumnRenderer(i18n),
8756
- NameColumnRenderer(i18n),
8757
- NameSpaceColumnRenderer(i18n),
8773
+ PhaseColumnRenderer(i18n2),
8774
+ NameColumnRenderer(i18n2),
8775
+ NameSpaceColumnRenderer(i18n2),
8758
8776
  ...columns
8759
8777
  ],
8760
8778
  tableProps: {
@@ -8763,7 +8781,7 @@ var __publicField = (obj, key, value) => {
8763
8781
  formatter,
8764
8782
  Dropdown
8765
8783
  });
8766
- return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name || "", selectedKeys, tableProps });
8784
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
8767
8785
  }
8768
8786
  const index_1hr2h38 = "";
8769
8787
  const index_m52iq6 = "";
@@ -8963,12 +8981,12 @@ var __publicField = (obj, key, value) => {
8963
8981
  t
8964
8982
  } = useTranslation();
8965
8983
  const {
8966
- data
8984
+ data: data2
8967
8985
  } = queryResult;
8968
- if (!(data == null ? void 0 : data.data)) {
8986
+ if (!(data2 == null ? void 0 : data2.data)) {
8969
8987
  return null;
8970
8988
  }
8971
- const record = formatter(data == null ? void 0 : data.data);
8989
+ const record = formatter(data2 == null ? void 0 : data2.data);
8972
8990
  const FirstLineFields = [{
8973
8991
  key: "NameSpace",
8974
8992
  title: t("namespace"),
@@ -9122,7 +9140,7 @@ var __publicField = (obj, key, value) => {
9122
9140
  }
9123
9141
  const ResourceCRUD = (props) => {
9124
9142
  const { configs, urlPrefix } = props;
9125
- const { i18n } = useTranslation();
9143
+ const { i18n: i18n2 } = useTranslation();
9126
9144
  return /* @__PURE__ */ jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: configs.map((config) => {
9127
9145
  var _a, _b;
9128
9146
  const formatter = config.formatter || ((v2) => new ResourceModel(v2));
@@ -9132,7 +9150,7 @@ var __publicField = (obj, key, value) => {
9132
9150
  {
9133
9151
  name: config.kind,
9134
9152
  formatter,
9135
- columns: ((_a = config.columns) == null ? void 0 : _a.call(config, i18n)) || [],
9153
+ columns: ((_a = config.columns) == null ? void 0 : _a.call(config, i18n2)) || [],
9136
9154
  Dropdown: config.Dropdown
9137
9155
  }
9138
9156
  ) }),
@@ -9140,7 +9158,7 @@ var __publicField = (obj, key, value) => {
9140
9158
  ResourceShow,
9141
9159
  {
9142
9160
  formatter,
9143
- filedGroups: ((_b = config.showFields) == null ? void 0 : _b.call(config, i18n)) || [],
9161
+ filedGroups: ((_b = config.showFields) == null ? void 0 : _b.call(config, i18n2)) || [],
9144
9162
  Dropdown: config.Dropdown
9145
9163
  }
9146
9164
  ) }),
@@ -9769,12 +9787,12 @@ var __publicField = (obj, key, value) => {
9769
9787
  return result;
9770
9788
  }
9771
9789
  var isProduction$1 = process.env.NODE_ENV === "production";
9772
- function warning(condition, message) {
9790
+ function warning(condition2, message2) {
9773
9791
  if (!isProduction$1) {
9774
- if (condition) {
9792
+ if (condition2) {
9775
9793
  return;
9776
9794
  }
9777
- var text = "Warning: " + message;
9795
+ var text = "Warning: " + message2;
9778
9796
  if (typeof console !== "undefined") {
9779
9797
  console.warn(text);
9780
9798
  }
@@ -9786,14 +9804,14 @@ var __publicField = (obj, key, value) => {
9786
9804
  }
9787
9805
  var isProduction = process.env.NODE_ENV === "production";
9788
9806
  var prefix = "Invariant failed";
9789
- function invariant(condition, message) {
9790
- if (condition) {
9807
+ function invariant(condition2, message2) {
9808
+ if (condition2) {
9791
9809
  return;
9792
9810
  }
9793
9811
  if (isProduction) {
9794
9812
  throw new Error(prefix);
9795
9813
  }
9796
- var provided = typeof message === "function" ? message() : message;
9814
+ var provided = typeof message2 === "function" ? message2() : message2;
9797
9815
  var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
9798
9816
  throw new Error(value);
9799
9817
  }
@@ -9841,11 +9859,11 @@ var __publicField = (obj, key, value) => {
9841
9859
  path += hash.charAt(0) === "#" ? hash : "#" + hash;
9842
9860
  return path;
9843
9861
  }
9844
- function createLocation(path, state, key, currentLocation) {
9862
+ function createLocation(path, state2, key, currentLocation) {
9845
9863
  var location2;
9846
9864
  if (typeof path === "string") {
9847
9865
  location2 = parsePath(path);
9848
- location2.state = state;
9866
+ location2.state = state2;
9849
9867
  } else {
9850
9868
  location2 = _extends({}, path);
9851
9869
  if (location2.pathname === void 0)
@@ -9862,8 +9880,8 @@ var __publicField = (obj, key, value) => {
9862
9880
  } else {
9863
9881
  location2.hash = "";
9864
9882
  }
9865
- if (state !== void 0 && location2.state === void 0)
9866
- location2.state = state;
9883
+ if (state2 !== void 0 && location2.state === void 0)
9884
+ location2.state = state2;
9867
9885
  }
9868
9886
  try {
9869
9887
  location2.pathname = decodeURI(location2.pathname);
@@ -9947,8 +9965,8 @@ var __publicField = (obj, key, value) => {
9947
9965
  };
9948
9966
  }
9949
9967
  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
9950
- function getConfirmation(message, callback) {
9951
- callback(window.confirm(message));
9968
+ function getConfirmation(message2, callback) {
9969
+ callback(window.confirm(message2));
9952
9970
  }
9953
9971
  function supportsGoWithoutReloadUsingHash() {
9954
9972
  return window.navigator.userAgent.indexOf("Firefox") === -1;
@@ -10077,8 +10095,8 @@ var __publicField = (obj, key, value) => {
10077
10095
  }
10078
10096
  return href + "#" + encodePath(basename + createPath(location2));
10079
10097
  }
10080
- function push(path2, state) {
10081
- process.env.NODE_ENV !== "production" ? warning(state === void 0, "Hash history cannot push state; it is ignored") : void 0;
10098
+ function push(path2, state2) {
10099
+ process.env.NODE_ENV !== "production" ? warning(state2 === void 0, "Hash history cannot push state; it is ignored") : void 0;
10082
10100
  var action = "PUSH";
10083
10101
  var location2 = createLocation(path2, void 0, void 0, history2.location);
10084
10102
  transitionManager.confirmTransitionTo(location2, action, getUserConfirmation, function(ok) {
@@ -10104,8 +10122,8 @@ var __publicField = (obj, key, value) => {
10104
10122
  }
10105
10123
  });
10106
10124
  }
10107
- function replace(path2, state) {
10108
- process.env.NODE_ENV !== "production" ? warning(state === void 0, "Hash history cannot replace state; it is ignored") : void 0;
10125
+ function replace(path2, state2) {
10126
+ process.env.NODE_ENV !== "production" ? warning(state2 === void 0, "Hash history cannot replace state; it is ignored") : void 0;
10109
10127
  var action = "REPLACE";
10110
10128
  var location2 = createLocation(path2, void 0, void 0, history2.location);
10111
10129
  transitionManager.confirmTransitionTo(location2, action, getUserConfirmation, function(ok) {
@@ -10256,6 +10274,148 @@ var __publicField = (obj, key, value) => {
10256
10274
  })]
10257
10275
  });
10258
10276
  };
10277
+ const copy$1 = "Copy";
10278
+ const reset_arguments$1 = "Reset";
10279
+ const view_changes$1 = "Show Diff";
10280
+ const back_to_edit$1 = "Edit";
10281
+ const configure_file$1 = "Configuration";
10282
+ const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
10283
+ const yaml_value_wrong$1 = "Configuration has invalid values.";
10284
+ const edit_yaml$1 = "Edit YAML";
10285
+ const copied$1 = "Copied";
10286
+ const already_reset$1 = "Already reset";
10287
+ const dovetail$1 = {
10288
+ copy: copy$1,
10289
+ reset_arguments: reset_arguments$1,
10290
+ view_changes: view_changes$1,
10291
+ back_to_edit: back_to_edit$1,
10292
+ configure_file: configure_file$1,
10293
+ yaml_format_wrong: yaml_format_wrong$1,
10294
+ yaml_value_wrong: yaml_value_wrong$1,
10295
+ edit_yaml: edit_yaml$1,
10296
+ copied: copied$1,
10297
+ already_reset: already_reset$1
10298
+ };
10299
+ const EN = {
10300
+ dovetail: dovetail$1
10301
+ };
10302
+ const copy = "\u590D\u5236";
10303
+ const reset_arguments = "\u91CD\u7F6E";
10304
+ const view_changes = "\u67E5\u770B\u6539\u52A8";
10305
+ const back_to_edit = "\u7F16\u8F91";
10306
+ const configure_file = "\u914D\u7F6E\u5185\u5BB9";
10307
+ const yaml_format_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E0D\u662F\u6709\u6548\u7684 yaml \u683C\u5F0F\u3002";
10308
+ const yaml_value_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E2D\u5B58\u5728\u4E0D\u5408\u6CD5\u7684\u503C\u3002";
10309
+ const edit_yaml = "\u7F16\u8F91 YAML";
10310
+ const copied = "\u5DF2\u590D\u5236";
10311
+ const already_reset = "\u5DF2\u91CD\u7F6E";
10312
+ const cancel = "\u53D6\u6D88";
10313
+ const create = "\u521B\u5EFA";
10314
+ const confirm_delete_text = "\u786E\u5B9A\u8981\u5220\u9664 {{target}} \u5417\uFF1F";
10315
+ const edit = "\u7F16\u8F91";
10316
+ const namespace = "\u540D\u5B57\u7A7A\u95F4";
10317
+ const name = "\u540D\u5B57";
10318
+ const state = "\u72B6\u6001";
10319
+ const status = "\u72B6\u6001";
10320
+ const phase = "\u72B6\u6001";
10321
+ const image = "\u955C\u50CF";
10322
+ const replicas = "\u526F\u672C\u6570";
10323
+ const created_time = "\u521B\u5EFA\u65F6\u95F4";
10324
+ const label = "\u6807\u7B7E";
10325
+ const annotation = "\u6CE8\u91CA";
10326
+ const type = "\u7C7B\u578B";
10327
+ const condition = "Condition";
10328
+ const download_yaml = "\u4E0B\u8F7D YAML";
10329
+ const detail = "\u8BE6\u60C5";
10330
+ const node_name = "\u4E3B\u673A\u540D\u79F0";
10331
+ const restarts = "\u91CD\u542F\u6B21\u6570";
10332
+ const updated_time = "\u66F4\u65B0\u65F6\u95F4";
10333
+ const message = "\u6D88\u606F";
10334
+ const save = "\u4FDD\u5B58";
10335
+ const more = "\u66F4\u591A";
10336
+ const workload = "\u5DE5\u4F5C\u8D1F\u8F7D";
10337
+ const all_namespaces = "\u6240\u6709\u540D\u5B57\u7A7A\u95F4";
10338
+ const empty = "\u65E0\u53EF\u663E\u793A\u7684\u6570\u636E";
10339
+ const schedule = "\u8C03\u5EA6";
10340
+ const lastScheduleTime = "\u4E0A\u6B21\u8C03\u5EA6";
10341
+ const duration = "\u6301\u7EED\u65F6\u95F4";
10342
+ const completions = "\u5B8C\u6210 Job \u5386\u53F2\u6570";
10343
+ const started = "\u5F00\u59CB\u65F6\u95F4";
10344
+ const ready = "\u5C31\u7EEA";
10345
+ const init_container = "\u521D\u59CB\u5316\u5BB9\u5668";
10346
+ const container = "\u5BB9\u5668";
10347
+ const redeploy = "\u91CD\u65B0\u90E8\u7F72";
10348
+ const data = "\u6570\u636E";
10349
+ const suspend = "\u6682\u505C";
10350
+ const resume = "\u91CD\u65B0\u5F00\u59CB";
10351
+ const dovetail = {
10352
+ copy,
10353
+ reset_arguments,
10354
+ view_changes,
10355
+ back_to_edit,
10356
+ configure_file,
10357
+ yaml_format_wrong,
10358
+ yaml_value_wrong,
10359
+ edit_yaml,
10360
+ copied,
10361
+ already_reset,
10362
+ cancel,
10363
+ "delete": "\u5220\u9664",
10364
+ create,
10365
+ confirm_delete_text,
10366
+ edit,
10367
+ namespace,
10368
+ name,
10369
+ state,
10370
+ status,
10371
+ phase,
10372
+ image,
10373
+ replicas,
10374
+ created_time,
10375
+ label,
10376
+ annotation,
10377
+ type,
10378
+ condition,
10379
+ download_yaml,
10380
+ detail,
10381
+ node_name,
10382
+ restarts,
10383
+ updated_time,
10384
+ message,
10385
+ save,
10386
+ more,
10387
+ workload,
10388
+ all_namespaces,
10389
+ empty,
10390
+ schedule,
10391
+ lastScheduleTime,
10392
+ duration,
10393
+ completions,
10394
+ started,
10395
+ ready,
10396
+ init_container,
10397
+ container,
10398
+ redeploy,
10399
+ data,
10400
+ suspend,
10401
+ resume
10402
+ };
10403
+ const ZH = {
10404
+ dovetail
10405
+ };
10406
+ const resources = {
10407
+ "en-US": EN,
10408
+ "zh-CN": ZH
10409
+ };
10410
+ i18n__default.default.use(initReactI18next).init({
10411
+ supportedLngs: ["en-US", "zh-CN"],
10412
+ resources,
10413
+ ns: Object.keys(resources["zh-CN"]),
10414
+ defaultNS: "dovetail",
10415
+ fallbackLng: ["en-US", "zh-CN"],
10416
+ lng: "zh-CN",
10417
+ nsSeparator: "."
10418
+ });
10259
10419
  const styles = "";
10260
10420
  const antd = "";
10261
10421
  const style = "";