@nocobase/plugin-mobile-client 0.20.0-alpha.9 → 0.21.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,7 @@
1
- import { SchemaInitializer } from '@nocobase/client';
2
- export declare const mBlockInitializers: SchemaInitializer;
1
+ import { CompatibleSchemaInitializer } from '@nocobase/client';
2
+ /**
3
+ * @deprecated
4
+ * use `mBlockInitializers` instead
5
+ */
6
+ export declare const mBlockInitializers_deprecated: CompatibleSchemaInitializer;
7
+ export declare const mBlockInitializers: CompatibleSchemaInitializer;
@@ -1,9 +1,9 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var a=document.createElement("style");a.id="@nocobase/plugin-mobile-client",a.appendChild(document.createTextNode(':root{--adm-radius-s: 4px;--adm-radius-m: 8px;--adm-radius-l: 12px;--adm-font-size-1: 9px;--adm-font-size-2: 10px;--adm-font-size-3: 11px;--adm-font-size-4: 12px;--adm-font-size-5: 13px;--adm-font-size-6: 14px;--adm-font-size-7: 15px;--adm-font-size-8: 16px;--adm-font-size-9: 17px;--adm-font-size-10: 18px;--adm-color-primary: #1677ff;--adm-color-success: #00b578;--adm-color-warning: #ff8f1f;--adm-color-danger: #ff3141;--adm-color-yellow: #ff9f18;--adm-color-orange: #ff6430;--adm-color-wathet: #e7f1ff;--adm-color-text: #333333;--adm-color-text-secondary: #666666;--adm-color-weak: #999999;--adm-color-light: #cccccc;--adm-color-border: #eeeeee;--adm-color-background: #ffffff;--adm-color-highlight: var(--adm-color-danger);--adm-color-white: #ffffff;--adm-color-box: #f5f5f5;--adm-color-text-light-solid: var(--adm-color-white);--adm-color-text-dark-solid: #000000;--adm-color-fill-content: var(--adm-color-box);--adm-font-size-main: var(--adm-font-size-5);--adm-font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, segoe ui, arial, roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--adm-border-color: var(--adm-color-border)}html[data-prefers-color-scheme=dark]{--adm-color-primary: #3086ff;--adm-color-success: #34b368;--adm-color-warning: #ffa930;--adm-color-danger: #ff4a58;--adm-color-yellow: #ffa930;--adm-color-orange: #e65a2b;--adm-color-wathet: #0d2543;--adm-color-text: #e6e6e6;--adm-color-text-secondary: #b3b3b3;--adm-color-weak: #808080;--adm-color-light: #4d4d4d;--adm-color-border: #2b2b2b;--adm-color-box: #0a0a0a;--adm-color-background: #1a1a1a;--adm-color-background-body: var(--adm-color-background);--adm-border-color: var(--adm-color-border)}:root{-webkit-tap-highlight-color:rgba(0,0,0,0)}html{background-color:var(--adm-color-background-body)}body{color:var(--adm-color-text);font-size:var(--adm-font-size-main);font-family:var(--adm-font-family)}a,button{cursor:pointer}a{color:var(--adm-color-primary);transition:opacity ease-in-out .2s}a:active{opacity:.8}.adm-plain-anchor{color:unset;transition:none}.adm-plain-anchor:active{opacity:unset}body.adm-overflow-hidden{overflow:hidden!important}div.adm-px-tester{--size: 1;height:calc(var(--size) / 2 * 2px);width:0;position:fixed;right:-100vw;bottom:-100vh;-webkit-user-select:none;user-select:none;pointer-events:none}.adm-safe-area{--multiple: var(--adm-safe-area-multiple, 1);display:block;width:100%}.adm-safe-area-position-top{padding-top:calc(env(safe-area-inset-top) * var(--multiple))}.adm-safe-area-position-bottom{padding-bottom:calc(env(safe-area-inset-bottom) * var(--multiple))}.adm-badge-wrapper{display:inline-block;position:relative}.adm-badge{display:inline-flex;vertical-align:middle;box-sizing:content-box;border-radius:100px;background-color:var(--color);--right: 0;--top: 0;--color: var(--adm-badge-color, var(--adm-color-highlight))}.adm-badge-content{color:var(--adm-color-text-light-solid);box-sizing:border-box;min-width:8px;padding:1px 4px;font-size:var(--adm-font-size-1);line-height:12px;white-space:nowrap;font-weight:400;text-align:center}.adm-badge-fixed{position:absolute;right:var(--right);top:var(--top);transform:translate(50%,-50%)}.adm-badge-dot{min-width:10px;width:10px;height:10px;border-radius:5px}.adm-badge-bordered{border:solid 1px var(--adm-color-text-light-solid)}.adm-list{--header-font-size: var(--adm-font-size-7);--prefix-width: "auto";--prefix-padding-right: 12px;--align-items: center;--active-background-color: var(--adm-color-border);--border-inner: solid 1px var(--adm-color-border);--border-top: solid 1px var(--adm-color-border);--border-bottom: solid 1px var(--adm-color-border);--padding-left: 12px;--padding-right: 12px;--font-size: var(--adm-font-size-9);--extra-max-width: 70%}.adm-list-header{color:var(--adm-color-weak);font-size:var(--header-font-size);padding:8px var(--padding-right) 8px var(--padding-left)}.adm-list-body{background-color:var(--adm-color-background);overflow:hidden;font-size:var(--font-size)}.adm-list-body-inner{margin-top:-1px}.adm-list-default .adm-list-body{border-top:var(--border-top);border-bottom:var(--border-bottom)}.adm-list-card{margin:12px}.adm-list-card .adm-list-body{border-radius:8px}.adm-list-card .adm-list-header{padding-left:0}.adm-list-item{display:block;padding-left:var(--padding-left);position:relative;background-color:var(--adm-color-background);line-height:1.5}.adm-list-item-title,.adm-list-item-description{color:var(--adm-color-weak);font-size:var(--adm-font-size-main)}.adm-list-item-content{display:flex;align-items:var(--align-items);justify-content:flex-start;border-top:var(--border-inner);padding-right:var(--padding-right)}.adm-list-item-content-prefix{width:var(--prefix-width);flex:none;padding-right:var(--prefix-padding-right)}.adm-list-item-content-main{flex:auto;padding:12px 0}.adm-list-item-content-extra{flex:none;padding-left:12px;font-size:var(--adm-font-size-7);color:var(--adm-color-weak);max-width:var(--extra-max-width)}.adm-list-item-content-arrow{flex:none;display:flex;align-items:center;margin-left:4px;color:var(--adm-color-light);font-size:19px}.adm-list-item-disabled{cursor:not-allowed}.adm-list-item-disabled.adm-list-item-disabled>.adm-list-item-content>*{opacity:.4;pointer-events:none}a.adm-list-item:active:not(.adm-list-item-disabled){background-color:var(--active-background-color)}a.adm-list-item:active:not(.adm-list-item-disabled):after{content:" ";display:block;position:absolute;width:100%;bottom:-1px;left:0;border-bottom:var(--border-inner)}.adm-nav-bar{--height: 45px;--border-bottom: none;display:flex;align-items:center;height:var(--height);border-bottom:var(--border-bottom);padding:0 12px;white-space:nowrap}.adm-nav-bar-left,.adm-nav-bar-right{flex:1}.adm-nav-bar-title{flex:auto;text-align:center;overflow:hidden;text-overflow:ellipsis}.adm-nav-bar-back{display:flex;align-items:center;margin-right:16px;padding:6px 0;cursor:pointer}.adm-nav-bar-back-arrow{font-size:24px;margin-right:4px}.adm-nav-bar-left{font-size:var(--adm-font-size-7);display:flex;justify-content:flex-start;align-items:center}.adm-nav-bar-title{justify-content:center;white-space:nowrap;font-size:var(--adm-font-size-10);padding:0 12px}.adm-nav-bar-right{text-align:right}.adm-tab-bar-wrap{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;min-height:48px}.adm-tab-bar-item{flex:1;color:var(--adm-color-text-secondary);white-space:nowrap;padding:4px 8px;width:-webkit-min-content;width:min-content;position:relative;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column}.adm-tab-bar-item-icon{font-size:24px;height:24px;line-height:1}.adm-tab-bar-item-title{font-size:var(--adm-font-size-2);line-height:15px}.adm-tab-bar-item-title-with-icon{margin-top:2px}.adm-tab-bar-item-active{color:var(--adm-color-primary)}.adm-tab-bar-icon-badge{--top: 6px}.adm-tab-bar-title-badge{--right: -2px;--top: -2px}')),document.head.appendChild(a)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(m,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/react"),require("antd"),require("lodash"),require("ahooks"),require("@formily/shared"),require("@formily/antd-v5")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react-router-dom","react","react-i18next","@ant-design/icons","@formily/react","antd","lodash","ahooks","@formily/shared","@formily/antd-v5"],r):(m=typeof globalThis!="undefined"?globalThis:m||self,r(m["@nocobase/plugin-mobile-client"]={},m.jsxRuntime,m["@nocobase/client"],m["react-router-dom"],m.react,m["react-i18next"],m["@ant-design/icons"],m["@formily/react"],m.antd,m.lodash,m.ahooks,m["@formily/shared"],m["@formily/antd-v5"]))})(this,function(m,r,o,v,l,le,k,b,x,q,de,pe,It){"use strict";var mi=Object.defineProperty,fi=Object.defineProperties;var gi=Object.getOwnPropertyDescriptors;var Ct=Object.getOwnPropertySymbols;var bi=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable;var Ee=(m,r,o)=>r in m?mi(m,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):m[r]=o,$=(m,r)=>{for(var o in r||(r={}))bi.call(r,o)&&Ee(m,o,r[o]);if(Ct)for(var o of Ct(r))hi.call(r,o)&&Ee(m,o,r[o]);return m},_=(m,r)=>fi(m,gi(r));var wt=(m,r,o)=>(Ee(m,typeof r!="symbol"?r+"":r,o),o);var F=(m,r,o)=>new Promise((v,l)=>{var le=x=>{try{b(o.next(x))}catch(q){l(q)}},k=x=>{try{b(o.throw(x))}catch(q){l(q)}},b=x=>x.done?v(x.value):Promise.resolve(x.value).then(le,k);b((o=o.apply(m,r)).next())});function Pt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Pt(l),ke=()=>window.JsBridge,Tt=(e,t)=>ke().invoke(e,t),Mt=()=>!!ke(),Ne={onBackPressed:()=>{history.length===1?Tt({action:"moveTaskToBack"}):history.back()}};Object.keys(Ne).forEach(e=>{window[e]=Ne[e]});const Be=l.memo(e=>{const t=v.useLocation(),n=v.useNavigate();return l.useEffect(()=>{Mt()&&t.pathname==="/admin"&&n("/mobile",{replace:!0})},[t.pathname,n]),r.jsx(r.Fragment,{children:e.children})});Be.displayName="MobileClientProvider";const N="mobile-client";function B(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function I(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const Ot=new o.SchemaInitializer({name:"MBlockInitializers",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:o.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:B("Map"),Component:"MapBlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:B("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:B("Settings"),Component:"MSettingsBlockInitializer"}]}]}),Et=()=>{const e=o.useSchemaInitializerItem(),{insert:t}=o.useSchemaInitializer();return r.jsx(o.SchemaInitializerItem,$({icon:r.jsx(k.MenuOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})},e))};!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function ue(e,t){const n=e;for(const a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);return n}var J=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ae={exports:{}};/*!
2
+ (function(m,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/react"),require("antd"),require("lodash"),require("ahooks"),require("@formily/shared"),require("@formily/antd-v5")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react-router-dom","react","react-i18next","@ant-design/icons","@formily/react","antd","lodash","ahooks","@formily/shared","@formily/antd-v5"],o):(m=typeof globalThis!="undefined"?globalThis:m||self,o(m["@nocobase/plugin-mobile-client"]={},m.jsxRuntime,m["@nocobase/client"],m["react-router-dom"],m.react,m["react-i18next"],m["@ant-design/icons"],m["@formily/react"],m.antd,m.lodash,m.ahooks,m["@formily/shared"],m["@formily/antd-v5"]))})(this,function(m,o,r,v,l,le,E,b,x,q,de,pe,Pt){"use strict";var fi=Object.defineProperty,gi=Object.defineProperties;var bi=Object.getOwnPropertyDescriptors;var It=Object.getOwnPropertySymbols;var hi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable;var Oe=(m,o,r)=>o in m?fi(m,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[o]=r,C=(m,o)=>{for(var r in o||(o={}))hi.call(o,r)&&Oe(m,r,o[r]);if(It)for(var r of It(o))vi.call(o,r)&&Oe(m,r,o[r]);return m},_=(m,o)=>gi(m,bi(o));var wt=(m,o,r)=>(Oe(m,typeof o!="symbol"?o+"":o,r),r);var F=(m,o,r)=>new Promise((v,l)=>{var le=x=>{try{b(r.next(x))}catch(q){l(q)}},E=x=>{try{b(r.throw(x))}catch(q){l(q)}},b=x=>x.done?v(x.value):Promise.resolve(x.value).then(le,E);b((r=r.apply(m,o)).next())});function Tt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=Tt(l),Be=()=>window.JsBridge,Mt=(e,t)=>Be().invoke(e,t),kt=()=>!!Be(),Ee={onBackPressed:()=>{history.length===1?Mt({action:"moveTaskToBack"}):history.back()}};Object.keys(Ee).forEach(e=>{window[e]=Ee[e]});const Ne=l.memo(e=>{const t=v.useLocation(),n=v.useNavigate();return l.useEffect(()=>{kt()&&t.pathname==="/admin"&&n("/mobile",{replace:!0})},[t.pathname,n]),o.jsx(o.Fragment,{children:e.children})});Ne.displayName="MobileClientProvider";const N="mobile-client";function w(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function P(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const Ae=new r.CompatibleSchemaInitializer({name:"MBlockInitializers",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:r.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:w("Map"),Component:"MapBlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:w("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:w("Settings"),Component:"MSettingsBlockInitializer"}]}]}),Ot=new r.CompatibleSchemaInitializer({name:"mobilePage:addBlock",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:r.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:w("Map"),Component:"MapBlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:w("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:w("Settings"),Component:"MSettingsBlockInitializer"}]}]},Ae),Bt=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,C({icon:o.jsx(E.MenuOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})},e))};!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function ue(e,t){const n=e;for(const a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);return n}var J=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={exports:{}};/*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")a.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&a.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){a.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&a.push(u)}}}return a.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ae);var kt=Ae.exports;const M=je(kt);function L(e,t){const n=Object.assign({},t.props);e.className&&(n.className=M(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var Nt=typeof J=="object"&&J&&J.Object===Object&&J,_e=Nt,Bt=_e,jt=typeof self=="object"&&self&&self.Object===Object&&self,At=Bt||jt||Function("return this")(),me=At,_t=me,Ft=_t.Symbol,Fe=Ft,Le=Fe,De=Object.prototype,Lt=De.hasOwnProperty,Dt=De.toString,H=Le?Le.toStringTag:void 0;function zt(e){var t=Lt.call(e,H),n=e[H];try{e[H]=void 0;var a=!0}catch(c){}var i=Dt.call(e);return a&&(t?e[H]=n:delete e[H]),i}var Gt=zt,Ut=Object.prototype,qt=Ut.toString;function Ht(e){return qt.call(e)}var Vt=Ht,ze=Fe,Kt=Gt,Wt=Vt,Jt="[object Null]",Xt="[object Undefined]",Ge=ze?ze.toStringTag:void 0;function Zt(e){return e==null?e===void 0?Xt:Jt:Ge&&Ge in Object(e)?Kt(e):Wt(e)}var fe=Zt;function Qt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Qt,Yt=fe,Rt=ge,en="[object AsyncFunction]",tn="[object Function]",nn="[object GeneratorFunction]",rn="[object Proxy]";function on(e){if(!Rt(e))return!1;var t=Yt(e);return t==tn||t==nn||t==en||t==rn}var Ue=on,an=me,sn=an["__core-js_shared__"],cn=sn,be=cn,qe=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ln(e){return!!qe&&qe in e}var dn=ln,pn=Function.prototype,un=pn.toString;function mn(e){if(e!=null){try{return un.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var fn=mn,gn=Ue,bn=dn,hn=ge,vn=fn,yn=/[\\^$.*+?()[\]{}|]/g,xn=/^\[object .+?Constructor\]$/,Sn=Function.prototype,$n=Object.prototype,Cn=Sn.toString,wn=$n.hasOwnProperty,In=RegExp("^"+Cn.call(wn).replace(yn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pn(e){if(!hn(e)||bn(e))return!1;var t=gn(e)?In:xn;return t.test(vn(e))}var Tn=Pn;function Mn(e,t){return e==null?void 0:e[t]}var On=Mn,En=Tn,kn=On;function Nn(e,t){var n=kn(e,t);return En(n)?n:void 0}var Bn=Nn,jn=Bn,An=function(){try{var e=jn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),He=An,Ve=He;function _n(e,t,n){t=="__proto__"&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ke=_n;function Fn(e,t){return e===t||e!==e&&t!==t}var We=Fn,Ln=Ke,Dn=We,zn=Object.prototype,Gn=zn.hasOwnProperty;function Un(e,t,n){var a=e[t];(!(Gn.call(e,t)&&Dn(a,n))||n===void 0&&!(t in e))&&Ln(e,t,n)}var qn=Un,Hn=qn,Vn=Ke;function Kn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Vn(n,s,u):Hn(n,s,u)}return n}var Wn=Kn;function Jn(e){return e}var Je=Jn;function Xn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Zn=Xn,Qn=Zn,Xe=Math.max;function Yn(e,t,n){return t=Xe(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Xe(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Qn(e,this,s)}}var Rn=Yn;function er(e){return function(){return e}}var tr=er,nr=tr,Ze=He,rr=Je,or=Ze?function(e,t){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:nr(t),writable:!0})}:rr,ar=or,ir=800,sr=16,cr=Date.now;function lr(e){var t=0,n=0;return function(){var a=cr(),i=sr-(a-n);if(n=a,i>0){if(++t>=ir)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dr=lr,pr=ar,ur=dr,mr=ur(pr),fr=mr,gr=Je,br=Rn,hr=fr;function vr(e,t){return hr(br(e,t,gr),e+"")}var yr=vr,xr=9007199254740991;function Sr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xr}var Qe=Sr,$r=Ue,Cr=Qe;function wr(e){return e!=null&&Cr(e.length)&&!$r(e)}var Ye=wr,Ir=9007199254740991,Pr=/^(?:0|[1-9]\d*)$/;function Tr(e,t){var n=typeof e;return t=t==null?Ir:t,!!t&&(n=="number"||n!="symbol"&&Pr.test(e))&&e>-1&&e%1==0&&e<t}var Re=Tr,Mr=We,Or=Ye,Er=Re,kr=ge;function Nr(e,t,n){if(!kr(n))return!1;var a=typeof t;return(a=="number"?Or(n)&&Er(t,n.length):a=="string"&&t in n)?Mr(n[t],e):!1}var Br=Nr,jr=yr,Ar=Br;function _r(e){return jr(function(t,n){var a=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&Ar(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Fr=_r;function Lr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var Dr=Lr;function zr(e){return e!=null&&typeof e=="object"}var he=zr,Gr=fe,Ur=he,qr="[object Arguments]";function Hr(e){return Ur(e)&&Gr(e)==qr}var Vr=Hr,et=Vr,Kr=he,tt=Object.prototype,Wr=tt.hasOwnProperty,Jr=tt.propertyIsEnumerable,Xr=et(function(){return arguments}())?et:function(e){return Kr(e)&&Wr.call(e,"callee")&&!Jr.call(e,"callee")},Zr=Xr,Qr=Array.isArray,Yr=Qr,X={exports:{}};function Rr(){return!1}var eo=Rr;X.exports,function(e,t){var n=me,a=eo,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||a;e.exports=p}(X,X.exports);var to=X.exports,no=fe,ro=Qe,oo=he,ao="[object Arguments]",io="[object Array]",so="[object Boolean]",co="[object Date]",lo="[object Error]",po="[object Function]",uo="[object Map]",mo="[object Number]",fo="[object Object]",go="[object RegExp]",bo="[object Set]",ho="[object String]",vo="[object WeakMap]",yo="[object ArrayBuffer]",xo="[object DataView]",So="[object Float32Array]",$o="[object Float64Array]",Co="[object Int8Array]",wo="[object Int16Array]",Io="[object Int32Array]",Po="[object Uint8Array]",To="[object Uint8ClampedArray]",Mo="[object Uint16Array]",Oo="[object Uint32Array]",h={};h[So]=h[$o]=h[Co]=h[wo]=h[Io]=h[Po]=h[To]=h[Mo]=h[Oo]=!0,h[ao]=h[io]=h[yo]=h[so]=h[xo]=h[co]=h[lo]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=!1;function Eo(e){return oo(e)&&ro(e.length)&&!!h[no(e)]}var ko=Eo;function No(e){return function(t){return e(t)}}var Bo=No,Z={exports:{}};Z.exports,function(e,t){var n=_e,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(Z,Z.exports);var jo=Z.exports,Ao=ko,_o=Bo,nt=jo,rt=nt&&nt.isTypedArray,Fo=rt?_o(rt):Ao,Lo=Fo,Do=Dr,zo=Zr,Go=Yr,Uo=to,qo=Re,Ho=Lo,Vo=Object.prototype,Ko=Vo.hasOwnProperty;function Wo(e,t){var n=Go(e),a=!n&&zo(e),i=!n&&!a&&Uo(e),c=!n&&!a&&!i&&Ho(e),d=n||a||i||c,s=d?Do(e.length,String):[],u=s.length;for(var p in e)(t||Ko.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||qo(p,u)))&&s.push(p);return s}var Jo=Wo,Xo=Object.prototype;function Zo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xo;return e===n}var Qo=Zo;function Yo(e,t){return function(n){return e(t(n))}}var Ro=Yo,ea=Ro,ta=ea(Object.keys,Object),na=ta,ra=Qo,oa=na,aa=Object.prototype,ia=aa.hasOwnProperty;function sa(e){if(!ra(e))return oa(e);var t=[];for(var n in Object(e))ia.call(e,n)&&n!="constructor"&&t.push(n);return t}var ca=sa,la=Jo,da=ca,pa=Ye;function ua(e){return pa(e)?la(e):da(e)}var ma=ua,fa=Wn,ga=Fr,ba=ma,ha=ga(function(e,t,n,a){fa(t,ba(t),e,a)}),va=ha;const ya=je(va);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=ya(n,e[a],t);return n}function xa(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"LeftOutline-编组"},T.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Sa(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const ot="adm-safe-area",$a=e=>L(e,l.createElement("div",{className:M(ot,`${ot}-position-${e.position}`)})),z="adm-badge",at=l.createElement(l.Fragment,null),it=ue(e=>{const{content:t,color:n,children:a}=e,i=t===at,c=M(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?L(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:M(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:at});function Ca(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var st={exports:{}},g={};/**
6
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")a.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&a.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){a.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&a.push(u)}}}return a.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_e);var Et=_e.exports;const k=je(Et);function D(e,t){const n=Object.assign({},t.props);e.className&&(n.className=k(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var Nt=typeof J=="object"&&J&&J.Object===Object&&J,Fe=Nt,At=Fe,jt=typeof self=="object"&&self&&self.Object===Object&&self,_t=At||jt||Function("return this")(),me=_t,Ft=me,Dt=Ft.Symbol,De=Dt,Le=De,ze=Object.prototype,Lt=ze.hasOwnProperty,zt=ze.toString,H=Le?Le.toStringTag:void 0;function Gt(e){var t=Lt.call(e,H),n=e[H];try{e[H]=void 0;var a=!0}catch(c){}var i=zt.call(e);return a&&(t?e[H]=n:delete e[H]),i}var Ut=Gt,qt=Object.prototype,Ht=qt.toString;function Vt(e){return Ht.call(e)}var Kt=Vt,Ge=De,Wt=Ut,Jt=Kt,Xt="[object Null]",Zt="[object Undefined]",Ue=Ge?Ge.toStringTag:void 0;function Qt(e){return e==null?e===void 0?Zt:Xt:Ue&&Ue in Object(e)?Wt(e):Jt(e)}var fe=Qt;function Yt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Yt,Rt=fe,en=ge,tn="[object AsyncFunction]",nn="[object Function]",rn="[object GeneratorFunction]",on="[object Proxy]";function an(e){if(!en(e))return!1;var t=Rt(e);return t==nn||t==rn||t==tn||t==on}var qe=an,sn=me,cn=sn["__core-js_shared__"],ln=cn,be=ln,He=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dn(e){return!!He&&He in e}var pn=dn,un=Function.prototype,mn=un.toString;function fn(e){if(e!=null){try{return mn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var gn=fn,bn=qe,hn=pn,vn=ge,yn=gn,xn=/[\\^$.*+?()[\]{}|]/g,Sn=/^\[object .+?Constructor\]$/,Cn=Function.prototype,$n=Object.prototype,In=Cn.toString,wn=$n.hasOwnProperty,Pn=RegExp("^"+In.call(wn).replace(xn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Tn(e){if(!vn(e)||hn(e))return!1;var t=bn(e)?Pn:Sn;return t.test(yn(e))}var Mn=Tn;function kn(e,t){return e==null?void 0:e[t]}var On=kn,Bn=Mn,En=On;function Nn(e,t){var n=En(e,t);return Bn(n)?n:void 0}var An=Nn,jn=An,_n=function(){try{var e=jn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ve=_n,Ke=Ve;function Fn(e,t,n){t=="__proto__"&&Ke?Ke(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var We=Fn;function Dn(e,t){return e===t||e!==e&&t!==t}var Je=Dn,Ln=We,zn=Je,Gn=Object.prototype,Un=Gn.hasOwnProperty;function qn(e,t,n){var a=e[t];(!(Un.call(e,t)&&zn(a,n))||n===void 0&&!(t in e))&&Ln(e,t,n)}var Hn=qn,Vn=Hn,Kn=We;function Wn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Kn(n,s,u):Vn(n,s,u)}return n}var Jn=Wn;function Xn(e){return e}var Xe=Xn;function Zn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Qn=Zn,Yn=Qn,Ze=Math.max;function Rn(e,t,n){return t=Ze(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Ze(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Yn(e,this,s)}}var er=Rn;function tr(e){return function(){return e}}var nr=tr,rr=nr,Qe=Ve,or=Xe,ar=Qe?function(e,t){return Qe(e,"toString",{configurable:!0,enumerable:!1,value:rr(t),writable:!0})}:or,ir=ar,sr=800,cr=16,lr=Date.now;function dr(e){var t=0,n=0;return function(){var a=lr(),i=cr-(a-n);if(n=a,i>0){if(++t>=sr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var pr=dr,ur=ir,mr=pr,fr=mr(ur),gr=fr,br=Xe,hr=er,vr=gr;function yr(e,t){return vr(hr(e,t,br),e+"")}var xr=yr,Sr=9007199254740991;function Cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Sr}var Ye=Cr,$r=qe,Ir=Ye;function wr(e){return e!=null&&Ir(e.length)&&!$r(e)}var Re=wr,Pr=9007199254740991,Tr=/^(?:0|[1-9]\d*)$/;function Mr(e,t){var n=typeof e;return t=t==null?Pr:t,!!t&&(n=="number"||n!="symbol"&&Tr.test(e))&&e>-1&&e%1==0&&e<t}var et=Mr,kr=Je,Or=Re,Br=et,Er=ge;function Nr(e,t,n){if(!Er(n))return!1;var a=typeof t;return(a=="number"?Or(n)&&Br(t,n.length):a=="string"&&t in n)?kr(n[t],e):!1}var Ar=Nr,jr=xr,_r=Ar;function Fr(e){return jr(function(t,n){var a=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&_r(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Dr=Fr;function Lr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var zr=Lr;function Gr(e){return e!=null&&typeof e=="object"}var he=Gr,Ur=fe,qr=he,Hr="[object Arguments]";function Vr(e){return qr(e)&&Ur(e)==Hr}var Kr=Vr,tt=Kr,Wr=he,nt=Object.prototype,Jr=nt.hasOwnProperty,Xr=nt.propertyIsEnumerable,Zr=tt(function(){return arguments}())?tt:function(e){return Wr(e)&&Jr.call(e,"callee")&&!Xr.call(e,"callee")},Qr=Zr,Yr=Array.isArray,Rr=Yr,X={exports:{}};function eo(){return!1}var to=eo;X.exports,function(e,t){var n=me,a=to,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||a;e.exports=p}(X,X.exports);var no=X.exports,ro=fe,oo=Ye,ao=he,io="[object Arguments]",so="[object Array]",co="[object Boolean]",lo="[object Date]",po="[object Error]",uo="[object Function]",mo="[object Map]",fo="[object Number]",go="[object Object]",bo="[object RegExp]",ho="[object Set]",vo="[object String]",yo="[object WeakMap]",xo="[object ArrayBuffer]",So="[object DataView]",Co="[object Float32Array]",$o="[object Float64Array]",Io="[object Int8Array]",wo="[object Int16Array]",Po="[object Int32Array]",To="[object Uint8Array]",Mo="[object Uint8ClampedArray]",ko="[object Uint16Array]",Oo="[object Uint32Array]",h={};h[Co]=h[$o]=h[Io]=h[wo]=h[Po]=h[To]=h[Mo]=h[ko]=h[Oo]=!0,h[io]=h[so]=h[xo]=h[co]=h[So]=h[lo]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=h[yo]=!1;function Bo(e){return ao(e)&&oo(e.length)&&!!h[ro(e)]}var Eo=Bo;function No(e){return function(t){return e(t)}}var Ao=No,Z={exports:{}};Z.exports,function(e,t){var n=Fe,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(Z,Z.exports);var jo=Z.exports,_o=Eo,Fo=Ao,rt=jo,ot=rt&&rt.isTypedArray,Do=ot?Fo(ot):_o,Lo=Do,zo=zr,Go=Qr,Uo=Rr,qo=no,Ho=et,Vo=Lo,Ko=Object.prototype,Wo=Ko.hasOwnProperty;function Jo(e,t){var n=Uo(e),a=!n&&Go(e),i=!n&&!a&&qo(e),c=!n&&!a&&!i&&Vo(e),d=n||a||i||c,s=d?zo(e.length,String):[],u=s.length;for(var p in e)(t||Wo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Ho(p,u)))&&s.push(p);return s}var Xo=Jo,Zo=Object.prototype;function Qo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Zo;return e===n}var Yo=Qo;function Ro(e,t){return function(n){return e(t(n))}}var ea=Ro,ta=ea,na=ta(Object.keys,Object),ra=na,oa=Yo,aa=ra,ia=Object.prototype,sa=ia.hasOwnProperty;function ca(e){if(!oa(e))return aa(e);var t=[];for(var n in Object(e))sa.call(e,n)&&n!="constructor"&&t.push(n);return t}var la=ca,da=Xo,pa=la,ua=Re;function ma(e){return ua(e)?da(e):pa(e)}var fa=ma,ga=Jn,ba=Dr,ha=fa,va=ba(function(e,t,n,a){ga(t,ha(t),e,a)}),ya=va;const xa=je(ya);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=xa(n,e[a],t);return n}function Sa(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"LeftOutline-编组"},M.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Ca(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"RightOutline-RightOutlined"},M.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const at="adm-safe-area",$a=e=>D(e,l.createElement("div",{className:k(at,`${at}-position-${e.position}`)})),z="adm-badge",it=l.createElement(l.Fragment,null),st=ue(e=>{const{content:t,color:n,children:a}=e,i=t===it,c=k(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?D(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:k(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:it});function Ia(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var ct={exports:{}},g={};/**
7
7
  * @license React
8
8
  * react-is.production.min.js
9
9
  *
@@ -11,13 +11,13 @@
11
11
  *
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
- */var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),wa=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Ia=Symbol.for("react.offscreen"),ct;ct=Symbol.for("react.module.reference");function w(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Q:case R:case Y:case re:case oe:return e;default:switch(e=e&&e.$$typeof,e){case wa:case te:case ne:case ie:case ae:case ee:return e;default:return t}}case xe:return t}}}g.ContextConsumer=te,g.ContextProvider=ee,g.Element=ye,g.ForwardRef=ne,g.Fragment=Q,g.Lazy=ie,g.Memo=ae,g.Portal=xe,g.Profiler=R,g.StrictMode=Y,g.Suspense=re,g.SuspenseList=oe,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return w(e)===te},g.isContextProvider=function(e){return w(e)===ee},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye},g.isForwardRef=function(e){return w(e)===ne},g.isFragment=function(e){return w(e)===Q},g.isLazy=function(e){return w(e)===ie},g.isMemo=function(e){return w(e)===ae},g.isPortal=function(e){return w(e)===xe},g.isProfiler=function(e){return w(e)===R},g.isStrictMode=function(e){return w(e)===Y},g.isSuspense=function(e){return w(e)===re},g.isSuspenseList=function(e){return w(e)===oe},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Q||e===R||e===Y||e===re||e===oe||e===Ia||typeof e=="object"&&e!==null&&(e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===ne||e.$$typeof===ct||e.getModuleId!==void 0)},g.typeOf=w,st.exports=g;var Pa=st.exports;function Ta(e,t){let n=0;function a(i){l.Children.forEach(i,c=>{Pa.isFragment(c)?a(c.props.children):(t(c,n),n+=1)})}a(e)}const V="adm-list",Ma={mode:"default"},Oa=l.forwardRef((e,t)=>{const n=ve(Ma,e),a=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return a.current}})),L(n,l.createElement("div",{className:M(V,`${V}-${n.mode}`),ref:a},n.header&&l.createElement("div",{className:`${V}-header`},n.header),l.createElement("div",{className:`${V}-body`},l.createElement("div",{className:`${V}-body-inner`},n.children))))});function K(e){return e!=null&&e!==!1}const O="adm-list-item",se=ue(Oa,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,a=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${O}-content`},K(e.prefix)&&l.createElement("div",{className:`${O}-content-prefix`},e.prefix),l.createElement("div",{className:`${O}-content-main`},K(e.title)&&l.createElement("div",{className:`${O}-title`},e.title),e.children,K(e.description)&&l.createElement("div",{className:`${O}-description`},e.description)),K(e.extra)&&l.createElement("div",{className:`${O}-content-extra`},e.extra),K(a)&&l.createElement("div",{className:`${O}-content-arrow`},a===!0?l.createElement(Sa,null):a));return L(e,l.createElement(n?"a":"div",{className:M(`${O}`,n?["adm-plain-anchor"]:[],e.disabled&&`${O}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),G="adm-nav-bar",Ea={backArrow:!0},ka=e=>{const t=ve(Ea,e),{back:n,backArrow:a}=t;return L(t,l.createElement("div",{className:M(G)},l.createElement("div",{className:`${G}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${G}-back`,onClick:t.onBack},a&&l.createElement("span",{className:`${G}-back-arrow`},a===!0?l.createElement(xa,null):a),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${G}-title`},t.children),l.createElement("div",{className:`${G}-right`},t.right)))},Na=()=>null,E="adm-tab-bar",Ba={safeArea:!1},Se=ue(e=>{var t;const n=ve(Ba,e);let a=null;const i=[];Ta(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(a=p),i.push(s))});const[c,d]=Ca({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:a,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return L(n,l.createElement("div",{className:E},l.createElement("div",{className:`${E}-wrap`},i.map(s=>{const u=s.key===c;function p(){const f=s.props.icon&&l.createElement("div",{className:`${E}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),S=s.props.title&&l.createElement("div",{className:M(`${E}-item-title`,!!f&&`${E}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return f?l.createElement(l.Fragment,null,l.createElement(it,{content:s.props.badge,className:`${E}-icon-badge`},f),S):S?l.createElement(it,{content:s.props.badge,className:`${E}-title-badge`},S):null}return L(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:f}=s;f!=null&&d(f.toString())},className:M(`${E}-item`,{[`${E}-item-active`]:u})},p()))})),n.safeArea&&l.createElement($a,{position:"bottom"})))},{Item:Na}),lt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"MBlockInitializers","x-component-props":{showDivider:!1}}}},ja=e=>{const{t}=I(),n=b.useFieldSchema(),{dn:a}=o.useDesignable(),i=b.useField(),c={dn:a,field:i,fieldSchema:n};return r.jsx(o.SchemaSettingsDropdown,_($({title:r.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:r.jsx(k.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:r.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},W=()=>{const{dn:e}=o.useDesignable(),t=b.useFieldSchema(),n=b.useField();return{onUpdateComponentProps:de.useMemoizedFn(i=>F(this,null,function*(){q.set(t,"x-component-props",i),n.componentProps=$($({},n.componentProps),i),yield e.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"],"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}}),yield e.refresh()}))}},dt={properties:{name:{type:"string",title:B("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:B("Icon"),"x-component-props":{}}}},Aa=e=>{const{icon:t,name:n}=e,a=o.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=b.useFieldSchema(),s=o.useCompile(),u=v.useParams(),p=()=>{const f=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${f}/${d["x-uid"]}`)};return r.jsxs(o.SortableItem,{className:o.cx("nb-mobile-menu-item",o.css`
14
+ */var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),wa=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Pa=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function I(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Q:case R:case Y:case re:case oe:return e;default:switch(e=e&&e.$$typeof,e){case wa:case te:case ne:case ie:case ae:case ee:return e;default:return t}}case xe:return t}}}g.ContextConsumer=te,g.ContextProvider=ee,g.Element=ye,g.ForwardRef=ne,g.Fragment=Q,g.Lazy=ie,g.Memo=ae,g.Portal=xe,g.Profiler=R,g.StrictMode=Y,g.Suspense=re,g.SuspenseList=oe,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return I(e)===te},g.isContextProvider=function(e){return I(e)===ee},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye},g.isForwardRef=function(e){return I(e)===ne},g.isFragment=function(e){return I(e)===Q},g.isLazy=function(e){return I(e)===ie},g.isMemo=function(e){return I(e)===ae},g.isPortal=function(e){return I(e)===xe},g.isProfiler=function(e){return I(e)===R},g.isStrictMode=function(e){return I(e)===Y},g.isSuspense=function(e){return I(e)===re},g.isSuspenseList=function(e){return I(e)===oe},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Q||e===R||e===Y||e===re||e===oe||e===Pa||typeof e=="object"&&e!==null&&(e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===ne||e.$$typeof===lt||e.getModuleId!==void 0)},g.typeOf=I,ct.exports=g;var Ta=ct.exports;function Ma(e,t){let n=0;function a(i){l.Children.forEach(i,c=>{Ta.isFragment(c)?a(c.props.children):(t(c,n),n+=1)})}a(e)}const V="adm-list",ka={mode:"default"},Oa=l.forwardRef((e,t)=>{const n=ve(ka,e),a=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return a.current}})),D(n,l.createElement("div",{className:k(V,`${V}-${n.mode}`),ref:a},n.header&&l.createElement("div",{className:`${V}-header`},n.header),l.createElement("div",{className:`${V}-body`},l.createElement("div",{className:`${V}-body-inner`},n.children))))});function K(e){return e!=null&&e!==!1}const O="adm-list-item",se=ue(Oa,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,a=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${O}-content`},K(e.prefix)&&l.createElement("div",{className:`${O}-content-prefix`},e.prefix),l.createElement("div",{className:`${O}-content-main`},K(e.title)&&l.createElement("div",{className:`${O}-title`},e.title),e.children,K(e.description)&&l.createElement("div",{className:`${O}-description`},e.description)),K(e.extra)&&l.createElement("div",{className:`${O}-content-extra`},e.extra),K(a)&&l.createElement("div",{className:`${O}-content-arrow`},a===!0?l.createElement(Ca,null):a));return D(e,l.createElement(n?"a":"div",{className:k(`${O}`,n?["adm-plain-anchor"]:[],e.disabled&&`${O}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),G="adm-nav-bar",Ba={backArrow:!0},Ea=e=>{const t=ve(Ba,e),{back:n,backArrow:a}=t;return D(t,l.createElement("div",{className:k(G)},l.createElement("div",{className:`${G}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${G}-back`,onClick:t.onBack},a&&l.createElement("span",{className:`${G}-back-arrow`},a===!0?l.createElement(Sa,null):a),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${G}-title`},t.children),l.createElement("div",{className:`${G}-right`},t.right)))},Na=()=>null,B="adm-tab-bar",Aa={safeArea:!1},Se=ue(e=>{var t;const n=ve(Aa,e);let a=null;const i=[];Ma(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(a=p),i.push(s))});const[c,d]=Ia({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:a,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return D(n,l.createElement("div",{className:B},l.createElement("div",{className:`${B}-wrap`},i.map(s=>{const u=s.key===c;function p(){const f=s.props.icon&&l.createElement("div",{className:`${B}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),S=s.props.title&&l.createElement("div",{className:k(`${B}-item-title`,!!f&&`${B}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return f?l.createElement(l.Fragment,null,l.createElement(st,{content:s.props.badge,className:`${B}-icon-badge`},f),S):S?l.createElement(st,{content:s.props.badge,className:`${B}-title-badge`},S):null}return D(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:f}=s;f!=null&&d(f.toString())},className:k(`${B}-item`,{[`${B}-item-active`]:u})},p()))})),n.safeArea&&l.createElement($a,{position:"bottom"})))},{Item:Na}),dt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"mobilePage:addBlock","x-component-props":{showDivider:!1}}}},ja=e=>{const{t}=P(),n=b.useFieldSchema(),{dn:a}=r.useDesignable(),i=b.useField(),c={dn:a,field:i,fieldSchema:n};return o.jsx(r.SchemaSettingsDropdown,_(C({title:o.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(E.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},W=()=>{const{dn:e}=r.useDesignable(),t=b.useFieldSchema(),n=b.useField();return{onUpdateComponentProps:de.useMemoizedFn(i=>F(this,null,function*(){q.set(t,"x-component-props",i),n.componentProps=C(C({},n.componentProps),i),yield e.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"],"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}}),yield e.refresh()}))}},pt={properties:{name:{type:"string",title:w("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:w("Icon"),"x-component-props":{}}}},_a=e=>{const{icon:t,name:n}=e,a=r.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=b.useFieldSchema(),s=r.useCompile(),u=v.useParams(),p=()=>{const f=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${f}/${d["x-uid"]}`)};return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-menu-item",r.css`
15
15
  width: 100%;
16
16
  background: var(--adm-color-background);
17
17
  > .adm-list-item {
18
18
  background: inherit;
19
19
  }
20
- `),children:[r.jsx(se.Item,_($({arrow:!0,clickable:!0},e),{prefix:r.jsx(o.Icon,{type:t}),onClick:p,children:s(n)})),r.jsx(a,{})]})},_a=()=>{const{t:e}=I(),{onUpdateComponentProps:t}=W(),n=b.useField();return r.jsxs(o.GeneralSchemaDesigner,{children:[r.jsx(o.SchemaSettingsModalItem,{title:e("Edit menu info"),initialValues:n.componentProps,schema:dt,onSubmit:t}),r.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete menu item?")},breakRemoveOn:{"x-component":"MMenu"}},"remove")]})},pt=Aa;pt.Designer=_a;const Fa=o.createStyles(({token:e,css:t})=>({mobileMenu:t`
20
+ `),children:[o.jsx(se.Item,_(C({arrow:!0,clickable:!0},e),{prefix:o.jsx(r.Icon,{type:t}),onClick:p,children:s(n)})),o.jsx(a,{})]})},Fa=()=>{const{t:e}=P(),{onUpdateComponentProps:t}=W(),n=b.useField();return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit menu info"),initialValues:n.componentProps,schema:pt,onSubmit:t}),o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete menu item?")},breakRemoveOn:{"x-component":"MMenu"}},"remove")]})},ut=_a;ut.Designer=Fa;const Da=r.createStyles(({token:e,css:t})=>({mobileMenu:t`
21
21
  --adm-color-primary: ${e.colorPrimary};
22
22
  --adm-color-primary-hover: ${e.colorPrimaryHover};
23
23
  --adm-color-primary-active: ${e.colorPrimaryActive};
@@ -28,7 +28,7 @@
28
28
  background: ${e.colorBgContainer};
29
29
  width: 100%;
30
30
  margin-bottom: var(--nb-spacing);
31
- `})),$e=e=>{const{styles:t}=Fa(),n=o.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=o.useDesignable(),{t:d}=I(),s=u=>{const p={page:lt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return r.jsx(o.SortableItem,{className:o.cx("nb-mobile-menu",t.mobileMenu),children:r.jsxs(se,{children:[c&&r.jsx(se.Item,{children:r.jsx(n,{})}),r.jsx(o.DndContext,{children:r.jsx(o.SchemaComponent,{onlyRenderProperties:!0,schema:a})}),c?r.jsx(se.Item,{children:r.jsx(o.SchemaInitializerActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:dt,onSubmit:s})}):null]})})};$e.Item=pt,$e.Designer=ja;const ce=(e,t)=>e.reduceProperties((a,i)=>a||i["x-component"]===t&&i),La=e=>ce(e,"Grid"),Da=["Grid","Grid.Row"],za=["Grid.Col"],Ce=(e,t)=>{if(!e)return 0;let n=0;return za.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Da.includes(e["x-component"])&&e.mapProperties(a=>{n+=Ce(a,t)}),n},Ga=()=>{const{t:e}=I(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),{dn:i}=o.useDesignable(),c=v.useNavigate(),d=ce(t,"MTabBar"),s=d&&a.componentProps.tabBarEnabled!==!1,u={dn:i,field:a,fieldSchema:t};return r.jsx(o.SchemaSettingsDropdown,_($({title:r.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:r.jsx(k.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:r.jsx(o.SchemaSettingsSwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>F(this,null,function*(){if(p&&!d){const f=ce(t,"MPage");yield i.remove(f),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[pe.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:B("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Ua=o.createStyles(({token:e,css:t})=>({mobileContainer:t`
31
+ `})),Ce=e=>{const{styles:t}=Da(),n=r.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=r.useDesignable(),{t:d}=P(),s=u=>{const p={page:dt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(se,{children:[c&&o.jsx(se.Item,{children:o.jsx(n,{})}),o.jsx(r.DndContext,{children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,schema:a})}),c?o.jsx(se.Item,{children:o.jsx(r.SchemaInitializerActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:pt,onSubmit:s})}):null]})})};Ce.Item=ut,Ce.Designer=ja;const ce=(e,t)=>e.reduceProperties((a,i)=>a||i["x-component"]===t&&i),La=e=>ce(e,"Grid"),za=["Grid","Grid.Row"],Ga=["Grid.Col"],$e=(e,t)=>{if(!e)return 0;let n=0;return Ga.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||za.includes(e["x-component"])&&e.mapProperties(a=>{n+=$e(a,t)}),n},Ua=()=>{const{t:e}=P(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),{dn:i}=r.useDesignable(),c=v.useNavigate(),d=ce(t,"MTabBar"),s=d&&a.componentProps.tabBarEnabled!==!1,u={dn:i,field:a,fieldSchema:t};return o.jsx(r.SchemaSettingsDropdown,_(C({title:o.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(E.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(r.SchemaSettingsSwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>F(this,null,function*(){if(p&&!d){const f=ce(t,"MPage");yield i.remove(f),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[pe.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:w("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},qa=r.createStyles(({token:e,css:t})=>({mobileContainer:t`
32
32
  --adm-color-primary: ${e.colorPrimary};
33
33
 
34
34
  & > .general-schema-designer > .general-schema-designer-icons {
@@ -52,24 +52,24 @@
52
52
  bottom: 0;
53
53
  left: 0;
54
54
  z-index: 1000;
55
- `})),ut=(e,t)=>e.reduceProperties((n,a)=>{if(n)return n;if(a["x-component"]==="MTabBar")return ut(a,t);if(a["x-component"]==="MTabBar.Item"&&t===a["x-uid"])return a}),qa=()=>{const{name:e}=v.useParams(),t=b.useFieldSchema();if(!e)return r.jsx(r.Fragment,{});const n=ut(t.properties.tabBar,e.replace("tab_",""));return n?r.jsx(o.SchemaComponent,{schema:n}):r.jsx(v.Navigate,{replace:!0,to:"../"})},we=e=>{var D,j;const{styles:t}=Ua(),{token:n}=o.useToken(),a=o.useDesigner(),i=b.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=b.useField().componentProps.tabBarEnabled!==!1,f=(D=i==null?void 0:i.properties)==null?void 0:D.tabBar,S=f!=null&&f.properties?Object.keys(f.properties)[0]:null;let C=null;return S&&(C=(j=f==null?void 0:f.properties[S])==null?void 0:j["x-uid"]),l.useEffect(()=>{if(C&&!d.name){const P=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${P}/tab_${C}`,{replace:!0})}},[s.pathname,c,d.name,C]),r.jsxs(o.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:o.cx("nb-mobile-container",t.mobileContainer),children:[r.jsx(a,{}),r.jsx("div",{style:{paddingBottom:C?n.paddingLG*2:0},className:"nb-mobile-container-content",children:C?r.jsx(qa,{}):r.jsx(o.SchemaComponent,{filterProperties:P=>P["x-component"]!=="MTabBar",schema:i})}),p&&r.jsx("div",{className:o.cx("nb-mobile-container-tab-bar",t.tabBar),children:r.jsx(o.SchemaComponent,{onlyRenderProperties:!0,filterProperties:P=>P["x-component"]==="MTabBar",schema:i})})]})};we.Designer=Ga,we.displayName="MContainer";const mt={properties:{title:{type:"string",title:"{{ t('Title') }}",required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{required:!0,"x-decorator":"FormItem","x-component":"IconPicker",title:"{{ t('Icon') }}","x-component-props":{}}}},Ha=()=>{const e=o.useDesigner();return r.jsx(o.SortableItem,{className:o.cx("nb-mobile-tab-bar-item",o.css`
55
+ `})),mt=(e,t)=>e.reduceProperties((n,a)=>{if(n)return n;if(a["x-component"]==="MTabBar")return mt(a,t);if(a["x-component"]==="MTabBar.Item"&&t===a["x-uid"])return a}),Ha=()=>{const{name:e}=v.useParams(),t=b.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=mt(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(r.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},Ie=e=>{var L,A;const{styles:t}=qa(),{token:n}=r.useToken(),a=r.useDesigner(),i=b.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=b.useField().componentProps.tabBarEnabled!==!1,f=(L=i==null?void 0:i.properties)==null?void 0:L.tabBar,S=f!=null&&f.properties?Object.keys(f.properties)[0]:null;let $=null;return S&&($=(A=f==null?void 0:f.properties[S])==null?void 0:A["x-uid"]),l.useEffect(()=>{if($&&!d.name){const T=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${T}/tab_${$}`,{replace:!0})}},[s.pathname,c,d.name,$]),o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-container",t.mobileContainer),children:[o.jsx(a,{}),o.jsx("div",{style:{paddingBottom:$?n.paddingLG*2:0},className:"nb-mobile-container-content",children:$?o.jsx(Ha,{}):o.jsx(r.SchemaComponent,{filterProperties:T=>T["x-component"]!=="MTabBar",schema:i})}),p&&o.jsx("div",{className:r.cx("nb-mobile-container-tab-bar",t.tabBar),children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,filterProperties:T=>T["x-component"]==="MTabBar",schema:i})})]})};Ie.Designer=Ua,Ie.displayName="MContainer";const ft={properties:{title:{type:"string",title:"{{ t('Title') }}",required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{required:!0,"x-decorator":"FormItem","x-component":"IconPicker",title:"{{ t('Icon') }}","x-component-props":{}}}},Va=()=>{const e=r.useDesigner();return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar-item",r.css`
56
56
  position: absolute !important;
57
57
  width: 100%;
58
58
  height: 100%;
59
59
  top: 0;
60
60
  left: 0;
61
- `),children:r.jsx(e,{})})},Va=()=>{const{t:e}=I(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),i=Object.keys(t.parent.properties).length;return r.jsxs(o.GeneralSchemaDesigner,{children:[r.jsx(o.SchemaSettingsModalItem,{title:e("Edit info"),initialValues:a.componentProps,schema:mt,onSubmit:n}),i>1?r.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete tab item?")},breakRemoveOn:{"x-component":"MTabBar"}},"remove"):null]})},ft=Ha;ft.Designer=Va;const Ie=e=>{const t=b.useFieldSchema(),{designable:n}=o.useDesignable(),{t:a}=I(),{insertBeforeEnd:i}=o.useDesignable(),c=v.useNavigate(),d=v.useParams(),s=o.useCompile(),u=l.useCallback(p=>i({type:"void","x-component":"MTabBar.Item","x-component-props":p,"x-designer":"MTabBar.Item.Designer",properties:{[pe.uid()]:lt},"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}),[]);return r.jsx(o.SortableItem,{className:o.cx("nb-mobile-tab-bar",o.css`
61
+ `),children:o.jsx(e,{})})},Ka=()=>{const{t:e}=P(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),i=Object.keys(t.parent.properties).length;return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit info"),initialValues:a.componentProps,schema:ft,onSubmit:n}),i>1?o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete tab item?")},breakRemoveOn:{"x-component":"MTabBar"}},"remove"):null]})},gt=Va;gt.Designer=Ka;const we=e=>{const t=b.useFieldSchema(),{designable:n}=r.useDesignable(),{t:a}=P(),{insertBeforeEnd:i}=r.useDesignable(),c=v.useNavigate(),d=v.useParams(),s=r.useCompile(),u=l.useCallback(p=>i({type:"void","x-component":"MTabBar.Item","x-component-props":p,"x-designer":"MTabBar.Item.Designer",properties:{[pe.uid()]:dt},"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}),[]);return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar",r.css`
62
62
  position: relative;
63
63
  width: 100%;
64
64
  display: flex;
65
65
  align-items: center;
66
- `),children:r.jsx(o.DndContext,{children:r.jsxs(Se,{activeKey:d.name,onChange:p=>{p!=="add-tab"&&c(`/mobile/${p}`)},safeArea:!0,className:o.cx(o.css`
66
+ `),children:o.jsx(r.DndContext,{children:o.jsxs(Se,{activeKey:d.name,onChange:p=>{p!=="add-tab"&&c(`/mobile/${p}`)},safeArea:!0,className:r.cx(r.css`
67
67
  width: 100%;
68
- `),children:[t.mapProperties((p,f)=>{const S=p["x-component-props"];return l.createElement(Se.Item,_($({},S),{key:`tab_${p["x-uid"]}`,title:r.jsxs(r.Fragment,{children:[a(s(S.title)),r.jsx(o.SchemaComponent,{schema:p,name:f})]}),icon:S.icon?r.jsx(o.Icon,{type:S.icon}):void 0}))}),n&&(!t.properties||Object.keys(t.properties).length<5)?r.jsx(Se.Item,{className:o.css`
68
+ `),children:[t.mapProperties((p,f)=>{const S=p["x-component-props"];return l.createElement(Se.Item,_(C({},S),{key:`tab_${p["x-uid"]}`,title:o.jsxs(o.Fragment,{children:[a(s(S.title)),o.jsx(r.SchemaComponent,{schema:p,name:f})]}),icon:S.icon?o.jsx(r.Icon,{type:S.icon}):void 0}))}),n&&(!t.properties||Object.keys(t.properties).length<5)?o.jsx(Se.Item,{className:r.css`
69
69
  .adm-tab-bar-item-icon {
70
70
  height: auto;
71
71
  }
72
- `,icon:r.jsx(o.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:mt})},"add-tab"):null]})})})};Ie.Item=ft,Ie.displayName="MTabBar";const Ka=e=>{var C,D,j,P;const{showBack:t}=e,{t:n}=I(),a=b.useField(),i=b.useFieldSchema(),{dn:c}=o.useDesignable(),{onUpdateComponentProps:d}=W(),s=(C=i==null?void 0:i.properties)==null?void 0:C.header,u=!!s&&((D=a.componentProps)==null?void 0:D.headerEnabled)!==!1,p=(j=i==null?void 0:i.properties)==null?void 0:j.tabs,f=!!p&&((P=a.componentProps)==null?void 0:P.tabsEnabled)!==!1,S={dn:c,field:a,fieldSchema:i};return r.jsxs(o.SchemaSettingsDropdown,_($({title:r.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:r.jsx(k.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},S),{children:[r.jsx(o.SchemaSettingsSwitchItem,{checked:u,title:n("Enable Header"),onChange:U=>F(this,null,function*(){var A;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(A=i.parent["x-component-props"])==null?void 0:A.name,showBack:t}})),yield d({headerEnabled:U})})}),r.jsx(o.SchemaSettingsSwitchItem,{checked:f,title:n("Enable Tabs"),onChange:U=>F(this,null,function*(){if(!p){const A=La(i);return yield c.remove(A),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers","x-initializer-props":{gridInitializer:"MBlockInitializers"},properties:{tab1:{type:"void",title:B("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:_($({},A),{"x-uid":pe.uid()})}}}})}yield d({tabsEnabled:U})})})]}))},Wa=o.createStyles(({token:e,css:t})=>({globalActionCSS:t`
72
+ `,icon:o.jsx(r.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:ft})},"add-tab"):null]})})})};we.Item=gt,we.displayName="MTabBar";const Wa=e=>{var $,L,A,T;const{showBack:t}=e,{t:n}=P(),a=b.useField(),i=b.useFieldSchema(),{dn:c}=r.useDesignable(),{onUpdateComponentProps:d}=W(),s=($=i==null?void 0:i.properties)==null?void 0:$.header,u=!!s&&((L=a.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(A=i==null?void 0:i.properties)==null?void 0:A.tabs,f=!!p&&((T=a.componentProps)==null?void 0:T.tabsEnabled)!==!1,S={dn:c,field:a,fieldSchema:i};return o.jsxs(r.SchemaSettingsDropdown,_(C({title:o.jsx(x.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(E.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},S),{children:[o.jsx(r.SchemaSettingsSwitchItem,{checked:u,title:n("Enable Header"),onChange:U=>F(this,null,function*(){var j;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(j=i.parent["x-component-props"])==null?void 0:j.name,showBack:t}})),yield d({headerEnabled:U})})}),o.jsx(r.SchemaSettingsSwitchItem,{checked:f,title:n("Enable Tabs"),onChange:U=>F(this,null,function*(){if(!p){const j=La(i);return yield c.remove(j),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers","x-initializer-props":{gridInitializer:"mobilePage:addBlock"},properties:{tab1:{type:"void",title:w("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:_(C({},j),{"x-uid":pe.uid()})}}}})}yield d({tabsEnabled:U})})})]}))},Ja=r.createStyles(({token:e,css:t})=>({globalActionCSS:t`
73
73
  #nb-position-container > & {
74
74
  height: ${e.sizeXXL}px;
75
75
  border-top: 1px solid var(--nb-box-bg);
@@ -99,25 +99,25 @@
99
99
  }
100
100
  display: flex;
101
101
  flex-direction: column;
102
- `})),Pe=e=>{var P,U,A,$t;const{styles:t}=Wa(),n=o.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(P=i.properties)==null?void 0:P.tabs,u=a.componentProps.headerEnabled!==!1,p=a.componentProps.tabsEnabled!==!1&&s;let f=ce(i,"MPage");if(!p&&!f&&s){const y=Object.values(s.properties||{}).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"]);y.length!==0&&(f=y[0])}const S=i.root===i.parent;let C=!1;if(!s&&i.properties)C=Ce(i.properties.grid,2)===1;else if(c.has("tab")&&((U=s==null?void 0:s.properties)!=null&&U[c.get("tab")]))C=Ce(($t=(A=s.properties[c.get("tab")])==null?void 0:A.properties)==null?void 0:$t.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const D=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),j=l.useCallback(y=>r.jsx(o.TabsContextProvider,{children:C?r.jsx(o.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&S?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[C,S,t.globalActionCSS]);return r.jsxs(o.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:o.cx("nb-mobile-page",t.mobilePage),children:[r.jsx(n,$({},i==null?void 0:i["x-designer-props"])),r.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:o.cx("nb-mobile-page-header",t.mobilePageHeader,{[o.css`
102
+ `})),Pe=e=>{var T,U,j,$t;const{styles:t}=Ja(),n=r.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(T=i.properties)==null?void 0:T.tabs,u=a.componentProps.headerEnabled!==!1,p=a.componentProps.tabsEnabled!==!1&&s;let f=ce(i,"MPage");if(!p&&!f&&s){const y=Object.values(s.properties||{}).sort((Me,ke)=>Me["x-index"]-ke["x-index"]);y.length!==0&&(f=y[0])}const S=i.root===i.parent;let $=!1;if(!s&&i.properties)$=$e(i.properties.grid,2)===1;else if(c.has("tab")&&((U=s==null?void 0:s.properties)!=null&&U[c.get("tab")]))$=$e(($t=(j=s.properties[c.get("tab")])==null?void 0:j.properties)==null?void 0:$t.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Me,ke)=>Me["x-index"]-ke["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const L=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),A=l.useCallback(y=>o.jsx(r.TabsContextProvider,{children:$?o.jsx(r.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&S?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[$,S,t.globalActionCSS]);return o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-page",t.mobilePage),children:[o.jsx(n,C({},i==null?void 0:i["x-designer-props"])),o.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:r.cx("nb-mobile-page-header",t.mobilePageHeader,{[r.css`
103
103
  & > .ant-nb-grid {
104
104
  margin-top: 14px;
105
105
  }
106
- `]:s&&!p||!s}),children:[u&&r.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),r.jsx(o.TabsContextProvider,{PaneRoot:j,activeKey:c.get("tab"),onChange:D,children:r.jsx(b.RecursionField,{schema:p?i:f,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid"||y["x-component"]==="Grid.Row"})})]}),r.jsx(j,{children:!s&&r.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};Pe.Designer=Ka,Pe.displayName="MPage";const Ja=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=I();return r.jsx(o.GeneralSchemaDesigner,{draggable:!1,children:r.jsx(o.SchemaSettingsModalItem,{title:n("Edit info"),components:{Switch:It.Switch},initialValues:e.componentProps,schema:{properties:{title:{type:"string",title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},showBack:{type:"boolean",title:n("Display back button"),"x-component":"Switch","x-decorator":"FormItem"}}},onSubmit:t})})},gt=e=>{const t=b.useField(),{title:n=B("Untitled"),showBack:a=!1}=$($({},e),t==null?void 0:t.componentProps),i=o.useDesigner(),d=o.useCompile()(n),s=v.useNavigate(),{setTitle:u}=o.useDocumentTitle(),{token:p}=o.useToken();l.useEffect(()=>{u(d)},[d]);const f=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return r.jsxs(o.SortableItem,{className:o.cx("nb-mobile-header"),style:f,children:[r.jsx(ka,{backArrow:a,onBack:()=>s(-1),children:d}),r.jsx(i,{})]})};gt.Designer=Ja;const Xa=()=>{const{t:e}=I();return r.jsx(o.GeneralSchemaDesigner,{children:r.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},bt=()=>{const e=o.useDesigner();return r.jsxs(o.SortableItem,{className:o.cx("nb-mobile-setting",o.css`
106
+ `]:s&&!p||!s}),children:[u&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(r.TabsContextProvider,{PaneRoot:A,activeKey:c.get("tab"),onChange:L,children:o.jsx(b.RecursionField,{schema:p?i:f,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid"||y["x-component"]==="Grid.Row"})})]}),o.jsx(A,{children:!s&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};Pe.Designer=Wa,Pe.displayName="MPage";const Xa=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=P();return o.jsx(r.GeneralSchemaDesigner,{draggable:!1,children:o.jsx(r.SchemaSettingsModalItem,{title:n("Edit info"),components:{Switch:Pt.Switch},initialValues:e.componentProps,schema:{properties:{title:{type:"string",title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},showBack:{type:"boolean",title:n("Display back button"),"x-component":"Switch","x-decorator":"FormItem"}}},onSubmit:t})})},bt=e=>{const t=b.useField(),{title:n=w("Untitled"),showBack:a=!1}=C(C({},e),t==null?void 0:t.componentProps),i=r.useDesigner(),d=r.useCompile()(n),s=v.useNavigate(),{setTitle:u}=r.useDocumentTitle(),{token:p}=r.useToken();l.useEffect(()=>{u(d)},[d]);const f=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-header"),style:f,children:[o.jsx(Ea,{backArrow:a,onBack:()=>s(-1),children:d}),o.jsx(i,{})]})};bt.Designer=Xa;const Za=()=>{const{t:e}=P();return o.jsx(r.GeneralSchemaDesigner,{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},ht=()=>{const e=r.useDesigner();return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-setting",r.css`
107
107
  margin-bottom: var(--nb-spacing);
108
- `),children:[r.jsx(e,{}),r.jsx(o.SettingsMenu,{redirectUrl:"/mobile"})]})};bt.Designer=Xa;const Za=()=>{const e=o.useSchemaInitializerItem(),{insert:t}=o.useSchemaInitializer();return r.jsx(o.SchemaInitializerItem,$({icon:r.jsx(k.SettingOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MSettings","x-designer":"MSettings.Designer","x-component-props":{}})})},e))},ht=l.createContext(null),Qa=e=>r.jsx(ht.Provider,{value:{interface:!0},children:e.children}),vt=()=>l.useContext(ht),Ya=o.css`
108
+ `),children:[o.jsx(e,{}),o.jsx(r.SettingsMenu,{redirectUrl:"/mobile"})]})};ht.Designer=Za;const Qa=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,C({icon:o.jsx(E.SettingOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MSettings","x-designer":"MSettings.Designer","x-component-props":{}})})},e))},vt=l.createContext(null),Ya=e=>o.jsx(vt.Provider,{value:{interface:!0},children:e.children}),yt=()=>l.useContext(vt),Ra=r.css`
109
109
  padding: 0 var(--nb-spacing);
110
110
  & > .nb-action-bar {
111
111
  padding: unset !important;
112
112
  background: unset !important;
113
113
  }
114
- `,Ra=()=>({className:Ya}),ei={xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},ti=()=>({columnCount:vt()?ei:null,pagination:{simple:!0}}),ni=e=>r.jsx(o.SchemaComponentOptions,{components:{MMenuBlockInitializer:Et,MSettingsBlockInitializer:Za,MContainer:we,MMenu:$e,MTabBar:Ie,MPage:Pe,MHeader:gt,MSettings:bt},scope:{useGridCardBlockItemProps:Ra,useGridCardBlockProps:ti},children:e.children}),ri=()=>{const e=v.useLocation(),{t}=I(),n=()=>{let a=window.origin;window.location.pathname.startsWith("/apps")&&(a=window.origin+window.location.pathname.split("/").slice(0,3).join("/")),window.open(`${a}${e.pathname}${e.search}`)};return r.jsx("div",{className:o.css`
114
+ `,ei=()=>({className:Ra}),ti={xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},ni=()=>({columnCount:yt()?ti:null,pagination:{simple:!0}}),ri=e=>o.jsx(r.SchemaComponentOptions,{components:{MMenuBlockInitializer:Bt,MSettingsBlockInitializer:Qa,MContainer:Ie,MMenu:Ce,MTabBar:we,MPage:Pe,MHeader:bt,MSettings:ht},scope:{useGridCardBlockItemProps:ei,useGridCardBlockProps:ni},children:e.children}),oi=()=>{const{t:e}=P(),t=r.useApp(),n=()=>{window.open(t.getRouteUrl("/mobile"))};return o.jsx("div",{className:r.css`
115
115
  position: absolute;
116
116
  top: -40px;
117
117
  right: 0;
118
- `,children:r.jsx(x.Button,{type:"dashed",onClick:n,icon:r.jsx(k.LinkOutlined,{}),children:t("Preview")})})},oi=o.css`
118
+ `,children:o.jsx(x.Button,{type:"dashed",onClick:n,icon:o.jsx(E.LinkOutlined,{}),children:e("Preview")})})},ai=r.css`
119
119
  --nb-spacing: 14px;
120
- `,ai=o.css``,ii=o.css`
120
+ `,ii=r.css``,si=r.css`
121
121
  --nb-designer-top: 2px;
122
122
  --nb-designer-right: 2px;
123
123
  .nb-sortable-designer:hover {
@@ -152,31 +152,31 @@
152
152
  }
153
153
  }
154
154
  }
155
- `,yt={getContainer:".nb-mobile-application",width:"90%",style:{position:"absolute"}},si=_($({},yt),{style:{maxWidth:"calc(100% - 16px)"},maskStyle:{position:"absolute"},wrapClassName:o.css`
155
+ `,xt={getContainer:".nb-mobile-application",width:"90%",style:{position:"absolute"}},ci=_(C({},xt),{style:{maxWidth:"calc(100% - 16px)"},maskStyle:{position:"absolute"},wrapClassName:r.css`
156
156
  position: absolute !important;
157
- `}),ci=()=>"nocobase-mobile-container",xt=e=>{const t=ci(),n=v.useParams(),a=vt(),i=l.useMemo(()=>a?l.Fragment:o.AdminProvider,[a]);return o.useViewport(),r.jsx(i,{children:r.jsxs(ni,{children:[r.jsx(ri,{}),r.jsx(o.ActionContextProvider,{modalProps:si,drawerProps:yt,children:r.jsxs("div",{className:o.cx("nb-mobile-application",ii,oi,ai,o.css`
157
+ `}),li=()=>"nocobase-mobile-container",St=e=>{const t=li(),n=v.useParams(),a=yt(),i=l.useMemo(()=>a?l.Fragment:r.AdminProvider,[a]);return r.useViewport(),o.jsx(i,{children:o.jsxs(ri,{children:[o.jsx(oi,{}),o.jsx(r.ActionContextProvider,{modalProps:ci,drawerProps:xt,children:o.jsxs("div",{className:r.cx("nb-mobile-application",si,ai,ii,r.css`
158
158
  display: flex;
159
159
  flex-direction: column;
160
160
  width: 100%;
161
161
  height: 100%;
162
162
  position: relative;
163
163
  overflow: hidden;
164
- `),children:[n.name&&!n.name.startsWith("tab_")?r.jsx(v.Outlet,{}):r.jsx(o.RemoteSchemaComponent,{uid:t,children:e.children},t),r.jsx("div",{id:"nb-position-container"})]})})]})})},li=()=>{const{t:e}=I(),t=v.useLocation(),n=l.useMemo(()=>{let a="/mobile";return t.pathname.startsWith("/apps")&&(a=t.pathname.split("/").slice(0,3).join("/")),a},[t.pathname]);return r.jsx(x.Card,{style:{minHeight:"600px"},children:r.jsx(x.Form,{layout:"vertical",children:r.jsx(x.Form.Item,{tooltip:`${e("The full address is")} ${window.origin}${n}`,label:e("Mobile client access address"),children:r.jsx(x.Input,{value:n,disabled:!0})})})})},St=l.memo(()=>{const t=o.usePlugin(Te).getMobileRouterComponent();return r.jsx(Qa,{children:r.jsx("div",{className:o.css`
164
+ `),children:[n.name&&!n.name.startsWith("tab_")?o.jsx(v.Outlet,{}):o.jsx(r.RemoteSchemaComponent,{uid:t,children:e.children},t),o.jsx("div",{id:"nb-position-container"})]})})]})})},di=()=>{const e=r.useApp(),{t}=P(),n=l.useMemo(()=>e.getRouteUrl("/mobile"),[e]);return o.jsx(x.Card,{style:{minHeight:"600px"},children:o.jsx(x.Form,{layout:"vertical",children:o.jsx(x.Form.Item,{tooltip:`${t("The full address is")} ${window.origin}${n}`,label:t("Mobile client access address"),children:o.jsx(x.Input,{value:n,disabled:!0})})})})},Ct=l.memo(()=>{const t=r.usePlugin(Te).getMobileRouterComponent();return o.jsx(Ya,{children:o.jsx("div",{className:r.css`
165
165
  display: flex;
166
166
  width: 100%;
167
167
  height: 100%;
168
168
  position: relative;
169
- `,children:r.jsx(t,{})})})});St.displayName="InterfaceRouter";const di=e=>r.jsx("div",{className:o.cx("nb-mobile-device-ios6",o.css(`
169
+ `,children:o.jsx(t,{})})})});Ct.displayName="InterfaceRouter";const pi=e=>o.jsx("div",{className:r.cx("nb-mobile-device-ios6",r.css(`
170
170
  display: flex;
171
171
  width: 375px;
172
172
  height: 667px;
173
- `),e.className),children:e.children}),pi=e=>r.jsx("div",{className:o.cx("nb-mobile-device-wrapper",o.css`
173
+ `),e.className),children:e.children}),ui=e=>o.jsx("div",{className:r.cx("nb-mobile-device-wrapper",r.css`
174
174
  width: 100%;
175
175
  height: 100%;
176
176
  display: flex;
177
177
  justify-content: center;
178
178
  align-items: center;
179
179
  margin-top: 50px;
180
- `),children:r.jsx(di,$({className:o.css`
180
+ `),children:o.jsx(pi,C({className:r.css`
181
181
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
182
- `},e))}),ui=()=>r.jsx(pi,{children:r.jsx(St,{})});class Te extends o.Plugin{constructor(){super(...arguments);wt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Be),this.app.schemaInitializerManager.add(Ot)})}addSettings(){this.app.pluginSettingsManager.add(N,{title:`{{t("Mobile Client-side", { ns: "${N}" })}}`,icon:"MobileOutlined",Component:()=>r.jsx(v.Outlet,{})}),this.app.pluginSettingsManager.add(`${N}.interface`,{title:`{{t("Interface Configuration", { ns: "${N}" })}}`,Component:ui,sort:1}),this.app.pluginSettingsManager.add(`${N}.app`,{title:`{{t("App Configuration", { ns: "${N}" })}}`,Component:li,sort:2})}setMobileRouter(){const n=o.createRouterManager({type:"hash"},this.app);n.add("root",{path:"/",element:r.jsx(v.Navigate,{replace:!0,to:"/mobile"})}),n.add("mobile",{path:"/mobile",element:r.jsx(xt,{})}),n.add("mobile.page",{path:"/mobile/:name",element:r.jsx(o.RouteSchemaComponent,{})}),this.mobileRouter=n}getMobileRouterComponent(){return this.mobileRouter.getRouterComponent()}addRoutes(){this.app.router.add("mobile",{path:"/mobile",element:r.jsx(xt,{})}),this.app.router.add("mobile.page",{path:"/mobile/:name",Component:"RouteSchemaComponent"})}}m.MobileClientPlugin=Te,m.default=Te,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
182
+ `},e))}),mi=()=>o.jsx(ui,{children:o.jsx(Ct,{})});class Te extends r.Plugin{constructor(){super(...arguments);wt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Ne),this.app.schemaInitializerManager.add(Ae),this.app.schemaInitializerManager.add(Ot)})}addSettings(){this.app.pluginSettingsManager.add(N,{title:`{{t("Mobile Client-side", { ns: "${N}" })}}`,icon:"MobileOutlined",Component:()=>o.jsx(v.Outlet,{})}),this.app.pluginSettingsManager.add(`${N}.interface`,{title:`{{t("Interface Configuration", { ns: "${N}" })}}`,Component:mi,sort:1}),this.app.pluginSettingsManager.add(`${N}.app`,{title:`{{t("App Configuration", { ns: "${N}" })}}`,Component:di,sort:2})}setMobileRouter(){const n=r.createRouterManager({type:"hash"},this.app);n.add("root",{path:"/",element:o.jsx(v.Navigate,{replace:!0,to:"/mobile"})}),n.add("mobile",{path:"/mobile",element:o.jsx(St,{})}),n.add("mobile.page",{path:"/mobile/:name",element:o.jsx(r.RouteSchemaComponent,{})}),this.mobileRouter=n}getMobileRouterComponent(){return this.mobileRouter.getRouterComponent()}addRoutes(){this.app.router.add("mobile",{path:"/mobile",element:o.jsx(St,{})}),this.app.router.add("mobile.page",{path:"/mobile/:name",Component:"RouteSchemaComponent"})}}m.MobileClientPlugin=Te,m.default=Te,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
2
  "react": "18.2.0",
