@next-bricks/form 0.17.2 → 0.17.3

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 (29) hide show
  1. package/dist/bricks.json +8 -2
  2. package/dist/chunks/{2179.3e04e6f6.js → 2179.b0d8286f.js} +2 -2
  3. package/dist/chunks/{6205.dd759a66.js.map → 2179.b0d8286f.js.map} +1 -1
  4. package/dist/chunks/{6205.dd759a66.js → 6205.e4c2805d.js} +2 -2
  5. package/dist/chunks/{2179.3e04e6f6.js.map → 6205.e4c2805d.js.map} +1 -1
  6. package/dist/chunks/{3394.fb8380b0.js → 6588.8163a616.js} +2 -2
  7. package/dist/chunks/6588.8163a616.js.map +1 -0
  8. package/dist/chunks/{7164.0fd06349.js → 7164.9248fe3a.js} +2 -2
  9. package/dist/chunks/{7164.0fd06349.js.map → 7164.9248fe3a.js.map} +1 -1
  10. package/dist/chunks/{7782.2ab50c07.js → 7782.5ae83019.js} +2 -2
  11. package/dist/chunks/{7782.2ab50c07.js.map → 7782.5ae83019.js.map} +1 -1
  12. package/dist/chunks/eo-auto-complete.b9e9cc9b.js +3 -0
  13. package/dist/chunks/eo-auto-complete.b9e9cc9b.js.LICENSE.txt +5 -0
  14. package/dist/chunks/eo-auto-complete.b9e9cc9b.js.map +1 -0
  15. package/dist/chunks/{main.c997d37b.js → main.59545a10.js} +2 -2
  16. package/dist/chunks/{main.c997d37b.js.map → main.59545a10.js.map} +1 -1
  17. package/dist/examples.json +3 -0
  18. package/dist/index.d731ecce.js +2 -0
  19. package/dist/index.d731ecce.js.map +1 -0
  20. package/dist/manifest.json +82 -0
  21. package/dist/types.json +267 -0
  22. package/dist-types/auto-complete/index.d.ts +80 -0
  23. package/dist-types/auto-complete/index.spec.d.ts +1 -0
  24. package/dist-types/bootstrap.d.ts +1 -0
  25. package/docs/eo-auto-complete.md +105 -0
  26. package/package.json +2 -2
  27. package/dist/chunks/3394.fb8380b0.js.map +0 -1
  28. package/dist/index.97b2f7dc.js +0 -2
  29. package/dist/index.97b2f7dc.js.map +0 -1
package/dist/bricks.json CHANGED
@@ -29,7 +29,8 @@
29
29
  "eo-icon-select",
30
30
  "eo-upload-image",
31
31
  "eo-switch",
32
- "eo-upload-file"
32
+ "eo-upload-file",
33
+ "eo-auto-complete"
33
34
  ],
34
35
  "processors": [],
35
36
  "dependencies": {
@@ -144,7 +145,12 @@
144
145
  "eo-icon",
145
146
  "eo-easyops-icon",
146
147
  "eo-form-item"
148
+ ],
149
+ "eo-auto-complete": [
150
+ "eo-form-item",
151
+ "eo-input",
152
+ "eo-icon"
147
153
  ]
148
154
  },
149
- "filePath": "bricks/form/dist/index.97b2f7dc.js"
155
+ "filePath": "bricks/form/dist/index.d731ecce.js"
150
156
  }
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[2179,7164,6205],{7164:(e,n,r)=>{r.r(n),r.d(n,{i18n:()=>l,i18nText:()=>f,initializeI18n:()=>o});var i=r(1434),t=r(860),a=r(6473),s=!1,u=new Set;function o(e,n){if(s||(s=!0,t.i18n.use(a.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!u.has(e))for(var[r,i]of(u.add(e),Object.entries(n)))t.i18n.addResourceBundle(r,e,i)}var c=r(8177);function f(e){var n;if(e){var r=null!==(n=t.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var i=r.split("-")[0];if(i!==r)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;var a="".concat(i,"-");for(var s of Object.keys(e))if(s.startsWith(a))return e[s]}}var l=i.default}}]);
2
- //# sourceMappingURL=2179.3e04e6f6.js.map
1
+ "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[2179,7164,6205],{7164:(e,n,r)=>{r.r(n),r.d(n,{i18n:()=>l,i18nText:()=>f,initializeI18n:()=>o});var i=r(1434),t=r(860),a=r(6473),s=!1,u=new Set;function o(e,n){if(s||(s=!0,t.i18n.use(a.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!u.has(e))for(var[r,i]of(u.add(e),Object.entries(n)))t.i18n.addResourceBundle(r,e,i)}var c=r(2897);function f(e){var n;if(e){var r=null!==(n=t.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var i=r.split("-")[0];if(i!==r)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;var a="".concat(i,"-");for(var s of Object.keys(e))if(s.startsWith(a))return e[s]}}var l=i.default}}]);
2
+ //# sourceMappingURL=2179.b0d8286f.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/6205.dd759a66.js","mappings":"gOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/2179.b0d8286f.js","mappings":"gOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[6205,7164,2179],{7164:(e,n,r)=>{r.r(n),r.d(n,{i18n:()=>l,i18nText:()=>f,initializeI18n:()=>o});var i=r(1434),t=r(860),a=r(6473),s=!1,u=new Set;function o(e,n){if(s||(s=!0,t.i18n.use(a.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!u.has(e))for(var[r,i]of(u.add(e),Object.entries(n)))t.i18n.addResourceBundle(r,e,i)}var c=r(8177);function f(e){var n;if(e){var r=null!==(n=t.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var i=r.split("-")[0];if(i!==r)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;var a="".concat(i,"-");for(var s of Object.keys(e))if(s.startsWith(a))return e[s]}}var l=i.default}}]);
2
- //# sourceMappingURL=6205.dd759a66.js.map
1
+ "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[6205,7164,2179],{7164:(e,n,r)=>{r.r(n),r.d(n,{i18n:()=>l,i18nText:()=>f,initializeI18n:()=>o});var i=r(1434),t=r(860),a=r(6473),s=!1,u=new Set;function o(e,n){if(s||(s=!0,t.i18n.use(a.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!u.has(e))for(var[r,i]of(u.add(e),Object.entries(n)))t.i18n.addResourceBundle(r,e,i)}var c=r(2897);function f(e){var n;if(e){var r=null!==(n=t.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var i=r.split("-")[0];if(i!==r)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;var a="".concat(i,"-");for(var s of Object.keys(e))if(s.startsWith(a))return e[s]}}var l=i.default}}]);
2
+ //# sourceMappingURL=6205.e4c2805d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/2179.3e04e6f6.js","mappings":"gOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/6205.e4c2805d.js","mappings":"gOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}