@dooboostore/simple-web-component 1.0.49 → 1.0.50

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 (145) hide show
  1. package/README.md +72 -0
  2. package/dist/cjs/decorators/addEventListener.js +1994 -9
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +10 -4
  5. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  6. package/dist/cjs/decorators/applyClass.js +10 -4
  7. package/dist/cjs/decorators/applyClass.js.map +2 -2
  8. package/dist/cjs/decorators/applyNode.js +10 -4
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/applyProperty.js +14 -8
  11. package/dist/cjs/decorators/applyProperty.js.map +2 -2
  12. package/dist/cjs/decorators/applySlot.js +6 -5
  13. package/dist/cjs/decorators/applySlot.js.map +2 -2
  14. package/dist/cjs/decorators/applyStyle.js +10 -4
  15. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  16. package/dist/cjs/decorators/changedAttribute.js +22 -13
  17. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  18. package/dist/cjs/decorators/elementDefine.js +18 -3
  19. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  20. package/dist/cjs/decorators/eventMedia.js +84 -0
  21. package/dist/cjs/decorators/eventMedia.js.map +7 -0
  22. package/dist/cjs/decorators/index.js +3 -0
  23. package/dist/cjs/decorators/index.js.map +2 -2
  24. package/dist/cjs/decorators/intersectionObserver.js +46 -55
  25. package/dist/cjs/decorators/intersectionObserver.js.map +2 -2
  26. package/dist/cjs/decorators/mutationObserver.js +46 -55
  27. package/dist/cjs/decorators/mutationObserver.js.map +2 -2
  28. package/dist/cjs/decorators/parameter.js +73 -0
  29. package/dist/cjs/decorators/parameter.js.map +7 -0
  30. package/dist/cjs/decorators/requestAnimationFrame.js +124 -0
  31. package/dist/cjs/decorators/requestAnimationFrame.js.map +7 -0
  32. package/dist/cjs/decorators/resizeObserver.js +46 -55
  33. package/dist/cjs/decorators/resizeObserver.js.map +2 -2
  34. package/dist/cjs/decorators/setInterval.js +46 -14
  35. package/dist/cjs/decorators/setInterval.js.map +2 -2
  36. package/dist/cjs/decorators/setTimeout.js +49 -14
  37. package/dist/cjs/decorators/setTimeout.js.map +2 -2
  38. package/dist/cjs/elements/SwcAppMixin.js +19 -3
  39. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  40. package/dist/cjs/types/window.d.js.map +1 -1
  41. package/dist/esm/decorators/addEventListener.js +1994 -9
  42. package/dist/esm/decorators/addEventListener.js.map +2 -2
  43. package/dist/esm/decorators/applyAttribute.js +10 -4
  44. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  45. package/dist/esm/decorators/applyClass.js +10 -4
  46. package/dist/esm/decorators/applyClass.js.map +2 -2
  47. package/dist/esm/decorators/applyNode.js +10 -4
  48. package/dist/esm/decorators/applyNode.js.map +2 -2
  49. package/dist/esm/decorators/applyProperty.js +14 -8
  50. package/dist/esm/decorators/applyProperty.js.map +2 -2
  51. package/dist/esm/decorators/applySlot.js +6 -5
  52. package/dist/esm/decorators/applySlot.js.map +2 -2
  53. package/dist/esm/decorators/applyStyle.js +10 -4
  54. package/dist/esm/decorators/applyStyle.js.map +2 -2
  55. package/dist/esm/decorators/changedAttribute.js +22 -13
  56. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  57. package/dist/esm/decorators/elementDefine.js +18 -3
  58. package/dist/esm/decorators/elementDefine.js.map +2 -2
  59. package/dist/esm/decorators/eventMedia.js +66 -0
  60. package/dist/esm/decorators/eventMedia.js.map +7 -0
  61. package/dist/esm/decorators/index.js +3 -0
  62. package/dist/esm/decorators/index.js.map +2 -2
  63. package/dist/esm/decorators/intersectionObserver.js +46 -55
  64. package/dist/esm/decorators/intersectionObserver.js.map +2 -2
  65. package/dist/esm/decorators/mutationObserver.js +46 -55
  66. package/dist/esm/decorators/mutationObserver.js.map +2 -2
  67. package/dist/esm/decorators/parameter.js +54 -0
  68. package/dist/esm/decorators/parameter.js.map +7 -0
  69. package/dist/esm/decorators/requestAnimationFrame.js +105 -0
  70. package/dist/esm/decorators/requestAnimationFrame.js.map +7 -0
  71. package/dist/esm/decorators/resizeObserver.js +46 -55
  72. package/dist/esm/decorators/resizeObserver.js.map +2 -2
  73. package/dist/esm/decorators/setInterval.js +46 -15
  74. package/dist/esm/decorators/setInterval.js.map +2 -2
  75. package/dist/esm/decorators/setTimeout.js +49 -15
  76. package/dist/esm/decorators/setTimeout.js.map +2 -2
  77. package/dist/esm/elements/SwcAppMixin.js +20 -4
  78. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  79. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2813 -571
  80. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  81. package/dist/types/decorators/addEventListener.d.ts +962 -0
  82. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  83. package/dist/types/decorators/applyAttribute.d.ts +2 -0
  84. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  85. package/dist/types/decorators/applyClass.d.ts +2 -0
  86. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  87. package/dist/types/decorators/applyNode.d.ts +2 -0
  88. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  89. package/dist/types/decorators/applyProperty.d.ts +4 -0
  90. package/dist/types/decorators/applyProperty.d.ts.map +1 -1
  91. package/dist/types/decorators/applySlot.d.ts.map +1 -1
  92. package/dist/types/decorators/applyStyle.d.ts +2 -0
  93. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  94. package/dist/types/decorators/changedAttribute.d.ts +1 -3
  95. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  96. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  97. package/dist/types/decorators/eventMedia.d.ts +25 -0
  98. package/dist/types/decorators/eventMedia.d.ts.map +1 -0
  99. package/dist/types/decorators/index.d.ts +3 -0
  100. package/dist/types/decorators/index.d.ts.map +1 -1
  101. package/dist/types/decorators/intersectionObserver.d.ts +9 -0
  102. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -1
  103. package/dist/types/decorators/mutationObserver.d.ts +10 -1
  104. package/dist/types/decorators/mutationObserver.d.ts.map +1 -1
  105. package/dist/types/decorators/parameter.d.ts +35 -0
  106. package/dist/types/decorators/parameter.d.ts.map +1 -0
  107. package/dist/types/decorators/requestAnimationFrame.d.ts +47 -0
  108. package/dist/types/decorators/requestAnimationFrame.d.ts.map +1 -0
  109. package/dist/types/decorators/resizeObserver.d.ts +9 -0
  110. package/dist/types/decorators/resizeObserver.d.ts.map +1 -1
  111. package/dist/types/decorators/setInterval.d.ts +17 -5
  112. package/dist/types/decorators/setInterval.d.ts.map +1 -1
  113. package/dist/types/decorators/setTimeout.d.ts +17 -5
  114. package/dist/types/decorators/setTimeout.d.ts.map +1 -1
  115. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  116. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2813 -571
  117. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  118. package/package.json +3 -3
  119. package/src/decorators/addEventListener.ts +1060 -8
  120. package/src/decorators/applyAttribute.ts +14 -4
  121. package/src/decorators/applyClass.ts +14 -4
  122. package/src/decorators/applyNode.ts +14 -4
  123. package/src/decorators/applyProperty.ts +28 -8
  124. package/src/decorators/applySlot.ts +6 -5
  125. package/src/decorators/applyStyle.ts +14 -4
  126. package/src/decorators/changedAttribute.ts +30 -15
  127. package/src/decorators/elementDefine.ts +32 -5
  128. package/src/decorators/eventMedia.ts +78 -0
  129. package/src/decorators/index.ts +3 -0
  130. package/src/decorators/intersectionObserver.ts +77 -61
  131. package/src/decorators/mutationObserver.ts +78 -61
  132. package/src/decorators/parameter.ts +81 -0
  133. package/src/decorators/requestAnimationFrame.ts +158 -0
  134. package/src/decorators/resizeObserver.ts +76 -60
  135. package/src/decorators/setInterval.ts +71 -15
  136. package/src/decorators/setTimeout.ts +74 -15
  137. package/src/elements/SwcAppMixin.ts +20 -5
  138. package/src/types/window.d.ts +2 -18
  139. package/dist/cjs/examples/RxJSOperatorsExample.js +0 -285
  140. package/dist/cjs/examples/RxJSOperatorsExample.js.map +0 -7
  141. package/dist/esm/examples/RxJSOperatorsExample.js +0 -266
  142. package/dist/esm/examples/RxJSOperatorsExample.js.map +0 -7
  143. package/dist/types/examples/RxJSOperatorsExample.d.ts +0 -94
  144. package/dist/types/examples/RxJSOperatorsExample.d.ts.map +0 -1
  145. package/src/examples/RxJSOperatorsExample.ts +0 -279
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/elementDefine.ts"],
4
- "sourcesContent": ["import {ActionExpression, FunctionUtils, ReflectUtils} from '@dooboostore/core';\nimport {EventListenerLifeCycler} from './addEventListener';\nimport {MutationObserverLifeCycler} from './mutationObserver';\nimport {ResizeObserverLifeCycler} from './resizeObserver';\nimport {IntersectionObserverLifeCycler} from './intersectionObserver';\nimport {findAllLifecycleMetadata, findAllOnConnectedAfterMetadata, findAllOnConnectedBeforeMetadata, findAllOnConnectedMetadata, ON_AFTER_ADOPTED_METADATA_KEY, ON_AFTER_DISCONNECTED_METADATA_KEY, ON_BEFORE_ADOPTED_METADATA_KEY, ON_BEFORE_DISCONNECTED_METADATA_KEY, ON_CONNECTED_COMPLETED_METADATA_KEY, ON_INITIALIZE_METADATA_KEY} from './lifecycles';\nimport {EmitCustomEventLifeCycler} from './emitCustomEvent';\nimport {ChangedAttributeLifeCycler} from './changedAttribute';\nimport {findAllAttributeApplyMetadata, findAllAttributeMetadata} from './applyAttribute';\nimport {getQueryMetadata, getQueryAllMetadata} from './query';\nimport {SwcUtils} from '../utils/Utils';\nimport {DOM_EVENT_NAMES, HTML_TAG_ENTRIES} from '../config/config';\nimport {SituationTypeContainer, SituationTypeContainers} from '@dooboostore/simple-boot/decorators/inject/Inject';\nimport {ElementDefineLifeCycler, HelperHostSet, HostSet, InjectSituationType, IntersectionObserverSet, MutationObserverSet, OnConnectedResult, ResizeObserverSet, ResizeObserverSetEntry, SwcRootType} from '../types';\nimport {ConvertUtils, ElementApply} from '@dooboostore/core-web';\nimport {isSSR} from \"../elements/SwcAppMixin\";\nimport {findAllStateMetadata} from \"./state\";\nimport {findAllPropertyMetadata} from \"./applyProperty\";\nimport {MessageSubscribeLifeCycler} from \"./subscribeSwcAppMessageWhileConnected\";\nimport {RouteSubscribeLifeCycler} from \"./subscribeSwcAppRouteChangeWhileConnected\";\nimport {SetIntervalLifeCycler} from \"./setInterval\";\nimport {SetTimeoutLifeCycler} from \"./setTimeout\";\n\n// --- Core Interfaces & Types ---\n\nexport const ELEMENT_CONFIG_KEY = Symbol.for('simple-web-component:element-config');\n\nexport interface ElementConfig {\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: any;\n window?: Window;\n useShadow?: boolean | 'open' | 'closed';\n}\n\nexport interface ElementMetadata extends Omit<ElementConfig, 'window'> {\n name: string;\n window: Window;\n}\n\nexport const getElementConfig = (target: any): ElementMetadata | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n\nexport const ensureInit = (inst: any) => { // HTMLElement\n if (!inst.__swc_initialized) {\n inst._swcId = inst?.getAttribute?.('swc-use-ssr') ?? 's' + Math.random().toString(36).substring(2, 11).toLowerCase();\n inst._emitHandlers = new Map();\n inst.__swc_initialized = true;\n // const attributeList = findAllQ(inst);\n // attributeList.forEach(meta => {\n // delete (inst as any)[meta.propertyKey];\n // });\n\n const target = inst instanceof Function ? inst : inst.constructor;\n\n // \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n // \u2551 decorator \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2551\n // \u2551 \u2551\n // \u2551 \uC774\uC720: own property\uAC00 \uC788\uC73C\uBA74 prototype\uC758 getter/setter\uB294 \uC808\uB300 \uC548 \uD0C4\uB2E4 \u2551\n // \u2551 1. TypeScript\uB294 \uCD08\uAE30\uAC12\uC774 \uC788\uB294 \uD544\uB4DC\uB97C constructor\uC5D0\uC11C own property\uB85C \uC0DD\uC131 \u2551\n // \u2551 @attributeThis('id') myId: string = \"default\" \u2192 this.myId = \"default\" \u2551\n // \u2551 \u2551\n // \u2551 2. JavaScript\uC758 property lookup\uC740 own property\uB97C \uBA3C\uC800 \uCC3E\uC74C \u2551\n // \u2551 - this.myId \uC811\uADFC \u2551\n // \u2551 - 1\uC21C\uC704: instance\uC758 own property \uC788\uB098? \u2192 \uC788\uC73C\uBA74 \uADF8\uAC83 \uBC18\uD658 \u2551\n // \u2551 - 2\uC21C\uC704: prototype\uC758 getter \uC788\uB098? \u2192 \uC788\uC73C\uBA74 \uD638\uCD9C \u2551\n // \u2551 \u2551\n // \u2551 3. own property\uAC00 \uC788\uC73C\uBA74 prototype\uC758 getter\uB294 \uC808\uB300 \uD638\uCD9C\uB418\uC9C0 \uC54A\uC74C \u2551\n // \u2551 \uB530\uB77C\uC11C getter\uC5D0\uC11C \uC815\uC758\uB41C DOM \uB3D9\uAE30\uD654 \uB85C\uC9C1\uC774 \uC791\uB3D9\uD558\uC9C0 \uC54A\uC74C \u2551\n // \u2551 \u2551\n // \u2551 4. own property\uB97C \uC0AD\uC81C\uD558\uBA74 JavaScript\uAC00 prototype\uC758 getter\uB97C \uCC3E\uAC8C \uB428 \u2551\n // \u2551 \u2192 getter \uD638\uCD9C\uB428 \u2192 DOM \uC18D\uC131 \uAC12 \uB3D9\uAE30\uD654\uB428 \u2551\n // \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\n // \uD568\uC218\uB294 decorator\uC5D0\uC11C \uAC12\uC790\uCCB4\uB97C descriptor.value = function (...args: any[]) {...\n\n // @attribute \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter/setter \uC791\uB3D9\n // const attributeList = findAllAttributeMetadata(target);\n const attributeAllList = findAllAttributeMetadata(target).filter(it => it.type === 'property');\n if (attributeAllList) {\n attributeAllList.forEach(meta => {\n // const initUserData = (inst as any)[meta.propertyKey];\n delete (inst as any)[meta.propertyKey];\n // (inst as any)[meta.propertyKey] = initUserData;\n });\n }\n\n // @query \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter \uC791\uB3D9\n const queryList = getQueryMetadata(target);\n if (queryList) {\n queryList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n\n // @queryAll \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter \uC791\uB3D9\n const queryAllList = getQueryAllMetadata(target);\n if (queryAllList) {\n queryAllList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n // const slotAllList = findAllApplySlotMetadata(target);\n // if (slotAllList) {\n // slotAllList.filter(it => it.type === 'property').forEach(meta => {\n // delete (inst as any)[meta.propertyKey];\n // });\n // }\n\n\n const propertyAllList = findAllPropertyMetadata(target).filter(it => it.type === 'property');\n if (propertyAllList) {\n propertyAllList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n\n const stateAllList = findAllStateMetadata(target);\n if (stateAllList) {\n stateAllList.forEach(meta => {\n const initUserData = (inst as any)[meta.propertyKey];\n delete (inst as any)[meta.propertyKey];\n (inst as any)[meta.propertyKey] = initUserData;\n });\n }\n\n // Call constructor script if present\n const hostSet = SwcUtils.getHostSet(inst);\n const appHosts = SwcUtils.findAllAppHostsIncludingSelfDirect(inst);\n inst._executeSwcScript?.('swc-on-constructor', hostSet);\n\n // Call @onInitialize lifecycle methods\n const cMethods = findAllLifecycleMetadata(inst, ON_INITIALIZE_METADATA_KEY);\n for (const m of cMethods) inst._invokeLifecycleMethod(m.propertyKey, hostSet);\n }\n};\n\n\n// \uD6D4 \uC774\uAC8C\uB9DE\uB098?? global\uB85C \uAD00\uB9AC\uD558\uB294\uAC8C..\uD6D4... \uC65C\uC774\uB807\uAC8C \uD588\uC744\uAE4C..\n// --- Global Event Handling ---\nconst globalDelegatedRoots = new WeakSet<Node>();\n// \uC5EC\uAE30\uC5D0\uC11C \uC911\uBCF5 \uD638\uCD9C\uC548\uB418\uAC8C \uC798\uB9C9\uC544\uC900\uB2E4 ..\nconst handleGlobalSwcEvent = async (event: Event) => {\n if ((event as any).__swc_handled) return;\n const path = event.composedPath();\n const type = event.type;\n const attrName = `swc-on-${type}`;\n\n for (const node of path) {\n if (!(node instanceof HTMLElement)) continue;\n const script = node.getAttribute?.(attrName);\n if (script && !getElementConfig(node)) {\n const host: any = SwcUtils.findNearestSwcHostIncludingSelf(node);\n if (host && host.isConnected && typeof host.__swc_executeAttributeEvent === 'function') {\n await host.__swc_executeAttributeEvent(node, attrName, script, event);\n (event as any).__swc_handled = true;\n break;\n }\n }\n }\n};\n\nfunction buildEnv(configWindow: Window) {\n const win: Window = configWindow;\n const doc: Document = win?.document;\n const builtInTagMap = new Map<any, string>();\n for (const [cls, tag] of HTML_TAG_ENTRIES) {\n if ((win as any)?.[cls]) builtInTagMap.set((win as any)[cls], tag);\n }\n const domHelpers = SwcUtils.getHelperSet(win);\n\n return {win, doc, builtInTagMap, domHelpers};\n}\n\nconst getHandlers = (inst: any) => {\n if (!inst.__swc_attributeEventHandlers) inst.__swc_attributeEventHandlers = new Map();\n return inst.__swc_attributeEventHandlers;\n};\n\nconst setupPrototype = (proto: any, win: Window) => {\n if (proto.__swc_proto_setup) return;\n proto.__swc_proto_setup = true;\n\n\n // proto.createSlotString = function (id: string) {\n // return NodeSlot.slot(`${this._swcId}-${id}`);\n // }\n // proto.createEaHtml = function (id: string, script: string) {\n // return ElementApply.html(id, script);\n // }\n // proto.createEaText = function (id: string, script: string) {\n // return ElementApply.text(id, script);\n // }\n // proto.createEaAttribute = function (id: string, name: string, script: string) {\n // return ElementApply.attribute(id, name, script);\n // }\n // proto.createEaEvent = function (id: string, name: string, script: string) {\n // return ElementApply.event(id, name, script);\n // }\n // proto.createEaProperty = function (id: string, name: string, script: string) {\n // return ElementApply.property(id, name, script);\n // }\n\n // swc-id-asdasdasdasd-click=\" :value=\"\" {: value fsdfsdafsad :} {html: aaa :} {text: asdas :}\n\n proto._executeSwcScript = function (attrName: string, hostSet: HostSet, extraArgs: Record<string, any> = {}) {\n ensureInit(this);\n const script = this.getAttribute(attrName);\n if (script) {\n try {\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const helpers = SwcUtils.getHelperSet(currentWin);\n const args = {...hostSet, ...helpers, ...extraArgs, $el: this, $root: this.getRootNode()};\n FunctionUtils.execute({script, context: this, args});\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attrName}:`, e);\n }\n }\n };\n\n proto._resolveWindow = function (localConfig?: ElementConfig): Window {\n ensureInit(this);\n if (localConfig?.window) return localConfig.window;\n const ancestors = SwcUtils.findAllSwcHostsIncludingSelf(this as any);\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const aConf = getElementConfig(ancestors[i]);\n if (aConf?.window) return aConf.window;\n }\n return getElementConfig(this).window ?? ((typeof window !== 'undefined' ? window : undefined) as Window);\n };\n\n proto._invokeLifecycleMethod = function (methodName: string | symbol, hostSet?: HostSet, extraArgs: any[] = []) {\n ensureInit(this);\n if (typeof (this as any)[methodName] !== 'function') return;\n const useHostSet = hostSet ?? SwcUtils.getHelperAndHostSet(win, this);\n const app = useHostSet?.$appHost?.simpleApplication;\n // console.log('---->hh',app, this, methodName);\n if (app) {\n const otherStorage = new Map<any, any>();\n const situations = new SituationTypeContainers([new SituationTypeContainer({situationType: InjectSituationType.HOST_SET, data: useHostSet}), new SituationTypeContainer({situationType: InjectSituationType.APP_HOST, data: useHostSet.$appHost}), new SituationTypeContainer({situationType: InjectSituationType.APP_HOSTS, data: useHostSet.$appHosts}), new SituationTypeContainer({\n situationType: InjectSituationType.HOST,\n data: useHostSet.$host\n }), new SituationTypeContainer({situationType: InjectSituationType.HOSTS, data: useHostSet.$hosts}), new SituationTypeContainer({situationType: InjectSituationType.FIRST_HOST, data: useHostSet.$firstHost}), new SituationTypeContainer({situationType: InjectSituationType.LAST_HOST, data: useHostSet.$lastHost}), new SituationTypeContainer({\n situationType: InjectSituationType.FIRST_APP_HOST,\n data: useHostSet.$firstAppHost\n }), new SituationTypeContainer({situationType: InjectSituationType.LAST_APP_HOST, data: useHostSet.$lastAppHost})]);\n otherStorage.set(SituationTypeContainers, situations);\n\n return app.simstanceManager.executeBindParameterSim(\n {\n target: this,\n targetKey: methodName,\n inputParameters: extraArgs\n },\n otherStorage\n );\n } else {\n return (this as any)[methodName](...extraArgs);\n }\n };\n\n proto._bindAttributeEvent = function (el: HTMLElement, attrName: string, script: string, eventName?: string) {\n ensureInit(this);\n if (!eventName) {\n if (!attrName.startsWith('swc-on-')) return;\n eventName = attrName.substring(7);\n }\n const elHandlers = getHandlers(this);\n let handlers = elHandlers.get(el);\n if (!handlers) {\n handlers = new Map();\n elHandlers.set(el, handlers);\n }\n\n const oldHandler = handlers.get(attrName);\n if (oldHandler) el.removeEventListener(eventName, oldHandler);\n\n const handler = async (event: any) => {\n const hostSet = SwcUtils.getHostSet(el);\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const helpers = SwcUtils.getHelperSet(currentWin);\n const args = {\n event,\n $data: (event as CustomEvent).detail,\n ...hostSet,\n ...helpers,\n $el: el,\n $root: this.getRootNode()\n };\n await FunctionUtils.execute({script, context: el, args});\n };\n\n el.addEventListener(eventName, handler);\n handlers.set(attrName, handler);\n };\n\n proto.__swc_executeAttributeEvent = async function (el: HTMLElement, attrName: string, script: string, event: Event) {\n ensureInit(this);\n\n const hostSet = SwcUtils.getHostSet(el);\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const currentHelpers = SwcUtils.getHelperSet(currentWin);\n const detail = (event as CustomEvent).detail;\n const args = {\n event,\n $event: event,\n $data: detail,\n $detail: detail,\n ...hostSet,\n ...currentHelpers,\n $el: el,\n $root: this.getRootNode()\n };\n await FunctionUtils.execute({script, context: el, args});\n };\n};\n\nexport const elementDefine =\n (name: string, config: Partial<ElementConfig> = {}): ClassDecorator =>\n (constructor: any) => {\n const { win, doc, builtInTagMap: BUILT_IN_TAG_MAP, domHelpers: SWC_DOM_HELPERS } = buildEnv(config.window);\n const metadata: ElementMetadata = { ...config, name, window: win };\n\n if (!metadata.window) {\n throw new Error('window is required');\n }\n\n let extendsTagName = metadata.extends;\n if (!extendsTagName) {\n let proto = constructor;\n const BaseHTMLElement = (win as any).HTMLElement;\n while (proto && proto !== BaseHTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n metadata.extends = extendsTagName;\n }\n\n const attributeList = findAllAttributeMetadata(constructor);\n const applyAttributeMap = findAllAttributeApplyMetadata(constructor);\n\n 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'];\n const swcOnEvents = DOM_EVENT_NAMES.map(e => `swc-on-${e}`);\n\n const attributeApplyNames = Array.from(applyAttributeMap.values())\n .map(it => it.targetAttributeName)\n .filter(Boolean) as string[];\n const hostAttributes = attributeList.filter(it => it.selector === '$this').map(it => it.propertyKey || String(it.propertyKey));\n // Get original static observedAttributes before they're overwritten by Object.defineProperty\n const originalStaticObservedAttributes = (constructor.observedAttributes ?? []) as string[];\n\n const proto = constructor.prototype;\n setupPrototype(proto, win);\n\n // \uAC12\uC744 \uAE30\uB300\uD558\uC9C0\uC54A\uB294\uB2E4.\n let helperHostSet: HelperHostSet | null = null;\n // \u2500\u2500 cyclers: \uB370\uCF54\uB808\uC774\uD130\uBCC4 \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uC704\uC784 \uD074\uB798\uC2A4 (elementDefine \uC2DC 1\uD68C \uC0DD\uC131, \uACC4\uC18D \uC7AC\uC0AC\uC6A9) \u2500\u2500\n const eventCycler = new EventListenerLifeCycler();\n const cyclers: ElementDefineLifeCycler[] = [\n eventCycler,\n new ChangedAttributeLifeCycler(),\n new EmitCustomEventLifeCycler(),\n new ResizeObserverLifeCycler(),\n new IntersectionObserverLifeCycler(),\n new MutationObserverLifeCycler(),\n new MessageSubscribeLifeCycler(),\n new RouteSubscribeLifeCycler(),\n new SetIntervalLifeCycler(),\n new SetTimeoutLifeCycler(),\n ];\n\n // observedAttributes \uAE30\uC5EC cycler (define-time, constructor \uAE30\uBC18)\n const cyclerObservedAttributes = cyclers.flatMap(c => c.getObservedAttributeNames?.(constructor) ?? []);\n const mergedObservedAttributes = [...new Set([...(metadata.observedAttributes ?? []), ...originalStaticObservedAttributes, ...cyclerObservedAttributes, ...attributeApplyNames, ...hostAttributes, ...swcLifecycleAttributes, ...swcOnEvents])];\n\n // \uB80C\uB354 \uD6C4 \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \uD638\uCD9C \u2192 Set \uC218\uC9D1 \uD6C4 observer \uC0DD\uC131\n const buildObservers = async (helperHostSet: HelperHostSet): Promise<void> => {\n const inst = helperHostSet.$this;\n const observers: Array<MutationObserver | ResizeObserver | IntersectionObserver> = [];\n let resizeObserverSet: ResizeObserverSet = [];\n let mutationObserverSet: MutationObserverSet = [];\n let intersectionObserverSet: IntersectionObserverSet = [];\n\n // delegate \uCD94\uC801 root \uD574\uC11D: shadow/light/auto/all \u2192 \uC2E4\uC81C root \uBAA9\uB85D\n const resolveDelegateRoots = (delegateRoot: SwcRootType | undefined): (HTMLElement | ShadowRoot)[] => {\n const r = delegateRoot || 'auto';\n const roots: (HTMLElement | ShadowRoot)[] = [];\n if (r === 'auto') roots.push(inst.shadowRoot || inst);\n else if (r === 'light') roots.push(inst);\n else if (r === 'shadow' && inst.shadowRoot) roots.push(inst.shadowRoot);\n else if (r === 'all') { roots.push(inst); if (inst.shadowRoot) roots.push(inst.shadowRoot); }\n return roots;\n };\n\n // 1. \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \u2192 observer Set \uC218\uC9D1 (\uC5EC\uB7EC \uC2DC\uD074\uB7EC\uAC00 \uBC18\uD658\uD55C Set \uC744 \uC804\uBD80 \uB204\uC801)\n for (const c of cyclers) {\n const result = (await c.onConnected?.(helperHostSet, resizeObserverSet)) as OnConnectedResult | void;\n if (!result) continue;\n if (result.resizeObserverSet?.length) resizeObserverSet = [...resizeObserverSet, ...result.resizeObserverSet];\n if (result.mutationObserverSet?.length) mutationObserverSet = [...mutationObserverSet, ...result.mutationObserverSet];\n if (result.intersectionObserverSet?.length) intersectionObserverSet = [...intersectionObserverSet, ...result.intersectionObserverSet];\n }\n\n // 2. \uD0C0\uC785\uBCC4\uB85C observer \uC0DD\uC131\n // ResizeObserver \uBA3C\uC800: mutation callback \uC774 observe/unobserve \uB97C \uC8FC\uC785\uBC1B\uC544\uC57C \uD568\n // observeTargets \uC911 delegate \uD56D\uBAA9\uC740 \uC140\uB809\uD130 \uBB38\uC790\uC5F4\uC774\uB77C \uCD08\uAE30 observe \uD558\uC9C0 \uC54A\uB294\uB2E4 (\uB3D9\uC801 \uCD94\uC801 \uC804\uC6A9).\n // \uB3D9\uC801 observe/unobserve \uB294 \uC911\uBCF5 \uD638\uCD9C\uC744 \uB9C9\uAE30 \uC704\uD574 observe \uB300\uC0C1 WeakSet \uC73C\uB85C \uCD94\uC801\uD55C\uB2E4.\n const resizeDelegates = (resizeObserverSet ?? []).filter(t => t.delegate && typeof t.target === 'string') as Array<ResizeObserverSetEntry & { target: string }>;\n let resizeObserve: ((el: Element, opts?: ResizeObserverOptions) => void) | undefined;\n let resizeUnobserve: ((el: Element) => void) | undefined;\n const resizeObserved = new WeakSet<Element>();\n if (resizeObserverSet?.length) {\n const roCallbacks = [...new Set(resizeObserverSet.map(e => e.callback))];\n const ro = new (win as any).ResizeObserver((entries, obs) => {\n for (const cb of roCallbacks) cb(entries, obs);\n });\n for (const e of resizeObserverSet) {\n if (e.delegate) continue;\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => {\n if (!resizeObserved.has(el)) { ro.observe(el, e.options); resizeObserved.add(el); }\n });\n }\n continue;\n }\n ro.observe(e.target as Element, e.options);\n if (e.target instanceof Element) resizeObserved.add(e.target);\n }\n resizeObserve = (el, opts) => {\n if (resizeObserved.has(el)) return;\n ro.observe(el, opts);\n resizeObserved.add(el);\n };\n resizeUnobserve = (el) => {\n if (!resizeObserved.has(el)) return;\n ro.unobserve(el);\n resizeObserved.delete(el);\n };\n observers.push(ro);\n }\n\n // IntersectionObserver: \uC635\uC158 \uADF8\uB8F9\uBCC4\uB85C 1\uAC1C\uC529 \uC0DD\uC131.\n // delegate \uD56D\uBAA9\uC740 \uB3D9\uC801 \uCD94\uC801\uC6A9 \uC140\uB809\uD130\uC774\uBBC0\uB85C observe/unobserve \uD568\uC218\uB97C MutationObserver \uCF5C\uBC31\uC5D0 \uB118\uAE34\uB2E4.\n // \uB3D9\uC801 observe/unobserve \uC911\uBCF5 \uBC29\uC9C0\uB97C \uC704\uD574 \uADF8\uB8F9\uBCC4 WeakSet \uC73C\uB85C \uCD94\uC801\uD55C\uB2E4.\n const intersectionDelegates: Array<{ target: string; delegateRoot?: SwcRootType; observe: (el: Element) => void; unobserve: (el: Element) => void }> = [];\n for (const group of intersectionObserverSet) {\n const ioCallbacks = [...new Set(group.observeTargets.map(e => e.callback))];\n const io = new (win as any).IntersectionObserver((entries, obs) => {\n for (const cb of ioCallbacks) cb(entries, obs);\n }, group.options);\n const ioObserved = new WeakSet<Element>();\n for (const e of group.observeTargets) {\n if (e.delegate) {\n const target = e.target as string;\n const observe = (el: Element) => {\n if (ioObserved.has(el)) return;\n io.observe(el);\n ioObserved.add(el);\n };\n const unobserve = (el: Element) => {\n if (!ioObserved.has(el)) return;\n io.unobserve(el);\n ioObserved.delete(el);\n };\n intersectionDelegates.push({ target, delegateRoot: e.delegateRoot, observe, unobserve });\n continue;\n }\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => {\n if (!ioObserved.has(el)) { io.observe(el); ioObserved.add(el); }\n });\n }\n continue;\n }\n io.observe(e.target as Element);\n if (e.target instanceof Element) ioObserved.add(e.target);\n }\n observers.push(io);\n }\n\n // resize/intersection delegate \uB3D9\uC801 \uCD94\uC801 \u2014 MutationObserver \uCF5C\uBC31\uC5D0\uC11C \uCD94\uAC00/\uC81C\uAC70\uB41C \uC694\uC18C\uB97C observe/unobserve \uD55C\uB2E4.\n const handleResizeDelegate = (n: Node, observe: boolean) => {\n if (!resizeObserve || !resizeUnobserve || n.nodeType !== 1) return;\n const el = n as HTMLElement;\n for (const d of resizeDelegates) {\n const isThis = d.target === '$this' || d.target === '';\n const matchesSel = (node: any) => {\n if (!node || node.nodeType !== 1) return false;\n if (isThis) return true;\n return (node as HTMLElement).matches?.(d.target) || !!(node as HTMLElement).closest?.(d.target);\n };\n if (matchesSel(el)) {\n observe ? resizeObserve(el, d.options)\n : resizeUnobserve(el);\n } else if (!isThis) {\n el.querySelectorAll(d.target).forEach(sub => {\n observe ? resizeObserve(sub as HTMLElement, d.options)\n : resizeUnobserve(sub as HTMLElement);\n });\n }\n }\n };\n const handleIntersectionDelegate = (n: Node, observe: boolean) => {\n if (n.nodeType !== 1) return;\n const el = n as HTMLElement;\n for (const d of intersectionDelegates) {\n const isThis = d.target === '$this' || d.target === '';\n const matchesSel = (node: any) => {\n if (!node || node.nodeType !== 1) return false;\n if (isThis) return true;\n return (node as HTMLElement).matches?.(d.target) || !!(node as HTMLElement).closest?.(d.target);\n };\n if (matchesSel(el)) {\n observe ? d.observe(el) : d.unobserve(el);\n } else if (!isThis) {\n el.querySelectorAll(d.target).forEach(sub => {\n observe ? d.observe(sub as HTMLElement) : d.unobserve(sub as HTMLElement);\n });\n }\n }\n };\n\n if (mutationObserverSet?.length || resizeDelegates.length > 0 || intersectionDelegates.length > 0) {\n // \uD558\uB098\uC758 MutationObserver \uB85C resize/intersection delegate \uB3D9\uC801 \uCD94\uC801 + mutation \uCF5C\uBC31\uC744 \uD568\uAED8 \uCC98\uB9AC\n const callbacks = [...new Set((mutationObserverSet ?? []).map(e => e.callback))];\n const mo = new (win as any).MutationObserver((mutations, obs) => {\n for (const mut of mutations) {\n Array.from(mut.addedNodes || []).forEach(n => { handleResizeDelegate(n as Node, true); handleIntersectionDelegate(n as Node, true); });\n Array.from(mut.removedNodes || []).forEach(n => { handleResizeDelegate(n as Node, false); handleIntersectionDelegate(n as Node, false); });\n }\n for (const cb of callbacks) cb(mutations, obs);\n });\n\n // observe \uB300\uC0C1 \uC804\uCCB4(\uC5D4\uD2B8\uB9AC + delegate \uCD94\uC801 root)\uB97C \uD558\uB098\uB85C \uBAA8\uC544 \uC911\uBCF5 observe \uB97C \uC81C\uAC70\uD55C\uB2E4.\n // \uAC19\uC740 target \uC774 \uC5EC\uB7EC \uC18C\uC2A4\uC5D0\uC11C \uC9C0\uC815\uB418\uBA74 MutationObserverInit \uC744 \uD569\uC9D1\uD569(\uCD5C\uB300 \uAC10\uC9C0\uBC94\uC704)\uC73C\uB85C \uBCD1\uD569\uD55C\uB2E4.\n const moObserveTargets = new Map<Element | ShadowRoot, MutationObserverInit>();\n const mergeMutationInit = (existing: MutationObserverInit | undefined, next: MutationObserverInit): MutationObserverInit => {\n if (!existing) return next;\n const mergedFilter = existing.attributeFilter || next.attributeFilter\n ? [...new Set([...(existing.attributeFilter ?? []), ...(next.attributeFilter ?? [])])]\n : undefined;\n return {\n childList: existing.childList || next.childList,\n attributes: existing.attributes || next.attributes,\n characterData: existing.characterData || next.characterData,\n subtree: existing.subtree || next.subtree,\n attributeOldValue: existing.attributeOldValue || next.attributeOldValue,\n characterDataOldValue: existing.characterDataOldValue || next.characterDataOldValue,\n attributeFilter: mergedFilter,\n };\n };\n const addObserveTarget = (target: Element | ShadowRoot, options: MutationObserverInit) => {\n moObserveTargets.set(target, mergeMutationInit(moObserveTargets.get(target), options));\n };\n\n // 1) mutationObserverSet \uC5D4\uD2B8\uB9AC\n for (const e of mutationObserverSet ?? []) {\n if (e.delegate) continue;\n const init = e.options ?? { childList: true };\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => addObserveTarget(el, init));\n }\n continue;\n }\n addObserveTarget(e.target, init);\n }\n\n // 2) delegate \uCD94\uC801 root: shadow/light/all/auto \uB85C \uD574\uC11D\uD574 \uC804\uBD80 observe\n for (const d of resizeDelegates) {\n for (const r of resolveDelegateRoots(d.delegateRoot)) addObserveTarget(r, { childList: true, subtree: true });\n }\n for (const d of intersectionDelegates) {\n for (const r of resolveDelegateRoots(d.delegateRoot)) addObserveTarget(r, { childList: true, subtree: true });\n }\n\n for (const [target, options] of moObserveTargets) {\n mo.observe(target, options);\n }\n observers.push(mo);\n }\n\n inst.__swc_observers = observers;\n };\n\n const originalConnected = proto.connectedCallback;\n proto.connectedCallback = async function () {\n ensureInit(this);\n // \uC7AC\uC5F0\uACB0 \uC2DC \uB204\uC801 \uBC29\uC9C0 \u2014 cycler \uB0B4\uBD80 \uB9AC\uC18C\uC2A4 \uCD08\uAE30\uD654\n helperHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n const appHost = helperHostSet.$appHost;\n const useSsr = isSSR(this);\n try {\n if (appHost && typeof (appHost as any)._connected === 'function') {\n await (appHost as any)._connected(this);\n } else if (appHost && typeof (appHost as any)) {\n (appHost as any)._connected_safari_and_standby ??= [];\n (appHost as any)._connected_safari_and_standby.push(this);\n }\n\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n\n // before-connected \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uBA54\uC11C\uB4DC (@onConnectedBefore)\n for (const m of findAllOnConnectedBeforeMetadata(this)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-before-connected', helperHostSet);\n\n // \u2500\u2500 \uB80C\uB354 (@onConnected / @onConnectedBody*) \u2014 elementDefine \uCC45\uC784 \u2500\u2500\n const targetConnectedList = useSsr ? [] : findAllOnConnectedMetadata(constructor);\n const shadowMode = conf?.useShadow || targetConnectedList.find(it => it.options.useShadow)?.options.useShadow;\n if (shadowMode && !this.shadowRoot) {\n const mode = shadowMode === true ? 'open' : shadowMode;\n this.attachShadow({ mode: mode as ShadowRootMode });\n }\n\n const stateContext: any = { ...helperHostSet };\n findAllStateMetadata(this).forEach(it => {\n stateContext[it.name] = this[it.propertyKey];\n });\n\n const shadowChildren: Node[] = [];\n const lightChildren: Node[] = [];\n\n if (targetConnectedList.length > 0) {\n for (const meta of targetConnectedList) {\n let res = await (this as any)._invokeLifecycleMethod(meta.propertyKey, helperHostSet);\n if (typeof res === 'string') {\n const htmlTemplateElement = doc.createElement('template');\n htmlTemplateElement.innerHTML = res;\n res = htmlTemplateElement.content;\n }\n if (res) {\n const nodes = Array.isArray(res) ? res : [res];\n if (meta.options.useShadow || conf?.useShadow) {\n shadowChildren.push(...nodes);\n } else {\n lightChildren.push(...nodes);\n }\n }\n }\n try {\n if (this.shadowRoot) {\n const applyShadowChildren = SwcUtils.projectProcessHtml(this._swcId, shadowChildren, doc);\n this.shadowRoot.replaceChildren(...applyShadowChildren);\n }\n if (lightChildren.length) {\n const applyLightChildren = SwcUtils.projectProcessHtml(this._swcId, lightChildren, doc);\n this.replaceChildren(...applyLightChildren);\n }\n } catch (e) {\n console.error('[ElementDefine] innerHTML setting error:', e);\n }\n new ElementApply(this, { id: this._swcId }).apply({ context: stateContext, bind: this });\n } else {\n new ElementApply(this, { id: this._swcId }).apply({ exclude: { html: true, text: true, attribute: true }, context: stateContext, bind: this });\n }\n\n // global delegate event\n const root = this.getRootNode();\n if (!globalDelegatedRoots.has(root)) {\n DOM_EVENT_NAMES.forEach(type => {\n root.addEventListener(type, handleGlobalSwcEvent);\n });\n globalDelegatedRoots.add(root);\n }\n\n // \u2500\u2500 cycler \uC2E4\uD589 (\uB80C\uB354 \uD6C4): \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \u2192 observer Set \uC218\uC9D1 \u2192 observer \uC0DD\uC131 \u2500\u2500\n // helperHostSet \uC740 \uD074\uB85C\uC800 \uBCC0\uC218\uB77C async \uD750\uB984\uC5D0\uC11C \uB2E4\uB978 \uC778\uC2A4\uD134\uC2A4\uB85C \uB36E\uC5B4\uC368\uC9C8 \uC218 \uC788\uB2E4.\n // \uBC18\uB4DC\uC2DC \uD604\uC7AC \uC778\uC2A4\uD134\uC2A4(this)\uB85C \uC7AC\uACC4\uC0B0\uD55C \uAC12\uC744 \uC0AC\uC6A9\uD55C\uB2E4.\n await buildObservers(SwcUtils.getHelperAndHostSet(win, this as any));\n\n if (originalConnected) await originalConnected.apply(this);\n\n // after-connected \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uBA54\uC11C\uB4DC (@onConnectedAfter)\n for (const m of findAllOnConnectedAfterMetadata(this)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-connected', helperHostSet);\n (this as any)._executeSwcScript('swc-on-after-connected', helperHostSet);\n (this as any).__swc_connected = true;\n } finally {\n for (const m of findAllLifecycleMetadata(this, ON_CONNECTED_COMPLETED_METADATA_KEY)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n if (appHost && typeof (appHost as any)._connectedDone === 'function') {\n await (appHost as any)._connectedDone(this);\n }\n }\n };\n\n /////////////////////////////////////////////////\n // disconnectedCallback\n ////////////////////////////////////////////////\n const originalDisconnected = proto.disconnectedCallback;\n proto.disconnectedCallback = function () {\n const appHost = helperHostSet?.$appHost;\n if (appHost && typeof (appHost as any)._disconnected === 'function') {\n (appHost as any)._disconnected(this);\n }\n\n (this as any)._executeSwcScript('swc-on-before-disconnected', helperHostSet);\n for (const m of findAllLifecycleMetadata(this, ON_BEFORE_DISCONNECTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n for (const c of cyclers) c.onDisconnected?.(helperHostSet!);\n\n for (const o of (this as any).__swc_observers ?? []) {\n try { (o as any)?.disconnect?.(); } catch (e) { console.error('[SWC] observer disconnect error:', e); }\n }\n (this as any).__swc_observers = [];\n\n // elementApply event listener \uC815\uB9AC\n new ElementApply(this, { id: this._swcId }).removeAllEventListener();\n\n if (originalDisconnected) originalDisconnected.apply(this);\n\n for (const m of findAllLifecycleMetadata(this, ON_AFTER_DISCONNECTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-disconnected', helperHostSet);\n (this as any)._executeSwcScript('swc-on-after-disconnected', helperHostSet);\n (this as any).__swc_connected = false;\n };\n\n const originalAdopted = proto.adoptedCallback;\n proto.adoptedCallback = function () {\n const hostSet = SwcUtils.getHostSet(this as any);\n (this as any)._executeSwcScript('swc-on-before-adopted', hostSet);\n for (const m of findAllLifecycleMetadata(this, ON_BEFORE_ADOPTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, hostSet);\n for (const c of cyclers) c.onAdopted?.(helperHostSet!);\n\n if (originalAdopted) originalAdopted.apply(this);\n\n for (const m of findAllLifecycleMetadata(this, ON_AFTER_ADOPTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, hostSet);\n (this as any)._executeSwcScript('swc-on-adopted', hostSet);\n (this as any)._executeSwcScript('swc-on-after-adopted', hostSet);\n };\n\n const originalAttributeChanged = proto.attributeChangedCallback;\n proto.attributeChangedCallback = function (name: string, old: string | null, newVal: string | null) {\n if (originalAttributeChanged) originalAttributeChanged.apply(this, [name, old, newVal]);\n\n // attributeChangedCallback \uC740 connected \uC774\uC804\uC5D0\uB3C4 \uD638\uCD9C\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C\n // \uD074\uB85C\uC800\uC758 helperHostSet(null \uAC00\uB2A5) \uB300\uC2E0 \uC774 \uC2DC\uC810\uC5D0 \uC0C8\uB85C \uACC4\uC0B0\uD55C\uB2E4.\n const helperAndHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n\n // Process expression directive before passing to handlers\n let processedVal: any = newVal;\n if (newVal !== null) {\n const ae = new ActionExpression(newVal);\n const expr = ae.getFirstExpression('callReturn');\n if (expr) {\n const win = (this as any)._resolveWindow?.() || ((typeof window !== 'undefined' ? window : undefined) as any);\n const exprHelperAndHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n const script = ConvertUtils.decodeHtmlEntity(expr.script, win.document);\n try {\n const result = FunctionUtils.executeReturn({\n script: script,\n context: this,\n args: exprHelperAndHostSet\n });\n processedVal = result;\n } catch (e) {\n console.error(`[SWC] Failed to execute directive {{= ${expr.script} }} on attribute ${name}: ${exprHelperAndHostSet}`, e);\n processedVal = newVal;\n }\n }\n }\n\n if (name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(name)) {\n if (newVal !== null) {\n const eventName = name.substring(7);\n (this as any)._bindAttributeEvent(this as any, name, newVal, eventName);\n }\n }\n\n // cycler \uC704\uC784: attribute \uC635\uC800\uBE59(@emitCustomEvent(attributeName) / @changedAttribute \uB4F1)\n for (const c of cyclers) c.onAttributeChanged?.(helperAndHostSet, name, old, processedVal);\n };\n\n Object.defineProperty(constructor, 'observedAttributes', {\n get: () => mergedObservedAttributes,\n configurable: true\n });\n\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, metadata, constructor);\n const registry = metadata.customElementRegistry || (win as any)?.customElements;\n if (registry && !registry.get(metadata.name)) {\n registry.define(metadata.name, constructor as any, metadata.extends ? { extends: metadata.extends } : undefined);\n }\n return constructor;\n };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4D;AAC5D,8BAAsC;AACtC,8BAAyC;AACzC,4BAAuC;AACvC,kCAA6C;AAC7C,wBAA+U;AAC/U,6BAAwC;AACxC,8BAAyC;AACzC,4BAAsE;AACtE,mBAAoD;AACpD,m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CAAC,uBAAuB,SAASA,KAAI,GAAG;AACxE,UAAI,WAAW,MAAM;AACnB,cAAM,YAAYA,MAAK,UAAU,CAAC;AAClC,QAAC,KAAa,oBAAoB,MAAaA,OAAM,QAAQ,SAAS;AAAA,MACxE;AAAA,IACF;AAGA,eAAW,KAAK,QAAS,GAAE,qBAAqB,kBAAkBA,OAAM,KAAK,YAAY;AAAA,EAC3F;AAEA,SAAO,eAAe,aAAa,sBAAsB;AAAA,IACvD,KAAK,MAAM;AAAA,IACX,cAAc;AAAA,EAChB,CAAC;AAED,2BAAa,eAAe,oBAAoB,UAAU,WAAW;AACrE,QAAM,WAAW,SAAS,yBAA0B,KAAa;AACjE,MAAI,YAAY,CAAC,SAAS,IAAI,SAAS,IAAI,GAAG;AAC5C,aAAS,OAAO,SAAS,MAAM,aAAoB,SAAS,UAAU,EAAE,SAAS,SAAS,QAAQ,IAAI,MAAS;AAAA,EACjH;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import {ActionExpression, FunctionUtils, ReflectUtils} from '@dooboostore/core';\nimport {EventListenerLifeCycler} from './addEventListener';\nimport {MutationObserverLifeCycler} from './mutationObserver';\nimport {ResizeObserverLifeCycler} from './resizeObserver';\nimport {IntersectionObserverLifeCycler} from './intersectionObserver';\nimport {findAllLifecycleMetadata, findAllOnConnectedAfterMetadata, findAllOnConnectedBeforeMetadata, findAllOnConnectedMetadata, ON_AFTER_ADOPTED_METADATA_KEY, ON_AFTER_DISCONNECTED_METADATA_KEY, ON_BEFORE_ADOPTED_METADATA_KEY, ON_BEFORE_DISCONNECTED_METADATA_KEY, ON_CONNECTED_COMPLETED_METADATA_KEY, ON_INITIALIZE_METADATA_KEY} from './lifecycles';\nimport {EmitCustomEventLifeCycler} from './emitCustomEvent';\nimport {ChangedAttributeLifeCycler} from './changedAttribute';\nimport {findAllAttributeApplyMetadata, findAllAttributeMetadata} from './applyAttribute';\nimport {getQueryMetadata, getQueryAllMetadata} from './query';\nimport {SwcUtils} from '../utils/Utils';\nimport {DOM_EVENT_NAMES, HTML_TAG_ENTRIES} from '../config/config';\nimport {SituationTypeContainer, SituationTypeContainers} from '@dooboostore/simple-boot/decorators/inject/Inject';\nimport {FirstCheckMaker} from '@dooboostore/simple-boot';\nimport {buildSwcParameterArgs, getParameterMetadata} from './parameter';\nimport {ElementDefineLifeCycler, HelperHostSet, HostSet, InjectSituationType, IntersectionObserverSet, MutationObserverSet, OnConnectedResult, ResizeObserverSet, ResizeObserverSetEntry, SwcRootType} from '../types';\nimport {ConvertUtils, ElementApply} from '@dooboostore/core-web';\nimport {isSSR} from \"../elements/SwcAppMixin\";\nimport {findAllStateMetadata} from \"./state\";\nimport {findAllPropertyMetadata} from \"./applyProperty\";\nimport {MessageSubscribeLifeCycler} from \"./subscribeSwcAppMessageWhileConnected\";\nimport {RouteSubscribeLifeCycler} from \"./subscribeSwcAppRouteChangeWhileConnected\";\nimport {SetIntervalLifeCycler} from \"./setInterval\";\nimport {SetTimeoutLifeCycler} from \"./setTimeout\";\nimport {RequestAnimationFrameLifeCycler} from \"./requestAnimationFrame\";\nimport {EventMediaLifeCycler} from \"./eventMedia\";\n\n// --- Core Interfaces & Types ---\n\nexport const ELEMENT_CONFIG_KEY = Symbol.for('simple-web-component:element-config');\n\nexport interface ElementConfig {\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: any;\n window?: Window;\n useShadow?: boolean | 'open' | 'closed';\n}\n\nexport interface ElementMetadata extends Omit<ElementConfig, 'window'> {\n name: string;\n window: Window;\n}\n\nexport const getElementConfig = (target: any): ElementMetadata | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n\nexport const ensureInit = (inst: any) => { // HTMLElement\n if (!inst.__swc_initialized) {\n inst._swcId = inst?.getAttribute?.('swc-use-ssr') ?? 's' + Math.random().toString(36).substring(2, 11).toLowerCase();\n inst._emitHandlers = new Map();\n inst.__swc_initialized = true;\n // const attributeList = findAllQ(inst);\n // attributeList.forEach(meta => {\n // delete (inst as any)[meta.propertyKey];\n // });\n\n const target = inst instanceof Function ? inst : inst.constructor;\n\n // \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n // \u2551 decorator \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2551\n // \u2551 \u2551\n // \u2551 \uC774\uC720: own property\uAC00 \uC788\uC73C\uBA74 prototype\uC758 getter/setter\uB294 \uC808\uB300 \uC548 \uD0C4\uB2E4 \u2551\n // \u2551 1. TypeScript\uB294 \uCD08\uAE30\uAC12\uC774 \uC788\uB294 \uD544\uB4DC\uB97C constructor\uC5D0\uC11C own property\uB85C \uC0DD\uC131 \u2551\n // \u2551 @attributeThis('id') myId: string = \"default\" \u2192 this.myId = \"default\" \u2551\n // \u2551 \u2551\n // \u2551 2. JavaScript\uC758 property lookup\uC740 own property\uB97C \uBA3C\uC800 \uCC3E\uC74C \u2551\n // \u2551 - this.myId \uC811\uADFC \u2551\n // \u2551 - 1\uC21C\uC704: instance\uC758 own property \uC788\uB098? \u2192 \uC788\uC73C\uBA74 \uADF8\uAC83 \uBC18\uD658 \u2551\n // \u2551 - 2\uC21C\uC704: prototype\uC758 getter \uC788\uB098? \u2192 \uC788\uC73C\uBA74 \uD638\uCD9C \u2551\n // \u2551 \u2551\n // \u2551 3. own property\uAC00 \uC788\uC73C\uBA74 prototype\uC758 getter\uB294 \uC808\uB300 \uD638\uCD9C\uB418\uC9C0 \uC54A\uC74C \u2551\n // \u2551 \uB530\uB77C\uC11C getter\uC5D0\uC11C \uC815\uC758\uB41C DOM \uB3D9\uAE30\uD654 \uB85C\uC9C1\uC774 \uC791\uB3D9\uD558\uC9C0 \uC54A\uC74C \u2551\n // \u2551 \u2551\n // \u2551 4. own property\uB97C \uC0AD\uC81C\uD558\uBA74 JavaScript\uAC00 prototype\uC758 getter\uB97C \uCC3E\uAC8C \uB428 \u2551\n // \u2551 \u2192 getter \uD638\uCD9C\uB428 \u2192 DOM \uC18D\uC131 \uAC12 \uB3D9\uAE30\uD654\uB428 \u2551\n // \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\n // \uD568\uC218\uB294 decorator\uC5D0\uC11C \uAC12\uC790\uCCB4\uB97C descriptor.value = function (...args: any[]) {...\n\n // @attribute \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter/setter \uC791\uB3D9\n // const attributeList = findAllAttributeMetadata(target);\n const attributeAllList = findAllAttributeMetadata(target).filter(it => it.type === 'property');\n if (attributeAllList) {\n attributeAllList.forEach(meta => {\n // const initUserData = (inst as any)[meta.propertyKey];\n delete (inst as any)[meta.propertyKey];\n // (inst as any)[meta.propertyKey] = initUserData;\n });\n }\n\n // @query \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter \uC791\uB3D9\n const queryList = getQueryMetadata(target);\n if (queryList) {\n queryList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n\n // @queryAll \uD544\uB4DC\uC758 own property \uC0AD\uC81C \u2192 getter \uC791\uB3D9\n const queryAllList = getQueryAllMetadata(target);\n if (queryAllList) {\n queryAllList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n // const slotAllList = findAllApplySlotMetadata(target);\n // if (slotAllList) {\n // slotAllList.filter(it => it.type === 'property').forEach(meta => {\n // delete (inst as any)[meta.propertyKey];\n // });\n // }\n\n\n const propertyAllList = findAllPropertyMetadata(target).filter(it => it.type === 'property');\n if (propertyAllList) {\n propertyAllList.forEach(meta => {\n delete (inst as any)[meta.propertyKey];\n });\n }\n\n const stateAllList = findAllStateMetadata(target);\n if (stateAllList) {\n stateAllList.forEach(meta => {\n const initUserData = (inst as any)[meta.propertyKey];\n delete (inst as any)[meta.propertyKey];\n (inst as any)[meta.propertyKey] = initUserData;\n });\n }\n\n // Call constructor script if present\n const hostSet = SwcUtils.getHostSet(inst);\n const appHosts = SwcUtils.findAllAppHostsIncludingSelfDirect(inst);\n inst._executeSwcScript?.('swc-on-constructor', hostSet);\n\n // Call @onInitialize lifecycle methods\n const cMethods = findAllLifecycleMetadata(inst, ON_INITIALIZE_METADATA_KEY);\n for (const m of cMethods) inst._invokeLifecycleMethod(m.propertyKey, hostSet);\n }\n};\n\n\n// \uD6D4 \uC774\uAC8C\uB9DE\uB098?? global\uB85C \uAD00\uB9AC\uD558\uB294\uAC8C..\uD6D4... \uC65C\uC774\uB807\uAC8C \uD588\uC744\uAE4C..\n// --- Global Event Handling ---\nconst globalDelegatedRoots = new WeakSet<Node>();\n// \uC5EC\uAE30\uC5D0\uC11C \uC911\uBCF5 \uD638\uCD9C\uC548\uB418\uAC8C \uC798\uB9C9\uC544\uC900\uB2E4 ..\nconst handleGlobalSwcEvent = async (event: Event) => {\n if ((event as any).__swc_handled) return;\n const path = event.composedPath();\n const type = event.type;\n const attrName = `swc-on-${type}`;\n\n for (const node of path) {\n if (!(node instanceof HTMLElement)) continue;\n const script = node.getAttribute?.(attrName);\n if (script && !getElementConfig(node)) {\n const host: any = SwcUtils.findNearestSwcHostIncludingSelf(node);\n if (host && host.isConnected && typeof host.__swc_executeAttributeEvent === 'function') {\n await host.__swc_executeAttributeEvent(node, attrName, script, event);\n (event as any).__swc_handled = true;\n break;\n }\n }\n }\n};\n\nfunction buildEnv(configWindow: Window) {\n const win: Window = configWindow;\n const doc: Document = win?.document;\n const builtInTagMap = new Map<any, string>();\n for (const [cls, tag] of HTML_TAG_ENTRIES) {\n if ((win as any)?.[cls]) builtInTagMap.set((win as any)[cls], tag);\n }\n const domHelpers = SwcUtils.getHelperSet(win);\n\n return {win, doc, builtInTagMap, domHelpers};\n}\n\nconst getHandlers = (inst: any) => {\n if (!inst.__swc_attributeEventHandlers) inst.__swc_attributeEventHandlers = new Map();\n return inst.__swc_attributeEventHandlers;\n};\n\nconst setupPrototype = (proto: any, win: Window) => {\n if (proto.__swc_proto_setup) return;\n proto.__swc_proto_setup = true;\n\n\n // proto.createSlotString = function (id: string) {\n // return NodeSlot.slot(`${this._swcId}-${id}`);\n // }\n // proto.createEaHtml = function (id: string, script: string) {\n // return ElementApply.html(id, script);\n // }\n // proto.createEaText = function (id: string, script: string) {\n // return ElementApply.text(id, script);\n // }\n // proto.createEaAttribute = function (id: string, name: string, script: string) {\n // return ElementApply.attribute(id, name, script);\n // }\n // proto.createEaEvent = function (id: string, name: string, script: string) {\n // return ElementApply.event(id, name, script);\n // }\n // proto.createEaProperty = function (id: string, name: string, script: string) {\n // return ElementApply.property(id, name, script);\n // }\n\n // swc-id-asdasdasdasd-click=\" :value=\"\" {: value fsdfsdafsad :} {html: aaa :} {text: asdas :}\n\n proto._executeSwcScript = function (attrName: string, hostSet: HostSet, extraArgs: Record<string, any> = {}) {\n ensureInit(this);\n const script = this.getAttribute(attrName);\n if (script) {\n try {\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const helpers = SwcUtils.getHelperSet(currentWin);\n const args = {...hostSet, ...helpers, ...extraArgs, $el: this, $root: this.getRootNode()};\n FunctionUtils.execute({script, context: this, args});\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attrName}:`, e);\n }\n }\n };\n\n proto._resolveWindow = function (localConfig?: ElementConfig): Window {\n ensureInit(this);\n if (localConfig?.window) return localConfig.window;\n const ancestors = SwcUtils.findAllSwcHostsIncludingSelf(this as any);\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const aConf = getElementConfig(ancestors[i]);\n if (aConf?.window) return aConf.window;\n }\n return getElementConfig(this).window ?? ((typeof window !== 'undefined' ? window : undefined) as Window);\n };\n\n proto._invokeLifecycleMethod = function (methodName: string | symbol, hostSet?: HostSet, extraArgs: any[] = []) {\n ensureInit(this);\n if (typeof (this as any)[methodName] !== 'function') return;\n const useHostSet = hostSet ?? SwcUtils.getHelperAndHostSet(win, this);\n const app = useHostSet?.$appHost?.simpleApplication;\n\n // @hostSet/@helperHostSet/@helperSet(parameter.ts)\uB97C \uC704\uD55C \uAC12. lifecycle \uBA54\uC11C\uB4DC\uB294\n // event/matched \uAC1C\uB150\uC774 \uC5C6\uC73C\uBBC0\uB85C \uC774 \uC138 \uAC00\uC9C0\uB9CC \uCC44\uC6B4\uB2E4.\n const helperSetValue = SwcUtils.getHelperSet(win);\n const helperHostSetValue = {...helperSetValue, ...useHostSet, $this: this};\n const kindValues = {hostSet: useHostSet, helperHostSet: helperHostSetValue, helperSet: helperSetValue};\n\n // console.log('---->hh',app, this, methodName);\n if (app) {\n const otherStorage = new Map<any, any>();\n const situations = new SituationTypeContainers([new SituationTypeContainer({situationType: InjectSituationType.HOST_SET, data: useHostSet}), new SituationTypeContainer({situationType: InjectSituationType.APP_HOST, data: useHostSet.$appHost}), new SituationTypeContainer({situationType: InjectSituationType.APP_HOSTS, data: useHostSet.$appHosts}), new SituationTypeContainer({\n situationType: InjectSituationType.HOST,\n data: useHostSet.$host\n }), new SituationTypeContainer({situationType: InjectSituationType.HOSTS, data: useHostSet.$hosts}), new SituationTypeContainer({situationType: InjectSituationType.FIRST_HOST, data: useHostSet.$firstHost}), new SituationTypeContainer({situationType: InjectSituationType.LAST_HOST, data: useHostSet.$lastHost}), new SituationTypeContainer({\n situationType: InjectSituationType.FIRST_APP_HOST,\n data: useHostSet.$firstAppHost\n }), new SituationTypeContainer({situationType: InjectSituationType.LAST_APP_HOST, data: useHostSet.$lastAppHost})]);\n otherStorage.set(SituationTypeContainers, situations);\n\n // @hostSet/@helperHostSet/@helperSet\uAC00 \uBD99\uC740 \uD30C\uB77C\uBBF8\uD130\uB294 @Inject/situationType \uAE30\uBC18\n // \uD574\uC11D\uBCF4\uB2E4 \uBA3C\uC800 \uCC98\uB9AC\uB418\uACE0(firstCheckMaker), \uADF8 \uC678 \uD30C\uB77C\uBBF8\uD130\uB294 \uAE30\uC874\uCC98\uB7FC @Inject/\uD0C0\uC785\n // \uAE30\uBC18\uC73C\uB85C \uC815\uC0C1 \uD574\uC11D\uB41C\uB2E4 \u2014 \uAC19\uC740 \uBA54\uC11C\uB4DC\uC5D0\uC11C \uB450 \uBC29\uC2DD\uC744 \uC11E\uC5B4 \uC368\uB3C4 \uB41C\uB2E4.\n const firstCheckMaker: FirstCheckMaker = ({target, targetKey}, token, idx) => {\n const saves = getParameterMetadata(target, targetKey!);\n const found = saves.find(s => s.index === idx);\n return found ? (kindValues as any)[found.kind] : undefined;\n };\n\n return app.simstanceManager.executeBindParameterSim(\n {\n target: this,\n targetKey: methodName,\n inputParameters: extraArgs,\n firstCheckMaker: [firstCheckMaker]\n },\n otherStorage\n );\n } else {\n // SimpleApplication(DI \uCEE8\uD14C\uC774\uB108)\uC774 \uC5C6\uB294 standalone \uC0AC\uC6A9 \uC2DC\uC5D0\uB3C4 @hostSet/@helperHostSet/\n // @helperSet\uB9CC\uD07C\uC740 buildSwcParameterArgs\uB85C \uC8FC\uC785\uD574\uC900\uB2E4 \u2014 \uD574\uB2F9 \uB370\uCF54\uB808\uC774\uD130\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74\n // extraArgs\uB97C \uADF8\uB300\uB85C \uBC18\uD658\uD558\uBBC0\uB85C(\uAE30\uC874 \uB3D9\uC791 \uADF8\uB300\uB85C) \uD558\uC704\uD638\uD658 \uAE68\uC9C0\uC9C0 \uC54A\uB294\uB2E4.\n const args = buildSwcParameterArgs(this, methodName, kindValues, extraArgs);\n return (this as any)[methodName](...args);\n }\n };\n\n proto._bindAttributeEvent = function (el: HTMLElement, attrName: string, script: string, eventName?: string) {\n ensureInit(this);\n if (!eventName) {\n if (!attrName.startsWith('swc-on-')) return;\n eventName = attrName.substring(7);\n }\n const elHandlers = getHandlers(this);\n let handlers = elHandlers.get(el);\n if (!handlers) {\n handlers = new Map();\n elHandlers.set(el, handlers);\n }\n\n const oldHandler = handlers.get(attrName);\n if (oldHandler) el.removeEventListener(eventName, oldHandler);\n\n const handler = async (event: any) => {\n const hostSet = SwcUtils.getHostSet(el);\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const helpers = SwcUtils.getHelperSet(currentWin);\n const args = {\n event,\n $data: (event as CustomEvent).detail,\n ...hostSet,\n ...helpers,\n $el: el,\n $root: this.getRootNode()\n };\n await FunctionUtils.execute({script, context: el, args});\n };\n\n el.addEventListener(eventName, handler);\n handlers.set(attrName, handler);\n };\n\n proto.__swc_executeAttributeEvent = async function (el: HTMLElement, attrName: string, script: string, event: Event) {\n ensureInit(this);\n\n const hostSet = SwcUtils.getHostSet(el);\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n const currentHelpers = SwcUtils.getHelperSet(currentWin);\n const detail = (event as CustomEvent).detail;\n const args = {\n event,\n $event: event,\n $data: detail,\n $detail: detail,\n ...hostSet,\n ...currentHelpers,\n $el: el,\n $root: this.getRootNode()\n };\n await FunctionUtils.execute({script, context: el, args});\n };\n};\n\nexport const elementDefine =\n (name: string, config: Partial<ElementConfig> = {}): ClassDecorator =>\n (constructor: any) => {\n const { win, doc, builtInTagMap: BUILT_IN_TAG_MAP, domHelpers: SWC_DOM_HELPERS } = buildEnv(config.window);\n const metadata: ElementMetadata = { ...config, name, window: win };\n\n if (!metadata.window) {\n throw new Error('window is required');\n }\n\n let extendsTagName = metadata.extends;\n if (!extendsTagName) {\n let proto = constructor;\n const BaseHTMLElement = (win as any).HTMLElement;\n while (proto && proto !== BaseHTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n metadata.extends = extendsTagName;\n }\n\n const attributeList = findAllAttributeMetadata(constructor);\n const applyAttributeMap = findAllAttributeApplyMetadata(constructor);\n\n 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'];\n const swcOnEvents = DOM_EVENT_NAMES.map(e => `swc-on-${e}`);\n\n const attributeApplyNames = Array.from(applyAttributeMap.values())\n .map(it => it.targetAttributeName)\n .filter(Boolean) as string[];\n const hostAttributes = attributeList.filter(it => it.selector === '$this').map(it => it.propertyKey || String(it.propertyKey));\n // Get original static observedAttributes before they're overwritten by Object.defineProperty\n const originalStaticObservedAttributes = (constructor.observedAttributes ?? []) as string[];\n\n const proto = constructor.prototype;\n setupPrototype(proto, win);\n\n // \uAC12\uC744 \uAE30\uB300\uD558\uC9C0\uC54A\uB294\uB2E4.\n let helperHostSet: HelperHostSet | null = null;\n // \u2500\u2500 cyclers: \uB370\uCF54\uB808\uC774\uD130\uBCC4 \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uC704\uC784 \uD074\uB798\uC2A4 (elementDefine \uC2DC 1\uD68C \uC0DD\uC131, \uACC4\uC18D \uC7AC\uC0AC\uC6A9) \u2500\u2500\n const eventCycler = new EventListenerLifeCycler();\n const cyclers: ElementDefineLifeCycler[] = [\n eventCycler,\n new ChangedAttributeLifeCycler(),\n new EmitCustomEventLifeCycler(),\n new ResizeObserverLifeCycler(),\n new IntersectionObserverLifeCycler(),\n new MutationObserverLifeCycler(),\n new MessageSubscribeLifeCycler(),\n new RouteSubscribeLifeCycler(),\n new SetIntervalLifeCycler(),\n new SetTimeoutLifeCycler(),\n new RequestAnimationFrameLifeCycler(),\n new EventMediaLifeCycler(),\n ];\n\n // observedAttributes \uAE30\uC5EC cycler (define-time, constructor \uAE30\uBC18)\n const cyclerObservedAttributes = cyclers.flatMap(c => c.getObservedAttributeNames?.(constructor) ?? []);\n const mergedObservedAttributes = [...new Set([...(metadata.observedAttributes ?? []), ...originalStaticObservedAttributes, ...cyclerObservedAttributes, ...attributeApplyNames, ...hostAttributes, ...swcLifecycleAttributes, ...swcOnEvents])];\n\n // \uB80C\uB354 \uD6C4 \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \uD638\uCD9C \u2192 Set \uC218\uC9D1 \uD6C4 observer \uC0DD\uC131\n const buildObservers = async (helperHostSet: HelperHostSet): Promise<void> => {\n const inst = helperHostSet.$this;\n const observers: Array<MutationObserver | ResizeObserver | IntersectionObserver> = [];\n let resizeObserverSet: ResizeObserverSet = [];\n let mutationObserverSet: MutationObserverSet = [];\n let intersectionObserverSet: IntersectionObserverSet = [];\n\n // delegate \uCD94\uC801 root \uD574\uC11D: shadow/light/auto/all \u2192 \uC2E4\uC81C root \uBAA9\uB85D\n const resolveDelegateRoots = (delegateRoot: SwcRootType | undefined): (HTMLElement | ShadowRoot)[] => {\n const r = delegateRoot || 'auto';\n const roots: (HTMLElement | ShadowRoot)[] = [];\n if (r === 'auto') roots.push(inst.shadowRoot || inst);\n else if (r === 'light') roots.push(inst);\n else if (r === 'shadow' && inst.shadowRoot) roots.push(inst.shadowRoot);\n else if (r === 'all') { roots.push(inst); if (inst.shadowRoot) roots.push(inst.shadowRoot); }\n return roots;\n };\n\n // 1. \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \u2192 observer Set \uC218\uC9D1 (\uC5EC\uB7EC \uC2DC\uD074\uB7EC\uAC00 \uBC18\uD658\uD55C Set \uC744 \uC804\uBD80 \uB204\uC801)\n for (const c of cyclers) {\n const result = (await c.onConnected?.(helperHostSet, resizeObserverSet)) as OnConnectedResult | void;\n if (!result) continue;\n if (result.resizeObserverSet?.length) resizeObserverSet = [...resizeObserverSet, ...result.resizeObserverSet];\n if (result.mutationObserverSet?.length) mutationObserverSet = [...mutationObserverSet, ...result.mutationObserverSet];\n if (result.intersectionObserverSet?.length) intersectionObserverSet = [...intersectionObserverSet, ...result.intersectionObserverSet];\n }\n\n // 2. \uD0C0\uC785\uBCC4\uB85C observer \uC0DD\uC131\n // ResizeObserver \uBA3C\uC800: mutation callback \uC774 observe/unobserve \uB97C \uC8FC\uC785\uBC1B\uC544\uC57C \uD568\n // observeTargets \uC911 delegate \uD56D\uBAA9\uC740 \uC140\uB809\uD130 \uBB38\uC790\uC5F4\uC774\uB77C \uCD08\uAE30 observe \uD558\uC9C0 \uC54A\uB294\uB2E4 (\uB3D9\uC801 \uCD94\uC801 \uC804\uC6A9).\n // \uB3D9\uC801 observe/unobserve \uB294 \uC911\uBCF5 \uD638\uCD9C\uC744 \uB9C9\uAE30 \uC704\uD574 observe \uB300\uC0C1 WeakSet \uC73C\uB85C \uCD94\uC801\uD55C\uB2E4.\n const resizeDelegates = (resizeObserverSet ?? []).filter(t => t.delegate && typeof t.target === 'string') as Array<ResizeObserverSetEntry & { target: string }>;\n let resizeObserve: ((el: Element, opts?: ResizeObserverOptions) => void) | undefined;\n let resizeUnobserve: ((el: Element) => void) | undefined;\n const resizeObserved = new WeakSet<Element>();\n if (resizeObserverSet?.length) {\n const roCallbacks = [...new Set(resizeObserverSet.map(e => e.callback))];\n const ro = new win.ResizeObserver((entries, obs) => {\n for (const cb of roCallbacks) cb(entries, obs);\n });\n for (const e of resizeObserverSet) {\n if (e.delegate) continue;\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => {\n if (!resizeObserved.has(el)) { ro.observe(el, e.options); resizeObserved.add(el); }\n });\n }\n continue;\n }\n ro.observe(e.target as Element, e.options);\n if (e.target instanceof Element) resizeObserved.add(e.target);\n }\n resizeObserve = (el, opts) => {\n if (resizeObserved.has(el)) return;\n ro.observe(el, opts);\n resizeObserved.add(el);\n };\n resizeUnobserve = (el) => {\n if (!resizeObserved.has(el)) return;\n ro.unobserve(el);\n resizeObserved.delete(el);\n };\n observers.push(ro);\n }\n\n // IntersectionObserver: \uC635\uC158 \uADF8\uB8F9\uBCC4\uB85C 1\uAC1C\uC529 \uC0DD\uC131.\n // delegate \uD56D\uBAA9\uC740 \uB3D9\uC801 \uCD94\uC801\uC6A9 \uC140\uB809\uD130\uC774\uBBC0\uB85C observe/unobserve \uD568\uC218\uB97C MutationObserver \uCF5C\uBC31\uC5D0 \uB118\uAE34\uB2E4.\n // \uB3D9\uC801 observe/unobserve \uC911\uBCF5 \uBC29\uC9C0\uB97C \uC704\uD574 \uADF8\uB8F9\uBCC4 WeakSet \uC73C\uB85C \uCD94\uC801\uD55C\uB2E4.\n const intersectionDelegates: Array<{ target: string; delegateRoot?: SwcRootType; observe: (el: Element) => void; unobserve: (el: Element) => void }> = [];\n for (const group of intersectionObserverSet) {\n const ioCallbacks = [...new Set(group.observeTargets.map(e => e.callback))];\n const io = new win.IntersectionObserver((entries, obs) => {\n for (const cb of ioCallbacks) cb(entries, obs);\n }, group.options);\n const ioObserved = new WeakSet<Element>();\n for (const e of group.observeTargets) {\n if (e.delegate) {\n const target = e.target as string;\n const observe = (el: Element) => {\n if (ioObserved.has(el)) return;\n io.observe(el);\n ioObserved.add(el);\n };\n const unobserve = (el: Element) => {\n if (!ioObserved.has(el)) return;\n io.unobserve(el);\n ioObserved.delete(el);\n };\n intersectionDelegates.push({ target, delegateRoot: e.delegateRoot, observe, unobserve });\n continue;\n }\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => {\n if (!ioObserved.has(el)) { io.observe(el); ioObserved.add(el); }\n });\n }\n continue;\n }\n io.observe(e.target as Element);\n if (e.target instanceof Element) ioObserved.add(e.target);\n }\n observers.push(io);\n }\n\n // resize/intersection delegate \uB3D9\uC801 \uCD94\uC801 \u2014 MutationObserver \uCF5C\uBC31\uC5D0\uC11C \uCD94\uAC00/\uC81C\uAC70\uB41C \uC694\uC18C\uB97C observe/unobserve \uD55C\uB2E4.\n const handleResizeDelegate = (n: Node, observe: boolean) => {\n if (!resizeObserve || !resizeUnobserve || n.nodeType !== 1) return;\n const el = n as HTMLElement;\n for (const d of resizeDelegates) {\n const isThis = d.target === '$this' || d.target === '';\n const matchesSel = (node: any) => {\n if (!node || node.nodeType !== 1) return false;\n if (isThis) return true;\n return (node as HTMLElement).matches?.(d.target) || !!(node as HTMLElement).closest?.(d.target);\n };\n if (matchesSel(el)) {\n observe ? resizeObserve(el, d.options)\n : resizeUnobserve(el);\n } else if (!isThis) {\n el.querySelectorAll(d.target).forEach(sub => {\n observe ? resizeObserve(sub as HTMLElement, d.options)\n : resizeUnobserve(sub as HTMLElement);\n });\n }\n }\n };\n const handleIntersectionDelegate = (n: Node, observe: boolean) => {\n if (n.nodeType !== 1) return;\n const el = n as HTMLElement;\n for (const d of intersectionDelegates) {\n const isThis = d.target === '$this' || d.target === '';\n const matchesSel = (node: any) => {\n if (!node || node.nodeType !== 1) return false;\n if (isThis) return true;\n return (node as HTMLElement).matches?.(d.target) || !!(node as HTMLElement).closest?.(d.target);\n };\n if (matchesSel(el)) {\n observe ? d.observe(el) : d.unobserve(el);\n } else if (!isThis) {\n el.querySelectorAll(d.target).forEach(sub => {\n observe ? d.observe(sub as HTMLElement) : d.unobserve(sub as HTMLElement);\n });\n }\n }\n };\n\n if (mutationObserverSet?.length || resizeDelegates.length > 0 || intersectionDelegates.length > 0) {\n // \uD558\uB098\uC758 MutationObserver \uB85C resize/intersection delegate \uB3D9\uC801 \uCD94\uC801 + mutation \uCF5C\uBC31\uC744 \uD568\uAED8 \uCC98\uB9AC\n const callbacks = [...new Set((mutationObserverSet ?? []).map(e => e.callback))];\n const mo = new win.MutationObserver((mutations, obs) => {\n for (const mut of mutations) {\n Array.from(mut.addedNodes || []).forEach(n => { handleResizeDelegate(n as Node, true); handleIntersectionDelegate(n as Node, true); });\n Array.from(mut.removedNodes || []).forEach(n => { handleResizeDelegate(n as Node, false); handleIntersectionDelegate(n as Node, false); });\n }\n for (const cb of callbacks) cb(mutations, obs);\n });\n\n // observe \uB300\uC0C1 \uC804\uCCB4(\uC5D4\uD2B8\uB9AC + delegate \uCD94\uC801 root)\uB97C \uD558\uB098\uB85C \uBAA8\uC544 \uC911\uBCF5 observe \uB97C \uC81C\uAC70\uD55C\uB2E4.\n // \uAC19\uC740 target \uC774 \uC5EC\uB7EC \uC18C\uC2A4\uC5D0\uC11C \uC9C0\uC815\uB418\uBA74 MutationObserverInit \uC744 \uD569\uC9D1\uD569(\uCD5C\uB300 \uAC10\uC9C0\uBC94\uC704)\uC73C\uB85C \uBCD1\uD569\uD55C\uB2E4.\n const moObserveTargets = new Map<Element | ShadowRoot, MutationObserverInit>();\n const mergeMutationInit = (existing: MutationObserverInit | undefined, next: MutationObserverInit): MutationObserverInit => {\n if (!existing) return next;\n const mergedFilter = existing.attributeFilter || next.attributeFilter\n ? [...new Set([...(existing.attributeFilter ?? []), ...(next.attributeFilter ?? [])])]\n : undefined;\n return {\n childList: existing.childList || next.childList,\n attributes: existing.attributes || next.attributes,\n characterData: existing.characterData || next.characterData,\n subtree: existing.subtree || next.subtree,\n attributeOldValue: existing.attributeOldValue || next.attributeOldValue,\n characterDataOldValue: existing.characterDataOldValue || next.characterDataOldValue,\n attributeFilter: mergedFilter,\n };\n };\n const addObserveTarget = (target: Element | ShadowRoot, options: MutationObserverInit) => {\n moObserveTargets.set(target, mergeMutationInit(moObserveTargets.get(target), options));\n };\n\n // 1) mutationObserverSet \uC5D4\uD2B8\uB9AC\n for (const e of mutationObserverSet ?? []) {\n if (e.delegate) continue;\n const init = e.options ?? { childList: true };\n if (typeof e.target === 'string') {\n // \uBB38\uC790\uC5F4(non-delegate)\uC774\uBA74 root \uC5D0\uC11C \uAC80\uC0C9\uB41C \uC694\uC18C\uB4E4\uC744 observe \uB300\uC0C1\uC73C\uB85C \uCD94\uAC00\uD55C\uB2E4.\n const scope = resolveDelegateRoots(e.delegateRoot);\n for (const sr of scope) {\n sr.querySelectorAll(e.target).forEach(el => addObserveTarget(el, init));\n }\n continue;\n }\n addObserveTarget(e.target, init);\n }\n\n // 2) delegate \uCD94\uC801 root: shadow/light/all/auto \uB85C \uD574\uC11D\uD574 \uC804\uBD80 observe\n for (const d of resizeDelegates) {\n for (const r of resolveDelegateRoots(d.delegateRoot)) addObserveTarget(r, { childList: true, subtree: true });\n }\n for (const d of intersectionDelegates) {\n for (const r of resolveDelegateRoots(d.delegateRoot)) addObserveTarget(r, { childList: true, subtree: true });\n }\n\n for (const [target, options] of moObserveTargets) {\n mo.observe(target, options);\n }\n observers.push(mo);\n }\n\n inst.__swc_observers = observers;\n };\n\n const originalConnected = proto.connectedCallback;\n proto.connectedCallback = async function () {\n ensureInit(this);\n // \uC7AC\uC5F0\uACB0 \uC2DC \uB204\uC801 \uBC29\uC9C0 \u2014 cycler \uB0B4\uBD80 \uB9AC\uC18C\uC2A4 \uCD08\uAE30\uD654\n helperHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n const appHost = helperHostSet.$appHost;\n const useSsr = isSSR(this);\n try {\n if (appHost && typeof (appHost as any)._connected === 'function') {\n await (appHost as any)._connected(this);\n } else if (appHost && typeof (appHost as any)) {\n (appHost as any)._connected_safari_and_standby ??= [];\n (appHost as any)._connected_safari_and_standby.push(this);\n }\n\n const conf = getElementConfig(this);\n const currentWin = (this as any)._resolveWindow(conf);\n\n // before-connected \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uBA54\uC11C\uB4DC (@onConnectedBefore)\n for (const m of findAllOnConnectedBeforeMetadata(this)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-before-connected', helperHostSet);\n\n // \u2500\u2500 \uB80C\uB354 (@onConnected / @onConnectedBody*) \u2014 elementDefine \uCC45\uC784 \u2500\u2500\n const targetConnectedList = useSsr ? [] : findAllOnConnectedMetadata(constructor);\n const shadowMode = conf?.useShadow || targetConnectedList.find(it => it.options.useShadow)?.options.useShadow;\n if (shadowMode && !this.shadowRoot) {\n const mode = shadowMode === true ? 'open' : shadowMode;\n this.attachShadow({ mode: mode as ShadowRootMode });\n }\n\n const stateContext: any = { ...helperHostSet };\n findAllStateMetadata(this).forEach(it => {\n stateContext[it.name] = this[it.propertyKey];\n });\n\n const shadowChildren: Node[] = [];\n const lightChildren: Node[] = [];\n\n if (targetConnectedList.length > 0) {\n for (const meta of targetConnectedList) {\n let res = await (this as any)._invokeLifecycleMethod(meta.propertyKey, helperHostSet);\n if (typeof res === 'string') {\n const htmlTemplateElement = doc.createElement('template');\n htmlTemplateElement.innerHTML = res;\n res = htmlTemplateElement.content;\n }\n if (res) {\n const nodes = Array.isArray(res) ? res : [res];\n if (meta.options.useShadow || conf?.useShadow) {\n shadowChildren.push(...nodes);\n } else {\n lightChildren.push(...nodes);\n }\n }\n }\n try {\n if (this.shadowRoot) {\n const applyShadowChildren = SwcUtils.projectProcessHtml(this._swcId, shadowChildren, doc);\n this.shadowRoot.replaceChildren(...applyShadowChildren);\n }\n if (lightChildren.length) {\n const applyLightChildren = SwcUtils.projectProcessHtml(this._swcId, lightChildren, doc);\n this.replaceChildren(...applyLightChildren);\n }\n } catch (e) {\n console.error('[ElementDefine] innerHTML setting error:', e);\n }\n new ElementApply(this, { id: this._swcId }).apply({ context: stateContext, bind: this });\n } else {\n new ElementApply(this, { id: this._swcId }).apply({ exclude: { html: true, text: true, attribute: true }, context: stateContext, bind: this });\n }\n\n // global delegate event\n const root = this.getRootNode();\n if (!globalDelegatedRoots.has(root)) {\n DOM_EVENT_NAMES.forEach(type => {\n root.addEventListener(type, handleGlobalSwcEvent);\n });\n globalDelegatedRoots.add(root);\n }\n\n // \u2500\u2500 cycler \uC2E4\uD589 (\uB80C\uB354 \uD6C4): \uBAA8\uB4E0 \uC2DC\uD074\uB7EC onConnected \u2192 observer Set \uC218\uC9D1 \u2192 observer \uC0DD\uC131 \u2500\u2500\n // helperHostSet \uC740 \uD074\uB85C\uC800 \uBCC0\uC218\uB77C async \uD750\uB984\uC5D0\uC11C \uB2E4\uB978 \uC778\uC2A4\uD134\uC2A4\uB85C \uB36E\uC5B4\uC368\uC9C8 \uC218 \uC788\uB2E4.\n // \uBC18\uB4DC\uC2DC \uD604\uC7AC \uC778\uC2A4\uD134\uC2A4(this)\uB85C \uC7AC\uACC4\uC0B0\uD55C \uAC12\uC744 \uC0AC\uC6A9\uD55C\uB2E4.\n await buildObservers(SwcUtils.getHelperAndHostSet(win, this as any));\n\n if (originalConnected) await originalConnected.apply(this);\n\n // after-connected \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uBA54\uC11C\uB4DC (@onConnectedAfter)\n for (const m of findAllOnConnectedAfterMetadata(this)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-connected', helperHostSet);\n (this as any)._executeSwcScript('swc-on-after-connected', helperHostSet);\n (this as any).__swc_connected = true;\n } finally {\n for (const m of findAllLifecycleMetadata(this, ON_CONNECTED_COMPLETED_METADATA_KEY)) await (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n if (appHost && typeof (appHost as any)._connectedDone === 'function') {\n await (appHost as any)._connectedDone(this);\n }\n }\n };\n\n /////////////////////////////////////////////////\n // disconnectedCallback\n ////////////////////////////////////////////////\n const originalDisconnected = proto.disconnectedCallback;\n proto.disconnectedCallback = function () {\n const appHost = helperHostSet?.$appHost;\n if (appHost && typeof (appHost as any)._disconnected === 'function') {\n (appHost as any)._disconnected(this);\n }\n\n (this as any)._executeSwcScript('swc-on-before-disconnected', helperHostSet);\n for (const m of findAllLifecycleMetadata(this, ON_BEFORE_DISCONNECTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n for (const c of cyclers) c.onDisconnected?.(helperHostSet!);\n\n for (const o of (this as any).__swc_observers ?? []) {\n try { (o as any)?.disconnect?.(); } catch (e) { console.error('[SWC] observer disconnect error:', e); }\n }\n (this as any).__swc_observers = [];\n\n // elementApply event listener \uC815\uB9AC\n new ElementApply(this, { id: this._swcId }).removeAllEventListener();\n\n if (originalDisconnected) originalDisconnected.apply(this);\n\n for (const m of findAllLifecycleMetadata(this, ON_AFTER_DISCONNECTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, helperHostSet);\n (this as any)._executeSwcScript('swc-on-disconnected', helperHostSet);\n (this as any)._executeSwcScript('swc-on-after-disconnected', helperHostSet);\n (this as any).__swc_connected = false;\n };\n\n const originalAdopted = proto.adoptedCallback;\n proto.adoptedCallback = function () {\n const hostSet = SwcUtils.getHostSet(this as any);\n (this as any)._executeSwcScript('swc-on-before-adopted', hostSet);\n for (const m of findAllLifecycleMetadata(this, ON_BEFORE_ADOPTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, hostSet);\n for (const c of cyclers) c.onAdopted?.(helperHostSet!);\n\n if (originalAdopted) originalAdopted.apply(this);\n\n for (const m of findAllLifecycleMetadata(this, ON_AFTER_ADOPTED_METADATA_KEY)) (this as any)._invokeLifecycleMethod(m.propertyKey, hostSet);\n (this as any)._executeSwcScript('swc-on-adopted', hostSet);\n (this as any)._executeSwcScript('swc-on-after-adopted', hostSet);\n };\n\n const originalAttributeChanged = proto.attributeChangedCallback;\n proto.attributeChangedCallback = function (name: string, old: string | null, newVal: string | null) {\n if (originalAttributeChanged) originalAttributeChanged.apply(this, [name, old, newVal]);\n\n // attributeChangedCallback \uC740 connected \uC774\uC804\uC5D0\uB3C4 \uD638\uCD9C\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C\n // \uD074\uB85C\uC800\uC758 helperHostSet(null \uAC00\uB2A5) \uB300\uC2E0 \uC774 \uC2DC\uC810\uC5D0 \uC0C8\uB85C \uACC4\uC0B0\uD55C\uB2E4.\n const helperAndHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n\n // Process expression directive before passing to handlers\n let processedVal: any = newVal;\n if (newVal !== null) {\n const ae = new ActionExpression(newVal);\n const expr = ae.getFirstExpression('callReturn');\n if (expr) {\n const win = (this as any)._resolveWindow?.() || ((typeof window !== 'undefined' ? window : undefined) as any);\n const exprHelperAndHostSet = SwcUtils.getHelperAndHostSet(win, this as any);\n const script = ConvertUtils.decodeHtmlEntity(expr.script, win.document);\n try {\n const result = FunctionUtils.executeReturn({\n script: script,\n context: this,\n args: exprHelperAndHostSet\n });\n processedVal = result;\n } catch (e) {\n console.error(`[SWC] Failed to execute directive {{= ${expr.script} }} on attribute ${name}: ${exprHelperAndHostSet}`, e);\n processedVal = newVal;\n }\n }\n }\n\n if (name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(name)) {\n if (newVal !== null) {\n const eventName = name.substring(7);\n (this as any)._bindAttributeEvent(this as any, name, newVal, eventName);\n }\n }\n\n // cycler \uC704\uC784: attribute \uC635\uC800\uBE59(@emitCustomEvent(attributeName) / @changedAttribute \uB4F1)\n for (const c of cyclers) c.onAttributeChanged?.(helperAndHostSet, name, old, processedVal);\n };\n\n Object.defineProperty(constructor, 'observedAttributes', {\n get: () => mergedObservedAttributes,\n configurable: true\n });\n\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, metadata, constructor);\n const registry = metadata.customElementRegistry || (win as any)?.customElements;\n if (registry && !registry.get(metadata.name)) {\n registry.define(metadata.name, constructor as any, metadata.extends ? { extends: metadata.extends } : undefined);\n }\n return constructor;\n };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4D;AAC5D,8BAAsC;AACtC,8BAAyC;AACzC,4BAAuC;AACvC,kCAA6C;AAC7C,wBAA+U;AAC/U,6BAAwC;AACxC,8BAAyC;AACzC,4BAAsE;AACtE,mBAAoD;AACpD,mBAAuB;AACvB,oBAAgD;AAChD,oBAA8D;AAE9D,uBAA0D;AAC1D,mBAA4M;AAC5M,sBAAyC;AACzC,yBAAoB;AACpB,mBAAmC;AACnC,2BAAsC;AACtC,kDAAyC;AACzC,sDAAuC;AACvC,yBAAoC;AACpC,wBAAmC;AACnC,mCAA8C;AAC9C,wBAAmC;AAI5B,MAAM,qBAAqB,OAAO,IAAI,qCAAqC;AAe3E,MAAM,mBAAmB,CAAC,WAA6C;AAC5E,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,yBAAa,YAAY,oBAAoB,WAAW;AACjE;AAEO,MAAM,aAAa,CAAC,SAAc;AACvC,MAAI,CAAC,KAAK,mBAAmB;AAC3B,SAAK,SAAS,MAAM,eAAe,aAAa,KAAK,MAAM,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,YAAY;AACnH,SAAK,gBAAgB,oBAAI,IAAI;AAC7B,SAAK,oBAAoB;AAMzB,UAAM,SAAS,gBAAgB,WAAW,OAAO,KAAK;AAwBtD,UAAM,uBAAmB,gDAAyB,MAAM,EAAE,OA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Q,SAAS;AAAA,MACxE;AAAA,IACF;AAGA,eAAW,KAAK,QAAS,GAAE,qBAAqB,kBAAkBA,OAAM,KAAK,YAAY;AAAA,EAC3F;AAEA,SAAO,eAAe,aAAa,sBAAsB;AAAA,IACvD,KAAK,MAAM;AAAA,IACX,cAAc;AAAA,EAChB,CAAC;AAED,2BAAa,eAAe,oBAAoB,UAAU,WAAW;AACrE,QAAM,WAAW,SAAS,yBAA0B,KAAa;AACjE,MAAI,YAAY,CAAC,SAAS,IAAI,SAAS,IAAI,GAAG;AAC5C,aAAS,OAAO,SAAS,MAAM,aAAoB,SAAS,UAAU,EAAE,SAAS,SAAS,QAAQ,IAAI,MAAS;AAAA,EACjH;AACA,SAAO;AACT;",
6
6
  "names": ["proto", "helperHostSet", "name", "win"]
7
7
  }
