angular-three 2.0.0-beta.17 → 2.0.0-beta.18

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.
@@ -1616,10 +1616,10 @@ class NgtCommonDirective {
1616
1616
  }
1617
1617
  });
1618
1618
  }
1619
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtCommonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1620
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtCommonDirective, ngImport: i0 }); }
1619
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtCommonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1620
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtCommonDirective, ngImport: i0 }); }
1621
1621
  }
1622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtCommonDirective, decorators: [{
1622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtCommonDirective, decorators: [{
1623
1623
  type: Directive
1624
1624
  }], ctorParameters: function () { return []; } });
1625
1625
 
@@ -1645,10 +1645,10 @@ class NgtArgs extends NgtCommonDirective {
1645
1645
  validate() {
1646
1646
  return !this.injected && !!this.injectedArgs.length;
1647
1647
  }
1648
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtArgs, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1649
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtArgs, isStandalone: true, selector: "ng-template[args]", inputs: { args: "args" }, usesInheritance: true, ngImport: i0 }); }
1648
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtArgs, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1649
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtArgs, isStandalone: true, selector: "ng-template[args]", inputs: { args: "args" }, usesInheritance: true, ngImport: i0 }); }
1650
1650
  }
1651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtArgs, decorators: [{
1651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtArgs, decorators: [{
1652
1652
  type: Directive,
1653
1653
  args: [{ selector: 'ng-template[args]', standalone: true }]
1654
1654
  }], propDecorators: { args: [{
@@ -1677,10 +1677,10 @@ class NgtParent extends NgtCommonDirective {
1677
1677
  validate() {
1678
1678
  return !this.injected && !!this.injectedParent;
1679
1679
  }
1680
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtParent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1681
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtParent, isStandalone: true, selector: "ng-template[parent]", inputs: { parent: "parent" }, usesInheritance: true, ngImport: i0 }); }
1680
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtParent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1681
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtParent, isStandalone: true, selector: "ng-template[parent]", inputs: { parent: "parent" }, usesInheritance: true, ngImport: i0 }); }
1682
1682
  }
