potatejs 0.16.0 → 0.17.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.
package/README.md CHANGED
@@ -173,21 +173,52 @@ export default defineConfig({
173
173
 
174
174
  ```
175
175
 
176
+ #### TEST
176
177
 
177
- ## Idea
178
+ ```bash
179
+ npm install react-select
180
+ npm install react-confetti
181
+ ```
178
182
 
179
- It is inspired by the rendering patterns used on hyperHTML and lit-html.
183
+ ```jsx
184
+ import Potate from 'potatejs'
185
+ import Confetti from 'react-confetti';
186
+ import Select from 'react-select'
187
+
188
+ const options = [
189
+ { value: 'chocolate', label: 'Chocolate' },
190
+ { value: 'strawberry', label: 'Strawberry' },
191
+ { value: 'vanilla', label: 'Vanilla' }
192
+ ]
193
+
194
+ const App = (props) => {
195
+ return (<div>
196
+ <Confetti width={1000} height={1000} />
197
+ <Select options={options} />
198
+ </div>)
199
+ }
180
200
 
181
- It has the same declarative API like React, but instead of working with VDOM, it uses tagged template literals and HTML's template tag for faster rendering and updates.
182
- It divides the HTML to be rendered into static and dynamic parts, and in next render, it has to compare the values of only dynamic parts and apply the changes optimally to the connected DOM.
183
- It's unlike the VDOM which compares the whole last rendered VDOM to the new VDOM (which has both static and dynamic parts) to derive the optimal changes that are required on the actual DOM.
201
+ const root = Potate.createRoot(document.querySelector('#app'))
202
+ root.render(<App/>)
184
203
 
185
- Even though tagged template literals are the key to static and dynamic part separation, the developer has to code on well adopted JSX.
204
+ ```
186
205
 
187
- Using the babel-plugin-brahmos it transforms JSX into tagged template literals which are optimized for render/updates and the output size.
206
+ ## Idea
188
207
 
189
- Consider this example,
208
+ Excerpt from [brahmosjs/brahmos](https://github.com/brahmosjs/brahmos):
190
209
 
210
+ > It is inspired by the rendering patterns used on hyperHTML and lit-html.
211
+ >
212
+ > It has the same declarative API like React, but instead of working with VDOM, it uses tagged template literals and HTML's template tag for faster rendering and updates.
213
+ It divides the HTML to be rendered into static and dynamic parts, and in next render, it has to compare the values of only dynamic parts and apply the changes optimally to the connected DOM.
214
+ It's unlike the VDOM which compares the whole last rendered VDOM to the new VDOM (which has both static and dynamic parts) to derive the optimal changes that are required on the actual DOM.
215
+ >
216
+ > Even though tagged template literals are the key to static and dynamic part separation, the developer has to code on well adopted JSX.
217
+ >
218
+ > Using the babel-plugin-brahmos it transforms JSX into tagged template literals which are optimized for render/updates and the output size.
219
+ >
220
+ > Consider this example,
221
+ >
191
222
  ```jsx
192
223
  class TodoList extends Component {
193
224
  state = { todos: [], text: '' };
@@ -217,9 +248,9 @@ class TodoList extends Component {
217
248
  }
218
249
  }
219
250
  ```
220
-
221
- It will be transformed to
222
-
251
+ >
252
+ > It will be transformed to
253
+ >
223
254
  ```js
224
255
  class TodoList extends Component {
225
256
  state = { todos: [], text: '' };
@@ -251,13 +282,13 @@ class TodoList extends Component {
251
282
  }
252
283
  }
253
284
  ```
254
-
255
- With the tagged template literal we get a clear separating of the static and dynamic part. And on updates it needs to apply changes only on the changed dynamic parts.
256
-
257
- Tagged template literals also have a unique property where the reference of the literal part (array of static strings) remain the same for every call of that tag with a given template.
285
+ >
286
+ > With the tagged template literal we get a clear separating of the static and dynamic part. And on updates it needs to apply changes only on the changed dynamic parts.
287
+ >
288
+ > Tagged template literals also have a unique property where the reference of the literal part (array of static strings) remain the same for every call of that tag with a given template.
258
289
  Taking advantage of this behavior Brahmos uses literal parts as a cache key to keep the intermediate states to avoid the work done to process a template literal again.
259
-
260
- Tagged template is natively supported by the browser, unlike the React's JSX which has to be transformed to React.createElement calls. So the output generated to run Brahmos has a smaller footprint than the output generated for the react.
290
+ >
291
+ > Tagged template is natively supported by the browser, unlike the React's JSX which has to be transformed to React.createElement calls. So the output generated to run Brahmos has a smaller footprint than the output generated for the react.
261
292
  For the above example, the Brahmos output is 685 bytes, compared to 824 bytes from the React output. More the static part of an HTML, greater the difference will be.
262
293
 
263
294
 
@@ -286,11 +317,11 @@ For the above example, the Brahmos output is 685 bytes, compared to 824 bytes fr
286
317
  - [x] ⭐⭐⭐ [watch(resource) API](docs/API.md)
287
318
  - [x] ⭐ React 19 style root management
288
319
  - [x] Allow using class instead of className
320
+ - [x] ⭐ [`<Context>` as a provider](https://react.dev/blog/2024/12/05/react-19#context-as-a-provider)
289
321
  - [x] ⭐ [ref as a prop](https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop)
290
322
  - [ ] ⭐ `use(context)` API
291
323
  - [ ] ⭐ [use(store) API](https://react.dev/blog/2025/04/23/react-labs-view-transitions-activity-and-more#concurrent-stores)
292
324
  - [ ] ⭐ [Cleanup functions for refs](https://react.dev/blog/2024/12/05/react-19#cleanup-functions-for-refs)
293
- - [ ] ⭐ [`<Context>` as a provider](https://react.dev/blog/2024/12/05/react-19#context-as-a-provider)
294
325
  - [ ] ⭐ [startTransition(action) for POST request](https://react.dev/blog/2024/12/05/react-19#actions)
295
326
  - [ ] ⭐ [useEffectEvent hook](https://react.dev/reference/react/useEffectEvent)
296
327
  - [ ] ⭐ `useImperativeHandle` hook
@@ -13078,6 +13078,12 @@ var t = {
13078
13078
  },
13079
13079
  isJSXSpreadAttribute(node) {
13080
13080
  return node && node.type === "JSXSpreadAttribute";
13081
+ },
13082
+ isJSXIdentifier(node) {
13083
+ return node && node.type === "JSXIdentifier";
13084
+ },
13085
+ isJSXMemberExpression(node) {
13086
+ return node && node.type === "JSXMemberExpression";
13081
13087
  }
13082
13088
  };
13083
13089
  function createPath(node, parentPath = null) {
@@ -13251,15 +13257,9 @@ function isEmptyLiteralWrap(strings) {
13251
13257
  function getPropValue(value) {
13252
13258
  return t.isJSXExpressionContainer(value) ? value.expression : value;
13253
13259
  }
13254
- function getAttributeName(nameNode) {
13255
- if (nameNode.type === "JSXNamespacedName") {
13256
- return `${nameNode.namespace.name}:${nameNode.name.name}`;
13257
- }
13258
- return nameNode.name;
13259
- }
13260
13260
  function createAttributeProperty(name, value) {
13261
13261
  value = value || t.booleanLiteral(true);
13262
- const attrNameStr = getAttributeName(name);
13262
+ const attrNameStr = name.name;
13263
13263
  const propName = attrNameStr.match("-|:") ? t.stringLiteral(attrNameStr) : t.identifier(attrNameStr);
13264
13264
  const propValue = getPropValue(value);
13265
13265
  const isShorthand = propName.type === "Identifier" && propValue.type === "Identifier" && propName.name === propValue.name;
@@ -13452,18 +13452,14 @@ function isSvgHasDynamicPart(part) {
13452
13452
  }
13453
13453
 
13454
13454
  // src/plugin/taggedTemplate.js
13455
- function jsxNameToExpression(node) {
13456
- if (node.type === "JSXIdentifier") {
13457
- return { type: "Identifier", name: node.name };
13458
- } else if (node.type === "JSXMemberExpression") {
13459
- return {
13460
- type: "MemberExpression",
13461
- object: jsxNameToExpression(node.object),
13462
- property: jsxNameToExpression(node.property),
13463
- computed: false
13464
- };
13455
+ function jsxToObject(node) {
13456
+ if (t.isJSXIdentifier(node)) {
13457
+ return t.identifier(node.name);
13458
+ } else if (t.isJSXMemberExpression(node)) {
13459
+ const objectNode = jsxToObject(node.object);
13460
+ const property = jsxToObject(node.property);
13461
+ return t.memberExpression(objectNode, property);
13465
13462
  }
13466
- throw new Error(`Unsupported JSX name type: ${node.type}`);
13467
13463
  }
13468
13464
  function needsToBeJSXCall(path) {
13469
13465
  const { node } = path;
@@ -13544,12 +13540,11 @@ function getLiteralParts(rootPath) {
13544
13540
  lastExpression = pushAttributeToExpressions(attr.argument, lastExpression, createPath(attr, path));
13545
13541
  } else {
13546
13542
  const { name, value } = attr;
13547
- const attrNameStr = getAttributeName(name);
13548
- if (needsToBeExpression(tagName, attrNameStr) || value && value.type === "JSXExpressionContainer") {
13543
+ if (needsToBeExpression(tagName, name.name) || value && value.type === "JSXExpressionContainer") {
13549
13544
  const expr = createAttributeExpression(name, value);
13550
13545
  lastExpression = pushAttributeToExpressions(expr, lastExpression, createPath(attr, path));
13551
13546
  } else {
13552
- const attrName = PROPERTY_ATTRIBUTE_MAP[attrNameStr] || attrNameStr;
13547
+ const attrName = PROPERTY_ATTRIBUTE_MAP[name.name] || name.name;
13553
13548
  let attrString = ` ${attrName}`;
13554
13549
  if (value) {
13555
13550
  const attrValue = value.value;
@@ -13566,38 +13561,36 @@ function getLiteralParts(rootPath) {
13566
13561
  path.get("children").forEach(recursePath);
13567
13562
  if (!SELF_CLOSING_TAGS.includes(tagName)) stringPart.push(`</${tagName}>`);
13568
13563
  } else {
13564
+ const componentName = isHTMLElement(nameNode.name) ? t.stringLiteral(nameNode.name) : jsxToObject(nameNode);
13569
13565
  const propsProperties = [];
13570
13566
  let keyValue = null;
13571
13567
  openingElement.attributes.forEach((attr) => {
13572
13568
  if (attr.type === "JSXAttribute") {
13573
- const attrName = attr.name.name;
13574
- const valNode = getAttrValue(attr.value);
13575
- if (attrName === "key") {
13576
- keyValue = valNode;
13569
+ if (attr.name.name === "key") {
13570
+ keyValue = getAttrValue(attr.value);
13577
13571
  } else {
13578
- propsProperties.push({ type: "Property", key: { type: "Identifier", name: attrName }, value: valNode, kind: "init" });
13572
+ propsProperties.push(createAttributeProperty(attr.name, attr.value));
13579
13573
  }
13580
13574
  } else if (attr.type === "JSXSpreadAttribute") {
13581
- propsProperties.push({ type: "SpreadElement", argument: attr.argument });
13575
+ propsProperties.push(t.spreadElement(attr.argument));
13582
13576
  }
13583
13577
  });
13578
+ const jsxArguments = [componentName, t.objectExpression(propsProperties)];
13584
13579
  const childrenPaths = path.get("children");
13585
13580
  if (childrenPaths && childrenPaths.length) {
13586
- propsProperties.push({
13587
- type: "Property",
13588
- key: { type: "Identifier", name: "children" },
13589
- value: transformToAstNode(getTaggedTemplate(childrenPaths)),
13590
- kind: "init"
13591
- });
13592
- }
13593
- pushToExpressions({
13594
- type: "CallExpression",
13595
- callee: {
13596
- type: "Identifier",
13597
- name: "_brahmosJSX"
13598
- },
13599
- arguments: keyValue ? [jsxNameToExpression(nameNode), { type: "ObjectExpression", properties: propsProperties }, keyValue] : [jsxNameToExpression(nameNode), { type: "ObjectExpression", properties: propsProperties }]
13600
- }, path, false);
13581
+ propsProperties.push(
13582
+ createAttributeProperty(
13583
+ t.identifier("children"),
13584
+ transformToAstNode(getTaggedTemplate(childrenPaths))
13585
+ )
13586
+ );
13587
+ }
13588
+ if (keyValue) {
13589
+ jsxArguments.push(keyValue);
13590
+ }
13591
+ const brahmosJSXFunction = t.identifier("_brahmosJSX");
13592
+ const expression = t.callExpression(brahmosJSXFunction, jsxArguments);
13593
+ pushToExpressions(expression, path, false);
13601
13594
  }
13602
13595
  } else if (node.type === "JSXFragment") {
13603
13596
  path.get("children").forEach(recursePath);
@@ -13075,6 +13075,12 @@ var t = {
13075
13075
  },
13076
13076
  isJSXSpreadAttribute(node) {
13077
13077
  return node && node.type === "JSXSpreadAttribute";
13078
+ },
13079
+ isJSXIdentifier(node) {
13080
+ return node && node.type === "JSXIdentifier";
13081
+ },
13082
+ isJSXMemberExpression(node) {
13083
+ return node && node.type === "JSXMemberExpression";
13078
13084
  }
13079
13085
  };
13080
13086
  function createPath(node, parentPath = null) {
@@ -13248,15 +13254,9 @@ function isEmptyLiteralWrap(strings) {
13248
13254
  function getPropValue(value) {
13249
13255
  return t.isJSXExpressionContainer(value) ? value.expression : value;
13250
13256
  }
13251
- function getAttributeName(nameNode) {
13252
- if (nameNode.type === "JSXNamespacedName") {
13253
- return `${nameNode.namespace.name}:${nameNode.name.name}`;
13254
- }
13255
- return nameNode.name;
13256
- }
13257
13257
  function createAttributeProperty(name, value) {
13258
13258
  value = value || t.booleanLiteral(true);
13259
- const attrNameStr = getAttributeName(name);
13259
+ const attrNameStr = name.name;
13260
13260
  const propName = attrNameStr.match("-|:") ? t.stringLiteral(attrNameStr) : t.identifier(attrNameStr);
13261
13261
  const propValue = getPropValue(value);
13262
13262
  const isShorthand = propName.type === "Identifier" && propValue.type === "Identifier" && propName.name === propValue.name;
@@ -13449,18 +13449,14 @@ function isSvgHasDynamicPart(part) {
13449
13449
  }
13450
13450
 
13451
13451
  // src/plugin/taggedTemplate.js
13452
- function jsxNameToExpression(node) {
13453
- if (node.type === "JSXIdentifier") {
13454
- return { type: "Identifier", name: node.name };
13455
- } else if (node.type === "JSXMemberExpression") {
13456
- return {
13457
- type: "MemberExpression",
13458
- object: jsxNameToExpression(node.object),
13459
- property: jsxNameToExpression(node.property),
13460
- computed: false
13461
- };
13452
+ function jsxToObject(node) {
13453
+ if (t.isJSXIdentifier(node)) {
13454
+ return t.identifier(node.name);
13455
+ } else if (t.isJSXMemberExpression(node)) {
13456
+ const objectNode = jsxToObject(node.object);
13457
+ const property = jsxToObject(node.property);
13458
+ return t.memberExpression(objectNode, property);
13462
13459
  }
13463
- throw new Error(`Unsupported JSX name type: ${node.type}`);
13464
13460
  }
13465
13461
  function needsToBeJSXCall(path) {
13466
13462
  const { node } = path;
@@ -13541,12 +13537,11 @@ function getLiteralParts(rootPath) {
13541
13537
  lastExpression = pushAttributeToExpressions(attr.argument, lastExpression, createPath(attr, path));
13542
13538
  } else {
13543
13539
  const { name, value } = attr;
13544
- const attrNameStr = getAttributeName(name);
13545
- if (needsToBeExpression(tagName, attrNameStr) || value && value.type === "JSXExpressionContainer") {
13540
+ if (needsToBeExpression(tagName, name.name) || value && value.type === "JSXExpressionContainer") {
13546
13541
  const expr = createAttributeExpression(name, value);
13547
13542
  lastExpression = pushAttributeToExpressions(expr, lastExpression, createPath(attr, path));
13548
13543
  } else {
13549
- const attrName = PROPERTY_ATTRIBUTE_MAP[attrNameStr] || attrNameStr;
13544
+ const attrName = PROPERTY_ATTRIBUTE_MAP[name.name] || name.name;
13550
13545
  let attrString = ` ${attrName}`;
13551
13546
  if (value) {
13552
13547
  const attrValue = value.value;
@@ -13563,38 +13558,36 @@ function getLiteralParts(rootPath) {
13563
13558
  path.get("children").forEach(recursePath);
13564
13559
  if (!SELF_CLOSING_TAGS.includes(tagName)) stringPart.push(`</${tagName}>`);
13565
13560
  } else {
13561
+ const componentName = isHTMLElement(nameNode.name) ? t.stringLiteral(nameNode.name) : jsxToObject(nameNode);
13566
13562
  const propsProperties = [];
13567
13563
  let keyValue = null;
13568
13564
  openingElement.attributes.forEach((attr) => {
13569
13565
  if (attr.type === "JSXAttribute") {
13570
- const attrName = attr.name.name;
13571
- const valNode = getAttrValue(attr.value);
13572
- if (attrName === "key") {
13573
- keyValue = valNode;
13566
+ if (attr.name.name === "key") {
13567
+ keyValue = getAttrValue(attr.value);
13574
13568
  } else {
13575
- propsProperties.push({ type: "Property", key: { type: "Identifier", name: attrName }, value: valNode, kind: "init" });
13569
+ propsProperties.push(createAttributeProperty(attr.name, attr.value));
13576
13570
  }
13577
13571
  } else if (attr.type === "JSXSpreadAttribute") {
13578
- propsProperties.push({ type: "SpreadElement", argument: attr.argument });
13572
+ propsProperties.push(t.spreadElement(attr.argument));
13579
13573
  }
13580
13574
  });
13575
+ const jsxArguments = [componentName, t.objectExpression(propsProperties)];
13581
13576
  const childrenPaths = path.get("children");
13582
13577
  if (childrenPaths && childrenPaths.length) {
13583
- propsProperties.push({
13584
- type: "Property",
13585
- key: { type: "Identifier", name: "children" },
13586
- value: transformToAstNode(getTaggedTemplate(childrenPaths)),
13587
- kind: "init"
13588
- });
13589
- }
13590
- pushToExpressions({
13591
- type: "CallExpression",
13592
- callee: {
13593
- type: "Identifier",
13594
- name: "_brahmosJSX"
13595
- },
13596
- arguments: keyValue ? [jsxNameToExpression(nameNode), { type: "ObjectExpression", properties: propsProperties }, keyValue] : [jsxNameToExpression(nameNode), { type: "ObjectExpression", properties: propsProperties }]
13597
- }, path, false);
13578
+ propsProperties.push(
13579
+ createAttributeProperty(
13580
+ t.identifier("children"),
13581
+ transformToAstNode(getTaggedTemplate(childrenPaths))
13582
+ )
13583
+ );
13584
+ }
13585
+ if (keyValue) {
13586
+ jsxArguments.push(keyValue);
13587
+ }
13588
+ const brahmosJSXFunction = t.identifier("_brahmosJSX");
13589
+ const expression = t.callExpression(brahmosJSXFunction, jsxArguments);
13590
+ pushToExpressions(expression, path, false);
13598
13591
  }
13599
13592
  } else if (node.type === "JSXFragment") {
13600
13593
  path.get("children").forEach(recursePath);
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
- var Do=Object.defineProperty;var Po=(e,t)=>{for(var n in t)Do(e,n,{get:t[n],enumerable:!0})};var Zt={};Po(Zt,{Children:()=>_o,Component:()=>R,Fragment:()=>Mr,PureComponent:()=>ie,StrictMode:()=>vr,Suspense:()=>De,SuspenseList:()=>V,cloneElement:()=>Xt,createContext:()=>xt,createElement:()=>uo,createPortal:()=>yo,createRef:()=>Zn,createRoot:()=>xo,forwardRef:()=>st,html:()=>Eo,isValidElement:()=>Ao,jsx:()=>Lr,jsxDev:()=>Hr,jsxs:()=>kr,lazy:()=>To,memo:()=>qt,render:()=>Wt,startTransition:()=>xe,unmountComponentAtNode:()=>go,unstable_batchedUpdates:()=>wr,unstable_deferredUpdates:()=>Je,unstable_syncUpdates:()=>fe,use:()=>Fo,useCallback:()=>Ln,useContext:()=>Bn,useDebugValue:()=>Hn,useDeferredValue:()=>Kn,useEffect:()=>It,useLayoutEffect:()=>Dt,useMemo:()=>bt,useReducer:()=>wn,useRef:()=>Mn,useState:()=>Rt,useTransition:()=>Yn,watch:()=>pt});var we=Symbol.for("react.element"),rn=Symbol.for("react.forward_ref"),sn="{{brahmos}}",an={key:1,ref:1},cn={className:"class",htmlFor:"for",acceptCharset:"accept-charset",httpEquiv:"http-equiv",tabIndex:"tabindex"},dt={doubleclick:"dblclick"},pn=typeof Symbol!="undefined"?/fil|che|rad/i:/fil|che|ra/i,ln=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,un=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,ft="http://www.w3.org/1999/xlink",dn=100,d="__brahmosData",Le="__brahmosLastArrayDom",ke="__rootFiber",S="sync",y="deferred",he="js",O="immediate_action",C="transition",He=0,mt=1,x=2,fn="initial",X="start",ae="suspended",Ee="resolved",Tt="completed",K="timedOut";function mn(e){return e[0]==="o"&&e[1]==="n"}function Be(e){let t=ln.test(e)?e.replace(/[A-Z0-9]/,"-$&").toLowerCase():e;return cn[e]||t}function ht(e){return e.nodeName.toLowerCase()}function Tn(e,t){return t&&(e=e.replace(/Capture$/,"")),e.replace("on","").toLowerCase()}function q(e){return e==null}var Oo=0;function j(){return Oo++}function hn(){return Date.now()}function Ye(e){e.__brahmosData={events:{}}}function ce(e,t){if(!("key"in e||"ref"in e&&!t))return e;let n={},o;for(o in e)o!=="key"&&(o!=="ref"||t)&&(n[o]=e[o]);return n}function ye(e,t){let n=Object.keys(e);for(let o=0,r=n.length;o<r;o++){let s=n[o],a=e[s];t(s,a)}}function ge(e){Array.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--)e[t].remove()}function $(e,t){return t=t||0,Array.prototype.slice.call(e,t)}function Uo(e){let t=e instanceof NodeList;if(e instanceof Node)return e;if(Array.isArray(e)||t){let n=document.createDocumentFragment(),o=0;for(;e[o];)n.appendChild(e[o]),t||(o+=1);return n}return document.createTextNode(e)}function Ke(e,t,n){let o=Uo(n),r;return Array.isArray(n)?r=n:o instanceof DocumentFragment?r=$(o.childNodes):r=n,e.insertBefore(o,t),r}function pe(e,t){return t?t.nextSibling:e.firstChild}function w(e,t,n){if(e[t])return e[t].apply(e,n)}function En(e,t){let n=t===0?e.firstChild:e.childNodes[t],o=document.createTextNode("");return e.insertBefore(o,n),o}var je=Promise.resolve();function Ce(e){return je.then(e)}function Se(){return j()+"-"+Math.random()*1e6}function yn(e){let t="pending",n,o=e.then(r=>{t="success",n=r},r=>{t="error",n=r});return{read(){if(t==="pending")throw o;if(t==="error")throw n;if(t==="success")return n}}}function $e(e){return e[d].mounted}function Et(e){return e.displayName||e.name}function le({children:e}){return e}var ze={transitionId:"",tryCount:0,transitionState:K},U={transitionId:Se(),tryCount:0,transitionState:K};function vo(e){let{transitionState:t}=e;return t===X||t===Ee||t===K}function Ne(e){let{transitionState:t}=e;return t===Tt||t===K}function gn(e){let{transitionState:t}=e;t!==K&&t!==ae&&(e.isPending?(e.clearTimeout(),e.updatePendingState(!1,C)):e.transitionState=Tt)}function Q(e,t){return t=t||ze,e.root.currentTransition||t}function yt(e){let{pendingTransitions:t}=e;return t.find(vo)}var gt=Symbol.for("tag"),Z=Symbol.for("tag-element"),D=Symbol.for("class-component"),Ct=Symbol.for("functional-component"),z=Symbol.for("attribute");function G({nodeType:e}){return e===Z}function J({nodeType:e}){return e===gt}function B(e){return G(e)||J(e)}function A({nodeType:e}){return e===D||e===Ct}function Y(e){return typeof e=="string"||typeof e=="number"}function Ge(e){return!(q(e)||typeof e=="boolean")}function St(e,t){let n=e&&e.key;return n===void 0?t:n}function Ve(e,t,n){return{$$typeof:we,nodeType:null,key:n,ref:null,portalContainer:null,type:null,props:e,values:t,template:null}}var Sn;function Nt(e){Sn=e}function N(){return Sn}function _e(e){return e===y?"lastDeferredCompleteTime":"lastCompleteTime"}function ee(e){return e===y?"deferredUpdateTime":"updateTime"}function L(e,t){let n=ee(t),o=j();for(;e;)e[n]=o,e=e.parent}function Nn(e,t,n){t===n?n.child=e:t.sibling=e,e.parent=n}function F(e,t){e.hasUncommittedEffect=t,e.root.hasUncommittedEffect=!0}function We(e,t,n,o){let{root:r,node:s,part:a,nodeInstance:i,child:c}=e,p=ee(r.updateType);return t?(t.node=s,t.part=a,t.createdAt=j()):(t=ue(r,s,a),Mo(e,t)),e.shouldTearDown=!1,t.nodeInstance=i,t.child=c,t[p]=o[p],Nn(t,n,o),t}function _n(e,t){return e===t?e.child:e.sibling}function te(e){let{child:t,root:n}=e;if(n.updateType===S)return;let o;for(;t;){let{alternate:r}=t;o=We(t,r,o||e,e),t=t.sibling}}function Xe(e){let t=[];return{updateType:y,updateSource:he,cancelSchedule:null,domNode:e,forcedUpdateWith:null,current:null,wip:null,child:null,retryFiber:null,currentTransition:null,hasUncommittedEffect:!1,pendingTransitions:[],tearDownFibers:[],postCommitEffects:[],batchUpdates:{},lastDeferredCompleteTime:0,lastCompleteTime:0,deferredUpdateTime:0,updateTime:0,afterRender(n){t.includes(n)||t.push(n)},callRenderCallbacks(){for(let n=0,o=t.length;n<o;n++)t[n]()},resetRenderCallbacks(){t=[]}}}function ue(e,t,n){return t&&t.portalContainer&&(n.parentNode=t.portalContainer),{node:t,nodeInstance:null,root:e,parent:null,child:null,sibling:null,part:n,alternate:null,context:null,childFiberError:null,isSvgPart:!1,deferredUpdateTime:0,updateTime:0,processedTime:0,createdAt:j(),shouldTearDown:!1,hasUncommittedEffect:He}}function Mo(e,t){e&&(e.alternate=t),t.alternate=e}function ne(e,t,n,o,r){let{root:s}=o,a=ee(s.updateType),i;return n&&!q(n.node)&&!q(e)&&wo(e,n.node)?(i=We(n,n.alternate,o,r),i.node=e,i.part=t):(i=ue(s,e,t),n&&oe(n)),Nn(i,o,r),i.processedTime=0,i[a]=r[a],i.context=r.context,i.isSvgPart=r.isSvgPart,i}function wo(e,t){return Y(e)&&Y(t)||e.nodeType===z||Array.isArray(e)&&Array.isArray(t)||(A(e)||G(e))&&e.type===t.type||J(e)&&e.template===t.template}function Lo(e,t,n){return e&&e[n]>=t}function Cn(e,t,n){if(e){for(;e&&!Lo(e,t,n);)e=e.sibling;return e}}function An(e,t,n,o){let r=Cn(e.child,n,o);if(r)return r;let s;for(;!(s=Cn(e.sibling,n,o));)if(e=e.parent,e===t)return e;return s}function v(e){return e[d].fiber}function xn(e){let{root:t,child:n}=e;n&&n.createdAt>t.lastCompleteTime&&(e.child=n.alternate)}function oe(e){e.shouldTearDown=!0,e.root.tearDownFibers.push(e)}var Qe=he,qe=ze;function re(){return Qe}function _t(){return qe}function b(e,t){Qe=e,t(),Qe=he}function se(e,t){let n=qe;qe=e,b(C,t),qe=n}function Fn(e){return e.updateSource===O}function ko(){return Qe===C}function Ae(){return ko()?y:S}function Ze(e){return e===y?"pendingDeferredUpdates":"pendingSyncUpdates"}function de(e){let{root:{updateType:t},nodeInstance:n}=e,o=n[d],r=Ze(t);if(t===S)return o[r];let s=Q(e,null).transitionId;return o[r].filter(a=>a.transitionId===s)}function Je(e){se(U,e)}function fe(e){b(O,e)}function Ho(e,t){let{root:n}=e;for(;e.nodeInstance!==t;)if(e=e.parent,e===n)return null;return e}function et(e,t){let n,o,r=!0,s=e[d],a=N();if(a){let{renderCount:p}=s;if(p>50)throw new Error("Too many rerender. Check your setState call, this may cause an infinite loop.");let{root:l}=a;l.retryFiber=Ho(a,e),n=l.updateType,o=l.currentTransition||ze,r=!1}else s.renderCount=0,n=Ae(),o=_t();let i=Ze(n),c=t(o.transitionId);return s[i].push(c),r}var Bo=1;function At(e){return function(t){let n=v(e),{updateType:o}=n.root;e.context!==t&&(e[d].isDirty=!0,L(n,o))}}function xt(e){let t=`cC${Bo++}`;class n extends R{constructor(a){super(a),this.subs=[]}shouldComponentUpdate(a){let{value:i}=this.props;return i!==a.value&&this.subs.forEach(c=>c(a.value)),!0}sub(a){let{subs:i}=this,c=At(a);i.push(c);let{componentWillUnmount:p}=a;a.componentWillUnmount=()=>{i.splice(i.indexOf(c),1),p&&p()}}render(){return this.props.children}}n.__ccId=t;class o extends R{render(){return this.props.children(this.context)}}let r={id:t,defaultValue:e,Provider:n,Consumer:o};return o.contextType=r,r}function bn(){return N().nodeInstance}function In(e){let{renderCount:t}=e[d];e.deferredHooks=e.syncHooks.map((n,o)=>Array.isArray(n)?[...n]:n.transitionId?n:n.hasOwnProperty("current")&&t>1?e.deferredHooks[o]||n:{...n})}function Dn(e,t){let{syncHooks:n,deferredHooks:o}=t;return e===S?n:o}function tt(e){let{nodeInstance:t,root:{updateType:n}}=e;return Dn(n,t)}function Rn(e,t,n){return e===y&&!n.deferredHooks.length&&In(n),Dn(e,n)[t]}function Pn(e,t){if(!e||!t||e.length!==t.length)return!0;for(let n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!0;return!1}function Yo(e,t,n){(re()===O||!Object.is(t,n))&&M(e)}function Ft(e){return!1}function On(e){return e}function nt(e,t,n){let o=N(),{nodeInstance:r}=o,{pointer:s}=r,a=tt(o),i=a[s];return(!i||t(i))&&(i=e(),a[s]=i),r.pointer+=1,n(i)}function Un(){let e=N(),{nodeInstance:t,root:{updateType:n}}=e;t.pointer=0,n===y&&In(t),de(e).forEach(r=>r.updater())}function vn(e,t){let n=bn(),{pointer:o}=n;return nt(()=>(typeof e=="function"&&(e=e()),[e,s=>{let a=Ae(),i=Rn(S,o,n),c=i[0],p=t(s,c);et(n,f=>({transitionId:f,updater(){let m=Rn(a,o,n);m[0]=t(s,i[0])}}))&&Yo(n,p,c)}]),Ft,On)}function Rt(e){return vn(e,(t,n)=>(typeof t=="function"&&(t=t(n)),t))}function Mn(e){return nt(()=>({current:e}),Ft,On)}function wn(e,t,n){return vn(n?()=>n(t):t,(r,s)=>e(s,r))}function bt(e,t){return nt(()=>({value:e(),dependencies:t}),s=>Pn(t,s.dependencies),s=>s.value)}function Ln(e,t){return bt(()=>e,t)}function kn(e,t){let n=N(),{nodeInstance:o}=n,{pointer:r}=o,s=tt(n),a=s[r]||{animationFrame:null,cleanEffect:null},i={...a,isDependenciesChanged:Pn(t,a.dependencies),dependencies:t,effect(){i.isDependenciesChanged&&e(i)}};s[r]=i,o.pointer+=1}function It(e,t){kn(n=>{cancelAnimationFrame(n.animationFrame),n.animationFrame=requestAnimationFrame(()=>{setTimeout(()=>{n.cleanEffect=e()})})},t)}function Dt(e,t){kn(n=>{n.cleanEffect=e()},t)}function Hn(){}function Bn(e){let{nodeInstance:t,context:n}=N(),{id:o,defaultValue:r}=e,s=n[o],a=s?s.props.value:r;return Dt(()=>{if(s){let{subs:i}=s,c=At(t);return i.push(c),()=>{i.splice(i.indexOf(c),1)}}},[]),t.context=a,a}function xe(e){let t={transitionId:Se(),transitionState:X,pendingSuspense:[],tryCount:0};se(t,e)}function Yn(){let e=bn();return nt(()=>{let t={transitionId:Se(),tryCount:0,isPending:!1,transitionTimeout:null,pendingSuspense:[],transitionState:fn,clearTimeout(){clearTimeout(t.transitionTimeout)},updatePendingState(n,o){t.isPending=n,e[d].isDirty=!0;let r=()=>{M(e)};o===C?se(t,r):b(o,r)},startTransition(n){let o=re(),{root:r}=v(e);t.transitionState=X,t.pendingSuspense=[],t.clearTimeout(),se(t,n),r.lastDeferredCompleteTime<r.deferredUpdateTime&&t.updatePendingState(!0,o)}};return t},Ft,({startTransition:t,isPending:n})=>[n,t])}function Kn(e,t){let[n,o]=Rt(t!==void 0?t:e);return It(()=>{xe(()=>{o(e)})},[e]),n}function jn(e){let t=tt(e);for(let n=0,o=t.length;n<o;n++){let r=t[n];r.effect&&r.effect()}}function ot(e,t){let n=tt(e);for(let o=0,r=n.length;o<r;o++){let s=n[o];s.cleanEffect&&(s.isDependenciesChanged||t)&&s.cleanEffect(),s.clearTimeout&&t&&s.clearTimeout()}}function Pt(e){return{syncHooks:[],deferredHooks:[],context:void 0,pointer:0,__render(t){Un();let n=e(t);return this[d].nodes=n,n},__unmount:new Map,[d]:{pendingSyncUpdates:[],pendingDeferredUpdates:[],fiber:null,nodes:null,isDirty:!1,mounted:!1,renderCount:0}}}function Ko(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++)if(!hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var Ot=Ko;function jo(e){let{root:t}=e;for(;(e=e.parent)&&!(e.nodeInstance instanceof R&&(e.nodeInstance.componentDidCatch||e.node.type.getDerivedStateFromError));)if(e===t)return null;return e}function $o(e){let t="";for(;e;){let{node:n}=e;n&&A(n)&&n.type!==le&&(t+=` at ${Et(n.type)}
1
+ var Do=Object.defineProperty;var Po=(e,t)=>{for(var n in t)Do(e,n,{get:t[n],enumerable:!0})};var Zt={};Po(Zt,{Children:()=>_o,Component:()=>R,Fragment:()=>Mr,PureComponent:()=>ie,StrictMode:()=>vr,Suspense:()=>De,SuspenseList:()=>V,cloneElement:()=>Xt,createContext:()=>xt,createElement:()=>uo,createPortal:()=>yo,createRef:()=>Zn,createRoot:()=>xo,forwardRef:()=>st,html:()=>Eo,isValidElement:()=>Ao,jsx:()=>Lr,jsxDev:()=>Hr,jsxs:()=>kr,lazy:()=>To,memo:()=>qt,render:()=>Wt,startTransition:()=>xe,unmountComponentAtNode:()=>go,unstable_batchedUpdates:()=>wr,unstable_deferredUpdates:()=>Je,unstable_syncUpdates:()=>fe,use:()=>Fo,useCallback:()=>Ln,useContext:()=>Bn,useDebugValue:()=>Hn,useDeferredValue:()=>Kn,useEffect:()=>It,useLayoutEffect:()=>Dt,useMemo:()=>bt,useReducer:()=>wn,useRef:()=>Mn,useState:()=>Rt,useTransition:()=>Yn,watch:()=>pt});var we=Symbol.for("react.element"),rn=Symbol.for("react.forward_ref"),sn="{{brahmos}}",an={key:1,ref:1},cn={className:"class",htmlFor:"for",acceptCharset:"accept-charset",httpEquiv:"http-equiv",tabIndex:"tabindex"},dt={doubleclick:"dblclick"},pn=typeof Symbol!="undefined"?/fil|che|rad/i:/fil|che|ra/i,ln=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,un=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,ft="http://www.w3.org/1999/xlink",dn=100,d="__brahmosData",Le="__brahmosLastArrayDom",ke="__rootFiber",S="sync",y="deferred",he="js",O="immediate_action",C="transition",He=0,mt=1,x=2,fn="initial",X="start",ae="suspended",Ee="resolved",Tt="completed",K="timedOut";function mn(e){return e[0]==="o"&&e[1]==="n"}function Be(e){let t=ln.test(e)?e.replace(/[A-Z0-9]/,"-$&").toLowerCase():e;return cn[e]||t}function ht(e){return e.nodeName.toLowerCase()}function Tn(e,t){return t&&(e=e.replace(/Capture$/,"")),e.replace("on","").toLowerCase()}function q(e){return e==null}var Oo=0;function j(){return Oo++}function hn(){return Date.now()}function Ye(e){e.__brahmosData={events:{}}}function ce(e,t){if(!("key"in e||"ref"in e&&!t))return e;let n={},o;for(o in e)o!=="key"&&(o!=="ref"||t)&&(n[o]=e[o]);return n}function ye(e,t){let n=Object.keys(e);for(let o=0,r=n.length;o<r;o++){let s=n[o],a=e[s];t(s,a)}}function ge(e){Array.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--)e[t].remove()}function $(e,t){return t=t||0,Array.prototype.slice.call(e,t)}function Uo(e){let t=e instanceof NodeList;if(e instanceof Node)return e;if(Array.isArray(e)||t){let n=document.createDocumentFragment(),o=0;for(;e[o];)n.appendChild(e[o]),t||(o+=1);return n}return document.createTextNode(e)}function Ke(e,t,n){let o=Uo(n),r;return Array.isArray(n)?r=n:o instanceof DocumentFragment?r=$(o.childNodes):r=n,e.insertBefore(o,t),r}function pe(e,t){return t?t.nextSibling:e.firstChild}function w(e,t,n){if(e[t])return e[t].apply(e,n)}function En(e,t){let n=t===0?e.firstChild:e.childNodes[t],o=document.createTextNode("");return e.insertBefore(o,n),o}var je=Promise.resolve();function Ce(e){return je.then(e)}function Se(){return j()+"-"+Math.random()*1e6}function yn(e){let t="pending",n,o=e.then(r=>{t="success",n=r},r=>{t="error",n=r});return{read(){if(t==="pending")throw o;if(t==="error")throw n;if(t==="success")return n}}}function $e(e){return e[d].mounted}function Et(e){return e.displayName||e.name}function le({children:e}){return e}var ze={transitionId:"",tryCount:0,transitionState:K},U={transitionId:Se(),tryCount:0,transitionState:K};function vo(e){let{transitionState:t}=e;return t===X||t===Ee||t===K}function Ne(e){let{transitionState:t}=e;return t===Tt||t===K}function gn(e){let{transitionState:t}=e;t!==K&&t!==ae&&(e.isPending?(e.clearTimeout(),e.updatePendingState(!1,C)):e.transitionState=Tt)}function Q(e,t){return t=t||ze,e.root.currentTransition||t}function yt(e){let{pendingTransitions:t}=e;return t.find(vo)}var gt=Symbol.for("tag"),Z=Symbol.for("tag-element"),D=Symbol.for("class-component"),Ct=Symbol.for("functional-component"),z=Symbol.for("attribute");function G({nodeType:e}){return e===Z}function J({nodeType:e}){return e===gt}function B(e){return G(e)||J(e)}function A({nodeType:e}){return e===D||e===Ct}function Y(e){return typeof e=="string"||typeof e=="number"}function Ge(e){return!(q(e)||typeof e=="boolean")}function St(e,t){let n=e&&e.key;return n===void 0?t:n}function Ve(e,t,n){return{$$typeof:we,nodeType:null,key:n,ref:null,portalContainer:null,type:null,props:e,values:t,template:null}}var Sn;function Nt(e){Sn=e}function N(){return Sn}function _e(e){return e===y?"lastDeferredCompleteTime":"lastCompleteTime"}function ee(e){return e===y?"deferredUpdateTime":"updateTime"}function L(e,t){let n=ee(t),o=j();for(;e;)e[n]=o,e=e.parent}function Nn(e,t,n){t===n?n.child=e:t.sibling=e,e.parent=n}function F(e,t){e.hasUncommittedEffect=t,e.root.hasUncommittedEffect=!0}function We(e,t,n,o){let{root:r,node:s,part:a,nodeInstance:i,child:c}=e,p=ee(r.updateType);return t?(t.node=s,t.part=a,t.createdAt=j()):(t=ue(r,s,a),Mo(e,t)),e.shouldTearDown=!1,t.nodeInstance=i,t.child=c,t[p]=o[p],Nn(t,n,o),t}function _n(e,t){return e===t?e.child:e.sibling}function te(e){let{child:t,root:n}=e;if(n.updateType===S)return;let o;for(;t;){let{alternate:r}=t;o=We(t,r,o||e,e),t=t.sibling}}function Xe(e){let t=[];return{updateType:y,updateSource:he,cancelSchedule:null,domNode:e,forcedUpdateWith:null,current:null,wip:null,child:null,retryFiber:null,currentTransition:null,hasUncommittedEffect:!1,pendingTransitions:[],tearDownFibers:[],postCommitEffects:[],batchUpdates:{},lastDeferredCompleteTime:0,lastCompleteTime:0,deferredUpdateTime:0,updateTime:0,afterRender(n){t.includes(n)||t.push(n)},callRenderCallbacks(){for(let n=0,o=t.length;n<o;n++)t[n]()},resetRenderCallbacks(){t=[]}}}function ue(e,t,n){return t&&t.portalContainer&&(n.parentNode=t.portalContainer),{node:t,nodeInstance:null,root:e,parent:null,child:null,sibling:null,part:n,alternate:null,context:null,childFiberError:null,isSvgPart:!1,deferredUpdateTime:0,updateTime:0,processedTime:0,createdAt:j(),shouldTearDown:!1,hasUncommittedEffect:He}}function Mo(e,t){e&&(e.alternate=t),t.alternate=e}function ne(e,t,n,o,r){let{root:s}=o,a=ee(s.updateType),i;return n&&!q(n.node)&&!q(e)&&wo(e,n.node)?(i=We(n,n.alternate,o,r),i.node=e,i.part=t):(i=ue(s,e,t),n&&oe(n)),Nn(i,o,r),i.processedTime=0,i[a]=r[a],i.context=r.context,i.isSvgPart=r.isSvgPart,i}function wo(e,t){return Y(e)&&Y(t)||e.nodeType===z||Array.isArray(e)&&Array.isArray(t)||(A(e)||G(e))&&e.type===t.type||J(e)&&e.template===t.template}function Lo(e,t,n){return e&&e[n]>=t}function Cn(e,t,n){if(e){for(;e&&!Lo(e,t,n);)e=e.sibling;return e}}function An(e,t,n,o){let r=Cn(e.child,n,o);if(r)return r;let s;for(;!(s=Cn(e.sibling,n,o));)if(e=e.parent,e===t)return e;return s}function v(e){return e[d].fiber}function xn(e){let{root:t,child:n}=e;n&&n.createdAt>t.lastCompleteTime&&(e.child=n.alternate)}function oe(e){e.shouldTearDown=!0,e.root.tearDownFibers.push(e)}var Qe=he,qe=ze;function re(){return Qe}function _t(){return qe}function b(e,t){Qe=e,t(),Qe=he}function se(e,t){let n=qe;qe=e,b(C,t),qe=n}function Fn(e){return e.updateSource===O}function ko(){return Qe===C}function Ae(){return ko()?y:S}function Ze(e){return e===y?"pendingDeferredUpdates":"pendingSyncUpdates"}function de(e){let{root:{updateType:t},nodeInstance:n}=e,o=n[d],r=Ze(t);if(t===S)return o[r];let s=Q(e,null).transitionId;return o[r].filter(a=>a.transitionId===s)}function Je(e){se(U,e)}function fe(e){b(O,e)}function Ho(e,t){let{root:n}=e;for(;e.nodeInstance!==t;)if(e=e.parent,e===n)return null;return e}function et(e,t){let n,o,r=!0,s=e[d],a=N();if(a){let{renderCount:p}=s;if(p>50)throw new Error("Too many rerender. Check your setState call, this may cause an infinite loop.");let{root:l}=a;l.retryFiber=Ho(a,e),n=l.updateType,o=l.currentTransition||ze,r=!1}else s.renderCount=0,n=Ae(),o=_t();let i=Ze(n),c=t(o.transitionId);return s[i].push(c),r}var Bo=1;function At(e){return function(t){let n=v(e),{updateType:o}=n.root;e.context!==t&&(e[d].isDirty=!0,L(n,o))}}function xt(e){let t=`cC${Bo++}`;class n extends R{constructor(s){super(s),this.subs=[]}shouldComponentUpdate(s){let{value:a}=this.props;return a!==s.value&&this.subs.forEach(i=>i(s.value)),!0}sub(s){let{subs:a}=this,i=At(s);a.push(i);let{componentWillUnmount:c}=s;s.componentWillUnmount=()=>{a.splice(a.indexOf(i),1),c&&c()}}render(){return this.props.children}}n.__ccId=t;class o extends R{render(){return this.props.children(this.context)}}return n.id=t,n.defaultValue=e,n.Provider=n,n.Consumer=o,o.contextType=n,n}function bn(){return N().nodeInstance}function In(e){let{renderCount:t}=e[d];e.deferredHooks=e.syncHooks.map((n,o)=>Array.isArray(n)?[...n]:n.transitionId?n:n.hasOwnProperty("current")&&t>1?e.deferredHooks[o]||n:{...n})}function Dn(e,t){let{syncHooks:n,deferredHooks:o}=t;return e===S?n:o}function tt(e){let{nodeInstance:t,root:{updateType:n}}=e;return Dn(n,t)}function Rn(e,t,n){return e===y&&!n.deferredHooks.length&&In(n),Dn(e,n)[t]}function Pn(e,t){if(!e||!t||e.length!==t.length)return!0;for(let n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!0;return!1}function Yo(e,t,n){(re()===O||!Object.is(t,n))&&M(e)}function Ft(e){return!1}function On(e){return e}function nt(e,t,n){let o=N(),{nodeInstance:r}=o,{pointer:s}=r,a=tt(o),i=a[s];return(!i||t(i))&&(i=e(),a[s]=i),r.pointer+=1,n(i)}function Un(){let e=N(),{nodeInstance:t,root:{updateType:n}}=e;t.pointer=0,n===y&&In(t),de(e).forEach(r=>r.updater())}function vn(e,t){let n=bn(),{pointer:o}=n;return nt(()=>(typeof e=="function"&&(e=e()),[e,s=>{let a=Ae(),i=Rn(S,o,n),c=i[0],p=t(s,c);et(n,f=>({transitionId:f,updater(){let m=Rn(a,o,n);m[0]=t(s,i[0])}}))&&Yo(n,p,c)}]),Ft,On)}function Rt(e){return vn(e,(t,n)=>(typeof t=="function"&&(t=t(n)),t))}function Mn(e){return nt(()=>({current:e}),Ft,On)}function wn(e,t,n){return vn(n?()=>n(t):t,(r,s)=>e(s,r))}function bt(e,t){return nt(()=>({value:e(),dependencies:t}),s=>Pn(t,s.dependencies),s=>s.value)}function Ln(e,t){return bt(()=>e,t)}function kn(e,t){let n=N(),{nodeInstance:o}=n,{pointer:r}=o,s=tt(n),a=s[r]||{animationFrame:null,cleanEffect:null},i={...a,isDependenciesChanged:Pn(t,a.dependencies),dependencies:t,effect(){i.isDependenciesChanged&&e(i)}};s[r]=i,o.pointer+=1}function It(e,t){kn(n=>{cancelAnimationFrame(n.animationFrame),n.animationFrame=requestAnimationFrame(()=>{setTimeout(()=>{n.cleanEffect=e()})})},t)}function Dt(e,t){kn(n=>{n.cleanEffect=e()},t)}function Hn(){}function Bn(e){let{nodeInstance:t,context:n}=N(),{id:o,defaultValue:r}=e,s=n[o],a=s?s.props.value:r;return Dt(()=>{if(s){let{subs:i}=s,c=At(t);return i.push(c),()=>{i.splice(i.indexOf(c),1)}}},[]),t.context=a,a}function xe(e){let t={transitionId:Se(),transitionState:X,pendingSuspense:[],tryCount:0};se(t,e)}function Yn(){let e=bn();return nt(()=>{let t={transitionId:Se(),tryCount:0,isPending:!1,transitionTimeout:null,pendingSuspense:[],transitionState:fn,clearTimeout(){clearTimeout(t.transitionTimeout)},updatePendingState(n,o){t.isPending=n,e[d].isDirty=!0;let r=()=>{M(e)};o===C?se(t,r):b(o,r)},startTransition(n){let o=re(),{root:r}=v(e);t.transitionState=X,t.pendingSuspense=[],t.clearTimeout(),se(t,n),r.lastDeferredCompleteTime<r.deferredUpdateTime&&t.updatePendingState(!0,o)}};return t},Ft,({startTransition:t,isPending:n})=>[n,t])}function Kn(e,t){let[n,o]=Rt(t!==void 0?t:e);return It(()=>{xe(()=>{o(e)})},[e]),n}function jn(e){let t=tt(e);for(let n=0,o=t.length;n<o;n++){let r=t[n];r.effect&&r.effect()}}function ot(e,t){let n=tt(e);for(let o=0,r=n.length;o<r;o++){let s=n[o];s.cleanEffect&&(s.isDependenciesChanged||t)&&s.cleanEffect(),s.clearTimeout&&t&&s.clearTimeout()}}function Pt(e){return{syncHooks:[],deferredHooks:[],context:void 0,pointer:0,__render(t){Un();let n=e(t);return this[d].nodes=n,n},__unmount:new Map,[d]:{pendingSyncUpdates:[],pendingDeferredUpdates:[],fiber:null,nodes:null,isDirty:!1,mounted:!1,renderCount:0}}}function Ko(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++)if(!hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var Ot=Ko;function jo(e){let{root:t}=e;for(;(e=e.parent)&&!(e.nodeInstance instanceof R&&(e.nodeInstance.componentDidCatch||e.node.type.getDerivedStateFromError));)if(e===t)return null;return e}function $o(e){let t="";for(;e;){let{node:n}=e;n&&A(n)&&n.type!==le&&(t+=` at ${Et(n.type)}
2
2
  `),e=e.parent}return{componentStack:t}}function zo(e){let{node:{type:t},nodeInstance:n,parent:o}=e,{__ccId:r}=t,s=o.context||{};if(!r)return s;let a=Object.create(s);return a[r]=n,a}function Go(e,t){return t.reduce((n,{state:o})=>(typeof o=="function"&&(o=o(n)),{...n,...o}),e)}function $n(e){let{root:t,nodeInstance:n}=e;n[d].isDirty=!0,t.retryFiber=e}function Ut(e){let{node:t,part:n,root:o,childFiberError:r}=e,{type:s,nodeType:a,props:i={}}=t,{currentTransition:c}=o,p=o.updateType===y,l=!0,f=!1,m=a===D;xn(e);let{nodeInstance:u}=e,T=!1;u||(u=m?new s(i):Pt(s),e.nodeInstance=u,T=!0);let _=u[d],E=zo(e);if(e.context=E,m){let h=u,g=_,{committedValues:k,memoizedValues:P}=g;T&&(k.state=h.state);let{props:W,state:Te}=k;P&&c&&c.transitionId===P.transitionId&&({props:W,state:Te}=P,f=!0),h.props=W,h.state=Te;let{shouldComponentUpdate:Jt}=h,H=Te,lt=de(e);lt.length&&(H=Go(Te,lt));let en=!T&&o.forcedUpdateWith!==u,tn=w(s,"getDerivedStateFromProps",[i,H]),nn=r?w(s,"getDerivedStateFromError",[r.error]):void 0;(tn||nn)&&(H={...H,...tn,...nn}),h.isPureReactComponent&&en&&(l=!Ot(H,Te)||!Ot(i,W)),Jt&&l&&en&&(l=Jt.call(h,i,H));let{contextType:on}=s;if(on){let{id:ve,defaultValue:ut}=on,Me=E[ve],Io=Me?Me.props.value:ut;Me&&T&&Me.sub(h),h.context=Io}h.state=H,h.props=i,lt.forEach(({callback:ve})=>{if(ve){let{updateSource:ut}=o;Ce(()=>{b(ut,()=>ve(H))})}}),c&&(g.memoizedValues={state:H,props:i,transitionId:c.transitionId})}if(l){Nt(e),_.renderCount+=1;let h=r&&!s.getDerivedStateFromError;try{h?_.nodes=null:u.__render(i)}catch(g){let k=jo(e);if(typeof g.then=="function"){let P=rt(e);if(!P)throw new Error("Rendering which got suspended can't be used outside of suspense.");P.nodeInstance.handleSuspender(g,P);let W=zn(P);$n(W)}else if(k&&!k.childFiberError){let P=$o(e);console.error(g);let W=`The above error occurred in the <${Et(t.type)}> component:
3
- ${P.componentStack}`;console.error(W),k.childFiberError={error:g,errorInfo:P},$n(k)}else throw g;return}finally{Nt(null);let g=u[d];if(m&&p){let{committedValues:k}=g;Object.assign(u,k)}}}if(f||l){let{child:h}=e,{nodes:g}=_;!h||h.node!==g?(ne(g,n,h,e,e),F(e,x)):f||te(e)}else te(e)}function Gn(e){let{node:t,alternate:n}=e,o=n&&n.node;t!==o&&F(e,x)}function vt(e,t){let{type:n}=e,o=t?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);return Ye(o),{fragment:[o],domNodes:[o],parts:[{previousSibling:null,parentNode:o,isNode:!0}]}}function Vo(e){return!!e&&e.nodeType===8&&e.textContent===sn}var Fe=class{constructor(t,n){this.templateResult=t,t.create(n),this.fragment=this.createNode(n),this.parts=this.getParts(),this.domNodes=$(this.fragment.childNodes),this.patched=!1}createNode(t){let{template:n,svgTemplate:o}=this.templateResult,r=t?o:n;return document.importNode(r.content,!0)}getParts(){let{fragment:t,templateResult:n}=this,{partsMeta:o}=n,r=[],s=t.querySelectorAll("*");for(let a=0,i=o.length;a<i;a++){let c=o[a],{isAttribute:p,attrIndex:l,refNodeIndex:f,prevChildIndex:m,hasExpressionSibling:u}=c,T=s[f];if(p)c.tagAttrs||(c.tagAttrs=$(T.attributes)),r.push({isAttribute:!0,tagAttrs:c.tagAttrs,domNode:T,attrIndex:l}),Ye(T);else{T=T||t;let _=m!==-1,E,h=T.childNodes[m+1];_&&Vo(h)&&ge(h),_?u?E=En(T,m):E=T.childNodes[m]:E=null,r.push({isNode:!0,parentNode:T,previousSibling:E})}}return r}patchParts(t){let{parts:n}=this,{parentNode:o,previousSibling:r}=t;if(!this.patched){for(let s=0,a=n.length;s<a;s++){let i=n[s];i.isNode&&i.parentNode instanceof DocumentFragment&&(i.parentNode=o,i.previousSibling=i.previousSibling||r)}this.patched=!0}}};function Wo(e,t,n){let o=e.lastIndexOf(t);return n<=o}function Xo(e,t){return{nodeType:z,props:e,ref:t}}function qo(e,t,n){let o=n,r=n.child;for(let s=0,a=e.length;s<a;s++){let i=e[s],c=t[s],p;if(i.isAttribute){let{domNode:l}=i,f={},m;for(;i&&l===i.domNode;)ye(t[s],(u,T)=>{let _=i,E=Be(u);!Wo(_.tagAttrs,E,_.attrIndex)&&!an[u]?f[u]=T:u==="ref"&&(m=T)}),i=e[++s];s--,i=e[s],p=Xo(f,m)}else i.isNode&&(p=c);o=ne(p,i,r,o,n),r=r&&r.sibling}}function Mt(e){let{node:t}=e,{part:n,alternate:o,parent:{context:r}}=e,s=o&&o.node,{values:a,nodeType:i}=t,c=i===Z,p=e.isSvgPart||t.type==="svg";e.isSvgPart=p;let{nodeInstance:l}=e;l||(l=c?vt(t,p):new Fe(t.template,p),e.nodeInstance=l),c||l.patchParts(n),t!==s?c?ne(t.props.children,l.parts[0],e.child,e,e):qo(l.parts,a,e):te(e),F(e,x),e.context=r}function Vn(e,t){let{type:n}=t,o=ht(t);return dt[e]?dt[e]:/^change(textarea|input)/i.test(e+o)&&!pn.test(n)?"input":e}function wt(e){let{type:t}=e,n=ht(e);if(n==="input"&&(t==="radio"||t==="checkbox"))return"checked";if(n==="input"||n==="select"||n==="textarea")return"value"}function Wn(e){let t=wt(e);if(!t)return;let n=e[`${t}Prop`],o=e[t];n!==void 0&&n!==o&&(e[t]=n)}function Xn(e,t,n,o){e==="checked"?n==="checked"?(t.checked=o,t.checkedProp=o):n==="defaultChecked"&&t.checkedProp===void 0?t.checked=o:t[n]=o:e==="value"&&(n==="value"?(t.value=o,t.valueProp=o):n==="defaultValue"&&t.valueProp===void 0?t.value=o:t[n]=o)}function qn(e,t,n){let o=e.__brahmosData.events,r=o[t];return r?(r.handler=n,r.patched):(r=o[t]={handler:n,patched:null},r.patched=function(s){r.handler&&fe(()=>{r.handler.call(this,s)})},r.patched)}function Qn(e,t,n,o){t=t||{},ye(e,(r,s)=>{let a=t[r];s!==a&&o(r,s,a)}),ye(t,(r,s)=>{e[r]===void 0&&s!==void 0&&o(r,n,s)})}function Qo(e,t,n,o,r){if(t==="children")return;if(mn(t)){let a=t.substr(-7)==="Capture"&&t.substr(-14,7)==="Pointer",i=Tn(t,a);i=Vn(i,e);let c=qn(e,t,n);o&&!n?e.removeEventListener(i,c,a):!o&&n&&e.addEventListener(i,c,a)}else if(t==="style"){let{style:a}=e;Qn(n||{},o,"",(i,c)=>{i[0]==="-"?a.setProperty(i,c):a[i]=typeof c=="number"&&un.test(i)===!1?c+"px":c})}else if(t==="dangerouslySetInnerHTML"){let a=o&&o.__html,i=n&&n.__html;i!==a&&(e.innerHTML=i==null?"":i)}else if(t in e&&!r){let a=wt(e);a?Xn(a,e,t,n):e[t]=n==null?"":n}else{t=Be(t);let a=t.replace(/^xlink:?/,""),i=n==null||n===!1;t!==a?(a=a.toLowerCase(),i?e.removeAttributeNS(ft,a):e.setAttributeNS(ft,a,n)):i?e.removeAttribute(t):e.setAttribute(t,n)}}function Lt(e,t,n,o){Qn(t,n,null,(r,s,a)=>{Qo(e,r,s,a,o)}),Wn(e)}function st(e){function t(n){return e(ce(n,!1),n.ref)}return t.__isForwardRef=!0,t.$$typeof=rn,t}function Zn(){return{current:null}}function Re(e,t){typeof e=="function"?e(t):typeof e=="object"&&(e.current=t)}function Zo(e){let{node:t,alternate:n}=e,o=e.part,{parentNode:r,previousSibling:s}=o,a=pe(r,s);n&&a?a.nodeValue=t:Ke(r,a,t)}function Jo(e){for(;e.child&&e.node&&!B(e.node);)e=e.child;return e}function Jn(e,t){let{domNodes:n}=t;e[Le]=n[n.length-1]}function eo(e,t){if(e.isArrayNode&&e.nodeIndex===0)for(;e=e.parentArrayPart;)e.firstDOMNode=t}function to(e){let{previousSibling:t}=e;if(e.isArrayNode){let{firstDOMNode:n,nodeIndex:o}=e;o>0?t=e.parentNode[Le]:e.parentArrayPart&&(t=n?n.previousSibling:e.parentNode[Le])}return t}function no(e,t){let{part:n}=e;if(!n.isArrayNode)return;let{nodeIndex:o,parentNode:r}=n,s=t.part.nodeIndex,a=Jo(e),{nodeInstance:i}=a,c=a!==e&&a.hasUncommittedEffect;if(!(!i||c)){if(o!==s){let{domNodes:p}=i,l=to(n),f=pe(r,l),m=p[0];m&&m.previousSibling!==l&&m!==f&&Ke(r,f,p),eo(n,m)}Jn(r,i)}}function er(e){let{nodeInstance:t,alternate:n,node:o}=e,r=e.part,{parentNode:s}=r,a=G(o);if(a&&oo(e,t.domNodes[0]),n)no(e,n);else{let i=to(r),c=pe(s,i),p=Ke(s,c,t.fragment);a||(t.domNodes=p),eo(r,p[0]),Jn(s,t)}}function tr(e){let{node:t,nodeInstance:n,root:o}=e,{updateType:r}=o,{nodeType:s}=t,a=n[d],i=r===y;if(s===D){i&&Object.assign(n,a.memoizedValues);let{props:l,state:f}=a.committedValues;a.lastSnapshot=w(n,"getSnapshotBeforeUpdate",[l,f])}else ot(e,!1);let{transitionId:c}=Q(e,null),p=Ze(r);a[p]=i?a[p].filter(l=>l.transitionId!==c):[],a.isDirty=!1,a.renderCount=0,o.postCommitEffects.push(e)}function nr(e){let{node:t,nodeInstance:n,root:o,childFiberError:r}=e,{updateType:s}=o,{nodeType:a,ref:i}=t,c=n[d];if(a===D){let{props:p,state:l}=n,{committedValues:f,lastSnapshot:m}=c,{props:u,state:T}=f;u?w(n,"componentDidUpdate",[u,T,m]):w(n,"componentDidMount"),r&&(w(n,"componentDidCatch",[r.error,r.errorInfo]),e.childFiberError=null),i&&Re(i,n),f.props=p,f.state=l,c.memoizedValues=null}else if(jn(e),s===y){let{syncHooks:p,deferredHooks:l}=n;n.deferredHooks=p,n.syncHooks=l}c.mounted=!0,c.fiber=e}function oo(e,t){let{node:n,alternate:o,isSvgPart:r}=e,{props:s,ref:a}=n,i=o&&o.node.props;Lt(t,s,i,r),a&&Re(a,t)}function it(e){e.tearDownFibers=[],e.postCommitEffects=[],e.hasUncommittedEffect=!1,e.retryFiber=null,e.resetRenderCallbacks()}function or(e){e.node=null,e.nodeInstance=null,e.child=null,e.sibling=null}function kt(e){let{currentTransition:t,pendingTransitions:n}=e,o=n.indexOf(t);o!==-1&&n.splice(o,1)}function rr(e){let{node:t,alternate:n}=e,o=t&&A(t);o&&n&&no(e,n),e.hasUncommittedEffect===x&&(Y(t)?Zo(e):B(t)?er(e):o?tr(e):t.nodeType===z&&oo(e,e.part.domNode),e.hasUncommittedEffect=He),n&&or(n)}function ro(e){let{updateType:t,wip:n,current:o}=e,r=ee(t),s=e[_e(t)],a=[],i=t===S?o:n;for(;i;){let{createdAt:c,node:p,child:l,hasUncommittedEffect:f}=i,m=i[r],u=c>s,T=f||m>s;if(f&&a.push(i),u&&(l&&l.parent!==i&&(l.parent=i),p&&A(p)&&(i.nodeInstance[d].fiber=i)),l&&T)i=l;else{for(;i!==e&&!i.sibling;)i=i.parent;i=i.sibling}}return a}function Ht(e,t){for(let o=0,r=t.length;o<r;o++)rr(t[o]);let{postCommitEffects:n}=e;for(let o=n.length-1;o>=0;o--)nr(n[o]);kt(e),it(e),e.forcedUpdateWith=null}function Bt(e){let{node:t,part:n}=e,o=e,{parentNode:r,previousSibling:s,firstDOMNode:a}=n,i=new Map,c=0,p=e;for(;p=_n(p,e);){let l=St(p.node,c);i.set(l,p),c++}e.child=null,t.forEach((l,f)=>{let m=St(l,f),u=i.get(m);u&&i.delete(m);let T=o;o=ne(l,{parentNode:r,previousSibling:s,a:void 0,firstDOMNode:a,isArrayNode:!0,nodeIndex:f,parentArrayPart:n.isArrayNode?n:null},u,T,e),o.sibling=null,u&&u.part.nodeIndex!==f&&(F(o,mt),f!==0&&F(T,mt))}),i.forEach(l=>{oe(l)}),F(e,x)}function so(e,t,n,o){let r=e.part.parentNode!==t.parentNode&&n?!1:o,{node:s}=e;s&&s.portalContainer&&(r=!0),io(e,r)}function io(e,t){let{node:n,part:o,nodeInstance:r}=e;if(e.shouldTearDown=!1,!Ge(n))return;let s=B(n),{child:a}=e;if(a)for(so(a,o,s,t);a.sibling;)a=a.sibling,so(a,o,s,t);if(Y(n)&&t){let c=pe(o.parentNode,o.previousSibling);c&&ge(c);return}let{ref:i}=n;if(i&&Re(i,null),!!r)if(s){let{domNodes:c}=r;t&&ge(c)}else A(n)&&$e(r)&&(r.__unmount.forEach(c=>c()),r.__unmount.clear(),n.nodeType===D?w(r,"componentWillUnmount"):ot(e,!0))}function me(e){let{tearDownFibers:t}=e;t.forEach(n=>{n.shouldTearDown&&io(n,!0)}),e.tearDownFibers=[]}var ao=5,sr=30,Yt=16,ir=300,ar=600,po;requestAnimationFrame(e=>{po=e});var Kt=()=>performance.now(),co=()=>!0,lo=(e,t)=>(t=t||Yt,t-(e-po)%t),jt,be;if(typeof MessageChannel!="undefined"){be=[];let e=new MessageChannel;e.port1.onmessage=function(){be.forEach(t=>t())},jt=e.port2}function cr(e){if(!jt||lo(Kt())<1){let t=()=>{r(),e()},n=setTimeout(t,1),o=requestIdleCallback(t),r=()=>{clearTimeout(n),cancelIdleCallback(o)};return r}return be.push(e),jt.postMessage(null),()=>{let t=be.indexOf(e);t!==-1&&be.splice(t,1)}}function $t(e,t,n){let{cancelSchedule:o}=e;if(o&&(o(),e.cancelSchedule=null),t){e.cancelSchedule=cr(()=>{let{currentTransition:r}=e,s=r?r.tryCount:0,a=r===U?ir:ar,i=Kt(),c=Math.min(sr,ao+s),p=Math.floor(c/Yt)*Yt,l=()=>{let u=Kt(),T=lo(u,p),_=i+Math.min(ao,T);return u<_},m=s>a?co:l;n(m)});return}n(co)}function pr(e){let{node:t,nodeInstance:n}=e;return A(t)&&n?!!de(e).length||n[d].isDirty:!1}function lr(e){let{node:t,alternate:n}=e;if(!Ge(t)){n&&oe(n);return}let o=pr(e);if(e.processedTime&&!o){te(e);return}Y(t)?Gn(e):Array.isArray(t)?Bt(e):B(t)?Mt(e):A(t)?Ut(e):t.nodeType===z&&F(e,x),e.processedTime=j()}function ur(e){return e.updateType===S?!0:e.currentTransition?e.lastCompleteTime>=e.updateTime&&e.hasUncommittedEffect&&Ne(e.currentTransition):!1}var dr={fn:e=>{let{updateType:t,current:n}=e,o=_e(t);me(e);let r=ro(e);e[o]=e.lastCompleteTime=j(),t===y&&(e.current=e.wip,e.wip=n),b(O,()=>Ht(e,r))}};function at(e,t){let{root:n}=e,{updateType:o,currentTransition:r}=n,s=_e(o),a=ee(o),i=n[s],c=!Fn(n);$t(n,c,p=>{for(;e!==t;)if(p()){lr(e);let{retryFiber:f}=n;f?(e=f,t=n,n.retryFiber=null):e=An(e,t,i,a)}else{at(e,t);return}if(n.callRenderCallbacks(),r){let f=e===t&&!n.retryFiber,m=r.transitionState!==ae;f&&m&&(gn(r),r.tryCount=0),!n.hasUncommittedEffect&&Ne(r)&&kt(n)}ur(n)&&dr.fn(n),yt(n)&&b(C,()=>{n.updateSource=C,Ie(n)})})}function Ie(e){let t=yt(e);t&&(e.updateType=y,it(e),e.currentTransition=t,t.tryCount+=1,e.wip=We(e.current,e.wip,e,e),at(e.wip,e))}function ct(e){let{root:t,parent:n}=e;t.updateType=S,t.currentTransition=null,it(t),at(e,n)}function M(e){let t=v(e),{root:n}=t,{pendingTransitions:o,batchUpdates:r}=n,s=re(),a=_t(),i=Ae();if(L(t,i),s===C&&!o.includes(a)&&(a===U?o.unshift(a):o.push(a)),r[s]){r[s]+=1;return}r[s]=1,Ce(()=>{let c=r[s];r[s]=0;let p=s===C;if(!(p&&n.lastCompleteTime<n.updateTime))if(n.updateSource=s,p)Ie(n);else{let l=n.updateType===S&&n.cancelSchedule;ct(s===O&&!l&&c===1?t:n.current)}})}var R=class{constructor(t){this.props=t,this.state=void 0,this.context=void 0,this[d]={lastSnapshot:null,pendingSyncUpdates:[],pendingDeferredUpdates:[],fiber:null,nodes:null,mounted:!1,committedValues:{},memoizedValues:null,isDirty:!1,renderCount:0}}setState(t,n){et(this,r=>({state:t,transitionId:r,callback:n}))&&M(this)}forceUpdate(t){let n=this[d],{fiber:o}=n;o&&(o.root.forcedUpdateWith=this,this[d].isDirty=!0,M(this),t&&t(this.state))}render(){}__render(){let t=this.render();return this[d].nodes=t,t}};R.prototype.isReactComponent=!0;var ie=class extends R{};ie.prototype.isPureReactComponent=!0;function I(e,t,n){let{ref:o}=t;n===void 0&&(n=t.key);let r=typeof e=="function"&&e.prototype&&e.prototype.isReactComponent,s=typeof e=="function"&&!r||e.__isForwardRef;t=ce(t,s);let a=Ve(t,null,n);if(a.type=e,typeof e=="string")return a.nodeType=Z,a.ref=o,a;a.nodeType=r?D:Ct,a.ref=r?o:null,e.__loadLazyComponent&&e.__loadLazyComponent();let i=typeof e=="function"&&e.defaultProps;if(i)for(n in i)t[n]===void 0&&(t[n]=i[n]);return a}function uo(e,t,n){t=t||{};let r=arguments.length>3?$(arguments,2):n;return r&&(t.children=r),I(e,t,t.key)}function rt(e,t){let{root:n}=e,{nodeInstance:o}=e;for(;!(o instanceof De||t&&o instanceof V);){if(e=e.parent,e===n)return null;o=e.nodeInstance}return e}function zn(e){let t=rt(e.parent,!0);if(!(t&&t.nodeInstance instanceof V))return e;let{nodeInstance:o}=t,{childManagers:r}=o.suspenseManagers[Q(e,null).transitionId],{revealOrder:s}=o.props;return s==="backwards"||s==="together"?(r.forEach(a=>{a.component[d].isDirty=!0}),r[0].fiber):e}function zt(e){let{parentSuspenseManager:t}=e;return t&&t.isSuspenseList?t:null}function Gt(e,t){let{nodeInstance:n}=e,{suspenseManagers:o}=n,{transitionId:r}=t,s=o[r];return s||(s=o[r]=new Vt(e,t)),t.transitionState===X&&(s.suspender=null),s}function mo(e){e[d].isDirty=!0}function fr(e){let t=v(e.component);e.isUnresolved()&&t&&(mo(e.component),L(t,y))}var Vt=class{constructor(t,n){let{nodeInstance:o}=t;this.fiber=t,this.component=o,this.transition=n,this.childManagers=[],this.suspender=null,this.isSuspenseList=o instanceof V;let r=rt(t.parent,!0);this.parentSuspenseManager=r&&Gt(r,n),this.recordChildSuspense(),this.handleSuspense=this.handleSuspense.bind(this)}recordChildSuspense(){let{parentSuspenseManager:t}=this;t?(t.childManagers.push(this),this.rootSuspenseManager=t.rootSuspenseManager):this.rootSuspenseManager=this}addRootToProcess(){let{rootSuspenseManager:t}=this,{root:n}=N();n.afterRender(t.handleSuspense)}suspend(t){this.suspender=t,this.addRootToProcess()}handleSuspense(){let{component:t,suspender:n}=this;return t instanceof V?this.handleSuspenseList():Promise.resolve(n).then(this.resolve.bind(this,n))}isUnresolved(){return this.isSuspenseList?this.childManagers.some(t=>t.isUnresolved()):this.suspender}shouldShowFallback(){let t=zt(this);if(!t)return!0;let{component:n,childManagers:o}=t,{tail:r}=n.props;if(zt(t)&&!t.shouldShowFallback())return!1;if(r==="collapsed")for(let a=0,i=o.length;a<i;a++){let c=o[a];if(r==="collapsed"&&c.isUnresolved())return c===this}return r!=="hidden"}shouldRenderChildren(){let t=zt(this),{suspender:n}=this;if(!t)return!n;if($e(this.component)&&!n)return!0;let{component:{props:{revealOrder:o}},childManagers:r}=t,s=r.indexOf(this);return!r.some((i,c)=>{let{suspender:p}=i;return p?o==="together"||o==="forwards"&&c<=s||o==="backwards"&&c>=s:!1})}resolve(t){let{component:n,transition:o,suspender:r,childManagers:s}=this,a=o.pendingSuspense||[];if(t!==r)return;if(!r){s.forEach(l=>{l.handleSuspense()});return}this.suspender=null,mo(this.component);let i=o.transitionState===K,c=a.filter(l=>l.suspenseManagers[o.transitionId].suspender).length;!i&&!c&&(o.transitionState=Ee);let p=()=>{let l=n;v(n)||(l=this.fiber.root.wip.nodeInstance),M(l)};setTimeout(()=>{i||!a.includes(n)?Je(p):se(o,p)},hn()%dn)}getChildrenSuspenders(){let t=[];return this.childManagers.forEach(n=>{n.isSuspenseList?t=t.concat(n.getChildrenSuspenders()):n.suspender&&t.push(n.suspender)}),t}handleSuspenseList(){let{component:t,childManagers:n}=this,{revealOrder:o="together",tail:r}=t.props,s=(i,c)=>i.then(()=>(o==="forwards"&&r==="collapsed"&&fr(c),c.handleSuspense())),a=Promise.all(this.getChildrenSuspenders());if(o==="together")a.then(()=>{n.forEach(i=>i.handleSuspense())});else if(o==="forwards"){let i=je;for(let c=0,p=n.length;c<p;c++)i=s(i,n[c])}else if(o==="backwards"){let i=je;for(let c=n.length-1;c>=0;c--)i=s(i,n[c])}return a}};function fo(e){let t=N(),n=Q(t,U);return n.transitionState===Ee&&!n.pendingSuspense.includes(e)&&(n=U),n}var V=class extends R{constructor(t){super(t),this.suspenseManagers={}}render(){return this.props.children}},De=class extends R{constructor(t){super(t),this.suspenseManagers={}}handleSuspender(t,n){let o=fo(this),r=Gt(n,o);Ne(o)||(o.pendingSuspense.includes(this)||o.pendingSuspense.push(this),o.transitionState=ae),r.suspend(t)}render(){let{fallback:t,children:n}=this.props,o=fo(this),r=N(),s=Gt(r,o);return s.shouldRenderChildren()?n:s.shouldShowFallback()?t:null}},To=e=>{let t,n=st((o,r)=>{let s=t.read();return I(s.default,{...o,ref:r})});return n.__loadLazyComponent=()=>{t||(t=yn(e()))},n};function mr(e){return e.split(",").map(n=>{let[o,r,s]=n.split("|"),a=o==="0",i=o==="2";return{isAttribute:a,refNodeIndex:r?Number(r):-1,attrIndex:a?Number(s):-1,prevChildIndex:!a&&s?Number(s):-1,hasExpressionSibling:i,tagAttrs:void 0}})}var Pe=class{constructor(t,n){this.strings=t,this.template=null,this.svgTemplate=null,this.partsMeta=[],this.partMetaCode=n}create(t){t&&this.svgTemplate||this.template||(this.partsMeta.length||(this.partsMeta=mr(this.partMetaCode)),this.createTemplate(t))}createTemplate(t){let{strings:n}=this,o=document.createElement("template"),r=n.join("");if(o.innerHTML=t?`<svg>${r}</svg>`:r,t){let{content:a}=o,i=a.firstChild;for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}let s=t?"svgTemplate":"template";this[s]=o}};var ho=new WeakMap;function Tr(e,t){let n=Ve(null,t,void 0);return n.nodeType=gt,n.template=e,n}function Eo(e,...t){return n=>{let o=ho.get(e);return o||(o=new Pe(e,n),ho.set(e,o)),Tr(o,t)}}function Wt(e,t){let{__rootFiber:n}=t,o;if(n)o=n.current,o.node.props.children=e,o.processedTime=0,L(o,S);else{let r=I(le,{children:e}),s={parentNode:t,previousSibling:null,isNode:!0};n=Xe(t),o=ue(n,r,s),o.parent=n,n.current=o,t.__rootFiber=n}return fe(()=>{n.updateSource=re(),ct(o)}),e&&e.nodeType===D?o.child.nodeInstance:null}function hr(e,t){return e&&(e.portalContainer=t),e}var yo=hr;function Er(e){let{__rootFiber:t}=e;return t?(oe(t.current),me(t),e.__rootFiber=void 0,!0):!1}var go=Er;var yr=/<([^\s"'=<>/]+)/g,Co=/\s*([^\s"'=<>/]*)/g,gr=/[^"]*/g,Cr=/[^"]*/g,Sr=/<\/([^\s"'=<>]+)>/g,Nr=/[^<]*/g,_r=/<!--.*?-->/g,Ar=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function xr(e){let t=[],n=!1,o,r={},s=(p,l)=>{p.children?Array.isArray(p.children)?p.children.push(l):p.children=[p.children,l]:p.children=l},a=p=>{let l=t[t.length-1];s(l?l.props:r,p)},i=()=>{n=!1,a(o),Ar.includes(o.type)||t.push(o)},c=p=>{let l={$$BrahmosDynamicPart:p};o?n?o.props[`$$BrahmosDynamicPart${p}`]=l:s(o.props,l):s(r,l)};return e.forEach((p,l)=>{let f=p.length,m,u=0,T=E=>{E.lastIndex=u;let h=E.exec(p);return h&&(u=E.lastIndex),h},_=E=>{E.lastIndex=u+2;let h=E.exec(p);return u=E.lastIndex+1,h[0]};for(;u<f;){if(p[u]==="<"&&p[u+1]==="/"){t.pop(),T(Sr);continue}else if(p[u]==="<"&&p[u+1]==="!"){T(_r);continue}else if(p[u]==="<"){m=T(yr)[1],o={$$typeof:we,type:m,nodeType:Z,props:{}},n=!0;continue}else if(p[u]===" "&&n){Co.lastIndex=u;let E=T(Co),h,g;if(E){h=E[1],p[u]!=="="?g=!0:p[u+1]==='"'?g=_(gr):p[u+1]==="'"&&(g=_(Cr)),h&&(o.props[h]=g);continue}}else if(p[u]===">"&&n)i();else if(!n){let E=T(Nr);a(E[0]);continue}u++}c(l)}),r.children}var{hasOwnProperty:Fr}=Object.prototype;function So(e,t){if(e==null||typeof e!="object")return e;let n=new e.constructor;for(var o in e)if(Fr.call(e,o)){let r=e[o],s=r&&r.$$BrahmosDynamicPart;if(s!==void 0){let a=t[s];o[0]==="$"?n=Object.assign(n,a):n[o]=a}else n[o]=So(e[o],t)}return n}function Oe(e){let{values:t,template:n}=e,{strings:o}=n;return n.staticTree||(n.staticTree=xr(o)),So(n.staticTree,t)}function Rr(e){return B(e)&&!e.template.strings.some(Boolean)}function No(e){let t=[];return e.forEach(n=>{Array.isArray(n)?t=t.concat(No(n)):n&&J(n)?t.push(Oe(n)):t.push(n)}),t}function Ue(e){if(q(e))return;if(typeof e=="boolean")return[];if(e[d])return e[d];let t=e;return Rr(t)&&(t=t.values),J(t)&&(t=Oe(t)),Array.isArray(t)||(t=[t]),t=No(t),e[d]=t,t}function br(e,t){let n=Ue(e);return n?n.map(t):e}function Ir(e){return(Ue(e)||[]).map((n,o)=>(n&&n.key===void 0&&(n.key=o),n))}function Dr(e,t){(Ue(e)||[]).forEach(t)}function Pr(e){return Ue(e)&&e.length===1}function Or(e){let t=Ue(e);return t?t.length:0}var _o={map:br,toArray:Ir,forEach:Dr,only:Pr,count:Or};function Ao(e){return e&&(A(e)||G(e))}function Xt(e,t){t=t||{};let n=arguments.length;if(n>2){let o=n>3?$(arguments,2):arguments[2];t.children=o}if(e){if(J(e)){let o=Oe(e);return Xt(o,t)}else if(A(e)||G(e)){let o=e.type,r=typeof o=="function"&&o.prototype&&o.prototype.isReactComponent,s=typeof o=="function"&&!r||o.__isForwardRef;return{...e,props:{...e.props,...ce(t,s)},ref:s?null:t.ref}}}return e}function qt(e,t){class n extends ie{render(){return I(e,this.props)}}return n.displayName=`Memo(${e.displayName||e.name})`,n}function xo(e){let t=e[ke];return t||(t=Xe(e),e[ke]=t),{render(n){let o=t.current;if(o)o.node.props.children=n,o.processedTime=0,L(o,y);else{let s=I(le,{children:n});o=ue(t,s,{parentNode:e,previousSibling:null,isNode:!0}),o.parent=t,t.current=o}let r=U;t.pendingTransitions.includes(r)||t.pendingTransitions.push(r),b(C,()=>{t.updateSource=C,Ie(t)})},unmount(){t.cancelSchedule&&(t.cancelSchedule(),t.cancelSchedule=null);let n=t.current;n&&(n.shouldTearDown=!0,t.tearDownFibers.push(n),me(t),t.current=null),delete e[ke]}}}function Qt(e){if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status==="pending"||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})),e)}function Fo(e){if(!N())throw new Error("use() must be called during render.");if(e&&typeof e.then=="function")return Qt(e);throw new Error("Unsupported type passed to use()")}function Ur(e){let t=Promise.resolve(),n=new Set,o=e(r=>{n.forEach(s=>s(r))});return t._watch={unsubscribe:r=>{r&&n.delete(r),n.size===0&&o&&o()},subscribe:r=>n.add(r)},t}function pt(e){Ro(e)}pt.create=Ur;pt.sync=e=>{Ro(e,{sync:!0})};function Ro(e,t={}){xe(()=>{var r;let n=N(),o=n?n.nodeInstance:null;if(!o)throw new Error("watch() must be called during render.");if(e._watch&&!((r=o.__unmount)!=null&&r.has(e))){let s=()=>{let a=v(o);if(a){let i=t.sync?O:C;b(i,()=>{o[d].isDirty=!0,F(a,x),M(o)})}};e._watch.subscribe(s),o.__unmount.set(e,()=>e._watch.unsubscribe(s))}Qt(e)})}var bo=e=>e.children,vr=bo,Mr=bo;function wr(e){e()}var Lr=I,kr=I,Hr=I;var Ec=Zt;export{_o as Children,R as Component,Mr as Fragment,ie as PureComponent,vr as StrictMode,De as Suspense,V as SuspenseList,Xt as cloneElement,xt as createContext,uo as createElement,yo as createPortal,Zn as createRef,xo as createRoot,Ec as default,st as forwardRef,Eo as html,Ao as isValidElement,Lr as jsx,Hr as jsxDev,kr as jsxs,To as lazy,qt as memo,Wt as render,xe as startTransition,go as unmountComponentAtNode,wr as unstable_batchedUpdates,Je as unstable_deferredUpdates,fe as unstable_syncUpdates,Fo as use,Ln as useCallback,Bn as useContext,Hn as useDebugValue,Kn as useDeferredValue,It as useEffect,Dt as useLayoutEffect,bt as useMemo,wn as useReducer,Mn as useRef,Rt as useState,Yn as useTransition,pt as watch};
3
+ ${P.componentStack}`;console.error(W),k.childFiberError={error:g,errorInfo:P},$n(k)}else throw g;return}finally{Nt(null);let g=u[d];if(m&&p){let{committedValues:k}=g;Object.assign(u,k)}}}if(f||l){let{child:h}=e,{nodes:g}=_;!h||h.node!==g?(ne(g,n,h,e,e),F(e,x)):f||te(e)}else te(e)}function Gn(e){let{node:t,alternate:n}=e,o=n&&n.node;t!==o&&F(e,x)}function vt(e,t){let{type:n}=e,o=t?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);return Ye(o),{fragment:[o],domNodes:[o],parts:[{previousSibling:null,parentNode:o,isNode:!0}]}}function Vo(e){return!!e&&e.nodeType===8&&e.textContent===sn}var Fe=class{constructor(t,n){this.templateResult=t,t.create(n),this.fragment=this.createNode(n),this.parts=this.getParts(),this.domNodes=$(this.fragment.childNodes),this.patched=!1}createNode(t){let{template:n,svgTemplate:o}=this.templateResult,r=t?o:n;return document.importNode(r.content,!0)}getParts(){let{fragment:t,templateResult:n}=this,{partsMeta:o}=n,r=[],s=t.querySelectorAll("*");for(let a=0,i=o.length;a<i;a++){let c=o[a],{isAttribute:p,attrIndex:l,refNodeIndex:f,prevChildIndex:m,hasExpressionSibling:u}=c,T=s[f];if(p)c.tagAttrs||(c.tagAttrs=$(T.attributes)),r.push({isAttribute:!0,tagAttrs:c.tagAttrs,domNode:T,attrIndex:l}),Ye(T);else{T=T||t;let _=m!==-1,E,h=T.childNodes[m+1];_&&Vo(h)&&ge(h),_?u?E=En(T,m):E=T.childNodes[m]:E=null,r.push({isNode:!0,parentNode:T,previousSibling:E})}}return r}patchParts(t){let{parts:n}=this,{parentNode:o,previousSibling:r}=t;if(!this.patched){for(let s=0,a=n.length;s<a;s++){let i=n[s];i.isNode&&i.parentNode instanceof DocumentFragment&&(i.parentNode=o,i.previousSibling=i.previousSibling||r)}this.patched=!0}}};function Wo(e,t,n){let o=e.lastIndexOf(t);return n<=o}function Xo(e,t){return{nodeType:z,props:e,ref:t}}function qo(e,t,n){let o=n,r=n.child;for(let s=0,a=e.length;s<a;s++){let i=e[s],c=t[s],p;if(i.isAttribute){let{domNode:l}=i,f={},m;for(;i&&l===i.domNode;)ye(t[s],(u,T)=>{let _=i,E=Be(u);!Wo(_.tagAttrs,E,_.attrIndex)&&!an[u]?f[u]=T:u==="ref"&&(m=T)}),i=e[++s];s--,i=e[s],p=Xo(f,m)}else i.isNode&&(p=c);o=ne(p,i,r,o,n),r=r&&r.sibling}}function Mt(e){let{node:t}=e,{part:n,alternate:o,parent:{context:r}}=e,s=o&&o.node,{values:a,nodeType:i}=t,c=i===Z,p=e.isSvgPart||t.type==="svg";e.isSvgPart=p;let{nodeInstance:l}=e;l||(l=c?vt(t,p):new Fe(t.template,p),e.nodeInstance=l),c||l.patchParts(n),t!==s?c?ne(t.props.children,l.parts[0],e.child,e,e):qo(l.parts,a,e):te(e),F(e,x),e.context=r}function Vn(e,t){let{type:n}=t,o=ht(t);return dt[e]?dt[e]:/^change(textarea|input)/i.test(e+o)&&!pn.test(n)?"input":e}function wt(e){let{type:t}=e,n=ht(e);if(n==="input"&&(t==="radio"||t==="checkbox"))return"checked";if(n==="input"||n==="select"||n==="textarea")return"value"}function Wn(e){let t=wt(e);if(!t)return;let n=e[`${t}Prop`],o=e[t];n!==void 0&&n!==o&&(e[t]=n)}function Xn(e,t,n,o){e==="checked"?n==="checked"?(t.checked=o,t.checkedProp=o):n==="defaultChecked"&&t.checkedProp===void 0?t.checked=o:t[n]=o:e==="value"&&(n==="value"?(t.value=o,t.valueProp=o):n==="defaultValue"&&t.valueProp===void 0?t.value=o:t[n]=o)}function qn(e,t,n){let o=e.__brahmosData.events,r=o[t];return r?(r.handler=n,r.patched):(r=o[t]={handler:n,patched:null},r.patched=function(s){r.handler&&fe(()=>{r.handler.call(this,s)})},r.patched)}function Qn(e,t,n,o){t=t||{},ye(e,(r,s)=>{let a=t[r];s!==a&&o(r,s,a)}),ye(t,(r,s)=>{e[r]===void 0&&s!==void 0&&o(r,n,s)})}function Qo(e,t,n,o,r){if(t==="children")return;if(mn(t)){let a=t.substr(-7)==="Capture"&&t.substr(-14,7)==="Pointer",i=Tn(t,a);i=Vn(i,e);let c=qn(e,t,n);o&&!n?e.removeEventListener(i,c,a):!o&&n&&e.addEventListener(i,c,a)}else if(t==="style"){let{style:a}=e;Qn(n||{},o,"",(i,c)=>{i[0]==="-"?a.setProperty(i,c):a[i]=typeof c=="number"&&un.test(i)===!1?c+"px":c})}else if(t==="dangerouslySetInnerHTML"){let a=o&&o.__html,i=n&&n.__html;i!==a&&(e.innerHTML=i==null?"":i)}else if(t in e&&!r){let a=wt(e);a?Xn(a,e,t,n):e[t]=n==null?"":n}else{t=Be(t);let a=t.replace(/^xlink:?/,""),i=n==null||n===!1;t!==a?(a=a.toLowerCase(),i?e.removeAttributeNS(ft,a):e.setAttributeNS(ft,a,n)):i?e.removeAttribute(t):e.setAttribute(t,n)}}function Lt(e,t,n,o){Qn(t,n,null,(r,s,a)=>{Qo(e,r,s,a,o)}),Wn(e)}function st(e){function t(n){return e(ce(n,!1),n.ref)}return t.__isForwardRef=!0,t.$$typeof=rn,t}function Zn(){return{current:null}}function Re(e,t){typeof e=="function"?e(t):typeof e=="object"&&(e.current=t)}function Zo(e){let{node:t,alternate:n}=e,o=e.part,{parentNode:r,previousSibling:s}=o,a=pe(r,s);n&&a?a.nodeValue=t:Ke(r,a,t)}function Jo(e){for(;e.child&&e.node&&!B(e.node);)e=e.child;return e}function Jn(e,t){let{domNodes:n}=t;e[Le]=n[n.length-1]}function eo(e,t){if(e.isArrayNode&&e.nodeIndex===0)for(;e=e.parentArrayPart;)e.firstDOMNode=t}function to(e){let{previousSibling:t}=e;if(e.isArrayNode){let{firstDOMNode:n,nodeIndex:o}=e;o>0?t=e.parentNode[Le]:e.parentArrayPart&&(t=n?n.previousSibling:e.parentNode[Le])}return t}function no(e,t){let{part:n}=e;if(!n.isArrayNode)return;let{nodeIndex:o,parentNode:r}=n,s=t.part.nodeIndex,a=Jo(e),{nodeInstance:i}=a,c=a!==e&&a.hasUncommittedEffect;if(!(!i||c)){if(o!==s){let{domNodes:p}=i,l=to(n),f=pe(r,l),m=p[0];m&&m.previousSibling!==l&&m!==f&&Ke(r,f,p),eo(n,m)}Jn(r,i)}}function er(e){let{nodeInstance:t,alternate:n,node:o}=e,r=e.part,{parentNode:s}=r,a=G(o);if(a&&oo(e,t.domNodes[0]),n)no(e,n);else{let i=to(r),c=pe(s,i),p=Ke(s,c,t.fragment);a||(t.domNodes=p),eo(r,p[0]),Jn(s,t)}}function tr(e){let{node:t,nodeInstance:n,root:o}=e,{updateType:r}=o,{nodeType:s}=t,a=n[d],i=r===y;if(s===D){i&&Object.assign(n,a.memoizedValues);let{props:l,state:f}=a.committedValues;a.lastSnapshot=w(n,"getSnapshotBeforeUpdate",[l,f])}else ot(e,!1);let{transitionId:c}=Q(e,null),p=Ze(r);a[p]=i?a[p].filter(l=>l.transitionId!==c):[],a.isDirty=!1,a.renderCount=0,o.postCommitEffects.push(e)}function nr(e){let{node:t,nodeInstance:n,root:o,childFiberError:r}=e,{updateType:s}=o,{nodeType:a,ref:i}=t,c=n[d];if(a===D){let{props:p,state:l}=n,{committedValues:f,lastSnapshot:m}=c,{props:u,state:T}=f;u?w(n,"componentDidUpdate",[u,T,m]):w(n,"componentDidMount"),r&&(w(n,"componentDidCatch",[r.error,r.errorInfo]),e.childFiberError=null),i&&Re(i,n),f.props=p,f.state=l,c.memoizedValues=null}else if(jn(e),s===y){let{syncHooks:p,deferredHooks:l}=n;n.deferredHooks=p,n.syncHooks=l}c.mounted=!0,c.fiber=e}function oo(e,t){let{node:n,alternate:o,isSvgPart:r}=e,{props:s,ref:a}=n,i=o&&o.node.props;Lt(t,s,i,r),a&&Re(a,t)}function it(e){e.tearDownFibers=[],e.postCommitEffects=[],e.hasUncommittedEffect=!1,e.retryFiber=null,e.resetRenderCallbacks()}function or(e){e.node=null,e.nodeInstance=null,e.child=null,e.sibling=null}function kt(e){let{currentTransition:t,pendingTransitions:n}=e,o=n.indexOf(t);o!==-1&&n.splice(o,1)}function rr(e){let{node:t,alternate:n}=e,o=t&&A(t);o&&n&&no(e,n),e.hasUncommittedEffect===x&&(Y(t)?Zo(e):B(t)?er(e):o?tr(e):t.nodeType===z&&oo(e,e.part.domNode),e.hasUncommittedEffect=He),n&&or(n)}function ro(e){let{updateType:t,wip:n,current:o}=e,r=ee(t),s=e[_e(t)],a=[],i=t===S?o:n;for(;i;){let{createdAt:c,node:p,child:l,hasUncommittedEffect:f}=i,m=i[r],u=c>s,T=f||m>s;if(f&&a.push(i),u&&(l&&l.parent!==i&&(l.parent=i),p&&A(p)&&(i.nodeInstance[d].fiber=i)),l&&T)i=l;else{for(;i!==e&&!i.sibling;)i=i.parent;i=i.sibling}}return a}function Ht(e,t){for(let o=0,r=t.length;o<r;o++)rr(t[o]);let{postCommitEffects:n}=e;for(let o=n.length-1;o>=0;o--)nr(n[o]);kt(e),it(e),e.forcedUpdateWith=null}function Bt(e){let{node:t,part:n}=e,o=e,{parentNode:r,previousSibling:s,firstDOMNode:a}=n,i=new Map,c=0,p=e;for(;p=_n(p,e);){let l=St(p.node,c);i.set(l,p),c++}e.child=null,t.forEach((l,f)=>{let m=St(l,f),u=i.get(m);u&&i.delete(m);let T=o;o=ne(l,{parentNode:r,previousSibling:s,a:void 0,firstDOMNode:a,isArrayNode:!0,nodeIndex:f,parentArrayPart:n.isArrayNode?n:null},u,T,e),o.sibling=null,u&&u.part.nodeIndex!==f&&(F(o,mt),f!==0&&F(T,mt))}),i.forEach(l=>{oe(l)}),F(e,x)}function so(e,t,n,o){let r=e.part.parentNode!==t.parentNode&&n?!1:o,{node:s}=e;s&&s.portalContainer&&(r=!0),io(e,r)}function io(e,t){let{node:n,part:o,nodeInstance:r}=e;if(e.shouldTearDown=!1,!Ge(n))return;let s=B(n),{child:a}=e;if(a)for(so(a,o,s,t);a.sibling;)a=a.sibling,so(a,o,s,t);if(Y(n)&&t){let c=pe(o.parentNode,o.previousSibling);c&&ge(c);return}let{ref:i}=n;if(i&&Re(i,null),!!r)if(s){let{domNodes:c}=r;t&&ge(c)}else A(n)&&$e(r)&&(r.__unmount.forEach(c=>c()),r.__unmount.clear(),n.nodeType===D?w(r,"componentWillUnmount"):ot(e,!0))}function me(e){let{tearDownFibers:t}=e;t.forEach(n=>{n.shouldTearDown&&io(n,!0)}),e.tearDownFibers=[]}var ao=5,sr=30,Yt=16,ir=300,ar=600,po;requestAnimationFrame(e=>{po=e});var Kt=()=>performance.now(),co=()=>!0,lo=(e,t)=>(t=t||Yt,t-(e-po)%t),jt,be;if(typeof MessageChannel!="undefined"){be=[];let e=new MessageChannel;e.port1.onmessage=function(){be.forEach(t=>t())},jt=e.port2}function cr(e){if(!jt||lo(Kt())<1){let t=()=>{r(),e()},n=setTimeout(t,1),o=requestIdleCallback(t),r=()=>{clearTimeout(n),cancelIdleCallback(o)};return r}return be.push(e),jt.postMessage(null),()=>{let t=be.indexOf(e);t!==-1&&be.splice(t,1)}}function $t(e,t,n){let{cancelSchedule:o}=e;if(o&&(o(),e.cancelSchedule=null),t){e.cancelSchedule=cr(()=>{let{currentTransition:r}=e,s=r?r.tryCount:0,a=r===U?ir:ar,i=Kt(),c=Math.min(sr,ao+s),p=Math.floor(c/Yt)*Yt,l=()=>{let u=Kt(),T=lo(u,p),_=i+Math.min(ao,T);return u<_},m=s>a?co:l;n(m)});return}n(co)}function pr(e){let{node:t,nodeInstance:n}=e;return A(t)&&n?!!de(e).length||n[d].isDirty:!1}function lr(e){let{node:t,alternate:n}=e;if(!Ge(t)){n&&oe(n);return}let o=pr(e);if(e.processedTime&&!o){te(e);return}Y(t)?Gn(e):Array.isArray(t)?Bt(e):B(t)?Mt(e):A(t)?Ut(e):t.nodeType===z&&F(e,x),e.processedTime=j()}function ur(e){return e.updateType===S?!0:e.currentTransition?e.lastCompleteTime>=e.updateTime&&e.hasUncommittedEffect&&Ne(e.currentTransition):!1}var dr={fn:e=>{let{updateType:t,current:n}=e,o=_e(t);me(e);let r=ro(e);e[o]=e.lastCompleteTime=j(),t===y&&(e.current=e.wip,e.wip=n),b(O,()=>Ht(e,r))}};function at(e,t){let{root:n}=e,{updateType:o,currentTransition:r}=n,s=_e(o),a=ee(o),i=n[s],c=!Fn(n);$t(n,c,p=>{for(;e!==t;)if(p()){lr(e);let{retryFiber:f}=n;f?(e=f,t=n,n.retryFiber=null):e=An(e,t,i,a)}else{at(e,t);return}if(n.callRenderCallbacks(),r){let f=e===t&&!n.retryFiber,m=r.transitionState!==ae;f&&m&&(gn(r),r.tryCount=0),!n.hasUncommittedEffect&&Ne(r)&&kt(n)}ur(n)&&dr.fn(n),yt(n)&&b(C,()=>{n.updateSource=C,Ie(n)})})}function Ie(e){let t=yt(e);t&&(e.updateType=y,it(e),e.currentTransition=t,t.tryCount+=1,e.wip=We(e.current,e.wip,e,e),at(e.wip,e))}function ct(e){let{root:t,parent:n}=e;t.updateType=S,t.currentTransition=null,it(t),at(e,n)}function M(e){let t=v(e),{root:n}=t,{pendingTransitions:o,batchUpdates:r}=n,s=re(),a=_t(),i=Ae();if(L(t,i),s===C&&!o.includes(a)&&(a===U?o.unshift(a):o.push(a)),r[s]){r[s]+=1;return}r[s]=1,Ce(()=>{let c=r[s];r[s]=0;let p=s===C;if(!(p&&n.lastCompleteTime<n.updateTime))if(n.updateSource=s,p)Ie(n);else{let l=n.updateType===S&&n.cancelSchedule;ct(s===O&&!l&&c===1?t:n.current)}})}var R=class{constructor(t){this.props=t,this.state=void 0,this.context=void 0,this[d]={lastSnapshot:null,pendingSyncUpdates:[],pendingDeferredUpdates:[],fiber:null,nodes:null,mounted:!1,committedValues:{},memoizedValues:null,isDirty:!1,renderCount:0}}setState(t,n){et(this,r=>({state:t,transitionId:r,callback:n}))&&M(this)}forceUpdate(t){let n=this[d],{fiber:o}=n;o&&(o.root.forcedUpdateWith=this,this[d].isDirty=!0,M(this),t&&t(this.state))}render(){}__render(){let t=this.render();return this[d].nodes=t,t}};R.prototype.isReactComponent=!0;var ie=class extends R{};ie.prototype.isPureReactComponent=!0;function I(e,t,n){if(!e||typeof e!="string"&&typeof e!="function"){let c="Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(e===null?"null":typeof e)+".";throw(typeof e=="undefined"||typeof e=="object"&&e!==null)&&(c+=`
4
+
5
+ You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.`),new Error(c)}let{ref:o}=t;n===void 0&&(n=t.key);let r=typeof e=="function"&&e.prototype&&e.prototype.isReactComponent,s=typeof e=="function"&&!r||e.__isForwardRef;t=ce(t,s);let a=Ve(t,null,n);if(a.type=e,typeof e=="string")return a.nodeType=Z,a.ref=o,a;a.nodeType=r?D:Ct,a.ref=r?o:null,e.__loadLazyComponent&&e.__loadLazyComponent();let i=typeof e=="function"&&e.defaultProps;if(i)for(n in i)t[n]===void 0&&(t[n]=i[n]);return a}function uo(e,t,n){t=t||{};let r=arguments.length>3?$(arguments,2):n;return r&&(t.children=r),I(e,t,t.key)}function rt(e,t){let{root:n}=e,{nodeInstance:o}=e;for(;!(o instanceof De||t&&o instanceof V);){if(e=e.parent,e===n)return null;o=e.nodeInstance}return e}function zn(e){let t=rt(e.parent,!0);if(!(t&&t.nodeInstance instanceof V))return e;let{nodeInstance:o}=t,{childManagers:r}=o.suspenseManagers[Q(e,null).transitionId],{revealOrder:s}=o.props;return s==="backwards"||s==="together"?(r.forEach(a=>{a.component[d].isDirty=!0}),r[0].fiber):e}function zt(e){let{parentSuspenseManager:t}=e;return t&&t.isSuspenseList?t:null}function Gt(e,t){let{nodeInstance:n}=e,{suspenseManagers:o}=n,{transitionId:r}=t,s=o[r];return s||(s=o[r]=new Vt(e,t)),t.transitionState===X&&(s.suspender=null),s}function mo(e){e[d].isDirty=!0}function fr(e){let t=v(e.component);e.isUnresolved()&&t&&(mo(e.component),L(t,y))}var Vt=class{constructor(t,n){let{nodeInstance:o}=t;this.fiber=t,this.component=o,this.transition=n,this.childManagers=[],this.suspender=null,this.isSuspenseList=o instanceof V;let r=rt(t.parent,!0);this.parentSuspenseManager=r&&Gt(r,n),this.recordChildSuspense(),this.handleSuspense=this.handleSuspense.bind(this)}recordChildSuspense(){let{parentSuspenseManager:t}=this;t?(t.childManagers.push(this),this.rootSuspenseManager=t.rootSuspenseManager):this.rootSuspenseManager=this}addRootToProcess(){let{rootSuspenseManager:t}=this,{root:n}=N();n.afterRender(t.handleSuspense)}suspend(t){this.suspender=t,this.addRootToProcess()}handleSuspense(){let{component:t,suspender:n}=this;return t instanceof V?this.handleSuspenseList():Promise.resolve(n).then(this.resolve.bind(this,n))}isUnresolved(){return this.isSuspenseList?this.childManagers.some(t=>t.isUnresolved()):this.suspender}shouldShowFallback(){let t=zt(this);if(!t)return!0;let{component:n,childManagers:o}=t,{tail:r}=n.props;if(zt(t)&&!t.shouldShowFallback())return!1;if(r==="collapsed")for(let a=0,i=o.length;a<i;a++){let c=o[a];if(r==="collapsed"&&c.isUnresolved())return c===this}return r!=="hidden"}shouldRenderChildren(){let t=zt(this),{suspender:n}=this;if(!t)return!n;if($e(this.component)&&!n)return!0;let{component:{props:{revealOrder:o}},childManagers:r}=t,s=r.indexOf(this);return!r.some((i,c)=>{let{suspender:p}=i;return p?o==="together"||o==="forwards"&&c<=s||o==="backwards"&&c>=s:!1})}resolve(t){let{component:n,transition:o,suspender:r,childManagers:s}=this,a=o.pendingSuspense||[];if(t!==r)return;if(!r){s.forEach(l=>{l.handleSuspense()});return}this.suspender=null,mo(this.component);let i=o.transitionState===K,c=a.filter(l=>l.suspenseManagers[o.transitionId].suspender).length;!i&&!c&&(o.transitionState=Ee);let p=()=>{let l=n;v(n)||(l=this.fiber.root.wip.nodeInstance),M(l)};setTimeout(()=>{i||!a.includes(n)?Je(p):se(o,p)},hn()%dn)}getChildrenSuspenders(){let t=[];return this.childManagers.forEach(n=>{n.isSuspenseList?t=t.concat(n.getChildrenSuspenders()):n.suspender&&t.push(n.suspender)}),t}handleSuspenseList(){let{component:t,childManagers:n}=this,{revealOrder:o="together",tail:r}=t.props,s=(i,c)=>i.then(()=>(o==="forwards"&&r==="collapsed"&&fr(c),c.handleSuspense())),a=Promise.all(this.getChildrenSuspenders());if(o==="together")a.then(()=>{n.forEach(i=>i.handleSuspense())});else if(o==="forwards"){let i=je;for(let c=0,p=n.length;c<p;c++)i=s(i,n[c])}else if(o==="backwards"){let i=je;for(let c=n.length-1;c>=0;c--)i=s(i,n[c])}return a}};function fo(e){let t=N(),n=Q(t,U);return n.transitionState===Ee&&!n.pendingSuspense.includes(e)&&(n=U),n}var V=class extends R{constructor(t){super(t),this.suspenseManagers={}}render(){return this.props.children}},De=class extends R{constructor(t){super(t),this.suspenseManagers={}}handleSuspender(t,n){let o=fo(this),r=Gt(n,o);Ne(o)||(o.pendingSuspense.includes(this)||o.pendingSuspense.push(this),o.transitionState=ae),r.suspend(t)}render(){let{fallback:t,children:n}=this.props,o=fo(this),r=N(),s=Gt(r,o);return s.shouldRenderChildren()?n:s.shouldShowFallback()?t:null}},To=e=>{let t,n=st((o,r)=>{let s=t.read();return I(s.default,{...o,ref:r})});return n.__loadLazyComponent=()=>{t||(t=yn(e()))},n};function mr(e){return e.split(",").map(n=>{let[o,r,s]=n.split("|"),a=o==="0",i=o==="2";return{isAttribute:a,refNodeIndex:r?Number(r):-1,attrIndex:a?Number(s):-1,prevChildIndex:!a&&s?Number(s):-1,hasExpressionSibling:i,tagAttrs:void 0}})}var Pe=class{constructor(t,n){this.strings=t,this.template=null,this.svgTemplate=null,this.partsMeta=[],this.partMetaCode=n}create(t){t&&this.svgTemplate||this.template||(this.partsMeta.length||(this.partsMeta=mr(this.partMetaCode)),this.createTemplate(t))}createTemplate(t){let{strings:n}=this,o=document.createElement("template"),r=n.join("");if(o.innerHTML=t?`<svg>${r}</svg>`:r,t){let{content:a}=o,i=a.firstChild;for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}let s=t?"svgTemplate":"template";this[s]=o}};var ho=new WeakMap;function Tr(e,t){let n=Ve(null,t,void 0);return n.nodeType=gt,n.template=e,n}function Eo(e,...t){return n=>{let o=ho.get(e);return o||(o=new Pe(e,n),ho.set(e,o)),Tr(o,t)}}function Wt(e,t){let{__rootFiber:n}=t,o;if(n)o=n.current,o.node.props.children=e,o.processedTime=0,L(o,S);else{let r=I(le,{children:e}),s={parentNode:t,previousSibling:null,isNode:!0};n=Xe(t),o=ue(n,r,s),o.parent=n,n.current=o,t.__rootFiber=n}return fe(()=>{n.updateSource=re(),ct(o)}),e&&e.nodeType===D?o.child.nodeInstance:null}function hr(e,t){return e&&(e.portalContainer=t),e}var yo=hr;function Er(e){let{__rootFiber:t}=e;return t?(oe(t.current),me(t),e.__rootFiber=void 0,!0):!1}var go=Er;var yr=/<([^\s"'=<>/]+)/g,Co=/\s*([^\s"'=<>/]*)/g,gr=/[^"]*/g,Cr=/[^"]*/g,Sr=/<\/([^\s"'=<>]+)>/g,Nr=/[^<]*/g,_r=/<!--.*?-->/g,Ar=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function xr(e){let t=[],n=!1,o,r={},s=(p,l)=>{p.children?Array.isArray(p.children)?p.children.push(l):p.children=[p.children,l]:p.children=l},a=p=>{let l=t[t.length-1];s(l?l.props:r,p)},i=()=>{n=!1,a(o),Ar.includes(o.type)||t.push(o)},c=p=>{let l={$$BrahmosDynamicPart:p};o?n?o.props[`$$BrahmosDynamicPart${p}`]=l:s(o.props,l):s(r,l)};return e.forEach((p,l)=>{let f=p.length,m,u=0,T=E=>{E.lastIndex=u;let h=E.exec(p);return h&&(u=E.lastIndex),h},_=E=>{E.lastIndex=u+2;let h=E.exec(p);return u=E.lastIndex+1,h[0]};for(;u<f;){if(p[u]==="<"&&p[u+1]==="/"){t.pop(),T(Sr);continue}else if(p[u]==="<"&&p[u+1]==="!"){T(_r);continue}else if(p[u]==="<"){m=T(yr)[1],o={$$typeof:we,type:m,nodeType:Z,props:{}},n=!0;continue}else if(p[u]===" "&&n){Co.lastIndex=u;let E=T(Co),h,g;if(E){h=E[1],p[u]!=="="?g=!0:p[u+1]==='"'?g=_(gr):p[u+1]==="'"&&(g=_(Cr)),h&&(o.props[h]=g);continue}}else if(p[u]===">"&&n)i();else if(!n){let E=T(Nr);a(E[0]);continue}u++}c(l)}),r.children}var{hasOwnProperty:Fr}=Object.prototype;function So(e,t){if(e==null||typeof e!="object")return e;let n=new e.constructor;for(var o in e)if(Fr.call(e,o)){let r=e[o],s=r&&r.$$BrahmosDynamicPart;if(s!==void 0){let a=t[s];o[0]==="$"?n=Object.assign(n,a):n[o]=a}else n[o]=So(e[o],t)}return n}function Oe(e){let{values:t,template:n}=e,{strings:o}=n;return n.staticTree||(n.staticTree=xr(o)),So(n.staticTree,t)}function Rr(e){return B(e)&&!e.template.strings.some(Boolean)}function No(e){let t=[];return e.forEach(n=>{Array.isArray(n)?t=t.concat(No(n)):n&&J(n)?t.push(Oe(n)):t.push(n)}),t}function Ue(e){if(q(e))return;if(typeof e=="boolean")return[];if(e[d])return e[d];let t=e;return Rr(t)&&(t=t.values),J(t)&&(t=Oe(t)),Array.isArray(t)||(t=[t]),t=No(t),e[d]=t,t}function br(e,t){let n=Ue(e);return n?n.map(t):e}function Ir(e){return(Ue(e)||[]).map((n,o)=>(n&&n.key===void 0&&(n.key=o),n))}function Dr(e,t){(Ue(e)||[]).forEach(t)}function Pr(e){return Ue(e)&&e.length===1}function Or(e){let t=Ue(e);return t?t.length:0}var _o={map:br,toArray:Ir,forEach:Dr,only:Pr,count:Or};function Ao(e){return e&&(A(e)||G(e))}function Xt(e,t){t=t||{};let n=arguments.length;if(n>2){let o=n>3?$(arguments,2):arguments[2];t.children=o}if(e){if(J(e)){let o=Oe(e);return Xt(o,t)}else if(A(e)||G(e)){let o=e.type,r=typeof o=="function"&&o.prototype&&o.prototype.isReactComponent,s=typeof o=="function"&&!r||o.__isForwardRef;return{...e,props:{...e.props,...ce(t,s)},ref:s?null:t.ref}}}return e}function qt(e,t){class n extends ie{render(){return I(e,this.props)}}return n.displayName=`Memo(${e.displayName||e.name})`,n}function xo(e){let t=e[ke];return t||(t=Xe(e),e[ke]=t),{render(n){let o=t.current;if(o)o.node.props.children=n,o.processedTime=0,L(o,y);else{let s=I(le,{children:n});o=ue(t,s,{parentNode:e,previousSibling:null,isNode:!0}),o.parent=t,t.current=o}let r=U;t.pendingTransitions.includes(r)||t.pendingTransitions.push(r),b(C,()=>{t.updateSource=C,Ie(t)})},unmount(){t.cancelSchedule&&(t.cancelSchedule(),t.cancelSchedule=null);let n=t.current;n&&(n.shouldTearDown=!0,t.tearDownFibers.push(n),me(t),t.current=null),delete e[ke]}}}function Qt(e){if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status==="pending"||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})),e)}function Fo(e){if(!N())throw new Error("use() must be called during render.");if(e&&typeof e.then=="function")return Qt(e);throw new Error("Unsupported type passed to use()")}function Ur(e){let t=Promise.resolve(),n=new Set,o=e(r=>{n.forEach(s=>s(r))});return t._watch={unsubscribe:r=>{r&&n.delete(r),n.size===0&&o&&o()},subscribe:r=>n.add(r)},t}function pt(e){Ro(e)}pt.create=Ur;pt.sync=e=>{Ro(e,{sync:!0})};function Ro(e,t={}){xe(()=>{var r;let n=N(),o=n?n.nodeInstance:null;if(!o)throw new Error("watch() must be called during render.");if(e._watch&&!((r=o.__unmount)!=null&&r.has(e))){let s=()=>{let a=v(o);if(a){let i=t.sync?O:C;b(i,()=>{o[d].isDirty=!0,F(a,x),M(o)})}};e._watch.subscribe(s),o.__unmount.set(e,()=>e._watch.unsubscribe(s))}Qt(e)})}var bo=e=>e.children,vr=bo,Mr=bo;function wr(e){e()}var Lr=I,kr=I,Hr=I;var Ec=Zt;export{_o as Children,R as Component,Mr as Fragment,ie as PureComponent,vr as StrictMode,De as Suspense,V as SuspenseList,Xt as cloneElement,xt as createContext,uo as createElement,yo as createPortal,Zn as createRef,xo as createRoot,Ec as default,st as forwardRef,Eo as html,Ao as isValidElement,Lr as jsx,Hr as jsxDev,kr as jsxs,To as lazy,qt as memo,Wt as render,xe as startTransition,go as unmountComponentAtNode,wr as unstable_batchedUpdates,Je as unstable_deferredUpdates,fe as unstable_syncUpdates,Fo as use,Ln as useCallback,Bn as useContext,Hn as useDebugValue,Kn as useDeferredValue,It as useEffect,Dt as useLayoutEffect,bt as useMemo,wn as useReducer,Mn as useRef,Rt as useState,Yn as useTransition,pt as watch};
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "potatejs",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Super charged UI library with modern React API and native templates.",
5
5
  "author": "uniho",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "react",
10
+ "poteto",
11
+ "potetojs",
10
12
  "potate"
11
13
  ],
12
14
  "files": [