UNPKG

react-declarative

Version:

A React form builder which interacts with a JSON endpoint to generate nested 12-column grids with input fields and automatic state management in a declarative style. Endpoint is typed by TypeScript guards (IntelliSense available). This tool is based on ma

15 lines (13 loc) • 773 kB
import*as e from"react";import t,{createContext as n,useMemo as r,useContext as o,useState as i,useRef as a,useCallback as l,useEffect as c,useLayoutEffect as u,forwardRef as s,memo as d,Fragment as f,createElement as m,cloneElement as p,lazy as h,Suspense as v}from"react";import{useTheme as g,createTheme as b,ThemeProvider as y,alpha as w}from"@mui/material/styles";import{createMakeAndWithStyles as E,keyframes as x}from"tss-react";import C from"@mui/material/Box";import k from"@mui/material/CircularProgress";import S from"@mui/material/ListItemIcon";import L from"@mui/material/Typography";import N from"@mui/material/MenuItem";import I from"@mui/material/Divider";import M from"@mui/material/Menu";import*as R from"react-dom";import{flushSync as P}from"react-dom";import{v4 as A}from"uuid";import T from"@mui/material/Grid";import{Grid as D,alpha as j,Typography as O,Divider as F,useMediaQuery as _,Accordion as B,AccordionSummary as H,AccordionDetails as W,Paper as z,Box as V,debounce as Y,useTheme as U,lighten as q,Tooltip as $,darken as X,Button as G,Icon as K,List as Q,ListItem as J,ListItemIcon as Z,TextField as ee,Avatar as te,Grow as ne,createTheme as re,ThemeProvider as oe}from"@mui/material";import ie from"@mui/material/Checkbox";import ae from"@mui/material/FormControlLabel";import le from"@mui/material/FormGroup";import ce from"@mui/material/Button";import ue from"@mui/material/Stack";import se from"@mui/material/Autocomplete";import de from"@mui/material/TextField";import fe from"@mui/material/Radio";import me from"@mui/material/Paper";import pe from"@mui/material/Modal";import he from"@mui/material/InputAdornment";import ve from"@mui/material/IconButton";import ge from"@mui/material/List";import be from"@mui/material/ListItemButton";import ye from"@mui/icons-material/ArrowDropUp";import we from"@mui/icons-material/ArrowDropDown";import Ee from"@mui/icons-material/MoreVert";import xe from"@mui/material/Fab";import Ce from"@mui/material/LinearProgress";import ke from"@mui/material/Backdrop";import Se from"@mui/material/ListItemText";import Le from"@mui/icons-material/Close";import Ne from"@mui/icons-material/RadioButtonChecked";import Ie from"@mui/icons-material/RadioButtonUnchecked";import Me from"@mui/material/Chip";import Re from"@mui/icons-material/CheckBox";import Pe from"@mui/icons-material/CheckBoxOutlineBlank";import Ae from"@mui/material/RadioGroup";import Te from"@mui/material/Rating";import De from"dayjs";export{default as dayjs}from"dayjs";import je from"@mui/material/Popover";import Oe from"@mui/material/Toolbar";import Fe from"@mui/icons-material/KeyboardArrowLeft";import _e from"@mui/icons-material/KeyboardArrowRight";import Be from"@mui/icons-material/CalendarTodayOutlined";import He from"@mui/icons-material/ArrowForward";import We from"@mui/icons-material/AlarmOutlined";import ze from"@mui/material/Switch";import Ve from"@mui/material/Slider";import Ye from"@mui/material/ListItem";import Ue from"@mui/icons-material/Clear";import qe from"@mui/material/ListSubheader";import $e from"@mui/icons-material/Search";import Xe from"@mui/icons-material/ExpandMore";import Ge from"@mui/material/Tab";import Ke from"@mui/material/Tabs";import{createMemoryHistory as Qe,createBrowserHistory as Je}from"history";import Ze from"@mui/material/Dialog";import et from"@mui/material/DialogContent";import tt from"@mui/material/DialogActions";import nt from"@mui/material/DialogTitle";import rt from"@mui/material/Badge";import ot from"@mui/icons-material/Fullscreen";import it from"@mui/material/Table";import at from"@mui/material/TableBody";import lt from"@mui/material/TableHead";import ct from"@mui/material/TableContainer";import ut from"@mui/material/TableRow";import st from"@mui/material/TableCell";import dt from"@mui/material/TablePagination";import ft from"@mui/material/PaginationItem";import mt from"@mui/material/Pagination";import pt from"@mui/icons-material/ArrowUpward";import ht from"@mui/icons-material/ArrowDownward";import vt from"@mui/material/Tooltip";import gt from"@mui/material/TableSortLabel";import bt from"@mui/icons-material/Add";import yt from"@mui/icons-material/CleaningServicesOutlined";import wt from"@mui/icons-material/Refresh";import Et from"@mui/icons-material/Sort";import xt from"@mui/icons-material/Settings";import Ct from"@mui/material/Collapse";import kt from"@mui/icons-material/ExpandLess";import St from"@mui/icons-material/NotInterested";import Lt from"@mui/icons-material/FilterList";import{pathToRegexp as Nt,compile as It,match as Mt}from"path-to-regexp";import{red as Rt}from"@mui/material/colors";import Pt from"@mui/material/AppBar";import At from"@mui/material/CssBaseline";import Tt from"@mui/material/Drawer";import Dt from"@mui/icons-material/Menu";import jt from"@mui/material/ButtonBase";import Ot from"@mui/icons-material/OutlinedFlag";import Ft from"@mui/material/SwipeableDrawer";import _t from"@mui/material/InputBase";import Bt from"@mui/material/Breadcrumbs";import Ht from"@mui/material/Link";import Wt from"@mui/material/ButtonGroup";import zt from"@mui/icons-material/Palette";import Vt from"@mui/icons-material/Remove";import Yt from"@mui/material/Snackbar";import Ut from"@mui/icons-material/KeyboardArrowUp";import qt from"@mui/material/Box/Box";import $t from"@mui/material/Alert";import Xt from"@mui/icons-material/CloudUpload";import Gt from"@mui/icons-material/Delete";import Kt from"@mui/material/Step";import Qt from"@mui/material/StepLabel";import Jt from"@mui/material/Stepper";import*as Zt from"xlsx";import en from"dayjs/plugin/isToday";import tn from"dayjs/plugin/localeData";import nn from"dayjs/locale/en-gb";import rn from"dayjs/plugin/utc";import on from"@mui/icons-material/ArrowBackIos";import an from"@mui/icons-material/ArrowForwardIos";import ln from"@mui/icons-material/ContentCopy";import cn from"@mui/icons-material/AccessTime";import{fileTypeFromBlob as un}from"file-type/core";import sn from"@mui/material/Avatar";import dn from"@mui/material/ListItemAvatar";import fn from"@mui/icons-material/CloudSync"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var mn=function(e,t){return mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},mn(e,t)};function pn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}mn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var hn=function(){return hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hn.apply(this,arguments)};function vn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function gn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))}function bn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function yn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function wn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function En(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function xn(e){return this instanceof xn?(this.v=e,this):new xn(e)}function Cn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof xn?Promise.resolve(n.value.v).then(c,u):s(i[0][2],n)}catch(e){s(i[0][3],e)}var n}function c(e){l("next",e)}function u(e){l("throw",e)}function s(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function kn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=yn(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function Sn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}globalThis.window||(globalThis.window=globalThis);var Ln,Nn=n(null),In=function(t){var n=t.children,o=t.apiRef,i=void 0===o?null:o,a=t.reloadSubject,l=void 0===a?null:a,c=t.changeSubject,u=void 0===c?null:c,s=t.updateSubject,d=void 0===s?null:s,f=r((function(){return{apiRef:i,reloadSubject:l,changeSubject:u,updateSubject:d}}),[i,l,u,d]);return e.createElement(Nn.Provider,{value:f},n)},Mn=E({useTheme:g}).makeStyles,Rn=function(t){var n=t.children,o=g(),i=r((function(){return b(o)}),[o]);return e.createElement(y,{theme:i},n)};!function(e){e.Layout="custom-layout",e.Switch="switch-field",e.YesNo="yesno-field",e.Line="line-field",e.File="file-field",e.Group="group-layout",e.Paper="paper-layout",e.Outline="outline-layout",e.Expansion="expansion-layout",e.Radio="radio-field",e.Checkbox="checkbox-field",e.Text="text-field",e.Date="date-field",e.Time="time-field",e.Progress="progress-field",e.Component="component-field",e.Slider="slider-field",e.Combo="combo-field",e.Choose="choose-field",e.Tree="tree-field",e.Dict="dict-field",e.Init="init-field",e.Phony="phony-field",e.Button="button-field",e.Icon="icon-field",e.Complete="complete-field",e.Items="items-field",e.Rating="rating-field",e.Typography="typography-field",e.Fragment="fragment-layout",e.Div="div-layout",e.Box="box-layout",e.Tabs="tabs-layout",e.Hero="hero-layout",e.Center="center-layout",e.Stretch="stretch-layout",e.Condition="condition-layout"}(Ln||(Ln={})),Object.entries(Ln).forEach((function(e){var t=wn(e,2),n=t[0],r=t[1];Ln[n]=Symbol.for(r)}));var Pn=Ln,An=new Set([Pn.Group,Pn.Box,Pn.Paper,Pn.Outline,Pn.Expansion,Pn.Div,Pn.Tabs,Pn.Hero,Pn.Fragment,Pn.Center,Pn.Stretch,Pn.Condition,Pn.Layout]),Tn=function(e){return An.has(e)},Dn=function(e){var t=e.type;return e.name&&!An.has(t)},jn=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype},On=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(Array.isArray(e[n])?t[n]=e[n].slice(0):jn(e[n])?t[n]=On(e[n]):t[n]=e[n]);return t},Fn=function(e,t,n){var r=(Array.isArray(t)?t:t.split(".").filter((function(e){return e}))).flatMap((function(e){return"string"==typeof e?e.split("."):e})),o=r.slice(0,r.length-1).reduce((function(e,t){return e&&e[t]}),e),i=wn(r.reverse(),1)[0];try{return o[i]=n,!0}catch(e){return!1}},_n=function(e,t){return(Array.isArray(t)?t:t.split(".").filter((function(e){return e}))).flatMap((function(e){return"string"==typeof e?e.split("."):e})).reduce((function(e,t){return e&&e[t]}),e)},Bn=function(e,t){if(e===t)return!0;if(jn(e)&&jn(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Bn(e[n],t[n]))return!1;return!0}return!1};var Hn,Wn=function(){function e(){var e=this;this._events={},this.getListeners=function(t){return e._events[t]||[]},this.subscribe=function(t,n){!e._events[t]&&(e._events[t]=[]),e._events[t].push(n)},this.unsubscribe=function(t,n){!e._events[t]&&(e._events[t]=[]),e._events[t]=e._events[t].filter((function(e){return n!==e}))},this.unsubscribeAll=function(){e._events={}},this.once=function(t,n){var r=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return gn(e,void 0,void 0,(function(){return bn(this,(function(e){switch(e.label){case 0:return[4,n.apply(void 0,En([],wn(o),!1))];case 1:return e.sent(),this.unsubscribe(t,r),[2]}}))}))};return e.subscribe(t,r),function(){e.unsubscribe(t,r)}},this.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return gn(e,void 0,void 0,(function(){var e,r;return bn(this,(function(o){switch(o.label){case 0:e=En([],wn(this._events&&this._events[t]||[]),!1),r=0,o.label=1;case 1:return r===e.length?[3,4]:[4,e[r].apply(e,En([],wn(n),!1))];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))}}return Object.defineProperty(e.prototype,"hasListeners",{get:function(){return e=this._events,!(0===Object.getOwnPropertySymbols(e).length&&0===Object.getOwnPropertyNames(e).length);var e},enumerable:!1,configurable:!0}),e}(),zn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return e}:1===e.length?e[0]:e.reduce((function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(void 0,En([],wn(n),!1)))}}))},Vn=function(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout((function(){return t()}),e)}))},Yn=Symbol("cancelable-canceled"),Un=function(e){var t,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new Promise((function(r,o){var i=!1;t&&t(),t=function(){i=!0,r(Yn)};var a=e.apply(void 0,En([],wn(n),!1));a.then((function(e){i||r(e)})),a.catch((function(e){i||o(e)}))}))};return n.cancel=function(){t&&t()},n},qn=function(e){var t=Promise.resolve(),n=void 0,r=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=!1,l=function(){a=!0};return n=n?zn(n,l):l,t=t.then((function(){return gn(void 0,void 0,void 0,(function(){return bn(this,(function(t){switch(t.label){case 0:return a?[3,2]:[4,e.apply(void 0,En([],wn(o),!1))];case 1:return[2,t.sent()];case 2:return[2,Yn]}}))}))})).finally((function(){r.clear(),n=void 0})),t};return r.clear=function(){t=Promise.resolve(),n=void 0},r.cancel=function(){t=Promise.resolve(),n&&n(),n=void 0},r},$n=function(e){return requestAnimationFrame(e)},Xn=function(e){return cancelAnimationFrame(e)},Gn=function(e,t){var n;void 0===t&&(t=1e3);var r=null,o=t?setTimeout:$n,i=t?clearTimeout:Xn,a=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];null!==n&&i(n);var c=function(){r=null,n=null,e.apply(void 0,En([],wn(a),!1))};r=c,n=o(c,t)};return a.clear=function(){null!==n&&i(n),n=null,r=null},a.flush=function(){null!==n&&i(n),r&&r(),n=null,r=null},a.pending=function(){return!!r},a},Kn=Symbol("observer-subscribe"),Qn=Symbol("observer-connect"),Jn=Symbol("observer-disconnect"),Zn=Symbol("observer-connect-listen"),er=Symbol("observer-disconnect-listen"),tr=function(){function e(t){var n=this;this.dispose=t,this.broadcast=new Wn,this._isShared=!1,this._subscribe=function(e,t){n.broadcast.subscribe(Kn,t),e[Zn]((function(){n.broadcast.emit(Qn)})),e[er]((function(){n.hasListeners||n.broadcast.emit(Jn)}))},this._unsubscribe=function(e){n.broadcast.unsubscribe(Kn,e)},this.tryDispose=function(){n.hasListeners||n._isShared||(n.dispose(),n.broadcast.emit(Jn))},this.map=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=function(e){var n=t(e);o.emit(n)};return n._subscribe(o,i),r=function(){return n._unsubscribe(i)},o},this.flatMap=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=function(e){var n=t(e);Array.isArray(n)?n.forEach((function(e){o.emit(e)})):o.emit(n)};return n._subscribe(o,i),r=function(){return n._unsubscribe(i)},o},this.operator=function(e){return e(n)},this.reduce=function(t,r){var o,i=r,a=new e(zn((function(){return n.tryDispose()}),(function(){return o()}))),l=function(e){var n=t(i,e);i=n,a.emit(n)};return n._subscribe(a,l),o=function(){return n._unsubscribe(l)},a},this.split=function(){var t,r=new e(zn((function(){return n.tryDispose()}),(function(){return t()}))),o=function(e){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){r.emit(e)})):r.emit(e)};return n._subscribe(r,o),t=function(){return n._unsubscribe(o)},r},this.mapAsync=function(t,r){var o,i=new e(zn((function(){return n.tryDispose()}),(function(){return o()}))),a=qn(t),l=function(e){return gn(n,void 0,void 0,(function(){var t,n;return bn(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,a(e)];case 1:return(t=o.sent())!==Yn&&i.emit(t),[3,3];case 2:if(n=o.sent(),!r)throw n;return r(n),[3,3];case 3:return[2]}}))}))};return n._subscribe(i,l),o=zn((function(){return n._unsubscribe(l)}),(function(){return a.clear()})),i},this.filter=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=function(e){t(e)&&o.emit(e)};return n._subscribe(o,i),r=function(){return n._unsubscribe(i)},o},this.tap=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=function(e){t(e),o.emit(e)};return n._subscribe(o,i),r=function(){return n._unsubscribe(i)},o},this.debounce=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=Gn((function(e){o.emit(e)}),t);return n._subscribe(o,i),r=zn((function(){return i.clear()}),(function(){return n._unsubscribe(i)})),o},this.delay=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=!1,a=qn((function(e){return gn(n,void 0,void 0,(function(){return bn(this,(function(n){switch(n.label){case 0:return[4,Vn(t)];case 1:return n.sent(),i?[3,3]:[4,o.emit(e)];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}));return n._subscribe(o,a),r=zn((function(){return a.clear()}),(function(){return n._unsubscribe(a)}),(function(){i=!0})),o},this.emit=function(e){return gn(n,void 0,void 0,(function(){return bn(this,(function(t){switch(t.label){case 0:return[4,this.broadcast.emit(Kn,e)];case 1:return t.sent(),[2]}}))}))},this.connect=function(e){return n.broadcast.subscribe(Kn,e),n.broadcast.emit(Qn),zn((function(){return n.tryDispose()}),(function(){return n._unsubscribe(e)}))},this.once=function(e){var t;return t=n.connect((function(n){e(n),t()}))},this.share=function(){return n._isShared=!0,n},this.repeat=function(t){var r,o;void 0===t&&(t=1e3);var i=new e(zn((function(){return n.tryDispose()}),(function(){return r()}),(function(){return void 0!==o&&clearTimeout(o)}))),a=function(e){void 0!==o&&clearTimeout(o),i.emit(e),n.hasListeners&&(o=setTimeout(a,t,e))};return n._subscribe(i,a),r=function(){return n._unsubscribe(a)},i},this.merge=function(t){var r,o=new e(zn((function(){return n.tryDispose()}),(function(){return r()}))),i=function(e){o.emit(e)};n._subscribe(o,i);var a=function(){};return o[Zn]((function(){a=t.connect(i)||function(){}})),r=zn((function(){return n._unsubscribe(i)}),(function(){return a()})),o},this.unsubscribe=function(){n.broadcast.unsubscribeAll(),n.broadcast.emit(Jn),n.dispose()},this.toPromise=function(){return new Promise((function(e){n.once((function(t){return e(t)}))}))},this.toIteratorContext=function(){var e=n,t=!1;return{iterate:function(){return Cn(this,arguments,(function(){return bn(this,(function(n){switch(n.label){case 0:return t?[3,4]:[4,xn(e.toPromise())];case 1:return[4,xn(n.sent())];case 2:return[4,n.sent()];case 3:return n.sent(),[3,0];case 4:return[2]}}))}))},done:function(){t=!0}}}}return Object.defineProperty(e.prototype,"isShared",{get:function(){return this._isShared},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasListeners",{get:function(){return!!this.broadcast.getListeners(Kn).length},enumerable:!1,configurable:!0}),e.prototype[Zn]=function(e){this.broadcast.once(Qn,e)},e.prototype[er]=function(e){this.broadcast.once(Jn,e)},e}(),nr=Symbol("react-declarative-subject"),rr=function(){function e(){var e=this;this._emitter=new Wn,this.map=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.map(t)},this.flatMap=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.flatMap(t)},this.reduce=function(t,n){var r,o=new tr((function(){return r()}));return r=e.subscribe(o.emit),o.reduce(t,n)},this.mapAsync=function(t,n){var r,o=new tr((function(){return r()}));return r=e.subscribe(o.emit),o.mapAsync(t,n)},this.filter=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.filter(t)},this.tap=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.tap(t)},this.operator=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.operator(t)},this.split=function(){var t,n=new tr((function(){return t()}));return t=e.subscribe(n.emit),n.split()},this.debounce=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.debounce(t)},this.delay=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.delay(t)},this.repeat=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.repeat(t)},this.merge=function(t){var n,r=new tr((function(){return n()}));return n=e.subscribe(r.emit),r.merge(t)},this.subscribe=function(t){return e._emitter.subscribe(nr,t),function(){e._emitter.unsubscribe(nr,t)}},this.unsubscribeAll=function(){e._emitter.unsubscribeAll()},this.once=function(t){return e._emitter.once(nr,t)},this.toPromise=function(){return e.toObserver().toPromise()},this.toIteratorContext=function(){return e.toObserver().toIteratorContext()},this.next=this.next.bind(this),this.toObserver=this.toObserver.bind(this),this.toIteratorContext=this.toIteratorContext.bind(this)}return e.prototype.next=function(e){return gn(this,void 0,void 0,(function(){return bn(this,(function(t){switch(t.label){case 0:return[4,this._emitter.emit(nr,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.toObserver=function(){var e,t=new tr((function(){return e()}));return e=this.subscribe(t.emit),t},e}(),or=function(e){var t,n=0,r=new tr((function(){void 0!==t&&clearTimeout(t)})),o=function(){r.emit(n),n++,t=setTimeout(o,e)};return r[Zn]((function(){o()})),r},ir=function(e,t){var n=!1,r=new tr((function(){n=!0}));return r[Zn]((function(){gn(void 0,void 0,void 0,(function(){var o,i;return bn(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e()];case 1:return o=a.sent(),n||r.emit(o),[3,3];case 2:if(i=a.sent(),!t)throw i;return t(i),[3,3];case 3:return[2]}}))}))})),r},ar=function(e){var t,n=new tr((function(){void 0!==t&&clearTimeout(t)})),r=function(){t=void 0,n.emit()};return n[Zn]((function(){setTimeout(r,e)})),n},lr=function(e){var t=new tr((function(){}));return t[Zn]((function(){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){t.emit(e)})):t.emit(e)})),t},cr=function(e){var t=new tr((function(){document.removeEventListener(e,t.emit)}));if("document"in globalThis){t[Zn]((function(){document.addEventListener(e,t.emit)}))}return t},ur=function(e){return{tap:function(t){return e().tap(t)},debounce:function(t){return e().debounce(t)},delay:function(t){return e().delay(t)},repeat:function(t){return e().repeat(t)},filter:function(t){return e().filter(t)},map:function(t){return e().map(t)},flatMap:function(t){return e().flatMap(t)},operator:function(t){return e().operator(t)},reduce:function(t,n){return e().reduce(t,n)},mapAsync:function(t,n){return e().mapAsync(t,n)},merge:function(t){return e().merge(t)},split:function(){return e().split()},connect:function(t){return e().connect(t)},once:function(t){return e().once(t)},unsubscribe:function(){return e().unsubscribe()},share:function(){return e().share()},toPromise:function(){return e().toPromise()},toIteratorContext:function(){return e().toIteratorContext()}}},sr=function(){function e(){}var t;return t=e,e.merge=function(e){var t=(new rr).toObserver();return e.forEach((function(e){e&&(t=t.merge(e))})),t},e.join=function(e,t){var n=void 0===t?{}:t,r=n.race,o=void 0!==r&&r,i=n.buffer,a=void 0===i?[]:i,l=function(){},c=new tr((function(){return l()}));e=e.filter((function(e){return!!e})),a=En([],wn(new Array(e.length)),!1).map((function(e,t){return a[t]}));var u=[],s=function(){a.every((function(e){return void 0!==e}))&&(c.emit(En([],wn(a),!1)),!o&&a.fill(void 0))};return c[Zn]((function(){e.forEach((function(e,t){if(e){var n=e.connect((function(e){a[t]=e,s()}));u.push((function(){return n()}))}})),l=zn.apply(void 0,En([],wn(u),!1))})),c},e.unicast=function(e){return hn(hn({},ur(e)),{isUnicasted:!0})},e.multicast=function(e){var t;return hn(hn({},ur((function(){return t||(t=e())[er]((function(){t=void 0})),t}))),{getRef:function(){return t},isMulticasted:!0})},e.createHot=function(e){var t,n=new tr((function(){return t()}));return t=e(n.emit)||function(){},n},e.createCold=function(e){var t=function(){},n=new tr((function(){return t()}));return n[Zn]((function(){t=e(n.emit)||function(){}})),n},e.create=t.createCold,e.pipe=function(e,t){var n=function(){},r=new tr((function(){return n()}));return r[Zn]((function(){var o=new rr,i=e.connect(o.next),a=t(o,r.emit)||function(){};n=zn((function(){return a()}),(function(){return i()}))})),r},e.fromInterval=or,e.fromPromise=ir,e.fromDelay=ar,e.fromArray=lr,e.fromEvent=cr,e.fromValue=function(e){var t=new tr((function(){}));return t[Zn]((function(){"function"==typeof e?t.emit(e()):t.emit(e)})),t},e.fromSubject=function(e){var t,n=new tr((function(){return t()}));return t=e.subscribe(n.emit),n},e.fromBehaviorSubject=function(e){var t,n=new tr((function(){return t()}));return n[Zn]((function(){e.data&&n.emit(e.data)})),t=e.subscribe(n.emit),n},e}(),dr=sr.create((function(e){return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}})),fr=sr.create((function(e){return document.addEventListener("touchmove",e),function(){return document.removeEventListener("touchmove",e)}})),mr=sr.create((function(e){return document.addEventListener("scroll",e),function(){return document.removeEventListener("scroll",e)}})),pr=sr.unicast((function(){var e=0;return sr.merge([dr,fr,mr]).filter((function(){return 20===e||(e+=1,!1)})).tap((function(){e=0})).share()})),hr=function(e){return pr.connect(e)},vr=sr.unicast((function(){return sr.create((function(e){return sr.fromEvent("keydown").connect((function(t){"Tab"===t.code&&e()}))})).share()})),gr=sr.unicast((function(){return sr.create((function(e){return document.addEventListener("touchstart",e,{passive:!1}),document.addEventListener("mousedown",e),function(){document.removeEventListener("touchstart",e),document.removeEventListener("mousedown",e)}})).share()})),br=function(e){var r=n(e||null);return[function(e){var n=e.children,o=e.payload;return t.createElement(r.Provider,{value:o},n)},function(){return o(r)}]},yr=wn(br(),2),wr=yr[0],Er=yr[1],xr=n(null),Cr={},kr=function(t){var n=t.children,r=t.payload,o=void 0===r?Cr:r;return e.createElement(xr.Provider,{value:o},n)},Sr=function(){return o(xr)},Lr=((Hn={})[Pn.Checkbox]=!1,Hn[Pn.Radio]=null,Hn[Pn.Text]="",Hn[Pn.Switch]=!1,Hn[Pn.Progress]=1,Hn[Pn.Slider]=0,Hn[Pn.Combo]=null,Hn[Pn.Items]=null,Hn[Pn.Rating]=3,Hn[Pn.Typography]="",Hn[Pn.Date]="",Hn[Pn.Time]="",Hn[Pn.File]=null,Hn[Pn.Choose]=null,Hn[Pn.Component]=null,Hn[Pn.Complete]="",Hn[Pn.Init]=null,Hn[Pn.YesNo]=null,Hn[Pn.Dict]=null,Hn[Pn.Tree]=null,Hn),Nr=function(e){var t=Lr[e];return void 0===t?void console.warn("react-declarative One initialValue unknown type ".concat(String(e))):t},Ir=function(e){void 0===e&&(e=[]);var t=[],n=function(e){return void 0===e&&(e=[]),null==e?void 0:e.forEach((function(e){var r=e.fields||[],o=e.child?[e.child]:[];n(En(En([],wn(r),!1),wn(o),!1)),t.push(e)}))};return n(e),t},Mr=function(e){for(var t,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return e;var i=r.shift();if(jn(e)&&jn(i))for(var a in i)Array.isArray(i[a])?e[a]=i[a].slice(0):jn(i[a])?(e[a]||Object.assign(e,((t={})[a]={},t)),Mr(e[a],i[a])):Object.assign(e,((n={})[a]=i[a],n));return Mr.apply(void 0,En([e],wn(r),!1))},Rr=function(e,t){var n=(Array.isArray(t)?t:t.split(".").filter((function(e){return e}))).flatMap((function(e){return"string"==typeof e?e.split("."):e}));n.slice(0,n.length-1).reduce((function(e,t){return e[t]=e[t]?e[t]:{}}),e)},Pr=function(e){var t=wn(i(e),2),n=t[0],r=t[1],o=a(n),c=l((function(e){var t;t="function"==typeof e?e(o.current):e,o.current=t,r(t)}),[]);return[o,c]},Ar=Symbol("empty-value"),Tr=function(e){var t=a(Ar);return t.current===Ar&&(t.current=function(e){return"function"==typeof e?e():e}(e)),t.current},Dr=function(e){var t=Tr((function(){return new rr}));return c((function(){var n=void 0;return e&&(n=e.subscribe(t.next)),n}),[e]),t},jr="one-resolve",Or=function(e){return e},Fr=function(e,t,n){var r={};return e&&Ir(e).filter((function(e){return!n||!e.features||e.features.some((function(e){return n.includes(e)}))})).filter((function(e){return e.type!==Pn.Phony})).filter((function(e){return e.type!==Pn.Button})).filter((function(e){return e.type!==Pn.Icon})).forEach((function(e){if(Dn(e)){if(Rr(r,e.name),"function"==typeof e.hidden?e.hidden(t):e.hidden)return;void 0===e.defaultValue?Fn(r,e.name,_n(r,e.name)||Nr(e.type)):"function"==typeof e.defaultValue?Fn(r,e.name,e.defaultValue(t)):Fn(r,e.name,e.defaultValue)}})),r},_r=function(e){var t=e.handler,n=e.fallback,r=e.fields,i=e.features,s=e.payload,d=e.change,f=e.loadStart,m=e.loadEnd,p=e.incomingTransform,h=void 0===p?Or:p,v=wn(Pr(null),2),g=v[0],b=v[1],y=o(Nn),w=y.apiRef,E=y.changeSubject,x=y.reloadSubject,C=y.updateSubject,k=a(!0),S=a(!1),L=Dr(E),N=Dr(x),I=Dr(C);c((function(){var e,o=function(){return gn(void 0,void 0,void 0,(function(){var e,o,a,l,c,u,p;return bn(this,(function(v){switch(v.label){case 0:return S.current?[2]:[3,1];case 1:if("function"!=typeof t)return[3,9];e=!0,f&&f(jr),v.label=2;case 2:return v.trys.push([2,6,7,8]),(o=t(s))instanceof Promise?(a=Mr,l=[{},Fr(r,s,i)],c=On,[4,o]):[3,4];case 3:return p=a.apply(void 0,l.concat([c.apply(void 0,[v.sent()])])),d(p,!0),k.current&&b(h(p,s)),[3,5];case 4:p=Mr({},Fr(r,s,i),On(o)),d(p,!0),k.current&&b(h(p,s)),v.label=5;case 5:return[3,8];case 6:if(u=v.sent(),e=!1,!n)throw u;return n(u),[3,8];case 7:return m&&m(e,jr),S.current=!0,[7];case 8:return[3,10];case 9:t&&!Bn(g.current,t)&&(p=Mr({},Fr(r,s,i),On(t)),k.current&&b(h(p,s))),v.label=10;case 10:return[2]}}))}))};o(),e={reload:o,change:function(e,t){void 0===t&&(t=!1),b(h(e,s)),d(e,t)},getData:function(){return hn({},g.current||{})}},"function"==typeof w?w(e):w&&(w.current=e),N.unsubscribeAll(),N.subscribe(e.reload),L.unsubscribeAll(),L.subscribe((function(t){t&&t!==g.current&&e.change(t,!0)})),I.unsubscribeAll(),I.subscribe((function(t){t&&t!==g.current&&e.change(t,!1)}))}),[t]),u((function(){return function(){k.current=!1}}),[]);var M=l((function(){return g.current}),[]);return[g.current,b,M]},Br=function(e){var t=a(e);return t.current=e,t},Hr=n(null),Wr=function(t){var n=t.children,o=vn(t,["children"]),i=a({}),c=a(!1),u=o.fields,s=void 0===u?[]:u,d=o.features,f=o.change,m=void 0===f?function(){return null}:f,p=o.fallback,h=void 0===p?function(){return null}:p,v=o.handler,g=void 0===v?function(){return{}}:v,b=o.payload,y=o.loadStart,w=o.loadEnd,E=o.incomingTransform,x=wn(_r({handler:g,fallback:h,fields:s,features:d,payload:b,change:m,loadStart:y,loadEnd:w,incomingTransform:E}),3),C=x[0],k=x[1],S=x[2],L=Br(C),N=l((function(e,t){var n=i.current,r=L.current;k(e),Object.entries(t).forEach((function(e){var t=wn(e,2),r=t[0],o=t[1];n[r]=o})),Object.values(n).some((function(e){return e}))?c.current=!0:(e!==r||c.current)&&(c.current=!1,m(e,!1))}),[]),I=l((function(e){return N(On(hn(hn({},L.current),e)),{})}),[]),M=r((function(){return{object:C,setObject:N,changeObject:I,getObjectRef:S}}),[C]);return e.createElement(Hr.Provider,{value:M},!!C&&n)},zr=function(){return o(Hr)},Vr=function(){},Yr=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var o=a(!0),i=a(n);return c((function(){return o.current?(o.current=!1,Vr):i.current?Vr:e()||Vr}),t),r((function(){return{resetWatcher:function(){o.current=!0},beginWatch:function(){o.current=!1,i.current=!1},stopWatch:function(){i.current=!0}}}),[])},Ur=function(e){var t=Tr((function(){return new rr}));return Yr((function(){t.next(e)}),[e]),t},qr=function(){return A()},$r=qr(),Xr=function(e){void 0===e&&(e=0);var t=wn(i($r),2),n=t[0],r=t[1],o=l((function(){return r(qr())}),[]);return c((function(){var t;return e&&(t=setTimeout((function(){t=void 0,o()}),e)),function(){void 0!==t&&clearTimeout(t)}}),[n,e,o]),{reloadTrigger:n,doReload:o}},Gr=function(t){var n=t.reloadSubject,r=t.loading,o=t.disabled,l=t.children,s=t.fallback,d=t.Loader,f=void 0===d?function(){return null}:d,m=t.Error,p=void 0===m?function(){return null}:m,h=t.onLoadStart,v=t.onLoadEnd,g=t.payload,b=t.deps,y=void 0===b?[]:b,w=t.throwError,E=void 0!==w&&w,x=wn(i(""),2),C=x[0],k=x[1],S=wn(i(o),2),L=S[0],N=S[1],I=Ur(o);c((function(){return I.subscribe((function(e){e||N(!1)}))}),[]);var M=Xr(),R=M.reloadTrigger,A=M.doReload,T=Dr(n);c((function(){return T.subscribe((function(){A()}))}),[]);var D=a(null),j=wn(i(!1),2),O=j[0],F=j[1],_=wn(i(!1),2),B=_[0],H=_[1],W=a(!0),z=r||O;return u((function(){return function(){W.current=!1}}),[]),c((function(){if(!L){D.current&&D.current.cancel();var e=Un((function(){return gn(void 0,void 0,void 0,(function(){var e,t,n;return bn(this,(function(r){switch(r.label){case 0:e=!0,h&&h(),r.label=1;case 1:return r.trys.push([1,5,6,7]),(t=l(g))instanceof Promise?[4,t]:[3,3];case 2:return[2,r.sent()||null];case 3:return[2,t||null];case 4:return[3,7];case 5:throw n=r.sent(),e=!1,n;case 6:return v&&v(e),[7];case 7:return[2]}}))}))}));D.current=e;gn(void 0,void 0,void 0,(function(){var t,n,r;return bn(this,(function(o){switch(o.label){case 0:t=!1,W.current&&F(!0),W.current&&H(!1),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,e()];case 2:return(n=o.sent())===Yn?(t=!0,[2]):(D.current=null,W.current&&queueMicrotask((function(){return P((function(){k(n)}))})),[3,5]);case 3:if(r=o.sent(),W.current&&H(!0),E)throw r;return s&&s(r),[3,5];case 4:return t||W.current&&F(!1),[7];case 5:return[2]}}))}))}}),En(En([g,L],wn(y),!1),[R],!1)),z?e.createElement(f,{payload:g}):B?e.createElement(p,{payload:g}):e.createElement(e.Fragment,null,C)},Kr=function(){function e(e){var t=this;this.target=e,this._status="pending",e.then((function(){return t._status="fulfilled"})),e.catch((function(){return t._status="rejected"}))}return Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),e}(),Qr=function(e){var t=void 0,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"pending"!==(null==t?void 0:t.status)&&(t=new Kr(e.apply(void 0,En([],wn(n),!1)))),null==t?void 0:t.target};return n.clear=function(){t=void 0},n.getStatus=function(){return(null==t?void 0:t.status)||"ready"},n},Jr=function(e,t){void 0===t&&(t=[]);var n=a(e);return n.current=e,l((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.current.apply(n,En([],wn(e),!1))}),t)},Zr=function(e,t){var n=void 0===t?{}:t,o=n.onLoadStart,l=n.onLoadEnd,c=n.fallback,s=n.throwError,d=wn(i(!1),2),f=d[0],m=d[1],p=wn(i(!1),2),h=p[0],v=p[1],g=a(!0),b=Jr(e);u((function(){return function(){g.current=!1}}),[]);var y=r((function(){return Qr((function(e){return gn(void 0,void 0,void 0,(function(){var t,n,r;return bn(this,(function(i){switch(i.label){case 0:t=function(){return gn(void 0,void 0,void 0,(function(){var t,n,r;return bn(this,(function(i){switch(i.label){case 0:t=!0,o&&o(),i.label=1;case 1:return i.trys.push([1,5,6,7]),(n=b(e))instanceof Promise?[4,n]:[3,3];case 2:return[2,i.sent()||null];case 3:return[2,n||null];case 4:return[3,7];case 5:throw r=i.sent(),t=!1,r;case 6:return l&&l(t),[7];case 7:return[2]}}))}))},g.current&&m(!0),g.current&&v(!1),n=!1,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,t()];case 2:return[2,i.sent()];case 3:if(r=i.sent(),g.current&&v(!0),s)throw r;return c&&c(r),[3,5];case 4:return n||g.current&&m(!1),[7];case 5:return[2,null]}}))}))}))}),[]);return{loading:f,error:h,execute:y}},eo=function(e){var t=Tr(e),n=a(t),r=l((function(e){var t;t="function"==typeof e?e(n.current):e,n.current=t}),[]);return[n,r]},to={name:"",menu:function(){return null},menuItems:[],onValueChange:function(){return null}},no=Mn()({container:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch",maxHeight:"45vh",overflowY:"auto",overflowX:"hidden"},content:{flex:1,display:"flex",flexDirection:"column",justifyContent:"stretch"},loader:{position:"absolute",top:0,left:0,right:0,bottom:0,height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}}),ro=function(t){var n=t.requestSubject,o=no().classes,a=wn(i(null),2),u=a[0],s=a[1],d=wn(i(0),2),f=d[0],m=d[1],p=wn(eo(to),2),h=p[0],v=p[1],g=wn(eo(0),2),b=g[0],y=g[1],w=zr(),E=w.object,x=w.changeObject,C=Sr(),R=l((function(){m((function(e){return e+1}))}),[]),P=l((function(){m((function(e){return Math.max(e-1,0)}))}),[]),A=Zr((function(e){return gn(void 0,void 0,void 0,(function(){return bn(this,(function(t){switch(t.label){case 0:return[4,h.current.menu(h.current.name,e,T.current,C,h.current.onValueChange,x)];case 1:return t.sent(),s(null),[2]}}))}))}),{onLoadStart:R,onLoadEnd:P}).execute,T=Br(E),D=r((function(){return h.current.menuItems.map((function(e){var t=e.isDisabled,n=void 0===t?function(){return!1}:t,r=e.isVisible,o=void 0===r?function(){return!0}:r,i=vn(e,["isDisabled","isVisible"]);return hn(hn({},i),{isDisabled:function(){return n(T.current,C)},isVisible:function(){return o(T.current,C)}})}))}),[h.current.menuItems]),j=Br(D);return c((function(){return n.subscribe(qn((function(e){var t=e.event,n=e.menuItems,r=e.menu,o=e.name,i=e.onValueChange;return gn(void 0,void 0,void 0,(function(){var e;return bn(this,(function(a){switch(a.label){case 0:return[4,Vn(350)];case 1:return a.sent(),y((function(e){return e+1})),v({name:o,menuItems:n,onValueChange:i,menu:r}),e=document.elementFromPoint(t.clientX,t.clientY),s(e||t.target),[2]}}))}))})))}),[]),e.createElement(M,{key:b.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:u,open:!!u,onClose:function(){return s(null)},MenuListProps:{disablePadding:!0}},e.createElement("div",{className:o.container},0!==f&&e.createElement("div",{className:o.loader},e.createElement(k,{size:14})),e.createElement("div",{className:o.content},j.current.map((function(t,n){var r=t.label,o=void 0===r?"unknown-label":r,i=t.action,a=void 0===i?"unknown-action":i,l=t.divider,c=t.onClick,u=t.icon,d=t.isDisabled,f=void 0===d?function(){return!1}:d,m=t.isVisible,p=void 0===m?function(){return!0}:m;return e.createElement(Gr,{Loader:function(){return l?null:e.createElement(N,{sx:{visibility:"hidden",minWidth:225}},!!u&&e.createElement(S,null,e.createElement(u,null)),e.createElement(L,{variant:"inherit"},o))},onLoadStart:R,onLoadEnd:P,key:"".concat(b.current,"-").concat(n),payload:C},(function(t){return gn(void 0,void 0,void 0,(function(){var n;return bn(this,(function(r){switch(r.label){case 0:return[4,Vn(0)];case 1:return r.sent(),[4,f(t)];case 2:return n=r.sent(),[4,p(t)];case 3:return r.sent()?l?[2,e.createElement(I,{orientation:"horizontal"})]:[2,e.createElement(N,{disabled:n,onClick:function(){if(c)return c(T.current,t,h.current.onValueChange,x),void s(null);A(a)},sx:{minWidth:225}},!!u&&e.createElement(S,null,e.createElement(u,null)),e.createElement(L,{variant:"inherit"},o))]:[2,null]}}))}))}))})))))},oo=n(null),io=function(t){var n=t.children,o=Dr(),i=r((function(){return{createContextMenu:function(e){var t=e.menuItems,n=void 0===t?[]:t,r=e.onValueChange,i=void 0===r?function(){return null}:r,a=e.menu,l=e.name;return function(e){return gn(void 0,void 0,void 0,(function(){return bn(this,(function(t){switch(t.label){case 0:return n?(e.preventDefault(),e.stopPropagation(),(null==n?void 0:n.length)?[4,o.next({name:l,menu:a,event:e,menuItems:n,onValueChange:i})]:[2]):[2];case 1:return[2,t.sent()]}}))}))}},requestSubject:o}}),[]);return e.createElement(oo.Provider,{value:i},n,e.createElement(ro,{requestSubject:o}))},ao=function(){return o(oo)};var lo=function(e){var t=!1,n=null,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t||(t=!0,n=e.apply(void 0,En([],wn(r),!1))),n};return r.clear=function(){t=!1},r},co=function(){return!0},uo=function(e,t){var n=e.compute,r=e.type,o=e.readTransform,i=e.name,a=e.object,l=e.payload,c=e.config;if(n&&c.WITH_SYNC_COMPUTE){var u=t?n(a,l):Nr(r);return!(u instanceof Promise)&&u}return!(n||!i)&&(o(_n(a,i),i,a,l)||Nr(r))},so=function(e,t){var n=void 0===t?{}:t,r=n.allowedErrors,o=n.fallback,i=n.defaultValue,a=void 0===i?null:i;return function(){for(var t,n,i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];try{var c=e.apply(void 0,En([],wn(i),!1));return c instanceof Promise?function(e,t){var n=t.fallback,r=t.defaultValue;return gn(void 0,void 0,void 0,(function(){var t;return bn(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e];case 1:return[2,o.sent()];case 2:return t=o.sent(),n&&n(t),[2,r];case 3:return[2]}}))}))}(c,{fallback:o,defaultValue:a}):c}catch(e){if(o&&o(e),r){try{for(var u=yn(r),s=u.next();!s.done;s=u.next()){if(e instanceof s.value)return a}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}throw e}return a}}},fo=function(){return!1},mo=function(){return!0},po=function(){return null},ho=function(){return null},vo=function(){return!1},go=function(e,t,n){var r="".concat(t,"(").concat(e||"unknown",")");return function(e){console.error("react-declarative ".concat(r," ").concat(n," exception"),e)}},bo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){if(e)if("string"==typeof e)n.push(e);else if(Array.isArray(e)){if(e.length){var t=bo.apply(void 0,En([],wn(e),!1));t&&n.push(t)}}else"object"==typeof e&&(e.toString!==Object.prototype.toString?n.push(e.toString()):Object.entries(e).filter((function(e){var t=wn(e,2);return t[0],!!t[1]})).forEach((function(e){var t=wn(e,1)[0];return n.push(t)})))})),n.join(" ")},yo="12",wo=function(e){return Number(e)},Eo=Mn()({root:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch"},container:{flex:1,display:"flex",alignItems:"stretch",justifyContent:"stretch",width:"100%","& > *":{flex:1}}}),xo=function(t,n){var o=t.className,i=t.style,a=t.sx,l=t.columns,c=void 0===l?"":l,u=t.phoneColumns,s=void 0===u?"":u,d=t.tabletColumns,f=void 0===d?"":d,m=t.desktopColumns,p=void 0===m?"":m,h=t.fieldRightMargin,v=void 0===h?"1":h,g=t.fieldBottomMargin,b=void 0===g?"2":g,y=t.children,w=t.onClick,E=t.onFocus,x=t.onContextMenu,k=vn(t,["className","style","sx","columns","phoneColumns","tabletColumns","desktopColumns","fieldRightMargin","fieldBottomMargin","children","onClick","onFocus","onContextMenu"]),S=Eo().classes,L=r((function(){return{xs:wo(s||c||yo),sm:wo(f||c||yo),md:wo(f||c||yo),lg:wo(p||c||yo),xl:wo(p||c||yo),mr:wo(v),mb:wo(b)}}),[]),N=L.xs,I=L.sm,M=L.md,R=L.lg,P=L.xl,A=L.mr,D=L.mb;return e.createElement(T,hn({},k,{ref:n,item:!0,className:bo(o,S.root),style:i,onFocus:E,onClick:w,xs:N,sm:I,md:M,lg:R,xl:P,sx:a,onContextMenu:x}),e.createElement(C,{className:S.container,mr:A,mb:D},y))};xo.displayName="Item";var Co=s(xo),ko=function(t,n){var o=t.className,i=t.style,a=t.children,l=t.onFocus,c=t.onClick,u=t.isBaselineAlign,s=t.columnsOverride,d=t.sx,f=t.onContextMenu,m=vn(t,["className","style","children","onFocus","onClick","isBaselineAlign","columnsOverride","sx","onContextMenu"]),p=r((function(){return s&&Number(s)}),[]);return e.createElement(D,hn({},m,{ref:n,container:!0,alignItems:u?"flex-end":"flex-start",className:o,style:i,onClick:c,onFocus:l,columns:p,onContextMenu:f,sx:d}),a)};ko.displayName="Container";var So=s(ko),Lo=Mn()({root:{position:"relative","& > *":{width:"100%"}}}),No=function(t,n){var r=t.className,o=void 0===r?"":r,i=t.columns,a=void 0===i?"":i,l=t.phoneColumns,c=void 0===l?"":l,u=t.tabletColumns,s=void 0===u?"":u,d=t.desktopColumns,f=void 0===d?"":d,m=t.children,p=t.isItem,h=t.isBaselineAlign,v=t.style,g=t.columnsOverride,b=t.sx,y=t.fieldRightMargin,w=void 0===y?"1":y,E=t.fieldBottomMargin,x=void 0===E?"2":E,C=t.onClick,k=t.onFocus,S=t.onContextMenu,L=vn(t,["className","columns","phoneColumns","tabletColumns","desktopColumns","children","isItem","isBaselineAlign","style","columnsOverride","sx","fieldRightMargin","fieldBottomMargin","onClick","onFocus","onContextMenu"]),N=Lo().classes;return p?e.createElement(Co,hn({},L,{ref:n,className:bo(N.root,o),style:v,columns:a,phoneColumns:c,tabletColumns:s,desktopColumns:f,fieldRightMargin:w,fieldBottomMargin:x,onFocus:k,onClick:C,onContextMenu:S,sx:b}),m):e.createElement(So,hn({},L,{ref:n,className:bo(N.root,o),isBaselineAlign:h,columnsOverride:g,style:v,onFocus:k,onContextMenu:S,onClick:C,sx:b}),m)};No.displayName="Group";var Io=s(No),Mo=function(e){if(e){if(e.includes(".")){var t=e.split(".");e=wn(t.reverse(),1)[0]}var n=wn(e.split("_")),r=n[0],o=n.slice(1);return En(["".concat(r.charAt(0).toUpperCase()).concat(r.slice(1))],wn(o),!1).join(" ")}},Ro={WITH_DIRTY_CLICK_LISTENER:!0,WITH_MOBILE_READONLY_FALLBACK:!0,WITH_WAIT_FOR_MOVE_LISTENER:!0,WITH_WAIT_FOR_TAB_LISTENER:!0,WITH_WAIT_FOR_TOUCH_LISTENER:!0,WITH_DISMOUNT_LISTENER:!0,WITH_SYNC_COMPUTE:!1,CUSTOM_FIELD_DEBOUNCE:800,FIELD_BLUR_DEBOUNCE:100},Po=function(){var e=this;this._config=Ro,this.getRef=function(){return e._config},this.setValue=function(t){Object.assign(e._config,Ro,t)}},Ao=Symbol("get-reference"),To=function(){function e(){}var t;return t=Ao,e.instance=new Po,e[t]=e.instance.getRef,e.setValue=e.instance.setValue,e}(),Do={display:"flex",alignItems:"stretch",justifyContent:"stretch"},jo=Mn()((function(e){var t,n,r;return{root:hn(hn({},Do),{"& > *":hn(hn({},Do),{flexGrow:1}),"& > * > *":{flexGrow:1},pointerEvents:"all"}),hidden:{display:"none !important"},fieldReadonly:{"& > *":{pointerEvents:"none !important"}},phoneHidden:(t={},t[e.breakpoints.only("xs")]={display:"none !important"},t),tabletHidden:(n={},n[e.breakpoints.between("sm","lg")]={display:"none !important"},n),desktopHidden:(r={},r[e.breakpoints.up("lg")]={display:"none !important"},r)}})),Oo=function(e){return console.log({v:e})},Fo=function(){return null},_o=function(){return null},Bo=function(e){return e},Ho=function(){},Wo=function(){return null},zo=function(){return null},Vo=function(e){return e},Yo=function(e){return e};function Uo(t,n){var o=this;void 0===n&&(n={withApplyQueue:!1,skipDirtyClickListener:!1,skipClickListener:!1,skipFocusReadonly:!1,skipFocusBlurCall:!1,skipDebounce:!1,defaultProps:{}});var a=d(t),s=To[Ao](),f=function(d){var f,m,p,h,v,g,b,y=d.className,w=void 0===y?"":y,E=d.sx,x=d.columns,C=void 0===x?"":x,k=d.phoneColumns,S=void 0===k?"":k,L=d.tabletColumns,N=void 0===L?"":L,I=d.desktopColumns,M=void 0===I?"":I,R=d.phoneHidden,P=void 0!==R&&R,A=d.tabletHidden,T=void 0!==A&&A,D=d.desktopHidden,j=void 0!==D&&D,O=d.isDisabled,F=d.isVisible,_=d.isInvalid,B=d.isIncorrect,H=d.isReadonly,W=d.readTransform,z=void 0===W?Vo:W,V=d.writeTransform,Y=void 0===V?Yo:V,U=d.change,q=void 0===U?Oo:U,$=d.fallback,X=void 0===$?Fo:$,G=d.ready,K=void 0===G?_o:G,Q=d.compute,J=d.shouldRecompute,Z=d.click,ee=void 0===Z?Ho:Z,te=d.map,ne=void 0===te?Bo:te,re=d.object,oe=d.name,ie=void 0===oe?"":oe,ae=d.title,le=void 0===ae?Mo(ie)||void 0:ae,ce=d.menu,ue=void 0===ce?zo:ce,se=d.type,de=d.debug,fe=d.focus,me=d.blur,pe=d.invalidity,he=d.prefix,ve=d.dirty,ge=void 0!==ve&&ve,be=d.disabled,ye=void 0!==be&&be,we=d.readonly,Ee=void 0!==we&&we,xe=d.autoF