@next-bricks/data-view 1.10.12 → 1.10.13

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 (44) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/{3171.844c796f.js → 3171.58807427.js} +2 -2
  3. package/dist/chunks/{5552.6fcbd077.js.map → 3171.58807427.js.map} +1 -1
  4. package/dist/chunks/{6314.9f58384b.js → 3933.f2b54556.js} +2 -2
  5. package/dist/chunks/{6314.9f58384b.js.map → 3933.f2b54556.js.map} +1 -1
  6. package/dist/chunks/{5552.6fcbd077.js → 5552.87da9878.js} +2 -2
  7. package/dist/chunks/{3171.844c796f.js.map → 5552.87da9878.js.map} +1 -1
  8. package/dist/chunks/{3933.0bb7da1d.js → 6314.a27d2069.js} +2 -2
  9. package/dist/chunks/{3933.0bb7da1d.js.map → 6314.a27d2069.js.map} +1 -1
  10. package/dist/chunks/6773.5f152984.js +2 -0
  11. package/dist/chunks/6773.5f152984.js.map +1 -0
  12. package/dist/chunks/{8097.8f59d530.js → 8097.e14d0f64.js} +2 -2
  13. package/dist/chunks/{8097.8f59d530.js.map → 8097.e14d0f64.js.map} +1 -1
  14. package/dist/chunks/871.b8aa19b8.js +2 -0
  15. package/dist/chunks/871.b8aa19b8.js.map +1 -0
  16. package/dist/chunks/8826.a293b47f.js +2 -0
  17. package/dist/chunks/{8826.da754999.js.map → 8826.a293b47f.js.map} +1 -1
  18. package/dist/chunks/9140.3c21ab5b.js +3 -0
  19. package/dist/chunks/9140.3c21ab5b.js.map +1 -0
  20. package/dist/chunks/complex-search.c53d6876.js +2 -0
  21. package/dist/chunks/{complex-search.6e250583.js.map → complex-search.c53d6876.js.map} +1 -1
  22. package/dist/chunks/graph-text.35673faa.js +2 -0
  23. package/dist/chunks/{graph-text.7519cf16.js.map → graph-text.35673faa.js.map} +1 -1
  24. package/dist/chunks/{main.5a631d5a.js → main.44488957.js} +2 -2
  25. package/dist/chunks/{main.5a631d5a.js.map → main.44488957.js.map} +1 -1
  26. package/dist/chunks/{modern-style-treemap.e69e96f5.js → modern-style-treemap.3836ca2d.js} +3 -3
  27. package/dist/chunks/{modern-style-treemap.e69e96f5.js.map → modern-style-treemap.3836ca2d.js.map} +1 -1
  28. package/dist/examples.json +6 -6
  29. package/dist/{index.bda4d569.js → index.8fb268dd.js} +2 -2
  30. package/dist/{index.bda4d569.js.map → index.8fb268dd.js.map} +1 -1
  31. package/dist/manifest.json +92 -92
  32. package/dist/types.json +38 -38
  33. package/package.json +2 -2
  34. package/dist/chunks/6773.12284ad6.js +0 -2
  35. package/dist/chunks/6773.12284ad6.js.map +0 -1
  36. package/dist/chunks/871.f5aa7aaf.js +0 -2
  37. package/dist/chunks/871.f5aa7aaf.js.map +0 -1
  38. package/dist/chunks/8826.da754999.js +0 -2
  39. package/dist/chunks/9140.e170dabc.js +0 -3
  40. package/dist/chunks/9140.e170dabc.js.map +0 -1
  41. package/dist/chunks/complex-search.6e250583.js +0 -2
  42. package/dist/chunks/graph-text.7519cf16.js +0 -2
  43. /package/dist/chunks/{9140.e170dabc.js.LICENSE.txt → 9140.3c21ab5b.js.LICENSE.txt} +0 -0
  44. /package/dist/chunks/{modern-style-treemap.e69e96f5.js.LICENSE.txt → modern-style-treemap.3836ca2d.js.LICENSE.txt} +0 -0
package/dist/bricks.json CHANGED
@@ -2,15 +2,15 @@
2
2
  "id": "bricks/data-view",
3
3
  "bricks": [
4
4
  "data-view.gauge-chart",
5
- "data-view.modern-style-page-title",
6
5
  "data-view.modern-style-component-title",
6
+ "data-view.modern-style-page-title",
7
7
  "data-view.tabs-drawer",
8
8
  "data-view.modern-style-treemap",
9
9
  "data-view.battery-chart",
10
10
  "data-view.dropdown-menu",
11
+ "data-view.complex-search",
11
12
  "data-view.loading-panel",
12
13
  "data-view.particle-animation",
13
- "data-view.complex-search",
14
14
  "data-view.app-wall-card-item",
15
15
  "data-view.app-wall-system-card",
16
16
  "data-view.app-wall-relation-line",
@@ -110,5 +110,5 @@
110
110
  "eo-icon"
111
111
  ]
112
112
  },
113
- "filePath": "bricks/data-view/dist/index.bda4d569.js"
113
+ "filePath": "bricks/data-view/dist/index.8fb268dd.js"
114
114
  }
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>u});var i=t(75630),s=t(53922),r=t(848);let a=!1;const o=new Set;function u(e,n){if(a||(a=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!o.has(e)){o.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(74427);function l(e){var n;if(!e)return;const t=null!==(n=s.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,t))return e[t];const i=t.split("-")[0];if(i!==t)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;const r=`${i}-`;for(const n of Object.keys(e))if(n.startsWith(r))return e[n]}const d=i.default}}]);
2
- //# sourceMappingURL=3171.844c796f.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>u});var i=t(75630),s=t(77448),r=t(848);let a=!1;const o=new Set;function u(e,n){if(a||(a=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!o.has(e)){o.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(51386);function l(e){var n;if(!e)return;const t=null!==(n=s.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,t))return e[t];const i=t.split("-")[0];if(i!==t)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;const r=`${i}-`;for(const n of Object.keys(e))if(n.startsWith(r))return e[n]}const d=i.default}}]);
2
+ //# sourceMappingURL=3171.58807427.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/5552.6fcbd077.js","mappings":"oPAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,eCjCO,SAASO,EAASC,GACvB,IAAIC,EACJ,IAAKD,EACH,OAEF,MAAME,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAE3G,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOZ,OAAOa,KAAKT,GAC5B,GAAIQ,EAAIE,WAAWH,GACjB,OAAOP,EAAKQ,EAGlB,CC3BO,MAAM5B,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\";\nlet initialized = false;\nconst 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 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 (const [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 const 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 const 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 const prefix = `${primaryLanguage}-`;\n for (const 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 const 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","add","lang","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/3171.58807427.js","mappings":"oPAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,eCjCO,SAASO,EAASC,GACvB,IAAIC,EACJ,IAAKD,EACH,OAEF,MAAME,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAE3G,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOZ,OAAOa,KAAKT,GAC5B,GAAIQ,EAAIE,WAAWH,GACjB,OAAOP,EAAKQ,EAGlB,CC3BO,MAAM5B,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\";\nlet initialized = false;\nconst 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 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 (const [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 const 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 const 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 const prefix = `${primaryLanguage}-`;\n for (const 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 const 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","add","lang","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>b,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(74427);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const v="PERMISSIONS",m="check";function b(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return u([e.routes,r],n,v),h(s,n,{matchSource:e=>e.includes(v)}),Array.from(o)}function P(e){const t=new Set;return u(e,k(t),v),Array.from(t)}function k(e){return function(t,o){if(t.name===v){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===m:"Identifier"===t.node.property.type&&t.node.property.name===m))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
- //# sourceMappingURL=6314.9f58384b.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>b,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(51386);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const v="PERMISSIONS",m="check";function b(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return u([e.routes,r],n,v),h(s,n,{matchSource:e=>e.includes(v)}),Array.from(o)}function P(e){const t=new Set;return u(e,k(t),v),Array.from(t)}function k(e){return function(t,o){if(t.name===v){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===m:"Identifier"===t.node.property.type&&t.node.property.name===m))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
+ //# sourceMappingURL=3933.f2b54556.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/6314.9f58384b.js","mappings":"kJAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,IAAkB,CAChJ,MAAMC,EAAaH,EAAaN,KAC3BS,EAAWC,UAAyC,eAA7BD,EAAWE,SAASJ,KAErCE,EAAWC,UAAyC,YAA7BD,EAAWE,SAASJ,MAA2D,iBAA9BE,EAAWE,SAASC,MACrGR,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAASC,QAAUH,EAAWE,SAASC,OAErGnB,EAAMqB,mBAAoB,EAJ1BV,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAAST,OAASO,EAAWE,SAAST,KAMxG,MACET,EAAMqB,mBAAoB,CAE9B,CACIV,EAAS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O,SAAgCnG,EAAMC,GAC3C,GAAID,EAAKE,OAAS4F,EAAa,CAC7B,MAAMxF,EAAeL,EAAOA,EAAOJ,OAAS,GACtCuB,EAAanB,EAAOA,EAAOJ,OAAS,GAC1C,GAAuF,oBAAlFuB,aAA+C,EAASA,EAAWpB,KAAKO,OAA2G,YAA5Ea,aAA+C,EAASA,EAAWZ,MAA8G,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/3933.f2b54556.js","mappings":"kJAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,IAAkB,CAChJ,MAAMC,EAAaH,EAAaN,KAC3BS,EAAWC,UAAyC,eAA7BD,EAAWE,SAASJ,KAErCE,EAAWC,UAAyC,YAA7BD,EAAWE,SAASJ,MAA2D,iBAA9BE,EAAWE,SAASC,MACrGR,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAASC,QAAUH,EAAWE,SAASC,OAErGnB,EAAMqB,mBAAoB,EAJ1BV,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO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M0E,EAA8BF,GAAaL,GACxE9C,MAAMyD,KAAKN,EACpB,CACA,SAASE,EAA8BF,GACrC,OAAO,SAAgCnG,EAAMC,GAC3C,GAAID,EAAKE,OAAS4F,EAAa,CAC7B,MAAMxF,EAAeL,EAAOA,EAAOJ,OAAS,GACtCuB,EAAanB,EAAOA,EAAOJ,OAAS,GAC1C,GAAuF,oBAAlFuB,aAA+C,EAASA,EAAWpB,KAAKO,OAA2G,YAA5Ea,aAA+C,EAASA,EAAWZ,MAA8G,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>u});var i=t(75630),s=t(53922),r=t(848);let a=!1;const o=new Set;function u(e,n){if(a||(a=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!o.has(e)){o.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(74427);function l(e){var n;if(!e)return;const t=null!==(n=s.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,t))return e[t];const i=t.split("-")[0];if(i!==t)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;const r=`${i}-`;for(const n of Object.keys(e))if(n.startsWith(r))return e[n]}const d=i.default}}]);
2
- //# sourceMappingURL=5552.6fcbd077.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>u});var i=t(75630),s=t(77448),r=t(848);let a=!1;const o=new Set;function u(e,n){if(a||(a=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!o.has(e)){o.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(51386);function l(e){var n;if(!e)return;const t=null!==(n=s.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,t))return e[t];const i=t.split("-")[0];if(i!==t)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;const r=`${i}-`;for(const n of Object.keys(e))if(n.startsWith(r))return e[n]}const d=i.default}}]);
2
+ //# sourceMappingURL=5552.87da9878.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/3171.844c796f.js","mappings":"oPAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,eCjCO,SAASO,EAASC,GACvB,IAAIC,EACJ,IAAKD,EACH,OAEF,MAAME,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAE3G,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOZ,OAAOa,KAAKT,GAC5B,GAAIQ,EAAIE,WAAWH,GACjB,OAAOP,EAAKQ,EAGlB,CC3BO,MAAM5B,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\";\nlet initialized = false;\nconst 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 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 (const [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 const 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 const 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 const prefix = `${primaryLanguage}-`;\n for (const 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 const 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","add","lang","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/5552.87da9878.js","mappings":"oPAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,eCjCO,SAASO,EAASC,GACvB,IAAIC,EACJ,IAAKD,EACH,OAEF,MAAME,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAE3G,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOZ,OAAOa,KAAKT,GAC5B,GAAIQ,EAAIE,WAAWH,GACjB,OAAOP,EAAKQ,EAGlB,CC3BO,MAAM5B,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\";\nlet initialized = false;\nconst 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 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 (const [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 const 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 const 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 const prefix = `${primaryLanguage}-`;\n for (const 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 const 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","add","lang","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>b,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(74427);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const v="PERMISSIONS",m="check";function b(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return u([e.routes,r],n,v),h(s,n,{matchSource:e=>e.includes(v)}),Array.from(o)}function P(e){const t=new Set;return u(e,k(t),v),Array.from(t)}function k(e){return function(t,o){if(t.name===v){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===m:"Identifier"===t.node.property.type&&t.node.property.name===m))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
- //# sourceMappingURL=3933.0bb7da1d.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_data_view=globalThis.webpackChunk_next_bricks_data_view||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>b,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(51386);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const v="PERMISSIONS",m="check";function b(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return u([e.routes,r],n,v),h(s,n,{matchSource:e=>e.includes(v)}),Array.from(o)}function P(e){const t=new Set;return u(e,k(t),v),Array.from(t)}function k(e){return function(t,o){if(t.name===v){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===m:"Identifier"===t.node.property.type&&t.node.property.name===m))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
+ //# sourceMappingURL=6314.a27d2069.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/3933.0bb7da1d.js","mappings":"kJAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,IAAkB,CAChJ,MAAMC,EAAaH,EAAa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AAWM,YAAuC,IAArBL,EAA8BA,EAAmB,CAAC,EAOvG,OANAxE,EAA8B,CAACuE,EAAWO,OAAQF,GAAkBF,EAAwBN,GAC5FZ,EAA4BC,EAAWiB,EAAwB,CAC7Df,YAAYC,GACHA,EAAOnF,SAAS2F,KAGpB9C,MAAMyD,KAAKN,EACpB,CACO,SAASO,EAA2B/E,GACzC,MAAMwE,EAAa,IAAI3C,IAEvB,OADA9B,EAA8BC,EAAM0E,EAA8BF,GAAaL,GACxE9C,MAAMyD,KAAKN,EACpB,CACA,SAASE,EAA8BF,GACrC,OAAO,SAAgCnG,EAAMC,GAC3C,GAAID,EAAKE,OAAS4F,EAAa,CAC7B,MAAMxF,EAAeL,EAAOA,EAAOJ,OAAS,GACtCuB,EAAanB,EAAOA,EAAOJ,OAAS,GAC1C,GAAuF,oBAAlFuB,aAA+C,EAASA,EAAWpB,KAAKO,OAA2G,YAA5Ea,aAA+C,EAASA,EAAWZ,MAA8G,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/6314.a27d2069.js","mappings":"kJAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAA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C,IACjB4C,EAAyBC,EAA8BF,IACvD,gBACJG,EAAe,UACfnB,GAC2C,QAAxCe,EAAmBD,EAAWM,YAAuC,IAArBL,EAA8BA,EAAmB,CAAC,EAOvG,OANAxE,EAA8B,CAACuE,EAAWO,OAAQF,GAAkBF,EAAwBN,GAC5FZ,EAA4BC,EAAWiB,EAAwB,CAC7Df,YAAYC,GACHA,EAAOnF,SAAS2F,KAGpB9C,MAAMyD,KAAKN,EACpB,CACO,SAASO,EAA2B/E,GACzC,MAAMwE,EAAa,IAAI3C,IAEvB,OADA9B,EAA8BC,EAAM0E,EAA8BF,GAAaL,GACxE9C,MAAMyD,KAAKN,EACpB,CACA,SAASE,EAA8BF,GACrC,OAAO,SAAgCnG,EAAMC,GAC3C,GAAID,EAAKE,OAAS4F,EAAa,CAC7B,MAAMxF,EAAeL,EAAOA,EAAOJ,OAAS,GACtCuB,EAAanB,EAAOA,EAAOJ,OAAS,GAC1C,GAAuF,oBAAlFuB,aAA+C,EAASA,EAAWpB,KAAKO,OAA2G,YAA5Ea,aAA+C,EAASA,EAAWZ,MAA8G,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}