marko 5.20.9 → 5.21.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. package/dist/compiler/config.js +1 -2
  2. package/dist/compiler/index.js +1 -2
  3. package/dist/compiler/modules.js +1 -2
  4. package/dist/core-tags/components/init-components-tag.js +1 -2
  5. package/dist/core-tags/components/preferred-script-location-tag.js +1 -2
  6. package/dist/core-tags/components/preserve-tag/index-browser.js +1 -2
  7. package/dist/core-tags/components/preserve-tag/index.js +1 -2
  8. package/dist/core-tags/core/__flush_here_and_after__.js +35 -24
  9. package/dist/core-tags/core/await/AsyncValue.js +1 -2
  10. package/dist/core-tags/core/await/client-reorder-runtime.js +1 -2
  11. package/dist/core-tags/core/await/renderer.js +1 -2
  12. package/dist/core-tags/core/await/reorderer-renderer.js +1 -2
  13. package/dist/index.js +1 -2
  14. package/dist/loader/index-browser.js +1 -2
  15. package/dist/loader/index.js +1 -2
  16. package/dist/node-require/browser-refresh.js +1 -2
  17. package/dist/node-require/hot-reload.js +1 -2
  18. package/dist/node-require/index.js +1 -2
  19. package/dist/runtime/RenderResult.js +1 -2
  20. package/dist/runtime/components/Component.js +1 -2
  21. package/dist/runtime/components/ComponentDef.js +1 -2
  22. package/dist/runtime/components/ComponentsContext.js +1 -2
  23. package/dist/runtime/components/GlobalComponentsContext.js +1 -2
  24. package/dist/runtime/components/KeySequence.js +1 -2
  25. package/dist/runtime/components/ServerComponent.js +1 -2
  26. package/dist/runtime/components/State.js +1 -2
  27. package/dist/runtime/components/attach-detach.js +1 -2
  28. package/dist/runtime/components/beginComponent/index-browser.js +1 -2
  29. package/dist/runtime/components/beginComponent/index.js +1 -2
  30. package/dist/runtime/components/defineComponent.js +1 -2
  31. package/dist/runtime/components/dom-data.js +1 -2
  32. package/dist/runtime/components/endComponent/index-browser.js +1 -2
  33. package/dist/runtime/components/endComponent/index.js +1 -2
  34. package/dist/runtime/components/entry/index-browser.js +1 -2
  35. package/dist/runtime/components/entry/index.js +1 -2
  36. package/dist/runtime/components/event-delegation.js +1 -2
  37. package/dist/runtime/components/index.js +1 -2
  38. package/dist/runtime/components/init-components/index-browser.js +1 -2
  39. package/dist/runtime/components/init-components/index.js +1 -2
  40. package/dist/runtime/components/registry/index-browser.js +1 -2
  41. package/dist/runtime/components/registry/index.js +1 -2
  42. package/dist/runtime/components/renderer.js +1 -2
  43. package/dist/runtime/components/update-manager.js +1 -2
  44. package/dist/runtime/components/util/index-browser.js +1 -2
  45. package/dist/runtime/components/util/index.js +1 -2
  46. package/dist/runtime/createOut.js +1 -2
  47. package/dist/runtime/dom-insert.js +1 -2
  48. package/dist/runtime/events.js +1 -2
  49. package/dist/runtime/helpers/_change-case.js +1 -2
  50. package/dist/runtime/helpers/assign.js +1 -2
  51. package/dist/runtime/helpers/class-value.js +1 -2
  52. package/dist/runtime/helpers/dynamic-tag.js +1 -2
  53. package/dist/runtime/helpers/load-nested-tag.js +1 -2
  54. package/dist/runtime/helpers/merge.js +1 -2
  55. package/dist/runtime/helpers/render-tag.js +1 -2
  56. package/dist/runtime/helpers/style-value.js +1 -2
  57. package/dist/runtime/helpers/to-string.js +1 -2
  58. package/dist/runtime/html/AsyncStream.js +1 -2
  59. package/dist/runtime/html/BufferedWriter.js +1 -2
  60. package/dist/runtime/html/StringWriter.js +1 -2
  61. package/dist/runtime/html/create-readable/index-browser.js +1 -2
  62. package/dist/runtime/html/create-readable/index.js +1 -2
  63. package/dist/runtime/html/helpers/_dynamic-attr.js +1 -2
  64. package/dist/runtime/html/helpers/attr.js +1 -2
  65. package/dist/runtime/html/helpers/attrs.js +1 -2
  66. package/dist/runtime/html/helpers/class-attr.js +1 -2
  67. package/dist/runtime/html/helpers/data-marko.js +1 -2
  68. package/dist/runtime/html/helpers/escape-quotes.js +1 -2
  69. package/dist/runtime/html/helpers/escape-script-placeholder.js +1 -2
  70. package/dist/runtime/html/helpers/escape-style-placeholder.js +1 -2
  71. package/dist/runtime/html/helpers/escape-xml.js +1 -2
  72. package/dist/runtime/html/helpers/merge-attrs.js +1 -2
  73. package/dist/runtime/html/helpers/props-script.js +1 -2
  74. package/dist/runtime/html/helpers/style-attr.js +1 -2
  75. package/dist/runtime/html/hot-reload.js +1 -2
  76. package/dist/runtime/html/index.js +1 -2
  77. package/dist/runtime/queueMicrotask.js +1 -2
  78. package/dist/runtime/renderable.js +1 -2
  79. package/dist/runtime/setImmediate/index-browser.js +1 -2
  80. package/dist/runtime/setImmediate/index-worker.js +1 -2
  81. package/dist/runtime/setImmediate/index.js +1 -2
  82. package/dist/runtime/vdom/AsyncVDOMBuilder.js +1 -2
  83. package/dist/runtime/vdom/VComponent.js +1 -2
  84. package/dist/runtime/vdom/VDocumentFragment.js +1 -2
  85. package/dist/runtime/vdom/VElement.js +1 -2
  86. package/dist/runtime/vdom/VFragment.js +1 -2
  87. package/dist/runtime/vdom/VNode.js +1 -2
  88. package/dist/runtime/vdom/VText.js +1 -2
  89. package/dist/runtime/vdom/helpers/attrs.js +1 -2
  90. package/dist/runtime/vdom/helpers/const.js +1 -2
  91. package/dist/runtime/vdom/helpers/v-element.js +1 -2
  92. package/dist/runtime/vdom/helpers/v-text.js +1 -2
  93. package/dist/runtime/vdom/hot-reload.js +1 -2
  94. package/dist/runtime/vdom/index.js +1 -2
  95. package/dist/runtime/vdom/morphdom/fragment.js +1 -2
  96. package/dist/runtime/vdom/morphdom/helpers.js +1 -2
  97. package/dist/runtime/vdom/morphdom/index.js +1 -2
  98. package/dist/runtime/vdom/morphdom/specialElHandlers.js +1 -2
  99. package/dist/runtime/vdom/parse-html.js +1 -2
  100. package/dist/runtime/vdom/preserve-attrs.js +1 -2
  101. package/dist/runtime/vdom/vdom.js +1 -2
  102. package/dist/taglib/index.js +1 -2
  103. package/package.json +4 -5
  104. package/src/core-tags/core/__flush_here_and_after__.js +34 -22
  105. package/LICENSE +0 -21
  106. package/dist/compiler/config.js.map +0 -1
  107. package/dist/compiler/index.js.map +0 -1
  108. package/dist/compiler/modules.js.map +0 -1
  109. package/dist/core-tags/components/init-components-tag.js.map +0 -1
  110. package/dist/core-tags/components/preferred-script-location-tag.js.map +0 -1
  111. package/dist/core-tags/components/preserve-tag/index-browser.js.map +0 -1
  112. package/dist/core-tags/components/preserve-tag/index.js.map +0 -1
  113. package/dist/core-tags/core/__flush_here_and_after__.js.map +0 -1
  114. package/dist/core-tags/core/await/AsyncValue.js.map +0 -1
  115. package/dist/core-tags/core/await/client-reorder-runtime.js.map +0 -1
  116. package/dist/core-tags/core/await/renderer.js.map +0 -1
  117. package/dist/core-tags/core/await/reorderer-renderer.js.map +0 -1
  118. package/dist/index.js.map +0 -1
  119. package/dist/loader/index-browser.js.map +0 -1
  120. package/dist/loader/index.js.map +0 -1
  121. package/dist/node-require/browser-refresh.js.map +0 -1
  122. package/dist/node-require/hot-reload.js.map +0 -1
  123. package/dist/node-require/index.js.map +0 -1
  124. package/dist/runtime/RenderResult.js.map +0 -1
  125. package/dist/runtime/components/Component.js.map +0 -1
  126. package/dist/runtime/components/ComponentDef.js.map +0 -1
  127. package/dist/runtime/components/ComponentsContext.js.map +0 -1
  128. package/dist/runtime/components/GlobalComponentsContext.js.map +0 -1
  129. package/dist/runtime/components/KeySequence.js.map +0 -1
  130. package/dist/runtime/components/ServerComponent.js.map +0 -1
  131. package/dist/runtime/components/State.js.map +0 -1
  132. package/dist/runtime/components/attach-detach.js.map +0 -1
  133. package/dist/runtime/components/beginComponent/index-browser.js.map +0 -1
  134. package/dist/runtime/components/beginComponent/index.js.map +0 -1
  135. package/dist/runtime/components/defineComponent.js.map +0 -1
  136. package/dist/runtime/components/dom-data.js.map +0 -1
  137. package/dist/runtime/components/endComponent/index-browser.js.map +0 -1
  138. package/dist/runtime/components/endComponent/index.js.map +0 -1
  139. package/dist/runtime/components/entry/index-browser.js.map +0 -1
  140. package/dist/runtime/components/entry/index.js.map +0 -1
  141. package/dist/runtime/components/event-delegation.js.map +0 -1
  142. package/dist/runtime/components/index.js.map +0 -1
  143. package/dist/runtime/components/init-components/index-browser.js.map +0 -1
  144. package/dist/runtime/components/init-components/index.js.map +0 -1
  145. package/dist/runtime/components/registry/index-browser.js.map +0 -1
  146. package/dist/runtime/components/registry/index.js.map +0 -1
  147. package/dist/runtime/components/renderer.js.map +0 -1
  148. package/dist/runtime/components/update-manager.js.map +0 -1
  149. package/dist/runtime/components/util/index-browser.js.map +0 -1
  150. package/dist/runtime/components/util/index.js.map +0 -1
  151. package/dist/runtime/createOut.js.map +0 -1
  152. package/dist/runtime/dom-insert.js.map +0 -1
  153. package/dist/runtime/events.js.map +0 -1
  154. package/dist/runtime/helpers/_change-case.js.map +0 -1
  155. package/dist/runtime/helpers/assign.js.map +0 -1
  156. package/dist/runtime/helpers/class-value.js.map +0 -1
  157. package/dist/runtime/helpers/dynamic-tag.js.map +0 -1
  158. package/dist/runtime/helpers/load-nested-tag.js.map +0 -1
  159. package/dist/runtime/helpers/merge.js.map +0 -1
  160. package/dist/runtime/helpers/render-tag.js.map +0 -1
  161. package/dist/runtime/helpers/style-value.js.map +0 -1
  162. package/dist/runtime/helpers/to-string.js.map +0 -1
  163. package/dist/runtime/html/AsyncStream.js.map +0 -1
  164. package/dist/runtime/html/BufferedWriter.js.map +0 -1
  165. package/dist/runtime/html/StringWriter.js.map +0 -1
  166. package/dist/runtime/html/create-readable/index-browser.js.map +0 -1
  167. package/dist/runtime/html/create-readable/index.js.map +0 -1
  168. package/dist/runtime/html/helpers/_dynamic-attr.js.map +0 -1
  169. package/dist/runtime/html/helpers/attr.js.map +0 -1
  170. package/dist/runtime/html/helpers/attrs.js.map +0 -1
  171. package/dist/runtime/html/helpers/class-attr.js.map +0 -1
  172. package/dist/runtime/html/helpers/data-marko.js.map +0 -1
  173. package/dist/runtime/html/helpers/escape-quotes.js.map +0 -1
  174. package/dist/runtime/html/helpers/escape-script-placeholder.js.map +0 -1
  175. package/dist/runtime/html/helpers/escape-style-placeholder.js.map +0 -1
  176. package/dist/runtime/html/helpers/escape-xml.js.map +0 -1
  177. package/dist/runtime/html/helpers/merge-attrs.js.map +0 -1
  178. package/dist/runtime/html/helpers/props-script.js.map +0 -1
  179. package/dist/runtime/html/helpers/style-attr.js.map +0 -1
  180. package/dist/runtime/html/hot-reload.js.map +0 -1
  181. package/dist/runtime/html/index.js.map +0 -1
  182. package/dist/runtime/queueMicrotask.js.map +0 -1
  183. package/dist/runtime/renderable.js.map +0 -1
  184. package/dist/runtime/setImmediate/index-browser.js.map +0 -1
  185. package/dist/runtime/setImmediate/index-worker.js.map +0 -1
  186. package/dist/runtime/setImmediate/index.js.map +0 -1
  187. package/dist/runtime/vdom/AsyncVDOMBuilder.js.map +0 -1
  188. package/dist/runtime/vdom/VComponent.js.map +0 -1
  189. package/dist/runtime/vdom/VDocumentFragment.js.map +0 -1
  190. package/dist/runtime/vdom/VElement.js.map +0 -1
  191. package/dist/runtime/vdom/VFragment.js.map +0 -1
  192. package/dist/runtime/vdom/VNode.js.map +0 -1
  193. package/dist/runtime/vdom/VText.js.map +0 -1
  194. package/dist/runtime/vdom/helpers/attrs.js.map +0 -1
  195. package/dist/runtime/vdom/helpers/const.js.map +0 -1
  196. package/dist/runtime/vdom/helpers/v-element.js.map +0 -1
  197. package/dist/runtime/vdom/helpers/v-text.js.map +0 -1
  198. package/dist/runtime/vdom/hot-reload.js.map +0 -1
  199. package/dist/runtime/vdom/index.js.map +0 -1
  200. package/dist/runtime/vdom/morphdom/fragment.js.map +0 -1
  201. package/dist/runtime/vdom/morphdom/helpers.js.map +0 -1
  202. package/dist/runtime/vdom/morphdom/index.js.map +0 -1
  203. package/dist/runtime/vdom/morphdom/specialElHandlers.js.map +0 -1
  204. package/dist/runtime/vdom/parse-html.js.map +0 -1
  205. package/dist/runtime/vdom/preserve-attrs.js.map +0 -1
  206. package/dist/runtime/vdom/vdom.js.map +0 -1
  207. package/dist/taglib/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/Component.js"],"names":["domInsert","require","defaultCreateOut","getComponentsContext","componentsUtil","componentLookup","destroyNodeRecursive","EventEmitter","RenderResult","SubscriptionTracker","inherit","updateManager","morphdom","eventDelegation","domData","componentsByDOMNode","keyedElementsByComponentId","CONTEXT_KEY","hasOwnProperty","Object","prototype","slice","Array","COMPONENT_SUBSCRIBE_TO_OPTIONS","NON_COMPONENT_SUBSCRIBE_TO_OPTIONS","addDestroyListener","emit","ELEMENT_NODE","removeListener","removeEventListenerHandle","walkFragments","fragment","node","firstChild","handleCustomEventWithMethodListener","component","targetMethodName","args","extraArgs","push","concat","targetComponent","targetMethod","Error","apply","resolveKeyHelper","key","index","resolveComponentIdHelper","id","processUpdateHandlers","stateChanges","oldState","handlerMethod","handlers","propName","call","handlerMethodName","forEach","handler","propertyName","newValue","oldValue","checkInputChanged","existingComponent","oldInput","newInput","oldKeys","keys","newKeys","len","length","i","componentProto","Component","undefined","ssrKeyedElements","subscribeTo","target","TypeError","subscriptions","subscribeToOptions","eventType","customEvents","isOnce","arguments","getElId","getEl","keyedElement","el","getEls","els","getComponent","rootNode","get","getComponents","lookup","map","filter","Boolean","destroy","root","nodes","parentNode","removeChild","detached","set","removeAllListeners","isDestroyed","state","newState","setState","name","value","k","setStateDirty","replaceState","input","onInput","out","updatedInput","$global","forceUpdate","update","shouldUpdate","self","renderer","afterInsert","isHydrate","host","globalData","createOut","sync","componentsContext","globalComponentsContext","result","targetNode","remove","eventListenerHandles","scope","finalCustomEvents","customEvent","nodeType","onCreate","onRender","onUpdate","onMount","onDestroy","elId","module","exports"],"mappings":"AAAA;AACA;;;;AAIA,IAAIA,SAAS,GAAGC,OAAO,CAAC,eAAD,CAAvB;AACA,IAAIC,gBAAgB,GAAGD,OAAO,CAAC,cAAD,CAA9B;AACA,IAAIE,oBAAoB;AACtBF,OAAO,CAAC,qBAAD,CAAP,GADF;AAEA,IAAIG,cAAc,GAAGH,OAAO,CAAC,QAAD,CAA5B;AACA,IAAII,eAAe,GAAGD,cAAc,GAApC;AACA,IAAIE,oBAAoB,GAAGF,cAAc,GAAzC;AACA,IAAIG,YAAY,GAAGN,OAA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KAAKA,OAAL,EAAhB;AACA,aAAa,OAAb;AACD,GAnboC;;AAqbrC,QAAiB;AACf,SAAKC,SAAL,IAAkB,KAAKA,SAAL,EAAlB;AACA,aAAa,SAAb;AACD,GAxboC,EAAvC;;;AA2bA1E,cAAc,CAAC2E,IAAf,GAAsB3E,cAAc,CAACa,OAArC;AACAb,cAAc,IAAd,GAA2BA,cAAc,CAACkD,MAA1C;AACAlD,cAAc,IAAd,GAA4BA,cAAc,CAAC2B,OAA3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACApG,SAAS;AACPyE,cADO;AAEP,SAASc,KAAT,CAAepD,SAAf,EAA0B;AACxB,SAAOA,SAAS,IAAT,EAAP;AACD,CAJM;AAKP,SAAS4F,WAAT,CAAqB5F,SAArB,EAAgC;AAC9B,SAAOA,SAAP;AACD,CAPM,CAAT;;;AAUAzB,OAAO,CAACgE,SAAD,EAAYnE,YAAZ,CAAP;;AAEA8I,MAAM,CAACC,OAAP,GAAiB5E,SAAjB","sourcesContent":["\"use strict\";\n/* jshint newcap:false */\n\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\n\nvar domInsert = require(\"../dom-insert\");\nvar defaultCreateOut = require(\"../createOut\");\nvar getComponentsContext =\n require(\"./ComponentsContext\").___getComponentsContext;\nvar componentsUtil = require(\"./util\");\nvar componentLookup = componentsUtil.___componentLookup;\nvar destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;\nvar EventEmitter = require(\"events-light\");\nvar RenderResult = require(\"../RenderResult\");\nvar SubscriptionTracker = require(\"listener-tracker\");\nvar inherit = require(\"raptor-util/inherit\");\nvar updateManager = require(\"./update-manager\");\nvar morphdom = require(\"../vdom/morphdom\");\nvar eventDelegation = require(\"./event-delegation\");\nvar domData = require(\"./dom-data\");\nvar componentsByDOMNode = domData.___componentByDOMNode;\nvar keyedElementsByComponentId = domData.___ssrKeyedElementsByComponentId;\nvar CONTEXT_KEY = \"__subtree_context__\";\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar slice = Array.prototype.slice;\n\nvar COMPONENT_SUBSCRIBE_TO_OPTIONS;\nvar NON_COMPONENT_SUBSCRIBE_TO_OPTIONS = {\n addDestroyListener: false\n};\n\nvar emit = EventEmitter.prototype.emit;\nvar ELEMENT_NODE = 1;\n\nfunction removeListener(removeEventListenerHandle) {\n removeEventListenerHandle();\n}\n\nfunction walkFragments(fragment) {\n var node;\n\n while (fragment) {\n node = fragment.firstChild;\n\n if (!node) {\n break;\n }\n\n fragment = node.fragment;\n }\n\n return node;\n}\n\nfunction handleCustomEventWithMethodListener(\n component,\n targetMethodName,\n args,\n extraArgs\n) {\n // Remove the \"eventType\" argument\n args.push(component);\n\n if (extraArgs) {\n args = extraArgs.concat(args);\n }\n\n var targetComponent = componentLookup[component.___scope];\n var targetMethod =\n typeof targetMethodName === \"function\"\n ? targetMethodName\n : targetComponent[targetMethodName];\n if (!targetMethod) {\n throw Error(\"Method not found: \" + targetMethodName);\n }\n\n targetMethod.apply(targetComponent, args);\n}\n\nfunction resolveKeyHelper(key, index) {\n return index ? key + \"_\" + index : key;\n}\n\nfunction resolveComponentIdHelper(component, key, index) {\n return component.id + \"-\" + resolveKeyHelper(key, index);\n}\n\n/**\n * This method is used to process \"update_<stateName>\" handler functions.\n * If all of the modified state properties have a user provided update handler\n * then a rerender will be bypassed and, instead, the DOM will be updated\n * looping over and invoking the custom update handlers.\n * @return {boolean} Returns true if if the DOM was updated. False, otherwise.\n */\nfunction processUpdateHandlers(component, stateChanges, oldState) {\n var handlerMethod;\n var handlers;\n\n for (var propName in stateChanges) {\n if (hasOwnProperty.call(stateChanges, propName)) {\n var handlerMethodName = \"update_\" + propName;\n\n handlerMethod = component[handlerMethodName];\n if (handlerMethod) {\n (handlers || (handlers = [])).push([propName, handlerMethod]);\n } else {\n // This state change does not have a state handler so return false\n // to force a rerender\n return;\n }\n }\n }\n\n // If we got here then all of the changed state properties have\n // an update handler or there are no state properties that actually\n // changed.\n if (handlers) {\n // Otherwise, there are handlers for all of the changed properties\n // so apply the updates using those handlers\n\n handlers.forEach(function (handler) {\n var propertyName = handler[0];\n handlerMethod = handler[1];\n\n var newValue = stateChanges[propertyName];\n var oldValue = oldState[propertyName];\n handlerMethod.call(component, newValue, oldValue);\n });\n\n component.___emitUpdate();\n component.___reset();\n }\n\n return true;\n}\n\nfunction checkInputChanged(existingComponent, oldInput, newInput) {\n if (oldInput != newInput) {\n if (oldInput == null || newInput == null) {\n return true;\n }\n\n var oldKeys = Object.keys(oldInput);\n var newKeys = Object.keys(newInput);\n var len = oldKeys.length;\n if (len !== newKeys.length) {\n return true;\n }\n\n for (var i = len; i--; ) {\n var key = oldKeys[i];\n if (!(key in newInput && oldInput[key] === newInput[key])) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nvar componentProto;\n\n/**\n * Base component type.\n *\n * NOTE: Any methods that are prefixed with an underscore should be considered private!\n */\nfunction Component(id) {\n EventEmitter.call(this);\n this.id = id;\n this.___state = null;\n this.___rootNode = null;\n this.___subscriptions = null;\n this.___domEventListenerHandles = null;\n this.___bubblingDomEvents = null; // Used to keep track of bubbling DOM events for components rendered on the server\n this.___customEvents = null;\n this.___scope = null;\n this.___renderInput = null;\n this.___input = undefined;\n this.___mounted = false;\n this.___global = undefined;\n this.___destroyed = false;\n this.___updateQueued = false;\n this.___dirty = false;\n this.___settingInput = false;\n this.___host = undefined;\n\n var ssrKeyedElements = keyedElementsByComponentId[id];\n\n if (ssrKeyedElements) {\n this.___keyedElements = ssrKeyedElements;\n delete keyedElementsByComponentId[id];\n } else {\n this.___keyedElements = {};\n }\n}\n\nComponent.prototype = componentProto = {\n ___isComponent: true,\n\n subscribeTo: function (target) {\n if (!target) {\n throw TypeError();\n }\n\n var subscriptions =\n this.___subscriptions ||\n (this.___subscriptions = new SubscriptionTracker());\n\n var subscribeToOptions = target.___isComponent\n ? COMPONENT_SUBSCRIBE_TO_OPTIONS\n : NON_COMPONENT_SUBSCRIBE_TO_OPTIONS;\n\n return subscriptions.subscribeTo(target, subscribeToOptions);\n },\n\n emit: function (eventType) {\n var customEvents = this.___customEvents;\n var target;\n\n if (customEvents && (target = customEvents[eventType])) {\n var targetMethodName = target[0];\n var isOnce = target[1];\n var extraArgs = target[2];\n var args = slice.call(arguments, 1);\n\n handleCustomEventWithMethodListener(\n this,\n targetMethodName,\n args,\n extraArgs\n );\n\n if (isOnce) {\n delete customEvents[eventType];\n }\n }\n\n return emit.apply(this, arguments);\n },\n getElId: function (key, index) {\n if (!key) {\n return this.id;\n }\n return resolveComponentIdHelper(this, key, index);\n },\n getEl: function (key, index) {\n if (key) {\n var keyedElement =\n this.___keyedElements[\"@\" + resolveKeyHelper(key, index)];\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (\n keyedElement &&\n keyedElement.nodeType !== 1 /* Node.ELEMENT_NODE */\n ) {\n throw new Error(\n \"Using 'getEl(key)' to get a component instance is not supported, did you mean 'getComponent(key)'?\"\n );\n }\n }\n\n return keyedElement;\n } else {\n return this.el;\n }\n },\n getEls: function (key) {\n key = key + \"[]\";\n\n var els = [];\n var i = 0;\n var el;\n while ((el = this.getEl(key, i))) {\n els.push(el);\n i++;\n }\n return els;\n },\n getComponent: function (key, index) {\n var rootNode = this.___keyedElements[\"@\" + resolveKeyHelper(key, index)];\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (/\\[\\]$/.test(key)) {\n throw new Error(\n \"A repeated key[] was passed to getComponent. Use a non-repeating key if there is only one of these components.\"\n );\n }\n }\n\n return rootNode && componentsByDOMNode.get(rootNode);\n },\n getComponents: function (key) {\n var lookup = this.___keyedElements[\"@\" + key + \"[]\"];\n return lookup\n ? Object.keys(lookup)\n .map(function (key) {\n return componentsByDOMNode.get(lookup[key]);\n })\n .filter(Boolean)\n : [];\n },\n destroy: function () {\n if (this.___destroyed) {\n return;\n }\n\n var root = this.___rootNode;\n\n this.___destroyShallow();\n\n var nodes = root.nodes;\n\n nodes.forEach(function (node) {\n destroyNodeRecursive(node);\n\n if (eventDelegation.___handleNodeDetach(node) !== false) {\n node.parentNode.removeChild(node);\n }\n });\n\n root.detached = true;\n\n delete componentLookup[this.id];\n this.___keyedElements = {};\n },\n\n ___destroyShallow: function () {\n if (this.___destroyed) {\n return;\n }\n\n this.___emitDestroy();\n this.___destroyed = true;\n\n componentsByDOMNode.set(this.___rootNode, undefined);\n\n this.___rootNode = null;\n\n // Unsubscribe from all DOM events\n this.___removeDOMEventListeners();\n\n var subscriptions = this.___subscriptions;\n if (subscriptions) {\n subscriptions.removeAllListeners();\n this.___subscriptions = null;\n }\n },\n\n isDestroyed: function () {\n return this.___destroyed;\n },\n get state() {\n return this.___state;\n },\n set state(newState) {\n var state = this.___state;\n if (!state && !newState) {\n return;\n }\n\n if (!state) {\n state = this.___state = new this.___State(this);\n }\n\n state.___replace(newState || {});\n\n if (state.___dirty) {\n this.___queueUpdate();\n }\n\n if (!newState) {\n this.___state = null;\n }\n },\n setState: function (name, value) {\n var state = this.___state;\n\n if (!state) {\n state = this.___state = new this.___State(this);\n }\n if (typeof name == \"object\") {\n // Merge in the new state with the old state\n var newState = name;\n for (var k in newState) {\n if (hasOwnProperty.call(newState, k)) {\n state.___set(k, newState[k], true /* ensure:true */);\n }\n }\n } else {\n state.___set(name, value, true /* ensure:true */);\n }\n },\n\n setStateDirty: function (name, value) {\n var state = this.___state;\n\n if (arguments.length == 1) {\n value = state[name];\n }\n\n state.___set(\n name,\n value,\n true /* ensure:true */,\n true /* forceDirty:true */\n );\n },\n\n replaceState: function (newState) {\n this.___state.___replace(newState);\n },\n\n get input() {\n return this.___input;\n },\n set input(newInput) {\n if (this.___settingInput) {\n this.___input = newInput;\n } else {\n this.___setInput(newInput);\n }\n },\n\n ___setInput: function (newInput, onInput, out) {\n onInput = onInput || this.onInput;\n var updatedInput;\n\n var oldInput = this.___input;\n this.___input = undefined;\n this.___context = (out && out[CONTEXT_KEY]) || this.___context;\n\n if (onInput) {\n // We need to set a flag to preview `this.input = foo` inside\n // onInput causing infinite recursion\n this.___settingInput = true;\n updatedInput = onInput.call(this, newInput || {}, out);\n this.___settingInput = false;\n }\n\n newInput = this.___renderInput = updatedInput || newInput;\n\n if ((this.___dirty = checkInputChanged(this, oldInput, newInput))) {\n this.___queueUpdate();\n }\n\n if (this.___input === undefined) {\n this.___input = newInput;\n if (newInput && newInput.$global) {\n this.___global = newInput.$global;\n }\n }\n\n return newInput;\n },\n\n forceUpdate: function () {\n this.___dirty = true;\n this.___queueUpdate();\n },\n\n ___queueUpdate: function () {\n if (!this.___updateQueued) {\n this.___updateQueued = true;\n updateManager.___queueComponentUpdate(this);\n }\n },\n\n update: function () {\n if (this.___destroyed === true || this.___isDirty === false) {\n return;\n }\n\n var input = this.___input;\n var state = this.___state;\n\n if (this.___dirty === false && state !== null && state.___dirty === true) {\n if (processUpdateHandlers(this, state.___changes, state.___old, state)) {\n state.___dirty = false;\n }\n }\n\n if (this.___isDirty === true) {\n // The UI component is still dirty after process state handlers\n // then we should rerender\n\n if (this.shouldUpdate(input, state) !== false) {\n this.___scheduleRerender();\n }\n }\n\n this.___reset();\n },\n\n get ___isDirty() {\n return (\n this.___dirty === true ||\n (this.___state !== null && this.___state.___dirty === true)\n );\n },\n\n ___reset: function () {\n this.___dirty = false;\n this.___updateQueued = false;\n this.___renderInput = null;\n var state = this.___state;\n if (state) {\n state.___reset();\n }\n },\n\n shouldUpdate: function () {\n return true;\n },\n\n ___scheduleRerender: function () {\n var self = this;\n var renderer = self.___renderer;\n\n if (!renderer) {\n throw TypeError();\n }\n\n var input = this.___renderInput || this.___input;\n\n updateManager.___batchUpdate(function () {\n self.___rerender(input, false).afterInsert(self.___host);\n });\n\n this.___reset();\n },\n\n ___rerender: function (input, isHydrate) {\n var host = this.___host;\n var globalData = this.___global;\n var rootNode = this.___rootNode;\n var renderer = this.___renderer;\n var createOut = renderer.createOut || defaultCreateOut;\n var out = createOut(globalData);\n out.sync();\n out.___host = this.___host;\n out[CONTEXT_KEY] = this.___context;\n\n var componentsContext = getComponentsContext(out);\n var globalComponentsContext = componentsContext.___globalContext;\n globalComponentsContext.___rerenderComponent = this;\n globalComponentsContext.___isHydrate = isHydrate;\n\n renderer(input, out);\n\n var result = new RenderResult(out);\n\n var targetNode = out.___getOutput().___firstChild;\n\n morphdom(rootNode, targetNode, host, componentsContext);\n\n return result;\n },\n\n ___detach: function () {\n var root = this.___rootNode;\n root.remove();\n return root;\n },\n\n ___removeDOMEventListeners: function () {\n var eventListenerHandles = this.___domEventListenerHandles;\n if (eventListenerHandles) {\n eventListenerHandles.forEach(removeListener);\n this.___domEventListenerHandles = null;\n }\n },\n\n get ___rawState() {\n var state = this.___state;\n return state && state.___raw;\n },\n\n ___setCustomEvents: function (customEvents, scope) {\n var finalCustomEvents = (this.___customEvents = {});\n this.___scope = scope;\n\n customEvents.forEach(function (customEvent) {\n var eventType = customEvent[0];\n var targetMethodName = customEvent[1];\n var isOnce = customEvent[2];\n var extraArgs = customEvent[3];\n\n if (targetMethodName) {\n finalCustomEvents[eventType] = [targetMethodName, isOnce, extraArgs];\n }\n });\n },\n\n get el() {\n return walkFragments(this.___rootNode);\n },\n\n get els() {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n 'The \"this.els\" attribute is deprecated. Please use \"this.getEls(key)\" instead.'\n );\n }\n return (this.___rootNode ? this.___rootNode.nodes : []).filter(function (\n el\n ) {\n return el.nodeType === ELEMENT_NODE;\n });\n },\n\n ___emit: emit,\n ___emitCreate(input, out) {\n this.onCreate && this.onCreate(input, out);\n this.___emit(\"create\", input, out);\n },\n\n ___emitRender(out) {\n this.onRender && this.onRender(out);\n this.___emit(\"render\", out);\n },\n\n ___emitUpdate() {\n this.onUpdate && this.onUpdate();\n this.___emit(\"update\");\n },\n\n ___emitMount() {\n this.onMount && this.onMount();\n this.___emit(\"mount\");\n },\n\n ___emitDestroy() {\n this.onDestroy && this.onDestroy();\n this.___emit(\"destroy\");\n }\n};\n\ncomponentProto.elId = componentProto.getElId;\ncomponentProto.___update = componentProto.update;\ncomponentProto.___destroy = componentProto.destroy;\n\n// Add all of the following DOM methods to Component.prototype:\n// - appendTo(referenceEl)\n// - replace(referenceEl)\n// - replaceChildrenOf(referenceEl)\n// - insertBefore(referenceEl)\n// - insertAfter(referenceEl)\n// - prependTo(referenceEl)\ndomInsert(\n componentProto,\n function getEl(component) {\n return component.___detach();\n },\n function afterInsert(component) {\n return component;\n }\n);\n\ninherit(Component, EventEmitter);\n\nmodule.exports = Component;\n"],"file":"Component.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/ComponentDef.js"],"names":["w10Noop","require","NOOP","componentUtil","attachBubblingEvent","addDelegatedEventHandler","extend","KeySequence","EMPTY_OBJECT","FLAG_WILL_RERENDER_IN_BROWSER","FLAG_HAS_RENDER_BODY","ComponentDef","component","componentId","componentsContext","id","undefined","prototype","key","elId","nestedId","String","indexOf","substring","d","eventName","handlerMethodName","isOnce","extraArgs","nk","o","types","global","registry","typeName","input","extra","state","s","componentProps","w","flags","f","renderBody","onCreate","onInput","undefinedPropNames","u","forEach","undefinedPropName","b","scope","p","customEvents","e","module","exports"],"mappings":"AAAA;;AAEA,IAAIA,OAAO,GAAGC,OAAO,CAAC,kBAAD,CAAP,CAA4BC,IAA1C;AACA,IAAIC,aAAa,GAAGF,OAAO,CAAC,QAAD,CAA3B;AACA,IAAIG,mBAAmB,GAAGD,aAAa,IAAvC;AACA,IAAIE,wBAAwB;AAC1BJ,OAAO,CAAC,oBAAD,CAAP,IADF;AAEA,IAAIK,MAAM,GAAGL,OAAO,CAAC,oBAAD,CAApB;AACA,IAAIM,WAAW,GAAGN,OAAO,CAAC,eAAD,CAAzB;AACA,IAAIO,YAAY,GAAG,EAAnB;;AAEA,IAAIC,6BAA6B,GAAG,CAApC;AACA,IAAIC,oBAAoB,GAAG,CAA3B;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAT,CAAsBC,SAAtB,EAAiCC,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SAAS,CAACiC,OAAV,CAAkBV,KAAlB,EAAyB,EAAEH,MAAM,EAAEA,MAAV,EAAzB,KAAgDG,KAAxD;AACD;AACF,GAPD,MAOO;AACL,QAAIE,KAAJ,EAAW;AACT,UAAIS,kBAAkB,GAAGV,KAAK,CAACW,CAA/B;AACA,UAAID,kBAAJ,EAAwB;AACtBA,QAAAA,kBAAkB,CAACE,OAAnB,CAA2B,UAAUC,iBAAV,EAA6B;AACtDZ,UAAAA,KAAK,CAACY,iBAAD,CAAL,GAA2BjC,SAA3B;AACD,SAFD;AAGD;AACD;AACA;AACAJ,MAAAA,SAAS,CAACyB,KAAV,GAAkBA,KAAlB;AACD;;AAED,QAAIE,cAAJ,EAAoB;AAClBjC,MAAAA,MAAM,CAACM,SAAD,EAAY2B,cAAZ,CAAN;AACD;AACF;;AAED3B,EAAAA,SAAS,GAAT,GAAqBuB,KAArB;;AAEA,MAAIC,KAAK,CAACc,CAAV,EAAa;AACXtC,IAAAA,SAAS,GAAT,GAAiCwB,KAAK,CAACc,CAAvC;AACD;;AAED,MAAIC,KAAK,GAAGf,KAAK,CAACgB,CAAlB;AACA,MAAIC,YAAY,GAAGjB,KAAK,CAACkB,CAAzB;AACA,MAAID,YAAJ,EAAkB;AAChBzC,IAAAA,SAAS,IAAT,CAA6ByC,YAA7B,EAA2CF,KAA3C;AACD;;AAEDvC,EAAAA,SAAS,GAAT,GAAsBoB,MAAtB;;AAEA,SAAO;AACLjB,IAAAA,EAAE,EAAEA,EADC;AAEL,QAAcH,SAFT;AAGL,SAAcwB,KAAK,CAACZ,CAHf;AAIL,SAAUY,KAAK,CAACM,CAAN,IAAW,CAJhB,EAAP;;AAMD,CAhED;;AAkEAa,MAAM,CAACC,OAAP,GAAiB7C,YAAjB","sourcesContent":["\"use strict\";\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar w10Noop = require(\"warp10/constants\").NOOP;\nvar componentUtil = require(\"./util\");\nvar attachBubblingEvent = componentUtil.___attachBubblingEvent;\nvar addDelegatedEventHandler =\n require(\"./event-delegation\").___addDelegatedEventHandler;\nvar extend = require(\"raptor-util/extend\");\nvar KeySequence = require(\"./KeySequence\");\nvar EMPTY_OBJECT = {};\n\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\nvar FLAG_HAS_RENDER_BODY = 2;\n\n/**\n * A ComponentDef is used to hold the metadata collected at runtime for\n * a single component and this information is used to instantiate the component\n * later (after the rendered HTML has been added to the DOM)\n */\nfunction ComponentDef(component, componentId, componentsContext) {\n this.___componentsContext = componentsContext; // The AsyncWriter that this component is associated with\n this.___component = component;\n this.id = componentId;\n\n this.___domEvents = undefined; // An array of DOM events that need to be added (in sets of three)\n\n this.___isExisting = false;\n\n this.___renderBoundary = false;\n this.___flags = 0;\n\n this.___nextIdIndex = 0; // The unique integer to use for the next scoped ID\n this.___keySequence = null;\n}\n\nComponentDef.prototype = {\n ___nextKey: function (key) {\n return (\n this.___keySequence || (this.___keySequence = new KeySequence())\n ).___nextKey(key);\n },\n\n /**\n * This helper method generates a unique and fully qualified DOM element ID\n * that is unique within the scope of the current component.\n */\n elId: function (nestedId) {\n var id = this.id;\n\n if (nestedId == null) {\n return id;\n } else {\n if (typeof nestedId !== \"string\") {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\"Using non strings as keys is deprecated.\");\n }\n\n nestedId = String(nestedId);\n }\n\n if (nestedId.indexOf(\"#\") === 0) {\n id = \"#\" + id;\n nestedId = nestedId.substring(1);\n }\n\n return id + \"-\" + nestedId;\n }\n },\n /**\n * Returns the next auto generated unique ID for a nested DOM element or nested DOM component\n */\n ___nextComponentId: function () {\n return this.id + \"-c\" + this.___nextIdIndex++;\n },\n\n d: function (eventName, handlerMethodName, isOnce, extraArgs) {\n addDelegatedEventHandler(eventName);\n return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);\n },\n\n get ___type() {\n return this.___component.___type;\n }\n};\n\nComponentDef.prototype.nk = ComponentDef.prototype.___nextKey;\n\nComponentDef.___deserialize = function (o, types, global, registry) {\n var id = o[0];\n var typeName = types[o[1]];\n var input = o[2] || null;\n var extra = o[3] || EMPTY_OBJECT;\n\n var state = extra.s;\n var componentProps = extra.w;\n var flags = extra.f;\n var component = registry.___createComponent(typeName, id);\n\n // Prevent newly created component from being queued for update since we area\n // just building it from the server info\n component.___updateQueued = true;\n\n if (flags & FLAG_HAS_RENDER_BODY) {\n (input || (input = {})).renderBody = w10Noop;\n }\n\n if (flags & FLAG_WILL_RERENDER_IN_BROWSER) {\n if (component.onCreate) {\n component.onCreate(input, { global: global });\n }\n if (component.onInput) {\n input = component.onInput(input, { global: global }) || input;\n }\n } else {\n if (state) {\n var undefinedPropNames = extra.u;\n if (undefinedPropNames) {\n undefinedPropNames.forEach(function (undefinedPropName) {\n state[undefinedPropName] = undefined;\n });\n }\n // We go through the setter here so that we convert the state object\n // to an instance of `State`\n component.state = state;\n }\n\n if (componentProps) {\n extend(component, componentProps);\n }\n }\n\n component.___input = input;\n\n if (extra.b) {\n component.___bubblingDomEvents = extra.b;\n }\n\n var scope = extra.p;\n var customEvents = extra.e;\n if (customEvents) {\n component.___setCustomEvents(customEvents, scope);\n }\n\n component.___global = global;\n\n return {\n id: id,\n ___component: component,\n ___domEvents: extra.d,\n ___flags: extra.f || 0\n };\n};\n\nmodule.exports = ComponentDef;\n"],"file":"ComponentDef.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/ComponentsContext.js"],"names":["GlobalComponentsContext","require","ComponentsContext","out","parentComponentsContext","globalComponentsContext","componentDef","nestedContextsForParent","push","global","undefined","prototype","host","componentDefs","emit","getComponentsContext","module","exports"],"mappings":"AAAA;AACA,IAAIA,uBAAuB,GAAGC,OAAO,CAAC,2BAAD,CAArC;;AAEA,SAASC,iBAAT,CAA2BC,GAA3B,EAAgCC,uBAAhC,EAAyD;AACvD,MAAIC,uBAAJ;AACA,MAAIC,YAAJ;;AAEA,MAAIF,uBAAJ,EAA6B;AAC3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unction ComponentsContext(out, parentComponentsContext) {\n var globalComponentsContext;\n var componentDef;\n\n if (parentComponentsContext) {\n globalComponentsContext = parentComponentsContext.___globalContext;\n componentDef = parentComponentsContext.___componentDef;\n\n var nestedContextsForParent;\n if (\n !(nestedContextsForParent = parentComponentsContext.___nestedContexts)\n ) {\n nestedContextsForParent = parentComponentsContext.___nestedContexts = [];\n }\n\n nestedContextsForParent.push(this);\n } else {\n globalComponentsContext = out.global.___components;\n if (globalComponentsContext === undefined) {\n out.global.___components = globalComponentsContext =\n new GlobalComponentsContext(out);\n }\n }\n\n this.___globalContext = globalComponentsContext;\n this.___components = [];\n this.___out = out;\n this.___componentDef = componentDef;\n this.___nestedContexts = undefined;\n this.___isPreserved =\n parentComponentsContext && parentComponentsContext.___isPreserved;\n}\n\nComponentsContext.prototype = {\n ___initComponents: function (host) {\n var componentDefs = this.___components;\n\n ComponentsContext.___initClientRendered(componentDefs, host);\n\n this.___out.emit(\"___componentsInitialized\");\n\n // Reset things stored in global since global is retained for\n // future renders\n this.___out.global.___components = undefined;\n\n return componentDefs;\n }\n};\n\nfunction getComponentsContext(out) {\n return out.___components || (out.___components = new ComponentsContext(out));\n}\n\nmodule.exports = exports = ComponentsContext;\n\nexports.___getComponentsContext = getComponentsContext;\n"],"file":"ComponentsContext.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/GlobalComponentsContext.js"],"names":["nextComponentIdProvider","require","GlobalComponentsContext","out","undefined","module","exports"],"mappings":"aAAA,IAAIA,uBAAuB,GAAGC,OAAO,CAAC,QAAD,CAAP,IAA9B;;AAEA,SAASC,uBAAT,CAAiCC,GAAjC,EAAsC;AACpC,aAAiC,EAAjC;AACA,aAA4BC,SAA5B;AACA,aAA0BJ,uBAAuB,CAACG,GAAD,CAAjD;AACD;;AAEDE,MAAM,CAACC,OAAP,GAAiBJ,uBAAjB","sourcesContent":["var nextComponentIdProvider = require(\"./util\").___nextComponentIdProvider;\n\nfunction GlobalComponentsContext(out) {\n this.___renderedComponentsById = {};\n this.___rerenderComponent = undefined;\n this.___nextComponentId = nextComponentIdProvider(out);\n}\n\nmodule.exports = GlobalComponentsContext;\n"],"file":"GlobalComponentsContext.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/KeySequence.js"],"names":["KeySequence","Object","create","prototype","key","lookup","module","exports"],"mappings":"aAAA,SAASA,WAAT,GAAuB;AACrB,aAAiBC,MAAM,CAACC,MAAP,CAAc,IAAd,CAAjB;AACD;;AAEDF,WAAW,CAACG,SAAZ,OAAmC,UAAUC,GAAV,EAAe;AAChD,MAAIC,MAAM,GAAG,QAAb;;AAEA,MAAIA,MAAM,CAACD,GAAD,CAAV,EAAiB;AACf,WAAOA,GAAG,GAAG,GAAN,GAAYC,MAAM,CAACD,GAAD,CAAN,EAAnB;AACD;;AAEDC,EAAAA,MAAM,CAACD,GAAD,CAAN,GAAc,CAAd;AACA,SAAOA,GAAP;AACD,CATD;;AAWAE,MAAM,CAACC,OAAP,GAAiBP,WAAjB","sourcesContent":["function KeySequence() {\n this.___lookup = Object.create(null);\n}\n\nKeySequence.prototype.___nextKey = function (key) {\n var lookup = this.___lookup;\n\n if (lookup[key]) {\n return key + \"_\" + lookup[key]++;\n }\n\n lookup[key] = 1;\n return key;\n};\n\nmodule.exports = KeySequence;\n"],"file":"KeySequence.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/ServerComponent.js"],"names":["ServerComponent","constructor","id","input","out","typeName","customEvents","scope","undefined","onCreate","onInput","onRender","newInput","state","newState","elId","nestedId","String","indexOf","substring","prototype","getElId","module","exports"],"mappings":"AAAA;;;AAGA,MAAMA,eAAN,CAAsB;AACpBC,EAAAA,WAAW,CAACC,EAAD,EAAKC,KAAL,EAAYC,GAAZ,EAAiBC,QAAjB,EAA2BC,YAA3B,EAAyCC,KAAzC,EAAgD;AACzD,SAAKL,EAAL,GAAUA,EAAV;AACA,cAAuBI,YAAvB;AACA,cAAgBC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1B,GAAoCrB,eAAe,CAACoB,SAAhB,CAA0BL,IAA9D;;AAEAO,MAAM,CAACC,OAAP,GAAiBvB,eAAjB","sourcesContent":["\"use strict\";\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\n\nclass ServerComponent {\n constructor(id, input, out, typeName, customEvents, scope) {\n this.id = id;\n this.___customEvents = customEvents;\n this.___scope = scope;\n this.typeName = typeName;\n this.___bubblingDomEvents = undefined; // Used to keep track of bubbling DOM events for components rendered on the server\n this.___bubblingDomEventsExtraArgsCount = 0;\n\n this.onCreate(input, out);\n this.___updatedInput = this.onInput(input, out) || input;\n if (this.___input === undefined) {\n this.___input = this.___updatedInput;\n }\n this.onRender(out);\n }\n\n set input(newInput) {\n this.___input = newInput;\n }\n\n get input() {\n return this.___input;\n }\n\n set state(newState) {\n this.___state = newState;\n }\n\n get state() {\n return this.___state;\n }\n\n get ___rawState() {\n return this.___state;\n }\n\n elId(nestedId) {\n var id = this.id;\n\n if (nestedId == null) {\n return id;\n } else {\n if (typeof nestedId !== \"string\") {\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\"Using non strings as keys is deprecated.\");\n }\n\n nestedId = String(nestedId);\n }\n\n if (nestedId.indexOf(\"#\") === 0) {\n id = \"#\" + id;\n nestedId = nestedId.substring(1);\n }\n\n return id + \"-\" + nestedId;\n }\n }\n\n onCreate() {}\n onInput() {}\n onRender() {}\n}\n\nServerComponent.prototype.getElId = ServerComponent.prototype.elId;\n\nmodule.exports = ServerComponent;\n"],"file":"ServerComponent.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/State.js"],"names":["extend","require","ensure","state","propertyName","proto","constructor","prototype","Object","defineProperty","get","set","value","State","component","seal","self","newState","key","rawState","undefined","name","shouldEnsure","forceDirty","forcedDirtyState","toJSON","module","exports"],"mappings":"aAAA,IAAIA,MAAM,GAAGC,OAAO,CAAC,oBAAD,CAApB;;AAEA,SAASC,MAAT,CAAgBC,KAA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,sBAJR;;AAMD;AACF;;AAED,SAAKF,GAAL,IAAYD,QAAZ,EAAsB;AACpBd,MAAAA,KAAK,IAAL;AACEe,MAAAA,GADF;AAEED,MAAAA,QAAQ,CAACC,GAAD,CAFV;AAGE,UAHF,CAGO,iBAHP;AAIE,WAJF,CAIQ,sBAJR;;AAMD;AACF,GAnCe;AAoChB,OAAQ,UAAUG,IAAV,EAAgBT,KAAhB,EAAuBU,YAAvB,EAAqCC,UAArC,EAAiD;AACvD,QAAIJ,QAAQ,GAAG,QAAf;;AAEA,QAAIG,YAAJ,EAAkB;AAChBpB,MAAAA,MAAM,CAAC,IAAD,EAAOmB,IAAP,CAAN;AACD;;AAED,QAAIE,UAAJ,EAAgB;AACd,UAAIC,gBAAgB,GAAG,aAAmB,WAAiB,EAApC,CAAvB;AACAA,MAAAA,gBAAgB,CAACH,IAAD,CAAhB,GAAyB,IAAzB;AACD,KAHD,MAGO,IAAIF,QAAQ,CAACE,IAAD,CAAR,KAAmBT,KAAvB,EAA8B;AACnC;AACD;;AAED,QAAI,CAAC,OAAL,EAAoB;AAClB;AACA;AACA;AACA,gBAAgB,IAAhB,CAJkB,CAII;AACtB,iBAAcO,QAAd;AACA,iBAAcA,QAAQ,GAAGnB,MAAM,CAAC,EAAD,EAAKmB,QAAL,CAA/B;AACA,iBAAkB,EAAlB;AACA;AACD;;AAED,aAAgBE,IAAhB,IAAwBT,KAAxB;;AAEA,QAAIA,KAAK,KAAKQ,SAAd,EAAyB;AACvB;AACA,aAAOD,QAAQ,CAACE,IAAD,CAAf;AACD,KAHD,MAGO;AACL;AACAF,MAAAA,QAAQ,CAACE,IAAD,CAAR,GAAiBT,KAAjB;AACD;AACF,GAtEe;AAuEhBa,EAAAA,MAAM,EAAE,YAAY;AAClB,WAAO,QAAP;AACD,GAzEe,EAAlB;;;AA4EAC,MAAM,CAACC,OAAP,GAAiBd,KAAjB","sourcesContent":["var extend = require(\"raptor-util/extend\");\n\nfunction ensure(state, propertyName) {\n var proto = state.constructor.prototype;\n if (!(propertyName in proto)) {\n Object.defineProperty(proto, propertyName, {\n get: function () {\n return this.___raw[propertyName];\n },\n set: function (value) {\n this.___set(propertyName, value, false /* ensure:false */);\n }\n });\n }\n}\n\nfunction State(component) {\n this.___component = component;\n this.___raw = {};\n\n this.___dirty = false;\n this.___old = null;\n this.___changes = null;\n this.___forced = null; // An object that we use to keep tracking of state properties that were forced to be dirty\n\n Object.seal(this);\n}\n\nState.prototype = {\n ___reset: function () {\n var self = this;\n\n self.___dirty = false;\n self.___old = null;\n self.___changes = null;\n self.___forced = null;\n },\n\n ___replace: function (newState) {\n var state = this;\n var key;\n\n var rawState = this.___raw;\n\n for (key in rawState) {\n if (!(key in newState)) {\n state.___set(\n key,\n undefined,\n false /* ensure:false */,\n false /* forceDirty:false */\n );\n }\n }\n\n for (key in newState) {\n state.___set(\n key,\n newState[key],\n true /* ensure:true */,\n false /* forceDirty:false */\n );\n }\n },\n ___set: function (name, value, shouldEnsure, forceDirty) {\n var rawState = this.___raw;\n\n if (shouldEnsure) {\n ensure(this, name);\n }\n\n if (forceDirty) {\n var forcedDirtyState = this.___forced || (this.___forced = {});\n forcedDirtyState[name] = true;\n } else if (rawState[name] === value) {\n return;\n }\n\n if (!this.___dirty) {\n // This is the first time we are modifying the component state\n // so introduce some properties to do some tracking of\n // changes to the state\n this.___dirty = true; // Mark the component state as dirty (i.e. modified)\n this.___old = rawState;\n this.___raw = rawState = extend({}, rawState);\n this.___changes = {};\n this.___component.___queueUpdate();\n }\n\n this.___changes[name] = value;\n\n if (value === undefined) {\n // Don't store state properties with an undefined or null value\n delete rawState[name];\n } else {\n // Otherwise, store the new value in the component state\n rawState[name] = value;\n }\n },\n toJSON: function () {\n return this.___raw;\n }\n};\n\nmodule.exports = State;\n"],"file":"State.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/attach-detach.js"],"names":["eventDelegation","require","delegateEvent","getEventFromEl","handleNodeAttach","node","componentsContext","nodeType","eventName","target","out","data","attachTargets","on","i","length","push","handleNodeDetach","allowDetach","preventDefault","detach","parentNode","removeChild"],"mappings":"aAAA,IAAIA,eAAe,GAAGC,OAAO,CAAC,oBAAD,CAA7B;AACA,IAAIC,aAAa,GAAGF,eAAe,IAAnC;AACA,IAAIG,cAAc,GAAGH,eAAe,IAApC;;AAEA;AACA;AACA;;AAEA,SAASI,gBAAT,CAA0BC,IAA1B,EAAgCC,iBAAhC,EAAmD;AACjD,MAAID,IAAI,CAACE,QAAL,KAAkB,CAAtB,EAAyB;AACvB,QAAIC,SAAS,GAAG,UAAhB;AACA,QAAIC,MAAM,GAAGN,cAAc,CAACE,IAAD,EAAOG,SAAP,CAA3B;AACA,QAAIC,MAAJ,EAAY;AACV,UAAIC,GAAG,GAAGJ,iBAAiB,GAA3B;AACA,UAAIK,IAAI,GAAGD,GAAG,CAACC,IAAf;;AAEA,UAAIC,aAAa,GAAGD,IAAI,IAAxB;AACA,UAAI,CAACC,aAAL,EAAoB;AAClBA,QAAAA,aAAa,GAAGD,IAAI,IAAJ,GAAwB,EAAxC;AACAD,QAAAA,GAAG,CAACG,EAAJ,QAAmC,YAAY;AAC7C,eAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,aAAa,CAACG,MAAlC,EAA0CD,CAAC,IAAI,CAA/C,EAAkD;AAChD,gBAAIT,IAAI,GAAGO,aAAa,CAACE,CAAD,CAAxB;AACA,gBAAIL,MAAM,GAAGG,aAAa,CAACE,CAAC,GAAG,CAAL,CAA1B;AACAZ,YAAAA,aAAa,CAACG,IAAD,EAAOG,SAAP,EAAkBC,MAAlB,EAA0B,EAA1B,CAAb;AACD;AACF,SAND;AAOD;;AAEDG,MAAAA,aAAa,CAACI,IAAd,CAAmBX,IAAnB;AACAO,MAAAA,aAAa,CAACI,IAAd,CAAmBP,MAAnB;AACD;AACF;AACF;;AAED,SAASQ,gBAAT,CAA0BZ,IAA1B,EAAgC;AAC9B,MAAIA,IAAI,CAACE,QAAL,KAAkB,CAAtB,EAAyB;AACvB,QAAIC,SAAS,GAAG,UAAhB;AACA,QAAIC,MAAM,GAAGN,cAAc,CAACE,IAAD,EAAOG,SAAP,CAA3B;AACA,QAAIC,MAAJ,EAAY;AACV,UAAIS,WAAJ;;AAEAhB,MAAAA,aAAa,CAACG,IAAD,EAAOG,SAAP,EAAkBC,MAAlB,EAA0B;AACrCU,QAAAA,cAAc,EAAE,YAAY;AAC1BD,UAAAA,WAAW,GAAG,KAAd;AACD,SAHoC;AAIrCE,QAAAA,MAAM,EAAE,YAAY;AAClB,cAAIC,UAAU,GAAGhB,IAAI,CAACgB,UAAtB;AACA,cAAIA,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACC,WAAX,CAAuBjB,IAAvB;AACD;AACF,SAToC,EAA1B,CAAb;;;AAYA,aAAOa,WAAP;AACD;AACF;AACF;;AAEDlB,eAAe,IAAf,GAAsCI,gBAAtC;AACAJ,eAAe,IAAf,GAAsCiB,gBAAtC","sourcesContent":["var eventDelegation = require(\"./event-delegation\");\nvar delegateEvent = eventDelegation.___delegateEvent;\nvar getEventFromEl = eventDelegation.___getEventFromEl;\n\n// var componentsUtil = require('./util');\n// var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;\n// var destroyComponentForNode = componentsUtil.___destroyComponentForNode;\n\nfunction handleNodeAttach(node, componentsContext) {\n if (node.nodeType === 1) {\n var eventName = \"onattach\";\n var target = getEventFromEl(node, eventName);\n if (target) {\n var out = componentsContext.___out;\n var data = out.data;\n\n var attachTargets = data.___attachTargets;\n if (!attachTargets) {\n attachTargets = data.___attachTargets = [];\n out.on(\"___componentsInitialized\", function () {\n for (var i = 0; i < attachTargets.length; i += 2) {\n var node = attachTargets[i];\n var target = attachTargets[i + 1];\n delegateEvent(node, eventName, target, {});\n }\n });\n }\n\n attachTargets.push(node);\n attachTargets.push(target);\n }\n }\n}\n\nfunction handleNodeDetach(node) {\n if (node.nodeType === 1) {\n var eventName = \"ondetach\";\n var target = getEventFromEl(node, eventName);\n if (target) {\n var allowDetach;\n\n delegateEvent(node, eventName, target, {\n preventDefault: function () {\n allowDetach = false;\n },\n detach: function () {\n var parentNode = node.parentNode;\n if (parentNode) {\n parentNode.removeChild(node);\n }\n }\n });\n\n return allowDetach;\n }\n }\n}\n\neventDelegation.___handleNodeAttach = handleNodeAttach;\neventDelegation.___handleNodeDetach = handleNodeDetach;\n"],"file":"attach-detach.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/beginComponent/index-browser.js"],"names":["ComponentDef","require","module","exports","beginComponent","componentsContext","component","key","ownerComponentDef","componentId","id","componentDef","push","out","bc"],"mappings":"aAAA,IAAIA,YAAY,GAAGC,OAAO,CAAC,iBAAD,CAA1B;;AAEAC,MAAM,CAACC,OAAP,GAAiB,SAASC,cAAT;AACfC,iBADe;AAEfC,SAFe;AAGfC,GAHe;AAIfC,iBAJe;AAKf;AACA,MAAIC,WAAW,GAAGH,SAAS,CAACI,EAA5B;AACA,MAAIC,YAAY,GAAIN,iBAAiB,GAAjB,GAAoC,IAAIL,YAAJ;AACtDM,EAAAA,SADsD;AAEtDG,EAAAA,WAFsD;AAGtDJ,EAAAA,iBAHsD,CAAxD;;AAKAA,EAAAA,iBAAiB,GAAjB;AACEI,EAAAA,WADF;AAEI,MAFJ;AAGAJ,EAAAA,iBAAiB,GAAjB,CAAgCO,IAAhC,CAAqCD,YAArC;;AAEA,MAAIE,GAAG,GAAGR,iBAAiB,GAA3B;AACAQ,EAAAA,GAAG,CAACC,EAAJ,CAAOR,SAAP,EAAkBC,GAAlB,EAAuBC,iBAAiB,IAAIA,iBAAiB,GAA7D;AACA,SAAOG,YAAP;AACD,CApBD","sourcesContent":["var ComponentDef = require(\"../ComponentDef\");\n\nmodule.exports = function beginComponent(\n componentsContext,\n component,\n key,\n ownerComponentDef\n) {\n var componentId = component.id;\n var componentDef = (componentsContext.___componentDef = new ComponentDef(\n component,\n componentId,\n componentsContext\n ));\n componentsContext.___globalContext.___renderedComponentsById[\n componentId\n ] = true;\n componentsContext.___components.push(componentDef);\n\n var out = componentsContext.___out;\n out.bc(component, key, ownerComponentDef && ownerComponentDef.___component);\n return componentDef;\n};\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/beginComponent/index.js"],"names":["ComponentDef","require","FLAG_WILL_RERENDER_IN_BROWSER","module","exports","beginComponent","componentsContext","component","key","ownerComponentDef","isSplitComponent","isImplicitComponent","componentId","id","componentDef","ownerIsRenderBoundary","ownerWillRerender","_wrr","push","out","runtimeId","global","noBrowserRerender","w"],"mappings":"AAAA;;AAEA,MAAMA,YAAY,GAAGC,OAAO,CAAC,iBAAD,CAA5B;;AAEA,IAAIC,6BAA6B,GAAG,CAApC;AACA;;AAEAC,MAAM,CAACC,OAAP,GAAiB,SAASC,cAAT;AACfC,iBADe;AAEfC,SAFe;AAGfC,GAHe;AAIfC,iBAJe;AAKfC,gBALe;AAMfC,mBANe;AAOf;AACA,MAAIC,WAAW,GAAGL,SAAS,CAACM,EAA5B;;AAEA,MAAIC,YAAY,GAAIR,iBAAiB,GAAjB,GAAoC,IAAIN,YAAJ;AACtDO,EAAAA,SADsD;AAEtDK,EAAAA,WAFsD;AAGtDN,EAAAA,iBAHsD,CAAxD;;;AAMA,MAAIS,qBAAqB;AACvBN,EAAAA,iBAAiB,IAAIA,iBAAiB,IADxC;AAEA,MAAIO,iBAAiB;AACnBP,EAAAA,iBAAiB;AACjBA,EAAAA,iBAAiB,IAAjB,GAA6BP,6BAF/B;AAGA;AACA,MAAI,CAACI,iBAAiB,GAAlB,IAAqCU,iBAAzC,EAA4D;AAC1DF,IAAAA,YAAY,IAAZ,IAAyBZ,6BAAzB;AACAY,IAAAA,YAAY,CAACG,IAAb,GAAoB,IAApB;AACA,WAAOH,YAAP;AACD;;AAED,MAAIH,mBAAmB,KAAK,IAA5B,EAAkC;AAChC;AACA;AACA;AACA,WAAOG,YAAP;AACD;;AAEDR,EAAAA,iBAAiB,GAAjB,CAAgCY,IAAhC,CAAqCJ,YAArC;;AAEA,MAAIK,GAAG,GAAGb,iBAAiB,GAA3B;AACA,MAAIc,SAAS,GAAGD,GAAG,CAACE,MAAJ,CAAWD,SAA3B;;AAEAN,EAAAA,YAAY,IAAZ,GAAiC,IAAjC;AACAA,EAAAA,YAAY,IAAZ,GAAkCR,iBAAiB,GAAnD;;AAEA,MAAII,gBAAgB,KAAK,KAArB,IAA8BS,GAAG,CAACE,MAAJ,CAAWC,iBAAX,KAAiC,IAAnE,EAAyE;AACvER,IAAAA,YAAY,IAAZ,IAAyBZ,6BAAzB;AACAY,IAAAA,YAAY,CAACG,IAAb,GAAoB,IAApB;AACAX,IAAAA,iBAAiB,GAAjB,GAAmC,KAAnC;AACD;;AAED,MAAI,CAACS,qBAAqB,IAAIC,iBAA1B,KAAgDR,GAAG,IAAI,IAA3D,EAAiE;AAC/DW,IAAAA,GAAG,CAACI,CAAJ;AACE;AACEH,IAAAA,SADF;AAEE,OAFF;AAGER,IAAAA,WAHF;AAIE,OAJF;AAKEH,IAAAA,iBAAiB,CAACI,EALpB;AAME,OANF;AAOEL,IAAAA,GAPF;AAQE,SATJ;;AAWD,GAZD,MAYO;AACLW,IAAAA,GAAG,CAACI,CAAJ,CAAM,SAASH,SAAT,GAAqB,GAArB,GAA2BR,WAA3B,GAAyC,KAA/C;AACD;;AAED,SAAOE,YAAP;AACD,CAlED","sourcesContent":["\"use strict\";\n\nconst ComponentDef = require(\"../ComponentDef\");\n\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\n// var FLAG_HAS_RENDER_BODY = 2;\n\nmodule.exports = function beginComponent(\n componentsContext,\n component,\n key,\n ownerComponentDef,\n isSplitComponent,\n isImplicitComponent\n) {\n var componentId = component.id;\n\n var componentDef = (componentsContext.___componentDef = new ComponentDef(\n component,\n componentId,\n componentsContext\n ));\n\n var ownerIsRenderBoundary =\n ownerComponentDef && ownerComponentDef.___renderBoundary;\n var ownerWillRerender =\n ownerComponentDef &&\n ownerComponentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER;\n // On the server\n if (!componentsContext.___isPreserved && ownerWillRerender) {\n componentDef.___flags |= FLAG_WILL_RERENDER_IN_BROWSER;\n componentDef._wrr = true;\n return componentDef;\n }\n\n if (isImplicitComponent === true) {\n // We don't mount implicit components rendered on the server\n // unless the implicit component is nested within a UI component\n // that will re-render in the browser\n return componentDef;\n }\n\n componentsContext.___components.push(componentDef);\n\n let out = componentsContext.___out;\n let runtimeId = out.global.runtimeId;\n\n componentDef.___renderBoundary = true;\n componentDef.___parentPreserved = componentsContext.___isPreserved;\n\n if (isSplitComponent === false && out.global.noBrowserRerender !== true) {\n componentDef.___flags |= FLAG_WILL_RERENDER_IN_BROWSER;\n componentDef._wrr = true;\n componentsContext.___isPreserved = false;\n }\n\n if ((ownerIsRenderBoundary || ownerWillRerender) && key != null) {\n out.w(\n \"<!--\" +\n runtimeId +\n \"^\" +\n componentId +\n \" \" +\n ownerComponentDef.id +\n \" \" +\n key +\n \"-->\"\n );\n } else {\n out.w(\"<!--\" + runtimeId + \"#\" + componentId + \"-->\");\n }\n\n return componentDef;\n};\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/defineComponent.js"],"names":["BaseState","require","BaseComponent","inherit","module","exports","defineComponent","def","renderer","ComponentClass","proto","type","prototype","TypeError","Component","id","call","State","component"],"mappings":"AAAA;AACA;;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,SAAD,CAAvB;AACA,IAAIC,aAAa,GAAGD,OAAO,CAAC,aAAD,CAA3B;AACA,IAAIE,OAAO,GAAGF,OAAO,CAAC,qBAAD,CAArB;;AAEAG,MAAM,CAACC,OAAP,GAAiB,SAASC,eAAT,CAAyBC,GAAzB,EAA8BC,QAA9B,EAAwC;AACvD,MAAID,GAAG,GAAP,EAAwB;AACtB,WAAOA,GAAP;AACD;;AAED,MAAIE,cAAc,GAAG,YAAY,CAAE,CAAnC;AACA,MAAIC,KAAJ;;AAEA,MAAIC,IAAI,GAAG,OAAOJ,GAAlB;;AAEA,MAAII,IAAI,IAAI,UAAZ,EAAwB;AACtBD,IAAAA,KAAK,GAAGH,GAAG,CAACK,SAAZ;AACD,GAFD,MAEO,IAAID,IAAI,IAAI,QAAZ,EAAsB;AAC3BD,IAAAA,KAAK,GAAGH,GAAR;AACD,GAFM,MAEA;AACL,UAAMM,SAAS,EAAf;AACD;;AAEDJ,EAAAA,cAAc,CAACG,SAAf,GAA2BF,KAA3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAASI,SAAT,CAAmBC,EAAnB,EAAuB;AACrBb,IAAAA,aAAa,CAACc,IAAd,CAAmB,IAAnB,EAAyBD,EAAzB;AACD;;AAED,MAAI,CAACL,KAAK,GAAV,EAA2B;AACzB;AACAP,IAAAA,OAAO,CAACM,cAAD,EAAiBP,aAAjB,CAAP;AACD;;AAED;AACA;AACAQ,EAAAA,KAAK,GAAGI,SAAS,CAACF,SAAV,GAAsBH,cAAc,CAACG,SAA7C;;AAEA;;AAEA;AACA;AACAE,EAAAA,SAAS,GAAT,GAA2B,IAA3B;;AAEA,WAASG,KAAT,CAAeC,SAAf,EAA0B;AACxBlB,IAAAA,SAAS,CAACgB,IAAV,CAAe,IAAf,EAAqBE,SAArB;AACD;AACDf,EAAAA,OAAO,CAACc,KAAD,EAAQjB,SAAR,CAAP;AACAU,EAAAA,KAAK,IAAL,GAAiBO,KAAjB;AACAP,EAAAA,KAAK,IAAL,GAAoBF,QAApB;;AAEA,SAAOM,SAAP;AACD,CArDD","sourcesContent":["\"use strict\";\n/* jshint newcap:false */\n\nvar BaseState = require(\"./State\");\nvar BaseComponent = require(\"./Component\");\nvar inherit = require(\"raptor-util/inherit\");\n\nmodule.exports = function defineComponent(def, renderer) {\n if (def.___isComponent) {\n return def;\n }\n\n var ComponentClass = function () {};\n var proto;\n\n var type = typeof def;\n\n if (type == \"function\") {\n proto = def.prototype;\n } else if (type == \"object\") {\n proto = def;\n } else {\n throw TypeError();\n }\n\n ComponentClass.prototype = proto;\n\n // We don't use the constructor provided by the user\n // since we don't invoke their constructor until\n // we have had a chance to do our own initialization.\n // Instead, we store their constructor in the \"initComponent\"\n // property and that method gets called later inside\n // init-components-browser.js\n function Component(id) {\n BaseComponent.call(this, id);\n }\n\n if (!proto.___isComponent) {\n // Inherit from Component if they didn't already\n inherit(ComponentClass, BaseComponent);\n }\n\n // The same prototype will be used by our constructor after\n // we he have set up the prototype chain using the inherit function\n proto = Component.prototype = ComponentClass.prototype;\n\n // proto.constructor = def.constructor = Component;\n\n // Set a flag on the constructor function to make it clear this is\n // a component so that we can short-circuit this work later\n Component.___isComponent = true;\n\n function State(component) {\n BaseState.call(this, component);\n }\n inherit(State, BaseState);\n proto.___State = State;\n proto.___renderer = renderer;\n\n return Component;\n};\n"],"file":"defineComponent.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/dom-data.js"],"names":["module","exports","WeakMap"],"mappings":"aAAAA,MAAM,CAACC,OAAP,GAAiB;AACf,OAAoB,IAAIC,OAAJ,EADL;AAEf,OAAsB,IAAIA,OAAJ,EAFP;AAGf,MAAuB,IAAIA,OAAJ,EAHR;AAIf,OAAsB,IAAIA,OAAJ,EAJP;AAKf,OAAiB,IAAIA,OAAJ,EALF;AAMf,MAAkC,EANnB,EAAjB","sourcesContent":["module.exports = {\n ___vPropsByDOMNode: new WeakMap(),\n ___vElementByDOMNode: new WeakMap(),\n ___componentByDOMNode: new WeakMap(),\n ___detachedByDOMNode: new WeakMap(),\n ___keyByDOMNode: new WeakMap(),\n ___ssrKeyedElementsByComponentId: {}\n};\n"],"file":"dom-data.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/endComponent/index-browser.js"],"names":["module","exports","endComponent","out","ee"],"mappings":"AAAA;;AAEAA,MAAM,CAACC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,GAAtB,EAA2B;AAC1CA,EAAAA,GAAG,CAACC,EAAJ,GAD0C,CAChC;AACX,CAFD","sourcesContent":["\"use strict\";\n\nmodule.exports = function endComponent(out) {\n out.ee(); // endElement() (also works for VComponent nodes pushed on to the stack)\n};\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/endComponent/index.js"],"names":["ComponentsContext","require","getComponentsContext","module","exports","endComponent","out","componentDef","w","global","runtimeId"],"mappings":"AAAA;;AAEA,IAAIA,iBAAiB,GAAGC,OAAO,CAAC,sBAAD,CAA/B;AACA,IAAIC,oBAAoB,GAAGF,iBAAiB,GAA5C;;AAEAG,MAAM,CAACC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,GAAtB,EAA2BC,YAA3B,EAAyC;AACxD,MAAIA,YAAY,IAAhB,EAAoC;AAClCD,IAAAA,GAAG,CAACE,CAAJ,CAAM,SAASF,GAAG,CAACG,MAAJ,CAAWC,SAApB,GAAgC,MAAtC;AACAR,IAAAA,oBAAoB,CAACI,GAAD,CAApB,MAA2CC,YAAY,IAAvD;AACD;AACF,CALD","sourcesContent":["\"use strict\";\n\nvar ComponentsContext = require(\"../ComponentsContext\");\nvar getComponentsContext = ComponentsContext.___getComponentsContext;\n\nmodule.exports = function endComponent(out, componentDef) {\n if (componentDef.___renderBoundary) {\n out.w(\"<!--\" + out.global.runtimeId + \"/-->\");\n getComponentsContext(out).___isPreserved = componentDef.___parentPreserved;\n }\n};\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/entry/index-browser.js"],"names":["initComponents","require","exports","getComponentForEl","init","window","$initComponents","registry","register","id","component","r"],"mappings":"aAAA,IAAIA,cAAc,GAAGC,OAAO,CAAC,oBAAD,CAA5B;AACAA,OAAO,CAAC,sBAAD,CAAP;AACED,cAAc,IADhB;;AAGAE,OAAO,CAACC,iBAAR,GAA4BF,OAAO,CAAC,SAAD,CAAP,IAA5B;AACAC,OAAO,CAACE,IAAR,GAAeC,MAAM,CAACC,eAAP,GAAyBN,cAAc,IAAtD;;AAEA,IAAIO,QAAQ,GAAGN,OAAO,CAAC,aAAD,CAAtB;AACAC,OAAO,CAACM,QAAR,GAAmB,UAAUC,EAAV,EAAcC,SAAd,EAAyB;AAC1CH,EAAAA,QAAQ,CAACI,CAAT,CAAWF,EAAX,EAAe,YAAY;AACzB,WAAOC,SAAP;AACD,GAFD;AAGD,CAJD","sourcesContent":["var initComponents = require(\"../init-components\");\nrequire(\"../ComponentsContext\").___initClientRendered =\n initComponents.___initClientRendered;\n\nexports.getComponentForEl = require(\"../util\").___getComponentForEl;\nexports.init = window.$initComponents = initComponents.___initServerRendered;\n\nvar registry = require(\"../registry\");\nexports.register = function (id, component) {\n registry.r(id, function () {\n return component;\n });\n};\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/entry/index.js"],"names":["warp10","require","safeJSONRegExp","IGNORE_GLOBAL_TYPES","Set","DEFAULT_RUNTIME_ID","FLAG_WILL_RERENDER_IN_BROWSER","FLAG_HAS_RENDER_BODY","safeJSONReplacer","match","charCodeAt","toString","isNotEmpty","obj","keys","Object","i","length","undefined","safeStringify","data","JSON","stringify","stringifyPrepare","replace","getSerializedGlobals","$global","serializedGlobalsLookup","serializedGlobals","key","value","has","addComponentsFromContext","componentsContext","componentsToHydrate","components","len","componentDef","id","component","flags","input","typeName","customEvents","scope","bubblingDomEvents","state","serializedProps","undefinedPropNames","renderBody","stateKeys","stateKey","push","extra","b","d","e","f","p","s","u","w","parts","hasExtra","nestedContexts","forEach","nestedContext","getInitComponentsData","out","componentDefs","global","isLast","didSerializeComponents","prefix","componentIdPrefix","widgetIdPrefix","l","TYPE_INDEX","typesLookup","Map","newTypes","typeIndex","get","size","set","g","t","getInitComponentsDataFromOut","runtimeId","r","writeInitComponentsCode","script","exports","getInitComponentsCode","initComponentsData","arguments","componentGlobalKey","getRenderedComponents"],"mappings":"AAAA;;AAEA,IAAIA,MAAM,GA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,GAAD,CAHlC;;AAKA,MAAI0B,kBAAkB,KAAK5E,SAA3B,EAAsC;AACpC,WAAO,EAAP;AACD;;AAED,QAAMsE,SAAS,GAAGpB,GAAG,CAACE,MAAJ,CAAWkB,SAA7B;AACA,QAAMQ,kBAAkB;AACtBR,EAAAA,SAAS,KAAKnF,kBAAd,GAAmC,IAAnC,GAA0CmF,SAAS,GAAG,IADxD;;AAGA,SAAQ,IAAGQ,kBAAmB,aAAYA,kBAAmB,gBAAe7E,aAAa;AACvF2E,EAAAA,kBADuF;AAEvF,KAFF;AAGD,CApBD;;AAsBAF,OAAO,GAAP,GAAsC5D,wBAAtC;AACA4D,OAAO,CAACF,uBAAR,GAAkCA,uBAAlC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACAE,OAAO,CAACK,qBAAR,GAAgC,UAAU7B,GAAV,EAAe;AAC7C,SAAOpE,MAAM,CAACuB,gBAAP,CAAwBgE,4BAA4B,CAACnB,GAAD,CAApD,CAAP;AACD,CAFD","sourcesContent":["\"use strict\";\n\nvar warp10 = require(\"warp10\");\nvar safeJSONRegExp = /<\\/|\\u2028|\\u2029/g;\nvar IGNORE_GLOBAL_TYPES = new Set([\"undefined\", \"function\", \"symbol\"]);\nvar DEFAULT_RUNTIME_ID = \"M\";\n\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\nvar FLAG_HAS_RENDER_BODY = 2;\n\nfunction safeJSONReplacer(match) {\n if (match === \"</\") {\n return \"\\\\u003C/\";\n } else {\n return \"\\\\u\" + match.charCodeAt(0).toString(16);\n }\n}\n\nfunction isNotEmpty(obj) {\n var keys = Object.keys(obj);\n for (var i = keys.length; i--; ) {\n if (obj[keys[i]] !== undefined) {\n return true;\n }\n }\n\n return false;\n}\nfunction safeStringify(data) {\n return JSON.stringify(warp10.stringifyPrepare(data)).replace(\n safeJSONRegExp,\n safeJSONReplacer\n );\n}\n\nfunction getSerializedGlobals($global) {\n let serializedGlobalsLookup = $global.serializedGlobals;\n if (serializedGlobalsLookup) {\n let serializedGlobals;\n let keys = Object.keys(serializedGlobalsLookup);\n for (let i = keys.length; i--; ) {\n let key = keys[i];\n if (serializedGlobalsLookup[key]) {\n let value = $global[key];\n if (!IGNORE_GLOBAL_TYPES.has(typeof value)) {\n if (serializedGlobals === undefined) {\n serializedGlobals = {};\n }\n serializedGlobals[key] = value;\n }\n }\n }\n\n return serializedGlobals;\n }\n}\n\nfunction addComponentsFromContext(componentsContext, componentsToHydrate) {\n var components = componentsContext.___components;\n\n var len = components.length;\n\n for (var i = 0; i < len; i++) {\n var componentDef = components[i];\n var id = componentDef.id;\n var component = componentDef.___component;\n var flags = componentDef.___flags;\n var input = component.input || 0;\n var typeName = component.typeName;\n var customEvents = component.___customEvents;\n var scope = component.___scope;\n var bubblingDomEvents = component.___bubblingDomEvents;\n\n var state;\n var serializedProps;\n var undefinedPropNames;\n\n if (flags & FLAG_WILL_RERENDER_IN_BROWSER) {\n if (typeof input.renderBody === \"function\") {\n flags |= FLAG_HAS_RENDER_BODY;\n input.renderBody = undefined;\n }\n } else {\n if (component.state) {\n state = component.state;\n // Update state properties with an `undefined` value to have a `null`\n // value so that the property name will be serialized down to the browser.\n // This ensures that we add the proper getter/setter for the state property.\n const stateKeys = Object.keys(state);\n for (let i = stateKeys.length; i--; ) {\n const stateKey = stateKeys[i];\n\n if (state[stateKey] === undefined) {\n if (undefinedPropNames) {\n undefinedPropNames.push(stateKey);\n } else {\n undefinedPropNames = [stateKey];\n }\n }\n }\n }\n\n component.___state = undefined; // We don't use `delete` to avoid V8 deoptimization\n component.___input = undefined; // We don't use `delete` to avoid V8 deoptimization\n component.typeName = undefined;\n component.id = undefined;\n component.___customEvents = undefined;\n component.___scope = undefined;\n component.___bubblingDomEvents = undefined;\n component.___bubblingDomEventsExtraArgsCount = undefined;\n component.___updatedInput = undefined;\n component.___updateQueued = undefined;\n\n if (isNotEmpty(component)) {\n serializedProps = component;\n }\n }\n\n var extra = {\n b: bubblingDomEvents,\n d: componentDef.___domEvents,\n e: customEvents,\n f: flags || undefined,\n p: customEvents && scope, // Only serialize scope if we need to attach custom events\n s: state,\n u: undefinedPropNames,\n w: serializedProps\n };\n\n var parts = [id, typeName];\n var hasExtra = isNotEmpty(extra);\n\n if (input) {\n parts.push(input);\n\n if (hasExtra) {\n parts.push(extra);\n }\n } else if (hasExtra) {\n parts.push(0, extra); // empty input;\n }\n\n componentsToHydrate.push(parts);\n }\n\n components.length = 0;\n\n // Also add any components from nested contexts\n var nestedContexts = componentsContext.___nestedContexts;\n if (nestedContexts !== undefined) {\n nestedContexts.forEach(function (nestedContext) {\n addComponentsFromContext(nestedContext, componentsToHydrate);\n });\n }\n}\n\nfunction getInitComponentsData(out, componentDefs) {\n const len = componentDefs.length;\n const $global = out.global;\n const isLast = $global.___isLastFlush;\n const didSerializeComponents = $global.___didSerializeComponents;\n const prefix = $global.componentIdPrefix || $global.widgetIdPrefix;\n\n if (len === 0) {\n if (isLast && didSerializeComponents) {\n return { p: prefix, l: 1 };\n }\n\n return;\n }\n\n const TYPE_INDEX = 1;\n const typesLookup =\n $global.___typesLookup || ($global.___typesLookup = new Map());\n let newTypes;\n\n for (let i = 0; i < len; i++) {\n const componentDef = componentDefs[i];\n const typeName = componentDef[TYPE_INDEX];\n let typeIndex = typesLookup.get(typeName);\n\n if (typeIndex === undefined) {\n typeIndex = typesLookup.size;\n typesLookup.set(typeName, typeIndex);\n\n if (newTypes) {\n newTypes.push(typeName);\n } else {\n newTypes = [typeName];\n }\n }\n\n componentDef[TYPE_INDEX] = typeIndex;\n }\n\n let serializedGlobals;\n\n if (!didSerializeComponents) {\n $global.___didSerializeComponents = true;\n serializedGlobals = getSerializedGlobals($global);\n }\n\n return {\n p: prefix,\n l: isLast && 1,\n g: serializedGlobals,\n w: componentDefs,\n t: newTypes\n };\n}\n\nfunction getInitComponentsDataFromOut(out) {\n const componentsContext = out.___components;\n\n if (componentsContext === null) {\n return;\n }\n\n const $global = out.global;\n const runtimeId = $global.runtimeId;\n const componentsToHydrate = [];\n addComponentsFromContext(componentsContext, componentsToHydrate);\n\n $global.___isLastFlush = true;\n const data = getInitComponentsData(out, componentsToHydrate);\n $global.___isLastFlush = undefined;\n\n if (runtimeId !== DEFAULT_RUNTIME_ID && data) {\n data.r = runtimeId;\n }\n\n return data;\n}\n\nfunction writeInitComponentsCode(out) {\n out.script(exports.___getInitComponentsCode(out));\n}\n\nexports.___getInitComponentsCode = function getInitComponentsCode(\n out,\n componentDefs\n) {\n const initComponentsData =\n arguments.length === 2\n ? getInitComponentsData(out, componentDefs)\n : getInitComponentsDataFromOut(out);\n\n if (initComponentsData === undefined) {\n return \"\";\n }\n\n const runtimeId = out.global.runtimeId;\n const componentGlobalKey =\n runtimeId === DEFAULT_RUNTIME_ID ? \"MC\" : runtimeId + \"_C\";\n\n return `$${componentGlobalKey}=(window.$${componentGlobalKey}||[]).concat(${safeStringify(\n initComponentsData\n )})`;\n};\n\nexports.___addComponentsFromContext = addComponentsFromContext;\nexports.writeInitComponentsCode = writeInitComponentsCode;\n\n/**\n * Returns an object that can be sent to the browser using JSON.stringify. The parsed object should be\n * passed to require('marko-components').initComponents(...);\n *\n * @param {ComponentsContext|AsyncWriter} componentsContext A ComponentsContext or an AsyncWriter\n * @return {Object} An object with information about the rendered components that can be serialized to JSON. The object should be treated as opaque\n */\nexports.getRenderedComponents = function (out) {\n return warp10.stringifyPrepare(getInitComponentsDataFromOut(out));\n};\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/event-delegation.js"],"names":["componentsUtil","require","runtimeId","componentLookup","getMarkoPropsFromEl","TEXT_NODE","listenersAttachedKey","delegatedEvents","getEventFromEl","el","eventName","virtualProps","eventInfo","split","length","parseInt","delegateEvent","node","target","event","targetMethod","targetComponentId","isOnce","extraArgs","targetComponent","targetFunc","Error","apply","concat","call","addDelegatedEventHandler","eventType","addDelegatedEventHandlerToHost","host","listeners","body","addEventListener","curNode","correspondingUseElement","nodeType","parentNode","propName","bubbles","propagationStopped","oldStopPropagation","stopPropagation","getAttribute","noop","exports","Object","keys","forEach"],"mappings":"aAAA,IAAIA,cAAc,GAAGC,OAAO,CAAC,QAAD,CAA5B;AACA,IAAIC,SAAS,GAAGF,cAAc,IAA9B;AACA,IAAIG,eAAe,GAAGH,cAAc,GAApC;AACA,IAAII,mBAAmB,GAAGJ,cAAc,IAAxC;;AAEA,IAAIK,SAAS,GAAG,CAAhB;;AAEA;AACA;AACA,IAAIC,oBAAoB,GAAG,SAASJ,SAApC;AACA,IAAIK,eAAe,GAAG,EAAtB;;AAEA,SAASC,cAAT,CAAwBC,EAAxB,EAA4BC,SAA5B,EAAuC;AACrC,MAAIC,YAAY,GAAGP,mBAAmB,CAACK,EAAD,CAAtC;AACA,MAAIG,SAAS,GAAGD,YAAY,CAACD,SAAD,CAA5B;;AAEA,MAAI,OAAOE,SAAP,KAAqB,QAAzB,EAAmC;AACjCA,IAAAA,SAAS,GAAGA,SAAS,CAACC,KAAV,CAAgB,GAAhB,CAAZ;AACA,QAAID,SAAS,CAAC,CAAD,CAAb,EAAkB;AAChBA,MAAAA,SAAS,CAAC,CAAD,CAAT,GAAeA,SAAS,CAAC,CAAD,CAAT,KAAiB,MAAhC;AACD;AACD,QAAIA,SAAS,CAACE,MAAV,IAAoB,CAAxB,EAA2B;AACzBF,MAAAA,SAAS,CAAC,CAAD,CAAT,GAAeG,QAAQ,CAACH,SAAS,CAAC,CAAD,CAAV,EAAe,EAAf,CAAvB;AACD;AACF;;AAED,SAAOA,SAAP;AACD;;AAED,SAASI,aAAT,CAAuBC,IAAvB,EAA6BP,SAA7B,EAAwCQ,MAAxC,EAAgDC,KAAhD,EAAuD;AACrD,MAAIC,YAAY,GAAGF,MAAM,CAAC,CAAD,CAAzB;AACA,MAAIG,iBAAiB,GAAGH,MAAM,CAAC,CAAD,CAA9B;AACA,MAAII,MAAM,GAAGJ,MAAM,CAAC,CAAD,CAAnB;AACA,MAAIK,SAAS,GAAGL,MAAM,CAAC,CA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F,KAhDH;AAiDE,QAjDF;;AAmDD;AACF;;AAED,SAAS4B,IAAT,GAAgB,CAAE;;AAElBC,OAAO,IAAP,GAA8BD,IAA9B;AACAC,OAAO,IAAP,GAA8BD,IAA9B;AACAC,OAAO,IAAP,GAA2BhC,aAA3B;AACAgC,OAAO,IAAP,GAA4BxC,cAA5B;AACAwC,OAAO,IAAP,GAAsClB,wBAAtC;AACAkB,OAAO,IAAP,GAAkB,UAAUf,IAAV,EAAgB;AAChCgB,EAAAA,MAAM,CAACC,IAAP,CAAY3C,eAAZ,EAA6B4C,OAA7B,CAAqC,UAAUpB,SAAV,EAAqB;AACxDC,IAAAA,8BAA8B,CAACD,SAAD,EAAYE,IAAZ,CAA9B;AACD,GAFD;AAGD,CAJD","sourcesContent":["var componentsUtil = require(\"./util\");\nvar runtimeId = componentsUtil.___runtimeId;\nvar componentLookup = componentsUtil.___componentLookup;\nvar getMarkoPropsFromEl = componentsUtil.___getMarkoPropsFromEl;\n\nvar TEXT_NODE = 3;\n\n// We make our best effort to allow multiple marko runtimes to be loaded in the\n// same window. Each marko runtime will get its own unique runtime ID.\nvar listenersAttachedKey = \"$MDE\" + runtimeId;\nvar delegatedEvents = {};\n\nfunction getEventFromEl(el, eventName) {\n var virtualProps = getMarkoPropsFromEl(el);\n var eventInfo = virtualProps[eventName];\n\n if (typeof eventInfo === \"string\") {\n eventInfo = eventInfo.split(\" \");\n if (eventInfo[2]) {\n eventInfo[2] = eventInfo[2] === \"true\";\n }\n if (eventInfo.length == 4) {\n eventInfo[3] = parseInt(eventInfo[3], 10);\n }\n }\n\n return eventInfo;\n}\n\nfunction delegateEvent(node, eventName, target, event) {\n var targetMethod = target[0];\n var targetComponentId = target[1];\n var isOnce = target[2];\n var extraArgs = target[3];\n\n if (isOnce) {\n var virtualProps = getMarkoPropsFromEl(node);\n delete virtualProps[eventName];\n }\n\n var targetComponent = componentLookup[targetComponentId];\n\n if (!targetComponent) {\n return;\n }\n\n var targetFunc =\n typeof targetMethod === \"function\"\n ? targetMethod\n : targetComponent[targetMethod];\n if (!targetFunc) {\n throw Error(\"Method not found: \" + targetMethod);\n }\n\n if (extraArgs != null) {\n if (typeof extraArgs === \"number\") {\n extraArgs = targetComponent.___bubblingDomEvents[extraArgs];\n }\n }\n\n // Invoke the component method\n if (extraArgs) {\n targetFunc.apply(targetComponent, extraArgs.concat(event, node));\n } else {\n targetFunc.call(targetComponent, event, node);\n }\n}\n\nfunction addDelegatedEventHandler(eventType) {\n if (!delegatedEvents[eventType]) {\n delegatedEvents[eventType] = true;\n }\n}\n\nfunction addDelegatedEventHandlerToHost(eventType, host) {\n var listeners = (host[listenersAttachedKey] =\n host[listenersAttachedKey] || {});\n if (!listeners[eventType]) {\n (host.body || host).addEventListener(\n eventType,\n (listeners[eventType] = function (event) {\n var curNode = event.target;\n if (!curNode) {\n return;\n }\n\n curNode =\n // event.target of an SVGElementInstance does not have a\n // `getAttribute` function in IE 11.\n // See https://github.com/marko-js/marko/issues/796\n curNode.correspondingUseElement ||\n // in some browsers the event target can be a text node\n // one example being dragenter in firefox.\n (curNode.nodeType === TEXT_NODE ? curNode.parentNode : curNode);\n\n // Search up the tree looking DOM events mapped to target\n // component methods\n var propName = \"on\" + eventType;\n var target;\n\n // Attributes will have the following form:\n // on<event_type>(\"<target_method>|<component_id>\")\n\n if (event.bubbles) {\n var propagationStopped = false;\n\n // Monkey-patch to fix #97\n var oldStopPropagation = event.stopPropagation;\n\n event.stopPropagation = function () {\n oldStopPropagation.call(event);\n propagationStopped = true;\n };\n\n do {\n if ((target = getEventFromEl(curNode, propName))) {\n delegateEvent(curNode, propName, target, event);\n\n if (propagationStopped) {\n break;\n }\n }\n } while ((curNode = curNode.parentNode) && curNode.getAttribute);\n } else if ((target = getEventFromEl(curNode, propName))) {\n delegateEvent(curNode, propName, target, event);\n }\n }),\n true\n );\n }\n}\n\nfunction noop() {}\n\nexports.___handleNodeAttach = noop;\nexports.___handleNodeDetach = noop;\nexports.___delegateEvent = delegateEvent;\nexports.___getEventFromEl = getEventFromEl;\nexports.___addDelegatedEventHandler = addDelegatedEventHandler;\nexports.___init = function (host) {\n Object.keys(delegatedEvents).forEach(function (eventType) {\n addDelegatedEventHandlerToHost(eventType, host);\n });\n};\n"],"file":"event-delegation.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/index.js"],"names":["module","exports","require"],"mappings":"aAAAA,MAAM,CAACC,OAAP,GAAiBC,OAAO,CAAC,SAAD,CAAxB","sourcesContent":["module.exports = require(\"./entry\");\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/init-components/index-browser.js"],"names":["warp10Finalize","require","eventDelegation","win","window","createFragmentNode","componentsUtil","componentLookup","addComponentRootToKeyedElements","ComponentDef","registry","domData","keyedElementsByComponentId","componentsByDOMNode","serverComponentRootNodes","serverRenderedMeta","DEFAULT_RUNTIME_ID","FLAG_WILL_RERENDER_IN_BROWSER","deferredDefs","indexServerComponentBoundaries","node","runtimeId","stack","componentId","ownerId","ownerComponent","keyedElements","nextSibling","runtimeLength","length","firstChild","nodeType","commentValue","nodeValue","slice","firstChar","push","endNode","startNode","pop","rootNode","parentNode","substring","parts","split","key","removeChild","markoKey","getAttribute","markoProps","separatorIndex","indexOf","Object","keys","forEach","invokeComponentEventHandler","component","targetMethodName","args","method","Error","apply","addEventListenerHelper","el","eventType","isOnce","listener","eventListener","event","removeEventListener","addEventListener","remove","addDOMEventListeners","extraArgs","handles","removeListener","concat","initComponent","componentDef","host","isExisting","domEvents","eventListenerHandles","domEventArgs","eventEl","initClientRendered","componentDefs","document","len","i","trackComponent","initServerRendered","renderedComponents","type","globalKey","fakeArray","r","renderedComponent","isFromSerializedGlobals","prefix","p","meta","isLast","l","g","t","w","map","typeName","tryHydrateComponent","reverse","tryInvoke","rawDef","mount","hydrateComponentAndGetMount","undefined","id","renderResult","set","afterInsert","fn","exports"],"mappings":"AAAA;;AAEA,IAAIA,cAAc,GAAGC,OAAO,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AEAiC,IAAAA,SAAS,GAAT,GAAwBhB,QAAxB;AACA3B,IAAAA,mBAAmB,CAACyG,GAApB,CAAwB9E,QAAxB,EAAkCgB,SAAlC;;AAEA,QAAIsB,YAAY,IAAZ,GAAwB7D,6BAA5B,EAA2D;AACzDuC,MAAAA,SAAS,GAAT,GAAoBuB,IAApB;AACAsC,MAAAA,YAAY,GAAG7D,SAAS,IAAT,CAAsBA,SAAS,GAA/B,EAA0C,IAA1C,CAAf;AACAkC,MAAAA,cAAc,CAACZ,YAAD,CAAd;AACA,aAAO,SAASmC,KAAT,GAAiB;AACtBI,QAAAA,YAAY,CAACE,WAAb,CAAyBxC,IAAzB;AACD,OAFD;AAGD,KAPD,MAOO;AACLW,MAAAA,cAAc,CAACZ,YAAD,CAAd;AACD;;AAED,WAAO,SAASmC,KAAT,GAAiB;AACtBpC,MAAAA,aAAa,CAACC,YAAD,EAAeC,IAAf,CAAb;AACD,KAFD;AAGD;AACF;;AAED,SAASW,cAAT,CAAwBZ,YAAxB,EAAsC;AACpC,MAAItB,SAAS,GAAGsB,YAAY,GAA5B;AACA,MAAItB,SAAJ,EAAe;AACbjD,IAAAA,eAAe,CAACiD,SAAS,CAAC4D,EAAX,CAAf,GAAgC5D,SAAhC;AACD;AACF;;AAED,SAASuD,SAAT,CAAmBS,EAAnB,EAAuB;AACrB,MAAIA,EAAJ,EAAQA,EAAE;AACX;;AAEDC,OAAO,IAAP,GAAgCpC,kBAAhC;AACAoC,OAAO,IAAP,GAAgC9B,kBAAhC;AACA8B,OAAO,IAAP,GAAiCZ,mBAAjC","sourcesContent":["\"use strict\";\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar warp10Finalize = require(\"warp10/finalize\");\nvar eventDelegation = require(\"../event-delegation\");\nvar win = window;\nvar createFragmentNode =\n require(\"../../vdom/morphdom/fragment\").___createFragmentNode;\nvar componentsUtil = require(\"../util\");\nvar componentLookup = componentsUtil.___componentLookup;\nvar addComponentRootToKeyedElements =\n componentsUtil.___addComponentRootToKeyedElements;\nvar ComponentDef = require(\"../ComponentDef\");\nvar registry = require(\"../registry\");\nvar domData = require(\"../dom-data\");\nvar keyedElementsByComponentId = domData.___ssrKeyedElementsByComponentId;\nvar componentsByDOMNode = domData.___componentByDOMNode;\nvar serverComponentRootNodes = {};\nvar serverRenderedMeta = {};\n\nvar DEFAULT_RUNTIME_ID = \"M\";\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\n// var FLAG_HAS_RENDER_BODY = 2;\n\nvar deferredDefs;\n\nfunction indexServerComponentBoundaries(node, runtimeId, stack) {\n var componentId;\n var ownerId;\n var ownerComponent;\n var keyedElements;\n var nextSibling;\n var runtimeLength = runtimeId.length;\n stack = stack || [];\n\n node = node.firstChild;\n while (node) {\n nextSibling = node.nextSibling;\n if (node.nodeType === 8) {\n // Comment node\n var commentValue = node.nodeValue;\n if (commentValue.slice(0, runtimeLength) === runtimeId) {\n var firstChar = commentValue[runtimeLength];\n\n if (firstChar === \"^\" || firstChar === \"#\") {\n stack.push(node);\n } else if (firstChar === \"/\") {\n var endNode = node;\n var startNode = stack.pop();\n var rootNode;\n\n if (startNode.parentNode === endNode.parentNode) {\n rootNode = createFragmentNode(startNode.nextSibling, endNode);\n } else {\n rootNode = createFragmentNode(\n endNode.parentNode.firstChild,\n endNode\n );\n }\n\n componentId = startNode.nodeValue.substring(runtimeLength + 1);\n firstChar = startNode.nodeValue[runtimeLength];\n\n if (firstChar === \"^\") {\n var parts = componentId.split(/ /g);\n var key = parts[2];\n ownerId = parts[1];\n componentId = parts[0];\n if ((ownerComponent = componentLookup[ownerId])) {\n keyedElements = ownerComponent.___keyedElements;\n } else {\n keyedElements =\n keyedElementsByComponentId[ownerId] ||\n (keyedElementsByComponentId[ownerId] = {});\n }\n addComponentRootToKeyedElements(\n keyedElements,\n key,\n rootNode,\n componentId\n );\n }\n\n serverComponentRootNodes[componentId] = rootNode;\n\n startNode.parentNode.removeChild(startNode);\n endNode.parentNode.removeChild(endNode);\n }\n }\n } else if (node.nodeType === 1) {\n // HTML element node\n var markoKey = node.getAttribute(\"data-marko-key\");\n var markoProps = componentsUtil.___getMarkoPropsFromEl(node);\n if (markoKey) {\n var separatorIndex = markoKey.indexOf(\" \");\n ownerId = markoKey.substring(separatorIndex + 1);\n markoKey = markoKey.substring(0, separatorIndex);\n if ((ownerComponent = componentLookup[ownerId])) {\n keyedElements = ownerComponent.___keyedElements;\n } else {\n keyedElements =\n keyedElementsByComponentId[ownerId] ||\n (keyedElementsByComponentId[ownerId] = {});\n }\n keyedElements[markoKey] = node;\n }\n if (markoProps) {\n Object.keys(markoProps).forEach(function (key) {\n if (key.slice(0, 2) === \"on\") {\n eventDelegation.___addDelegatedEventHandler(key.slice(2));\n }\n });\n }\n indexServerComponentBoundaries(node, runtimeId, stack);\n }\n\n node = nextSibling;\n }\n}\n\nfunction invokeComponentEventHandler(component, targetMethodName, args) {\n var method = component[targetMethodName];\n if (!method) {\n throw Error(\"Method not found: \" + targetMethodName);\n }\n\n method.apply(component, args);\n}\n\nfunction addEventListenerHelper(el, eventType, isOnce, listener) {\n var eventListener = listener;\n if (isOnce) {\n eventListener = function (event) {\n listener(event);\n el.removeEventListener(eventType, eventListener);\n };\n }\n\n el.addEventListener(eventType, eventListener, false);\n\n return function remove() {\n el.removeEventListener(eventType, eventListener);\n };\n}\n\nfunction addDOMEventListeners(\n component,\n el,\n eventType,\n targetMethodName,\n isOnce,\n extraArgs,\n handles\n) {\n var removeListener = addEventListenerHelper(\n el,\n eventType,\n isOnce,\n function (event) {\n var args = [event, el];\n if (extraArgs) {\n args = extraArgs.concat(args);\n }\n\n invokeComponentEventHandler(component, targetMethodName, args);\n }\n );\n handles.push(removeListener);\n}\n\nfunction initComponent(componentDef, host) {\n var component = componentDef.___component;\n\n component.___reset();\n component.___host = host;\n\n var isExisting = componentDef.___isExisting;\n\n if (isExisting) {\n component.___removeDOMEventListeners();\n }\n\n var domEvents = componentDef.___domEvents;\n if (domEvents) {\n var eventListenerHandles = [];\n\n domEvents.forEach(function (domEventArgs) {\n // The event mapping is for a direct DOM event (not a custom event and not for bubblign dom events)\n\n var eventType = domEventArgs[0];\n var targetMethodName = domEventArgs[1];\n var eventEl = component.___keyedElements[domEventArgs[2]];\n var isOnce = domEventArgs[3];\n var extraArgs = domEventArgs[4];\n\n addDOMEventListeners(\n component,\n eventEl,\n eventType,\n targetMethodName,\n isOnce,\n extraArgs,\n eventListenerHandles\n );\n });\n\n if (eventListenerHandles.length) {\n component.___domEventListenerHandles = eventListenerHandles;\n }\n }\n\n if (component.___mounted) {\n component.___emitUpdate();\n } else {\n component.___mounted = true;\n component.___emitMount();\n }\n}\n\n/**\n * This method is used to initialized components associated with UI components\n * rendered in the browser. While rendering UI components a \"components context\"\n * is added to the rendering context to keep up with which components are rendered.\n * When ready, the components can then be initialized by walking the component tree\n * in the components context (nested components are initialized before ancestor components).\n * @param {Array<marko-components/lib/ComponentDef>} componentDefs An array of ComponentDef instances\n */\nfunction initClientRendered(componentDefs, host) {\n if (!host) host = document;\n // Ensure that event handlers to handle delegating events are\n // always attached before initializing any components\n eventDelegation.___init(host);\n var len = componentDefs.length;\n var componentDef;\n var i;\n\n for (i = len; i--; ) {\n componentDef = componentDefs[i];\n trackComponent(componentDef);\n }\n\n for (i = len; i--; ) {\n componentDef = componentDefs[i];\n initComponent(componentDef, host);\n }\n}\n\n/**\n * This method initializes all components that were rendered on the server by iterating over all\n * of the component IDs.\n */\nfunction initServerRendered(renderedComponents, host) {\n var type = typeof renderedComponents;\n var globalKey = \"$\";\n var runtimeId;\n\n if (type !== \"object\") {\n if (type === \"string\") {\n runtimeId = renderedComponents;\n globalKey += runtimeId + \"_C\";\n } else {\n globalKey += (runtimeId = DEFAULT_RUNTIME_ID) + \"C\";\n }\n\n renderedComponents = win[globalKey];\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (\n renderedComponents &&\n renderedComponents.i !== undefined &&\n renderedComponents.i !== componentsUtil.___runtimeId\n ) {\n console.warn(\n \"Multiple instances of Marko have attached to the same runtime id. This could mean that more than one copy of Marko is loaded on the page, or that the script containing Marko has executed more than once.\"\n );\n }\n }\n\n var fakeArray = (win[globalKey] = {\n r: runtimeId,\n concat: initServerRendered\n });\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n fakeArray.i = componentsUtil.___runtimeId;\n }\n\n if (renderedComponents && renderedComponents.forEach) {\n renderedComponents.forEach(function (renderedComponent) {\n fakeArray.concat(renderedComponent);\n });\n }\n\n return fakeArray;\n }\n\n var isFromSerializedGlobals = this.concat === initServerRendered;\n renderedComponents = warp10Finalize(renderedComponents);\n\n if (isFromSerializedGlobals) {\n runtimeId = this.r;\n host = document;\n } else {\n runtimeId = renderedComponents.r || DEFAULT_RUNTIME_ID;\n if (!host) host = document;\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n complain(\n \"Passing serialized data to `require('marko/components).init` is deprecated. Instead set '$global.runtimeId' and provide the 'runtimeId' option to your Marko bundler plugin.\"\n );\n }\n }\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (host !== document) {\n complain(\n \"Passing a document other than the current document to `require('marko/components).init` is deprecated.\"\n );\n }\n }\n\n var prefix = renderedComponents.p || \"\";\n var meta = serverRenderedMeta[prefix];\n var isLast = renderedComponents.l;\n\n if (meta) {\n if (isLast) {\n delete serverRenderedMeta[prefix];\n }\n } else {\n meta = {};\n\n if (!isLast) {\n serverRenderedMeta[prefix] = meta;\n }\n }\n\n // Ensure that event handlers to handle delegating events are\n // always attached before initializing any components\n indexServerComponentBoundaries(host, runtimeId);\n eventDelegation.___init(host);\n\n if (renderedComponents.g) {\n meta.___globals = renderedComponents.g;\n }\n\n if (renderedComponents.t) {\n meta.___types = meta.___types\n ? meta.___types.concat(renderedComponents.t)\n : renderedComponents.t;\n }\n\n // hydrate components top down (leaf nodes last)\n // and return an array of functions to mount these components\n (renderedComponents.w || [])\n .map(function (componentDef) {\n var typeName = meta.___types[componentDef[1]];\n\n return registry.___isRegistered(typeName)\n ? tryHydrateComponent(componentDef, meta, host, runtimeId)\n : registry.___addPendingDef(\n componentDef,\n typeName,\n meta,\n host,\n runtimeId\n );\n })\n .reverse()\n .forEach(tryInvoke);\n\n return this;\n}\n\nfunction tryHydrateComponent(rawDef, meta, host, runtimeId) {\n var componentDef = ComponentDef.___deserialize(\n rawDef,\n meta.___types,\n meta.___globals,\n registry\n );\n var mount = hydrateComponentAndGetMount(componentDef, host);\n\n if (!mount) {\n // hydrateComponentAndGetMount will return false if there is not rootNode\n // for the component. If this is the case, we'll wait until the\n // DOM has fully loaded to attempt to init the component again.\n if (deferredDefs) {\n deferredDefs.push(componentDef);\n } else {\n deferredDefs = [componentDef];\n document.addEventListener(\"DOMContentLoaded\", function () {\n indexServerComponentBoundaries(host, runtimeId);\n deferredDefs\n .map(function (componentDef) {\n return hydrateComponentAndGetMount(componentDef, host);\n })\n .reverse()\n .forEach(tryInvoke);\n deferredDefs = undefined;\n });\n }\n }\n\n return mount;\n}\n\nfunction hydrateComponentAndGetMount(componentDef, host) {\n var componentId = componentDef.id;\n var component = componentDef.___component;\n var rootNode = serverComponentRootNodes[componentId];\n var renderResult;\n\n if (rootNode) {\n delete serverComponentRootNodes[componentId];\n\n component.___rootNode = rootNode;\n componentsByDOMNode.set(rootNode, component);\n\n if (componentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER) {\n component.___host = host;\n renderResult = component.___rerender(component.___input, true);\n trackComponent(componentDef);\n return function mount() {\n renderResult.afterInsert(host);\n };\n } else {\n trackComponent(componentDef);\n }\n\n return function mount() {\n initComponent(componentDef, host);\n };\n }\n}\n\nfunction trackComponent(componentDef) {\n var component = componentDef.___component;\n if (component) {\n componentLookup[component.id] = component;\n }\n}\n\nfunction tryInvoke(fn) {\n if (fn) fn();\n}\n\nexports.___initClientRendered = initClientRendered;\nexports.___initServerRendered = initServerRendered;\nexports.___tryHydrateComponent = tryHydrateComponent;\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/init-components/index.js"],"names":[],"mappings":"AAAA","sourcesContent":["// The server-side implementation of this module is intentionally empty\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/registry/index-browser.js"],"names":["queueMicrotask","require","defineComponent","initComponents","registered","loaded","componentTypes","pendingDefs","register","type","def","pendingForType","forEach","args","addPendingDef","meta","host","runtimeId","push","isRegistered","Boolean","load","typeName","target","Error","getComponentClass","ComponentClass","Component","renderer","prototype","createComponent","id","exports","r"],"mappings":";AACA,IAAIA,cAAc,GAAGC,OAAO,CAAC,sBAAD,CAA5B;AACA,IAAIC,eAAe,GAAGD,OAAO,CAAC,oBAAD,CAA7B;AACA,IAAIE,cAAc,GAAGF,OAAO,CAAC,oBAAD,CAA5B;AACAA,OAAO,CAAC,UAAD,CAAP;;AAEA,IAAIG,UAAU,GAAG,EAAjB;AACA,IAAIC,MAAM,GAAG,EAAb;AACA,IAAIC,cAAc,GAAG,EAArB;AACA,IAAIC,WAAJ;;AAEA,SAASC,QAAT,CAAkBC,IAAlB,EAAwBC,GAAxB,EAA6B;AAC3B,MAAIC,cAAJ;AACA,MAAIJ,WAAJ,EAAiB;AACfI,IAAAA,cAAc,GAAGJ,WAAW,CAACE,IAAD,CAA5B;AACD;AACDL,EAAAA,UAAU,CAACK,IAAD,CAAV,GAAmBC,GAAnB;AACA,SAAOL,MAAM,CAACI,IAAD,CAAb;AACA,SAAOH,cAAc,CAACG,IAAD,CAArB;;AAEA,MAAIE,cAAJ,EAAoB;AAClB,WAAOJ,WAAW,CAACE,IAAD,CAAlB;AACAT,IAAAA,cAAc,CAAC,YAAY;AACzBW,MAAAA,cAAc,CAACC,OAAf,CAAuB,UAAUC,IAAV,EAAgB;AACrCV,QAAAA,cAAc,IAAd;AACEU,QAAAA,IAAI,CAAC,CAAD,CADN;AAEEA,QAAAA,IAAI,CAAC,CAAD,CA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AAGL,IAAI,CAACC,QAAD,CAArB;;AAEAI,EAAAA,cAAc,GAAGA,cAAc,CAACC,SAAf,IAA4BD,cAA7C;;AAEA,MAAI,CAACA,cAAc,GAAnB,EAAoC;AAClCA,IAAAA,cAAc,GAAGxB,eAAe,CAACwB,cAAD,EAAiBA,cAAc,CAACE,QAAhC,CAAhC;AACD;;AAED;AACAF,EAAAA,cAAc,CAACG,SAAf,OAAmCP,QAAnC;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BAhB,EAAAA,cAAc,CAACgB,QAAD,CAAd,GAA2BI,cAA3B;;AAEA,SAAOA,cAAP;AACD;;AAED,SAASI,eAAT,CAAyBR,QAAzB,EAAmCS,EAAnC,EAAuC;AACrC,MAAIL,cAAc,GAAGD,iBAAiB,CAACH,QAAD,CAAtC;AACA,SAAO,IAAII,cAAJ,CAAmBK,EAAnB,CAAP;AACD;;AAEDC,OAAO,CAACC,CAAR,GAAYzB,QAAZ;AACAwB,OAAO,IAAP,GAA+BP,iBAA/B;AACAO,OAAO,IAAP,GAA6BF,eAA7B;AACAE,OAAO,IAAP,GAA0Bb,YAA1B;AACAa,OAAO,IAAP,GAA2BlB,aAA3B","sourcesContent":["var complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar queueMicrotask = require(\"../../queueMicrotask\");\nvar defineComponent = require(\"../defineComponent\");\nvar initComponents = require(\"../init-components\");\nrequire(\"../entry\");\n\nvar registered = {};\nvar loaded = {};\nvar componentTypes = {};\nvar pendingDefs;\n\nfunction register(type, def) {\n var pendingForType;\n if (pendingDefs) {\n pendingForType = pendingDefs[type];\n }\n registered[type] = def;\n delete loaded[type];\n delete componentTypes[type];\n\n if (pendingForType) {\n delete pendingDefs[type];\n queueMicrotask(function () {\n pendingForType.forEach(function (args) {\n initComponents.___tryHydrateComponent(\n args[0],\n args[1],\n args[2],\n args[3]\n )();\n });\n });\n }\n\n return type;\n}\n\nfunction addPendingDef(def, type, meta, host, runtimeId) {\n if (!pendingDefs) {\n pendingDefs = {};\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n document.addEventListener(\"load\", function () {\n var pendingComponentIds = Object.keys(pendingDefs);\n if (pendingComponentIds.length) {\n complain(\n \"Marko templates were never loaded for: \" + pendingComponentIds\n );\n }\n });\n }\n }\n (pendingDefs[type] = pendingDefs[type] || []).push([\n def,\n meta,\n host,\n runtimeId\n ]);\n}\n\nfunction isRegistered(type) {\n return Boolean(registered[type]);\n}\n\nfunction load(typeName) {\n var target = loaded[typeName];\n if (!target) {\n target = registered[typeName];\n\n if (target) {\n target = target();\n }\n\n if (!target) {\n throw Error(\"Component not found: \" + typeName);\n }\n\n loaded[typeName] = target;\n }\n\n return target;\n}\n\nfunction getComponentClass(typeName) {\n var ComponentClass = componentTypes[typeName];\n\n if (ComponentClass) {\n return ComponentClass;\n }\n\n ComponentClass = load(typeName);\n\n ComponentClass = ComponentClass.Component || ComponentClass;\n\n if (!ComponentClass.___isComponent) {\n ComponentClass = defineComponent(ComponentClass, ComponentClass.renderer);\n }\n\n // Make the component \"type\" accessible on each component instance\n ComponentClass.prototype.___type = typeName;\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n var classNameMatch =\n /\\/([^/]+?)(?:\\/index|\\/template|)(?:\\.marko|\\.component(?:-browser)?|)$/.exec(\n typeName\n );\n var className = classNameMatch ? classNameMatch[1] : \"AnonymousComponent\";\n className = className.replace(/-(.)/g, function (g) {\n return g[1].toUpperCase();\n });\n className = className\n .replace(/\\$\\d+\\.\\d+\\.\\d+$/, \"\")\n .replace(/^[^a-z$_]/i, \"_$&\")\n .replace(/[^0-9a-z$_]+/gi, \"_\");\n className = className[0].toUpperCase() + className.slice(1);\n // eslint-disable-next-line no-unused-vars\n try {\n var OldComponentClass = ComponentClass;\n eval(\n \"ComponentClass = function \" +\n className +\n \"(id, doc) { OldComponentClass.call(this, id, doc); }\"\n );\n ComponentClass.prototype = OldComponentClass.prototype;\n } catch (e) {\n /** ignore error */\n }\n }\n\n componentTypes[typeName] = ComponentClass;\n\n return ComponentClass;\n}\n\nfunction createComponent(typeName, id) {\n var ComponentClass = getComponentClass(typeName);\n return new ComponentClass(id);\n}\n\nexports.r = register;\nexports.___getComponentClass = getComponentClass;\nexports.___createComponent = createComponent;\nexports.___isRegistered = isRegistered;\nexports.___addPendingDef = addPendingDef;\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/registry/index.js"],"names":["copyProps","require","constructorCache","Map","BaseServerComponent","createServerComponentClass","renderingLogic","renderingLogicProps","prototype","ServerComponent","createComponent","id","input","out","typeName","customEvents","scope","get","set","exports"],"mappings":"AAAA;AACA,MAAMA,SAAS,GAAGC,OAAO,CAAC,uBAAD,CAAzB;AACA,MAAMC,gBAAgB,GAAG,IAAIC,GAAJ,EAAzB;AACA,MAAMC,mBAAmB,GAAGH,OAAO,CAAC,oBAAD,CAAnC;;AAEA,SAASI,0BAAT,CAAoCC,cAApC,EAAoD;AAClD,MAAIC,mBAAmB;AACrB,SAAOD,cAAP,KAA0B,UAA1B;AACIA,EAAAA,cAAc,CAACE,SADnB;AAEIF,EAAAA,cAHN;;AAKA,QAAMG,eAAN,SAA8BL,mBAA9B,CAAkD;;AAElDJ,EAAAA,SAAS,CAACO,mBAAD,EAAsBE,eAAe,CAACD,SAAtC,CAAT;;AAEA,SAAOC,eAAP;AACD;AACD,SAASC,eAAT;AACEJ,cADF;AAEEK,EAFF;AAGEC,KAHF;AAIEC,GAJF;AAKEC,QALF;AAMEC,YANF;AAOEC,KAPF;AAQE;AACA,MAAIP,eAAJ;;AAEA,MAAIH,cAAJ,EAAoB;AAClBG,IAAAA,eAAe,GAAGP,gBAAgB,CAACe,GAAjB,CAAqBX,cAArB,CAAlB;;AAEA,QAAI,CAACG,eAAL,EAAsB;AACpBA,MAAAA,eAAe,GAAGJ,0BAA0B,CAACC,cAAD,CAA5C;AACAJ,MAAAA,gBAAgB,CAACgB,GAAjB,CAAqBZ,cAArB,EAAqCG,eAArC;AACD;AACF,GAPD,MAOO;AACLA,IAAAA,eAAe,GAAGL,mBAAlB;AACD;;AAED,SAAO,IAAIK,eAAJ,CAAoBE,EAApB,EAAwBC,KAAxB,EAA+BC,GAA/B,EAAoCC,QAApC,EAA8CC,YAA9C,EAA4DC,KAA5D,CAAP;AACD;;AAEDG,OAAO,IAAP,GAAsB,IAAtB;AACAA,OAAO,IAAP,GAA6BT,eAA7B","sourcesContent":["\"use strict\";\nconst copyProps = require(\"raptor-util/copyProps\");\nconst constructorCache = new Map();\nconst BaseServerComponent = require(\"../ServerComponent\");\n\nfunction createServerComponentClass(renderingLogic) {\n var renderingLogicProps =\n typeof renderingLogic === \"function\"\n ? renderingLogic.prototype\n : renderingLogic;\n\n class ServerComponent extends BaseServerComponent {}\n\n copyProps(renderingLogicProps, ServerComponent.prototype);\n\n return ServerComponent;\n}\nfunction createComponent(\n renderingLogic,\n id,\n input,\n out,\n typeName,\n customEvents,\n scope\n) {\n let ServerComponent;\n\n if (renderingLogic) {\n ServerComponent = constructorCache.get(renderingLogic);\n\n if (!ServerComponent) {\n ServerComponent = createServerComponentClass(renderingLogic);\n constructorCache.set(renderingLogic, ServerComponent);\n }\n } else {\n ServerComponent = BaseServerComponent;\n }\n\n return new ServerComponent(id, input, out, typeName, customEvents, scope);\n}\n\nexports.___isServer = true;\nexports.___createComponent = createComponent;\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/renderer.js"],"names":["componentsUtil","require","componentLookup","ComponentsContext","getComponentsContext","registry","copyProps","isServer","beginComponent","endComponent","COMPONENT_BEGIN_ASYNC_ADDED_KEY","resolveComponentKey","key","parentComponentDef","substring","id","trackAsyncComponents","out","isSync","global","on","handleBeginAsync","handleBeginDetachedAsync","event","parentOut","asyncOut","componentsContext","undefined","c","createRendererFunc","templateRenderFunc","componentProps","renderingLogic","onInput","typeName","t","isSplit","s","isImplicitComponent","i","shouldApplySplitMixins","d","Error","renderer","input","globalComponentsContext","component","isRerender","isExisting","customEvents","ownerComponentDef","ownerComponentId","toString","destroy","renderingLogicProps","prototype","constructor","shouldUpdate","componentDef","module","exports"],"mappings":"aAAA,IAAIA,cAAc,GAAGC,OAAO,CAAC,QAAD,CAA5B;AACA,IAAIC,eAAe,GAAGF,cAAc,GAApC;;AAEA,IAAIG,iBAAiB,GAAGF,OAAO,CAAC,qBAAD,CAA/B;AACA,IAAIG,oBAAoB,GAAGD,iBAAiB,GAA5C;AACA,IAAIE,QAAQ,GAAGJ,OAAO,CAAC,YAAD,CAAtB;AACA,IAAIK,SAAS,GAAGL,OAAO,CAAC,uBAAD,CAAvB;AACA,IAAIM,QAAQ,GAAGP,cAAc,IAAd,KAA+B,IAA9C;AACA,IAAIQ,cAAc,GAAGP,OAAO,CAAC,kBAAD,CAA5B;AACA,IAAIQ,YAAY,GAAGR,OAAO,CAAC,gBAAD,CAA1B;;AAEA,IAAIS,+BAA+B,GAAG,KAAtC;;AAEA,SAASC,mBAAT,CAA6BC,GAA7B,EAAkCC,kBAAlC,EAAsD;AACpD,MAAID,GAAG,CAAC,CAAD,CAAH,KAAW,GAAf,EAAoB;AAClB,WAAOA,GAAG,CAACE,SAAJ,CAAc,CAAd,CAAP;AACD,GAFD,MAEO;AACL,WAAOD,kBAAkB,CAACE,EAAnB,GAAwB,GAAxB,GAA8BF,kBAAkB,IAAlB,CAA8BD,GAA9B,CAArC;AACD;AACF;;AAED,SAASI,oBAAT,CAA8BC,GAA9B,EAAmC;AACjC,MAAIA,GAAG,CAACC,MAAJ,MAAgBD,GAAG,CAACE,MAAJ,CAAWT,+BAAX,CAApB,EAAiE;AAC/D;AACD;;AAEDO,EAAAA,GAAG,CAACG,EAAJ,CAAO,YAAP,EAAqBC,gBAArB;AACAJ,EAAAA,GAAG,CAACG,EAAJ,CAAO,oBAAP,EAA6BE,wBAA7B;AACAL,EAAAA,GAAG,CAACE,MAAJ,CAAWT,+BAAX,IAA8C,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AAI+B,UAAU,KAAK,IAAnB,EAAyB;AACvB;AACEF,UAAAA,SAAS,IAAT,KAAyB,KAAzB;AACAA,UAAAA,SAAS,CAACW,YAAV,CAAuBb,KAAvB,EAA8BE,SAAS,GAAvC,MAAsD,KAFxD;AAGE;AACA;AACA;AACA;AACA7B,YAAAA,GAAG,IAAH,CAAyB6B,SAAzB;AACAD,YAAAA,uBAAuB,IAAvB,CAAkD9B,EAAlD,IAAwD,IAAxD;AACA+B,YAAAA,SAAS,GAAT,GANA,CAMsB;AACtB;AACD;AACF;AACF;;AAEDA,MAAAA,SAAS,GAAT,GAAsB7B,GAAG,CAACE,MAA1B;AACA2B,MAAAA,SAAS,IAAT,CAAwB7B,GAAxB;AACD;;AAED,QAAIyC,YAAY,GAAGlD,cAAc;AAC/BkB,IAAAA,iBAD+B;AAE/BoB,IAAAA,SAF+B;AAG/BlC,IAAAA,GAH+B;AAI/BsC,IAAAA,iBAJ+B;AAK/Bd,IAAAA,OAL+B;AAM/BE,IAAAA,mBAN+B,CAAjC;;;AASAoB,IAAAA,YAAY,IAAZ,GAA6BV,UAA7B;;AAEA;AACA;AACAlB,IAAAA,kBAAkB;AAChBc,IAAAA,KADgB;AAEhB3B,IAAAA,GAFgB;AAGhByC,IAAAA,YAHgB;AAIhBZ,IAAAA,SAJgB;AAKhBA,IAAAA,SAAS,IALO,CAAlB;;;AAQArC,IAAAA,YAAY,CAACQ,GAAD,EAAMyC,YAAN,CAAZ;AACAhC,IAAAA,iBAAiB,GAAjB,GAAoCb,kBAApC;AACD,GArJD;AAsJD;;AAED8C,MAAM,CAACC,OAAP,GAAiB/B,kBAAjB","sourcesContent":["var componentsUtil = require(\"./util\");\nvar componentLookup = componentsUtil.___componentLookup;\n\nvar ComponentsContext = require(\"./ComponentsContext\");\nvar getComponentsContext = ComponentsContext.___getComponentsContext;\nvar registry = require(\"./registry\");\nvar copyProps = require(\"raptor-util/copyProps\");\nvar isServer = componentsUtil.___isServer === true;\nvar beginComponent = require(\"./beginComponent\");\nvar endComponent = require(\"./endComponent\");\n\nvar COMPONENT_BEGIN_ASYNC_ADDED_KEY = \"$wa\";\n\nfunction resolveComponentKey(key, parentComponentDef) {\n if (key[0] === \"#\") {\n return key.substring(1);\n } else {\n return parentComponentDef.id + \"-\" + parentComponentDef.___nextKey(key);\n }\n}\n\nfunction trackAsyncComponents(out) {\n if (out.isSync() || out.global[COMPONENT_BEGIN_ASYNC_ADDED_KEY]) {\n return;\n }\n\n out.on(\"beginAsync\", handleBeginAsync);\n out.on(\"beginDetachedAsync\", handleBeginDetachedAsync);\n out.global[COMPONENT_BEGIN_ASYNC_ADDED_KEY] = true;\n}\n\nfunction handleBeginAsync(event) {\n var parentOut = event.parentOut;\n var asyncOut = event.out;\n var componentsContext = parentOut.___components;\n\n if (componentsContext !== undefined) {\n // We are going to start a nested ComponentsContext\n asyncOut.___components = new ComponentsContext(asyncOut, componentsContext);\n }\n // Carry along the component arguments\n asyncOut.c(\n parentOut.___assignedComponentDef,\n parentOut.___assignedKey,\n parentOut.___assignedCustomEvents\n );\n}\n\nfunction handleBeginDetachedAsync(event) {\n var asyncOut = event.out;\n handleBeginAsync(event);\n asyncOut.on(\"beginAsync\", handleBeginAsync);\n asyncOut.on(\"beginDetachedAsync\", handleBeginDetachedAsync);\n}\n\nfunction createRendererFunc(\n templateRenderFunc,\n componentProps,\n renderingLogic\n) {\n var onInput = renderingLogic && renderingLogic.onInput;\n var typeName = componentProps.t;\n var isSplit = componentProps.s === true;\n var isImplicitComponent = componentProps.i === true;\n\n var shouldApplySplitMixins = renderingLogic && isSplit;\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (!componentProps.d) {\n throw new Error(\n \"Component was compiled in a different NODE_ENV than the Marko runtime is using.\"\n );\n }\n } else if (componentProps.d) {\n throw new Error(\"Runtime/NODE_ENV Mismatch\");\n }\n\n return function renderer(input, out) {\n trackAsyncComponents(out);\n\n var componentsContext = getComponentsContext(out);\n var globalComponentsContext = componentsContext.___globalContext;\n\n var component = globalComponentsContext.___rerenderComponent;\n var isRerender = component !== undefined;\n var id;\n var isExisting;\n var customEvents;\n var parentComponentDef = componentsContext.___componentDef;\n var ownerComponentDef = out.___assignedComponentDef;\n var ownerComponentId = ownerComponentDef && ownerComponentDef.id;\n var key = out.___assignedKey;\n\n if (component) {\n // If component is provided then we are currently rendering\n // the top-level UI component as part of a re-render\n id = component.id; // We will use the ID of the component being re-rendered\n isExisting = true; // This is a re-render so we know the component is already in the DOM\n globalComponentsContext.___rerenderComponent = null;\n } else {\n // Otherwise, we are rendering a nested UI component. We will need\n // to match up the UI component with the component already in the\n // DOM (if any) so we will need to resolve the component ID from\n // the assigned key. We also need to handle any custom event bindings\n // that were provided.\n if (parentComponentDef) {\n // console.log('componentArgs:', componentArgs);\n customEvents = out.___assignedCustomEvents;\n\n if (key != null) {\n id = resolveComponentKey(key.toString(), parentComponentDef);\n } else {\n id = parentComponentDef.___nextComponentId();\n }\n } else {\n id = globalComponentsContext.___nextComponentId();\n }\n }\n\n if (isServer) {\n // If we are rendering on the server then things are simplier since\n // we don't need to match up the UI component with a previously\n // rendered component already mounted to the DOM. We also create\n // a lightweight ServerComponent\n component = registry.___createComponent(\n renderingLogic,\n id,\n input,\n out,\n typeName,\n customEvents,\n ownerComponentId\n );\n\n // This is the final input after running the lifecycle methods.\n // We will be passing the input to the template for the `input` param\n input = component.___updatedInput;\n } else {\n if (!component) {\n if (\n isRerender &&\n (component = componentLookup[id]) &&\n component.___type !== typeName\n ) {\n // Destroy the existing component since\n component.destroy();\n component = undefined;\n }\n\n if (component) {\n isExisting = true;\n } else {\n isExisting = false;\n // We need to create a new instance of the component\n component = registry.___createComponent(typeName, id);\n\n if (shouldApplySplitMixins === true) {\n shouldApplySplitMixins = false;\n\n var renderingLogicProps =\n typeof renderingLogic == \"function\"\n ? renderingLogic.prototype\n : renderingLogic;\n\n copyProps(renderingLogicProps, component.constructor.prototype);\n }\n }\n\n // Set this flag to prevent the component from being queued for update\n // based on the new input. The component is about to be rerendered\n // so we don't want to queue it up as a result of calling `setInput()`\n component.___updateQueued = true;\n\n if (customEvents !== undefined) {\n component.___setCustomEvents(customEvents, ownerComponentId);\n }\n\n if (isExisting === false) {\n component.___emitCreate(input, out);\n }\n\n input = component.___setInput(input, onInput, out);\n\n if (isExisting === true) {\n if (\n component.___isDirty === false ||\n component.shouldUpdate(input, component.___state) === false\n ) {\n // We put a placeholder element in the output stream to ensure that the existing\n // DOM node is matched up correctly when using morphdom. We flag the VElement\n // node to track that it is a preserve marker\n out.___preserveComponent(component);\n globalComponentsContext.___renderedComponentsById[id] = true;\n component.___reset(); // The component is no longer dirty so reset internal flags\n return;\n }\n }\n }\n\n component.___global = out.global;\n component.___emitRender(out);\n }\n\n var componentDef = beginComponent(\n componentsContext,\n component,\n key,\n ownerComponentDef,\n isSplit,\n isImplicitComponent\n );\n\n componentDef.___isExisting = isExisting;\n\n // Render the template associated with the component using the final template\n // data that we constructed\n templateRenderFunc(\n input,\n out,\n componentDef,\n component,\n component.___rawState\n );\n\n endComponent(out, componentDef);\n componentsContext.___componentDef = parentComponentDef;\n };\n}\n\nmodule.exports = createRendererFunc;\n"],"file":"renderer.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/components/update-manager.js"],"names":["updatesScheduled","batchStack","unbatchedQueue","setImmediate","require","updateUnbatchedComponents","length","updateComponents","scheduleUpdates","queue","i","component","batchUpdate","func","batch","push","queueComponentUpdate","batchStackLen","exports"],"mappings":"AAAA;;AAEA,IAAIA,gBAAgB,GAAG,KAAvB;AACA,IAAIC,UAAU,GAAG,EAAjB,C,CAAqB;AACrB,IAAIC,cAAc,GAAG,EAArB,C,CAAyB;;AAEzB,IAAIC,YAAY,GAAGC,OAAO,CAAC,iBAAD,CAAP,IAAnB;;AAEA;AACA;AACA;AACA;AACA,SAASC,yBAAT,GAAqC;AACnC,MAAIH,cAAc,CAACI,MAAnB,EAA2B;AACzB,QAAI;AACFC,MAAAA,gB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K,IAAL,CAAeC,IAAf,CAAoBJ,SAApB;AACD,KAFD,MAEO;AACLG,MAAAA,KAAK,IAAL,GAAiB,CAACH,SAAD,CAAjB;AACD;AACF,GAfD,MAeO;AACL;AACA;AACA;AACAH,IAAAA,eAAe;AACfN,IAAAA,cAAc,CAACa,IAAf,CAAoBJ,SAApB;AACD;AACF;;AAEDO,OAAO,IAAP,GAAkCF,oBAAlC;AACAE,OAAO,IAAP,GAAyBN,WAAzB","sourcesContent":["\"use strict\";\n\nvar updatesScheduled = false;\nvar batchStack = []; // A stack of batched updates\nvar unbatchedQueue = []; // Used for scheduled batched updates\n\nvar setImmediate = require(\"../setImmediate\").___setImmediate;\n\n/**\n * This function is called when we schedule the update of \"unbatched\"\n * updates to components.\n */\nfunction updateUnbatchedComponents() {\n if (unbatchedQueue.length) {\n try {\n updateComponents(unbatchedQueue);\n } finally {\n // Reset the flag now that this scheduled batch update\n // is complete so that we can later schedule another\n // batched update if needed\n updatesScheduled = false;\n }\n }\n}\n\nfunction scheduleUpdates() {\n if (updatesScheduled) {\n // We have already scheduled a batched update for the\n // nextTick so nothing to do\n return;\n }\n\n updatesScheduled = true;\n\n setImmediate(updateUnbatchedComponents);\n}\n\nfunction updateComponents(queue) {\n // Loop over the components in the queue and update them.\n // NOTE: It is okay if the queue grows during the iteration\n // since we will still get to them at the end\n for (var i = 0; i < queue.length; i++) {\n var component = queue[i];\n component.___update(); // Do the actual component update\n }\n\n // Clear out the queue by setting the length to zero\n queue.length = 0;\n}\n\nfunction batchUpdate(func) {\n // If the batched update stack is empty then this\n // is the outer batched update. After the outer\n // batched update completes we invoke the \"afterUpdate\"\n // event listeners.\n var batch = {\n ___queue: null\n };\n\n batchStack.push(batch);\n\n try {\n func();\n } finally {\n try {\n // Update all of the components that where queued up\n // in this batch (if any)\n if (batch.___queue) {\n updateComponents(batch.___queue);\n }\n } finally {\n // Now that we have completed the update of all the components\n // in this batch we need to remove it off the top of the stack\n batchStack.length--;\n }\n }\n}\n\nfunction queueComponentUpdate(component) {\n var batchStackLen = batchStack.length;\n\n if (batchStackLen) {\n // When a batch update is started we push a new batch on to a stack.\n // If the stack has a non-zero length then we know that a batch has\n // been started so we can just queue the component on the top batch. When\n // the batch is ended this component will be updated.\n var batch = batchStack[batchStackLen - 1];\n\n // We default the batch queue to null to avoid creating an Array instance\n // unnecessarily. If it is null then we create a new Array, otherwise\n // we push it onto the existing Array queue\n if (batch.___queue) {\n batch.___queue.push(component);\n } else {\n batch.___queue = [component];\n }\n } else {\n // We are not within a batched update. We need to schedule a batch update\n // for the nextTick (if that hasn't been done already) and we will\n // add the component to the unbatched queued\n scheduleUpdates();\n unbatchedQueue.push(component);\n }\n}\n\nexports.___queueComponentUpdate = queueComponentUpdate;\nexports.___batchUpdate = batchUpdate;\n"],"file":"update-manager.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/util/index-browser.js"],"names":["domData","require","componentsByDOMNode","keysByDOMNode","vElementsByDOMNode","vPropsByDOMNode","markoUID","window","$MUID","i","runtimeId","componentLookup","EMPTY_OBJECT","getComponentForEl","el","host","node","ownerDocument","document","getElementById","component","vElement","fragment","endNode","startNode","get","previousSibling","parentNode","destroyComponentForNode","componentToDestroy","id","destroyNodeRecursive","nodeType","key","test","curChild","firstChild","nextSibling","nextComponentId","nextComponentIdProvider","attachBubblingEvent","componentDef","handlerMethodName","isOnce","extraArgs","componentId","getMarkoPropsFromEl","virtualProps","getAttribute","set","JSON","parse","normalizeComponentKey","parentId","replace","addComponentRootToKeyedElements","keyedElements","rootNode","repeatedElementsForKey","exports"],"mappings":"aAAA,IAAIA,OAAO,GAAGC,OAAO,CAAC,aAAD,CAArB;AACA,IAAIC,mBAAmB,GAAGF,OAAO,GAAjC;AACA,IAAIG,aAAa,GAAGH,OAAO,IAA3B;AACA,IAAII,kBAAkB,GAAGJ,OAAO,IAAhC;AACA,IAAIK,eAAe,GAAGL,OAAO,IAA7B;AACA,IAAIM,QAAQ,GAAGC,MAAM,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QX,IAAR,CAAaD,GAAb,CAAJ,EAAuB;AACrB,QAAIyB,sBAAsB,GAAIF,aAAa,CAACvB,GAAD,CAAb;AAC5BuB,IAAAA,aAAa,CAACvB,GAAD,CAAb,IAAsB,EADxB;AAEAyB,IAAAA,sBAAsB,CAACb,WAAD,CAAtB,GAAsCY,QAAtC;AACD,GAJD,MAIO;AACLD,IAAAA,aAAa,CAACvB,GAAD,CAAb,GAAqBwB,QAArB;AACD;AACF;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BAE,OAAO,IAAP,GAAuBjD,SAAvB;AACAiD,OAAO,GAAP,GAA6BhD,eAA7B;AACAgD,OAAO,IAAP,GAA+B9C,iBAA/B;AACA8C,OAAO,IAAP,GAAqC/B,uBAArC;AACA+B,OAAO,GAAP,GAAkC5B,oBAAlC;AACA4B,OAAO,IAAP,GAAqCpB,uBAArC;AACAoB,OAAO,IAAP,GAAiCnB,mBAAjC;AACAmB,OAAO,IAAP,GAAiCb,mBAAjC;AACAa,OAAO,IAAP,GAA6CJ,+BAA7C;AACAI,OAAO,IAAP,GAAmCP,qBAAnC","sourcesContent":["var domData = require(\"../dom-data\");\nvar componentsByDOMNode = domData.___componentByDOMNode;\nvar keysByDOMNode = domData.___keyByDOMNode;\nvar vElementsByDOMNode = domData.___vElementByDOMNode;\nvar vPropsByDOMNode = domData.___vPropsByDOMNode;\nvar markoUID = window.$MUID || (window.$MUID = { i: 0 });\nvar runtimeId = markoUID.i++;\n\nvar componentLookup = {};\n\nvar EMPTY_OBJECT = {};\n\nfunction getComponentForEl(el, host) {\n var node =\n typeof el == \"string\"\n ? ((host ? host.ownerDocument : host) || document).getElementById(el)\n : el;\n var component;\n var vElement;\n\n while (node) {\n if (node.fragment) {\n if (node.fragment.endNode === node) {\n node = node.fragment.startNode;\n } else {\n node = node.fragment;\n component = componentsByDOMNode.get(node);\n }\n } else if ((vElement = vElementsByDOMNode.get(node))) {\n component = vElement.___ownerComponent;\n }\n\n if (component) {\n return component;\n }\n\n node = node.previousSibling || node.parentNode;\n }\n}\n\nfunction destroyComponentForNode(node) {\n var componentToDestroy = componentsByDOMNode.get(node.fragment || node);\n if (componentToDestroy) {\n componentToDestroy.___destroyShallow();\n delete componentLookup[componentToDestroy.id];\n }\n}\nfunction destroyNodeRecursive(node, component) {\n destroyComponentForNode(node);\n if (node.nodeType === 1 || node.nodeType === 12) {\n var key;\n\n if (component && (key = keysByDOMNode.get(node))) {\n if (node === component.___keyedElements[key]) {\n if (componentsByDOMNode.get(node) && /\\[\\]$/.test(key)) {\n delete component.___keyedElements[key][\n componentsByDOMNode.get(node).id\n ];\n } else {\n delete component.___keyedElements[key];\n }\n }\n }\n\n var curChild = node.firstChild;\n while (curChild && curChild !== node.endNode) {\n destroyNodeRecursive(curChild, component);\n curChild = curChild.nextSibling;\n }\n }\n}\n\nfunction nextComponentId() {\n // Each component will get an ID that is unique across all loaded\n // marko runtimes. This allows multiple instances of marko to be\n // loaded in the same window and they should all place nice\n // together\n return \"c\" + markoUID.i++;\n}\n\nfunction nextComponentIdProvider() {\n return nextComponentId;\n}\n\nfunction attachBubblingEvent(\n componentDef,\n handlerMethodName,\n isOnce,\n extraArgs\n) {\n if (handlerMethodName) {\n var componentId = componentDef.id;\n if (extraArgs) {\n return [handlerMethodName, componentId, isOnce, extraArgs];\n } else {\n return [handlerMethodName, componentId, isOnce];\n }\n }\n}\n\nfunction getMarkoPropsFromEl(el) {\n var vElement = vElementsByDOMNode.get(el);\n var virtualProps;\n\n if (vElement) {\n virtualProps = vElement.___properties;\n } else {\n virtualProps = vPropsByDOMNode.get(el);\n if (!virtualProps) {\n virtualProps = el.getAttribute(\"data-marko\");\n vPropsByDOMNode.set(\n el,\n (virtualProps = virtualProps ? JSON.parse(virtualProps) : EMPTY_OBJECT)\n );\n }\n }\n\n return virtualProps;\n}\n\nfunction normalizeComponentKey(key, parentId) {\n if (key[0] === \"#\") {\n key = key.replace(\"#\" + parentId + \"-\", \"\");\n }\n return key;\n}\n\nfunction addComponentRootToKeyedElements(\n keyedElements,\n key,\n rootNode,\n componentId\n) {\n if (/\\[\\]$/.test(key)) {\n var repeatedElementsForKey = (keyedElements[key] =\n keyedElements[key] || {});\n repeatedElementsForKey[componentId] = rootNode;\n } else {\n keyedElements[key] = rootNode;\n }\n}\n\n// eslint-disable-next-line no-constant-condition\nif (\"MARKO_DEBUG\") {\n var warnNodeRemoved = function (event) {\n var fragment = event.target.fragment;\n if (fragment) {\n var baseError = new Error(\n \"Fragment boundary marker removed. This will cause an error when the fragment is updated.\"\n );\n fragment.___markersRemovedError = function (message) {\n var error = new Error(message + \" Boundary markers missing.\");\n\n baseError.stack = baseError.stack.replace(/.*warnNodeRemoved.*\\n/, \"\");\n\n // eslint-disable-next-line no-console\n console.warn(baseError);\n return error;\n };\n }\n };\n exports.___startDOMManipulationWarning = function (host) {\n host.addEventListener(\"DOMNodeRemoved\", warnNodeRemoved);\n };\n exports.___stopDOMManipulationWarning = function (host) {\n host.removeEventListener(\"DOMNodeRemoved\", warnNodeRemoved);\n };\n}\n\nexports.___runtimeId = runtimeId;\nexports.___componentLookup = componentLookup;\nexports.___getComponentForEl = getComponentForEl;\nexports.___destroyComponentForNode = destroyComponentForNode;\nexports.___destroyNodeRecursive = destroyNodeRecursive;\nexports.___nextComponentIdProvider = nextComponentIdProvider;\nexports.___attachBubblingEvent = attachBubblingEvent;\nexports.___getMarkoPropsFromEl = getMarkoPropsFromEl;\nexports.___addComponentRootToKeyedElements = addComponentRootToKeyedElements;\nexports.___normalizeComponentKey = normalizeComponentKey;\n"],"file":"index-browser.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/runtime/components/util/index.js"],"names":["FLAG_WILL_RERENDER_IN_BROWSER","nextComponentIdProvider","out","prefix","global","componentIdPrefix","widgetIdPrefix","nextId","nextComponentId","attachBubblingEvent","componentDef","handlerMethodName","isOnce","extraArgs","component","eventIndex","push","id","exports","noop"],"mappings":"aAAA,IAAIA,6BAA6B,GAAG,CAApC;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AP,GAAkC,SAASC,IAAT,GAAgB,CAAE,CAApD;;AAEA","sourcesContent":["var FLAG_WILL_RERENDER_IN_BROWSER = 1;\n// var FLAG_HAS_RENDER_BODY = 2;\n\nfunction nextComponentIdProvider(out) {\n var prefix = out.global.componentIdPrefix || out.global.widgetIdPrefix || \"s\"; // \"s\" is for server (we use \"b\" for the browser)\n var nextId = 0;\n\n return function nextComponentId() {\n return prefix + nextId++;\n };\n}\n\nfunction attachBubblingEvent(\n componentDef,\n handlerMethodName,\n isOnce,\n extraArgs\n) {\n if (handlerMethodName) {\n if (extraArgs) {\n var component = componentDef.___component;\n var eventIndex = component.___bubblingDomEventsExtraArgsCount++;\n\n // If we are not going to be doing a rerender in the browser\n // then we need to actually store the extra args with the UI component\n // so that they will be serialized down to the browser.\n // If we are rerendering in the browser then we just need to\n // increment ___bubblingDomEventsExtraArgsCount to keep track of\n // where the extra args will be found when the UI component is\n // rerendered in the browser\n\n if (!(componentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER)) {\n if (eventIndex === 0) {\n component.___bubblingDomEvents = [extraArgs];\n } else {\n component.___bubblingDomEvents.push(extraArgs);\n }\n }\n\n return (\n handlerMethodName +\n \" \" +\n componentDef.id +\n \" \" +\n isOnce +\n \" \" +\n eventIndex\n );\n } else {\n return handlerMethodName + \" \" + componentDef.id + \" \" + isOnce;\n }\n }\n}\n\nexports.___nextComponentIdProvider = nextComponentIdProvider;\nexports.___isServer = true;\nexports.___attachBubblingEvent = attachBubblingEvent;\nexports.___destroyComponentForNode = function noop() {};\nexports.___destroyNodeRecursive = function noop() {};\n\n// eslint-disable-next-line no-constant-condition\nif (\"MARKO_DEBUG\") {\n exports.___startDOMManipulationWarning = function noop() {};\n exports.___stopDOMManipulationWarning = function noop() {};\n}\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/runtime/createOut.js"],"names":["actualCreateOut","setCreateOut","createOutFunc","createOut","globalData","module","exports"],"mappings":"aAAA,IAAIA,eAAJ;;AAEA,SAASC,YAAT,CAAsBC,aAAtB,EAAqC;AACnCF,EAAAA,eAAe,GAAGE,aAAlB;AACD;;AAED,SAASC,SAAT,CAAmBC,UAAnB,EAA+B;AAC7B,SAAOJ,eAAe,CAACI,UAAD,CAAtB;AACD;;AAEDD,SAAS,IAAT,GAA4BF,YAA5B;;AAEAI,MAAM,CAACC,OAAP,GAAiBH,SAAjB","sourcesContent":["var actualCreateOut;\n\nfunction setCreateOut(createOutFunc) {\n actualCreateOut = createOutFunc;\n}\n\nfunction createOut(globalData) {\n return actualCreateOut(globalData);\n}\n\ncreateOut.___setCreateOut = setCreateOut;\n\nmodule.exports = createOut;\n"],"file":"createOut.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/runtime/dom-insert.js"],"names":["extend","require","componentsUtil","destroyComponentForNode","destroyNodeRecursive","helpers","insertBefore","insertAfter","removeChild","resolveEl","el","elId","document","getElementById","Error","beforeRemove","referenceEl","module","exports","target","getEl","afterInsert","appendTo","prependTo","firstChild","replace","parentNode","replaceChildrenOf","curChild","nextSibling","innerHTML"],"mappings":"aAAA,IAAIA,MAAM,GAAGC,OAAO,CAAC,oBAAD,CAApB;AACA,IAAIC,cAAc,GAAGD,OAAO,CAAC,mBAAD,CAA5B;AACA,IAAIE,uBAAuB,GAAGD,cAAc,IAA5C;AACA,IAAIE,oBAAoB,GAAGF,cAAc,GAAzC;AACA,IAAIG,OAAO,GAAGJ,OAAO,CAAC,yBAAD,CAArB;;AAEA,IAAIK,YAAY,GAAGD,OAAO,IAA1B;AACA,IAAIE,WAAW,GAAGF,OAAO,IAAzB;AACA,IAAIG,WAAW,GAAGH,OAAO,IAAzB;;AAEA,SAASI,SAAT,CAAmBC,EAAnB,EAAuB;AACrB,MAAI,OAAOA,EAAP,IAAa,QAAjB,EAA2B;AACzB,QAAIC,IAAI,GAAGD,EAAX;AACAA,IAAAA,EAAE,GAAGE,QAAQ,CAACC,cAAT,CAAwBF,IAAxB,CAAL;AACA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L,WAAW,CAAC,IAAD,EAAOL,WAAP,CAAlB;AACD,KA/CY,EAAT,CAAN;;AAiDD,CAlDD","sourcesContent":["var extend = require(\"raptor-util/extend\");\nvar componentsUtil = require(\"./components/util\");\nvar destroyComponentForNode = componentsUtil.___destroyComponentForNode;\nvar destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;\nvar helpers = require(\"./vdom/morphdom/helpers\");\n\nvar insertBefore = helpers.___insertBefore;\nvar insertAfter = helpers.___insertAfter;\nvar removeChild = helpers.___removeChild;\n\nfunction resolveEl(el) {\n if (typeof el == \"string\") {\n var elId = el;\n el = document.getElementById(elId);\n if (!el) {\n throw Error(\"Not found: \" + elId);\n }\n }\n return el;\n}\n\nfunction beforeRemove(referenceEl) {\n destroyNodeRecursive(referenceEl);\n destroyComponentForNode(referenceEl);\n}\n\nmodule.exports = function (target, getEl, afterInsert) {\n extend(target, {\n appendTo: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n insertBefore(el, null, referenceEl);\n return afterInsert(this, referenceEl);\n },\n prependTo: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n insertBefore(el, referenceEl.firstChild || null, referenceEl);\n return afterInsert(this, referenceEl);\n },\n replace: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n beforeRemove(referenceEl);\n insertBefore(el, referenceEl, referenceEl.parentNode);\n removeChild(referenceEl);\n return afterInsert(this, referenceEl);\n },\n replaceChildrenOf: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n\n var curChild = referenceEl.firstChild;\n while (curChild) {\n var nextSibling = curChild.nextSibling; // Just in case the DOM changes while removing\n beforeRemove(curChild);\n curChild = nextSibling;\n }\n\n referenceEl.innerHTML = \"\";\n insertBefore(el, null, referenceEl);\n return afterInsert(this, referenceEl);\n },\n insertBefore: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n insertBefore(el, referenceEl, referenceEl.parentNode);\n return afterInsert(this, referenceEl);\n },\n insertAfter: function (referenceEl) {\n referenceEl = resolveEl(referenceEl);\n var el = getEl(this, referenceEl);\n insertAfter(el, referenceEl, referenceEl.parentNode);\n return afterInsert(this, referenceEl);\n }\n });\n};\n"],"file":"dom-insert.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/runtime/events.js"],"names":["EventEmitter","require","module","exports"],"mappings":"aAAA,IAAIA,YAAY,GAAGC,OAAO,CAAC,cAAD,CAA1B;AACAC,MAAM,CAACC,OAAP,GAAiB,IAAIH,YAAJ,EAAjB","sourcesContent":["var EventEmitter = require(\"events-light\");\nmodule.exports = new EventEmitter();\n"],"file":"events.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/_change-case.js"],"names":["camelToDashLookup","Object","create","dashToCamelLookup","exports","camelToDashCase","name","nameDashed","replace","toLowerCase","dashToCamelCase","nameCamel","matchToUpperCase","_","char","toUpperCase"],"mappings":"AAAA;;AAEA,IAAIA,iBAAiB,GAAGC,MAAM,CAACC,MAAP,CAAc,IAAd,CAAxB;AACA,IAAIC,iBAAiB,GAAGF,MAAM,CAACC,MAAP,CAAc,IAAd,CAAxB;;AAEA;AACA;AACA;AACAE,OAAO,IAAP,GAA6B,SAASC,eAAT,CAAyBC,IAAzB,EAA+B;AAC1D,MAAIC,UAAU,GAAGP,iBAAiB,CAACM,IAAD,CAAlC;AACA,MAAI,CAACC,UAAL,EAAiB;AACfA,IAAAA,UAAU,GAAGP,iBAAiB,CAACM,IAAD,CAAjB,GAA0BA,IAAI;AACxCE,IAAAA,OADoC,CAC5B,UAD4B,EAChB,KADgB;AAEpCC,IAAAA,WAFoC,EAAvC;;AAIA,QAAIF,UAAU,KAAKD,IAAnB,EAAyB;AACvBH,MAAAA,iBAAiB,CAACI,UAAD,CAAjB,GAAgCD,IAAhC;AACD;AACF;;AAED,SAAOC,UAAP;AACD,CAbD;;AAeA;AACA;AACA;AACAH,OAAO,IAAP,GAA6B,SAASM,eAAT,CAAyBJ,IAAzB,EAA+B;AAC1D,MAAIK,SAAS,GAAGR,iBAAiB,CAACG,IAAD,CAAjC;AACA,MAAI,CAACK,SAAL,EAAgB;AACdA,IAAAA,SAAS,GAAGR,iBAAiB,CAACG,IAAD,CAAjB,GAA0BA,IAAI,CAACE,OAAL;AACpC,eADoC;AAEpCI,IAAAA,gBAFoC,CAAtC;;;AAKA,QAAID,SAAS,KAAKL,IAAlB,EAAwB;AACtBN,MAAAA,iBAAiB,CAACW,SAAD,CAAjB,GAA+BL,IAA/B;AACD;AACF;;AAED,SAAOK,SAAP;AACD,CAdD;;AAgBA,SAASC,gBAAT,CAA0BC,CAA1B,EAA6BC,IAA7B,EAAmC;AACjC,SAAOA,IAAI,CAACC,WAAL,EAAP;AACD","sourcesContent":["\"use strict\";\n\nvar camelToDashLookup = Object.create(null);\nvar dashToCamelLookup = Object.create(null);\n\n/**\n * Helper for converting camelCase to dash-case.\n */\nexports.___camelToDashCase = function camelToDashCase(name) {\n var nameDashed = camelToDashLookup[name];\n if (!nameDashed) {\n nameDashed = camelToDashLookup[name] = name\n .replace(/([A-Z])/g, \"-$1\")\n .toLowerCase();\n\n if (nameDashed !== name) {\n dashToCamelLookup[nameDashed] = name;\n }\n }\n\n return nameDashed;\n};\n\n/**\n * Helper for converting dash-case to camelCase.\n */\nexports.___dashToCamelCase = function dashToCamelCase(name) {\n var nameCamel = dashToCamelLookup[name];\n if (!nameCamel) {\n nameCamel = dashToCamelLookup[name] = name.replace(\n /-([a-z])/g,\n matchToUpperCase\n );\n\n if (nameCamel !== name) {\n camelToDashLookup[nameCamel] = name;\n }\n }\n\n return nameCamel;\n};\n\nfunction matchToUpperCase(_, char) {\n return char.toUpperCase();\n}\n"],"file":"_change-case.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/assign.js"],"names":["hasOwnProperty","Object","prototype","module","exports","assign","into","arguments","i","length","source","k","call"],"mappings":"AAAA;;AAEA,IAAIA,cAAc,GAAGC,MAAM,CAACC,SAAP,CAAiBF,cAAtC;;AAEA;AACA;AACA;AACAG,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,GAAkB;AACjC,MAAIC,IAAI,GAAGC,SAAS,CAAC,CAAD,CAApB;AACA,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,SAAS,CAACE,MAA9B,EAAsCD,CAAC,EAAvC,EAA2C;AACzC,QAAIE,MAAM,GAAGH,SAAS,CAACC,CAAD,CAAtB;AACA,QAAIE,MAAM,IAAI,IAAd,EAAoB;AAClB,WAAK,IAAIC,CAAT,IAAcD,MAAd,EAAsB;AACpB,YAAIV,cAAc,CAACY,IAAf,CAAoBF,MAApB,EAA4BC,CAA5B,CAAJ,EAAoC;AAClCL,UAAAA,IAAI,CAACK,CAAD,CAAJ,GAAUD,MAAM,CAACC,CAAD,CAAhB;AACD;AACF;AACF;AACF;AACD,SAAOL,IAAP;AACD,CAbD","sourcesContent":["\"use strict\";\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * Merges object properties\n */\nmodule.exports = function assign() {\n var into = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n if (source != null) {\n for (var k in source) {\n if (hasOwnProperty.call(source, k)) {\n into[k] = source[k];\n }\n }\n }\n }\n return into;\n};\n"],"file":"assign.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/class-value.js"],"names":["module","exports","classHelper","arg","result","sep","Array","isArray","i","len","length","value","key"],"mappings":"AAAA;;AAEAA,MAAM,CAACC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,GAArB,EAA0B;AACzC,UAAQ,OAAOA,GAAf;AACE,SAAK,QAAL;AACE,aAAOA,GAAG,IAAI,IAAd;AACF,SAAK,QAAL;AACE,UAAIC,MAAM,GAAG,EAAb;AACA,UAAIC,GAAG,GAAG,EAAV;;AAEA,UAAIC,KAAK,CAACC,OAAN,CAAcJ,GAAd,CAAJ,EAAwB;AACtB,aAAK,IAAIK,CAAC,GAAG,CAAR,EAAWC,GAAG,GAAGN,GAAG,CAACO,MAA1B,EAAkCF,CAAC,GAAGC,GAAtC,EAA2CD,CAAC,EAA5C,EAAgD;AAC9C,cAAIG,KAAK,GAAGT,WAAW,CAACC,GAAG,CAACK,CAAD,CAAJ,CAAvB;AACA,cAAIG,KAAJ,EAAW;AACTP,YAAAA,MAAM,IAAIC,GAAG,GAAGM,KAAhB;AACAN,YAAAA,GAAG,GAAG,GAAN;AACD;AACF;AACF,OARD,MAQO;AACL,aAAK,IAAIO,GAAT,IAAgBT,GAAhB,EAAqB;AACnB,cAAIA,GAAG,CAACS,GAAD,CAAP,EAAc;AACZR,YAAAA,MAAM,IAAIC,GAAG,GAAGO,GAAhB;AACAP,YAAAA,GAAG,GAAG,GAAN;AACD;AACF;AACF;;AAED,aAAOD,MAAM,IAAI,IAAjB;;AAEF;AACE,aAAO,IAAP,CA3BJ;;AA6BD,CA9BD","sourcesContent":["\"use strict\";\n\nmodule.exports = function classHelper(arg) {\n switch (typeof arg) {\n case \"string\":\n return arg || null;\n case \"object\":\n var result = \"\";\n var sep = \"\";\n\n if (Array.isArray(arg)) {\n for (var i = 0, len = arg.length; i < len; i++) {\n var value = classHelper(arg[i]);\n if (value) {\n result += sep + value;\n sep = \" \";\n }\n }\n } else {\n for (var key in arg) {\n if (arg[key]) {\n result += sep + key;\n sep = \" \";\n }\n }\n }\n\n return result || null;\n\n default:\n return null;\n }\n};\n"],"file":"class-value.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/dynamic-tag.js"],"names":["changeCase","require","ComponentsContext","getComponentsContext","ComponentDef","w10NOOP","NOOP","RENDER_BODY_TO_JSON","FLAG_WILL_RERENDER_IN_BROWSER","IS_SERVER","window","module","exports","dynamicTag","out","tag","getAttrs","renderBody","args","props","componentDef","key","customEvents","default","attrs","component","addEvents","attrsToCamelCase","renderer","_","render","c","isFn","flags","willRerender","isW10NOOP","preserve","bf","componentsContext","parentComponentDef","globalContext","id","toJSON","apply","concat","ef","error","result","len","length","event","i","d"],"mappings":"AAAA;;;AAGA,IAAIA,UAAU,GAAGC,OAAO,CAAC,gBAAD,CAAxB;AACA,IAAIC,iBAAiB,GAAGD,OAAO,CAAC,iCAAD,CAA/B;AACA,IAAIE,oBAAoB,GAAGD,iBAAiB,GAA5C;AACA,IAAIE,YAAY,GAAGH,OAAO,CAAC,4BAAD,CAA1B;AACA,IAAII,OAAO,GAAGJ,OAAO,CAAC,kBAAD,CAAP,CAA4BK,IAA1C;AACA,IAAIC,mBAAmB,GAAG,YAAY;AACpC,SAAOF,OAAP;AACD,CAFD;;AAIA,IAAIG,6BAA6B,GAAG,CAApC;AACA;AACA,IAAIC,SAAS,GAAG,OAAOC,MAAP,KAAkB,WAAlC;;AAEA;AACA;AACA;AACAC,MAAM,CAACC,OAAP,GAAiB,SAASC,UAAT;AACfC,GADe;AAEfC,GAFe;AAGfC,QAHe;AAIfC,UAJe;AAKfC,IALe;AAMfC,KANe;AAOfC,YAPe;AAQfC,GARe;AASfC,YATe;AAUf;AACA,MAAIP,GAAJ,EAAS;AACP,QAAIA,GAAG,CAACQ,OAAR,EAAiB;AACfR,MAAAA,GAAG,GAAGA,GAAG,CAACQ,OAAV;AACD;;AAED,QAAIC,KAAK,GAAGR,QAAQ,IAAIA,QAAQ,EAAhC;AACA,QAAIS,SAAS,GAAGL,YAAY,IAAIA,YAAY,GAA5C;AACA,QAAI,OAAOL,GAAP,KAAe,QAAnB,EAA6B;AAC3B,UAAIE,UAAJ,EAAgB;AACdH,QAAAA,GAAG,IAAH;AACEC,QAAAA,GADF;AAEES,QAAAA,KAFF;AAGEH,QAAAA,GAHF;AAIED,QAAAA,YAJF;AAKEM,QAAAA,SAAS,CAACN,YAAD,EAAeE,YAAf,EAA6BH,KAA7B,CALX;;AAOAF,QAAAA,UAAU,C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BAL5B;;AAOAS,IAAAA,UAAU,CAACH,GAAD,CAAV;AACAA,IAAAA,GAAG,CAAC+B,EAAJ;AACD;AACF,CAzHD;;AA2HA,SAASlB,gBAAT,CAA0BH,KAA1B,EAAiC;AAC/B,MAAIuB,MAAM,GAAG,EAAb;;AAEA,OAAK,IAAI1B,GAAT,IAAgBG,KAAhB,EAAuB;AACrBuB,IAAAA,MAAM,CAAC/C,UAAU,IAAV,CAA8BqB,GAA9B,CAAD,CAAN,GAA6CG,KAAK,CAACH,GAAD,CAAlD;AACD;;AAED,SAAO0B,MAAP;AACD;;AAED,SAASrB,SAAT,CAAmBN,YAAnB,EAAiCE,YAAjC,EAA+CH,KAA/C,EAAsD;AACpD,MAAI6B,GAAG,GAAG1B,YAAY,GAAGA,YAAY,CAAC2B,MAAhB,GAAyB,CAA/C;;AAEA,MAAID,GAAG,KAAK,CAAZ,EAAe;AACb,WAAO7B,KAAP;AACD;;AAED,MAAI4B,MAAM,GAAG5B,KAAK,IAAI,EAAtB;AACA,MAAI+B,KAAJ;;AAEA,OAAK,IAAIC,CAAC,GAAGH,GAAb,EAAkBG,CAAC,EAAnB,GAAyB;AACvBD,IAAAA,KAAK,GAAG5B,YAAY,CAAC6B,CAAD,CAApB;AACAJ,IAAAA,MAAM,CAAC,OAAOG,KAAK,CAAC,CAAD,CAAb,CAAN,GAA0B9B,YAAY,CAACgC,CAAb;AACxBF,IAAAA,KAAK,CAAC,CAAD,CADmB;AAExBA,IAAAA,KAAK,CAAC,CAAD,CAFmB;AAGxBA,IAAAA,KAAK,CAAC,CAAD,CAHmB;AAIxBA,IAAAA,KAAK,CAAC,CAAD,CAJmB,CAA1B;;AAMD;;AAED,SAAOH,MAAP;AACD","sourcesContent":["\"use strict\";\n\nvar complain = \"MARKO_DEBUG\" && require(\"complain\");\nvar changeCase = require(\"./_change-case\");\nvar ComponentsContext = require(\"../components/ComponentsContext\");\nvar getComponentsContext = ComponentsContext.___getComponentsContext;\nvar ComponentDef = require(\"../components/ComponentDef\");\nvar w10NOOP = require(\"warp10/constants\").NOOP;\nvar RENDER_BODY_TO_JSON = function () {\n return w10NOOP;\n};\n\nvar FLAG_WILL_RERENDER_IN_BROWSER = 1;\n// var FLAG_HAS_RENDER_BODY = 2;\nvar IS_SERVER = typeof window === \"undefined\";\n\n/**\n * Helper to render a dynamic tag\n */\nmodule.exports = function dynamicTag(\n out,\n tag,\n getAttrs,\n renderBody,\n args,\n props,\n componentDef,\n key,\n customEvents\n) {\n if (tag) {\n if (tag.default) {\n tag = tag.default;\n }\n\n var attrs = getAttrs && getAttrs();\n var component = componentDef && componentDef.___component;\n if (typeof tag === \"string\") {\n if (renderBody) {\n out.___beginElementDynamic(\n tag,\n attrs,\n key,\n componentDef,\n addEvents(componentDef, customEvents, props)\n );\n renderBody(out);\n out.___endElement();\n } else {\n out.___elementDynamic(\n tag,\n attrs,\n key,\n componentDef,\n addEvents(componentDef, customEvents, props)\n );\n }\n } else {\n if (attrs == null) {\n attrs = { renderBody: renderBody };\n } else if (typeof attrs === \"object\") {\n attrs = attrsToCamelCase(attrs);\n if (renderBody) {\n attrs.renderBody = renderBody;\n }\n }\n\n var renderer =\n tag._ ||\n tag.render ||\n (tag.renderer && tag.renderer.renderer) ||\n tag.renderer;\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (tag.renderer && tag.renderer.renderer === renderer) {\n complain(\n \"An object with a 'renderer' was passed to the dynamic tag, but renderer was another template.\"\n );\n }\n }\n\n if (renderer) {\n out.c(componentDef, key, customEvents);\n renderer(attrs, out);\n out.___assignedComponentDef = null;\n } else {\n var render = (tag && tag.renderBody) || tag;\n var isFn = typeof render === \"function\";\n\n // eslint-disable-next-line no-constant-condition\n if (\"MARKO_DEBUG\") {\n if (render.safeHTML || render.toHTML) {\n throw new Error(\n \"Using `<include(x)/>` or the `<${dynamic}/>` tags with a `{ safeHTML: ... }` object is no longer supported. Use the unescaped text placeholder syntax instead.\"\n );\n }\n }\n if (isFn) {\n var flags = componentDef ? componentDef.___flags : 0;\n var willRerender = flags & FLAG_WILL_RERENDER_IN_BROWSER;\n var isW10NOOP = render === w10NOOP;\n var preserve = IS_SERVER ? willRerender : isW10NOOP;\n out.bf(key, component, preserve);\n if (!isW10NOOP && isFn) {\n var componentsContext = getComponentsContext(out);\n var parentComponentDef = componentsContext.___componentDef;\n var globalContext = componentsContext.___globalContext;\n componentsContext.___componentDef = new ComponentDef(\n component,\n parentComponentDef.id + \"-\" + parentComponentDef.___nextKey(key),\n globalContext\n );\n render.toJSON = RENDER_BODY_TO_JSON;\n\n if (args) {\n render.apply(null, [out].concat(args, attrs));\n } else {\n render(out, attrs);\n }\n\n componentsContext.___componentDef = parentComponentDef;\n }\n out.ef();\n } else {\n out.error(\"Invalid dynamic tag value\");\n }\n }\n }\n } else if (renderBody) {\n out.bf(\n key,\n component,\n IS_SERVER &&\n componentDef &&\n componentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER\n );\n renderBody(out);\n out.ef();\n }\n};\n\nfunction attrsToCamelCase(attrs) {\n var result = {};\n\n for (var key in attrs) {\n result[changeCase.___dashToCamelCase(key)] = attrs[key];\n }\n\n return result;\n}\n\nfunction addEvents(componentDef, customEvents, props) {\n var len = customEvents ? customEvents.length : 0;\n\n if (len === 0) {\n return props;\n }\n\n var result = props || {};\n var event;\n\n for (var i = len; i--; ) {\n event = customEvents[i];\n result[\"on\" + event[0]] = componentDef.d(\n event[0],\n event[1],\n event[2],\n event[3]\n );\n }\n\n return result;\n}\n"],"file":"dynamic-tag.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/load-nested-tag.js"],"names":["module","exports","loadNestedTagHelper","targetProperty","isRepeated","input","parent","existingArray","push"],"mappings":"AAAA;;AAEAA,MAAM,CAACC,OAAP,GAAiB,SAASC,mBAAT,CAA6BC,cAA7B,EAA6CC,UAA7C,EAAyD;AACxE,SAAO,UAAUC,KAAV,EAAiBC,MAAjB,EAAyB;AAC9B;AACA,QAAIF,UAAJ,EAAgB;AACd,UAAIG,aAAa,GAAGD,MAAM,CAACH,cAAD,CAA1B;AACA,UAAII,aAAJ,EAAmB;AACjBA,QAAAA,aAAa,CAACC,IAAd,CAAmBH,KAAnB;AACD,OAFD,MAEO;AACLC,QAAAA,MAAM,CAACH,cAAD,CAAN,GAAyB,CAACE,KAAD,CAAzB;AACD;AACF,KAPD,MAOO;AACLC,MAAAA,MAAM,CAACH,cAAD,CAAN,GAAyBE,KAAzB;AACD;AACF,GAZD;AAaD,CAdD","sourcesContent":["\"use strict\";\n\nmodule.exports = function loadNestedTagHelper(targetProperty, isRepeated) {\n return function (input, parent) {\n // If we are nested tag then we do not have a renderer\n if (isRepeated) {\n var existingArray = parent[targetProperty];\n if (existingArray) {\n existingArray.push(input);\n } else {\n parent[targetProperty] = [input];\n }\n } else {\n parent[targetProperty] = input;\n }\n };\n};\n"],"file":"load-nested-tag.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/runtime/helpers/merge.js"],"names":["hasOwnProperty","Object","prototype","module","exports","merge","into","source","k","call"],"mappings":"aAAA,IAAIA,cAAc,GAAGC,MAAM,CAACC,SAAP,CAAiBF,cAAtC;;AAEA;AACA;AACA;AACAG,MAAM,CAACC,OAAP,GAAiB,SAASC,KAAT,CAAeC,IAAf,EAAqBC,MAArB,EAA6B;AAC5C,OAAK,IAAIC,CAAT,IAAcD,MAAd,EAAsB;AACpB,QAAIP,cAAc,CAACS,IAAf,CAAoBF,MAApB,EAA4BC,CAA5B,KAAkC,CAACR,cAAc,CAACS,IAAf,CAAoBH,IAApB,EAA0BE,CAA1B,CAAvC,EAAqE;AACnEF,MAAAA,IAAI,CAACE,CAAD,CAAJ,GAAUD,MAAM,CAACC,CAAD,CAAhB;AACD;AACF;AACD,SAAOF,IAAP;AACD,CAPD","sourcesContent":["var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * Merges object properties\n */\nmodule.exports = function merge(into, source) {\n for (var k in source) {\n if (hasOwnProperty.call(source, k) && !hasOwnProperty.call(into, k)) {\n into[k] = source[k];\n }\n }\n return into;\n};\n"],"file":"merge.js"}