3
3
  "react-router-dom": "6.21.0",
4
- "@nocobase/client": "0.20.0-alpha.9",
5
- "@nocobase/server": "0.20.0-alpha.9",
4
+ "@nocobase/client": "0.21.0-alpha.2",
5
+ "@nocobase/server": "0.21.0-alpha.2",
6
6
  "antd": "5.12.8",
7
7
  "react-i18next": "11.18.6",
8
8
  "@ant-design/icons": "5.2.6",
9
- "@nocobase/database": "0.20.0-alpha.9",
9
+ "@nocobase/database": "0.21.0-alpha.2",
10
10
  "@formily/react": "2.3.0",
11
11
  "@formily/shared": "2.3.0",
12
12
  "lodash": "4.17.21",
@@ -53,7 +53,7 @@ class MobileClientPlugin extends import_server.Plugin {
53
53
  grid: {
54
54
  type: "void",
55
55
  "x-component": "Grid",
56
- "x-initializer": "MBlockInitializers",
56
+ "x-initializer": "mobilePage:addBlock",
57
57
  "x-component-props": {
58
58
  showDivider: false
59
59
  }
@@ -40,7 +40,7 @@ const routes = [
40
40
  grid: {
41
41
  type: "void",
42
42
  "x-component": "Grid",
43
- "x-initializer": "MBlockInitializers",
43
+ "x-initializer": "mobilePage:addBlock",
44
44
  "x-component-props": {
45
45
  showDivider: false
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-mobile-client",
3
- "version": "0.20.0-alpha.9",
3
+ "version": "0.21.0-alpha.2",
4
4
  "main": "./dist/server/index.js",
5
5
  "homepage": "https://docs.nocobase.com/handbook/mobile-client",
6
6
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client",
@@ -33,5 +33,5 @@
33
33
  "@nocobase/test": "0.x",
34
34
  "@nocobase/utils": "0.x"
35
35
  },
36
- "gitHead": "5473d9039cfdb649a8c8c625edefc9a3ac464be5"
36
+ "gitHead": "90628f2e2da846208fb2d7966ddb4e467d187ffb"
37
37
  }