react-declarative-lite
Version:
A lighter version of the react-declarative which exports the <One /> component and dependencies only and as such makes the library slightly faster and smaller. Unlike react-declarative, it doesn't provide any additional overhead like state management. For
1 lines • 239 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/styles"),n=require("tss-react"),r=require("@mui/material/Box"),i=require("@mui/material/CircularProgress"),o=require("@mui/material/ListItemIcon"),a=require("@mui/material/Typography"),u=require("@mui/material/MenuItem"),l=require("@mui/material/Divider"),c=require("@mui/material/Menu"),s=require("react-dom"),d=require("uuid"),f=require("@mui/material/Grid"),m=require("@mui/material"),v=require("@mui/material/Checkbox"),p=require("@mui/material/FormControlLabel"),h=require("@mui/material/FormGroup"),b=require("@mui/material/Button"),y=require("@mui/material/Stack"),g=require("@mui/material/Autocomplete"),E=require("@mui/material/TextField"),x=require("@mui/material/Radio"),C=require("@mui/material/Paper"),w=require("@mui/material/Modal"),k=require("@mui/material/InputAdornment"),S=require("@mui/material/IconButton"),I=require("@mui/material/List"),M=require("@mui/material/ListItemButton"),R=require("@mui/material/Backdrop"),L=require("@mui/material/ListItemText"),T=require("@mui/icons-material/Close"),N=require("@mui/icons-material/RadioButtonChecked"),O=require("@mui/icons-material/RadioButtonUnchecked"),P=require("@mui/material/Chip"),j=require("@mui/icons-material/CheckBox"),A=require("@mui/icons-material/CheckBoxOutlineBlank"),F=require("@mui/material/RadioGroup"),D=require("@mui/material/LinearProgress"),B=require("@mui/material/Rating"),_=require("dayjs"),H=require("@mui/material/Popover"),V=require("@mui/material/Toolbar"),z=require("@mui/icons-material/KeyboardArrowLeft"),q=require("@mui/icons-material/KeyboardArrowRight"),W=require("@mui/icons-material/CalendarTodayOutlined"),Y=require("@mui/icons-material/ArrowForward"),U=require("@mui/icons-material/AlarmOutlined"),$=require("@mui/material/Switch"),G=require("@mui/material/Slider"),X=require("@mui/material/ListItem"),Q=require("@mui/icons-material/Clear"),K=require("@mui/material/ListSubheader"),Z=require("@mui/icons-material/Search"),J=require("@mui/icons-material/ArrowDropDown"),ee=require("@mui/icons-material/ExpandMore"),te=require("@mui/material/Tab"),ne=require("@mui/material/Tabs");function re(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function ie(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var oe=ie(e),ae=re(e),ue=re(r),le=re(i),ce=re(o),se=re(a),de=re(u),fe=re(l),me=re(c),ve=re(f),pe=re(v),he=re(p),be=re(h),ye=re(b),ge=re(y),Ee=re(g),xe=re(E),Ce=re(x),we=re(C),ke=re(w),Se=re(k),Ie=re(S),Me=re(I),Re=re(M),Le=re(R),Te=re(L),Ne=re(T),Oe=re(N),Pe=re(O),je=re(P),Ae=re(j),Fe=re(A),De=re(F),Be=re(D),_e=re(B),He=re(_),Ve=re(H),ze=re(V),qe=re(z),We=re(q),Ye=re(W),Ue=re(Y),$e=re(U),Ge=re($),Xe=re(G),Qe=re(X),Ke=re(Q),Ze=re(K),Je=re(Z),et=re(J),tt=re(ee),nt=re(te),rt=re(ne),it=function(e,t){return it=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])},it(e,t)};function ot(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}it(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var at=function(){return at=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},at.apply(this,arguments)};function ut(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function lt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}l((r=r.apply(e,t||[])).next())}))}function ct(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function st(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 dt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ft(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function mt(e){return this instanceof mt?(this.v=e,this):new mt(e)}function vt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=i[e](t)).value instanceof mt?Promise.resolve(n.value.v).then(l,c):s(o[0][2],n)}catch(e){s(o[0][3],e)}var n}function l(e){u("next",e)}function c(e){u("throw",e)}function s(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}}var pt=e.createContext(null),ht=function(t){var n=t.children,r=t.apiRef,i=void 0===r?null:r,o=t.reloadSubject,a=void 0===o?null:o,u=t.changeSubject,l=void 0===u?null:u,c=t.updateSubject,s=void 0===c?null:c,d=e.useMemo((function(){return{apiRef:i,reloadSubject:a,changeSubject:l,updateSubject:s}}),[i,a,l,s]);return oe.createElement(pt.Provider,{value:d},n)},bt=n.createMakeAndWithStyles({useTheme:t.useTheme}).makeStyles,yt=function(n){var r=n.children,i=t.useTheme(),o=e.useMemo((function(){return t.createTheme(i)}),[i]);return oe.createElement(t.ThemeProvider,{theme:o},r)};exports.FieldType=void 0,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"}(exports.FieldType||(exports.FieldType={})),Object.entries(exports.FieldType).forEach((function(e){var t=dt(e,2),n=t[0],r=t[1];exports.FieldType[n]=Symbol.for(r)}));var gt=exports.FieldType,Et=new Set([gt.Group,gt.Box,gt.Paper,gt.Outline,gt.Expansion,gt.Div,gt.Tabs,gt.Hero,gt.Fragment,gt.Center,gt.Stretch,gt.Condition,gt.Layout]),xt=function(e){return Et.has(e)},Ct=function(e){var t=e.type;return e.name&&!Et.has(t)},wt=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype},kt=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(Array.isArray(e[n])?t[n]=e[n].slice(0):wt(e[n])?t[n]=kt(e[n]):t[n]=e[n]);return t},St=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})),i=r.slice(0,r.length-1).reduce((function(e,t){return e&&e[t]}),e),o=dt(r.reverse(),1)[0];try{return i[o]=n,!0}catch(e){return!1}},It=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)},Mt=function(e,t){if(e===t)return!0;if(wt(e)&&wt(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Mt(e[n],t[n]))return!1;return!0}return!1};var Rt,Lt=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 i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return lt(e,void 0,void 0,(function(){return ct(this,(function(e){switch(e.label){case 0:return[4,n.apply(void 0,ft([],dt(i),!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 lt(e,void 0,void 0,(function(){var e,r;return ct(this,(function(i){switch(i.label){case 0:e=ft([],dt(this._events&&this._events[t]||[]),!1),r=0,i.label=1;case 1:return r===e.length?[3,4]:[4,e[r].apply(e,ft([],dt(n),!1))];case 2:i.sent(),i.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}(),Tt=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,ft([],dt(n),!1)))}}))},Nt=function(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout((function(){return t()}),e)}))},Ot=Symbol("cancelable-canceled"),Pt=function(e){var t,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new Promise((function(r,i){var o=!1;t&&t(),t=function(){o=!0,r(Ot)};var a=e.apply(void 0,ft([],dt(n),!1));a.then((function(e){o||r(e)})),a.catch((function(e){o||i(e)}))}))};return n.cancel=function(){t&&t()},n},jt=function(e){var t=Promise.resolve(),n=void 0,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=!1,u=function(){a=!0};return n=n?Tt(n,u):u,t=t.then((function(){return lt(void 0,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return a?[3,2]:[4,e.apply(void 0,ft([],dt(i),!1))];case 1:return[2,t.sent()];case 2:return[2,Ot]}}))}))})).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},At=function(e){return requestAnimationFrame(e)},Ft=function(e){return cancelAnimationFrame(e)},Dt=function(e,t){var n;void 0===t&&(t=1e3);var r=null,i=t?setTimeout:At,o=t?clearTimeout:Ft,a=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];null!==n&&o(n);var l=function(){r=null,n=null,e.apply(void 0,ft([],dt(a),!1))};r=l,n=i(l,t)};return a.clear=function(){null!==n&&o(n),n=null,r=null},a.flush=function(){null!==n&&o(n),r&&r(),n=null,r=null},a.pending=function(){return!!r},a},Bt=Symbol("observer-subscribe"),_t=Symbol("observer-connect"),Ht=Symbol("observer-disconnect"),Vt=Symbol("observer-connect-listen"),zt=Symbol("observer-disconnect-listen"),qt=function(){function e(t){var n=this;this.dispose=t,this.broadcast=new Lt,this._isShared=!1,this._subscribe=function(e,t){n.broadcast.subscribe(Bt,t),e[Vt]((function(){n.broadcast.emit(_t)})),e[zt]((function(){n.hasListeners||n.broadcast.emit(Ht)}))},this._unsubscribe=function(e){n.broadcast.unsubscribe(Bt,e)},this.tryDispose=function(){n.hasListeners||n._isShared||(n.dispose(),n.broadcast.emit(Ht))},this.map=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=function(e){var n=t(e);i.emit(n)};return n._subscribe(i,o),r=function(){return n._unsubscribe(o)},i},this.flatMap=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=function(e){var n=t(e);Array.isArray(n)?n.forEach((function(e){i.emit(e)})):i.emit(n)};return n._subscribe(i,o),r=function(){return n._unsubscribe(o)},i},this.operator=function(e){return e(n)},this.reduce=function(t,r){var i,o=r,a=new e(Tt((function(){return n.tryDispose()}),(function(){return i()}))),u=function(e){var n=t(o,e);o=n,a.emit(n)};return n._subscribe(a,u),i=function(){return n._unsubscribe(u)},a},this.split=function(){var t,r=new e(Tt((function(){return n.tryDispose()}),(function(){return t()}))),i=function(e){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){r.emit(e)})):r.emit(e)};return n._subscribe(r,i),t=function(){return n._unsubscribe(i)},r},this.mapAsync=function(t,r){var i,o=new e(Tt((function(){return n.tryDispose()}),(function(){return i()}))),a=jt(t),u=function(e){return lt(n,void 0,void 0,(function(){var t,n;return ct(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,a(e)];case 1:return(t=i.sent())!==Ot&&o.emit(t),[3,3];case 2:if(n=i.sent(),!r)throw n;return r(n),[3,3];case 3:return[2]}}))}))};return n._subscribe(o,u),i=Tt((function(){return n._unsubscribe(u)}),(function(){return a.clear()})),o},this.filter=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=function(e){t(e)&&i.emit(e)};return n._subscribe(i,o),r=function(){return n._unsubscribe(o)},i},this.tap=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=function(e){t(e),i.emit(e)};return n._subscribe(i,o),r=function(){return n._unsubscribe(o)},i},this.debounce=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=Dt((function(e){i.emit(e)}),t);return n._subscribe(i,o),r=Tt((function(){return o.clear()}),(function(){return n._unsubscribe(o)})),i},this.delay=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=!1,a=jt((function(e){return lt(n,void 0,void 0,(function(){return ct(this,(function(n){switch(n.label){case 0:return[4,Nt(t)];case 1:return n.sent(),o?[3,3]:[4,i.emit(e)];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}));return n._subscribe(i,a),r=Tt((function(){return a.clear()}),(function(){return n._unsubscribe(a)}),(function(){o=!0})),i},this.emit=function(e){return lt(n,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return[4,this.broadcast.emit(Bt,e)];case 1:return t.sent(),[2]}}))}))},this.connect=function(e){return n.broadcast.subscribe(Bt,e),n.broadcast.emit(_t),Tt((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,i;void 0===t&&(t=1e3);var o=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}),(function(){return void 0!==i&&clearTimeout(i)}))),a=function(e){void 0!==i&&clearTimeout(i),o.emit(e),n.hasListeners&&(i=setTimeout(a,t,e))};return n._subscribe(o,a),r=function(){return n._unsubscribe(a)},o},this.merge=function(t){var r,i=new e(Tt((function(){return n.tryDispose()}),(function(){return r()}))),o=function(e){i.emit(e)};n._subscribe(i,o);var a=function(){};return i[Vt]((function(){a=t.connect(o)||function(){}})),r=Tt((function(){return n._unsubscribe(o)}),(function(){return a()})),i},this.unsubscribe=function(){n.broadcast.unsubscribeAll(),n.broadcast.emit(Ht),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 vt(this,arguments,(function(){return ct(this,(function(n){switch(n.label){case 0:return t?[3,4]:[4,mt(e.toPromise())];case 1:return[4,mt(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(Bt).length},enumerable:!1,configurable:!0}),e.prototype[Vt]=function(e){this.broadcast.once(_t,e)},e.prototype[zt]=function(e){this.broadcast.once(Ht,e)},e}(),Wt=Symbol("react-declarative-subject"),Yt=function(){function e(){var e=this;this._emitter=new Lt,this.map=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.map(t)},this.flatMap=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.flatMap(t)},this.reduce=function(t,n){var r,i=new qt((function(){return r()}));return r=e.subscribe(i.emit),i.reduce(t,n)},this.mapAsync=function(t,n){var r,i=new qt((function(){return r()}));return r=e.subscribe(i.emit),i.mapAsync(t,n)},this.filter=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.filter(t)},this.tap=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.tap(t)},this.operator=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.operator(t)},this.split=function(){var t,n=new qt((function(){return t()}));return t=e.subscribe(n.emit),n.split()},this.debounce=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.debounce(t)},this.delay=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.delay(t)},this.repeat=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.repeat(t)},this.merge=function(t){var n,r=new qt((function(){return n()}));return n=e.subscribe(r.emit),r.merge(t)},this.subscribe=function(t){return e._emitter.subscribe(Wt,t),function(){e._emitter.unsubscribe(Wt,t)}},this.unsubscribeAll=function(){e._emitter.unsubscribeAll()},this.once=function(t){return e._emitter.once(Wt,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 lt(this,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return[4,this._emitter.emit(Wt,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.toObserver=function(){var e,t=new qt((function(){return e()}));return e=this.subscribe(t.emit),t},e}(),Ut=function(e){var t,n=0,r=new qt((function(){void 0!==t&&clearTimeout(t)})),i=function(){r.emit(n),n++,t=setTimeout(i,e)};return r[Vt]((function(){i()})),r},$t=function(e,t){var n=!1,r=new qt((function(){n=!0}));return r[Vt]((function(){lt(void 0,void 0,void 0,(function(){var i,o;return ct(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e()];case 1:return i=a.sent(),n||r.emit(i),[3,3];case 2:if(o=a.sent(),!t)throw o;return t(o),[3,3];case 3:return[2]}}))}))})),r},Gt=function(e){var t,n=new qt((function(){void 0!==t&&clearTimeout(t)})),r=function(){t=void 0,n.emit()};return n[Vt]((function(){setTimeout(r,e)})),n},Xt=function(e){var t=new qt((function(){}));return t[Vt]((function(){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){t.emit(e)})):t.emit(e)})),t},Qt=function(e){var t=new qt((function(){document.removeEventListener(e,t.emit)}));return t[Vt]((function(){document.addEventListener(e,t.emit)})),t},Kt=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()}}},Zt=function(){function e(){}var t;return t=e,e.merge=function(e){var t=(new Yt).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,i=void 0!==r&&r,o=n.buffer,a=void 0===o?[]:o,u=function(){},l=new qt((function(){return u()}));e=e.filter((function(e){return!!e})),a=ft([],dt(new Array(e.length)),!1).map((function(e,t){return a[t]}));var c=[],s=function(){a.every((function(e){return void 0!==e}))&&(l.emit(ft([],dt(a),!1)),!i&&a.fill(void 0))};return l[Vt]((function(){e.forEach((function(e,t){if(e){var n=e.connect((function(e){a[t]=e,s()}));c.push((function(){return n()}))}})),u=Tt.apply(void 0,ft([],dt(c),!1))})),l},e.unicast=function(e){return at(at({},Kt(e)),{isUnicasted:!0})},e.multicast=function(e){var t;return at(at({},Kt((function(){return t||(t=e())[zt]((function(){t=void 0})),t}))),{getRef:function(){return t},isMulticasted:!0})},e.createHot=function(e){var t,n=new qt((function(){return t()}));return t=e(n.emit)||function(){},n},e.createCold=function(e){var t=function(){},n=new qt((function(){return t()}));return n[Vt]((function(){t=e(n.emit)||function(){}})),n},e.create=t.createCold,e.pipe=function(e,t){var n=function(){},r=new qt((function(){return n()}));return r[Vt]((function(){var i=new Yt,o=e.connect(i.next),a=t(i,r.emit)||function(){};n=Tt((function(){return a()}),(function(){return o()}))})),r},e.fromInterval=Ut,e.fromPromise=$t,e.fromDelay=Gt,e.fromArray=Xt,e.fromEvent=Qt,e.fromValue=function(e){var t=new qt((function(){}));return t[Vt]((function(){"function"==typeof e?t.emit(e()):t.emit(e)})),t},e.fromSubject=function(e){var t,n=new qt((function(){return t()}));return t=e.subscribe(n.emit),n},e.fromBehaviorSubject=function(e){var t,n=new qt((function(){return t()}));return n[Vt]((function(){e.data&&n.emit(e.data)})),t=e.subscribe(n.emit),n},e}(),Jt=Zt.create((function(e){return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}})),en=Zt.create((function(e){return document.addEventListener("touchmove",e),function(){return document.removeEventListener("touchmove",e)}})),tn=Zt.create((function(e){return document.addEventListener("scroll",e),function(){return document.removeEventListener("scroll",e)}})),nn=Zt.unicast((function(){var e=0;return Zt.merge([Jt,en,tn]).filter((function(){return 20===e||(e+=1,!1)})).tap((function(){e=0})).share()})),rn=function(e){return nn.connect(e)},on=Zt.unicast((function(){return Zt.create((function(e){return Zt.fromEvent("keydown").connect((function(t){"Tab"===t.code&&e()}))})).share()})),an=Zt.unicast((function(){return Zt.create((function(e){return document.addEventListener("touchstart",e,{passive:!1}),document.addEventListener("mousedown",e),function(){document.removeEventListener("touchstart",e),document.removeEventListener("mousedown",e)}})).share()})),un=function(t){var n=e.createContext(t||null);return[function(e){var t=e.children,r=e.payload;return ae.default.createElement(n.Provider,{value:r},t)},function(){return e.useContext(n)}]},ln=dt(un(),2),cn=ln[0],sn=ln[1],dn=e.createContext(null),fn={},mn=function(e){var t=e.children,n=e.payload,r=void 0===n?fn:n;return oe.createElement(dn.Provider,{value:r},t)},vn=function(){return e.useContext(dn)},pn=((Rt={})[gt.Checkbox]=!1,Rt[gt.Radio]=null,Rt[gt.Text]="",Rt[gt.Switch]=!1,Rt[gt.Progress]=1,Rt[gt.Slider]=0,Rt[gt.Combo]=null,Rt[gt.Items]=null,Rt[gt.Rating]=3,Rt[gt.Typography]="",Rt[gt.Date]="",Rt[gt.Time]="",Rt[gt.File]=null,Rt[gt.Choose]=null,Rt[gt.Component]=null,Rt[gt.Complete]="",Rt[gt.Init]=null,Rt[gt.YesNo]=null,Rt[gt.Dict]=null,Rt[gt.Tree]=null,Rt),hn=function(e){var t=pn[e];return void 0===t?void console.warn("react-declarative One initialValue unknown type ".concat(String(e))):t},bn=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||[],i=e.child?[e.child]:[];n(ft(ft([],dt(r),!1),dt(i),!1)),t.push(e)}))};return n(e),t},yn=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(!r.length)return e;var o=r.shift();if(wt(e)&&wt(o))for(var a in o)Array.isArray(o[a])?e[a]=o[a].slice(0):wt(o[a])?(e[a]||Object.assign(e,((t={})[a]={},t)),yn(e[a],o[a])):Object.assign(e,((n={})[a]=o[a],n));return yn.apply(void 0,ft([e],dt(r),!1))},gn=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)},En=function(t){var n=dt(e.useState(t),2),r=n[0],i=n[1],o=e.useRef(r),a=e.useCallback((function(e){var t;t="function"==typeof e?e(o.current):e,o.current=t,i(t)}),[]);return[o,a]},xn=Symbol("empty-value"),Cn=function(t){var n=e.useRef(xn);return n.current===xn&&(n.current=function(e){return"function"==typeof e?e():e}(t)),n.current},wn=function(t){var n=Cn((function(){return new Yt}));return e.useEffect((function(){var e=void 0;return t&&(e=t.subscribe(n.next)),e}),[t]),n},kn="one-resolve",Sn=function(e){return e},In=function(e,t,n){var r={};return e&&bn(e).filter((function(e){return!n||!e.features||e.features.some((function(e){return n.includes(e)}))})).filter((function(e){return e.type!==gt.Phony})).filter((function(e){return e.type!==gt.Button})).filter((function(e){return e.type!==gt.Icon})).forEach((function(e){if(Ct(e)){if(gn(r,e.name),"function"==typeof e.hidden?e.hidden(t):e.hidden)return;void 0===e.defaultValue?St(r,e.name,It(r,e.name)||hn(e.type)):"function"==typeof e.defaultValue?St(r,e.name,e.defaultValue(t)):St(r,e.name,e.defaultValue)}})),r},Mn=function(t){var n=t.handler,r=t.fallback,i=t.fields,o=t.features,a=t.payload,u=t.change,l=t.loadStart,c=t.loadEnd,s=t.incomingTransform,d=void 0===s?Sn:s,f=dt(En(null),2),m=f[0],v=f[1],p=e.useContext(pt),h=p.apiRef,b=p.changeSubject,y=p.reloadSubject,g=p.updateSubject,E=e.useRef(!0),x=e.useRef(!1),C=wn(b),w=wn(y),k=wn(g);e.useEffect((function(){var e,t=function(){return lt(void 0,void 0,void 0,(function(){var e,t,s,f,p,h,b;return ct(this,(function(y){switch(y.label){case 0:return x.current?[2]:[3,1];case 1:if("function"!=typeof n)return[3,9];e=!0,l&&l(kn),y.label=2;case 2:return y.trys.push([2,6,7,8]),(t=n(a))instanceof Promise?(s=yn,f=[{},In(i,a,o)],p=kt,[4,t]):[3,4];case 3:return b=s.apply(void 0,f.concat([p.apply(void 0,[y.sent()])])),u(b,!0),E.current&&v(d(b,a)),[3,5];case 4:b=yn({},In(i,a,o),kt(t)),u(b,!0),E.current&&v(d(b,a)),y.label=5;case 5:return[3,8];case 6:if(h=y.sent(),e=!1,!r)throw h;return r(h),[3,8];case 7:return c&&c(e,kn),x.current=!0,[7];case 8:return[3,10];case 9:n&&!Mt(m.current,n)&&(b=yn({},In(i,a,o),kt(n)),E.current&&v(d(b,a))),y.label=10;case 10:return[2]}}))}))};t(),e={reload:t,change:function(e,t){void 0===t&&(t=!1),v(d(e,a)),u(e,t)},getData:function(){return at({},m.current||{})}},"function"==typeof h?h(e):h&&(h.current=e),w.unsubscribeAll(),w.subscribe(e.reload),C.unsubscribeAll(),C.subscribe((function(t){t&&t!==m.current&&e.change(t,!0)})),k.unsubscribeAll(),k.subscribe((function(t){t&&t!==m.current&&e.change(t,!1)}))}),[n]),e.useLayoutEffect((function(){return function(){E.current=!1}}),[]);var S=e.useCallback((function(){return m.current}),[]);return[m.current,v,S]},Rn=function(t){var n=e.useRef(t);return n.current=t,n},Ln=e.createContext(null),Tn=function(t){var n=t.children,r=ut(t,["children"]),i=e.useRef({}),o=e.useRef(!1),a=r.fields,u=void 0===a?[]:a,l=r.features,c=r.change,s=void 0===c?function(){return null}:c,d=r.fallback,f=void 0===d?function(){return null}:d,m=r.handler,v=void 0===m?function(){return{}}:m,p=r.payload,h=r.loadStart,b=r.loadEnd,y=r.incomingTransform,g=dt(Mn({handler:v,fallback:f,fields:u,features:l,payload:p,change:s,loadStart:h,loadEnd:b,incomingTransform:y}),3),E=g[0],x=g[1],C=g[2],w=Rn(E),k=e.useCallback((function(e,t){var n=i.current,r=w.current;x(e),Object.entries(t).forEach((function(e){var t=dt(e,2),r=t[0],i=t[1];n[r]=i})),Object.values(n).some((function(e){return e}))?o.current=!0:(e!==r||o.current)&&(o.current=!1,s(e,!1))}),[]),S=e.useCallback((function(e){return k(kt(at(at({},w.current),e)),{})}),[]),I=e.useMemo((function(){return{object:E,setObject:k,changeObject:S,getObjectRef:C}}),[E]);return oe.createElement(Ln.Provider,{value:I},!!E&&n)},Nn=function(){return e.useContext(Ln)},On=function(){return d.v4()},Pn=On(),jn=function(t){void 0===t&&(t=0);var n=dt(e.useState(Pn),2),r=n[0],i=n[1],o=e.useCallback((function(){return i(On())}),[]);return e.useEffect((function(){var e;return t&&(e=setTimeout((function(){e=void 0,o()}),t)),function(){void 0!==e&&clearTimeout(e)}}),[r,t,o]),{reloadTrigger:r,doReload:o}},An=function(t){var n=t.reloadSubject,r=t.loading,i=t.children,o=t.fallback,a=t.Loader,u=void 0===a?function(){return null}:a,l=t.Error,c=void 0===l?function(){return null}:l,d=t.onLoadStart,f=t.onLoadEnd,m=t.payload,v=t.deps,p=void 0===v?[]:v,h=t.throwError,b=void 0!==h&&h,y=dt(e.useState(""),2),g=y[0],E=y[1],x=jn(),C=x.reloadTrigger,w=x.doReload,k=wn(n);e.useEffect((function(){return k.subscribe((function(){w()}))}),[]);var S=e.useRef(null),I=dt(e.useState(!1),2),M=I[0],R=I[1],L=dt(e.useState(!1),2),T=L[0],N=L[1],O=e.useRef(!0),P=r||M;return e.useLayoutEffect((function(){return function(){O.current=!1}}),[]),e.useEffect((function(){S.current&&S.current.cancel();var e=Pt((function(){return lt(void 0,void 0,void 0,(function(){var e,t,n;return ct(this,(function(r){switch(r.label){case 0:e=!0,d&&d(),r.label=1;case 1:return r.trys.push([1,5,6,7]),(t=i(m))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 f&&f(e),[7];case 7:return[2]}}))}))}));S.current=e;lt(void 0,void 0,void 0,(function(){var t,n,r;return ct(this,(function(i){switch(i.label){case 0:t=!1,O.current&&R(!0),O.current&&N(!1),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,e()];case 2:return(n=i.sent())===Ot?(t=!0,[2]):(S.current=null,O.current&&queueMicrotask((function(){return s.flushSync((function(){E(n)}))})),[3,5]);case 3:if(r=i.sent(),O.current&&N(!0),b)throw r;return o&&o(r),[3,5];case 4:return t||O.current&&R(!1),[7];case 5:return[2]}}))}))}),ft(ft([m],dt(p),!1),[C],!1)),P?oe.createElement(u,{payload:m}):T?oe.createElement(c,{payload:m}):oe.createElement(oe.Fragment,null,g)},Fn=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}(),Dn=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 Fn(e.apply(void 0,ft([],dt(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},Bn=function(t,n){void 0===n&&(n=[]);var r=e.useRef(t);return r.current=t,e.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.current.apply(r,ft([],dt(e),!1))}),n)},_n=function(t,n){var r=void 0===n?{}:n,i=r.onLoadStart,o=r.onLoadEnd,a=r.fallback,u=r.throwError,l=dt(e.useState(!1),2),c=l[0],s=l[1],d=dt(e.useState(!1),2),f=d[0],m=d[1],v=e.useRef(!0),p=Bn(t);e.useLayoutEffect((function(){return function(){v.current=!1}}),[]);var h=e.useMemo((function(){return Dn((function(e){return lt(void 0,void 0,void 0,(function(){var t,n,r;return ct(this,(function(l){switch(l.label){case 0:t=function(){return lt(void 0,void 0,void 0,(function(){var t,n,r;return ct(this,(function(a){switch(a.label){case 0:t=!0,i&&i(),a.label=1;case 1:return a.trys.push([1,5,6,7]),(n=p(e))instanceof Promise?[4,n]:[3,3];case 2:return[2,a.sent()||null];case 3:return[2,n||null];case 4:return[3,7];case 5:throw r=a.sent(),t=!1,r;case 6:return o&&o(t),[7];case 7:return[2]}}))}))},v.current&&s(!0),v.current&&m(!1),n=!1,l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,t()];case 2:return[2,l.sent()];case 3:if(r=l.sent(),v.current&&m(!0),u)throw r;return a&&a(r),[3,5];case 4:return n||v.current&&s(!1),[7];case 5:return[2,null]}}))}))}))}),[]);return{loading:c,error:f,execute:h}},Hn=function(t){var n=Cn(t),r=e.useRef(n),i=e.useCallback((function(e){var t;t="function"==typeof e?e(r.current):e,r.current=t}),[]);return[r,i]},Vn={name:"",menu:function(){return null},menuItems:[],onValueChange:function(){return null}},zn=bt()({container:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch",maxHeight:"45vh",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},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"}}),qn=function(t){var n=t.requestSubject,r=zn().classes,i=dt(e.useState(null),2),o=i[0],a=i[1],u=dt(e.useState(0),2),l=u[0],c=u[1],s=dt(Hn(Vn),2),d=s[0],f=s[1],m=dt(Hn(0),2),v=m[0],p=m[1],h=Nn(),b=h.object,y=h.changeObject,g=vn(),E=e.useCallback((function(){c((function(e){return e+1}))}),[]),x=e.useCallback((function(){c((function(e){return Math.max(e-1,0)}))}),[]),C=_n((function(e){return lt(void 0,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return[4,d.current.menu(d.current.name,e,w.current,g,d.current.onValueChange,y)];case 1:return t.sent(),a(null),[2]}}))}))}),{onLoadStart:E,onLoadEnd:x}).execute,w=Rn(b),k=e.useMemo((function(){return d.current.menuItems.map((function(e){var t=e.isDisabled,n=void 0===t?function(){return!1}:t,r=e.isVisible,i=void 0===r?function(){return!0}:r,o=ut(e,["isDisabled","isVisible"]);return at(at({},o),{isDisabled:function(){return n(w.current,g)},isVisible:function(){return i(w.current,g)}})}))}),[d.current.menuItems]),S=Rn(k);return e.useEffect((function(){return n.subscribe(jt((function(e){var t=e.event,n=e.menuItems,r=e.menu,i=e.name,o=e.onValueChange;return lt(void 0,void 0,void 0,(function(){var e;return ct(this,(function(u){switch(u.label){case 0:return[4,Nt(350)];case 1:return u.sent(),p((function(e){return e+1})),f({name:i,menuItems:n,onValueChange:o,menu:r}),e=document.elementFromPoint(t.clientX,t.clientY),a(e||t.target),[2]}}))}))})))}),[]),oe.createElement(me.default,{key:v.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:o,open:!!o,onClose:function(){return a(null)},MenuListProps:{disablePadding:!0}},oe.createElement("div",{className:r.container},0!==l&&oe.createElement("div",{className:r.loader},oe.createElement(le.default,{size:14})),oe.createElement("div",{className:r.content},S.current.map((function(e,t){var n=e.label,r=void 0===n?"unknown-label":n,i=e.action,o=void 0===i?"unknown-action":i,u=e.divider,l=e.onClick,c=e.icon,s=e.isDisabled,f=void 0===s?function(){return!1}:s,m=e.isVisible,p=void 0===m?function(){return!0}:m;return oe.createElement(An,{Loader:function(){return u?null:oe.createElement(de.default,{sx:{visibility:"hidden",minWidth:225}},!!c&&oe.createElement(ce.default,null,oe.createElement(c,null)),oe.createElement(se.default,{variant:"inherit"},r))},onLoadStart:E,onLoadEnd:x,key:"".concat(v.current,"-").concat(t),payload:g},(function(e){return lt(void 0,void 0,void 0,(function(){var t;return ct(this,(function(n){switch(n.label){case 0:return[4,Nt(0)];case 1:return n.sent(),[4,f(e)];case 2:return t=n.sent(),[4,p(e)];case 3:return n.sent()?u?[2,oe.createElement(fe.default,{orientation:"horizontal"})]:[2,oe.createElement(de.default,{disabled:t,onClick:function(){if(l)return l(w.current,e,d.current.onValueChange,y),void a(null);C(o)},sx:{minWidth:225}},!!c&&oe.createElement(ce.default,null,oe.createElement(c,null)),oe.createElement(se.default,{variant:"inherit"},r))]:[2,null]}}))}))}))})))))},Wn=e.createContext(null),Yn=function(t){var n=t.children,r=wn(),i=e.useMemo((function(){return{createContextMenu:function(e){var t=e.menuItems,n=void 0===t?[]:t,i=e.onValueChange,o=void 0===i?function(){return null}:i,a=e.menu,u=e.name;return function(e){return lt(void 0,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return n?(e.preventDefault(),e.stopPropagation(),(null==n?void 0:n.length)?[4,r.next({name:u,menu:a,event:e,menuItems:n,onValueChange:o})]:[2]):[2];case 1:return[2,t.sent()]}}))}))}},requestSubject:r}}),[]);return oe.createElement(Wn.Provider,{value:i},n,oe.createElement(qn,{requestSubject:r}))},Un=function(){return e.useContext(Wn)};var $n=function(e){var t=!1,n=null,r=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t||(t=!0,n=e.apply(void 0,ft([],dt(r),!1))),n};return r.clear=function(){t=!1},r},Gn=function(){return!0},Xn=function(e,t){var n=e.compute,r=e.type,i=e.readTransform,o=e.name,a=e.object,u=e.payload,l=e.config;if(n&&l.WITH_SYNC_COMPUTE){var c=t?n(a,u):hn(r);return!(c instanceof Promise)&&c}return!(n||!o)&&(i(It(a,o),o,a,u)||hn(r))},Qn=function(e,t){var n=void 0===t?{}:t,r=n.allowedErrors,i=n.fallback,o=n.defaultValue,a=void 0===o?null:o;return function(){for(var t,n,o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];try{var l=e.apply(void 0,ft([],dt(o),!1));return l instanceof Promise?function(e,t){var n=t.fallback,r=t.defaultValue;return lt(void 0,void 0,void 0,(function(){var t;return ct(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e];case 1:return[2,i.sent()];case 2:return t=i.sent(),n&&n(t),[2,r];case 3:return[2]}}))}))}(l,{fallback:i,defaultValue:a}):l}catch(e){if(i&&i(e),r){try{for(var c=st(r),s=c.next();!s.done;s=c.next()){if(e instanceof s.value)return a}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}throw e}return a}}},Kn=function(){return!1},Zn=function(){return!0},Jn=function(){return null},er=function(){return null},tr=function(){return!1},nr=function(e,t,n){var r="".concat(t,"(").concat(e||"unknown",")");return function(e){console.error("react-declarative ".concat(r," ").concat(n," exception"),e)}},rr=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=rr.apply(void 0,ft([],dt(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=dt(e,2);return t[0],!!t[1]})).forEach((function(e){var t=dt(e,1)[0];return n.push(t)})))})),n.join(" ")},ir="12",or=function(e){return Number(e)},ar=bt()({root:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch"},container:{flex:1,display:"flex",alignItems:"stretch",justifyContent:"stretch",width:"100%","& > *":{flex:1}}}),ur=function(t,n){var r=t.className,i=t.style,o=t.sx,a=t.columns,u=void 0===a?"":a,l=t.phoneColumns,c=void 0===l?"":l,s=t.tabletColumns,d=void 0===s?"":s,f=t.desktopColumns,m=void 0===f?"":f,v=t.fieldRightMargin,p=void 0===v?"1":v,h=t.fieldBottomMargin,b=void 0===h?"2":h,y=t.children,g=t.onClick,E=t.onFocus,x=t.onContextMenu,C=ut(t,["className","style","sx","columns","phoneColumns","tabletColumns","desktopColumns","fieldRightMargin","fieldBottomMargin","children","onClick","onFocus","onContextMenu"]),w=ar().classes,k=e.useMemo((function(){return{xs:or(c||u||ir),sm:or(d||u||ir),md:or(d||u||ir),lg:or(m||u||ir),xl:or(m||u||ir),mr:or(p),mb:or(b)}}),[]),S=k.xs,I=k.sm,M=k.md,R=k.lg,L=k.xl,T=k.mr,N=k.mb;return oe.createElement(ve.default,at({},C,{ref:n,item:!0,className:rr(r,w.root),style:i,onFocus:E,onClick:g,xs:S,sm:I,md:M,lg:R,xl:L,sx:o,onContextMenu:x}),oe.createElement(ue.default,{className:w.container,mr:T,mb:N},y))};ur.displayName="Item";var lr=e.forwardRef(ur),cr=function(t,n){var r=t.className,i=t.style,o=t.children,a=t.onFocus,u=t.onClick,l=t.isBaselineAlign,c=t.columnsOverride,s=t.sx,d=t.onContextMenu,f=ut(t,["className","style","children","onFocus","onClick","isBaselineAlign","columnsOverride","sx","onContextMenu"]),v=e.useMemo((function(){return c&&Number(c)}),[]);return oe.createElement(m.Grid,at({},f,{ref:n,container:!0,alignItems:l?"flex-end":"flex-start",className:r,style:i,onClick:u,onFocus:a,columns:v,onContextMenu:d,sx:s}),o)};cr.displayName="Container";var sr=e.forwardRef(cr),dr=bt()({root:{position:"relative","& > *":{width:"100%"}}}),fr=function(e,t){var n=e.className,r=void 0===n?"":n,i=e.columns,o=void 0===i?"":i,a=e.phoneColumns,u=void 0===a?"":a,l=e.tabletColumns,c=void 0===l?"":l,s=e.desktopColumns,d=void 0===s?"":s,f=e.children,m=e.isItem,v=e.isBaselineAlign,p=e.style,h=e.columnsOverride,b=e.sx,y=e.fieldRightMargin,g=void 0===y?"1":y,E=e.fieldBottomMargin,x=void 0===E?"2":E,C=e.onClick,w=e.onFocus,k=e.onContextMenu,S=ut(e,["className","columns","phoneColumns","tabletColumns","desktopColumns","children","isItem","isBaselineAlign","style","columnsOverride","sx","fieldRightMargin","fieldBottomMargin","onClick","onFocus","onContextMenu"]),I=dr().classes;return m?oe.createElement(lr,at({},S,{ref:t,className:rr(I.root,r),style:p,columns:o,phoneColumns:u,tabletColumns:c,desktopColumns:d,fieldRightMargin:g,fieldBottomMargin:x,onFocus:w,onClick:C,onContextMenu:k,sx:b}),f):oe.createElement(sr,at({},S,{ref:t,className:rr(I.root,r),isBaselineAlign:v,columnsOverride:h,style:p,onFocus:w,onContextMenu:k,onClick:C,sx:b}),f)};fr.displayName="Group";var mr=e.forwardRef(fr),vr=function(e){if(e){if(e.includes(".")){var t=e.split(".");e=dt(t.reverse(),1)[0]}var n=dt(e.split("_")),r=n[0],i=n.slice(1);return ft(["".concat(r.charAt(0).toUpperCase()).concat(r.slice(1))],dt(i),!1).join(" ")}},pr={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},hr=function(){var e=this;this._config=pr,this.getRef=function(){return e._config},this.setValue=function(t){Object.assign(e._config,pr,t)}},br=Symbol("get-reference"),yr=function(){function e(){}var t;return t=br,e.instance=new hr,e[t]=e.instance.getRef,e.setValue=e.instance.setValue,e}(),gr={display:"flex",alignItems:"stretch",justifyContent:"stretch"},Er=bt()((function(e){var t,n,r;return{root:at(at({},gr),{"& > *":at(at({},gr),{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)}})),xr=function(e){return console.log({v:e})},Cr=function(){return null},wr=function(){return null},kr=function(e){return e},Sr=function(){},Ir=function(){return null},Mr=function(){return null},Rr=function(e){return e},Lr=function(e){return e};function Tr(t,n){var r=this;void 0===n&&(n={withApplyQueue:!1,skipDirtyClickListener:!1,skipClickListener:!1,skipFocusReadonly:!1,skipFocusBlurCall:!1,skipDebounce:!1,defaultProps:{}});var i=e.memo(t),o=yr[br](),a=function(a){var u,l,c,s,d,f,m,v=a.className,p=void 0===v?"":v,h=a.sx,b=a.columns,y=void 0===b?"":b,g=a.phoneColumns,E=void 0===g?"":g,x=a.tabletColumns,C=void 0===x?"":x,w=a.desktopColumns,k=void 0===w?"":w,S=a.phoneHidden,I=void 0!==S&&S,M=a.tabletHidden,R=void 0!==M&&M,L=a.desktopHidden,T=void 0!==L&&L,N=a.isDisabled,O=a.isVisible,P=a.isInvalid,j=a.isIncorrect,A=a.isReadonly,F=a.readTransform,D=void 0===F?Rr:F,B=a.writeTransform,_=void 0===B?Lr:B,H=a.change,V=void 0===H?xr:H,z=a.fallback,q=void 0===z?Cr:z,W=a.ready,Y=void 0===W?wr:W,U=a.compute,$=a.shouldRecompute,G=a.click,X=void 0===G?Sr:G,Q=a.map,K=void 0===Q?kr:Q,Z=a.object,J=a.name,ee=void 0===J?"":J,te=a.title,ne=void 0===te?vr(ee)||void 0:te,re=a.menu,ie=void 0===re?Mr:re,ae=a.type,ue=a.debug,le=a.focus,ce=a.blur,se=a.invalidity,de=a.prefix,fe=a.dirty,me=void 0!==fe&&fe,ve=a.disabled,pe=void 0!==ve&&ve,he=a.readonly,be=void 0!==he&&he,ye=a.autoFocus,ge=a.style,Ee=a.menuItems,xe=a.groupRef,Ce=void 0===xe?Ir:xe,we=a.fieldRightMargin,ke=void 0===we?null===(l=n.defaultProps)||void 0===l?void 0:l.fieldRightMargin:we,Se=a.fieldBottomMargin,Ie=void 0===Se?null===(c=n.defaultProps)||void 0===c?void 0:c.fieldBottomMargin:Se,Me=a.outlinePaper,Re=void 0!==Me&&Me,Le=a.transparentPaper,Te=void 0!==Le&&Le,Ne=a.testId,Oe=void 0===Ne?ee:Ne,Pe=ut(a,["className","sx","columns","phoneColumns","tabletColumns","desktopColumns","phoneHidden","tabletHidden","desktopHidden","isDisabled","isVisible","isInvalid","isIncorrect","isReadonly","readTransform","writeTransform","change","fallback","ready","compute","shouldRecompute","click","map","object","name","title","menu","type","debug","focus","blur","invalidity","prefix","dirty","disabled","readonly","autoFocus","style","menuItems","groupRef","fieldRightMargin","fieldBottomMargin","outlinePaper","transparentPaper","testId"]),je=Nn(),Ae=je.object,Fe=je.changeObject,De=je.getObjectRef,Be=vn(),_e=Un().createContextMenu,He=function(t){var n=t.prefix,r=t.name,i=t.isDisabled,o=void 0===i?Kn:i,a=t.isVisible,u=void 0===a?Zn:a,l=t.isInvalid,c=void 0===l?Jn:l,s=t.isIncorrect,d=void 0===s?er:s,f=t.isReadonly,m=void 0===f?tr:f;return e.useMemo((function(){return{isDisabled:Qn(o,{defaultValue:!1,fallback:nr(r,n,"isDisabled")}),isVisible:Qn(u,{defaultValue:!1,fallback:nr(r,n,"isVisible")}),isInvalid:Qn(c,{defaultValue:null,fallback:nr(r,n,"isInvalid")}),isIncorrect:Qn(d,{defaultValue:null,fallback:nr(r,n,"isIncorrect")}),isReadonly:Qn(m,{defaultValue:!1,fallback:nr(r,n,"isReadonly")})}}),[])}({prefix:de,name:ee,isDisabled:N,isVisible:O,isInvalid:P,isIncorrect:j,isReadonly:A}),Ve=He.isDisabled,ze=He.isVisible,qe=He.isInvalid,We=He.isIncorrect,Ye=He.isReadonly,Ue=Ae||Z,$e=Er().classes,Ge=function(t){var n=t.compute,r=t.shouldRecompute,i=void 0===r?Gn:r;return e.useMemo((function(){var e=null;if(n){var t=$n(n);return function(n,r){return e&&i(e,n,r)&&t.clear(),e=n,t(n,r)}}}),[])}({compute:U,shouldRecompute:$}),Xe=function(t,n){var r=dt(e.useState((function(){var e=function(e){var t=e.phoneHidden,n=e.tabletHidden,r=e.desktopHidden,i=e.isReadonly,o=e.isInvalid,a=e.isDisabled,u=e.isVisible,l=e.isIncorrect,c=e.object,s=e.payload;return{phoneHidden:"function"==typeof t?t(s):t,tabletHidden:"function"==typeof n?n(s):n,desktopHidden:"function"==typeof r?r(s):r,fieldReadonly:i(c,s),invalid:o(c,s),visible:u(c,s),incorrect:l(c,s),disabled:a(c,s)}}(n);return at(at(at({groupRef:null,focusReadonly:!0,loading:!1},e),{value:Xn(n,e.visible)}),t)})),2),i=r[0],o=r[1];return{state:i,action:e.useMemo((function(){return{setGroupRef:function(e){return o((function(t){return at(at({},t),{groupRef:e})}))},setFocusReadonly:function(e){return o((function(t){return at(at({},t),{focusReadonly:e})}))},setFieldReadonly:function(e){return o((function(t){return at(at({},t),{fieldReadonly:e})}))},setDisabled:function(e){return o((function(t){return at(at({},t),{disabled:e})}))},setInvalid:function(e){return o((function(t){return at(at({},t),{invalid:e})}))},setIncorrect:function(e){return o((function(t){return at(at({},t),{incorrect:e})}))},setVisible:function(e){return o((function(t){return at(at({},t),{visible:e})}))},setLoading:function(e){return o((function(t){return at(at({},t),{loading:e})}))},setDirty:function(e){return o((function(t){return at(at({},t),{dirty:e})}))},setValue:function(e){return o((function(t){return at(at({},t),{value:e})}))}}}),[])}}({dirty:me},{compute:Ge,type:ae,readTransform:D,config:o,name:ee,object:Ue,payload:Be,isVisible:ze,isDisabled:Ve,isInvalid:qe,isIncorrect:We,isReadonly:Ye,phoneHidden:I,tabletHidden:R,desktopHidden:T}),Qe=Xe.state,Ke=Qe.phoneHidden,Ze=Qe.tabletHidden,Je=Qe.desktopHidden,et=Qe.dirty,tt=Qe.disabled,nt=Qe.fieldReadonly,rt=Qe.focusReadonly,it=Qe.groupRef,ot=Qe.invalid,st=Qe.incorrect,ft=Qe.loading,mt=Qe.value,vt=Qe.visible,pt=Xe.action,ht=pt.setDirty,bt=pt.setDisabled,yt=pt.setFieldReadonly,gt=pt.setFocusReadonly,Et=pt.setGroupRef,xt=pt.setInvalid,