@@ -0,0 +1,84 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
20
+ var eventMedia_exports = {};
21
+ __export(eventMedia_exports, {
22
+ EVENT_MEDIA_METADATA_KEY: () => EVENT_MEDIA_METADATA_KEY,
23
+ EventMediaLifeCycler: () => EventMediaLifeCycler,
24
+ eventMedia: () => eventMedia,
25
+ eventMediaChange: () => eventMediaChange,
26
+ findAllEventMediaMetadata: () => findAllEventMediaMetadata
27
+ });
28
+ module.exports = __toCommonJS(eventMedia_exports);
29
+ var import_core = require("@dooboostore/core");
30
+ const EVENT_MEDIA_METADATA_KEY = Symbol.for("simple-web-component:event-media");
31
+ function eventMedia(query, eventType) {
32
+ return (target, propertyKey) => {
33
+ const constructor = target.constructor;
34
+ let metaList = import_core.ReflectUtils.getOwnMetadata(EVENT_MEDIA_METADATA_KEY, constructor);
35
+ if (!metaList) {
36
+ metaList = [];
37
+ import_core.ReflectUtils.defineMetadata(EVENT_MEDIA_METADATA_KEY, metaList, constructor);
38
+ }
39
+ metaList.push({ propertyKey, query, eventType });
40
+ };
41
+ }
42
+ function eventMediaChange(query) {
43
+ return eventMedia(query, "change");
44
+ }
45
+ const findAllEventMediaMetadata = (target) => {
46
+ const constructor = target instanceof Function ? target : target.constructor;
47
+ return (import_core.ReflectUtils.findAllMetadata(EVENT_MEDIA_METADATA_KEY, constructor) || []).flat();
48
+ };
49
+ class EventMediaLifeCycler {
50
+ constructor() {
51
+ __publicField(this, "entriesMap", /* @__PURE__ */ new WeakMap());
52
+ }
53
+ onConnected(helperHostSet) {
54
+ const inst = helperHostSet.$this;
55
+ const metaList = findAllEventMediaMetadata(inst);
56
+ if (metaList.length === 0) return;
57
+ const entries = [];
58
+ for (const meta of metaList) {
59
+ const mql = helperHostSet.$w.matchMedia(meta.query);
60
+ const handler = (e) => {
61
+ try {
62
+ inst[meta.propertyKey](e, helperHostSet);
63
+ } catch (err) {
64
+ console.error("[SWC] eventMedia handler error:", err);
65
+ }
66
+ };
67
+ mql.addEventListener(meta.eventType, handler);
68
+ entries.push({ mql, eventType: meta.eventType, handler });
69
+ }
70
+ this.entriesMap.set(inst, entries);
71
+ }
72
+ onDisconnected(helperHostSet) {
73
+ const inst = helperHostSet.$this;
74
+ for (const { mql, eventType, handler } of this.entriesMap.get(inst) ?? []) {
75
+ try {
76
+ mql.removeEventListener(eventType, handler);
77
+ } catch (e) {
78
+ console.error("[SWC] eventMedia cleanup error:", e);
79
+ }
80
+ }
81
+ this.entriesMap.delete(inst);
82
+ }
83
+ }
84
+ //# sourceMappingURL=eventMedia.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/eventMedia.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { ElementDefineLifeCycler, HelperHostSet } from '../types';\nimport { SwcUtils } from '../utils/Utils';\n\nexport const EVENT_MEDIA_METADATA_KEY = Symbol.for('simple-web-component:event-media');\n\nexport interface EventMediaMetadata {\n propertyKey: string | symbol;\n query: string;\n eventType: string;\n}\n\n/**\n * CSS \uBBF8\uB514\uC5B4\uCFFC\uB9AC(`window.matchMedia`) \uC0C1\uD0DC \uBCC0\uD654\uB97C \uAC10\uC9C0\uD55C\uB2E4.\n * connect \uC2DC \uC790\uB3D9\uC73C\uB85C \uAD6C\uB3C5\uD558\uACE0, disconnect \uC2DC \uC790\uB3D9\uC73C\uB85C \uD574\uC81C\uD55C\uB2E4.\n *\n * MediaQueryList\uB294 \uC2A4\uD399\uC0C1 'change' \uC774\uBCA4\uD2B8 \uD558\uB098\uB9CC \uC815\uC758\uB3FC\uC788\uB2E4 \u2014 eventType\uC740 \uADF8\uB798\uB3C4 \uBA85\uC2DC\uC801\uC73C\uB85C \uBC1B\uB294\uB2E4\n * (\uB2E4\uB978 @event* \uACC4\uC5F4\uCC98\uB7FC \uBCA0\uC774\uC2A4\uB294 \uBA85\uC2DC\uC801, \uD3B8\uC758 \uBCC4\uCE6D\uC774 \uAC12\uC744 \uACE0\uC815\uD558\uB294 \uCEE8\uBCA4\uC158\uC744 \uB530\uB984). 'change' \uACE0\uC815 \uBC84\uC804\uC740\n * eventMediaChange\uB97C \uC0AC\uC6A9\uD55C\uB2E4.\n */\nexport function eventMedia(query: string, eventType: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(EVENT_MEDIA_METADATA_KEY, constructor) as EventMediaMetadata[];\n if (!metaList) {\n metaList = [];\n ReflectUtils.defineMetadata(EVENT_MEDIA_METADATA_KEY, metaList, constructor);\n }\n metaList.push({ propertyKey, query, eventType });\n };\n}\n\n/** eventMedia(query, 'change')\uC758 \uBCC4\uCE6D - MediaQueryList\uAC00 \uC2E4\uC81C\uB85C \uBC1C\uC0DD\uC2DC\uD0A4\uB294 \uC720\uC77C\uD55C \uC774\uBCA4\uD2B8. */\nexport function eventMediaChange(query: string): MethodDecorator {\n return eventMedia(query, 'change');\n}\n\nexport const findAllEventMediaMetadata = (target: any): EventMediaMetadata[] => {\n const constructor = target instanceof Function ? target : target.constructor;\n return (ReflectUtils.findAllMetadata<EventMediaMetadata[]>(EVENT_MEDIA_METADATA_KEY, constructor) || []).flat();\n};\n\nexport class EventMediaLifeCycler implements ElementDefineLifeCycler {\n private readonly entriesMap = new WeakMap<any, Array<{ mql: MediaQueryList; eventType: string; handler: (e: Event) => void }>>();\n\n onConnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n const metaList = findAllEventMediaMetadata(inst);\n if (metaList.length === 0) return;\n\n const entries: Array<{ mql: MediaQueryList; eventType: string; handler: (e: Event) => void }> = [];\n for (const meta of metaList) {\n const mql = helperHostSet.$w.matchMedia(meta.query);\n const handler = (e: Event) => {\n try {\n inst[meta.propertyKey](e, helperHostSet);\n } catch (err) {\n console.error('[SWC] eventMedia handler error:', err);\n }\n };\n mql.addEventListener(meta.eventType, handler);\n entries.push({ mql, eventType: meta.eventType, handler });\n }\n this.entriesMap.set(inst, entries);\n }\n\n onDisconnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n for (const { mql, eventType, handler } of this.entriesMap.get(inst) ?? []) {\n try {\n mql.removeEventListener(eventType, handler);\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AO;AAC5C,cAAQ,KAAK,EAAE,KAAK,WAAW,KAAK,WAAW,QAAQ,CAAC;AAAA,IAC1D;AACA,SAAK,WAAW,IAAI,MAAM,OAAO;AAAA,EACnC;AAAA,EAEA,eAAe,eAAoC;AACjD,UAAM,OAAO,cAAc;AAC3B,eAAW,EAAE,KAAK,WAAW,QAAQ,KAAK,KAAK,WAAW,IAAI,IAAI,KAAK,CAAC,GAAG;AACzE,UAAI;AACF,YAAI,oBAAoB,WAAW,OAAO;AAAA,MAC5C,SAAS,GAAG;AACV,gBAAQ,MAAM,mCAAmC,CAAC;AAAA,MACpD;AAAA,IACF;AACA,SAAK,WAAW,OAAO,IAAI;AAAA,EAC7B;AACF;",
6
+ "names": []
7
+ }
@@ -36,4 +36,7 @@ __reExport(decorators_exports, require("./applySlot"), module.exports);
36
36
  __reExport(decorators_exports, require("./state"), module.exports);
