@objectstack/console 7.2.0 → 7.3.0
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.
- package/dist/assets/{AiPendingActionsPage-B6prPdE6.js → AiPendingActionsPage-BbZbWYZF.js} +1 -1
- package/dist/assets/{ApiConsolePage-KLlXE_J-.js → ApiConsolePage-CxtzVvxL.js} +1 -1
- package/dist/assets/{AppManagementPage-CSGa-1u0.js → AppManagementPage-CFfnxT1t.js} +1 -1
- package/dist/assets/ApprovalsInboxPage-BxQZcCfd.js +1 -0
- package/dist/assets/AuditLogPage-D4FqYkQH.js +1 -0
- package/dist/assets/{ComponentNavView-CZkyv2fY.js → ComponentNavView-XiNMCGMg.js} +1 -1
- package/dist/assets/ConsoleFloatingChatbot-DQEWG5vB.js +1 -0
- package/dist/assets/{DeveloperHubPage-lLRr5-aY.js → DeveloperHubPage-lZkmDwEj.js} +1 -1
- package/dist/assets/FlowRunsPage-RrJ1_Gcu.js +1 -0
- package/dist/assets/{ProfilePage-B4ZMNend.js → ProfilePage-BGOg1gVa.js} +1 -1
- package/dist/assets/PublicFormsPage-IlBXTnnv.js +1 -0
- package/dist/assets/{SettingsHub-DrmQJKTl.js → SettingsHub-D_bBB6HI.js} +1 -1
- package/dist/assets/{SettingsView-DQ4mtooC.js → SettingsView-CErPIsVb.js} +1 -1
- package/dist/assets/{SystemHubPage-CjV_--P3.js → SystemHubPage-B3lD5VE8.js} +1 -1
- package/dist/assets/data-adapter-DD2mxtaH.js +1 -0
- package/dist/assets/{framework-DpQcF_QW.js → framework-DmN5Xd7Z.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-BcbCsvGi.js → highlighted-body-OFNGDK62-_uUbA42F.js} +1 -1
- package/dist/assets/index-3n4YIBCx.js +33 -0
- package/dist/assets/index-DRnsSCuD.css +2 -0
- package/dist/assets/mermaid-GHXKKRXX-B0LJSQUI.js +1 -0
- package/dist/assets/plugin-calendar-CBSUjCse.js +1 -0
- package/dist/assets/{plugin-charts-CRlZ01tc.js → plugin-charts-C1pPCTiC.js} +2 -2
- package/dist/assets/plugin-chatbot-BHoielbC.js +120 -0
- package/dist/assets/plugin-dashboard-CrU-RT7P.js +3 -0
- package/dist/assets/{plugin-form-BzrcwmiI.js → plugin-form-YkI84B6S.js} +1 -1
- package/dist/assets/plugin-gantt-BM_qU02_.js +1 -0
- package/dist/assets/plugin-grid-C__XZwVh.js +6 -0
- package/dist/assets/plugin-kanban-DpM0Y5w1.js +1 -0
- package/dist/assets/{plugin-map-BKE-4AVm.js → plugin-map-D5wjaTuu.js} +1 -1
- package/dist/assets/{plugin-markdown-bkOWrh0-.js → plugin-markdown-BS1-ubYs.js} +1 -1
- package/dist/assets/plugin-report-ClF2T8j-.js +59 -0
- package/dist/assets/{plugin-timeline-ZI65E7h4.js → plugin-timeline-DHjoax2v.js} +1 -1
- package/dist/assets/plugin-view-DPiRuVYV.js +1 -0
- package/dist/assets/plugins-views-DKbDkBwY.js +4 -0
- package/dist/assets/{src-0fzF-kZX.js → src-DftmwA5L.js} +1 -1
- package/dist/assets/{types-C7d65SSU.js → types-X_Rma6be.js} +1 -1
- package/dist/assets/ui-components-ClOuWOoQ.js +41 -0
- package/dist/assets/ui-layout-Ciu790M0.js +1 -0
- package/dist/assets/vendor-objectstack-B5adaLmw.js +65 -0
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/ApprovalsInboxPage-BOY6Xpsn.js +0 -1
- package/dist/assets/AuditLogPage-DzIHYkL6.js +0 -1
- package/dist/assets/ConsoleFloatingChatbot-Dfub90-W.js +0 -1
- package/dist/assets/FlowRunsPage-DV2m0d1l.js +0 -1
- package/dist/assets/PublicFormsPage-CHWj3DL5.js +0 -1
- package/dist/assets/data-adapter-CX0Tq3Q5.js +0 -1
- package/dist/assets/index-DUV_YMtu.css +0 -2
- package/dist/assets/index-hBFJ6de4.js +0 -33
- package/dist/assets/mermaid-GHXKKRXX-DLb_WlhX.js +0 -1
- package/dist/assets/plugin-calendar-BGJsyv_O.js +0 -1
- package/dist/assets/plugin-chatbot-BhnqfdW0.js +0 -120
- package/dist/assets/plugin-dashboard-CUH4Dbo1.js +0 -3
- package/dist/assets/plugin-gantt-Dt2juPb1.js +0 -1
- package/dist/assets/plugin-grid-BHnAwQNY.js +0 -6
- package/dist/assets/plugin-kanban-lsYbj6Vr.js +0 -1
- package/dist/assets/plugin-report-CqzUFpeK.js +0 -59
- package/dist/assets/plugin-view-CGR-rgKC.js +0 -1
- package/dist/assets/plugins-views-CzwBozRK.js +0 -4
- package/dist/assets/ui-components-CXy53m_o.js +0 -41
- package/dist/assets/ui-layout-BqvRQUkZ.js +0 -1
- package/dist/assets/vendor-objectstack-DdIVmQL0.js +0 -65
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{r as t,y as n}from"./vendor-react-CyVA1SE-.js";import{f as r}from"./vendor-objectstack-DdIVmQL0.js";import{i,n as a,r as o,t as s}from"./vendor-i18n-DPyFo2xM.js";var c=new class{components=new Map;lazyEntries=new Map;listeners=new Set;register(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e;n?.namespace||console.warn(`Registering component "${e}" without a namespace is deprecated. Please provide a namespace in the meta parameter.\n\n Migration:\n // Before (deprecated):\n registry.register('${e}', MyComponent);\n\n // After:\n registry.register('${e}', MyComponent, { namespace: 'my-plugin' });\n\n See: https://github.com/objectstack-ai/objectui/blob/main/MIGRATION_GUIDE.md`),this.components.has(r),this.components.set(r,{type:r,component:t,...n}),n?.namespace&&!n?.skipFallback&&this.components.set(e,{type:r,component:t,...n}),this.lazyEntries.delete(r),this.lazyEntries.delete(e),this.notify()}registerLazy(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e,i={loader:t,meta:n};this.lazyEntries.set(r,i),n?.namespace&&!n?.skipFallback&&this.lazyEntries.set(e,i)}hasLazy(e,t){return t?this.lazyEntries.has(`${t}:${e}`):this.lazyEntries.has(e)}loadLazy(e,t){let n=t?`${t}:${e}`:e,r=this.lazyEntries.get(n);if(r)return r.pending||=r.loader().catch(e=>{throw r.pending=void 0,e}),r.pending}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(let e of this.listeners)try{e()}catch(e){console.error(`[Registry] listener error`,e)}}get(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)?.component}return this.components.get(e)?.component}getConfig(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)}return this.components.get(e)}has(e,t){if(t){let n=`${t}:${e}`;return this.components.has(n)}return this.components.has(e)}getAllTypes(){return Array.from(this.components.keys())}getAllConfigs(){return Array.from(this.components.values())}getNamespaceComponents(e){return Array.from(this.components.values()).filter(t=>t.namespace===e)}},l={type:{required:!0,validate:e=>typeof e==`string`&&e.length>0,message:`type must be a non-empty string`},id:{required:!1,validate:e=>typeof e==`string`,message:`id must be a string`},className:{required:!1,validate:e=>typeof e==`string`,message:`className must be a string`},visible:{required:!1,validate:e=>typeof e==`boolean`,message:`visible must be a boolean`},disabled:{required:!1,validate:e=>typeof e==`boolean`,message:`disabled must be a boolean`}};function u(e,t=`schema`){let n=[];return!e||typeof e!=`object`?(n.push({path:t,message:`Schema must be an object`,type:`error`,code:`INVALID_SCHEMA`}),n):(Object.entries(l).forEach(([r,i])=>{let a=e[r];i.required&&a===void 0&&n.push({path:`${t}.${r}`,message:`${r} is required`,type:`error`,code:`MISSING_REQUIRED`}),a!==void 0&&!i.validate(a)&&n.push({path:`${t}.${r}`,message:i.message,type:`error`,code:`INVALID_TYPE`})}),n)}function d(e,t=`schema`){let n=[];return e.type===`crud`&&((!e.columns||!Array.isArray(e.columns))&&n.push({path:`${t}.columns`,message:`CRUD schema requires columns array`,type:`error`,code:`MISSING_COLUMNS`}),!e.api&&!e.dataSource&&n.push({path:`${t}.api`,message:`CRUD schema requires api or dataSource`,type:`warning`,code:`MISSING_DATA_SOURCE`}),e.columns&&Array.isArray(e.columns)&&e.columns.forEach((e,r)=>{e.name||n.push({path:`${t}.columns[${r}]`,message:`Column requires name property`,type:`error`,code:`MISSING_COLUMN_NAME`})}),e.fields&&Array.isArray(e.fields)&&e.fields.forEach((e,r)=>{e.name||n.push({path:`${t}.fields[${r}]`,message:`Field requires name property`,type:`error`,code:`MISSING_FIELD_NAME`})})),n}function f(e,t=`schema`){let n=[];return e.type===`form`&&e.fields&&Array.isArray(e.fields)&&e.fields.forEach((r,i)=>{r.name||n.push({path:`${t}.fields[${i}]`,message:`Form field requires name property`,type:`error`,code:`MISSING_FIELD_NAME`}),e.fields.filter(e=>e.name===r.name).length>1&&n.push({path:`${t}.fields[${i}]`,message:`Duplicate field name: ${r.name}`,type:`warning`,code:`DUPLICATE_FIELD_NAME`})}),n}function p(e,t=`schema`){let n=[],r=e.children||e.body;if(r){if(Array.isArray(r))r.forEach((e,r)=>{if(typeof e==`object`&&e){let i=m(e,`${t}.children[${r}]`);n.push(...i.errors,...i.warnings)}});else if(typeof r==`object`&&r){let e=m(r,`${t}.children`);n.push(...e.errors,...e.warnings)}}return n}function m(e,t=`schema`){let n=[];n.push(...u(e,t)),n.push(...d(e,t)),n.push(...f(e,t)),n.push(...p(e,t));let r=n.filter(e=>e.type===`error`),i=n.filter(e=>e.type===`warning`);return{valid:r.length===0,errors:r,warnings:i}}function h(e){return{$eq:`=`,$ne:`!=`,$gt:`>`,$gte:`>=`,$lt:`<`,$lte:`<=`,$in:`in`,$nin:`nin`,$notin:`nin`,$between:`between`,$contains:`contains`,$notContains:`notcontains`,$notcontains:`notcontains`,$startsWith:`startswith`,$startswith:`startswith`,$endsWith:`endswith`,$endswith:`endswith`}[e]||null}function g(e){let t=[];for(let[n,r]of Object.entries(e))if(r!=null)if(typeof r==`object`&&!Array.isArray(r))for(let[e,i]of Object.entries(r)){if(e===`$regex`){console.warn(`[ObjectUI] Warning: \$regex operator is not fully supported. Converting to 'contains' which only supports substring matching, not regex patterns. Field: '${n}', Value: ${JSON.stringify(i)}. Consider using $contains or $startsWith instead.`),t.push([n,`contains`,i]);continue}if(e===`$null`){t.push([n,i?`is_null`:`is_not_null`,!0]);continue}if(e===`$exists`){t.push([n,i?`is_not_null`:`is_null`,!0]);continue}let r=h(e);if(r)t.push([n,r,i]);else throw Error(`[ObjectUI] Unknown filter operator '${e}' for field '${n}'. Supported operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $between, $contains, $notContains, $startsWith, $endsWith, $null, $exists. If you need exact object matching, use the value directly without an operator.`)}else t.push([n,`=`,r]);return t.length===0?e:t.length===1?t[0]:[`and`,...t]}function _(e){switch(e){case`equals`:case`eq`:return`=`;case`notEquals`:case`ne`:case`neq`:return`!=`;case`contains`:return`contains`;case`notContains`:return`notcontains`;case`greaterThan`:case`gt`:return`>`;case`greaterOrEqual`:case`gte`:return`>=`;case`lessThan`:case`lt`:return`<`;case`lessOrEqual`:case`lte`:return`<=`;case`in`:return`in`;case`notIn`:return`not in`;case`before`:return`<`;case`after`:return`>`;default:return e}}function v(e){if(`id`in e&&`filters`in e&&e.label&&Array.isArray(e.filters))return e;if(`field`in e&&`operator`in e){let t=_(e.operator);return{id:`${e.field}-${e.operator}-${String(e.value??``)}`,label:e.label||`${e.field} ${e.operator} ${String(e.value??``)}`,filters:[[e.field,t,e.value]],icon:e.icon,defaultActive:e.defaultActive}}return e}function y(e){if(!(!e||e.length===0))return e.map(v)}function b(e){if(Array.isArray(e))return e;if(e&&typeof e==`object`){if(Array.isArray(e.records))return e.records;if(Array.isArray(e.data))return e.data;if(Array.isArray(e.value))return e.value}return[]}function x(e,t){if(!e||typeof e!=`object`)return[];let n=[];for(let[t,r]of Object.entries(e))r&&typeof r==`object`&&(r.type===`lookup`||r.type===`master_detail`)&&n.push(t);if(n.length===0)return[];if(t&&Array.isArray(t)&&t.length>0){let e=new Set;for(let n of t)if(typeof n==`string`)e.add(n);else if(n&&typeof n==`object`){let t=n.field??n.name??n.fieldName;t&&e.add(t)}return n.filter(t=>e.has(t))}return n}var S=class e{scopes=[];constructor(e={}){this.scopes.push(new Map(Object.entries(e)))}pushScope(e){this.scopes.push(new Map(Object.entries(e)))}popScope(){this.scopes.length>1&&this.scopes.pop()}get(e){let t=e.split(`.`),n=t[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(n)){let r=this.scopes[e].get(n);for(let e=1;e<t.length;e++)if(r&&typeof r==`object`)r=r[t[e]];else return;return r}}set(e,t){this.scopes.length>0&&this.scopes[this.scopes.length-1].set(e,t)}has(e){let t=e.split(`.`)[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(t))return!0;return!1}toObject(){let e={};for(let t of this.scopes)for(let[n,r]of t.entries())e[n]=r;return e}createChild(t={}){let n=new e;return n.scopes=[...this.scopes,new Map(Object.entries(t))],n}},C={Math,JSON,parseInt,parseFloat,isNaN,isFinite},ee=new Set([`constructor`,`__proto__`,`prototype`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`]),te=class e{source=``;pos=0;context={};_evaluating=!0;evaluate(e,t){this.source=e.trim(),this.pos=0,this.context={...C,...t};let n=this.parseTernary();if(this.skipWhitespace(),this.pos<this.source.length)throw SyntaxError(`Unexpected token "${this.source[this.pos]}" at position ${this.pos} in expression "${e}"`);return n}skipWhitespace(){for(;this.pos<this.source.length&&/\s/.test(this.source[this.pos]);)this.pos++}peek(e=0){return this.source[this.pos+e]??``}consume(){return this.source[this.pos++]??``}withEvaluation(e,t){let n=this._evaluating;this._evaluating=e;try{return t()}finally{this._evaluating=n}}assertSafeProp(e){if(typeof e==`string`&&ee.has(e))throw TypeError(`Access to property "${e}" is not permitted in expressions`)}parseTernary(){let e=this.parseNullish();if(this.skipWhitespace(),this.peek()===`?`&&this.peek(1)!==`?`){if(this.pos++,this.skipWhitespace(),!this._evaluating){if(this.parseTernary(),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);this.pos++,this.skipWhitespace(),this.parseTernary();return}if(e){let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.withEvaluation(!1,()=>this.parseTernary()),e}else{if(this.withEvaluation(!1,()=>this.parseTernary()),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.parseTernary()}}return e}parseNullish(){let e=this.parseOr();for(this.skipWhitespace();this.peek()===`?`&&this.peek(1)===`?`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e!=null)this.withEvaluation(!1,()=>this.parseOr());else{let t=this.parseOr();this._evaluating&&(e??=t)}this.skipWhitespace()}return e}parseOr(){let e=this.parseAnd();for(this.skipWhitespace();this.peek()===`|`&&this.peek(1)===`|`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e)this.withEvaluation(!1,()=>this.parseAnd());else{let t=this.parseAnd();this._evaluating&&(e||=t)}this.skipWhitespace()}return e}parseAnd(){let e=this.parseEquality();for(this.skipWhitespace();this.peek()===`&`&&this.peek(1)===`&`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&!e)this.withEvaluation(!1,()=>this.parseEquality());else{let t=this.parseEquality();this._evaluating&&(e&&=t)}this.skipWhitespace()}return e}parseEquality(){let e=this.parseAddition();for(this.skipWhitespace();;){let t=null;if(this.peek()===`=`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`===`,this.pos+=3;else if(this.peek()===`!`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`!==`,this.pos+=3;else if(this.peek()===`=`&&this.peek(1)===`=`)t=`==`,this.pos+=2;else if(this.peek()===`!`&&this.peek(1)===`=`)t=`!=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)===`=`)t=`>=`,this.pos+=2;else if(this.peek()===`<`&&this.peek(1)===`=`)t=`<=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)!==`>`)t=`>`,this.pos++;else if(this.peek()===`<`&&this.peek(1)!==`<`)t=`<`,this.pos++;else break;this.skipWhitespace();let n=this.parseAddition();switch(t){case`===`:e=e===n;break;case`!==`:e=e!==n;break;case`==`:e=e==n;break;case`!=`:e=e!=n;break;case`>`:e=e>n;break;case`<`:e=e<n;break;case`>=`:e=e>=n;break;case`<=`:e=e<=n;break}this.skipWhitespace()}return e}parseAddition(){let e=this.parseMultiplication();for(this.skipWhitespace();(this.peek()===`+`||this.peek()===`-`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseMultiplication();e=t===`+`?e+n:e-n,this.skipWhitespace()}return e}parseMultiplication(){let e=this.parseUnary();for(this.skipWhitespace();(this.peek()===`*`||this.peek()===`/`||this.peek()===`%`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseUnary();t===`*`?e*=n:t===`/`?e/=n:e%=n,this.skipWhitespace()}return e}parseUnary(){if(this.skipWhitespace(),this.source.startsWith(`typeof`,this.pos)&&!/[\w$]/.test(this.source[this.pos+6]??``)){this.pos+=6,this.skipWhitespace();try{return typeof this.parseUnary()}catch{return`undefined`}}return this.peek()===`!`?(this.pos++,!this.parseUnary()):this.peek()===`-`?(this.pos++,-this.parseUnary()):this.peek()===`+`?(this.pos++,+this.parseUnary()):this.parseMember()}parseMember(){let e=this.parsePrimary();for(;;){this.skipWhitespace();let t=this.peek()===`?`&&this.peek(1)===`.`;if(this.peek()===`.`&&this.peek(1)!==`.`||t){t&&this.pos++,this.pos++,this.skipWhitespace();let n=this.parseIdentifierName();if(!n)break;if(this.assertSafeProp(n),this.skipWhitespace(),this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}e=e!=null&&typeof e[n]==`function`?e[n](...t):void 0}else{if(!this._evaluating){e=void 0;continue}e=e?.[n]}continue}let n=this.peek()===`?`&&this.peek(1)===`[`;if(this.peek()===`[`||n){n&&this.pos++,this.pos++,this.skipWhitespace();let t=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`]`)throw SyntaxError(`Expected "]" after bracket expression at position ${this.pos}`);if(this.pos++,this.assertSafeProp(t),!this._evaluating){e=void 0;continue}e=e?.[t];continue}if(this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}if(typeof e==`function`)e=e(...t);else throw TypeError(`${String(e)} is not a function`);continue}break}return e}parsePrimary(){this.skipWhitespace();let e=this.peek();if(e===`(`){this.pos++;let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`)`)throw SyntaxError(`Expected ")" to close "(" expression at position ${this.pos}`);return this.pos++,e}if(e===`[`)return this.parseArrayLiteral();if(e===`"`||e===`'`)return this.parseString(e);if(/\d/.test(e)||e===`.`&&/\d/.test(this.peek(1)))return this.parseNumber();if(/[a-zA-Z_$]/.test(e))return this.parseIdentifierOrKeyword();throw SyntaxError(`Unexpected character "${e}" at position ${this.pos}`)}parseArrayLiteral(){this.pos++;let e=[];for(this.skipWhitespace();this.peek()!==`]`&&this.pos<this.source.length;)e.push(this.parseTernary()),this.skipWhitespace(),this.peek()===`,`&&(this.pos++,this.skipWhitespace());if(this.peek()!==`]`)throw SyntaxError(`Expected "]" to close array literal at position ${this.pos}`);return this.pos++,e}parseString(e){this.pos++;let t=``;for(;this.pos<this.source.length;){let n=this.source[this.pos];if(n===`\\`){this.pos++;let e=this.source[this.pos++]??``;switch(e){case`n`:t+=`
|
|
1
|
+
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{r as t,y as n}from"./vendor-react-CyVA1SE-.js";import{m as r}from"./vendor-objectstack-B5adaLmw.js";import{i,n as a,r as o,t as s}from"./vendor-i18n-DPyFo2xM.js";var c=new class{components=new Map;lazyEntries=new Map;listeners=new Set;register(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e;n?.namespace||console.warn(`Registering component "${e}" without a namespace is deprecated. Please provide a namespace in the meta parameter.\n\n Migration:\n // Before (deprecated):\n registry.register('${e}', MyComponent);\n\n // After:\n registry.register('${e}', MyComponent, { namespace: 'my-plugin' });\n\n See: https://github.com/objectstack-ai/objectui/blob/main/MIGRATION_GUIDE.md`),this.components.has(r),this.components.set(r,{type:r,component:t,...n}),n?.namespace&&!n?.skipFallback&&this.components.set(e,{type:r,component:t,...n}),this.lazyEntries.delete(r),this.lazyEntries.delete(e),this.notify()}registerLazy(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e,i={loader:t,meta:n};this.lazyEntries.set(r,i),n?.namespace&&!n?.skipFallback&&this.lazyEntries.set(e,i)}hasLazy(e,t){return t?this.lazyEntries.has(`${t}:${e}`):this.lazyEntries.has(e)}loadLazy(e,t){let n=t?`${t}:${e}`:e,r=this.lazyEntries.get(n);if(r)return r.pending||=r.loader().catch(e=>{throw r.pending=void 0,e}),r.pending}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(let e of this.listeners)try{e()}catch(e){console.error(`[Registry] listener error`,e)}}get(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)?.component}return this.components.get(e)?.component}getConfig(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)}return this.components.get(e)}has(e,t){if(t){let n=`${t}:${e}`;return this.components.has(n)}return this.components.has(e)}getAllTypes(){return Array.from(this.components.keys())}getAllConfigs(){return Array.from(this.components.values())}getNamespaceComponents(e){return Array.from(this.components.values()).filter(t=>t.namespace===e)}},l={type:{required:!0,validate:e=>typeof e==`string`&&e.length>0,message:`type must be a non-empty string`},id:{required:!1,validate:e=>typeof e==`string`,message:`id must be a string`},className:{required:!1,validate:e=>typeof e==`string`,message:`className must be a string`},visible:{required:!1,validate:e=>typeof e==`boolean`,message:`visible must be a boolean`},disabled:{required:!1,validate:e=>typeof e==`boolean`,message:`disabled must be a boolean`}};function u(e,t=`schema`){let n=[];return!e||typeof e!=`object`?(n.push({path:t,message:`Schema must be an object`,type:`error`,code:`INVALID_SCHEMA`}),n):(Object.entries(l).forEach(([r,i])=>{let a=e[r];i.required&&a===void 0&&n.push({path:`${t}.${r}`,message:`${r} is required`,type:`error`,code:`MISSING_REQUIRED`}),a!==void 0&&!i.validate(a)&&n.push({path:`${t}.${r}`,message:i.message,type:`error`,code:`INVALID_TYPE`})}),n)}function d(e,t=`schema`){let n=[];return e.type===`crud`&&((!e.columns||!Array.isArray(e.columns))&&n.push({path:`${t}.columns`,message:`CRUD schema requires columns array`,type:`error`,code:`MISSING_COLUMNS`}),!e.api&&!e.dataSource&&n.push({path:`${t}.api`,message:`CRUD schema requires api or dataSource`,type:`warning`,code:`MISSING_DATA_SOURCE`}),e.columns&&Array.isArray(e.columns)&&e.columns.forEach((e,r)=>{e.name||n.push({path:`${t}.columns[${r}]`,message:`Column requires name property`,type:`error`,code:`MISSING_COLUMN_NAME`})}),e.fields&&Array.isArray(e.fields)&&e.fields.forEach((e,r)=>{e.name||n.push({path:`${t}.fields[${r}]`,message:`Field requires name property`,type:`error`,code:`MISSING_FIELD_NAME`})})),n}function f(e,t=`schema`){let n=[];return e.type===`form`&&e.fields&&Array.isArray(e.fields)&&e.fields.forEach((r,i)=>{r.name||n.push({path:`${t}.fields[${i}]`,message:`Form field requires name property`,type:`error`,code:`MISSING_FIELD_NAME`}),e.fields.filter(e=>e.name===r.name).length>1&&n.push({path:`${t}.fields[${i}]`,message:`Duplicate field name: ${r.name}`,type:`warning`,code:`DUPLICATE_FIELD_NAME`})}),n}function p(e,t=`schema`){let n=[],r=e.children||e.body;if(r){if(Array.isArray(r))r.forEach((e,r)=>{if(typeof e==`object`&&e){let i=m(e,`${t}.children[${r}]`);n.push(...i.errors,...i.warnings)}});else if(typeof r==`object`&&r){let e=m(r,`${t}.children`);n.push(...e.errors,...e.warnings)}}return n}function m(e,t=`schema`){let n=[];n.push(...u(e,t)),n.push(...d(e,t)),n.push(...f(e,t)),n.push(...p(e,t));let r=n.filter(e=>e.type===`error`),i=n.filter(e=>e.type===`warning`);return{valid:r.length===0,errors:r,warnings:i}}function h(e){return{$eq:`=`,$ne:`!=`,$gt:`>`,$gte:`>=`,$lt:`<`,$lte:`<=`,$in:`in`,$nin:`nin`,$notin:`nin`,$between:`between`,$contains:`contains`,$notContains:`notcontains`,$notcontains:`notcontains`,$startsWith:`startswith`,$startswith:`startswith`,$endsWith:`endswith`,$endswith:`endswith`}[e]||null}function g(e){let t=[];for(let[n,r]of Object.entries(e))if(r!=null)if(typeof r==`object`&&!Array.isArray(r))for(let[e,i]of Object.entries(r)){if(e===`$regex`){console.warn(`[ObjectUI] Warning: \$regex operator is not fully supported. Converting to 'contains' which only supports substring matching, not regex patterns. Field: '${n}', Value: ${JSON.stringify(i)}. Consider using $contains or $startsWith instead.`),t.push([n,`contains`,i]);continue}if(e===`$null`){t.push([n,i?`is_null`:`is_not_null`,!0]);continue}if(e===`$exists`){t.push([n,i?`is_not_null`:`is_null`,!0]);continue}let r=h(e);if(r)t.push([n,r,i]);else throw Error(`[ObjectUI] Unknown filter operator '${e}' for field '${n}'. Supported operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $between, $contains, $notContains, $startsWith, $endsWith, $null, $exists. If you need exact object matching, use the value directly without an operator.`)}else t.push([n,`=`,r]);return t.length===0?e:t.length===1?t[0]:[`and`,...t]}function _(e){switch(e){case`equals`:case`eq`:return`=`;case`notEquals`:case`ne`:case`neq`:return`!=`;case`contains`:return`contains`;case`notContains`:return`notcontains`;case`greaterThan`:case`gt`:return`>`;case`greaterOrEqual`:case`gte`:return`>=`;case`lessThan`:case`lt`:return`<`;case`lessOrEqual`:case`lte`:return`<=`;case`in`:return`in`;case`notIn`:return`not in`;case`before`:return`<`;case`after`:return`>`;default:return e}}function v(e){if(`id`in e&&`filters`in e&&e.label&&Array.isArray(e.filters))return e;if(`field`in e&&`operator`in e){let t=_(e.operator);return{id:`${e.field}-${e.operator}-${String(e.value??``)}`,label:e.label||`${e.field} ${e.operator} ${String(e.value??``)}`,filters:[[e.field,t,e.value]],icon:e.icon,defaultActive:e.defaultActive}}return e}function y(e){if(!(!e||e.length===0))return e.map(v)}function b(e){if(Array.isArray(e))return e;if(e&&typeof e==`object`){if(Array.isArray(e.records))return e.records;if(Array.isArray(e.data))return e.data;if(Array.isArray(e.value))return e.value}return[]}function x(e,t){if(!e||typeof e!=`object`)return[];let n=[];for(let[t,r]of Object.entries(e))r&&typeof r==`object`&&(r.type===`lookup`||r.type===`master_detail`)&&n.push(t);if(n.length===0)return[];if(t&&Array.isArray(t)&&t.length>0){let e=new Set;for(let n of t)if(typeof n==`string`)e.add(n);else if(n&&typeof n==`object`){let t=n.field??n.name??n.fieldName;t&&e.add(t)}return n.filter(t=>e.has(t))}return n}var S=class e{scopes=[];constructor(e={}){this.scopes.push(new Map(Object.entries(e)))}pushScope(e){this.scopes.push(new Map(Object.entries(e)))}popScope(){this.scopes.length>1&&this.scopes.pop()}get(e){let t=e.split(`.`),n=t[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(n)){let r=this.scopes[e].get(n);for(let e=1;e<t.length;e++)if(r&&typeof r==`object`)r=r[t[e]];else return;return r}}set(e,t){this.scopes.length>0&&this.scopes[this.scopes.length-1].set(e,t)}has(e){let t=e.split(`.`)[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(t))return!0;return!1}toObject(){let e={};for(let t of this.scopes)for(let[n,r]of t.entries())e[n]=r;return e}createChild(t={}){let n=new e;return n.scopes=[...this.scopes,new Map(Object.entries(t))],n}},C={Math,JSON,parseInt,parseFloat,isNaN,isFinite},ee=new Set([`constructor`,`__proto__`,`prototype`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`]),te=class e{source=``;pos=0;context={};_evaluating=!0;evaluate(e,t){this.source=e.trim(),this.pos=0,this.context={...C,...t};let n=this.parseTernary();if(this.skipWhitespace(),this.pos<this.source.length)throw SyntaxError(`Unexpected token "${this.source[this.pos]}" at position ${this.pos} in expression "${e}"`);return n}skipWhitespace(){for(;this.pos<this.source.length&&/\s/.test(this.source[this.pos]);)this.pos++}peek(e=0){return this.source[this.pos+e]??``}consume(){return this.source[this.pos++]??``}withEvaluation(e,t){let n=this._evaluating;this._evaluating=e;try{return t()}finally{this._evaluating=n}}assertSafeProp(e){if(typeof e==`string`&&ee.has(e))throw TypeError(`Access to property "${e}" is not permitted in expressions`)}parseTernary(){let e=this.parseNullish();if(this.skipWhitespace(),this.peek()===`?`&&this.peek(1)!==`?`){if(this.pos++,this.skipWhitespace(),!this._evaluating){if(this.parseTernary(),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);this.pos++,this.skipWhitespace(),this.parseTernary();return}if(e){let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.withEvaluation(!1,()=>this.parseTernary()),e}else{if(this.withEvaluation(!1,()=>this.parseTernary()),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.parseTernary()}}return e}parseNullish(){let e=this.parseOr();for(this.skipWhitespace();this.peek()===`?`&&this.peek(1)===`?`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e!=null)this.withEvaluation(!1,()=>this.parseOr());else{let t=this.parseOr();this._evaluating&&(e??=t)}this.skipWhitespace()}return e}parseOr(){let e=this.parseAnd();for(this.skipWhitespace();this.peek()===`|`&&this.peek(1)===`|`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e)this.withEvaluation(!1,()=>this.parseAnd());else{let t=this.parseAnd();this._evaluating&&(e||=t)}this.skipWhitespace()}return e}parseAnd(){let e=this.parseEquality();for(this.skipWhitespace();this.peek()===`&`&&this.peek(1)===`&`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&!e)this.withEvaluation(!1,()=>this.parseEquality());else{let t=this.parseEquality();this._evaluating&&(e&&=t)}this.skipWhitespace()}return e}parseEquality(){let e=this.parseAddition();for(this.skipWhitespace();;){let t=null;if(this.peek()===`=`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`===`,this.pos+=3;else if(this.peek()===`!`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`!==`,this.pos+=3;else if(this.peek()===`=`&&this.peek(1)===`=`)t=`==`,this.pos+=2;else if(this.peek()===`!`&&this.peek(1)===`=`)t=`!=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)===`=`)t=`>=`,this.pos+=2;else if(this.peek()===`<`&&this.peek(1)===`=`)t=`<=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)!==`>`)t=`>`,this.pos++;else if(this.peek()===`<`&&this.peek(1)!==`<`)t=`<`,this.pos++;else break;this.skipWhitespace();let n=this.parseAddition();switch(t){case`===`:e=e===n;break;case`!==`:e=e!==n;break;case`==`:e=e==n;break;case`!=`:e=e!=n;break;case`>`:e=e>n;break;case`<`:e=e<n;break;case`>=`:e=e>=n;break;case`<=`:e=e<=n;break}this.skipWhitespace()}return e}parseAddition(){let e=this.parseMultiplication();for(this.skipWhitespace();(this.peek()===`+`||this.peek()===`-`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseMultiplication();e=t===`+`?e+n:e-n,this.skipWhitespace()}return e}parseMultiplication(){let e=this.parseUnary();for(this.skipWhitespace();(this.peek()===`*`||this.peek()===`/`||this.peek()===`%`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseUnary();t===`*`?e*=n:t===`/`?e/=n:e%=n,this.skipWhitespace()}return e}parseUnary(){if(this.skipWhitespace(),this.source.startsWith(`typeof`,this.pos)&&!/[\w$]/.test(this.source[this.pos+6]??``)){this.pos+=6,this.skipWhitespace();try{return typeof this.parseUnary()}catch{return`undefined`}}return this.peek()===`!`?(this.pos++,!this.parseUnary()):this.peek()===`-`?(this.pos++,-this.parseUnary()):this.peek()===`+`?(this.pos++,+this.parseUnary()):this.parseMember()}parseMember(){let e=this.parsePrimary();for(;;){this.skipWhitespace();let t=this.peek()===`?`&&this.peek(1)===`.`;if(this.peek()===`.`&&this.peek(1)!==`.`||t){t&&this.pos++,this.pos++,this.skipWhitespace();let n=this.parseIdentifierName();if(!n)break;if(this.assertSafeProp(n),this.skipWhitespace(),this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}e=e!=null&&typeof e[n]==`function`?e[n](...t):void 0}else{if(!this._evaluating){e=void 0;continue}e=e?.[n]}continue}let n=this.peek()===`?`&&this.peek(1)===`[`;if(this.peek()===`[`||n){n&&this.pos++,this.pos++,this.skipWhitespace();let t=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`]`)throw SyntaxError(`Expected "]" after bracket expression at position ${this.pos}`);if(this.pos++,this.assertSafeProp(t),!this._evaluating){e=void 0;continue}e=e?.[t];continue}if(this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}if(typeof e==`function`)e=e(...t);else throw TypeError(`${String(e)} is not a function`);continue}break}return e}parsePrimary(){this.skipWhitespace();let e=this.peek();if(e===`(`){this.pos++;let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`)`)throw SyntaxError(`Expected ")" to close "(" expression at position ${this.pos}`);return this.pos++,e}if(e===`[`)return this.parseArrayLiteral();if(e===`"`||e===`'`)return this.parseString(e);if(/\d/.test(e)||e===`.`&&/\d/.test(this.peek(1)))return this.parseNumber();if(/[a-zA-Z_$]/.test(e))return this.parseIdentifierOrKeyword();throw SyntaxError(`Unexpected character "${e}" at position ${this.pos}`)}parseArrayLiteral(){this.pos++;let e=[];for(this.skipWhitespace();this.peek()!==`]`&&this.pos<this.source.length;)e.push(this.parseTernary()),this.skipWhitespace(),this.peek()===`,`&&(this.pos++,this.skipWhitespace());if(this.peek()!==`]`)throw SyntaxError(`Expected "]" to close array literal at position ${this.pos}`);return this.pos++,e}parseString(e){this.pos++;let t=``;for(;this.pos<this.source.length;){let n=this.source[this.pos];if(n===`\\`){this.pos++;let e=this.source[this.pos++]??``;switch(e){case`n`:t+=`
|
|
2
2
|
`;break;case`t`:t+=` `;break;case`r`:t+=`\r`;break;case`\\`:t+=`\\`;break;case`"`:t+=`"`;break;case`'`:t+=`'`;break;case"`":t+="`";break;default:t+=e}}else if(n===e){this.pos++;break}else t+=n,this.pos++}return t}parseNumber(){let e=this.pos,t=!1;for(;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t=!0,this.pos++;if(this.source[this.pos]===`.`)for(this.pos++;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t=!0,this.pos++;if(/[eE]/.test(this.source[this.pos]??``)){this.pos++,/[+\-]/.test(this.source[this.pos]??``)&&this.pos++;let t=0;for(;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t++,this.pos++;if(t===0)throw SyntaxError(`Invalid numeric literal exponent at position ${e}`)}if(!t)throw SyntaxError(`Invalid numeric literal at position ${e}`);let n=this.source.slice(e,this.pos),r=Number(n);if(!Number.isFinite(r))throw SyntaxError(`Invalid numeric literal "${n}" at position ${e}`);return r}parseIdentifierName(){let e=this.pos;for(;this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]);)this.pos++;return this.source.slice(e,this.pos)}parseIdentifierOrKeyword(){let e=this.parseIdentifierName();switch(e){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return;case`NaN`:return NaN;case`Infinity`:return 1/0}if(e===`new`)return this.parseNewExpression();if(this.skipWhitespace(),this.peek()===`=`&&this.peek(1)===`>`)return this.parseArrowFunction(e);if(this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating)return;let n=this.context[e];if(typeof n==`function`)return n(...t);throw TypeError(`"${e}" is not a function`)}if(this._evaluating){if(!(e in this.context))throw ReferenceError(`${e} is not defined`);return this.context[e]}}parseNewExpression(){this.skipWhitespace();let e=this.parseIdentifierName();this.skipWhitespace();let t=[];if(this.peek()===`(`){if(this.pos++,t=this.parseArgList(),this.peek()!==`)`)throw SyntaxError(`Expected ")" after new ${e}() at position ${this.pos}`);this.pos++}if(this._evaluating)switch(e){case`Date`:return new Date(...t);case`RegExp`:return new RegExp(t[0],t[1]);default:throw TypeError(`new ${e}() is not supported in expressions`)}}parseArrowFunction(t){this.pos+=2,this.skipWhitespace();let n=this.pos,r=this.scanExpressionEnd(),i=this.source.slice(n,r).trim();this.pos=r;let a=this.context;return n=>new e().evaluate(i,{...a,[t]:n})}scanExpressionEnd(){let e=this.pos,t=0,n=!1,r=``;for(;e<this.source.length;){let i=this.source[e];if(n){if(i===`\\`){e+=2;continue}i===r&&(n=!1),e++;continue}if(i===`"`||i===`'`){n=!0,r=i,e++;continue}if(i===`(`||i===`[`)t++;else if(i===`)`||i===`]`){if(t===0)break;t--}else if(i===`,`&&t===0)break;e++}return e}parseArgList(){let e=[];for(this.skipWhitespace();this.peek()!==`)`&&this.pos<this.source.length;)e.push(this.parseTernary()),this.skipWhitespace(),this.peek()===`,`&&(this.pos++,this.skipWhitespace());return e}},w=class{cache=new Map;maxSize;constructor(e=1e3){this.maxSize=e}compile(e,t){let n=`${e}::${t.join(`,`)}`;if(this.cache.has(n)){let e=this.cache.get(n);return e.hitCount++,e}this.cache.size>=this.maxSize&&this.evictLFU();let r={fn:this.compileExpression(e,t),varNames:[...t],expression:e,compiledAt:Date.now(),hitCount:1};return this.cache.set(n,r),r}compileExpression(e,t){let n=new te;return(...r)=>{let i={};for(let e=0;e<t.length;e++)i[t[e]]=r[e];return n.evaluate(e,i)}}evictLFU(){let e=null,t=1/0,n=1/0;for(let[r,i]of this.cache.entries())(i.hitCount<n||i.hitCount===n&&i.compiledAt<t)&&(e=r,t=i.compiledAt,n=i.hitCount);e&&this.cache.delete(e)}has(e,t){let n=`${e}::${t.join(`,`)}`;return this.cache.has(n)}clear(){this.cache.clear()}getStats(){let e=0,t=[];for(let n of this.cache.values())e+=n.hitCount,t.push({expression:n.expression,hitCount:n.hitCount});return{size:this.cache.size,maxSize:this.maxSize,totalHits:e,entries:t.sort((e,t)=>t.hitCount-e.hitCount)}}},T=class{functions=new Map;constructor(){this.registerDefaults()}register(e,t){this.functions.set(e.toUpperCase(),t)}get(e){return this.functions.get(e.toUpperCase())}has(e){return this.functions.has(e.toUpperCase())}getNames(){return Array.from(this.functions.keys())}toObject(){let e={};for(let[t,n]of this.functions)e[t]=n;return e}registerDefaults(){this.registerAggregationFunctions(),this.registerDateFunctions(),this.registerLogicFunctions(),this.registerStringFunctions(),this.registerStringSearchFunctions(),this.registerStatisticalFunctions()}registerAggregationFunctions(){this.register(`SUM`,(...e)=>E(e).reduce((e,t)=>e+t,0)),this.register(`AVG`,(...e)=>{let t=E(e);return t.length===0?0:t.reduce((e,t)=>e+t,0)/t.length}),this.register(`COUNT`,(...e)=>D(e).filter(e=>e!=null).length),this.register(`MIN`,(...e)=>{let t=E(e);return t.length===0?0:Math.min(...t)}),this.register(`MAX`,(...e)=>{let t=E(e);return t.length===0?0:Math.max(...t)})}registerDateFunctions(){this.register(`TODAY`,()=>new Date().toISOString().split(`T`)[0]),this.register(`NOW`,()=>new Date().toISOString()),this.register(`DATEADD`,(e,t,n)=>{let r=new Date(e);if(isNaN(r.getTime()))throw Error(`DATEADD: Invalid date "${e}"`);switch(String(n).toLowerCase()){case`day`:case`days`:r.setDate(r.getDate()+t);break;case`month`:case`months`:r.setMonth(r.getMonth()+t);break;case`year`:case`years`:r.setFullYear(r.getFullYear()+t);break;case`hour`:case`hours`:r.setHours(r.getHours()+t);break;case`minute`:case`minutes`:r.setMinutes(r.getMinutes()+t);break;default:throw Error(`DATEADD: Unsupported unit "${n}"`)}return r.toISOString()}),this.register(`DATEDIFF`,(e,t,n)=>{let r=new Date(e),i=new Date(t);if(isNaN(r.getTime()))throw Error(`DATEDIFF: Invalid date "${e}"`);if(isNaN(i.getTime()))throw Error(`DATEDIFF: Invalid date "${t}"`);let a=i.getTime()-r.getTime();switch(String(n).toLowerCase()){case`day`:case`days`:return Math.floor(a/(1e3*60*60*24));case`month`:case`months`:return(i.getFullYear()-r.getFullYear())*12+(i.getMonth()-r.getMonth());case`year`:case`years`:return i.getFullYear()-r.getFullYear();case`hour`:case`hours`:return Math.floor(a/(1e3*60*60));case`minute`:case`minutes`:return Math.floor(a/(1e3*60));default:throw Error(`DATEDIFF: Unsupported unit "${n}"`)}}),this.register(`DATEFORMAT`,(e,t)=>{let n=new Date(e);if(isNaN(n.getTime()))throw Error(`DATEFORMAT: Invalid date "${e}"`);let r=(e,t=2)=>String(e).padStart(t,`0`);return t.replace(`YYYY`,String(n.getFullYear())).replace(`YY`,String(n.getFullYear()).slice(-2)).replace(`MM`,r(n.getMonth()+1)).replace(`DD`,r(n.getDate())).replace(`HH`,r(n.getHours())).replace(`mm`,r(n.getMinutes())).replace(`ss`,r(n.getSeconds()))})}registerLogicFunctions(){this.register(`IF`,(e,t,n)=>e?t:n),this.register(`AND`,(...e)=>e.every(Boolean)),this.register(`OR`,(...e)=>e.some(Boolean)),this.register(`NOT`,e=>!e),this.register(`SWITCH`,(e,...t)=>{for(let n=0;n<t.length-1;n+=2)if(e===t[n])return t[n+1];if(t.length%2==1)return t[t.length-1]})}registerStringFunctions(){this.register(`CONCAT`,(...e)=>e.map(e=>String(e??``)).join(``)),this.register(`LEFT`,(e,t)=>String(e??``).substring(0,t)),this.register(`RIGHT`,(e,t)=>{let n=String(e??``);return n.substring(Math.max(0,n.length-t))}),this.register(`TRIM`,e=>String(e??``).trim()),this.register(`UPPER`,e=>String(e??``).toUpperCase()),this.register(`LOWER`,e=>String(e??``).toLowerCase())}registerStringSearchFunctions(){this.register(`FIND`,(e,t,n)=>String(t??``).indexOf(String(e??``),n??0)),this.register(`REPLACE`,(e,t,n)=>String(e??``).split(String(t??``)).join(String(n??``))),this.register(`SUBSTRING`,(e,t,n)=>{let r=String(e??``);return n===void 0?r.substring(t):r.substring(t,t+n)}),this.register(`REGEX`,(e,t,n)=>{let r=String(e??``);return new RegExp(t,n).test(r)}),this.register(`LEN`,e=>String(e??``).length)}registerStatisticalFunctions(){this.register(`MEDIAN`,(...e)=>{let t=E(e).sort((e,t)=>e-t);if(t.length===0)return 0;let n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}),this.register(`STDEV`,(...e)=>{let t=E(e);if(t.length<2)return 0;let n=t.reduce((e,t)=>e+t,0)/t.length,r=t.map(e=>(e-n)**2).reduce((e,t)=>e+t,0)/(t.length-1);return Math.sqrt(r)}),this.register(`VARIANCE`,(...e)=>{let t=E(e);if(t.length<2)return 0;let n=t.reduce((e,t)=>e+t,0)/t.length;return t.map(e=>(e-n)**2).reduce((e,t)=>e+t,0)/(t.length-1)}),this.register(`PERCENTILE`,(e,...t)=>{let n=E(t).sort((e,t)=>e-t);if(n.length===0)return 0;let r=Math.max(0,Math.min(100,e))/100*(n.length-1),i=Math.floor(r),a=Math.ceil(r);if(i===a)return n[i];let o=r-i;return n[i]+o*(n[a]-n[i])})}};function E(e){let t=[];for(let n of e)if(Array.isArray(n))t.push(...E(n));else{let e=Number(n);isNaN(e)||t.push(e)}return t}function D(e){let t=[];for(let n of e)Array.isArray(n)?t.push(...D(n)):t.push(n);return t}var O=class e{context;cache;formulas;constructor(e,t,n){e instanceof S?this.context=e:this.context=new S(e||{}),this.cache=t||new w,this.formulas=n||new T}evaluate(e,t={}){if(e&&typeof e==`object`&&typeof e.source==`string`&&(e=e.source),typeof e!=`string`)return e;let{defaultValue:n,throwOnError:r=!1,sanitize:i=!0}=t;try{if(!e.includes("${"))return e;let t=e.match(/^\$\{([^}]+)\}$/);return t?this.evaluateExpression(t[1].trim(),{sanitize:i}):e.replace(/\$\{([^}]+)\}/g,(e,t)=>{try{let e=this.evaluateExpression(t.trim(),{sanitize:i});return String(e??``)}catch(n){if(r)throw n;return console.warn(`Expression evaluation failed for: ${t}`,n),e}})}catch(t){if(r)throw t;return console.warn(`Failed to evaluate expression: ${e}`,t),n??e}}evaluateExpression(e,t={}){let{sanitize:n=!0}=t;if(!(!e||e.trim()===``)){if(n&&this.isDangerous(e))throw Error(`Potentially dangerous expression detected: ${e}`);try{let t=this.context.toObject(),n={...this.formulas.toObject(),...t},r=Object.keys(n),i=Object.values(n);return this.cache.compile(e,r).fn(...i)}catch(t){throw Error(`Failed to evaluate expression "${e}": ${t.message}`)}}}isDangerous(e){return[/eval\s*\(/i,/Function\s*\(/i,/setTimeout\s*\(/i,/setInterval\s*\(/i,/import\s*\(/i,/require\s*\(/i,/process\./i,/global\./i,/window\./i,/document\./i,/__proto__/i,/constructor\s*\(/i,/prototype\./i].some(t=>t.test(e))}evaluateCondition(e,t={}){return typeof e==`boolean`?e:(e&&typeof e==`object`&&typeof e.source==`string`&&(e=e.source),e?!!this.evaluate(e,t):!0)}updateContext(e){Object.entries(e).forEach(([e,t])=>{this.context.set(e,t)})}getContext(){return this.context}withContext(t){return new e(this.context.createChild(t),this.cache,this.formulas)}getCacheStats(){return this.cache.getStats()}clearCache(){this.cache.clear()}getFormulas(){return this.formulas}registerFunction(e,t){this.formulas.register(e,t)}},k=new w,A=new T;function ne(e,t){let n=new O({...t,data:t},k,A);try{return(/\$\{/.test(e)?n.evaluate(e,{throwOnError:!0}):n.evaluateExpression(e))===!0}catch{return!1}}var j=class{handlers=new Map;scripts=new Map;evaluator;context;confirmHandler;toastHandler;modalHandler;navigationHandler;paramCollectionHandler;resultDialogHandler;constructor(e={}){this.context=e,this.evaluator=new O(e),this.confirmHandler=async e=>window.confirm(e),this.toastHandler=null,this.modalHandler=null,this.navigationHandler=null,this.paramCollectionHandler=null,this.resultDialogHandler=null}setConfirmHandler(e){this.confirmHandler=e}setToastHandler(e){this.toastHandler=e}setModalHandler(e){this.modalHandler=e}setNavigationHandler(e){this.navigationHandler=e}setParamCollectionHandler(e){this.paramCollectionHandler=e}setResultDialogHandler(e){this.resultDialogHandler=e}registerHandler(e,t){this.handlers.set(e,t)}unregisterHandler(e){this.handlers.delete(e)}registerScript(e,t){this.scripts.set(e,t)}unregisterScript(e){this.scripts.delete(e)}async execute(e){try{let t=e.type||e.actionType||e.name||``;if(e.condition&&!this.evaluator.evaluateCondition(e.condition))return{success:!1,error:`Action condition not met`};if(e.disabled&&(typeof e.disabled==`string`?this.evaluator.evaluateCondition(e.disabled):e.disabled))return{success:!1,error:`Action is disabled`};let n=e.confirm?.message||e.confirmText;if(n&&!await this.confirmHandler(this.evaluator.evaluate(n),e.confirm?{title:e.confirm.title,confirmText:e.confirm.confirmText,cancelText:e.confirm.cancelText}:void 0))return{success:!1,error:`Action cancelled by user`};let r=e.actionParams&&Array.isArray(e.actionParams)?e.actionParams:Array.isArray(e.params)?e.params:void 0;if(r&&r.length>0&&this.paramCollectionHandler){let t=await this.paramCollectionHandler(r,e);if(t===null)return{success:!1,error:`Action cancelled by user (params)`};let n=Array.isArray(e.params)?{}:e.params||{},i=n._rowRecord;e.params={...n,...t},i!==void 0&&(e.params._rowRecord=i)}if(t&&this.handlers.has(t)){let n=await this.handlers.get(t)(e,this.context);return await this.handlePostExecution(e,n),n}let i;switch(t){case`script`:i=await this.executeScript(e);break;case`url`:i=await this.executeUrl(e);break;case`modal`:i=await this.executeModal(e);break;case`flow`:i=await this.executeFlow(e);break;case`api`:i=await this.executeAPI(e);break;case`navigation`:i=await this.executeNavigation(e);break;default:e.navigate?i=await this.executeNavigation(e):e.api||e.endpoint?i=await this.executeAPI(e):e.onClick?(await e.onClick(),i={success:!0}):i=await this.executeActionSchema(e)}return await this.handlePostExecution(e,i),i}catch(t){let n={success:!1,error:t.message};return await this.handlePostExecution(e,n),n}}async executeChain(e,t=`sequential`){if(e.length===0)return{success:!0};if(t===`parallel`){let t=await Promise.allSettled(e.map(e=>this.execute(e)));if(t.filter(e=>e.status===`rejected`||e.status===`fulfilled`&&!e.value.success).length>0)return{success:!1,error:t.find(e=>e.status===`fulfilled`&&!e.value.success)?.value?.error||`One or more parallel actions failed`};let n=t[t.length-1];return n.status===`fulfilled`?n.value:{success:!1,error:`Action failed`}}let n={success:!0};for(let t of e)if(n=await this.execute(t),!n.success)return n;return n}async handlePostExecution(e,t){let n=!!(e.resultDialog&&t.success);if(this.toastHandler){let r=e.toast??{showOnSuccess:!0,showOnError:!0},i=e.toast?.duration;if(t.success&&!n&&r.showOnSuccess!==!1){let t=e.successMessage||`Action completed successfully`;this.toastHandler(t,{type:`success`,duration:i})}if(!t.success&&r.showOnError!==!1&&t.error){let n=e.errorMessage||t.error;this.toastHandler(n,{type:`error`,duration:i})}}if(n)if(this.resultDialogHandler)try{await this.resultDialogHandler(e.resultDialog,t.data,e)}catch(e){console.warn(`[ActionRunner] resultDialog handler rejected; treating as acknowledged`,e)}else console.warn(`[ActionRunner] action.resultDialog set but no resultDialogHandler registered — the response value will not be shown to the user.`,{action:e.name,data:t.data});if(e.refreshAfter&&t.success&&(t.reload=!0),e.chain&&e.chain.length>0&&t.success){let n=await this.executeChain(e.chain,e.chainMode||`sequential`);n.success||(t.success=!1,t.error=n.error),n.data&&(t.data=n.data),n.redirect&&(t.redirect=n.redirect),n.reload&&(t.reload=!0)}if(t.success&&e.onSuccess){let t=Array.isArray(e.onSuccess)?e.onSuccess:[e.onSuccess];await this.executeChain(t,`sequential`)}if(!t.success&&e.onFailure){let t=Array.isArray(e.onFailure)?e.onFailure:[e.onFailure];await this.executeChain(t,`sequential`)}}async executeScript(e){let t=e.execute||e.target;if(!t)return{success:!1,error:`No script provided for script action`};let n=this.scripts.get(t);if(n)try{return await n(e,this.context)}catch(e){return{success:!1,error:`Script execution failed: ${e.message}`}}try{return{success:!0,data:this.evaluator.evaluate(`\${${t}}`)}}catch(e){return{success:!1,error:`Script execution failed: ${e.message}`}}}async executeUrl(e){let t=e.target||e.redirect;if(!t)return{success:!1,error:`No URL provided for url action`};let n=this.interpolateTarget(t,e),r=this.evaluator.evaluate(n);if(!this.isValidUrl(r))return{success:!1,error:`Invalid URL scheme. Only http://, https://, and relative URLs are allowed.`};let i=typeof this.context.apiBase==`string`?this.context.apiBase.replace(/\/+$/,``):``;i&&/^\/(api|_auth|_account)\//.test(r)&&(r=`${i}${r}`);let a=r.startsWith(`http://`)||r.startsWith(`https://`);if(/\/(api|_auth|_account)\//.test(r)&&(a||r.startsWith(`/`)))return window.location.href=r,{success:!0};let o=e.params?.newTab??a;if(this.navigationHandler)return this.navigationHandler(r,{external:a,newTab:o}),{success:!0};if(o)window.open(r,`_blank`,`noopener,noreferrer`);else return{success:!0,redirect:r};return{success:!0}}async executeModal(e){let t=e.modal||e.target||e.params?.schema;return t?this.modalHandler?await this.modalHandler(t,this.context):{success:!0,modal:t}:{success:!1,error:`No modal schema or target provided for modal action`}}async executeFlow(e){let t=e.target||e.name;return t?this.handlers.has(`flow`)?await this.handlers.get(`flow`)(e,this.context):{success:!1,error:`Flow handler not registered. Cannot execute flow: ${t}`}:{success:!1,error:`No flow target provided for flow action`}}async executeActionSchema(e){let t={success:!0};if(e.api||e.endpoint){let n=await this.executeAPI(e);if(!n.success)return n;t.data=n.data}return e.onClick&&await e.onClick(),t.reload=e.reload!==!1,t.close=e.close!==!1,e.redirect&&(t.redirect=this.evaluator.evaluate(e.redirect)),t}async executeNavigation(e){let t=e.navigate||e,n=this.evaluator.evaluate(t.to||t.target);if(!this.isValidUrl(n))return{success:!1,error:`Invalid URL scheme. Only http://, https://, and relative URLs are allowed.`};let r=t.external||typeof n==`string`&&(n.startsWith(`http://`)||n.startsWith(`https://`));if(this.navigationHandler)return this.navigationHandler(n,{external:r,newTab:t.newTab??r,replace:t.replace}),{success:!0};if(r)window.open(n,`_blank`,`noopener,noreferrer`);else return{success:!0,redirect:n};return{success:!0}}async executeAPI(e){let t=e.api||e.endpoint||e.target;if(!t)return{success:!1,error:`No API endpoint provided`};try{let n,r,i={"Content-Type":`application/json`},a,o=`json`;if(typeof t==`string`)n=this.interpolateTarget(t,e),r=e.method||`POST`,a=JSON.stringify(e.params||this.context.data||{});else{let s=t;if(n=this.interpolateTarget(s.url,e),r=s.method||e.method||`POST`,i={...i,...s.headers},o=s.responseType||`json`,s.queryParams){let e=new URLSearchParams(s.queryParams);n=`${n}${n.includes(`?`)?`&`:`?`}${e.toString()}`}s.body?a=typeof s.body==`string`?s.body:JSON.stringify(s.body):r!==`GET`&&r!==`HEAD`&&(a=JSON.stringify(e.params||this.context.data||{}))}let s={method:r,headers:i};a&&r!==`GET`&&r!==`HEAD`&&(s.body=a);let c=await fetch(n,s);if(!c.ok)throw Error(`HTTP ${c.status}: ${c.statusText}`);let l;switch(o){case`text`:l=await c.text();break;case`blob`:l=await c.blob();break;default:l=await c.json()}return{success:!0,data:l}}catch(e){return{success:!1,error:e.message}}}isValidUrl(e){return typeof e==`string`&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)||e.startsWith(`./`))}interpolateTarget(e,t){if(typeof e!=`string`||e.indexOf("${")===-1)return e;let n=t.params&&typeof t.params==`object`&&!Array.isArray(t.params)?t.params:{},r=this.buildInterpolationContext();return e.replace(/\$\{(param|ctx)\.([\w.]+)\}/g,(e,t,i)=>{let a=re(t===`param`?n:r,i);return a==null?``:encodeURIComponent(String(a))})}buildInterpolationContext(){let e={origin:typeof window<`u`?window.location.origin:``,apiBase:typeof this.context.apiBase==`string`?this.context.apiBase.replace(/\/+$/,``):``,user:this.context.user??{},org:this.context.org??this.context.organization??{},recordId:this.context.record?.id??this.context.recordId};return this.context.ctx&&typeof this.context.ctx==`object`&&Object.assign(e,this.context.ctx),e}updateContext(e){this.context={...this.context,...e},this.evaluator.updateContext(e)}getContext(){return this.context}getEvaluator(){return this.evaluator}};function re(e,t){if(e!=null)return t.split(`.`).reduce((e,t)=>{if(e!=null)return e[t]},e)}function ie(e){return/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/.test(e)}function ae(e){return{type:`app`,name:e.name,title:e.title,label:e.title,description:e.description,icon:e.icon,logo:e.branding.logo,favicon:e.branding.favicon,branding:e.branding,layout:e.layout,navigation:e.navigation}}function oe(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.name==`string`&&typeof t.objectName==`string`&&Array.isArray(t.columns)}function se(e){if(!oe(e))return!1;let t=e;return t.type===`joined`&&Array.isArray(t.blocks)}var ce=[`list_toolbar`,`list_item`,`record_header`,`record_more`,`record_related`,`record_section`,`global_nav`];r(ce);function le(e){return e.toLowerCase().split(`+`).map(e=>e.trim()).sort().join(`+`)}var ue=class{actions=new Map;mappings=[];shortcuts=[];normalizedShortcutMap=new Map;runner;constructor(e={}){this.runner=e instanceof j?e:new j(e)}getRunner(){return this.runner}registerAction(e,t){let n=e.name||e.type||``;if(!n)throw Error(`Action must have a name or type`);this.actions.set(n,{action:e,locations:t?.locations||[],shortcut:t?.shortcut,bulkEnabled:t?.bulkEnabled??!1,priority:t?.priority??100}),t?.shortcut&&(this.shortcuts.push({keys:t.shortcut,actionName:n}),this.normalizedShortcutMap.set(le(t.shortcut),n))}registerActions(e){for(let t of e)this.registerAction(t,{locations:t.locations,shortcut:t.shortcut,bulkEnabled:t.bulkEnabled})}unregisterAction(e){let t=this.actions.get(e);t?.shortcut&&this.normalizedShortcutMap.delete(le(t.shortcut)),this.actions.delete(e),this.shortcuts=this.shortcuts.filter(t=>t.actionName!==e),this.mappings=this.mappings.filter(t=>t.actionName!==e)}addMapping(e){this.mappings.push(e)}getActionsForLocation(e){let t=this.runner.getEvaluator();return Array.from(this.actions.values()).filter(t=>t.locations.includes(e)).filter(e=>{let n=e.action.visible;if(n==null||n===``||n===!0)return!0;if(n===!1)return!1;let r;if(typeof n==`string`)r=`\${${n}}`;else if(typeof n==`object`&&typeof n.source==`string`){let e=n.source;if(!e)return!0;r=`\${${e}}`}else r=!!n;try{return t.evaluateCondition(r,{throwOnError:!0})}catch{return!1}}).sort((e,t)=>(e.priority??100)-(t.priority??100)).map(e=>e.action)}getBulkActions(){return Array.from(this.actions.values()).filter(e=>e.bulkEnabled).sort((e,t)=>(e.priority??100)-(t.priority??100)).map(e=>e.action)}getShortcuts(){return[...this.shortcuts]}getAction(e){return this.actions.get(e)?.action}async executeAction(e,t){let n=this.actions.get(e);return n?(t&&this.runner.updateContext(t),this.runner.execute(n.action)):{success:!1,error:`Action not found: ${e}`}}async dispatch(e,t){let n=this.mappings.filter(t=>t.event===e);if(n.length===0)return[];let r=[];for(let e of n){if(e.condition&&!this.runner.getEvaluator().evaluateCondition(e.condition))continue;let n=await this.executeAction(e.actionName,t);r.push(n)}return r}async handleShortcut(e,t){let n=this.normalizedShortcutMap.get(le(e));return n?this.executeAction(n,t):null}async executeBulk(e,t,n){let r=this.actions.get(e);if(!r)return{total:0,succeeded:0,failed:0,results:[{success:!1,error:`Action not found: ${e}`}]};if(!r.bulkEnabled)return{total:0,succeeded:0,failed:0,results:[{success:!1,error:`Action ${e} does not support bulk operations`}]};let i=[],a=0,o=0;if(n?.parallel){let e=t.map(e=>(this.runner.updateContext({record:e,selectedRecords:t}),this.runner.execute(r.action))),n=await Promise.allSettled(e);for(let e of n)e.status===`fulfilled`?(i.push(e.value),e.value.success?a++:o++):(i.push({success:!1,error:e.reason?.message||`Unknown error`}),o++)}else for(let e of t){this.runner.updateContext({record:e,selectedRecords:t});let s=await this.runner.execute(r.action);if(i.push(s),s.success)a++;else if(o++,!n?.continueOnError)break}return{total:t.length,succeeded:a,failed:o,results:i}}updateContext(e){this.runner.updateContext(e)}clear(){this.actions.clear(),this.mappings=[],this.shortcuts=[],this.normalizedShortcutMap.clear()}};function de(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.type==`string`&&typeof t.objectName==`string`&&typeof t.recordId==`string`&&typeof t.timestamp==`number`}var M=new class e{undoStack=[];redoStack=[];maxHistory;listeners=new Set;constructor(e){this.maxHistory=e?.maxHistory??50}push(e){this.undoStack.push(e),this.undoStack.length>this.maxHistory&&this.undoStack.shift(),this.redoStack=[],this.notify()}peekUndo(){return this.undoStack[this.undoStack.length-1]}peekRedo(){return this.redoStack[this.redoStack.length-1]}popUndo(){let e=this.undoStack.pop();return e&&(this.redoStack.push(e),this.notify()),e}popRedo(){let e=this.redoStack.pop();return e&&(this.undoStack.push(e),this.notify()),e}clear(){this.undoStack=[],this.redoStack=[],this.notify()}get canUndo(){return this.undoStack.length>0}get canRedo(){return this.redoStack.length>0}get undoCount(){return this.undoStack.length}get redoCount(){return this.redoStack.length}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getHistory(){return[...this.undoStack]}getRedoHistory(){return[...this.redoStack]}pushBatch(e){e.length!==0&&(this.undoStack.push(...e),this.undoStack.length>this.maxHistory&&this.undoStack.splice(0,this.undoStack.length-this.maxHistory),this.redoStack=[],this.notify())}popUndoBatch(e){let t=Math.min(e,this.undoStack.length);if(t===0)return[];let n=this.undoStack.splice(this.undoStack.length-t,t);return this.redoStack.push(...n),this.notify(),n}popRedoBatch(e){let t=Math.min(e,this.redoStack.length);if(t===0)return[];let n=this.redoStack.splice(this.redoStack.length-t,t);return this.undoStack.push(...n),this.notify(),n}static STORAGE_KEY=`objectui:undo-history`;saveToStorage(){try{let t=JSON.stringify({undoStack:this.undoStack,redoStack:this.redoStack});localStorage.setItem(e.STORAGE_KEY,t)}catch{}}loadFromStorage(){try{if(typeof localStorage>`u`)return;let t=localStorage.getItem(e.STORAGE_KEY);if(!t)return;let n=JSON.parse(t);Array.isArray(n.undoStack)&&(this.undoStack=n.undoStack.filter(de)),Array.isArray(n.redoStack)&&(this.redoStack=n.redoStack.filter(de)),this.undoStack.length>this.maxHistory&&this.undoStack.splice(0,this.undoStack.length-this.maxHistory),this.notify()}catch{}}notify(){this.listeners.forEach(e=>e())}};async function fe(e,t){let{ids:n,allowBulk:r,offset:i,label:a=`bulk`}=e,o={succeeded:0,failed:0,errors:[]};if(r&&typeof t.bulkCall==`function`)try{let e=await t.bulkCall(n),r=Math.max(0,Math.min(e,n.length));o.succeeded+=r;let s=n.length-r;return s>0&&(o.failed+=s,o.errors.push({id:`batch_${i}`,error:`${s} record${s===1?``:`s`} failed in ${a}`})),o}catch{}return(await Promise.allSettled(n.map(e=>t.perRow(e)))).forEach((e,t)=>{e.status===`fulfilled`?o.succeeded+=1:(o.failed+=1,o.errors.push({id:n[t],error:e.reason instanceof Error?e.reason.message:String(e.reason)}))}),o}function N(e,t){return t?e[t]:e.id??e._id}function pe(e,t){if(!t||t.length===0)return!0;let n=t[0];if(n===`and`)return t.slice(1).every(t=>pe(e,t));if(n===`or`)return t.slice(1).some(t=>pe(e,t));if(t.length===3&&typeof n==`string`){let[n,r,i]=t,a=e[n];switch(r){case`=`:return a===i;case`!=`:return a!==i;case`>`:return a>i;case`>=`:return a>=i;case`<`:return a<i;case`<=`:return a<=i;case`in`:return Array.isArray(i)&&i.includes(a);case`not in`:case`not_in`:case`nin`:case`notin`:return Array.isArray(i)&&!i.includes(a);case`contains`:{let e=typeof a==`string`?a.toLowerCase():``;return typeof a==`string`&&e.includes(String(i).toLowerCase())}case`notcontains`:{let e=typeof a==`string`?a.toLowerCase():``;return typeof a==`string`&&!e.includes(String(i).toLowerCase())}case`startswith`:{let e=typeof a==`string`?a.toLowerCase():``;return typeof a==`string`&&e.startsWith(String(i).toLowerCase())}case`between`:return Array.isArray(i)&&i.length===2&&a>=i[0]&&a<=i[1];default:return!0}}return!0}function me(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(r&&typeof r==`object`&&!Array.isArray(r))for(let[e,n]of Object.entries(r))switch(e){case`$gt`:if(!(t>n))return!1;break;case`$gte`:if(!(t>=n))return!1;break;case`$lt`:if(!(t<n))return!1;break;case`$lte`:if(!(t<=n))return!1;break;case`$ne`:if(t===n)return!1;break;case`$in`:if(!Array.isArray(n)||!n.includes(t))return!1;break;case`$contains`:if(typeof t!=`string`||!t.toLowerCase().includes(String(n).toLowerCase()))return!1;break;default:break}else if(t!==r)return!1}return!0}function he(e,t){if(!t)return e;let n=[];return Array.isArray(t)?n=t.map(e=>typeof e==`string`?e.startsWith(`-`)?{field:e.slice(1),order:`desc`}:{field:e,order:`asc`}:{field:e.field,order:e.order??`asc`}):typeof t==`object`&&(n=Object.entries(t).map(([e,t])=>({field:e,order:t}))),n.length===0?e:[...e].sort((e,t)=>{for(let{field:r,order:i}of n){let n=e[r],a=t[r];if(n===a)continue;if(n==null)return i===`asc`?-1:1;if(a==null)return i===`asc`?1:-1;let o=n<a?-1:1;return i===`asc`?o:-o}return 0})}function ge(e,t){if(!t||t.length===0)return e;let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}var _e=class{items;idField;mutationListeners=new Set;constructor(e){this.items=JSON.parse(JSON.stringify(e.items)),this.idField=e.idField}emitMutation(e){for(let t of this.mutationListeners)try{t(e)}catch(e){console.warn(`ValueDataSource: mutation listener error`,e)}}async find(e,t){let n=[...this.items];if(t?.$filter&&(Array.isArray(t.$filter)&&t.$filter.length>0?n=n.filter(e=>pe(e,t.$filter)):!Array.isArray(t.$filter)&&Object.keys(t.$filter).length>0&&(n=n.filter(e=>me(e,t.$filter)))),t?.$search){let e=t.$search.toLowerCase();n=n.filter(t=>Object.values(t).some(t=>typeof t==`string`&&t.toLowerCase().includes(e)))}let r=n.length;n=he(n,t?.$orderby);let i=t?.$skip??0,a=t?.$top;return i>0&&(n=n.slice(i)),a!==void 0&&(n=n.slice(0,a)),t?.$select?.length&&(n=n.map(e=>ge(e,t.$select))),{data:n,total:r,hasMore:i+(a??n.length)<r}}async findOne(e,t,n){let r=this.items.find(e=>String(N(e,this.idField))===String(t));return r?n?.$select?.length?ge(r,n.$select):{...r}:null}async create(e,t){let n={...t};if(!N(n,this.idField)){let e=this.idField??`id`;n[e]=`auto_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}return this.items.push(n),this.emitMutation({type:`create`,resource:e,record:{...n}}),{...n}}async update(e,t,n){let r=this.items.findIndex(e=>String(N(e,this.idField))===String(t));if(r===-1)throw Error(`ValueDataSource: Record with id "${t}" not found`);return this.items[r]={...this.items[r],...n},this.emitMutation({type:`update`,resource:e,id:t,record:{...this.items[r]}}),{...this.items[r]}}async delete(e,t){let n=this.items.findIndex(e=>String(N(e,this.idField))===String(t));return n===-1?!1:(this.items.splice(n,1),this.emitMutation({type:`delete`,resource:e,id:t}),!0)}async bulk(e,t,n){let r=[];for(let i of n)switch(t){case`create`:r.push(await this.create(e,i));break;case`update`:{let t=N(i,this.idField);t!==void 0&&r.push(await this.update(e,t,i));break}case`delete`:{let t=N(i,this.idField);t!==void 0&&await this.delete(e,t);break}}return r}async getObjectSchema(e){if(this.items.length===0)return{name:e,fields:{}};let t=this.items[0],n={};for(let[e,r]of Object.entries(t))n[e]={type:typeof r};return{name:e,fields:n}}async getView(e,t){return null}async getApp(e){return null}async aggregate(e,t){let{field:n,function:r,groupBy:i}=t,a={};for(let e of this.items){let t=String(e[i]??`Unknown`);a[t]||(a[t]=[]),a[t].push(e)}return Object.entries(a).map(([e,t])=>{let a=t.map(e=>Number(e[n])||0),o;switch(r){case`count`:o=t.length;break;case`avg`:o=a.length>0?a.reduce((e,t)=>e+t,0)/a.length:0;break;case`min`:o=a.length>0?Math.min(...a):0;break;case`max`:o=a.length>0?Math.max(...a):0;break;default:o=a.reduce((e,t)=>e+t,0);break}return{[i]:e,[n]:o}})}onMutation(e){return this.mutationListeners.add(e),()=>{this.mutationListeners.delete(e)}}get count(){return this.items.length}getAll(){return JSON.parse(JSON.stringify(this.items))}},P=`https://objectui.dev/docs/errors`,ve={"OBJUI-001":{code:`OBJUI-001`,message:'Unknown component type: "${type}"',suggestion:`Ensure the component is registered via registry.register() before rendering. Check for typos in the component type name.`,docUrl:`${P}/OBJUI-001`},"OBJUI-002":{code:`OBJUI-002`,message:"Schema validation failed: ${reason}",suggestion:`Verify the schema against the ObjectUI JSON spec. Run the built-in schema validator for details.`,docUrl:`${P}/OBJUI-002`},"OBJUI-003":{code:`OBJUI-003`,message:"Expression evaluation failed: ${expression}",suggestion:`Check the expression syntax and ensure all referenced variables exist in the current data scope.`,docUrl:`${P}/OBJUI-003`},"OBJUI-004":{code:`OBJUI-004`,message:'Plugin dependency missing: "${dependency}"',suggestion:`Install the required dependency and register it before loading this plugin.`,docUrl:`${P}/OBJUI-004`},"OBJUI-005":{code:`OBJUI-005`,message:'Plugin already loaded: "${plugin}"',suggestion:`A plugin with the same name is already registered. Remove the duplicate or use a unique plugin name.`,docUrl:`${P}/OBJUI-005`},"OBJUI-006":{code:`OBJUI-006`,message:'Plugin not found: "${plugin}"',suggestion:`Verify the plugin name and ensure it has been registered before access.`,docUrl:`${P}/OBJUI-006`},"OBJUI-007":{code:`OBJUI-007`,message:'Registry namespace deprecated: "${namespace}"',suggestion:`Migrate to the new namespace format. See the migration guide for details.`,docUrl:`${P}/OBJUI-007`},"OBJUI-008":{code:`OBJUI-008`,message:'Read-only scope violation: "${scope}"',suggestion:`You are trying to mutate a read-only data scope. Use a writable scope or clone the data before modifying.`,docUrl:`${P}/OBJUI-008`},"OBJUI-009":{code:`OBJUI-009`,message:'Invalid field configuration: "${field}"',suggestion:`Check the field schema for required properties (type, name). Ensure the field widget is registered.`,docUrl:`${P}/OBJUI-009`},"OBJUI-010":{code:`OBJUI-010`,message:'Action execution failed: "${action}"',suggestion:`Verify the action handler is registered and that all required parameters are provided.`,docUrl:`${P}/OBJUI-010`}},ye=class extends Error{code;details;constructor(e,t,n){super(e),this.code=t,this.details=n,this.name=`ObjectUIError`,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,code:this.code,details:this.details,stack:this.stack}}};function be(e){return e instanceof ye}var F=`__debug`;function xe(e){let t=e;if(t===void 0)try{t=typeof window<`u`?window.location.search:``}catch{t=``}let n=new URLSearchParams(t),r=n.has(F),i=n.has(`${F}_schema`),a=n.has(`${F}_perf`),o=n.has(`${F}_data`),s=n.has(`${F}_expr`),c=n.has(`${F}_events`),l=n.has(`${F}_registry`);return{enabled:r||i||a||o||s||c||l,...i&&{schema:i},...a&&{perf:a},...o&&{data:o},...s&&{expr:s},...c&&{events:c},...l&&{registry:l}}}function Se(){try{if(typeof window<`u`)try{if(xe(window.location.search).enabled)return!0}catch{}let e=typeof globalThis<`u`&&globalThis.OBJECTUI_DEBUG;return e===!0||e===`true`||globalThis.process?.env?.OBJECTUI_DEBUG===`true`}catch{return!1}}function Ce(e,t,n){Se()&&(n===void 0?console.log(`[ObjectUI Debug][${e}] ${t}`):console.log(`[ObjectUI Debug][${e}] ${t}`,n))}var we=new Map;function Te(e){Se()&&we.set(e,performance.now())}function Ee(e){if(!Se())return;let t=we.get(e);if(t!==void 0){let n=(performance.now()-t).toFixed(2);console.log(`[ObjectUI Debug][perf] ${e}: ${n}ms`),we.delete(e)}}var De=200,Oe=class e{static instance=null;entries=[];subscribers=new Set;static getInstance(){return e.instance||=new e,e.instance}static resetInstance(){e.instance=null}addPerf(e){this.push({kind:`perf`,data:e})}addExpr(e){this.push({kind:`expr`,data:e})}addEvent(e){this.push({kind:`event`,data:e})}getEntries(e){return e?this.entries.filter(t=>t.kind===e):this.entries.slice()}clear(){this.entries=[]}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}push(e){this.entries.push(e),this.entries.length>De&&(this.entries=this.entries.slice(-200));for(let t of this.subscribers)try{t(e)}catch{}}},ke=/\$\{event\.([a-zA-Z0-9_]+)\}/g;function Ae(e,t){return typeof e!=`string`||e.indexOf("${event.")===-1?e:e.replace(ke,(e,n)=>{let r=t[n];return r==null?``:String(r)})}function je(e,t){if(typeof e==`string`){let n=e.match(/^\$\{event\.([a-zA-Z0-9_]+)\}$/);if(n){let e=t[n[1]];return e===``||e===void 0?null:e}return Ae(e,t)}if(Array.isArray(e))return e.map(e=>je(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))n[r]=je(i,t);return n}return e}function Me(e,t,n={}){if(e?.filter)return je(e.filter,t);let r={},{rowField:i,columnField:a,groupByField:o}=n,s=t.scope??`cell`;return s===`total`?r:((s===`cell`||s===`row`)&&i&&`rowKey`in t&&(r[i]=t.rowKey===``?null:t.rowKey),(s===`cell`||s===`column`)&&a&&`colKey`in t&&(r[a]=t.colKey===``?null:t.colKey),o&&`category`in t&&(r[o]=t.category===``?null:t.category),r)}function Ne(e,t,n=`Details`){if(e?.title){let n=Ae(e.title,t).trim();if(n)return n}let r=[];return t.rowLabel&&r.push(t.rowLabel),t.colLabel&&r.push(t.colLabel),t.categoryLabel?r.push(t.categoryLabel):t.category&&r.push(t.category),t.series&&r.push(t.series),r.length>0?r.join(` × `):n}function Pe(e){return e?e.enabled!==!1:!1}function Fe(e,t=new Date){if(e==null)return e;let n=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t},r=e=>{let t=n(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`},i=e=>{let t=n(e),r=(t.getDay()+6)%7;return t.setDate(t.getDate()-r),t},a=e=>new Date(e.getFullYear(),e.getMonth(),1),o=e=>{let t=Math.floor(e.getMonth()/3);return new Date(e.getFullYear(),t*3,1)},s=e=>new Date(e.getFullYear(),0,1),c=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,1),l=(e,t)=>{let r=n(e);return r.setDate(r.getDate()+t),r},u=e=>l(c(a(e),1),-1),d=e=>l(i(e),6),f=e=>l(c(o(e),3),-1),p=e=>new Date(e.getFullYear(),11,31),m={today:()=>r(t),yesterday:()=>r(l(t,-1)),tomorrow:()=>r(l(t,1)),now:()=>t.toISOString(),current_week_start:()=>r(i(t)),current_week_end:()=>r(d(t)),current_month_start:()=>r(a(t)),current_month_end:()=>r(u(t)),current_quarter_start:()=>r(o(t)),current_quarter_end:()=>r(f(t)),current_year_start:()=>r(s(t)),current_year_end:()=>r(p(t)),last_week_start:()=>r(l(i(t),-7)),last_week_end:()=>r(l(i(t),-1)),last_month_start:()=>r(c(a(t),-1)),last_month_end:()=>r(l(a(t),-1)),last_quarter_start:()=>r(c(o(t),-3)),last_quarter_end:()=>r(l(o(t),-1)),last_year_start:()=>r(new Date(t.getFullYear()-1,0,1)),last_year_end:()=>r(new Date(t.getFullYear()-1,11,31)),next_week_start:()=>r(l(i(t),7)),next_month_start:()=>r(c(a(t),1)),next_quarter_start:()=>r(c(o(t),3)),next_year_start:()=>r(new Date(t.getFullYear()+1,0,1))};for(let[e,t]of Object.entries({week_start:`current_week_start`,week_end:`current_week_end`,month_start:`current_month_start`,month_end:`current_month_end`,quarter_start:`current_quarter_start`,quarter_end:`current_quarter_end`,year_start:`current_year_start`,year_end:`current_year_end`}))m[e]=m[t];let h=/^(\d+)_(minutes?|hours?|days?|weeks?|months?|years?)_(ago|from_now)$/,g=e=>{let n=e.match(h);if(!n)return null;let i=parseInt(n[1],10);if(!Number.isFinite(i))return null;let a=n[3]===`ago`?-1:1,o=n[2].replace(/s$/,``);return o===`minute`?new Date(t.getTime()+a*i*60*1e3).toISOString():o===`hour`?new Date(t.getTime()+a*i*60*60*1e3).toISOString():o===`day`?r(l(t,a*i)):o===`week`?r(l(t,a*i*7)):o===`month`?r(new Date(t.getFullYear(),t.getMonth()+a*i,t.getDate())):o===`year`?r(new Date(t.getFullYear()+a*i,t.getMonth(),t.getDate())):null},_=/\$?\{([a-zA-Z0-9_]+)\}/g,v=e=>{if(e==null)return e;if(typeof e==`string`){let t=e.match(/^\$?\{([a-zA-Z0-9_]+)\}$/);if(t){let e=t[1];if(m[e])return m[e]();let n=g(e);if(n!=null)return n}let n=!1,r=e.replace(_,(e,t)=>{if(m[t])return n=!0,m[t]();let r=g(t);return r==null?e:(n=!0,r)});return n?r:e}if(Array.isArray(e))return e.map(v);if(typeof e==`object`){let t={};for(let n of Object.keys(e))t[n]=v(e[n]);return t}return e};return v(e)}var Ie={current_week_start:`last_week_start`,current_week_end:`last_week_end`,current_month_start:`last_month_start`,current_month_end:`last_month_end`,current_quarter_start:`last_quarter_start`,current_quarter_end:`last_quarter_end`,current_year_start:`last_year_start`,current_year_end:`last_year_end`,week_start:`last_week_start`,week_end:`last_week_end`,month_start:`last_month_start`,month_end:`last_month_end`,quarter_start:`last_quarter_start`,quarter_end:`last_quarter_end`,year_start:`last_year_start`,year_end:`last_year_end`,today:`yesterday`};function Le(e,t){if(e==null)return e;if(typeof e==`string`)return e.replace(/\$?\{([a-zA-Z0-9_]+)\}/g,(e,n)=>{let r=t[n];return r?`{${r}}`:e});if(Array.isArray(e))return e.map(e=>Le(e,t));if(typeof e==`object`){let n={};for(let r of Object.keys(e))n[r]=Le(e[r],t);return n}return e}function Re(e,t){let n=t.match(/^(\d+)([dwMy])$/);if(!n)return null;let r=parseInt(n[1],10),i=n[2],a=new Date(e);if(i===`d`)a.setDate(a.getDate()-r);else if(i===`w`)a.setDate(a.getDate()-r*7);else if(i===`M`)a.setMonth(a.getMonth()-r);else if(i===`y`)a.setFullYear(a.getFullYear()-r);else return null;return a}function ze(e,t,n=new Date){if(t===`previousYear`)return Fe(e,new Date(n.getFullYear()-1,n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds()));if(typeof t==`object`&&t&&`offset`in t){let r=Re(n,t.offset);return r?Fe(e,r):Fe(e,n)}return Fe(Le(e,Ie),n)}function Be(e,t){if(e===`previousYear`)return`vsLastYear`;if(typeof e==`object`&&e&&`offset`in e)return`vsPreviousPeriod`;let n=t?JSON.stringify(t):``;return/current_year_|year_start|year_end/.test(n)?`vsLastYear`:/current_quarter_|quarter_start|quarter_end/.test(n)?`vsLastQuarter`:/current_month_|month_start|month_end/.test(n)?`vsLastMonth`:/current_week_|week_start|week_end/.test(n)?`vsLastWeek`:/\btoday\b/.test(n)?`vsYesterday`:`vsPreviousPeriod`}var I=e(n(),1),L=t(),Ve=(0,I.createContext)(null),He=({children:e,dataSource:t,debug:n,debugFlags:r})=>{let i=(0,I.useMemo)(()=>({dataSource:t,debug:n,debugFlags:r}),[t,n,r]);return(0,L.jsx)(Ve.Provider,{value:i,children:e})},Ue=()=>{let e=(0,I.useContext)(Ve);if(!e)throw Error(`useSchemaContext must be used within a SchemaRendererProvider`);return e},We=e=>{let t=(0,I.useContext)(Ve)?.dataSource;if(e&&t)return e.split(`.`).reduce((e,t)=>e&&e[t],t)};function Ge(e){if(e!=null)return typeof e==`string`?e:e.defaultValue||e.key}var Ke=(()=>{try{return!1}catch{return!0}})(),qe=typeof WeakMap<`u`?new WeakMap:{set(){},get(){},has(){return!1}},Je=typeof WeakSet<`u`?new WeakSet:{add(){},has(){return!1}};function Ye(e){if(!Ke||!e||typeof e!=`object`)return{valid:!0,messages:[]};let t=qe.get(e);if(t)return t;let n={valid:!0,messages:[]};try{let t=m(e);if(!t.valid){let r=t.errors.map(e=>`${e.path}: ${e.message}`);n={valid:!1,messages:r},Je.has(e)||(Je.add(e),console.warn(`[ObjectUI] Invalid schema detected:
|
|
3
3
|
`+r.join(`
|
|
4
4
|
`),e))}}catch(t){Je.has(e)||(Je.add(e),console.warn(`[ObjectUI] Schema validator threw:`,t))}return qe.set(e,n),n}function Xe(e){let t={};return e.ariaLabel&&(t[`aria-label`]=Ge(e.ariaLabel)),e.ariaDescribedBy&&(t[`aria-describedby`]=e.ariaDescribedBy),e.role&&(t.role=e.role),t}var Ze=class extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidUpdate(e){this.state.hasError&&(e.componentType!==this.props.componentType||e.resetKey!==this.props.resetKey)&&this.setState({hasError:!1,error:null})}handleRetry=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError&&this.state.error){let e=this.state.error;return be(e),(0,L.jsxs)(`div`,{className:`p-4 border border-orange-400 rounded bg-orange-50 text-orange-700 my-2`,role:`alert`,children:[(0,L.jsxs)(`p`,{className:`font-medium`,children:[`Component`,this.props.componentType?` "${this.props.componentType}"`:``,` failed to render`]}),(0,L.jsx)(`p`,{className:`text-sm mt-1`,children:e.message}),!1,(0,L.jsx)(`button`,{onClick:this.handleRetry,className:`mt-2 text-sm underline hover:no-underline`,children:`Retry`})]})}return this.props.children}},Qe=(0,I.forwardRef)(({schema:e,...t},n)=>{let r=(0,I.useContext)(Ve),i=r?.dataSource||{},[,a]=(0,I.useReducer)(e=>e+1,0);(0,I.useEffect)(()=>{let e=c.subscribe(a);return a(),e},[]);let[o,s]=(0,I.useState)(null),l=(0,I.useMemo)(()=>{if(!e||typeof e==`string`)return e;let t=new O({data:i}),n={...e};if(n.properties){let e=n.type,t=n.id,r=n.properties;for(let[e,t]of Object.entries(r))e===`type`||e===`id`||(n[e]=t);e!==void 0&&(n.type=e),t!==void 0&&(n.id=t),n.properties=r}if(typeof n.content==`string`&&(n.content=t.evaluate(n.content)),n.props){let e={...n.props};for(let[n,r]of Object.entries(e))e[n]=t.evaluate(r);n.props=e}return(n.visible===void 0?n.visibleOn===void 0?n.hidden===void 0?n.hiddenOn!==void 0&&t.evaluateCondition(n.hiddenOn):t.evaluateCondition(n.hidden):!t.evaluateCondition(n.visibleOn):!t.evaluateCondition(n.visible))&&(n._hidden=!0),(n.disabled===void 0?n.disabledOn!==void 0&&t.evaluateCondition(n.disabledOn):t.evaluateCondition(n.disabled))&&(n._disabled=!0),n},[e,i]);if(!l||l?._hidden)return null;if(typeof l==`string`)return(0,L.jsx)(L.Fragment,{children:l});let u=Ke?Ye(e):{valid:!0,messages:[]};Ce(`schema`,`Rendering schema node`,{type:l.type,id:l.id});let d=c.get(l.type);if(!d){if(!o&&c.hasLazy(l.type)){let e=c.loadLazy(l.type);if(e)return e.catch(e=>{s(e instanceof Error?e:Error(String(e)))}),(0,L.jsxs)(`div`,{className:`p-2 text-sm text-muted-foreground animate-pulse`,role:`status`,"aria-live":`polite`,"data-lazy-loading":l.type,children:[`Loading `,(0,L.jsx)(`code`,{children:l.type}),`…`]})}return Ce(`schema`,`Component not found in registry`,{type:l.type}),ve[`OBJUI-001`],(0,L.jsxs)(`div`,{className:`p-4 border border-red-500 rounded text-red-500 bg-red-50 my-2`,role:`alert`,children:[(0,L.jsxs)(`p`,{className:`font-medium`,children:[`Unknown component type: `,(0,L.jsx)(`strong`,{children:l.type})]}),o&&(0,L.jsxs)(`p`,{className:`text-xs mt-1`,children:[`Failed to load plugin: `,o.message]}),!1,(0,L.jsx)(`pre`,{className:`text-xs mt-2 overflow-auto`,children:JSON.stringify(l,null,2)})]})}let{type:f,children:p,body:m,schema:h,visible:g,visibleOn:_,hidden:v,hiddenOn:y,disabled:b,disabledOn:x,_hidden:S,_disabled:C,...ee}=l,te=Xe(l),w=r?.debug||r?.debugFlags?.enabled,T={};w&&(T[`data-debug-type`]=l.type,l.id&&(T[`data-debug-id`]=l.id)),Te(`render:${l.type}:${l.id??`anon`}`);let E=w?performance.now():0,D=(0,L.jsx)(Ze,{componentType:l.type,resetKey:l.id??null,children:I.createElement(d,{schema:l,...ee,...l.props||{},...te,...T,disabled:C||void 0,className:l.className,"data-obj-id":l.id,"data-obj-type":l.type,...Ke&&!u.valid?{"data-obj-schema-invalid":`true`}:{},...t})});if(Ee(`render:${l.type}:${l.id??`anon`}`),w&&E){let e=performance.now()-E;Oe.getInstance().addPerf({type:l.type,id:l.id,durationMs:e,timestamp:Date.now()})}return D});Qe.displayName=`SchemaRenderer`;var $e=(0,I.createContext)({});function et({scope:e,children:t}){return(0,I.createElement)($e.Provider,{value:e},t)}function tt(){return(0,I.useContext)($e)}function nt(e){if(!(e==null||e===``)){if(typeof e==`boolean`)return e;if(typeof e==`string`)return`\${${e}}`;if(typeof e==`object`&&typeof e.source==`string`){let t=e.source;return t?`\${${t}}`:void 0}}}function rt(e,t={}){let n=tt();return(0,I.useMemo)(()=>new O({...n,...t}).evaluateCondition(e),[e,t,n])}function it(e={}){let{context:t={},onConfirm:n,onToast:r,onModal:i,onNavigate:a,onParamCollection:o,onResultDialog:s}=`context`in e?e:{context:e},[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(null),[f,p]=(0,I.useState)(null),m=(0,I.useMemo)(()=>{let e=new j(t);return n&&e.setConfirmHandler(n),r&&e.setToastHandler(r),i&&e.setModalHandler(i),a&&e.setNavigationHandler(a),o&&e.setParamCollectionHandler(o),s&&e.setResultDialogHandler(s),e},[JSON.stringify(t)]);return{execute:(0,I.useCallback)(async e=>{l(!0),d(null),p(null);try{let t=await m.execute(e);return p(t),t.success||d(t.error||`Action failed`),t}catch(e){let t=e.message;d(t);let n={success:!1,error:t};return p(n),n}finally{l(!1)}},[m]),loading:c,error:u,result:f,updateContext:(0,I.useCallback)(e=>{m.updateContext(e)},[m]),runner:m}}function at(e){let{navigation:t,objectName:n,onNavigate:r,onRowClick:i}=e,[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(null),l=t?.mode??`page`,u=t?.width,d=t?.view,f=l===`drawer`||l===`modal`||l===`split`||l===`popover`,p=(0,I.useCallback)(()=>{o(!1),c(null)},[]),m=(0,I.useCallback)(e=>{c(e),o(!0)},[]),h=(0,I.useCallback)((e,a)=>{if(i){i(e,a);return}if(a&&(a.metaKey||a.ctrlKey||a.button===1)){let t=e.id||e._id;if(r&&t!=null){r(t,`new_window`);return}}if(!t){let t=e.id||e._id;r&&t!=null&&r(t,d??`view`);return}if(!(l===`none`||t.preventNavigation)){if(l===`new_window`||t.openNewTab){let t=e.id||e._id;if(r&&t!=null){r(t,`new_window`);return}let i=encodeURIComponent(String(t)),a=n?`/${n}/record/${i}`:`/${i}`;window.open(a,`_blank`);return}if(l===`page`){let t=e.id||e._id;r&&t!=null&&r(t,d??`view`);return}if(f){c(e),o(!0);return}}},[i,t,l,n,r,f,d]);return(0,I.useMemo)(()=>({isOpen:a,selectedRecord:s,mode:l,close:p,open:m,setIsOpen:o,handleClick:h,width:u,view:d,isOverlay:f}),[a,s,l,p,m,h,u,d,f])}var ot=(0,I.createContext)(null);function st(e){if(!e||e.length===0)return{};let t={};for(let n of e)if(n.defaultValue!==void 0)t[n.name]=n.defaultValue;else switch(n.type){case`number`:t[n.name]=0;break;case`boolean`:t[n.name]=!1;break;case`object`:t[n.name]={};break;case`array`:t[n.name]=[];break;default:t[n.name]=``;break}return t}var ct=({definitions:e,children:t})=>{let[n,r]=(0,I.useState)(()=>st(e)),i=(0,I.useCallback)((e,t)=>{r(n=>({...n,[e]:t}))},[]),a=(0,I.useCallback)(e=>{r(t=>({...t,...e}))},[]),o=(0,I.useCallback)(()=>{r(st(e))},[e]),s=(0,I.useMemo)(()=>({variables:n,setVariable:i,setVariables:a,resetVariables:o}),[n,i,a,o]);return(0,L.jsx)(ot.Provider,{value:s,children:t})};ct.displayName=`PageVariablesProvider`;function lt(){let e=(0,I.useContext)(Ve)?.dataSource,[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(!0),[a,o]=(0,I.useState)(null);return(0,I.useEffect)(()=>{let t=!1;async function r(){if(!e){i(!1);return}try{if(i(!0),typeof e.getDiscovery==`function`){let r=await e.getDiscovery();t||(n(r),o(null))}else t||(n(null),o(null))}catch(e){t||(o(e instanceof Error?e:Error(`Failed to fetch discovery`)),n(null))}finally{t||i(!1)}}return r(),()=>{t=!0}},[e]),{discovery:t,isLoading:r,error:a,isAuthEnabled:t?.services?.auth?.enabled??!0,isAiEnabled:t?.services?.ai?.enabled===!0&&t?.services?.ai?.status===`available`}}[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `);var ut={compact:32,comfortable:40,spacious:52},dt={compact:`py-1 px-2`,comfortable:`py-2 px-3`,spacious:`py-3 px-4`},ft={compact:`text-xs`,comfortable:`text-sm`,spacious:`text-base`},pt=[`compact`,`comfortable`,`spacious`];function mt(e=`comfortable`,t){let[n,r]=(0,I.useState)(e),i=t?.rowHeights??ut,a=t?.paddingClasses??dt,o=t?.fontSizeClasses??ft,s=(0,I.useRef)(t?.onChange);(0,I.useEffect)(()=>{s.current=t?.onChange},[t?.onChange]);let c=(0,I.useRef)(e);(0,I.useEffect)(()=>{e!==c.current&&(c.current=e,r(e))},[e]);let l=(0,I.useCallback)(e=>{r(t=>t===e?t:(queueMicrotask(()=>s.current?.(e)),e))},[]),u=(0,I.useCallback)(()=>{r(e=>{let t=pt[(pt.indexOf(e)+1)%pt.length];return queueMicrotask(()=>s.current?.(t)),t})},[]);return(0,I.useMemo)(()=>({mode:n,setMode:l,cycle:u,rowHeight:i[n],paddingClass:a[n],fontSizeClass:o[n]}),[n,l,u,i,a,o])}var ht=0,gt=(0,I.createContext)(null),_t=({children:e,config:t={},onToast:n})=>{let r=(0,I.useMemo)(()=>({position:`top-right`,defaultDuration:5e3,maxVisible:5,stacking:!0,...t}),[JSON.stringify(t)]),[i,a]=(0,I.useState)([]),o=(0,I.useCallback)(e=>{let t=`notification-${++ht}`,i={...e,id:t,createdAt:new Date,read:!1};a(e=>[i,...e]),n&&n(i);let o=e.duration??r.defaultDuration??5e3;return o>0&&setTimeout(()=>{a(e=>e.filter(e=>e.id!==t))},o),t},[r.defaultDuration,n]),s=(0,I.useCallback)((e,t)=>o({title:e,message:t,severity:`info`}),[o]),c=(0,I.useCallback)((e,t)=>o({title:e,message:t,severity:`success`}),[o]),l=(0,I.useCallback)((e,t)=>o({title:e,message:t,severity:`warning`}),[o]),u=(0,I.useCallback)((e,t)=>o({title:e,message:t,severity:`error`}),[o]),d=(0,I.useCallback)(e=>{a(t=>t.map(t=>t.id===e?{...t,read:!0}:t))},[]),f=(0,I.useCallback)(()=>{a(e=>e.map(e=>({...e,read:!0})))},[]),p=(0,I.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e))},[]),m=(0,I.useCallback)(()=>{a([])},[]),h=(0,I.useMemo)(()=>i.filter(e=>!e.read).length,[i]),g=(0,I.useMemo)(()=>({notifications:i,unreadCount:h,notify:o,info:s,success:c,warning:l,error:u,markAsRead:d,markAllAsRead:f,dismiss:p,clearAll:m,config:r}),[i,h,o,s,c,l,u,d,f,p,m,r]);return(0,L.jsx)(gt.Provider,{value:g,children:e})};_t.displayName=`NotificationProvider`;function vt(e){return typeof window>`u`?()=>{}:(window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)})}function yt(){return typeof navigator<`u`?navigator.onLine:!0}function bt(){return!0}var xt=`objectui-offline-queue`;function St(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(xt);return e?JSON.parse(e):[]}catch{return[]}}function Ct(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(xt,JSON.stringify(e))}catch{}}var wt=0;function Tt(){return wt+=1,`mut_${Date.now()}_${wt}`}var Et={enabled:!0,strategy:`network_first`,offlineIndicator:!0,offlineMessage:`You are currently offline. Changes will be synced when reconnected.`,queueMaxSize:100};function Dt(e={}){let{enabled:t=Et.enabled,strategy:n=Et.strategy,offlineIndicator:r=Et.offlineIndicator,offlineMessage:i=Et.offlineMessage,queueMaxSize:a=Et.queueMaxSize,sync:o}=e,s=(0,I.useSyncExternalStore)(vt,yt,bt),[c,l]=(0,I.useState)(St),[u,d]=(0,I.useState)(`idle`),f=(0,I.useRef)(o);f.current=o,(0,I.useEffect)(()=>{Ct(c)},[c]),(0,I.useEffect)(()=>{t&&(s?u===`offline`&&d(`idle`):d(`offline`))},[s,t,u]);let p=(0,I.useCallback)(e=>{t&&l(t=>{let n={...e,id:Tt(),timestamp:Date.now()},r=[...t,n];return r.length>a?r.slice(r.length-a):r})},[t,a]),m=(0,I.useCallback)(()=>{l([])},[]),h=(0,I.useCallback)(async()=>{if(!(!t||c.length===0)){d(`syncing`);try{let e=f.current?.batchSize??c.length,t=c.slice(0,e);await new Promise(e=>setTimeout(e,0)),l(e=>e.filter(e=>!t.some(t=>t.id===e.id))),d(`idle`)}catch{d(`error`)}}},[t,c]);return(0,I.useEffect)(()=>{if(!t||!s||c.length===0)return;let e=setTimeout(()=>{h()},100);return()=>clearTimeout(e)},[s,t]),(0,I.useMemo)(()=>({isOnline:s,enabled:t,syncState:u,strategy:n,pendingCount:c.length,queueMutation:p,sync:h,clearQueue:m,showIndicator:r&&!s,offlineMessage:i}),[s,t,u,n,c.length,p,h,m,r,i])}function Ot(){return{canUndo:M.canUndo,canRedo:M.canRedo,undoDescription:M.peekUndo()?.description,redoDescription:M.peekRedo()?.description,history:M.getHistory()}}function kt(){return{canUndo:!1,canRedo:!1,undoDescription:void 0,redoDescription:void 0,history:[]}}var At=Ot();function jt(e){return M.subscribe(()=>{At=Ot(),e()})}function Mt(){return At}function Nt(e={}){let t=(0,I.useRef)(e);t.current=e;let n=(0,I.useSyncExternalStore)(jt,Mt,kt),r=(0,I.useCallback)(async(e,n,r)=>{let i=t.current.dataSource;if(!i)return;let a=r===`undo`?{create:`delete`,update:`update`,delete:`create`}[e.type]:e.type;a===`delete`?await i.delete(e.objectName,e.recordId):a===`update`?await i.update(e.objectName,e.recordId,n):await i.create(e.objectName,n)},[]),i=(0,I.useCallback)(async()=>{let e=M.popUndo();e&&(await r(e,e.undoData,`undo`),t.current.onUndo?.(e))},[r]),a=(0,I.useCallback)(async()=>{let e=M.popRedo();e&&(await r(e,e.redoData,`redo`),t.current.onRedo?.(e))},[r]);return(0,I.useEffect)(()=>{let e=e=>{!(e.ctrlKey||e.metaKey)||e.key.toLowerCase()!==`z`||(e.preventDefault(),e.shiftKey?a():i())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,a]),(0,I.useMemo)(()=>({...n,undo:i,redo:a}),[n,i,a])}var Pt=(0,I.createContext)(null),Ft=({children:e,context:t={},onConfirm:n,onToast:r,onModal:i,onNavigate:a,onParamCollection:o,onResultDialog:s,handlers:c})=>{let[l,u]=(0,I.useState)(!1),[d,f]=(0,I.useState)(null),[p,m]=(0,I.useState)(null),h=(0,I.useMemo)(()=>{let e=new j({...t,ctx:t&&typeof t.ctx==`object`?{...t,...t.ctx}:{...t}});return n&&e.setConfirmHandler(n),r&&e.setToastHandler(r),i&&e.setModalHandler(i),a&&e.setNavigationHandler(a),o&&e.setParamCollectionHandler(o),s&&e.setResultDialogHandler(s),c&&Object.entries(c).forEach(([t,n])=>{e.registerHandler(t,n)}),e},[JSON.stringify(t)]),g=(0,I.useCallback)(async e=>{u(!0),f(null),m(null);try{let t=await h.execute(e);return m(t),t.success||f(t.error||`Action failed`),t}catch(e){let t=e.message;f(t);let n={success:!1,error:t};return m(n),n}finally{u(!1)}},[h]),_=(0,I.useCallback)(async(e,t)=>{u(!0),f(null),m(null);try{let n=await h.executeChain(e,t);return m(n),n.success||f(n.error||`Chain failed`),n}catch(e){let t=e.message;f(t);let n={success:!1,error:t};return m(n),n}finally{u(!1)}},[h]),v=(0,I.useCallback)(e=>{h.updateContext(e)},[h]),y=(0,I.useMemo)(()=>({execute:g,executeChain:_,loading:l,error:d,result:p,runner:h,updateContext:v}),[g,_,l,d,p,h,v]);return(0,L.jsx)(Pt.Provider,{value:y,children:e})};Ft.displayName=`ActionProvider`;function It(){let e=(0,I.useContext)(Pt);if(!e){let e=new j;return{execute:t=>e.execute(t),executeChain:(t,n)=>e.executeChain(t,n),loading:!1,error:null,result:null,runner:e,updateContext:t=>e.updateContext(t)}}return e}function Lt(e={}){let{actions:t=[],context:n={}}=e,r=(0,I.useContext)(Pt)?.runner??null,i=(0,I.useMemo)(()=>{let e=n&&Object.keys(n).length>0?{...n,ctx:n.ctx&&typeof n.ctx==`object`?{...n,...n.ctx}:{...n}}:n,i=r?new ue(r):new ue(e);if(r&&n&&Object.keys(n).length>0){let e=i.getRunner(),t=e.getEvaluator().getContext().toObject(),r=t&&typeof t.ctx==`object`?t.ctx:{},a=n.ctx&&typeof n.ctx==`object`?n.ctx:n,o={...n,ctx:{...r,...a}};e.updateContext(o)}return i.registerActions(t),i},[r,JSON.stringify(t),JSON.stringify(n)]);return{getActionsForLocation:(0,I.useCallback)(e=>i.getActionsForLocation(e),[i]),getBulkActions:(0,I.useCallback)(()=>i.getBulkActions(),[i]),executeAction:(0,I.useCallback)((e,t)=>i.executeAction(e,t),[i]),handleShortcut:(0,I.useCallback)(e=>i.handleShortcut(e),[i]),engine:i}}var Rt=(0,I.createContext)(null);function zt(){return(0,I.useContext)(Rt)}var Bt=(0,I.createContext)(null);function Vt(){return(0,I.useContext)(Bt)||{apps:[],objects:[],dashboards:[],reports:[],pages:[],loading:!1,error:null,refresh:async()=>{},invalidate:()=>{},ensureType:async()=>[],getItem:async()=>null,getItemsByType:()=>[]}}function Ht(e,t){let{getItem:n}=Vt(),[r,i]=(0,I.useState)({item:null,loading:!!t,error:null});return(0,I.useEffect)(()=>{if(!t){i({item:null,loading:!1,error:null});return}let r=!1;return i(e=>({...e,loading:!0,error:null})),n(e,t).then(e=>{r||i({item:e,loading:!1,error:null})}).catch(e=>{r||i({item:null,loading:!1,error:e instanceof Error?e:Error(String(e))})}),()=>{r=!0}},[e,t,n]),r}function Ut(e,t){return!0}function Wt(e,t={}){let n=Vt(),[r,i]=(0,I.useState)(!1),[a,o]=(0,I.useState)(null);(0,I.useEffect)(()=>{let e=!1;if(!n.ensureType){i(!0);return}return n.ensureType(`page`).then(()=>{e||(i(!0),o(null))}).catch(t=>{e||(o(t instanceof Error?t:Error(String(t))),i(!0))}),()=>{e=!0}},[n]);let s=(0,I.useMemo)(()=>{if(!e&&!t.pageName)return null;let r=Array.isArray(n.pages)?n.pages:[];if(!r.length)return null;if(t.pageName)return r.find(e=>e?.name===t.pageName)??null;let i=r.filter(n=>!n||(n.pageType??(n.type===`record`?`record`:void 0))!==`record`||n.object!==e?!1:Ut(n,t));return i.length?(i.sort((e,t)=>(t?.priority??0)-(e?.priority??0)),i[0]):null},[n.pages,e,t.pageName,t.recordType,t.profile,t.app,t.formFactor]),{page:c,slots:l}=(0,I.useMemo)(()=>s?s.kind===`slotted`?{page:null,slots:s.slots??{}}:{page:s,slots:null}:{page:null,slots:null},[s]);return{page:c,slots:l,loading:n.loading||!r,error:a??n.error??null}}function Gt(e,t){let n=e?.titleFormat;if(n&&typeof n==`string`){let e=n.replace(/\{\{\s*([\w.]+)\s*\}\}/g,(e,n)=>{let r=n.split(`.`).reduce((e,t)=>e==null?e:e[t],t);return r==null?``:String(r)}).trim();if(e.length>0)return e}return t?.name||t?.full_name||t?.fullName||t?.title||t?.label||t?.subject||t?.id||t?._id||`Untitled`}function Kt(e,t,n){if(!e)return 0;let r=e.toLowerCase(),i=(t||``).toLowerCase();return(n||``).toLowerCase()===r?110:i===r?100:i.startsWith(r)?80:i.split(/[\s_\-/.,:;()[\]]+/).filter(Boolean).some(e=>e.startsWith(r))?60:i.includes(r)?40:0}function qt(e){let{query:t,objects:n,dataSource:r,objectNames:i,maxObjectsQueried:a=8,topPerObject:o=3,minLength:s=2,debounceMs:c=250,enabled:l=!0,getDisplayName:u=Gt}=e,[d,f]=(0,I.useState)([]),[p,m]=(0,I.useState)(!1),[h,g]=(0,I.useState)(void 0),_=(0,I.useMemo)(()=>{if(!Array.isArray(n)||n.length===0)return[];let e=n;if(Array.isArray(i)&&i.length>0){let t=new Map;for(let e of n){let n=e?.name;typeof n==`string`&&t.set(n,e)}e=i.map(e=>t.get(e)).filter(e=>e!=null)}else e=n.filter(e=>e?.searchable!==!1);return e.slice(0,a)},[n,i,a]),v=(0,I.useMemo)(()=>_.map(e=>`${e?.name}:${e?.titleField??``}`).join(`|`),[_]),y=(0,I.useRef)(0);return(0,I.useEffect)(()=>{if(!l||!r||_.length===0){f([]),m(!1),g(void 0);return}let e=(t??``).trim();if(e.length<s){f([]),m(!1),g(void 0);return}let n=++y.current;m(!0),g(void 0);let i=setTimeout(()=>{if(y.current!==n)return;let t=_.map(t=>Promise.resolve().then(()=>r.find(t.name,{$search:e,$top:o})).then(e=>({obj:t,res:e,err:null})).catch(e=>({obj:t,res:null,err:e})));Promise.allSettled(t).then(t=>{if(y.current!==n)return;let r=[],i;for(let n of t){if(n.status!==`fulfilled`)continue;let{obj:t,res:a,err:s}=n.value;if(s){let e=s?.httpStatus??s?.status,t=s?.code;if(e===404||t===`object_not_found`)continue;i=s instanceof Error?s:Error(String(s));continue}let c=Array.isArray(a?.data)?a.data:Array.isArray(a)?a:[];for(let n of c.slice(0,o)){let i=n?.id??n?._id;if(i==null)continue;let a=u(t,n);r.push({objectName:t.name,objectLabel:typeof t.label==`string`&&t.label.length>0?t.label:t.name,recordId:String(i),display:a,icon:t?.icon,score:Kt(e,a,String(i)),raw:n})}}r.sort((e,t)=>t.score-e.score),f(r),m(!1),g(i)})},c);return()=>{clearTimeout(i)}},[t,l,r,v,o,s,c,u]),{results:d,isSearching:p,error:h}}(0,I.createContext)(null);var Jt=(0,I.createContext)(null),Yt=({children:e,config:t={},onDragStart:n,onDrop:r,onDragCancel:i})=>{let a=(0,I.useMemo)(()=>({enabled:!0,showPreview:!0,autoScroll:!0,...t}),[JSON.stringify(t)]),[o,s]=(0,I.useState)(null),[c]=(0,I.useState)(()=>new Map),l=(0,I.useCallback)(e=>{a.enabled&&(s(e),n?.({item:e,targetZoneId:null,effect:`move`}))},[a.enabled,n]),u=(0,I.useCallback)(e=>{if(!o)return;let t=(e?c.get(e):void 0)?.effect??`move`;r?.({item:o,targetZoneId:e??null,effect:t}),s(null)},[o,c,r]),d=(0,I.useCallback)(()=>{o&&(i?.({item:o,targetZoneId:null,effect:`none`}),s(null))},[o,i]),f=(0,I.useCallback)(e=>{c.set(e.id,e)},[c]),p=(0,I.useCallback)(e=>{c.delete(e)},[c]),m=(0,I.useCallback)((e,t)=>{let n=c.get(e);return!n||n.disabled?!1:n.acceptTypes.includes(t)},[c]),h=(0,I.useMemo)(()=>({config:a,enabled:a.enabled??!0,activeItem:o,dropZones:c,startDrag:l,endDrag:u,cancelDrag:d,registerDropZone:f,unregisterDropZone:p,canDrop:m}),[a,o,c,l,u,d,f,p,m]);return(0,L.jsx)(Jt.Provider,{value:h,children:e})};Yt.displayName=`DndProvider`;function Xt(){let e=(0,I.useContext)(Jt);if(!e)throw Error(`useDnd must be used within a <DndProvider>. Wrap your app with <DndProvider> to use the drag and drop system.`);return e}function Zt(){return(0,I.useContext)(Jt)!==null}var Qt=I.createContext(null),$t=({children:e})=>{let t=I.useMemo(()=>{let e=new Map,t=an,n=new Set,r=()=>{let r=new Set;for(let t of e.values())for(let e of t)r.add(e);if(r.size===t.size){let e=!0;for(let n of r)if(!t.has(n)){e=!1;break}if(e)return}t=r,n.forEach(e=>e())};return{getNames:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),register:(t,n)=>{let i=e.get(t);i&&i.length===n.length&&i.every((e,t)=>e===n[t])||(e.set(t,[...n]),r())},unregister:t=>{e.delete(t)&&r()}}},[]);return(0,L.jsx)(Qt.Provider,{value:t,children:e})};function en(){let e=I.useContext(Qt);return I.useSyncExternalStore(e?e.subscribe:nn,e?e.getNames:rn,e?e.getNames:rn)}function tn(e,t){let n=I.useContext(Qt),r=t.join(`|`);I.useEffect(()=>{if(n)return n.register(e,r.length===0?[]:r.split(`|`)),()=>n.unregister(e)},[n,e,r])}var nn=e=>()=>{},rn=()=>an,an=new Set,on=I.createContext(null),sn=({children:e,...t})=>{let n=I.useMemo(()=>t,[t.objectName,t.recordId,t.dataSource,t.data,t.objectSchema,t.loading,t.error,t.refresh,t.embedded,t.headerSystemActions,t.isFavorite,t.onToggleFavorite]);return(0,L.jsx)(on.Provider,{value:n,children:e})};function cn(){return I.useContext(on)}var ln=I.createContext(null),un=({children:e,...t})=>{let n=I.useMemo(()=>t,[t.items,t.onAddComment,t.onAddReply,t.onToggleReaction,t.mentionSuggestions,t.onUploadAttachments,t.loading,t.error]);return(0,L.jsx)(ln.Provider,{value:n,children:e})};function dn(){return I.useContext(ln)}var fn=e=>e.type===`checkbox`,R=e=>e instanceof Date,z=e=>e==null,pn=e=>typeof e==`object`,B=e=>!z(e)&&!Array.isArray(e)&&pn(e)&&!R(e),mn=e=>B(e)&&e.target?fn(e.target)?e.target.checked:e.target.value:e,hn=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),gn=e=>{let t=e.constructor&&e.constructor.prototype;return B(t)&&t.hasOwnProperty(`isPrototypeOf`)},_n=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function V(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(_n&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(B(e)&&gn(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=V(e[t]));return r}var vn=e=>/^\w*$/.test(e),H=e=>e===void 0,yn=e=>Array.isArray(e)?e.filter(Boolean):[],bn=e=>yn(e.replace(/["|']|\]/g,``).split(/\.|\[/)),U=(e,t,n)=>{if(!t||!B(e))return n;let r=(vn(t)?[t]:bn(t)).reduce((e,t)=>z(e)?void 0:e[t],e);return H(r)||r===e?H(e[t])?n:e[t]:r},W=e=>typeof e==`boolean`,G=e=>typeof e==`function`,K=(e,t,n)=>{let r=-1,i=vn(t)?[t]:bn(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=B(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},q={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},J={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Y={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},xn=`form`,Sn=`root`,Cn=I.createContext(null);Cn.displayName=`HookFormControlContext`;var wn=()=>I.useContext(Cn),Tn=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==J.all&&(t._proxyFormState[i]=!r||J.all),n&&(n[i]=!0),e[i]}});return i},En=typeof window<`u`?I.useLayoutEffect:I.useEffect;function Dn(e){let t=wn(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=I.useState(()=>({...n._formState,defaultValues:n._defaultValues})),c=I.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return En(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s({...n._formState,...e,defaultValues:n._defaultValues})}}),[i,r,a]),I.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),I.useMemo(()=>Tn(o,n,c.current,!1),[o,n])}var X=e=>typeof e==`string`,On=(e,t,n,r,i)=>X(e)?(r&&t.watch.add(e),U(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),U(n,e))):(r&&(t.watchAll=!0),n),kn=e=>z(e)||!pn(e);function Z(e,t,n=new WeakSet){if(e===t)return!0;if(kn(e)||kn(t))return Object.is(e,t);if(R(e)&&R(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(R(r)&&R(e)||(B(r)||Array.isArray(r))&&(B(e)||Array.isArray(e))?!Z(r,e,n):!Object.is(r,e))return!1}}return!0}function An(e){let t=wn(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=I.useRef(i),l=I.useRef(s),u=I.useRef(void 0),d=I.useRef(n),f=I.useRef(r);l.current=s;let[p,m]=I.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=I.useCallback(e=>{let t=On(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=I.useCallback(e=>{if(!a){let t=On(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);Z(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);En(()=>((d.current!==n||!Z(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),I.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=I.useMemo(()=>{if(a)return null;let e=!_&&!Z(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function jn(e){let t=wn(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=hn(i._names.array,n),l=An({control:i,name:n,defaultValue:I.useMemo(()=>U(i._formValues,n,U(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=Dn({control:i,name:n,exact:s}),d=I.useRef(e),f=I.useRef(i.register(n,{...e.rules,value:l,...W(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let p=I.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!U(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!U(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!U(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!U(u.validatingFields,n)},error:{enumerable:!0,get:()=>U(u.errors,n)}}),[u,n]),m=I.useCallback(e=>f.current.onChange({target:{value:mn(e),name:n},type:q.CHANGE}),[n]),h=I.useCallback(()=>f.current.onBlur({target:{value:U(i._formValues,n),name:n},type:q.BLUR}),[n,i._formValues]),g=I.useCallback(e=>{let t=U(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>G(e.focus)&&e.focus(),select:()=>G(e.select)&&e.select(),setCustomValidity:t=>G(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>G(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),_=I.useMemo(()=>({name:n,value:l,...W(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:m,onBlur:h,ref:g}),[n,r,u.disabled,m,h,g,l]);return I.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,{...d.current.rules,...W(d.current.disabled)?{disabled:d.current.disabled}:{}});let t=(e,t)=>{let n=U(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=V(U(i._defaultValues,n,U(i._options.defaultValues,n,d.current.defaultValue)));K(i._defaultValues,n,e),H(U(i._formValues,n))&&K(i._formValues,n,e)}return!c&&i.register(n),()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),I.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),I.useMemo(()=>({field:_,formState:u,fieldState:p}),[_,u,p])}var Mn=e=>e.render(jn(e)),Nn=I.createContext(null);Nn.displayName=`HookFormContext`;var Pn=()=>I.useContext(Nn),Fn=e=>{let{children:t,watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,handleSubmit:p,unregister:m,control:h,register:g,setFocus:_,subscribe:v}=e,y=I.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,handleSubmit:p,unregister:m,control:h,register:g,setFocus:_,subscribe:v}),[o,h,u,i,r,p,g,f,d,a,_,s,c,v,l,m,n]);return I.createElement(Nn.Provider,{value:y},I.createElement(Cn.Provider,{value:y.control},t))},In=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Ln=e=>Array.isArray(e)?e:[e],Rn=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function zn(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&B(i)&&a){let e=zn(i,a);B(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var Q=e=>B(e)&&!Object.keys(e).length,Bn=e=>e.type===`file`,Vn=e=>{if(!_n)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hn=e=>e.type===`select-multiple`,Un=e=>e.type===`radio`,Wn=e=>Un(e)||fn(e),Gn=e=>Vn(e)&&e.isConnected;function Kn(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(z(e)){e=void 0;break}e=e[t[r]],r++}return e}function qn(e){for(let t in e)if(e.hasOwnProperty(t)&&!H(e[t]))return!1;return!0}function $(e,t){if(X(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:vn(t)?[t]:bn(t),r=n.length===1?e:Kn(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(B(r)&&Q(r)||Array.isArray(r)&&qn(r))&&$(e,n.slice(0,-1)),e}var Jn=e=>{for(let t in e)if(G(e[t]))return!0;return!1};function Yn(e){return Array.isArray(e)||B(e)&&!Jn(e)}function Xn(e,t={}){for(let n in e){let r=e[n];Yn(r)?(t[n]=Array.isArray(r)?[]:{},Xn(r,t[n])):H(r)||(t[n]=!0)}return t}function Zn(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){let t=e.map(e=>Zn(e));return t.some(e=>e!==void 0)?t:void 0}if(B(e)){let t={};for(let n in e){let r=Zn(e[n]);H(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Qn(e,t,n){n||=Xn(t);for(let r in e){let i=e[r];if(Yn(i))H(t)||kn(n[r])?n[r]=Xn(i,Array.isArray(i)?[]:{}):Qn(i,z(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!Z(i,e)}}return Zn(n)||{}}var $n={value:!1,isValid:!1},er={value:!0,isValid:!0},tr=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===``?er:{value:e[0].value,isValid:!0}:er:$n}return $n},nr=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>H(e)?e:t?e===``?NaN:e&&+e:n&&X(e)?new Date(e):r?r(e):e,rr={isValid:!1,value:null},ir=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,rr):rr;function ar(e){let t=e.ref;return Bn(t)?t.files:Un(t)?ir(e.refs).value:Hn(t)?[...t.selectedOptions].map(({value:e})=>e):fn(t)?tr(e.refs).value:nr(H(t.value)?e.ref.value:t.value,e)}var or=(e,t,n,r)=>{let i={};for(let n of e){let e=U(t,n);e&&K(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},sr=e=>e instanceof RegExp,cr=e=>H(e)?e:sr(e)?e.source:B(e)?sr(e.value)?e.value.source:e.value:e,lr=e=>({isOnSubmit:!e||e===J.onSubmit,isOnBlur:e===J.onBlur,isOnChange:e===J.onChange,isOnAll:e===J.all,isOnTouch:e===J.onTouched}),ur=`AsyncFunction`,dr=e=>!!e&&!!e.validate&&!!(G(e.validate)&&e.validate.constructor.name===ur||B(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ur)),fr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pr=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),mr=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=U(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(mr(a,t))break}else if(B(a)&&mr(a,t))break}}};function hr(e,t,n){let r=U(e,n);if(r||vn(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=U(t,r),o=U(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var gr=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return Q(a)||r&&Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||J.all))},_r=(e,t,n)=>!e||!t||e===t||Ln(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),vr=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,yr=(e,t)=>!yn(U(e,t)).length&&$(e,t),br=(e,t,n)=>{let r=Ln(U(e,n));return K(r,Sn,t[n]),K(e,n,r),e};function xr(e,t,n=`validate`){if(X(e)||Array.isArray(e)&&e.every(X)||W(e)&&!e)return{type:n,message:X(e)?e:``,ref:t}}var Sr=e=>B(e)&&!sr(e)?e:{value:e,message:``},Cr=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=U(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{i&&y.reportValidity&&(y.setCustomValidity(W(e)?``:e||``),y.reportValidity())},x={},S=Un(o),C=fn(o),ee=S||C,te=(g||Bn(o))&&H(o.value)&&H(v)||Vn(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,w=In.bind(null,h,r,x),T=(e,t,n,r=Y.maxLength,i=Y.minLength)=>{let a=e?t:n;x[h]={type:e?r:i,message:a,ref:o,...w(e?r:i,a)}};if(a?!Array.isArray(v)||!v.length:c&&(!ee&&(te||z(v))||W(v)&&!v||C&&!tr(s).isValid||S&&!ir(s).isValid)){let{value:e,message:t}=X(c)?{value:!!c,message:c}:Sr(c);if(e&&(x[h]={type:Y.required,message:t,ref:y,...w(Y.required,t)},!r))return b(t),x}if(!te&&(!z(d)||!z(f))){let e,t,n=Sr(f),i=Sr(d);if(!z(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;z(n.value)||(e=r>n.value),z(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;X(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),X(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(T(!!e,n.message,i.message,Y.max,Y.min),!r))return b(x[h].message),x}if((l||u)&&!te&&(X(v)||a&&Array.isArray(v))){let e=Sr(l),t=Sr(u),n=!z(e.value)&&v.length>+e.value,i=!z(t.value)&&v.length<+t.value;if((n||i)&&(T(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!te&&X(v)){let{value:e,message:t}=Sr(p);if(sr(e)&&!v.match(e)&&(x[h]={type:Y.pattern,message:t,ref:o,...w(Y.pattern,t)},!r))return b(t),x}if(m){if(G(m)){let e=xr(await m(v,n),y);if(e&&(x[h]={...e,...w(Y.validate,e.message)},!r))return b(e.message),x}else if(B(m)){let e={};for(let t in m){if(!Q(e)&&!r)break;let i=xr(await m[t](v,n),y,t);i&&(e={...i,...w(t,i.message)},b(i.message),r&&(x[h]=e))}if(!Q(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},wr={mode:J.onSubmit,reValidateMode:J.onChange,shouldFocusError:!0},Tr={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Er(e={}){let t={...wr,...e},n={...V(Tr),isLoading:G(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=(B(t.defaultValues)||B(t.values))&&V(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:V(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...u},f={...d},p={array:Rn(),state:Rn()},m=t.criteriaMode===J.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=async e=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=Q((await w()).errors),_()):e=await D({fields:r,onlyCheckValid:!0,eventType:q.VALID}),e!==n.isValid&&p.state.next({isValid:e})}},_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?K(n.validatingFields,e,r):$(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Q(n.validatingFields)}))},v=()=>{n.dirtyFields=Qn(i,a)},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(U(r,e))){let t=s(U(r,e),c.argA,c.argB);l&&K(r,e,t)}if(u&&Array.isArray(U(n.errors,e))){let t=s(U(n.errors,e),c.argA,c.argB);l&&K(n.errors,e,t),yr(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(U(n.touchedFields,e))){let t=s(U(n.touchedFields,e),c.argA,c.argB);l&&K(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(),p.state.next({name:e,isDirty:k(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else K(a,e,i)},b=(e,t)=>{K(n.errors,e,t),p.state.next({errors:n.errors})},x=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},S=e=>{let t=vn(e)?[e]:bn(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=z(n)?n:n[i],r=z(r)?r:r[i],n===null&&r!==null)return!0}return!1},C=(e,t,s,c)=>{let l=U(r,e);if(l){if(S(e))return;let r=H(U(a,e)),u=U(a,e,H(s)?U(i,e):s);H(u)||c&&c.defaultChecked||t?K(a,e,t?u:ar(l._f)):j(e,u),o.mount&&!o.action&&(g(),r&&n.isDirty&&(d.isDirty||f.isDirty)&&(k()||(n.isDirty=!1,p.state.next({...n}))))}},ee=(e,r,o,s,c)=>{let l=!1,u=!1,m={name:e};if(!t.disabled){if(!o||s){(d.isDirty||f.isDirty)&&(u=n.isDirty,n.isDirty=m.isDirty=k(),l=u!==m.isDirty);let t=Z(U(i,e),r);u=!!U(n.dirtyFields,e),t===n.isDirty?t?$(n.dirtyFields,e):K(n.dirtyFields,e,!0):n.dirtyFields=Qn(i,a),m.dirtyFields=n.dirtyFields,l||=(d.dirtyFields||f.dirtyFields)&&u!==!t}if(o){let t=U(n.touchedFields,e);t||(K(n.touchedFields,e,o),m.touchedFields=n.touchedFields,l||=(d.touchedFields||f.touchedFields)&&t!==o)}l&&c&&p.state.next(m)}return l?m:{}},te=(e,r,i,a)=>{let o=U(n.errors,e),s=(d.isValid||f.isValid)&&W(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>b(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?K(n.errors,e,i):$(n.errors,e)),(i?!Z(o,i):o)||!Q(a)||s){let t={...a,...s&&W(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},p.state.next(t)}},w=async e=>(_(e,!0),await t.resolver(a,t.context,or(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),T=async e=>{let{errors:t}=await w(e);if(_(e),e)for(let r of e){let e=U(t,r);e?s.array.has(r)&&B(e)?br(n.errors,{[r]:e},r):K(n.errors,r,e):$(n.errors,r)}else n.errors=t;return t},E=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:a,formState:n,name:t,eventType:r});if(B(i))for(let e in i){let t=i[e];t&&fe(`${xn}.${e}`,{message:X(t.message)?t.message:``,type:t.type||Y.validate})}else X(i)||!i?fe(xn,{message:i||``,type:Y.validate}):M(xn);return i}return!0},D=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await E({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r,...p}=u;if(r){let o=s.array.has(r.name),c=u._f&&dr(u._f),p=d.validatingFields||d.isValidating||f.validatingFields||f.isValidating;c&&p&&_([r.name],!0);let h=await Cr(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&p&&_([r.name]),h[r.name]&&(l.valid=!1,i)||(!i&&(U(h,r.name)?o?br(n.errors,h,r.name):K(n.errors,r.name,h[r.name]):$(n.errors,r.name)),e.shouldUseNativeValidation&&h[r.name]))break}!Q(p)&&await D({context:l,onlyCheckValid:i,fields:p,name:o,eventType:c})}}return l.valid},O=()=>{for(let e of s.unMount){let t=U(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Gn(e)):!Gn(t._f.ref))&&he(e)}s.unMount=new Set},k=(e,n)=>!t.disabled&&(e&&n&&K(a,e,n),!Z(ue(),i)),A=(e,t,n)=>On(e,s,{...o.mount?a:H(t)?i:X(e)?{[e]:t}:t},n,t),ne=e=>yn(U(o.mount?a:i,e,t.shouldUnregister?U(i,e,[]):[])),j=(e,t,n={},i=!1)=>{let o=U(r,e),s=t;if(o){let n=o._f;n&&(!n.disabled&&K(a,e,nr(t,n)),s=Vn(n.ref)&&z(t)?``:t,Hn(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?fn(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):Bn(n.ref)?n.ref.value=``:(n.ref.value=s,n.ref.type||p.state.next({name:e,values:i?a:V(a)})))}(n.shouldDirty||n.shouldTouch)&&ee(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&le(e)},re=(e,t,n,i=!1)=>{for(let a in t){if(!t.hasOwnProperty(a))return;let o=t[a],c=e+`.`+a,l=U(r,c);(s.array.has(e)||B(o)||l&&!l._f)&&!R(o)?re(c,o,n,i):j(c,o,n,i)}},ie=(e,t,i,c)=>{let l=U(r,e),u=s.array.has(e),m=c?t:V(t),h=Z(U(a,e),m);if(h||K(a,e,m),u)p.array.next({name:e,values:c?a:V(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&i.shouldDirty&&(v(),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:k(e,m)}));else{let t=Array.isArray(m)&&!m.length||Q(m);!l||l._f||z(m)||t?j(e,m,i,c):re(e,m,i,c)}if(!h){let t=pr(e,s),r=c?a:V(a);p.state.next({...t&&n,name:o.mount||t?e:void 0,values:r})}},ae=(e,t,n={})=>ie(e,t,n,!1),oe=(e,t={})=>{let r=G(e)?e(a):e;if(!Z(a,r)){a={...a,...r};for(let e of s.mount)ie(e,U(r,e),t,!0);p.state.next({...n,name:void 0,type:void 0,values:a}),t.shouldValidate&&g()}},se=async i=>{o.mount=!0;let l=i.target,u=l.name,h=!0,v=U(r,u),y=e=>{h=Number.isNaN(e)||R(e)&&isNaN(e.getTime())||Z(e,U(a,u,e))},b=lr(t.mode),x=lr(t.reValidateMode);if(v){let o,S,C=l.type?ar(v._f):mn(i),T=i.type===q.BLUR||i.type===q.FOCUS_OUT,O=!fr(v._f)&&!e.validate&&!t.resolver&&!U(n.errors,u)&&!v._f.deps||vr(T,U(n.touchedFields,u),n.isSubmitted,x,b),k=pr(u,s,T);K(a,u,C),T?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let A=ee(u,C,T),ne=!Q(A)||k;if(!T&&p.state.next({name:u,type:i.type,values:V(a)}),O)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?T&&g():T||g()),ne&&p.state.next({name:u,...k?{}:A});if(!t.resolver&&e.validate&&await E({name:u,eventType:i.type}),!T&&k&&p.state.next({...n}),t.resolver){let{errors:e}=await w([u]);if(_([u]),y(C),h){let t=hr(n.errors,r,u),i=hr(e,r,t.name||u);o=i.error,u=i.name,S=Q(e)}}else _([u],!0),o=(await Cr(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(C),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=await D({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&le(v._f.deps),te(u,S,o,A))}},ce=(e,t)=>{if(U(n.errors,t)&&e.focus)return e.focus(),1},le=async(e,i={})=>{let a,o,c=Ln(e);if(t.resolver){let t=await T(H(e)?e:c);a=Q(t),o=e?!c.some(e=>U(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=U(r,e);return await D({fields:t&&t._f?{[e]:t}:t,eventType:q.TRIGGER})}))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=await D({fields:r,name:e,eventType:q.TRIGGER});return p.state.next({...!X(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&mr(r,ce,e?c:s.mount),o},ue=(e,t)=>{let r={...o.mount?a:i};return t&&(r=zn(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),H(e)?r:X(e)?U(r,e):e.map(e=>U(r,e))},de=(e,t)=>({invalid:!!U((t||n).errors,e),isDirty:!!U((t||n).dirtyFields,e),error:U((t||n).errors,e),isValidating:!!U(n.validatingFields,e),isTouched:!!U((t||n).touchedFields,e)}),M=e=>{let t=e?Ln(e):void 0;t?.forEach(e=>$(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},fe=(e,t,i)=>{let a=(U(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=U(n.errors,e)||{};K(n.errors,e,{...l,...t,ref:a}),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},N=(e,t)=>G(e)?p.state.subscribe({next:n=>`values`in n&&e(n.values||A(void 0,t),n)}):A(e,t,!0),pe=e=>p.state.subscribe({next:t=>{if(_r(e.name,t.name,e.exact)&&gr(t,e.formState||d,Ce,e.reRenderRoot)){let r={...a};e.callback({values:r,...n,...t,defaultValues:i})}}}).unsubscribe,me=e=>(o.mount=!0,f={...f,...e.formState},pe({...e,formState:{...u,...e.formState}})),he=(e,o={})=>{for(let c of e?Ln(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||($(r,c),$(a,c)),!o.keepError&&$(n.errors,c),!o.keepDirty&&$(n.dirtyFields,c),!o.keepTouched&&$(n.touchedFields,c),!o.keepIsValidating&&$(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&$(i,c);p.state.next({values:V(a)}),p.state.next({...n,...o.keepDirty?{isDirty:k()}:{}}),!o.keepIsValid&&g()},ge=({disabled:e,name:t})=>{if(W(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},_e=(e,n={})=>{let a=U(r,e),c=W(n.disabled)||W(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return K(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a&&!l?ge({disabled:W(n.disabled)?n.disabled:t.disabled,name:e}):C(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:cr(n.min),max:cr(n.max),minLength:cr(n.minLength),maxLength:cr(n.maxLength),pattern:cr(n.pattern)}:{},name:e,onChange:se,onBlur:se,ref:c=>{if(c){s.registerName.add(e),_e(e,n),s.registerName.delete(e),a=U(r,e);let t=H(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=Wn(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;K(r,e,{_f:{...a._f,...o?{refs:[...l.filter(Gn),t,...Array.isArray(U(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),C(e,!1,void 0,t)}else a=U(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(hn(s.array,e)&&o.action)&&s.unMount.add(e)}}},P=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&mr(r,ce,s.mount),ve=e=>{W(e)&&(p.state.next({disabled:e}),mr(r,(t,n)=>{let i=U(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},ye=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=V(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await w();_(),n.errors=e,l=V(t)}else await D({fields:r,eventType:q.SUBMIT});if(s.disabled.size)for(let e of s.disabled)$(l,e);if($(n.errors,Sn),Q(n.errors)){p.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),P(),setTimeout(P);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Q(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},be=(e,t={})=>{U(r,e)&&(H(t.defaultValue)?ae(e,V(U(i,e))):(ae(e,t.defaultValue),K(i,e,V(t.defaultValue))),t.keepTouched||$(n.touchedFields,e),t.keepDirty||($(n.dirtyFields,e),n.isDirty=t.defaultValue?k(e,V(U(i,e))):k()),t.keepError||($(n.errors,e),d.isValid&&g()),p.state.next({...n}))},F=(e,c={})=>{let l=e?V(e):i,u=V(l),f=Q(e),m=f?i:u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(Qn(i,a))]);for(let t of Array.from(e)){let e=U(n.dirtyFields,t),r=U(a,t),i=U(m,t);e&&!H(r)?K(m,t,r):!e&&!H(i)&&ae(t,i)}}else{if(_n&&H(e))for(let e of s.mount){let t=U(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Vn(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)ae(e,U(m,e));else r={}}a=t.shouldUnregister?c.keepDefaultValues?V(i):{}:V(m),p.array.next({values:{...m}}),p.state.next({values:{...m}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!Q(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!Z(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?Qn(i,a):n.dirtyFields:c.keepDefaultValues&&e?Qn(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},xe=(e,n)=>F(G(e)?e(a):e,{...t.resetOptions,...n}),Se=(e,t={})=>{let n=U(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&G(e.select)&&e.select()})}},Ce=e=>{n={...n,...e}},we={control:{register:_e,unregister:he,getFieldState:de,handleSubmit:ye,setError:fe,_subscribe:pe,_runSchema:w,_updateIsValidating:_,_focusError:P,_getWatch:A,_getDirty:k,_setValid:g,_setFieldArray:y,_setDisabledField:ge,_setErrors:x,_getFieldArray:ne,_reset:F,_resetDefaultValues:()=>G(t.defaultValues)&&t.defaultValues().then(e=>{xe(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:O,_disableForm:ve,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e}}},subscribe:me,trigger:le,register:_e,handleSubmit:ye,watch:N,setValue:ae,setValues:oe,getValues:ue,reset:xe,resetField:be,clearErrors:M,unregister:he,setError:fe,setFocus:Se,getFieldState:de};return{...we,formControl:we}}function Dr(e={}){let t=I.useRef(void 0),n=I.useRef(void 0),[r,i]=I.useState(()=>({...V(Tr),isLoading:G(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...i}=Er(e);t.current={...i,formState:r}}let a=t.current.control;return a._options=e,En(()=>{let e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState,defaultValues:a._defaultValues}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),I.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),I.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),I.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),I.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),I.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),I.useEffect(()=>{e.values&&!Z(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),a._options.resetOptions?.keepIsValid||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),I.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=I.useMemo(()=>Tn(r,a),[a,r]),t.current}var Or={en:{common:{loading:`Loading...`,save:`Save`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,create:`Create`,search:`Search`,filter:`Filter`,reset:`Reset`,confirm:`Confirm`,close:`Close`,back:`Back`,next:`Next`,previous:`Previous`,submit:`Submit`,refresh:`Refresh`,export:`Export`,import:`Import`,yes:`Yes`,no:`No`,ok:`OK`,actions:`Actions`,more:`More`,selectAll:`Select All`,clearAll:`Clear All`,addToFavorites:`Add to favorites`,removeFromFavorites:`Remove from favorites`,noData:`No data`,noResults:`No results found`,required:`Required`,optional:`Optional`,selectOption:`Select an option`,select:`Select...`,openChat:`Open chat`,closeChat:`Close chat`,toggleSidebar:`Toggle sidebar`},validation:{required:`{{field}} is required`,minLength:`{{field}} must be at least {{min}} characters`,maxLength:`{{field}} must be at most {{max}} characters`,min:`{{field}} must be at least {{min}}`,max:`{{field}} must be at most {{max}}`,email:`Please enter a valid email address`,url:`Please enter a valid URL`,pattern:`{{field}} format is invalid`,unique:`{{field}} must be unique`,type:`{{field}} must be a valid {{type}}`},form:{addItem:`Add item`,removeItem:`Remove item`,fieldRequired:`This field is required`,invalidFormat:`Invalid format`,saveSuccess:`Saved successfully`,saveError:`Failed to save`,unsavedChanges:`You have unsaved changes. Are you sure you want to leave?`,stepOf:`Step {{current}} of {{total}}`,createTitle:`Create {{object}}`,editTitle:`Edit {{object}}`,createDescription:`Add a new {{object}} to your database.`,editDescription:`Update details for {{object}}`,saveRecord:`Save`,create:`Create`,update:`Update`,createSuccess:`{{object}} created successfully`,updateSuccess:`{{object}} updated successfully`,deleteSuccess:`{{object}} deleted successfully`},fields:{richText:{format:`Format: {{format}}`,basicEditorHint:`Rich text editor (basic)`,placeholder:`Enter text...`}},table:{rowsPerPage:`Rows per page`,showing:`Showing {{from}} to {{to}} of {{total}}`,noRows:`No rows to display`,sortAsc:`Sort ascending`,sortDesc:`Sort descending`,filterColumn:`Filter {{column}}`,columns:`Columns`,exportCSV:`Export CSV`,exportExcel:`Export Excel`,selectRow:`Select row`,selectAllRows:`Select all rows`,expandRow:`Expand row`,collapseRow:`Collapse row`,hideColumn:`Hide column`,freezeColumn:`Freeze column`,unfreezeColumn:`Unfreeze column`,pageInfo:`Page {{current}} of {{total}}`,totalRecords:`{{count}} total`,noResults:`No results found`,noResultsHint:`Try adjusting your filters or search query.`,cancelAll:`Cancel All`,saveAll:`Save All ({{count}})`,addRecord:`Add record`,open:`Open`,search:`Search...`,modified:`{{count}} row modified`,selected:`{{count}} selected`,edit:`Edit`,delete:`Delete`},grid:{actions:`Actions`,edit:`Edit`,delete:`Delete`,export:`Export`,exportAs:`Export as {{format}}`,loading:`Loading grid...`,errorLoading:`Error loading grid`,pullToRefresh:`Pull to refresh`,refreshing:`Refreshing…`,openRecord:`Open record`,openMenu:`Open menu`,rowHeight:`Row height: {{mode}}`,empty:`Empty`,yes:`Yes`,no:`No`,systemFields:`System`,toolbar:{densityMode:`Density`,densityCompact:`Compact`,densityComfortable:`Comfortable`,densitySpacious:`Spacious`,densityCycleHint:`{{label}} (click to cycle)`,densityCycleShortHint:`Click to cycle`},import:{title:`Import {{object}}`,stepUpload:`Upload`,stepMapping:`Mapping`,stepPreview:`Preview`,uploadDescription:`Upload a CSV file to get started.`,mappingDescription:`Map CSV columns to object fields.`,previewDescription:`Review data before importing.`,dragDrop:`Drag & drop a CSV file here, or click to browse`,browseFiles:`Browse Files`,onlyCsv:`Only CSV files are supported.`,fileNeedsHeader:`File must contain a header row and at least one data row.`,mappingTemplate:`Mapping template:`,chooseTemplate:`Choose template…`,noSavedTemplates:`No saved templates`,noneOption:`— None —`,saveCurrent:`Save current`,templateName:`Template name`,save:`Save`,deleteTemplate:`Delete template`,csvColumn:`CSV Column`,mapsTo:`Maps To`,status:`Status`,skipColumn:`Skip column`,skip:`— Skip —`,mapped:`Mapped`,skipped:`Skipped`,rowsWithErrors:`{{count}} row(s) with errors`,rowsCorrected:`{{count}} row(s) corrected`,clickToFix:`— click a highlighted cell to fix it inline.`,showingRows:`Showing {{shown}} of {{total}} rows`,importing:`Importing… {{progress}}%`,importComplete:`Import Complete`,imported:`{{count}} imported`,skippedCount:`{{count}} skipped`,moreErrors:`…and {{count}} more errors`,cancel:`Cancel`,back:`Back`,next:`Next`,close:`Close`,importNRows:`Import {{count}} Rows`,importingProgress:`Importing…`,requiredMark:`*`,required:`Required`,invalidType:`Invalid {{type}}`}},calendar:{today:`Today`,month:`Month`,week:`Week`,day:`Day`,agenda:`Agenda`,allDay:`All Day`,noEvents:`No events`,newEvent:`New event`,moreEvents:`+{{count}} more`},list:{recordCount:`{{count}} records`,recordCountOne:`{{count}} record`,addRecord:`Add record`,tabs:`Tabs`,allRecords:`All Records`,search:`Search`,filter:`Filter`,filterRecords:`Filter Records`,sort:`Sort`,sortRecords:`Sort Records`,group:`Group`,groupBy:`Group By`,export:`Export`,exportAs:`Export as {{format}}`,color:`Color`,rowColor:`Row Color`,colorByField:`Color by field`,clear:`Clear`,none:`None`,hideFields:`Hide fields`,noItems:`No items found`,noItemsMessage:`There are no records to display. Try adjusting your filters or adding new data.`,showAll:`Show all`,pullToRefresh:`Pull to refresh`,refreshing:`Refreshing…`,share:`Share`,print:`Print`,hideFieldsTitle:`Hide Fields`,dataLimitReached:`Showing first {{limit}} records. More data may be available.`,viewSettings:`View settings`,viewSettingsHint:`Grouping, color, density, and visible fields.`,addGroup:`Add group field`,collapsedByDefault:`Collapsed by default`,removeGroup:`Remove`},kanban:{addCard:`Add card`,addColumn:`Add column`,moveCard:`Move card`,deleteCard:`Delete card`,deleteColumn:`Delete column`,noCards:`No cards`,cardTitlePlaceholder:`Enter card title...`},timeline:{bucket:{overdue:`Overdue`,today:`Today`,tomorrow:`Tomorrow`,thisWeek:`This week`,nextWeek:`Next week`,later:`Later`,noDate:`No date`,unassigned:`Unassigned`}},gantt:{column:{taskName:`Task Name`,start:`Start`,end:`End`},toolbar:{prevPeriod:`Previous period`,nextPeriod:`Next period`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,jumpToToday:`Jump to today`,today:`Today`,showTaskList:`Show task list`,hideTaskList:`Hide task list`}},view:{rename:`Rename`,duplicateView:`Duplicate View`,shareView:`Share View`,setAsDefault:`Set as Default`,pinView:`Pin View`,unpinView:`Unpin View`,changeViewType:`Change View Type`,deleteView:`Delete View`,addView:`Add View`,unsavedChanges:`Unsaved changes`,saveAsView:`Save as View`,moreViews:`{{count}} more`,activeFilters:`Active filters`,activeSort:`Active sort`,manageViews:`Manage views`,manageAllViews:`Manage all views…`,searchViews:`Search views`,addNewView:`Add new view`,done:`Done`,noViewsFound:`No views match your search.`,dragToReorder:`Drag to reorder`,defaultView:`Default view`,tabActionsFor:`View actions for {{name}}`,readonlyAriaLabel:`Read-only view`,readonlyTooltip:`System view — duplicate to customize.`},detail:{back:`Back`,edit:`Edit`,editInline:`Edit`,save:`Save`,saveChanges:`Save changes`,saving:`Saving…`,editFieldsInline:`Edit fields`,lockedByApproval:`Locked for approval`,lockedTooltip:`This record has a pending approval request; editing is locked`,cancelApproval:`Recall approval`,cancelApprovalInFlight:`Recalling…`,cancelApprovalTooltip:`Recall the pending approval request to unlock this record`,cancelApprovalFailed:`Failed to recall approval`,cancelApprovalUnavailable:`Recalling approvals is not supported on this data source`,linkCopied:`Link copied to clipboard`,linkCopyFailed:`Failed to copy link`,cancel:`Cancel`,cancelEdit:`Discard changes`,sectionMoreDetails:`More details`,concurrentUpdateTitle:`This record was modified by someone else`,concurrentUpdateDescription:`Another user saved a newer version of {{field}} while you were editing. To prevent silently overwriting their change, please choose how to resolve the conflict.`,concurrentUpdateYourEdit:`Your edit`,concurrentUpdateCurrentValue:`Current value`,concurrentUpdateUpdatedBy:`Updated by {{name}}`,concurrentUpdateUpdatedAt:`Updated at {{when}}`,concurrentUpdateReload:`Reload latest`,concurrentUpdateOverwrite:`Overwrite anyway`,concurrentUpdateCancel:`Cancel`,openInNewTab:`Open in new tab`,share:`Share`,duplicate:`Duplicate`,export:`Export`,viewHistory:`View history`,delete:`Delete`,moreActions:`More actions`,addToFavorites:`Add to favorites`,removeFromFavorites:`Remove from favorites`,previousRecord:`Previous record`,nextRecord:`Next record`,recordOf:`{{current}} of {{total}}`,recordNotFound:`Record not found`,recordNotFoundDescription:`The record you are looking for does not exist or may have been deleted.`,goBack:`Go back`,details:`Details`,related:`Related`,relatedRecords:`{{count}} records`,relatedRecordOne:`{{count}} record`,noRelatedRecords:`No related records found`,loading:`Loading...`,copyToClipboard:`Copy to clipboard`,copied:`Copied!`,deleteConfirmation:`Are you sure you want to delete this record?`,editRecord:`Edit record`,viewAll:`View All`,new:`New`,emptyValue:`—`,activity:`Activity`,history:`History`,editRow:`Edit`,deleteRow:`Delete`,deleteRowConfirmation:`Are you sure you want to delete this record?`,deleteRowTitle:`Delete record`,actions:`Actions`,previousPage:`Previous`,nextPage:`Next`,pageOf:`Page {{current}} of {{total}}`,sortBy:`Sort by`,filterPlaceholder:`Filter...`,highlightFields:`Key Fields`,comments:`Comments`,searchComments:`Search comments…`,addCommentPlaceholder:`Add a comment… (Ctrl+Enter to submit)`,noMatchingComments:`No matching comments`,noCommentsYet:`No comments yet`,pinned:`Pinned`,pin:`Pin`,unpin:`Unpin`,justNow:`just now`,minutesAgo:`{{count}}m ago`,hoursAgo:`{{count}}h ago`,daysAgo:`{{count}}d ago`,createdBy:`Created by`,updatedBy:`Updated by`,dropFilesToUpload:`Drop files here or click to upload`,attachmentCount:`{{count}} attachment`,attachmentCountPlural:`{{count}} attachments`,removeAttachment:`Remove attachment`,unifiedDiff:`Unified diff`,sideBySideDiff:`Side-by-side diff`,noChanges:`No changes`,previousVersion:`Previous`,currentVersion:`Current`,discussion:`Discussion`,showDiscussion:`Show Discussion ({{count}})`,hideDiscussion:`Hide discussion`,bold:`Bold (Ctrl+B)`,italic:`Italic (Ctrl+I)`,listFormat:`List`,inlineCode:`Inline code`,mentionSomeone:`Mention someone`,preview:`Preview`,submitComment:`Submit (Ctrl+Enter)`,sendComment:`Send`,writeComment:`Write a comment…`,subscribedTooltip:`Subscribed — click to unsubscribe`,unsubscribedTooltip:`Subscribe to notifications`,firstRecord:`First record (Home)`,previousRecordKey:`Previous record (←)`,nextRecordKey:`Next record (→)`,lastRecord:`Last record (End)`,noRecords:`No records`,showEmptyRelated_one:`+ {{count}} empty`,showEmptyRelated_other:`+ {{count}} empty`,searchWhileNavigating:`Search while navigating`,searchRecords:`Search records…`,allActivity:`All Activity`,commentsOnly:`Comments Only`,fieldChangesFilter:`Field Changes`,tasksOnly:`Tasks Only`,leaveCommentPlaceholder:`Leave a comment… (Ctrl+Enter to submit)`,noActivity:`No activity recorded`,loadMore:`Load more`,edited:`(edited)`,via:`via {{source}}`,replyCount:`{{count}} reply`,replyCountPlural:`{{count}} replies`,replyPlaceholder:`Reply…`,filterActivity:`Filter activity`,openDiscussion:`Open discussion panel`,closeDiscussion:`Close discussion panel`,subscribeAriaLabel:`Subscribe to notifications`,unsubscribeAriaLabel:`Unsubscribe from notifications`,clearSearch:`Clear search`,copyEmail:`Copy email`,copyPhone:`Copy phone number`,copyRecordId:`Copy record ID`,showEmptyFields:`Show {{count}} empty fields`,hideEmptyFields:`Hide empty fields`,noValue:`No value`},chart:{noData:`No chart data available`,loading:`Loading chart...`},report:{rowTotal:`Row Total`,columnTotal:`Column Total`,grandTotal:`Grand Total`,totals:`Totals`,rowsLabel:`Row`,columnsLabel:`Column`,allLabel:`(All)`,emptyLabel:`(Empty)`,loading:`Loading…`,failedToLoad:`Failed to load matrix: {{message}}`,needsAcross:"Matrix report requires at least one `groupingsAcross` field.",aggregate:{count:`Count`,countDistinct:`Distinct Count`,sum:`Sum`,avg:`Average`,min:`Min`,max:`Max`,first:`First`},editor:{breadcrumb:`Configuration`,basic:`Basic`,title:`Title`,titlePlaceholder:`e.g. Pipeline by Quarter`,description:`Description`,descriptionPlaceholder:`What does this report show?`,type:`Report type`,typeTabular:`Tabular — flat list`,typeSummary:`Summary — grouped with totals`,typeMatrix:`Matrix — pivot rows × columns`,typeJoined:`Joined — multiple blocks`,typeHelp:`Pick the layout that matches what you want to see.`,data:`Data`,objectName:`Data source`,objectNamePlaceholder:`e.g. opportunity`,objectNameHelp:`Which object should this report query?`,limit:`Row limit`,limitPlaceholder:`e.g. 100`,columns:`Columns`,columnsHint:`Pick which fields appear as columns. Add an aggregate (Sum, Count…) on Summary or Matrix reports.`,filters:`Filters`,filtersHint:`Limit the rows that go into this report.`,filtersComplex:`This report uses an advanced filter that cannot be edited here. Save will keep it unchanged.`,groupBy:`Group by`,groupByHint:`Group the data and compute subtotals.`,rows:`Rows`,rowsHint:`Group rows by these fields.`,columnsAxis:`Columns`,columnsAxisHint:`Pivot these fields across the top.`,values:`Values`,valuesHint:`Numbers shown in each cell. Pick one or more fields and add an aggregate (Sum, Count…).`,grouping:`Grouping`,addGrouping:`Add grouping`,dateGranularity:`Date bucket`,dateGranularityNone:`(use raw value)`,day:`Day`,week:`Week`,month:`Month`,quarter:`Quarter`,year:`Year`,sortAsc:`Ascending`,sortDesc:`Descending`,chart:`Chart`,chartHint:`Optional visualization rendered alongside the table.`,chartType:`Chart type`,chartTitle:`Chart title`,chartTitlePlaceholder:`Defaults to the report title`,chartXAxis:`X-axis (category)`,chartYAxis:`Y-axis (value)`,chartShowLegend:`Show legend`,chartShowDataLabels:`Show data labels`,chartNone:`(no chart)`,chartBar:`Bar`,chartLine:`Line`,chartArea:`Area`,chartPie:`Pie`,chartDonut:`Donut`,chartFunnel:`Funnel`,validationNeedsObject:`Pick a data source before adding columns.`,validationMatrixNeedsRowsCols:`Matrix reports need at least one Row and one Column.`,validationSummaryNeedsRows:`Summary reports need at least one grouping field.`,blocks:`Blocks`,blocksHint:`Each block is its own table or chart. Block-level filters are ANDed with the report filter.`,addBlock:`Add block`,removeBlock:`Remove block`,blockName:`Block name`,blockNamePlaceholder:`unique_block_name`,blockLabel:`Display label`,blockLabelPlaceholder:`Shown above the block`,blockDescription:`Description`,blockDescriptionPlaceholder:`Optional context for this block`,validationJoinedNeedsBlocks:`Joined reports need at least one block.`,validationBlockNameRequired:`Every block needs a non-empty name.`,validationBlockNameDuplicate:`Block names must be unique within the report.`,validationBlockNeedsColumns:`Every block needs at least one column.`,noneOption:`(none)`,addCondition:`Add condition`,combineLogic:`Combine with`,opContains:`contains`,opIsEmpty:`is empty`,opIsNotEmpty:`is not empty`,formatAuto:`Auto`,formatCurrency:`Currency`,formatPercent:`Percent`,formatInteger:`Integer`,formatDate:`Date`,formatDatetime:`Date & time`,columnLabelPlaceholder:`Label override`,aggregateColumn:`Aggregate`,formatColumn:`Format`,addColumns:`Add fields`,searchFields:`Search fields…`,noMatchingFields:`No fields match your search.`,noFieldsAvailable:`No fields available.`,columnsCount:`{n} column(s) selected`,columnsEmpty:`No columns selected yet.`,fieldPickerTitle:`Select fields`,fieldPickerDescription:`Pick one or more fields to add. Use the search box to narrow the list.`,fieldPickerChangeTitle:`Change field`,fieldPickerAddGroupingTitle:`Add grouping`,fieldPickerEmpty:`(pick field)`,fieldPickerSelected:`{n} selected`,fieldPickerClear:`Clear selection`,fieldPickerAdd:`Add`,fieldPickerAddN:`Add {n}`}},map:{searchLocations:`Search locations…`,locationDetails:`Location Details`,markersCount:`{{count}} markers`,invalidCoordinates:`{{count}} record with missing or invalid coordinates excluded from the map.`,invalidCoordinatesPlural:`{{count}} records with missing or invalid coordinates excluded from the map.`},workflow:{draft:`Draft`,active:`Active`,paused:`Paused`,completed:`Completed`,cancelled:`Cancelled`,save:`Save`,publish:`Publish`,addNode:`Add Node`,workflowFlow:`Workflow Flow`,properties:`Properties`,connections:`Connections`,quickConnect:`Quick Connect`,fromPlaceholder:`From...`,toPlaceholder:`To...`,connect:`Connect`,label:`Label`,type:`Type`,description:`Description`,assignee:`Assignee`,assigneeType:`Assignee Type`,user:`User`,role:`Role`,group:`Group`,expression:`Expression`,timeoutMinutes:`Timeout (minutes)`,selectNodeToEdit:`Select a node to edit its properties`,workflowTitle:`Workflow Title`,newWorkflow:`New Workflow`,outConnections:`{{count}} out`,start:`Start`,end:`End`,task:`Task`,userTask:`User Task`,serviceTask:`Service Task`,scriptTask:`Script Task`,approval:`Approval`,condition:`Condition`,parallelGateway:`Parallel Gateway`,joinGateway:`Join Gateway`,boundaryEvent:`Boundary Event`,delay:`Delay`,notification:`Notification`,webhook:`Webhook`,allowConcurrency:`Allow (run concurrently)`,forbidConcurrency:`Forbid (skip new)`,replaceConcurrency:`Replace (cancel existing)`,queueConcurrency:`Queue (run after current)`,conditionEvent:`Condition`,manualEvent:`Manual`,webhookEvent:`Webhook`,timerEvent:`Timer`,signalEvent:`Signal`,versionHistory:`Version History`,importBpmn:`Import BPMN`,exportBpmn:`Export BPMN`,undo:`Undo`,redo:`Redo`,resetZoom:`Reset zoom`},dashboard:{addWidget:`Add widget`,removeWidget:`Remove widget`,editLayout:`Edit layout`,saveLayout:`Save layout`,resetLayout:`Reset layout`,total:`Total`,noDataAvailable:`No data available`,noDataSourceFor:`No data source available for`,trend:{vsLastQuarter:`vs last quarter`,vsLastMonth:`vs last month`,vsLastWeek:`vs last week`,vsLastYear:`vs last year`,vsYesterday:`vs yesterday`,vsPreviousPeriod:`vs previous period`}},configPanel:{save:`Save`,discard:`Discard`,close:`Close`,layout:`Layout`,columns:`Columns`,gap:`Gap`,rowHeight:`Row height`,data:`Data`,refreshInterval:`Refresh interval`,appearance:`Appearance`,title:`Title`,showDescription:`Show description`,theme:`Theme`,configuration:`Configuration`,general:`General`,advanced:`Advanced`},appDesigner:{createApp:`Create Application`,editApp:`Edit Application`,basicInfo:`Basic Info`,objects:`Objects`,navigation:`Navigation`,branding:`Branding`,appName:`App Name`,appTitle:`Title`,appDescription:`Description`,appIcon:`Icon`,template:`Template`,layout:`Layout`,layoutSidebar:`Sidebar`,layoutHeader:`Header`,layoutEmpty:`Empty`,selectObjects:`Select Objects`,searchObjects:`Search objects…`,selectAll:`Select All`,deselectAll:`Deselect All`,navBuilder:`Navigation Builder`,addGroup:`Add Group`,addUrl:`Add URL`,addSeparator:`Add Separator`,noNavItems:`No navigation items yet.`,logoUrl:`Logo URL`,primaryColor:`Primary Color`,faviconUrl:`Favicon URL`,preview:`Preview`,complete:`Complete`,snakeCaseHint:`Must be snake_case (e.g. my_app)`,modeEdit:`Edit`,modePreview:`Preview`,modeCode:`Code`,addWidget:`Add Widget`,widgetProperties:`Widget Properties`,dataSource:`Data Source`,valueField:`Value Field`,aggregate:`Aggregate`,colorVariant:`Color Variant`,addComponent:`Add Component`,componentProperties:`Component Properties`,viewType:`View Type`,fields:`Fields`,toolbar:`Toolbar`,showSearch:`Show Search`,showFilters:`Show Filters`,showSort:`Show Sort`,appearance:`Appearance`,rowHeight:`Row Height`,stripedRows:`Striped Rows`,bordered:`Bordered`,livePreview:`Live Preview`,stepBasicDesc:`Name, title, and layout`,stepObjectsDesc:`Select business objects`,stepNavigationDesc:`Build navigation tree`,stepBrandingDesc:`Logo, colors, and favicon`,noObjectsFound:`No objects found.`,noNavItemsHint:`No navigation items yet. Select objects in the previous step or add items manually.`,separator:`Separator`,separatorLabel:`— Separator —`,newGroup:`New Group`,newLink:`New Link`,saveDraft:`Save Draft`,cancelConfirmTitle:`Discard changes?`,cancelConfirmMessage:`You have unsaved changes. Are you sure you want to cancel?`,confirmDiscard:`Discard`,keepEditing:`Keep Editing`,navNoItems:`No navigation items. Click buttons above to add items.`,navNoPreviewItems:`No items`,navLivePreview:`Live Preview`,navCollapseGroup:`Collapse group`,navExpandGroup:`Expand group`,navAddChild:`Add child`,navMoveUp:`Move up`,navMoveDown:`Move down`,navRemove:`Remove`,navObjectPage:`Object Page`,navDashboard:`Dashboard`,navPage:`Page`,navReport:`Report`,navGroup:`Group`,navUrl:`URL`,navSeparator:`Separator`,navTypeObject:`Object`,navTypeDashboard:`Dashboard`,navTypePage:`Page`,navTypeReport:`Report`,navTypeUrl:`URL`,navTypeGroup:`Group`,navTypeSeparator:`Separator`,navTypeAction:`Action`,navEditIcon:`Edit icon`,navToggleVisible:`Toggle visibility`,navHidden:`Hidden`,navExportSchema:`Export JSON`,navImportSchema:`Import JSON`,navExportSuccess:`Navigation schema exported`,navImportSuccess:`Navigation schema imported`,navImportError:`Invalid navigation JSON`,navIconPlaceholder:`Icon name (e.g. Users)`,dashboardEditor:`Dashboard Editor`,noWidgets:`No widgets. Click a button above to add one.`,widgetLayoutSize:`Layout Size`,widgetWidth:`Width`,widgetHeight:`Height`,dashboardPreview:`Dashboard Preview`,noWidgetsPreview:`No widgets to preview`,pageCanvasEditor:`Page Canvas Editor`,emptyPage:`Empty page. Click a button above to add a component.`,pagePreview:`Page Preview`,noComponentsPreview:`No components to preview`,modePage:`Page`,modeDashboard:`Dashboard`,undo:`Undo`,redo:`Redo`,brandingEditor:`Branding Editor`,brandingExport:`Export JSON`,brandingImport:`Import JSON`,brandingPreview:`Preview`,brandingSampleButton:`Sample Button`,brandingSampleText:`This is how your brand theme will look.`,colorPalette:`Color Palette`,fontFamily:`Font Family`,fontDefault:`Default (System)`,modeLight:`Light`,modeDark:`Dark`,mobilePreview:`Mobile Preview`,objectManager:{title:`Object Manager`,addObject:`New Object`,searchPlaceholder:`Search objects…`,noObjects:`No objects found.`,objectName:`API Name`,objectLabel:`Label`,pluralLabel:`Plural Label`,icon:`Icon`,selectIcon:`Select icon…`,group:`Group`,noGroup:`No Group`,sortOrder:`Sort Order`,enabled:`Enabled`,relationships:`Relationships`,systemBadge:`System`,fieldCount:`{{count}} fields`,ungrouped:`Ungrouped`,deleteConfirmTitle:`Delete Object?`,deleteConfirmMessage:`This will permanently delete the object and all its fields. This action cannot be undone.`},fieldDesigner:{title:`Field Designer`,addField:`New Field`,searchPlaceholder:`Search fields…`,allTypes:`All Types`,noFields:`No fields found.`,fieldName:`API Name`,fieldLabel:`Label`,fieldType:`Type`,fieldGroup:`Group`,description:`Description`,required:`Required`,unique:`Unique`,readOnly:`Read Only`,hidden:`Hidden`,indexed:`Indexed`,externalId:`External ID`,trackHistory:`Track History`,defaultValue:`Default Value`,placeholder:`Placeholder`,referenceTo:`Reference To`,formula:`Formula`,options:`Options`,addOption:`Add Option`,validationRules:`Validation Rules`,addRule:`Add Rule`,systemBadge:`System`,ungrouped:`General`,deleteConfirmTitle:`Delete Field?`,deleteConfirmMessage:`This will permanently delete the field. Existing data in this field will be lost.`,basicSection:`Basic`,typeSpecificSection:`Type Settings`,advancedSection:`Advanced`,typeCategory:{text:`Text`,number:`Number`,date:`Date & Time`,choice:`Choice`,relation:`Relation`,advanced:`Advanced`}}},console:{title:`ObjectOS`,initializing:`Initializing application...`,search:`Search…`,breadcrumb:{dashboards:`Dashboards`,pages:`Pages`,reports:`Reports`,system:`System`},nav:{pinItem:`Pin {{name}}`,unpinItem:`Unpin {{name}}`,dragToReorder:`Drag to reorder`,favorites:`Favorites`},loadingSteps:{connecting:`Connecting to data source`,loadingConfig:`Loading configuration`,preparingWorkspace:`Preparing workspace`},error:{connectionFailed:`Cannot connect to server`,serverUnreachable:`The server at {{url}} is unreachable.`,checkServer:`Please check your network connection or that the backend is running.`,timeout:`Connection timed out after 10 seconds.`},actions:{retry:`Retry`,retrying:`Retrying…`},shortcuts:{title:`Keyboard Shortcuts`,description:`Quick reference for all available keyboard shortcuts.`,groups:{general:`General`,navigation:`Navigation`,dataViews:`Data Views`,preferences:`Preferences`},openCommandPalette:`Open command palette`,showShortcuts:`Show keyboard shortcuts`,closeDialog:`Close dialog / panel`,toggleSidebar:`Toggle sidebar`,focusSearch:`Focus search`,createRecord:`Create new record`,refreshData:`Refresh data`,editRecord:`Edit selected record`,toggleDarkMode:`Toggle dark mode`},commandPalette:{placeholder:`Type a command or search...`,noResults:`No results found.`,searching:`Searching…`,records:`Records`,recentRecords:`Recently viewed`,objects:`Objects`,dashboards:`Dashboards`,pages:`Pages`,reports:`Reports`,switchApp:`Switch App`,current:`Current`,preferences:`Preferences`,lightTheme:`Light Theme`,darkTheme:`Dark Theme`,systemTheme:`System Theme`,actions:`Actions`,openFullSearch:`Open Full Search Page`,createApp:`Create New App`},errors:{somethingWentWrong:`Something went wrong`,unexpectedError:`An unexpected error occurred while rendering this view.`,tryAgain:`Try Again`,goHome:`Go Home`,errorDetails:`Error Details (dev only)`},theme:{toggle:`Toggle theme`,light:`Light`,dark:`Dark`,system:`System`},objectView:{objectNotFound:`Object Not Found`,objectNotFoundDescription:`The object "{{objectName}}" does not exist in the current configuration.`,objectNotFoundHint:`Check your app navigation settings or select a different object from the sidebar.`,allRecords:`All Records`,exitDesignMode:`Exit Design Mode`,enterDesignMode:`Enter Design Mode`,metadataInspector:`Metadata Inspector`,editView:`Edit View`,addView:`Add View`,designTools:`Design tools`,new:`New`,import:`Import`,importTitle:`Import from CSV`,importedToast:`Imported {{count}} row(s).`,importedWithSkipped:`Imported {{ok}} row(s); skipped {{skipped}}.`,configureView:`Configure View`,closePanel:`Close panel`,showAdvancedSettings:`Show advanced settings`,showFewerSettings:`Show fewer settings`,page:`Page`,pageConfigHint:`Toolbar, navigation & view shell settings`,listConfigHint:`Data rendering, columns & appearance for this list type`,general:`General`,generalHint:`View title, description, and type`,toolbar:`Toolbar`,toolbarHint:`Search, filter, sort, group, and density toggles`,toolbarEnabledCount:`{{count}} of {{total}} enabled`,navigationSection:`Navigation`,navigationHint:`Row click behavior and detail view settings`,records:`Records`,recordsHint:`Selection mode, add record, and inline editing`,exportPrint:`Export & Print`,exportPrintHint:`Export formats, printing, and record count display`,showAllFields:`Show All`,hideAllFields:`Hide All`,searchFields:`Search fields...`,title:`Title`,description:`Description`,data:`Data`,source:`Source`,columns:`Columns`,filterBy:`Filter by`,sortBy:`Sort by`,appearance:`Appearance`,showDescription:`Show description`,viewType:`View type`,userFilters:`User filters`,enableSearch:`Enable search`,enableFilter:`Enable filter`,enableSort:`Enable sort`,enableHideFields:`Enable hide fields`,enableGroup:`Enable group`,enableColor:`Enable color`,enableDensity:`Enable density`,userActions:`User actions`,addRecordViaForm:`Add records through a form`,advanced:`Advanced`,allowExport:`Allow export`,recordCount:`{{count}} records`,noDescription:`No description`,none:`None`,columnsConfigured:`{{count}} columns`,save:`Save`,discard:`Discard`,createView:`Create View`,createViewDesc:`Pick a view type, then give it a name. You can change every setting afterwards.`,cancel:`Cancel`,create:`Create`,delete:`Delete`,deleteViewTitle:`Delete view`,deleteViewConfirm:`Are you sure you want to delete the view "{{name}}"? This cannot be undone.`,bulkDeleteConfirm:`Delete {{count}} selected records? This cannot be undone.`,duplicateViewName:`A view with this name already exists.`,viewTypeGrid:`Grid`,viewTypeGridDesc:`A spreadsheet-style table of records.`,viewTypeKanban:`Kanban`,viewTypeKanbanDesc:`Cards grouped into columns by a single-select field.`,viewTypeCalendar:`Calendar`,viewTypeCalendarDesc:`Records placed on a monthly calendar by date.`,viewTypeGallery:`Gallery`,viewTypeGalleryDesc:`Large image cards driven by an attachment field.`,viewTypeTimeline:`Timeline`,viewTypeTimelineDesc:`Records along a horizontal time axis.`,viewTypeGantt:`Gantt`,viewTypeGanttDesc:`Project bars with start / end and dependencies.`,viewTypeMap:`Map`,viewTypeMapDesc:`Geographic markers from latitude / longitude fields.`,viewTypeChart:`Chart`,viewTypeChartDesc:`Aggregated bar / line / pie visualisations.`,newView:`New View`,typeOptions:`Type Options`,groupByField:`Group by field`,groupByFieldHelp:`The kanban groups records into columns by this field's values.`,startDateField:`Start date field`,startDateFieldHelp:`The calendar places records on the cell matching this date.`,ganttStartDateFieldHelp:`The left edge of each Gantt bar uses this date.`,ganttEndDateFieldHelp:`The right edge of each Gantt bar uses this date.`,timelineDateFieldHelp:`Records are placed on the timeline by this date.`,titleField:`Title field`,latitudeField:`Latitude field`,latitudeFieldHelp:`Field providing the latitude coordinate (geo fields only).`,longitudeField:`Longitude field`,longitudeFieldHelp:`Field providing the longitude coordinate (geo fields only).`,imageField:`Image field`,imageFieldHelp:`The gallery cover comes from this image or attachment field.`,dateField:`Date field`,selectField:`Select field...`,selectOption:`Select...`,noEligibleFieldForType:`No eligible field of this type. Add one to the object first.`,viewTypeUnavailable:`This object has no field that can serve as "{{field}}".`,viewTypeUnavailableShort:`Not supported by this object.`,chartType:`Chart type`,chartTypeHelp:`Determines how the data is rendered.`,chartTypeBar:`Bar chart`,chartTypeLine:`Line chart`,chartTypePie:`Pie chart`,chartTypeArea:`Area chart`,chartTypeScatter:`Scatter chart`,xAxisField:`X-axis field`,xAxisFieldHelp:`The categorical or time dimension.`,yAxisField:`Y-axis field`,yAxisFieldHelp:`The numeric field to aggregate.`,gridOptionsHint:`Grid view uses the columns configured above.`,groupBy:`Group by`,prefixField:`Prefix field`,fields:`Fields`,fieldsVisible:`{{count}} visible`,sortsCount:`{{count}} sorts`,filtersCount:`{{count}} filters`,endDateField:`End date field`,color:`Color`,fieldTextColor:`Field text color`,rowHeight:`Row height`,wrapHeaders:`Wrap headers`,showFieldDescriptions:`Show field descriptions`,collapseAllByDefault:`Collapse all by default`,striped:`Striped rows`,bordered:`Bordered cells`,inlineEdit:`Edit records inline`,addDeleteRecordsInline:`Add/delete records inline`,clickIntoRecordDetails:`Click into record details`,navigationMode:`Navigation mode`,navigationWidth:`Navigation width`,navigationWidthHint:`Available for drawer, modal, and split navigation modes`,openNewTab:`Open in new tab`,openNewTabHint:`Available for page and new window navigation modes`,selectionMode:`Selection mode`,selectionNone:`None`,selectionSingle:`Single`,selectionMultiple:`Multiple`,pageSize:`Page size`,pageSizeOptions:`Page size options`,exportFormats:`Export formats`,exportMaxRecords:`Max records`,exportIncludeHeaders:`Include headers`,exportFileNamePrefix:`File name prefix`,searchableFields:`Searchable fields`,filterableFields:`Filterable fields`,resizableColumns:`Resizable columns`,densityCompact:`Compact`,densityComfortable:`Comfortable`,densitySpacious:`Spacious`,densityMode:`Density mode`,hiddenFields:`Hidden fields`,rowActions:`Row actions`,bulkActions:`Bulk actions`,sharing:`Sharing`,sharingEnabled:`Enable sharing`,sharingVisibility:`Visibility`,addRecordEnabled:`Enable add record`,addRecordPosition:`Position`,addRecordMode:`Mode`,addRecordFormView:`Form view`,conditionalFormatting:`Conditional formatting`,addRule:`Add rule`,quickFilters:`Quick filters`,addQuickFilter:`Add quick filter`,ufElements:`Elements`,ufDropdown:`Dropdown`,ufTabs:`Tabs`,ufToggle:`Toggle`,ufAddField:`+ Add filter field...`,ufNoFields:`No fields available`,ufAddTab:`+ Add tab`,ufTabLabel:`Label`,ufShowAllRecords:`Show "All records" tab`,ufAllowAddTab:`Allow adding tabs`,showRecordCount:`Show record count`,allowPrinting:`Allow printing`,virtualScroll:`Virtual scroll`,emptyStateTitle:`Empty state title`,emptyStateMessage:`Empty state message`,emptyStateIcon:`Empty state icon`,ariaLabel:`ARIA label`,ariaDescribedBy:`ARIA described by`,ariaLive:`ARIA live`,accessibility:`Accessibility`,viewTabs:`View Tabs`},localeSwitcher:{label:`Language`}},auth:{login:{title:`Sign in to your account`,description:`Enter your email and password to continue`,emailLabel:`Email`,emailPlaceholder:`name@example.com`,passwordLabel:`Password`,passwordPlaceholder:`Enter your password`,forgotPasswordText:`Forgot password?`,submitButton:`Sign In`,submittingButton:`Signing in...`,noAccountText:`Don't have an account?`,signUpText:`Sign up`,errors:{invalidCredentials:`Invalid email or password. Please try again.`,emailNotVerified:`Please verify your email address before signing in.`}},register:{title:`Create an account`,description:`Enter your information to get started`,nameLabel:`Name`,namePlaceholder:`John Doe`,emailLabel:`Email`,emailPlaceholder:`name@example.com`,passwordLabel:`Password`,passwordPlaceholder:`Create a password (min. 8 characters)`,confirmPasswordLabel:`Confirm Password`,confirmPasswordPlaceholder:`Confirm your password`,passwordMismatchError:`Passwords do not match`,passwordTooShortError:`Password must be at least 8 characters`,submitButton:`Create Account`,submittingButton:`Creating account...`,hasAccountText:`Already have an account?`,signInText:`Sign in`,errors:{userExists:`An account with this email already exists. Try signing in instead.`},verifyInbox:{title:`Check your inbox`,description:`We've sent a verification link to {{email}}. Click the link to activate your account.`,resend:`Resend verification email`,resending:`Sending…`,resent:`Verification email sent.`,backToSignIn:`Back to sign in`}},forgotPassword:{title:`Reset your password`,description:`Enter your email address and we'll send you a link to reset your password`,emailLabel:`Email`,emailPlaceholder:`name@example.com`,submitButton:`Send Reset Link`,submittingButton:`Sending...`,successTitle:`Check your email`,successDescription:`We've sent a password reset link to {{email}}. Please check your inbox.`,backToSignInText:`Back to sign in`,rememberPasswordText:`Remember your password?`,signInText:`Sign in`},resetPassword:{title:`Set a new password`,description:`Choose a password you have not used before.`,newPassword:`New password`,confirmPassword:`Confirm password`,submit:`Update password`,submitting:`Updating…`,success:`Password updated`,failed:`Reset failed`,invalidToken:`This reset link is invalid or has expired.`,missingToken:`Reset link is missing or expired`,passwordsMismatch:`Passwords do not match`,requestNewLink:`Request a new link`},verifyEmail:{title:`Verify your email address`,description:`We sent a verification link to your email address. Please click the link to verify your account.`,sentTo:`Sent to:`,verifyingTitle:`Verifying…`,verifyingDescription:`Hang tight while we confirm your email.`,successTitle:`Email verified`,successDescription:`Your email is confirmed. You can now sign in.`,errorTitle:`Verification failed`,errorDescription:`Verification failed. Please request a new link.`,missingToken:`Verification link is missing a token.`,emailMissing:`Email address is missing`,resendButton:`Resend verification email`,resending:`Sending…`,resent:`Email sent! Check your inbox`,resentSuccess:`Verification email sent!`,resentDescription:`Please check your inbox and click the verification link.`,resendFailed:`Cannot resend verification email`,signInLink:`Go to sign in`,backToSignIn:`Back to sign in`,backToLogin:`Back to login`,checkSpam:`Didn't receive the email? Check your spam folder or contact support.`,or:`Or`},setup:{welcomeTitle:`Welcome to ObjectStack`,description:`Create the first owner account to finish setting up this deployment.`,yourName:`Your name`,orgName:`Organization name`,orgNamePlaceholder:`Acme Inc.`,emailLabel:`Email`,emailPlaceholder:`name@example.com`,passwordLabel:`Password`,passwordHint:`Minimum 8 characters`,submit:`Create owner account`,submitting:`Setting up…`,failed:`Setup failed`},device:{title:`Authorize new device`,subtitle:`Approve this device to sign in as {{email}}.`,userCodeLabel:`Device code`,loggedInAs:`Signed in as {{email}}`,approve:`Approve device`,approving:`Approving…`,approvedTitle:`Device authorized`,approvedDescription:`You can return to the device — it should sign in shortly.`,approveSuccess:`Device authorized`,approveSuccessDescription:`You can close this window.`,approveFailed:`Approval failed`,deny:`Deny request`,denying:`Denying…`,deniedTitle:`Access denied`,deniedDescription:`The device will not be granted access.`,denyFailed:`Failed to deny request`,invalidTitle:`Invalid device link`,invalidDescription:`No device code was provided in the URL.`,loading:`Loading…`,cancel:`Cancel`},shell:{tenantHostHint:`You are signing in to this workspace`}},errors:{networkError:`Network error. Please check your connection.`,serverError:`Server error. Please try again later.`,notFound:`Resource not found.`,unauthorized:`You are not authorized to perform this action.`,forbidden:`Access denied.`,timeout:`Request timed out. Please try again.`,unknown:`An unexpected error occurred.`},workspace:{label:`Workspaces`,default:`My Workspace`,switch:`Switch workspace`,create:`Create workspace`,createTitle:`Create a workspace`,createDescription:`A workspace is a shared space for your team to collaborate.`,createButton:`Create workspace`,nameLabel:`Workspace name`,namePlaceholder:`e.g., Acme Inc`,slugLabel:`URL slug`,slugHint:`Used in URLs. Only lowercase letters, numbers, and hyphens.`,invite:`Invite member`,members:`Members`,settings:`Workspace settings`},sidebar:{settings:`Settings`,help:`Help`,helpTooltip:`Help & Documentation`,activityFeed:`Activity feed`,notifications:`Notifications`,approvals:`Approvals`,inbox:`Inbox`,inboxAriaLabel:`Open inbox`,area:`Area`,recent:`Recent`,favorites:`Favorites`,starred:`Starred`,removeFromFavorites:`Remove {{name}} from favorites`},home:{title:`Home`,subtitle:`Your workspace dashboard`,nav:`Home`,allApps:`All Applications`,greetingMorning:`Good morning`,greetingAfternoon:`Good afternoon`,greetingEvening:`Good evening`,greetingNight:`Working late`,heroTagline:`Pick up where you left off, or explore something new.`,open:`Open`,stats:{apps:`Applications`,starred:`Starred`,recent:`Recent items`},loading:`Loading workspace...`,recent:`Recent`,starred:`Starred`,welcome:`Welcome to ObjectUI`,welcomeDescription:`Get started by creating your first application or configure your system settings.`,createFirstApp:`Create Your First App`,systemSettings:`System Settings`,browseMarketplace:`Browse App Marketplace`,quickActions:{title:`Quick Actions`,createApp:`Create App`,createAppDesc:`Start with a new application`,manageObjects:`Manage Objects`,manageObjectsDesc:`Configure data models`,systemSettings:`System Settings`,systemSettingsDesc:`Configure your workspace`},recentApps:{title:`Recently Accessed`,itemType:{object:`Object`,dashboard:`Dashboard`,page:`Page`,record:`Record`}},starredApps:{title:`Starred`},gettingStarted:{title:`Make this home yours`,description:`Star an app to pin it here for one-click access. Anything you open will show up under Recently Accessed automatically.`,cta:`Browse all applications`},appCard:{noDescription:`No description`,default:`Default`}},layout:{appSwitcher:{home:`Home`,addApp:`Add App`,editApp:`Edit App`,manageAllApps:`Manage All Apps`,systemConsole:`System Console`,noAppsConfigured:`No apps configured`},activityFeed:{title:`Recent Activity`,filter:`Filter`,empty:`No recent activity`,viewAll:`View all activity`,ariaLabel:`Activity feed`,typeCreate:`Create`,typeUpdate:`Update`,typeDelete:`Delete`,typeComment:`Comment`,relativeJustNow:`just now`,relativeSecondsAgo:`{{count}}s ago`,relativeMinutesAgo:`{{count}}m ago`,relativeHoursAgo:`{{count}}h ago`,relativeDaysAgo:`{{count}}d ago`},metadata:{label:`Metadata`,toggleTitle:`Toggle Metadata Inspector`,panelTitle:`Metadata Inspector`,jsonBadge:`JSON`,copyJson:`Copy JSON`}},search:{title:`Search`,back:`Back`,placeholder:`Search objects, dashboards, pages, reports...`,inputAriaLabel:`Search objects, dashboards, pages, reports`,resultsCount:`{{count}} result for "{{query}}"`,resultsCountPlural:`{{count}} results for "{{query}}"`,itemsAvailable:`{{count}} items available`,noResults:`No results found`,noResultsHint:`Try adjusting your search terms`,typeObjects:`Objects`,typeDashboards:`Dashboards`,typePages:`Pages`,typeReports:`Reports`,badgeObject:`object`,badgeDashboard:`dashboard`,badgePage:`page`,badgeReport:`report`},empty:{objectNotFound:`Object Not Found`,objectNotFoundDescription:`Object "{{name}}" definition missing. Check your configuration or navigate back to select a valid object.`,recordNotFound:`Record not found`,recordNotFoundDescription:`The record you are looking for does not exist or may have been deleted.`,pageNotFound:`Page Not Found`,pageNotFoundDescription:`The page "{{name}}" could not be found. It may have been removed or renamed.`,dashboardNotFound:`Dashboard Not Found`,dashboardNotFoundDescription:`The dashboard "{{name}}" could not be found. It may have been removed or renamed.`,reportNotFound:`Report Not Found`,reportNotFoundDescription:`The report "{{name}}" could not be found. It may have been removed or renamed.`,noAppsConfigured:`No Apps Configured`,noAppsConfiguredDescription:`No applications have been registered. Create your first app or visit System Settings to configure your environment.`,createFirstApp:`Create Your First App`,systemSettings:`System Settings`,back:`Back`},renderer:{noPageSchema:`No page schema provided`,noFormSchema:`No form schema provided`,noDashboardSchema:`No dashboard schema provided`,pageRendering:`Page rendering: {{name}}`,dashboardRendering:`Dashboard rendering: {{name}}`,formRenderingMode:`Form rendering in {{mode}} mode`,formRenderingFor:`for record {{id}}`,createRecord:`Create Record`,editRecord:`Edit Record`,page:`Page`,dashboard:`Dashboard`,save:`Save`,cancel:`Cancel`},actionDialog:{title:`Action Parameters`,description:`Please provide the required information to continue.`,selectPlaceholder:`Select {{label}}`,requiredError:`{{label}} is required`,lookupPlaceholder:`Paste the {{label}} record id (UUID)`,lookupHelpText:`Enter the record id of the referenced object. A picker is coming soon.`,cancel:`Cancel`,confirm:`Confirm`,defaultActionTitle:`Action`,ok:`OK`},rowAction:{openMenu:`Open menu`,edit:`Edit`,delete:`Delete`},navigationSync:{addedPage:`Navigation updated: added page "{{name}}"`,addedDashboard:`Navigation updated: added dashboard "{{name}}"`,removedPage:`Navigation updated: removed page "{{name}}"`,removedDashboard:`Navigation updated: removed dashboard "{{name}}"`,renamedPage:`Navigation updated: renamed page "{{oldName}}" → "{{newName}}"`,renamedDashboard:`Navigation updated: renamed dashboard "{{oldName}}" → "{{newName}}"`,undoLabel:`Undo`,undone:`Navigation change undone`,undoFailed:`Failed to undo navigation change`,updateFailed:`Failed to update navigation`},objectActions:{deleteSuccess:`{{label}} deleted successfully`,deleteFailed:`Failed to delete {{label}}`,noRecordId:`No record ID provided`,deleteConfirm:`Are you sure you want to delete this record?`,bulkDeleteSuccess:`Deleted {{count}} {{label}} records`,bulkDeletePartial:`{{succeeded}} deleted, {{failed}} failed`},objectViewActions:{renameFailed:`Failed to rename view`,deleteFailed:`Failed to delete view`},dashboardActions:{pdfPreparing:`Preparing PDF export…`,exportFailed:`Export failed: {{message}}`,forecastSoon:`Forecast view coming soon`},recordDetail:{viewersTooltip:`Users viewing this record`},cellRender:{empty:`Empty`,yes:`Yes`,no:`No`,systemFields:`System`},user:{profile:`Profile`,settings:`Settings`,logout:`Log out`,preferences:`Preferences`,theme:`Theme`,language:`Language`},organizations:{mine:`My Organizations`,title:`Organizations`,heading:`Your Organizations`,subtitle:`Select an organization to continue, or create a new one.`,searchPlaceholder:`Search for an organization`,new:`New organization`,current:`Current organization`,manage:`Manage`,emptyTitle:`No organizations yet`,emptyDescription:`Create your first organization to get started.`,noMatches:`No organizations match your search.`},notifications:{empty:`No notifications`,emptyUnread:`You're all caught up`,filterUnread:`Unread`,filterAll:`All`,markAllRead:`Mark all read`,viewAll:`View all notifications`,approvalsPending:`{{count}} pending approvals`,viewApprovals:`View approvals`,noPendingApprovals:`No pending approvals`,openApprovalsInbox:`Open Approvals Inbox`},publicForm:{submit:`Submit`,submitting:`Submitting…`,submitAnother:`Submit another response`,poweredBy:`Powered by ObjectStack`,secureNotice:`Your information is transmitted securely and only used to respond to your request.`,thankYouTitle:`Thank you!`,thankYouMessage:`Your submission has been received successfully.`,redirecting:`Redirecting in {{seconds}} seconds…`,unavailableTitle:`Form unavailable`,unavailableDescription:`No public form is available at this URL. Make sure the underlying view has anonymous sharing enabled and matches this slug.`,tryDemo:`Try the demo`,retry:`Retry`,loading:`Loading form…`,requiredHint:`* Required field`,consentLabelDefault:`I agree to the privacy policy and consent to my data being processed for this request.`,consentLink:`Privacy policy`,consentRequired:`Please accept the privacy policy to continue.`,rateLimited:`Please take a moment to review your answers before submitting.`,redirectBlocked:`Submission accepted, but the redirect URL was blocked for security.`,demo:{contactTitle:`Contact us`,contactDescription:`Tell us about your project and a sales representative will get back to you within one business day.`,supportTitle:`Submit a support request`,supportDescription:`Tell us what is going wrong — our team responds within one business day.`,thankYouSalesTitle:`Thanks — we received your message!`,thankYouSalesMessage:`A sales representative will be in touch within one business day.`,thankYouSupportTitle:`Got it — your request is in the queue.`,thankYouSupportMessage:`A support engineer will follow up shortly. Save this page if you have more screenshots to add.`,field:{firstName:`First name`,lastName:`Last name`,email:`Work email`,phone:`Phone`,jobTitle:`Job title`,company:`Company`,website:`Website`,industry:`Industry`,companySize:`Company size`,howCanWeHelp:`How can we help?`,subject:`Subject`,description:`Description`,issueType:`Issue type`,priority:`Priority`},industry:{technology:`Technology`,software:`Software / SaaS`,finance:`Finance`,healthcare:`Healthcare`,retail:`Retail`,other:`Other`},issueType:{question:`Question`,problem:`Problem`,bug:`Bug`,feature_request:`Feature request`},priority:{low:`Low`,medium:`Medium`,high:`High`,critical:`Critical`}}},marketplace:{title:`App Marketplace`,subtitle:`Browse approved apps published to the ObjectStack catalog. Click an app to view details and install it into one of your environments.`,searchPlaceholder:`Search apps by name or manifest ID…`,searchAria:`Search marketplace apps`,installed:`Installed`,installedCount:`Installed ({{count}})`,refresh:`Refresh`,all:`All`,noApprovedYet:`No apps have been approved for the marketplace yet.`,noMatchFilters:`No apps match your filters.`,noDescription:`No description provided.`,back:`Back to marketplace`,installedTitle:`Installed Apps`,installedSubtitle:`Marketplace packages currently installed into this runtime's kernel. Cached manifests live in <code>.objectstack/installed-packages/</code> and survive restarts.`,installedEmpty:`No marketplace apps installed in this runtime yet.`,browseLink:`Browse the marketplace →`,installedAdditiveNote:`<strong>Note:</strong> The kernel API is additive only — uninstall removes the on-disk manifest so the package won't load on next boot, but the running kernel keeps the app registered until you restart the runtime.`,installedAt:`Installed {{when}}`,installedBy:`by {{user}}`,installedPackageId:`package`,cachedAs:`Cached as <code>{{path}}</code>`,versionBadge:`v{{version}}`,installedBadge:`Installed v{{version}}`,load:{failed:`Failed to load marketplace`,failedHint:`By default this runtime points at the public ObjectStack cloud. Check the runtime is online, or override <code>OS_CLOUD_URL</code> to point at a self-hosted control plane.`,packageFailed:`Failed to load package`,notFound:`Not found.`},detail:{homepage:`Homepage`,installedV:`Installed · v{{version}}`,about:`About`,noReadme:`No readme provided.`,versions:`Versions`,noApprovedVersions:`No approved versions.`,prerelease:`pre`,moreOptions:`More install options`,uninstallFromRuntime:`Uninstall from this runtime`},action:{install:`Install`,reinstall:`Reinstall`,working:`Working…`,installToCloud:`Install to cloud…`,installing:`Installing…`,uninstall:`Uninstall`,uninstalling:`Uninstalling…`,details:`Details`,close:`Close`,dismiss:`Dismiss`,openOnCloud:`Open on cloud`,backHome:`Back to home`},install:{dialogTitle:`Install {{name}}`,dialogDescCurrent:`Install into this environment ({{host}}).`,dialogDescPicker:`Choose an environment to install this app into. You need to be signed into ObjectStack Cloud.`,environment:`Environment`,environmentPlaceholder:`Pick an environment`,includeSampleData:`Include sample data`,noEnvs:`No environments found in your active organization.`,noPermission:`You do not have permission to install apps in any environment. Only organization owners and admins can install — ask your workspace admin.`,signInFirst:`You need to sign into ObjectStack Cloud first. Click "Open on cloud" below.`,success:`Installed successfully. Open the environment to see the new app.`,localSuccess:`Installed v{{version}} to this runtime. "{{name}}" should now appear in the app switcher.`,localManifestConflict:`{{message}}
|
package/dist/assets/{highlighted-body-OFNGDK62-BcbCsvGi.js → highlighted-body-OFNGDK62-_uUbA42F.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{r as t,y as n}from"./vendor-react-CyVA1SE-.js";import{a as r,o as i,s as a}from"./plugin-chatbot-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{r as t,y as n}from"./vendor-react-CyVA1SE-.js";import{a as r,o as i,s as a}from"./plugin-chatbot-BHoielbC.js";var o=e(n(),1),s=t(),c=({code:e,language:t,raw:n,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,o.useContext)(a),p=i(),[m,h]=(0,o.useState)(n);return(0,o.useEffect)(()=>{if(!p){h(n);return}let r=p.highlight({code:e,language:t,themes:f},e=>{h(e)});r&&h(r)},[e,t,f,p,n]),(0,s.jsx)(r,{className:c,language:t,lineNumbers:u,result:m,startLine:l,...d})};export{c as HighlightedCodeBlockBody};
|