@nocobase/plugin-data-source-manager 1.0.0-alpha.2 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/client/DatabaseConnectionProvider.d.ts +8 -0
  2. package/dist/client/ThridDataSource.d.ts +8 -0
  3. package/dist/client/component/BreadcumbTitle.d.ts +8 -0
  4. package/dist/client/component/CollectionsManager/AddFieldAction.d.ts +8 -0
  5. package/dist/client/component/CollectionsManager/CollectionFields.d.ts +8 -0
  6. package/dist/client/component/CollectionsManager/ConfigurationTable.d.ts +8 -0
  7. package/dist/client/component/CollectionsManager/ConfigurationTabs.d.ts +8 -0
  8. package/dist/client/component/CollectionsManager/EditCollectionAction.d.ts +8 -0
  9. package/dist/client/component/CollectionsManager/EditFieldAction.d.ts +8 -0
  10. package/dist/client/component/CollectionsManager/components/CollectionFieldInterfaceSelect.d.ts +8 -0
  11. package/dist/client/component/CollectionsManager/components/CollectionName.d.ts +8 -0
  12. package/dist/client/component/CollectionsManager/components/FieldTitleInput.d.ts +8 -0
  13. package/dist/client/component/CollectionsManager/components/FieldType.d.ts +8 -0
  14. package/dist/client/component/CollectionsManager/components/TitleField.d.ts +8 -0
  15. package/dist/client/component/CollectionsManager/components/UnSupportFields.d.ts +8 -0
  16. package/dist/client/component/CollectionsManager/components/index.d.ts +8 -0
  17. package/dist/client/component/CollectionsManager/hooks.d.ts +8 -0
  18. package/dist/client/component/CollectionsManager/index.d.ts +8 -0
  19. package/dist/client/component/CollectionsManager/schema/collectionFields.d.ts +8 -0
  20. package/dist/client/component/CollectionsManager/schema/collections.d.ts +8 -0
  21. package/dist/client/component/CreateDatabaseConnectAction.d.ts +8 -0
  22. package/dist/client/component/DatabaseConnectionManager.d.ts +8 -0
  23. package/dist/client/component/EditDatabaseConnectionAction.d.ts +8 -0
  24. package/dist/client/component/MainDataSourceManager/Configuration/AddCategoryAction.d.ts +8 -0
  25. package/dist/client/component/MainDataSourceManager/Configuration/CollectionFields.d.ts +8 -0
  26. package/dist/client/component/MainDataSourceManager/Configuration/ConfigurationTable.d.ts +8 -0
  27. package/dist/client/component/MainDataSourceManager/Configuration/ConfigurationTabs.d.ts +8 -0
  28. package/dist/client/component/MainDataSourceManager/Configuration/EditCategoryAction.d.ts +8 -0
  29. package/dist/client/component/MainDataSourceManager/Configuration/index.d.ts +8 -0
  30. package/dist/client/component/MainDataSourceManager/Configuration/interfaces.d.ts +8 -0
  31. package/dist/client/component/MainDataSourceManager/Configuration/schemas/collectionFields.d.ts +8 -0
  32. package/dist/client/component/MainDataSourceManager/Configuration/schemas/collections.d.ts +8 -0
  33. package/dist/client/component/MainDataSourceManager/index.d.ts +8 -0
  34. package/dist/client/component/PermissionManager/DataSourceTable.d.ts +8 -0
  35. package/dist/client/component/PermissionManager/PermisionProvider.d.ts +8 -0
  36. package/dist/client/component/PermissionManager/RoleConfigure.d.ts +8 -0
  37. package/dist/client/component/PermissionManager/RolesResourcesActions.d.ts +8 -0
  38. package/dist/client/component/PermissionManager/ScopeSelect.d.ts +8 -0
  39. package/dist/client/component/PermissionManager/StrategyActions.d.ts +8 -0
  40. package/dist/client/component/PermissionManager/index.d.ts +8 -0
  41. package/dist/client/component/PermissionManager/schemas/dataSourceTable.d.ts +8 -0
  42. package/dist/client/component/PermissionManager/schemas/roleCollections.d.ts +8 -0
  43. package/dist/client/component/PermissionManager/schemas/scopes.d.ts +8 -0
  44. package/dist/client/component/PermissionManager/schemas/useRoleResourceValues.d.ts +8 -0
  45. package/dist/client/component/PermissionManager/schemas/useSaveRoleResourceAction.d.ts +8 -0
  46. package/dist/client/component/PermissionManager/style.d.ts +8 -0
  47. package/dist/client/component/ViewDatabaseConnectionAction.d.ts +8 -0
  48. package/dist/client/constant.d.ts +8 -0
  49. package/dist/client/hooks/index.d.ts +8 -0
  50. package/dist/client/index.d.ts +8 -0
  51. package/dist/client/index.js +9 -0
  52. package/dist/client/locale/index.d.ts +8 -0
  53. package/dist/client/schema/index.d.ts +8 -0
  54. package/dist/externalVersion.js +15 -6
  55. package/dist/index.d.ts +8 -0
  56. package/dist/index.js +9 -0
  57. package/dist/server/collections/data-sources-collections.d.ts +8 -0
  58. package/dist/server/collections/data-sources-collections.js +9 -0
  59. package/dist/server/collections/data-sources-fields.d.ts +8 -0
  60. package/dist/server/collections/data-sources-fields.js +9 -0
  61. package/dist/server/collections/data-sources-roles-resources-actions.d.ts +8 -0
  62. package/dist/server/collections/data-sources-roles-resources-actions.js +9 -0
  63. package/dist/server/collections/data-sources-roles-resources-scopes.d.ts +8 -0
  64. package/dist/server/collections/data-sources-roles-resources-scopes.js +9 -0
  65. package/dist/server/collections/data-sources-roles-resources.d.ts +8 -0
  66. package/dist/server/collections/data-sources-roles-resources.js +9 -0
  67. package/dist/server/collections/data-sources-roles.d.ts +8 -0
  68. package/dist/server/collections/data-sources-roles.js +9 -0
  69. package/dist/server/collections/data-sources.d.ts +8 -0
  70. package/dist/server/collections/data-sources.js +9 -0
  71. package/dist/server/errors/type-infer-error.d.ts +8 -0
  72. package/dist/server/errors/type-infer-error.js +9 -0
  73. package/dist/server/index.d.ts +8 -0
  74. package/dist/server/index.js +9 -0
  75. package/dist/server/migrations/20240301164024-migrate-acl-resources.d.ts +8 -0
  76. package/dist/server/migrations/20240301164024-migrate-acl-resources.js +9 -0
  77. package/dist/server/migrations/20240414103927-update-snippet-name.d.ts +8 -0
  78. package/dist/server/migrations/20240414103927-update-snippet-name.js +9 -0
  79. package/dist/server/models/connections-roles-resources-action.d.ts +8 -0
  80. package/dist/server/models/connections-roles-resources-action.js +9 -0
  81. package/dist/server/models/connections-roles-resources.d.ts +8 -0
  82. package/dist/server/models/connections-roles-resources.js +9 -0
  83. package/dist/server/models/data-source.d.ts +8 -0
  84. package/dist/server/models/data-source.js +9 -0
  85. package/dist/server/models/data-sources-collection-model.d.ts +8 -0
  86. package/dist/server/models/data-sources-collection-model.js +9 -0
  87. package/dist/server/models/data-sources-field-model.d.ts +8 -0
  88. package/dist/server/models/data-sources-field-model.js +9 -0
  89. package/dist/server/models/data-sources-roles-model.d.ts +8 -0
  90. package/dist/server/models/data-sources-roles-model.js +9 -0
  91. package/dist/server/plugin.d.ts +8 -0
  92. package/dist/server/plugin.js +9 -0
  93. package/dist/server/resourcers/data-sources-collections-fields.d.ts +8 -0
  94. package/dist/server/resourcers/data-sources-collections-fields.js +9 -0
  95. package/dist/server/resourcers/data-sources-collections.d.ts +8 -0
  96. package/dist/server/resourcers/data-sources-collections.js +9 -0
  97. package/dist/server/resourcers/data-sources-resources.d.ts +8 -0
  98. package/dist/server/resourcers/data-sources-resources.js +9 -0
  99. package/dist/server/resourcers/data-sources-roles.d.ts +8 -0
  100. package/dist/server/resourcers/data-sources-roles.js +9 -0
  101. package/dist/server/resourcers/roles-data-sources-collections.d.ts +8 -0
  102. package/dist/server/resourcers/roles-data-sources-collections.js +9 -0
  103. package/dist/server/services/full-data-repository.d.ts +8 -0
  104. package/dist/server/services/full-data-repository.js +9 -0
  105. package/dist/server/services/type-interface-map.d.ts +8 -0
  106. package/dist/server/services/type-interface-map.js +9 -0
  107. package/dist/server/utils.d.ts +8 -0
  108. package/dist/server/utils.js +9 -0
  109. package/package.json +2 -2
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  (function(O,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react"),require("@formily/react"),require("antd"),require("react-i18next"),require("@ant-design/icons"),require("react-router-dom"),require("@formily/shared"),require("@formily/reactive"),require("@formily/core"),require("@formily/antd-v5"),require("lodash"),require("@dnd-kit/core"),require("@emotion/css"),require("antd-style")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react","@formily/react","antd","react-i18next","@ant-design/icons","react-router-dom","@formily/shared","@formily/reactive","@formily/core","@formily/antd-v5","lodash","@dnd-kit/core","@emotion/css","antd-style"],a):(O=typeof globalThis!="undefined"?globalThis:O||self,a(O["@nocobase/plugin-data-source-manager"]={},O.jsxRuntime,O["@nocobase/client"],O.react,O["@formily/react"],O.antd,O["react-i18next"],O["@ant-design/icons"],O["react-router-dom"],O["@formily/shared"],O["@formily/reactive"],O["@formily/core"],O["@formily/antd-v5"],O.lodash,O["@dnd-kit/core"],O["@emotion/css"],O["antd-style"]))})(this,function(O,a,r,d,_,S,K,Q,G,N,pt,ye,ae,Y,W,fe,Jo){"use strict";var qf=Object.defineProperty,Gf=Object.defineProperties;var Uf=Object.getOwnPropertyDescriptors;var Ke=Object.getOwnPropertySymbols;var Wo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;var lt=(O,a,r)=>a in O?qf(O,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):O[a]=r,F=(O,a)=>{for(var r in a||(a={}))Wo.call(a,r)&&lt(O,r,a[r]);if(Ke)for(var r of Ke(a))Qo.call(a,r)&&lt(O,r,a[r]);return O},j=(O,a)=>Gf(O,Uf(a));var ut=(O,a)=>{var r={};for(var d in O)Wo.call(O,d)&&a.indexOf(d)<0&&(r[d]=O[d]);if(O!=null&&Ke)for(var d of Ke(O))a.indexOf(d)<0&&Qo.call(O,d)&&(r[d]=O[d]);return r};var Yo=(O,a,r)=>(lt(O,typeof a!="symbol"?a+"":a,r),r);var P=(O,a,r)=>new Promise((d,_)=>{var S=G=>{try{Q(r.next(G))}catch(N){_(N)}},K=G=>{try{Q(r.throw(G))}catch(N){_(N)}},Q=G=>G.done?d(G.value):Promise.resolve(G.value).then(S,K);Q((r=r.apply(O,a)).next())});const E="data-source-manager";function Zo(e,t={}){return r.i18n.t(e,j(F({},t),{ns:E}))}const Xo=e=>{const t=_.useForm(),o=r.useActionContext(),n=r.useAPIClient(),{t:s}=K.useTranslation(),i=_.useField();return i.data=i.data||{},{run(){return P(this,null,function*(){yield t.submit();try{i.data.loading=!0;const{data:l}=yield n.resource("databaseServers").create({values:F({},t.values)});i.data.loading=!1,o.setVisible(!1),yield t.reset(),e==null||e(l==null?void 0:l.data),S.message.success(s("Saved successfully"))}catch(l){i.data.loading=!1,console.log(l)}})}}},dt=()=>{const e=_.useForm(),t=r.useAPIClient(),{t:o}=K.useTranslation(),n=_.useField();return n.data=n.data||{},{run(){return P(this,null,function*(){yield e.submit();try{n.data.loading=!0,yield t.resource("dataSources").testConnection({values:F({},e.values)}),n.data.loading=!1,S.message.success(o("Connection successful",{ns:E}))}catch(i){n.data.loading=!1,console.log(i)}})}}},Ro=Object.freeze(Object.defineProperty({__proto__:null,useCreateDatabaseServer:Xo,useTestConnectionAction:dt},Symbol.toStringTag,{value:"Module"})),Ae=d.createContext(null);Ae.displayName="DataSourceContext";const en=e=>{const[t,o]=d.useState(null);return a.jsx(Ae.Provider,{value:{dataSource:t,setDataSource:o},children:a.jsx(r.SchemaComponentOptions,{scope:Ro,components:{},children:e.children})})};class mt extends r.DataSource{getDataSource(){return P(this,null,function*(){return(yield this.app.apiClient.request({url:`dataSources:get/${this.key}`,params:{appends:["collections"]}})).data.data})}}const yt=[{value:"loading",label:`{{t("Loading",{ns:"${E}"})}}`,color:"orange"},{value:"loading-failed",label:`{{t("Failed",{ns:"${E}"})}}`,color:"red"},{value:"loaded",label:`{{t("Loaded",{ns:"${E}"})}}`,color:"green"},{value:"reloading",label:`{{t("Reloading",{ns:"${E}"})}}`,color:"orange"}],ft={name:"collections-"+N.uid(),fields:[{type:"string",name:"key",interface:"input",uiSchema:{title:`{{t("Data source name",{ ns: "${E}" })}}`,type:"string","x-component":"Input",required:!0}},{type:"string",name:"displayName",interface:"input",uiSchema:{title:`{{t("Data source display name",{ ns: "${E}" })}}`,type:"string","x-component":"Input",required:!0}},{type:"string",name:"type",interface:"select",uiSchema:{title:`{{t("Type", { ns: "${E}" })}}`,type:"string","x-component":"Select",enum:"{{types}}"}},{type:"string",name:"status",interface:"select",uiSchema:{title:`{{t("Status", { ns: "${E}" })}}`,type:"string","x-component":"Select",enum:yt}},{type:"boolean",name:"enabled",uiSchema:{type:"boolean",title:'{{t("Enabled")}}',"x-component":"Checkbox"}}]},tn={type:"object",properties:{[N.uid()]:{type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:ft,resourceName:"dataSources",request:{resource:"dataSources",action:"list",params:{pageSize:50,appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:ft},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ cm.useBulkDestroyAction }}",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},actionCallback:"{{ dataSourceDeleteCallback }}"}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"CreateDatabaseConnectAction","x-component-props":{type:"primary"}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"key",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{key:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{key:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},displayName:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{displayName:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},type:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{type:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},status:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{status:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},enabled:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{enabled:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{},properties:{view:{type:"void",title:'{{t("View")}}',"x-component":"ViewDatabaseConnectionAction","x-component-props":{type:"primary"}},update:{type:"void",title:'{{t("Edit")}}',"x-component":"EditDatabaseConnectionAction","x-component-props":{type:"primary"},"x-reactions":["{{useIsAbleDelete($self)}}"]},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:'{{t("Delete")}}',content:'{{t("Are you sure you want to delete it?")}}'},useAction:"{{useDestroyAction}}"},"x-reactions":["{{useIsAbleDelete($self)}}"]}}}}}}}}}}},gt=()=>{const e=r.useApp(),{name:t}=G.useParams(),o=r.useCompile(),n=r.useDataSourceManager(),{displayName:s}=n.getDataSource(t)||{},{dataSource:i}=d.useContext(Ae),c=d.useMemo(()=>i||n.getDataSource(t),[i,t]),l=d.useMemo(()=>{const p=c==null?void 0:c.status,u=yt.find(h=>h.value===p),m=[{title:a.jsx(G.Link,{to:e.pluginSettingsManager.getRoutePath(E),children:Zo("Data source manager")})}];return c&&m.push({title:a.jsxs(S.Space,{children:[a.jsx("span",{children:o(s)}),p&&a.jsx(S.Tag,{color:u==null?void 0:u.color,children:o(u==null?void 0:u.label)},p)]})}),m},[c]);return a.jsx(S.Breadcrumb,{separator:a.jsx(Q.RightOutlined,{}),items:l})},ht=e=>_.Schema.compile(e,{t:r.i18n.t}),on={name:"database-"+N.uid(),filterTargetKey:"name",targetKey:"name",sortable:!0,fields:[{type:"integer",name:"title",interface:"input",uiSchema:{title:'{{ t("Collection display name") }}',type:"number","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Collection name") }}',type:"string","x-component":"CollectionName",description:'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}'}},{type:"hasMany",name:"fields",target:"fields",collectionName:"collections",sourceKey:"name",targetKey:"name",uiSchema:{}},{type:"hasMany",name:"inherits",interface:"select",uiSchema:{title:'{{ t("Inherits") }}',type:"string","x-component":"Select","x-component-props":{mode:"multiple"}}},{type:"string",name:"description",interface:"input",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input"}}]},nn=e=>({type:"object",properties:{[N.uid()]:{type:"void","x-collection":"dataSources","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:on,dragSort:!1,request:{url:`dataSources/${e}/collections:list`,params:{pageSize:50,sort:"sort",filter:{"hidden.$isFalsy":!0},appends:["category"]}}},properties:{tabs:{type:"void","x-component":"ConfigurationTabs"}}}}}),Ne={type:"object",properties:{[N.uid()]:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{title:{$includes:""}},{name:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":"cm.useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"DeleteCollection","x-component-props":{role:"button",isBulk:!0},"x-visible":!1},create:{type:"void",title:'{{ t("Create collection") }}',"x-component":"AddCollection","x-component-props":{type:"primary"},"x-visible":!1}}},[N.uid()]:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"},useDataSource:"{{cm.useDataSourceFromRAC }}",useAction(){const e=r.useAPIClient(),{t}=K.useTranslation();return{move(n,s){return P(this,null,function*(){yield e.resource("dataSources").move({sourceId:n.key,targetId:s.key}),S.message.success(t("Saved successfully"),.2)})}}}},properties:{column1:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{title:{"x-component":"CollectionField","x-read-pretty":!0}}},column2:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},column5:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{description:{"x-component":"CollectionField","x-read-pretty":!0,"x-component-props":{ellipsis:!0}}}},column6:{type:"void",title:'{{ t("Actions") }}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{view:{type:"void",title:'{{ t("Configure fields") }}',"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{destroyOnClose:!0,width:"70%"},"x-reactions":e=>{const t=e.path.segments[1],o=e.path.segments[0],n=e.form.getValuesIn(`${o}.${t}`);n&&(e.title=`${ht(n.title||n.name)} - ${ht('{{ t("Configure fields") }}')}`)},properties:{collectionFields:{type:"void","x-component":"CollectionFields"}}}}},update:{type:"void",title:'{{ t("Edit") }}',"x-component":"EditCollection","x-component-props":{role:"button","aria-label":'{{ "edit-button-" + $record.name }}',type:"primary"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-visible":!1,"x-component":"DeleteCollection","x-component-props":{role:"button","aria-label":'{{ "delete-button-" + $record.name }}',type:"primary",className:"nb-action-link"}}}}}}}}}},rn={name:"fields",fields:[{type:"string",name:"type",interface:"input",uiSchema:{title:'{{ t("Storage type") }}',type:"string","x-component":"Select",enum:[{label:"String",value:"string"}],required:!0}},{type:"string",name:"interface",interface:"input",uiSchema:{title:`{{t("Field interface", { ns: "${E}" })}}`,type:"string","x-component":"Select",enum:"{{interfaces}}"}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{ t("Field display name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Field name") }}',type:"string","x-component":"Input"}},{type:"string",name:"description",interface:"input",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input.TextArea"}}]},an={type:"object",properties:{[N.uid()]:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-visible":!1,"x-component-props":{useAction:"{{ useBulkDestroyActionAndRefreshCM }}",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},syncfromDatabase:{type:"void",title:'{{ t("Sync from database") }}',"x-component":"SyncFieldsAction","x-component-props":{type:"primary"}},syncSQL:{type:"void",title:'{{ t("Sync from database") }}',"x-component":"SyncSQLFieldsAction","x-component-props":{type:"primary"}},create:{type:"void",title:'{{ t("Add new") }}',"x-component":"AddCollectionField","x-component-props":{type:"primary"}}}},[N.uid()]:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{pagination:!1,rowKey:"name",rowSelection:{type:"checkbox"},dragSort:!1,useDataSource:"{{ useDataSource }}"},properties:{column1:{type:"void",title:'{{ t("Field display name") }}',"x-component":"Table.Column",properties:{"uiSchema.title":{type:"string","x-component":"FieldTitleInput","x-component-props":{handleFieldChange:"{{enqueueChange}}"}}}},column2:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{"x-component":"CollectionField","x-read-pretty":!0}}},column3:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",title:'{{t("Field type")}}',properties:{type:{"x-component":"FieldType","x-component-props":{handleFieldChange:"{{enqueueChange}}"}}}},column4:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",title:`{{t("Field interface", { ns: "${E}" })}}`,properties:{interface:{"x-component":"CollectionFieldInterfaceSelect","x-component-props":{handleFieldChange:"{{enqueueChange}}"}}}},column5:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",title:'{{t("Title field")}}',properties:{titleField:{"x-component":"TitleField","x-use-component-props":"useTitleFieldProps","x-read-pretty":!1}}},column6:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",title:'{{ t("Description") }}',properties:{description:{"x-component":"CollectionField","x-read-pretty":!0,"x-component-props":{ellipsis:!0,style:{width:100}}}}},column7:{type:"void",title:'{{ t("Actions") }}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{ t("Edit") }}',"x-component":"EditCollectionField","x-component-props":{role:"button","aria-label":'{{ "edit-button-" + $record.name }}',type:"primary"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-disabled":"{{cm.useDeleteButtonDisabled()}}","x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{ useDestroyActionAndRefreshCM }}"},"x-reactions":[{dependencies:[".interface"],fulfill:{state:{visible:"{{ ['obo','oho','m2m','o2m','m2o'].includes($deps[0]) }}"}}}]}}}}}}}}},sn=r.withDynamicSchemaProps(e=>{const{t}=K.useTranslation(),{isTitleField:o}=r.useCollectionManager_deprecated(),[n,s]=d.useState(null),{setTitleField:i,filterByTk:c,dataSourceKey:l}=r.useProps(e),p=r.useRecord(),u=r.useAPIClient(),{refreshRM:m,titleField:h}=it(),C=D=>P(this,null,function*(){s(p),yield u.request({url:`dataSources/${l}/collections:update?filterByTk=${c}`,method:"post",data:{titleField:D?p.name:"id"}}),S.message.success(t("Saved successfully")),m(),i(D?p.name:"id"),s(null)});return o(p)?a.jsx(S.Tooltip,{title:t("Default title for each record"),placement:"right",overlayInnerStyle:{textAlign:"center"},children:a.jsx(S.Switch,{"aria-label":`switch-title-field-${p==null?void 0:p.name}`,size:"small",loading:(p==null?void 0:p.name)===(n==null?void 0:n.name),checked:(p==null?void 0:p.name)===(h||"id"),onChange:C})}):null},{displayName:"TitleField"}),Ct=(e,t)=>{const o=[];return e.forEach(n=>{const s=n.children.filter(i=>{var c;return(c=i==null?void 0:i.availableTypes)==null?void 0:c.includes(t)});o.push({label:n.label,key:n.key,children:s})}),o.filter(n=>t==="sort"?n.key==="advanced":n.children.length>0)},cn=(e,t)=>t==null?void 0:t.some(o=>{var n,s;return(s=(n=o.children)==null?void 0:n.some)==null?void 0:s.call(n,i=>i.name===e)}),ln=_.observer(e=>{var D;const{value:t,handleFieldChange:o}=e,{data:n}=r.useCollectionRecord(),{getInterface:s}=r.useCollectionManager_deprecated(),i=r.useCompile(),c=r.useFieldInterfaceOptions(),l=Ct(c,n.type),[p,u]=d.useState(t),[m,h]=d.useState(l),C=n.type;return d.useEffect(()=>{var $,v,b,f,y,g,x,I,k,M,B,V;if(m.length===1&&((v=($=m[0])==null?void 0:$.children)==null?void 0:v.length)===1){const A=(y=(f=(b=m[0])==null?void 0:b.children)==null?void 0:f[0])==null?void 0:y.name;if(A!==p){const T=s(A);o({interface:A,uiSchema:F({title:(g=n==null?void 0:n.uiSchema)==null?void 0:g.title},(x=T==null?void 0:T.default)==null?void 0:x.uiSchema)},n.name,!1),u(A)}}else if(p&&!cn(p,m)){const A=(M=(k=(I=m[0])==null?void 0:I.children)==null?void 0:k[0])==null?void 0:M.name,T=s(A);o({interface:A,uiSchema:F({title:(B=n==null?void 0:n.uiSchema)==null?void 0:B.title},(V=T==null?void 0:T.default)==null?void 0:V.uiSchema)},n.name,!1),u(A)}},[m]),d.useEffect(()=>{if(n!=null&&n.possibleTypes){const $=Ct(c,C);h($)}},[C]),["oho","obo","o2m","m2o","m2m"].includes(n.interface)?a.jsx(S.Tag,{children:i((D=c.find($=>$.key==="relation").children.find($=>$.name===t))==null?void 0:D.label)},t):a.jsx(S.Select,{"aria-label":`field-interface-${n==null?void 0:n.type}`,role:"button",value:p,style:{width:"100%"},popupMatchSelectWidth:!1,onChange:$=>{var b,f;const v=s($);o({interface:$,uiSchema:F({title:(b=n==null?void 0:n.uiSchema)==null?void 0:b.title},(f=v==null?void 0:v.default)==null?void 0:f.uiSchema)},n.name),u($)},children:m.map($=>a.jsx(S.Select.OptGroup,{label:i($.label),children:$.children.map(v=>a.jsx(S.Select.Option,{value:v.name,children:i(v.label)},v.name))},$.key))})},{displayName:"CollectionFieldInterfaceSelect"}),$e=["string","bigInt","integer","uuid","uid"],un=_.observer(e=>{var u,m;const{name:t}=G.useParams(),{collectionName:o,sourceKey:n,name:s}=r.useRecord(),i=_.useField(),c=r.useCompile(),{getCollection:l}=r.useCollectionManager_deprecated(),p=(u=l(o||s,t).fields)==null?void 0:u.filter(h=>h.primaryKey||h.unique).map(h=>{var C;return{value:h.name,label:c(((C=h.uiSchema)==null?void 0:C.title)||h.title||h.name)}});return d.useEffect(()=>{var h;i.initialValue=((h=p==null?void 0:p[0])==null?void 0:h.value)||n},[]),a.jsx("div",{children:a.jsx(S.Select,{disabled:n,options:p,defaultValue:((m=p==null?void 0:p[0])==null?void 0:m.value)||n,onChange:e==null?void 0:e.onChange,showSearch:!0})})},{displayName:"SourceKey"}),vt=_.observer(e=>{const{disabled:t}=e,o=r.useAPIClient(),[n,s]=d.useState([]),{name:i}=G.useParams(),c=r.useRecord(),l=_.useField(),{collectionName:p,target:u,type:m,through:h,name:C}=c,D=c[l.props.name],{getCollection:$}=r.useCollectionManager_deprecated(),v=r.useCompile(),b=_.useForm(),[f,y]=d.useState(D);return d.useEffect(()=>{var I;l.initialValue=null;const g=["belongsTo"].includes(m)?p:["belongsToMany"].includes(m)?h:u,x=(I=$(g,i))==null?void 0:I.fields;if(x){const k=x==null?void 0:x.filter(M=>$e.includes(M.type)).map(M=>{var B;return{value:M.name,label:v(((B=M.uiSchema)==null?void 0:B.title)||M.title||M.name)}});if(s(k),D){const M=k.find(B=>B.value===D);y((M==null?void 0:M.label)||D)}}},[m]),d.useEffect(()=>{y(D)},[D]),a.jsx("div",{children:a.jsx(S.Select,{disabled:t,value:f,options:n,showSearch:!0,onDropdownVisibleChange:g=>P(this,null,function*(){var B;const{target:x,type:I,through:k}=b.values,M=["belongsTo"].includes(I)?p||C:["belongsToMany"].includes(I)?k:x;if(M&&g){const{data:V}=yield o.request({url:`dataSourcesCollections/${i}.${M}/fields:list`,params:{paginate:!1,filter:{$or:[{"interface.$not":null},{"options.source.$notEmpty":!0}]},sort:["sort"]}});s((B=V.data)==null?void 0:B.filter(A=>$e.includes(A.type)).map(A=>{var T;return{value:A.name,label:v(((T=A.uiSchema)==null?void 0:T.title)||A.title||A.name)}}))}}),onChange:g=>{var x;(x=e==null?void 0:e.onChange)==null||x.call(e,g),y(g)}})})},{displayName:"ForeignKey"}),pn=_.observer(e=>{const{value:t,disabled:o}=e,{targetKey:n,target:s,type:i}=r.useRecord(),{name:c}=G.useParams(),{getCollection:l}=r.useCollectionManager_deprecated(),p=r.useAPIClient(),[u,m]=d.useState([]),[h,C]=d.useState(t||n),D=_.useForm(),$=r.useCompile(),v=_.useField();return v.required=!0,d.useEffect(()=>{var b;s&&m((b=l(s,c).fields)==null?void 0:b.filter(f=>i!=="hasMany"?f.primaryKey||f.unique:$e.includes(f.type)).map(f=>{var y;return{value:f.name,label:$(((y=f==null?void 0:f.uiSchema)==null?void 0:y.title)||f.title||f.name)}}))},[]),a.jsx("div",{children:a.jsx(S.Select,{showSearch:!0,options:u,onDropdownVisibleChange:b=>P(this,null,function*(){var g;const{target:f,type:y}=D.values;if(f&&b){const{data:x}=yield p.request({url:`dataSourcesCollections/${c}.${f}/fields:list`,params:{paginate:!1,filter:{$or:[{"interface.$not":null},{"options.source.$notEmpty":!0}]},sort:["sort"]}});m((g=x.data)==null?void 0:g.filter(I=>y!=="hasMany"?I.primaryKey||I.unique:$e.includes(I.type)).map(I=>{var k;return{value:I.name,label:$(((k=I.uiSchema)==null?void 0:k.title)||I.title||I.name)}}))}}),onChange:b=>{var f;(f=e==null?void 0:e.onChange)==null||f.call(e,b),C(b)},value:h,disabled:o})})},{displayName:"TargetKey"}),dn=_.observer(()=>{const e=r.useCompile(),{targetCollection:t}=it();return a.jsx("div",{children:a.jsx(S.Select,{disabled:!0,showSearch:!0,popupMatchSelectWidth:!1,value:t.name,options:[{value:t.name,label:e(t.title||t.name)}]})})},{displayName:"SourceCollection"}),mn=_.observer(e=>{const{disabled:t}=e,o=r.useCompile(),[n,s]=d.useState([]),{name:i}=G.useParams(),c=_.useField(),{getCollections:l}=r.useCollectionManager_deprecated(i),u=r.useRecord()[c.props.name],m=()=>l().filter(C=>!(C.autoCreate&&C.isThrough)).map(C=>({label:o(C.title||C.name),value:C.name}));return d.useEffect(()=>{const h=m();s(h)},[]),a.jsx("div",{children:a.jsx(S.Select,{disabled:t,showSearch:!0,popupMatchSelectWidth:!1,fieldNames:{label:"label",value:"value"},defaultValue:u,options:n,onChange:h=>{var C;(C=e==null?void 0:e.onChange)==null||C.call(e,h)}})})},{displayName:"ThroughCollection"}),yn=(e,t,o)=>{var i;if(!e)return;const n=Y.cloneDeep(e.properties);n!=null&&n.foreignKey&&(n.foreignKey["x-component"]=vt),e.hasDefaultValue===!0&&(n.defaultValue=Y.cloneDeep((i=e==null?void 0:e.default)==null?void 0:i.uiSchema),n.defaultValue.required=!1,n.defaultValue.title=o('{{ t("Default value") }}'),n.defaultValue["x-decorator"]="FormItem",n.defaultValue["x-reactions"]={dependencies:["uiSchema.x-component-props.gmt","uiSchema.x-component-props.showTime","uiSchema.x-component-props.dateFormat","uiSchema.x-component-props.timeFormat"],fulfill:{state:{componentProps:{gmt:"{{$deps[0]}}",showTime:"{{$deps[1]}}",dateFormat:"{{$deps[2]}}",timeFormat:"{{$deps[3]}}"}}}});const s=j(F({name:`f_${N.uid()}`},Y.cloneDeep(e.default)),{interface:e.name});return s.reverseField&&(s.reverseField.name=`f_${N.uid()}`),{type:"object",properties:{[N.uid()]:{type:"void","x-component":"Action.Drawer","x-component-props":{getContainer:"{{ getContainer }}"},"x-decorator":"Form","x-decorator-props":{useValues(c){return r.useRequest(()=>Promise.resolve({data:s}),c)}},title:`${o(t.title||t.name)} - ${o('{{ t("Add field") }}')}`,properties:j(F({summary:{type:"void","x-component":"FieldSummary","x-component-props":{schemaKey:e.name}}},n),{description:{type:"string",title:'{{t("Description")}}',"x-decorator":"FormItem","x-component":"Input.TextArea"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{action1:{title:'{{ t("Cancel") }}',"x-component":"Action","x-component-props":{useAction:"{{ useCancelAction }}"}},action2:{title:'{{ t("Submit") }}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useCreateCollectionField }}"}}}}})}}}},fn=()=>{const e=_.useForm(),t=r.useActionContext(),{refresh:o}=r.useResourceActionContext(),n=_.useField(),s=r.useAPIClient(),i=r.useRecord(),{name:c}=G.useParams(),l=r.useDataSourceManager();return{run(){return P(this,null,function*(){yield e.submit(),n.data=n.data||{},n.data.loading=!0;const u=Y.cloneDeep(e.values);u.autoCreateReverseField||delete u.reverseField,delete u.autoCreateReverseField;try{yield s.request({url:`dataSourcesCollections/${c}.${i.name}/fields:create`,method:"post",data:u}),t.setVisible(!1),l.getDataSource(c).reload(),yield e.reset(),n.data.loading=!1,o()}catch(m){n.data.loading=!1}})}}},gn=e=>{const t=r.useRecord();return a.jsx(hn,F({item:t},e))},hn=e=>{const{scope:t,getContainer:o,item:n,children:s,trigger:i,align:c,database:l}=e,{getInterface:p,getTemplate:u,collections:m}=r.useCollectionManager_deprecated(),[h,C]=d.useState(!1),[D,$]=d.useState(),[v,b]=d.useState({}),f=r.useCompile(),{t:y}=K.useTranslation(),{data:{database:g}}=r.useCurrentAppInfo(),x=A=>(g==null?void 0:g.dialect)===A,I=d.useMemo(()=>m.map(A=>({label:f(A.title),value:A.name})),[]),k=r.useFieldInterfaceOptions(),M=d.useCallback(()=>{const{availableFieldInterfaces:A}=u(n.template)||{},{exclude:T,include:w}=A||{},U=[];return k.forEach(z=>{var R;if(z.key==="relation"){let J=[];w!=null&&w.length?w.forEach(X=>{var H;const Se=(H=z==null?void 0:z.children)==null?void 0:H.find(zo=>[X,X.interface].includes(zo.value));Se&&J.push(j(F({},Se),{targetScope:X==null?void 0:X.targetScope}))}):T!=null&&T.length?J=(R=z==null?void 0:z.children)==null?void 0:R.filter(X=>!T.includes(X.value)):J=z==null?void 0:z.children,J!=null&&J.length&&U.push(j(F({},z),{children:J}))}}),U},[u,n]),B=d.useMemo(()=>M().map(A=>{var T;return((T=A==null?void 0:A.children)==null?void 0:T.length)===0?null:n.template==="view"?{type:"group",label:f(A.label),title:f(A.label),key:A.label,children:A.children.filter(w=>["m2o"].includes(w.name)).map(w=>({label:f(w.title),title:f(w.title),key:w.name,dataTargetScope:w.targetScope}))}:{type:"group",label:f(A.label),title:f(A.label),key:A.label,children:A==null?void 0:A.children.filter(w=>!["o2o","subTable","linkTo"].includes(w.name)).map(w=>({label:f(w.title),title:f(w.title),key:w.name,dataTargetScope:w.targetScope}))}}).filter(A=>{var T;return(T=A==null?void 0:A.children)==null?void 0:T.length}),[M]),V=d.useMemo(()=>({style:{maxHeight:"60vh",overflow:"auto"},onClick:A=>{const T=A.item.props["data-targetScope"];T&&$(T);const w=yn(p(A.key),n,f);w&&(b(w),C(!0))},items:B}),[p,B,n]);return n.template!=="sql"&&a.jsx(r.RecordProvider,{record:n,children:a.jsxs(r.ActionContextProvider,{value:{visible:h,setVisible:C},children:[a.jsx(S.Dropdown,{getPopupContainer:o,trigger:i,align:c,menu:V,children:s||a.jsx(S.Button,{icon:a.jsx(Q.PlusOutlined,{}),type:"primary",children:y("Add field")})}),a.jsx(r.SchemaComponent,{schema:v,components:{ArrayTable:ae.ArrayTable},scope:F({getContainer:o,useCancelAction:r.useCancelAction,createOnly:!0,isOverride:!1,override:!1,useCreateCollectionField:fn,record:n,showReverseFieldConfig:!1,targetScope:D,collections:I,isDialect:x,disabledJSONB:!1,createMainOnly:!0},t)})]})})},Cn=_.observer(e=>{const{value:t,handleFieldChange:o}=e,n=r.useRecord(),[s,i]=d.useState(t),c=u=>{i(u)},l=d.useMemo(()=>Y.debounce(u=>{o({uiSchema:j(F({},n==null?void 0:n.uiSchema),{title:u})},n.name)},1e3),[o,n]),p=u=>{const m=u.target.value;c(m),l(m)};return d.useEffect(()=>{i(t)},[t]),a.jsx(S.Input,{value:s,onChange:p,style:{minWidth:"100px"},"aria-label":"field-title-input"})},{displayName:"FieldTitleInput"}),vn=()=>{const{refresh:e}=r.useResourceActionContext(),{name:t}=G.useParams(),{name:o,collectionName:n}=r.useRecord(),s=r.useAPIClient();return{run(){return P(this,null,function*(){yield s.request({url:`dataSourcesCollections/${t}.${n}/fields:destroy?filterByTk=${o}`,method:"post"}),e()})}}},bn=()=>{const{state:e,setState:t,refresh:o}=r.useResourceActionContext(),{t:n}=K.useTranslation(),{name:s}=G.useParams(),i=r.useAPIClient(),{name:c}=r.useRecord();return{run(){return P(this,null,function*(){var p;if(!((p=e==null?void 0:e.selectedRowKeys)!=null&&p.length))return S.message.error(n("Please select the records you want to delete"));yield i.request({url:`dataSourcesCollections/${s}.${c}/fields:destroy`,method:"post",params:{filterByTk:(e==null?void 0:e.selectedRowKeys)||[]}}),t==null||t({selectedRowKeys:[]}),o()})}}},xn=()=>{const{run:e}=bn();return{run(){return P(this,null,function*(){yield e()})}}},Sn=()=>{const{run:e}=vn();return{run(){return P(this,null,function*(){yield e()})}}};var Te=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function An(){this.__data__=[],this.size=0}var $n=An;function Tn(e,t){return e===t||e!==e&&t!==t}var bt=Tn,Fn=bt;function wn(e,t){for(var o=e.length;o--;)if(Fn(e[o][0],t))return o;return-1}var we=wn,_n=we,Pn=Array.prototype,Dn=Pn.splice;function In(e){var t=this.__data__,o=_n(t,e);if(o<0)return!1;var n=t.length-1;return o==n?t.pop():Dn.call(t,o,1),--this.size,!0}var On=In,Mn=we;function En(e){var t=this.__data__,o=Mn(t,e);return o<0?void 0:t[o][1]}var jn=En,kn=we;function Kn(e){return kn(this.__data__,e)>-1}var Nn=Kn,Bn=we;function Vn(e,t){var o=this.__data__,n=Bn(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this}var Ln=Vn,qn=$n,Gn=On,Un=jn,zn=Nn,Hn=Ln;function se(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}se.prototype.clear=qn,se.prototype.delete=Gn,se.prototype.get=Un,se.prototype.has=zn,se.prototype.set=Hn;var _e=se,Wn=_e;function Qn(){this.__data__=new Wn,this.size=0}var Yn=Qn;function Jn(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}var Zn=Jn;function Xn(e){return this.__data__.get(e)}var Rn=Xn;function er(e){return this.__data__.has(e)}var tr=er,or=typeof Te=="object"&&Te&&Te.Object===Object&&Te,xt=or,nr=xt,rr=typeof self=="object"&&self&&self.Object===Object&&self,ar=nr||rr||Function("return this")(),Z=ar,sr=Z,ir=sr.Symbol,ge=ir,St=ge,At=Object.prototype,cr=At.hasOwnProperty,lr=At.toString,he=St?St.toStringTag:void 0;function ur(e){var t=cr.call(e,he),o=e[he];try{e[he]=void 0;var n=!0}catch(i){}var s=lr.call(e);return n&&(t?e[he]=o:delete e[he]),s}var pr=ur,dr=Object.prototype,mr=dr.toString;function yr(e){return mr.call(e)}var fr=yr,$t=ge,gr=pr,hr=fr,Cr="[object Null]",vr="[object Undefined]",Tt=$t?$t.toStringTag:void 0;function br(e){return e==null?e===void 0?vr:Cr:Tt&&Tt in Object(e)?gr(e):hr(e)}var ie=br;function xr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ce=xr,Sr=ie,Ar=ce,$r="[object AsyncFunction]",Tr="[object Function]",Fr="[object GeneratorFunction]",wr="[object Proxy]";function _r(e){if(!Ar(e))return!1;var t=Sr(e);return t==Tr||t==Fr||t==$r||t==wr}var Ft=_r,Pr=Z,Dr=Pr["__core-js_shared__"],Ir=Dr,Be=Ir,wt=function(){var e=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Or(e){return!!wt&&wt in e}var Mr=Or,Er=Function.prototype,jr=Er.toString;function kr(e){if(e!=null){try{return jr.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var _t=kr,Kr=Ft,Nr=Mr,Br=ce,Vr=_t,Lr=/[\\^$.*+?()[\]{}|]/g,qr=/^\[object .+?Constructor\]$/,Gr=Function.prototype,Ur=Object.prototype,zr=Gr.toString,Hr=Ur.hasOwnProperty,Wr=RegExp("^"+zr.call(Hr).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qr(e){if(!Br(e)||Nr(e))return!1;var t=Kr(e)?Wr:qr;return t.test(Vr(e))}var Yr=Qr;function Jr(e,t){return e==null?void 0:e[t]}var Zr=Jr,Xr=Yr,Rr=Zr;function ea(e,t){var o=Rr(e,t);return Xr(o)?o:void 0}var te=ea,ta=te,oa=Z,na=ta(oa,"Map"),Ve=na,ra=te,aa=ra(Object,"create"),Pe=aa,Pt=Pe;function sa(){this.__data__=Pt?Pt(null):{},this.size=0}var ia=sa;function ca(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var la=ca,ua=Pe,pa="__lodash_hash_undefined__",da=Object.prototype,ma=da.hasOwnProperty;function ya(e){var t=this.__data__;if(ua){var o=t[e];return o===pa?void 0:o}return ma.call(t,e)?t[e]:void 0}var fa=ya,ga=Pe,ha=Object.prototype,Ca=ha.hasOwnProperty;function va(e){var t=this.__data__;return ga?t[e]!==void 0:Ca.call(t,e)}var ba=va,xa=Pe,Sa="__lodash_hash_undefined__";function Aa(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=xa&&t===void 0?Sa:t,this}var $a=Aa,Ta=ia,Fa=la,wa=fa,_a=ba,Pa=$a;function le(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}le.prototype.clear=Ta,le.prototype.delete=Fa,le.prototype.get=wa,le.prototype.has=_a,le.prototype.set=Pa;var Da=le,Dt=Da,Ia=_e,Oa=Ve;function Ma(){this.size=0,this.__data__={hash:new Dt,map:new(Oa||Ia),string:new Dt}}var Ea=Ma;function ja(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ka=ja,Ka=ka;function Na(e,t){var o=e.__data__;return Ka(t)?o[typeof t=="string"?"string":"hash"]:o.map}var De=Na,Ba=De;function Va(e){var t=Ba(this,e).delete(e);return this.size-=t?1:0,t}var La=Va,qa=De;function Ga(e){return qa(this,e).get(e)}var Ua=Ga,za=De;function Ha(e){return za(this,e).has(e)}var Wa=Ha,Qa=De;function Ya(e,t){var o=Qa(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this}var Ja=Ya,Za=Ea,Xa=La,Ra=Ua,es=Wa,ts=Ja;function ue(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}ue.prototype.clear=Za,ue.prototype.delete=Xa,ue.prototype.get=Ra,ue.prototype.has=es,ue.prototype.set=ts;var It=ue,os=_e,ns=Ve,rs=It,as=200;function ss(e,t){var o=this.__data__;if(o instanceof os){var n=o.__data__;if(!ns||n.length<as-1)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new rs(n)}return o.set(e,t),this.size=o.size,this}var is=ss,cs=_e,ls=Yn,us=Zn,ps=Rn,ds=tr,ms=is;function pe(e){var t=this.__data__=new cs(e);this.size=t.size}pe.prototype.clear=ls,pe.prototype.delete=us,pe.prototype.get=ps,pe.prototype.has=ds,pe.prototype.set=ms;var ys=pe;function fs(e,t){for(var o=-1,n=e==null?0:e.length;++o<n&&t(e[o],o,e)!==!1;);return e}var gs=fs,hs=te,Cs=function(){try{var e=hs(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ot=Cs,Mt=Ot;function vs(e,t,o){t=="__proto__"&&Mt?Mt(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}var Et=vs,bs=Et,xs=bt,Ss=Object.prototype,As=Ss.hasOwnProperty;function $s(e,t,o){var n=e[t];(!(As.call(e,t)&&xs(n,o))||o===void 0&&!(t in e))&&bs(e,t,o)}var Le=$s,Ts=Le,Fs=Et;function ws(e,t,o,n){var s=!o;o||(o={});for(var i=-1,c=t.length;++i<c;){var l=t[i],p=n?n(o[l],e[l],l,o,e):void 0;p===void 0&&(p=e[l]),s?Fs(o,l,p):Ts(o,l,p)}return o}var Ce=ws;function _s(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}var Ps=_s;function Ds(e){return e!=null&&typeof e=="object"}var oe=Ds,Is=ie,Os=oe,Ms="[object Arguments]";function Es(e){return Os(e)&&Is(e)==Ms}var js=Es,jt=js,ks=oe,kt=Object.prototype,Ks=kt.hasOwnProperty,Ns=kt.propertyIsEnumerable,Bs=jt(function(){return arguments}())?jt:function(e){return ks(e)&&Ks.call(e,"callee")&&!Ns.call(e,"callee")},Kt=Bs,Vs=Array.isArray,ne=Vs,Ie={exports:{}};function Ls(){return!1}var qs=Ls;Ie.exports,function(e,t){var o=Z,n=qs,s=t&&!t.nodeType&&t,i=s&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===s,l=c?o.Buffer:void 0,p=l?l.isBuffer:void 0,u=p||n;e.exports=u}(Ie,Ie.exports);var Nt=Ie.exports,Gs=9007199254740991,Us=/^(?:0|[1-9]\d*)$/;function zs(e,t){var o=typeof e;return t=t==null?Gs:t,!!t&&(o=="number"||o!="symbol"&&Us.test(e))&&e>-1&&e%1==0&&e<t}var Bt=zs,Hs=9007199254740991;function Ws(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Hs}var Vt=Ws,Qs=ie,Ys=Vt,Js=oe,Zs="[object Arguments]",Xs="[object Array]",Rs="[object Boolean]",ei="[object Date]",ti="[object Error]",oi="[object Function]",ni="[object Map]",ri="[object Number]",ai="[object Object]",si="[object RegExp]",ii="[object Set]",ci="[object String]",li="[object WeakMap]",ui="[object ArrayBuffer]",pi="[object DataView]",di="[object Float32Array]",mi="[object Float64Array]",yi="[object Int8Array]",fi="[object Int16Array]",gi="[object Int32Array]",hi="[object Uint8Array]",Ci="[object Uint8ClampedArray]",vi="[object Uint16Array]",bi="[object Uint32Array]",q={};q[di]=q[mi]=q[yi]=q[fi]=q[gi]=q[hi]=q[Ci]=q[vi]=q[bi]=!0,q[Zs]=q[Xs]=q[ui]=q[Rs]=q[pi]=q[ei]=q[ti]=q[oi]=q[ni]=q[ri]=q[ai]=q[si]=q[ii]=q[ci]=q[li]=!1;function xi(e){return Js(e)&&Ys(e.length)&&!!q[Qs(e)]}var Si=xi;function Ai(e){return function(t){return e(t)}}var qe=Ai,Oe={exports:{}};Oe.exports,function(e,t){var o=xt,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,c=i&&o.process,l=function(){try{var p=s&&s.require&&s.require("util").types;return p||c&&c.binding&&c.binding("util")}catch(u){}}();e.exports=l}(Oe,Oe.exports);var Ge=Oe.exports,$i=Si,Ti=qe,Lt=Ge,qt=Lt&&Lt.isTypedArray,Fi=qt?Ti(qt):$i,wi=Fi,_i=Ps,Pi=Kt,Di=ne,Ii=Nt,Oi=Bt,Mi=wi,Ei=Object.prototype,ji=Ei.hasOwnProperty;function ki(e,t){var o=Di(e),n=!o&&Pi(e),s=!o&&!n&&Ii(e),i=!o&&!n&&!s&&Mi(e),c=o||n||s||i,l=c?_i(e.length,String):[],p=l.length;for(var u in e)(t||ji.call(e,u))&&!(c&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Oi(u,p)))&&l.push(u);return l}var Gt=ki,Ki=Object.prototype;function Ni(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||Ki;return e===o}var Ue=Ni;function Bi(e,t){return function(o){return e(t(o))}}var Ut=Bi,Vi=Ut,Li=Vi(Object.keys,Object),qi=Li,Gi=Ue,Ui=qi,zi=Object.prototype,Hi=zi.hasOwnProperty;function Wi(e){if(!Gi(e))return Ui(e);var t=[];for(var o in Object(e))Hi.call(e,o)&&o!="constructor"&&t.push(o);return t}var Qi=Wi,Yi=Ft,Ji=Vt;function Zi(e){return e!=null&&Ji(e.length)&&!Yi(e)}var zt=Zi,Xi=Gt,Ri=Qi,ec=zt;function tc(e){return ec(e)?Xi(e):Ri(e)}var ze=tc,oc=Ce,nc=ze;function rc(e,t){return e&&oc(t,nc(t),e)}var ac=rc;function sc(e){var t=[];if(e!=null)for(var o in Object(e))t.push(o);return t}var ic=sc,cc=ce,lc=Ue,uc=ic,pc=Object.prototype,dc=pc.hasOwnProperty;function mc(e){if(!cc(e))return uc(e);var t=lc(e),o=[];for(var n in e)n=="constructor"&&(t||!dc.call(e,n))||o.push(n);return o}var yc=mc,fc=Gt,gc=yc,hc=zt;function Cc(e){return hc(e)?fc(e,!0):gc(e)}var He=Cc,vc=Ce,bc=He;function xc(e,t){return e&&vc(t,bc(t),e)}var Sc=xc,Me={exports:{}};Me.exports,function(e,t){var o=Z,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,c=i?o.Buffer:void 0,l=c?c.allocUnsafe:void 0;function p(u,m){if(m)return u.slice();var h=u.length,C=l?l(h):new u.constructor(h);return u.copy(C),C}e.exports=p}(Me,Me.exports);var Ac=Me.exports;function $c(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o<n;)t[o]=e[o];return t}var Tc=$c;function Fc(e,t){for(var o=-1,n=e==null?0:e.length,s=0,i=[];++o<n;){var c=e[o];t(c,o,e)&&(i[s++]=c)}return i}var wc=Fc;function _c(){return[]}var Ht=_c,Pc=wc,Dc=Ht,Ic=Object.prototype,Oc=Ic.propertyIsEnumerable,Wt=Object.getOwnPropertySymbols,Mc=Wt?function(e){return e==null?[]:(e=Object(e),Pc(Wt(e),function(t){return Oc.call(e,t)}))}:Dc,We=Mc,Ec=Ce,jc=We;function kc(e,t){return Ec(e,jc(e),t)}var Kc=kc;function Nc(e,t){for(var o=-1,n=t.length,s=e.length;++o<n;)e[s+o]=t[o];return e}var Qe=Nc,Bc=Ut,Vc=Bc(Object.getPrototypeOf,Object),Ye=Vc,Lc=Qe,qc=Ye,Gc=We,Uc=Ht,zc=Object.getOwnPropertySymbols,Hc=zc?function(e){for(var t=[];e;)Lc(t,Gc(e)),e=qc(e);return t}:Uc,Qt=Hc,Wc=Ce,Qc=Qt;function Yc(e,t){return Wc(e,Qc(e),t)}var Jc=Yc,Zc=Qe,Xc=ne;function Rc(e,t,o){var n=t(e);return Xc(e)?n:Zc(n,o(e))}var Yt=Rc,el=Yt,tl=We,ol=ze;function nl(e){return el(e,ol,tl)}var rl=nl,al=Yt,sl=Qt,il=He;function cl(e){return al(e,il,sl)}var Jt=cl,ll=te,ul=Z,pl=ll(ul,"DataView"),dl=pl,ml=te,yl=Z,fl=ml(yl,"Promise"),gl=fl,hl=te,Cl=Z,vl=hl(Cl,"Set"),bl=vl,xl=te,Sl=Z,Al=xl(Sl,"WeakMap"),$l=Al,Je=dl,Ze=Ve,Xe=gl,Re=bl,et=$l,Zt=ie,de=_t,Xt="[object Map]",Tl="[object Object]",Rt="[object Promise]",eo="[object Set]",to="[object WeakMap]",oo="[object DataView]",Fl=de(Je),wl=de(Ze),_l=de(Xe),Pl=de(Re),Dl=de(et),re=Zt;(Je&&re(new Je(new ArrayBuffer(1)))!=oo||Ze&&re(new Ze)!=Xt||Xe&&re(Xe.resolve())!=Rt||Re&&re(new Re)!=eo||et&&re(new et)!=to)&&(re=function(e){var t=Zt(e),o=t==Tl?e.constructor:void 0,n=o?de(o):"";if(n)switch(n){case Fl:return oo;case wl:return Xt;case _l:return Rt;case Pl:return eo;case Dl:return to}return t});var tt=re,Il=Object.prototype,Ol=Il.hasOwnProperty;function Ml(e){var t=e.length,o=new e.constructor(t);return t&&typeof e[0]=="string"&&Ol.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var El=Ml,jl=Z,kl=jl.Uint8Array,Kl=kl,no=Kl;function Nl(e){var t=new e.constructor(e.byteLength);return new no(t).set(new no(e)),t}var ot=Nl,Bl=ot;function Vl(e,t){var o=t?Bl(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var Ll=Vl,ql=/\w*$/;function Gl(e){var t=new e.constructor(e.source,ql.exec(e));return t.lastIndex=e.lastIndex,t}var Ul=Gl,ro=ge,ao=ro?ro.prototype:void 0,so=ao?ao.valueOf:void 0;function zl(e){return so?Object(so.call(e)):{}}var Hl=zl,Wl=ot;function Ql(e,t){var o=t?Wl(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var Yl=Ql,Jl=ot,Zl=Ll,Xl=Ul,Rl=Hl,eu=Yl,tu="[object Boolean]",ou="[object Date]",nu="[object Map]",ru="[object Number]",au="[object RegExp]",su="[object Set]",iu="[object String]",cu="[object Symbol]",lu="[object ArrayBuffer]",uu="[object DataView]",pu="[object Float32Array]",du="[object Float64Array]",mu="[object Int8Array]",yu="[object Int16Array]",fu="[object Int32Array]",gu="[object Uint8Array]",hu="[object Uint8ClampedArray]",Cu="[object Uint16Array]",vu="[object Uint32Array]";function bu(e,t,o){var n=e.constructor;switch(t){case lu:return Jl(e);case tu:case ou:return new n(+e);case uu:return Zl(e,o);case pu:case du:case mu:case yu:case fu:case gu:case hu:case Cu:case vu:return eu(e,o);case nu:return new n;case ru:case iu:return new n(e);case au:return Xl(e);case su:return new n;case cu:return Rl(e)}}var xu=bu,Su=ce,io=Object.create,Au=function(){function e(){}return function(t){if(!Su(t))return{};if(io)return io(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}(),$u=Au,Tu=$u,Fu=Ye,wu=Ue;function _u(e){return typeof e.constructor=="function"&&!wu(e)?Tu(Fu(e)):{}}var Pu=_u,Du=tt,Iu=oe,Ou="[object Map]";function Mu(e){return Iu(e)&&Du(e)==Ou}var Eu=Mu,ju=Eu,ku=qe,co=Ge,lo=co&&co.isMap,Ku=lo?ku(lo):ju,Nu=Ku,Bu=tt,Vu=oe,Lu="[object Set]";function qu(e){return Vu(e)&&Bu(e)==Lu}var Gu=qu,Uu=Gu,zu=qe,uo=Ge,po=uo&&uo.isSet,Hu=po?zu(po):Uu,Wu=Hu,Qu=ys,Yu=gs,Ju=Le,Zu=ac,Xu=Sc,Ru=Ac,ep=Tc,tp=Kc,op=Jc,np=rl,rp=Jt,ap=tt,sp=El,ip=xu,cp=Pu,lp=ne,up=Nt,pp=Nu,dp=ce,mp=Wu,yp=ze,fp=He,gp=1,hp=2,Cp=4,mo="[object Arguments]",vp="[object Array]",bp="[object Boolean]",xp="[object Date]",Sp="[object Error]",yo="[object Function]",Ap="[object GeneratorFunction]",$p="[object Map]",Tp="[object Number]",fo="[object Object]",Fp="[object RegExp]",wp="[object Set]",_p="[object String]",Pp="[object Symbol]",Dp="[object WeakMap]",Ip="[object ArrayBuffer]",Op="[object DataView]",Mp="[object Float32Array]",Ep="[object Float64Array]",jp="[object Int8Array]",kp="[object Int16Array]",Kp="[object Int32Array]",Np="[object Uint8Array]",Bp="[object Uint8ClampedArray]",Vp="[object Uint16Array]",Lp="[object Uint32Array]",L={};L[mo]=L[vp]=L[Ip]=L[Op]=L[bp]=L[xp]=L[Mp]=L[Ep]=L[jp]=L[kp]=L[Kp]=L[$p]=L[Tp]=L[fo]=L[Fp]=L[wp]=L[_p]=L[Pp]=L[Np]=L[Bp]=L[Vp]=L[Lp]=!0,L[Sp]=L[yo]=L[Dp]=!1;function Ee(e,t,o,n,s,i){var c,l=t&gp,p=t&hp,u=t&Cp;if(o&&(c=s?o(e,n,s,i):o(e)),c!==void 0)return c;if(!dp(e))return e;var m=lp(e);if(m){if(c=sp(e),!l)return ep(e,c)}else{var h=ap(e),C=h==yo||h==Ap;if(up(e))return Ru(e,l);if(h==fo||h==mo||C&&!s){if(c=p||C?{}:cp(e),!l)return p?op(e,Xu(c,e)):tp(e,Zu(c,e))}else{if(!L[h])return s?e:{};c=ip(e,h,l)}}i||(i=new Qu);var D=i.get(e);if(D)return D;i.set(e,c),mp(e)?e.forEach(function(b){c.add(Ee(b,t,o,b,e,i))}):pp(e)&&e.forEach(function(b,f){c.set(f,Ee(b,t,o,f,e,i))});var $=u?p?rp:np:p?fp:yp,v=m?void 0:$(e);return Yu(v||e,function(b,f){v&&(f=b,b=e[f]),Ju(c,f,Ee(b,t,o,f,e,i))}),c}var go=Ee,qp=go,Gp=1,Up=4;function zp(e){return qp(e,Gp|Up)}var Hp=zp;const ee=Fe(Hp);function Wp(e,t){for(var o=-1,n=e==null?0:e.length,s=Array(n);++o<n;)s[o]=t(e[o],o,e);return s}var ho=Wp,Qp=ie,Yp=oe,Jp="[object Symbol]";function Zp(e){return typeof e=="symbol"||Yp(e)&&Qp(e)==Jp}var nt=Zp,Xp=ne,Rp=nt,ed=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,td=/^\w*$/;function od(e,t){if(Xp(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Rp(e)?!0:td.test(e)||!ed.test(e)||t!=null&&e in Object(t)}var nd=od,Co=It,rd="Expected a function";function rt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rd);var o=function(){var n=arguments,s=t?t.apply(this,n):n[0],i=o.cache;if(i.has(s))return i.get(s);var c=e.apply(this,n);return o.cache=i.set(s,c)||i,c};return o.cache=new(rt.Cache||Co),o}rt.Cache=Co;var ad=rt,sd=ad,id=500;function cd(e){var t=sd(e,function(n){return o.size===id&&o.clear(),n}),o=t.cache;return t}var ld=cd,ud=ld,pd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dd=/\\(\\)?/g,md=ud(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(pd,function(o,n,s,i){t.push(s?i.replace(dd,"$1"):n||o)}),t}),yd=md,vo=ge,fd=ho,gd=ne,hd=nt,Cd=1/0,bo=vo?vo.prototype:void 0,xo=bo?bo.toString:void 0;function So(e){if(typeof e=="string")return e;if(gd(e))return fd(e,So)+"";if(hd(e))return xo?xo.call(e):"";var t=e+"";return t=="0"&&1/e==-Cd?"-0":t}var vd=So,bd=vd;function xd(e){return e==null?"":bd(e)}var Sd=xd,Ad=ne,$d=nd,Td=yd,Fd=Sd;function wd(e,t){return Ad(e)?e:$d(e,t)?[e]:Td(Fd(e))}var je=wd;function _d(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Pd=_d,Dd=nt,Id=1/0;function Od(e){if(typeof e=="string"||Dd(e))return e;var t=e+"";return t=="0"&&1/e==-Id?"-0":t}var at=Od,Md=je,Ed=at;function jd(e,t){t=Md(t,e);for(var o=0,n=t.length;e!=null&&o<n;)e=e[Ed(t[o++])];return o&&o==n?e:void 0}var kd=jd;function Kd(e,t,o){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),o=o>s?s:o,o<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var i=Array(s);++n<s;)i[n]=e[n+t];return i}var Nd=Kd,Bd=kd,Vd=Nd;function Ld(e,t){return t.length<2?e:Bd(e,Vd(t,0,-1))}var qd=Ld,Gd=je,Ud=Pd,zd=qd,Hd=at;function Wd(e,t){return t=Gd(t,e),e=zd(e,t),e==null||delete e[Hd(Ud(t))]}var Qd=Wd,Yd=ie,Jd=Ye,Zd=oe,Xd="[object Object]",Rd=Function.prototype,em=Object.prototype,Ao=Rd.toString,tm=em.hasOwnProperty,om=Ao.call(Object);function nm(e){if(!Zd(e)||Yd(e)!=Xd)return!1;var t=Jd(e);if(t===null)return!0;var o=tm.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&Ao.call(o)==om}var rm=nm,am=rm;function sm(e){return am(e)?void 0:e}var im=sm,$o=ge,cm=Kt,lm=ne,To=$o?$o.isConcatSpreadable:void 0;function um(e){return lm(e)||cm(e)||!!(To&&e&&e[To])}var pm=um,dm=Qe,mm=pm;function Fo(e,t,o,n,s){var i=-1,c=e.length;for(o||(o=mm),s||(s=[]);++i<c;){var l=e[i];t>0&&o(l)?t>1?Fo(l,t-1,o,n,s):dm(s,l):n||(s[s.length]=l)}return s}var ym=Fo,fm=ym;function gm(e){var t=e==null?0:e.length;return t?fm(e,1):[]}var hm=gm;function Cm(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}var vm=Cm,bm=vm,wo=Math.max;function xm(e,t,o){return t=wo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,s=-1,i=wo(n.length-t,0),c=Array(i);++s<i;)c[s]=n[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=n[s];return l[t]=o(c),bm(e,this,l)}}var Sm=xm;function Am(e){return function(){return e}}var $m=Am;function Tm(e){return e}var Fm=Tm,wm=$m,_o=Ot,_m=Fm,Pm=_o?function(e,t){return _o(e,"toString",{configurable:!0,enumerable:!1,value:wm(t),writable:!0})}:_m,Dm=Pm,Im=800,Om=16,Mm=Date.now;function Em(e){var t=0,o=0;return function(){var n=Mm(),s=Om-(n-o);if(o=n,s>0){if(++t>=Im)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var jm=Em,km=Dm,Km=jm,Nm=Km(km),Bm=Nm,Vm=hm,Lm=Sm,qm=Bm;function Gm(e){return qm(Lm(e,void 0,Vm),e+"")}var Um=Gm,zm=ho,Hm=go,Wm=Qd,Qm=je,Ym=Ce,Jm=im,Zm=Um,Xm=Jt,Rm=1,ey=2,ty=4,oy=Zm(function(e,t){var o={};if(e==null)return o;var n=!1;t=zm(t,function(i){return i=Qm(i,e),n||(n=i.length>1),i}),Ym(e,Xm(e),o),n&&(o=Hm(o,Rm|ey|ty,Jm));for(var s=t.length;s--;)Wm(o,t[s]);return o}),ny=oy;const ke=Fe(ny);var ry=Le,ay=je,sy=Bt,Po=ce,iy=at;function cy(e,t,o,n){if(!Po(e))return e;t=ay(t,e);for(var s=-1,i=t.length,c=i-1,l=e;l!=null&&++s<i;){var p=iy(t[s]),u=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(s!=c){var m=l[p];u=n?n(m,p,l):void 0,u===void 0&&(u=Po(m)?m:sy(t[s+1])?[]:{})}ry(l,p,u),l=l[p]}return e}var ly=cy,uy=ly;function py(e,t,o){return e==null?e:uy(e,t,o)}var dy=py;const Do=Fe(dy),my=({schema:e,record:t,parentRecord:o,compile:n,getContainer:s})=>{if(!e)return;const i=ee(e.properties);return i!=null&&i.name&&(i.name["x-disabled"]=!0),e.hasDefaultValue===!0&&(i.defaultValue=ee(e.default.uiSchema)||{},i.defaultValue.required=!1,i.defaultValue.title=n('{{ t("Default value") }}'),i.defaultValue["x-decorator"]="FormItem",i.defaultValue["x-reactions"]={dependencies:["uiSchema.x-component-props.gmt","uiSchema.x-component-props.showTime","uiSchema.x-component-props.dateFormat","uiSchema.x-component-props.timeFormat"],fulfill:{state:{componentProps:{gmt:"{{$deps[0]}}",showTime:"{{$deps[1]}}",dateFormat:"{{$deps[2]}}",timeFormat:"{{$deps[3]}}"}}}},i.defaultValue["x-disabled"]=!0),{type:"object",properties:{[N.uid()]:{type:"void","x-component":"Action.Drawer","x-component-props":{getContainer:"{{ getContainer }}"},"x-decorator":"Form","x-decorator-props":{useValues(c){return r.useRequest(()=>{var l;return Promise.resolve({data:j(F({},ee(ke(e.default,["uiSchema.rawTitle"]))),{autoFill:((l=e.default)==null?void 0:l.autoFill)!==!1})})},c)}},title:`${n((o==null?void 0:o.title)||(o==null?void 0:o.name))} - ${n('{{ t("Edit field") }}')}`,properties:j(F({summary:{type:"void","x-component":"FieldSummary","x-component-props":{schemaKey:e.name}}},i),{description:{type:"string",title:'{{t("Description")}}',"x-decorator":"FormItem","x-component":"Input.TextArea"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{action1:{title:'{{ t("Cancel") }}',"x-component":"Action","x-component-props":{useAction:"{{ useCancelAction }}"}},action2:{title:'{{ t("Submit") }}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateCollectionField }}"}}}}})}}}},yy=()=>{const e=_.useForm(),t=r.useAPIClient(),o=r.useActionContext(),{refresh:n}=r.useResourceActionContext(),{targetCollection:s}=it(),{name:i}=G.useParams(),{name:c}=r.useRecord(),l=r.useDataSourceManager();return{run(){return P(this,null,function*(){yield e.submit();const u=ee(e.values);u.autoCreateReverseField||delete u.reverseField,delete u.autoCreateReverseField,yield t.request({url:`dataSourcesCollections/${i}.${s.name}/fields:update?filterByTk=${c}`,method:"post",data:u}),o.setVisible(!1),l.getDataSource(i).reload(),yield e.reset(),n()})}}},fy=e=>{const t=r.useRecord(),o=r.useCollectionParentRecordData();return a.jsx(gy,F({item:t,parentItem:o},e))},gy=e=>{var B,V;const M=e,{scope:t,getContainer:o,item:n,parentItem:s,children:i}=M,c=ut(M,["scope","getContainer","item","parentItem","children"]),{getInterface:l,collections:p,getCollection:u}=r.useCollectionManager_deprecated(),{data:{database:m}}=r.useCurrentAppInfo(),[h,C]=d.useState(!1),[D,$]=d.useState({}),v=r.useAPIClient(),{t:b}=K.useTranslation(),f=r.useCompile(),{name:y}=G.useParams(),g=A=>(m==null?void 0:m.dialect)===A,x=(n==null?void 0:n.fields)||((V=(B=u(n.collectionName,y))==null?void 0:B.options)==null?void 0:V.fields),I=d.useMemo(()=>p.map(A=>({label:f(A.title),value:A.name})),[]),k=d.useMemo(()=>{var A,T;return(n==null?void 0:n.fields)||((T=(A=u(n.collectionName,y))==null?void 0:A.options)==null?void 0:T.fields.filter(w=>["string","bigInt","integer"].includes(w.type)).map(w=>{var U;return{value:w.name,label:f((U=w.uiSchema)==null?void 0:U.title)}}))},[n.name,x]);return a.jsx(r.RecordProvider,{record:n,parent:s,children:a.jsxs(r.ActionContextProvider,{value:{visible:h,setVisible:C},children:[a.jsx("a",j(F({},c),{onClick:()=>P(this,null,function*(){var z,R,J;const{data:A}=yield v.request({url:`dataSourcesCollections/${y}.${s.name}/fields:get?filterByTk=${n.name}`,params:{appends:["reverseField"]}}),T=l((z=A==null?void 0:A.data)==null?void 0:z.interface),w=ee(A==null?void 0:A.data)||{};w!=null&&w.reverseField||(w.autoCreateReverseField=!1,w.reverseField=(R=T==null?void 0:T.default)==null?void 0:R.reverseField,Do(w.reverseField,"name",`f_${N.uid()}`),Do(w.reverseField,"uiSchema.title",(J=n.__parent)==null?void 0:J.title));const U=my({schema:j(F({},T),{default:w}),record:n,parentRecord:s,compile:f,getContainer:o});$(U),C(!0)}),children:i||b("Edit")})),a.jsx(r.SchemaComponent,{schema:D,components:{ArrayTable:ae.ArrayTable},scope:j(F({getContainer:o,useUpdateCollectionField:yy,useCancelAction:r.useCancelAction,showReverseFieldConfig:!1,collections:I,isDialect:g,scopeKeyOptions:k,disabledJSONB:!0},t),{createOnly:!1,createMainOnly:!1,editMainOnly:!0})})]})})},hy=_.observer(e=>{const{value:t,handleFieldChange:o,onChange:n}=e,s=r.useRecord(),i=s;return i!=null&&i.possibleTypes?a.jsx(S.Select,{"aria-label":`field-type-${t}`,role:"button",defaultValue:t,popupMatchSelectWidth:!1,style:{width:"100%"},options:(i==null?void 0:i.possibleTypes.map(c=>({label:c,value:c})))||[],onChange:c=>{n==null||n(c),o(j(F({},i),{type:c}),s.name)}}):a.jsx(S.Tag,{children:t})},{displayName:"FieldType"}),Cy=()=>{const{t:e}=K.useTranslation(),{unsupportedFields:t}=r.useRecord(),o=[{title:e("Field name"),dataIndex:"name",key:"name"},{title:e("Field database type",{ns:E}),dataIndex:"rawType",key:"rawType"}];return(t==null?void 0:t.length)>0&&a.jsxs(a.Fragment,{children:[a.jsx(S.Divider,{plain:!0,orientation:"left",orientationMargin:"0",children:a.jsx("h3",{children:e("Unknown field type",{ns:E})})}),a.jsx("div",{style:{marginBottom:"15px"},children:e("The following field types are not compatible and do not support output and display",{ns:E})}),a.jsx(S.Table,{columns:o,dataSource:t,pagination:!1})]})},st=d.createContext({refreshRM:()=>{},titleField:null,targetCollection:null});st.displayName="RemoteCollectionContext";const it=()=>d.useContext(st),Io=()=>{const e=_.useField(),t=d.useMemo(()=>ye.createForm(),[]),o=r.useAttach(t.createArrayField(j(F({},e.props),{basePath:""}))),{t:n}=K.useTranslation(),{name:s}=G.useParams(),i=r.useAPIClient(),c=r.useCompile(),l=d.useContext(r.ResourceActionContext),p=r.useResourceContext(),{targetKey:u}=p||{},m=r.useRecord(),{[u]:h,titleField:C,name:D}=m,[$,v]=d.useState(C),b=A=>{const T=d.useContext(r.ResourceActionContext),w=_.useField();return d.useEffect(()=>{T.loading||(A==null||A.onSuccess(T.data),w.componentProps.dragSort=!!T.dragSort)},[T.loading]),T},f={association:{sourceKey:"name",targetKey:"name"},dragSort:!1,collection:rn,request:{url:`dataSourcesCollections/${s}.${D}/fields:list`,params:{paginate:!1,filter:{$or:[{"interface.$not":null},{"options.source.$notEmpty":!0}]},sort:["sort"]}}},y=r.useDataSourceManager();let g=!1;const x=[],I=()=>P(this,null,function*(){if(g||x.length===0)return;g=!0;const{value:A,filterByTk:T,flag:w}=x.shift();try{yield M(A,T,w)}catch(U){console.error("Error processing handleFieldChange:",U)}finally{g=!1,I()}}),k=(A,T,w)=>{x.push({value:A,filterByTk:T,flag:w}),I()},M=(A,T,w=!0)=>P(this,null,function*(){yield i.request({url:`dataSourcesCollections/${s}.${D}/fields:update?filterByTk=${T}`,method:"post",data:A}),y.getDataSource(s).reload(),w&&S.message.success(n("Saved successfully"))}),B=()=>({filterByTk:h,titleField:$,dataSourceKey:s,setTitleField:v}),V=(A,T,w)=>P(this,null,function*(){var X,Se;const{targetScope:U}=T,z=((X=A.props)==null?void 0:X.name)==="inherits",{data:R}=yield i.request({url:`dataSources/${s}/collections:list`,params:{paginate:!1,appends:["fields"],sort:["sort"]}});return((Se=R==null?void 0:R.data)==null?void 0:Se.filter(H=>{var Ho;if(w!=null&&w.includes(H.template)||H.autoCreate&&H.isThrough||z&&H.template==="view")return!1;const Vf=!(U!=null&&U.template)||U.template.includes(H.template),Lf=!(U!=null&&U[(Ho=A.props)==null?void 0:Ho.name])||U[A.props.name].includes(H.name);return Vf&&Lf})).map(H=>({label:c(H.title||H.name),value:H.name}))});return a.jsxs(st.Provider,{value:{refreshRM:()=>{l.refresh()},titleField:$,targetCollection:m},children:[a.jsx(r.ResourceActionProvider,j(F({},f),{children:a.jsx(_.FormContext.Provider,{value:t,children:a.jsx(_.FieldContext.Provider,{value:o,children:a.jsx(r.SchemaComponentOptions,{components:{TitleField:sn,CollectionFieldInterfaceSelect:ln,AddCollectionField:gn,SourceCollection:dn,TargetKey:pn,SourceKey:un,FieldTitleInput:Cn,EditCollectionField:fy,Select:r.Select,FieldType:hy,ForeignKey:vt,ThroughCollection:mn},inherit:!0,scope:{useDataSource:b,useTitleFieldProps:B,enqueueChange:k,useDestroyActionAndRefreshCM:Sn,useBulkDestroyActionAndRefreshCM:xn,loadCollections:V},children:a.jsx(_.RecursionField,{schema:an,onlyRenderProperties:!0})})})})})),a.jsx(Cy,{})]})},vy=(e,t,o,n)=>{if(!e)return;const s=ee(e.configurableProperties)||{title:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem"}};return e.hasDefaultValue===!0&&(s.defaultValue=ee(e.default.uiSchema),s.defaultValue.title=o('{{ t("Default value") }}'),s.defaultValue["x-decorator"]="FormItem"),{type:"object",properties:{[N.uid()]:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ useValuesFromRecord }}"},title:'{{ t("Edit collection") }}',properties:j(F({},ke(s,"category","inherits","moreOptions")),{filterTargetKey:{title:`{{ t("Filter target key",{ ns: "${E}" }) }}`,type:"single",description:r.tval("Filter data based on the specific field, with the requirement that the field value must be unique.",{ns:E}),"x-decorator":"FormItem","x-component":"Select",enum:"{{filterTargetKeyOptions}}","x-visible":"{{!!isView}}"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{action1:{title:'{{ t("Cancel") }}',"x-component":"Action","x-component-props":{useAction:"{{ useCancelAction }}"}},action2:{title:'{{ t("Submit") }}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateCollectionActionAndRefreshCM }}"}}}}})}}}},by=e=>{const t=r.useRecord(),o=r.useRequest(()=>{var s;return Promise.resolve({data:j(F({},ke(ee(t),["__parent","__collectionName"])),{category:(s=t==null?void 0:t.category)==null?void 0:s.map(i=>i.id)})})},j(F({},e),{manual:!0})),n=r.useActionContext();return d.useEffect(()=>{n.visible&&o.run()},[n.visible]),o},xy=e=>{const{refreshCM:t}=r.useCollectionManager_deprecated(),o=_.useForm(),n=r.useActionContext(),{name:s}=G.useParams(),{refresh:i}=r.useResourceActionContext(),{resource:c,targetKey:l}=r.useResourceContext(),{[l]:p}=r.useRecord(),u=r.useAPIClient(),m=r.useDataSourceManager();return{run(){return P(this,null,function*(){yield o.submit(),yield u.request({url:`dataSources/${s}/collections:update?filterByTk=${p}`,method:"post",data:F({},ke(o.values,["fields","autoGenId","createdAt","updatedAt","createdBy","updatedBy","sortable"]))}),yield m.getDataSource(s).reload(),n.setVisible(!1),yield o.reset(),i(),yield t()})}}},Sy=e=>{const t=r.useRecord();return a.jsx(Ay,F({item:t},e))},Ay=e=>{var v;const $=e,{scope:t,getContainer:o,item:n,children:s}=$,i=ut($,["scope","getContainer","item","children"]),{getTemplate:c}=r.useCollectionManager_deprecated(),[l,p]=d.useState(!1),[u,m]=d.useState({}),{t:h}=K.useTranslation(),C=r.useCompile(),D=(v=n.fields)==null?void 0:v.map(b=>{var f;return{label:(f=b.uiSchema)!=null&&f.title?C(b.uiSchema.title):b.name,value:b.name}});return a.jsx(r.RecordProvider,{record:n,children:a.jsxs(r.ActionContextProvider,{value:{visible:l,setVisible:p},children:[a.jsx("a",j(F({},i),{onClick:()=>P(this,null,function*(){const b=c(n.template),f=vy(F({},b),n,C);m(f),p(!0)}),children:s||h("Edit")})),a.jsx(r.SchemaComponent,{schema:u,components:{ArrayTable:ae.ArrayTable},scope:F({getContainer:o,useValuesFromRecord:by,useUpdateCollectionActionAndRefreshCM:xy,useCancelAction:r.useCancelAction,createOnly:!1,filterTargetKeyOptions:D,isView:n.view},t)})]})})},$y=(e,t)=>(o,n)=>{o.loading=!0,e(o,n,t).then(pt.action.bound(s=>{o.dataSource=s,o.loading=!1})).catch(s=>console.log(s))},Ty=()=>{const[e,t]=d.useState([]);return[e,t]},Fy=()=>{const e=r.useRecord(),t=_.useForm();return{run(){return P(this,null,function*(){var s,i,c;const n=(c=(i=(s=t.values)==null?void 0:s.children)==null?void 0:i.slice)==null?void 0:c.call(i);t.setValuesIn("children",n.filter(l=>l.name!==e.name))})}}},wy=()=>({run(){return P(this,null,function*(){})}}),_y=e=>`${e||""}${N.uid()}`,Py=()=>{const{t:e}=K.useTranslation(),{interfaces:t}=r.useCollectionManager_deprecated(),{data:{database:o}}=r.useCurrentAppInfo(),n=r.useDataSourceManager(),s=d.useContext(r.SchemaComponentContext),{name:i}=G.useParams(),c=d.useContext(r.CollectionCategroriesContext),l=r.useAPIClient(),p=l.resource("dbViews"),u=r.useCompile(),m=()=>P(this,null,function*(){return c.data.map(v=>({label:u(v.name),value:v.id}))}),h=()=>P(this,null,function*(){return p.list().then(({data:v})=>{var b;return(b=v==null?void 0:v.data)==null?void 0:b.map(f=>{const y=f.schema;return{label:y?`${y}.${u(f.name)}`:f.name,value:y?`${y}_${f.name}`:f.name}})})}),C=()=>P(this,null,function*(){return l.resource("storages").list().then(({data:v})=>{var b;return(b=v==null?void 0:v.data)==null?void 0:b.map(f=>({label:e(u(f.title)),value:f.name}))})}),D=()=>{const v=d.useContext(r.ResourceActionContext),b=r.useAPIClient(),f=_.useField(),{name:y}=G.useParams();f.data=f.data||{};const{setDataSource:g,dataSource:x}=d.useContext(Ae);return{onClick(){return P(this,null,function*(){var k,M,B;f.data.loading=!0;try{const{data:V}=yield b.request({url:`dataSources:refresh?filterByTk=${y}&clientStatus=${(x==null?void 0:x.status)||"loaded"}`,method:"post"});f.data.loading=!1,g(V==null?void 0:V.data),((k=V==null?void 0:V.data)==null?void 0:k.status)==="reloading"?S.message.warning(e("Data source synchronization in progress")):((M=V==null?void 0:V.data)==null?void 0:M.status)==="loaded"&&(S.message.success(e("Data source synchronization successful")),(B=v==null?void 0:v.refresh)==null||B.call(v)),yield n.getDataSource(y).reload()}catch(V){f.data.loading=!1}})}}},$=d.useMemo(()=>nn(i),[i]);return a.jsx(r.SchemaComponentContext.Provider,{value:j(F({},s),{designable:!1}),children:a.jsx(r.SchemaComponent,{schema:$,components:{EditCollection:Sy,AddSubFieldAction:r.AddSubFieldAction,EditSubFieldAction:r.EditSubFieldAction,FieldSummary:r.FieldSummary,TemplateSummay:r.TemplateSummary,CollectionFields:Io},scope:{useRefreshActionProps:D,useDestroySubField:Fy,useBulkDestroySubField:wy,useSelectedRowKeys:Ty,useAsyncDataSource:$y,loadCategories:m,loadDBViews:h,loadStorages:C,useNewId:_y,useCancelAction:r.useCancelAction,interfaces:t,enableInherits:(o==null?void 0:o.dialect)==="postgres",isPG:(o==null?void 0:o.dialect)==="postgres"}})})};var Oo={exports:{}};/*!
2
11
  Copyright (c) 2018 Jed Watson.
3
12
  Licensed under the MIT License (MIT), see
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare const NAMESPACE = "data-source-manager";
2
10
  export declare function lang(key: string, options?: {}): string;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { ISchema } from '@formily/react';
2
10
  export declare const statusEnum: {
3
11
  value: string;
@@ -1,7 +1,16 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  module.exports = {
2
- "@nocobase/client": "1.0.0-alpha.2",
11
+ "@nocobase/client": "1.0.0-alpha.4",
3
12
  "react": "18.2.0",
4
- "@nocobase/server": "1.0.0-alpha.2",
13
+ "@nocobase/server": "1.0.0-alpha.4",
5
14
  "lodash": "4.17.21",
6
15
  "@ant-design/icons": "5.2.6",
7
16
  "antd": "5.12.8",
@@ -10,10 +19,10 @@ module.exports = {
10
19
  "react-i18next": "11.18.6",
11
20
  "@formily/react": "2.3.0",
12
21
  "@emotion/css": "11.11.2",
13
- "@nocobase/database": "1.0.0-alpha.2",
14
- "@nocobase/utils": "1.0.0-alpha.2",
15
- "@nocobase/plugin-acl": "1.0.0-alpha.2",
16
- "@nocobase/acl": "1.0.0-alpha.2",
22
+ "@nocobase/database": "1.0.0-alpha.4",
23
+ "@nocobase/utils": "1.0.0-alpha.4",
24
+ "@nocobase/plugin-acl": "1.0.0-alpha.4",
25
+ "@nocobase/acl": "1.0.0-alpha.4",
17
26
  "sequelize": "6.35.2",
18
27
  "@formily/antd-v5": "1.1.9",
19
28
  "@formily/core": "2.3.0",
package/dist/index.d.ts CHANGED
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export * from './server';
2
10
  export { default } from './server';
package/dist/index.js CHANGED
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare class TypeInferError extends Error {
2
10
  }
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export { default } from './plugin';
2
10
  export * from './utils';
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class extends Migration {
3
11
  on: string;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class extends Migration {
3
11
  on: string;
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { RoleResourceActionModel } from '@nocobase/plugin-acl';
2
10
  export declare class DataSourcesRolesResourcesActionModel extends RoleResourceActionModel {
3
11
  }
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { RoleResourceModel } from '@nocobase/plugin-acl';
2
10
  export declare class DataSourcesRolesResourcesModel extends RoleResourceModel {
3
11
  }
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Model, Transaction } from '@nocobase/database';
2
10
  import { Application } from '@nocobase/server';
3
11
  import { ACL } from '@nocobase/acl';