@dooboostore/simple-web-component 1.0.50 → 1.0.51

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 (241) hide show
  1. package/README.md +735 -354
  2. package/dist/cjs/SwcAppEngine.js.map +2 -2
  3. package/dist/cjs/decorators/addEventListener.js +64 -146
  4. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  5. package/dist/cjs/decorators/applyAttribute.js +36 -48
  6. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  7. package/dist/cjs/decorators/applyClass.js +9 -12
  8. package/dist/cjs/decorators/applyClass.js.map +2 -2
  9. package/dist/cjs/decorators/applyNode.js +14 -22
  10. package/dist/cjs/decorators/applyNode.js.map +2 -2
  11. package/dist/cjs/decorators/applyProperty.js +12 -42
  12. package/dist/cjs/decorators/applyProperty.js.map +2 -2
  13. package/dist/cjs/decorators/applySlot.js +3 -3
  14. package/dist/cjs/decorators/applySlot.js.map +2 -2
  15. package/dist/cjs/decorators/applyStyle.js +9 -12
  16. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  17. package/dist/cjs/decorators/around.js +124 -0
  18. package/dist/cjs/decorators/around.js.map +7 -0
  19. package/dist/cjs/decorators/changedAttribute.js +40 -12
  20. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  21. package/dist/cjs/decorators/elementDefine.js +224 -195
  22. package/dist/cjs/decorators/elementDefine.js.map +3 -3
  23. package/dist/cjs/decorators/emitCustomEvent.js +14 -12
  24. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  25. package/dist/cjs/decorators/eventMedia.js +36 -8
  26. package/dist/cjs/decorators/eventMedia.js.map +2 -2
  27. package/dist/cjs/decorators/fetch.js +278 -0
  28. package/dist/cjs/decorators/fetch.js.map +7 -0
  29. package/dist/cjs/decorators/index.js +5 -2
  30. package/dist/cjs/decorators/index.js.map +2 -2
  31. package/dist/cjs/decorators/intersectionObserver.js +33 -13
  32. package/dist/cjs/decorators/intersectionObserver.js.map +2 -2
  33. package/dist/cjs/decorators/lifecycles.js +11 -11
  34. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  35. package/dist/cjs/decorators/mutationObserver.js +55 -39
  36. package/dist/cjs/decorators/mutationObserver.js.map +3 -3
  37. package/dist/cjs/decorators/parameter.js +92 -9
  38. package/dist/cjs/decorators/parameter.js.map +2 -2
  39. package/dist/cjs/decorators/publishSwcAppMessage.js +2 -2
  40. package/dist/cjs/decorators/publishSwcAppMessage.js.map +2 -2
  41. package/dist/cjs/decorators/query.js +11 -5
  42. package/dist/cjs/decorators/query.js.map +2 -2
  43. package/dist/cjs/decorators/requestAnimationFrame.js +7 -16
  44. package/dist/cjs/decorators/requestAnimationFrame.js.map +2 -2
  45. package/dist/cjs/decorators/resizeObserver.js +41 -17
  46. package/dist/cjs/decorators/resizeObserver.js.map +3 -3
  47. package/dist/cjs/decorators/setInterval.js +36 -25
  48. package/dist/cjs/decorators/setInterval.js.map +2 -2
  49. package/dist/cjs/decorators/setTimeout.js +36 -25
  50. package/dist/cjs/decorators/setTimeout.js.map +2 -2
  51. package/dist/cjs/decorators/state.js +13 -10
  52. package/dist/cjs/decorators/state.js.map +2 -2
  53. package/dist/cjs/decorators/{subscribeSwcAppMessageWhileConnected.js → subscribeSwcAppMessage.js} +20 -21
  54. package/dist/cjs/decorators/subscribeSwcAppMessage.js.map +7 -0
  55. package/dist/cjs/decorators/{subscribeSwcAppRouteChangeWhileConnected.js → subscribeSwcAppRouteChange.js} +23 -19
  56. package/dist/cjs/decorators/subscribeSwcAppRouteChange.js.map +7 -0
  57. package/dist/cjs/decorators/swcAppRoute.js +149 -0
  58. package/dist/cjs/decorators/swcAppRoute.js.map +7 -0
  59. package/dist/cjs/elements/SwcApp.js +70 -0
  60. package/dist/cjs/elements/SwcApp.js.map +2 -2
  61. package/dist/cjs/elements/SwcAppMixin.js +256 -83
  62. package/dist/cjs/elements/SwcAppMixin.js.map +3 -3
  63. package/dist/cjs/types/index.js +5 -1
  64. package/dist/cjs/types/index.js.map +2 -2
  65. package/dist/cjs/utils/Utils.js +36 -15
  66. package/dist/cjs/utils/Utils.js.map +2 -2
  67. package/dist/esm/SwcAppEngine.js.map +2 -2
  68. package/dist/esm/decorators/addEventListener.js +64 -146
  69. package/dist/esm/decorators/addEventListener.js.map +2 -2
  70. package/dist/esm/decorators/applyAttribute.js +36 -48
  71. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  72. package/dist/esm/decorators/applyClass.js +9 -12
  73. package/dist/esm/decorators/applyClass.js.map +2 -2
  74. package/dist/esm/decorators/applyNode.js +15 -23
  75. package/dist/esm/decorators/applyNode.js.map +2 -2
  76. package/dist/esm/decorators/applyProperty.js +12 -42
  77. package/dist/esm/decorators/applyProperty.js.map +2 -2
  78. package/dist/esm/decorators/applySlot.js +3 -3
  79. package/dist/esm/decorators/applySlot.js.map +2 -2
  80. package/dist/esm/decorators/applyStyle.js +9 -12
  81. package/dist/esm/decorators/applyStyle.js.map +2 -2
  82. package/dist/esm/decorators/around.js +105 -0
  83. package/dist/esm/decorators/around.js.map +7 -0
  84. package/dist/esm/decorators/changedAttribute.js +40 -12
  85. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  86. package/dist/esm/decorators/elementDefine.js +222 -193
  87. package/dist/esm/decorators/elementDefine.js.map +3 -3
  88. package/dist/esm/decorators/emitCustomEvent.js +15 -13
  89. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  90. package/dist/esm/decorators/eventMedia.js +36 -8
  91. package/dist/esm/decorators/eventMedia.js.map +2 -2
  92. package/dist/esm/decorators/fetch.js +259 -0
  93. package/dist/esm/decorators/fetch.js.map +7 -0
  94. package/dist/esm/decorators/index.js +5 -2
  95. package/dist/esm/decorators/index.js.map +2 -2
  96. package/dist/esm/decorators/intersectionObserver.js +33 -13
  97. package/dist/esm/decorators/intersectionObserver.js.map +2 -2
  98. package/dist/esm/decorators/lifecycles.js +11 -11
  99. package/dist/esm/decorators/lifecycles.js.map +2 -2
  100. package/dist/esm/decorators/mutationObserver.js +55 -39
  101. package/dist/esm/decorators/mutationObserver.js.map +3 -3
  102. package/dist/esm/decorators/parameter.js +92 -9
  103. package/dist/esm/decorators/parameter.js.map +2 -2
  104. package/dist/esm/decorators/publishSwcAppMessage.js +2 -2
  105. package/dist/esm/decorators/publishSwcAppMessage.js.map +2 -2
  106. package/dist/esm/decorators/query.js +11 -5
  107. package/dist/esm/decorators/query.js.map +2 -2
  108. package/dist/esm/decorators/requestAnimationFrame.js +8 -17
  109. package/dist/esm/decorators/requestAnimationFrame.js.map +2 -2
  110. package/dist/esm/decorators/resizeObserver.js +41 -17
  111. package/dist/esm/decorators/resizeObserver.js.map +2 -2
  112. package/dist/esm/decorators/setInterval.js +37 -26
  113. package/dist/esm/decorators/setInterval.js.map +2 -2
  114. package/dist/esm/decorators/setTimeout.js +37 -26
  115. package/dist/esm/decorators/setTimeout.js.map +2 -2
  116. package/dist/esm/decorators/state.js +13 -10
  117. package/dist/esm/decorators/state.js.map +2 -2
  118. package/dist/esm/decorators/subscribeSwcAppMessage.js +53 -0
  119. package/dist/esm/decorators/subscribeSwcAppMessage.js.map +7 -0
  120. package/dist/esm/decorators/{subscribeSwcAppRouteChangeWhileConnected.js → subscribeSwcAppRouteChange.js} +20 -16
  121. package/dist/esm/decorators/subscribeSwcAppRouteChange.js.map +7 -0
  122. package/dist/esm/decorators/swcAppRoute.js +130 -0
  123. package/dist/esm/decorators/swcAppRoute.js.map +7 -0
  124. package/dist/esm/elements/SwcApp.js +70 -0
  125. package/dist/esm/elements/SwcApp.js.map +2 -2
  126. package/dist/esm/elements/SwcAppMixin.js +258 -85
  127. package/dist/esm/elements/SwcAppMixin.js.map +3 -3
  128. package/dist/esm/types/index.js +5 -1
  129. package/dist/esm/types/index.js.map +2 -2
  130. package/dist/esm/utils/Utils.js +36 -15
  131. package/dist/esm/utils/Utils.js.map +2 -2
  132. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +1886 -999
  133. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  134. package/dist/types/SwcAppEngine.d.ts +1 -0
  135. package/dist/types/SwcAppEngine.d.ts.map +1 -1
  136. package/dist/types/decorators/addEventListener.d.ts +923 -960
  137. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  138. package/dist/types/decorators/applyAttribute.d.ts +26 -38
  139. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  140. package/dist/types/decorators/applyClass.d.ts +1 -3
  141. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  142. package/dist/types/decorators/applyNode.d.ts +15 -17
  143. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  144. package/dist/types/decorators/applyProperty.d.ts +25 -45
  145. package/dist/types/decorators/applyProperty.d.ts.map +1 -1
  146. package/dist/types/decorators/applyStyle.d.ts +1 -3
  147. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  148. package/dist/types/decorators/around.d.ts +87 -0
  149. package/dist/types/decorators/around.d.ts.map +1 -0
  150. package/dist/types/decorators/changedAttribute.d.ts +21 -1
  151. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  152. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  153. package/dist/types/decorators/emitCustomEvent.d.ts +0 -1
  154. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  155. package/dist/types/decorators/eventMedia.d.ts +24 -1
  156. package/dist/types/decorators/eventMedia.d.ts.map +1 -1
  157. package/dist/types/decorators/fetch.d.ts +139 -0
  158. package/dist/types/decorators/fetch.d.ts.map +1 -0
  159. package/dist/types/decorators/index.d.ts +5 -2
  160. package/dist/types/decorators/index.d.ts.map +1 -1
  161. package/dist/types/decorators/intersectionObserver.d.ts +24 -11
  162. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -1
  163. package/dist/types/decorators/lifecycles.d.ts +8 -7
  164. package/dist/types/decorators/lifecycles.d.ts.map +1 -1
  165. package/dist/types/decorators/mutationObserver.d.ts +26 -13
  166. package/dist/types/decorators/mutationObserver.d.ts.map +1 -1
  167. package/dist/types/decorators/parameter.d.ts +84 -6
  168. package/dist/types/decorators/parameter.d.ts.map +1 -1
  169. package/dist/types/decorators/publishSwcAppMessage.d.ts +0 -1
  170. package/dist/types/decorators/publishSwcAppMessage.d.ts.map +1 -1
  171. package/dist/types/decorators/query.d.ts +7 -7
  172. package/dist/types/decorators/query.d.ts.map +1 -1
  173. package/dist/types/decorators/requestAnimationFrame.d.ts +1 -1
  174. package/dist/types/decorators/requestAnimationFrame.d.ts.map +1 -1
  175. package/dist/types/decorators/resizeObserver.d.ts +26 -13
  176. package/dist/types/decorators/resizeObserver.d.ts.map +1 -1
  177. package/dist/types/decorators/setInterval.d.ts +10 -0
  178. package/dist/types/decorators/setInterval.d.ts.map +1 -1
  179. package/dist/types/decorators/setTimeout.d.ts +10 -0
  180. package/dist/types/decorators/setTimeout.d.ts.map +1 -1
  181. package/dist/types/decorators/state.d.ts.map +1 -1
  182. package/dist/types/decorators/subscribeSwcAppMessage.d.ts +44 -0
  183. package/dist/types/decorators/subscribeSwcAppMessage.d.ts.map +1 -0
  184. package/dist/types/decorators/subscribeSwcAppRouteChange.d.ts +60 -0
  185. package/dist/types/decorators/subscribeSwcAppRouteChange.d.ts.map +1 -0
  186. package/dist/types/decorators/swcAppRoute.d.ts +94 -0
  187. package/dist/types/decorators/swcAppRoute.d.ts.map +1 -0
  188. package/dist/types/elements/SwcApp.d.ts.map +1 -1
  189. package/dist/types/elements/SwcAppMixin.d.ts +423 -388
  190. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  191. package/dist/types/types/index.d.ts +43 -4
  192. package/dist/types/types/index.d.ts.map +1 -1
  193. package/dist/types/utils/Utils.d.ts +15 -5
  194. package/dist/types/utils/Utils.d.ts.map +1 -1
  195. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +1886 -999
  196. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  197. package/package.json +8 -6
  198. package/src/SwcAppEngine.ts +1 -0
  199. package/src/decorators/addEventListener.ts +102 -96
  200. package/src/decorators/applyAttribute.ts +76 -138
  201. package/src/decorators/applyClass.ts +8 -14
  202. package/src/decorators/applyNode.ts +33 -41
  203. package/src/decorators/applyProperty.ts +51 -99
  204. package/src/decorators/applySlot.ts +3 -3
  205. package/src/decorators/applyStyle.ts +8 -14
  206. package/src/decorators/around.ts +196 -0
  207. package/src/decorators/changedAttribute.ts +39 -15
  208. package/src/decorators/elementDefine.ts +270 -219
  209. package/src/decorators/emitCustomEvent.ts +17 -13
  210. package/src/decorators/eventMedia.ts +50 -9
  211. package/src/decorators/fetch.ts +454 -0
  212. package/src/decorators/index.ts +5 -2
  213. package/src/decorators/intersectionObserver.ts +38 -24
  214. package/src/decorators/lifecycles.ts +24 -22
  215. package/src/decorators/mutationObserver.ts +71 -52
  216. package/src/decorators/parameter.ts +145 -14
  217. package/src/decorators/publishSwcAppMessage.ts +3 -4
  218. package/src/decorators/query.ts +22 -14
  219. package/src/decorators/requestAnimationFrame.ts +10 -19
  220. package/src/decorators/resizeObserver.ts +50 -29
  221. package/src/decorators/setInterval.ts +37 -26
  222. package/src/decorators/setTimeout.ts +37 -26
  223. package/src/decorators/state.ts +19 -13
  224. package/src/decorators/subscribeSwcAppMessage.ts +106 -0
  225. package/src/decorators/subscribeSwcAppRouteChange.ts +131 -0
  226. package/src/decorators/swcAppRoute.ts +231 -0
  227. package/src/elements/SwcApp.ts +40 -10
  228. package/src/elements/SwcAppMixin.ts +330 -101
  229. package/src/types/index.ts +38 -5
  230. package/src/utils/Utils.ts +50 -18
  231. package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js.map +0 -7
  232. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +0 -7
  233. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js +0 -54
  234. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js.map +0 -7
  235. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +0 -7
  236. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts +0 -23
  237. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts.map +0 -1
  238. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +0 -31
  239. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +0 -1
  240. package/src/decorators/subscribeSwcAppMessageWhileConnected.ts +0 -91
  241. package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +0 -107
