lilact 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/Icon/r +0 -0
  2. package/LICENSE.TXT +26 -0
  3. package/README.md +116 -0
  4. package/bin/copy-demo.js +26 -0
  5. package/bin/transpile-dir.js +112 -0
  6. package/bin/transpile.js +137 -0
  7. package/dist/lilact.development.js +9344 -0
  8. package/dist/lilact.development.js.map +1 -0
  9. package/dist/lilact.production.min.js +63 -0
  10. package/dist/lilact.production.min.js.map +1 -0
  11. package/docs/.nojekyll +1 -0
  12. package/docs/assets/hierarchy.js +1 -0
  13. package/docs/assets/highlight.css +71 -0
  14. package/docs/assets/icons.js +18 -0
  15. package/docs/assets/icons.svg +1 -0
  16. package/docs/assets/main.js +60 -0
  17. package/docs/assets/navigation.js +1 -0
  18. package/docs/assets/search.js +1 -0
  19. package/docs/assets/style.css +1633 -0
  20. package/docs/classes/accessories.ErrorBoundary.html +37 -0
  21. package/docs/classes/accessories.Suspense.html +41 -0
  22. package/docs/classes/components.Component.html +45 -0
  23. package/docs/classes/components.HTMLComponent.html +32 -0
  24. package/docs/classes/components.RootComponent.html +32 -0
  25. package/docs/classes/transition.Transition.html +31 -0
  26. package/docs/functions/accessories.Spinner.html +9 -0
  27. package/docs/functions/components.createComponent.html +8 -0
  28. package/docs/functions/components.createRoot.html +5 -0
  29. package/docs/functions/components.render.html +5 -0
  30. package/docs/functions/hooks.createContext.html +3 -0
  31. package/docs/functions/hooks.useActionState.html +3 -0
  32. package/docs/functions/hooks.useCallback.html +5 -0
  33. package/docs/functions/hooks.useContext.html +3 -0
  34. package/docs/functions/hooks.useDeferredValue.html +4 -0
  35. package/docs/functions/hooks.useEffect.html +3 -0
  36. package/docs/functions/hooks.useHook.html +5 -0
  37. package/docs/functions/hooks.useId.html +4 -0
  38. package/docs/functions/hooks.useLayoutEffect.html +3 -0
  39. package/docs/functions/hooks.useLocalStorage.html +4 -0
  40. package/docs/functions/hooks.useMemo.html +4 -0
  41. package/docs/functions/hooks.useReducer.html +6 -0
  42. package/docs/functions/hooks.useRef.html +4 -0
  43. package/docs/functions/hooks.useState.html +3 -0
  44. package/docs/functions/hooks.useTransition.html +3 -0
  45. package/docs/functions/jsx.transpileJSX.html +6 -0
  46. package/docs/functions/misc.Fragment.html +3 -0
  47. package/docs/functions/misc.classNames.html +2 -0
  48. package/docs/functions/misc.deepEqual.html +3 -0
  49. package/docs/functions/misc.findDOMNode.html +3 -0
  50. package/docs/functions/misc.getComponentByPointer.html +3 -0
  51. package/docs/functions/misc.isAsync.html +3 -0
  52. package/docs/functions/misc.isClass.html +3 -0
  53. package/docs/functions/misc.isEmpty.html +3 -0
  54. package/docs/functions/misc.isError.html +3 -0
  55. package/docs/functions/misc.isThenable.html +3 -0
  56. package/docs/functions/misc.isValidElement.html +3 -0
  57. package/docs/functions/misc.shallowEqual.html +3 -0
  58. package/docs/functions/redux.Provider.html +5 -0
  59. package/docs/functions/redux.connect.html +5 -0
  60. package/docs/functions/redux.useDispatch.html +3 -0
  61. package/docs/functions/redux.useSelector.html +5 -0
  62. package/docs/functions/redux.useStore.html +3 -0
  63. package/docs/functions/router.HashRouter.html +5 -0
  64. package/docs/functions/router.Link.html +12 -0
  65. package/docs/functions/router.NavLink.html +10 -0
  66. package/docs/functions/router.Route.html +6 -0
  67. package/docs/functions/router.Routes.html +4 -0
  68. package/docs/functions/router.useLocation.html +3 -0
  69. package/docs/functions/router.useNavigate.html +3 -0
  70. package/docs/functions/run.require.html +14 -0
  71. package/docs/functions/run.run.html +13 -0
  72. package/docs/functions/run.runScripts.html +7 -0
  73. package/docs/functions/run.traceError.html +6 -0
  74. package/docs/functions/timers.animationFramePromise.html +3 -0
  75. package/docs/functions/timers.clearInterval.html +2 -0
  76. package/docs/functions/timers.clearTimeout.html +2 -0
  77. package/docs/functions/timers.grabTimers.html +3 -0
  78. package/docs/functions/timers.pauseTimers.html +2 -0
  79. package/docs/functions/timers.releaseTimers.html +2 -0
  80. package/docs/functions/timers.resetTimers.html +2 -0
  81. package/docs/functions/timers.resumeTimers.html +2 -0
  82. package/docs/functions/timers.setInterval.html +5 -0
  83. package/docs/functions/timers.setTimeout.html +4 -0
  84. package/docs/functions/timers.timeoutPromise.html +4 -0
  85. package/docs/functions/transition.CSSTransition.html +18 -0
  86. package/docs/functions/transition.TransitionGroup.html +5 -0
  87. package/docs/hierarchy.html +1 -0
  88. package/docs/index.html +88 -0
  89. package/docs/media/icon.png +0 -0
  90. package/docs/modules/accessories.html +1 -0
  91. package/docs/modules/components.html +1 -0
  92. package/docs/modules/hooks.html +1 -0
  93. package/docs/modules/jsx.html +1 -0
  94. package/docs/modules/misc.html +1 -0
  95. package/docs/modules/redux.html +1 -0
  96. package/docs/modules/router.html +1 -0
  97. package/docs/modules/run.html +1 -0
  98. package/docs/modules/timers.html +1 -0
  99. package/docs/modules/transition.html +1 -0
  100. package/docs/modules.html +1 -0
  101. package/docs/static/demos/actionstate.jsx +41 -0
  102. package/docs/static/demos/boundary.jsx +52 -0
  103. package/docs/static/demos/context.jsx +68 -0
  104. package/docs/static/demos/css-transition.jsx +65 -0
  105. package/docs/static/demos/modal.jsx +41 -0
  106. package/docs/static/demos/proptypes.jsx +37 -0
  107. package/docs/static/demos/reducer.jsx +71 -0
  108. package/docs/static/demos/redux.jsx +58 -0
  109. package/docs/static/demos/router.jsx +153 -0
  110. package/docs/static/demos/stopwatch.jsx +42 -0
  111. package/docs/static/demos/suspense.jsx +48 -0
  112. package/docs/static/demos/transition.jsx +40 -0
  113. package/docs/static/demos/use-differed.jsx +30 -0
  114. package/docs/static/demos/usetransition.jsx +37 -0
  115. package/docs/static/index.html +212 -0
  116. package/docs/static/lilact.development.js +9344 -0
  117. package/docs/static/lilact.production.min.js +63 -0
  118. package/docs/static/prismjs/LICENSE.md +21 -0
  119. package/docs/static/prismjs/prism-jsx.min.js +1 -0
  120. package/docs/static/prismjs/prism.min.css +1 -0
  121. package/docs/static/prismjs/prism.min.js +16 -0
  122. package/docs/variables/jsx.transpilerConfig.html +1 -0
  123. package/docs/variables/misc.Children.html +10 -0
  124. package/icon.png +0 -0
  125. package/package.json +39 -0
  126. package/root/demos/actionstate.jsx +41 -0
  127. package/root/demos/boundary.jsx +52 -0
  128. package/root/demos/context.jsx +68 -0
  129. package/root/demos/css-transition.jsx +65 -0
  130. package/root/demos/modal.jsx +41 -0
  131. package/root/demos/proptypes.jsx +37 -0
  132. package/root/demos/reducer.jsx +71 -0
  133. package/root/demos/redux.jsx +58 -0
  134. package/root/demos/router.jsx +153 -0
  135. package/root/demos/stopwatch.jsx +42 -0
  136. package/root/demos/suspense.jsx +48 -0
  137. package/root/demos/transition.jsx +40 -0
  138. package/root/demos/use-differed.jsx +30 -0
  139. package/root/demos/usetransition.jsx +37 -0
  140. package/root/index.html +212 -0
  141. package/root/lilact.development.js +9344 -0
  142. package/root/lilact.production.min.js +63 -0
  143. package/root/prismjs/LICENSE.md +21 -0
  144. package/root/prismjs/prism-jsx.min.js +1 -0
  145. package/root/prismjs/prism.min.css +1 -0
  146. package/root/prismjs/prism.min.js +16 -0
  147. package/src/accessories.jsx +287 -0
  148. package/src/components.jsx +1063 -0
  149. package/src/events.jsx +175 -0
  150. package/src/hooks.jsx +461 -0
  151. package/src/jsx.addons.js +70 -0
  152. package/src/jsx.js +1168 -0
  153. package/src/lilact.jsx +115 -0
  154. package/src/loader.cjs +59 -0
  155. package/src/misc.jsx +419 -0
  156. package/src/redux.jsx +198 -0
  157. package/src/router.jsx +282 -0
  158. package/src/run.jsx +275 -0
  159. package/src/timers.jsx +313 -0
  160. package/src/transition.jsx +244 -0
  161. package/src/vlq.js +94 -0
  162. package/tsconfig.json +15 -0
  163. package/typedoc.json +23 -0
  164. package/webpack.config.js +196 -0