37
37
  __reExport(decorators_exports, require("./setInterval"), module.exports);
38
38
  __reExport(decorators_exports, require("./setTimeout"), module.exports);
39
+ __reExport(decorators_exports, require("./requestAnimationFrame"), module.exports);
40
+ __reExport(decorators_exports, require("./eventMedia"), module.exports);
41
+ __reExport(decorators_exports, require("./parameter"), module.exports);
39
42
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/index.ts"],
4
- "sourcesContent": ["export * from './addEventListener';\nexport * from './mutationObserver';\nexport * from './resizeObserver';\nexport * from './intersectionObserver';\nexport * from './applyAttribute';\nexport * from './elementDefine';\nexport * from './changedAttribute';\nexport * from './emitCustomEvent';\nexport * from './applyNode';\nexport * from './lifecycles';\nexport * from './query';\nexport * from './applyClass';\nexport * from './applyStyle';\nexport * from './applyAttribute';\nexport * from './applyProperty';\nexport * from './subscribeSwcAppRouteChangeWhileConnected';\nexport * from './subscribeSwcAppMessageWhileConnected';\nexport * from './publishSwcAppMessage';\nexport * from './applySlot';\nexport * from './state';\nexport * from './setInterval';\nexport * from './setTimeout';\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,+BAAd;AACA,+BAAc,+BADd;AAEA,+BAAc,6BAFd;AAGA,+BAAc,mCAHd;AAIA,+BAAc,6BAJd;AAKA,+BAAc,4BALd;AAMA,+BAAc,+BANd;AAOA,+BAAc,8BAPd;AAQA,+BAAc,wBARd;AASA,+BAAc,yBATd;AAUA,+BAAc,oBAVd;AAWA,+BAAc,yBAXd;AAYA,+BAAc,yBAZd;AAaA,+BAAc,6BAbd;AAcA,+BAAc,4BAdd;AAeA,+BAAc,uDAfd;AAgBA,+BAAc,mDAhBd;AAiBA,+BAAc,mCAjBd;AAkBA,+BAAc,wBAlBd;AAmBA,+BAAc,oBAnBd;AAoBA,+BAAc,0BApBd;AAqBA,+BAAc,yBArBd;",
4
+ "sourcesContent": ["export * from './addEventListener';\nexport * from './mutationObserver';\nexport * from './resizeObserver';\nexport * from './intersectionObserver';\nexport * from './applyAttribute';\nexport * from './elementDefine';\nexport * from './changedAttribute';\nexport * from './emitCustomEvent';\nexport * from './applyNode';\nexport * from './lifecycles';\nexport * from './query';\nexport * from './applyClass';\nexport * from './applyStyle';\nexport * from './applyAttribute';\nexport * from './applyProperty';\nexport * from './subscribeSwcAppRouteChangeWhileConnected';\nexport * from './subscribeSwcAppMessageWhileConnected';\nexport * from './publishSwcAppMessage';\nexport * from './applySlot';\nexport * from './state';\nexport * from './setInterval';\nexport * from './setTimeout';\nexport * from './requestAnimationFrame';\nexport * from './eventMedia';\nexport * from './parameter';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,+BAAd;AACA,+BAAc,+BADd;AAEA,+BAAc,6BAFd;AAGA,+BAAc,mCAHd;AAIA,+BAAc,6BAJd;AAKA,+BAAc,4BALd;AAMA,+BAAc,+BANd;AAOA,+BAAc,8BAPd;AAQA,+BAAc,wBARd;AASA,+BAAc,yBATd;AAUA,+BAAc,oBAVd;AAWA,+BAAc,yBAXd;AAYA,+BAAc,yBAZd;AAaA,+BAAc,6BAbd;AAcA,+BAAc,4BAdd;AAeA,+BAAc,uDAfd;AAgBA,+BAAc,mDAhBd;AAiBA,+BAAc,mCAjBd;AAkBA,+BAAc,wBAlBd;AAmBA,+BAAc,oBAnBd;AAoBA,+BAAc,0BApBd;AAqBA,+BAAc,yBArBd;AAsBA,+BAAc,oCAtBd;AAuBA,+BAAc,yBAvBd;AAwBA,+BAAc,wBAxBd;",
6
6
  "names": []
7
7
  }
@@ -36,70 +36,61 @@ module.exports = __toCommonJS(intersectionObserver_exports);
36
36
  var import_core = require("@dooboostore/core");
37
37
  var import_Utils = require("../utils/Utils");
38
38
  const INTERSECTION_OBSERVER_METADATA_KEY = Symbol.for("simple-web-component:intersection-observer");
39
- function intersectionObserver(selectorOrOptions, maybeOptions) {
40
- return (targetObj, propertyKey, descriptor) => {
41
- let selector = "$this";
42
- let options = {};
43
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
44
- selector = selectorOrOptions;
45
- options = maybeOptions ?? {};
46
- } else {
47
- selector = "$this";
48
- options = selectorOrOptions ?? {};
49
- }
50
- const constructor = targetObj.constructor;
51
- let observers = import_core.ReflectUtils.getMetadata(INTERSECTION_OBSERVER_METADATA_KEY, constructor);
52
- if (!observers) {
53
- observers = [];
54
- import_core.ReflectUtils.defineMetadata(INTERSECTION_OBSERVER_METADATA_KEY, observers, constructor);
55
- }
56
- observers.push({ propertyKey, selector, options });
39
+ const applyIntersectionObserver = (selector, options, targetObj, propertyKey) => {
40
+ const constructor = targetObj.constructor;
41
+ let observers = import_core.ReflectUtils.getMetadata(INTERSECTION_OBSERVER_METADATA_KEY, constructor);
42
+ if (!observers) {
43
+ observers = [];
44
+ import_core.ReflectUtils.defineMetadata(INTERSECTION_OBSERVER_METADATA_KEY, observers, constructor);
45
+ }
46
+ observers.push({ propertyKey, selector, options });
47
+ };
48
+ const resolveIntersectionObserverArgs = (selectorOrOptions, maybeOptions, extra) => {
49
+ if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
50
+ return { selector: selectorOrOptions, options: { ...maybeOptions ?? {}, ...extra } };
51
+ }
52
+ return { selector: "$this", options: { ...selectorOrOptions ?? {}, ...extra } };
53
+ };
54
+ const dispatchIntersectionObserver = (selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, extra) => {
55
+ if ((typeof maybeOptionsOrPropertyKey === "string" || typeof maybeOptionsOrPropertyKey === "symbol") && descriptor !== void 0) {
56
+ applyIntersectionObserver("$this", { ...extra }, selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey);
57
+ return;
58
+ }
59
+ const { selector, options } = resolveIntersectionObserverArgs(
60
+ selectorOrOptionsOrTarget,
61
+ maybeOptionsOrPropertyKey,
62
+ extra
63
+ );
64
+ return (targetObj, propertyKey) => {
65
+ applyIntersectionObserver(selector, options, targetObj, propertyKey);
57
66
  };
67
+ };
68
+ function intersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
69
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, {});
58
70
  }
