@player-ui/check-path-plugin 0.15.3--canary.836.34713 → 0.15.3--canary.836.34893

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2718/execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/dist/index.global.js","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/index.js","../../../../../../../../../../../../execroot/execroot/_main/bazel-out/k8-fastbuild/bin/core/partial-match-registry/src/deep-partial-matcher.ts","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts","external-global-plugin:@player-ui/player","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js","../../../../../../../../../../../../execroot/execroot/_main/bazel-out/k8-fastbuild/bin/core/partial-match-registry/src/index.ts","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/symbols.ts"],"names":["CheckPathPlugin","dlv_es_default","obj","key","def","p","undef","split","length","createObjectMatcher","partialObj","pairs","traverseObj","matchFunction","searchObj","Array","from","entry","path","value","count","size","createMatcher","match","type","getParent","node","viewInfo","working","parent","import_player","NodeType","Asset","View","__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__commonJS","cb","mod","__require","exports","__export","target","all","name","get","enumerable","__copyProps","to","except","desc","call","__toESM","isNodeMode","__esModule","__toCommonJS","require_player","module","globalThis","Player","require_sorted_array","SortedArray","defclass","constructor","array","compare","compareDefault","index","insert","element","high","low","pos","ordering","push","search","remove","splice","comparing","property","a","b","define","amd","src_exports","import_sorted_array","object","Map","keys","val","nestedPath","set","CheckPathPluginSymbol","Symbol","for","symbol","apply","player","hooks","viewController","tap","view","resolver","resolvedMap","assetIdMap","afterResolve","sourceNode","getSourceAssetNode","resolved","id","query","assetNode","potentialMatch","getAssetFromAssetNode","queryArray","isArray","parentQuery","shift","depth","Error","matcher","getParentProp","childProp","children","find","child","getSourceNode","hasParentContext","Boolean","findChildPath","includeSelfMatch","first","rest","Applicability","resolvedValue","getResolvedValue","includesSelf","childQuery","some","childNode","MultiNode","values","hasChildContext","getAsset","getPath","findWorkingChild","n","indexOf","actualIndex","slice","reduce","undefCount","next"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,kBAAkB,AAAC;QCDRC,iBDiJb,qJAAqJ;ICjJxI,SAAAA,eAAaC,CAAAA,EAAKC,CAAAA,EAAKC,CAAAA,EAAKC,CAAAA,EAAGC,CAAAA;QAAAA,IAC7CH,IAAMA,EAAII,KAAAA,GAAQJ,EAAII,KAAAA,CAAM,OAAOJ,GAC9BE,IAAI,GAAGA,IAAIF,EAAIK,MAAAA,EAAQH,IAC3BH,IAAMA,IAAMA,CAAAA,CAAIC,CAAAA,CAAIE,EAAAA,CAAAA,GAAMC;QAAAA,OAEpBJ,MAAQI,IAAQF,IAAMF;IAAAA;QC4BdO,sBAAT,SAASA,oBAAoBC,UAAA;QAElC,IAAMC,QAAQC,YAAYF;QAG1B,IAAMG,gBAAgB,SAACC;gBACrB,kCAAA,2BAAA;;gBAAA,QAAA,YAAoBC,MAAMC,IAAA,CAAKL,2BAA/B,SAAA,6BAAA,QAAA,yBAAA,iCAAuC;oBAAvC,IAAWM,QAAX;oBACE,IAAsBA,0BAAAA,WAAfC,OAAeD,WAATE,QAASF;oBAEtB,IAAIhB,eAAIa,WAAWI,UAAU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OM,OAAA,CAAQnI;gCAEpC,IAAImD,UAAU,CAAA,GAAI;oCAChB,IAAMiF,cACJjF,QACAlD,OAAO4H,MAAA,CACJQ,KAAA,CAAM,GAAGlF,OACTmF,MAAA,CACC,SAACC,YAAYC;+CACX,MAAKjB,gBAAA,CAAiBiB,UAAU,KAAA,IAC5BD,aAAa,IACbA;uCACN;oCAGNjJ,OAAO;wCAAC8I;qCAAoB,CAArB,OAAc,qBAAG9I;gCAC1B;4BACF,OAAA,IAAW,cAAcW,QAAQ;gCAC/B,IAAMyG,YAAYuB,iBAAiBhI;oCACvByG;gCAAZpH,OAAO,AAAC,qBAAIoH,CAAAA,kBAAAA,sBAAAA,gCAAAA,UAAWpH,IAAA,cAAXoH,6BAAAA,kBAAmB,EAAC,SAAI,qBAAGpH;4BACzC;4BAEA,IAAI8G,aAAa;gCACf,IAAMI,UAAU9G,cAAc0G;gCAC9B,IAAII,QAAQ,IAAA,CAAKe,gBAAA,CAAiBtH,UAAU;oCAC1CmG,cAAcF,WAAWG,KAAA;oCACzB,IAAI,CAACD,aAAa,OAAO9G;gCAC3B;4BACF;wBACF;wBAEAU,UAAUA,QAAQC,MAAA;oBACpB;oBAIA,OAAOmG,cAAc,KAAA,IAAY9G;gBACnC;;;gBAEQiI,KAAAA;uBAAAA,SAAAA,iBAAiBzH,IAAA;wBAEhB,gCAAA;oBADP,IAAM4F,aAAa,IAAA,CAAKC,kBAAA,CAAmB7F;oBAC3C,QAAO,iBAAA,IAAA,CAAKC,QAAA,cAAL,sCAAA,iCAAA,eAAewF,WAAA,CAAY1D,GAAA,CAAI6D,uBAAAA,wBAAAA,aAAc5F,mBAA7C,qDAAA,+BAAoDP,KAAA;gBAC7D;;;;;IHmBA,OAAOgD,aAAa6B;AACtB","sourcesContent":["\"use strict\";\nvar CheckPathPlugin = (() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n ));\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // external-global-plugin:@player-ui/player\n var require_player = __commonJS({\n \"external-global-plugin:@player-ui/player\"(exports, module) {\n \"use strict\";\n module.exports = globalThis.Player;\n }\n });\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js\n var require_sorted_array = __commonJS({\n \"../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js\"(exports, module) {\n \"use strict\";\n var SortedArray2 = function() {\n var SortedArray3 = defclass({\n constructor: function(array, compare) {\n this.array = [];\n this.compare = compare || compareDefault;\n var length = array.length, index = 0;\n while (index < length)\n this.insert(array[index++]);\n },\n insert: function(element) {\n var array = this.array, compare = this.compare, high = array.length - 1, low = 0, pos = -1, index, ordering;\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n if (ordering < 0)\n low = index + 1;\n else if (ordering > 0)\n high = index - 1;\n else {\n pos = index;\n break;\n }\n ;\n }\n if (pos === -1) {\n pos = high;\n }\n pos++;\n high = array.length - 1;\n while (pos < high && compare(element, array[pos]) === 0) {\n pos++;\n }\n index = array.length;\n array.push(element);\n while (index > pos) {\n array[index] = array[--index];\n }\n array[pos] = element;\n return this;\n },\n search: function(element) {\n var array = this.array, compare = this.compare, high = array.length - 1, low = 0, index, ordering;\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n if (ordering < 0)\n low = index + 1;\n else if (ordering > 0)\n high = index - 1;\n else\n return index;\n }\n return -1;\n },\n remove: function(element) {\n var index = this.search(element);\n if (index >= 0)\n this.array.splice(index, 1);\n return this;\n }\n });\n SortedArray3.comparing = function(property, array) {\n return new SortedArray3(array, function(a, b) {\n return compareDefault(a[property], b[property]);\n });\n };\n return SortedArray3;\n function defclass(prototype) {\n var constructor = prototype.constructor;\n constructor.prototype = prototype;\n return constructor;\n }\n function compareDefault(a, b) {\n if (a < b)\n return -1;\n else if (a > b)\n return 1;\n else\n return 0;\n }\n }();\n if (typeof module === \"object\")\n module.exports = SortedArray2;\n if (typeof define === \"function\" && define.amd)\n define(function() {\n return SortedArray2;\n });\n }\n });\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n CheckPathPlugin: () => CheckPathPlugin\n });\n var import_player = __toESM(require_player());\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+partial-match-registry@0.0.0/node_modules/@player-ui/partial-match-registry/dist/index.mjs\n var import_sorted_array = __toESM(require_sorted_array(), 1);\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/dist/dlv.es.js\n function dlv_es_default(t, e, l, n, r) {\n for (e = e.split ? e.split(\".\") : e, n = 0; n < e.length; n++)\n t = t ? t[e[n]] : r;\n return t === r ? l : t;\n }\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+partial-match-registry@0.0.0/node_modules/@player-ui/partial-match-registry/dist/index.mjs\n function traverseObj(object, path = [], pairs = /* @__PURE__ */ new Map()) {\n for (const key of Object.keys(object)) {\n const val = object[key];\n const nestedPath = [...path, key];\n if (typeof val === \"object\") {\n traverseObj(val, nestedPath, pairs);\n } else {\n pairs.set(nestedPath, val);\n }\n }\n return pairs;\n }\n function createObjectMatcher(partialObj) {\n const pairs = traverseObj(partialObj);\n const matchFunction = (searchObj) => {\n for (const entry of Array.from(pairs)) {\n const [path, value] = entry;\n if (dlv_es_default(searchObj, path) !== value) {\n return false;\n }\n }\n return true;\n };\n matchFunction.count = pairs.size;\n return matchFunction;\n }\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/symbols.ts\n var CheckPathPluginSymbol = Symbol.for(\"CheckPathPlugin\");\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts\n function createMatcher(match) {\n if (typeof match === \"string\" || typeof match === \"number\") {\n return createObjectMatcher({ type: match });\n }\n if (typeof match === \"function\") {\n return match;\n }\n return createObjectMatcher(match);\n }\n function getParent(node, viewInfo) {\n let working = node;\n while (working.parent && working.parent.type !== import_player.NodeType.Asset && working.parent.type !== import_player.NodeType.View) {\n working = working.parent;\n }\n const { parent } = working;\n if (parent && (parent.type === import_player.NodeType.Asset || parent.type === import_player.NodeType.View)) {\n return parent;\n }\n }\n var CheckPathPlugin = class {\n constructor() {\n this.name = \"check-path\";\n this.symbol = CheckPathPluginSymbol;\n }\n apply(player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver) => {\n const viewInfo = {\n resolvedMap: /* @__PURE__ */ new Map(),\n assetIdMap: /* @__PURE__ */ new Map(),\n resolver\n };\n this.viewInfo = viewInfo;\n resolver.hooks.afterResolve.tap(this.name, (value, node) => {\n const sourceNode = this.getSourceAssetNode(node);\n if (sourceNode) {\n viewInfo.resolvedMap.set(sourceNode, {\n resolved: node,\n value\n });\n if (node.type === import_player.NodeType.Asset || node.type === import_player.NodeType.View) {\n const id = dlv_es_default(value, \"id\");\n if (id) {\n viewInfo.assetIdMap.set(id, node);\n }\n }\n }\n return value;\n });\n });\n });\n });\n }\n /**\n * Starts at the asset with the given id, and walks backwards _up_ the tree until it finds a match for the parent\n *\n * @param id - The id of the asset to _start_ at\n * @param query - A means of matching a parent asset\n * @returns - The parent object if a match is found, else undefined\n */\n getParent(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return void 0;\n }\n let potentialMatch = getParent(assetNode);\n if (query === void 0) {\n if (potentialMatch) {\n return this.getAssetFromAssetNode(potentialMatch);\n }\n return;\n }\n const queryArray = Array.isArray(query) ? [...query] : [query];\n let parentQuery = queryArray.shift();\n let depth = 0;\n while (potentialMatch && parentQuery) {\n if (depth++ >= 50) {\n throw new Error(\n \"Recursion depth exceeded. Check for cycles in the AST graph\"\n );\n }\n const matcher = createMatcher(parentQuery);\n const resolved = this.getAssetFromAssetNode(potentialMatch);\n if (resolved && matcher(resolved)) {\n if (queryArray.length === 0) {\n return resolved;\n }\n parentQuery = queryArray.shift();\n }\n potentialMatch = getParent(potentialMatch);\n }\n return void 0;\n }\n /**\n * Returns the property that the asset resides on relative to it's parent\n *\n * @param id - The id of the asset to _start_ at\n * @returns - The property name or undefined if no parent was found\n */\n getParentProp(id) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return;\n }\n let working = assetNode;\n let parent;\n while (working) {\n parent = working?.parent;\n if (parent && (parent.type === import_player.NodeType.Asset || parent.type === import_player.NodeType.View)) {\n break;\n }\n working = working?.parent;\n }\n if (parent && \"children\" in parent) {\n const childProp = parent.children?.find(\n (child) => child.value === working\n );\n return childProp?.path?.[0];\n }\n return void 0;\n }\n /** Given a node, return itself, or the nested asset if the node is an applicability node */\n getSourceAssetNode(node) {\n let sourceNode = this.viewInfo?.resolver.getSourceNode(node);\n if (sourceNode?.type === \"applicability\") {\n sourceNode = sourceNode.value;\n }\n return sourceNode;\n }\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's parents.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n hasParentContext(id, query) {\n return Boolean(this.getParent(id, query));\n }\n /** Search the node for any matching paths in the graph that match the query */\n findChildPath(node, query, includeSelfMatch = true) {\n if (query.length === 0) {\n return true;\n }\n const [first, ...rest] = query;\n const matcher = createMatcher(first);\n if (node.type === import_player.NodeType.Asset || node.type === import_player.NodeType.View || node.type === import_player.NodeType.Applicability) {\n const resolvedValue = this.getResolvedValue(node);\n const includesSelf = (includeSelfMatch && matcher(resolvedValue)) ?? false;\n const childQuery = includesSelf ? rest : query;\n if (childQuery.length === 0 && includesSelf) {\n return true;\n }\n const children = node.type === import_player.NodeType.Applicability ? node.value.children : node.children;\n if (childQuery.length && (!children || children.length === 0)) {\n return false;\n }\n if (children?.some(\n (childNode) => this.findChildPath(childNode.value, childQuery)\n )) {\n return true;\n }\n } else if (node.type === import_player.NodeType.MultiNode && node.values.some((childNode) => this.findChildPath(childNode, query))) {\n return true;\n } else if (\"children\" in node && node.children?.some(\n (childNode) => this.findChildPath(childNode.value, query)\n )) {\n return true;\n }\n return false;\n }\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's children.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n hasChildContext(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n const queryArray = Array.isArray(query) ? [...query] : [query];\n if (!assetNode) {\n return false;\n }\n return this.findChildPath(assetNode, queryArray, false);\n }\n /** Get the asset represented by id */\n getAsset(id) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode)\n return;\n return this.getAssetFromAssetNode(assetNode);\n }\n /**\n * Gets the value for an asset from an asset node\n */\n getAssetFromAssetNode(assetNode) {\n const sourceNode = this.getSourceAssetNode(assetNode);\n if (!sourceNode)\n return;\n return this.viewInfo?.resolvedMap.get(sourceNode)?.value;\n }\n /**\n * Get the path of the asset in the view upto\n * the asset that matches the query or to the view if no query is provided\n */\n getPath(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return;\n }\n let path = [];\n let queryArray = [];\n if (query) {\n queryArray = Array.isArray(query) ? [...query] : [query];\n }\n let parentQuery = queryArray.shift();\n let working = assetNode;\n const findWorkingChild = (parent) => {\n return parent.children?.find((n) => n.value === working);\n };\n while (working !== void 0) {\n const { parent } = working;\n if (parent) {\n if (parent.type === import_player.NodeType.MultiNode) {\n const index = parent.values.indexOf(working);\n if (index !== -1) {\n const actualIndex = index - parent.values.slice(0, index).reduce(\n (undefCount, next) => this.getResolvedValue(next) === void 0 ? undefCount + 1 : undefCount,\n 0\n );\n path = [actualIndex, ...path];\n }\n } else if (\"children\" in parent) {\n const childProp = findWorkingChild(parent);\n path = [...childProp?.path ?? [], ...path];\n }\n if (parentQuery) {\n const matcher = createMatcher(parentQuery);\n if (matcher(this.getResolvedValue(parent))) {\n parentQuery = queryArray.shift();\n if (!parentQuery)\n return path;\n }\n }\n }\n working = working.parent;\n }\n return parentQuery ? void 0 : path;\n }\n getResolvedValue(node) {\n const sourceNode = this.getSourceAssetNode(node);\n return this.viewInfo?.resolvedMap.get(sourceNode ?? node)?.value;\n }\n };\n return __toCommonJS(src_exports);\n})();\n","export default function dlv(obj, key, def, p, undef) {\n\tkey = key.split ? key.split('.') : key;\n\tfor (p = 0; p < key.length; p++) {\n\t\tobj = obj ? obj[key[p]] : undef;\n\t}\n\treturn obj === undef ? def : obj;\n}\n","import dlv from \"dlv\";\n\n/** A function that checks overlapping properties against a reference value */\nexport type Matcher = ((searchObj: object) => boolean) & {\n /** The count represents the specificity of this matcher */\n count: number;\n};\n\n/** Traverse an object and collect any key/value pairs including nested keys */\nfunction traverseObj(\n object: Record<any, any>,\n path: string[] = [],\n pairs: Map<string[], any> = new Map(),\n): Map<string[], any> {\n for (const key of Object.keys(object)) {\n const val: any = object[key];\n const nestedPath = [...path, key];\n\n if (typeof val === \"object\") {\n traverseObj(val, nestedPath, pairs);\n } else {\n pairs.set(nestedPath, val);\n }\n }\n\n return pairs;\n}\n\n/**\n * Given a partial object, create a matcher function that checks if another object matches the specified properties\n * @param partialObj The partial object to match against\n * @returns A matcher function that checks if an object matches the partial object\n */\nexport function createObjectMatcher(partialObj: object): Matcher {\n // Convert the partial object into a list of [key, value] pairs;\n const pairs = traverseObj(partialObj);\n\n /** Generate a function to match against all of the properties we care about */\n const matchFunction = (searchObj: object) => {\n for (const entry of Array.from(pairs)) {\n const [path, value] = entry;\n\n if (dlv(searchObj, path) !== value) {\n return false;\n }\n }\n\n return true;\n };\n\n // Keep track of the specificity of the comparator\n matchFunction.count = pairs.size;\n\n return matchFunction;\n}\n","import { NodeType } from \"@player-ui/player\";\nimport type {\n Player,\n Asset,\n PlayerPlugin,\n Node,\n Resolver,\n} from \"@player-ui/player\";\nimport { createObjectMatcher } from \"@player-ui/partial-match-registry\";\nimport dlv from \"dlv\";\nimport { CheckPathPluginSymbol } from \"./symbols\";\n\nexport type QueryFunction = (asset: Asset) => boolean;\nexport type Query = QueryFunction | string | object;\n\n/** Generate a function that matches on the given input */\nfunction createMatcher(\n match: number | string | object | QueryFunction,\n): QueryFunction {\n if (typeof match === \"string\" || typeof match === \"number\") {\n return createObjectMatcher({ type: match });\n }\n\n if (typeof match === \"function\") {\n return match as QueryFunction;\n }\n\n return createObjectMatcher(match);\n}\n\ninterface ViewInfo {\n /** The root of the view graph */\n root?: Node.Node;\n\n /** A cache of an asset or view's id to it's node */\n assetIdMap: Map<string, Node.Asset | Node.View>;\n\n /** A map of a node to it's resolved node and value */\n resolvedMap: Map<\n Node.Node,\n {\n /** The final resolved AST node */\n resolved: Node.Node;\n\n /** The final, resolved value of the node */\n value: any;\n }\n >;\n\n /** The resolver instance tied to this view. Used to map back to original nodes */\n resolver: Resolver;\n}\n\n/**\n * Traverse up the tree until reaching the first asset or view\n * Returns undefined if no matching parent is found\n */\nfunction getParent(\n node: Node.Node,\n viewInfo?: ViewInfo,\n): Node.ViewOrAsset | undefined {\n let working = node;\n\n while (\n working.parent &&\n working.parent.type !== NodeType.Asset &&\n working.parent.type !== NodeType.View\n ) {\n working = working.parent;\n }\n\n const { parent } = working;\n\n if (\n parent &&\n (parent.type === NodeType.Asset || parent.type === NodeType.View)\n ) {\n return parent;\n }\n}\n\n/**\n * The `check-path-plugin` enables developers to query segments of the view tree for contextual rendering or behavior.\n * This is best suited to be referenced during the UI rendering phase, where one can make decisions about the rendering of an asset based on where it lies in the tree.\n */\nexport class CheckPathPlugin implements PlayerPlugin {\n name = \"check-path\";\n private viewInfo?: ViewInfo;\n public readonly symbol = CheckPathPluginSymbol;\n\n apply(player: Player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver: Resolver) => {\n const viewInfo: ViewInfo = {\n resolvedMap: new Map(),\n assetIdMap: new Map(),\n resolver,\n };\n this.viewInfo = viewInfo;\n\n resolver.hooks.afterResolve.tap(this.name, (value, node) => {\n const sourceNode = this.getSourceAssetNode(node);\n\n if (sourceNode) {\n viewInfo.resolvedMap.set(sourceNode, {\n resolved: node,\n value,\n });\n\n if (node.type === NodeType.Asset || node.type === NodeType.View) {\n const id = dlv(value, \"id\");\n\n if (id) {\n viewInfo.assetIdMap.set(id, node);\n }\n }\n }\n\n return value;\n });\n });\n });\n });\n }\n\n /**\n * Starts at the asset with the given id, and walks backwards _up_ the tree until it finds a match for the parent\n *\n * @param id - The id of the asset to _start_ at\n * @param query - A means of matching a parent asset\n * @returns - The parent object if a match is found, else undefined\n */\n public getParent(\n id: string,\n query?: Query | Array<Query>,\n ): Asset | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return undefined;\n }\n\n let potentialMatch = getParent(assetNode);\n\n // Handle the case of an empty query (just get the immediate parent)\n if (query === undefined) {\n if (potentialMatch) {\n return this.getAssetFromAssetNode(potentialMatch);\n }\n\n return;\n }\n\n const queryArray = Array.isArray(query) ? [...query] : [query];\n let parentQuery = queryArray.shift();\n\n // Keep track of the recursive depth in case we loop forever\n let depth = 0;\n\n while (potentialMatch && parentQuery) {\n if (depth++ >= 50) {\n throw new Error(\n \"Recursion depth exceeded. Check for cycles in the AST graph\",\n );\n }\n\n const matcher = createMatcher(parentQuery);\n const resolved = this.getAssetFromAssetNode(potentialMatch);\n\n if (resolved && matcher(resolved)) {\n // This is the last match.\n if (queryArray.length === 0) {\n return resolved;\n }\n\n parentQuery = queryArray.shift();\n }\n\n potentialMatch = getParent(potentialMatch);\n }\n\n return undefined;\n }\n\n /**\n * Returns the property that the asset resides on relative to it's parent\n *\n * @param id - The id of the asset to _start_ at\n * @returns - The property name or undefined if no parent was found\n */\n public getParentProp(id: string): string | number | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return;\n }\n\n let working: Node.Node | undefined = assetNode;\n let parent;\n\n while (working) {\n parent = working?.parent;\n\n if (\n parent &&\n (parent.type === NodeType.Asset || parent.type === NodeType.View)\n ) {\n break;\n }\n\n working = working?.parent;\n }\n\n if (parent && \"children\" in parent) {\n const childProp = parent.children?.find(\n (child) => child.value === working,\n );\n\n return childProp?.path?.[0];\n }\n\n return undefined;\n }\n\n /** Given a node, return itself, or the nested asset if the node is an applicability node */\n private getSourceAssetNode(node: Node.Node) {\n let sourceNode = this.viewInfo?.resolver.getSourceNode(node);\n if (sourceNode?.type === \"applicability\") {\n sourceNode = sourceNode.value;\n }\n\n return sourceNode;\n }\n\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's parents.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n public hasParentContext(id: string, query: Query | Array<Query>): boolean {\n return Boolean(this.getParent(id, query));\n }\n\n /** Search the node for any matching paths in the graph that match the query */\n private findChildPath(\n node: Node.Node,\n query: Array<Query>,\n includeSelfMatch = true,\n ): boolean {\n if (query.length === 0) {\n return true;\n }\n\n const [first, ...rest] = query;\n const matcher = createMatcher(first);\n\n if (\n node.type === NodeType.Asset ||\n node.type === NodeType.View ||\n node.type === NodeType.Applicability\n ) {\n const resolvedValue = this.getResolvedValue(node);\n const includesSelf =\n (includeSelfMatch && matcher(resolvedValue)) ?? false;\n const childQuery = includesSelf ? rest : query;\n\n if (childQuery.length === 0 && includesSelf) {\n return true;\n }\n\n const children =\n node.type === NodeType.Applicability\n ? (node.value as Node.ViewOrAsset).children\n : node.children;\n if (childQuery.length && (!children || children.length === 0)) {\n return false;\n }\n\n if (\n children?.some((childNode) =>\n this.findChildPath(childNode.value, childQuery),\n )\n ) {\n return true;\n }\n } else if (\n node.type === NodeType.MultiNode &&\n node.values.some((childNode) => this.findChildPath(childNode, query))\n ) {\n return true;\n } else if (\n \"children\" in node &&\n node.children?.some((childNode) =>\n this.findChildPath(childNode.value, query),\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's children.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n public hasChildContext(id: string, query: Query | Array<Query>): boolean {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n const queryArray = Array.isArray(query) ? [...query] : [query];\n\n if (!assetNode) {\n return false;\n }\n\n return this.findChildPath(assetNode, queryArray, false);\n }\n\n /** Get the asset represented by id */\n public getAsset(id: string): Asset | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode) return;\n\n return this.getAssetFromAssetNode(assetNode);\n }\n\n /**\n * Gets the value for an asset from an asset node\n */\n public getAssetFromAssetNode(\n assetNode: Node.Asset | Node.View,\n ): Asset | undefined {\n const sourceNode = this.getSourceAssetNode(assetNode);\n if (!sourceNode) return;\n\n return this.viewInfo?.resolvedMap.get(sourceNode)?.value;\n }\n\n /**\n * Get the path of the asset in the view upto\n * the asset that matches the query or to the view if no query is provided\n */\n public getPath(\n id: string,\n query?: Query | Array<Query>,\n ): Array<string | number> | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return;\n }\n\n let path: Array<string | number> = [];\n\n let queryArray: Query[] = [];\n\n if (query) {\n queryArray = Array.isArray(query) ? [...query] : [query];\n }\n\n let parentQuery = queryArray.shift();\n\n let working: Node.Node | undefined = assetNode;\n\n /** Find the child value for the working value from the given parent */\n const findWorkingChild = (parent: Node.ViewOrAsset | Node.Value) => {\n return parent.children?.find((n) => n.value === working);\n };\n\n while (working !== undefined) {\n const { parent } = working;\n\n if (parent) {\n if (parent.type === NodeType.MultiNode) {\n const index = parent.values.indexOf(working);\n\n if (index !== -1) {\n const actualIndex =\n index -\n parent.values\n .slice(0, index)\n .reduce(\n (undefCount, next) =>\n this.getResolvedValue(next) === undefined\n ? undefCount + 1\n : undefCount,\n 0,\n );\n\n path = [actualIndex, ...path];\n }\n } else if (\"children\" in parent) {\n const childProp = findWorkingChild(parent);\n path = [...(childProp?.path ?? []), ...path];\n }\n\n if (parentQuery) {\n const matcher = createMatcher(parentQuery);\n if (matcher(this.getResolvedValue(parent))) {\n parentQuery = queryArray.shift();\n if (!parentQuery) return path;\n }\n }\n }\n\n working = working.parent;\n }\n\n /* if at the end all queries haven't been consumed, \n it means we couldn't find a path till the matching query */\n return parentQuery ? undefined : path;\n }\n\n private getResolvedValue(node: Node.Node) {\n const sourceNode = this.getSourceAssetNode(node);\n return this.viewInfo?.resolvedMap.get(sourceNode ?? node)?.value;\n }\n}\n","module.exports = globalThis.Player","var SortedArray = (function () {\n var SortedArray = defclass({\n\n constructor: function (array, compare) {\n this.array = [];\n this.compare = compare || compareDefault;\n var length = array.length,\n index = 0;\n while (index < length) this.insert(array[index++]);\n },\n insert: function (element) {\n var array = this.array,\n compare = this.compare,\n high = array.length-1,\n low = 0,\n pos = -1,\n index,\n ordering;\n\n // The array is sorted. You must find the position of new element in O(log(n)), not O(n).\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element); \n if (ordering < 0) low = index + 1;\n else if (ordering > 0) high = index - 1;\n else {\n pos = index;\n break;\n };\n }\n\n if (pos === -1) {\n // if element was not found, high < low.\n pos = high;\n }\n // This assures that equal elements inserted after will be in a higher position in array.\n // They can be equal for comparison purposes, but different objects with different data.\n // Respecting the chronological order can be important for many applications.\n pos++;\n high = array.length-1;\n while ((pos < high) && (compare(element, array[pos]) === 0)){\n pos++;\n }\n index = array.length;\n // Just to increase array size.\n array.push(element); \n // Much faster. No need to elements swap.\n while (index > pos) {\n array[index] = array[--index];\n }\n // Set the new element on its correct position.\n array[pos] = element;\n\n return this;\n },\n search: function (element) {\n var array = this.array,\n compare = this.compare,\n high = array.length-1,\n low = 0,\n // In most languages, inner variable declaration makes the code slower.\n index,\n ordering;\n\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n\n if (ordering < 0) low = index + 1;\n else if (ordering > 0) high = index - 1;\n else return index;\n }\n\n return -1;\n },\n remove: function (element) {\n var index = this.search(element);\n if (index >= 0) this.array.splice(index, 1);\n return this;\n }\n });\n\n SortedArray.comparing = function (property, array) {\n return new SortedArray(array, function (a, b) {\n // This should be faster than calling functions.\n // Besides, this way it is not needed to create useless function to return property value.\n return compareDefault(a[property], b[property]);\n });\n };\n\n return SortedArray;\n\n function defclass(prototype) {\n var constructor = prototype.constructor;\n constructor.prototype = prototype;\n return constructor;\n }\n\n function compareDefault(a, b) {\n // Equality has a very low chance to happen. It should be the last option.\n if (a < b)\n return -1;\n else if (a > b)\n return 1;\n else\n return 0;\n }\n}());\n\nif (typeof module === \"object\") module.exports = SortedArray;\nif (typeof define === \"function\" && define.amd)\n define(function () { return SortedArray; });\n","import SortedArray from \"sorted-array\";\nimport type { Matcher } from \"./deep-partial-matcher\";\nimport { createObjectMatcher } from \"./deep-partial-matcher\";\n\nexport { createObjectMatcher } from \"./deep-partial-matcher\";\n\n/** create a matcher function that matches exactly */\nfunction createBasicMatcher(seed: any): Matcher {\n /** a simple matcher function that only matches itself */\n const matcher = (match: any) => seed === match;\n matcher.count = 1;\n\n return matcher;\n}\n\ninterface RegistryIndex<V> {\n /** The original object we wanted to match on */\n key: object;\n\n /** The value to return */\n value: V;\n\n /** The matcher function for this entry */\n matcher: Matcher;\n}\n\n/** create an empty sorted array using the matcher count */\nconst createSortedArray = <V>() =>\n new SortedArray<RegistryIndex<V>>([], (c) => c.matcher.count);\n\n/**\n * A partial match registry is a map that uses an object to \"match\" against keys.\n * More specific matches take precedence over less specific ones.\n */\nexport class Registry<V> {\n private store = createSortedArray<V>();\n\n constructor(initialSet?: Array<[any, V]>) {\n initialSet?.forEach(([match, value]) => {\n this.set(match, value);\n });\n }\n\n /** Add match -> value mapping to the registry */\n set(match: any, value: V) {\n const matcher =\n typeof match === \"object\"\n ? createObjectMatcher(match)\n : createBasicMatcher(match);\n\n this.store.insert({\n key: match,\n value,\n matcher,\n });\n }\n\n /** Fetch the best match in the registry */\n get(query: any): V | undefined {\n for (const entry of this.store.array) {\n if (entry.matcher(query)) {\n return entry.value;\n }\n }\n }\n\n /** Loop over all entries and run callback */\n forEach(callbackfn: (value: RegistryIndex<V>) => void): void {\n for (const entry of this.store.array) {\n callbackfn(entry);\n }\n }\n\n /** Reset the items in the registry */\n clear() {\n this.store = createSortedArray<V>();\n }\n\n /** Check if the registry is empty*/\n isRegistryEmpty() {\n return this.store.array.length === 0;\n }\n}\n","export const CheckPathPluginSymbol = Symbol.for(\"CheckPathPlugin\");\n"]}
1
+ {"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2722/execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/dist/index.global.js","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/index.js","../../../../../../../../../../../../execroot/execroot/_main/bazel-out/k8-fastbuild/bin/core/partial-match-registry/src/deep-partial-matcher.ts","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts","external-global-plugin:@player-ui/player","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js","../../../../../../../../../../../../execroot/execroot/_main/bazel-out/k8-fastbuild/bin/core/partial-match-registry/src/index.ts","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/symbols.ts"],"names":["CheckPathPlugin","dlv_es_default","obj","key","def","p","undef","split","length","createObjectMatcher","partialObj","pairs","traverseObj","matchFunction","searchObj","Array","from","entry","path","value","count","size","createMatcher","match","type","getParent","node","viewInfo","working","parent","import_player","NodeType","Asset","View","__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__commonJS","cb","mod","__require","exports","__export","target","all","name","get","enumerable","__copyProps","to","except","desc","call","__toESM","isNodeMode","__esModule","__toCommonJS","require_player","module","globalThis","Player","require_sorted_array","SortedArray","defclass","constructor","array","compare","compareDefault","index","insert","element","high","low","pos","ordering","push","search","remove","splice","comparing","property","a","b","define","amd","src_exports","import_sorted_array","object","Map","keys","val","nestedPath","set","CheckPathPluginSymbol","Symbol","for","symbol","apply","player","hooks","viewController","tap","view","resolver","resolvedMap","assetIdMap","afterResolve","sourceNode","getSourceAssetNode","resolved","id","query","assetNode","potentialMatch","getAssetFromAssetNode","queryArray","isArray","parentQuery","shift","depth","Error","matcher","getParentProp","childProp","children","find","child","getSourceNode","hasParentContext","Boolean","findChildPath","includeSelfMatch","first","rest","Applicability","resolvedValue","getResolvedValue","includesSelf","childQuery","some","childNode","MultiNode","values","hasChildContext","getAsset","getPath","findWorkingChild","n","indexOf","actualIndex","slice","reduce","undefCount","next"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,kBAAkB,AAAC;QCDRC,iBDiJb,qJAAqJ;ICjJxI,SAAAA,eAAaC,CAAAA,EAAKC,CAAAA,EAAKC,CAAAA,EAAKC,CAAAA,EAAGC,CAAAA;QAAAA,IAC7CH,IAAMA,EAAII,KAAAA,GAAQJ,EAAII,KAAAA,CAAM,OAAOJ,GAC9BE,IAAI,GAAGA,IAAIF,EAAIK,MAAAA,EAAQH,IAC3BH,IAAMA,IAAMA,CAAAA,CAAIC,CAAAA,CAAIE,EAAAA,CAAAA,GAAMC;QAAAA,OAEpBJ,MAAQI,IAAQF,IAAMF;IAAAA;QC4BdO,sBAAT,SAASA,oBAAoBC,UAAA;QAElC,IAAMC,QAAQC,YAAYF;QAG1B,IAAMG,gBAAgB,SAACC;gBACrB,kCAAA,2BAAA;;gBAAA,QAAA,YAAoBC,MAAMC,IAAA,CAAKL,2BAA/B,SAAA,6BAAA,QAAA,yBAAA,iCAAuC;oBAAvC,IAAWM,QAAX;oBACE,IAAsBA,0BAAAA,WAAfC,OAAeD,WAATE,QAASF;oBAEtB,IAAIhB,eAAIa,WAAWI,UAAUC,OAAO;wBAClC,OAAO;oBACT;gBACF;;gBAN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,CAAA,GAAI;oCAChB,IAAMiF,cACJjF,QACAlD,OAAO4H,MAAA,CACJQ,KAAA,CAAM,GAAGlF,OACTmF,MAAA,CACC,SAACC,YAAYC;+CACX,MAAKjB,gBAAA,CAAiBiB,UAAU,KAAA,IAC5BD,aAAa,IACbA;uCACN;oCAGNjJ,OAAO;wCAAC8I;qCAAoB,CAArB,OAAc,qBAAG9I;gCAC1B;4BACF,OAAA,IAAW,cAAcW,QAAQ;gCAC/B,IAAMyG,YAAYuB,iBAAiBhI;oCACvByG;gCAAZpH,OAAO,AAAC,qBAAIoH,CAAAA,kBAAAA,sBAAAA,gCAAAA,UAAWpH,IAAA,cAAXoH,6BAAAA,kBAAmB,EAAC,SAAI,qBAAGpH;4BACzC;4BAEA,IAAI8G,aAAa;gCACf,IAAMI,UAAU9G,cAAc0G;gCAC9B,IAAII,QAAQ,IAAA,CAAKe,gBAAA,CAAiBtH,UAAU;oCAC1CmG,cAAcF,WAAWG,KAAA;oCACzB,IAAI,CAACD,aAAa,OAAO9G;gCAC3B;4BACF;wBACF;wBAEAU,UAAUA,QAAQC,MAAA;oBACpB;oBAIA,OAAOmG,cAAc,KAAA,IAAY9G;gBACnC;;;gBAEQiI,KAAAA;uBAAAA,SAAAA,iBAAiBzH,IAAA;wBAEhB,gCAAA;oBADP,IAAM4F,aAAa,IAAA,CAAKC,kBAAA,CAAmB7F;oBAC3C,QAAO,iBAAA,IAAA,CAAKC,QAAA,cAAL,sCAAA,iCAAA,eAAewF,WAAA,CAAY1D,GAAA,CAAI6D,uBAAAA,wBAAAA,aAAc5F,mBAA7C,qDAAA,+BAAoDP,KAAA;gBAC7D;;;;;IHmBA,OAAOgD,aAAa6B;AACtB","sourcesContent":["\"use strict\";\nvar CheckPathPlugin = (() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n ));\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // external-global-plugin:@player-ui/player\n var require_player = __commonJS({\n \"external-global-plugin:@player-ui/player\"(exports, module) {\n \"use strict\";\n module.exports = globalThis.Player;\n }\n });\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js\n var require_sorted_array = __commonJS({\n \"../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js\"(exports, module) {\n \"use strict\";\n var SortedArray2 = function() {\n var SortedArray3 = defclass({\n constructor: function(array, compare) {\n this.array = [];\n this.compare = compare || compareDefault;\n var length = array.length, index = 0;\n while (index < length)\n this.insert(array[index++]);\n },\n insert: function(element) {\n var array = this.array, compare = this.compare, high = array.length - 1, low = 0, pos = -1, index, ordering;\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n if (ordering < 0)\n low = index + 1;\n else if (ordering > 0)\n high = index - 1;\n else {\n pos = index;\n break;\n }\n ;\n }\n if (pos === -1) {\n pos = high;\n }\n pos++;\n high = array.length - 1;\n while (pos < high && compare(element, array[pos]) === 0) {\n pos++;\n }\n index = array.length;\n array.push(element);\n while (index > pos) {\n array[index] = array[--index];\n }\n array[pos] = element;\n return this;\n },\n search: function(element) {\n var array = this.array, compare = this.compare, high = array.length - 1, low = 0, index, ordering;\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n if (ordering < 0)\n low = index + 1;\n else if (ordering > 0)\n high = index - 1;\n else\n return index;\n }\n return -1;\n },\n remove: function(element) {\n var index = this.search(element);\n if (index >= 0)\n this.array.splice(index, 1);\n return this;\n }\n });\n SortedArray3.comparing = function(property, array) {\n return new SortedArray3(array, function(a, b) {\n return compareDefault(a[property], b[property]);\n });\n };\n return SortedArray3;\n function defclass(prototype) {\n var constructor = prototype.constructor;\n constructor.prototype = prototype;\n return constructor;\n }\n function compareDefault(a, b) {\n if (a < b)\n return -1;\n else if (a > b)\n return 1;\n else\n return 0;\n }\n }();\n if (typeof module === \"object\")\n module.exports = SortedArray2;\n if (typeof define === \"function\" && define.amd)\n define(function() {\n return SortedArray2;\n });\n }\n });\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n CheckPathPlugin: () => CheckPathPlugin\n });\n var import_player = __toESM(require_player());\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+partial-match-registry@0.0.0/node_modules/@player-ui/partial-match-registry/dist/index.mjs\n var import_sorted_array = __toESM(require_sorted_array(), 1);\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/dist/dlv.es.js\n function dlv_es_default(t, e, l, n, r) {\n for (e = e.split ? e.split(\".\") : e, n = 0; n < e.length; n++)\n t = t ? t[e[n]] : r;\n return t === r ? l : t;\n }\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+partial-match-registry@0.0.0/node_modules/@player-ui/partial-match-registry/dist/index.mjs\n function traverseObj(object, path = [], pairs = /* @__PURE__ */ new Map()) {\n for (const key of Object.keys(object)) {\n const val = object[key];\n const nestedPath = [...path, key];\n if (typeof val === \"object\") {\n traverseObj(val, nestedPath, pairs);\n } else {\n pairs.set(nestedPath, val);\n }\n }\n return pairs;\n }\n function createObjectMatcher(partialObj) {\n const pairs = traverseObj(partialObj);\n const matchFunction = (searchObj) => {\n for (const entry of Array.from(pairs)) {\n const [path, value] = entry;\n if (dlv_es_default(searchObj, path) !== value) {\n return false;\n }\n }\n return true;\n };\n matchFunction.count = pairs.size;\n return matchFunction;\n }\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/symbols.ts\n var CheckPathPluginSymbol = Symbol.for(\"CheckPathPlugin\");\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts\n function createMatcher(match) {\n if (typeof match === \"string\" || typeof match === \"number\") {\n return createObjectMatcher({ type: match });\n }\n if (typeof match === \"function\") {\n return match;\n }\n return createObjectMatcher(match);\n }\n function getParent(node, viewInfo) {\n let working = node;\n while (working.parent && working.parent.type !== import_player.NodeType.Asset && working.parent.type !== import_player.NodeType.View) {\n working = working.parent;\n }\n const { parent } = working;\n if (parent && (parent.type === import_player.NodeType.Asset || parent.type === import_player.NodeType.View)) {\n return parent;\n }\n }\n var CheckPathPlugin = class {\n constructor() {\n this.name = \"check-path\";\n this.symbol = CheckPathPluginSymbol;\n }\n apply(player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver) => {\n const viewInfo = {\n resolvedMap: /* @__PURE__ */ new Map(),\n assetIdMap: /* @__PURE__ */ new Map(),\n resolver\n };\n this.viewInfo = viewInfo;\n resolver.hooks.afterResolve.tap(this.name, (value, node) => {\n const sourceNode = this.getSourceAssetNode(node);\n if (sourceNode) {\n viewInfo.resolvedMap.set(sourceNode, {\n resolved: node,\n value\n });\n if (node.type === import_player.NodeType.Asset || node.type === import_player.NodeType.View) {\n const id = dlv_es_default(value, \"id\");\n if (id) {\n viewInfo.assetIdMap.set(id, node);\n }\n }\n }\n return value;\n });\n });\n });\n });\n }\n /**\n * Starts at the asset with the given id, and walks backwards _up_ the tree until it finds a match for the parent\n *\n * @param id - The id of the asset to _start_ at\n * @param query - A means of matching a parent asset\n * @returns - The parent object if a match is found, else undefined\n */\n getParent(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return void 0;\n }\n let potentialMatch = getParent(assetNode);\n if (query === void 0) {\n if (potentialMatch) {\n return this.getAssetFromAssetNode(potentialMatch);\n }\n return;\n }\n const queryArray = Array.isArray(query) ? [...query] : [query];\n let parentQuery = queryArray.shift();\n let depth = 0;\n while (potentialMatch && parentQuery) {\n if (depth++ >= 50) {\n throw new Error(\n \"Recursion depth exceeded. Check for cycles in the AST graph\"\n );\n }\n const matcher = createMatcher(parentQuery);\n const resolved = this.getAssetFromAssetNode(potentialMatch);\n if (resolved && matcher(resolved)) {\n if (queryArray.length === 0) {\n return resolved;\n }\n parentQuery = queryArray.shift();\n }\n potentialMatch = getParent(potentialMatch);\n }\n return void 0;\n }\n /**\n * Returns the property that the asset resides on relative to it's parent\n *\n * @param id - The id of the asset to _start_ at\n * @returns - The property name or undefined if no parent was found\n */\n getParentProp(id) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return;\n }\n let working = assetNode;\n let parent;\n while (working) {\n parent = working?.parent;\n if (parent && (parent.type === import_player.NodeType.Asset || parent.type === import_player.NodeType.View)) {\n break;\n }\n working = working?.parent;\n }\n if (parent && \"children\" in parent) {\n const childProp = parent.children?.find(\n (child) => child.value === working\n );\n return childProp?.path?.[0];\n }\n return void 0;\n }\n /** Given a node, return itself, or the nested asset if the node is an applicability node */\n getSourceAssetNode(node) {\n let sourceNode = this.viewInfo?.resolver.getSourceNode(node);\n if (sourceNode?.type === \"applicability\") {\n sourceNode = sourceNode.value;\n }\n return sourceNode;\n }\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's parents.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n hasParentContext(id, query) {\n return Boolean(this.getParent(id, query));\n }\n /** Search the node for any matching paths in the graph that match the query */\n findChildPath(node, query, includeSelfMatch = true) {\n if (query.length === 0) {\n return true;\n }\n const [first, ...rest] = query;\n const matcher = createMatcher(first);\n if (node.type === import_player.NodeType.Asset || node.type === import_player.NodeType.View || node.type === import_player.NodeType.Applicability) {\n const resolvedValue = this.getResolvedValue(node);\n const includesSelf = (includeSelfMatch && matcher(resolvedValue)) ?? false;\n const childQuery = includesSelf ? rest : query;\n if (childQuery.length === 0 && includesSelf) {\n return true;\n }\n const children = node.type === import_player.NodeType.Applicability ? node.value.children : node.children;\n if (childQuery.length && (!children || children.length === 0)) {\n return false;\n }\n if (children?.some(\n (childNode) => this.findChildPath(childNode.value, childQuery)\n )) {\n return true;\n }\n } else if (node.type === import_player.NodeType.MultiNode && node.values.some((childNode) => this.findChildPath(childNode, query))) {\n return true;\n } else if (\"children\" in node && node.children?.some(\n (childNode) => this.findChildPath(childNode.value, query)\n )) {\n return true;\n }\n return false;\n }\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's children.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n hasChildContext(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n const queryArray = Array.isArray(query) ? [...query] : [query];\n if (!assetNode) {\n return false;\n }\n return this.findChildPath(assetNode, queryArray, false);\n }\n /** Get the asset represented by id */\n getAsset(id) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode)\n return;\n return this.getAssetFromAssetNode(assetNode);\n }\n /**\n * Gets the value for an asset from an asset node\n */\n getAssetFromAssetNode(assetNode) {\n const sourceNode = this.getSourceAssetNode(assetNode);\n if (!sourceNode)\n return;\n return this.viewInfo?.resolvedMap.get(sourceNode)?.value;\n }\n /**\n * Get the path of the asset in the view upto\n * the asset that matches the query or to the view if no query is provided\n */\n getPath(id, query) {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode || !this.viewInfo) {\n return;\n }\n let path = [];\n let queryArray = [];\n if (query) {\n queryArray = Array.isArray(query) ? [...query] : [query];\n }\n let parentQuery = queryArray.shift();\n let working = assetNode;\n const findWorkingChild = (parent) => {\n return parent.children?.find((n) => n.value === working);\n };\n while (working !== void 0) {\n const { parent } = working;\n if (parent) {\n if (parent.type === import_player.NodeType.MultiNode) {\n const index = parent.values.indexOf(working);\n if (index !== -1) {\n const actualIndex = index - parent.values.slice(0, index).reduce(\n (undefCount, next) => this.getResolvedValue(next) === void 0 ? undefCount + 1 : undefCount,\n 0\n );\n path = [actualIndex, ...path];\n }\n } else if (\"children\" in parent) {\n const childProp = findWorkingChild(parent);\n path = [...childProp?.path ?? [], ...path];\n }\n if (parentQuery) {\n const matcher = createMatcher(parentQuery);\n if (matcher(this.getResolvedValue(parent))) {\n parentQuery = queryArray.shift();\n if (!parentQuery)\n return path;\n }\n }\n }\n working = working.parent;\n }\n return parentQuery ? void 0 : path;\n }\n getResolvedValue(node) {\n const sourceNode = this.getSourceAssetNode(node);\n return this.viewInfo?.resolvedMap.get(sourceNode ?? node)?.value;\n }\n };\n return __toCommonJS(src_exports);\n})();\n","export default function dlv(obj, key, def, p, undef) {\n\tkey = key.split ? key.split('.') : key;\n\tfor (p = 0; p < key.length; p++) {\n\t\tobj = obj ? obj[key[p]] : undef;\n\t}\n\treturn obj === undef ? def : obj;\n}\n","import dlv from \"dlv\";\n\n/** A function that checks overlapping properties against a reference value */\nexport type Matcher = ((searchObj: object) => boolean) & {\n /** The count represents the specificity of this matcher */\n count: number;\n};\n\n/** Traverse an object and collect any key/value pairs including nested keys */\nfunction traverseObj(\n object: Record<any, any>,\n path: string[] = [],\n pairs: Map<string[], any> = new Map(),\n): Map<string[], any> {\n for (const key of Object.keys(object)) {\n const val: any = object[key];\n const nestedPath = [...path, key];\n\n if (typeof val === \"object\") {\n traverseObj(val, nestedPath, pairs);\n } else {\n pairs.set(nestedPath, val);\n }\n }\n\n return pairs;\n}\n\n/**\n * Given a partial object, create a matcher function that checks if another object matches the specified properties\n * @param partialObj The partial object to match against\n * @returns A matcher function that checks if an object matches the partial object\n */\nexport function createObjectMatcher(partialObj: object): Matcher {\n // Convert the partial object into a list of [key, value] pairs;\n const pairs = traverseObj(partialObj);\n\n /** Generate a function to match against all of the properties we care about */\n const matchFunction = (searchObj: object) => {\n for (const entry of Array.from(pairs)) {\n const [path, value] = entry;\n\n if (dlv(searchObj, path) !== value) {\n return false;\n }\n }\n\n return true;\n };\n\n // Keep track of the specificity of the comparator\n matchFunction.count = pairs.size;\n\n return matchFunction;\n}\n","import { NodeType } from \"@player-ui/player\";\nimport type {\n Player,\n Asset,\n PlayerPlugin,\n Node,\n Resolver,\n} from \"@player-ui/player\";\nimport { createObjectMatcher } from \"@player-ui/partial-match-registry\";\nimport dlv from \"dlv\";\nimport { CheckPathPluginSymbol } from \"./symbols\";\n\nexport type QueryFunction = (asset: Asset) => boolean;\nexport type Query = QueryFunction | string | object;\n\n/** Generate a function that matches on the given input */\nfunction createMatcher(\n match: number | string | object | QueryFunction,\n): QueryFunction {\n if (typeof match === \"string\" || typeof match === \"number\") {\n return createObjectMatcher({ type: match });\n }\n\n if (typeof match === \"function\") {\n return match as QueryFunction;\n }\n\n return createObjectMatcher(match);\n}\n\ninterface ViewInfo {\n /** The root of the view graph */\n root?: Node.Node;\n\n /** A cache of an asset or view's id to it's node */\n assetIdMap: Map<string, Node.Asset | Node.View>;\n\n /** A map of a node to it's resolved node and value */\n resolvedMap: Map<\n Node.Node,\n {\n /** The final resolved AST node */\n resolved: Node.Node;\n\n /** The final, resolved value of the node */\n value: any;\n }\n >;\n\n /** The resolver instance tied to this view. Used to map back to original nodes */\n resolver: Resolver;\n}\n\n/**\n * Traverse up the tree until reaching the first asset or view\n * Returns undefined if no matching parent is found\n */\nfunction getParent(\n node: Node.Node,\n viewInfo?: ViewInfo,\n): Node.ViewOrAsset | undefined {\n let working = node;\n\n while (\n working.parent &&\n working.parent.type !== NodeType.Asset &&\n working.parent.type !== NodeType.View\n ) {\n working = working.parent;\n }\n\n const { parent } = working;\n\n if (\n parent &&\n (parent.type === NodeType.Asset || parent.type === NodeType.View)\n ) {\n return parent;\n }\n}\n\n/**\n * The `check-path-plugin` enables developers to query segments of the view tree for contextual rendering or behavior.\n * This is best suited to be referenced during the UI rendering phase, where one can make decisions about the rendering of an asset based on where it lies in the tree.\n */\nexport class CheckPathPlugin implements PlayerPlugin {\n name = \"check-path\";\n private viewInfo?: ViewInfo;\n public readonly symbol = CheckPathPluginSymbol;\n\n apply(player: Player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver: Resolver) => {\n const viewInfo: ViewInfo = {\n resolvedMap: new Map(),\n assetIdMap: new Map(),\n resolver,\n };\n this.viewInfo = viewInfo;\n\n resolver.hooks.afterResolve.tap(this.name, (value, node) => {\n const sourceNode = this.getSourceAssetNode(node);\n\n if (sourceNode) {\n viewInfo.resolvedMap.set(sourceNode, {\n resolved: node,\n value,\n });\n\n if (node.type === NodeType.Asset || node.type === NodeType.View) {\n const id = dlv(value, \"id\");\n\n if (id) {\n viewInfo.assetIdMap.set(id, node);\n }\n }\n }\n\n return value;\n });\n });\n });\n });\n }\n\n /**\n * Starts at the asset with the given id, and walks backwards _up_ the tree until it finds a match for the parent\n *\n * @param id - The id of the asset to _start_ at\n * @param query - A means of matching a parent asset\n * @returns - The parent object if a match is found, else undefined\n */\n public getParent(\n id: string,\n query?: Query | Array<Query>,\n ): Asset | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return undefined;\n }\n\n let potentialMatch = getParent(assetNode);\n\n // Handle the case of an empty query (just get the immediate parent)\n if (query === undefined) {\n if (potentialMatch) {\n return this.getAssetFromAssetNode(potentialMatch);\n }\n\n return;\n }\n\n const queryArray = Array.isArray(query) ? [...query] : [query];\n let parentQuery = queryArray.shift();\n\n // Keep track of the recursive depth in case we loop forever\n let depth = 0;\n\n while (potentialMatch && parentQuery) {\n if (depth++ >= 50) {\n throw new Error(\n \"Recursion depth exceeded. Check for cycles in the AST graph\",\n );\n }\n\n const matcher = createMatcher(parentQuery);\n const resolved = this.getAssetFromAssetNode(potentialMatch);\n\n if (resolved && matcher(resolved)) {\n // This is the last match.\n if (queryArray.length === 0) {\n return resolved;\n }\n\n parentQuery = queryArray.shift();\n }\n\n potentialMatch = getParent(potentialMatch);\n }\n\n return undefined;\n }\n\n /**\n * Returns the property that the asset resides on relative to it's parent\n *\n * @param id - The id of the asset to _start_ at\n * @returns - The property name or undefined if no parent was found\n */\n public getParentProp(id: string): string | number | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return;\n }\n\n let working: Node.Node | undefined = assetNode;\n let parent;\n\n while (working) {\n parent = working?.parent;\n\n if (\n parent &&\n (parent.type === NodeType.Asset || parent.type === NodeType.View)\n ) {\n break;\n }\n\n working = working?.parent;\n }\n\n if (parent && \"children\" in parent) {\n const childProp = parent.children?.find(\n (child) => child.value === working,\n );\n\n return childProp?.path?.[0];\n }\n\n return undefined;\n }\n\n /** Given a node, return itself, or the nested asset if the node is an applicability node */\n private getSourceAssetNode(node: Node.Node) {\n let sourceNode = this.viewInfo?.resolver.getSourceNode(node);\n if (sourceNode?.type === \"applicability\") {\n sourceNode = sourceNode.value;\n }\n\n return sourceNode;\n }\n\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's parents.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n public hasParentContext(id: string, query: Query | Array<Query>): boolean {\n return Boolean(this.getParent(id, query));\n }\n\n /** Search the node for any matching paths in the graph that match the query */\n private findChildPath(\n node: Node.Node,\n query: Array<Query>,\n includeSelfMatch = true,\n ): boolean {\n if (query.length === 0) {\n return true;\n }\n\n const [first, ...rest] = query;\n const matcher = createMatcher(first);\n\n if (\n node.type === NodeType.Asset ||\n node.type === NodeType.View ||\n node.type === NodeType.Applicability\n ) {\n const resolvedValue = this.getResolvedValue(node);\n const includesSelf =\n (includeSelfMatch && matcher(resolvedValue)) ?? false;\n const childQuery = includesSelf ? rest : query;\n\n if (childQuery.length === 0 && includesSelf) {\n return true;\n }\n\n const children =\n node.type === NodeType.Applicability\n ? (node.value as Node.ViewOrAsset).children\n : node.children;\n if (childQuery.length && (!children || children.length === 0)) {\n return false;\n }\n\n if (\n children?.some((childNode) =>\n this.findChildPath(childNode.value, childQuery),\n )\n ) {\n return true;\n }\n } else if (\n node.type === NodeType.MultiNode &&\n node.values.some((childNode) => this.findChildPath(childNode, query))\n ) {\n return true;\n } else if (\n \"children\" in node &&\n node.children?.some((childNode) =>\n this.findChildPath(childNode.value, query),\n )\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Given the starting node, check to verify that the supplied queries are relevant to the current asset's children.\n *\n * @param id - The id of the asset to _start_ at\n * @returns - true if the context applies, false if it doesn't\n */\n public hasChildContext(id: string, query: Query | Array<Query>): boolean {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n const queryArray = Array.isArray(query) ? [...query] : [query];\n\n if (!assetNode) {\n return false;\n }\n\n return this.findChildPath(assetNode, queryArray, false);\n }\n\n /** Get the asset represented by id */\n public getAsset(id: string): Asset | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n if (!assetNode) return;\n\n return this.getAssetFromAssetNode(assetNode);\n }\n\n /**\n * Gets the value for an asset from an asset node\n */\n public getAssetFromAssetNode(\n assetNode: Node.Asset | Node.View,\n ): Asset | undefined {\n const sourceNode = this.getSourceAssetNode(assetNode);\n if (!sourceNode) return;\n\n return this.viewInfo?.resolvedMap.get(sourceNode)?.value;\n }\n\n /**\n * Get the path of the asset in the view upto\n * the asset that matches the query or to the view if no query is provided\n */\n public getPath(\n id: string,\n query?: Query | Array<Query>,\n ): Array<string | number> | undefined {\n const assetNode = this.viewInfo?.assetIdMap.get(id);\n\n if (!assetNode || !this.viewInfo) {\n return;\n }\n\n let path: Array<string | number> = [];\n\n let queryArray: Query[] = [];\n\n if (query) {\n queryArray = Array.isArray(query) ? [...query] : [query];\n }\n\n let parentQuery = queryArray.shift();\n\n let working: Node.Node | undefined = assetNode;\n\n /** Find the child value for the working value from the given parent */\n const findWorkingChild = (parent: Node.ViewOrAsset | Node.Value) => {\n return parent.children?.find((n) => n.value === working);\n };\n\n while (working !== undefined) {\n const { parent } = working;\n\n if (parent) {\n if (parent.type === NodeType.MultiNode) {\n const index = parent.values.indexOf(working);\n\n if (index !== -1) {\n const actualIndex =\n index -\n parent.values\n .slice(0, index)\n .reduce(\n (undefCount, next) =>\n this.getResolvedValue(next) === undefined\n ? undefCount + 1\n : undefCount,\n 0,\n );\n\n path = [actualIndex, ...path];\n }\n } else if (\"children\" in parent) {\n const childProp = findWorkingChild(parent);\n path = [...(childProp?.path ?? []), ...path];\n }\n\n if (parentQuery) {\n const matcher = createMatcher(parentQuery);\n if (matcher(this.getResolvedValue(parent))) {\n parentQuery = queryArray.shift();\n if (!parentQuery) return path;\n }\n }\n }\n\n working = working.parent;\n }\n\n /* if at the end all queries haven't been consumed, \n it means we couldn't find a path till the matching query */\n return parentQuery ? undefined : path;\n }\n\n private getResolvedValue(node: Node.Node) {\n const sourceNode = this.getSourceAssetNode(node);\n return this.viewInfo?.resolvedMap.get(sourceNode ?? node)?.value;\n }\n}\n","module.exports = globalThis.Player","var SortedArray = (function () {\n var SortedArray = defclass({\n\n constructor: function (array, compare) {\n this.array = [];\n this.compare = compare || compareDefault;\n var length = array.length,\n index = 0;\n while (index < length) this.insert(array[index++]);\n },\n insert: function (element) {\n var array = this.array,\n compare = this.compare,\n high = array.length-1,\n low = 0,\n pos = -1,\n index,\n ordering;\n\n // The array is sorted. You must find the position of new element in O(log(n)), not O(n).\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element); \n if (ordering < 0) low = index + 1;\n else if (ordering > 0) high = index - 1;\n else {\n pos = index;\n break;\n };\n }\n\n if (pos === -1) {\n // if element was not found, high < low.\n pos = high;\n }\n // This assures that equal elements inserted after will be in a higher position in array.\n // They can be equal for comparison purposes, but different objects with different data.\n // Respecting the chronological order can be important for many applications.\n pos++;\n high = array.length-1;\n while ((pos < high) && (compare(element, array[pos]) === 0)){\n pos++;\n }\n index = array.length;\n // Just to increase array size.\n array.push(element); \n // Much faster. No need to elements swap.\n while (index > pos) {\n array[index] = array[--index];\n }\n // Set the new element on its correct position.\n array[pos] = element;\n\n return this;\n },\n search: function (element) {\n var array = this.array,\n compare = this.compare,\n high = array.length-1,\n low = 0,\n // In most languages, inner variable declaration makes the code slower.\n index,\n ordering;\n\n while (high >= low) {\n index = (high + low) / 2 >>> 0;\n ordering = compare(array[index], element);\n\n if (ordering < 0) low = index + 1;\n else if (ordering > 0) high = index - 1;\n else return index;\n }\n\n return -1;\n },\n remove: function (element) {\n var index = this.search(element);\n if (index >= 0) this.array.splice(index, 1);\n return this;\n }\n });\n\n SortedArray.comparing = function (property, array) {\n return new SortedArray(array, function (a, b) {\n // This should be faster than calling functions.\n // Besides, this way it is not needed to create useless function to return property value.\n return compareDefault(a[property], b[property]);\n });\n };\n\n return SortedArray;\n\n function defclass(prototype) {\n var constructor = prototype.constructor;\n constructor.prototype = prototype;\n return constructor;\n }\n\n function compareDefault(a, b) {\n // Equality has a very low chance to happen. It should be the last option.\n if (a < b)\n return -1;\n else if (a > b)\n return 1;\n else\n return 0;\n }\n}());\n\nif (typeof module === \"object\") module.exports = SortedArray;\nif (typeof define === \"function\" && define.amd)\n define(function () { return SortedArray; });\n","import SortedArray from \"sorted-array\";\nimport type { Matcher } from \"./deep-partial-matcher\";\nimport { createObjectMatcher } from \"./deep-partial-matcher\";\n\nexport { createObjectMatcher } from \"./deep-partial-matcher\";\n\n/** create a matcher function that matches exactly */\nfunction createBasicMatcher(seed: any): Matcher {\n /** a simple matcher function that only matches itself */\n const matcher = (match: any) => seed === match;\n matcher.count = 1;\n\n return matcher;\n}\n\ninterface RegistryIndex<V> {\n /** The original object we wanted to match on */\n key: object;\n\n /** The value to return */\n value: V;\n\n /** The matcher function for this entry */\n matcher: Matcher;\n}\n\n/** create an empty sorted array using the matcher count */\nconst createSortedArray = <V>() =>\n new SortedArray<RegistryIndex<V>>([], (c) => c.matcher.count);\n\n/**\n * A partial match registry is a map that uses an object to \"match\" against keys.\n * More specific matches take precedence over less specific ones.\n */\nexport class Registry<V> {\n private store = createSortedArray<V>();\n\n constructor(initialSet?: Array<[any, V]>) {\n initialSet?.forEach(([match, value]) => {\n this.set(match, value);\n });\n }\n\n /** Add match -> value mapping to the registry */\n set(match: any, value: V) {\n const matcher =\n typeof match === \"object\"\n ? createObjectMatcher(match)\n : createBasicMatcher(match);\n\n this.store.insert({\n key: match,\n value,\n matcher,\n });\n }\n\n /** Fetch the best match in the registry */\n get(query: any): V | undefined {\n for (const entry of this.store.array) {\n if (entry.matcher(query)) {\n return entry.value;\n }\n }\n }\n\n /** Loop over all entries and run callback */\n forEach(callbackfn: (value: RegistryIndex<V>) => void): void {\n for (const entry of this.store.array) {\n callbackfn(entry);\n }\n }\n\n /** Reset the items in the registry */\n clear() {\n this.store = createSortedArray<V>();\n }\n\n /** Check if the registry is empty*/\n isRegistryEmpty() {\n return this.store.array.length === 0;\n }\n}\n","export const CheckPathPluginSymbol = Symbol.for(\"CheckPathPlugin\");\n"]}
package/package.json CHANGED
@@ -6,17 +6,17 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-ui/check-path-plugin",
9
- "version": "0.15.3--canary.836.34713",
9
+ "version": "0.15.3--canary.836.34893",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "peerDependencies": {
12
- "@player-ui/player": "0.15.3--canary.836.34713"
12
+ "@player-ui/player": "0.15.3--canary.836.34893"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@player-ui/make-flow": "workspace:^",
16
16
  "@player-ui/asset-transform-plugin": "workspace:^"
17
17
  },
18
18
  "dependencies": {
19
- "@player-ui/partial-match-registry": "0.15.3--canary.836.34713",
19
+ "@player-ui/partial-match-registry": "0.15.3--canary.836.34893",
20
20
  "@types/dlv": "^1.1.4",
21
21
  "dlv": "^1.1.3",
22
22
  "tapable-ts": "^0.2.3",