@dooboostore/simple-web-component 1.0.34 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +44 -51
  2. package/dist/cjs/decorators/addEventListener.js +12 -4
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +19 -18
  5. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  6. package/dist/cjs/decorators/applyClass.js +23 -22
  7. package/dist/cjs/decorators/applyClass.js.map +2 -2
  8. package/dist/cjs/decorators/applyNode.js +22 -17
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/applyStyle.js +20 -19
  11. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  12. package/dist/cjs/decorators/attribute.js +17 -16
  13. package/dist/cjs/decorators/attribute.js.map +2 -2
  14. package/dist/cjs/decorators/{changedAttributeHost.js → changedAttributeThis.js} +6 -6
  15. package/dist/cjs/decorators/changedAttributeThis.js.map +7 -0
  16. package/dist/cjs/decorators/elementDefine.js +234 -188
  17. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  18. package/dist/cjs/decorators/emitCustomEvent.js +24 -16
  19. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  20. package/dist/cjs/decorators/index.js +1 -1
  21. package/dist/cjs/decorators/index.js.map +1 -1
  22. package/dist/cjs/decorators/lifecycles.js +15 -17
  23. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  24. package/dist/cjs/decorators/query.js +38 -60
  25. package/dist/cjs/decorators/query.js.map +2 -2
  26. package/dist/cjs/decorators/queryAll.js +31 -63
  27. package/dist/cjs/decorators/queryAll.js.map +2 -2
  28. package/dist/cjs/decorators/setProperty.js +13 -12
  29. package/dist/cjs/decorators/setProperty.js.map +2 -2
  30. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js +2 -2
  31. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  32. package/dist/cjs/elements/SwcAppEngine.js +8 -2
  33. package/dist/cjs/elements/SwcAppEngine.js.map +2 -2
  34. package/dist/cjs/elements/SwcAppMixin.js +120 -65
  35. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  36. package/dist/cjs/elements/SwcAsync.js +31 -21
  37. package/dist/cjs/elements/SwcAsync.js.map +2 -2
  38. package/dist/cjs/elements/SwcChoose.js +53 -34
  39. package/dist/cjs/elements/SwcChoose.js.map +2 -2
  40. package/dist/cjs/elements/SwcIf.js +54 -32
  41. package/dist/cjs/elements/SwcIf.js.map +2 -2
  42. package/dist/cjs/elements/SwcLoop.js +111 -37
  43. package/dist/cjs/elements/SwcLoop.js.map +2 -2
  44. package/dist/cjs/elements/register.js +249 -122
  45. package/dist/cjs/elements/register.js.map +2 -2
  46. package/dist/cjs/router/ElementRouter.js +4 -2
  47. package/dist/cjs/router/ElementRouter.js.map +1 -1
  48. package/dist/cjs/types.js.map +1 -1
  49. package/dist/cjs/utils/Utils.js +31 -17
  50. package/dist/cjs/utils/Utils.js.map +2 -2
  51. package/dist/esm/decorators/addEventListener.js +12 -4
  52. package/dist/esm/decorators/addEventListener.js.map +2 -2
  53. package/dist/esm/decorators/applyAttribute.js +19 -18
  54. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  55. package/dist/esm/decorators/applyClass.js +23 -22
  56. package/dist/esm/decorators/applyClass.js.map +2 -2
  57. package/dist/esm/decorators/applyNode.js +22 -17
  58. package/dist/esm/decorators/applyNode.js.map +2 -2
  59. package/dist/esm/decorators/applyStyle.js +20 -19
  60. package/dist/esm/decorators/applyStyle.js.map +2 -2
  61. package/dist/esm/decorators/attribute.js +17 -16
  62. package/dist/esm/decorators/attribute.js.map +2 -2
  63. package/dist/esm/decorators/{changedAttributeHost.js → changedAttributeThis.js} +3 -3
  64. package/dist/esm/decorators/changedAttributeThis.js.map +7 -0
  65. package/dist/esm/decorators/elementDefine.js +233 -187
  66. package/dist/esm/decorators/elementDefine.js.map +2 -2
  67. package/dist/esm/decorators/emitCustomEvent.js +24 -16
  68. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  69. package/dist/esm/decorators/index.js +1 -1
  70. package/dist/esm/decorators/index.js.map +1 -1
  71. package/dist/esm/decorators/lifecycles.js +15 -17
  72. package/dist/esm/decorators/lifecycles.js.map +2 -2
  73. package/dist/esm/decorators/query.js +38 -60
  74. package/dist/esm/decorators/query.js.map +2 -2
  75. package/dist/esm/decorators/queryAll.js +31 -63
  76. package/dist/esm/decorators/queryAll.js.map +2 -2
  77. package/dist/esm/decorators/setProperty.js +13 -12
  78. package/dist/esm/decorators/setProperty.js.map +2 -2
  79. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js +2 -2
  80. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  81. package/dist/esm/elements/SwcAppEngine.js +9 -2
  82. package/dist/esm/elements/SwcAppEngine.js.map +2 -2
  83. package/dist/esm/elements/SwcAppMixin.js +122 -66
  84. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  85. package/dist/esm/elements/SwcAsync.js +32 -22
  86. package/dist/esm/elements/SwcAsync.js.map +2 -2
  87. package/dist/esm/elements/SwcChoose.js +54 -35
  88. package/dist/esm/elements/SwcChoose.js.map +2 -2
  89. package/dist/esm/elements/SwcIf.js +55 -33
  90. package/dist/esm/elements/SwcIf.js.map +2 -2
  91. package/dist/esm/elements/SwcLoop.js +112 -38
  92. package/dist/esm/elements/SwcLoop.js.map +2 -2
  93. package/dist/esm/elements/register.js +250 -123
  94. package/dist/esm/elements/register.js.map +2 -2
  95. package/dist/esm/router/ElementRouter.js +5 -2
  96. package/dist/esm/router/ElementRouter.js.map +1 -1
  97. package/dist/esm/types.js.map +1 -1
  98. package/dist/esm/utils/Utils.js +31 -17
  99. package/dist/esm/utils/Utils.js.map +2 -2
  100. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +563 -557
  101. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  102. package/dist/types/decorators/addEventListener.d.ts +5 -7
  103. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  104. package/dist/types/decorators/applyAttribute.d.ts +4 -4
  105. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  106. package/dist/types/decorators/applyClass.d.ts +6 -6
  107. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  108. package/dist/types/decorators/applyNode.d.ts +7 -6
  109. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  110. package/dist/types/decorators/applyStyle.d.ts +4 -4
  111. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  112. package/dist/types/decorators/attribute.d.ts +5 -5
  113. package/dist/types/decorators/attribute.d.ts.map +1 -1
  114. package/dist/types/decorators/changedAttributeThis.d.ts +18 -0
  115. package/dist/types/decorators/changedAttributeThis.d.ts.map +1 -0
  116. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  117. package/dist/types/decorators/emitCustomEvent.d.ts +11 -12
  118. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  119. package/dist/types/decorators/index.d.ts +1 -1
  120. package/dist/types/decorators/lifecycles.d.ts +10 -7
  121. package/dist/types/decorators/lifecycles.d.ts.map +1 -1
  122. package/dist/types/decorators/query.d.ts +17 -63
  123. package/dist/types/decorators/query.d.ts.map +1 -1
  124. package/dist/types/decorators/queryAll.d.ts +6 -63
  125. package/dist/types/decorators/queryAll.d.ts.map +1 -1
  126. package/dist/types/decorators/setProperty.d.ts +1 -1
  127. package/dist/types/decorators/setProperty.d.ts.map +1 -1
  128. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +4 -5
  129. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +1 -1
  130. package/dist/types/elements/SwcAppEngine.d.ts +4 -1
  131. package/dist/types/elements/SwcAppEngine.d.ts.map +1 -1
  132. package/dist/types/elements/SwcAppMixin.d.ts +11 -8
  133. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  134. package/dist/types/elements/register.d.ts.map +1 -1
  135. package/dist/types/types.d.ts +3 -2
  136. package/dist/types/types.d.ts.map +1 -1
  137. package/dist/types/utils/Utils.d.ts +11 -8
  138. package/dist/types/utils/Utils.d.ts.map +1 -1
  139. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +563 -557
  140. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  141. package/package.json +3 -3
  142. package/src/decorators/addEventListener.ts +11 -9
  143. package/src/decorators/applyAttribute.ts +16 -15
  144. package/src/decorators/applyClass.ts +18 -17
  145. package/src/decorators/applyNode.ts +34 -21
  146. package/src/decorators/applyStyle.ts +17 -16
  147. package/src/decorators/attribute.ts +21 -20
  148. package/src/decorators/{changedAttributeHost.ts → changedAttributeThis.ts} +13 -14
  149. package/src/decorators/elementDefine.ts +402 -358
  150. package/src/decorators/emitCustomEvent.ts +40 -31
  151. package/src/decorators/index.ts +1 -1
  152. package/src/decorators/lifecycles.ts +11 -10
  153. package/src/decorators/query.ts +51 -124
  154. package/src/decorators/queryAll.ts +30 -127
  155. package/src/decorators/setProperty.ts +12 -11
  156. package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +10 -10
  157. package/src/elements/SwcAppEngine.ts +10 -3
  158. package/src/elements/SwcAppMixin.ts +177 -97
  159. package/src/elements/SwcAsync.ts +32 -21
  160. package/src/elements/SwcChoose.ts +74 -37
  161. package/src/elements/SwcIf.ts +60 -23
  162. package/src/elements/SwcLoop.ts +141 -28
  163. package/src/elements/register.ts +300 -102
  164. package/src/types.ts +6 -5
  165. package/src/utils/Utils.ts +40 -23
  166. package/tsconfig.json +2 -2
  167. package/dist/cjs/decorators/changedAttributeHost.js.map +0 -7
  168. package/dist/esm/decorators/changedAttributeHost.js.map +0 -7
  169. package/dist/types/decorators/changedAttributeHost.d.ts +0 -19
  170. package/dist/types/decorators/changedAttributeHost.d.ts.map +0 -1
