@next-bricks/data-view 1.12.2 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/bricks.json +19 -19
  2. package/dist/chunks/{3171.c0d5c9a1.js → 3171.f1058377.js} +2 -2
  3. package/dist/chunks/{5552.f046ba86.js.map → 3171.f1058377.js.map} +1 -1
  4. package/dist/chunks/4765.108f59d4.js +2 -0
  5. package/dist/chunks/4765.108f59d4.js.map +1 -0
  6. package/dist/chunks/4837.7e3e2eea.js.map +1 -1
  7. package/dist/chunks/{5552.f046ba86.js → 5552.01e2ba3d.js} +2 -2
  8. package/dist/chunks/{3171.c0d5c9a1.js.map → 5552.01e2ba3d.js.map} +1 -1
  9. package/dist/chunks/7146.01773098.js +2 -0
  10. package/dist/chunks/7146.01773098.js.map +1 -0
  11. package/dist/chunks/7218.2b5b7887.js.map +1 -1
  12. package/dist/chunks/{8097.f99bf9d0.js → 8097.6028e869.js} +2 -2
  13. package/dist/chunks/{8097.f99bf9d0.js.map → 8097.6028e869.js.map} +1 -1
  14. package/dist/chunks/8826.6472b495.js +2 -0
  15. package/dist/chunks/{8826.63d2867f.js.map → 8826.6472b495.js.map} +1 -1
  16. package/dist/chunks/9140.9bce802b.js +3 -0
  17. package/dist/chunks/9140.9bce802b.js.map +1 -0
  18. package/dist/chunks/complex-search.6254baa8.js +2 -0
  19. package/dist/chunks/{complex-search.92e0b5ca.js.map → complex-search.6254baa8.js.map} +1 -1
  20. package/dist/chunks/{graph-text.1e489f3c.js → graph-text.fa54ea09.js} +2 -2
  21. package/dist/chunks/{graph-text.1e489f3c.js.map → graph-text.fa54ea09.js.map} +1 -1
  22. package/dist/chunks/main.fbfe3e79.js +2 -0
  23. package/dist/chunks/main.fbfe3e79.js.map +1 -0
  24. package/dist/chunks/modern-style-treemap.1f2b7101.js +3 -0
  25. package/dist/chunks/{modern-style-treemap.53d4bfc8.js.map → modern-style-treemap.1f2b7101.js.map} +1 -1
  26. package/dist/examples.json +26 -26
  27. package/dist/index.0223ee1d.js +2 -0
  28. package/dist/index.0223ee1d.js.map +1 -0
  29. package/dist/manifest.json +243 -243
  30. package/dist/types.json +421 -421
  31. package/package.json +2 -2
  32. package/dist/chunks/3933.b3a62e03.js +0 -2
  33. package/dist/chunks/3933.b3a62e03.js.map +0 -1
  34. package/dist/chunks/6314.6563d16e.js +0 -2
  35. package/dist/chunks/6314.6563d16e.js.map +0 -1
  36. package/dist/chunks/8826.63d2867f.js +0 -2
  37. package/dist/chunks/9140.776942ea.js +0 -3
  38. package/dist/chunks/9140.776942ea.js.map +0 -1
  39. package/dist/chunks/complex-search.92e0b5ca.js +0 -2
  40. package/dist/chunks/main.2bd22c14.js +0 -2
  41. package/dist/chunks/main.2bd22c14.js.map +0 -1
  42. package/dist/chunks/modern-style-treemap.53d4bfc8.js +0 -3
  43. package/dist/index.727c7633.js +0 -2
  44. package/dist/index.727c7633.js.map +0 -1
  45. /package/dist/chunks/{9140.776942ea.js.LICENSE.txt → 9140.9bce802b.js.LICENSE.txt} +0 -0
  46. /package/dist/chunks/{modern-style-treemap.53d4bfc8.js.LICENSE.txt → modern-style-treemap.1f2b7101.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/data-view",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/data-view",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,5 +42,5 @@
42
42
  "@next-bricks/basic": "*",
43
43
  "@next-bricks/icons": "*"
44
44
  },
45
- "gitHead": "e5f0fcf46f2de33066b006e98958b3d7a45e1959"
45
+ "gitHead": "8e6d4e6da1cf5311363663f8bfdf83b55c2b497b"
46
46
  }
@@ -1,2 +0,0 @@
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(56548);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.b3a62e03.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/3933.b3a62e03.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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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 +0,0 @@
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(56548);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.6563d16e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/6314.6563d16e.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,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EAAQ,QACP,SAASC,EAAkCC,GAChD,IAAIC,EACJ,MAAMC,EAAa,IAAI3C,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":""}