1683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtParent, decorators: [{
1683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtParent, decorators: [{
1684
1684
  type: Directive,
1685
1685
  args: [{ selector: 'ng-template[parent]', standalone: true }]
1686
1686
  }], propDecorators: { parent: [{
@@ -1717,6 +1717,38 @@ function createAttachFunction(cb) {
1717
1717
  return (parent, child, store) => cb({ parent, child, store });
1718
1718
  }
1719
1719
 
1720
+ // @internal
1721
+ var NgtRendererClassId;
1722
+ (function (NgtRendererClassId) {
1723
+ NgtRendererClassId[NgtRendererClassId["type"] = 0] = "type";
1724
+ NgtRendererClassId[NgtRendererClassId["parent"] = 1] = "parent";
1725
+ NgtRendererClassId[NgtRendererClassId["injectedParent"] = 2] = "injectedParent";
1726
+ NgtRendererClassId[NgtRendererClassId["children"] = 3] = "children";
1727
+ NgtRendererClassId[NgtRendererClassId["destroyed"] = 4] = "destroyed";
1728
+ NgtRendererClassId[NgtRendererClassId["compound"] = 5] = "compound";
1729
+ NgtRendererClassId[NgtRendererClassId["compoundParent"] = 6] = "compoundParent";
1730
+ NgtRendererClassId[NgtRendererClassId["compounded"] = 7] = "compounded";
1731
+ NgtRendererClassId[NgtRendererClassId["queueOps"] = 8] = "queueOps";
1732
+ NgtRendererClassId[NgtRendererClassId["attributes"] = 9] = "attributes";
1733
+ NgtRendererClassId[NgtRendererClassId["properties"] = 10] = "properties";
1734
+ NgtRendererClassId[NgtRendererClassId["rawValue"] = 11] = "rawValue";
1735
+ NgtRendererClassId[NgtRendererClassId["ref"] = 12] = "ref";
1736
+ NgtRendererClassId[NgtRendererClassId["portalContainer"] = 13] = "portalContainer";
1737
+ NgtRendererClassId[NgtRendererClassId["injectorFactory"] = 14] = "injectorFactory";
1738
+ })(NgtRendererClassId || (NgtRendererClassId = {}));
1739
+ // @internal
1740
+ var NgtCompoundClassId;
1741
+ (function (NgtCompoundClassId) {
1742
+ NgtCompoundClassId[NgtCompoundClassId["applyFirst"] = 0] = "applyFirst";
1743
+ NgtCompoundClassId[NgtCompoundClassId["props"] = 1] = "props";
1744
+ })(NgtCompoundClassId || (NgtCompoundClassId = {}));
1745
+ // @internal
1746
+ var NgtQueueOpClassId;
1747
+ (function (NgtQueueOpClassId) {
1748
+ NgtQueueOpClassId[NgtQueueOpClassId["type"] = 0] = "type";
1749
+ NgtQueueOpClassId[NgtQueueOpClassId["op"] = 1] = "op";
1750
+ NgtQueueOpClassId[NgtQueueOpClassId["done"] = 2] = "done";
1751
+ })(NgtQueueOpClassId || (NgtQueueOpClassId = {}));
1720
1752
  function attachThreeChild(parent, child) {
1721
1753
  const pLS = getLocalState(parent);
1722
1754
  const cLS = getLocalState(child);
@@ -1759,9 +1791,9 @@ function attachThreeChild(parent, child) {
1759
1791
  });
1760
1792
  }
1761
1793
  // at this point we don't have rawValue yet, so we bail and wait until the Renderer recalls attach
1762
- if (child.__ngt_renderer__[11 /* NgtRendererClassId.rawValue */] === undefined)
1794
+ if (child.__ngt_renderer__[NgtRendererClassId.rawValue] === undefined)
1763
1795
  return;
1764
- attach(parent, child.__ngt_renderer__[11 /* NgtRendererClassId.rawValue */], attachProp);
1796
+ attach(parent, child.__ngt_renderer__[NgtRendererClassId.rawValue], attachProp);
1765
1797
  }
1766
1798
  else {
1767
1799
  attach(parent, child, attachProp);
@@ -1905,15 +1937,15 @@ class NgtRendererStore {
1905
1937
  rendererNode['ownerDocument'] = this.root.document;
1906
1938
  // NOTE: assign injectorFactory on non-three type since
1907
1939
  // rendererNode is an instance of DOM Node
1908
- if (state[0 /* NgtRendererClassId.type */] !== 'three') {
1909
- state[14 /* NgtRendererClassId.injectorFactory */] = () => getDebugNode(rendererNode).injector;
1940
+ if (state[NgtRendererClassId.type] !== 'three') {
1941
+ state[NgtRendererClassId.injectorFactory] = () => getDebugNode(rendererNode).injector;
1910
1942
  }
1911
- if (state[0 /* NgtRendererClassId.type */] === 'comment') {
1943
+ if (state[NgtRendererClassId.type] === 'comment') {
1912
1944
  // NOTE: we attach an arrow function to the Comment node
1913
1945
  // In our directives, we can call this function to then start tracking the RendererNode
1914
1946
  // this is done to limit the amount of Nodes we need to process for getCreationState
1915
1947
  rendererNode[SPECIAL_INTERNAL_ADD_COMMENT] = (node) => {
1916
- if (node && node.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'portal') {
1948
+ if (node && node.__ngt_renderer__[NgtRendererClassId.type] === 'portal') {
1917
1949
  this.portals.push(node);
1918
1950
  }
1919
1951
  else {
@@ -1922,68 +1954,68 @@ class NgtRendererStore {
1922
1954
  };
1923
1955
  return rendererNode;
1924
1956
  }
1925
- if (state[0 /* NgtRendererClassId.type */] === 'compound') {
1926
- state[8 /* NgtRendererClassId.queueOps */] = new Set();
1927
- state[9 /* NgtRendererClassId.attributes */] = {};
1928
- state[10 /* NgtRendererClassId.properties */] = {};
1957
+ if (state[NgtRendererClassId.type] === 'compound') {
1958
+ state[NgtRendererClassId.queueOps] = new Set();
1959
+ state[NgtRendererClassId.attributes] = {};
1960
+ state[NgtRendererClassId.properties] = {};
1929
1961
  return rendererNode;
1930
1962
  }
1931
1963
  return rendererNode;
1932
1964
  }
1933
1965
  setParent(node, parent) {
1934
- if (!node.__ngt_renderer__[1 /* NgtRendererClassId.parent */]) {
1935
- node.__ngt_renderer__[1 /* NgtRendererClassId.parent */] = parent;
1966
+ if (!node.__ngt_renderer__[NgtRendererClassId.parent]) {
1967
+ node.__ngt_renderer__[NgtRendererClassId.parent] = parent;
1936
1968
  }
1937
1969
  }
1938
1970
  addChild(node, child) {
1939
- if (!node.__ngt_renderer__[3 /* NgtRendererClassId.children */].includes(child)) {
1940
- node.__ngt_renderer__[3 /* NgtRendererClassId.children */].push(child);
1971
+ if (!node.__ngt_renderer__[NgtRendererClassId.children].includes(child)) {
1972
+ node.__ngt_renderer__[NgtRendererClassId.children].push(child);
1941
1973
  }
1942
1974
  }
1943
1975
  removeChild(node, child) {
1944
- const index = node.__ngt_renderer__?.[3 /* NgtRendererClassId.children */].findIndex((c) => child === c);
1976
+ const index = node.__ngt_renderer__?.[NgtRendererClassId.children].findIndex((c) => child === c);
1945
1977
  if (index >= 0) {
1946
- node.__ngt_renderer__[3 /* NgtRendererClassId.children */].splice(index, 1);
1978
+ node.__ngt_renderer__[NgtRendererClassId.children].splice(index, 1);
1947
1979
  }
1948
1980
  }
1949
1981
  setCompound(compound, instance) {
1950
1982
  const instanceRS = instance.__ngt_renderer__;
1951
- if (instanceRS && instanceRS[1 /* NgtRendererClassId.parent */]) {
1952
- const parentRS = instanceRS[1 /* NgtRendererClassId.parent */].__ngt_renderer__;
1983
+ if (instanceRS && instanceRS[NgtRendererClassId.parent]) {
1984
+ const parentRS = instanceRS[NgtRendererClassId.parent].__ngt_renderer__;
1953
1985
  // NOTE: if instance is already compounded by its parent. skip
1954
- if (parentRS[0 /* NgtRendererClassId.type */] === 'compound' &&
1955
- parentRS[7 /* NgtRendererClassId.compounded */] === instance) {
1986
+ if (parentRS[NgtRendererClassId.type] === 'compound' &&
1987
+ parentRS[NgtRendererClassId.compounded] === instance) {
1956
1988
  return;
1957
1989
  }
1958
1990
  }
1959
1991
  const rS = compound.__ngt_renderer__;
1960
- rS[7 /* NgtRendererClassId.compounded */] = instance;
1961
- const attributes = Object.keys(rS[9 /* NgtRendererClassId.attributes */]);
1962
- const properties = Object.keys(rS[10 /* NgtRendererClassId.properties */]);
1992
+ rS[NgtRendererClassId.compounded] = instance;
1993
+ const attributes = Object.keys(rS[NgtRendererClassId.attributes]);
1994
+ const properties = Object.keys(rS[NgtRendererClassId.properties]);
1963
1995
  for (const key of attributes) {
1964
- this.applyAttribute(instance, key, rS[9 /* NgtRendererClassId.attributes */][key]);
1996
+ this.applyAttribute(instance, key, rS[NgtRendererClassId.attributes][key]);
1965
1997
  }
1966
1998
  for (const key of properties) {
1967
- this.applyProperty(instance, key, rS[10 /* NgtRendererClassId.properties */][key]);
1999
+ this.applyProperty(instance, key, rS[NgtRendererClassId.properties][key]);
1968
2000
  }
1969
2001
  this.executeOperation(compound);
1970
2002
  }
1971
2003
  queueOperation(node, op) {
1972
- node.__ngt_renderer__[8 /* NgtRendererClassId.queueOps */].add(op);
2004
+ node.__ngt_renderer__[NgtRendererClassId.queueOps].add(op);
1973
2005
  }
1974
2006
  executeOperation(node, type = 'op') {
1975
2007
  const rS = node.__ngt_renderer__;
1976
- if (rS[8 /* NgtRendererClassId.queueOps */]?.size) {
1977
- rS[8 /* NgtRendererClassId.queueOps */].forEach((op) => {
1978
- if (op[0 /* NgtQueueOpClassId.type */] === type) {
1979
- op[1 /* NgtQueueOpClassId.op */]();
1980
- rS[8 /* NgtRendererClassId.queueOps */].delete(op);
2008
+ if (rS[NgtRendererClassId.queueOps]?.size) {
2009
+ rS[NgtRendererClassId.queueOps].forEach((op) => {
2010
+ if (op[NgtQueueOpClassId.type] === type) {
2011
+ op[NgtQueueOpClassId.op]();
2012
+ rS[NgtRendererClassId.queueOps].delete(op);
1981
2013
  }
1982
2014
  });
1983
2015
  }
1984
2016
  }
1985
2017
  processPortalContainer(portal) {
1986
- const injectorFactory = portal.__ngt_renderer__[14 /* NgtRendererClassId.injectorFactory */];
2018
+ const injectorFactory = portal.__ngt_renderer__[NgtRendererClassId.injectorFactory];
1987
2019
  const injector = injectorFactory?.();
1988
2020
  if (!injector)
1989
2021
  return;
@@ -1993,11 +2025,11 @@ class NgtRendererStore {
1993
2025
  const portalContainer = portalStore.get('scene');
1994
2026
  if (!portalContainer)
1995
2027
  return;
1996
- portal.__ngt_renderer__[13 /* NgtRendererClassId.portalContainer */] = this.createNode('three', portalContainer);
2028
+ portal.__ngt_renderer__[NgtRendererClassId.portalContainer] = this.createNode('three', portalContainer);
1997
2029
  }
1998
2030
  applyAttribute(node, name, value) {
1999
2031
  const rS = node.__ngt_renderer__;
2000
- if (rS[4 /* NgtRendererClassId.destroyed */])
2032
+ if (rS[NgtRendererClassId.destroyed])
2001
2033
  return;
2002
2034
  if (name === SPECIAL_PROPERTIES.RENDER_PRIORITY) {
2003
2035
  // NOTE: priority needs to be set as an attribute string so that they can be set as early as possible
@@ -2011,7 +2043,7 @@ class NgtRendererStore {
2011
2043
  }
2012
2044
  if (name === SPECIAL_PROPERTIES.COMPOUND) {
2013
2045
  // NOTE: we set the compound property on instance node now so we know that this instance is being compounded
2014
- rS[5 /* NgtRendererClassId.compound */] = [value === '' || value === 'first', {}];
2046
+ rS[NgtRendererClassId.compound] = [value === '' || value === 'first', {}];
2015
2047
  return;
2016
2048
  }
2017
2049
  if (name === SPECIAL_PROPERTIES.ATTACH) {
@@ -2030,7 +2062,7 @@ class NgtRendererStore {
2030
2062
  else if (!isNaN(Number(maybeCoerced))) {
2031
2063
  maybeCoerced = Number(maybeCoerced);
2032
2064
  }
2033
- rS[11 /* NgtRendererClassId.rawValue */] = maybeCoerced;
2065
+ rS[NgtRendererClassId.rawValue] = maybeCoerced;
2034
2066
  return;
2035
2067
  }
2036
2068
  applyProps(node, { [name]: value });
@@ -2038,18 +2070,18 @@ class NgtRendererStore {
2038
2070
  }
2039
2071
  applyProperty(node, name, value) {
2040
2072
  const rS = node.__ngt_renderer__;
2041
- if (rS[4 /* NgtRendererClassId.destroyed */])
2073
+ if (rS[NgtRendererClassId.destroyed])
2042
2074
  return;
2043
2075
  // [ref]
2044
2076
  if (name === SPECIAL_PROPERTIES.REF && is.ref(value)) {
2045
- rS[12 /* NgtRendererClassId.ref */] = value;
2077
+ rS[NgtRendererClassId.ref] = value;
2046
2078
  value.nativeElement = node;
2047
2079
  return;
2048
2080
  }
2049
- const parent = getLocalState(node).parent() || rS[1 /* NgtRendererClassId.parent */];
2081
+ const parent = getLocalState(node).parent() || rS[NgtRendererClassId.parent];
2050
2082
  // [rawValue]
2051
2083
  if (getLocalState(node).isRaw && name === SPECIAL_PROPERTIES.VALUE) {
2052
- rS[11 /* NgtRendererClassId.rawValue */] = value;
2084
+ rS[NgtRendererClassId.rawValue] = value;
2053
2085
  if (parent)
2054
2086
  attachThreeChild(parent, node);
2055
2087
  return;
@@ -2061,11 +2093,11 @@ class NgtRendererStore {
2061
2093
  attachThreeChild(parent, node);
2062
2094
  return;
2063
2095
  }
2064
- const compound = rS[5 /* NgtRendererClassId.compound */];
2065
- if (compound?.[1 /* NgtCompoundClassId.props */] &&
2066
- name in compound[1 /* NgtCompoundClassId.props */] &&
2067
- !compound[0 /* NgtCompoundClassId.applyFirst */]) {
2068
- value = compound[1 /* NgtCompoundClassId.props */][name];
2096
+ const compound = rS[NgtRendererClassId.compound];
2097
+ if (compound?.[NgtCompoundClassId.props] &&
2098
+ name in compound[NgtCompoundClassId.props] &&
2099
+ !compound[NgtCompoundClassId.applyFirst]) {
2100
+ value = compound[NgtCompoundClassId.props][name];
2069
2101
  }
2070
2102
  applyProps(node, { [name]: value });
2071
2103
  this.updateNativeProps(node, name, value);
@@ -2076,7 +2108,7 @@ class NgtRendererStore {
2076
2108
  isDOM(node) {
2077
2109
  const rS = node['__ngt_renderer__'];
2078
2110
  return (!rS ||
2079
- (rS[0 /* NgtRendererClassId.type */] !== 'compound' &&
2111
+ (rS[NgtRendererClassId.type] !== 'compound' &&
2080
2112
  (node instanceof Element || node instanceof Document || node instanceof Window)));
2081
2113
  }
2082
2114
  get rootScene() {
@@ -2086,37 +2118,37 @@ class NgtRendererStore {
2086
2118
  return this.root.portals;
2087
2119
  }
2088
2120
  getClosestParentWithInstance(node) {
2089
- let parent = node.__ngt_renderer__[1 /* NgtRendererClassId.parent */];
2090
- while (parent && parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] !== 'three') {
2091
- parent = parent.__ngt_renderer__[13 /* NgtRendererClassId.portalContainer */]
2092
- ? parent.__ngt_renderer__[13 /* NgtRendererClassId.portalContainer */]
2093
- : parent.__ngt_renderer__[1 /* NgtRendererClassId.parent */];
2121
+ let parent = node.__ngt_renderer__[NgtRendererClassId.parent];
2122
+ while (parent && parent.__ngt_renderer__[NgtRendererClassId.type] !== 'three') {
2123
+ parent = parent.__ngt_renderer__[NgtRendererClassId.portalContainer]
2124
+ ? parent.__ngt_renderer__[NgtRendererClassId.portalContainer]
2125
+ : parent.__ngt_renderer__[NgtRendererClassId.parent];
2094
2126
  }
2095
2127
  return parent;
2096
2128
  }
2097
2129
  getClosestParentWithCompound(node) {
2098
- if (node.__ngt_renderer__[6 /* NgtRendererClassId.compoundParent */]) {
2099
- return node.__ngt_renderer__[6 /* NgtRendererClassId.compoundParent */];
2130
+ if (node.__ngt_renderer__[NgtRendererClassId.compoundParent]) {
2131
+ return node.__ngt_renderer__[NgtRendererClassId.compoundParent];
2100
2132
  }
2101
- let parent = node.__ngt_renderer__[1 /* NgtRendererClassId.parent */];
2133
+ let parent = node.__ngt_renderer__[NgtRendererClassId.parent];
2102
2134
  if (parent &&
2103
- parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'compound' &&
2104
- !parent.__ngt_renderer__[7 /* NgtRendererClassId.compounded */]) {
2135
+ parent.__ngt_renderer__[NgtRendererClassId.type] === 'compound' &&
2136
+ !parent.__ngt_renderer__[NgtRendererClassId.compounded]) {
2105
2137
  return parent;
2106
2138
  }
2107
2139
  while (parent &&
2108
- (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three' ||
2109
- !parent.__ngt_renderer__[6 /* NgtRendererClassId.compoundParent */] ||
2110
- parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] !== 'compound')) {
2111
- parent = parent.__ngt_renderer__[1 /* NgtRendererClassId.parent */];
2140
+ (parent.__ngt_renderer__[NgtRendererClassId.type] === 'three' ||
2141
+ !parent.__ngt_renderer__[NgtRendererClassId.compoundParent] ||
2142
+ parent.__ngt_renderer__[NgtRendererClassId.type] !== 'compound')) {
2143
+ parent = parent.__ngt_renderer__[NgtRendererClassId.parent];
2112
2144
  }
2113
2145
  if (!parent)
2114
2146
  return;
2115
- if (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three' &&
2116
- parent.__ngt_renderer__[6 /* NgtRendererClassId.compoundParent */]) {
2117
- return parent.__ngt_renderer__[6 /* NgtRendererClassId.compoundParent */];
2147
+ if (parent.__ngt_renderer__[NgtRendererClassId.type] === 'three' &&
2148
+ parent.__ngt_renderer__[NgtRendererClassId.compoundParent]) {
2149
+ return parent.__ngt_renderer__[NgtRendererClassId.compoundParent];
2118
2150
  }
2119
- if (!parent.__ngt_renderer__[7 /* NgtRendererClassId.compounded */]) {
2151
+ if (!parent.__ngt_renderer__[NgtRendererClassId.compounded]) {
2120
2152
  return parent;
2121
2153
  }
2122
2154
  return null;
@@ -2129,11 +2161,11 @@ class NgtRendererStore {
2129
2161
  }
2130
2162
  destroy(node, parent) {
2131
2163
  const rS = node.__ngt_renderer__;
2132
- if (!rS || rS[4 /* NgtRendererClassId.destroyed */])
2164
+ if (!rS || rS[NgtRendererClassId.destroyed])
2133
2165
  return;
2134
- if (rS[0 /* NgtRendererClassId.type */] === 'three') {
2135
- rS[5 /* NgtRendererClassId.compound */] = undefined;
2136
- rS[6 /* NgtRendererClassId.compoundParent */] = undefined;
2166
+ if (rS[NgtRendererClassId.type] === 'three') {
2167
+ rS[NgtRendererClassId.compound] = undefined;
2168
+ rS[NgtRendererClassId.compoundParent] = undefined;
2137
2169
  const localState = getLocalState(node);
2138
2170
  if (localState.objects) {
2139
2171
  untracked(localState.objects).forEach((obj) => this.destroy(obj, parent));
@@ -2158,42 +2190,42 @@ class NgtRendererStore {
2158
2190
  delete node['__ngt__'];
2159
2191
  }
2160
2192
  }
2161
- if (rS[0 /* NgtRendererClassId.type */] === 'comment') {
2162
- rS[14 /* NgtRendererClassId.injectorFactory */] = null;
2193
+ if (rS[NgtRendererClassId.type] === 'comment') {
2194
+ rS[NgtRendererClassId.injectorFactory] = null;
2163
2195
  delete node[SPECIAL_INTERNAL_ADD_COMMENT];
2164
2196
  const index = this.comments.findIndex((comment) => comment === node);
2165
2197
  if (index > -1) {
2166
2198
  this.comments.splice(index, 1);
2167
2199
  }
2168
2200
  }
2169
- if (rS[0 /* NgtRendererClassId.type */] === 'portal') {
2170
- rS[14 /* NgtRendererClassId.injectorFactory */] = null;
2201
+ if (rS[NgtRendererClassId.type] === 'portal') {
2202
+ rS[NgtRendererClassId.injectorFactory] = null;
2171
2203
  const index = this.portals.findIndex((portal) => portal === node);
2172
2204
  if (index > -1) {
2173
2205
  this.portals.splice(index, 1);
2174
2206
  }
2175
2207
  }
2176
- if (rS[0 /* NgtRendererClassId.type */] === 'compound') {
2177
- rS[7 /* NgtRendererClassId.compounded */] = undefined;
2178
- rS[9 /* NgtRendererClassId.attributes */] = null;
2179
- rS[10 /* NgtRendererClassId.properties */] = null;
2208
+ if (rS[NgtRendererClassId.type] === 'compound') {
2209
+ rS[NgtRendererClassId.compounded] = undefined;
2210
+ rS[NgtRendererClassId.attributes] = null;
2211
+ rS[NgtRendererClassId.properties] = null;
2180
2212
  this.executeOperation(node, 'cleanUp');
2181
- rS[8 /* NgtRendererClassId.queueOps */].clear();
2182
- rS[8 /* NgtRendererClassId.queueOps */] = null;
2213
+ rS[NgtRendererClassId.queueOps].clear();
2214
+ rS[NgtRendererClassId.queueOps] = null;
2183
2215
  }
2184
- if (rS[12 /* NgtRendererClassId.ref */]) {
2216
+ if (rS[NgtRendererClassId.ref]) {
2185
2217
  // nullify ref
2186
2218
  // but we do it later so that it doesn't hinder render
2187
2219
  // TODO: will this cause memory leak?
2188
2220
  requestAnimationFrame(() => {
2189
- rS[12 /* NgtRendererClassId.ref */].nativeElement = null;
2190
- rS[12 /* NgtRendererClassId.ref */] = undefined;
2221
+ rS[NgtRendererClassId.ref].nativeElement = null;
2222
+ rS[NgtRendererClassId.ref] = undefined;
2191
2223
  });
2192
2224
  }
2193
2225
  // nullify parent
2194
- rS[1 /* NgtRendererClassId.parent */] = null;
2195
- for (const renderChild of rS[3 /* NgtRendererClassId.children */] || []) {
2196
- if (renderChild.__ngt_renderer__?.[0 /* NgtRendererClassId.type */] === 'three' && parent) {
2226
+ rS[NgtRendererClassId.parent] = null;
2227
+ for (const renderChild of rS[NgtRendererClassId.children] || []) {
2228
+ if (renderChild.__ngt_renderer__?.[NgtRendererClassId.type] === 'three' && parent) {
2197
2229
  const closestInstance = this.getClosestParentWithInstance(parent);
2198
2230
  if (closestInstance) {
2199
2231
  removeThreeChild(closestInstance, renderChild, true);
@@ -2201,8 +2233,8 @@ class NgtRendererStore {
2201
2233
  }
2202
2234
  this.destroy(renderChild, parent);
2203
2235
  }
2204
- rS[3 /* NgtRendererClassId.children */] = [];
2205
- rS[4 /* NgtRendererClassId.destroyed */] = true;
2236
+ rS[NgtRendererClassId.children] = [];
2237
+ rS[NgtRendererClassId.destroyed] = true;
2206
2238
  if (parent) {
2207
2239
  this.removeChild(parent, node);
2208
2240
  }
@@ -2219,12 +2251,12 @@ class NgtRendererStore {
2219
2251
  let i = this.comments.length - 1;
2220
2252
  while (i >= 0) {
2221
2253
  const comment = this.comments[i];
2222
- if (comment.__ngt_renderer__[4 /* NgtRendererClassId.destroyed */]) {
2254
+ if (comment.__ngt_renderer__[NgtRendererClassId.destroyed]) {
2223
2255
  destroyed.push(i);
2224
2256
  i--;
2225
2257
  continue;
2226
2258
  }
2227
- const injector = comment.__ngt_renderer__[14 /* NgtRendererClassId.injectorFactory */]();
2259
+ const injector = comment.__ngt_renderer__[NgtRendererClassId.injectorFactory]();
2228
2260
  if (!injector) {
2229
2261
  i--;
2230
2262
  continue;
@@ -2249,12 +2281,12 @@ class NgtRendererStore {
2249
2281
  while (i >= 0) {
2250
2282
  // loop through the portal state backwards to find the closest NgtStore
2251
2283
  const portal = this.portals[i];
2252
- if (portal.__ngt_renderer__[4 /* NgtRendererClassId.destroyed */]) {
2284
+ if (portal.__ngt_renderer__[NgtRendererClassId.destroyed]) {
2253
2285
  destroyed.push(i);
2254
2286
  i--;
2255
2287
  continue;
2256
2288
  }
2257
- const injector = portal.__ngt_renderer__[14 /* NgtRendererClassId.injectorFactory */]();
2289
+ const injector = portal.__ngt_renderer__[NgtRendererClassId.injectorFactory]();
2258
2290
  if (!injector) {
2259
2291
  i--;
2260
2292
  continue;
@@ -2311,10 +2343,10 @@ class NgtRendererFactory {
2311
2343
  }
2312
2344
  return renderer;
2313
2345
  }
2314
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2315
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRendererFactory }); }
2346
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2347
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRendererFactory }); }
2316
2348
  }
2317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRendererFactory, decorators: [{
2349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRendererFactory, decorators: [{
2318
2350
  type: Injectable
2319
2351
  }] });
2320
2352
  /**
@@ -2346,7 +2378,7 @@ class NgtRenderer {
2346
2378
  if (this.root) {
2347
2379
  this.root = false;
2348
2380
  const node = this.store.createNode('three', this.store.rootScene);
2349
- node.__ngt_renderer__[14 /* NgtRendererClassId.injectorFactory */] = () => getDebugNode(element).injector;
2381
+ node.__ngt_renderer__[NgtRendererClassId.injectorFactory] = () => getDebugNode(element).injector;
2350
2382
  return node;
2351
2383
  }
2352
2384
  // handle compound
@@ -2385,7 +2417,7 @@ class NgtRenderer {
2385
2417
  localState.store = store;
2386
2418
  const node = this.store.createNode('three', object);
2387
2419
  if (parent) {
2388
- node.__ngt_renderer__[2 /* NgtRendererClassId.injectedParent */] = parent;
2420
+ node.__ngt_renderer__[NgtRendererClassId.injectedParent] = parent;
2389
2421
  }
2390
2422
  return node;
2391
2423
  }
@@ -2405,7 +2437,7 @@ class NgtRenderer {
2405
2437
  localState.attach = ['material'];
2406
2438
  }
2407
2439
  if (parent) {
2408
- node.__ngt_renderer__[2 /* NgtRendererClassId.injectedParent */] = parent;
2440
+ node.__ngt_renderer__[NgtRendererClassId.injectedParent] = parent;
2409
2441
  }
2410
2442
  return node;
2411
2443
  }
@@ -2417,8 +2449,8 @@ class NgtRenderer {
2417
2449
  appendChild(parent, newChild) {
2418
2450
  const pRS = parent.__ngt_renderer__;
2419
2451
  const cRS = newChild.__ngt_renderer__;
2420
- if (pRS[0 /* NgtRendererClassId.type */] === 'dom' &&
2421
- (newChild instanceof Text || cRS[0 /* NgtRendererClassId.type */] === 'dom')) {
2452
+ if (pRS[NgtRendererClassId.type] === 'dom' &&
2453
+ (newChild instanceof Text || cRS[NgtRendererClassId.type] === 'dom')) {
2422
2454
  this.store.addChild(parent, newChild);
2423
2455
  this.delegate.appendChild(parent, newChild);
2424
2456
  if (cRS) {
@@ -2432,19 +2464,19 @@ class NgtRenderer {
2432
2464
  }
2433
2465
  return;
2434
2466
  }
2435
- if (cRS?.[0 /* NgtRendererClassId.type */] === 'comment') {
2467
+ if (cRS?.[NgtRendererClassId.type] === 'comment') {
2436
2468
  this.store.setParent(newChild, parent);
2437
2469
  return;
2438
2470
  }
2439
- if (cRS?.[2 /* NgtRendererClassId.injectedParent */]) {
2440
- if (is.ref(cRS[2 /* NgtRendererClassId.injectedParent */])) {
2441
- const injector = cRS[14 /* NgtRendererClassId.injectorFactory */]().get(Injector, null);
2471
+ if (cRS?.[NgtRendererClassId.injectedParent]) {
2472
+ if (is.ref(cRS[NgtRendererClassId.injectedParent])) {
2473
+ const injector = cRS[NgtRendererClassId.injectorFactory]().get(Injector, null);
2442
2474
  if (!injector) {
2443
2475
  console.warn(`[NGT] NgtRenderer is attempting to start an effect for injectedParent but no Injector is found.`);
2444
2476
  return;
2445
2477
  }
2446
2478
  const watcher = effect(() => {
2447
- const injectedParent = cRS[2 /* NgtRendererClassId.injectedParent */].nativeElement;
2479
+ const injectedParent = cRS[NgtRendererClassId.injectedParent].nativeElement;
2448
2480
  if (injectedParent && injectedParent !== parent) {
2449
2481
  this.appendChild(injectedParent, newChild);
2450
2482
  // only run this effect once
@@ -2454,38 +2486,38 @@ class NgtRenderer {
2454
2486
  }, { injector, manualCleanup: true });
2455
2487
  return;
2456
2488
  }
2457
- else if (parent !== cRS[2 /* NgtRendererClassId.injectedParent */]) {
2458
- this.appendChild(cRS[2 /* NgtRendererClassId.injectedParent */], newChild);
2489
+ else if (parent !== cRS[NgtRendererClassId.injectedParent]) {
2490
+ this.appendChild(cRS[NgtRendererClassId.injectedParent], newChild);
2459
2491
  return;
2460
2492
  }
2461
2493
  }
2462
2494
  this.store.setParent(newChild, parent);
2463
2495
  this.store.addChild(parent, newChild);
2464
2496
  // if new child is a portal
2465
- if (cRS?.[0 /* NgtRendererClassId.type */] === 'portal') {
2497
+ if (cRS?.[NgtRendererClassId.type] === 'portal') {
2466
2498
  this.store.processPortalContainer(newChild);
2467
- if (cRS[13 /* NgtRendererClassId.portalContainer */]) {
2468
- this.appendChild(parent, cRS[13 /* NgtRendererClassId.portalContainer */]);
2499
+ if (cRS[NgtRendererClassId.portalContainer]) {
2500
+ this.appendChild(parent, cRS[NgtRendererClassId.portalContainer]);
2469
2501
  }
2470
2502
  return;
2471
2503
  }
2472
2504
  // if parent is a portal
2473
- if (pRS[0 /* NgtRendererClassId.type */] === 'portal') {
2505
+ if (pRS[NgtRendererClassId.type] === 'portal') {
2474
2506
  this.store.processPortalContainer(parent);
2475
- if (pRS[13 /* NgtRendererClassId.portalContainer */]) {
2476
- this.appendChild(pRS[13 /* NgtRendererClassId.portalContainer */], newChild);
2507
+ if (pRS[NgtRendererClassId.portalContainer]) {
2508
+ this.appendChild(pRS[NgtRendererClassId.portalContainer], newChild);
2477
2509
  }
2478
2510
  return;
2479
2511
  }
2480
2512
  // if both are three instances, straightforward case
2481
- if (pRS[0 /* NgtRendererClassId.type */] === 'three' && cRS?.[0 /* NgtRendererClassId.type */] === 'three') {
2513
+ if (pRS[NgtRendererClassId.type] === 'three' && cRS?.[NgtRendererClassId.type] === 'three') {
2482
2514
  // if child already attached to a parent, skip
2483
2515
  if (getLocalState(newChild).parent && untracked(getLocalState(newChild).parent))
2484
2516
  return;
2485
2517
  // attach THREE child
2486
2518
  attachThreeChild(parent, newChild);
2487
2519
  // here, we handle the special case of if the parent has a compoundParent, which means this child is part of a compound parent template
2488
- if (!cRS[5 /* NgtRendererClassId.compound */])
2520
+ if (!cRS[NgtRendererClassId.compound])
2489
2521
  return;
2490
2522
  const closestGrandparentWithCompound = this.store.getClosestParentWithCompound(parent);
2491
2523
  if (!closestGrandparentWithCompound)
@@ -2494,27 +2526,27 @@ class NgtRenderer {
2494
2526
  return;
2495
2527
  }
2496
2528
  // if only the parent is the THREE instance
2497
- if (pRS[0 /* NgtRendererClassId.type */] === 'three') {
2498
- for (const renderChild of cRS?.[3 /* NgtRendererClassId.children */]) {
2529
+ if (pRS[NgtRendererClassId.type] === 'three') {
2530
+ for (const renderChild of cRS?.[NgtRendererClassId.children]) {
2499
2531
  this.appendChild(parent, renderChild);
2500
2532
  }
2501
2533
  }
2502
2534
  // if parent is a compound
2503
- if (pRS[0 /* NgtRendererClassId.type */] === 'compound') {
2535
+ if (pRS[NgtRendererClassId.type] === 'compound') {
2504
2536
  // if compound doesn't have a THREE instance set yet
2505
- if (!pRS[7 /* NgtRendererClassId.compounded */] && cRS[0 /* NgtRendererClassId.type */] === 'three') {
2537
+ if (!pRS[NgtRendererClassId.compounded] && cRS[NgtRendererClassId.type] === 'three') {
2506
2538
  // if child is indeed an ngtCompound
2507
- if (cRS[5 /* NgtRendererClassId.compound */])
2539
+ if (cRS[NgtRendererClassId.compound])
2508
2540
  this.store.setCompound(parent, newChild);
2509
2541
  // if not, we track the parent (that is supposedly the compound component) on this three instance
2510
- else if (!cRS[6 /* NgtRendererClassId.compoundParent */])
2511
- cRS[6 /* NgtRendererClassId.compoundParent */] = parent;
2542
+ else if (!cRS[NgtRendererClassId.compoundParent])
2543
+ cRS[NgtRendererClassId.compoundParent] = parent;
2512
2544
  }
2513
2545
  // reset the compound if it's changed
2514
- if (pRS[7 /* NgtRendererClassId.compounded */] &&
2515
- cRS[0 /* NgtRendererClassId.type */] === 'three' &&
2516
- cRS[5 /* NgtRendererClassId.compound */] &&
2517
- pRS[7 /* NgtRendererClassId.compounded */] !== newChild) {
2546
+ if (pRS[NgtRendererClassId.compounded] &&
2547
+ cRS[NgtRendererClassId.type] === 'three' &&
2548
+ cRS[NgtRendererClassId.compound] &&
2549
+ pRS[NgtRendererClassId.compounded] !== newChild) {
2518
2550
  this.store.setCompound(parent, newChild);
2519
2551
  }
2520
2552
  }
@@ -2541,21 +2573,21 @@ class NgtRenderer {
2541
2573
  this.store.destroy(oldChild, parent);
2542
2574
  return;
2543
2575
  }
2544
- if (cRS[0 /* NgtRendererClassId.type */] === 'dom' && (!pRS || pRS[0 /* NgtRendererClassId.type */] === 'dom')) {
2576
+ if (cRS[NgtRendererClassId.type] === 'dom' && (!pRS || pRS[NgtRendererClassId.type] === 'dom')) {
2545
2577
  this.delegate.removeChild(parent, oldChild);
2546
2578
  this.store.destroy(oldChild, parent);
2547
2579
  return;
2548
2580
  }
2549
- if (pRS[0 /* NgtRendererClassId.type */] === 'three' && cRS[0 /* NgtRendererClassId.type */] === 'three') {
2581
+ if (pRS[NgtRendererClassId.type] === 'three' && cRS[NgtRendererClassId.type] === 'three') {
2550
2582
  removeThreeChild(parent, oldChild, true);
2551
2583
  this.store.destroy(oldChild, parent);
2552
2584
  return;
2553
2585
  }
2554
- if (pRS[0 /* NgtRendererClassId.type */] === 'compound' && pRS[1 /* NgtRendererClassId.parent */]) {
2555
- this.removeChild(pRS[1 /* NgtRendererClassId.parent */], oldChild, isHostElement);
2586
+ if (pRS[NgtRendererClassId.type] === 'compound' && pRS[NgtRendererClassId.parent]) {
2587
+ this.removeChild(pRS[NgtRendererClassId.parent], oldChild, isHostElement);
2556
2588
  return;
2557
2589
  }
2558
- if (pRS[0 /* NgtRendererClassId.type */] === 'three') {
2590
+ if (pRS[NgtRendererClassId.type] === 'three') {
2559
2591
  this.store.destroy(oldChild, parent);
2560
2592
  return;
2561
2593
  }
@@ -2566,23 +2598,23 @@ class NgtRenderer {
2566
2598
  }
2567
2599
  parentNode(node) {
2568
2600
  const rS = node.__ngt_renderer__;
2569
- if (rS?.[1 /* NgtRendererClassId.parent */])
2570
- return rS[1 /* NgtRendererClassId.parent */];
2601
+ if (rS?.[NgtRendererClassId.parent])
2602
+ return rS[NgtRendererClassId.parent];
2571
2603
  return this.delegate.parentNode(node);
2572
2604
  }
2573
2605
  setAttribute(el, name, value, namespace) {
2574
2606
  const rS = el.__ngt_renderer__;
2575
- if (rS[0 /* NgtRendererClassId.type */] === 'compound') {
2607
+ if (rS[NgtRendererClassId.type] === 'compound') {
2576
2608
  // we don't have the compound instance yet
2577
- rS[9 /* NgtRendererClassId.attributes */][name] = value;
2578
- if (!rS[7 /* NgtRendererClassId.compounded */]) {
2609
+ rS[NgtRendererClassId.attributes][name] = value;
2610
+ if (!rS[NgtRendererClassId.compounded]) {
2579
2611
  this.store.queueOperation(el, ['op', () => this.setAttribute(el, name, value, namespace)]);
2580
2612
  return;
2581
2613
  }
2582
- this.setAttribute(rS[7 /* NgtRendererClassId.compounded */], name, value, namespace);
2614
+ this.setAttribute(rS[NgtRendererClassId.compounded], name, value, namespace);
2583
2615
  return;
2584
2616
  }
2585
- if (rS[0 /* NgtRendererClassId.type */] === 'three') {
2617
+ if (rS[NgtRendererClassId.type] === 'three') {
2586
2618
  this.store.applyAttribute(el, name, value);
2587
2619
  return;
2588
2620
  }
@@ -2591,20 +2623,20 @@ class NgtRenderer {
2591
2623
  setProperty(el, name, value) {
2592
2624
  // TODO: should we support ref value
2593
2625
  const rS = el.__ngt_renderer__;
2594
- if (rS[0 /* NgtRendererClassId.type */] === 'compound') {
2626
+ if (rS[NgtRendererClassId.type] === 'compound') {
2595
2627
  // we don't have the compound instance yet
2596
- rS[10 /* NgtRendererClassId.properties */][name] = value;
2597
- if (!rS[7 /* NgtRendererClassId.compounded */]) {
2628
+ rS[NgtRendererClassId.properties][name] = value;
2629
+ if (!rS[NgtRendererClassId.compounded]) {
2598
2630
  this.store.queueOperation(el, ['op', () => this.setProperty(el, name, value)]);
2599
2631
  return;
2600
2632
  }
2601
- if (rS[7 /* NgtRendererClassId.compounded */].__ngt_renderer__[5 /* NgtRendererClassId.compound */]) {
2602
- Object.assign(rS[7 /* NgtRendererClassId.compounded */].__ngt_renderer__[5 /* NgtRendererClassId.compound */][1 /* NgtCompoundClassId.props */], { [name]: value });
2633
+ if (rS[NgtRendererClassId.compounded].__ngt_renderer__[NgtRendererClassId.compound]) {
2634
+ Object.assign(rS[NgtRendererClassId.compounded].__ngt_renderer__[NgtRendererClassId.compound][NgtCompoundClassId.props], { [name]: value });
2603
2635
  }
2604
- this.setProperty(rS[7 /* NgtRendererClassId.compounded */], name, value);
2636
+ this.setProperty(rS[NgtRendererClassId.compounded], name, value);
2605
2637
  return;
2606
2638
  }
2607
- if (rS[0 /* NgtRendererClassId.type */] === 'three') {
2639
+ if (rS[NgtRendererClassId.type] === 'three') {
2608
2640
  this.store.applyProperty(el, name, value);
2609
2641
  return;
2610
2642
  }
@@ -2617,15 +2649,15 @@ class NgtRenderer {
2617
2649
  if (!rS || this.store.isDOM(target)) {
2618
2650
  return this.delegate.listen(target, eventName, callback);
2619
2651
  }
2620
- if (rS[0 /* NgtRendererClassId.type */] === 'three' ||
2621
- (rS[0 /* NgtRendererClassId.type */] === 'compound' && rS[7 /* NgtRendererClassId.compounded */])) {
2622
- const instance = rS[7 /* NgtRendererClassId.compounded */] || target;
2652
+ if (rS[NgtRendererClassId.type] === 'three' ||
2653
+ (rS[NgtRendererClassId.type] === 'compound' && rS[NgtRendererClassId.compounded])) {
2654
+ const instance = rS[NgtRendererClassId.compounded] || target;
2623
2655
  const priority = getLocalState(target).priority;
2624
- const targetCdr = rS[14 /* NgtRendererClassId.injectorFactory */]?.().get(ChangeDetectorRef, null) ||
2625
- rS[1 /* NgtRendererClassId.parent */]?.__ngt_renderer__?.[14 /* NgtRendererClassId.injectorFactory */]?.().get(ChangeDetectorRef, null);
2656
+ const targetCdr = rS[NgtRendererClassId.injectorFactory]?.().get(ChangeDetectorRef, null) ||
2657
+ rS[NgtRendererClassId.parent]?.__ngt_renderer__?.[NgtRendererClassId.injectorFactory]?.().get(ChangeDetectorRef, null);
2626
2658
  return processThreeEvent(instance, priority || 0, eventName, callback, this.zone, this.cdr, targetCdr);
2627
2659
  }
2628
- if (rS[0 /* NgtRendererClassId.type */] === 'compound' && !rS[7 /* NgtRendererClassId.compounded */]) {
2660
+ if (rS[NgtRendererClassId.type] === 'compound' && !rS[NgtRendererClassId.compounded]) {
2629
2661
  this.store.queueOperation(target, [
2630
2662
  'op',
2631
2663
  () => this.store.queueOperation(target, ['cleanUp', this.listen(target, eventName, callback)]),
@@ -2647,10 +2679,10 @@ class NgtRenderer {
2647
2679
  return () => { };
2648
2680
  }
2649
2681
  shouldFindGrandparentInstance(pRS, cRS, child) {
2650
- const pType = pRS[0 /* NgtRendererClassId.type */];
2651
- const cType = cRS[0 /* NgtRendererClassId.type */];
2652
- const isParentCompounded = pRS[7 /* NgtRendererClassId.compounded */];
2653
- const isChildCompounded = cRS[7 /* NgtRendererClassId.compounded */];
2682
+ const pType = pRS[NgtRendererClassId.type];
2683
+ const cType = cRS[NgtRendererClassId.type];
2684
+ const isParentCompounded = pRS[NgtRendererClassId.compounded];
2685
+ const isChildCompounded = cRS[NgtRendererClassId.compounded];
2654
2686
  // if child is three but haven't been attached to a parent yet
2655
2687
  const isDanglingThreeChild = cType === 'three' && !untracked(getLocalState(child).parent);
2656
2688
  // or both parent and child are DOM elements
@@ -2851,21 +2883,21 @@ class NgtCanvas {
2851
2883
  }
2852
2884
  });
2853
2885
  }
2854
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2855
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: "sceneGraph", sceneGraphInputs: "sceneGraphInputs", compoundPrefixes: "compoundPrefixes", linear: "linear", legacy: "legacy", flat: "flat", orthographic: "orthographic", frameloop: "frameloop", dpr: "dpr", raycaster: "raycaster", shadows: "shadows", camera: "camera", scene: "scene", gl: "gl", eventSource: "eventSource", eventPrefix: "eventPrefix", lookAt: "lookAt", performance: "performance" }, outputs: { created: "created" }, host: { properties: { "style.pointerEvents": "hbPointerEvents()" }, styleAttribute: "display: block;position: relative;width: 100%;height: 100%;overflow: hidden;" }, providers: [provideNgxResizeOptions({ emitInZone: false, emitInitialResult: true }), provideNgtStore()], viewQueries: [{ propertyName: "glCanvas", first: true, predicate: ["glCanvas"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
2886
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2887
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: "sceneGraph", sceneGraphInputs: "sceneGraphInputs", compoundPrefixes: "compoundPrefixes", linear: "linear", legacy: "legacy", flat: "flat", orthographic: "orthographic", frameloop: "frameloop", dpr: "dpr", raycaster: "raycaster", shadows: "shadows", camera: "camera", scene: "scene", gl: "gl", eventSource: "eventSource", eventPrefix: "eventPrefix", lookAt: "lookAt", performance: "performance" }, outputs: { created: "created" }, host: { properties: { "style.pointerEvents": "hbPointerEvents()" }, styleAttribute: "display: block;position: relative;width: 100%;height: 100%;overflow: hidden;" }, providers: [provideNgxResizeOptions({ emitInZone: false, emitInitialResult: true }), provideNgtStore()], viewQueries: [{ propertyName: "glCanvas", first: true, predicate: ["glCanvas"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
2856
2888
  <div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
2857
- <canvas #glCanvas style="display: block;"> </canvas>
2889
+ <canvas #glCanvas style="display: block;"></canvas>
2858
2890
  </div>
2859
2891
  `, isInline: true, dependencies: [{ kind: "directive", type: NgxResize, selector: "[ngxResize]", inputs: ["ngxResizeOptions"], outputs: ["ngxResize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2860
2892
  }
2861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtCanvas, decorators: [{
2893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtCanvas, decorators: [{
2862
2894
  type: Component,
2863
2895
  args: [{
2864
2896
  selector: 'ngt-canvas',
2865
2897
  standalone: true,
2866
2898
  template: `
2867
2899
  <div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
2868
- <canvas #glCanvas style="display: block;"> </canvas>
2900
+ <canvas #glCanvas style="display: block;"></canvas>
2869
2901
  </div>
2870
2902
  `,
2871
2903
  imports: [NgxResize],
@@ -2936,10 +2968,10 @@ class NgtKey extends NgtCommonDirective {
2936
2968
  this.createView();
2937
2969
  }
2938
2970
  }
2939
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtKey, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2940
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtKey, isStandalone: true, selector: "ng-template[key]", inputs: { key: "key" }, usesInheritance: true, ngImport: i0 }); }
2971
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtKey, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2972
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtKey, isStandalone: true, selector: "ng-template[key]", inputs: { key: "key" }, usesInheritance: true, ngImport: i0 }); }
2941
2973
  }
2942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtKey, decorators: [{
2974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtKey, decorators: [{
2943
2975
  type: Directive,
2944
2976
  args: [{ selector: 'ng-template[key]', standalone: true }]
2945
2977
  }], propDecorators: { key: [{
@@ -2950,10 +2982,10 @@ class NgtRepeat extends NgForOf {
2950
2982
  set ngForRepeat(count) {
2951
2983
  this.ngForOf = Number.isInteger(count) ? Array.from({ length: count }, (_, i) => i) : [];
2952
2984
  }
2953
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRepeat, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2954
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtRepeat, isStandalone: true, selector: "[ngFor][ngForRepeat]", inputs: { ngForRepeat: "ngForRepeat" }, usesInheritance: true, ngImport: i0 }); }
2985
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRepeat, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2986
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtRepeat, isStandalone: true, selector: "[ngFor][ngForRepeat]", inputs: { ngForRepeat: "ngForRepeat" }, usesInheritance: true, ngImport: i0 }); }
2955
2987
  }
2956
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRepeat, decorators: [{
2988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRepeat, decorators: [{
2957
2989
  type: Directive,
2958
2990
  args: [{ selector: '[ngFor][ngForRepeat]', standalone: true }]
2959
2991
  }], propDecorators: { ngForRepeat: [{
@@ -3043,10 +3075,10 @@ class NgtPortalBeforeRender {
3043
3075
  gl.autoClear = oldClear;
3044
3076
  }, { priority: this.renderPriority, injector: this.injector });
3045
3077
  }
3046
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3047
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtPortalBeforeRender, isStandalone: true, selector: "[ngtPortalBeforeRender]", inputs: { renderPriority: "renderPriority", parentScene: "parentScene", parentCamera: "parentCamera" }, outputs: { beforeRender: "beforeRender" }, ngImport: i0 }); }
3078
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3079
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtPortalBeforeRender, isStandalone: true, selector: "[ngtPortalBeforeRender]", inputs: { renderPriority: "renderPriority", parentScene: "parentScene", parentCamera: "parentCamera" }, outputs: { beforeRender: "beforeRender" }, ngImport: i0 }); }
3048
3080
  }
3049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
3081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
3050
3082
  type: Directive,
3051
3083
  args: [{ selector: '[ngtPortalBeforeRender]', standalone: true }]
3052
3084
  }], propDecorators: { renderPriority: [{
@@ -3068,10 +3100,10 @@ class NgtPortalContent {
3068
3100
  delete commentNode[SPECIAL_INTERNAL_ADD_COMMENT];
3069
3101
  }
3070
3102
  }
3071
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortalContent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ViewContainerRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3072
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: NgtPortalContent, isStandalone: true, selector: "ng-template[ngtPortalContent]", ngImport: i0 }); }
3103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortalContent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ViewContainerRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3104
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtPortalContent, isStandalone: true, selector: "ng-template[ngtPortalContent]", ngImport: i0 }); }
3073
3105
  }
3074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortalContent, decorators: [{
3106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortalContent, decorators: [{
3075
3107
  type: Directive,
3076
3108
  args: [{ selector: 'ng-template[ngtPortalContent]', standalone: true }]
3077
3109
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ViewContainerRef, decorators: [{
@@ -3180,8 +3212,8 @@ class NgtPortal {
3180
3212
  ...restInputsState,
3181
3213
  };
3182
3214
  }
3183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3184
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: NgtPortal, isStandalone: true, selector: "ngt-portal", inputs: { container: "container", portalState: ["state", "portalState"], autoRender: "autoRender", autoRenderPriority: "autoRenderPriority" }, outputs: { beforeRender: "beforeRender" }, providers: [{ provide: NGT_STORE, useFactory: () => signalStore({}) }], queries: [{ propertyName: "portalContentTemplate", first: true, predicate: NgtPortalContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "portalContentAnchor", first: true, predicate: ["portalContentAnchor"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
3215
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3216
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtPortal, isStandalone: true, selector: "ngt-portal", inputs: { container: "container", portalState: ["state", "portalState"], autoRender: "autoRender", autoRenderPriority: "autoRenderPriority" }, outputs: { beforeRender: "beforeRender" }, providers: [{ provide: NGT_STORE, useFactory: () => signalStore({}) }], queries: [{ propertyName: "portalContentTemplate", first: true, predicate: NgtPortalContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "portalContentAnchor", first: true, predicate: ["portalContentAnchor"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
3185
3217
  <ng-container #portalContentAnchor>
3186
3218
  <ng-container
3187
3219
  *ngIf="autoRender && portalContentRendered"
@@ -3194,7 +3226,7 @@ class NgtPortal {
3194
3226
  </ng-container>
3195
3227
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgtPortalBeforeRender, selector: "[ngtPortalBeforeRender]", inputs: ["renderPriority", "parentScene", "parentCamera"], outputs: ["beforeRender"] }] }); }
3196
3228
  }
3197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtPortal, decorators: [{
3229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtPortal, decorators: [{
3198
3230
  type: Component,
3199
3231
  args: [{
3200
3232
  selector: 'ngt-portal',
@@ -3242,15 +3274,19 @@ class NgtRoutedScene {
3242
3274
  .pipe(filter((event) => event instanceof ActivationEnd), takeUntilDestroyed())
3243
3275
  .subscribe(() => safeDetectChanges(cdr));
3244
3276
  }
3245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `<router-outlet />`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
3277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3278
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `
3279
+ <router-outlet />
3280
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
3247
3281
  }
3248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: NgtRoutedScene, decorators: [{
3282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtRoutedScene, decorators: [{
3249
3283
  type: Component,
3250
3284
  args: [{
3251
3285
  standalone: true,
3252
3286
  selector: 'ngt-routed-scene',
3253
- template: `<router-outlet />`,
3287
+ template: `
3288
+ <router-outlet />
3289
+ `,
3254
3290
  imports: [RouterOutlet],
3255
3291
  }]
3256
3292
  }], ctorParameters: function () { return [{ type: i1.Router }, { type: i0.ChangeDetectorRef }]; } });