@@ -1 +1 @@
1
- {"version":3,"file":"setInterval.d.ts","sourceRoot":"","sources":["../../../src/decorators/setInterval.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElE,eAAO,MAAM,yBAAyB,eAAkD,CAAC;AAEzF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,aAAa,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,GAAG,EAAE,CAAC;IAC1C,+FAA+F;IAC/F,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAYD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,eAAe,CA0C/F;AAED,eAAO,MAAM,0BAA0B,GAAI,QAAQ,GAAG,KAAG,mBAAmB,EAG3E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WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,eAAe,CAyC/F;AAED,eAAO,MAAM,0BAA0B,GAAI,QAAQ,GAAG,KAAG,mBAAmB,EAG3E,CAAC;AAEF,qBAAa,qBAAsB,YAAW,uBAAuB;IACnE,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAmC/C,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;CAWnD"}
@@ -12,6 +12,16 @@ export interface SetTimeoutOptions {
12
12
  parameter?: (set: HelperHostSet) => any[];
13
13
  /** 타이머 등록 직후 1회 호출 (디버깅/로깅용). id는 실제 setTimeout 반환값 - cleanup은 자동으로 처리되므로 직접 clear할 필요 없음. */
14
14
  created?: (set: HelperHostSet, id: number) => void;
15
+ /** [type:'onConnected' 전용] 발화 여부 게이트. Promise<boolean>도 가능. false면 스킵. */
16
+ filter?: (set: HelperHostSet) => boolean | Promise<boolean>;
17
+ /** [type:'onConnected' 전용] 핸들러 직전 훅. await되고, 리턴값은 @setTimeoutBeforeReturn 으로 주입된다. */
18
+ before?: (set: HelperHostSet) => any | Promise<any>;
19
+ /** [type:'onConnected' 전용] 핸들러가 성공/실패해도 항상 실행되는 정리 훅. ctx로 인자/결과/에러. */
20
+ finally?: (set: HelperHostSet, ctx: {
21
+ args: any[];
22
+ result?: any;
23
+ error?: any;
24
+ }) => any | Promise<any>;
15
25
  /**
16
26
  * type:'onConnected' - fire 시 데코레이트된 메서드의 리턴값이 객체이고 이 키의 값이 함수이면 (id: number)로 호출한다.
17
27
  * type:'returnValue' - 리턴값이 함수면 그 자체를, 객체면 이 키의 값이 함수일 때 그 값을 "실제로 실행될 함수"로 사용한다.
@@ -1 +1 @@
1
- {"version":3,"file":"setTimeout.d.ts","sourceRoot":"","sources":["../../../src/decorators/setTimeout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElE,eAAO,MAAM,wBAAwB,eAAiD,CAAC;AAEvF,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,GAAG,EAAE,CAAC;IAC1C,8FAA8F;IAC9F,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAYD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CA6C1F;AAED,eAAO,MAAM,yBAAyB,GAAI,QAAQ,GAAG,KAAG,kBAAkB,EAGzE,CAAC;AAEF,qBAAa,oBAAqB,YAAW,uBAAuB;IAClE,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAsB/C,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;CAWnD"}
1
+ {"version":3,"file":"setTimeout.d.ts","sourceRoot":"","sources":["../../../src/decorators/setTimeout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElE,eAAO,MAAM,wBAAwB,eAAiD,CAAC;AAEvF,MAAM,MAAM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aAAa,GAAG,IAAI;IAmC/C,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;CAWnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/decorators/state.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAI3E,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC1E,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAC;AAgEvD,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,aAAa,EAG/D,CAAC"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/decorators/state.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAI3E,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC1E,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAC;AAuEvD,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,aAAa,EAG/D,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { SwcAppMessage, SwcAppMessageSubject, HelperHostSet } from '../types';
2
+ export declare const SUBSCRIBE_SWC_APP_MESSAGE_METADATA_KEY: unique symbol;
3
+ export interface SwcAppMessageOptions<Data = any, BeforeReturn = any, Result = any> {
4
+ /** 메시지 수신 시 핸들러 실행 여부 게이트. Promise<boolean>도 되어 async 판정 가능. false면 스킵. */
5
+ filter?: (message: SwcAppMessage<Data>, currentThis: any) => boolean | Promise<boolean>;
6
+ /** filter 통과 후 핸들러 직전 훅. await되고, 리턴값은 @appMessageBeforeReturn 으로 핸들러에 주입된다. */
7
+ before?: (message: SwcAppMessage<Data>, currentThis: any) => BeforeReturn | Promise<BeforeReturn>;
8
+ /** 핸들러가 성공/실패해도 항상 실행되는 정리 훅. ctx로 핸들러 인자/결과/에러를 받는다. 에러는 삼키지 않고 전파. */
9
+ finally?: (message: SwcAppMessage<Data>, currentThis: any, ctx: {
10
+ args: any[];
11
+ result?: Result;
12
+ error?: any;
13
+ }) => any | Promise<any>;
14
+ /**
15
+ * 늦게 연결된 경우 과거 메시지 재생 방식. 이미 연결된 구독자에게는 항상 live로 쏨.
16
+ * - 미지정/'subject': live만. 지나간 건 못 받음 (기본값, 기존 동작)
17
+ * - 'behavior': 마지막 1개 재생
18
+ * - 'replay': 버퍼 전체 시간순 재생
19
+ */
20
+ subject?: SwcAppMessageSubject;
21
+ /**
22
+ * 재생 시점. 기본 'connected' (연결 즉시).
23
+ * - 'connectedDone': 엘리먼트 render 완료 후 (_connectedDone). @innerHtml 등
24
+ * DOM 타겟이 필요한 핸들러는 이걸로 (replay가 render보다 먼저 와서 증발하는 레이스 방지).
25
+ */
26
+ trigger?: 'connected' | 'connectedDone';
27
+ }
28
+ export interface SwcAppMessageSubscriberMetadata extends SwcAppMessageOptions {
29
+ propertyKey: string | symbol;
30
+ messageType?: string;
31
+ }
32
+ export declare function subscribeSwcAppMessage(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
33
+ export declare function subscribeSwcAppMessage(messageType: string): MethodDecorator;
34
+ export declare function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;
35
+ export declare function subscribeSwcAppMessage<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: SwcAppMessageOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;
36
+ export declare const receiveMessage: typeof subscribeSwcAppMessage;
37
+ export declare const getSubscribeSwcAppMessageMetadata: (target: any) => SwcAppMessageSubscriberMetadata[] | undefined;
38
+ import { ElementDefineLifeCycler } from '../types';
39
+ export declare class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {
40
+ onConnected(_helperHostSet: HelperHostSet): void;
41
+ /** SwcAppMixin 이 구독 대상 메타를 꺼낼 때 사용 */
42
+ getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined;
43
+ }
44
+ //# sourceMappingURL=subscribeSwcAppMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribeSwcAppMessage.d.ts","sourceRoot":"","sources":["../../../src/decorators/subscribeSwcAppMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAoC,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhH,eAAO,MAAM,sCAAsC,eAA+D,CAAC;AAEnH,MAAM,WAAW,oBAAoB,CAAC,IAAI,GAAG,GAAG,EAAE,YAAY,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IAChF,2EAA2E;IAC3E,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxF,gFAAgF;IAChF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAClG,wEAAwE;IACxE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE;QAAE,IAAI,EAAE,GAA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,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,qBAAa,0BAA2B,YAAW,uBAAuB;IACxE,WAAW,CAAC,cAAc,EAAE,aAAa,GAAG,IAAI;IAIhD,sCAAsC;IACtC,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,+BAA+B,EAAE,GAAG,SAAS;CAGzF"}
@@ -0,0 +1,60 @@
1
+ import { Router } from '@dooboostore/core-web';
2
+ import { HelperHostSet } from '../types';
3
+ export declare const SUBSCRIBE_SWC_APP_ROUTE_CHANGE_METADATA_KEY: unique symbol;
4
+ export type RoutePathType = string | string[] | ((currentThis: any) => string | string[]);
5
+ export interface SwcAppRouteChangeSubscriberMetadata {
6
+ propertyKey: string | symbol;
7
+ options?: SwcAppRouteChangeOptions;
8
+ }
9
+ export interface SwcAppRouteChangeOptions<BeforeReturn = any, Result = any> {
10
+ path?: RoutePathType;
11
+ /** 라우트 변경 시 핸들러 실행 여부 게이트. Promise<boolean>도 되어 async 가드(인증 체크 등) 가능. false면 스킵. */
12
+ filter?: (router: Router, meta: {
13
+ currentThis: any;
14
+ helper: HelperHostSet;
15
+ }) => boolean | Promise<boolean>;
16
+ /** filter 통과 후 핸들러 직전 훅. await되고, 리턴값은 @routeChangeBeforeReturn 으로 핸들러에 주입된다. */
17
+ before?: (router: Router, meta: {
18
+ currentThis: any;
19
+ helper: HelperHostSet;
20
+ }) => BeforeReturn | Promise<BeforeReturn>;
21
+ /** 핸들러가 성공/실패해도 항상 실행되는 정리 훅. ctx로 핸들러 인자/결과/에러를 받는다. 에러는 삼키지 않고 전파. */
22
+ finally?: (router: Router, meta: {
23
+ currentThis: any;
24
+ helper: HelperHostSet;
25
+ }, ctx: {
26
+ args: any[];
27
+ result?: Result;
28
+ error?: any;
29
+ }) => any | Promise<any>;
30
+ order?: number;
31
+ valueKey?: symbol | string;
32
+ /**
33
+ * 늦게 붙은 인스턴스에 마지막 라우트 재생 시점. 기본 'connected'.
34
+ * - 'connectedDone': render 완료 후 (_connectedDone). DOM 타겟 필요한 핸들러용.
35
+ * - live 라우트 변경(전체 방송) 때는 항상 실행. replay에만 적용.
36
+ */
37
+ trigger?: 'connected' | 'connectedDone';
38
+ /**
39
+ * 언제 실행할지. 기본 'match'(경로가 맞을 때마다 — 기존 동작).
40
+ * - 'enter': 안 맞다가 맞게 됐을 때 (처음 붙을 때의 재생 포함)
41
+ * - 'update': 계속 맞는데 경로나 query 가 바뀌었을 때
42
+ * - 'leave': 맞다가 안 맞게 됐을 때 (요소가 붙어 있을 때만 — 교체되는 페이지는 onDisconnected 가 담당)
43
+ * - 'beforeLeave': 이 경로를 떠나기 전. false(또는 Promise<false>)를 리턴하면 이동 취소 (router.go / 뒤로·앞으로 가기)
44
+ */
45
+ on?: 'match' | 'enter' | 'update' | 'leave' | 'beforeLeave';
46
+ }
47
+ export declare function subscribeSwcAppRouteChange(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
48
+ export declare function subscribeSwcAppRouteChange(pathPattern: RoutePathType): MethodDecorator;
49
+ export declare function subscribeSwcAppRouteChange<BeforeReturn = any, Result = any>(pathPattern: RoutePathType, config: Omit<SwcAppRouteChangeOptions<NoInfer<BeforeReturn>, NoInfer<Result>>, 'path'>): MethodDecorator;
50
+ export declare function subscribeSwcAppRouteChange<BeforeReturn = any, Result = any>(options: SwcAppRouteChangeOptions<NoInfer<BeforeReturn>, NoInfer<Result>>): MethodDecorator;
51
+ export declare const changedRoute: typeof subscribeSwcAppRouteChange;
52
+ export declare function subscribeSwcAppRouteChangeConnectedDone<BeforeReturn = any, Result = any>(pathPattern: RoutePathType, config?: Omit<SwcAppRouteChangeOptions<NoInfer<BeforeReturn>, NoInfer<Result>>, 'path' | 'trigger'>): MethodDecorator;
53
+ export declare const getSubscribeSwcAppRouteChangeMetadata: (target: any) => SwcAppRouteChangeSubscriberMetadata[];
54
+ import { ElementDefineLifeCycler } from '../types';
55
+ export declare class RouteSubscribeLifeCycler implements ElementDefineLifeCycler {
56
+ onConnected(_helperHostSet: HelperHostSet): void;
57
+ /** SwcAppMixin 이 구독 대상 메타를 꺼낼 때 사용 */
58
+ getMetadata(helperHostSet: HelperHostSet): SwcAppRouteChangeSubscriberMetadata[];
59
+ }
60
+ //# sourceMappingURL=subscribeSwcAppRouteChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribeSwcAppRouteChange.d.ts","sourceRoot":"","sources":["../../../src/decorators/subscribeSwcAppRouteChange.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,2CAA2C,eAAoE,CAAC;AAE7H,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAE1F,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB,CAAC,YAAY,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IACxE,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,oFAAoF;IACpF,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3G,iFAAiF;IACjF,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACrH,wEAAwE;IACxE,OAA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AIvD,wBAAgB,uCAAuC,CAAC,YAAY,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,eAAe,CAE1O;AAGD,eAAO,MAAM,qCAAqC,GAAI,QAAQ,GAAG,KAAG,mCAAmC,EAOtG,CAAC;AAQF,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,qBAAa,wBAAyB,YAAW,uBAAuB;IACtE,WAAW,CAAC,cAAc,EAAE,aAAa,GAAG,IAAI;IAIhD,sCAAsC;IACtC,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,mCAAmC,EAAE;CAGjF"}
@@ -0,0 +1,94 @@
1
+ import type { RouteAction, Router, RouterMethodOptions } from '@dooboostore/core-web';
2
+ import type { HelperHostSet } from '../types';
3
+ export declare const SWC_APP_ROUTE_METADATA_KEY: unique symbol;
4
+ export interface SwcAppRouteMetadata {
5
+ propertyKey: string | symbol;
6
+ options?: SwcAppRouteOptions;
7
+ }
8
+ /** router.go 의 이동 설정 (리턴값으로 직접 줄 때) */
9
+ export type SwcAppRouteGoConfig = {
10
+ path: RouteAction;
11
+ replace?: boolean;
12
+ state?: RouterMethodOptions;
13
+ scrollToTop?: boolean;
14
+ };
15
+ /**
16
+ * type 'go' 일 때 메서드 리턴값 → 이동할 곳.
17
+ * - string / RouteAction({ path, searchParams }) : router.go 로 이동
18
+ * - SwcAppRouteGoConfig({ path, replace, state, scrollToTop }) : 그대로 router.go
19
+ * - number : history 이동 (-1 = 뒤로)
20
+ * - undefined / null / false : 이동하지 않음 (조건부 이동)
21
+ */
22
+ export type SwcAppRouteGoValue = RouteAction | SwcAppRouteGoConfig | number | undefined | null | false;
23
+ /**
24
+ * 어떤 Router 메서드로 이동할지. 기본 'go'.
25
+ * - go: string / RouteAction / SwcAppRouteGoConfig / number (가드 적용)
26
+ * - push / replace: RouteAction (가드 적용)
27
+ * - pushDeleteSearchParam / replaceDeleteSearchParam / pushDeleteHashSearchParam / replaceDeleteHashSearchParam: string | string[]
28
+ * - pushAddSearchParam / replaceAddSearchParam: [[key, value], ...]
29
+ * - pushUpsertSearchParam / replaceUpsertSearchParam: { key: value | value[] }
30
+ * query 만 바꾸는 메서드는 경로가 그대로라 beforeLeave 가드 대상이 아니다.
31
+ * 어느 경우든 undefined / null / false 를 리턴하면 아무 것도 하지 않는다.
32
+ */
33
+ export type SwcAppRouteType = 'go' | 'push' | 'replace' | 'pushDeleteSearchParam' | 'pushDeleteHashSearchParam' | 'pushAddSearchParam' | 'pushUpsertSearchParam' | 'replaceDeleteSearchParam' | 'replaceDeleteHashSearchParam' | 'replaceAddSearchParam' | 'replaceUpsertSearchParam';
34
+ export interface SwcAppRouteOptions {
35
+ /** Router 메서드. 기본 'go' */
36
+ type?: SwcAppRouteType;
37
+ /** 기본 replace (type 'go' 전용. 리턴값이 SwcAppRouteGoConfig 면 그쪽이 우선) */
38
+ replace?: boolean;
39
+ /** 기본 state (go 는 SwcAppRouteGoConfig 의 state, 나머지는 두 번째 인자) */
40
+ state?: RouterMethodOptions;
41
+ /** 기본 scrollToTop (type 'go' 전용. router.go 기본값 true) */
42
+ scrollToTop?: boolean;
43
+ /** false 를 리턴하면 이동하지 않는다. target = 이동을 하는 Router, value = valueKey 로 꺼낸 리턴값 */
44
+ filter?: (target: Router, value: any, meta: {
45
+ currentThis: any;
46
+ helper: HelperHostSet;
47
+ }) => boolean;
48
+ /**
49
+ * Custom key to extract value from return object.
50
+ * If not provided, uses SWC_APP_ROUTE_METADATA_KEY by default.
51
+ * Useful when this decorator is stacked with others on the same method.
52
+ *
53
+ * Example:
54
+ * @swcAppRoute({ valueKey: 'go' })
55
+ * @publishSwcAppMessage('saved', { valueKey: 'saved' })
56
+ * save() {
57
+ * return { go: '/done', saved: { id: 1 } };
58
+ * }
59
+ */
60
+ valueKey?: symbol | string;
61
+ }
62
+ export declare function swcAppRoute(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
63
+ export declare function swcAppRoute(options: SwcAppRouteOptions): MethodDecorator;
64
+ /** type 을 고정한 별칭. @swcAppRoutePush / @swcAppRoutePush({ state }) 둘 다. replace/scrollToTop 은 go 전용 */
65
+ type SwcAppRouteTypedOptions<T extends SwcAppRouteType> = T extends 'go' ? Omit<SwcAppRouteOptions, 'type'> : Omit<SwcAppRouteOptions, 'type' | 'replace' | 'scrollToTop'>;
66
+ type SwcAppRouteTypedDecorator<T extends SwcAppRouteType> = {
67
+ (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
68
+ (options: SwcAppRouteTypedOptions<T>): MethodDecorator;
69
+ };
70
+ /** 리턴: string / RouteAction / SwcAppRouteGoConfig / number → router.go */
71
+ export declare const swcAppRouteGo: SwcAppRouteTypedDecorator<"go">;
72
+ /** 리턴: RouteAction → router.push */
73
+ export declare const swcAppRoutePush: SwcAppRouteTypedDecorator<"push">;
74
+ /** 리턴: RouteAction → router.replace */
75
+ export declare const swcAppRouteReplace: SwcAppRouteTypedDecorator<"replace">;
76
+ /** 리턴: string | string[] → router.pushDeleteSearchParam */
77
+ export declare const swcAppRoutePushDeleteSearchParam: SwcAppRouteTypedDecorator<"pushDeleteSearchParam">;
78
+ /** 리턴: string | string[] → router.pushDeleteHashSearchParam */
79
+ export declare const swcAppRoutePushDeleteHashSearchParam: SwcAppRouteTypedDecorator<"pushDeleteHashSearchParam">;
80
+ /** 리턴: [[key, value], ...] → router.pushAddSearchParam */
81
+ export declare const swcAppRoutePushAddSearchParam: SwcAppRouteTypedDecorator<"pushAddSearchParam">;
82
+ /** 리턴: { key: value | value[] } → router.pushUpsertSearchParam */
83
+ export declare const swcAppRoutePushUpsertSearchParam: SwcAppRouteTypedDecorator<"pushUpsertSearchParam">;
84
+ /** 리턴: string | string[] → router.replaceDeleteSearchParam */
85
+ export declare const swcAppRouteReplaceDeleteSearchParam: SwcAppRouteTypedDecorator<"replaceDeleteSearchParam">;
86
+ /** 리턴: string | string[] → router.replaceDeleteHashSearchParam */
87
+ export declare const swcAppRouteReplaceDeleteHashSearchParam: SwcAppRouteTypedDecorator<"replaceDeleteHashSearchParam">;
88
+ /** 리턴: [[key, value], ...] → router.replaceAddSearchParam */
89
+ export declare const swcAppRouteReplaceAddSearchParam: SwcAppRouteTypedDecorator<"replaceAddSearchParam">;
90
+ /** 리턴: { key: value | value[] } → router.replaceUpsertSearchParam */
91
+ export declare const swcAppRouteReplaceUpsertSearchParam: SwcAppRouteTypedDecorator<"replaceUpsertSearchParam">;
92
+ export declare const getSwcAppRouteMetadata: (target: any) => SwcAppRouteMetadata[] | undefined;
93
+ export {};
94
+ //# sourceMappingURL=swcAppRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swcAppRoute.d.ts","sourceRoot":"","sources":["../../../src/decorators/swcAppRoute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,0BAA0B,eAAmD,CAAC;AAE3F,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,uCAAuC;AACvC,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/H;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,mBAAmB,GAAG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