2024-12-12 09:55:56 +08:00
var vn = Object . defineProperty ;
var Rt = ( e ) => {
throw TypeError ( e ) ;
} ;
2024-12-12 10:44:58 +08:00
var xn = ( e , t , n ) => t in e ? vn ( e , t , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : n } ) : e [ t ] = n ;
var v = ( e , t , n ) => xn ( e , typeof t != "symbol" ? t + "" : t , n ) , Ft = ( e , t , n ) => t . has ( e ) || Rt ( "Cannot " + n ) ;
var p = ( e , t , n ) => ( Ft ( e , t , "read from private field" ) , n ? n . call ( e ) : t . get ( e ) ) , E = ( e , t , n ) => t . has ( e ) ? Rt ( "Cannot add the same private member more than once" ) : t instanceof WeakSet ? t . add ( e ) : t . set ( e , n ) , D = ( e , t , n , a ) => ( Ft ( e , t , "write to private field" ) , a ? a . call ( e , n ) : t . set ( e , n ) , n ) ;
2024-12-12 09:55:56 +08:00
var Ot = ( e , t , n , a ) => ( {
set _ ( r ) {
D ( e , t , r , n ) ;
} ,
get _ ( ) {
return p ( e , t , a ) ;
}
} ) ;
import { jsx as u , jsxs as O } from "react/jsx-runtime" ;
2024-12-12 10:44:58 +08:00
import b , { useEffect as R , useState as $ , useCallback as ce , useMemo as Z , useRef as q , useContext as Ee , useId as Ge , useLayoutEffect as Sn } from "react" ;
2024-12-12 09:55:56 +08:00
import g from "lodash" ;
import Ht from "immutability-helper" ;
2024-12-12 10:44:58 +08:00
import V from "classnames" ;
2024-12-12 15:04:34 +08:00
import { Form as Ke , Input as $n , Button as lt , Breadcrumb as Nn , Tree as Pn , Pagination as Tn , Table as En , Empty as Rn , Popconfirm as Fn , Tooltip as On , Popover as Ln } from "antd" ;
2024-12-12 09:55:56 +08:00
import { useMergedState as Vn } from "rc-util" ;
import X , { FieldContext as An , Field as Jt } from "rc-field-form" ;
2024-12-12 10:44:58 +08:00
import { useParams as jn , generatePath as In , createBrowserRouter as Mn , useInRouterContext as zn , Navigate as Bn } from "react-router-dom" ;
import k from "prop-types" ;
2024-12-12 09:55:56 +08:00
import * as Lt from "react-is" ;
2024-12-12 10:44:58 +08:00
import { useNotification as Wn } from "rc-notification" ;
2024-12-12 09:55:56 +08:00
import { N as Re , a as Fe , T as ct , S as Un } from "./vender-DMK1apIA.js" ;
import "rc-util/lib/hooks/useMergedState" ;
import Dn from "rc-drawer" ;
import qn from "rc-dialog" ;
2024-12-12 10:44:58 +08:00
var Se , Ve , $e , ie , Ce , ke ;
2024-12-12 09:55:56 +08:00
class Kt {
constructor ( t , n ) {
2024-12-12 10:44:58 +08:00
E ( this , Se , /* @__PURE__ */ new Map ( ) ) ;
E ( this , Ve , ! 0 ) ;
E ( this , $e , [ ] ) ;
E ( this , ie ) ;
E ( this , Ce , ( ) => p ( this , ie ) ) ;
E ( this , ke , ( ) => Promise . resolve ( ) ) ;
v ( this , "get" , ( ... t ) => new Promise ( ( n , a ) => {
2024-12-12 09:55:56 +08:00
const r = JSON . stringify ( t ) ;
2024-12-12 10:44:58 +08:00
if ( p ( this , Se ) . has ( r ) ) return n ( p ( this , ke ) . call ( this , p ( this , ie ) , ... t ) ) ;
if ( p ( this , ie ) === void 0 ) p ( this , $e ) . push ( [ t , n , a ] ) , p ( this , Ve ) && ( D ( this , Ve , ! 1 ) , Promise . resolve ( typeof p ( this , Ce ) == "function" ? p ( this , Ce ) . call ( this ) : p ( this , Ce ) ) . then ( ( s ) => D ( this , ie , s || null ) ) . finally ( ( ) => {
p ( this , $e ) . forEach ( ( [ s , i , o ] ) => {
2024-12-12 09:55:56 +08:00
try {
const l = p ( this , ke ) . call ( this , p ( this , ie ) , ... s ) ;
2024-12-12 10:44:58 +08:00
p ( this , Se ) . set ( JSON . stringify ( s ) , l ) , i ( l ) ;
2024-12-12 09:55:56 +08:00
} catch ( l ) {
o ( l ) ;
}
2024-12-12 10:44:58 +08:00
} ) , p ( this , $e ) . length = 0 ;
2024-12-12 09:55:56 +08:00
} ) ) ;
else {
const s = p ( this , ke ) . call ( this , p ( this , ie ) , ... t ) ;
2024-12-12 10:44:58 +08:00
p ( this , Se ) . set ( r , s ) , n ( s ) ;
2024-12-12 09:55:56 +08:00
}
} ) ) ;
2024-12-12 10:44:58 +08:00
D ( this , ke , n ) , D ( this , Ce , t ) ;
2024-12-12 09:55:56 +08:00
}
}
2024-12-12 10:44:58 +08:00
Se = new WeakMap ( ) , Ve = new WeakMap ( ) , $e = new WeakMap ( ) , ie = new WeakMap ( ) , Ce = new WeakMap ( ) , ke = new WeakMap ( ) ;
const Za = ( ) => u ( "div" , { children : "Empty" } ) , Be = b . createContext ( { ele : { } , mount : ( ) => {
2024-12-12 09:55:56 +08:00
} , unmount : ( ) => {
2024-12-12 15:04:34 +08:00
} } ) , _ = ( { rootClassName : e , className : t , children : n , actions : a , title : r , subTitle : s , extras : i , style : o = { } } ) => {
2024-12-12 10:44:58 +08:00
const { mount : l , unmount : d } = b . useContext ( Be ) ;
2024-12-12 15:04:34 +08:00
return a && _ . Action ( { children : a } ) , r && _ . Title ( { children : r } ) , s && _ . SubTitle ( { children : s } ) , i && _ . Extra ( { children : i } ) , R ( ( ) => ( l ( "rootClassName" , e ) , ( ) => d ( e ) ) , [ e ] ) , u ( "div" , { className : V ( "ff-container" , t ) , style : o , children : n } ) ;
2024-12-12 09:55:56 +08:00
} , Je = ( e ) => ( { children : t , className : n } ) => {
2024-12-12 10:44:58 +08:00
const { mount : a , unmount : r } = b . useContext ( Be ) ;
return R ( ( ) => ( a ( e , b . createElement ( "div" , { key : ` ff- ${ e } ` , className : V ( ` ff-popup- ${ e } ` , n ) } , t ) ) , ( ) => r ( e ) ) , [ n , t ] ) , null ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 15:04:34 +08:00
_ . Action = Je ( "actions" ) , _ . Title = Je ( "title" ) , _ . SubTitle = Je ( "sub-title" ) , _ . Extra = Je ( "extras" ) , _ . propTypes = { className : k . string , style : k . object , title : k . any , subTitle : k . any , actions : k . any , extras : k . any } ;
const er = ( ) => u ( _ , { className : "ff-loading" , children : O ( "div" , { className : "loader" , children : [ O ( "div" , { className : "square" , children : [ u ( "span" , { } ) , u ( "span" , { } ) , u ( "span" , { } ) ] } ) , O ( "div" , { className : "square" , children : [ u ( "span" , { } ) , u ( "span" , { } ) , u ( "span" , { } ) ] } ) , O ( "div" , { className : "square" , children : [ u ( "span" , { } ) , u ( "span" , { } ) , u ( "span" , { } ) ] } ) , O ( "div" , { className : "square" , children : [ u ( "span" , { } ) , u ( "span" , { } ) , u ( "span" , { } ) ] } ) ] } ) } ) , tr = ( ) => u ( "div" , { children : "NotFound" } ) , _t = ( { children : e } ) => {
2024-12-12 10:44:58 +08:00
const [ t , n ] = $ ( { } ) , a = ce ( ( s , i ) => n ( ( o ) => ( { ... o , [ s ] : i } ) ) , [ ] ) , r = ce ( ( s ) => n ( ( i ) => ( { ... i , [ s ] : void 0 } ) ) , [ ] ) ;
return typeof ( e == null ? void 0 : e . type ) == "string" ? e : u ( Be . Provider , { value : { ele : t , mount : a , unmount : r } , children : b . cloneElement ( e , { className : t . rootClassName , title : t . title , subTitle : t [ "sub-title" ] , actions : t . actions , extras : t . extras } ) } ) ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 10:44:58 +08:00
_t . propTypes = { children : k . element . isRequired } ;
2024-12-12 15:04:34 +08:00
const Vt = { close : [ "M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" ] , check : [ "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z" ] , info : [ "M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" , "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z" ] } , Ct = ( { type : e , props : t } ) => u ( "i" , { ... t , children : u ( "svg" , { viewBox : "0 0 1024 1024" , width : "1em" , height : "1em" , fill : "currentColor" , children : ( Vt [ e ] || Vt . info ) . map ( ( n , a ) => u ( "path" , { d : n } , a ) ) } ) } ) , Gt = ( { className : e , content : t , icon : n , $close : a } ) => O ( b . Fragment , { children : [ n && u ( "div" , { className : V ( "ff-notification-icon" , e ) , children : u ( Ct , { type : n } ) } ) , t ] } ) , Hn = ( { } ) => u ( _ , { children : "Confirm" } ) ;
var de , Ne ;
2024-12-12 10:44:58 +08:00
const te = class te {
2024-12-12 09:55:56 +08:00
constructor ( ) {
2024-12-12 15:04:34 +08:00
E ( this , Ne , /* @__PURE__ */ new Map ( ) ) ;
v ( this , "init" , ( t ) => D ( this , Ne , new Map ( t ) ) ) ;
v ( this , "check" , ( t ) => ! p ( this , Ne ) . has ( t ) || p ( this , Ne ) . get ( t ) ) ;
2024-12-12 10:44:58 +08:00
if ( p ( te , de ) ) return p ( te , de ) ;
2024-12-12 09:55:56 +08:00
}
} ;
2024-12-12 15:04:34 +08:00
de = new WeakMap ( ) , Ne = new WeakMap ( ) , E ( te , de , null ) , v ( te , "getInstance" , ( ) => ( p ( te , de ) || D ( te , de , new te ( ) ) , p ( te , de ) ) ) ;
2024-12-12 10:44:58 +08:00
let dt = te ;
2024-12-12 09:55:56 +08:00
const Jn = dt . getInstance ( ) ;
var ue , Ae ;
2024-12-12 10:44:58 +08:00
const ne = class ne {
2024-12-12 09:55:56 +08:00
constructor ( ) {
2024-12-12 10:44:58 +08:00
E ( this , Ae , null ) ;
v ( this , "init" , ( t ) => D ( this , Ae , t ) ) ;
v ( this , "get" , ( t , n ) => g . get ( p ( this , Ae ) , t , n ) ) ;
if ( p ( ne , ue ) ) return p ( ne , ue ) ;
2024-12-12 09:55:56 +08:00
}
} ;
2024-12-12 10:44:58 +08:00
ue = new WeakMap ( ) , Ae = new WeakMap ( ) , E ( ne , ue , null ) , v ( ne , "getInstance" , ( ) => ( p ( ne , ue ) || D ( ne , ue , new ne ( ) ) , p ( ne , ue ) ) ) ;
let ut = ne ;
2024-12-12 09:55:56 +08:00
const Oe = ut . getInstance ( ) , At = { null2json : ( e ) => Object . create ( ) , null2array : ( e ) => [ ] , null2number : ( e ) => 0 , null2bool : ( e ) => ! 1 , null2string : ( e ) => "" , null2integer : ( e ) => 0 , null2float : ( e ) => 0 , string2json : ( e ) => e ? JSON . parse ( e ) : "{}" , string2array : ( e ) => e . substr ( 0 , 1 ) === "[" && e . substr ( - 1 ) === "]" ? JSON . parse ( e ) : e . split ( "," ) , string2number : ( e ) => e == "" ? 0 : + e , string2integer : ( e ) => e == "" ? 0 : + e , string2float : ( e ) => e == "" ? 0 : + e , string2bool : ( e ) => {
switch ( ` ${ e } ` . toLowerCase ( ) ) {
case "0" :
case "false" :
case "[]" :
case "{}" :
return ! 1 ;
}
return ! ! e ;
} , string2string : ( e ) => e , json2json : ( e ) => e , json2array : ( e ) => e ? Object . values ( e ) : [ ] , json2number : ( e ) => Object . keys ( e ) . length , json2integer : ( e ) => Object . keys ( e ) . length , json2float : ( e ) => Object . keys ( e ) . length , json2bool : ( e ) => Object . keys ( e ) . length > 0 , json2string : ( e ) => e ? JSON . stringify ( e ) : "" , array2json : ( e ) => ( { ... e } ) , array2array : ( e ) => e , array2number : ( e ) => e . length , array2integer : ( e ) => e . length , array2float : ( e ) => e . length , array2bool : ( e ) => e . length > 0 , array2string : ( e ) => JSON . stringify ( e ) , number2json : ( e ) => ( { } ) , number2array : ( e ) => [ e ] , number2number : ( e ) => e , number2integer : ( e ) => e , number2float : ( e ) => e , number2bool : ( e ) => ! ! e , number2string : ( e ) => e . toString ( ) , boolean2json : ( e ) => ( { } ) , boolean2array : ( e ) => [ ] , boolean2number : ( e ) => + e , boolean2integer : ( e ) => + e , boolean2float : ( e ) => + e , boolean2bool : ( e ) => e , boolean2string : ( e ) => e ? "true" : "false" } , Y = ( e , t ) => {
let n = "string" ;
n = Array . isArray ( e ) ? "array" : typeof e , g . isObject ( e ) && ( n = "json" ) ;
const a = ` ${ n } 2 ${ t } ` ;
return Reflect . has ( At , a ) ? At [ a ] ( e ) : e ;
} , Yt = ( e = { } , t = { } , n = { } , a = "" ) => Xt ( e , ( r , s ) => s === "type" && r === "code" ) ? Qt ( e , t , n , a ) : Zt ( e , t , a ) , Xt = ( e , t = ( ) => ! 1 ) => g . some ( e , ( n ) => ! ! g . some ( n , t ) || ( g . isEmpty ( n ) || ! g . isPlainObject ( n ) && ! g . isArray ( n ) ? void 0 : Xt ( n , t ) ) ) , Qt = async ( e = { } , t = { } , n = { } , a = "" ) => {
let r = /* @__PURE__ */ Object . create ( null ) ;
for ( let s in e ) {
let i ;
if ( Reflect . has ( e [ s ] , "type" ) && [ "code" , "field" , "router" , "query" , "string" ] . includes ( e [ s ] . type ) ) {
const { type : o , value : l = "" , default : d = a } = e [ s ] ;
switch ( o ) {
case "code" :
2024-12-12 10:44:58 +08:00
i = await be . exec ( l , t , n ) ;
2024-12-12 09:55:56 +08:00
break ;
case "field" :
i = g . get ( t , l ) ? ? g . get ( t , l . substring ( l . indexOf ( "." ) + 1 ) ) ;
break ;
case "router" :
case "query" :
i = le . getPageParams ( l ) ;
break ;
case "string" :
i = l ;
}
i ? ? ( i = d ) ;
} else i = await Qt ( e [ s ] , t , n , a ) ;
g . set ( r , s , i ) ;
}
return r ;
} , Zt = ( e = { } , t = { } , n = "" ) => Object . keys ( e || { } ) . reduce ( ( a , r ) => {
if ( g . isPlainObject ( e [ r ] ) ) {
let s ;
if ( Reflect . has ( e [ r ] , "type" ) && [ "field" , "router" , "query" , "string" ] . includes ( e [ r ] . type ) ) {
const { type : i , value : o = "" , default : l = n } = e [ r ] ;
switch ( i ) {
case "field" :
s = g . get ( t , o ) ? ? g . get ( t , o . substring ( o . indexOf ( "." ) + 1 ) ) ;
break ;
case "router" :
case "query" :
s = le . getPageParams ( o ) ;
break ;
case "string" :
s = o ;
}
s ? ? ( s = l ) ;
} else s = Zt ( e [ r ] , t , n ) ;
g . set ( a , r , s ) ;
}
return a ;
} , { } ) , st = ( e , t ) => e && typeof e == "object" ? Array . isArray ( e ) ? e . map ( ( n ) => st ( n , t ) ) : Object . keys ( e ) . reduce ( ( n , a ) => ( t [ a ] ? n [ t [ a ] ] = st ( e [ a ] , t ) : n [ a ] = st ( e [ a ] , t ) , n ) , { } ) : e , nr = ( ) => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" . replace ( /[xy]/g , ( e ) => {
const t = 16 * Math . random ( ) | 0 ;
return ( e === "x" ? t : 3 & t | 8 ) . toString ( 16 ) ;
} ) ;
var Xe , je , Ie , Qe ;
const Ze = class Ze {
constructor ( ... t ) {
2024-12-12 10:44:58 +08:00
E ( this , je , [ ] ) ;
E ( this , Ie , ( t ) => {
2024-12-12 09:55:56 +08:00
var n ;
for ( let a of t ) Array . isArray ( a [ 0 ] ) ? p ( this , Ie ) . call ( this , a ) : p ( this , je ) . push ( p ( n = Ze , Xe ) . call ( n , a [ 0 ] , a [ 1 ] ) ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "toValue" , async ( t , n = null ) => {
2024-12-12 09:55:56 +08:00
const a = { getValue : ( ) => t , getRecord : ( ) => n } ;
return await p ( this , je ) . reduce ( async ( r , s ) => {
try {
const i = await r ;
return ( await s ) . call ( a , i ) ;
} catch ( i ) {
return console . error ( i ) , r ;
}
} , t ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "toRender" , ( t , n , a = null ) => b . createElement ( p ( this , Qe ) , { value : t , record : n } , a ) ) ;
E ( this , Qe , ( { value : t , record : n , children : a } ) => {
const [ r , s ] = $ ( a ) ;
return St ( ( ) => {
2024-12-12 09:55:56 +08:00
let i = ! 1 ;
return s ( a ) , this . toValue ( t , n ) . then ( ( o ) => Y ( o , "string" ) ) . then ( ( o ) => ! i && s ( o ) ) . catch ( ( o ) => ! i && s ( ` ${ o } ` ) ) , ( ) => i = ! 0 ;
} , [ t , n ] ) , r ;
} ) ;
p ( this , Ie ) . call ( this , t ) ;
}
} ;
2024-12-12 10:44:58 +08:00
Xe = new WeakMap ( ) , je = new WeakMap ( ) , Ie = new WeakMap ( ) , Qe = new WeakMap ( ) , E ( Ze , Xe , g . memoize ( ( t , n ) => Q . getWidgetComponent ( t ) . then ( ( a ) => {
2024-12-12 09:55:56 +08:00
var r ;
return ( ( r = a . default ) == null ? void 0 : r . call ( a , n ) ) || ( ( s ) => s ) ;
} ) , ( t , n ) => ` ${ t } :: ${ Y ( n , "string" ) } ` ) ) ;
let Ye = Ze ;
const Kn = ( e , t = { } ) => Z ( ( ) => e == null ? void 0 : e . map ( ( { widgetByJs : n , widgetByJsSetting : a , ... r } , s ) => n ? { ... r , render : ( i , o ) => new Ye ( [ n , a ] ) . toRender ( i , o , "-" ) } : r ) , [ e , t ] ) , ar = ( e ) => {
2024-12-12 10:44:58 +08:00
const [ t , n ] = $ ( { } ) ;
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
let a = ! 1 ;
return e && F . get ( ` /api/_/ ${ e } ` ) . then ( ( r ) => g . pick ( r , [ "uuid" , "name" , "code" , "resource" , "marginX" , "marginY" , "cols" , "rowHeight" , "primaryKey" , "columns" , "itemOperations" , "batchOperations" , "isConditionFormLayout" , "layout" , "tabs" , "pageSize" , "layoutConfig" ] ) ) . then ( ( r ) => ! a && n ( r ) ) , ( ) => a = ! 0 ;
} , [ e ] ) , t ;
} , rr = ( e , t = { } ) => {
2024-12-12 10:44:58 +08:00
const [ n , a ] = $ ( { dataSource : [ ] } ) ;
return We ( ( ) => {
2024-12-12 09:55:56 +08:00
let r = ! 1 ;
return e && F . get ( ` /api/ ${ e } / ${ F . encode ( { page : 1 , ... t } )} ` ) . then ( ( s ) => ! r && a ( s ) ) , ( ) => r = ! 0 ;
} , [ e , t ] ) , n ;
} , gt = ( e , t = null , n = null , a = "id" ) => Z ( ( ) => {
if ( g . isEmpty ( e ) || ! e . some ( ( { uuid : s } ) => Jn . check ( s ) ) ) return ! 1 ;
if ( g . isEmpty ( n ) || g . isEmpty ( t ) ) return ! 0 ;
const r = t . map ( ( s ) => ` ${ s == null ? void 0 : s [ a ] } ` ) ;
return e . some ( ( { uuid : s } ) => ! s || ! n . has ( s ) || n . get ( s ) . some ( ( i ) => r . includes ( ` ${ i } ` ) ) ) ;
} , [ e , t , n , a ] ) , _n = ( e , t , n = "id" , a = null ) => {
2024-12-12 10:44:58 +08:00
const r = xt ( ) , s = q ( ! 1 ) , i = q ( e . dataSource ) , o = q ( e . itemOperationsAccess ) ;
return R ( ( ) => ( i . current = e . dataSource , o . current = e . itemOperationsAccess , ( ) => s . current = ! 1 ) , [ e . dataSource , e . itemOperationsAccess ] ) , s . current && ( e . dataSource = i . current , e . itemOperationsAccess = o . current ) , [ e , ( l = 0 , d = null ) => {
2024-12-12 09:55:56 +08:00
var c , m ;
if ( s . current = ! 1 , l === 1 ) return ( c = e . onReload ) == null ? void 0 : c . call ( e ) ;
if ( l === 2 ) {
2024-12-12 10:44:58 +08:00
const h = g . get ( d , "__PARENT_ID__" , "" ) , f = g . get ( d , n , g . get ( d , [ a , n ] , "" ) ) , y = g . findIndex ( i . current , [ "__PARENT_ID__" , h ] ) , C = g . findIndex ( y > - 1 ? g . get ( i . current , [ y , "children" ] ) : i . current , [ n , f ] ) ;
if ( C === - 1 ) return ( m = e . onReload ) == null ? void 0 : m . call ( e ) ;
Promise . all ( [ F . get ( ` /api/ ${ t } /detail/ ${ f } ` ) , F . post ( ` /api/ ${ t } /list-operations-access ` , { ids : f } ) ] ) . then ( ( [ w , x ] ) => {
const j = g . get ( i . current , y > - 1 ? [ y , "children" , C , "children" ] : [ C , "children" ] ) ;
i . current = Ht ( i . current , y > - 1 ? { [ y ] : { children : { $splice : [ [ C , 1 , { ... w , children : j } ] ] } } } : { $splice : [ [ C , 1 , { ... w , children : j } ] ] } ) ;
const z = new Map ( x ) ;
o . current . forEach ( ( I , A ) => {
2024-12-12 15:04:34 +08:00
var N ;
( N = z . get ( A ) ) != null && N . some ( ( L ) => L == f ) || o . current . set ( A , I . filter ( ( L ) => L !== f ) ) ;
2024-12-12 10:44:58 +08:00
} ) , z . forEach ( ( I , A ) => {
o . current . has ( A ) ? o . current . set ( A , g . uniq ( [ ... o . current . get ( A ) || [ ] , ... I ] ) ) : o . current . set ( A , I ) ;
2024-12-12 09:55:56 +08:00
} ) ;
} ) . then ( ( ) => {
s . current = ! 0 , r ( ) ;
} ) ;
}
} ] ;
} , Gn = ( e , t ) => {
2024-12-12 10:44:58 +08:00
const n = xt ( ) , a = q ( t ) , r = q ( /* @__PURE__ */ new Map ( ) ) , s = q ( [ ] ) , i = g . throttle ( ( l ) => {
s . current = [ ] , F . list ( e , g . pick ( { ... a . current , ... l } , [ "tab" , "page" , "pageSize" , "condition" , "sider" , "keyword" ] ) ) . then ( ( { keyword : d , condition : c , total : m , tab : h , sider : f , page : y , pageSize : C , operationsAccess : w , dataSource : x } ) => {
a . current = { tab : h , condition : c , sider : f , keyword : d , total : m , pageSize : C , page : x != null && x . length ? y : 1 } , s . current = x , r . current = new Map ( w ) , n ( ) ;
2024-12-12 09:55:56 +08:00
} ) ;
} , 380 , { leading : ! 1 , trailing : ! 0 } ) ;
2024-12-12 10:44:58 +08:00
St ( ( ) => {
2024-12-12 09:55:56 +08:00
s . current = [ ] , e && i ( t ) ;
} , [ e , t ] ) ;
const o = Z ( ( ) => g . pick ( a . current , [ "total" , "tab" , "page" , "pageSize" , "condition" , "sider" , "keyword" ] ) , [ a . current ] ) ;
return Object . assign ( o , { onTabChange : ( l ) => i ( { tab : l , page : 1 } ) , onPageChange : ( l , d ) => i ( { page : l , pageSize : d } ) , onPageSizeChange : ( l ) => i ( { pageSize : l , page : 1 } ) , onConditionChange : ( l , d ) => i ( { keyword : d , condition : Ht ( a . current . condition || { } , { $merge : l || { } } ) , page : 1 } ) , onSiderChange : ( l ) => i ( { sider : l , page : 1 } ) , onKeywordChange : ( l ) => i ( { keyword : l , page : 1 } ) , itemOperationsAccess : r . current , dataSource : s . current , onReload : i } ) ;
2024-12-12 10:44:58 +08:00
} , Yn = ( { className : e , itemClassName : t , classNames : n = { } , dataSource : a , isPaginate : r , isItemOperations : s , isBatchOperations : i , batchOperations : o , itemOperations : l , itemOperationsAccess : d , resource : c , primaryKey : m , title : h , itemGridLayout : f , $setting : y , tabs : C , isConditionFormLayout : w , isTreeSider : x , treeSiderConfig : j } ) => {
2024-12-12 15:04:34 +08:00
const { getBase62params : z , onClickCallback : I } = Ee ( we ) , { total : A , page : N , pageSize : L } = ( z == null ? void 0 : z ( ) ) || { } , P = ce ( ( W , U , B ) => u ( Xn , { className : V ( "ff-data-list-framework-item" , t ) , operations : s && U ? l == null ? void 0 : l . filter ( ( T ) => ! ( m && T . uuid && d . has ( T . uuid ) ) || d . get ( T . uuid ) . includes ( U == null ? void 0 : U [ m ] ) ) : [ ] , data : c ? { [ c ] : U } : U , children : W , onClickCallback : I } ) , [ c , m , s , I , l , d ] ) ;
return O ( "div" , { className : V ( "ff-data-list-framework" , e ) , children : [ u ( an , { className : n == null ? void 0 : n . sider , isTreeSider : x , ... j } ) , O ( "div" , { className : V ( "ff-data-list-container" , n == null ? void 0 : n . container ) , children : [ u ( vt , { className : n == null ? void 0 : n . filter , isConditionFormLayout : w } ) , u ( nn , { title : h , className : n == null ? void 0 : n . toolbar , tabs : C } ) , u ( oa , { ... f , className : n == null ? void 0 : n . content , style : { "--col-num" : ( y == null ? void 0 : y . colNum ) || 1 } , primaryKey : m , itemRender : P , dataSource : a } ) , u ( rn , { className : n == null ? void 0 : n . footer , isPaginate : r , isOperations : i , operations : o , total : A , page : N , pageSize : L } ) ] } ) ] } ) ;
2024-12-12 10:44:58 +08:00
} , Xn = ( { className : e , operations : t , children : n , data : a , onClickCallback : r } ) => O ( "div" , { className : V ( "data-list-grid-layout-item-container" , e ) , children : [ n , ! ! ( t != null && t . length ) && u ( "div" , { className : "data-list-grid-layout-item-actions" , children : t . map ( ( s ) => u ( "span" , { className : "data-list-grid-layout-item-action" , children : u ( S . Link , { uuid : s . uuid , type : s . type , name : s . name , widget : s . widget , widgetType : s . widgetType , widgetProps : s . widgetProps , widgetSetting : s . widgetSetting , widgetContainerProps : s . widgetContainerSetting , data : a , confirm : s . confirm , onAfterClick : ( i ) => i !== ! 1 && ( r == null ? void 0 : r ( s . isRefresh , a ) ) } , s . uuid || Ge ( ) ) } , ( s == null ? void 0 : s . uuid ) || Ge ( ) ) ) } ) ] } ) , Qn = ( { listCode : e , className : t , classNames : n = { } , itemClassName : a , dataSource : r , columns : s , isItemOperations : i , isBatchOperations : o , batchOperations : l , itemOperations : d , itemOperationsAccess : c , resource : m , primaryKey : h , title : f , tabs : y , isPaginate : C , isTreeSider : w , treeSiderConfig : x , isConditionFormLayout : j , ... z } ) => {
2024-12-12 15:04:34 +08:00
const { getBase62params : I , onClickCallback : A } = Ee ( we ) , { total : N , page : L , pageSize : P } = ( I == null ? void 0 : I ( ) ) || { } , W = gt ( d , r , c , h ) ;
return O ( "div" , { className : V ( "ff-data-table-framework" , t ) , children : [ u ( an , { className : n == null ? void 0 : n . sider , isTreeSider : w , ... x } ) , O ( "div" , { className : V ( "ff-data-table-container" , n == null ? void 0 : n . container ) , children : [ u ( vt , { listCode : e , isConditionFormLayout : j } ) , u ( nn , { title : f , className : n == null ? void 0 : n . toolbar , tabs : y } ) , u ( na , { ... z , primaryKey : h , className : "ff-data-table-content" , columns : s , dataSource : r , operationRender : W ? ( U ) => u ( "div" , { className : "ff-data-table-actions" , children : d == null ? void 0 : d . reduce ( ( B , T , ee ) => [ ... B , u ( S . Link , { size : "small" , uuid : T . uuid , type : T . type , name : T . name , widget : T . widget , widgetType : T . widgetType , widgetProps : T . widgetProps , widgetData : T . widgetData , widgetSetting : T . widgetSetting , widgetContainerProps : T . widgetContainerSetting , data : U , confirm : T . confirm , onAfterClick : ( H ) => H !== ! 1 && ( A == null ? void 0 : A ( T . isRefresh , U ) ) } , T . uuid || ee ) ] , [ ] ) } ) : null } ) , u ( rn , { isPaginate : C , isOperations : o , operations : l , total : N , page : L , pageSize : P } ) ] } ) ] } ) ;
2024-12-12 10:44:58 +08:00
} , we = b . createContext ( { listCode : "" , getBase62params : ( e , t ) => {
2024-12-12 09:55:56 +08:00
} , onReload : ( ) => {
} , onClickCallback : ( ) => {
} , onConditionChange : ( ) => {
} , onTabChange : ( ) => {
} , onSiderChange : ( ) => {
} , onKeywordChange : ( ) => {
} , onPageChange : ( ) => {
} , onPageSizeChange : ( ) => {
2024-12-12 10:44:58 +08:00
} } ) , Zn = ( { isItemGridLayout : e , theme : t , themeProps : n , onClickCallback : a , onReload : r , listCode : s , total : i = 0 , page : o = 0 , onPageChange : l , pageSize : d = 30 , onPageSizeChange : c , tab : m , onTabChange : h , keyword : f , onKeywordChange : y , condition : C , onConditionChange : w , sider : x , onSiderChange : j , ... z } ) => {
const [ I , A ] = $ ( ) ;
return R ( ( ) => {
2024-12-12 15:04:34 +08:00
t ? Q . getWidgetComponent ( t ) . then ( ( N ) => {
if ( ! N ) throw ` ${ t } not found ` ;
return N ;
} ) . catch ( ( N ) => ( { default : ( ) => ` ${ N } ` } ) ) . then ( ( N ) => A ( b . createElement ( N . default , { ... z , $setting : n } ) ) ) : A ( u ( e ? Yn : Qn , { ... z , $setting : n } ) ) ;
} , [ t , n ] ) , u ( we . Provider , { value : { listCode : s , onClickCallback : a , onReload : r , getBase62params : ( N , L ) => {
const P = { tab : m , page : o , pageSize : d , keyword : f , sider : x , condition : C , total : i } ;
return N && N != "init" ? P [ N ] ? ? L : P ;
2024-12-12 10:44:58 +08:00
} , onPageChange : l , onPageSizeChange : c , onTabChange : h , onSiderChange : j , onKeywordChange : y , onConditionChange : w } , children : I && b . cloneElement ( I , z ) } ) ;
2024-12-12 09:55:56 +08:00
} ;
var ge , oe , ve , et ;
2024-12-12 10:44:58 +08:00
const ae = class ae {
2024-12-12 09:55:56 +08:00
constructor ( ) {
2024-12-12 10:44:58 +08:00
E ( this , oe , null ) ;
E ( this , ve , /* @__PURE__ */ new Map ( ) ) ;
E ( this , et , ( ) => {
2024-12-12 09:55:56 +08:00
if ( p ( this , oe ) ) return p ( this , oe ) . port . postMessage ( { command : "status" , data : [ ] } ) ;
D ( this , oe , new SharedWorker ( new URL ( "/ff-worker/res-ws.js" , self . location ) ) ) , p ( this , oe ) . port . onmessage = ( t ) => {
var n , a ;
( n = t . data ) != null && n . uuid ? p ( this , ve ) . forEach ( ( r , s ) => {
var i ;
( r == "*" || ( i = r == null ? void 0 : r . includes ) != null && i . call ( r , t . data . uuid ) ) && s ( t . data ) ;
} ) : ( ( a = t . data ) == null ? void 0 : a . readyState ) == WebSocket . CLOSED && F . get ( "/api/user-api-token" ) . then ( ( { token : r , expire _at : s } ) => {
p ( this , oe ) . port . postMessage ( { command : "initWs" , data : [ ` ws ${ g . trimStart ( F . appUrl , "http" ) } api/user-resource-status-ws?token= ${ r } ` ] } ) ;
} ) ;
} , p ( this , oe ) . port . postMessage ( { command : "status" , data : [ ] } ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "subscribe" , ( t , n = [ ] ) => ( n ? Array . isArray ( n ) && n . length == 0 ? n = "*" : Array . isArray ( n ) || ( n = [ n ] . flat ( ) ) : n = "*" , p ( this , ve ) . set ( t , n ) , p ( this , ve ) . size == 1 && p ( this , et ) . call ( this ) , ( ) => this . unsubscribe ( t ) ) ) ;
v ( this , "unsubscribe" , ( t ) => p ( this , ve ) . delete ( t ) ) ;
if ( p ( ae , ge ) ) return p ( ae , ge ) ;
2024-12-12 09:55:56 +08:00
}
} ;
2024-12-12 10:44:58 +08:00
ge = new WeakMap ( ) , oe = new WeakMap ( ) , ve = new WeakMap ( ) , et = new WeakMap ( ) , E ( ae , ge , null ) , v ( ae , "getInstance" , ( ) => ( p ( ae , ge ) || D ( ae , ge , new ae ( ) ) , p ( ae , ge ) ) ) ;
let pt = ae ;
const en = pt . getInstance ( ) , kt = b . forwardRef ( ( { listCode : e , base62params : t , className : n , itemClassName : a , theme : r , themeProps : s , classNames : i } , o ) => {
2024-12-12 15:04:34 +08:00
const [ { resource : l , primaryKey : d , batchOperations : c = [ ] , itemOperations : m = [ ] , columns : h = [ ] , themeConfig : f , theme : y , isConditionFormLayout : C = ! 1 , isTreeSider : w , treeSiderConfig : x , isItemGridLayout : j , itemGridLayout : z , title : I , isPaginate : A , tabs : N } , L ] = $ ( { isItemGridLayout : ! 1 , itemGridLayout : { } } ) , P = Gn ( e , t ) , [ { dataSource : W , itemOperationsAccess : U , condition : B , tab : T , keyword : ee , page : H , total : nt , pageSize : De , sider : at , onConditionChange : Tt , onTabChange : mn , onKeywordChange : hn , onPageChange : fn , onPageSizeChange : yn , onSiderChange : wn , onReload : rt } , Et ] = _n ( P , e , d , l ) , bn = gt ( m , W , U , d ) , Cn = gt ( c ) ;
2024-12-12 10:44:58 +08:00
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
let qe = null ;
return e && F . get ( ` /api/_/ ${ e } ` ) . resp ( ( { data : He , res : kn } ) => {
2024-12-12 10:44:58 +08:00
He != null && He . isDynamicRefresh && ( qe = en . subscribe ( ( ) => rt ( ) , kn ) ) , L ( He ) ;
} ) . catch ( ( ) => L ( { } ) ) , ( ) => qe == null ? void 0 : qe ( ) ;
2024-12-12 15:04:34 +08:00
} , [ e ] ) , b . useImperativeHandle ( o , ( ) => ( { onReload : rt , onClickCallback : Et } ) ) , u ( Zn , { listCode : e , title : I , itemClassName : a , classNames : i , resource : l , primaryKey : d , theme : r || y , themeProps : s || f , isTreeSider : w , treeSiderConfig : x , isPaginate : A , tabs : N , isItemOperations : bn , isBatchOperations : Cn , batchOperations : c , itemOperations : m , isItemGridLayout : j , columns : h , itemGridLayout : z , isConditionFormLayout : C , itemOperationsAccess : U , dataSource : W , onConditionChange : Tt , onTabChange : mn , onKeywordChange : hn , onPageChange : fn , onPageSizeChange : yn , onSiderChange : wn , condition : B , tab : T , keyword : ee , page : H , total : nt , pageSize : De , sider : at , className : V ( "ff-data-list-helper" , n ) , onReload : rt , onClickCallback : Et } ) ;
2024-12-12 09:55:56 +08:00
} ) , tn = ( e , t , n , a , r = { } , s = 0 ) => {
const i = { "--grid-layout-h" : ` ${ a } ` , "--grid-layout-w" : ` ${ n } ` , "--grid-layout-x" : ` ${ e } ` , "--grid-layout-y" : ` ${ t } ` , "--grid-layout-row-height-offset" : "0px" } ;
return r != null && r . autoHeight ? i . height = "fit-content" : i [ "--grid-layout-row" ] = ` ${ a } ` , r != null && r . alignItems && ( i [ "--grid-layout-box-align-items" ] = r . alignItems ) , r != null && r . justifyContent && ( i [ "--grid-layout-box-justify-content" ] = r . justifyContent ) , i [ "--grid-layout-box-margin" ] = jt ( r == null ? void 0 : r . marginTop , r == null ? void 0 : r . marginRight , r == null ? void 0 : r . marginBottom , r == null ? void 0 : r . marginLeft ) , i [ "--grid-layout-box-padding" ] = jt ( r == null ? void 0 : r . paddingTop , r == null ? void 0 : r . paddingRight , r == null ? void 0 : r . paddingBottom , r == null ? void 0 : r . paddingLeft ) , s && ( i . height = ` ${ s } px ` ) , i ;
} , jt = ( e , t , n , a ) => ` ${ e || 0 } px ${ t || 0 } px ${ n || 0 } px ${ a || 0 } px ` , vt = ( { className : e , isConditionFormLayout : t } ) => {
var m , h ;
2024-12-12 10:44:58 +08:00
const [ n , a ] = $ ( { } ) , { listCode : r , onKeywordChange : s , onConditionChange : i , getBase62params : o } = b . useContext ( we ) , { keyword : l , condition : d } = ( o == null ? void 0 : o ( ) ) || { } , [ c ] = Ke . useForm ( ) ;
return R ( ( ) => {
r && t && F . get ( ` /api/_/ ${ r } /list-condition-form-layout ` ) . then ( ( { resource : f , marginX : y , marginY : C , rowHeight : w , cols : x , fields : j } ) => {
a ( { resource : f , itemMargin : [ y , C ] , rowHeight : w , cols : x , fields : j } ) ;
2024-12-12 09:55:56 +08:00
} ) . catch ( ( ) => a ( { } ) ) ;
2024-12-12 10:44:58 +08:00
} , [ r , t ] ) , R ( ( ) => {
2024-12-12 09:55:56 +08:00
c . setFieldsValue ( { keyword : l , ... d } ) ;
2024-12-12 10:44:58 +08:00
} , [ JSON . stringify ( [ l , d ] ) ] ) , u ( "div" , { className : V ( "ff-data-list-filter" , e ) , children : u ( Ke , { form : c , layout : "vertical" , autoComplete : "off" , onFinish : ( ( m = n . fields ) == null ? void 0 : m . length ) > 1 ? ( f ) => i ( { [ n . resource ] : f [ n . resource ] } , f . keyword ) : ( ) => {
2024-12-12 09:55:56 +08:00
} , onValuesChange : ( f ) => {
g . isEmpty ( g . omit ( f , [ "keyword" ] ) ) || c . submit ( ) ;
2024-12-12 10:44:58 +08:00
} , children : ( ( h = n . fields ) == null ? void 0 : h . length ) > 1 ? u ( $t , { ... n , children : u ( ea , { onReset : ( ) => {
2024-12-12 09:55:56 +08:00
const { keyword : f , condition : y } = o ( "init" ) || { } ;
c . setFieldsValue ( { keyword : f , ... y } ) ;
2024-12-12 10:44:58 +08:00
} } ) } ) : u ( "div" , { className : "ff-data-list-filter-default-form ff-grid-layout-form" , children : u ( "div" , { className : "grid-layout-item" , style : tn ( 20 , 0 , 5 , 2 ) , children : u ( Ke . Item , { name : [ "keyword" ] , children : u ( $n . Search , { allowClear : ! 0 , enterButton : "搜索" , placeholder : "多关键字 | 分割" , onSearch : ( f ) => s ( f ) } ) } ) } ) } ) } ) } ) ;
2024-12-12 09:55:56 +08:00
} , ea = ( { cols : e , fields : t , onReset : n } ) => {
2024-12-12 10:44:58 +08:00
const [ a , r ] = $ ( ! 1 ) , s = Z ( ( ) => t == null ? void 0 : t . toReversed ( ) . some ( ( i ) => i . y > 1 || i . x + i . w >= e - 5 ) , [ e , t ] ) ;
return O ( Ke . Item , { label : " " , style : { "--item-span" : 5 } , className : V ( "ff-data-list-filter-actions" , { expanded : a } ) , children : [ u ( lt , { onClick : n , children : "重置" } ) , u ( lt , { type : "primary" , htmlType : "submit" , children : "查询" } ) , s && u ( S . Link , { className : "ff-data-list-filter-expanded-button" , widget : ( ) => r ( ( i ) => ! i ) , type : "primary" , name : a ? "关闭" : "展开" , icon : a ? "icon-up" : "icon-down" , iconPosition : "end" } ) ] } ) ;
2024-12-12 09:55:56 +08:00
} ;
vt . reservedFields = [ { x : 0 , y : 0 , h : 3 , w : 5 , field : { isVirtual : ! 0 , widgetPrefix : "@pkg/ff/grid-layout-forms" , widget : "Input" , code : "keyword" , label : "关键字" , placeholder : "多关键字 | 分割" , extras : { prefix : "icon-search" } } } ] ;
const nn = ( { className : e , title : t , tabs : n } ) => {
const { getBase62params : a , onTabChange : r , onReload : s } = Ee ( we ) , { tab : i } = ( a == null ? void 0 : a ( ) ) || { } , [ o , l ] = Vn ( ( n == null ? void 0 : n [ 0 ] . value ) ? ? ( n == null ? void 0 : n [ 0 ] . code ) , { value : i , onChange : r } ) ;
2024-12-12 15:04:34 +08:00
return O ( "div" , { className : V ( "ff-data-list-toolbar" , e ) , children : [ u ( "div" , { className : "ff-data-list-title" , children : t } ) , u ( Nn , { className : "ff-data-list-tabs" , itemRender : ( { label : d , code : c , value : m } ) => u ( "span" , { onClick : ( ) => l ( m ? ? c ) , className : V ( "ff-data-list-tab" , { active : ( m ? ? c ) == o } ) , children : d } ) , items : n } ) , O ( "div" , { className : "ff-data-list-actions" , children : [ u ( S . Link , { icon : "icon-reload" , widget : ( ) => s ( ) } ) , u ( S . Link , { icon : "icon-setting" } ) ] } ) ] } ) ;
} , ta = [ { title : "parent 1" , key : "0-0" , children : [ { title : "parent 1-0" , key : "0-0-0" , disabled : ! 0 , children : [ { title : "leaf" , key : "0-0-0-0" , disableCheckbox : ! 0 } , { title : "leaf" , key : "0-0-0-1" } ] } , { title : "parent 1-1" , key : "0-0-1" , children : [ { title : u ( "span" , { style : { color : "#1677ff" } , children : "sss" } ) , key : "0-0-1-0" } ] } ] } ] , an = ( { className : e , width : t = 280 , isTreeSider : n } ) => n ? u ( Pn . DirectoryTree , { className : V ( "ff-data-list-sider" , e ) , style : { "--sider-width" : t } , showLine : ! 0 , showIcon : ! 1 , treeData : ta } ) : null , rn = ( { className : e , operations : t , isOperations : n , isPaginate : a , total : r , page : s , pageSize : i } ) => {
2024-12-12 10:44:58 +08:00
const { onPageChange : o , onPageSizeChange : l , onClickCallback : d } = b . useContext ( we ) ;
return n && ! g . isEmpty ( t ) || a ? O ( "div" , { className : V ( "ff-data-list-footer" , e ) , children : [ u ( "div" , { className : "ff-data-list-actions" , children : t == null ? void 0 : t . map ( ( c , m ) => u ( S , { uuid : c . uuid , type : c . type , name : c . name , widget : c . widget , widgetType : c . widgetType , widgetProps : c . widgetProps , widgetData : c . widgetData , widgetSetting : c . widgetSetting , widgetContainerProps : c . widgetContainerSetting , onAfterClick : ( h ) => h !== ! 1 && ( d == null ? void 0 : d ( c . isRefresh , null ) ) } , c . uuid || m ) ) } ) , a && u ( Tn , { size : "small" , total : r , pageSize : i , showSizeChanger : ! 1 , showTotal : ( c ) => ` 第 ${ s } 页 / 总共 ${ c } 条 ` , onChange : o , onShowSizeChange : l } ) ] } ) : null ;
2024-12-12 09:55:56 +08:00
} , sn = ( e , t , n = ! 0 ) => n !== ! 0 && n -- <= 0 ? [ ] : g . isArray ( e ) && ! g . isEmpty ( e ) ? e . reduce ( ( a , r ) => ( Reflect . has ( r , t ) && Reflect . has ( r , "children" ) && a . push ( r [ t ] ) , Reflect . has ( r , "children" ) && ! g . isEmpty ( r . children ) ? a . concat ( sn ( r . children , t , n ) ) : a ) , [ ] ) : [ ] , na = ( { className : e , primaryKey : t , columns : n = [ ] , dataSource : a = [ ] , operationRender : r , operationWidth : s = 180 , ... i } ) => {
Ge ( ) ;
2024-12-12 10:44:58 +08:00
const o = q ( null ) , l = q ( null ) , [ d , c ] = $ ( [ ] ) , [ m , h ] = $ ( { width : 0 , height : 0 } ) ;
R ( ( ) => {
2024-12-12 09:55:56 +08:00
c ( sn ( a , t ) ) ;
2024-12-12 10:44:58 +08:00
} , [ a , t ] ) , Sn ( ( ) => {
2024-12-12 09:55:56 +08:00
const y = new ResizeObserver ( ( ) => {
2024-12-12 10:44:58 +08:00
var C ;
h ( { width : ( ( C = o . current ) == null ? void 0 : C . nativeElement . querySelector ( ".ant-table-body" ) . scrollWidth ) || l . current . offsetWidth , height : l . current . offsetHeight } ) ;
2024-12-12 09:55:56 +08:00
} ) ;
return l . current && y . observe ( l . current ) , ( ) => {
l . current && y . unobserve ( l . current ) ;
} ;
} , [ ] ) ;
const f = Kn ( n ) ;
2024-12-12 10:44:58 +08:00
return u ( "div" , { ref : l , className : V ( "ff-data-list-table" , e ) , children : m . height ? u ( En , { ... i , ref : o , rowKey : ( y ) => ( y == null ? void 0 : y [ t ] ) ? ? Math . random ( ) , columns : f == null ? void 0 : f . concat ( r ? [ { title : "操作" , align : "center" , fixed : "right" , width : ` ${ Math . ceil ( s / m . width * 100 ) . toFixed ( 2 ) } % ` , render : ( y , C , w ) => r ( C , w ) } ] : [ ] ) , dataSource : a , size : "middle" , scroll : { x : "max-content" , y : m . height - 50 } , pagination : ! 1 , expandable : { defaultExpandAllRows : ! 0 , expandRowByClick : ! 0 , onExpandedRowsChange : c , expandedRowKeys : d } } ) : null } ) ;
2024-12-12 09:55:56 +08:00
} , aa = "RC_FORM_INTERNAL_HOOKS" , on = ( e , { initialValue : t , initialValueLanguage : n , convertJs : a , convertJsSetting : r , type : s = "string" } , i = null ) => {
2024-12-12 10:44:58 +08:00
const o = q ( ! 1 ) , l = Ee ( An ) , [ d , c ] = $ ( ) , [ m , h ] = $ ( n != "javascript" && e ? l . getFieldValue ( e ) : void 0 ) , { registerWatch : f } = l . getInternalHooks ( aa ) || { } ;
return R ( ( ) => f == null ? void 0 : f ( ( y , C , w ) => {
2024-12-12 09:55:56 +08:00
if ( ! o . current ) return ;
2024-12-12 10:44:58 +08:00
const x = g . get ( C , e ) ;
g . isEqual ( x , m ) || h ( Y ( x , s ) ) ;
} ) , [ m ] ) , R ( ( ) => {
n == "javascript" && t ? be . exec ( t , { } , { getFieldValueForBasicForm : ( y ) => i ? i . getFieldValue ( y ) : l . getFieldValue ( y ) , getFieldValue : ( y ) => l . getFieldValue ( y ) } ) . then ( ( y ) => h ( Y ( y , s ) ) ) . catch ( ( y ) => notification . error ( { message : ` 布局数据错误: ${ JSON . stringify ( y ) } ` } ) ) . finally ( ( ) => o . current = ! 0 ) : ( t && h ( Y ( t ? ? l . getFieldValue ( e ) , s ) ) , o . current = ! 0 ) ;
} , [ t , n ] ) , We ( ( ) => {
2024-12-12 09:55:56 +08:00
o . current && a && new Ye ( [ a , r ] ) . toValue ( m , l . getFieldsValue ( ! 0 ) ) . then ( c ) . catch ( ( y ) => {
c ( y ) , console . error ( "布局数据转换错误: " , y , a ) ;
} ) ;
} , [ m , a , r ] ) , [ d ? ? m , m ] ;
} , ln = ( e , t , n = "@pkg/ff/grid-layouts" , a = null ) => Z ( ( ) => {
var r ;
return ( r = g . sortBy ( e , [ "y" , "x" ] ) ) == null ? void 0 : r . map ( ( { i : s , x : i , y : o , w : l , h : d , field : { boxStyle : c , widgetPrefix : m = n , widget : h , ... f } } , y ) => u ( "div" , { className : "grid-layout-item" , style : tn ( i , o , l , d , c , h === "Height" && ( f == null ? void 0 : f . initialValue ) ) , children : u ( ra , { ... f , basicForm : a , itemWidget : h != null && h . startsWith ( "@" ) || h != null && h . startsWith ( "blob:" ) ? h : ` ${ m } / ${ h } ` , itemWidgetRender : t } ) } , s || y ) ) ;
} , [ e ] ) , ra = ( { itemWidget : e , itemWidgetRender : t , basicForm : n , ... a } ) => {
2024-12-12 10:44:58 +08:00
const [ r , s ] = $ ( ) ;
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
Q . getWidgetComponent ( e ) . then ( ( { defaultProps : i = { } , default : o } ) => {
2024-12-12 10:44:58 +08:00
s ( b . createElement ( t ( o , i , n ) , a ) ) ;
2024-12-12 09:55:56 +08:00
} ) . catch ( ( i ) => {
console . error ( i ) , s ( e ) ;
} ) ;
} , [ e ] ) , r ;
} , cn = ( { cols : e = 12 , rowHeight : t = 21 , fields : n = [ ] , data : a , containerPadding : r = [ 0 , 0 ] , itemMargin : s = [ 4 , 0 ] , formProps : i = { } , className : o , ... l } ) => {
const [ d ] = X . useForm ( ) , c = ln ( n , sa , "@pkg/ff/grid-layouts" ) , m = Z ( ( ) => [ { name : "__PROPS__" , value : i } ] , [ i ] ) ;
2024-12-12 10:44:58 +08:00
return We ( ( ) => ( d . setFieldsValue ( a ) , ( ) => d . resetFields ( ) ) , [ a ] ) , u ( X , { fields : m , form : d , component : ! 1 , children : u ( "div" , { ... l , className : V ( "ff-grid-layout" , o ) , style : { "--grid-layout-item-margin-y" : ` ${ ( s == null ? void 0 : s [ 0 ] ) || 0 } px ` , "--grid-layout-item-margin-x" : ` ${ ( s == null ? void 0 : s [ 1 ] ) || 0 } px ` , "--grid-layout-container-padding-y" : ` ${ ( r == null ? void 0 : r [ 0 ] ) || 0 } px ` , "--grid-layout-container-padding-x" : ` ${ ( r == null ? void 0 : r [ 1 ] ) || 0 } px ` , "--grid-layout-cols" : e , "--grid-layout-row-height" : ` ${ t } px ` } , children : c } ) } ) ;
2024-12-12 09:55:56 +08:00
} , sa = ( e , t = { } , n = null ) => ( a ) => {
const { code : r , label : s , extras : i , isVirtual : o , initialValue : l , initialValueLanguage : d , convertJs : c , convertJsSetting : m , ... h } = g . merge ( { } , t , a ) , [ f , y ] = on ( o ? null : r , { initialValue : l , initialValueLanguage : d , convertJs : c , convertJsSetting : m , type : ( h == null ? void 0 : h . type ) || "string" } , n ) ;
return u ( e , { ... h , value : f , rawValue : y , $setting : i || { } } ) ;
} , sr = ( It = cn , function ( { code : e , data : t , ... n } ) {
2024-12-12 10:44:58 +08:00
const [ a , r ] = $ ( { resource : null , cols : 12 , rowHeight : 21 , fields : [ ] } ) ;
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
e && F . get ( ` /api/_/ ${ e } ` ) . then ( ( s ) => r ( g . pick ( s , [ "resource" , "cols" , "rowHeight" , "fields" ] ) ) ) ;
} , [ e ] ) , ( a == null ? void 0 : a . resource ) && u ( It , { ... n , rowHeight : a . rowHeight , cols : a . cols , fields : a . fields , data : a != null && a . resource ? { [ a == null ? void 0 : a . resource ] : t } : { } } ) ;
} ) ;
var It ;
const ir = ( { widget : e , widgetPrefix : t = "@pkg/ff/grid-layouts" , basicForm : n , ... a } ) => {
2024-12-12 10:44:58 +08:00
const r = e != null && e . startsWith ( "@" ) || e != null && e . startsWith ( "blob:" ) ? e : ` ${ t } / ${ e } ` , [ s , i ] = $ ( ) ;
return R ( ( ) => {
r && Q . getWidgetComponent ( r ) . then ( ( { defaultProps : o = { } , default : l } ) => ( { default : ia ( l , o , n ) } ) ) . catch ( ( o ) => ( { default : ( ) => ` ${ o } ` } ) ) . then ( ( o ) => i ( b . createElement ( o . default , a ) ) ) ;
2024-12-12 09:55:56 +08:00
} , [ r ] ) , s ;
} , ia = ( e , t = { } , n = null ) => ( a ) => {
2024-12-12 10:44:58 +08:00
const { code : r , label : s , extras : i , isVirtual : o , initialValue : l , initialValueLanguage : d , convertJs : c , convertJsSetting : m , value : h , ... f } = g . merge ( { } , t , a ) , [ y , C ] = on ( o ? null : r , { initialValue : l , initialValueLanguage : d , convertJs : c , convertJsSetting : m , type : ( f == null ? void 0 : f . type ) || "string" } , n ) ;
return u ( e , { ... f , value : y , rawValue : C , $setting : i || { } } ) ;
2024-12-12 09:55:56 +08:00
} , oa = ( { cols : e , rowHeight : t , itemMargin : n , fields : a , primaryKey : r , dataSource : s , itemClassName : i , itemRender : o = ( m , h , f ) => m , empty : l = u ( Rn , { description : null } ) , className : d , style : c = { } } ) => {
const m = Ge ( ) , h = Z ( ( ) => u ( cn , { cols : e , rowHeight : t , itemMargin : n , fields : a , className : i } ) , [ a , e , t , n ] ) ;
2024-12-12 10:44:58 +08:00
return u ( "div" , { className : V ( "ff-data-list-content" , d ) , style : c , children : g . isEmpty ( s ) ? l : s . map ( ( f , y ) => {
const C = o ( b . cloneElement ( h , { data : f } ) , f , y ) ;
return b . cloneElement ( C , { key : ` ${ m } - ${ ( f == null ? void 0 : f [ r ] ) || y } ` } ) ;
2024-12-12 09:55:56 +08:00
} ) } ) ;
} , la = ( { component : e } ) => {
const { base62params : t } = jn ( ) ;
2024-12-12 15:04:34 +08:00
return u ( _ , { children : u ( kt , { listCode : e , base62params : F . decode ( t ) } ) } ) ;
2024-12-12 09:55:56 +08:00
} , ca = ( ) => "Empty" , da = ( { component : e , $setting : t } ) => {
2024-12-12 10:44:58 +08:00
const [ n , a ] = $ ( ) ;
R ( ( ) => {
2024-12-12 09:55:56 +08:00
if ( ! e ) return a ( u ( ca , { description : null } ) ) ;
2024-12-12 10:44:58 +08:00
Q . getWidgetComponent ( e ) . catch ( ( s ) => ( { default : ( ) => ` ${ s } ` } ) ) . then ( ( s ) => b . createElement ( s . default , { $setting : t } ) ) . then ( a ) ;
2024-12-12 09:55:56 +08:00
} , [ e ] ) ;
const r = le . getPageParams ( ) || { } ;
2024-12-12 10:44:58 +08:00
return n ? b . cloneElement ( n , r ) : null ;
2024-12-12 09:55:56 +08:00
} ;
var pe , G , me , he , Me , ze ;
2024-12-12 10:44:58 +08:00
const re = class re {
2024-12-12 09:55:56 +08:00
constructor ( ) {
2024-12-12 10:44:58 +08:00
E ( this , G , /* @__PURE__ */ new Map ( ) ) ;
E ( this , me , { } ) ;
E ( this , he , null ) ;
v ( this , "init" , ( t , n ) => {
2024-12-12 09:55:56 +08:00
D ( this , G , t ) , D ( this , me , n ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "get" , ( t ) => ( p ( this , G ) . has ( t ) || ( t = Array . from ( p ( this , G ) . keys ( ) ) . find ( ( n ) => p ( this , G ) . get ( n ) . uri === t ) ) , p ( this , G ) . get ( t ) || { } ) ) ;
v ( this , "redirect" , ( t , n , a = { } ) => {
2024-12-12 09:55:56 +08:00
const { uri : r , type : s , widgetProps : i } = this . get ( t ) || { } ;
let o = In ( r || t , s != "list" ? n : g . mapValues ( n , ( d ) => F . encode ( d ) ) ) ;
const l = new URLSearchParams ( ) ;
for ( const d in i || { } ) ( i == null ? void 0 : i . type ) == "query" && l . append ( d , n [ d ] ) ;
return l . size > 0 && ( o = ` ${ o } ? ${ l . toString ( ) } ` ) , p ( this , he ) . navigate ( o , a ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getMenus" , ( t ) => {
2024-12-12 09:55:56 +08:00
var n ;
return ( ( n = p ( this , me ) ) == null ? void 0 : n [ t ] ) || [ ] ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "findMenuPathByUuid" , ( t ) => {
2024-12-12 09:55:56 +08:00
let n = [ ] ;
for ( const a in p ( this , me ) ) if ( n = p ( this , Me ) . call ( this , p ( this , me ) [ a ] , t , [ a ] ) , n . length > 1 ) return n ;
return n ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getMenusByRouteUuid" , ( t ) => p ( this , ze ) . call ( this , t , Object . values ( p ( this , me ) ) . flat ( ) ) ) ;
E ( this , Me , ( t , n , a = [ ] ) => {
2024-12-12 09:55:56 +08:00
if ( g . isEmpty ( t ) ) return a ;
for ( const { uuid : r , children : s } of t ) {
if ( r == n ) return a . concat ( r ) ;
if ( ! g . isEmpty ( s ) ) return a . concat ( r , p ( this , Me ) . call ( this , s , n ) ) ;
}
return a ;
} ) ;
2024-12-12 10:44:58 +08:00
E ( this , ze , ( t , n ) => {
2024-12-12 09:55:56 +08:00
var r ;
let a = [ ] ;
for ( const s of n ) s . widgetType == "redirect" && ( s . uuid == t || s . widget == t ? a . push ( s ) : ( r = s . children ) != null && r . length && ( a = a . concat ( p ( this , ze ) . call ( this , t , s . children ) ) ) ) ;
return a ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getCurrentMenu" , ( ) => {
2024-12-12 09:55:56 +08:00
const { uuid : t } = this . getCurrentRoute ( ) || { } ;
if ( ! t ) return ;
const n = this . getMenusByRouteUuid ( t ) ;
return g . isEmpty ( n ) ? void 0 : n [ 0 ] ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getCurrentRoute" , ( t = 0 ) => {
2024-12-12 09:55:56 +08:00
var a ;
const n = ( a = p ( this , he ) . state . matches [ p ( this , he ) . state . matches . length - 1 - t ] ) == null ? void 0 : a . route ;
if ( ! n ) return null ;
for ( let [ r , s ] of p ( this , G ) ) if ( s . uri === n . path ) return s ;
return null ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getPageParams" , ( t ) => {
2024-12-12 09:55:56 +08:00
var s , i ;
const { location : n = { } , matches : a = [ ] } = ( ( s = p ( this , he ) ) == null ? void 0 : s . state ) || { } , r = ( ( i = a [ a . length - 1 ] ) == null ? void 0 : i . params ) || { } ;
return n . search && new URLSearchParams ( n . search ) . forEach ( ( o , l ) => {
r [ l ] = o ;
} ) , t ? g . get ( r , t ) : r ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "createBrowserRouter" , ( t = { } ) => {
2024-12-12 09:55:56 +08:00
if ( p ( this , G ) . size == 0 ) return null ;
const n = Oe . get ( "Common.WEBSITE_DEFAULT_THEME" , "@pkg/ff/frameworks/DefaultTheme" ) , a = Oe . get ( Q . checkUserToken ( ) ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT" , "/index" ) , r = { [ n ] : 0 } , s = ( o , l ) => ( ) => Q . getWidgetComponent ( o ) . then ( ( d ) => d . default || function ( ) {
return ` ${ o } ` ;
2024-12-12 10:44:58 +08:00
} ) . then ( ( d ) => ( { Component : ( ) => b . createElement ( _t , { } , b . createElement ( d , l ) ) } ) ) , i = Array . from ( p ( this , G ) . values ( ) ) . reduce ( ( o , { uuid : l , uri : d , name : c , type : m , component : h , widgetSetting : f , isLogin : y , isLayout : C , extra : w } ) => {
let x = { } , j = 0 ;
2024-12-12 09:55:56 +08:00
switch ( m ) {
case "list" :
2024-12-12 10:44:58 +08:00
x . element = b . createElement ( la , { component : h } ) ;
2024-12-12 09:55:56 +08:00
break ;
case "fsdpf-component" :
2024-12-12 10:44:58 +08:00
x . element = b . createElement ( da , { key : h , component : h , $setting : f } ) ;
2024-12-12 09:55:56 +08:00
}
if ( w != null && w . layout ) {
2024-12-12 10:44:58 +08:00
if ( ! r [ w == null ? void 0 : w . layout ] ) return r [ w == null ? void 0 : w . layout ] = o . length , [ ... o , { path : "/" , lazy : s ( w == null ? void 0 : w . layout , { } ) , children : [ { path : d , ... x } ] } ] ;
2024-12-12 09:55:56 +08:00
j = r [ w == null ? void 0 : w . layout ] ;
}
2024-12-12 10:44:58 +08:00
return C && j > - 1 ? ( o [ j ] . children . push ( { path : d , ... x } ) , o ) : [ ... o , { path : d , ... x } ] ;
2024-12-12 09:55:56 +08:00
} , [ { path : "/" , lazy : s ( n , { } ) , children : [ ] } ] ) ;
2024-12-12 10:44:58 +08:00
return i . push ( { index : ! 0 , element : b . createElement ( ua , { to : a , replace : ! 0 } ) } ) , D ( this , he , Mn ( i , t ) ) ;
2024-12-12 09:55:56 +08:00
} ) ;
2024-12-12 10:44:58 +08:00
if ( p ( re , pe ) ) return p ( re , pe ) ;
2024-12-12 09:55:56 +08:00
}
} ;
2024-12-12 10:44:58 +08:00
pe = new WeakMap ( ) , G = new WeakMap ( ) , me = new WeakMap ( ) , he = new WeakMap ( ) , Me = new WeakMap ( ) , ze = new WeakMap ( ) , E ( re , pe , null ) , v ( re , "getInstance" , ( ) => ( p ( re , pe ) || D ( re , pe , new re ( ) ) , p ( re , pe ) ) ) ;
let mt = re ;
2024-12-12 15:04:34 +08:00
const ua = ( { to : e , replace : t } ) => zn ( ) ? b . createElement ( Bn , { to : e , replace : t } ) : ( window . document . location = e , "redirect" ) , le = mt . getInstance ( ) , xe = new Worker ( new URL ( "/ff-worker/index.js" , self . location ) ) , Mt = { getConfigure : ( e ) => Oe . get ( e ) , route : { redirect : ( ... e ) => le . redirect ( ... e ) , getPageParams : ( ... e ) => le . getPageParams ( ... e ) , getCurrentRoute : ( ) => le . getCurrentRoute ( ) } , popup : { notification : ( ... e ) => K . notification ( ... e ) , success : ( ... e ) => K . success ( ... e ) , error : ( ... e ) => K . error ( ... e ) , form : ( ... e ) => K . form ( ... e ) , modal : ( ... e ) => K . modal ( ... e ) , confirm : ( ... e ) => K . confirm ( ... e ) } } ;
var tt , Pe , fe ;
2024-12-12 09:55:56 +08:00
const M = class M {
constructor ( ) {
2024-12-12 10:44:58 +08:00
v ( this , "exec" , ( t , n = { } , a = { } , r = "" ) => new Promise ( ( s , i ) => {
2024-12-12 09:55:56 +08:00
const o = Ot ( M , tt ) . _ ++ ;
2024-12-12 15:04:34 +08:00
p ( M , Pe ) . set ( o , a ) , M . mQueue . set ( o , [ s , i ] ) , xe . postMessage ( { id : o , session : r , category : "eval" , method : t , args : n } ) ;
2024-12-12 09:55:56 +08:00
} ) ) ;
2024-12-12 10:44:58 +08:00
v ( this , "clear" , ( t ) => xe . postMessage ( { session : t , category : "clear" } ) ) ;
2024-12-12 09:55:56 +08:00
if ( p ( M , fe ) ) return p ( M , fe ) ;
Promise . resolve ( ) . then ( ( ) => Aa ) . then ( ( t ) => {
Mt . http = t . http ;
2024-12-12 10:44:58 +08:00
} ) , xe . addEventListener ( "message" , ( { data : { id : t , task _id : n , method : a , args : r , category : s , data : i , error : o , session : l } } ) => {
2024-12-12 15:04:34 +08:00
if ( s === "eval" && M . mQueue . has ( t ) ) o !== null ? M . mQueue . get ( t ) [ 1 ] ( o ) : M . mQueue . get ( t ) [ 0 ] ( i ) , p ( M , Pe ) . delete ( t ) , M . mQueue . delete ( t ) ;
2024-12-12 09:55:56 +08:00
else if ( s === "util" ) try {
2024-12-12 15:04:34 +08:00
const d = g . get ( Mt , a . split ( "/" ) ) || g . get ( p ( M , Pe ) . get ( n ) , a . split ( "/" ) ) ;
2024-12-12 09:55:56 +08:00
if ( ! g . isFunction ( d ) ) throw ` ${ a } not found ` ;
Promise . resolve ( Reflect . apply ( d , void 0 , r ) ) . then ( ( c ) => {
2024-12-12 10:44:58 +08:00
xe . postMessage ( { id : t , task _id : n , category : s , method : a , args : r , session : l , data : c , error : null } ) ;
2024-12-12 09:55:56 +08:00
} ) . catch ( ( c ) => {
2024-12-12 10:44:58 +08:00
xe . postMessage ( { id : t , task _id : n , category : s , method : a , args : r , session : l , data : null , error : c } ) ;
2024-12-12 09:55:56 +08:00
} ) ;
} catch ( d ) {
2024-12-12 10:44:58 +08:00
xe . postMessage ( { id : t , task _id : n , category : s , method : a , args : r , session : l , data : null , error : d } ) ;
2024-12-12 09:55:56 +08:00
}
} , ! 1 ) ;
}
} ;
2024-12-12 15:04:34 +08:00
tt = new WeakMap ( ) , Pe = new WeakMap ( ) , fe = new WeakMap ( ) , v ( M , "mQueue" , /* @__PURE__ */ new Map ( ) ) , E ( M , tt , 0 ) , E ( M , Pe , /* @__PURE__ */ new Map ( ) ) , E ( M , fe , null ) , v ( M , "getInstance" , ( ) => ( p ( M , fe ) || D ( M , fe , new M ( ) ) , p ( M , fe ) ) ) ;
2024-12-12 09:55:56 +08:00
let ht = M ;
2024-12-12 10:44:58 +08:00
const be = ht . getInstance ( ) , xt = ( ) => {
const e = q ( ! 0 ) , [ , t ] = b . useReducer ( ( n ) => n + 1 , 0 ) ;
return R ( ( ) => ( ) => e . current = ! 1 , [ ] ) , ( ) => e . current && t ( ) ;
2024-12-12 09:55:56 +08:00
} , or = ( e ) => {
const t = q ( ) ;
2024-12-12 10:44:58 +08:00
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
t . current = e ;
} , [ e ] ) , t . current ;
} , lr = ( e ) => {
2024-12-12 10:44:58 +08:00
const [ t , n ] = $ ( e ) , a = q ( null ) , r = ce ( ( s , i ) => {
2024-12-12 09:55:56 +08:00
a . current = i , n ( s ) ;
} , [ ] ) ;
2024-12-12 10:44:58 +08:00
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
a . current && ( a . current ( t ) , a . current = null ) ;
} , [ t ] ) , [ t , r ] ;
2024-12-12 10:44:58 +08:00
} , We = ( e = ( a ) => {
2024-12-12 09:55:56 +08:00
} , t , n = g . isEqual ) => {
2024-12-12 10:44:58 +08:00
const a = b . useRef ( ) ;
n ( t , a . current ) || ( a . current = g . cloneDeep ( t ) ) , b . useEffect ( e , [ a . current ] ) ;
} , St = We , dn = ( e , t = "string" ) => {
2024-12-12 09:55:56 +08:00
var n ;
if ( ! Array . isArray ( e ) ) return e ;
for ( let a = 0 ; a < e . length ; a ++ ) e [ a ] . value = Y ( ( n = e [ a ] ) == null ? void 0 : n . value , t ) , e [ a ] && Reflect . has ( e [ a ] , "children" ) && ( e [ a ] . children = dn ( e [ a ] . children , t ) ) ;
return e ;
} , cr = ( e , t = "json" , n = "string" , a , r = null ) => {
2024-12-12 10:44:58 +08:00
const [ s ] = X . useForm ( a ) , [ i , o ] = $ ( [ { label : "无" , value : "" , disabled : ! 0 } ] ) , l = q ( [ ] ) , d = X . useWatch ( ( c ) => l . current . length === 0 ? null : g . pick ( c , l . current ) , s ) || null ;
return R ( ( ) => {
Array . isArray ( e ) ? o ( e ) : t === "javascript" && e ? be . exec ( e , { } , { getFieldValue : ( c ) => ( l . current . includes ( c ) || l . current . push ( c ) , s . getFieldValue ( c ) ) , getFieldValueForBasicForm : ( c ) => ( l . current . includes ( c ) || l . current . push ( c ) , r ? r . getFieldValue ( c ) : s . getFieldValue ( c ) ) } ) . then ( ( c ) => {
2024-12-12 09:55:56 +08:00
o ( Y ( c , "array" ) ) ;
} ) : e && o ( Y ( e , "array" ) ) ;
} , [ e , t , d ] ) , dn ( i , n ) ;
} , dr = ( e ) => {
2024-12-12 10:44:58 +08:00
const [ t , n ] = $ ( ) , a = { type : "GET" } ;
2024-12-12 09:55:56 +08:00
if ( typeof e == "string" ? a . url = e : g . isPlainObject ( e ) && Object . assign ( a , e ) , ! ( a != null && a . url ) ) throw "url is required" ;
const r = ( s ) => F . request ( a , ! 1 ) . resp ( ( i ) => ( console . log ( "useSubscribeRequest" , s ) , n ( i ) , i ) ) ;
2024-12-12 10:44:58 +08:00
return We ( ( ) => {
2024-12-12 09:55:56 +08:00
let s = null ;
return r ( ) . then ( ( i ) => {
s = en . subscribe ( g . throttle ( r , 180 , { leading : ! 1 , trailing : ! 0 } ) , i . res ) ;
} ) , ( ) => s == null ? void 0 : s ( ) ;
} , a ) , t ;
} , ga = ( e ) => {
2024-12-12 10:44:58 +08:00
const [ t , n ] = b . useState ( { gridItems : [ ] , hideItems : [ ] } ) ;
return b . useEffect ( ( ) => {
e && F . get ( ` /api/_/ ${ e } ` ) . then ( ( { pk : a , uuid : r , code : s , resource : i , align : o , cols : l , rowHeight : d , marginX : c , marginY : m , listenChangeFields : h , listenChangeFieldsFunc : f , fields : y } ) => ( { pk : a , uuid : r , code : s , resource : i , align : o , cols : l , rowHeight : d , marginX : c , marginY : m , listenChangeFields : h , listenChangeFieldsFunc : f , ... y . reduce ( ( C , w ) => {
var x ;
return ( x = w == null ? void 0 : w . field ) != null && x . hidden ? C . hides . push ( w == null ? void 0 : w . field ) : C . items . push ( w ) , C ;
2024-12-12 09:55:56 +08:00
} , { items : [ ] , hides : [ ] } ) } ) ) . then ( n ) ;
} , [ e ] ) , t ;
} , pa = ( { max : e = 0 , min : t = 0 , type : n = "" , message : a , pattern : r , required : s = ! 1 , validator : i } = { } , o , l ) => {
2024-12-12 10:44:58 +08:00
const [ d , c ] = $ ( [ ] ) ;
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
const m = [ ] ;
if ( s ) {
let h = l ;
switch ( l ) {
case "number" :
case "string" :
case "array" :
break ;
case "bool" :
h = "boolean" ;
break ;
case "json" :
h = "object" ;
}
m . push ( { type : h , required : ! 0 , whitespace : ! 0 , message : "该项必填" } ) ;
}
switch ( n ) {
case "string" :
m . push ( { type : n , max : e , min : t , message : a || ( t && e ? ` 字符必须在 ${ t } ~ ${ e } 之间 ` : ` ${ e ? "最多能有" : "最少要有" } ${ t || e } 个字符 ` ) } ) ;
break ;
case "pattern" :
m . push ( { type : "string" , pattern : r , message : a } ) ;
break ;
case "validator" :
i && m . push ( ( { getFieldValue : h } ) => ( { validator : async ( f , y ) => {
2024-12-12 10:44:58 +08:00
const C = await be . exec ( i , { value : y , fieldName : o } , { getFieldValue : h } ) ;
return g . isString ( C ) && C ? Promise . reject ( C ) : g . isBoolean ( C ) && ! C ? Promise . reject ( a ) : Promise . resolve ( ) ;
2024-12-12 09:55:56 +08:00
} } ) ) ;
}
c ( m ) ;
} , [ e , t , n , a , r , s , i ] ) , d ;
} , ma = ( e , t , n ) => {
2024-12-12 10:44:58 +08:00
const [ a , r ] = $ ( null ) ;
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
const { initDataUri : s = ` /api/ ${ e } ` , initDataMethod : i = "GET" } = n || { } ;
t && F . request ( { method : i , url : g . trimEnd ( ` ${ s } / ${ t } ` , "/" ) } ) . then ( ( o ) => {
r ( o ) ;
} ) ;
} , [ e , t , n ] ) , a ;
} , ha = ( e , t , n , a = { } ) => {
2024-12-12 10:44:58 +08:00
const r = xt ( ) , s = q ( ! 0 ) , i = q ( [ ] ) , [ o , l ] = $ ( n ) , d = X . useWatch ( ( c ) => JSON . stringify ( g . pick ( c , i . current ) ) , t ) || "{}" ;
return R ( ( ) => {
e && be . exec ( e , a , { getFieldValue : g . wrap ( t . getFieldValue , ( c , m ) => ( i . current . some ( ( h ) => g . isEqual ( h , m ) ) || ( i . current . push ( m ) , r ( ) ) , c ( m ) ) ) , isFieldTouched : t . isFieldTouched , isFieldsTouched : t . isFieldsTouched } ) . then ( ( c ) => s . current && l ( c ) ) ;
} , [ e , d , t , a ] ) , R ( ( ) => ( ) => s . current = ! 1 , [ ] ) , o ;
2024-12-12 09:55:56 +08:00
} , ur = ( { value : e , onChange : t } , n = null ) => {
const a = q ( ) , [ r ] = X . useForm ( n ) ;
2024-12-12 10:44:58 +08:00
return St ( ( ) => {
2024-12-12 09:55:56 +08:00
g . isEqual ( a . current , e ) || r . setFieldsValue ( e ) ;
2024-12-12 10:44:58 +08:00
} , [ e ] ) , R ( ( ) => ( ) => r . resetFields ( ) , [ ] ) , [ Z ( ( ) => r . _ _INTERNAL _ _ ? r : { ... r , _ _INTERNAL _ _ : { } } , [ r ] ) , ( s , i ) => {
2024-12-12 09:55:56 +08:00
a . current = i , t ( i ) ;
} ] ;
} , fa = ( { type : e , initialValue : t , initialValueLanguage : n , onChange : a , form : r } ) => {
const s = ha ( n == "javascript" && t , r , n == "javascript" ? void 0 : t , { } ) ;
2024-12-12 10:44:58 +08:00
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
n == "javascript" ? a ( Y ( s , e ) ) : t && a ( Y ( t , e ) ) ;
} , [ e , t , s ] ) , null ;
} , ya = ( { widget : e = "Input" , widgetPrefix : t = "@pkg/ff/grid-layout-forms" , widgetDecorator : n , subWidgets : a , basicForm : r , ... s } ) => {
2024-12-12 10:44:58 +08:00
const i = e != null && e . startsWith ( "@" ) || e != null && e . startsWith ( "blob:" ) ? e : ` ${ t } / ${ e } ` , [ o , l ] = $ ( ) ;
return R ( ( ) => {
i && Q . getWidgetComponent ( i ) . then ( ( { defaultProps : d = { } , default : c } ) => ( { default : un ( c , d , r ) } ) ) . catch ( ( d ) => ( { default : ( ) => ` ${ d } ` } ) ) . then ( ( d ) => l ( b . createElement ( d . default , s ) ) ) ;
} , [ i ] ) , o && b . cloneElement ( o , s ) ;
2024-12-12 09:55:56 +08:00
} , un = ( e , t = { } , n = null ) => ( a ) => {
2024-12-12 15:04:34 +08:00
const { type : r , code : s , label : i , noStyle : o , placeholder : l , extras : d , validators : c , help : m , isVirtual : h , $isReserved : f , initialValue : y , initialValueLanguage : C , convertJs : w , convertJsSetting : x , widgetPerfix : j , boxStyle : z , widgetDecorator : I , subWidgets : A , ... N } = { ... t , ... a } , L = pa ( c || { } , s , r ) , P = { label : i , noStyle : o , colon : ! 1 , layout : "vertical" } , W = { placeholder : l , ... N } , U = ce ( ( B ) => B == null ? void 0 : Y ( B , r ) , [ r ] ) ;
2024-12-12 10:44:58 +08:00
return u ( Jt , { name : s , rules : L , initialValue : U ( y ) , normalize : U , children : ( B , T , ee ) => {
var H ;
2024-12-12 15:04:34 +08:00
return u ( e , { type : r , rcform : ee , itemProps : { validateStatus : T . errors . length > 0 ? "error" : "success" , tooltip : m , help : T . errors . length > 0 ? T . errors . join ( "、" ) : null , required : ( ( H = L == null ? void 0 : L [ 0 ] ) == null ? void 0 : H . required ) || ! 1 , ... P } , fieldProps : { ... W , ... B } , $setting : d || { } } ) ;
2024-12-12 09:55:56 +08:00
} } ) ;
2024-12-12 10:44:58 +08:00
} , $t = ( { cols : e = 24 , rowHeight : t = 16 , itemMargin : n = [ 8 , 16 ] , containerPadding : a = [ 0 , 0 ] , fields : r = [ ] , children : s , basicForm : i = null } ) => {
2024-12-12 09:55:56 +08:00
const o = ln ( r , un , "@pkg/ff/grid-layout-forms" ) ;
2024-12-12 10:44:58 +08:00
return O ( "div" , { className : "ff-grid-layout-form" , style : { "--grid-layout-item-margin-x" : ` ${ ( n == null ? void 0 : n [ 0 ] ) ? ? 8 } px ` , "--grid-layout-item-margin-y" : ` ${ ( n == null ? void 0 : n [ 1 ] ) ? ? 16 } px ` , "--grid-layout-container-padding-y" : ` ${ ( a == null ? void 0 : a [ 0 ] ) || 0 } px ` , "--grid-layout-container-padding-x" : ` ${ ( a == null ? void 0 : a [ 1 ] ) || 0 } px ` , "--grid-layout-cols" : e , "--grid-layout-row-height" : ` ${ t } px ` } , children : [ o , s && b . cloneElement ( s , { cols : e , rowHeight : t , itemMargin : n , containerPadding : a , fields : r } ) ] } ) ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 10:44:58 +08:00
$t . propTypes = { fields : k . array } ;
const wa = ( zt = $t , ( { code : e , layout : t , name : n , primaryKey : a = 0 , style : r = { } , formProps : s = { } , form : i , isPreview : o = ! 1 , className : l , onFinish : d , onValuesChange : c = ( ) => {
2024-12-12 09:55:56 +08:00
} , ... m } ) => {
2024-12-12 15:04:34 +08:00
const { align : h , autoComplete : f , resource : y , items : C , hides : w , rowHeight : x , marginX : j , marginY : z , cols : I , listenChangeFields : A , listenChangeFieldsFunc : N , pk : L , uuid : P } = ga ( e ) , [ W ] = X . useForm ( i ) , U = Z ( ( ) => [ { name : "__PK__" , value : L } , { name : "__PROPS__" , value : s } , { name : "__RESOURCE__" , value : y } , { name : "__LAYOUT_KEY__" , value : e } , { name : "__LAYOUT_UUID__" , value : P } , { name : "__PRIMARY_KEY__" , value : a } ] , [ L , e , P , y , a , s ] ) ;
2024-12-12 10:44:58 +08:00
return O ( X , { className : l , name : n || e , layout : t || h , fields : U , form : W , autoComplete : f , style : { ... r , position : "relative" } , onFinish : d , onValuesChange : ( B , T ) => ( ( { changedValues : ee , allValues : H , listenChangeFields : nt , listenChangeFieldsFunc : De , onValuesChange : at , code : Tt } ) => {
at ( ee , H ) , De && Array . isArray ( nt ) && be . exec ( De , { changedValues : ee , allValues : H } , { getFieldValue : W . getFieldValue , setFieldValue : W . setFieldValue , setFieldsValue : W . setFieldsValue , isFieldTouched : W . isFieldTouched , isFieldsTouched : W . isFieldsTouched } ) ;
2024-12-12 15:04:34 +08:00
} ) ( { changedValues : B , allValues : T , listenChangeFields : A , listenChangeFieldsFunc : N , onValuesChange : c , code : e } ) , children : [ u ( zt , { ... m , form : W , code : e , fields : C , cols : I , rowHeight : x , itemMargin : [ j , z ] } ) , w == null ? void 0 : w . map ( ( B ) => {
2024-12-12 10:44:58 +08:00
var T ;
return u ( Jt , { name : B . code , children : u ( fa , { form : W , name : B . code , type : B . type , initialValue : B . initialValue , initialValueLanguage : ( T = B . extras ) == null ? void 0 : T . initialValueLanguage } ) } , JSON . stringify ( B . code ) ) ;
2024-12-12 09:55:56 +08:00
} ) ] } , e ) ;
} ) ;
var zt ;
const gn = ( { $setting : e , $close : t , extras : n , code : a , primaryKey : r , ... s } ) => {
const [ i ] = X . useForm ( ) , o = ma ( a , r , e ) ;
2024-12-12 10:44:58 +08:00
return R ( ( ) => {
2024-12-12 09:55:56 +08:00
o && i . setFieldsValue ( o ) ;
2024-12-12 15:04:34 +08:00
} , [ o ] ) , u ( _ , { actions : O ( b . Fragment , { children : [ u ( S , { name : "保存" , type : "primary" , widget : ( ) => {
2024-12-12 09:55:56 +08:00
const l = i . getFieldValue ( "__RESOURCE__" ) , { initDataUri : d = ` /api/ ${ a } ` } = e || { } ;
2024-12-12 15:04:34 +08:00
i . validateFields ( ! 0 ) . then ( ( c ) => l ? g . pick ( c , [ l ] ) : c ) . then ( ( c ) => F . post ( r ? ` ${ d } / ${ r } ` : ` ${ d } ` , c ) . msg ( t ) ) . catch ( ( ) => K . error ( "请先完善表单信息" , { duration : 2e3 } ) ) ;
2024-12-12 10:44:58 +08:00
} } ) , u ( S , { name : "取消" , widget : ( ) => t ( ! 1 ) } ) ] } ) , extras : n , children : u ( wa , { form : i , code : a , primaryKey : r , ... s } ) } ) ;
} , ba = ( e , t , n , { isReplaceRouteHistory : a = ! 1 } = { } ) => le . redirect ( n , t , { replace : a } ) , Ca = ( e , t = { } , n , a = { } ) => {
2024-12-12 09:55:56 +08:00
var s ;
const r = ( s = a . router ) == null ? void 0 : s . reduce ( ( i , [ o , l , d ] ) => {
const c = g . get ( t , [ "router" , o ] ) ;
if ( ! c && c !== 0 && l ) throw ` 请传入 ${ d } ` ;
return ` ${ i } / ${ c } ` ;
} , ` /api/ ${ n } ` ) ;
return F . del ( r , t . param ) . msg ( ) ;
2024-12-12 10:44:58 +08:00
} , Bt = ( e , t , n , { status : { loading : a , disabled : r } , setStatus : s } ) => {
2024-12-12 09:55:56 +08:00
const i = { loading : ( o ) => o === void 0 ? a : s ( ( l ) => ( { ... l , loading : o } ) ) , disabled : ( o ) => o === void 0 ? r : s ( ( l ) => ( { ... l , disabled : o } ) ) } ;
2024-12-12 10:44:58 +08:00
return g . isFunction ( n ) ? n . call ( null , { ... t , ... i } ) : g . isString ( n ) && n ? be . exec ( n , t , i ) : null ;
2024-12-12 15:04:34 +08:00
} , Wt = ( e , t , n , a , r ) => g . isString ( n ) && n ? Q . getWidgetComponent ( n ) . then ( ( { default : s } ) => K . modal ( s , { ... t , $setting : a } , r != null && r . title ? { ... r , title : g . template ( r . title ) ( e ) } : r ) ) . catch ( ( s ) => {
K . error ( n , { content : s . toString ( ) } ) ;
} ) : K . modal ( n , { ... t , $setting : a } , r != null && r . title ? { ... r , title : g . template ( r . title ) ( e ) } : r ) , ka = ( e , t , n , a , r ) => K . modal ( gn , { ... t , $setting : a , code : n } , r != null && r . title ? { ... r , title : g . template ( r . title ) ( e ) } : r ) , va = ( e , t , n , a , r ) => K . modal ( kt , { base62params : t , $setting : a , listCode : n } , r != null && r . title ? { ... r , title : g . template ( r . title ) ( e ) } : r ) , xa = ( { widget : e , widgetType : t , widgetData : n , widgetProps : a , widgetSetting : r , widgetContainerProps : s } , { onAfterClick : i , onBeforeClick : o } ) => {
2024-12-12 10:44:58 +08:00
const l = Ee ( we ) , [ d , c ] = $ ( { leading : ! 0 , trailing : ! 1 } ) , m = Z ( ( ) => {
2024-12-12 09:55:56 +08:00
switch ( t ) {
case "redirect" :
2024-12-12 10:44:58 +08:00
return g . partialRight ( ba , e , r ) ;
2024-12-12 09:55:56 +08:00
case "func" :
2024-12-12 10:44:58 +08:00
return g . partialRight ( Bt , ( r == null ? void 0 : r . code ) ? ? e , { status : d , setStatus : c } ) ;
2024-12-12 09:55:56 +08:00
case "fsdpf-component" :
2024-12-12 10:44:58 +08:00
return g . partialRight ( Wt , e , r , s ) ;
2024-12-12 09:55:56 +08:00
case "grid-layout-form" :
return g . partialRight ( ka , e , r , s ) ;
case "data-list" :
return g . partialRight ( va , e , r , s ) ;
case "destroy" :
2024-12-12 10:44:58 +08:00
return g . partialRight ( Ca , e , r , s ) ;
2024-12-12 09:55:56 +08:00
default :
2024-12-12 15:04:34 +08:00
if ( Pt ( e ) || b . isValidElement ( e ) ) return g . partialRight ( Wt , e , r , s ) ;
2024-12-12 10:44:58 +08:00
if ( g . isFunction ( e ) ) return g . partialRight ( Bt , ( r == null ? void 0 : r . code ) || e , { status : d , setStatus : c } ) ;
2024-12-12 09:55:56 +08:00
}
return ( ... h ) => console . error ( "useButton unknown widgetType" , t , ... h ) ;
} , [ e , t ] ) ;
return [ g . debounce ( ( h ) => ( o == null || o ( h ) , Promise . resolve ( Yt ( a , h , { list : l } ) ) . then ( ( f ) => m ( h , { ... n , ... f } ) ) . then ( ( f ) => i == null ? void 0 : i ( f ) ) . catch ( console . error ) ) , 300 , { leading : ! 0 , trailing : ! 1 } ) , d ] ;
} , Ut = /* @__PURE__ */ new Set ( ) , ft = ( e = [ ] , t = 0 ) => {
const n = e [ t ] ;
if ( n . length && ! Ut . has ( n ) ) {
const a = document . createElement ( "script" ) ;
a . setAttribute ( "src" , n ) , a . setAttribute ( "data-namespace" , n ) , e . length > t + 1 && ( a . onload = ( ) => {
ft ( e , t + 1 ) ;
} , a . onerror = ( ) => {
ft ( e , t + 1 ) ;
} ) , Ut . add ( n ) , document . body . appendChild ( a ) ;
}
2024-12-12 10:44:58 +08:00
} , yt = ( { className : e , type : t , style : n = { } , ... a } ) => u ( "span" , { role : "img" , className : V ( "ff-iconfont" , e ) , style : n , ... a , children : u ( "svg" , { style : { width : "1em" , height : "1em" , fill : "currentColor" , overflow : "hidden" } , viewBox : "0 0 1024 1024" , children : u ( "use" , { xlinkHref : ` # ${ t } ` } ) } ) } ) ;
yt . propTypes = { className : k . string , type : k . string . isRequired , style : k . object } , yt . init = ft ;
const Ue = ( e ) => function ( { className : t , children : n , name : a , icon : r , type : s = "default" , iconPosition : i = "start" , noAuthType : o , onAfterClick : l , onBeforeClick : d , data : c , loading : m , disabled : h , tooltip : f , confirm : y , widget : C , widgetType : w , widgetData : x , widgetProps : j , widgetSetting : z , widgetContainerProps : I , ... A } ) {
2024-12-12 15:04:34 +08:00
const N = g . isEmpty ( f ) || ! f . enabled ? { } : f , L = g . isEmpty ( y ) ? { enabled : ! 1 } : Object . assign ( { enabled : ! 0 } , y ) , P = { type : "primary" , className : V ( "ff-button" , t ) , iconPosition : i } ;
s === "danger" ? P . danger = ! 0 : s === "default" && ( P . type = s ) , e === "link" || e === "dashed" ? ( P . type = e , s === "default" && ( P . className = V ( P . className , "ff-default" ) ) ) : e !== "circle" && e !== "round" || ( P . shape = e ) , r && ( P . icon = u ( yt , { type : r } ) ) ;
2024-12-12 10:44:58 +08:00
const [ W , U ] = $ ( ! 1 ) , [ B , { disabled : T , loading : ee } ] = xa ( { widget : C , widgetType : w , widgetData : x , widgetProps : j , widgetSetting : z , widgetContainerProps : I } , { onAfterClick : l , onBeforeClick : d } ) ;
return u ( Fn , { okText : "确定" , cancelText : "取消" , ... L , disabled : T || h , open : W , onOpenChange : ( H ) => {
if ( ! H ) return U ( H ) ;
L . enabled ? U ( H ) : B ( c ) ;
2024-12-12 09:55:56 +08:00
} , onConfirm : ( ) => {
2024-12-12 10:44:58 +08:00
B ( c ) ;
2024-12-12 09:55:56 +08:00
} , onClick : ( H ) => {
H . stopPropagation ( ) ;
2024-12-12 15:04:34 +08:00
} , children : u ( On , { ... N , title : W ? null : N == null ? void 0 : N . title , trigger : [ "hover" , "click" ] , children : u ( lt , { loading : ee || m , disabled : T || h , ... P , ... A , children : n || a } ) } ) } ) ;
} , S = Ue ( "default" ) , Sa = Ue ( "link" ) , $a = Ue ( "circle" ) , Na = Ue ( "round" ) , Pa = Ue ( "dashed" ) , Dt = ( { data : e , widget : t , widgetType : n = "fsdpf-component" , children : a , widgetData : r , widgetProps : s , widgetSetting : i , widgetContainerProps : o } ) => {
2024-12-12 10:44:58 +08:00
const l = Ee ( we ) , [ d , c ] = $ ( ! 1 ) , [ m , h ] = $ ( "hover" ) , [ f , y ] = $ ( { } ) , [ C , w ] = $ ( ) , { placement : x , align : j , arrow : z = { pointAtCenter : ! 0 } , getPopupContainer : I , ... A } = o || { } ;
R ( ( ) => {
2024-12-12 15:04:34 +08:00
n == "grid-layout-form" ? w ( b . createElement ( gn , { ... r , $setting : i , code : t } ) ) : n == "data-list" ? w ( b . createElement ( kt , { base62params : e , $setting : i , listCode : t } ) ) : g . isString ( t ) ? Q . getWidgetComponent ( t ) . then ( ( { default : P } ) => {
w ( b . createElement ( P , { ... r , $setting : i } ) ) ;
} ) . catch ( ( P ) => w ( P . toString ( ) ) ) : Pt ( t ) ? w ( b . createElement ( t , { ... r , $setting : i } ) ) : b . isValidElement ( t ) && w ( b . cloneElement ( t , { ... r , $setting : i } ) ) ;
2024-12-12 10:44:58 +08:00
} , [ t , n , r ] ) , R ( ( ) => {
2024-12-12 09:55:56 +08:00
Promise . resolve ( Yt ( s , e , { list : l } ) ) . then ( y ) ;
} , [ s , e ] ) ;
2024-12-12 15:04:34 +08:00
const N = ( P ) => {
c ( P ) , ! P && h ( "hover" ) ;
} , L = ( P ) => {
2024-12-12 09:55:56 +08:00
c ( ! 0 ) , h ( "click" ) ;
} ;
2024-12-12 15:04:34 +08:00
return u ( Ln , { zIndex : 1080 , placement : x , onPopupClick : L , onClick : L , open : d , align : j , arrow : z , trigger : m , getPopupContainer : I , content : u ( Ta , { ... A , children : C && b . cloneElement ( C , { ... f , $close : ( ) => N ( ! 1 ) } ) } ) , children : a , onOpenChange : N } ) ;
2024-12-12 09:55:56 +08:00
} , Ta = ( { title : e , className : t , children : n , width : a , height : r , ... s } ) => {
2024-12-12 10:44:58 +08:00
const [ i , o ] = $ ( { } ) , l = ce ( ( m , h ) => o ( ( f ) => ( { ... f , [ m ] : h } ) ) , [ ] ) , d = ce ( ( m ) => o ( ( h ) => ( { ... h , [ m ] : void 0 } ) ) , [ ] ) , c = e ? b . createElement ( "div" , { className : "ff-popup-title" } , e ) : i == null ? void 0 : i . title ;
return u ( Be . Provider , { value : { ele : i , mount : l , unmount : d } , children : O ( "div" , { className : V ( "ff-popup ff-popover" , t ) , style : { width : a , height : r } , ... s , children : [ O ( "div" , { className : "ff-popup-header" , children : [ c , i == null ? void 0 : i [ "sub-title" ] ] } ) , n , O ( "div" , { className : "ff-popup-footer" , children : [ i == null ? void 0 : i . extras , i == null ? void 0 : i . actions ] } ) ] } ) } ) ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 15:04:34 +08:00
Dt . propTypes = { widgetType : k . oneOf ( [ "fsdpf-component" , "grid-layout-form" , "data-list" ] ) } , S . propTypes = { type : k . oneOf ( [ "primary" , "default" , "danger" , "" ] ) , name : k . string , icon : k . string , iconPosition : k . oneOf ( [ "start" , "end" ] ) , data : k . any , widget : k . any , widgetType : k . oneOf ( [ "destroy" , "redirect" , "func" , "fsdpf-component" , "grid-layout-form" , "grid-layout" , "data-list" ] ) , widgetData : k . object , widgetProps : k . object , widgetSetting : k . object , widgetContainerProps : k . object , tooltip : k . exact ( { title : k . string . isRequired , placement : k . oneOf ( [ "top" , "left" , "right" , "bottom" , "topLeft" , "topRight" , "bottomLeft" , "bottomRight" , "leftTop" , "leftBottom" , "rightTop" , "rightBottom" ] ) , enabled : k . oneOfType ( [ k . bool , k . number ] ) , getPopupContainer : k . func } ) , confirm : k . exact ( { title : k . string . isRequired , cancelText : k . string , okText : k . string , okType : k . oneOf ( [ "primary" , "default" , "danger" , "" ] ) , placement : k . oneOf ( [ "top" , "left" , "right" , "bottom" , "topLeft" , "topRight" , "bottomLeft" , "bottomRight" , "leftTop" , "leftBottom" , "rightTop" , "rightBottom" ] ) , enabled : k . oneOfType ( [ k . bool , k . number ] ) , getPopupContainer : k . func , arrow : k . oneOfType ( [ k . bool , k . exact ( { pointAtCenter : k . bool } ) ] ) } ) } , S . Link = Sa , S . Link . defaultProps = S . defaultProps , S . Link . propTypes = S . propTypes , S . Circle = $a , S . Circle . defaultProps = S . defaultProps , S . Circle . propTypes = S . propTypes , S . Round = Na , S . Round . defaultProps = S . defaultProps , S . Round . propTypes = S . propTypes , S . Dashed = Pa , S . Dashed . defaultProps = S . defaultProps , S . Dashed . propTypes = S . propTypes , S . Popover = Dt ;
2024-12-12 09:55:56 +08:00
const Ea = ( { fields : e , formProps : t , $close : n } ) => {
const [ a ] = X . useForm ( ) , r = Z ( ( ) => [ { name : "__PROPS__" , value : t } ] , [ t ] ) ;
2024-12-12 15:04:34 +08:00
return u ( _ , { actions : O ( b . Fragment , { children : [ u ( S , { name : "取消" , widget : ( ) => n ( ! 1 ) } ) , u ( S , { name : "确定" , type : "primary" , widget : ( ) => a . validateFields ( ! 0 ) . then ( n ) } ) ] } ) , children : u ( X , { fields : r , form : a , className : "ff-modal-form" , children : e == null ? void 0 : e . map ( ( { code : s , ... i } ) => u ( ya , { code : s , ... i } , s ) ) } ) } ) ;
2024-12-12 10:44:58 +08:00
} , Ra = ( { className : e , $close : t , children : n , title : a , subTitle : r , actions : s , extras : i , zIndex : o , ... l } ) => O ( Dn , { ... l , prefixCls : "ff-drawer" , className : V ( "ff-popup" , e ) , maskMotion : { motionAppear : ! 0 , motionName : "mask-motion" } , motion : ( d ) => ( { motionAppear : ! 0 , motionName : ` panel-motion- ${ d } ` } ) , children : [ O ( "div" , { className : "ff-popup-header" , children : [ u ( "button" , { "aria-label" : "Close" , className : "ff-popup-close" , onClick : l . onClose , children : u ( Ct , { type : "close" } ) } ) , a , r ] } ) , u ( "div" , { className : "ff-popup-body" , children : n } ) , O ( "div" , { className : "ff-popup-footer" , children : [ i , s ] } ) ] } ) , Fa = ( { className : e , $close : t , $event : n , children : a , title : r , subTitle : s , actions : i , extras : o , zIndex : l , placement : d , ... c } ) => {
2024-12-12 09:55:56 +08:00
const m = ( n == null ? void 0 : n . pageX ) === void 0 ? { animation : null , maskAnimation : null , mousePosition : { x : null , y : null } } : { animation : "zoom" , maskAnimation : "fade" , mousePosition : { x : n == null ? void 0 : n . pageX , y : n == null ? void 0 : n . pageY } } ;
2024-12-12 10:44:58 +08:00
return u ( qn , { ... c , ... m , prefixCls : "ff-modal" , modalRender : ( ) => O ( "div" , { className : V ( "ff-modal-content ff-popup" , e ) , children : [ O ( "div" , { className : "ff-popup-header" , children : [ u ( "button" , { "aria-label" : "Close" , className : "ff-popup-close" , onClick : c . onClose , children : u ( Ct , { type : "close" } ) } ) , r , s ] } ) , u ( "div" , { className : "ff-popup-body" , children : a } ) , O ( "div" , { className : "ff-popup-footer" , children : [ o , i ] } ) ] } ) } ) ;
2024-12-12 09:55:56 +08:00
} , pn = ( { placement : e , $close : t , $event : n , children : a , title : r , ... s } ) => {
2024-12-12 10:44:58 +08:00
const [ i , o ] = $ ( { } ) , [ l , d ] = $ ( ! 0 ) , c = ce ( ( y , C ) => o ( ( w ) => ( { ... w , [ y ] : C } ) ) , [ ] ) , m = ce ( ( y ) => o ( ( C ) => ( { ... C , [ y ] : void 0 } ) ) , [ ] ) ;
let h = { ... s , className : i . rootClassName , title : i . title || r && b . createElement ( "div" , { className : V ( "ff-popup-title" ) } , r ) , subTitle : i [ "sub-title" ] , actions : i . actions , extras : i . extras , children : a , $close : t , $event : n , onClose : ( ) => d ( ! 1 ) } ;
2024-12-12 09:55:56 +08:00
const f = ( ) => {
t ( ! 1 ) ;
} ;
2024-12-12 10:44:58 +08:00
return u ( Be . Provider , { value : { ele : i , mount : c , unmount : m } , children : e && e !== "center" ? u ( Ra , { ... h , placement : e , open : l , afterOpenChange : ( y ) => ! y && f ( ) } ) : u ( Fa , { ... h , visible : l , afterClose : f } ) } ) ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 10:44:58 +08:00
pn . propTypes = { placement : k . oneOf ( [ "center" , "left" , "top" , "right" , "bottom" ] ) } ;
2024-12-12 09:55:56 +08:00
const J = ( ) => {
2024-12-12 10:44:58 +08:00
const [ e , t ] = Wn ( { maxCount : 6 , motion : { motionName : "ff-notification-fade" , motionAppear : ! 0 , motionEnter : ! 0 , motionLeave : ! 0 , onLeaveStart : ( s ) => {
2024-12-12 09:55:56 +08:00
const { offsetHeight : i } = s ;
return { height : i } ;
2024-12-12 10:44:58 +08:00
} , onLeaveActive : ( ) => ( { height : 0 , opacity : 0 , margin : 0 } ) } , prefixCls : "ff-notification" } ) , [ , n ] = b . useReducer ( ( s ) => s + 1 , 0 ) ;
R ( ( ) => {
2024-12-12 09:55:56 +08:00
J . $onClick = a , J . $queue . forEach ( ( [ s , i , o ] , l , d ) => {
r ( [ i , o ] , ... s ) , delete d [ l ] ;
} ) ;
} , [ ] ) ;
const a = ( s , i = { } , o = { } ) => new Promise ( ( l , d ) => r ( [ l , d ] , s , i , o ) ) , r = ( [ s , i ] , o , l = { } , d = { } ) => {
const c = J . $index ++ , m = ( h ) => ( ( f , y ) => ( J . $popups . delete ( f ) , n ( ) , y == null ? void 0 : y ( ) ) ) ( c , ( ) => s ( h ) ) ;
2024-12-12 10:44:58 +08:00
if ( o === Gt ) return e . open ( { ... d , key : c , content : b . createElement ( o , { ... l , $close : ( ) => e . close ( c ) } ) } ) ;
J . $popups . set ( c , b . createElement ( pn , { zIndex : c , maskClosable : ! 1 , $event : l == null ? void 0 : l . $event , ... d , key : c , $close : m } , b . isValidElement ( o ) ? b . cloneElement ( o , { ... l , $close : m } ) : o != null && o . name || Lt . isForwardRef ( o ) || ( o == null ? void 0 : o . $$typeof ) === Lt . ForwardRef ? b . createElement ( o , { ... l , $close : m } ) : o ) ) , n ( ) ;
2024-12-12 09:55:56 +08:00
} ;
2024-12-12 10:44:58 +08:00
return O ( b . Fragment , { children : [ Array . from ( J . $popups ) . map ( ( [ s , i ] ) => i ) , t ] } ) ;
2024-12-12 09:55:56 +08:00
} ;
J . $popups = /* @__PURE__ */ new Map ( ) , J . $index = 0 , J . $queue = [ ] , J . $onClick = ( ... e ) => new Promise ( ( t , n ) => {
J . $queue . push ( [ e , t , n ] ) ;
} ) ;
2024-12-12 15:04:34 +08:00
const qt = ( e , t , n = { } ) => J . $onClick ( e , t , n ) , it = ( e , { showProgress : t , duration : n , ... a } = { duration : 1.5 } ) => J . $onClick ( Gt , { content : e , ... a } , { showProgress : t , duration : n } ) , K = { modal : qt , confirm : ( e , t = { } ) => J . $onClick ( Hn , { content : e , ... t } , { placement : "center" } ) , form : ( e , t = { } , n = { } ) => qt ( Ea , { formProps : n , fields : e } , { placement : "center" , ... t } ) . then ( ( a ) => {
2024-12-12 09:55:56 +08:00
if ( a === ! 1 ) throw ! 1 ;
return a ;
} ) , notification : it , success : ( e , t = { duration : 1.5 } ) => it ( e , { ... t , className : "ff-notification-success" , icon : "check" } ) , error : ( e , t = { duration : 1.5 } ) => it ( e , { ... t , className : "ff-notification-error" , icon : "close" } ) } ;
Re . configure ( { showSpinner : ! 1 } ) , Fe . interceptors . request . use ( ( e ) => {
e . headers . Platform = "web" , e . headers . SaaS = window . localStorage . getItem ( "SaaS" ) ;
const t = window . localStorage . getItem ( _e ) ;
return e . headers . Authorization = t ? ` Bearer ${ t } ` : void 0 , Re . inc ( ) , e ;
} , ( e ) => ( Re . done ( ) , Promise . reject ( { code : - 1 , msg : e } ) ) ) , Fe . interceptors . response . use ( ( { data : e , headers : t } ) => ( Re . done ( ) , { ... e , res : t == null ? void 0 : t . res } ) , function ( e ) {
return Re . done ( ) , Promise . reject ( e . message ) ;
2024-12-12 15:04:34 +08:00
} ) , window . addEventListener ( "unhandledrejection" , ct . onUnhandledRejection ) , ct . onMsg = ( e , t ) => K [ [ 0 , 1 ] . includes ( e ) ? "success" : "error" ] ( t ) . then ( ( ) => e === 20300 && le . redirect ( Oe . get ( "Common.WEBSITE_LOGIN_PAGE" ) ) ) ;
2024-12-12 09:55:56 +08:00
const wt = { appUrl : "" , init : ( e , t , n ) => {
wt . appUrl = n , Fe . defaults . baseURL = n , Fe . defaults . timeout = 15e3 , Object . assign ( wt , new ct ( e , t , Fe ) ) ;
} } , F = wt ;
2024-12-12 15:04:34 +08:00
class Nt extends Error {
2024-12-12 09:55:56 +08:00
constructor ( t , n ) {
2024-12-12 15:04:34 +08:00
super ( n ) , Error . captureStackTrace && Error . captureStackTrace ( this , Nt ) , ! n instanceof Le && ( this . name = ` ${ t } Error Runtime ` ) ;
2024-12-12 09:55:56 +08:00
}
}
class Le extends Error {
constructor ( t , ... n ) {
super ( ... n ) , Error . captureStackTrace && Error . captureStackTrace ( this , Le ) , this . name = ` ${ t } Not Found ` ;
}
}
const ot = "mine" , _e = "token" ;
var ye , Te ;
2024-12-12 10:44:58 +08:00
const se = class se {
2024-12-12 09:55:56 +08:00
constructor ( ) {
2024-12-12 10:44:58 +08:00
E ( this , Te , /* @__PURE__ */ new Map ( ) ) ;
v ( this , "setVendor" , ( t , n ) => p ( this , Te ) . set ( t , new Kt ( n , async ( a , r ) => {
2024-12-12 09:55:56 +08:00
var i , o ;
if ( ! ( a != null && a . default ) ) throw "@pkg not found" ;
let s = ( ) => r ;
switch ( "function" ) {
case typeof ( s = ( i = a . default ) == null ? void 0 : i [ ` ./ ${ r } /index.jsx ` ] ) :
case typeof ( s = ( o = a . default ) == null ? void 0 : o [ ` ./ ${ r } /index.js ` ] ) :
return s ( ) ;
}
throw new Le ( r ) ;
} ) ) ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getWidgetComponent" , async ( t ) => {
2024-12-12 09:55:56 +08:00
if ( ! t ) throw "getWidgetComponent widget is required" ;
if ( t != null && t . startsWith ( "blob:" ) || t != null && t . startsWith ( "http:" ) || t != null && t . startsWith ( "https:" ) ) return await import ( t ) ;
const [ , n ] = t == null ? void 0 : t . split ( "@pkg/" ) ;
if ( ! n ) throw new Le ( t ) ;
try {
return p ( this , Te ) . has ( "pkg" ) ? await p ( this , Te ) . get ( "pkg" ) . get ( n ) : await import ( ` ${ F . appUrl } /api/pkg-import/web?name= ${ t } ` ) ;
} catch ( a ) {
2024-12-12 15:04:34 +08:00
throw new Nt ( t , a ) ;
2024-12-12 09:55:56 +08:00
}
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getRoutes" , ( ) => F . get ( "/api/my-router" ) . then ( ( t ) => [ ... t , { uuid : "data-list-setting" , isLayout : ! 0 , uri : "/data-list-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/DataListSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "grid-layout-setting" , isLayout : ! 0 , uri : "/grid-layout-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/GridLayoutSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "grid-layout-form-setting" , isLayout : ! 0 , uri : "/grid-layout-form-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/GridLayoutFormSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "resource-api-setting" , isLayout : ! 0 , uri : "/resource-api-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/ResourceApiSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "charts-setting" , isLayout : ! 0 , uri : "/resource-api-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/ChartsSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "fsm-setting" , isLayout : ! 0 , uri : "/fsm-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/FsmSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "component-setting" , isLayout : ! 0 , uri : "/component-setting/:category/:categoryUuid" , type : "fsdpf-component" , component : "@pkg/ff-design/components/ComponentSetting" , extra : { layout : "@pkg/ff-design/frameworks/DesignTheme" } } , { uuid : "login" , uri : "/login" , name : "登录" , type : "fsdpf-component" , isLogin : ! 1 , component : "@pkg/ff/components/Login" } , { uuid : "not-found" , uri : "*" , name : "Not Found" , type : "fsdpf-component" , isLogin : ! 1 , component : "@pkg/ff/components/NotFound" } ] . map ( ( { uuid : n , ... a } ) => [ n , { uuid : n , ... a } ] ) ) . then ( ( t ) => new Map ( t ) ) ) ;
v ( this , "getMenus" , ( ) => F . get ( "/api/my-menu" ) ) ;
v ( this , "getConfigure" , ( ) => F . get ( "api/init-configure" ) ) ;
v ( this , "getWidgetOperationAuth" , ( ) => F . get ( "/api/init-widget-operation-auth" ) . then ( ( t ) => t . reduce ( ( n , { uuid : a , auth : r } ) => [ ... n , [ a , r ] ] , [ ] ) ) ) ;
v ( this , "getPhoneNumber" , ( t ) => F . get ( ` /api/user-wx-phone-number/ ${ t } ` ) ) ;
v ( this , "getUserToken" , ( ) => {
2024-12-12 09:55:56 +08:00
const t = window . localStorage . getItem ( _e ) ;
if ( ! t ) return "" ;
const n = t . split ( "." ) ;
if ( ! Array . isArray ( n ) || n . length !== 3 ) throw "登录令牌无效!" ;
const { iat : a } = JSON . parse ( window . atob ( n [ 1 ] ) ) ;
if ( Math . floor ( ( /* @__PURE__ */ new Date ( ) ) . getTime ( ) / 1e3 ) - a > 2592e3 ) throw "登录令牌已过期, 请重新登录!" ;
return t ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "checkUserToken" , ( ) => {
2024-12-12 09:55:56 +08:00
try {
return ! ! this . getUserToken ( ) ;
} catch {
return ! 1 ;
}
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "getUserInfo" , ( t = ! 0 ) => {
2024-12-12 09:55:56 +08:00
var n ;
try {
const a = this . getUserToken ( ) ;
if ( ! a ) return Promise . resolve ( null ) ;
const { iat : r } = JSON . parse ( window . atob ( ( n = a == null ? void 0 : a . split ( "." ) ) == null ? void 0 : n [ 1 ] ) ) , { iat : s , ... i } = F . decode ( window . localStorage . getItem ( ot ) || "" , { } ) ;
return s === r ? Promise . resolve ( i ) : F . get ( "/api/mine-info" ) . then ( ( { User : o = null } ) => ( window . localStorage . setItem ( ot , F . encode ( { ... o , iat : r } ) ) , o ) ) ;
} catch ( a ) {
2024-12-12 15:29:22 +08:00
console . error ( a ) , t && K . error ( "请登录" ) . then ( this . logout ) ;
2024-12-12 09:55:56 +08:00
}
return Promise . resolve ( null ) ;
} ) ;
2024-12-12 10:44:58 +08:00
v ( this , "login" , ( t , n , a = { } ) => F . post ( "/api/user-token" , { username : t , passwd : Un . hash ( n ) , platform : "web" , ... a } ) . then ( ( { token : r } ) => ( window . localStorage . setItem ( _e , r ) , r ) ) ) ;
2024-12-12 15:29:22 +08:00
v ( this , "logout" , ( t ) => ( window . localStorage . removeItem ( ot ) , window . localStorage . removeItem ( _e ) , t == null ? void 0 : t ( ) ) ) ;
2024-12-12 10:44:58 +08:00
if ( p ( se , ye ) ) return p ( se , ye ) ;
2024-12-12 09:55:56 +08:00
}
} ;
2024-12-12 10:44:58 +08:00
ye = new WeakMap ( ) , Te = new WeakMap ( ) , E ( se , ye , null ) , v ( se , "getInstance" , ( ) => ( p ( se , ye ) || D ( se , ye , new se ( ) ) , p ( se , ye ) ) ) ;
let bt = se ;
const Q = bt . getInstance ( ) , Oa = b . createContext ( { user : { } , initUser : ( ) => {
} , initUserComplete : ! 1 } ) , La = b . createContext ( { set : ( ) => {
2024-12-12 09:55:56 +08:00
} , get : ( ) => {
} , assign : ( ) => {
} , currentRoute : ( ) => {
2024-12-12 15:04:34 +08:00
} } ) , Pt = ( e ) => ! ! ( e != null && e . name ) && ( e . prototype instanceof b . Component || /^[A-Z]/ . test ( e . name ) ) , Va = ( e , t ) => {
2024-12-12 09:55:56 +08:00
if ( ! e || typeof window > "u" ) return ;
let n = document . querySelector ( ` style[ff-style-token=" ${ t } "] ` ) ;
return n ? ( n . innerHTML = e , e ) : ( n = document . createElement ( "style" ) , n . setAttribute ( "ff-style-token" , t ) , n . setAttribute ( "type" , "text/css" ) , n . innerHTML = e , document . head . appendChild ( n ) , e ) ;
2024-12-12 15:04:34 +08:00
} , Aa = Object . freeze ( Object . defineProperty ( { _ _proto _ _ : null , AppContext : Oa , AppGlobalParamsContext : La , cache : Kt , configure : Oe , default : Q , func : be , http : F , insertStyle : Va , isReactComponent : Pt , route : le } , Symbol . toStringTag , { value : "Module" } ) ) , ja = ( e , t , n = "children" ) => {
2024-12-12 09:55:56 +08:00
if ( g . isEmpty ( e ) ) return { } ;
const a = g . find ( e , [ "value" , t ] ) ;
if ( ! g . isEmpty ( a ) ) return a ;
const r = e . length ;
for ( let s = 0 ; s < r ; s ++ ) {
const { [ n ] : i } = e [ s ] , o = ja ( i , t , n ) ;
if ( ! g . isEmpty ( o ) ) return o ;
}
return { } ;
} ;
export {
2024-12-13 13:17:40 +08:00
Be as $ ,
_n as A ,
Gn as B ,
xt as C ,
2024-12-12 09:55:56 +08:00
Ye as D ,
2024-12-13 13:17:40 +08:00
or as E ,
lr as F ,
2024-12-12 09:55:56 +08:00
sr as G ,
aa as H ,
2024-12-13 13:17:40 +08:00
We as I ,
St as J ,
cr as K ,
dr as L ,
wa as M ,
$t as N ,
ya as O ,
gn as P ,
ga as Q ,
2024-12-12 09:55:56 +08:00
en as R ,
2024-12-13 13:17:40 +08:00
pa as S ,
ma as T ,
ha as U ,
ur as V ,
yt as W ,
S as X ,
Jn as Y ,
xa as Z ,
_ ,
2024-12-12 09:55:56 +08:00
tn as a ,
2024-12-13 13:17:40 +08:00
_t as a0 ,
J as a1 ,
K as a2 ,
Za as a3 ,
er as a4 ,
tr as a5 ,
Q as a6 ,
Pt as a7 ,
Va as a8 ,
F as a9 ,
Kt as aa ,
Oe as ab ,
be as ac ,
le as ad ,
Oa as ae ,
La as af ,
ja as ag ,
2024-12-12 09:55:56 +08:00
sn as b ,
cn as c ,
2024-12-13 13:17:40 +08:00
Xt as d ,
ir as e ,
on as f ,
2024-12-12 09:55:56 +08:00
Yt as g ,
2024-12-13 13:17:40 +08:00
ln as h ,
Zn as i ,
vt as j ,
nn as k ,
an as l ,
rn as m ,
kt as n ,
we as o ,
na as p ,
oa as q ,
2024-12-12 09:55:56 +08:00
st as r ,
2024-12-13 13:17:40 +08:00
Yn as s ,
2024-12-12 09:55:56 +08:00
Y as t ,
nr as u ,
2024-12-13 13:17:40 +08:00
Qn as v ,
Kn as w ,
ar as x ,
rr as y ,
gt as z
2024-12-12 09:55:56 +08:00
} ;