59
- function intersectionObserverThis(options) {
60
- return intersectionObserver("$this", options);
71
+ function intersectionObserverThis(optionsOrTarget, propertyKey, descriptor) {
72
+ return dispatchIntersectionObserver(optionsOrTarget, propertyKey, descriptor, {});
61
73
  }
62
- function intersectionObserverDelegateLight(selectorOrOptions, maybeOptions) {
63
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
64
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "light", delegate: true });
65
- }
66
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "light", delegate: true });
74
+ function intersectionObserverDelegateLight(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
75
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "light", delegate: true });
67
76
  }
68
- function intersectionObserverDelegateShadow(selectorOrOptions, maybeOptions) {
69
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
70
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "shadow", delegate: true });
71
- }
72
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "shadow", delegate: true });
77
+ function intersectionObserverDelegateShadow(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
78
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "shadow", delegate: true });
73
79
  }
74
- function intersectionObserverDelegateAll(selectorOrOptions, maybeOptions) {
75
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
76
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "all", delegate: true });
77
- }
78
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "all", delegate: true });
80
+ function intersectionObserverDelegateAll(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
81
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "all", delegate: true });
79
82
  }
80
- function intersectionObserverDelegate(selectorOrOptions, maybeOptions) {
81
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
82
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "auto", delegate: true });
83
- }
84
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "auto", delegate: true });
83
+ function intersectionObserverDelegate(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
84
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "auto", delegate: true });
85
85
  }
86
- function intersectionObserverLight(selectorOrOptions, maybeOptions) {
87
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
88
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "light" });
89
- }
90
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "light" });
86
+ function intersectionObserverLight(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
87
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "light" });
91
88
  }
92
- function intersectionObserverShadow(selectorOrOptions, maybeOptions) {
93
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
94
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "shadow" });
95
- }
96
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "shadow" });
89
+ function intersectionObserverShadow(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
90
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "shadow" });
97
91
  }
98
- function intersectionObserverAll(selectorOrOptions, maybeOptions) {
99
- if (typeof selectorOrOptions === "string" || typeof selectorOrOptions === "function") {
100
- return intersectionObserver(selectorOrOptions, { ...maybeOptions ?? {}, root: "all" });
101
- }
102
- return intersectionObserver({ ...selectorOrOptions ?? {}, root: "all" });
92
+ function intersectionObserverAll(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor) {
93
+ return dispatchIntersectionObserver(selectorOrOptionsOrTarget, maybeOptionsOrPropertyKey, descriptor, { root: "all" });
103
94
  }
104
95
  function getIntersectionObserverMetadata(target) {
105
96
  const constructor = target instanceof Function ? target : target.constructor;