@@ -0,0 +1,63 @@
1
+ /*
2
+
3
+ Lilact
4
+ Copyright (C) 2024-2025 Arash Kazemi <contact.arash.kazemi@gmail.com>
5
+ All rights reserved.
6
+
7
+ BSD-2-Clause
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright
13
+ notice, this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright
15
+ notice, this list of conditions and the following disclaimer in the
16
+ documentation and/or other materials provided with the distribution.
17
+
18
+ --------------------------------------------------------------------------------
19
+
20
+ Lilact also includes the following libraries accessible as members of
21
+ the Lilact object:
22
+
23
+ @emotion/css:
24
+ Copyright (c) Emotion team and other contributors
25
+ MIT License
26
+
27
+ prop-types:
28
+ Copyright (c) 2013-present, Facebook, Inc.
29
+ MIT License
30
+
31
+ redux:
32
+ Copyright (c) 2015-present Dan Abramov
33
+ MIT License
34
+
35
+
36
+ * MIT License Notice:
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in all
46
+ copies or substantial portions of the Software.
47
+
48
+ --------------------------------------------------------------------------------
49
+
50
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
51
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
54
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
55
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
56
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
57
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
59
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60
+
61
+ */
62
+ var __webpack_modules__={207:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B:()=>transpilerConfig,Y:()=>transpileJSX});var _jsx_addons_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(862),_vlq_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(919);const transpilerConfig={addons:_jsx_addons_js__WEBPACK_IMPORTED_MODULE_0__,setFunctionLabels:!0,enableLabelStack:!1,injectLabels:!0,preprocessorDelimiter:"ʔ",required:{},func_labels:{},func_num:Math.floor(1e4*Math.random())},TRANSPILER_OUTPUT=Symbol.for("LILACT:TRANSPILER_OUTPUT");let raiseError,tab=0;function lookAhead(e,t,n,...r){const o=e(t,n,...r);return o?[o.end,o]:[n]}function parseRegex(e,t,n){let r=t;const o=`;=,([{}!^~&|:?*-+\\/<>${transpilerConfig.preprocessorDelimiter}`;for(;--r>0;)if(-1===" \t\n\r".indexOf(e[r])){if(-1!==o.indexOf(e[r]))break;return}const i={type:"regex",begin:t++};for(;t<e.length;)switch(e[t]){case"\n":return;case"/":return i.end=t+1,n&&n.children.push(i),i;case"\\":t++;default:t++}}function parseComment(e,t,n){const r={type:"comment",begin:t++};if("*"!==e[t]&&"/"!==e[t])return parseRegex(e,t-1,n);const o="*"===e[t];for(t++;t<e.length;){switch(e[t]){case"*":if(o&&"/"===e[t+1])return r.end=t+2,n&&n.children.push(r),r;break;case"\n":if(!o)return r.end=t+1,n&&n.children.push(r),r}t++}raiseError("unterminated comment",t)}function parseDirective(e,t,n){let r=t+1;for(;e[r]&&"\n"!==e[r]&&e[r]!==transpilerConfig.preprocessorDelimiter||"\\"===e[r-1];)r++;if(e[r]===transpilerConfig.preprocessorDelimiter){const o={type:"directive",begin:t,cbegin:t,end:r+1,expression:e.slice(t+1,r).replace(/\\(.)/gs,"$1"),value:""};return n&&n.children.push(o),o}{let o=t;for(;o-- >=0&&(" "===e[o]||"\t"===e[o]););if(-1===o||"\n"===e[o]){const o={type:"directive",begin:t,cbegin:t,end:r+1,pragma:e.slice(t+1,r+1).replace(/\\(.)/gs,"$1"),value:""};return n&&n.children.push(o),o}}raiseError("error in preprocessor statement.")}function preprocessPragmas(node,context){const all_nodes=[];var segments=["const {"+Object.keys(_jsx_addons_js__WEBPACK_IMPORTED_MODULE_0__).join(", ")+"} = transpilerConfig.addons;"],scope_stack=[],last_block=null;const clone_block=(e,t)=>("directive"===(last_block="object"==typeof all_nodes[e]?structuredClone({...all_nodes[e],children:void 0,attributes:{}}):all_nodes[e]).type&&(last_block.value=t),scope_stack[0].out??=[],scope_stack[0].out.push(last_block),last_block),clone_attr=(e,t)=>(last_block="object"==typeof all_nodes[e]?structuredClone({...all_nodes[e],children:void 0,attributes:{}}):all_nodes[e],scope_stack[0].attributes[t]=last_block,last_block),push_scope=()=>{scope_stack=[last_block,scope_stack]},pop_scope=()=>{scope_stack=scope_stack[1]},vine_traverse=e=>{if("object"!=typeof e)return segments;if(segments.push("push_scope();"),e.attributes)for(const t in e.attributes){const n=e.attributes[t];all_nodes.push(n),segments.push(`clone_attr(${all_nodes.length-1}, "${t}");`),vine_traverse(n)}if(e.children)for(const t of e.children)all_nodes.push(t),"directive"===t.type&&void 0===t.expression?segments.push(t.pragma):(t.expression?segments.push(`clone_block(${all_nodes.length-1}, ${t.expression});`):segments.push(`clone_block(${all_nodes.length-1});`),vine_traverse(t));return segments.push("pop_scope();"),segments};node.out=[],last_block=node,push_scope(),vine_traverse(node);const cmd=segments.join("\n");return eval(cmd),segments}function parseString(e,t,n,r){const o={type:"string",begin:t++,cbegin:t};for(;t<e.length;){switch(e[t]){case n:return o.cend=t,o.end=t+1,r&&r.children.push(o),o;case"\n":"`"!==n&&raiseError("unterminated string",t);break;case"$":"`"===n&&"{"===e[++t]&&([t]=lookAhead(parseJS,e,t,!0,r),t--);break;case"\\":t++}t++}raiseError("unterminated string",t)}function parseXMLContent(e,t,n,r){let o=t,i=t;for(;o<e.length;){switch(e[o]){case"<":if("/"===e[o+1]){o+=2;let r=o;for(;r<e.length&&">"!==e[r];)r++;if(r===e.length)return null;const i=e.substring(o,r).trim();if(n.tag!==i)throw`ill-formed xml (close tag) [${n.tag},${i}] ${r}`;return n.end=r+1,n.cbegin=t+1,n.cend=o-2,r}[o]=lookAhead(parseXML,e,o,n),o>i?(i=o,o--):i++;break;case"{":[o]=lookAhead(parseJS,e,o,!0,n),o--}o++}return i}function parseXML(e,t,n){const r=[" ","\t","\n","/","&","^","%","|","!","~","+","*","?","<",">",";",",","=","{","}","(",")","[","]","'",'"',"`","\\","",void 0],o=()=>{for(;" "===e[t]||"\t"===e[t]||"\n"===e[t];)t++},i={type:"xml",begin:t++,children:[],attributes:{},self_closing:!1,js_attributes:[]};o();let s,a=t;for(;a<e.length&&-1===r.indexOf(e[a]);)a++;if(a!==e.length)for(i.tag=e.substring(t,a),t=a;t<e.length;){for(a=t;a<e.length&&-1===r.indexOf(e[a]);)a++;if(a===e.length)return;const c=e.substring(t,a);switch(c.length&&(s=c,i.attributes[c]=!0),t=a,e[t]){case"=":if(!s)return;{let n;switch(t++,o(),"/"===e[t]&&([c]=lookAhead(parseComment,e,t),c>t?t=c:t++),e[t]){case"'":case'"':[t,n]=lookAhead(parseString,e,t,e[t]),i.attributes[s]=n,s=void 0;break;case"{":[t,n]=lookAhead(parseJS,e,t,!0),i.attributes[s]=n,s=void 0;break;default:{for(c=t;c<e.length&&-1===r.indexOf(e[c]);)c++;if(c===e.length)return;const n=e.substring(t,c);t=c,i.attributes[s]=n,s=void 0}}}break;case"{":let a;[t,a]=lookAhead(parseJS,e,t,!0),a.is_xml_js=!0,i.js_attributes.push(a);break;case"/":if(">"===e[t+1])return i.end=t+2,i.cbegin=i.begin,i.cend=i.end,i.self_closing=!0,n&&n.children.push(i),i;[c]=lookAhead(parseComment,e,t),c>t?t=c:t++;break;case">":const c=parseXMLContent(e,t,i);if(null===c)return;if(c>t?t=c:t++,i.end)return n&&n.children.push(i),i;t++;break;case" ":case"\t":case"\n":o();break;default:return}}}function parseParanthesis(e,t,n){const r={type:"paranthesis",begin:t,cbegin:++t,children:[],self_closing:!1};for(;t<e.length;){const o=e[t];switch(o){case"<":{let[n]=lookAhead(parseXML,e,t,r);n>t?t=n:t++;break}case'"':case"'":case"`":[t]=lookAhead(parseString,e,t,o);break;case"{":[t]=lookAhead(parseJS,e,t,!0,r);break;case"(":[t]=lookAhead(parseParanthesis,e,t,r);break;case"}":raiseError("unmatched curly bracket",t);break;case")":return r.end=t+1,r.cend=t,n&&n.children.push(r),r;case"/":const[i]=lookAhead(parseComment,e,t,r);i>t?t=i:t++;break;case"\\":t++;default:t++}}raiseError(`unterminated paranthesis block (started at ${r.begin})`,t)}function parseJS(e,t=0,n=!1,r){const o={type:"js",begin:t,cbegin:t+=n?1:0,children:[]};for(;t<e.length;){const i=e[t];switch(i){case"<":{let[n]=lookAhead(parseXML,e,t,o);n>t?t=n:t++;break}case'"':case"'":case"`":[t]=lookAhead(parseString,e,t,i);break;case"{":[t]=lookAhead(parseJS,e,t,!0,o);break;case"(":[t]=lookAhead(parseParanthesis,e,t,o);break;case")":raiseError(`unmatched paranthesis ${t} [from ${o.begin}]`,t);break;case"}":if(n)return o.end=t+1,o.cend=t,r&&r.children.push(o),o;raiseError("unmatched curly bracket",t);break;case"/":{let[n]=lookAhead(parseComment,e,t,o);n>t?t=n:t++;break}case transpilerConfig.preprocessorDelimiter:{let[n]=lookAhead(parseDirective,e,t,o);n>t?t=n:t++;break}case"\\":t++;default:t++}}return n&&raiseError(`unterminated js block at ${t} (started at ${o.begin})`),o.end=t,o.cend=t,r&&r.children.push(o),o}function labelFunctions(e,t){function n(t,n=1){for(;(t+=n)<e.children.length&&t>=0;){const n=e.children[t];if("string"==typeof n){const e=n.trim();if(e.length)return[t,e]}if("object"==typeof n&&"comment"!==n.type)return[t,n]}return[null,null]}let r,o,i;e.already_labeled=!0;for(let s=0;s<e.children.length;s++)if("object"==typeof e.children[s]&&"paranthesis"===e.children[s].type){if([r,i]=n(s,-1),null===i)continue;if("string"!=typeof i||void 0!==["switch","catch","try","class"].find(e=>i.trim().endsWith(e)))continue;let e=i;if([r,i]=n(r,-1),null===i)continue;if("string"==typeof i&&-1!==["extern","class"].indexOf(i))continue;if([r,o]=n(s),null===o)continue;if(transpilerConfig.injectTraceLabels&&"object"==typeof o&&"js"===o.type){const n=getRowCol(t,s);o.children.splice(1,0,`/*LILACTBLOCK${++transpilerConfig.func_num}:${n}:${e}*/try{`),transpilerConfig.enableLabelStack?o.children.splice(o.children.length-1,0,`} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${transpilerConfig.func_num},e.lilact_trace];throw e}`):o.children.splice(o.children.length-1,0,`} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${transpilerConfig.func_num};throw e}`),s+=2}}else if("=>"===e.children[s]&&([r,i]=n(s,-1),"object"==typeof i&&"paranthesis"===i.type)){const e=getRowCol(t,i.begin);[r,o]=n(s),"object"==typeof o&&"js"===o.type&&(transpilerConfig.injectTraceLabels&&(o.children.splice(1,0,`/*LILACTBLOCK${++transpilerConfig.func_num}:${e}:<ARROW>*/try {`),transpilerConfig.enableLabelStack?o.children.splice(o.children.length-1,0,`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${transpilerConfig.func_num},e.lilact_trace];throw e}`):o.children.splice(o.children.length-1,0,`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${transpilerConfig.func_num};throw e}`)),s+=2)}}function scanEOLs(e){const t=[0];for(let n in e)"\n"===e[n]&&t.push(parseInt(n));return t.push(e.length),t}function getRowCol(e,t){for(e.last||(e.last=1);t>e[e.last];)if(e.last++,e.last===e.length){e.last=e.length-1;break}for(;t<e[e.last-1]&&e.last>1;)e.last--;return[e.last-1,t-e[e.last-1]]}function generateSourceMap(e,t,n,r,o=[]){let i=[];const s={version:3,file:t,sourceRoot:"",sources:[t],names:[],mappings:""},a=e=>{if(e.children)for(const t of e.children)a(t);void 0!==e.begin&&void 0!==e.out_index&&i.push([...getRowCol(r,e.out_index),...getRowCol(n,e.begin),e])};a(e),i=i.sort((e,t)=>e[0]==t[0]?e[1]-t[1]:e[0]-t[0]),o.push(...i);let c="",l=0,u=0,p=0,h=0;for(let e=0;e<i.length;e++){const t=i[e];for(;l<t[0];)u=0,c+=";",l++;c+=",",c+=_vlq_js__WEBPACK_IMPORTED_MODULE_1__.l(t[1]-u,0,t[2]-p,t[3]-h),u=t[1],p=t[2],h=t[3]}return s.mappings=c.substring(1).replace(/;,/g,";"),"\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(JSON.stringify(s))}function transpileJSX(e,{factory:t="Lilact.createComponent",path:n="anonymous",appendSourcemap:r=!0,mappings:o=[],injectTraceLabels:i=!1,discardComments:s=!1}={}){transpilerConfig.func_num??=0,transpilerConfig.preprocessorDelimiter??="ʔ",transpilerConfig.injectTraceLabels??=i;const a=scanEOLs(e);raiseError=((e,t,n)=>{const r=new Error(t);throw r.name="JSXParseError",[r.lineNumber,r.columnNumber]=getRowCol(e,n),r.lilact_trace="parse",r}).bind(null,a);const c=/([\{\}\(\),;\[\]\n]|[\s^\n]+)/g,l=parseJS(e);l.data=e;const u=t=>{if(void 0!==t.attributes)for(const e in t.attributes)"object"==typeof t.attributes[e]&&u(t.attributes[e]);if(void 0!==t.children&&!t.self_closing){let n="js"===t.type?t.begin:t.cbegin||t.begin;for(let r=0;r<t.children.length;r++){const o=t.children[r];if(o.begin>n){let i=e.substring(n,o.begin);"xml"===t.type&&(i=i.trim()),i.length&&("xml"===t.type?t.children.splice(r,0,'"'+i.replaceAll("\n","\\\n")+'"'):t.children.splice(r,0,...i.split(c)),r++)}n=o.end,u(o)}const r="js"===t.type?t.end:t.cend||t.end;if(n<r&&!t.self_closing){let o=e.substring(n,r);"xml"===t.type&&(o=o.trim()),o.length&&("xml"===t.type?t.children.push('"'+o.replaceAll("\n","\\\n")+'"'):t.children.push(...o.split(c)))}t.children=t.children.filter(e=>""!==e),transpilerConfig.setFunctionLabels&&!t.already_labeled&&labelFunctions(t,a)}};u(l),preprocessPragmas(l);const p=(n,r,o=!1,i=!1)=>{if("object"!=typeof r)return r;if(r.out_index=n,"string"===r.type)return e.substring(r.begin,r.end);if("regex"===r.type)return e.substring(r.begin,r.end);if("comment"===r.type)return s||o?"":e.substring(r.begin,r.end);if("directive"===r.type)return r.value;if("paranthesis"===r.type){let e="(";if(r.out)for(const t of r.out)e+=p(n+e.length-1,t);return e+")"}if("js"===r.type){let t="";if(r.out)for(const e of r.out)i&&"comment"===e.type||(t+=p(n+t.length-(o?1:0),e));return o?t.substring(1,t.length-1):r?.is_xml_js?e.substring(r.begin+1,r.end-1):t}if("xml"===r.type){0===r.tag.length?r.tag="null":r.tag[0]!==r.tag[0].toUpperCase()&&(r.tag=`"${r.tag}"`);let e="",o=!0;for(const t of r.js_attributes)e+=`${o?"":", "}${p(n+e.length,t,!1)}`,o=!1;if(r.attributes)for(const t in r.attributes)e+=`${o?"":", "}"${t}": ${p(n+e.length,r.attributes[t],!0)}`,o=!1;if(e+=" }",r.out)for(const t of r.out){const r=p(n+e.length,t,!0,!0);r.length>0&&(e+=`, ${r}`,o=!1)}return getRowCol(a,r.begin),e=`${t}( ${r.tag}, { ${e} )`,e}};let h="";i&&(h=`/*LILACTBLOCK${++transpilerConfig.func_num}:0,0:<EXEC>*/try{`,transpilerConfig.func_labels[transpilerConfig.func_num]={path:n,row:1,col:1,label:transpilerConfig.func_num,required:transpilerConfig.required[n]}),h+=p(0,l),i&&(transpilerConfig.enableLabelStack?h+=`}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${transpilerConfig.func_num},e.lilact_trace];throw e}`:h+=`}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${transpilerConfig.func_num};throw e}`);const f=generateSourceMap(l,n,a,scanEOLs(h),o);if(r&&(h+=f),globalThis[TRANSPILER_OUTPUT]){try{Promise.resolve().then(function(){var e=new Error("Cannot find module 'fs'");throw e.code="MODULE_NOT_FOUND",e}).writeFileSync(globalThis[TRANSPILER_OUTPUT],h)}catch(e){}globalThis[TRANSPILER_OUTPUT]=void 0}return h}},465:(e,t,n)=>{n.d(t,{I:()=>jr,A:()=>Mr});var r={};n.r(r),n.d(r,{__DO_NOT_USE__ActionTypes:()=>_,applyMiddleware:()=>k,bindActionCreators:()=>E,combineReducers:()=>v,compose:()=>L,createStore:()=>y,isAction:()=>C,isPlainObject:()=>g,legacy_createStore:()=>b});var o={};n.r(o),n.d(o,{cache:()=>Ye,css:()=>Ze,cx:()=>He,flush:()=>Ke,getRegisteredStyles:()=>Xe,hydrate:()=>Fe,injectGlobal:()=>ze,keyframes:()=>Ge,merge:()=>Je,sheet:()=>Ve});var i={};n.r(i),n.d(i,{Children:()=>ct,Fragment:()=>at,classNames:()=>ft,current_component:()=>kt,deepEqual:()=>_t,err:()=>At,eval_num:()=>Lt,events_set:()=>Pt,findDOMNode:()=>st,getComponentByPointer:()=>ht,getErrorLocation:()=>lt,id_num:()=>Et,isAsync:()=>yt,isClass:()=>gt,isEmpty:()=>dt,isError:()=>vt,isThenable:()=>bt,isValidElement:()=>it,layout_effects:()=>Ot,mapLocation:()=>ut,roots:()=>St,scanFunctionLabels:()=>pt,shallowEqual:()=>mt,special_attributes:()=>xt,update_cbs:()=>Tt,update_interval_margin:()=>wt,update_set:()=>Ct,update_timeout:()=>{}});var s={};n.r(s),n.d(s,{Component:()=>Ht,HTMLComponent:()=>Jt,RootComponent:()=>Xt,createComponent:()=>zt,createElement:()=>Vt,createRoot:()=>Gt,render:()=>Zt});var a={};n.r(a),n.d(a,{createContext:()=>rn,useActionState:()=>fn,useCallback:()=>nn,useContext:()=>on,useDeferredValue:()=>mn,useEffect:()=>pn,useHook:()=>en,useId:()=>sn,useLayoutEffect:()=>un,useLocalStorage:()=>cn,useMemo:()=>hn,useReducer:()=>dn,useRef:()=>ln,useState:()=>tn,useTransition:()=>an});var c={};n.r(c),n.d(c,{animationFramePromise:()=>Jn,clearInterval:()=>Bn,clearTimeout:()=>Wn,grabTimers:()=>Kn,pauseTimers:()=>$n,releaseTimers:()=>Fn,resetTimers:()=>Rn,resumeTimers:()=>Nn,setInterval:()=>qn,setTimeout:()=>Un,timeoutPromise:()=>Hn});var l={};n.r(l),n.d(l,{CSSTransition:()=>nr,Transition:()=>tr,TransitionGroup:()=>rr});var u={};n.r(u),n.d(u,{Provider:()=>pr,connect:()=>mr,useDispatch:()=>fr,useSelector:()=>dr,useStore:()=>hr});var p={};n.r(p),n.d(p,{HashRouter:()=>wr,Link:()=>kr,NavLink:()=>Tr,Route:()=>xr,Routes:()=>Ar,useLocation:()=>Er,useNavigate:()=>Lr});var h={};function f(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.r(h),n.d(h,{ErrorBoundary:()=>Pr,Spinner:()=>Or,Suspense:()=>Dr});var d=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),m=()=>Math.random().toString(36).substring(7).split("").join("."),_={INIT:`@@redux/INIT${m()}`,REPLACE:`@@redux/REPLACE${m()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m()}`};function g(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function y(e,t,n){if("function"!=typeof e)throw new Error(f(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(f(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(f(1));return n(y)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((e,t)=>{s.set(t,e)}))}function u(){if(c)throw new Error(f(3));return o}function p(e){if("function"!=typeof e)throw new Error(f(4));if(c)throw new Error(f(5));let t=!0;l();const n=a++;return s.set(n,e),function(){if(t){if(c)throw new Error(f(6));t=!1,l(),s.delete(n),i=null}}}function h(e){if(!g(e))throw new Error(f(7));if(void 0===e.type)throw new Error(f(8));if("string"!=typeof e.type)throw new Error(f(17));if(c)throw new Error(f(9));try{c=!0,o=r(o,e)}finally{c=!1}return(i=s).forEach(e=>{e()}),e}return h({type:_.INIT}),{dispatch:h,subscribe:p,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(f(10));r=e,h({type:_.REPLACE})},[d]:function(){const e=p;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(f(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[d](){return this}}}}}function b(e,t,n){return y(e,t,n)}function v(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:_.INIT}))throw new Error(f(12));if(void 0===n(void 0,{type:_.PROBE_UNKNOWN_ACTION()}))throw new Error(f(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const s={};for(let o=0;o<r.length;o++){const a=r[o],c=n[a],l=e[a],u=c(l,t);if(void 0===u)throw t&&t.type,new Error(f(14));s[a]=u,i=i||u!==l}return i=i||r.length!==Object.keys(e).length,i?s:e}}function w(e,t){return function(...n){return t(e.apply(this,n))}}function E(e,t){if("function"==typeof e)return w(e,t);if("object"!=typeof e||null===e)throw new Error(f(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=w(o,t))}return n}function L(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function k(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(f(15))};const s={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},a=e.map(e=>e(s));return i=L(...a)(o.dispatch),{...o,dispatch:i}}}function C(e){return g(e)&&"type"in e&&"string"==typeof e.type}var T=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),S=Math.abs,x=String.fromCharCode,A=Object.assign;function O(e){return e.trim()}function P(e,t,n){return e.replace(t,n)}function D(e,t){return e.indexOf(t)}function I(e,t){return 0|e.charCodeAt(t)}function j(e,t,n){return e.slice(t,n)}function M(e){return e.length}function R(e){return e.length}function $(e,t){return t.push(e),e}var N=1,U=1,q=0,W=0,B=0,K="";function F(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:N,column:U,length:s,return:""}}function H(e,t){return A(F("",null,null,"",null,null,0),e,{length:-e.length},t)}function J(){return B=W>0?I(K,--W):0,U--,10===B&&(U=1,N--),B}function X(){return B=W<q?I(K,W++):0,U++,10===B&&(U=1,N++),B}function z(){return I(K,W)}function G(){return W}function Z(e,t){return j(K,e,t)}function V(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Y(e){return N=U=1,q=M(K=e),W=0,[]}function Q(e){return K="",e}function ee(e){return O(Z(W-1,re(91===e?e+2:40===e?e+1:e)))}function te(e){for(;(B=z())&&B<33;)X();return V(e)>2||V(B)>3?"":" "}function ne(e,t){for(;--t&&X()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return Z(e,G()+(t<6&&32==z()&&32==X()))}function re(e){for(;X();)switch(B){case e:return W;case 34:case 39:34!==e&&39!==e&&re(B);break;case 40:41===e&&re(e);break;case 92:X()}return W}function oe(e,t){for(;X()&&e+B!==57&&(e+B!==84||47!==z()););return"/*"+Z(t,W-1)+"*"+x(47===e?e:X())}function ie(e){for(;!V(z());)X();return Z(e,W)}var se="-ms-",ae="-moz-",ce="-webkit-",le="comm",ue="rule",pe="decl",he="@keyframes";function fe(e,t){for(var n="",r=R(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function de(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case pe:return e.return=e.return||e.value;case le:return"";case he:return e.return=e.value+"{"+fe(e.children,r)+"}";case ue:e.value=e.props.join(",")}return M(n=fe(e.children,r))?e.return=e.value+"{"+n+"}":""}function me(e){return Q(_e("",null,null,null,[""],e=Y(e),0,[0],e))}function _e(e,t,n,r,o,i,s,a,c){for(var l=0,u=0,p=s,h=0,f=0,d=0,m=1,_=1,g=1,y=0,b="",v=o,w=i,E=r,L=b;_;)switch(d=y,y=X()){case 40:if(108!=d&&58==I(L,p-1)){-1!=D(L+=P(ee(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:L+=ee(y);break;case 9:case 10:case 13:case 32:L+=te(d);break;case 92:L+=ne(G()-1,7);continue;case 47:switch(z()){case 42:case 47:$(ye(oe(X(),G()),t,n),c);break;default:L+="/"}break;case 123*m:a[l++]=M(L)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+u:-1==g&&(L=P(L,/\f/g,"")),f>0&&M(L)-p&&$(f>32?be(L+";",r,n,p-1):be(P(L," ","")+";",r,n,p-2),c);break;case 59:L+=";";default:if($(E=ge(L,t,n,l,u,o,a,b,v=[],w=[],p),i),123===y)if(0===u)_e(L,t,E,E,v,i,p,a,w);else switch(99===h&&110===I(L,3)?100:h){case 100:case 108:case 109:case 115:_e(e,E,E,r&&$(ge(e,E,E,0,0,o,a,b,o,v=[],p),w),o,w,p,a,r?v:w);break;default:_e(L,E,E,E,[""],w,0,a,w)}}l=u=f=0,m=g=1,b=L="",p=s;break;case 58:p=1+M(L),f=d;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==J())continue;switch(L+=x(y),y*m){case 38:g=u>0?1:(L+="\f",-1);break;case 44:a[l++]=(M(L)-1)*g,g=1;break;case 64:45===z()&&(L+=ee(X())),h=z(),u=p=M(b=L+=ie(G())),y++;break;case 45:45===d&&2==M(L)&&(m=0)}}return i}function ge(e,t,n,r,o,i,s,a,c,l,u){for(var p=o-1,h=0===o?i:[""],f=R(h),d=0,m=0,_=0;d<r;++d)for(var g=0,y=j(e,p+1,p=S(m=s[d])),b=e;g<f;++g)(b=O(m>0?h[g]+" "+y:P(y,/&\f/g,h[g])))&&(c[_++]=b);return F(e,t,n,0===o?ue:a,c,l,u)}function ye(e,t,n){return F(e,t,n,le,x(B),j(e,2,-2),0)}function be(e,t,n,r){return F(e,t,n,pe,j(e,0,r),j(e,r+1,-1),r)}var ve=function(e,t,n){for(var r=0,o=0;r=o,o=z(),38===r&&12===o&&(t[n]=1),!V(o);)X();return Z(e,W)},we=new WeakMap,Ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||we.get(n))&&!r){we.set(e,!0);for(var o=[],i=function(e,t){return Q(function(e,t){var n=-1,r=44;do{switch(V(r)){case 0:38===r&&12===z()&&(t[n]=1),e[n]+=ve(W-1,t,n);break;case 2:e[n]+=ee(r);break;case 4:if(44===r){e[++n]=58===z()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=x(r)}}while(r=X());return e}(Y(e),t))}(t,o),s=n.props,a=0,c=0;a<i.length;a++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[a]?i[a].replace(/&\f/g,s[l]):s[l]+" "+i[a]}}},Le=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ke(e,t){switch(function(e,t){return 45^I(e,0)?(((t<<2^I(e,0))<<2^I(e,1))<<2^I(e,2))<<2^I(e,3):0}(e,t)){case 5103:return ce+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ce+e+ae+e+se+e+e;case 6828:case 4268:return ce+e+se+e+e;case 6165:return ce+e+se+"flex-"+e+e;case 5187:return ce+e+P(e,/(\w+).+(:[^]+)/,ce+"box-$1$2"+se+"flex-$1$2")+e;case 5443:return ce+e+se+"flex-item-"+P(e,/flex-|-self/,"")+e;case 4675:return ce+e+se+"flex-line-pack"+P(e,/align-content|flex-|-self/,"")+e;case 5548:return ce+e+se+P(e,"shrink","negative")+e;case 5292:return ce+e+se+P(e,"basis","preferred-size")+e;case 6060:return ce+"box-"+P(e,"-grow","")+ce+e+se+P(e,"grow","positive")+e;case 4554:return ce+P(e,/([^-])(transform)/g,"$1"+ce+"$2")+e;case 6187:return P(P(P(e,/(zoom-|grab)/,ce+"$1"),/(image-set)/,ce+"$1"),e,"")+e;case 5495:case 3959:return P(e,/(image-set\([^]*)/,ce+"$1$`$1");case 4968:return P(P(e,/(.+:)(flex-)?(.*)/,ce+"box-pack:$3"+se+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ce+e+e;case 4095:case 3583:case 4068:case 2532:return P(e,/(.+)-inline(.+)/,ce+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(M(e)-1-t>6)switch(I(e,t+1)){case 109:if(45!==I(e,t+4))break;case 102:return P(e,/(.+:)(.+)-([^]+)/,"$1"+ce+"$2-$3$1"+ae+(108==I(e,t+3)?"$3":"$2-$3"))+e;case 115:return~D(e,"stretch")?ke(P(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==I(e,t+1))break;case 6444:switch(I(e,M(e)-3-(~D(e,"!important")&&10))){case 107:return P(e,":",":"+ce)+e;case 101:return P(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ce+(45===I(e,14)?"inline-":"")+"box$3$1"+ce+"$2$3$1"+se+"$2box$3")+e}break;case 5936:switch(I(e,t+11)){case 114:return ce+e+se+P(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ce+e+se+P(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ce+e+se+P(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ce+e+se+e+e}return e}var Ce=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case pe:e.return=ke(e.value,e.length);break;case he:return fe([H(e,{value:P(e.value,"@","@"+ce)})],r);case ue:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return fe([H(e,{props:[P(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return fe([H(e,{props:[P(t,/:(plac\w+)/,":"+ce+"input-$1")]}),H(e,{props:[P(t,/:(plac\w+)/,":-moz-$1")]}),H(e,{props:[P(t,/:(plac\w+)/,se+"input-$1")]})],r)}return""})}}],Te={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Se(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var xe=/[A-Z]|^ms/g,Ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Oe=function(e){return 45===e.charCodeAt(1)},Pe=function(e){return null!=e&&"boolean"!=typeof e},De=Se(function(e){return Oe(e)?e:e.replace(xe,"-$&").toLowerCase()}),Ie=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ae,function(e,t,n){return Me={name:t,styles:n,next:Me},t})}return 1===Te[e]||Oe(e)||"number"!=typeof t||0===t?t:t+"px"};function je(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Me={name:o.name,styles:o.styles,next:Me},o.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)Me={name:s.name,styles:s.styles,next:Me},s=s.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=je(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Pe(a)&&(r+=De(i)+":"+Ie(i,a)+";")}else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var c=je(e,t,s);switch(i){case"animation":case"animationName":r+=De(i)+":"+c+";";break;default:r+=i+"{"+c+"}"}}else for(var l=0;l<s.length;l++)Pe(s[l])&&(r+=De(i)+":"+Ie(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=Me,c=n(e);return Me=a,je(e,t,c)}}var l=n;if(null==t)return l;var u=t[l];return void 0!==u?u:l}var Me,Re=/label:\s*([^\s;{]+)\s*(;|$)/g;function $e(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Me=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=je(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=je(n,t,e[s]),r&&(o+=i[s]);Re.lastIndex=0;for(var a,c="";null!==(a=Re.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Me}}function Ne(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}function Ue(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function qe(e,t,n){var r=[],o=Ne(e,r,n);return r.length<2?n:o+t(r)}var We=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},Be=function(){var e=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Ce,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)});var c,l,u,p,h=[de,(p=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(l=[Ee,Le].concat(i,h),u=R(l),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=l[i](e,t,n,r)||"";return o});o=function(e,t,n,r){c=n,fe(me(e?e+"{"+t.styles+"}":t.styles),f),r&&(d.inserted[t.name]=!0)};var d={key:t,sheet:new T({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return d.sheet.hydrate(a),d}({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=$e(n,e.registered,void 0);return function(e,t){!function(e,t){var n=e.key+"-"+t.name;void 0===e.registered[n]&&(e.registered[n]=t.styles)}(e,t);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+n:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(e,o),e.key+"-"+o.name};return{css:t,cx:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return qe(e.registered,t,We(r))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=$e(n,e.registered);Ue(e,o)},keyframes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=$e(n,e.registered),i="animation-"+o.name;return Ue(e,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(t){t.forEach(function(t){e.inserted[t]=!0})},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Ne.bind(null,e.registered),merge:qe.bind(null,e.registered,t)}}(),Ke=Be.flush,Fe=Be.hydrate,He=Be.cx,Je=Be.merge,Xe=Be.getRegisteredStyles,ze=Be.injectGlobal,Ge=Be.keyframes,Ze=Be.css,Ve=Be.sheet,Ye=Be.cache,Qe=n(556),et=n.n(Qe);const[tt,nt,rt]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT"),Symbol.for("LILACT:MEMOIZED")],ot=e=>{const t=Object.prototype.toString.call(e).toLowerCase();return/\[object (.*)]/g.exec(t)[1]},it=e=>void 0!==e[tt]||void 0!==e[TEXT],st=e=>{if(console.warn("NOT IMPLEMENTED YET"),!e[tt]?.element?.parentNode)throw"findDOMNode only works on mounted components.";return e[tt].element},at=({children:e})=>e,ct={only(e){e=[...e];let t=0;for(;t<e.length;){if("Array"===e[t]?.constructor?.name?(e.splice(t,1,...e[t]),t--):null!==e[t]&&void 0!==e[t]||(e.splice(t,1),t--),t>1)throw"no child or child is not the only one";t++}if(1===e.length)return e[0]},toArray:e=>e?"Array"===e?.constructor?.name?[...e]:[e]:[]};function lt(e){if(void 0!==e.lineno||void 0!==e.line||void 0!==e.lineNumber)return[e.lineno||e.line||e.lineNumber,e.colno||e.column||e.columnNumber];let t=/:(\d+):(\d+)[\n].*/m.exec(e.stack);return null===t&&(t=/:(\d+):(\d+)\)\s+at .*/m.exec(e.stack)),t?[parseInt(t[1]),parseInt(t[2])]:null}function ut(e,t,n){let r=[0,0,0,0];for(const o in e)if(!(e[o][0]<t)&&(e[o][0]>t||e[o][1]>=n)){r=e[o-1];break}return[t-r[0]+r[2],t-r[0]===0?r[3]:0]}function pt(e,t){Array.from(e.matchAll(/LILACTBLOCK(\d+):(\d+),(\d+):([^*]+)\*\//gm)).forEach(e=>Mr.transpilerConfig.func_labels[e[1]]={path:t,row:parseInt(e[2])+1,col:parseInt(e[3])+1,label:e[4],required:Mr.transpilerConfig.required[t]})}function ht(){let e;const t=new Promise((t,n)=>{e=t});return window.addEventListener("click",function t(n){n.stopImmediatePropagation(),window.removeEventListener("click",t,!0);let r=n.target;for(;!r[nt]&&r.parentNode;)r=r.parentNode;return e(r[nt]),!1},!0),t}function ft(e){return Object.entries(e).filter(([e,t])=>t).map(([e,t])=>e).join(" ")}function dt(e){for(let t in e)return!1;return!0}const mt=(e,t)=>ot(e)===ot(t)&&("array"===ot(e)?e.length===t.length&&e.every((e,n)=>e===t[n]):"object"===ot(e)?Object.keys(e).every(n=>e[n]===t[n]):"date"===ot(e)?e.getTime()===t.getTime():e===t);function _t(e,t){return ot(e)===ot(t)&&("array"===ot(e)?e.length===t.length&&e.every((e,n)=>_t(e,t[n])):"object"===ot(e)?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>_t(e[n],t[n])):"date"===ot(e)?e.getTime()===t.getTime():e===t)}function gt(e){return!(!e||e.constructor!==Function||void 0===e.prototype)&&(Function.prototype!==Object.getPrototypeOf(e)||Object.getOwnPropertyNames(e.prototype).length>1)}function yt(e){return"function"==typeof e&&e.constructor&&"AsyncFunction"===e.constructor.name}function bt(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function vt(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}let wt=0,Et=Math.floor(1e4*Math.random()),Lt=Math.floor(1e4*Math.random()),kt=[],Ct=new Set,Tt=new Set,St=new Set,xt=new Set(["classname","classname","ref","action","lilact_jsx_loc","children","key"]),At=null,Ot=new Set,Pt=new Set(["onafterprint","onbeforeprint","onbeforeunload","onerror","onhashchange","onload","onmessage","onoffline","ononline","onpagehide","onpageshow","onpopstate","onresize","onstorage","onunload","onblur","onchange","oncontextmenu","onfocus","oninput","oninvalid","onreset","onsearch","onselect","onsubmit","onkeydown","onkeypress","onkeyup","onclick","ondblclick","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onwheel","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","onscroll","oncopy","oncut","onpaste","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onended","onerror","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","ontoggle"]);const[Dt,It,jt,Mt,Rt,$t,Nt]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT"),Symbol.for("LILACT:TEXT"),Symbol.for("LILACT:IS_ZOMBIE"),Symbol.for("LILACT:IDX"),Symbol.for("LILACT:CHILD_CLASS_ADDENDUM"),Symbol.for("LILACT:MEMOIZED")];class Ut{owner;current_map=new Map;new_map=new Map;pick_index=0;constructor(e){this.owner=e}pick(e,t){let n,r=this.current_map.get(e);return r&&r.length>r[Rt]?(n=r[r[Rt]],r[Rt]++,r=this.new_map.get(e),void 0!==r?r.push(n):(r=[n],this.new_map.set(e,r),r[Rt]=0)):(n=t(),r=this.new_map.get(e),void 0!==r?r.push(n):(r=[n],this.new_map.set(e,r),r[Rt]=0),n[Dt]&&(n[Dt].parent??=this.owner)),n}commit(){this.current_map.forEach(e=>{e.slice(e[Rt]).forEach(e=>{e.cleanup&&e.cleanup()})}),this.current_map=this.new_map,this.new_map=new Map}}class qt{component;props;constructor(e,t){this.component=e,this.props=t||{}}apply(e=this.props,t=this.next_state||this.state){if("function"==typeof t&&(t=t(this.state)),this.component.constructor.defaultProps&&(e={...this.component.constructor.defaultProps,...e}),!this.component.shouldComponentUpdate||this.component.shouldComponentUpdate(t,e,this.context)){if("string"==typeof this.entity&&(this.element instanceof Element||(this.element=document.createElement(this.entity)),this.element[It]=this.component),e.ref&&(this.element?e.ref.current=this.element:e.ref.current=this.component),void 0!==e&&this.component.componentWillReceiveProps&&this.component.componentWillReceiveProps(e),this.component.componentWillUpdate&&this.component.componentWillUpdate(e,t),this.state,this.props,this.element&&this.updateElementProps(e),this.props=e,void 0!==this.state||void 0!==t?this.state=t:delete this.state,this.next_state&&delete this.next_state,void 0!==this.hooks){this.hook_index=0,Lilact.current_component=[this,Lilact.current_component];try{this.outlet=this.component.render(e)}catch(e){Wt(this,e)}Lilact.current_component=Lilact.current_component[1]}else try{this.outlet=this.component.render()}catch(e){Wt(this,e)}"Array"!==this.outlet?.constructor?.name&&(this.outlet=[this.outlet]),this.outlet=[...this.outlet];for(let e=0;e<this.outlet.length;e++){let t=this.outlet[e];if(null==t||"boolean"==typeof t)this.outlet.splice(e,1),e--;else if("function"==typeof t){const n=this.childFunctionHandler(t);this.outlet.splice(e,1,n),e--}else if("Array"===t.constructor.name)this.outlet.splice(e,1,...t),e--;else{const n=Bt(this,t);this.outlet[e]=n,void 0===n[jt]?(n.container=this.element?this:this.container,n.apply(t.props)):n.element?n[jt]!==t[jt]&&(n.element.textContent=t[jt],n[jt]=t[jt]):(n.element=document.createTextNode(t[jt]),n[jt]=t[jt])}}this.cache&&this.cache.commit(),this.element&&this.arrangeOutlet(),this.component.componentDidUpdate&&this.component.componentDidUpdate(prev_props,prev_state,this.last_snapshot),this.last_snapshot&&delete this.last_snapshot}}async cleanup(){try{if(this.component.componentWillUnmount&&this.component.componentWillUnmount(),this?.element?.parentElement&&this.element.parentElement.removeChild(this.element),void 0!==this.outlet)for(let e of this.outlet)e.cleanup&&e.cleanup();if(void 0!==this.props?.children)for(let e of this.props.children)e.cleanup&&e.cleanup();if(void 0!==this.hooks)for(let e of this.hooks)e.cleanup&&e.cleanup()}catch(e){throw e}}updateElementProps(e,t=!1){if("input"===this.entity&&(e?.type!==this.element.type&&(this.element.type=e.type),e?.value!==this.element.value&&(this.element.value=e.value),"checkbox"===e?.type)){const t=!!e?.checked;this.element.checked==t&&null!==this.element.parentNode||(this.element.checked=t)}for(let t in this.props){const n=t.toLowerCase();e.hasOwnProperty(t)||(Lilact.events_set.has(n)?this.event_detachers[n]():this.element.setAttribute(t,void 0))}for(let n in e){const r=n.toLowerCase();Lilact.special_attributes.has(r)||e!==this.props&&Lilact.defaultIsEqual(e[n],this.props[n])&&!t||(Lilact.events_set.has(r)?(this.event_detachers??={},this.event_detachers[r]?.(),this.event_detachers[r]=Lilact.addWrappedEventListener(this.element,r.substring(2),e[n])):"style"===r?Object.assign(this.element.style,e[n]):this.element.setAttribute(r,e[n]))}this.element.onsubmit=e?.action?e.action:void 0,this.updateElementClass(e)}updateElementClass(e=this.props){let t=e?.className;if(t??=e?.class?e.class:"",this?.parent?.[$t]&&(t+=" "+this?.parent?.[$t]),t.length>0){t=t.split(/\s+/g);for(const e of Array.from(this.element.classList))-1===t.indexOf(e)&&this.element.classList.remove(e);for(const e of t)e.length>0&&this.element.classList.add(e)}else delete this.element.className}scanZombies(e,t){const n=e.element.childNodes;for(;n[e.insert_index]&&n[e.insert_index][Mt]&&n[e.insert_index]!==t;)e.insert_index++}appendElement(e){this.scanZombies(e.container,e.element),null===e?.element.parentNode?(e.container.element.insertBefore(e.element,e.container.element.childNodes[e.container.insert_index]||null),e?.component?.componentDidMount&&e.component.componentDidMount()):e.container.element.childNodes[e.container.insert_index]!==e.element&&e.container.element.insertBefore(e.element,e.container.element.childNodes[e.container.insert_index]||null),e.container.insert_index++}arrangeOutlet(){this.insert_index=0;for(const e of this.outlet)e&&(e.element?(e.container=this.element?this:this.container,e.container.appendElement(e)):(e.arrangeOutlet&&e.arrangeOutlet(),e?.mounted||(e.mounted=!0,e?.component?.componentDidMount&&e.component.componentDidMount())))}childFunctionHandler(e){return e(this.state)}}const Wt=(e,t)=>{const n=[e];for(;e&&!e?.component?.componentDidCatch;)(e=e.parent)&&n.push(e);if(!e?.component?.componentDidCatch)throw t;{e.entity?.getDerivedStateFromError&&e.component.setState({...e.component.state,...e.entity.getDerivedStateFromError.call(e,t)}),Lilact.isError(t)&&(t=Lilact.traceError(t));let r=Array.prototype.map.call(n,e=>"in "+(("string"==typeof e.entity?e.entity:e.entity?.name)||e.component?.name||e.constructor?.name)??"undefined").join("\n");e.component.componentDidCatch(t,{componentStack:n,componentStackLog:r})}};function Bt(e,t){try{return e.cache??=new Ut(e),t=e.cache.pick(void 0===t[jt]?t?.props?.key:":text",()=>void 0!==t[jt]||t instanceof qt?t:function(e,t){let n=e;if(void 0!==e[jt]);else if("string"==typeof e.entity)n=new Jt(e.entity,e.props);else{if(Lilact.isClass(e.entity)){e.entity?.defaultProps&&(e.props={...e.entity.defaultProps,...e.props}),n=new e.entity(e.props);const t=Object.getOwnPropertyDescriptor(n,"state");t&&"function"!=typeof t.get&&"function"!=typeof t.set&&(n[Dt].state=n.state,Object.defineProperty(n,"state",{get(){return this[Dt].state},set(e){if(void 0!==this[Dt].state)throw"assigning component state this way is not allowed.";this[Dt].state=e}}))}else{if("function"!=typeof e.entity)throw"createComponent accepts a component class or a function or undefined for the first argument.";e.entity?.defaultProps&&(e.props={...e.entity.defaultProps,...e.props}),n=new Ht(e.props),n.render=e.entity.bind(n),n[Dt].hooks=[],n[Dt].hook_index=0}n[Dt].entity=e.entity,e.container&&(n[Dt].container=e.container)}return t instanceof qt&&(n[Dt].parent=t),n}(t,e)[Dt])}catch(e){if(!t?.component?.componentDidCatch)throw e;t.component.componentDidCatch(e)}}function Kt(){requestAnimationFrame(()=>{let e=Lilact.layout_effects,t=Lilact.update_cbs,n=Lilact.update_set;Lilact.layout_effects=new Set,Lilact.update_cbs=new Set,Lilact.update_set=new Set;for(const t of e)t();for(const e of n)e.apply();for(const e of t)e()})}const Ft=(e,t)=>{let n;return void 0!==t.key?n=t.key:void 0!==t.id?n=":i:"+t.id:void 0!==t.path?n=":p:"+t.path:void 0!==t[jt]?n=":text":(n="string"==typeof e?":t:"+e:e?e.name:"::",void 0!==t.name?n=n+":"+t.name:void 0!==t.path&&(n=n+":"+t.path)),n};class Ht{get state(){return this[Dt].state}set state(e){if(void 0!==this[Dt].state)throw"assigning component state this way is not allowed.";this[Dt].state=e}get context(){return this[Dt].context}set context(e){throw"assigning component context this way is not allowed."}get type(){return this[Dt].entity}set type(e){throw"component type is immutable."}get props(){return this[Dt].props}set props(e){throw"assigning component props this way is not allowed."}get ref(){return this[Dt].ref}set ref(e){throw"component ref is immutable."}get key(){return this[Dt].props.key}set key(e){throw"component key is immutable."}constructor(e){this[Dt]=new qt(this,e)}forceUpdate(e){Lilact.clearTimeout(Lilact.update_timeout),Lilact.update_set.add(this[Dt].container||this[Dt]),e&&Lilact.update_cbs.add(e),Lilact.update_timeout=Lilact.setTimeout(Kt,Lilact.update_interval_margin)}setState(e,t){void 0!==this.getSnapshotBeforeUpdate&&(this[Dt].last_snapshot=this.getSnapshotBeforeUpdate(this[Dt].props,this.state)),this[Dt].next_state=e,this.forceUpdate(t?t.bind(this):void 0)}}class Jt extends Ht{constructor(e,t){super(t),this[Dt].entity=e}render(){return this[Dt].props.children}}class Xt extends Jt{constructor(e,t){super(":root",t),"string"==typeof this.element&&(e=document.querySelector(e)),this[Dt].element=e;for(const e of t.children)e[Dt]?e[Dt].container=this[Dt]:e.container=this[Dt]}}function zt(e,t={},...n){for(let e=0;e<n.length;e++){let t=n[e];null!=t&&"boolean"!=typeof t?(-1!==["number","bigint"].indexOf(typeof t)&&(t=t.toString()),n[e]="string"==typeof t?{[jt]:t}:t):(n.splice(e,1),e--)}return null===e?n:(t.key=Ft(e,t),t.children=n,{entity:e,props:t})}function Gt(e){let t;return{render(n){if(t)throw"root already initialized!";return t=new Xt(e,{children:[n]}),Lilact.roots.add(t[Dt]),t.forceUpdate(),t},unmount(){t&&(t.cleanup(),e.innerHTML="")}}}function Zt(e,t){if(e[Dt]&&(e[Dt].container||e[Dt].parent))throw"component is already in use";return Gt(t).render(e)}const Vt=zt,[Yt,Qt]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT")];function en(){const e=Lilact.current_component[0];return void 0===e.hooks[e.hook_index]&&e.hooks.push({}),e.hooks[e.hook_index++]}function tn(e){const t=Lilact.useHook();return Lilact.isEmpty(t)&&(t.value="function"==typeof e?e():e,t.set_func=function(e,t,n){t.value="function"==typeof n?n(t.value):n,e.component.forceUpdate()}.bind(void 0,Lilact.current_component[0],t)),[t.value,t.set_func]}function nn(e,t=[{}]){const n=Lilact.useHook();if(Lilact.isEmpty(n))n.callback=e,n.deps=t;else for(let r in t)if(!Lilact.defaultIsEqual(t[r],n.deps[r])){n.callback=e,n.deps=t;break}return n.callback}function rn(e){return{default:e,Provider:function({value:e,children:t}){return t}}}function on(e){let t=Lilact.current_component[0].parent;for(;t.entity!==e.Provider&&t.parent;)t=t.parent;if(t.parent){let n=t.props?.value;return n??=e.default}return e.default}function sn(e="N"){const t=Lilact.useHook();return Lilact.isEmpty(t)&&(t.id=e+Lilact.id_num++),t.id}function an(){const e=Lilact.useHook();return Lilact.isEmpty(e)&&(e.count=0,e.func=async function(e,t,n){t.count++,1===t.count&&e.component.forceUpdate(),await n(),t.count--,0===t.count&&e.component.forceUpdate()}.bind(void 0,Lilact.current_component[0],e)),[0!=e.count,e.func]}function cn(e,t){const n=Lilact.useHook();let r;try{r=JSON.parse(localStorage[e])}catch(e){}return void 0===r&&("function"==typeof t&&(t=t()),r=t,localStorage[e]=JSON.stringify(r)),Lilact.isEmpty(n)&&(n.value=r,n.set_func=function(t,n,r){"function"==typeof r&&(r=r(n.value)),r!==n.value&&(localStorage[e]=JSON.stringify(r),n.value=r,t.component.forceUpdate())}.bind(void 0,Lilact.current_component[0],n)),[n.value,n.set_func]}function ln(e=null){const t=Lilact.useHook();return Lilact.isEmpty(t)&&(t.current=e),t}function un(e,t=[{}]){if("object"!=typeof t||"Array"!==t.constructor.name)throw"effect dependencies must be an array or omitted.";const n=Lilact.useHook();if(!Lilact.isEmpty(n)){if(t.every((e,t)=>e===n.deps[t]))return;n.cleanup&&n.cleanup()}n.deps=t,Lilact.layout_effects.add(()=>{n.cleanup=e()}),Lilact.current_component[0].component.forceUpdate()}function pn(e,t=[{}]){if("object"!=typeof t||"Array"!==t.constructor.name)throw"effect dependencies must be an array or omitted.";const n=Lilact.useHook();if(!Lilact.isEmpty(n)){if(t.every((e,t)=>e===n.deps[t]))return;n.cleanup&&n.cleanup()}n.deps=t,Lilact.setTimeout(()=>{n.cleanup=e()},0)}function hn(e,t=[]){const n=Lilact.useHook();if(Lilact.isEmpty(n))n.deps=t,n.value=e();else for(let r in t)if(!Lilact.defaultIsEqual(t[r],n.deps[r])){n.deps=t,n.value=e(n.value);break}return n.value}function fn(e,t){const n=Lilact.useHook(),[r,o]=Lilact.useTransition();return Lilact.isEmpty(n)&&(n.state=t,n.form_action=t=>(event.preventDefault(),o(async()=>{const r=new FormData(t.target,t.submitter);n.state=await e(n.state,r)},[]),!1)),[n.state,n.form_action,r]}function dn(e,t,n){const r=Lilact.useHook();return Lilact.isEmpty(r)&&(r.reducer=e,r.state=n?n(t):t,r.dispatch=function(e,t,n){const r=t.reducer(t.state,n);Lilact.defaultIsEqual(r,t.state)||(t.state=r,e.component.forceUpdate())}.bind(void 0,Lilact.current_component[0],r)),[r.state,r.dispatch]}function mn(e,t){const{useEffect:n,useRef:r,useState:o}=Lilact,[i,s]=o(void 0!==t?t:e),a=r(e),c=r(null);return n(()=>{if(a.current===e)return;a.current=e,null!=c.current&&(c.current.cancelled=!0,c.current=null);const t={cancelled:!1};return c.current=t,Promise.resolve().then(()=>{t.cancelled||(s(e),c.current=null)}),()=>{c.current&&(c.current.cancelled=!0,c.current=null)}},[e]),i}var _n=n(861);const[gn,yn,bn,vn,wn,En,Ln,kn]=[Symbol.for("LILACT:TIMERS:CORE"),Symbol.for("LILACT:TIMERS:IDX"),Symbol.for("LILACT:TIMERS:DUE"),Symbol.for("LILACT:TIMERS:REPEAT"),Symbol.for("LILACT:TIMERS:CLEARED"),Symbol.for("LILACT:TIMERS:INTERVAL"),Symbol.for("LILACT:TIMERS:CALLBACK"),Symbol.for("LILACT:TIMERS:ARGS")];let Cn,Tn=-1,Sn=[],xn=-1,An={};const On=window.setTimeout,Pn=window.setInterval,Dn=window.clearTimeout,In=window.clearInterval;function jn(e,t=!1){const[n,r]=function(e){let t=0,n=Sn.length-1;for(;t<=n;){const r=Math.floor((t+n)/2),o=Sn[r][bn];if(o===e)return[r,Sn[r]];o<e?t=r+1:n=r-1}const r=[];return r[bn]=e,Sn.splice(t,0,r),[t,r]}(e[bn]);return t||(Tn++,An[Tn]=e,e[yn]=Tn),r.push(e),Sn[0][0]===e&&(Dn(xn),xn=On(Mn,e[En])),Tn}function Mn(){const e=Date.now();let t=0,n=Sn[t];for(;n&&n[bn]-e<=0;){for(const e of n)e[wn]?delete An[e[yn]]:(e[Ln](...e[kn]),e[vn]?(e[bn]=Date.now()+e[En],jn(e,!0)):delete An[e[yn]]);t++,n=Sn[t]}Sn.splice(0,t),Sn.length>0&&(Dn(xn),xn=On(Mn,Sn[0][bn]-e))}function Rn(){Dn(xn),Cn=void 0,Tn=-1,Sn=[],xn=-1,An={}}function $n(){Dn(xn),Cn=Date.now()}function Nn(){if(Cn){if(Sn.length>0){const e=Date.now();Cn-=e;for(const e of Sn)e[bn]-=Cn;xn=On(Mn,Sn[0][bn]-e)}Cn=void 0}}function Un(e,t,...n){return jn({[Ln]:e,[En]:t,[bn]:Date.now()+t,[vn]:!1,[kn]:n})}function qn(e,t,...n){return jn({[Ln]:e,[En]:t,[bn]:Date.now()+t,[vn]:!0,[kn]:n})}function Wn(e){An[e]&&(An[e][wn]=!0)}function Bn(e){An[e]&&(An[e][wn]=!0)}function Kn(){globalThis.setTimeout=this.setTimeout,globalThis.setInterval=this.setInterval,globalThis.clearTimeout=this.clearTimeout,globalThis.clearInterval=this.clearInterval}function Fn(){globalThis.setTimeout=On,globalThis.setInterval=Pn,globalThis.clearTimeout=Dn,globalThis.clearInterval=In}function Hn(e=0,t=this){let n,r,o;const i=new Promise((i,s)=>{r=i,o=s,n=t.setTimeout(()=>{r()},e)});return i.proceed=()=>{t.clearTimeout(n),r()},i.cancel=()=>{t.clearTimeout(n),o()},i}function Jn(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}const[Xn,zn,Gn]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT"),Symbol.for("LILACT:CHILD_CLASS_ADDENDUM")],Zn="unmounted",Vn="exited",Yn="entering",Qn="entered",er="exiting";function tr({in:e,timeout:t=Lilact.defaultTransitionTimeout,mountOnEnter:n=!1,unmountOnExit:r=!1,appear:o=!1,onEnter:i,onEntering:s,onEntered:a,onExit:c,onExiting:l,onExited:u,children:p,_classNames:h}){return this[Xn].is_mounted??=!n||e||o,this[Xn].is_appeared??=e,this[Xn].timer??=null,this.state||(this[Xn].is_mounted||(this.state=Zn),e&&(this.state=o&&!this[Xn].is_appeared?Yn:Qn),this.state=Vn),pn(()=>()=>Wn(this[Xn].timer),[]),pn(()=>{!this[Xn].is_appeared&&o&&this.state===Yn&&e&&(i?.(),requestAnimationFrame(()=>{s?.(!this[Xn].is_appeared),Wn(this[Xn].timer),this[Xn].timer=Un(()=>{this.setState(Qn),this[Xn].is_appeared=!0,a?.(!this[Xn].is_appeared)},t)}))},[]),pn(()=>{if(e){if(this[Xn].is_mounted=!0,this.state===Yn||this.state===Qn)return;i?.(!this[Xn].is_appeared),this.setState(Yn,()=>{s?.(!this[Xn].is_appeared),Wn(this[Xn].timer),this[Xn].timer=Un(()=>{this.setState(Qn),this[Xn].is_appeared=!0,a?.()},t)})}else{if(this.state===Zn||this.state===er||this.state===Vn)return;c?.(),this.setState(er,()=>{l?.(),Wn(this[Xn].timer),this[Xn].timer=Un(()=>{this.setState(Vn),u?.(),r&&(this[Xn].is_mounted=!1,this.setState(Zn))},t)})}},[e,t]),this[Xn].is_mounted?(h&&(this.state===Yn?this[Xn].is_appeared?this[Xn][Gn]=h.appearActive:this[Xn][Gn]=h.enterActive:this.state===Qn?this[Xn].is_appeared?this[Xn][Gn]=h.appearDone:this[Xn][Gn]=h.enterDone:this.state===er?this[Xn][Gn]=h.exitActive:this.state===Vn&&(this[Xn][Gn]=h.exitDone)),p):null}function nr({in:e,timeout:t=defaultTransitionTimeout,classNames:n="fade",mountOnEnter:r=!1,unmountOnExit:o=!1,appear:i=!1,children:s,onEnter:a,onEntering:c,onEntered:l,onExit:u,onExiting:p,onExited:h}){return"string"==typeof n&&(n={appear:`${n}-enter ${n}-appear`,appearActive:`${n}-enter-active ${n}-appear-active`,appearDone:`${n}-enter-done ${n}-appear-done`,enter:`${n}-enter`,enterActive:`${n}-enter-active`,enterDone:`${n}-enter-done`,exit:`${n}-exit`,exitActive:`${n}-exit-active`,exitDone:`${n}-exit-done`}),Lilact.createComponent(tr,{in:e,timeout:t,mountOnEnter:r,unmountOnExit:o,appear:i,onEnter:a,onEntering:c,onEntered:l,onExit:u,onExiting:p,onExited:h,_classNames:n},s)}function rr({children:e}){return e}"undefined"==typeof Element||Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),"undefined"==typeof Event||Event.prototype.composedPath||(Event.prototype.composedPath=function(){for(var e=[],t=this.target;t;)e.push(t),t=t.parentElement;return e.push(window),e});const or=[];function ir(e,t){const n=or.length?or.pop():{};n.nativeEvent=e,n.type=e.type,n.target=e.target||e.srcElement||null,n.currentTarget=t||e.currentTarget||null,n.timeStamp=e.timeStamp||Date.now(),n.defaultPrevented=!!e.defaultPrevented,n.isPropagationStopped=!1,n.isPersistent=!1,n.isDefaultPrevented=()=>n.defaultPrevented,n.preventDefault=()=>{e.preventDefault&&e.preventDefault(),n.defaultPrevented=!0},n.stopPropagation=()=>{e.stopPropagation&&e.stopPropagation(),n.isPropagationStopped=!0},n.persist=()=>{n.isPersistent=!0},n.nativeEvent=e,n.key=e.key||null,n.code=e.code||null,n.which=e.which||e.keyCode||null;try{const e=n.target;n.value=e&&"value"in e?e.value:void 0,n.checked=e&&"checked"in e?e.checked:void 0}catch(e){n.value=void 0,n.checked=void 0}return n.path="function"==typeof e.composedPath?e.composedPath():[n.target],n}function sr(e){e&&!e.isPersistent&&(e.nativeEvent=null,e.type=null,e.target=null,e.currentTarget=null,e.timeStamp=0,e.defaultPrevented=!1,e.isPropagationStopped=!1,e.isPersistent=!1,e.isDefaultPrevented=null,e.preventDefault=null,e.stopPropagation=null,e.persist=null,e.key=null,e.code=null,e.which=null,e.value=void 0,e.checked=void 0,e.path=null,or.length<10&&or.push(e))}function ar(e,t={}){const{stopPropagationOnTrueReturn:n=!1}=t;return function(t){const r=ir(t,this||t.currentTarget||null);try{const t=e(r);n&&!0===t&&r.stopPropagation()}finally{sr(r)}}}const cr={wrapListener:ar,addWrappedEventListener:function(e,t,n,r={}){const o=ar(n,r);return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},createSyntheticEvent:ir,releaseSyntheticEvent:sr},[lr]=[Symbol.for("LILACT:CORE")];let ur;function pr({store:e,children:t}){return ur??=Lilact.createContext(null),Lilact.createComponent(ur.Provider,{value:e},t)}function hr(){const e=Lilact.useContext(ur);if(!e)throw new Error("Could not find Redux store in context. <Provider> is missing.");return e}function fr(){return Lilact.useStore().dispatch}function dr(e,t=(e,t)=>e===t){const n=Lilact.useStore(),r=Lilact.useRef(),o=Lilact.useRef(),[,i]=Lilact.useState(0);o.current||(o.current=e),o.current=e;let s=e(n.getState());return void 0===r.current&&(r.current=s),Lilact.useLayoutEffect(()=>{r.current=s},[s]),Lilact.useEffect(()=>{let e=!1;function s(){if(!e)try{const e=o.current(n.getState()),s=r.current;t(s,e)||(r.current=e,i(e=>e+1))}catch(e){}}const a=n.subscribe(s);return s(),()=>{e=!0,a()}},[n,t]),r.current}function mr(e,t){return Boolean(e),function(n){return function(r){const o=Lilact.useStore();let i={dispatch:o.dispatch};if("function"==typeof t)i=t(o.dispatch,r);else if("object"==typeof t&&null!==t){i={};const e=o.dispatch;for(const n in t){const r=t[n];i[n]=(...t)=>e(r(...t))}}let s={};if(e){const t=t=>e(t,r);s=Lilact.useSelector(t,Lilact.shallowEqual)||{}}const a={...r,...s,...i};return Lilact.createComponent(n,{...a})}}}const[_r,gr]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT")],yr=rn(null),br=rn({params:{}}),vr=e=>"string"==typeof e?e:(e.pathname||"")+(e.search||"")+(e.hash||"");function wr({children:e,basename:t=""}){const n=()=>{const e=(window.location.hash||"#/").slice(1).replace(new RegExp(`^${t}`),"")||"/",[n,r]=e.split("#"),[o,i=""]=n.split("?");return{pathname:o||"/",search:i?"?"+i:"",hash:r?"#"+r:"",state:history.state?.__state}},[r,o]=tn(n);pn(()=>{const e=()=>o(n());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[t]);const i=nn((e,{replace:r=!1,state:i}={})=>{const s=vr(e),a="#"+(t+s);r?history.replaceState({__state:i},"",a):history.pushState({__state:i},"",a),o(n())},[t]);return Lilact.createComponent(yr.Provider,{value:{location:r,navigate:i,basename:t}},e)}function Er(){const e=on(yr);if(!e)throw new Error("useLocation must be used inside a Router");return e.location}function Lr(){const e=on(yr);if(!e)throw new Error("useNavigate must be used inside a Router");return e.navigate}function kr({to:e,replace:t=!1,state:n,onClick:r,target:o,download:i,className:s,style:a,children:c,...l}){const u=Lr(),p="#"+vr(e);return Lilact.createComponent("a",{...l,href:p,onClick:function(i){r&&r(i),i.defaultPrevented||0!==i.button||o&&"_self"!==o||i.metaKey||i.altKey||i.ctrlKey||i.shiftKey||(i.preventDefault(),u(e,{replace:t,state:n}))},target:o,download:i,className:s,style:a},c)}function Cr(e){return e&&e.replace(/\/+$/,"")||"/"}function Tr({to:e,end:t=!1,activeClassName:n="active",className:r,activeStyle:o,style:i,replace:s=!1,state:a,children:c,onClick:l,...u}){const p=Lr(),h=Er(),f="string"==typeof e?e.split("?")[0].split("#")[0]:e.pathname||"/",d=h.pathname||"/",m=t?Cr(d)===Cr(f):Cr(d).startsWith(Cr(f)),_=["function"==typeof r?r({isActive:m}):r,m?n:null].filter(Boolean).join(" ")||void 0,g="function"==typeof i?i({isActive:m}):i,y=m?{...g||{},...o||{}}:g,b="#"+vr(e);return Lilact.createComponent("a",{...u,href:b,onClick:function(t){l&&l(t),t.defaultPrevented||0!==t.button||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),p(e,{replace:s,state:a}))},className:_,style:y,"aria-current":m?"page":void 0},"function"==typeof c?c({isActive:m}):c)}function Sr(e,t){if(null==e)return{matched:!0,params:{}};const{regex:n,paramNames:r}=function(e){const t=[];let n="^"+e.replace(/\/+$/,"").replace(/([.+?^=!:${}()|[\]\/\\])/g,"\\$1").replace(/\\\:([A-Za-z0-9_]+)/g,(e,n)=>(t.push(n),"([^/]+)")).replace(/\\\*$/g,"(.+?)?");return n+="/?$",{regex:new RegExp(n),paramNames:t}}(e),o=n.exec(t);if(!o)return{matched:!1};const i={};return r.forEach((e,t)=>i[e]=decodeURIComponent(o[t+1]||"")),o.length>r.length+1&&(i["*"]=o[r.length+1]?decodeURIComponent(o[r.length+1]):void 0),{matched:!0,params:i}}function xr({path:e,element:t=null,children:n}){return null}function Ar({children:e}){const t=Er().pathname||"/",n=ct.toArray(e);for(let e=0;e<n.length;e++){const r=n[e],o=void 0===r.props.path?null:r.props.path,i=r.props.element??null,s=r.props.children,{matched:a,params:c}=Sr(o,t);if(a)return i?Lilact.createComponent(br.Provider,{value:{params:c}},i):s?Lilact.createComponent(br.Provider,{value:{params:c}},Lilact.createComponent(Ar,{},s)):Lilact.createComponent(br.Provider,{value:{params:c}},Lilact.createComponent("div",{}))}return null}function Or({size:e=48,className:t,style:n,color:r="currentColor",strokeWidth:o=3,"aria-label":i="Loading"}){const s=Math.max(1,e)+"px";return Lilact.createComponent("div",{className:t,style:{width:"100%",height:"100%",display:"grid",placeItems:"center",...n},"aria-label":i,role:"status"},Lilact.createComponent("div",{style:{width:s,height:s,borderRadius:"50%",border:`${o}px solid rgba(0,0,0,0.15)`,borderTopColor:r,animation:"ddSpinnerSpin 0.9s linear infinite",boxSizing:"border-box"}}),Lilact.createComponent("style",{},"\n @keyframes ddSpinnerSpin { to { transform: rotate(360deg); } }\n "))}class Pr extends Ht{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){const{onError:n}=this.props;try{n&&n(e,t)}catch(e){console.error("onError threw",e)}}reset=()=>this.setState({hasError:!1,error:null});render(){const{Fallback:e,children:t}=this.props;return this.state.hasError?Lilact.createComponent(e,{error:this.state.error,reset:this.reset}):t}}class Dr extends Ht{static defaultProps={minDelay:200,minShowTime:300};constructor(e){super(e),this.state={showingFallback:!1},this._pending=new Set,this._delayTimer=null,this._minShowTimer=null,this._fallbackShownAt=0}static getDerivedStateFromError(e){if(Lilact.isThenable(e))return null;throw e}componentDidCatch(e){if(!Lilact.isThenable(e))return;const t=e;if(!this._pending.has(t)&&(this._pending.add(t),1===this._pending.size)){const e=Math.max(0,this.props.minDelay);this._delayTimer&&(Lilact.clearTimeout(this._delayTimer),this._delayTimer=null),this._delayTimer=Lilact.setTimeout(()=>{this._delayTimer=null,this._fallbackShownAt=Date.now(),this.setState({showingFallback:!0})},e)}}componentWillUnmount(){this._clearTimers(),this._pending.clear()}_clearTimers(){this._delayTimer&&(Lilact.clearTimeout(this._delayTimer),this._delayTimer=null),this._minShowTimer&&(Lilact.clearTimeout(this._minShowTimer),this._minShowTimer=null)}_attachPromise(e){if(this._pending.has(e))return;if(this._pending.add(e),1===this._pending.size){const e=Math.max(0,this.props.minDelay);this._delayTimer&&(Lilact.clearTimeout(this._delayTimer),this._delayTimer=null),this._delayTimer=Lilact.setTimeout(()=>{this._delayTimer=null,this._fallbackShownAt=Date.now(),this.setState({showingFallback:!0})},e)}const t=()=>{if(this._pending.has(e)&&this._pending.delete(e),0===this._pending.size){if(this._delayTimer)return Lilact.clearTimeout(this._delayTimer),this._delayTimer=null,void this.setState({showingFallback:!1});const e=Date.now()-(this._fallbackShownAt||0),t=Math.max(0,this.props.minShowTime-e);0===t?this.setState({showingFallback:!1}):(this._minShowTimer&&(Lilact.clearTimeout(this._minShowTimer),this._minShowTimer=null),this._minShowTimer=Lilact.setTimeout(()=>{this._minShowTimer=null,this.setState({showingFallback:!1})},t))}};e.then(t,t)}componentDidCatch(e,t){Lilact.isThenable(e)&&this._attachPromise(e)}render(){return this.state.showingFallback?Lilact.createComponent(null,{},this.props.fallback):Lilact.createComponent(null,{},this.props.children)}}var Ir=n(207);const jr={VERSION:"beta.0",defaultTransitionTimeout:300,defaultIsEqual:Object.is,...s,...a,..._n,...l,...u,...c,...i,...cr,...p,...h,transpileJSX:Ir.Y,transpilerConfig:Ir.B,PropTypes:et(),redux:r,emotion:o};document.addEventListener("DOMContentLoaded",()=>{jr.runScripts()});const Mr=jr},556:(e,t,n)=>{e.exports=n(694)()},694:(e,t,n)=>{var r=n(925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},861:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{require:()=>require,run:()=>run,runScripts:()=>runScripts,traceError:()=>traceError});var _lilact_jsx__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(465);const[CORE,COMPONENT]=[Symbol.for("LILACT:CORE"),Symbol.for("LILACT:COMPONENT")];function run(jsx,path=`<string input ${++_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.eval_num}>`,is_inline=!0){_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.checkTraceErrors&&_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.checkTraceErrors;const mappings=[];let processed;try{processed=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpileJSX(jsx,{path,mappings,factory:"Lilact.createComponent",append_sourcemap:!is_inline,wrap_all:!1})}catch(e){throw e.lilact_trace=path,e}const module={};_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpilerConfig.required[path]={mappings,processed,module,is_inline,path,code:jsx},_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.scanFunctionLabels(processed,path),_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpilerConfig.func_labels[path]={path,row:0,col:0,label:"<EXEC>",required:_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpilerConfig.required[path]};try{globalThis.Lilact=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A;const res=eval(processed);return module.exports?module.exports:res}catch(e){throw e.lilact_trace=path,e}}function require(e,t){if(void 0!==_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpilerConfig.required[e]&&!t)return _lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.transpilerConfig.required[e].module;if("#"===e[0]){const t=document.querySelector(e);if(t)return _lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.run(t.innerText,e)}else{const t=new XMLHttpRequest;if(t.open("GET",e,!1),t.send(null),200===t.status)return _lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.run(t.responseText,e,!1)}throw`required resource not found (${e})`}function traceError(e){const t=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.getErrorLocation(e),n={path:e.fileName,label:null,row:t[0],col:t[1],msg:e.message,name:e.name,stack:null,err:e};if(void 0!==e.lilact_trace){let t,r;"string"==typeof e.lilact_trace?(r=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.func_labels[e.lilact_trace],t=r.required.mappings):"object"==typeof e.lilact_trace&&(r=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.func_labels[e.lilact_trace[0]],t=r.mappings),n.path=r.path,n.label=r.label,[n.row,n.col]=_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.mapLocation(t,n.row,n.col)}return n}function scanScriptTagsWithType(){return Array.from(document.querySelectorAll('script[type="text/jsx"]')).map(e=>({src:e.getAttribute("src")??null,content:e.textContent??""}))}function runScripts(){const e=scanScriptTagsWithType();for(const t of e)t.src&&_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.require(t.src),t.content&&_lilact_jsx__WEBPACK_IMPORTED_MODULE_0__.A.run(t.content)}},862:(e,t,n)=>{n.r(t),n.d(t,{defineSymbols:()=>o,outputJS:()=>s,quote:()=>i});const r=Symbol.for("LILACT:TRANSPILER_OUTPUT");function o(e,t){void 0===t?(t=e,e=""):e+=":";const n=[],r=[];if(t instanceof Array){if(""!==e){"string"!=typeof e&&(e="");for(let o of t)r.push(o),n.push(`Symbol.for('${e}${o}')`)}else for(const e of t)r.push(e),n.push("Symbol()");return`const [${r.join(",")}]=[${n.join(",")}];`}}const i=e=>`"${String(e).replace(/(["\n])/g,"\\$1")}"`;function s(e){globalThis[r]=e}},919:(e,t,n)=>{n.d(t,{l:()=>i});let r={},o={};function i(...e){if("number"==typeof e)return s(e);let t="";for(let n=0;n<e.length;n+=1)t+=s(e[n]);return t}function s(e){let t="";e<0?e=-e<<1|1:e<<=1;do{let n=31&e;(e>>>=5)>0&&(n|=32),t+=o[n]}while(e>0);return t}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(function(e,t){r[e]=t,o[t]=e})},925:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(465);const __webpack_exports__Lilact=__webpack_exports__.I,__webpack_exports__default=__webpack_exports__.A;export{__webpack_exports__Lilact as Lilact,__webpack_exports__default as default};
63
+ //# sourceMappingURL=lilact.production.min.js.map
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2022 Lea Verou, Jeroen Ooms
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ !function(t){var n=t.util.clone(t.languages.javascript),e="(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";function a(t,n){return t=t.replace(/<S>/g,(function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"})).replace(/<BRACES>/g,(function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"})).replace(/<SPREAD>/g,(function(){return e})),RegExp(t,n)}e=a(e).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a("</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a("<SPREAD>"),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a("=<BRACES>"),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var s=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(s).join(""):""},g=function(n){for(var e=[],a=0;a<n.length;a++){var o=n[a],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?e.length>0&&e[e.length-1].tagName===s(o.content[0].content[1])&&e.pop():"/>"===o.content[o.content.length-1].content||e.push({tagName:s(o.content[0].content[1]),openedBraces:0}):e.length>0&&"punctuation"===o.type&&"{"===o.content?e[e.length-1].openedBraces++:e.length>0&&e[e.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?e[e.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&e.length>0&&0===e[e.length-1].openedBraces){var r=s(o);a<n.length-1&&("string"==typeof n[a+1]||"plain-text"===n[a+1].type)&&(r+=s(n[a+1]),n.splice(a+1,1)),a>0&&("string"==typeof n[a-1]||"plain-text"===n[a-1].type)&&(r=s(n[a-1])+r,n.splice(a-1,1),a--),n[a]=new t.Token("plain-text",r,null,r)}o.content&&"string"!=typeof o.content&&g(o.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||g(t.tokens)}))}(Prism);
@@ -0,0 +1 @@
1
+ code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Minified by jsDelivr using Terser v5.37.0.
3
+ * Original file: /npm/prismjs@1.29.0/prism.js
4
+ *
5
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
+ */
7
+ var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof s?new s(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var a,s;switch(n=n||{},r.util.type(t)){case"Object":if(s=r.util.objId(t),n[s])return n[s];for(var i in a={},n[s]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return s=r.util.objId(t),n[s]?n[s]:(a=[],n[s]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var r=e.classList;if(r.contains(t))return!0;if(r.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var s=(a=a||r.languages)[e],i={};for(var o in s)if(s.hasOwnProperty(o)){if(o==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(o)||(i[o]=s[o])}var u=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,s){s=s||{};var i=r.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],a||o);var l=t[o],u=r.util.type(l);"Object"!==u||s[i(l)]?"Array"!==u||s[i(l)]||(s[i(l)]=!0,e(l,n,o,s)):(s[i(l)]=!0,e(l,n,null,s))}}},plugins:{},highlightAll:function(e,t){r.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),r.hooks.run("before-all-elements-highlight",a);for(var s,i=0;s=a.elements[i++];)r.highlightElement(s,!0===t,a.callback)},highlightElement:function(t,n,a){var s=r.util.getLanguage(t),i=r.languages[s];r.util.setLanguage(t,s);var o=t.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&r.util.setLanguage(o,s);var l={element:t,language:s,grammar:i,code:t.textContent};function u(e){l.highlightedCode=e,r.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,r.hooks.run("after-highlight",l),r.hooks.run("complete",l),a&&a.call(l.element)}if(r.hooks.run("before-sanity-check",l),(o=l.element.parentElement)&&"pre"===o.nodeName.toLowerCase()&&!o.hasAttribute("tabindex")&&o.setAttribute("tabindex","0"),!l.code)return r.hooks.run("complete",l),void(a&&a.call(l.element));if(r.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var g=new Worker(r.filename);g.onmessage=function(e){u(e.data)},g.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else u(r.highlight(l.code,l.grammar,l.language));else u(r.util.encode(l.code))},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),s.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var a in n)t[a]=n[a];delete t.rest}var r=new l;return u(r,r.head,e),o(e,r,t,r.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(r)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,s=0;a=n[s++];)a(t)}},Token:s};function s(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function i(e,t,n,a){e.lastIndex=t;var r=e.exec(n);if(r&&a&&r[1]){var s=r[1].length;r.index+=s,r[0]=r[0].slice(s)}return r}function o(e,t,n,a,l,c){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var p=n[d];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(c&&c.cause==d+","+m)return;var h=p[m],f=h.inside,v=!!h.lookbehind,b=!!h.greedy,y=h.alias;if(b&&!h.pattern.global){var F=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,F+"g")}for(var x=h.pattern||h,k=a.next,w=l;k!==t.tail&&!(c&&w>=c.reach);w+=k.value.length,k=k.next){var A=k.value;if(t.length>e.length)return;if(!(A instanceof s)){var P,$=1;if(b){if(!(P=i(x,w,e,v))||P.index>=e.length)break;var S=P.index,E=P.index+P[0].length,_=w;for(_+=k.value.length;S>=_;)_+=(k=k.next).value.length;if(w=_-=k.value.length,k.value instanceof s)continue;for(var j=k;j!==t.tail&&(_<E||"string"==typeof j.value);j=j.next)$++,_+=j.value.length;$--,A=e.slice(w,_),P.index-=w}else if(!(P=i(x,0,A,v)))continue;S=P.index;var C=P[0],L=A.slice(0,S),z=A.slice(S+C.length),O=w+A.length;c&&O>c.reach&&(c.reach=O);var T=k.prev;if(L&&(T=u(t,T,L),w+=L.length),g(t,T,$),k=u(t,T,new s(d,f?r.tokenize(C,f):C,y,C)),z&&u(t,k,z),$>1){var M={cause:d+","+m,reach:O};o(e,t,n,k.prev,w,M),c&&M.reach>c.reach&&(c.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}function g(e,t,n){for(var a=t.next,r=0;r<n&&a!==e.tail;r++)a=a.next;t.next=a,a.prev=t,e.length-=r}if(e.Prism=r,s.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var s={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(s.classes,i):s.classes.push(i)),r.hooks.run("wrap",s);var o="";for(var l in s.attributes)o+=" "+l+'="'+(s.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'"'+o+">"+s.content+"</"+s.tag+">"},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,s=n.code,i=n.immediateClose;e.postMessage(r.highlight(s,r.languages[a],a)),i&&e.close()}),!1),r):r;var c=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(c&&(r.filename=c.src,c.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var p=document.readyState;"loading"===p||"interactive"===p&&c&&c.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}(_self);
8
+ /**
9
+ * Prism: Lightweight, robust, elegant syntax highlighting
10
+ *
11
+ * @license MIT <https://opensource.org/licenses/MIT>
12
+ * @author Lea Verou <https://lea.verou.me>
13
+ * @namespace
14
+ * @public
15
+ */"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(){if(void 0!==Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",a="loaded",r="pre[data-src]:not(["+t+'="'+a+'"]):not(['+t+'="'+n+'"])';Prism.hooks.add("before-highlightall",(function(e){e.selector+=", "+r})),Prism.hooks.add("before-sanity-check",(function(s){var i=s.element;if(i.matches(r)){s.code="",i.setAttribute(t,n);var o=i.appendChild(document.createElement("CODE"));o.textContent="Loading…";var l=i.getAttribute("data-src"),u=s.language;if("none"===u){var g=(/\.(\w+)$/.exec(l)||[,"none"])[1];u=e[g]||g}Prism.util.setLanguage(o,u),Prism.util.setLanguage(i,u);var c=Prism.plugins.autoloader;c&&c.loadLanguages(u),function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4==a.readyState&&(a.status<400&&a.responseText?t(a.responseText):a.status>=400?n("✖ Error "+a.status+" while fetching file: "+a.statusText):n("✖ Error: File does not exist or is empty"))},a.send(null)}(l,(function(e){i.setAttribute(t,a);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),a=t[2],r=t[3];return a?r?[n,Number(r)]:[n,void 0]:[n,n]}}(i.getAttribute("data-range"));if(n){var r=e.split(/\r\n?|\n/g),s=n[0],l=null==n[1]?r.length:n[1];s<0&&(s+=r.length),s=Math.max(0,Math.min(s-1,r.length)),l<0&&(l+=r.length),l=Math.max(0,Math.min(l,r.length)),e=r.slice(s,l).join("\n"),i.hasAttribute("data-start")||i.setAttribute("data-start",String(s+1))}o.textContent=e,Prism.highlightElement(o)}),(function(e){i.setAttribute(t,"failed"),o.textContent=e}))}})),Prism.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(r),a=0;t=n[a++];)Prism.highlightElement(t)}};var s=!1;Prism.fileHighlight=function(){s||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),s=!0),Prism.plugins.fileHighlight.highlight.apply(this,arguments)}}}();
16
+ //# sourceMappingURL=/sm/1f55244a569fc0911044b5e4725a97872b6d85b0662a3429a809bb62f713c381.map
@@ -0,0 +1,287 @@
1
+ /*
2
+
3
+ Lilact
4
+ Copyright (C) 2024-2026 Arash Kazemi <contact.arash.kazemi@gmail.com>
5
+ All rights reserved.
6
+
7
+ BSD-2-Clause
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright
13
+ notice, this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright
15
+ notice, this list of conditions and the following disclaimer in the
16
+ documentation and/or other materials provided with the distribution.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
22
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
29
+ */
30
+
31
+ import {isThenable} from "./misc.jsx"
32
+ import {setTimeout, clearTimeout} from "./timers.jsx"
33
+ import {Component} from "./components.jsx"
34
+
35
+ /*
36
+ type SpinnerProps = {
37
+ size?: number; // px
38
+ className?: string;
39
+ style?: React.CSSProperties;
40
+ color?: string; // stroke/fill color
41
+ strokeWidth?: number; // px
42
+ "aria-label"?: string;
43
+ };
44
+ */
45
+
46
+ /**
47
+ * A CSS-only loading spinner component.
48
+ *
49
+ * @param props Component props
50
+ * @param props.size Spinner size in pixels (spinner element width/height). Default: `48`.
51
+ * @param props.className Optional class applied to the outer container.
52
+ * @param props.style Optional inline styles applied to the outer container.
53
+ * @param props.color Color used for the animated segment (defaults to `currentColor`).
54
+ * @param props.strokeWidth Ring/border thickness in pixels. Default: `3`.
55
+ * @param props["aria-label"] Screen-reader label. Default: `"Loading"`.
56
+ * @returns A centered spinner filling its parent container.
57
+ */
58
+
59
+ export function Spinner({
60
+ size = 48,
61
+ className,
62
+ style,
63
+ color = "currentColor",
64
+ strokeWidth = 3,
65
+ "aria-label": ariaLabel = "Loading",
66
+ }) {
67
+ const s = Math.max(1, size)+"px";
68
+
69
+ return (
70
+ <div
71
+ className={className}
72
+ style={{
73
+ width: "100%",
74
+ height: "100%",
75
+ display: "grid",
76
+ placeItems: "center",
77
+ ...style,
78
+ }}
79
+ aria-label={ariaLabel}
80
+ role="status"
81
+ >
82
+ <div
83
+ style={{
84
+ width: s,
85
+ height: s,
86
+ borderRadius: "50%",
87
+ border: `${strokeWidth}px solid rgba(0,0,0,0.15)`,
88
+ borderTopColor: color,
89
+ animation: "ddSpinnerSpin 0.9s linear infinite",
90
+ boxSizing: "border-box",
91
+ }}
92
+ />
93
+ <style>{`
94
+ @keyframes ddSpinnerSpin { to { transform: rotate(360deg); } }
95
+ `}</style>
96
+ </div>
97
+ );
98
+ }
99
+
100
+
101
+
102
+ /**
103
+ * ErrorBoundary component that catches errors in its child component tree and renders a fallback UI.
104
+ *
105
+ * @component
106
+ *
107
+ * @param {Object} props
108
+ * @param {any} props.children - The component subtree to render and monitor for runtime errors.
109
+ * @param {any} props.Fallback - UI to render when an error is caught. Receives two props:
110
+ * - `error` (the exception)
111
+ * - `reset` (function to clear the error)
112
+ * @param {Function} props.onError - Callback invoked on error with arguments `(error, info)`.
113
+ */
114
+
115
+ export class ErrorBoundary extends Component {
116
+
117
+ state = { hasError: false, error: null };
118
+
119
+ static getDerivedStateFromError(error) {
120
+ return { hasError: true, error };
121
+ }
122
+
123
+ componentDidCatch(error, info) {
124
+ const { onError } = this.props;
125
+ try { if (onError) onError(error, info); } catch (e) { console.error("onError threw", e); }
126
+ }
127
+
128
+ reset = () => this.setState({ hasError: false, error: null });
129
+
130
+ render() {
131
+ const { Fallback, children } = this.props;
132
+ if (this.state.hasError) return <Fallback error={this.state.error} reset={this.reset} />;
133
+ return children;
134
+ }
135
+ }
136
+
137
+
138
+ /**
139
+ * Suspense - boundary for asynchronous loading.
140
+ * Shows a fallback UI while descendant thrown promises are pending, and renders real content once resolved.
141
+ *
142
+ * @component Suspense
143
+ *
144
+ * @param {Object} props
145
+ * @param {any} props.fallback - Element shown while descendants are loading.
146
+ * @param {any} props.children - Suspended children.
147
+ * @param {any} props.minDelay - A delay before showing the fallback to prevent flicker.
148
+ * @param {any} props.minShowTime - A minimum time of fallback visibility to prevent flickers.
149
+ */
150
+
151
+ export class Suspense extends Component
152
+ {
153
+
154
+ static defaultProps = { minDelay: 200, minShowTime: 300 };
155
+
156
+ constructor(props) {
157
+
158
+ super(props);
159
+ this.state = { showingFallback: false };
160
+
161
+ this._pending = new Set();
162
+
163
+ this._delayTimer = null;
164
+ this._minShowTimer = null;
165
+ this._fallbackShownAt = 0;
166
+ }
167
+
168
+ static getDerivedStateFromError(error) {
169
+ if (Lilact.isThenable(error)) {
170
+ // signal to call componentDidCatch where we handle the thenable
171
+ return null;
172
+ }
173
+ // non-thenable errors should bubble to nearest Error Boundary
174
+ throw error;
175
+ }
176
+
177
+ componentDidCatch(error) {
178
+ if (!Lilact.isThenable(error)) return;
179
+
180
+ const promise = error;
181
+
182
+ if (this._pending.has(promise)) return;
183
+
184
+ // Add to set of pending promises
185
+ this._pending.add(promise);
186
+
187
+ // Start delay timer only when this is the first pending promise
188
+ if (this._pending.size === 1) {
189
+ const delay = Math.max(0, this.props.minDelay);
190
+ // Ensure no leftover timers
191
+ if (this._delayTimer) {
192
+ Lilact.clearTimeout(this._delayTimer);
193
+ this._delayTimer = null;
194
+ }
195
+ this._delayTimer = Lilact.setTimeout(() => {
196
+ this._delayTimer = null;
197
+ this._fallbackShownAt = Date.now();
198
+ this.setState({ showingFallback: true });
199
+ }, delay);
200
+ }
201
+ }
202
+
203
+ componentWillUnmount() {
204
+ this._clearTimers();
205
+ this._pending.clear();
206
+ }
207
+
208
+ _clearTimers() {
209
+ if (this._delayTimer) {
210
+ Lilact.clearTimeout(this._delayTimer);
211
+ this._delayTimer = null;
212
+ }
213
+ if (this._minShowTimer) {
214
+ Lilact.clearTimeout(this._minShowTimer);
215
+ this._minShowTimer = null;
216
+ }
217
+ }
218
+
219
+ _attachPromise(promise) {
220
+ if (this._pending.has(promise)) return;
221
+ this._pending.add(promise);
222
+
223
+ if (this._pending.size === 1) {
224
+ const delay = Math.max(0, this.props.minDelay);
225
+ if (this._delayTimer) {
226
+ Lilact.clearTimeout(this._delayTimer);
227
+ this._delayTimer = null;
228
+ }
229
+ this._delayTimer = Lilact.setTimeout(() => {
230
+ this._delayTimer = null;
231
+ this._fallbackShownAt = Date.now();
232
+ this.setState({ showingFallback: true });
233
+ }, delay);
234
+ }
235
+
236
+ // use a wrapper so we can remove exactly this promise identity when settled
237
+ const onSettled = () => {
238
+ if (this._pending.has(promise)) {
239
+ this._pending.delete(promise);
240
+ }
241
+ // If none left, hide fallback respecting minShowTime
242
+ if (this._pending.size === 0) {
243
+ // cancel delay if fallback hasn't shown yet
244
+ if (this._delayTimer) {
245
+ Lilact.clearTimeout(this._delayTimer);
246
+ this._delayTimer = null;
247
+ // fallback never shown; just ensure state is not showing
248
+ this.setState({ showingFallback: false });
249
+ return;
250
+ }
251
+
252
+ // If fallback is showing, ensure minShowTime
253
+ const elapsed = Date.now() - (this._fallbackShownAt || 0);
254
+ const remaining = Math.max(0, this.props.minShowTime - elapsed);
255
+
256
+ if (remaining === 0) {
257
+ this.setState({ showingFallback: false });
258
+ } else {
259
+ if (this._minShowTimer) {
260
+ Lilact.clearTimeout(this._minShowTimer);
261
+ this._minShowTimer = null;
262
+ }
263
+ this._minShowTimer = Lilact.setTimeout(() => {
264
+ this._minShowTimer = null;
265
+ this.setState({ showingFallback: false });
266
+ }, remaining);
267
+ }
268
+ }
269
+ };
270
+
271
+ // attach handlers
272
+ promise.then(onSettled, onSettled);
273
+ }
274
+
275
+ componentDidCatch(error, info) {
276
+ if (!Lilact.isThenable(error)) return;
277
+ this._attachPromise(error);
278
+ }
279
+
280
+ render() {
281
+ if (this.state.showingFallback) {
282
+ return <>{this.props.fallback}</>;
283
+ }
284
+ return <>{this.props.children}</>;
285
+ }
286
+ }
287
+