@@ -1151,40 +1151,37 @@ var dooboostoreSimpleWebComponent = (() => {
1151
1151
  SWC_NOT_FOUND: () => SWC_NOT_FOUND,
1152
1152
  SwcUtils: () => SwcUtils,
1153
1153
  addClass: () => addClass,
1154
- addClassHost: () => addClassHost,
1154
+ addClassThis: () => addClassThis,
1155
1155
  addEventListener: () => addEventListener,
1156
1156
  addEventListenerAppHost: () => addEventListenerAppHost,
1157
- addEventListenerHost: () => addEventListenerHost,
1157
+ addEventListenerDocument: () => addEventListenerDocument,
1158
+ addEventListenerThis: () => addEventListenerThis,
1159
+ addEventListenerWindow: () => addEventListenerWindow,
1158
1160
  allAppHost: () => allAppHost,
1159
- allFirstAppHost: () => allFirstAppHost,
1160
- allFirstHost: () => allFirstHost,
1161
- allHost: () => allHost,
1162
- allLastAppHost: () => allLastAppHost,
1163
- allLastHost: () => allLastHost,
1164
1161
  allParentHost: () => allParentHost,
1165
- appHost: () => appHost,
1166
1162
  applyAttribute: () => applyAttribute,
1167
- applyAttributeHost: () => applyAttributeHost,
1163
+ applyAttributeThis: () => applyAttributeThis,
1168
1164
  applyClass: () => applyClass,
1169
- applyClassHost: () => applyClassHost,
1165
+ applyClassThis: () => applyClassThis,
1170
1166
  applyInnerHtmlNode: () => applyInnerHtmlNode,
1171
- applyInnerHtmlNodeHost: () => applyInnerHtmlNodeHost,
1167
+ applyInnerHtmlNodeThis: () => applyInnerHtmlNodeThis,
1168
+ applyInnerTextNode: () => applyInnerTextNode,
1172
1169
  applyNode: () => applyNode,
1173
- applyNodeHost: () => applyNodeHost,
1170
+ applyNodeThis: () => applyNodeThis,
1174
1171
  applyReplaceChildrenNode: () => applyReplaceChildrenNode,
1175
- applyReplaceChildrenNodeHost: () => applyReplaceChildrenNodeHost,
1172
+ applyReplaceChildrenNodeThis: () => applyReplaceChildrenNodeThis,
1176
1173
  applyStyle: () => applyStyle,
1177
- applyStyleHost: () => applyStyleHost,
1174
+ applyStyleThis: () => applyStyleThis,
1178
1175
  attribute: () => attribute,
1179
- attributeHost: () => attributeHost,
1180
- changedAttributeHost: () => changedAttributeHost,
1176
+ attributeThis: () => attributeThis,
1177
+ changedAttributeThis: () => changedAttributeThis,
1181
1178
  commentNode: () => commentNode,
1182
1179
  convertAttributeValue: () => convertAttributeValue,
1183
1180
  convertValue: () => convertValue2,
1184
1181
  createElement: () => createElement,
1185
1182
  elementDefine: () => elementDefine,
1186
1183
  emitCustomEvent: () => emitCustomEvent,
1187
- emitCustomEventHost: () => emitCustomEventHost,
1184
+ emitCustomEventThis: () => emitCustomEventThis,
1188
1185
  ensureInit: () => ensureInit,
1189
1186
  findAllApplyNodeMetadata: () => findAllApplyNodeMetadata,
1190
1187
  findAllAttributeApplyMetadata: () => findAllAttributeApplyMetadata,
@@ -1193,8 +1190,6 @@ var dooboostoreSimpleWebComponent = (() => {
1193
1190
  findAllClassMetadata: () => findAllClassMetadata,
1194
1191
  findAllLifecycleMetadata: () => findAllLifecycleMetadata,
1195
1192
  findAllStyleMetadata: () => findAllStyleMetadata,
1196
- firstAppHost: () => firstAppHost,
1197
- firstHost: () => firstHost,
1198
1193
  getAddEventListenerMetadata: () => getAddEventListenerMetadata,
1199
1194
  getAttributeValue: () => getAttributeValue,
1200
1195
  getChangedAttributeMetadata: () => getChangedAttributeMetadata,
@@ -1206,7 +1201,6 @@ var dooboostoreSimpleWebComponent = (() => {
1206
1201
  getQueryMetadata: () => getQueryMetadata,
1207
1202
  getSubscribeSwcAppMessageWhileConnectedMetadata: () => getSubscribeSwcAppMessageWhileConnectedMetadata,
1208
1203
  getSubscribeSwcAppRouteChangeWhileConnectedMetadata: () => getSubscribeSwcAppRouteChangeWhileConnectedMetadata,
1209
- host: () => host,
1210
1204
  htmlAElement: () => htmlAElement,
1211
1205
  htmlArticleElement: () => htmlArticleElement,
1212
1206
  htmlButtonElement: () => htmlButtonElement,
@@ -1218,53 +1212,53 @@ var dooboostoreSimpleWebComponent = (() => {
1218
1212
  htmlSectionElement: () => htmlSectionElement,
1219
1213
  htmlSpanElement: () => htmlSpanElement,
1220
1214
  htmlUlElement: () => htmlUlElement,
1221
- lastAppHost: () => lastAppHost,
1222
- lastHost: () => lastHost,
1223
1215
  onAddEventListener: () => onAddEventListener,
1224
1216
  onAdopted: () => onAdopted,
1225
- onAfterAdopted: () => onAfterAdopted,
1226
- onAfterConnected: () => onAfterConnected,
1227
- onAfterDisconnected: () => onAfterDisconnected,
1228
- onBeforeAdopted: () => onBeforeAdopted,
1229
- onBeforeConnected: () => onBeforeConnected,
1230
- onBeforeDisconnected: () => onBeforeDisconnected,
1217
+ onAdoptedAfter: () => onAdoptedAfter,
1218
+ onAdoptedBefore: () => onAdoptedBefore,
1231
1219
  onConnected: () => onConnected,
1220
+ onConnectedAfter: () => onConnectedAfter,
1221
+ onConnectedBefore: () => onConnectedBefore,
1232
1222
  onConnectedInnerHtml: () => onConnectedInnerHtml,
1233
- onConnectedSwcApp: () => onConnectedSwcApp,
1234
1223
  onDisconnected: () => onDisconnected,
1224
+ onDisconnectedAfter: () => onDisconnectedAfter,
1225
+ onDisconnectedBefore: () => onDisconnectedBefore,
1235
1226
  onInitialize: () => onInitialize,
1236
- parentHost: () => parentHost,
1237
1227
  publishSwcAppMessage: () => publishSwcAppMessage,
1238
1228
  query: () => query,
1239
1229
  queryAll: () => queryAll,
1240
- queryAllHost: () => queryAllHost,
1230
+ queryAllThis: () => queryAllThis,
1231
+ queryAppHost: () => queryAppHost,
1232
+ queryDocument: () => queryDocument,
1241
1233
  queryHost: () => queryHost,
1234
+ queryThis: () => queryThis,
1235
+ queryWindow: () => queryWindow,
1242
1236
  removeAttribute: () => removeAttribute,
1243
- removeAttributeHost: () => removeAttributeHost,
1237
+ removeAttributeThis: () => removeAttributeThis,
1244
1238
  removeClass: () => removeClass,
1245
- removeClassHost: () => removeClassHost,
1239
+ removeClassThis: () => removeClassThis,
1246
1240
  removeStyle: () => removeStyle,
1247
- removeStyleHost: () => removeStyleHost,
1241
+ removeStyleThis: () => removeStyleThis,
1248
1242
  resolveTargetEls: () => resolveTargetEls,
1249
1243
  setAttribute: () => setAttribute,
1250
- setAttributeHost: () => setAttributeHost,
1244
+ setAttributeThis: () => setAttributeThis,
1251
1245
  setClass: () => setClass,
1252
- setClassHost: () => setClassHost,
1246
+ setClassThis: () => setClassThis,
1253
1247
  setProperty: () => setProperty,
1254
- setPropertyHost: () => setPropertyHost,
1248
+ setPropertyThis: () => setPropertyThis,
1255
1249
  setStyle: () => setStyle,
1256
- setStyleHost: () => setStyleHost,
1250
+ setStyleThis: () => setStyleThis,
1257
1251
  subscribeSwcAppMessageWhileConnected: () => subscribeSwcAppMessageWhileConnected,
1258
1252
  subscribeSwcAppRouteChangeWhileConnected: () => subscribeSwcAppRouteChangeWhileConnected,
1259
1253
  textNode: () => textNode,
1260
1254
  toggleClass: () => toggleClass,
1261
- toggleClassHost: () => toggleClassHost,
1255
+ toggleClassThis: () => toggleClassThis,
1262
1256
  updateAttribute: () => updateAttribute,
1263
- updateAttributeHost: () => updateAttributeHost,
1257
+ updateAttributeThis: () => updateAttributeThis,
1264
1258
  updateClass: () => updateClass,
1265
- updateClassHost: () => updateClassHost,
1259
+ updateClassThis: () => updateClassThis,
1266
1260
  updateStyle: () => updateStyle,
1267
- updateStyleHost: () => updateStyleHost
1261
+ updateStyleThis: () => updateStyleThis
1268
1262
  });
1269
1263
  var import_reflect_metadata2 = __toESM(require_Reflect(), 1);
1270
1264
 
@@ -5883,6 +5877,11 @@ var dooboostoreSimpleWebComponent = (() => {
5883
5877
  })(Expression || (Expression = {}));
5884
5878
 
5885
5879
  // ../core/dist/esm/expression/ActionExpression.js
5880
+ var DEFAULT_EXPRESSION_CONFIG = {
5881
+ "callReturn": { start: "{{=", end: "}}" },
5882
+ "call": { start: "{{@", end: "}}" },
5883
+ "replace": { start: "{{", end: "}}" }
5884
+ };
5886
5885
  var ActionExpression = class {
5887
5886
  constructor(value, config) {
5888
5887
  this.originalTemplate = value || "";
@@ -5896,12 +5895,19 @@ var dooboostoreSimpleWebComponent = (() => {
5896
5895
  }
5897
5896
  this.maskingTemplate = value;
5898
5897
  this.currentTemplate = value;
5899
- if (config?.wrapExpression) {
5900
- this.processWrapExpressions(this.currentTemplate, config.wrapExpression);
5898
+ const exprConfig = {
5899
+ "callReturn": config?.expression?.["callReturn"] || DEFAULT_EXPRESSION_CONFIG["callReturn"],
5900
+ "call": config?.expression?.call || DEFAULT_EXPRESSION_CONFIG.call,
5901
+ "replace": config?.expression?.replace || DEFAULT_EXPRESSION_CONFIG.replace
5902
+ };
5903
+ const types = ["callReturn", "call", "replace"];
5904
+ types.sort((a, b) => exprConfig[b].start.length - exprConfig[a].start.length);
5905
+ for (const type of types) {
5906
+ const marker = exprConfig[type];
5907
+ if (marker) {
5908
+ this.processExpressionType(type, marker.start, marker.end);
5909
+ }
5901
5910
  }
5902
- this.processCallReturnExpressions(this.currentTemplate);
5903
- this.processCallExpressions(this.currentTemplate);
5904
- this.processReplaceExpressions(this.currentTemplate);
5905
5911
  this.sortExpressionsByPosition();
5906
5912
  this.maskingTemplate = this.currentTemplate;
5907
5913
  }
@@ -5912,45 +5918,17 @@ var dooboostoreSimpleWebComponent = (() => {
5912
5918
  });
5913
5919
  this.expressions.sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
5914
5920
  }
5915
- processWrapExpressions(value, wrapExpression) {
5916
- const wrapChar = wrapExpression.trim();
5917
- const escapedWrap = wrapChar.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5918
- const wrappedCallReturnRegex = new RegExp(`${escapedWrap}\\{\\{=\\s*(.+?)\\s*\\}\\}${escapedWrap}`, "g");
5919
- let match;
5920
- while ((match = wrappedCallReturnRegex.exec(value)) !== null) {
5921
- this.addExpression(match, "call-return", wrapChar);
5922
- }
5923
- const wrappedCallRegex = new RegExp(`${escapedWrap}\\{\\{@\\s*(.+?)\\s*\\}\\}${escapedWrap}`, "g");
5924
- while ((match = wrappedCallRegex.exec(value)) !== null) {
5925
- this.addExpression(match, "call", wrapChar);
5926
- }
5927
- const wrappedReplaceRegex = new RegExp(`${escapedWrap}\\{\\{(?![=@])\\s*(.+?)\\s*\\}\\}${escapedWrap}`, "g");
5928
- while ((match = wrappedReplaceRegex.exec(value)) !== null) {
5929
- this.addExpression(match, "replace", wrapChar);
5930
- }
5931
- }
5932
- processCallReturnExpressions(value) {
5933
- const callReturnRegex = /(?<![a-zA-Z0-9$_@#.])\{\{=\s*(.+?)\s*\}\}(?![a-zA-Z0-9$_@#.])/g;
5934
- let match;
5935
- while ((match = callReturnRegex.exec(value)) !== null) {
5936
- this.addExpression(match, "call-return");
5937
- }
5938
- }
5939
- processCallExpressions(value) {
5940
- const callRegex = /(?<![a-zA-Z0-9$_@#.])\{\{@\s*(.+?)\s*\}\}(?![a-zA-Z0-9$_@#.])/g;
5921
+ processExpressionType(type, start, end) {
5922
+ const escapedStart = start.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5923
+ const escapedEnd = end.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5924
+ const regex = new RegExp(`${escapedStart}\\s*([\\s\\S]+?)\\s*${escapedEnd}`, "g");
5941
5925
  let match;
5942
- while ((match = callRegex.exec(value)) !== null) {
5943
- this.addExpression(match, "call");
5926
+ const valueToMatch = this.currentTemplate;
5927
+ while ((match = regex.exec(valueToMatch)) !== null) {
5928
+ this.addExpression(match, type);
5944
5929
  }
5945
5930
  }
5946
- processReplaceExpressions(value) {
5947
- const replaceRegex = /(?<![a-zA-Z0-9$_@#.])\{\{(?![=@])\s*(.+?)\s*\}\}(?![a-zA-Z0-9$_@#.])/g;
5948
- let match;
5949
- while ((match = replaceRegex.exec(value)) !== null) {
5950
- this.addExpression(match, "replace");
5951
- }
5952
- }
5953
- addExpression(match, type, wrap) {
5931
+ addExpression(match, type) {
5954
5932
  const id = Math.random().toString(36).substr(2, 9);
5955
5933
  const original = match[0];
5956
5934
  const rawScript = match[1];
@@ -5965,13 +5943,9 @@ var dooboostoreSimpleWebComponent = (() => {
5965
5943
  original,
5966
5944
  script: rawScript.trim(),
5967
5945
  expressionStart,
5968
- expressionEnd,
5969
- ...wrap && { wrap }
5946
+ expressionEnd
5970
5947
  });
5971
5948
  }
5972
- /**
5973
- * 구현 메서드
5974
- */
5975
5949
  replace(idOrExpr, valueOrCallback) {
5976
5950
  const id = typeof idOrExpr === "string" ? idOrExpr : idOrExpr.id;
5977
5951
  let expr;
@@ -5987,9 +5961,6 @@ var dooboostoreSimpleWebComponent = (() => {
5987
5961
  }
5988
5962
  return this.getUnprocessedTemplate();
5989
5963
  }
5990
- /**
5991
- * 구현 메서드
5992
- */
5993
5964
  getExpressions(typeOrOptions) {
5994
5965
  if (!typeOrOptions) {
5995
5966
  return this.expressions;
@@ -6000,13 +5971,9 @@ var dooboostoreSimpleWebComponent = (() => {
6000
5971
  const options = typeOrOptions;
6001
5972
  return this.expressions.filter((expr) => {
6002
5973
  if (options.type && expr.type !== options.type) return false;
6003
- if ("wrap" in options && expr.wrap !== options.wrap) return false;
6004
5974
  return true;
6005
5975
  });
6006
5976
  }
6007
- /**
6008
- * 구현 메서드
6009
- */
6010
5977
  getFirstExpression(typeOrOptions) {
6011
5978
  if (!typeOrOptions) {
6012
5979
  return this.getExpressions()[0];
@@ -6016,28 +5983,15 @@ var dooboostoreSimpleWebComponent = (() => {
6016
5983
  }
6017
5984
  return this.getExpressions(typeOrOptions)[0];
6018
5985
  }
6019
- /**
6020
- * 원본 템플릿을 반환합니다.
6021
- */
6022
5986
  getOriginalTemplate() {
6023
5987
  return this.originalTemplate;
6024
5988
  }
6025
- /**
6026
- * 마스킹 처리된 템플릿을 반환합니다.
6027
- */
6028
5989
  getMaskingTemplate() {
6029
5990
  return this.maskingTemplate;
6030
5991
  }
6031
- /**
6032
- * 현재 처리 상태의 템플릿을 반환합니다.
6033
- */
6034
5992
  getCurrentTemplate() {
6035
5993
  return this.currentTemplate;
6036
5994
  }
6037
- /**
6038
- * 미처리된 마커들을 원본으로 복원한 템플릿을 반환합니다.
6039
- * replace() 호출 후 처리되지 않은 표현식들을 원본 형태로 되돌립니다.
6040
- */
6041
5995
  getUnprocessedTemplate() {
6042
5996
  let result = this.currentTemplate;
6043
5997
  for (const expr of this.expressions) {
@@ -6069,11 +6023,17 @@ var dooboostoreSimpleWebComponent = (() => {
6069
6023
  const constructor = target instanceof Function ? target : target.constructor;
6070
6024
  return ReflectUtils.getMetadata(ADD_EVENT_LISTENER_METADATA_KEY, constructor);
6071
6025
  };
6072
- function addEventListenerHost(type, options) {
6073
- return addEventListener(":host", type, options);
6026
+ function addEventListenerThis(type, options) {
6027
+ return addEventListener("$this", type, options);
6074
6028
  }
6075
6029
  function addEventListenerAppHost(type, options) {
6076
- return addEventListener(":appHost", type, options);
6030
+ return addEventListener("$appHost", type, options);
6031
+ }
6032
+ function addEventListenerWindow(type, options) {
6033
+ return addEventListener("$window", type, options);
6034
+ }
6035
+ function addEventListenerDocument(type, options) {
6036
+ return addEventListener("$document", type, options);
6077
6037
  }
6078
6038
 
6079
6039
  // src/decorators/lifecycles.ts
@@ -6100,17 +6060,16 @@ var dooboostoreSimpleWebComponent = (() => {
6100
6060
  };
6101
6061
  }
6102
6062
  var onInitialize = createLifecycleDecorator(ON_INITIALIZE_METADATA_KEY);
6103
- var onBeforeConnected = createLifecycleDecorator(ON_BEFORE_CONNECTED_METADATA_KEY);
6104
- var onAfterConnected = createLifecycleDecorator(ON_AFTER_CONNECTED_METADATA_KEY);
6105
- var onConnected = onAfterConnected;
6106
- var onBeforeDisconnected = createLifecycleDecorator(ON_BEFORE_DISCONNECTED_METADATA_KEY);
6107
- var onAfterDisconnected = createLifecycleDecorator(ON_AFTER_DISCONNECTED_METADATA_KEY);
6108
- var onDisconnected = onAfterDisconnected;
6109
- var onBeforeAdopted = createLifecycleDecorator(ON_BEFORE_ADOPTED_METADATA_KEY);
6110
- var onAfterAdopted = createLifecycleDecorator(ON_AFTER_ADOPTED_METADATA_KEY);
6111
- var onAdopted = onAfterAdopted;
6063
+ var onConnectedBefore = createLifecycleDecorator(ON_BEFORE_CONNECTED_METADATA_KEY);
6064
+ var onConnectedAfter = createLifecycleDecorator(ON_AFTER_CONNECTED_METADATA_KEY);
6065
+ var onConnected = onConnectedAfter;
6066
+ var onDisconnectedBefore = createLifecycleDecorator(ON_BEFORE_DISCONNECTED_METADATA_KEY);
6067
+ var onDisconnectedAfter = createLifecycleDecorator(ON_AFTER_DISCONNECTED_METADATA_KEY);
6068
+ var onDisconnected = onDisconnectedAfter;
6069
+ var onAdoptedBefore = createLifecycleDecorator(ON_BEFORE_ADOPTED_METADATA_KEY);
6070
+ var onAdoptedAfter = createLifecycleDecorator(ON_AFTER_ADOPTED_METADATA_KEY);
6071
+ var onAdopted = onAdoptedAfter;
6112
6072
  var onAddEventListener = createLifecycleDecorator(ON_ADD_EVENT_LISTENER_METADATA_KEY);
6113
- var onConnectedSwcApp = createLifecycleDecorator(ON_CONNECTED_SWC_APP_METADATA_KEY);
6114
6073
  function onConnectedInnerHtml(arg1, arg2, arg3) {
6115
6074
  const decorator = (options, target, propertyKey) => {
6116
6075
  const constructor = target.constructor;
@@ -6266,13 +6225,25 @@ var dooboostoreSimpleWebComponent = (() => {
6266
6225
  };
6267
6226
  var SwcUtils;
6268
6227
  ((SwcUtils2) => {
6228
+ SwcUtils2.getParentContainer = (e) => {
6229
+ return e.parentElement ?? e.getRootNode();
6230
+ };
6269
6231
  SwcUtils2.parsePathPatternsSetAttributeString = (pathPattern, path) => {
6270
6232
  return JSON.stringify(SwcUtils2.parsePathPatternsSet(pathPattern, path)).replace(/"/g, "'");
6271
6233
  };
6272
- SwcUtils2.parsePathPatternsSet = (pathPattern, path) => {
6234
+ SwcUtils2.parsePathPatternsSet = (pathPattern, urlAndRouter) => {
6235
+ urlAndRouter ?? (urlAndRouter = "/");
6236
+ const p = typeof urlAndRouter === "string" ? urlAndRouter : urlAndRouter.value.url;
6237
+ const searchParams = new URLSearchParams();
6238
+ const qs = p.split("?")[1];
6239
+ qs?.split("&").forEach((it) => {
6240
+ const [k, v] = it.split("=");
6241
+ searchParams.set(k, v);
6242
+ });
6273
6243
  return {
6274
- path,
6275
- pathData: SwcUtils2.parsePathPatterns(pathPattern, path)
6244
+ path: p,
6245
+ searchParams,
6246
+ pathData: SwcUtils2.parsePathPatterns(pathPattern, p)
6276
6247
  };
6277
6248
  };
6278
6249
  SwcUtils2.parsePathPatterns = (pathPattern, path) => {
@@ -6312,8 +6283,9 @@ var dooboostoreSimpleWebComponent = (() => {
6312
6283
  }
6313
6284
  return current;
6314
6285
  };
6315
- SwcUtils2.findNearestSwcHost = (el) => {
6316
- if (el.__swc_host) return el.__swc_host;
6286
+ SwcUtils2.findNearestSwcHostIncludingSelf = (el) => {
6287
+ const el1 = el;
6288
+ if (el1.__swc_host) return el1.__swc_host;
6317
6289
  let current = el.parentElement || el.getRootNode?.()?.host;
6318
6290
  const doc = el.ownerDocument;
6319
6291
  const win = doc?.defaultView || (typeof window !== "undefined" ? window : void 0);
@@ -6324,26 +6296,26 @@ var dooboostoreSimpleWebComponent = (() => {
6324
6296
  }
6325
6297
  return void 0;
6326
6298
  };
6327
- SwcUtils2.findAllSwcHosts = (el) => {
6299
+ SwcUtils2.findAllSwcHostsIncludingSelf = (el) => {
6328
6300
  const hosts = [];
6329
- let current = (0, SwcUtils2.findNearestSwcHost)(el);
6301
+ let current = (0, SwcUtils2.findNearestSwcHostIncludingSelf)(el);
6330
6302
  while (current) {
6331
6303
  hosts.push(current);
6332
- current = (0, SwcUtils2.findNearestSwcHost)(current);
6304
+ current = (0, SwcUtils2.findNearestSwcHostIncludingSelf)(current);
6333
6305
  }
6334
6306
  return hosts.reverse();
6335
6307
  };
6336
6308
  SwcUtils2.getHosts = (el) => {
6337
- const ancestors = (0, SwcUtils2.findAllSwcHosts)(el);
6309
+ const ancestors = (0, SwcUtils2.findAllSwcHostsIncludingSelf)(el);
6338
6310
  if (getElementConfig(el)) return [...ancestors, el];
6339
6311
  return ancestors;
6340
6312
  };
6341
6313
  SwcUtils2.getHost = (el) => {
6342
6314
  if (getElementConfig(el)) return el;
6343
- return (0, SwcUtils2.findNearestSwcHost)(el);
6315
+ return (0, SwcUtils2.findNearestSwcHostIncludingSelf)(el);
6344
6316
  };
6345
6317
  SwcUtils2.getAppHosts = (el) => {
6346
- const hosts = SwcUtils2.findAllParentAppHostsDirect(el);
6318
+ const hosts = SwcUtils2.findAllAppHostsIncludingSelfDirect(el);
6347
6319
  return hosts;
6348
6320
  };
6349
6321
  SwcUtils2.getAppHost = (el) => {
@@ -6351,11 +6323,11 @@ var dooboostoreSimpleWebComponent = (() => {
6351
6323
  const appHostsWithoutSelf = appHosts.filter((h) => h !== el);
6352
6324
  return appHostsWithoutSelf.length > 0 ? appHostsWithoutSelf[appHostsWithoutSelf.length - 1] : void 0;
6353
6325
  };
6354
- SwcUtils2.findParentAppHostDirect = (el) => {
6355
- const appHosts = (0, SwcUtils2.findAllParentAppHostsDirect)(el);
6326
+ SwcUtils2.findAppHostIncludingSelfDirect = (el) => {
6327
+ const appHosts = (0, SwcUtils2.findAllAppHostsIncludingSelfDirect)(el);
6356
6328
  return appHosts.length > 0 ? appHosts[appHosts.length - 1] : null;
6357
6329
  };
6358
- SwcUtils2.findAllParentAppHostsDirect = (el) => {
6330
+ SwcUtils2.findAllAppHostsIncludingSelfDirect = (el) => {
6359
6331
  const appHosts = [];
6360
6332
  const w = el.ownerDocument?.defaultView || (typeof window !== "undefined" ? window : void 0);
6361
6333
  if (!w) {
@@ -6381,7 +6353,7 @@ var dooboostoreSimpleWebComponent = (() => {
6381
6353
  return appHosts.reverse();
6382
6354
  };
6383
6355
  SwcUtils2.getHostSet = (el) => {
6384
- const ancestors = (0, SwcUtils2.findAllSwcHosts)(el);
6356
+ const ancestors = (0, SwcUtils2.findAllSwcHostsIncludingSelf)(el);
6385
6357
  const $host = ancestors.length > 0 ? ancestors[ancestors.length - 1] : null;
6386
6358
  const $parentHost = ancestors.length > 1 ? ancestors[ancestors.length - 2] : null;
6387
6359
  const $hosts = ancestors;
@@ -6395,7 +6367,7 @@ var dooboostoreSimpleWebComponent = (() => {
6395
6367
  }
6396
6368
  curr = curr.parentElement || curr.getRootNode().host;
6397
6369
  }
6398
- const $appHosts = SwcUtils2.findAllParentAppHostsDirect(el);
6370
+ const $appHosts = SwcUtils2.findAllAppHostsIncludingSelfDirect(el);
6399
6371
  const $appHost = $appHosts.length > 0 ? $appHosts[$appHosts.length - 1] === el ? $appHosts.length > 1 ? $appHosts[$appHosts.length - 2] : null : $appHosts[$appHosts.length - 1] : null;
6400
6372
  const $firstAppHost = $appHosts.length > 0 ? $appHosts[0] : null;
6401
6373
  return {
@@ -6403,7 +6375,8 @@ var dooboostoreSimpleWebComponent = (() => {
6403
6375
  $parentHost,
6404
6376
  $hosts,
6405
6377
  $firstHost,
6406
- $lastHost: $parentHost,
6378
+ $lastHost: $host,
6379
+ $templateHost: el.__swc_template_host,
6407
6380
  $appHost,
6408
6381
  $appHosts,
6409
6382
  $firstAppHost,
@@ -6460,25 +6433,27 @@ var dooboostoreSimpleWebComponent = (() => {
6460
6433
  const conf = getElementConfig(this);
6461
6434
  const currentWin = this._resolveWindow?.(conf) || (typeof window !== "undefined" ? window : void 0);
6462
6435
  const eventTargets = [];
6463
- if (selectorOrTarget === ":window") eventTargets.push(currentWin);
6464
- else if (selectorOrTarget === ":document") eventTargets.push(currentWin.document);
6465
- else if (selectorOrTarget === ":parentHost") {
6436
+ if (selectorOrTarget === "$window") eventTargets.push(currentWin);
6437
+ else if (selectorOrTarget === "$document") eventTargets.push(currentWin.document);
6438
+ else if (selectorOrTarget === "$host") {
6439
+ if (hostSet.$host) eventTargets.push(hostSet.$host);
6440
+ } else if (selectorOrTarget === "$parentHost") {
6466
6441
  if (hostSet.$parentHost) eventTargets.push(hostSet.$parentHost);
6467
- } else if (selectorOrTarget === ":appHost") {
6442
+ } else if (selectorOrTarget === "$appHost") {
6468
6443
  if (hostSet.$appHost) eventTargets.push(hostSet.$appHost);
6469
- } else if (selectorOrTarget === ":firstHost") {
6444
+ } else if (selectorOrTarget === "$firstHost") {
6470
6445
  if (hostSet.$firstHost) eventTargets.push(hostSet.$firstHost);
6471
- } else if (selectorOrTarget === ":lastHost") {
6446
+ } else if (selectorOrTarget === "$lastHost") {
6472
6447
  if (hostSet.$lastHost) eventTargets.push(hostSet.$lastHost);
6473
- } else if (selectorOrTarget === ":firstAppHost") {
6448
+ } else if (selectorOrTarget === "$firstAppHost") {
6474
6449
  if (hostSet.$firstAppHost) eventTargets.push(hostSet.$firstAppHost);
6475
- } else if (selectorOrTarget === ":lastAppHost") {
6450
+ } else if (selectorOrTarget === "$lastAppHost") {
6476
6451
  if (hostSet.$lastAppHost) eventTargets.push(hostSet.$lastAppHost);
6477
- } else if (selectorOrTarget === ":hosts") {
6452
+ } else if (selectorOrTarget === "$hosts") {
6478
6453
  hostSet.$hosts.forEach((h) => eventTargets.push(h));
6479
- } else if (selectorOrTarget === ":appHosts") {
6454
+ } else if (selectorOrTarget === "$appHosts") {
6480
6455
  hostSet.$appHosts.forEach((h) => eventTargets.push(h));
6481
- } else if (selectorOrTarget === ":host" || !selectorOrTarget) {
6456
+ } else if (selectorOrTarget === "$this" || !selectorOrTarget) {
6482
6457
  eventTargets.push(this);
6483
6458
  } else {
6484
6459
  const r = fullOptions.root || "auto";
@@ -6514,14 +6489,20 @@ var dooboostoreSimpleWebComponent = (() => {
6514
6489
  const constructor = target instanceof Function ? target : target.constructor;
6515
6490
  return ReflectUtils.getMetadata(EMIT_CUSTOM_EVENT_METADATA_KEY, constructor);
6516
6491
  };
6517
- function emitCustomEventHost(type, options = {}) {
6518
- if (!options.attributeName) {
6519
- options.attributeName = `on-emit-${type}`;
6492
+ function emitCustomEventThis(type, optionsOrAttributeaName) {
6493
+ if (optionsOrAttributeaName && typeof optionsOrAttributeaName === "string") {
6494
+ return emitCustomEventThis(type, { attributeName: optionsOrAttributeaName });
6495
+ } else if (optionsOrAttributeaName && typeof optionsOrAttributeaName === "object") {
6496
+ if (!optionsOrAttributeaName.attributeName) {
6497
+ optionsOrAttributeaName.attributeName = `on-emit-${type}`;
6498
+ }
6499
+ return emitCustomEvent("$this", type, optionsOrAttributeaName);
6500
+ } else {
6501
+ return emitCustomEvent("$this", type, { attributeName: `on-emit-${type}` });
6520
6502
  }
6521
- return emitCustomEvent(":host", type, options);
6522
6503
  }
6523
6504
 
6524
- // src/decorators/changedAttributeHost.ts
6505
+ // src/decorators/changedAttributeThis.ts
6525
6506
  var ON_ATTRIBUTE_CHANGED_METADATA_KEY = Symbol.for("simple-web-component:on-attribute-changed");
6526
6507
  var convertValue = (val, type) => {
6527
6508
  if (val === null || val === void 0) return val;
@@ -6529,7 +6510,7 @@ var dooboostoreSimpleWebComponent = (() => {
6529
6510
  if (type === Boolean) return val === "false" || val === "0" ? false : true;
6530
6511
  return val;
6531
6512
  };
6532
- function changedAttributeHost(attributeName, options = {}) {
6513
+ function changedAttributeThis(attributeName, options = {}) {
6533
6514
  return (target, propertyKey) => {
6534
6515
  const constructor = target.constructor;
6535
6516
  let metaList = ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
@@ -6596,25 +6577,26 @@ var dooboostoreSimpleWebComponent = (() => {
6596
6577
  const handleResult = (resolvedValue) => {
6597
6578
  if (resolvedValue !== void 0) {
6598
6579
  const win = this.ownerDocument?.defaultView || window;
6599
- const host2 = this;
6600
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
6580
+ const host = this;
6581
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
6601
6582
  const r = finalOptions.root || "auto";
6602
6583
  const targetEls = [];
6603
6584
  const applyRoot = (t) => {
6604
6585
  if (!t || !(t instanceof win.HTMLElement)) return;
6605
6586
  targetEls.push(t);
6606
6587
  };
6607
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
6608
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
6609
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
6610
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
6611
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
6612
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
6613
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
6614
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
6615
- else if (selector === ":host" || !selector) applyRoot(host2);
6588
+ if (selector === "$this" || !selector) applyRoot(host);
6589
+ else if (selector === "$host") applyRoot(hostSet.$host);
6590
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
6591
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
6592
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
6593
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
6594
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
6595
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
6596
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
6597
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
6616
6598
  else {
6617
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
6599
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
6618
6600
  if (targetRoot) {
6619
6601
  const found = targetRoot.querySelectorAll(selector);
6620
6602
  if (found) targetEls.push(...Array.from(found));
@@ -6675,12 +6657,12 @@ var dooboostoreSimpleWebComponent = (() => {
6675
6657
  var setAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("set")(selector, nameOrOptions, options);
6676
6658
  var updateAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("update")(selector, nameOrOptions, options);
6677
6659
  var removeAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("remove")(selector, nameOrOptions, options);
6678
- function applyAttributeHost(action = "update", options = {}) {
6679
- return createAttributeDecorator(action)(":host", options);
6660
+ function applyAttributeThis(action = "update", options = {}) {
6661
+ return createAttributeDecorator(action)("$this", options);
6680
6662
  }
6681
- var setAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("set")(":host", nameOrOptions, options);
6682
- var updateAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("update")(":host", nameOrOptions, options);
6683
- var removeAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("remove")(":host", nameOrOptions, options);
6663
+ var setAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("set")("$this", nameOrOptions, options);
6664
+ var updateAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("update")("$this", nameOrOptions, options);
6665
+ var removeAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("remove")("$this", nameOrOptions, options);
6684
6666
  var findAllAttributeApplyMetadata = (target) => {
6685
6667
  const result = /* @__PURE__ */ new Map();
6686
6668
  const maps = ReflectUtils.findAllMetadata(ATTRIBUTE_APPLY_METADATA_KEY, target);
@@ -6725,26 +6707,28 @@ var dooboostoreSimpleWebComponent = (() => {
6725
6707
  return t;
6726
6708
  };
6727
6709
  const hostSet = SwcUtils.getHostSet(this);
6728
- if (selector === ":parentHost")
6710
+ if (selector === "$this")
6711
+ return applyRoot(this);
6712
+ if (selector === "$host")
6713
+ return applyRoot(hostSet.$host);
6714
+ if (selector === "$parentHost")
6729
6715
  return applyRoot(hostSet.$parentHost);
6730
- if (selector === ":appHost")
6716
+ if (selector === "$appHost")
6731
6717
  return applyRoot(hostSet.$appHost);
6732
- if (selector === ":firstHost")
6718
+ if (selector === "$firstHost")
6733
6719
  return applyRoot(hostSet.$firstHost);
6734
- if (selector === ":lastHost")
6720
+ if (selector === "$lastHost")
6735
6721
  return applyRoot(hostSet.$lastHost);
6736
- if (selector === ":firstAppHost")
6722
+ if (selector === "$firstAppHost")
6737
6723
  return applyRoot(hostSet.$firstAppHost);
6738
- if (selector === ":lastAppHost")
6724
+ if (selector === "$lastAppHost")
6739
6725
  return applyRoot(hostSet.$lastAppHost);
6740
6726
  const config = getElementConfig(this);
6741
6727
  const win = config?.window || window;
6742
- if (selector === ":window")
6728
+ if (selector === "$window")
6743
6729
  return win;
6744
- if (selector === ":document")
6730
+ if (selector === "$document")
6745
6731
  return win.document;
6746
- if (selector === ":host")
6747
- return applyRoot(this);
6748
6732
  if (r === "shadow")
6749
6733
  return this.shadowRoot ? this.shadowRoot.querySelector(selector) : null;
6750
6734
  if (r === "light")
@@ -6759,7 +6743,7 @@ var dooboostoreSimpleWebComponent = (() => {
6759
6743
  ensureInit(this);
6760
6744
  if (nv === null || nv === void 0) {
6761
6745
  const selector = selectorOrTarget;
6762
- if (selector.startsWith(":") && selector !== ":host")
6746
+ if (selector.startsWith("$") && selector !== "$this")
6763
6747
  return;
6764
6748
  const r = options.root || "auto";
6765
6749
  const targets = [];
@@ -6787,75 +6771,54 @@ var dooboostoreSimpleWebComponent = (() => {
6787
6771
  });
6788
6772
  };
6789
6773
  }
6790
- function queryHost(targetOrOptions, propertyKey) {
6774
+ function queryThis(targetOrOptions, propertyKey) {
6791
6775
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6792
- return query(":host", {})(targetOrOptions, propertyKey);
6776
+ return query("$this", {})(targetOrOptions, propertyKey);
6793
6777
  }
6794
6778
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6795
- return query(":host", targetOrOptions);
6779
+ return query("$this", targetOrOptions);
6796
6780
  } else {
6797
- return query(":host", {});
6781
+ return query("$this", {});
6798
6782
  }
6799
6783
  }
6800
- var host = queryHost;
6801
- function parentHost(targetOrOptions, propertyKey) {
6784
+ function queryWindow(targetOrOptions, propertyKey) {
6802
6785
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6803
- return query(":parentHost", {})(targetOrOptions, propertyKey);
6786
+ return query("$window", {})(targetOrOptions, propertyKey);
6804
6787
  }
6805
6788
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6806
- return query(":parentHost", targetOrOptions);
6789
+ return query("$window", targetOrOptions);
6807
6790
  } else {
6808
- return query(":parentHost", {});
6791
+ return query("$window", {});
6809
6792
  }
6810
6793
  }
6811
- function appHost(targetOrOptions, propertyKey) {
6794
+ function queryDocument(targetOrOptions, propertyKey) {
6812
6795
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6813
- return query(":appHost", {})(targetOrOptions, propertyKey);
6796
+ return query("$document", {})(targetOrOptions, propertyKey);
6814
6797
  }
6815
6798
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6816
- return query(":appHost", targetOrOptions);
6799
+ return query("$document", targetOrOptions);
6817
6800
  } else {
6818
- return query(":appHost", {});
6801
+ return query("$document", {});
6819
6802
  }
6820
6803
  }
6821
- function firstHost(targetOrOptions, propertyKey) {
6822
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6823
- return query(":firstHost", {})(targetOrOptions, propertyKey);
6824
- }
6825
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6826
- return query(":firstHost", targetOrOptions);
6827
- } else {
6828
- return query(":firstHost", {});
6829
- }
6830
- }
6831
- function lastHost(targetOrOptions, propertyKey) {
6832
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6833
- return query(":lastHost", {})(targetOrOptions, propertyKey);
6834
- }
6835
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6836
- return query(":lastHost", targetOrOptions);
6837
- } else {
6838
- return query(":lastHost", {});
6839
- }
6840
- }
6841
- function firstAppHost(targetOrOptions, propertyKey) {
6804
+ function queryHost(targetOrOptions, propertyKey) {
6842
6805
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6843
- return query(":firstAppHost", {})(targetOrOptions, propertyKey);
6806
+ return query("$host", {})(targetOrOptions, propertyKey);
6844
6807
  }
6845
6808
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6846
- return query(":firstAppHost", targetOrOptions);
6809
+ return query("$host", targetOrOptions);
6847
6810
  } else {
6848
- return query(":firstAppHost", {});
6811
+ return query("$host", {});
6849
6812
  }
6850
6813
  }
6851
- function lastAppHost(targetOrOptions, propertyKey) {
6814
+ function queryAppHost(targetOrOptions, propertyKey) {
6852
6815
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6853
- return query(":lastAppHost", {})(targetOrOptions, propertyKey);
6816
+ return query("$appHost", {})(targetOrOptions, propertyKey);
6854
6817
  }
6855
6818
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6856
- return query(":lastAppHost", targetOrOptions);
6819
+ return query("$appHost", targetOrOptions);
6857
6820
  } else {
6858
- return query(":lastAppHost", {});
6821
+ return query("$appHost", {});
6859
6822
  }
6860
6823
  }
6861
6824
  var getQueryMetadata = (target) => {
@@ -6904,17 +6867,31 @@ var dooboostoreSimpleWebComponent = (() => {
6904
6867
  return results;
6905
6868
  };
6906
6869
  const hostSet = SwcUtils.getHostSet(this);
6907
- if (selector === ":hosts")
6870
+ if (selector === "$hosts")
6908
6871
  return applyRoot(hostSet.$hosts);
6909
- if (selector === ":appHosts")
6872
+ if (selector === "$appHosts")
6910
6873
  return applyRoot(hostSet.$appHosts);
6874
+ if (selector === "$host")
6875
+ return applyRoot(hostSet.$host);
6876
+ if (selector === "$parentHost")
6877
+ return applyRoot(hostSet.$parentHost);
6878
+ if (selector === "$appHost")
6879
+ return applyRoot(hostSet.$appHost);
6880
+ if (selector === "$firstHost")
6881
+ return applyRoot(hostSet.$firstHost);
6882
+ if (selector === "$lastHost")
6883
+ return applyRoot(hostSet.$lastHost);
6884
+ if (selector === "$firstAppHost")
6885
+ return applyRoot(hostSet.$firstAppHost);
6886
+ if (selector === "$lastAppHost")
6887
+ return applyRoot(hostSet.$lastAppHost);
6911
6888
  const config = getElementConfig(this);
6912
6889
  const win = config?.window || window;
6913
- if (selector === ":window")
6890
+ if (selector === "$window")
6914
6891
  return [win];
6915
- if (selector === ":document")
6892
+ if (selector === "$document")
6916
6893
  return [win.document];
6917
- if (selector === ":host")
6894
+ if (selector === "$this")
6918
6895
  return applyRoot(this);
6919
6896
  if (r === "shadow")
6920
6897
  return this.shadowRoot ? Array.from(this.shadowRoot.querySelectorAll(selector)) : [];
@@ -6932,7 +6909,7 @@ var dooboostoreSimpleWebComponent = (() => {
6932
6909
  ensureInit(this);
6933
6910
  if (nv === null || nv === void 0 || Array.isArray(nv) && nv.length === 0) {
6934
6911
  const selector = selectorOrTarget;
6935
- if (selector.startsWith(":") && selector !== ":host")
6912
+ if (selector.startsWith("$") && selector !== "$this")
6936
6913
  return;
6937
6914
  const r = options.root || "auto";
6938
6915
  let targets = [];
@@ -6955,75 +6932,34 @@ var dooboostoreSimpleWebComponent = (() => {
6955
6932
  });
6956
6933
  };
6957
6934
  }
6958
- function queryAllHost(targetOrOptions, propertyKey) {
6935
+ function queryAllThis(targetOrOptions, propertyKey) {
6959
6936
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6960
- return queryAll(":host", {})(targetOrOptions, propertyKey);
6937
+ return queryAll("$this", {})(targetOrOptions, propertyKey);
6961
6938
  }
6962
6939
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6963
- return queryAll(":host", targetOrOptions);
6940
+ return queryAll("$this", targetOrOptions);
6964
6941
  } else {
6965
- return queryAll(":host", {});
6942
+ return queryAll("$this", {});
6966
6943
  }
6967
6944
  }
6968
- var allHost = queryAllHost;
6969
6945
  function allParentHost(targetOrOptions, propertyKey) {
6970
6946
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6971
- return queryAll(":parentHost", {})(targetOrOptions, propertyKey);
6947
+ return queryAll("$host", {})(targetOrOptions, propertyKey);
6972
6948
  }
6973
6949
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6974
- return queryAll(":parentHost", targetOrOptions);
6950
+ return queryAll("$host", targetOrOptions);
6975
6951
  } else {
6976
- return queryAll(":parentHost", {});
6952
+ return queryAll("$host", {});
6977
6953
  }
6978
6954
  }
6979
6955
  function allAppHost(targetOrOptions, propertyKey) {
6980
6956
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6981
- return queryAll(":appHost", {})(targetOrOptions, propertyKey);
6957
+ return queryAll("$appHost", {})(targetOrOptions, propertyKey);
6982
6958
  }
6983
6959
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6984
- return queryAll(":appHost", targetOrOptions);
6960
+ return queryAll("$appHost", targetOrOptions);
6985
6961
  } else {
6986
- return queryAll(":appHost", {});
6987
- }
6988
- }
6989
- function allFirstHost(targetOrOptions, propertyKey) {
6990
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6991
- return queryAll(":firstHost", {})(targetOrOptions, propertyKey);
6992
- }
6993
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6994
- return queryAll(":firstHost", targetOrOptions);
6995
- } else {
6996
- return queryAll(":firstHost", {});
6997
- }
6998
- }
6999
- function allLastHost(targetOrOptions, propertyKey) {
7000
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
7001
- return queryAll(":lastHost", {})(targetOrOptions, propertyKey);
7002
- }
7003
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
7004
- return queryAll(":lastHost", targetOrOptions);
7005
- } else {
7006
- return queryAll(":lastHost", {});
7007
- }
7008
- }
7009
- function allFirstAppHost(targetOrOptions, propertyKey) {
7010
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
7011
- return queryAll(":firstAppHost", {})(targetOrOptions, propertyKey);
7012
- }
7013
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
7014
- return queryAll(":firstAppHost", targetOrOptions);
7015
- } else {
7016
- return queryAll(":firstAppHost", {});
7017
- }
7018
- }
7019
- function allLastAppHost(targetOrOptions, propertyKey) {
7020
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
7021
- return queryAll(":lastAppHost", {})(targetOrOptions, propertyKey);
7022
- }
7023
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
7024
- return queryAll(":lastAppHost", targetOrOptions);
7025
- } else {
7026
- return queryAll(":lastAppHost", {});
6962
+ return queryAll("$appHost", {});
7027
6963
  }
7028
6964
  }
7029
6965
  var getQueryAllMetadata = (target) => {
@@ -7933,7 +7869,7 @@ var dooboostoreSimpleWebComponent = (() => {
7933
7869
  });
7934
7870
  }
7935
7871
  const hostSet = SwcUtils.getHostSet(inst);
7936
- const appHosts = SwcUtils.findAllParentAppHostsDirect(inst);
7872
+ const appHosts = SwcUtils.findAllAppHostsIncludingSelfDirect(inst);
7937
7873
  inst._executeSwcScript?.("swc-on-constructor", hostSet);
7938
7874
  const cMethods = findAllLifecycleMetadata(inst, ON_INITIALIZE_METADATA_KEY);
7939
7875
  if (cMethods) {
@@ -7951,9 +7887,9 @@ var dooboostoreSimpleWebComponent = (() => {
7951
7887
  if (!(node instanceof HTMLElement)) continue;
7952
7888
  const script = node.getAttribute?.(attrName);
7953
7889
  if (script && !getElementConfig(node)) {
7954
- const host2 = SwcUtils.findNearestSwcHost(node);
7955
- if (host2 && host2.isConnected && typeof host2.__swc_executeAttributeEvent === "function") {
7956
- await host2.__swc_executeAttributeEvent(node, attrName, script, event);
7890
+ const host = SwcUtils.findNearestSwcHostIncludingSelf(node);
7891
+ if (host && host.isConnected && typeof host.__swc_executeAttributeEvent === "function") {
7892
+ await host.__swc_executeAttributeEvent(node, attrName, script, event);
7957
7893
  event.__swc_handled = true;
7958
7894
  break;
7959
7895
  }
@@ -7995,7 +7931,7 @@ var dooboostoreSimpleWebComponent = (() => {
7995
7931
  proto._resolveWindow = function(localConfig) {
7996
7932
  ensureInit(this);
7997
7933
  if (localConfig?.window) return localConfig.window;
7998
- const ancestors = SwcUtils.findAllSwcHosts(this);
7934
+ const ancestors = SwcUtils.findAllSwcHostsIncludingSelf(this);
7999
7935
  for (let i = ancestors.length - 1; i >= 0; i--) {
8000
7936
  const aConf = getElementConfig(ancestors[i]);
8001
7937
  if (aConf?.window) return aConf.window;
@@ -8009,7 +7945,13 @@ var dooboostoreSimpleWebComponent = (() => {
8009
7945
  const app = useHostSet?.$appHost?.simpleApplication;
8010
7946
  if (app) {
8011
7947
  const otherStorage = /* @__PURE__ */ new Map();
8012
- const situations = new SituationTypeContainers([new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://HOSTSET" /* HOST_SET */, data: useHostSet }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://APPHOST" /* APP_HOST */, data: useHostSet.$appHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://APPHOSTS" /* APP_HOSTS */, data: useHostSet.$appHosts }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://HOST" /* HOST */, data: useHostSet.$host }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://HOSTS" /* HOSTS */, data: useHostSet.$hosts }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://FIRSTHOST" /* FIRST_HOST */, data: useHostSet.$firstHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://LASTHOST" /* LAST_HOST */, data: useHostSet.$lastHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://FIRSTAPPHOST" /* FIRST_APP_HOST */, data: useHostSet.$firstAppHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://LASTAPPHOST" /* LAST_APP_HOST */, data: useHostSet.$lastAppHost })]);
7948
+ const situations = new SituationTypeContainers([new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://HOSTSET" /* HOST_SET */, data: useHostSet }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://APPHOST" /* APP_HOST */, data: useHostSet.$appHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://APPHOSTS" /* APP_HOSTS */, data: useHostSet.$appHosts }), new SituationTypeContainer({
7949
+ situationType: "SIMPLE_WEB_COMPONENT://HOST" /* HOST */,
7950
+ data: useHostSet.$host
7951
+ }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://HOSTS" /* HOSTS */, data: useHostSet.$hosts }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://FIRSTHOST" /* FIRST_HOST */, data: useHostSet.$firstHost }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://LASTHOST" /* LAST_HOST */, data: useHostSet.$lastHost }), new SituationTypeContainer({
7952
+ situationType: "SIMPLE_WEB_COMPONENT://FIRSTAPPHOST" /* FIRST_APP_HOST */,
7953
+ data: useHostSet.$firstAppHost
7954
+ }), new SituationTypeContainer({ situationType: "SIMPLE_WEB_COMPONENT://LASTAPPHOST" /* LAST_APP_HOST */, data: useHostSet.$lastAppHost })]);
8013
7955
  otherStorage.set(SituationTypeContainers, situations);
8014
7956
  return app.simstanceManager.executeBindParameterSim(
8015
7957
  {
@@ -8093,7 +8035,7 @@ var dooboostoreSimpleWebComponent = (() => {
8093
8035
  metadata.extends = extendsTagName;
8094
8036
  }
8095
8037
  const emitCustomEventList = getEmitCustomEventMetadataList(constructor) || [];
8096
- const emitHostCustomEventList = emitCustomEventList.filter((meta) => meta.selector === ":host" || meta.selector === "");
8038
+ const emitHostCustomEventList = emitCustomEventList.filter((meta) => meta.selector === "$this" || meta.selector === "");
8097
8039
  const addEventListenerList = getAddEventListenerMetadata(constructor) || [];
8098
8040
  const attrChangeMap = findAllAttributeChangedMetadata(constructor);
8099
8041
  const attributeList = findAllAttributeMetadata(constructor);
@@ -8101,204 +8043,245 @@ var dooboostoreSimpleWebComponent = (() => {
8101
8043
  const swcLifecycleAttributes = ["swc-on-constructor", "swc-on-connected", "swc-on-disconnected", "swc-on-before-connected", "swc-on-after-connected", "swc-on-before-disconnected", "swc-on-after-disconnected", "swc-on-before-adopted", "swc-on-after-adopted", "swc-on-attribute-changed"];
8102
8044
  const swcOnEvents = DOM_EVENT_NAMES.map((e) => `swc-on-${e}`);
8103
8045
  const attributeApplyNames = Array.from(applyAttributeMap.values()).map((it) => it.options.name).filter(Boolean);
8104
- const hostAttributes = attributeList.filter((it) => it.selector === ":host").map((it) => it.options.name || String(it.propertyKey));
8105
- const proto = constructor.prototype;
8046
+ const hostAttributes = attributeList.filter((it) => it.selector === "$this").map((it) => it.options.name || String(it.propertyKey));
8106
8047
  const originalStaticObservedAttributes = constructor.observedAttributes ?? [];
8107
- const mergedObservedAttributes = [.../* @__PURE__ */ new Set([
8108
- ...metadata.observedAttributes ?? [],
8109
- ...originalStaticObservedAttributes,
8110
- ...attrChangeMap.keys(),
8111
- ...attributeApplyNames,
8112
- ...hostAttributes,
8113
- ...emitHostCustomEventList.map((it) => it.options.attributeName).filter(Boolean),
8114
- ...swcLifecycleAttributes,
8115
- ...swcOnEvents
8116
- ])];
8048
+ const mergedObservedAttributes = [.../* @__PURE__ */ new Set([...metadata.observedAttributes ?? [], ...originalStaticObservedAttributes, ...attrChangeMap.keys(), ...attributeApplyNames, ...hostAttributes, ...emitHostCustomEventList.map((it) => it.options.attributeName).filter(Boolean), ...swcLifecycleAttributes, ...swcOnEvents])];
8117
8049
  const connectedInnerHtmlList = getOnConnectedInnerHtmlMetadata(constructor) || [];
8050
+ const proto = constructor.prototype;
8118
8051
  setupPrototype(proto);
8052
+ let helperHostSet = null;
8119
8053
  const originalConnected = proto.connectedCallback;
8120
- proto.connectedCallback = function() {
8054
+ proto.connectedCallback = async function() {
8121
8055
  ensureInit(this);
8122
- const hostSet = SwcUtils.getHostSet(this);
8123
- const appHost2 = hostSet.$appHost;
8124
- const conf = getElementConfig(this);
8125
- const currentWin = this._resolveWindow(conf);
8126
- const shadowMode = conf?.useShadow || connectedInnerHtmlList.find((it) => it.options.useShadow)?.options.useShadow;
8127
- if (shadowMode && !this.shadowRoot) {
8128
- const mode = shadowMode === true ? "open" : shadowMode;
8129
- this.attachShadow({ mode });
8130
- }
8131
- this._executeSwcScript("swc-on-before-connected", hostSet);
8132
- const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_CONNECTED_METADATA_KEY);
8133
- if (bMethods) {
8134
- for (const m of bMethods) this._invokeLifecycleMethod(m, hostSet);
8135
- }
8136
- if (connectedInnerHtmlList.length > 0) {
8137
- let sContent = "", lContent = "";
8138
- for (const meta of connectedInnerHtmlList) {
8139
- const res = this._invokeLifecycleMethod(meta.propertyKey, hostSet);
8140
- if (res !== void 0) {
8141
- if (meta.options.useShadow || conf?.useShadow) sContent += res;
8142
- else lContent += res;
8056
+ helperHostSet = SwcUtils.getHelperAndHostSet(win, this);
8057
+ const appHost = helperHostSet.$appHost;
8058
+ try {
8059
+ if (appHost && typeof appHost._connected === "function") {
8060
+ await appHost._connected(this);
8061
+ } else if (appHost && typeof appHost) {
8062
+ appHost._connected_safari ?? (appHost._connected_safari = []);
8063
+ appHost._connected_safari.push(this);
8064
+ }
8065
+ const conf = getElementConfig(this);
8066
+ const currentWin = this._resolveWindow(conf);
8067
+ const shadowMode = conf?.useShadow || connectedInnerHtmlList.find((it) => it.options.useShadow)?.options.useShadow;
8068
+ if (shadowMode && !this.shadowRoot) {
8069
+ const mode = shadowMode === true ? "open" : shadowMode;
8070
+ this.attachShadow({ mode });
8071
+ }
8072
+ const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_CONNECTED_METADATA_KEY);
8073
+ if (bMethods) {
8074
+ for (const m of bMethods) await this._invokeLifecycleMethod(m, helperHostSet);
8075
+ }
8076
+ this._executeSwcScript("swc-on-before-connected", helperHostSet);
8077
+ if (connectedInnerHtmlList.length > 0) {
8078
+ let sContent = "", lContent = "";
8079
+ for (const meta of connectedInnerHtmlList) {
8080
+ let res = await this._invokeLifecycleMethod(meta.propertyKey, helperHostSet);
8081
+ const actionExpression = new ActionExpression(res, {
8082
+ expression: {
8083
+ replace: {
8084
+ start: meta.options.replaceWrap?.start || "{%{",
8085
+ end: meta.options.replaceWrap?.end || "}%}"
8086
+ },
8087
+ callReturn: {
8088
+ start: meta.options.replaceWrap?.start || "{%{=",
8089
+ end: meta.options.replaceWrap?.end || "}%}"
8090
+ },
8091
+ call: {
8092
+ start: meta.options.replaceWrap?.start || "{%{@",
8093
+ end: meta.options.replaceWrap?.end || "}%}"
8094
+ }
8095
+ }
8096
+ });
8097
+ actionExpression.getExpressions().filter((it) => it.type === "replace").forEach((it) => {
8098
+ try {
8099
+ const sr = FunctionUtils.executeReturn({ script: it.script, context: this, args: helperHostSet });
8100
+ actionExpression.replace(it, sr);
8101
+ } catch (e) {
8102
+ console.error(`[SWC] Failed to execute connectedInnerHTML:`, e);
8103
+ }
8104
+ });
8105
+ res = actionExpression.getUnprocessedTemplate();
8106
+ if (res !== void 0) {
8107
+ if (meta.options.useShadow || conf?.useShadow) sContent += res;
8108
+ else lContent += res;
8109
+ }
8110
+ }
8111
+ try {
8112
+ if (this.shadowRoot) {
8113
+ this.shadowRoot.innerHTML = sContent;
8114
+ }
8115
+ if (lContent) {
8116
+ this.innerHTML = lContent;
8117
+ }
8118
+ } catch (e) {
8119
+ console.error("[ElementDefine] innerHTML setting error:", e);
8143
8120
  }
8144
8121
  }
8145
- try {
8146
- if (this.shadowRoot) this.shadowRoot.innerHTML = sContent;
8147
- if (lContent) this.innerHTML = lContent;
8148
- } catch (e) {
8149
- console.error("[ElementDefine] innerHTML setting error:", e);
8122
+ const root = this.getRootNode();
8123
+ if (!globalDelegatedRoots.has(root)) {
8124
+ DOM_EVENT_NAMES.forEach((type) => {
8125
+ root.addEventListener(type, handleGlobalSwcEvent);
8126
+ });
8127
+ globalDelegatedRoots.add(root);
8150
8128
  }
8151
- }
8152
- const root = this.getRootNode();
8153
- if (!globalDelegatedRoots.has(root)) {
8154
- DOM_EVENT_NAMES.forEach((type) => {
8155
- root.addEventListener(type, handleGlobalSwcEvent);
8129
+ const delegateListeners = [];
8130
+ const nonDelegateListeners = [];
8131
+ addEventListenerList.forEach((meta) => {
8132
+ if (meta.options.delegate && meta.selector !== "$window" && meta.selector !== "$document" && meta.selector !== "$host" && meta.selector !== "$appHost" && meta.selector !== "$firstHost" && meta.selector !== "$lastHost" && meta.selector !== "$firstAppHost" && meta.selector !== "$lastAppHost" && meta.selector !== "$hosts" && meta.selector !== "$appHosts" && meta.selector !== "$this" && meta.selector !== "") {
8133
+ delegateListeners.push(meta);
8134
+ } else {
8135
+ nonDelegateListeners.push(meta);
8136
+ }
8156
8137
  });
8157
- globalDelegatedRoots.add(root);
8158
- }
8159
- const delegateListeners = [];
8160
- const nonDelegateListeners = [];
8161
- addEventListenerList.forEach((meta) => {
8162
- if (meta.options.delegate && meta.selector !== ":window" && meta.selector !== ":document" && meta.selector !== ":parentHost" && meta.selector !== ":appHost" && meta.selector !== ":firstHost" && meta.selector !== ":lastHost" && meta.selector !== ":firstAppHost" && meta.selector !== ":lastAppHost" && meta.selector !== ":hosts" && meta.selector !== ":appHosts" && meta.selector !== ":host" && meta.selector !== "") {
8163
- delegateListeners.push(meta);
8164
- } else {
8165
- nonDelegateListeners.push(meta);
8166
- }
8167
- });
8168
- const delegatesByTypeAndRoot = /* @__PURE__ */ new Map();
8169
- delegateListeners.forEach((meta) => {
8170
- const r = meta.options.root || "auto";
8171
- const rootKey = `${meta.type}:${r}`;
8172
- if (!delegatesByTypeAndRoot.has(rootKey)) {
8173
- delegatesByTypeAndRoot.set(rootKey, []);
8174
- }
8175
- delegatesByTypeAndRoot.get(rootKey).push(meta);
8176
- });
8177
- delegatesByTypeAndRoot.forEach((metaList, typeRootKey) => {
8178
- const [type, rStr] = typeRootKey.split(":");
8179
- const r = rStr === "auto" ? "auto" : rStr;
8180
- const opts = { capture: metaList[0].options.capture, once: metaList[0].options.once, passive: metaList[0].options.passive };
8181
- const bindRoots = [];
8182
- if (r === "auto") bindRoots.push(this.shadowRoot || this);
8183
- else if (r === "light") bindRoots.push(this);
8184
- else if (r === "shadow" && this.shadowRoot) bindRoots.push(this.shadowRoot);
8185
- else if (r === "all") {
8186
- bindRoots.push(this);
8187
- if (this.shadowRoot) bindRoots.push(this.shadowRoot);
8188
- }
8189
- bindRoots.forEach((br) => {
8190
- const sortedMetaList = [...metaList].sort((a, b) => {
8191
- const aStop = a.options.stopPropagation ? 1 : 0;
8192
- const bStop = b.options.stopPropagation ? 1 : 0;
8193
- return bStop - aStop;
8194
- });
8195
- const unifiedHandler = async (event) => {
8196
- for (const meta of sortedMetaList) {
8197
- const { selector, options } = meta;
8198
- const matchedEl = event.target.closest(selector);
8199
- if (matchedEl && br.contains(matchedEl)) {
8200
- if (options.filter) {
8201
- const helper = SwcUtils.getHelperAndHostSet(currentWin, matchedEl);
8202
- if (!options.filter(event, helper)) {
8203
- continue;
8138
+ const delegatesByTypeAndRoot = /* @__PURE__ */ new Map();
8139
+ delegateListeners.forEach((meta) => {
8140
+ const r = meta.options.root || "auto";
8141
+ const rootKey = `${meta.type}:${r}`;
8142
+ if (!delegatesByTypeAndRoot.has(rootKey)) {
8143
+ delegatesByTypeAndRoot.set(rootKey, []);
8144
+ }
8145
+ delegatesByTypeAndRoot.get(rootKey).push(meta);
8146
+ });
8147
+ delegatesByTypeAndRoot.forEach((metaList, typeRootKey) => {
8148
+ const [type, rStr] = typeRootKey.split(":");
8149
+ const r = rStr === "auto" ? "auto" : rStr;
8150
+ const opts = { capture: metaList[0].options.capture, once: metaList[0].options.once, passive: metaList[0].options.passive };
8151
+ const bindRoots = [];
8152
+ if (r === "auto") bindRoots.push(this.shadowRoot || this);
8153
+ else if (r === "light") bindRoots.push(this);
8154
+ else if (r === "shadow" && this.shadowRoot) bindRoots.push(this.shadowRoot);
8155
+ else if (r === "all") {
8156
+ bindRoots.push(this);
8157
+ if (this.shadowRoot) bindRoots.push(this.shadowRoot);
8158
+ }
8159
+ bindRoots.forEach((br) => {
8160
+ const sortedMetaList = [...metaList].sort((a, b) => {
8161
+ const aStop = a.options.stopPropagation ? 1 : 0;
8162
+ const bStop = b.options.stopPropagation ? 1 : 0;
8163
+ return bStop - aStop;
8164
+ });
8165
+ const unifiedHandler = async (event) => {
8166
+ for (const meta of sortedMetaList) {
8167
+ const { selector, options } = meta;
8168
+ const matchedEl = event.target.closest(selector);
8169
+ if (matchedEl && br.contains(matchedEl)) {
8170
+ if (options.filter) {
8171
+ const helper = SwcUtils.getHelperAndHostSet(currentWin, matchedEl);
8172
+ if (!options.filter(event, helper)) {
8173
+ continue;
8174
+ }
8204
8175
  }
8176
+ if (options.stopPropagation) event.stopPropagation();
8177
+ if (options.stopImmediatePropagation) event.stopImmediatePropagation();
8178
+ if (options.preventDefault) event.preventDefault();
8179
+ const currentHostSet = SwcUtils.getHostSet(this);
8180
+ const args = { event, ...currentHostSet, $el: matchedEl, $root: br };
8181
+ await this[meta.propertyKey](event, { ...currentHostSet, $matchedElement: matchedEl }, args);
8182
+ if (event.cancelBubble) break;
8205
8183
  }
8206
- if (options.stopPropagation) event.stopPropagation();
8207
- if (options.stopImmediatePropagation) event.stopImmediatePropagation();
8208
- if (options.preventDefault) event.preventDefault();
8209
- const currentHostSet = SwcUtils.getHostSet(this);
8210
- const args = { event, ...currentHostSet, $el: matchedEl, $root: br };
8211
- await this[meta.propertyKey](event, currentHostSet, matchedEl, args);
8212
- if (event.cancelBubble) break;
8213
8184
  }
8185
+ };
8186
+ br.addEventListener(type, unifiedHandler, opts);
8187
+ this._boundListeners.push({ target: br, type, handler: unifiedHandler, options: opts });
8188
+ });
8189
+ });
8190
+ nonDelegateListeners.forEach((meta) => {
8191
+ const { selector, type, options } = meta;
8192
+ const opts = { capture: options.capture, once: options.once, passive: options.passive };
8193
+ const bindTargets = [];
8194
+ const r = options.root || "auto";
8195
+ const applyRootOption = (target) => {
8196
+ if (!target) return;
8197
+ if (r === "auto") {
8198
+ bindTargets.push(target.shadowRoot || target);
8199
+ } else {
8200
+ if (r === "light" || r === "all") bindTargets.push(target);
8201
+ if ((r === "shadow" || r === "all") && target.shadowRoot) bindTargets.push(target.shadowRoot);
8214
8202
  }
8215
8203
  };
8216
- br.addEventListener(type, unifiedHandler, opts);
8217
- this._boundListeners.push({ target: br, type, handler: unifiedHandler, options: opts });
8218
- });
8219
- });
8220
- nonDelegateListeners.forEach((meta) => {
8221
- const { selector, type, options } = meta;
8222
- const opts = { capture: options.capture, once: options.once, passive: options.passive };
8223
- const bindTargets = [];
8224
- const r = options.root || "auto";
8225
- const applyRootOption = (target) => {
8226
- if (!target) return;
8227
- if (r === "auto") {
8228
- bindTargets.push(target.shadowRoot || target);
8229
- } else {
8230
- if (r === "light" || r === "all") bindTargets.push(target);
8231
- if ((r === "shadow" || r === "all") && target.shadowRoot) bindTargets.push(target.shadowRoot);
8232
- }
8233
- };
8234
- if (selector === ":window") bindTargets.push(currentWin);
8235
- else if (selector === ":document") bindTargets.push(currentWin.document);
8236
- else if (selector === ":parentHost") applyRootOption(hostSet.$parentHost);
8237
- else if (selector === ":appHost") applyRootOption(hostSet.$appHost);
8238
- else if (selector === ":firstHost") applyRootOption(hostSet.$firstHost);
8239
- else if (selector === ":lastHost") applyRootOption(hostSet.$lastHost);
8240
- else if (selector === ":firstAppHost") applyRootOption(hostSet.$firstAppHost);
8241
- else if (selector === ":lastAppHost") applyRootOption(hostSet.$lastAppHost);
8242
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRootOption);
8243
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRootOption);
8244
- else if (selector === ":host" || !selector) applyRootOption(this);
8245
- else {
8246
- const searchRoots = [];
8247
- if (r === "auto") searchRoots.push(this.shadowRoot || this);
8248
- else if (r === "light") searchRoots.push(this);
8249
- else if (r === "shadow" && this.shadowRoot) searchRoots.push(this.shadowRoot);
8250
- else if (r === "all") {
8251
- searchRoots.push(this);
8252
- if (this.shadowRoot) searchRoots.push(this.shadowRoot);
8204
+ if (selector === "$window") bindTargets.push(currentWin);
8205
+ else if (selector === "$document") bindTargets.push(currentWin.document);
8206
+ else if (selector === "$host") applyRootOption(helperHostSet.$host);
8207
+ else if (selector === "$parentHost") applyRootOption(helperHostSet.$parentHost);
8208
+ else if (selector === "$appHost") applyRootOption(helperHostSet.$appHost);
8209
+ else if (selector === "$firstHost") applyRootOption(helperHostSet.$firstHost);
8210
+ else if (selector === "$lastHost") applyRootOption(helperHostSet.$lastHost);
8211
+ else if (selector === "$firstAppHost") applyRootOption(helperHostSet.$firstAppHost);
8212
+ else if (selector === "$lastAppHost") applyRootOption(helperHostSet.$lastAppHost);
8213
+ else if (selector === "$hosts") helperHostSet.$hosts.forEach(applyRootOption);
8214
+ else if (selector === "$appHosts") helperHostSet.$appHosts.forEach(applyRootOption);
8215
+ else if (selector === "$this" || !selector) applyRootOption(this);
8216
+ else {
8217
+ const searchRoots = [];
8218
+ if (r === "auto") searchRoots.push(this.shadowRoot || this);
8219
+ else if (r === "light") searchRoots.push(this);
8220
+ else if (r === "shadow" && this.shadowRoot) searchRoots.push(this.shadowRoot);
8221
+ else if (r === "all") {
8222
+ searchRoots.push(this);
8223
+ if (this.shadowRoot) searchRoots.push(this.shadowRoot);
8224
+ }
8225
+ searchRoots.forEach((sr) => {
8226
+ sr.querySelectorAll(selector).forEach((el) => bindTargets.push(el));
8227
+ });
8253
8228
  }
8254
- searchRoots.forEach((sr) => {
8255
- sr.querySelectorAll(selector).forEach((el) => bindTargets.push(el));
8229
+ bindTargets.forEach((t) => {
8230
+ const handler = async (event) => {
8231
+ if (options.filter) {
8232
+ const helper = SwcUtils.getHelperAndHostSet(currentWin, t);
8233
+ if (!options.filter(event, { currentThis: this, helper })) {
8234
+ return;
8235
+ }
8236
+ }
8237
+ if (options.stopPropagation) event.stopPropagation();
8238
+ if (options.stopImmediatePropagation) event.stopImmediatePropagation();
8239
+ if (options.preventDefault) event.preventDefault();
8240
+ const currentHostSet = SwcUtils.getHostSet(this);
8241
+ const args = { event, ...currentHostSet, $el: t, $root: t };
8242
+ await this[meta.propertyKey](event, { currentHostSet, $$matchedElement: event.currentTarget }, args);
8243
+ };
8244
+ t.addEventListener(type, handler, opts);
8245
+ if (options.removeOnDisconnected === true || t === currentWin || t === currentWin.document) {
8246
+ this._boundListeners.push({ target: t, type, handler, options: opts });
8247
+ }
8256
8248
  });
8257
- }
8258
- bindTargets.forEach((t) => {
8259
- const handler = async (event) => {
8260
- if (options.filter) {
8261
- const helper = SwcUtils.getHelperAndHostSet(currentWin, t);
8262
- if (!options.filter(event, { currentThis: this, helper })) {
8263
- return;
8249
+ });
8250
+ if (originalConnected) await originalConnected.apply(this);
8251
+ const aMethods = findAllLifecycleMetadata(this, ON_AFTER_CONNECTED_METADATA_KEY);
8252
+ if (aMethods) {
8253
+ for (const m of aMethods) await this._invokeLifecycleMethod(m, helperHostSet);
8254
+ }
8255
+ this._executeSwcScript("swc-on-connected", helperHostSet);
8256
+ this._executeSwcScript("swc-on-after-connected", helperHostSet);
8257
+ this.__swc_connected = true;
8258
+ for (let [name2, metaList] of Array.from(attrChangeMap)) {
8259
+ for (const meta of metaList) {
8260
+ if (meta.options.while === "connected") {
8261
+ const val = getAttributeValue(this, name2, { type: meta.options.type });
8262
+ if (val !== null) {
8263
+ await this[meta.propertyKey](val, null, name2, helperHostSet);
8264
8264
  }
8265
8265
  }
8266
- if (options.stopPropagation) event.stopPropagation();
8267
- if (options.stopImmediatePropagation) event.stopImmediatePropagation();
8268
- if (options.preventDefault) event.preventDefault();
8269
- const currentHostSet = SwcUtils.getHostSet(this);
8270
- const args = { event, ...currentHostSet, $el: t, $root: t };
8271
- await this[meta.propertyKey](event, currentHostSet, args);
8272
- };
8273
- t.addEventListener(type, handler, opts);
8274
- if (options.removeOnDisconnected === true || t === currentWin || t === currentWin.document) {
8275
- this._boundListeners.push({ target: t, type, handler, options: opts });
8276
8266
  }
8277
- });
8278
- });
8279
- if (originalConnected) originalConnected.apply(this);
8280
- const aMethods = findAllLifecycleMetadata(this, ON_AFTER_CONNECTED_METADATA_KEY);
8281
- if (aMethods) {
8282
- for (const m of aMethods) this._invokeLifecycleMethod(m, hostSet);
8283
- }
8284
- this._executeSwcScript("swc-on-connected", hostSet);
8285
- this._executeSwcScript("swc-on-after-connected", hostSet);
8286
- this.__swc_connected = true;
8287
- const appHostss = SwcUtils.findAllParentAppHostsDirect(this);
8288
- if (appHost2 && typeof appHost2._connected === "function") {
8289
- appHost2._connected(this);
8290
- } else if (appHost2 && typeof appHost2) {
8291
- appHost2._connected_safari ?? (appHost2._connected_safari = []);
8292
- appHost2._connected_safari.push(this);
8267
+ }
8268
+ } finally {
8269
+ if (appHost && typeof appHost._connectedDone === "function") {
8270
+ await appHost._connectedDone(this);
8271
+ }
8293
8272
  }
8294
8273
  };
8295
8274
  const originalDisconnected = proto.disconnectedCallback;
8296
8275
  proto.disconnectedCallback = function() {
8297
- const hostSet = SwcUtils.getHostSet(this);
8298
- this._executeSwcScript("swc-on-before-disconnected", hostSet);
8276
+ console.log("disconnnnnnnnnnnnnnnnnnn", helperHostSet, this);
8277
+ const appHost = helperHostSet.$appHost;
8278
+ if (appHost && typeof appHost._disconnected === "function") {
8279
+ appHost._disconnected(this);
8280
+ }
8281
+ this._executeSwcScript("swc-on-before-disconnected", helperHostSet);
8299
8282
  const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_DISCONNECTED_METADATA_KEY);
8300
8283
  if (bMethods) {
8301
- for (const m of bMethods) this._invokeLifecycleMethod(m, hostSet);
8284
+ for (const m of bMethods) this._invokeLifecycleMethod(m, helperHostSet);
8302
8285
  }
8303
8286
  if (this._boundListeners) {
8304
8287
  this._boundListeners.forEach((l) => l.target.removeEventListener(l.type, l.handler, l.options));
@@ -8307,15 +8290,11 @@ var dooboostoreSimpleWebComponent = (() => {
8307
8290
  if (originalDisconnected) originalDisconnected.apply(this);
8308
8291
  const aMethods = findAllLifecycleMetadata(this, ON_AFTER_DISCONNECTED_METADATA_KEY);
8309
8292
  if (aMethods) {
8310
- for (const m of aMethods) this._invokeLifecycleMethod(m, hostSet);
8293
+ for (const m of aMethods) this._invokeLifecycleMethod(m, helperHostSet);
8311
8294
  }
8312
- this._executeSwcScript("swc-on-disconnected", hostSet);
8313
- this._executeSwcScript("swc-on-after-disconnected", hostSet);
8295
+ this._executeSwcScript("swc-on-disconnected", helperHostSet);
8296
+ this._executeSwcScript("swc-on-after-disconnected", helperHostSet);
8314
8297
  this.__swc_connected = false;
8315
- const appHost2 = hostSet.$appHost;
8316
- if (appHost2 && typeof appHost2._disconnected === "function") {
8317
- appHost2._disconnected(this);
8318
- }
8319
8298
  };
8320
8299
  const originalAdopted = proto.adoptedCallback;
8321
8300
  proto.adoptedCallback = function() {
@@ -8340,12 +8319,12 @@ var dooboostoreSimpleWebComponent = (() => {
8340
8319
  let processedVal = newVal;
8341
8320
  if (newVal !== null) {
8342
8321
  const ae = new ActionExpression(newVal);
8343
- const expr = ae.getFirstExpression("call-return");
8322
+ const expr = ae.getFirstExpression("callReturn");
8344
8323
  if (expr) {
8345
8324
  const win2 = this._resolveWindow?.() || (typeof window !== "undefined" ? window : void 0);
8346
8325
  const helperAndHostSet = SwcUtils.getHelperAndHostSet(win2, this);
8326
+ const script = ConvertUtils2.decodeHtmlEntity(expr.script, win2.document);
8347
8327
  try {
8348
- const script = ConvertUtils2.decodeHtmlEntity(expr.script, win2.document);
8349
8328
  const result = FunctionUtils.executeReturn({
8350
8329
  script,
8351
8330
  context: this,
@@ -8371,6 +8350,9 @@ var dooboostoreSimpleWebComponent = (() => {
8371
8350
  const metaList = attrChangeMap.get(name2);
8372
8351
  if (metaList && Array.isArray(metaList)) {
8373
8352
  for (const meta of metaList) {
8353
+ if (meta.options.while === "connected" && !this.__swc_connected) {
8354
+ continue;
8355
+ }
8374
8356
  const convertedVal = convertAttributeValue(processedVal, meta.options.type);
8375
8357
  this[meta.propertyKey](convertedVal, old, name2, hSet);
8376
8358
  }
@@ -8404,7 +8386,7 @@ var dooboostoreSimpleWebComponent = (() => {
8404
8386
  if (primaryTarget && typeof primaryTarget.hasAttribute === "function" && primaryTarget.hasAttribute(attrName)) {
8405
8387
  let domVal = primaryTarget.getAttribute(attrName);
8406
8388
  const ae = new ActionExpression(domVal);
8407
- const expr = ae.getFirstExpression("call-return");
8389
+ const expr = ae.getFirstExpression("callReturn");
8408
8390
  if (expr) {
8409
8391
  try {
8410
8392
  const result = FunctionUtils.executeReturn({
@@ -8434,20 +8416,21 @@ var dooboostoreSimpleWebComponent = (() => {
8434
8416
  if ((r === "shadow" || r === "all") && target.shadowRoot) results.push(target.shadowRoot);
8435
8417
  }
8436
8418
  };
8437
- if (selector === ":host" || !selector) {
8419
+ if (selector === "$this" || !selector) {
8438
8420
  applyRoot(inst);
8439
- } else if (selector === ":window") {
8421
+ } else if (selector === "$window") {
8440
8422
  results.push(currentWin);
8441
- } else if (selector === ":document") {
8423
+ } else if (selector === "$document") {
8442
8424
  results.push(currentWin.document);
8443
8425
  } else {
8444
8426
  const hostSet = SwcUtils.getHostSet(inst);
8445
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8446
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8447
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8448
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8449
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8450
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8427
+ if (selector === "$host") applyRoot(hostSet.$host);
8428
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8429
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8430
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8431
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8432
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8433
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8451
8434
  else {
8452
8435
  if (r === "shadow") {
8453
8436
  const found = inst.shadowRoot?.querySelectorAll(selector);
@@ -8519,22 +8502,22 @@ var dooboostoreSimpleWebComponent = (() => {
8519
8502
  }
8520
8503
  };
8521
8504
  }
8522
- function attributeHost(targetOrAttrOrOptions, propertyKeyOrOptions) {
8505
+ function attributeThis(targetOrAttrOrOptions, propertyKeyOrOptions) {
8523
8506
  if (propertyKeyOrOptions !== void 0 && (typeof propertyKeyOrOptions === "string" || typeof propertyKeyOrOptions === "symbol")) {
8524
- return attribute(":host", { name: String(propertyKeyOrOptions) })(targetOrAttrOrOptions, propertyKeyOrOptions);
8507
+ return attribute("$this", { name: String(propertyKeyOrOptions) })(targetOrAttrOrOptions, propertyKeyOrOptions);
8525
8508
  }
8526
8509
  if (typeof targetOrAttrOrOptions === "string") {
8527
8510
  const attrName = targetOrAttrOrOptions;
8528
8511
  const options = typeof propertyKeyOrOptions === "object" ? propertyKeyOrOptions : {};
8529
- return attribute(":host", { ...options, name: attrName });
8512
+ return attribute("$this", { ...options, name: attrName });
8530
8513
  } else if (typeof targetOrAttrOrOptions === "object") {
8531
8514
  const options = targetOrAttrOrOptions;
8532
8515
  return (target, propertyKey) => {
8533
- return attribute(":host", { ...options, name: String(propertyKey) })(target, propertyKey);
8516
+ return attribute("$this", { ...options, name: String(propertyKey) })(target, propertyKey);
8534
8517
  };
8535
8518
  } else {
8536
8519
  return (target, propertyKey) => {
8537
- return attribute(":host", { name: String(propertyKey) })(target, propertyKey);
8520
+ return attribute("$this", { name: String(propertyKey) })(target, propertyKey);
8538
8521
  };
8539
8522
  }
8540
8523
  }
@@ -8603,11 +8586,12 @@ var dooboostoreSimpleWebComponent = (() => {
8603
8586
  if (r === "all") return t.shadowRoot || t;
8604
8587
  return t;
8605
8588
  };
8606
- if (selector === ":host") return applyRoot(this);
8607
- if (selector === ":parentHost") return applyRoot(hostSet.$parentHost);
8608
- if (selector === ":appHost") return applyRoot(hostSet.$appHost);
8609
- if (selector === ":firstHost") return applyRoot(hostSet.$firstHost);
8610
- if (selector === ":lastHost") return applyRoot(hostSet.$lastHost);
8589
+ if (selector === "$this") return applyRoot(this);
8590
+ if (selector === "$host") return applyRoot(hostSet.$host);
8591
+ if (selector === "$parentHost") return applyRoot(hostSet.$parentHost);
8592
+ if (selector === "$appHost") return applyRoot(hostSet.$appHost);
8593
+ if (selector === "$firstHost") return applyRoot(hostSet.$firstHost);
8594
+ if (selector === "$lastHost") return applyRoot(hostSet.$lastHost);
8611
8595
  const targetRoot = applyRoot(this);
8612
8596
  return targetRoot ? targetRoot.querySelector(selector) : null;
8613
8597
  };
@@ -8645,20 +8629,20 @@ var dooboostoreSimpleWebComponent = (() => {
8645
8629
  });
8646
8630
  return result;
8647
8631
  };
8648
- function applyNodeHost(targetOrOptions, propertyKey, descriptor) {
8649
- if (propertyKey !== void 0) return applyNode(":host", { position: "beforeEnd" })(targetOrOptions, propertyKey, descriptor);
8632
+ function applyNodeThis(targetOrOptions, propertyKey, descriptor) {
8633
+ if (propertyKey !== void 0) return applyNode("$this", { position: "beforeEnd" })(targetOrOptions, propertyKey, descriptor);
8650
8634
  const opt = targetOrOptions || {};
8651
- return applyNode(":host", { position: "beforeEnd", ...opt });
8635
+ return applyNode("$this", { position: "beforeEnd", ...opt });
8652
8636
  }
8653
- function applyReplaceChildrenNodeHost(targetOrOptions, propertyKey, descriptor) {
8654
- if (propertyKey !== void 0) return applyNode(":host", { position: "replaceChildren" })(targetOrOptions, propertyKey, descriptor);
8637
+ function applyReplaceChildrenNodeThis(targetOrOptions, propertyKey, descriptor) {
8638
+ if (propertyKey !== void 0) return applyNode("$this", { position: "replaceChildren" })(targetOrOptions, propertyKey, descriptor);
8655
8639
  const opt = targetOrOptions || {};
8656
- return applyNode(":host", { position: "replaceChildren", ...opt });
8640
+ return applyNode("$this", { position: "replaceChildren", ...opt });
8657
8641
  }
8658
- function applyInnerHtmlNodeHost(targetOrOptions, propertyKey, descriptor) {
8659
- if (propertyKey !== void 0) return applyNode(":host", { position: "innerHtml" })(targetOrOptions, propertyKey, descriptor);
8642
+ function applyInnerHtmlNodeThis(targetOrOptions, propertyKey, descriptor) {
8643
+ if (propertyKey !== void 0) return applyNode("$this", { position: "innerHtml" })(targetOrOptions, propertyKey, descriptor);
8660
8644
  const opt = targetOrOptions || {};
8661
- return applyNode(":host", { position: "innerHtml", ...opt });
8645
+ return applyNode("$this", { position: "innerHtml", ...opt });
8662
8646
  }
8663
8647
  function applyReplaceChildrenNode(selector, options = {}) {
8664
8648
  return applyNode(selector, { ...options, position: "replaceChildren" });
@@ -8666,6 +8650,9 @@ var dooboostoreSimpleWebComponent = (() => {
8666
8650
  function applyInnerHtmlNode(selector, options = {}) {
8667
8651
  return applyNode(selector, { ...options, position: "innerHtml" });
8668
8652
  }
8653
+ function applyInnerTextNode(selector, options = {}) {
8654
+ return applyNode(selector, { ...options, position: "innerText" });
8655
+ }
8669
8656
 
8670
8657
  // src/decorators/applyClass.ts
8671
8658
  var CLASS_METADATA_KEY = Symbol.for("simple-web-component:class");
@@ -8693,25 +8680,26 @@ var dooboostoreSimpleWebComponent = (() => {
8693
8680
  const handleResult = (resolvedValue) => {
8694
8681
  if (resolvedValue !== void 0) {
8695
8682
  const win = this.ownerDocument?.defaultView || window;
8696
- const host2 = this;
8697
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
8683
+ const host = this;
8684
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8698
8685
  const r = finalOptions.root || "auto";
8699
8686
  const targetEls = [];
8700
8687
  const applyRoot = (t) => {
8701
8688
  if (!t || !(t instanceof win.HTMLElement)) return;
8702
8689
  targetEls.push(t);
8703
8690
  };
8704
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8705
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8706
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8707
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8708
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8709
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8710
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8711
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8712
- else if (selector === ":host" || !selector) applyRoot(host2);
8691
+ if (selector === "$this" || !selector) applyRoot(host);
8692
+ else if (selector === "$host") applyRoot(hostSet.$host);
8693
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8694
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8695
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8696
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8697
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8698
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8699
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8700
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8713
8701
  else {
8714
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8702
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8715
8703
  if (targetRoot) {
8716
8704
  const found = targetRoot.querySelectorAll(selector);
8717
8705
  if (found) targetEls.push(...Array.from(found));
@@ -8785,14 +8773,14 @@ var dooboostoreSimpleWebComponent = (() => {
8785
8773
  var addClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("add")(selector, classMapOrOptions, options);
8786
8774
  var removeClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("remove")(selector, classMapOrOptions, options);
8787
8775
  var toggleClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("toggle")(selector, classMapOrOptions, options);
8788
- function applyClassHost(action = "update", options = {}) {
8789
- return createClassDecorator(action)(":host", options);
8776
+ function applyClassThis(action = "update", options = {}) {
8777
+ return createClassDecorator(action)("$this", options);
8790
8778
  }
8791
- var setClassHost = (classMapOrOptions, options = {}) => createClassDecorator("set")(":host", classMapOrOptions, options);
8792
- var updateClassHost = (classMapOrOptions, options = {}) => createClassDecorator("update")(":host", classMapOrOptions, options);
8793
- var addClassHost = (classMapOrOptions, options = {}) => createClassDecorator("add")(":host", classMapOrOptions, options);
8794
- var removeClassHost = (classMapOrOptions, options = {}) => createClassDecorator("remove")(":host", classMapOrOptions, options);
8795
- var toggleClassHost = (classMapOrOptions, options = {}) => createClassDecorator("toggle")(":host", classMapOrOptions, options);
8779
+ var setClassThis = (classMapOrOptions, options = {}) => createClassDecorator("set")("$this", classMapOrOptions, options);
8780
+ var updateClassThis = (classMapOrOptions, options = {}) => createClassDecorator("update")("$this", classMapOrOptions, options);
8781
+ var addClassThis = (classMapOrOptions, options = {}) => createClassDecorator("add")("$this", classMapOrOptions, options);
8782
+ var removeClassThis = (classMapOrOptions, options = {}) => createClassDecorator("remove")("$this", classMapOrOptions, options);
8783
+ var toggleClassThis = (classMapOrOptions, options = {}) => createClassDecorator("toggle")("$this", classMapOrOptions, options);
8796
8784
  var findAllClassMetadata = (target) => {
8797
8785
  const result = /* @__PURE__ */ new Map();
8798
8786
  const maps = ReflectUtils.findAllMetadata(CLASS_METADATA_KEY, target);
@@ -8823,25 +8811,26 @@ var dooboostoreSimpleWebComponent = (() => {
8823
8811
  const handleResult = (resolvedValue) => {
8824
8812
  if (resolvedValue !== void 0) {
8825
8813
  const win = this.ownerDocument?.defaultView || window;
8826
- const host2 = this;
8827
- const hostSet = SwcUtils.getHelperAndHostSet(win, host2);
8814
+ const host = this;
8815
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8828
8816
  const r = options.root || "auto";
8829
8817
  const targetEls = [];
8830
8818
  const applyRoot = (t) => {
8831
8819
  if (!t || !(t instanceof win.HTMLElement)) return;
8832
8820
  targetEls.push(t);
8833
8821
  };
8834
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8835
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8836
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8837
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8838
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8839
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8840
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8841
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8842
- else if (selector === ":host" || !selector) applyRoot(host2);
8822
+ if (selector === "$this" || !selector) applyRoot(host);
8823
+ else if (selector === "$host") applyRoot(hostSet.$host);
8824
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8825
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8826
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8827
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8828
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8829
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8830
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8831
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8843
8832
  else {
8844
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8833
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8845
8834
  if (targetRoot) {
8846
8835
  const found = targetRoot.querySelectorAll(selector);
8847
8836
  if (found) targetEls.push(...Array.from(found));
@@ -8899,12 +8888,12 @@ var dooboostoreSimpleWebComponent = (() => {
8899
8888
  var setStyle = (selector, options = {}) => createStyleDecorator("set")(selector, options);
8900
8889
  var updateStyle = (selector, options = {}) => createStyleDecorator("update")(selector, options);
8901
8890
  var removeStyle = (selector, options = {}) => createStyleDecorator("remove")(selector, options);
8902
- function applyStyleHost(action = "update", options = {}) {
8903
- return createStyleDecorator(action)(":host", options);
8891
+ function applyStyleThis(action = "update", options = {}) {
8892
+ return createStyleDecorator(action)("$this", options);
8904
8893
  }
8905
- var setStyleHost = (options = {}) => createStyleDecorator("set")(":host", options);
8906
- var updateStyleHost = (options = {}) => createStyleDecorator("update")(":host", options);
8907
- var removeStyleHost = (options = {}) => createStyleDecorator("remove")(":host", options);
8894
+ var setStyleThis = (options = {}) => createStyleDecorator("set")("$this", options);
8895
+ var updateStyleThis = (options = {}) => createStyleDecorator("update")("$this", options);
8896
+ var removeStyleThis = (options = {}) => createStyleDecorator("remove")("$this", options);
8908
8897
  var findAllStyleMetadata = (target) => {
8909
8898
  const result = /* @__PURE__ */ new Map();
8910
8899
  const maps = ReflectUtils.findAllMetadata(STYLE_METADATA_KEY, target);
@@ -8943,25 +8932,26 @@ var dooboostoreSimpleWebComponent = (() => {
8943
8932
  const handleResult = (resolvedValue) => {
8944
8933
  if (resolvedValue !== void 0) {
8945
8934
  const win = this.ownerDocument?.defaultView || window;
8946
- const host2 = this;
8947
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
8935
+ const host = this;
8936
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8948
8937
  const r = finalOptions.root || "auto";
8949
8938
  const targetEls = [];
8950
8939
  const applyRoot = (t) => {
8951
8940
  if (!t || !(t instanceof win.HTMLElement)) return;
8952
8941
  targetEls.push(t);
8953
8942
  };
8954
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8955
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8956
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8957
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8958
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8959
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8960
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8961
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8962
- else if (selector === ":host" || !selector) applyRoot(host2);
8943
+ if (selector === "$this" || !selector) applyRoot(host);
8944
+ else if (selector === "$host") applyRoot(hostSet.$host);
8945
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8946
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8947
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8948
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8949
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8950
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8951
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8952
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8963
8953
  else {
8964
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8954
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8965
8955
  if (targetRoot) {
8966
8956
  const found = targetRoot.querySelectorAll(selector);
8967
8957
  if (found) targetEls.push(...Array.from(found));
@@ -8994,8 +8984,8 @@ var dooboostoreSimpleWebComponent = (() => {
8994
8984
  };
8995
8985
  };
8996
8986
  };
8997
- var setPropertyHost = (propertyNameOrOptions, options = {}) => {
8998
- return setProperty(":host", propertyNameOrOptions, options);
8987
+ var setPropertyThis = (propertyNameOrOptions, options = {}) => {
8988
+ return setProperty("$this", propertyNameOrOptions, options);
8999
8989
  };
9000
8990
 
9001
8991
  // src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts
@@ -9010,7 +9000,7 @@ var dooboostoreSimpleWebComponent = (() => {
9010
9000
  list = [];
9011
9001
  ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, list, constructor);
9012
9002
  }
9013
- list.push({ propertyKey, pathPattern, filter });
9003
+ list.push({ propertyKey, options });
9014
9004
  return descriptor;
9015
9005
  };
9016
9006
  }
@@ -9021,7 +9011,7 @@ var dooboostoreSimpleWebComponent = (() => {
9021
9011
  let options = {};
9022
9012
  if (Array.isArray(targetOrOptions)) {
9023
9013
  options.path = targetOrOptions;
9024
- } else if (typeof targetOrOptions === "string") {
9014
+ } else if (typeof targetOrOptions === "string" || typeof targetOrOptions === "function") {
9025
9015
  options.path = targetOrOptions;
9026
9016
  } else if (targetOrOptions && typeof targetOrOptions === "object") {
9027
9017
  options = targetOrOptions;
@@ -9090,9 +9080,9 @@ var dooboostoreSimpleWebComponent = (() => {
9090
9080
  const result = originalMethod.apply(this, args);
9091
9081
  if (result instanceof Promise) {
9092
9082
  result.then((data) => {
9093
- const appHost2 = SwcUtils.getAppHost(this);
9094
- if (appHost2) {
9095
- appHost2.publishMessage({
9083
+ const appHost = SwcUtils.getAppHost(this);
9084
+ if (appHost) {
9085
+ appHost.publishMessage({
9096
9086
  publisher: this,
9097
9087
  data,
9098
9088
  type: messageType
@@ -9102,9 +9092,9 @@ var dooboostoreSimpleWebComponent = (() => {
9102
9092
  console.warn("publishSwcAppMessage async error:", err);
9103
9093
  });
9104
9094
  } else {
9105
- const appHost2 = SwcUtils.getAppHost(this);
9106
- if (appHost2) {
9107
- appHost2.publishMessage({
9095
+ const appHost = SwcUtils.getAppHost(this);
9096
+ if (appHost) {
9097
+ appHost.publishMessage({
9108
9098
  publisher: this,
9109
9099
  data: result,
9110
9100
  type: messageType
@@ -9167,6 +9157,22 @@ var dooboostoreSimpleWebComponent = (() => {
9167
9157
  return typeof obj?.hasActivate === "function";
9168
9158
  };
9169
9159
  })(RouterAction || (RouterAction = {}));
9160
+
9161
+ // ../simple-boot/dist/esm/decorators/cache/CacheDecorator.js
9162
+ var CacheMetadataKey = Symbol.for("simple-boot:cache-metadata");
9163
+
9164
+ // ../simple-boot/dist/esm/fetch/ApiService.js
9165
+ var ApiServiceInterceptor;
9166
+ ((ApiServiceInterceptor2) => {
9167
+ ApiServiceInterceptor2.TOKEN = Symbol.for("simple-boot:api-service-interceptor-token");
9168
+ ApiServiceInterceptor2.resolveAll = (simstanceManager) => {
9169
+ try {
9170
+ return (simstanceManager.findSims(ApiServiceInterceptor2.TOKEN) ?? []).map((it) => it.getValue()).filter(ValidUtils.isDefined);
9171
+ } catch (e) {
9172
+ return [];
9173
+ }
9174
+ };
9175
+ })(ApiServiceInterceptor || (ApiServiceInterceptor = {}));
9170
9176
  return __toCommonJS(bundle_entry_exports);
9171
9177
  })();
9172
9178
  /*! Bundled license information: