@genesislcap/foundation-rapid-cdn 14.484.0 → 14.484.2-alpha-92fa356.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.
@@ -104,5 +104,5 @@ function mz(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o
104
104
  </${o}>`}} `)} `}} `,z6=W` ${Fb(e=>e.field,y6,W`<div>Select a field to set value</div>`)} `;let x6=class extends be{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),X0(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,f6(Z0(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&h6(Z0(this))?parseInt(t.value):this.field&&u6(Z0(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(J0.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(J0.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};Nu([re({attribute:"value-index"})],x6.prototype,"valueIndex",void 0),Nu([re({mode:"boolean"})],x6.prototype,"variadic",void 0),Nu([re({mode:"boolean",attribute:"validation-error"})],x6.prototype,"validationError",void 0),Nu([re({attribute:"validation-msg"})],x6.prototype,"validationMsg",void 0),Nu([g],x6.prototype,"field",void 0),Nu([g],x6.prototype,"operator",void 0),Nu([g],x6.prototype,"value",void 0),Nu([g],x6.prototype,"config",void 0),Nu([g],x6.prototype,"styles",void 0),x6=Nu([ye({name:"expression-rule-value",template:z6,styles:p6,shadowOptions:{delegatesFocus:!0}})],x6);const C6=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:L6(e,t),L6=(e,t)=>{var i,o;switch(Z0(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return W0(new Date);case"date-time":return Y0(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const c="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(c).length)throw new Error("Enums require configured values");return Object.keys(c)[0]}}},M6=(e,t)=>{var i,o,c,s;const a=(n=e,r=t,e=>{var t,i,o;if((null===(t=null==n?void 0:n.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=r.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in r)||!r.value||!r.operator)return null;const c=1===r.operator.nbInputs?[r.value]:r.value;return e>=c.length?null:c[e]});var n,r;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:C6(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:C6(e,t),null!==(c=a(1))&&void 0!==c?c:C6(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:C6(e,t)]}}},w6=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},k6=e=>!e&&0!==e,S6=Ce` .rule-container{border: 1px solid #eee;margin-bottom: 5px;padding: 5px;display: grid;grid-template-columns: auto 1fr}.rule-container.error{border-color: red}.margin{margin-left: calc(var(--design-unit) * 1px);margin-right: calc(var(--design-unit) * 1px)}.rule-header{margin-bottom: 5px;display: flex;justify-content: flex-end}.rule-actions{display: inline-block}.rule-content{display: flex;flex-wrap: wrap;align-items: center}.rule-field-container, .rule-operator-container, .rule-value-container{display: inline-block;margin: 0 5px 0 0;vertical-align: middle}.rule-value-container{border-left: var(--rule-value-separator);padding-left: 5px}.rule-value-container label{margin-bottom: 0;font-weight: normal}.rule-value-container label.block{display: block}expression-rule-value{display: flex}`,$6=W` ${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return W`<div class="rule-container ${e=>Jt(["error",e.error])}"><div class="rule-content"><expression-rule-field class="margin" :fields=${e=>e.config.fields}:field=${e=>{var t;return null===(t=e.model)||void 0===t?void 0:t.field}}:config=${e=>e.config}:styles=${e=>e.styles}@field-selected=${(e,t)=>e.handleFieldSelected(t.event)}></expression-rule-field><expression-rule-operator class="margin" :operators=${e=>e.config.operators}:field=${e=>e.model.field}:operator=${e=>{var t;return null===(t=e.model)||void 0===t?void 0:t.operator}}:config=${e=>e.config}:styles=${e=>e.styles}@operator-selected=${(e,t)=>e.handleOperatorSelected(t.event)}></expression-rule-operator>${qe(e=>e.operandIterator,W`<expression-rule-value class="margin" :config=${(e,t)=>t.parent.config}:styles=${(e,t)=>t.parent.styles}:field=${(e,t)=>t.parent.model.field}:operator=${(e,t)=>t.parent.model.operator}:value=${(e,t)=>t.parent.operandValue(t.index)}value-index=${(e,t)=>t.index}?variadic=${(e,t)=>{var i,o;return"many"===(null===(o=null===(i=t.parent.model)||void 0===i?void 0:i.operator)||void 0===o?void 0:o.nbInputs)}}@value-updated=${(e,t)=>t.parent.handleValueChanged(t.event)}@remove-variadic-operand=${(e,t)=>t.parent.handleRemoveVarArg(t.event)}></expression-rule-value>`,{positioning:!0,recycle:!1})} ${He(e=>{var t,i;return"many"===(null===(i=null===(t=e.model)||void 0===t?void 0:t.operator)||void 0===i?void 0:i.nbInputs)},W`<${o}type="button" class="btn btn-sm btn-accept" @click="${e=>e.dispatchAddVarArg()}">
105
105
  +
106
106
  </${o}>`)}</div><div class="rule-header"><div class="btn-group rule-actions"><${o}type="button" class="btn btn-sm btn-danger" data-delete="rule" @click="${(e,t)=>e.dispatchDeleteRule(t.event)}">
107
- Delete Rule </${o}></div></div></div>`}} `;let E6=class extends be{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),X0(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==Z0(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(k6)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,C6(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(J0.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,c={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:c,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:w6(this.model,t,i)};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:M6(o,this.model)},bubbles:!0,composed:!0}))}};Nu([g],E6.prototype,"config",void 0),Nu([g],E6.prototype,"styles",void 0),Nu([g],E6.prototype,"model",void 0),Nu([g],E6.prototype,"index",void 0),Nu([re({mode:"boolean"})],E6.prototype,"error",void 0),Nu([v],E6.prototype,"operandIterator",null),E6=Nu([ye({name:"expression-rule",template:$6,styles:S6,shadowOptions:{delegatesFocus:!0}})],E6);let N6=class extends be{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=q0(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=G0(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(J0.AddGroup,this.handleAddGroup),this.addEventListener(J0.DelGroup,this.handleDeleteGroup),this.addEventListener(J0.AddRule,this.handleAddRule),this.addEventListener(J0.DelRule,this.handleDeleteRule),this.addEventListener(J0.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(J0.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(J0.AddGroup,this.handleAddGroup),this.removeEventListener(J0.DelGroup,this.handleDeleteGroup),this.removeEventListener(J0.AddRule,this.handleAddRule),this.removeEventListener(J0.DelRule,this.handleDeleteRule),this.removeEventListener(J0.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(J0.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:j0,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=U0(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=U0(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=H0(i=this.model,V0(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=H0(i=this.model,B0(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===j0?Object.assign(Object.assign({},e),i):H0(e,V0(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return H0(e,B0(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};Nu([g],N6.prototype,"config",void 0),Nu([g],N6.prototype,"styles",void 0),Nu([g],N6.prototype,"model",void 0),N6=Nu([ye({name:"expression-builder",template:a6,styles:e6})],N6);let A6=class extends N6{};A6=Nu([ye({name:"foundation-expression-builder",styles:e6,template:a6})],A6);const T6=["int","short","long"],O6=["double","bigdecimal"],R6=[...T6,...O6],I6=["date","date-time"],D6=["string","enum"],F6=["boolean"],_6=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function H6(e){switch(_6(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function P6(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function V6(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function B6(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function U6(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=_6(e);if(D6.includes(i))return t;if(R6.includes(i))return t.toString();if(F6.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(I6.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function j6(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?j6(e,t):t(e)).filter(Boolean)}}function q6(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=_6(e);if(D6.includes(i))return t;if(T6.includes(i))return parseInt(t);if(O6.includes(i))return parseFloat(t);if(F6.includes(i))return t;if(I6.includes(i)){const e=new Date(parseInt(t));return"date"===i?W0(e):Y0(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const G6={template:a6,styles:e6};var W6;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(W6||(W6={}));const Y6=[{type:W6.logicalOperations.AND,maxRules:"many"},{type:W6.logicalOperations.OR,maxRules:"many"}],K6={EQUALS:W6.operations.EQUALS,NOT_EQUALS:W6.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:W6.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:W6.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:W6.operations.LESS_THAN,LESS_THAN_OR_EQUAL:W6.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:W6.operations.IS_CURRENT,IS_PREVIOUS:W6.operations.IS_PREVIOUS},Z6=e=>({type:"enum",input:"select",values:e}),Q6=Z6({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),X6=Z6({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),J6=[{type:K6.EQUALS,label:"Equals",nbInputs:1,applyTo:[...D6,...F6,...R6,...I6],tooltip:"Check the equality of the field compared to a set value"},{type:K6.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...D6,...F6,...R6,...I6],tooltip:"Check that the field is different from a set value"},{type:K6.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...F6,...R6,...I6],tooltip:"Check if the field value is null"},{type:K6.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...F6,...R6,...I6],tooltip:"Check if the field value is not null"},{type:K6.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:K6.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:K6.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:K6.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:K6.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is greater than a specified number"},{type:K6.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:K6.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is less than a specified number"},{type:K6.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is less than or equal to a specified number"},{type:K6.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is before a specified date/time"},{type:K6.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is after a specified date/time"},{type:K6.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is on or before a specified date/time"},{type:K6.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is on or after a specified date/time"},{type:K6.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...I6],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:X6,optgroup:"Relative Period"},{type:K6.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...I6],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:Q6,optgroup:"Relative Period"}];function e8(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=U6(e),c=H6(o),s=function(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}(o.operator.type);switch(s){case K6.EQUALS:case K6.NOT_EQUALS:case K6.GREATER_THAN:case K6.GREATER_THAN_OR_EQUAL:case K6.LESS_THAN:case K6.LESS_THAN_OR_EQUAL:return P6(o,s,c);case K6.IS_NULL:return V6(o,W6.operations.EQUALS,{TYPE:"NULL"});case K6.NOT_NULL:return V6(o,W6.operations.NOT_EQUALS,{TYPE:"NULL"});case K6.IS_NULL_OR_BLANK:case K6.NOT_NULL_OR_BLANK:case K6.CONTAINS:case K6.CONTAINS_WORDS_STARTING_WITH:case K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case K6.IS_CURRENT:case K6.IS_PREVIOUS:return function(e,t){switch(t){case K6.IS_NULL_OR_BLANK:return B6(e,W6.methodCall.IS_NULL_OR_BLANK,[]);case K6.NOT_NULL_OR_BLANK:return B6(e,W6.methodCall.NOT_NULL_OR_BLANK,[]);case K6.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return B6(e,W6.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case K6.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return B6(e,W6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return B6(e,W6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case K6.IS_CURRENT:case K6.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return B6(e,W6.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===K6.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function t8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return q6(function(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?K6[K6.IS_NULL]:K6[K6.NOT_NULL];return J6.find(t=>t.type===e)}const i=function(e,t){if("date"!==t.field.type&&"date-time"!==t.field.type)return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}(t.OPERATION,e);return J6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function i8(e,t){return{combinator:Y6.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return i8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return t8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[K6[K6.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[K6[K6.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[K6[K6.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[K6[K6.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[K6[K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===W6.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[K6["CURRENT"===t.PARAMETERS[2].VALUE?K6.IS_CURRENT:K6.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:J6.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let o8=class extends N6{ruleConfigChanged(e,t){this.config=Object.assign({combinators:Y6,operators:J6,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:i8(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=j6(e,e8);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Nu([g],o8.prototype,"ruleConfig",void 0),o8=Nu([ye({name:"foundation-rule-expression-builder",styles:e6,template:a6})],o8);const c8={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},s8=[{type:c8.PLUS,label:"Add (+)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:c8.MINUS,label:"Subtract (-)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:c8.MULTIPLY,label:"Multiply (*)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:c8.DIVIDE,label:"Divide (/)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:c8.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:c8.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function a8(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=U6(e),c=H6(o),s=o.operator.type;switch(s){case c8.TRIM:case c8.CONVERT_TO_DATE:case c8.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case c8.TRIM:return B6(e,W6.methodCall.TRIM,[]);case c8.CONVERT_TO_DATE:return B6(e,W6.methodCall.LONG_TO_DATE,[]);case c8.CONVERT_TO_DATE_TIME:return B6(e,W6.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case c8.PLUS:case c8.MINUS:case c8.DIVIDE:case c8.MULTIPLY:return P6(o,s,c);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function n8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return q6(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return s8.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function r8(e,t){return{combinator:R0,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return r8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return n8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[c8[c8.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[c8[c8.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[c8[c8.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:s8.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let l8=class extends N6{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=r8(t.fields,i);this.config={combinators:[R0],operators:s8,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:a8(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Nu([g],l8.prototype,"valueConfig",void 0),l8=Nu([ye({name:"foundation-value-expression-builder",styles:e6,template:a6})],l8);const d8=W`<template ${Ie("notificationListener")}><slot></slot></template>`;class h8 extends qt{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Tu(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(EC.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),$C(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>Tu(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return Tu(this,void 0,void 0,function*(){this.resourceName&&(yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return Tu(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Dz(e))}):xx.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,c=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const n={title:t,body:i,createdAt:c,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};LC(n,this.tagName)}}Nu([g],h8.prototype,"notificationListener",void 0),Nu([fz],h8.prototype,"connect",void 0),Nu([re({attribute:"resource-name"})],h8.prototype,"resourceName",void 0),Nu([re({attribute:"close-timeout",converter:ae})],h8.prototype,"closeTimeout",void 0),Nu([g],h8.prototype,"toastButtons",void 0),Nu([re({attribute:"toast-position"})],h8.prototype,"toastPosition",void 0),Nu([Wz],h8.prototype,"datasource",void 0),h8.compose({baseName:"notification-listener",template:d8,shadowOptions:{mode:"open",delegatesFocus:!0}});const u8=cf("foundation-router"),f8="$router",p8=Object.freeze({getOrCreateFor:e=>{const t=e[f8];return void 0!==t?t:e[f8]=new m8(e)},find:e=>by.find(e),from:e=>by.from(e)});class m8 extends yy{}const g8=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function v8(e){return g8.test(e)}function b8(e){return e.config instanceof Py?e:p8.find(e)}const y8=Object.freeze({path:Object.freeze({get current(){return Bb.path.current},generateRoute:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=b8(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&v8(e)?location.href=e:(history.pushState({},document.title,e),t&&y8.path.trigger(e))},replace:(e,t=!0)=>{e&&v8(e)?location.href=e:(history.replaceState({},document.title,e),t&&y8.path.trigger(e))},trigger:e=>{Bb.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=b8(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const c=yield y8.name.generateRoute(e,t,i);null!==c&&y8.path.push(c,o)}),replace:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const c=yield y8.name.generateRoute(e,t,i);null!==c&&y8.path.replace(c,o)}),trigger:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield y8.name.generateRoute(e,t,i);null!==o&&y8.path.trigger(o)})})}),z8=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId;class x8 extends py{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(u8.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return u8.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return u8.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}Nu([g],x8.prototype,"definitions",void 0);class C8 extends Py{constructor(){super(),this.logger=u8,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new x8(this),this.basename=Ff,this.routes=new x8(this)}getNavItems(e=z8){return function(e,t=z8,i=10){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,c)=>{e.navItems.filter(t).map((t,o)=>{var s,a,n,r;const l=null!==(s=t.placementIndex)&&void 0!==s?s:c*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:l,routePath:null!==(n=t.routePath)&&void 0!==n?n:e.path,routeName:null!==(r=t.routeName)&&void 0!==r?r:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>Tu(this,void 0,void 0,function*(){this.analytics.trackEvent(nf.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>Tu(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const c=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${c}.`),y8.name.replace(e.router,c)}else this.user.trackPath(),y8.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),y8.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return Tu(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return Tu(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield y8.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&y8.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Kb.build(t);let c=i&&!e.startsWith(i)?function(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}([i,e]):e;return c=o?`${c}?${o}`:c,c}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?o.replace(`/*${dy}`,""):this.basename?this.basename:""}construct(e){return this.container.get(e)}}Nu([pt],C8.prototype,"container",void 0),Nu([lf],C8.prototype,"analytics",void 0),Nu([Jv],C8.prototype,"user",void 0),Nu([xb],C8.prototype,"_session",void 0);const L8="navigate-to",M8="generate-navigation-path";let w8=class extends(p8.from(be)){constructor(){super(...arguments),this.logger=u8,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[f8]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),u.queueUpdate(()=>Tu(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(L8,this.onNavigateTo),this.addEventListener(M8,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(L8,this.onNavigateTo),this.removeEventListener(M8,this.onGenerateNavigationPath)}};w8=Nu([ye({name:"foundation-router"})],w8);const k8=e=>W`<${e}-card class=${e=>Jt("stepper-tab",["stepper-tab-hidden",e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>Jt("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${Ke("tabs")}></slot></div>${He(e=>e.orientation===ua,W`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring><label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${He(e=>!e.indicatorOnly,W`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${Ke("tabpanels")}></slot></div>${He(e=>!e.hideAllButtons,W`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${He(e=>e.isLastStep&&!e.hideSubmitButton,W`<${e}-button @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
107
+ Delete Rule </${o}></div></div></div>`}} `;let E6=class extends be{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),X0(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==Z0(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(k6)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,C6(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(J0.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,c={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:c,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:w6(this.model,t,i)};this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(J0.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:M6(o,this.model)},bubbles:!0,composed:!0}))}};Nu([g],E6.prototype,"config",void 0),Nu([g],E6.prototype,"styles",void 0),Nu([g],E6.prototype,"model",void 0),Nu([g],E6.prototype,"index",void 0),Nu([re({mode:"boolean"})],E6.prototype,"error",void 0),Nu([v],E6.prototype,"operandIterator",null),E6=Nu([ye({name:"expression-rule",template:$6,styles:S6,shadowOptions:{delegatesFocus:!0}})],E6);let N6=class extends be{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=q0(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=G0(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(J0.AddGroup,this.handleAddGroup),this.addEventListener(J0.DelGroup,this.handleDeleteGroup),this.addEventListener(J0.AddRule,this.handleAddRule),this.addEventListener(J0.DelRule,this.handleDeleteRule),this.addEventListener(J0.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(J0.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(J0.AddGroup,this.handleAddGroup),this.removeEventListener(J0.DelGroup,this.handleDeleteGroup),this.removeEventListener(J0.AddRule,this.handleAddRule),this.removeEventListener(J0.DelRule,this.handleDeleteRule),this.removeEventListener(J0.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(J0.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:j0,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=U0(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=U0(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=H0(i=this.model,V0(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=H0(i=this.model,B0(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===j0?Object.assign(Object.assign({},e),i):H0(e,V0(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return H0(e,B0(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};Nu([g],N6.prototype,"config",void 0),Nu([g],N6.prototype,"styles",void 0),Nu([g],N6.prototype,"model",void 0),N6=Nu([ye({name:"expression-builder",template:a6,styles:e6})],N6);let A6=class extends N6{};A6=Nu([ye({name:"foundation-expression-builder",styles:e6,template:a6})],A6);const T6=["int","short","long"],O6=["double","bigdecimal"],R6=[...T6,...O6],I6=["date","date-time"],D6=["string","enum"],F6=["boolean"],_6=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function H6(e){switch(_6(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function P6(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function V6(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function B6(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function U6(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=_6(e);if(D6.includes(i))return t;if(R6.includes(i))return t.toString();if(F6.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(I6.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function j6(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?j6(e,t):t(e)).filter(Boolean)}}function q6(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=_6(e);if(D6.includes(i))return t;if(T6.includes(i))return parseInt(t);if(O6.includes(i))return parseFloat(t);if(F6.includes(i))return t;if(I6.includes(i)){const e=new Date(parseInt(t));return"date"===i?W0(e):Y0(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const G6={template:a6,styles:e6};var W6;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(W6||(W6={}));const Y6=[{type:W6.logicalOperations.AND,maxRules:"many"},{type:W6.logicalOperations.OR,maxRules:"many"}],K6={EQUALS:W6.operations.EQUALS,NOT_EQUALS:W6.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:W6.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:W6.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:W6.operations.LESS_THAN,LESS_THAN_OR_EQUAL:W6.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:W6.operations.IS_CURRENT,IS_PREVIOUS:W6.operations.IS_PREVIOUS},Z6=e=>({type:"enum",input:"select",values:e}),Q6=Z6({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),X6=Z6({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),J6=[{type:K6.EQUALS,label:"Equals",nbInputs:1,applyTo:[...D6,...F6,...R6,...I6],tooltip:"Check the equality of the field compared to a set value"},{type:K6.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...D6,...F6,...R6,...I6],tooltip:"Check that the field is different from a set value"},{type:K6.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...F6,...R6,...I6],tooltip:"Check if the field value is null"},{type:K6.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...F6,...R6,...I6],tooltip:"Check if the field value is not null"},{type:K6.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:K6.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:K6.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:K6.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:K6.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is greater than a specified number"},{type:K6.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:K6.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is less than a specified number"},{type:K6.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...R6],tooltip:"Check if the field value is less than or equal to a specified number"},{type:K6.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is before a specified date/time"},{type:K6.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is after a specified date/time"},{type:K6.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is on or before a specified date/time"},{type:K6.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...I6],tooltip:"Check if the field is on or after a specified date/time"},{type:K6.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...I6],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:X6,optgroup:"Relative Period"},{type:K6.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...I6],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:Q6,optgroup:"Relative Period"}];function e8(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=U6(e),c=H6(o),s=function(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}(o.operator.type);switch(s){case K6.EQUALS:case K6.NOT_EQUALS:case K6.GREATER_THAN:case K6.GREATER_THAN_OR_EQUAL:case K6.LESS_THAN:case K6.LESS_THAN_OR_EQUAL:return P6(o,s,c);case K6.IS_NULL:return V6(o,W6.operations.EQUALS,{TYPE:"NULL"});case K6.NOT_NULL:return V6(o,W6.operations.NOT_EQUALS,{TYPE:"NULL"});case K6.IS_NULL_OR_BLANK:case K6.NOT_NULL_OR_BLANK:case K6.CONTAINS:case K6.CONTAINS_WORDS_STARTING_WITH:case K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case K6.IS_CURRENT:case K6.IS_PREVIOUS:return function(e,t){switch(t){case K6.IS_NULL_OR_BLANK:return B6(e,W6.methodCall.IS_NULL_OR_BLANK,[]);case K6.NOT_NULL_OR_BLANK:return B6(e,W6.methodCall.NOT_NULL_OR_BLANK,[]);case K6.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return B6(e,W6.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case K6.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return B6(e,W6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return B6(e,W6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case K6.IS_CURRENT:case K6.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return B6(e,W6.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===K6.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function t8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return q6(function(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?K6[K6.IS_NULL]:K6[K6.NOT_NULL];return J6.find(t=>t.type===e)}const i=function(e,t){if("date"!==t.field.type&&"date-time"!==t.field.type)return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}(t.OPERATION,e);return J6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function i8(e,t){return{combinator:Y6.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return i8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return t8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[K6[K6.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[K6[K6.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[K6[K6.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[K6[K6.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[K6[K6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===W6.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[K6["CURRENT"===t.PARAMETERS[2].VALUE?K6.IS_CURRENT:K6.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:J6.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let o8=class extends N6{ruleConfigChanged(e,t){this.config=Object.assign({combinators:Y6,operators:J6,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:i8(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=j6(e,e8);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Nu([g],o8.prototype,"ruleConfig",void 0),o8=Nu([ye({name:"foundation-rule-expression-builder",styles:e6,template:a6})],o8);const c8={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},s8=[{type:c8.PLUS,label:"Add (+)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:c8.MINUS,label:"Subtract (-)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:c8.MULTIPLY,label:"Multiply (*)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:c8.DIVIDE,label:"Divide (/)",applyTo:[...R6],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:c8.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:c8.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function a8(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=U6(e),c=H6(o),s=o.operator.type;switch(s){case c8.TRIM:case c8.CONVERT_TO_DATE:case c8.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case c8.TRIM:return B6(e,W6.methodCall.TRIM,[]);case c8.CONVERT_TO_DATE:return B6(e,W6.methodCall.LONG_TO_DATE,[]);case c8.CONVERT_TO_DATE_TIME:return B6(e,W6.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case c8.PLUS:case c8.MINUS:case c8.DIVIDE:case c8.MULTIPLY:return P6(o,s,c);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function n8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return q6(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return s8.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function r8(e,t){return{combinator:R0,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return r8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return n8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[c8[c8.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[c8[c8.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[c8[c8.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:s8.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let l8=class extends N6{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=r8(t.fields,i);this.config={combinators:[R0],operators:s8,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:a8(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Nu([g],l8.prototype,"valueConfig",void 0),l8=Nu([ye({name:"foundation-value-expression-builder",styles:e6,template:a6})],l8);const d8=W`<template ${Ie("notificationListener")}><slot></slot></template>`;class h8 extends qt{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Tu(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(EC.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),$C(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>Tu(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return Tu(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return Tu(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Dz(e))}):xx.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,c=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const n={title:t,body:i,createdAt:c,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};LC(n,this.tagName)}}Nu([g],h8.prototype,"notificationListener",void 0),Nu([fz],h8.prototype,"connect",void 0),Nu([re({attribute:"resource-name"})],h8.prototype,"resourceName",void 0),Nu([re({attribute:"close-timeout",converter:ae})],h8.prototype,"closeTimeout",void 0),Nu([g],h8.prototype,"toastButtons",void 0),Nu([re({attribute:"toast-position"})],h8.prototype,"toastPosition",void 0),Nu([Wz],h8.prototype,"datasource",void 0),h8.compose({baseName:"notification-listener",template:d8,shadowOptions:{mode:"open",delegatesFocus:!0}});const u8=cf("foundation-router"),f8="$router",p8=Object.freeze({getOrCreateFor:e=>{const t=e[f8];return void 0!==t?t:e[f8]=new m8(e)},find:e=>by.find(e),from:e=>by.from(e)});class m8 extends yy{}const g8=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function v8(e){return g8.test(e)}function b8(e){return e.config instanceof Py?e:p8.find(e)}const y8=Object.freeze({path:Object.freeze({get current(){return Bb.path.current},generateRoute:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=b8(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&v8(e)?location.href=e:(history.pushState({},document.title,e),t&&y8.path.trigger(e))},replace:(e,t=!0)=>{e&&v8(e)?location.href=e:(history.replaceState({},document.title,e),t&&y8.path.trigger(e))},trigger:e=>{Bb.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=b8(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const c=yield y8.name.generateRoute(e,t,i);null!==c&&y8.path.push(c,o)}),replace:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const c=yield y8.name.generateRoute(e,t,i);null!==c&&y8.path.replace(c,o)}),trigger:(e,t,...i)=>Tu(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield y8.name.generateRoute(e,t,i);null!==o&&y8.path.trigger(o)})})}),z8=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId;class x8 extends py{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(u8.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return u8.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return u8.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}Nu([g],x8.prototype,"definitions",void 0);class C8 extends Py{constructor(){super(),this.logger=u8,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new x8(this),this.basename=Ff,this.routes=new x8(this)}getNavItems(e=z8){return function(e,t=z8,i=10){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,c)=>{e.navItems.filter(t).map((t,o)=>{var s,a,n,r;const l=null!==(s=t.placementIndex)&&void 0!==s?s:c*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:l,routePath:null!==(n=t.routePath)&&void 0!==n?n:e.path,routeName:null!==(r=t.routeName)&&void 0!==r?r:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>Tu(this,void 0,void 0,function*(){this.analytics.trackEvent(nf.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>Tu(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const c=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${c}.`),y8.name.replace(e.router,c)}else this.user.trackPath(),y8.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),y8.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return Tu(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return Tu(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield y8.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&y8.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Kb.build(t);let c=i&&!e.startsWith(i)?function(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}([i,e]):e;return c=o?`${c}?${o}`:c,c}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?o.replace(`/*${dy}`,""):this.basename?this.basename:""}construct(e){return this.container.get(e)}}Nu([pt],C8.prototype,"container",void 0),Nu([lf],C8.prototype,"analytics",void 0),Nu([Jv],C8.prototype,"user",void 0),Nu([xb],C8.prototype,"_session",void 0);const L8="navigate-to",M8="generate-navigation-path";let w8=class extends(p8.from(be)){constructor(){super(...arguments),this.logger=u8,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[f8]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),u.queueUpdate(()=>Tu(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(L8,this.onNavigateTo),this.addEventListener(M8,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(L8,this.onNavigateTo),this.removeEventListener(M8,this.onGenerateNavigationPath)}};w8=Nu([ye({name:"foundation-router"})],w8);const k8=e=>W`<${e}-card class=${e=>Jt("stepper-tab",["stepper-tab-hidden",e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>Jt("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${Ke("tabs")}></slot></div>${He(e=>e.orientation===ua,W`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring><label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${He(e=>!e.indicatorOnly,W`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${Ke("tabpanels")}></slot></div>${He(e=>!e.hideAllButtons,W`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${He(e=>e.isLastStep&&!e.hideSubmitButton,W`<${e}-button @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
108
108
  Submit </${e}-button>`)} ${He(e=>!e.isLastStep,W`<${e}-button @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,S8=W` ${e=>k8(wx(e))} `,$8=Ce` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;class E8 extends qt{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=ua,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,c=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",c),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=c)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return xx.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(xx.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${Mi()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${Mi()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}Nu([re({attribute:"hide-submit-button",mode:"boolean"})],E8.prototype,"hideSubmitButton",void 0),Nu([re({attribute:"hide-step-number",mode:"boolean"})],E8.prototype,"hideStepNumber",void 0),Nu([re({attribute:"allow-backward-jumps",mode:"boolean"})],E8.prototype,"allowBackwardJumps",void 0),Nu([re({attribute:"allow-forward-jumps",mode:"boolean"})],E8.prototype,"allowForwardJumps",void 0),Nu([re({attribute:"hide-all-buttons",mode:"boolean"})],E8.prototype,"hideAllButtons",void 0),Nu([re({attribute:"hide-tabs",mode:"boolean"})],E8.prototype,"hideTabs",void 0),Nu([re({attribute:"indicator-only",mode:"boolean"})],E8.prototype,"indicatorOnly",void 0),Nu([re],E8.prototype,"orientation",void 0),Nu([re],E8.prototype,"activeid",void 0),Nu([g],E8.prototype,"tabs",void 0),Nu([g],E8.prototype,"tabpanels",void 0),Nu([g],E8.prototype,"validation",void 0),Nu([g],E8.prototype,"progressValue",void 0),Nu([g],E8.prototype,"activeTabIndex",void 0),Nu([v],E8.prototype,"disabledPreviousStep",null),Nu([v],E8.prototype,"isLastStep",null),Nu([v],E8.prototype,"islastStepValid",null);const N8=void 0,A8={};E8.compose(Object.assign({baseName:"stepper",template:S8,styles:$8,shadowOptions:N8},A8));const T8=class extends vu{}.compose(Object.assign({baseName:"accordion",template:(e,t)=>Xa(),styles:(e,t)=>Ce` ${gu()} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:bu},yu));const O8=class extends Cu{}.compose(Object.assign({baseName:"accordion-item",template:(e,t)=>zu(0,t),styles:(e,t)=>Ce` ${xu()} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}svg:not(:root){height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:Lu},Mu));const R8=class extends Vx{}.compose({baseName:"actions-menu",styles:(e,t)=>Ce` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${wu()} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:Px}),I8=Ce` ${Yx}`;const D8=class extends AC{}.compose(Object.assign({baseName:"ai-criteria-search",template:(e,t)=>Kx,styles:I8,shadowOptions:TC},OC));const F8=class extends DC{}.compose({baseName:"ai-indicator",template:IC,styles:(e,t)=>Ce` ${RC()} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});function _8(e,t){return new Ya("appearance",e,t)}const H8=["baseClass","baseName","shadowOptions","styles","template"],P8=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:c}=t,s=((e,t=H8)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}))(t);return{shadowOptions:i,styles:o,template:c,defaultConfig:s}},V8=Ce` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,B8=Ce` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,U8=Ce` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: 0;color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: var(--neutral-fill-hover)}:host([appearance='neutral']:active){background: var(--neutral-fill-active)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%}`,j8=Ce` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,q8=Ce` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,G8=Ce` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,W8=Ce` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,Y8=Ce` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,K8=Ce` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,Z8=Ce` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,Q8=Ce` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,X8=(e,t)=>Ce` ${vL()} ${Ce` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`} `.withBehaviors(_8("primary",V8),_8("secondary",B8),_8("tertiary",W8),_8("neutral",U8),_8("danger",j8),_8("success",q8),_8("warning",G8),_8("primary-outline",Y8),_8("secondary-outline",K8),_8("neutral-outline",Z8),_8("link",Q8));const J8=class extends HC{}.compose(Object.assign({baseName:"anchor",template:(e,t)=>FC(0,t),styles:(e,t)=>Ce` ${_C()} ${X8()} `.withBehaviors(...X8().behaviors),shadowOptions:PC},VC));const e5=class extends jC{}.compose(Object.assign({baseName:"anchored-region",template:(e,t)=>BC(),styles:(e,t)=>Ce` ${UC()}`,shadowOptions:qC},GC));const t5=class extends ZC{}.compose(Object.assign({baseName:"avatar",template:(e,t)=>WC(0,t),styles:(e,t)=>Ce` ${KC(e)}`,shadowOptions:QC},XC));const i5=class extends tL{}.compose(Object.assign({baseName:"badge",template:(e,t)=>JC(),styles:(e,t)=>Ce` ${eL()} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${hr} * 1px) calc(${hr} * 2px);border: none}`,shadowOptions:iL},oL)),o5=Ce` ${cL} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,c5=aL;const s5=class extends nL{}.compose({baseName:"banner",shadowOptions:c5,styles:o5,template:sL});const a5=class extends dL{}.compose(Object.assign({baseName:"breadcrumb",template:(e,t)=>rL(),styles:(e,t)=>Ce` ${lL()}`,shadowOptions:void 0},{}));const n5=class extends fL{}.compose(Object.assign({baseName:"breadcrumb-item",template:(e,t)=>hL(0,t),styles:(e,t)=>Ce` ${uL()} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:pL},mL));const r5=class extends bL{}.compose(Object.assign({baseName:"button",template:(e,t)=>gL(0,t),styles:X8,shadowOptions:yL},zL));const l5=class extends LL{}.compose(Object.assign({baseName:"calendar",template:(e,t)=>CL(e,t),styles:()=>Ce` ${xL()}`,shadowOptions:ML},wL));const d5=class extends $L{}.compose(Object.assign({baseName:"card",template:(e,t)=>kL(),styles:(e,t)=>Ce` ${SL()} :host{background: var(--neutral-layer-card-container);color: ${wd};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:EL},NL)),h5=Ce` ${qL} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,u5=W` ${GL("rapid")} `;const f5=KL,p5=YL,m5=class extends ZL{}.compose(Object.assign({baseName:"categorized-multiselect",template:u5,styles:h5,shadowOptions:p5},f5));const g5=class extends JL{}.compose(Object.assign({baseName:"checkbox",template:(e,t)=>QL(0,t),styles:(e,t)=>Ce` ${XL()} :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:eM},tM));const v5=class extends aM{}.compose(Object.assign({baseName:"combobox",template:(e,t)=>oM(0,t),styles:(e,t)=>Ce` ${iM(e)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${hr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:nM},rM));const b5=class extends hM{}.compose({baseName:"connection-indicator",template:dM,styles:(e,t)=>Ce` ${lM()} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`});P8(uM);P8(fM);P8(pM);const y5=W` ${vM("rapid")} `;const z5=class extends YM{}.compose(Object.assign({baseName:"date-picker",template:y5,styles:()=>Ce` ${mM} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,shadowOptions:void 0},{}));var x5;!function(e){e.primary="#11C9FC",e.neutral="#7C909B",e.error="#F9644D",e.success="#7ACC79",e.warning="#FFB660",e.tertiary="#7B2FBE",e.info="#11C9FC",e.buy="#7ACC79",e.sell="#F14376",e.chartPink="#fb8176",e.longGreen="#7acc79",e.shortPink="#f14376",e.warningYellow="#fcb35f",e.green="#44c14c",e.lightGreen="#69cd70",e.red="#ef4d28",e.lightRed="#ee6588",e.dodgerBlue="#33a9ff",e.lightDodgerBlue="#5cbaff",e.violet="#9b1e74",e.lightViolet="#b528af",e.white="#f9f9f9",e.silver="#c1c1c1",e.salomie="#ffdf94",e.lightSalomie="#ccb276",e.melon="#ffbbb2",e.lightMelon="#cc968e",e.portage="#8a99f5",e.lightPortage="#adb8f8",e.ice="#97f4eb",e.lightIce="#6befe2"}(x5||(x5={}));const{create:C5}=vc,L5=Fn(x5.error),M5=Vn.create(L5.r,L5.g,L5.b),w5=C5("error-color").withDefault(M5),k5=Fn(x5.success),S5=Vn.create(k5.r,k5.g,k5.b),$5=C5("success-color").withDefault(S5),E5=Fn(x5.warning),N5=Vn.create(E5.r,E5.g,E5.b),A5=C5("warning-color").withDefault(N5),T5=Fn(x5.buy),O5=Vn.create(T5.r,T5.g,T5.b),R5=C5("buy-color").withDefault(O5),I5=Fn(x5.sell),D5=Vn.create(I5.r,I5.g,I5.b),F5=C5("sell-color").withDefault(D5),_5=Fn(x5.info),H5=Vn.create(_5.r,_5.g,_5.b),P5=C5("info-color").withDefault(H5),V5=Fn(x5.error),B5=Vn.create(V5.r,V5.g,V5.b),U5=C5("serious-notify-color").withDefault(B5),{create:j5}=vc,q5=e=>vc.create({name:e,cssCustomPropertyName:null}),G5=Vn.create(1,1,1),W5=Vn.create(0,0,0);function Y5(e,t){const i=e,o=q5(`${i}-palette`).withDefault(e=>Wn.from(t.getValueFor(e))),c=q5(`${i}-fill-rest-delta`).withDefault(0),s=q5(`${i}-fill-hover-delta`).withDefault(4),a=q5(`${i}-fill-active-delta`).withDefault(-5),n=q5(`${i}-fill-focus-delta`).withDefault(0),r=q5(`${i}-foreground-rest-delta`).withDefault(0),l=q5(`${i}-foreground-hover-delta`).withDefault(6),d=q5(`${i}-foreground-active-delta`).withDefault(-4),h=q5(`${i}-foreground-focus-delta`).withDefault(0),u=q5(`${i}-fill-recipe`).withDefault({evaluate:(e,t)=>function(e,t,i,o,c,s,a,n,r){const l=e.source,d=t.closestIndexOf(i)>=Math.max(a,n,r)?-1:1,h=e.closestIndexOf(l),u=h+-1*d*o,f=u+d*c,p=u+d*s;return{rest:e.get(u),hover:e.get(h),active:e.get(f),focus:e.get(p)}}(o.getValueFor(e),hl.getValueFor(e),null!=t?t:kl.getValueFor(e),s.getValueFor(e),a.getValueFor(e),n.getValueFor(e),Br.getValueFor(e),Ur.getValueFor(e),jr.getValueFor(e))}),f=j5(`${i}-fill-rest`).withDefault(e=>u.getValueFor(e).evaluate(e).rest),p=j5(`${i}-fill-hover`).withDefault(e=>u.getValueFor(e).evaluate(e).hover),m=j5(`${i}-fill-active`).withDefault(e=>u.getValueFor(e).evaluate(e).active),g=j5(`${i}-fill-focus`).withDefault(e=>u.getValueFor(e).evaluate(e).focus),v=e=>(t,i)=>function(e,t){return e.contrast(G5)>=t?G5:W5}(null!=i?i:f.getValueFor(t),e),b=q5(`foreground-on-${i}-recipe`).withDefault({evaluate:(e,t)=>v(4.5)(e,t)}),y=j5(`foreground-on-${i}-rest`).withDefault(e=>b.getValueFor(e).evaluate(e,f.getValueFor(e))),z=j5(`foreground-on-${i}-hover`).withDefault(e=>b.getValueFor(e).evaluate(e,p.getValueFor(e))),x=j5(`foreground-on-${i}-active`).withDefault(e=>b.getValueFor(e).evaluate(e,m.getValueFor(e))),C=j5(`foreground-on-${i}-focus`).withDefault(e=>b.getValueFor(e).evaluate(e,g.getValueFor(e))),L=q5(`foreground-on-${i}-large-recipe`).withDefault({evaluate:(e,t)=>v(7)(e,t)}),M=j5(`foreground-on-${i}-rest-large`).withDefault(e=>L.getValueFor(e).evaluate(e,f.getValueFor(e))),w=j5(`foreground-on-${i}-hover-large`).withDefault(e=>L.getValueFor(e).evaluate(e,p.getValueFor(e))),k=j5(`foreground-on-${i}-active-large`).withDefault(e=>L.getValueFor(e).evaluate(e,m.getValueFor(e))),S=j5(`foreground-on-${i}-focus-large`).withDefault(e=>L.getValueFor(e).evaluate(e,g.getValueFor(e))),$=q5(`${i}-foreground-recipe`).withDefault({evaluate:(e,t)=>function(e,t,i,o,c,s,a){const n=e.source,r=e.closestIndexOf(n),l=qn(t)?-1:1,d=r+(1===l?Math.min(o,c):Math.max(l*o,l*c)),h=e.colorContrast(t,i,d,l),u=e.closestIndexOf(h),f=u+l*Math.abs(o-c),p=1===l?o<c:l*o>l*c,m=p?u:f,g=p?f:u;return{rest:e.get(m),hover:e.get(g),active:e.get(m+l*s),focus:e.get(m+l*a)}}(o.getValueFor(e),null!=t?t:kl.getValueFor(e),4.5,r.getValueFor(e),l.getValueFor(e),d.getValueFor(e),h.getValueFor(e))}),E=j5(`${i}-foreground-rest`).withDefault(e=>$.getValueFor(e).evaluate(e).rest),N=j5(`${i}-foreground-hover`).withDefault(e=>$.getValueFor(e).evaluate(e).hover),A=j5(`${i}-foreground-active`).withDefault(e=>$.getValueFor(e).evaluate(e).active),T=j5(`${i}-foreground-focus`).withDefault(e=>$.getValueFor(e).evaluate(e).focus);return{palette:o,fillRestDelta:c,fillHoverDelta:s,fillActiveDelta:a,fillFocusDelta:n,foregroundRestDelta:r,foregroundHoverDelta:l,foregroundActiveDelta:d,foregroundFocusDelta:h,fillRecipe:u,fillRest:f,fillHover:p,fillActive:m,fillFocus:g,foregroundOnRecipe:b,foregroundOnRest:y,foregroundOnHover:z,foregroundOnActive:x,foregroundOnFocus:C,foregroundOnLargeRecipe:L,foregroundOnRestLarge:M,foregroundOnHoverLarge:w,foregroundOnActiveLarge:k,foregroundOnFocusLarge:S,foregroundRecipe:$,foregroundRest:E,foregroundHover:N,foregroundActive:A,foregroundFocus:T}}const K5=Fn(x5.green),Z5=Vn.create(K5.r,K5.g,K5.b),Q5=vc.create("secondary-color").withDefault(Z5),{palette:X5,fillRestDelta:J5,fillHoverDelta:e7,fillActiveDelta:t7,fillFocusDelta:i7,foregroundRestDelta:o7,foregroundHoverDelta:c7,foregroundActiveDelta:s7,foregroundFocusDelta:a7,fillRecipe:n7,fillRest:r7,fillHover:l7,fillActive:d7,fillFocus:h7,foregroundOnRecipe:u7,foregroundOnRest:f7,foregroundOnHover:p7,foregroundOnActive:m7,foregroundOnFocus:g7,foregroundOnLargeRecipe:v7,foregroundOnRestLarge:b7,foregroundOnHoverLarge:y7,foregroundOnActiveLarge:z7,foregroundOnFocusLarge:x7,foregroundRecipe:C7,foregroundRest:L7,foregroundHover:M7,foregroundActive:w7,foregroundFocus:k7}=Y5("secondary",Q5),S7=Fn(x5.tertiary),$7=Vn.create(S7.r,S7.g,S7.b),E7=vc.create("tertiary-color").withDefault($7),{palette:N7,fillRestDelta:A7,fillHoverDelta:T7,fillActiveDelta:O7,fillFocusDelta:R7,foregroundRestDelta:I7,foregroundHoverDelta:D7,foregroundActiveDelta:F7,foregroundFocusDelta:_7,fillRecipe:H7,fillRest:P7,fillHover:V7,fillActive:B7,fillFocus:U7,foregroundOnRecipe:j7,foregroundOnRest:q7,foregroundOnHover:G7,foregroundOnActive:W7,foregroundOnFocus:Y7,foregroundOnLargeRecipe:K7,foregroundOnRestLarge:Z7,foregroundOnHoverLarge:Q7,foregroundOnActiveLarge:X7,foregroundOnFocusLarge:J7,foregroundRecipe:e9,foregroundRest:t9,foregroundHover:i9,foregroundActive:o9,foregroundFocus:c9}=Y5("tertiary",E7),{palette:s9,fillRestDelta:a9,fillHoverDelta:n9,fillActiveDelta:r9,fillFocusDelta:l9,foregroundRestDelta:d9,foregroundHoverDelta:h9,foregroundActiveDelta:u9,foregroundFocusDelta:f9,fillRecipe:p9,fillRest:m9,fillHover:g9,fillActive:v9,fillFocus:b9,foregroundOnRecipe:y9,foregroundOnRest:z9,foregroundOnHover:x9,foregroundOnActive:C9,foregroundOnFocus:L9,foregroundOnLargeRecipe:M9,foregroundOnRestLarge:w9,foregroundOnHoverLarge:k9,foregroundOnActiveLarge:S9,foregroundOnFocusLarge:$9,foregroundRecipe:E9,foregroundRest:N9,foregroundHover:A9,foregroundActive:T9,foregroundFocus:O9}=Y5("error",w5),{palette:R9,fillRestDelta:I9,fillHoverDelta:D9,fillActiveDelta:F9,fillFocusDelta:_9,foregroundRestDelta:H9,foregroundHoverDelta:P9,foregroundActiveDelta:V9,foregroundFocusDelta:B9,fillRecipe:U9,fillRest:j9,fillHover:q9,fillActive:G9,fillFocus:W9,foregroundOnRecipe:Y9,foregroundOnRest:K9,foregroundOnHover:Z9,foregroundOnActive:Q9,foregroundOnFocus:X9,foregroundOnLargeRecipe:J9,foregroundOnRestLarge:eee,foregroundOnHoverLarge:tee,foregroundOnActiveLarge:iee,foregroundOnFocusLarge:oee,foregroundRecipe:cee,foregroundRest:see,foregroundHover:aee,foregroundActive:nee,foregroundFocus:ree}=Y5("success",$5),{palette:lee,fillRestDelta:dee,fillHoverDelta:hee,fillActiveDelta:uee,fillFocusDelta:fee,foregroundRestDelta:pee,foregroundHoverDelta:mee,foregroundActiveDelta:gee,foregroundFocusDelta:vee,fillRecipe:bee,fillRest:yee,fillHover:zee,fillActive:xee,fillFocus:Cee,foregroundOnRecipe:Lee,foregroundOnRest:Mee,foregroundOnHover:wee,foregroundOnActive:kee,foregroundOnFocus:See,foregroundOnLargeRecipe:$ee,foregroundOnRestLarge:Eee,foregroundOnHoverLarge:Nee,foregroundOnActiveLarge:Aee,foregroundOnFocusLarge:Tee,foregroundRecipe:Oee,foregroundRest:Ree,foregroundHover:Iee,foregroundActive:Dee,foregroundFocus:Fee}=Y5("warning",A5);var _ee=Object.freeze({__proto__:null,accentFillActive:Al,accentFillActiveDelta:Dr,accentFillFocus:Tl,accentFillFocusDelta:Fr,accentFillHover:Nl,accentFillHoverDelta:Ir,accentFillRest:El,accentFillRestDelta:Rr,accentForegroundActive:Yl,accentForegroundActiveDelta:Pr,accentForegroundFocus:Kl,accentForegroundFocusDelta:Vr,accentForegroundHover:Wl,accentForegroundHoverDelta:Hr,accentForegroundRest:Gl,accentForegroundRestDelta:_r,accentPalette:fl,baseHeightMultiplier:ar,baseLayerLuminance:rr,bodyFont:sr,controlCornerRadius:lr,density:dr,designUnit:hr,direction:ur,disabledOpacity:fr,fillColor:kl,focusStrokeInner:xd,focusStrokeOuter:yd,focusStrokeWidth:mr,foregroundOnAccentActive:Fl,foregroundOnAccentActiveLarge:Bl,foregroundOnAccentFocus:_l,foregroundOnAccentFocusLarge:Ul,foregroundOnAccentHover:Dl,foregroundOnAccentHoverLarge:Vl,foregroundOnAccentRest:Il,foregroundOnAccentRestLarge:Pl,neutralFillActive:Jl,neutralFillActiveDelta:jr,neutralFillFocus:ed,neutralFillFocusDelta:qr,neutralFillHover:Xl,neutralFillHoverDelta:Ur,neutralFillInputActive:cd,neutralFillInputActiveDelta:Yr,neutralFillInputFocus:sd,neutralFillInputFocusDelta:Kr,neutralFillInputHover:od,neutralFillInputHoverDelta:Wr,neutralFillInputRest:id,neutralFillInputRestDelta:Gr,neutralFillLayerRest:vd,neutralFillLayerRestDelta:cl,neutralFillRest:Ql,neutralFillRestDelta:Br,neutralFillStealthActive:ld,neutralFillStealthActiveDelta:Xr,neutralFillStealthFocus:dd,neutralFillStealthFocusDelta:Jr,neutralFillStealthHover:rd,neutralFillStealthHoverDelta:Qr,neutralFillStealthRest:nd,neutralFillStealthRestDelta:Zr,neutralFillStrongActive:pd,neutralFillStrongActiveDelta:il,neutralFillStrongFocus:md,neutralFillStrongFocusDelta:ol,neutralFillStrongHover:fd,neutralFillStrongHoverDelta:tl,neutralFillStrongRest:ud,neutralFillStrongRestDelta:el,neutralForegroundHint:Ld,neutralForegroundRest:wd,neutralLayer1:yl,neutralLayer2:xl,neutralLayer3:Ll,neutralLayer4:wl,neutralLayerCardContainer:ml,neutralLayerFloating:vl,neutralPalette:hl,neutralStrokeActive:Ed,neutralStrokeActiveDelta:nl,neutralStrokeDividerRest:Td,neutralStrokeDividerRestDelta:ll,neutralStrokeFocus:Nd,neutralStrokeFocusDelta:rl,neutralStrokeHover:$d,neutralStrokeHoverDelta:al,neutralStrokeRest:Sd,neutralStrokeRestDelta:sl,strokeWidth:pr,typeRampBaseFontSize:gr,typeRampBaseLineHeight:vr,typeRampMinus1FontSize:br,typeRampMinus1LineHeight:yr,typeRampMinus2FontSize:zr,typeRampMinus2LineHeight:xr,typeRampPlus1FontSize:Cr,typeRampPlus1LineHeight:Lr,typeRampPlus2FontSize:Mr,typeRampPlus2LineHeight:wr,typeRampPlus3FontSize:kr,typeRampPlus3LineHeight:Sr,typeRampPlus4FontSize:$r,typeRampPlus4LineHeight:Er,typeRampPlus5FontSize:Nr,typeRampPlus5LineHeight:Ar,typeRampPlus6FontSize:Tr,typeRampPlus6LineHeight:Or,defaultErrorColor:M5,errorColor:w5,defaultSuccessColor:S5,successColor:$5,defaultWarningColor:N5,warningColor:A5,defaultBuyColor:O5,buyColor:R5,defaultSellColor:D5,sellColor:F5,defaultInfoColor:H5,infoColor:P5,defaultSeriousNotifyColor:B5,seriousNotifyColor:U5,defaultSecondaryColor:Z5,secondaryColor:Q5,secondaryPalette:X5,secondaryFillRestDelta:J5,secondaryFillHoverDelta:e7,secondaryFillActiveDelta:t7,secondaryFillFocusDelta:i7,secondaryForegroundRestDelta:o7,secondaryForegroundHoverDelta:c7,secondaryForegroundActiveDelta:s7,secondaryForegroundFocusDelta:a7,secondaryFillRecipe:n7,secondaryFillRest:r7,secondaryFillHover:l7,secondaryFillActive:d7,secondaryFillFocus:h7,foregroundOnSecondaryRecipe:u7,foregroundOnSecondaryRest:f7,foregroundOnSecondaryHover:p7,foregroundOnSecondaryActive:m7,foregroundOnSecondaryFocus:g7,foregroundOnSecondaryLargeRecipe:v7,foregroundOnSecondaryRestLarge:b7,foregroundOnSecondaryHoverLarge:y7,foregroundOnSecondaryActiveLarge:z7,foregroundOnSecondaryFocusLarge:x7,secondaryForegroundRecipe:C7,secondaryForegroundRest:L7,secondaryForegroundHover:M7,secondaryForegroundActive:w7,secondaryForegroundFocus:k7,defaultTertiaryColor:$7,tertiaryColor:E7,tertiaryPalette:N7,tertiaryFillRestDelta:A7,tertiaryFillHoverDelta:T7,tertiaryFillActiveDelta:O7,tertiaryFillFocusDelta:R7,tertiaryForegroundRestDelta:I7,tertiaryForegroundHoverDelta:D7,tertiaryForegroundActiveDelta:F7,tertiaryForegroundFocusDelta:_7,tertiaryFillRecipe:H7,tertiaryFillRest:P7,tertiaryFillHover:V7,tertiaryFillActive:B7,tertiaryFillFocus:U7,foregroundOnTertiaryRecipe:j7,foregroundOnTertiaryRest:q7,foregroundOnTertiaryHover:G7,foregroundOnTertiaryActive:W7,foregroundOnTertiaryFocus:Y7,foregroundOnTertiaryLargeRecipe:K7,foregroundOnTertiaryRestLarge:Z7,foregroundOnTertiaryHoverLarge:Q7,foregroundOnTertiaryActiveLarge:X7,foregroundOnTertiaryFocusLarge:J7,tertiaryForegroundRecipe:e9,tertiaryForegroundRest:t9,tertiaryForegroundHover:i9,tertiaryForegroundActive:o9,tertiaryForegroundFocus:c9,errorPalette:s9,errorFillRestDelta:a9,errorFillHoverDelta:n9,errorFillActiveDelta:r9,errorFillFocusDelta:l9,errorForegroundRestDelta:d9,errorForegroundHoverDelta:h9,errorForegroundActiveDelta:u9,errorForegroundFocusDelta:f9,errorFillRecipe:p9,errorFillRest:m9,errorFillHover:g9,errorFillActive:v9,errorFillFocus:b9,foregroundOnErrorRecipe:y9,foregroundOnErrorRest:z9,foregroundOnErrorHover:x9,foregroundOnErrorActive:C9,foregroundOnErrorFocus:L9,foregroundOnErrorLargeRecipe:M9,foregroundOnErrorRestLarge:w9,foregroundOnErrorHoverLarge:k9,foregroundOnErrorActiveLarge:S9,foregroundOnErrorFocusLarge:$9,errorForegroundRecipe:E9,errorForegroundRest:N9,errorForegroundHover:A9,errorForegroundActive:T9,errorForegroundFocus:O9,successPalette:R9,successFillRestDelta:I9,successFillHoverDelta:D9,successFillActiveDelta:F9,successFillFocusDelta:_9,successForegroundRestDelta:H9,successForegroundHoverDelta:P9,successForegroundActiveDelta:V9,successForegroundFocusDelta:B9,successFillRecipe:U9,successFillRest:j9,successFillHover:q9,successFillActive:G9,successFillFocus:W9,foregroundOnSuccessRecipe:Y9,foregroundOnSuccessRest:K9,foregroundOnSuccessHover:Z9,foregroundOnSuccessActive:Q9,foregroundOnSuccessFocus:X9,foregroundOnSuccessLargeRecipe:J9,foregroundOnSuccessRestLarge:eee,foregroundOnSuccessHoverLarge:tee,foregroundOnSuccessActiveLarge:iee,foregroundOnSuccessFocusLarge:oee,successForegroundRecipe:cee,successForegroundRest:see,successForegroundHover:aee,successForegroundActive:nee,successForegroundFocus:ree,warningPalette:lee,warningFillRestDelta:dee,warningFillHoverDelta:hee,warningFillActiveDelta:uee,warningFillFocusDelta:fee,warningForegroundRestDelta:pee,warningForegroundHoverDelta:mee,warningForegroundActiveDelta:gee,warningForegroundFocusDelta:vee,warningFillRecipe:bee,warningFillRest:yee,warningFillHover:zee,warningFillActive:xee,warningFillFocus:Cee,foregroundOnWarningRecipe:Lee,foregroundOnWarningRest:Mee,foregroundOnWarningHover:wee,foregroundOnWarningActive:kee,foregroundOnWarningFocus:See,foregroundOnWarningLargeRecipe:$ee,foregroundOnWarningRestLarge:Eee,foregroundOnWarningHoverLarge:Nee,foregroundOnWarningActiveLarge:Aee,foregroundOnWarningFocusLarge:Tee,warningForegroundRecipe:Oee,warningForegroundRest:Ree,warningForegroundHover:Iee,warningForegroundActive:Dee,warningForegroundFocus:Fee});const Hee=JM(x5.primary),Pee=JM(x5.neutral),Vee=JM(x5.green),Bee=JM(x5.tertiary),Uee=JM(x5.error),jee=JM(x5.success),qee=JM(x5.warning),Gee=tr,Wee=zi.ltr,Yee='"Segoe UI", Arial, Helvetica, sans-serif',Kee="14px",Zee="20px",Qee={design_tokens:{color:{accent:{$value:Hee.source.toColorString(),$type:"color"},neutral:{$value:Pee.source.toColorString(),$type:"color"},secondary:{$value:Vee.source.toColorString(),$type:"color"},tertiary:{$value:Bee.source.toColorString(),$type:"color"},error:{$value:Uee.source.toColorString(),$type:"color"},success:{$value:jee.source.toColorString(),$type:"color"},warning:{$value:qee.source.toColorString(),$type:"color"}},fontFamily:{bodyFont:{$value:Yee,$type:"fontFamily"}},typography:{baseFontSize:{$value:Kee,$type:"dimension"},baseLineHeight:{$value:Zee,$type:"dimension"}},mode:{luminance:{$value:Gee,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};var Xee=Object.freeze({__proto__:null,accentPaletteValue:Hee,neutralPaletteValue:Pee,secondaryPaletteValue:Vee,tertiaryPaletteValue:Bee,errorPaletteValue:Uee,successPaletteValue:jee,warningPaletteValue:qee,baseLayerLuminanceValue:Gee,accentFillRestDeltaValue:0,accentFillHoverDeltaValue:4,accentFillActiveDeltaValue:-5,accentFillFocusDeltaValue:0,accentForegroundRestDeltaValue:0,accentForegroundHoverDeltaValue:6,accentForegroundActiveDeltaValue:-4,accentForegroundFocusDeltaValue:0,neutralFillRestDeltaValue:7,neutralFillHoverDeltaValue:10,neutralFillActiveDeltaValue:5,neutralFillFocusDeltaValue:0,neutralFillInputRestDeltaValue:0,neutralFillInputHoverDeltaValue:5,neutralFillInputActiveDeltaValue:0,neutralFillInputFocusDeltaValue:10,neutralFillStealthRestDeltaValue:0,neutralFillStealthHoverDeltaValue:5,neutralFillStealthActiveDeltaValue:3,neutralFillStealthFocusDeltaValue:0,neutralFillStrongRestDeltaValue:0,neutralFillStrongHoverDeltaValue:8,neutralFillStrongActiveDeltaValue:-5,neutralFillStrongFocusDeltaValue:0,neutralFillLayerRestDeltaValue:3,neutralStrokeRestDeltaValue:25,neutralStrokeHoverDeltaValue:40,neutralStrokeActiveDeltaValue:16,neutralStrokeFocusDeltaValue:25,neutralStrokeDividerRestDeltaValue:8,designTokens:Qee,prefix:"rapid",directionValue:Wee,disabledOpacityValue:.3,strokeWidthValue:1,focusStrokeWidthValue:2,baseHeightMultiplierValue:10,controlCornerRadiusValue:4,densityValue:0,designUnitValue:4,bodyFontValue:Yee,typeRampBaseFontSizeValue:Kee,typeRampBaseLineHeightValue:Zee,typeRampMinus1FontSizeValue:"13px",typeRampMinus1LineHeightValue:"19px",typeRampMinus2FontSizeValue:"12px",typeRampMinus2LineHeightValue:"18px",typeRampPlus1FontSizeValue:"15px",typeRampPlus1LineHeightValue:"21px",typeRampPlus2FontSizeValue:"16px",typeRampPlus2LineHeightValue:"22px",typeRampPlus3FontSizeValue:"17px",typeRampPlus3LineHeightValue:"23px",typeRampPlus4FontSizeValue:"18px",typeRampPlus4LineHeightValue:"24px",typeRampPlus5FontSizeValue:"19px",typeRampPlus5LineHeightValue:"25px",typeRampPlus6FontSizeValue:"20px",typeRampPlus6LineHeightValue:"26px"});const Jee=class extends yh{constructor(){super(),ZM(_ee,Xee,this)}}.compose({baseName:"design-system-provider",template:W`<slot></slot>`}),ete=Ce` ${KK} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${wd}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,tte=gZ,ite=QK,ote=mZ;const cte=class extends bZ{}.compose(Object.assign({baseName:"dialog",shadowOptions:ote,styles:ete,template:ite},tte));const ste=class extends xZ{}.compose(Object.assign({baseName:"disclosure",template:(e,t)=>yZ(),styles:(e,t)=>Ce` ${zZ()} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:mZ},CZ));const ate=class extends wZ{}.compose(Object.assign({baseName:"divider",template:(e,t)=>LZ(),styles:(e,t)=>Ce` ${MZ()}`,shadowOptions:kZ},SZ));const nte=class extends AZ{}.compose({baseName:"dropdown-menu",styles:(e,t)=>Ce` ${$Z("rapid")} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:NZ}),rte=Ce` ${TZ}`;const lte=class extends VZ{}.compose({baseName:"environment-indicator",styles:rte,template:OZ});P8(iQ);const dte=lQ,hte=hQ.compose({baseName:"file-reader",styles:dte,template:dQ}),ute=Ce` ${uQ} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,fte=W` ${fQ("rapid")} `,pte=xQ,mte=zQ;const gte=class extends yQ{}.compose(Object.assign({baseName:"file-upload",shadowOptions:mte,styles:ute,template:fte},pte)),vte=W` ${SQ("rapid")} `;const bte=class extends NQ{}.compose({baseName:"filter",template:vte,styles:(e,t)=>Ce` ${CQ} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`}),yte=W` ${OQ("rapid")} `;const zte=class extends IQ{}.compose({baseName:"filter-bar",template:yte,styles:(e,t)=>Ce` ${AQ()} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`});P8(PQ);const xte=class extends UQ{}.compose(Object.assign({baseName:"flipper",template:(e,t)=>VQ(0,t),styles:(e,t)=>Ce` ${BQ()} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:jQ},qQ)),Cte=Ce` ${GQ} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,Lte=W` ${WQ("rapid")} `,Mte=QQ,wte=ZQ;const kte=class extends KQ{}.compose(Object.assign({baseName:"flyout",shadowOptions:wte,styles:Cte,template:Lte},Mte));P8(cX);P8(nX);const Ste={nextFlipper:W`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:W`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`},$te=class extends dX{}.compose(Object.assign({baseName:"horizontal-scroll",template:(e,t)=>rX(e,t),styles:(e,t)=>Ce` ${lX()}`,shadowOptions:hX},Ste)),Ete=W` ${pX("rapid")} `;const Nte=vX,Ate=gX,Tte=class extends yX{}.compose(Object.assign({baseName:"icon",template:Ete,styles:(e,t)=>Ce` ${fX()}`,shadowOptions:Ate},Nte));const Ote=class extends CX{}.compose(Object.assign({baseName:"listbox",template:(e,t)=>zX(),styles:(e,t)=>Ce` ${xX(e)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:LX},MX));const Rte=class extends SX{}.compose(Object.assign({baseName:"option",template:(e,t)=>wX(0,t),styles:(e,t)=>Ce` ${kX()} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:$X},EX));const Ite=class extends TX{}.compose(Object.assign({baseName:"menu",template:(e,t)=>NX(),styles:(e,t)=>Ce` ${AX()} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${rd}, transparent 15%);padding: 0}`,shadowOptions:OX},RX)),Dte=_X;const Fte=class extends FX{}.compose(Object.assign({baseName:"menu-item",template:(e,t)=>IX(e,t),styles:(e,t)=>Ce` ${DX()} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${rd}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${rd}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${rd} color: ${wd} */`,shadowOptions:Dte},HX)),_te=Ce` ${ete}`,Hte=UX,Pte=VX,Vte=BX;const Bte=class extends jX{}.compose(Object.assign({baseName:"modal",shadowOptions:Vte,styles:_te,template:Pte},Hte)),Ute=Ce` ${DL} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,jte=W` ${PL("rapid")} `;const qte=UL,Gte=BL,Wte=class extends jL{}.compose(Object.assign({baseName:"multiselect",template:jte,styles:Ute,shadowOptions:Gte},qte));const Yte=class extends h8{}.compose({baseName:"notification-listener",template:d8,shadowOptions:{mode:"open",delegatesFocus:!0}});const Kte=lJ,Zte=qX,Qte=rJ,Xte=class extends nJ{}.compose(Object.assign({baseName:"number-field",template:Zte,styles:(e,t)=>Ce` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${rQ}`,shadowOptions:Qte},Kte));const Jte=class extends uJ{}.compose({baseName:"optgroup",template:(e,t)=>hJ(),styles:(e,t)=>Ce` ${dJ()}`});const eie=class extends CJ{}.compose(Object.assign({baseName:"system-health-overlay",template:LJ,styles:MJ,shadowOptions:wJ},kJ));const tie=class extends mJ{}.compose(Object.assign({baseName:"progress",template:(e,t)=>fJ(0,t),styles:(e,t)=>Ce` ${pJ()}`,shadowOptions:gJ},vJ));const iie=class extends Y1{}.compose(Object.assign({baseName:"progress-ring",template:(e,t)=>G1(0,t),styles:(e,t)=>Ce` ${W1()}`,shadowOptions:K1},Z1));const oie=class extends J1{}.compose(Object.assign({baseName:"radio",template:(e,t)=>Q1(0,t),styles:(e,t)=>Ce` ${X1()} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:e2},t2));const cie=class extends c2{}.compose(Object.assign({baseName:"radio-group",template:(e,t)=>i2(),styles:(e,t)=>Ce` ${o2()}`,shadowOptions:s2},a2)),sie=Ce` ${n2} :host{font-family: var(--body-font)}`,aie=W` ${r2("rapid")} `;const nie=class extends d2{}.compose(Object.assign({baseName:"scheduler",template:aie,styles:sie,shadowOptions:h2},u2)),rie=Ce` ${A2} :host{font-family: var(--body-font)}`,lie=W` ${Q2("rapid")} `;const die=class extends J2{}.compose(Object.assign({baseName:"scheduler-cron-builder",template:lie,styles:rie,shadowOptions:e3},t3)),hie=Ce` ${i3} :host{font-family: var(--body-font)}`,uie=W` ${o3("rapid")} `;const fie=class extends s3{}.compose(Object.assign({baseName:"scheduler-timezone",template:uie,styles:hie,shadowOptions:a3},n3)),pie=Ce` ${r3}`,mie=W` ${l3("rapid")} `;const gie=class extends h3{}.compose(Object.assign({baseName:"search-bar",template:mie,styles:pie,shadowOptions:u3},f3));const vie=class extends v3{}.compose(Object.assign({baseName:"search-bar-combobox",template:(e,t)=>m3(0,t),styles:(e,t)=>Ce` ${p3(e)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${hr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:b3},y3));const bie=class extends S3{}.compose(Object.assign({baseName:"section-navigator",template:x3,styles:(e,t)=>z3,shadowOptions:$3},E3));const yie=class extends T3{}.compose(Object.assign({baseName:"segmented-control",template:(e,t)=>N3(),styles:(e,t)=>Ce` ${A3()} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{}));const zie=class extends J1{}.compose(Object.assign({baseName:"segmented-item",template:(e,t)=>O3(),styles:(e,t)=>Ce` ${R3()} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{}));const xie=class extends F3{}.compose(Object.assign({baseName:"select",template:(e,t)=>I3(0,t),styles:(e,t)=>Ce` ${D3(e)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${hr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:_3},H3));const Cie=class extends B3{}.compose(Object.assign({baseName:"skeleton",template:(e,t)=>P3(),styles:(e,t)=>Ce` ${V3()} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:U3},j3));const Lie=class extends W3{}.compose(Object.assign({baseName:"slider",template:(e,t)=>q3(0,t),styles:(e,t)=>Ce` ${G3()} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${El}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${El}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${El}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:Y3},K3));const Mie=class extends X3{}.compose(Object.assign({baseName:"slider-label",template:(e,t)=>Z3(),styles:(e,t)=>Ce` ${Q3()} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:J3},e4)),wie=Ce` ${c4} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,kie=W` ${s4("rapid")} `,Sie=n4;const $ie=class extends r4{}.compose({baseName:"snackbar",shadowOptions:Sie,styles:wie,template:kie});const Eie=class extends h4{}.compose({baseName:"stacking-icons",template:d4,styles:(e,t)=>Ce` ${l4()}`});const Nie=class extends p4{}.compose({baseName:"status-pill",template:f4,styles:u4}),Aie=Ce` ${$8} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,Tie=W` ${k8("rapid")} `;const Oie=class extends E8{}.compose(Object.assign({baseName:"stepper",template:Tie,styles:Aie,shadowOptions:N8},A8)),Rie=W` ${m4("rapid")} `;const Iie=class extends b4{}.compose(Object.assign({baseName:"stepper-tab",template:Rie,styles:(e,t)=>Ce` ${v4()} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,shadowOptions:y4},z4));const Die=class extends C4{}.compose(Object.assign({baseName:"stepper-tab-panel",template:(e,t)=>x4(),shadowOptions:L4},M4)),Fie={switch:'<div class="checked-indicator" part="checked-indicator"></div>'};const _ie=class extends S4{}.compose(Object.assign({baseName:"switch",template:(e,t)=>w4(0,t),styles:(e,t)=>Ce` ${k4()} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:$4},Fie));const Hie=class extends T4{}.compose(Object.assign({baseName:"tab",template:(e,t)=>N4(),styles:(e,t)=>Ce` ${A4()} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4)}`,shadowOptions:O4},R4));const Pie=class extends F4{}.compose(Object.assign({baseName:"tab-panel",template:(e,t)=>I4(),styles:(e,t)=>Ce` ${D4()} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:_4},H4));const Vie=class extends B4{}.compose(Object.assign({baseName:"tabs",template:(e,t)=>P4(0,t),styles:(e,t)=>Ce` ${V4()} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:U4},j4));const Bie=class extends W4{}.compose(Object.assign({baseName:"text-area",template:(e,t)=>q4(),styles:(e,t)=>Ce` ${G4()} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:Y4},K4));const Uie=class extends X4{}.compose(Object.assign({baseName:"text-field",template:(e,t)=>Z4(0,t),styles:(e,t)=>Ce` ${Q4()} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:J4},e0)),jie=Ce` ${t0} .toast{background-color: ${yl};border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,qie=s0,Gie=c0;const Wie=class extends a0{}.compose(Object.assign({baseName:"toast",shadowOptions:Gie,styles:jie,template:o0},qie));const Yie=class extends l0{}.compose(Object.assign({baseName:"toolbar",template:(e,t)=>n0(0,t),styles:(e,t)=>Ce` ${r0()} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:d0},h0));const Kie=class extends p0{}.compose(Object.assign({baseName:"tooltip",template:(e,t)=>u0(e),styles:(e,t)=>Ce` ${f0(e)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:m0},g0));const Zie={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"/>\n </svg>'},Qie=class extends y0{}.compose(Object.assign({baseName:"tree-item",template:(e,t)=>v0(0,t),styles:(e,t)=>Ce` ${b0(e)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:z0},Zie));const Xie=class extends M0{}.compose(Object.assign({baseName:"tree-view",template:(e,t)=>C0(),styles:(e,t)=>Ce` ${L0()}`,shadowOptions:w0},k0)),Jie=W` ${$0("rapid")} `;const eoe={designSystemProvider:Jee,rapidAccordion:T8,rapidAccordionItem:O8,rapidAiCriteriaSearch:D8,rapidAiIndicator:F8,rapidActionsMenu:R8,rapidAnchor:J8,rapidSectionNavigator:bie,rapidAnchoredRegion:e5,rapidAvatar:t5,rapidBadge:i5,rapidBanner:s5,rapidBreadcrumb:a5,rapidBreadcrumbItem:n5,rapidButton:r5,rapidCalendar:l5,rapidCard:d5,rapidCategorizedMultiselect:m5,rapidCheckbox:g5,rapidCombobox:v5,rapidConnectionIndicator:b5,rapidDataGrid:()=>uM(),rapidDataGridCell:()=>fM(),rapidDataGridRow:()=>pM(),rapidDatePicker:z5,rapidDialog:cte,rapidDisclosure:ste,rapidDivider:ate,rapidDropdownMenu:nte,rapidEnvironmentIndicator:lte,rapidErrorBoundary:()=>iQ(),rapidFileReader:hte,rapidFileUpload:gte,rapidFilter:bte,rapidFilterBar:zte,rapidFlexLayout:()=>PQ(),rapidFlipper:xte,rapidFlyout:kte,rapidGridLayout:()=>cX(),rapidGridLayoutItem:()=>nX(),rapidHorizontalScroll:$te,rapidIcon:Tte,rapidListbox:Ote,rapidListboxOption:Rte,rapidMenu:Ite,rapidMenuItem:Fte,rapidModal:Bte,rapidMultiselect:Wte,rapidNotificationListener:Yte,rapidNumberField:Xte,rapidOptgroup:Jte,rapidProgress:tie,rapidProgressRing:iie,rapidRadio:oie,rapidRadioGroup:cie,rapidScheduler:nie,rapidSchedulerCronBuilder:die,rapidSchedulerTimezone:fie,rapidSearchBar:gie,rapidSearchBarCombobox:vie,rapidSegmentedControl:yie,rapidSegmentedItem:zie,rapidSelect:xie,rapidSkeleton:Cie,rapidSlider:Lie,rapidSliderLabel:Mie,rapidSnackbar:$ie,rapidStackingIcons:Eie,rapidStatusPill:Nie,rapidStepper:Oie,rapidStepperTab:Iie,rapidStepperTabPanel:Die,rapidSwitch:_ie,rapidSystemHealthOverlay:eie,rapidTab:Hie,rapidTabPanel:Pie,rapidTabs:Vie,rapidTextArea:Bie,rapidTextField:Uie,rapidToast:Wie,rapidToolbar:Yie,rapidTooltip:Kie,rapidTreeItem:Qie,rapidTreeView:Xie,rapidUrlInput:class extends T0{}.compose(Object.assign({baseName:"url-input",template:Jie,styles:(e,t)=>Ce` ${S0()} a{color: var(--accent-fill-rest);opacity: 65%}a:hover{opacity: 100%}.url-input-link{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);top: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) / 2 * 1px)}`,shadowOptions:N0},A0)),register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},toe=(e,t="rapid")=>yJ(e,t,Xee,_ee),ioe=Fn("#585858");Vn.create(ioe.r,ioe.g,ioe.b);const ooe=Fn("#202126"),coe=Vn.create(ooe.r,ooe.g,ooe.b);function soe(e,...t){let i="";return e.forEach((e,o)=>{i+=e,o<t.length&&(i+=t[o])}),i}Wn.from(coe);const aoe={number:"rapid-number-field",text:"rapid-text-field",date:"rapid-text-field",datetimeLocal:"rapid-text-field",checkbox:"rapid-checkbox",button:"rapid-button",select:"rapid-select",option:"rapid-option",optgroup:"rapid-optgroup",radio:{input:"rapid-radio",group:"rapid-radio-group"}},noe=soe` rapid-select, rapid-text-field, rapid-number-field{min-width: 180px}rapid-button.btn{padding: 0}rapid-button.btn-success{background-color: var(--accent-fill-active);border-color: var(--accent-fill-active)}rapid-button.btn-danger{background-color: var(--error-color);border-color: var(--error-border-color)}rapid-select::part(listbox){max-height: 15vh}`,roe=soe` border: unset;border: 1px solid var(--focus-stroke-outer);padding: calc(var(--design-unit) * 2.5px);border-radius: 10px;margin: calc(var(--design-unit) * 1px);`,loe={value:soe` ${noe} rapid-number-field, rapid-text-field{margin-bottom: 0}rapid-number-field::part(label){display: none}p.validation-msg{color: var(--neutral-foreground-rest)}`,rule:soe` ${noe} div.rule-container{${roe}}div.rule-container.error{border-color: var(--error-border-color)}`,operator:soe` ${noe} rapid-select{min-width: 350px}`,field:soe` ${noe} rapid-select{min-width: 350px}`,group:soe` ${noe} div.rules-group-container{${roe}}p.group-combinator-link{padding-left: calc(var(--design-unit) * 2.5px);color: var(--neutral-foreground-rest)}`};let doe=class extends A6{constructor(){super(...arguments),this.styles={customElements:aoe,customStyles:loe}}};Nu([g],doe.prototype,"styles",void 0),doe=Nu([ye({name:"rapid-expression-builder",styles:G6.styles,template:G6.template})],doe);let hoe=class extends o8{constructor(){super(...arguments),this.styles={customElements:aoe,customStyles:loe}}};Nu([g],hoe.prototype,"styles",void 0),hoe=Nu([ye({name:"rapid-rule-expression-builder",styles:G6.styles,template:G6.template})],hoe);let uoe=class extends l8{constructor(){super(...arguments),this.styles={customElements:aoe,customStyles:loe}}};Nu([g],uoe.prototype,"styles",void 0),uoe=Nu([ye({name:"rapid-value-expression-builder",styles:G6.styles,template:G6.template})],uoe);Ce` ${"/* ============================================================================\n * flexlayout-react base theme — VENDORED from flexlayout-react@0.8.19 (style/dark.css).\n * ========================================================================== */\n.flexlayout__layout {\n --color-text: #eeeeee;\n --color-background: black;\n --color-base: black;\n --color-1: rgb(17.85, 17.85, 17.85);\n --color-2: rgb(25.5, 25.5, 25.5);\n --color-3: rgb(38.25, 38.25, 38.25);\n --color-4: #333333;\n --color-5: rgb(63.75, 63.75, 63.75);\n --color-6: rgb(76.5, 76.5, 76.5);\n --color-drag1: rgb(207, 232, 255);\n --color-drag2: rgb(183, 209, 181);\n --color-drag1-background: rgba(128, 128, 128, 0.15);\n --color-drag2-background: rgba(128, 128, 128, 0.15);\n --font-size: medium;\n --font-family: Roboto, Arial, sans-serif;\n --color-overflow: gray;\n --color-icon: gray;\n --color-tabset-background: var(--color-1);\n --color-tabset-background-selected: var(--color-1);\n --color-tabset-background-maximized: var(--color-6);\n --color-tabset-divider-line: var(--color-4);\n --color-tabset-header-background: var(--color-1);\n --color-tabset-header: var(--color-text);\n --color-border-tab-content: var(--color-background);\n --color-border-background: var(--color-1);\n --color-border-divider-line: var(--color-4);\n --color-tab-content: var(--color-background);\n --color-tab-selected: var(--color-text);\n --color-tab-selected-background: var(--color-4);\n --color-tab-unselected: gray;\n --color-tab-unselected-background: transparent;\n --color-tab-textbox: var(--color-text);\n --color-tab-textbox-background: var(--color-3);\n --color-border-tab-selected: var(--color-text);\n --color-border-tab-selected-background: var(--color-4);\n --color-border-tab-unselected: gray;\n --color-border-tab-unselected-background: var(--color-2);\n --color-splitter: var(--color-2);\n --color-splitter-hover: var(--color-4);\n --color-splitter-drag: var(--color-5);\n --color-drag-rect-border: var(--color-4);\n --color-drag-rect-background: var(--color-1);\n --color-drag-rect: var(--color-text);\n --color-popup-border: var(--color-6);\n --color-popup-unselected: var(--color-text);\n --color-popup-unselected-background: var(--color-background);\n --color-popup-selected: var(--color-text);\n --color-popup-selected-background: var(--color-4);\n --color-edge-marker: gray;\n --color-edge-icon: #eee;\n --color-mini-scroll-indicator: rgba(128, 128, 128, 0.5);\n --color-mini-scroll-indicator-hovered: rgba(128, 128, 128, 0.8);\n --size-mini-scroll-indicator: 3px;\n --color-toolbar-button-hover: var(--color-4);\n}\n\n/*\n base classes\n*/\n.flexlayout__layout {\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n display: flex;\n overflow: hidden;\n background-color: var(--color-background);\n}\n.flexlayout__layout_overlay {\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n z-index: 1000;\n}\n.flexlayout__layout_tab_stamps {\n position: absolute;\n top: -10000px;\n z-index: 100;\n display: flex;\n flex-direction: column;\n align-items: start;\n}\n.flexlayout__layout_moveables {\n visibility: hidden;\n position: absolute;\n width: 100px;\n height: 100px;\n top: -20000px;\n}\n.flexlayout__layout_main {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n flex-grow: 1;\n position: relative;\n}\n.flexlayout__layout_border_container {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n flex-grow: 1;\n}\n.flexlayout__layout_border_container_inner {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n flex-grow: 1;\n}\n.flexlayout__splitter {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--color-splitter);\n touch-action: none;\n z-index: 10;\n}\n@media (hover: hover) {\n .flexlayout__splitter:hover {\n background-color: var(--color-splitter-hover);\n transition: background-color ease-in 0.1s;\n transition-delay: 0.05s;\n border-radius: 5px;\n }\n}\n.flexlayout__splitter_drag {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n border-radius: 5px;\n background-color: var(--color-splitter-drag);\n}\n.flexlayout__splitter_handle {\n background-color: #ccc;\n border-radius: 3px;\n}\n.flexlayout__splitter_handle_horz {\n width: 3px;\n height: 30px;\n}\n.flexlayout__splitter_handle_vert {\n width: 30px;\n height: 3px;\n}\n.flexlayout__splitter_extra {\n touch-action: none;\n background-color: transparent;\n}\n.flexlayout__outline_rect {\n position: absolute;\n pointer-events: none;\n box-sizing: border-box;\n border: 2px solid var(--color-drag1);\n background: var(--color-drag1-background);\n border-radius: 5px;\n z-index: 1000;\n}\n.flexlayout__outline_rect_edge {\n pointer-events: none;\n border: 2px solid var(--color-drag2);\n background: var(--color-drag2-background);\n border-radius: 5px;\n z-index: 1000;\n box-sizing: border-box;\n}\n.flexlayout__edge_rect {\n position: absolute;\n z-index: 1000;\n background-color: var(--color-edge-marker);\n pointer-events: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.flexlayout__drag_rect {\n color: var(--color-drag-rect);\n background-color: var(--color-drag-rect-background);\n border: 2px solid var(--color-drag-rect-border);\n border-radius: 5px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n flex-direction: column;\n overflow: hidden;\n padding: 0.3em 0.8em;\n word-wrap: break-word;\n font-size: var(--font-size);\n font-family: var(--font-family);\n}\n.flexlayout__row {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n}\n.flexlayout__tabset {\n display: flex;\n flex-direction: column;\n position: relative;\n background-color: var(--color-tabset-background);\n box-sizing: border-box;\n font-family: var(--font-family);\n overflow: hidden;\n flex-grow: 1;\n}\n.flexlayout__tabset_container {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n flex-grow: 1;\n}\n.flexlayout__tabset_tab_divider {\n width: 4px;\n}\n.flexlayout__tabset_content {\n display: flex;\n flex-basis: 0px;\n min-width: 0;\n min-height: 0;\n flex-grow: 1;\n box-sizing: border-box;\n position: relative;\n}\n.flexlayout__tabset_leading {\n display: flex;\n}\n.flexlayout__tabset_header {\n display: flex;\n align-items: center;\n padding: 3px 3px 3px 5px;\n box-sizing: border-box;\n border-bottom: 1px solid var(--color-tabset-divider-line);\n color: var(--color-tabset-header);\n background-color: var(--color-tabset-header-background);\n font-size: var(--font-size);\n}\n.flexlayout__tabset_header_content {\n flex-grow: 1;\n}\n.flexlayout__tabset_tabbar_outer {\n box-sizing: border-box;\n background-color: var(--color-tabset-background);\n overflow: hidden;\n display: flex;\n font-size: var(--font-size);\n}\n.flexlayout__tabset_tabbar_outer_top {\n padding: 0px 2px 0px 2px;\n border-bottom: 1px solid var(--color-tabset-divider-line);\n}\n.flexlayout__tabset_tabbar_outer_bottom {\n padding: 0px 2px 0px 2px;\n border-top: 1px solid var(--color-tabset-divider-line);\n}\n.flexlayout__tabset_tabbar_inner {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n scrollbar-width: none;\n}\n.flexlayout__tabset_tabbar_inner::-webkit-scrollbar {\n display: none;\n}\n.flexlayout__tabset_tabbar_inner_tab_container {\n position: relative;\n display: flex;\n padding-left: 4px;\n padding-right: 4px;\n box-sizing: border-box;\n white-space: nowrap;\n}\n.flexlayout__tabset_tabbar_inner_tab_container_top {\n border-top: 2px solid transparent;\n}\n.flexlayout__tabset_tabbar_inner_tab_container_bottom {\n border-bottom: 2px solid transparent;\n}\n.flexlayout__tabset-selected {\n background-color: var(--color-tabset-background-selected);\n}\n.flexlayout__tabset-maximized {\n background-color: var(--color-tabset-background-maximized);\n}\n.flexlayout__tab_button_stamp {\n display: inline-flex;\n align-items: center;\n gap: 0.3em;\n white-space: nowrap;\n box-sizing: border-box;\n}\n.flexlayout__tab {\n overflow: hidden;\n box-sizing: border-box;\n background-color: var(--color-tab-content);\n color: var(--color-text);\n position: relative;\n}\n.flexlayout__tab_moveable {\n position: relative;\n height: 100%;\n min-width: 1px;\n min-height: 1px;\n overflow: auto;\n box-sizing: border-box;\n}\n.flexlayout__tab_overlay {\n z-index: 20;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2392156863);\n}\n.flexlayout__tab_button {\n display: flex;\n gap: 0.3em;\n align-items: center;\n box-sizing: border-box;\n padding: 3px 0.5em;\n cursor: pointer;\n}\n.flexlayout__tab_button_stretch {\n background-color: transparent;\n color: var(--color-tab-selected);\n width: 100%;\n padding: 3px 0em;\n text-wrap: nowrap;\n display: flex;\n gap: 0.3em;\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n}\n@media (hover: hover) {\n .flexlayout__tab_button_stretch:hover {\n color: var(--color-tab-selected);\n }\n}\n.flexlayout__tab_button--selected {\n background-color: var(--color-tab-selected-background);\n color: var(--color-tab-selected);\n}\n@media (hover: hover) {\n .flexlayout__tab_button:hover {\n color: var(--color-tab-selected);\n }\n}\n.flexlayout__tab_button--unselected {\n background-color: var(--color-tab-unselected-background);\n color: var(--color-tab-unselected);\n}\n.flexlayout__tab_button_leading {\n display: flex;\n}\n.flexlayout__tab_button_content {\n display: flex;\n text-wrap: nowrap;\n}\n.flexlayout__tab_button_textbox {\n border: none;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--color-tab-textbox);\n background-color: var(--color-tab-textbox-background);\n border: 1px inset var(--color-1);\n border-radius: 3px;\n width: 10em;\n}\n.flexlayout__tab_button_textbox:focus {\n outline: none;\n}\n.flexlayout__tab_button_trailing {\n display: flex;\n visibility: hidden;\n border-radius: 4px;\n}\n.flexlayout__tab_button_trailing:hover {\n background-color: var(--color-toolbar-button-hover);\n}\n@media (hover: hover) {\n .flexlayout__tab_button:hover .flexlayout__tab_button_trailing {\n visibility: visible;\n }\n}\n.flexlayout__tab_button--selected .flexlayout__tab_button_trailing {\n visibility: visible;\n}\n.flexlayout__tab_button_overflow {\n display: flex;\n align-items: center;\n border: none;\n color: var(--color-overflow);\n font-size: inherit;\n background-color: transparent;\n width: 2em;\n overflow: hidden;\n}\n.flexlayout__tab_toolbar {\n display: flex;\n align-items: center;\n gap: 0.3em;\n padding-left: 0.5em;\n padding-right: 0.3em;\n}\n.flexlayout__tab_toolbar_icon {\n border: none;\n outline: none;\n font-size: inherit;\n margin: 0px;\n background-color: transparent;\n padding: 1px;\n}\n.flexlayout__tab_toolbar_button {\n border: none;\n outline: none;\n font-size: inherit;\n margin: 0px;\n background-color: transparent;\n border-radius: 4px;\n padding: 1px;\n}\n@media (hover: hover) {\n .flexlayout__tab_toolbar_button:hover {\n background-color: var(--color-toolbar-button-hover);\n }\n}\n.flexlayout__tab_toolbar_sticky_buttons_container {\n display: flex;\n gap: 0.3em;\n padding-left: 5px;\n align-items: center;\n}\n.flexlayout__border {\n box-sizing: border-box;\n overflow: hidden;\n display: flex;\n font-size: var(--font-size);\n font-family: var(--font-family);\n color: var(--color-border);\n background-color: var(--color-border-background);\n}\n.flexlayout__border_tab_contents {\n box-sizing: border-box;\n overflow: hidden;\n background-color: var(--color-border-tab-content);\n}\n.flexlayout__border_leading {\n display: flex;\n}\n.flexlayout__border_top {\n border-bottom: 1px solid var(--color-border-divider-line);\n align-items: center;\n}\n.flexlayout__border_bottom {\n border-top: 1px solid var(--color-border-divider-line);\n align-items: center;\n}\n.flexlayout__border_left {\n border-right: 1px solid var(--color-border-divider-line);\n align-content: center;\n flex-direction: column;\n}\n.flexlayout__border_right {\n border-left: 1px solid var(--color-border-divider-line);\n align-content: center;\n flex-direction: column;\n}\n.flexlayout__border_inner {\n position: relative;\n box-sizing: border-box;\n align-items: center;\n display: flex;\n flex-grow: 1;\n scrollbar-width: none;\n}\n.flexlayout__border_inner::-webkit-scrollbar {\n display: none;\n}\n.flexlayout__border_inner_tab_container {\n white-space: nowrap;\n display: flex;\n padding-left: 2px;\n padding-right: 2px;\n box-sizing: border-box;\n position: absolute;\n}\n.flexlayout__border_inner_tab_container_right {\n transform-origin: top left;\n transform: rotate(90deg);\n}\n.flexlayout__border_inner_tab_container_left {\n flex-direction: row-reverse;\n transform-origin: top right;\n transform: rotate(-90deg);\n}\n.flexlayout__border_tab_divider {\n width: 4px;\n}\n.flexlayout__border_button {\n display: flex;\n gap: 0.3em;\n align-items: center;\n cursor: pointer;\n padding: 3px 0.5em;\n margin: 2px 0px;\n box-sizing: border-box;\n white-space: nowrap;\n}\n.flexlayout__border_button--selected {\n background-color: var(--color-border-tab-selected-background);\n color: var(--color-border-tab-selected);\n}\n@media (hover: hover) {\n .flexlayout__border_button:hover {\n color: var(--color-border-tab-selected);\n }\n}\n.flexlayout__border_button--unselected {\n background-color: var(--color-border-tab-unselected-background);\n color: var(--color-border-tab-unselected);\n}\n.flexlayout__border_button_leading {\n display: flex;\n}\n.flexlayout__border_button_content {\n display: flex;\n}\n.flexlayout__border_button_trailing {\n display: flex;\n border-radius: 4px;\n visibility: hidden;\n}\n@media (hover: hover) {\n .flexlayout__border_button:hover .flexlayout__border_button_trailing {\n visibility: visible;\n }\n}\n.flexlayout__border_button--selected .flexlayout__border_button_trailing {\n visibility: visible;\n}\n.flexlayout__border_toolbar {\n display: flex;\n gap: 0.3em;\n align-items: center;\n}\n.flexlayout__border_toolbar_left, .flexlayout__border_toolbar_right {\n flex-direction: column;\n padding-top: 0.5em;\n padding-bottom: 0.3em;\n}\n.flexlayout__border_toolbar_top, .flexlayout__border_toolbar_bottom {\n padding-left: 0.5em;\n padding-right: 0.3em;\n}\n.flexlayout__border_toolbar_button {\n border: none;\n outline: none;\n font-size: inherit;\n background-color: transparent;\n border-radius: 4px;\n padding: 1px;\n}\n@media (hover: hover) {\n .flexlayout__border_toolbar_button:hover {\n background-color: var(--color-toolbar-button-hover);\n }\n}\n.flexlayout__border_toolbar_button_overflow {\n display: flex;\n align-items: center;\n border: none;\n color: var(--color-overflow);\n font-size: inherit;\n background-color: transparent;\n width: 1.5em;\n}\n.flexlayout__popup_menu {\n font-size: var(--font-size);\n font-family: var(--font-family);\n}\n.flexlayout__popup_menu_item {\n padding: 2px 0.5em;\n white-space: nowrap;\n cursor: pointer;\n border-radius: 2px;\n}\n.flexlayout__popup_menu_item--selected {\n font-weight: 500;\n background-color: var(--color-tab-selected-background);\n color: var(--color-tab-selected);\n}\n@media (hover: hover) {\n .flexlayout__popup_menu_item:hover {\n background-color: var(--color-6);\n }\n}\n.flexlayout__popup_menu_container {\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15);\n border: 1px solid var(--color-popup-border);\n color: var(--color-popup-unselected);\n background: var(--color-popup-unselected-background);\n border-radius: 3px;\n position: absolute;\n z-index: 1000;\n max-height: 50%;\n min-width: 100px;\n overflow: auto;\n padding: 2px;\n}\n.flexlayout__floating_window _body {\n height: 100%;\n}\n.flexlayout__floating_window_content {\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n}\n.flexlayout__error_boundary_container {\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n display: flex;\n justify-content: center;\n}\n.flexlayout__error_boundary_content {\n display: flex;\n align-items: center;\n}\n.flexlayout__border_sizer {\n position: absolute;\n top: -30000px;\n padding-top: 6px;\n padding-bottom: 5px;\n font-size: var(--font-size);\n font-family: var(--font-family);\n}\n.flexlayout__mini_scrollbar {\n position: absolute;\n background-color: var(--color-mini-scroll-indicator);\n border-radius: 5px;\n width: var(--size-mini-scroll-indicator);\n height: var(--size-mini-scroll-indicator);\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;\n}\n.flexlayout__mini_scrollbar:hover {\n background-color: var(--color-mini-scroll-indicator-hovered);\n transition: background-color 0.3s ease-in-out;\n}\n.flexlayout__mini_scrollbar_container {\n position: relative;\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n}\n@media (hover: hover) {\n .flexlayout__mini_scrollbar_container:hover .flexlayout__mini_scrollbar {\n opacity: 1;\n visibility: visible;\n }\n}\n\n/* ======================== End of Base Classes =========================== */\n/* \n dark theme overrides \n*/\n.flexlayout__tabset_header {\n box-shadow: inset 0 0 3px 0 rgba(136, 136, 136, 0.54);\n}\n.flexlayout__tabset-selected {\n background-image: linear-gradient(var(--color-background), var(--color-4));\n}\n.flexlayout__tabset-maximized {\n background-image: linear-gradient(var(--color-6), var(--color-2));\n}\n.flexlayout__tab_top {\n box-shadow: inset -2px 0px 5px rgba(0, 0, 0, 0.1);\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.flexlayout__tab_bottom {\n box-shadow: inset -2px 0px 5px rgba(0, 0, 0, 0.1);\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.flexlayout__border_button {\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15);\n border-radius: 3px;\n}\n\n/* ============================================================================\n * Rapid Design System overrides (flexlayout-react.overrides.css) — applied last.\n * ========================================================================== */\n/*\n * flexlayout-react.overrides.css — Rapid Design System theme overrides for flexlayout-react.\n *\n * THIS IS THE SINGLE SOURCE OF TRUTH for how flexlayout-react looks across every app that\n * consumes Foundation. Do NOT copy these rules into apps — import the compiled theme from\n * `@genesislcap/rapid-design-system` instead (see flexlayout-react-theme.ts).\n *\n * Build pipeline: `scripts/generate-flexlayout-theme.mjs` concatenates the vendored\n * flexlayout-react base theme (structural CSS + dark palette) FIRST, then this file LAST,\n * into `flexlayout-react-theme.generated.ts`. Equal specificity means the later sheet wins,\n * so every rule here overrides the vendored default. Run `pnpm flexlayout:generate` after\n * editing (the package build does this automatically).\n *\n * The flexlayout theme is almost entirely driven by CSS custom properties declared on\n * `.flexlayout__layout` (see the full list at the top of the vendored base theme). The\n * easiest way to re-skin is to remap those variables to rapid design-system tokens, as\n * below. For anything the variables don't cover, target the `.flexlayout__*` classes\n * directly (examples at the bottom).\n *\n * Tokens resolve from the nearest design-system provider ancestor (CSS custom properties\n * inherit across shadow boundaries), so flexlayout-react must render under a\n * `<rapid-design-system-provider>` for these to take effect.\n */\n\n/* --- Variable remap: flexlayout palette -> rapid design tokens ----------------- */\n.flexlayout__layout {\n --font-family: var(--body-font, Roboto, Arial, sans-serif);\n --font-size: var(--type-ramp-base-font-size);\n\n --color-text: var(--neutral-foreground-rest);\n --color-background: var(--fill-color);\n\n /* Greyscale ramp used across tabsets, borders and toolbars. */\n --color-1: var(--neutral-layer-1);\n --color-2: var(--neutral-layer-2);\n --color-3: var(--neutral-layer-3);\n --color-4: var(--neutral-layer-4);\n\n /* Selected tab + active splitter pick up the accent colour. */\n --color-tab-selected: var(--accent-foreground-rest);\n --color-tab-unselected: var(--neutral-foreground-hint);\n --color-tab-selected-background: var(--accent-fill-rest);\n --color-splitter-drag: var(--accent-fill-rest);\n --color-splitter-hover: var(--accent-fill-hover);\n}\n\n.flexlayout__tabset-selected,\n.flexlayout__tabset-maximized {\n background-image: none !important;\n}\n\n.flexlayout__tab_button_content {\n font-weight: 400;\n font-size: var(--type-ramp-minus-1-font-size);\n}\n\n.flexlayout__tab_button--unselected:hover {\n color: var(--neutral-foreground-rest, #e0e0e0) !important;\n background-color: var(--neutral-fill-stealth-active, rgba(255, 255, 255, 0.06)) !important;\n}\n\n.flexlayout__tab_top,\n.flexlayout__tab_bottom {\n border-radius: 0 !important;\n box-shadow: none !important;\n}\n\n.flexlayout__tab_toolbar_button-max,\n.flexlayout__tab_toolbar_button-min {\n order: 100;\n}\n\n.flexlayout__tab_button_textbox {\n box-sizing: border-box;\n width: auto;\n min-width: 8em;\n max-width: 100%;\n margin: 0;\n padding: 0 calc(var(--design-unit, 4) * 1px);\n font-family: var(--body-font);\n font-size: var(--type-ramp-base-font-size, var(--font-size));\n font-weight: 500;\n line-height: var(--type-ramp-base-line-height, normal);\n color: var(--neutral-foreground-rest);\n background-color: var(--neutral-fill-input-rest);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius, 2) * 1px);\n\n &:focus {\n outline: none;\n color: var(--neutral-foreground-rest);\n background-color: var(--neutral-fill-input-focus, var(--neutral-fill-input-rest));\n border-color: var(--accent-fill-rest);\n }\n}\n\n.flexlayout__tabset {\n border: var(--card-border, 1px solid var(--neutral-stroke-rest));\n border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));\n background-color: var(--rapid-layout-item-background, var(--neutral-layer-3));\n}\n\n.flexlayout__tabset_content {\n margin-top: -1px;\n}\n\n.flexlayout__tabset_tabbar_outer_top {\n border: 0;\n height: var(\n --foundation-tab-height,\n calc((((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px)\n );\n background: none;\n z-index: 1;\n}\n\n.flexlayout__tabset_container {\n border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));\n}\n\n.flexlayout__tabset_tabbar_inner_tab_container_top {\n border-top: 0;\n}\n\n.flexlayout__tab_button {\n border-right-style: solid;\n border-right-width: var(--tab-rest-border-width, 1px);\n border-right-color: var(--tab-rest-border-color, var(--neutral-stroke-rest));\n padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);\n gap: 8px;\n\n &:first-child {\n border-left-style: solid;\n border-left-width: var(--tab-rest-border-width, 1px);\n border-left-color: var(--tab-rest-border-color, var(--neutral-stroke-rest));\n }\n}\n\n.flexlayout__tab_button--selected {\n position: relative;\n color: var(--accent-foreground-rest) !important;\n background: var(--tab-active-background-color, var(--neutral-layer-card-container));\n border-style: solid;\n border-width: var(--tab-active-border-width, 0 1px 0 0);\n border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));\n .flexlayout__tab_button_content {\n font-weight: 700;\n }\n}\n\n.flexlayout__tab {\n border-radius: calc(var(--control-corner-radius) * 1.5px)\n calc(var(--control-corner-radius) * 1.5px)\n var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px))\n var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));\n border-top: var(--card-border, 1px solid var(--neutral-stroke-rest));\n background: var(--neutral-layer-card-container);\n\n rapid-card {\n display: flex;\n flex-direction: column;\n border: 0;\n border-radius: 0 0 var(--card-corner-radius) var(--card-corner-radius);\n grid-register {\n display: block;\n height: 100%;\n }\n }\n}\n\n.flexlayout__tabset_tab_divider {\n width: 0;\n}\n\n.flexlayout__tab_button_trailing {\n rapid-icon {\n color: var(--accent-foreground-rest);\n\n &:hover {\n color: var(--accent-foreground-hover);\n }\n }\n}\n\n.flexlayout__popup_menu_container {\n box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);\n padding: 0;\n border: 1px solid var(--neutral-stroke-rest);\n}\n\n.flexlayout__popup_menu_item {\n padding: calc((8 + var(--design-unit) * 2 * var(--density)) * 1px);\n border-bottom: 1px solid var(--neutral-stroke-divider-rest);\n\n &:hover {\n background-color: var(--neutral-fill-rest);\n color: contrast-color(var(--neutral-fill-rest));\n }\n\n &:last-child {\n border-bottom: 0;\n }\n}\n\n.flexlayout__popup_menu_item--selected {\n background-color: var(--neutral-fill-rest);\n color: contrast-color(var(--neutral-fill-rest));\n}\n\n.flexlayout__tab_toolbar_button {\n padding: 0;\n height: unset;\n width: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n > svg {\n height: 16px !important;\n width: 16px !important;\n padding: 4px;\n fill: var(--neutral-foreground-hint);\n }\n}\n\n.flexlayout__splitter_vert {\n background-color: var(--neutral-foreground-rest);\n mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDI0IEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNDE2IDI1NmEzMiAzMiAwIDEgMSAtNjQgMCAzMiAzMiAwIDEgMSA2NCAwem0tMTYwIDBhMzIgMzIgMCAxIDEgLTY0IDAgMzIgMzIgMCAxIDEgNjQgMHpNNjQgMjg4YTMyIDMyIDAgMSAxIDAtNjQgMzIgMzIgMCAxIDEgMCA2NHoiLz48L3N2Zz4=);\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 12px;\n &:hover {\n mask-image: none;\n }\n}\n\n.flexlayout__splitter_horz {\n background-color: var(--neutral-foreground-rest);\n mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDI0IEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNjQgMzg0YTMyIDMyIDAgMSAwIDAgNjQgMzIgMzIgMCAxIDAgMC02NHptMC0xNjBhMzIgMzIgMCAxIDAgMCA2NCAzMiAzMiAwIDEgMCAwLTY0ek05NiA5NkEzMiAzMiAwIDEgMCAzMiA5NmEzMiAzMiAwIDEgMCA2NCAweiIvPjwvc3ZnPg==);\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 4px;\n &:hover {\n mask-image: none;\n }\n}\n\n.flexlayout__layout {\n top: 8px;\n bottom: 8px;\n left: 8px;\n right: 8px;\n}"}`;const foe=()=>toe().register(eoe),poe={LightMode:1,DarkMode:.23},moe={baseLayerLuminance:rr,fillColor:kl,accentPalette:fl,neutralPalette:hl,errorColor:w5,successColor:$5,warningColor:A5,infoColor:P5,buyColor:R5,sellColor:F5,seriousNotifyColor:U5,designUnit:hr,baseHeightMultiplier:ar,density:dr,controlCornerRadius:lr,bodyFont:sr},goe="rapid-design-system-provider",voe=()=>{foe(),(()=>{if(document.querySelector(goe))return;const e=document.createElement(goe);e.setAttribute("with-defaults",""),e.style.display="block";const t=document.createDocumentFragment();for(;document.body.firstChild;)t.appendChild(document.body.firstChild);e.appendChild(t),document.body.appendChild(e)})()};if("undefined"!=typeof document){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",voe,{once:!0}):voe();const e=window;e.rapid=Object.assign(e.rapid||{},{provideDesignSystem:toe,baseComponents:eoe,registerRapidDesignSystem:foe,tokens:moe,StandardLuminance:poe,docsUrl:"https://cdn.jsdelivr.net/npm/@genesislcap/foundation-rapid-cdn/components.md",aiReference:"AI ASSISTANTS: When generating React code that uses Genesis Rapid Design System components, fetch https://cdn.jsdelivr.net/npm/@genesislcap/foundation-rapid-cdn/components.md for the component reference. In a normal app, import wrappers from @genesislcap/rapid-design-system/react (PascalCase: Button, TextField, …). In a Claude artifact, also load https://cdn.jsdelivr.net/npm/@genesislcap/foundation-rapid-cdn/dist/foundation-rapid-cdn.react.iife.min.js (after this main bundle and after React) — wrappers are exposed on window.rapid.react — destructure from there: const { Button, TextField } = window.rapid.react. Either way, do not emit raw <rapid-*> web component tags in JSX when wrappers are available."})}e.baseComponents=eoe,e.provideDesignSystem=toe,e.registerRapidDesignSystem=foe,Object.defineProperty(e,"__esModule",{value:!0})}({});
@@ -104,5 +104,5 @@ function vz(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var c
104
104
  </${c}>`}} `)} `}} `,f6=K` ${_b(e=>e.field,u6,K`<div>Select a field to set value</div>`)} `;let p6=class extends ze{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),q0(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,a6(U0(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&o6(U0(this))?parseInt(t.value):this.field&&s6(U0(this))?parseFloat(t.value):t.value,this.value=i;const c={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(G0.ValueUpdated,{detail:c,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(G0.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};Ou([de({attribute:"value-index"})],p6.prototype,"valueIndex",void 0),Ou([de({mode:"boolean"})],p6.prototype,"variadic",void 0),Ou([de({mode:"boolean",attribute:"validation-error"})],p6.prototype,"validationError",void 0),Ou([de({attribute:"validation-msg"})],p6.prototype,"validationMsg",void 0),Ou([b],p6.prototype,"field",void 0),Ou([b],p6.prototype,"operator",void 0),Ou([b],p6.prototype,"value",void 0),Ou([b],p6.prototype,"config",void 0),Ou([b],p6.prototype,"styles",void 0),p6=Ou([Ce({name:"expression-rule-value",template:f6,styles:n6,shadowOptions:{delegatesFocus:!0}})],p6);const m6=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:g6(e,t),g6=(e,t)=>{var i,c;switch(U0(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return P0(new Date);case"date-time":return V0(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const o="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(c=null==e?void 0:e.valueType)||void 0===c?void 0:c.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(o).length)throw new Error("Enums require configured values");return Object.keys(o)[0]}}},v6=(e,t)=>{var i,c,o,s;const a=(n=e,r=t,e=>{var t,i,c;if((null===(t=null==n?void 0:n.valueType)||void 0===t?void 0:t.type)!==(null===(c=null===(i=r.operator)||void 0===i?void 0:i.valueType)||void 0===c?void 0:c.type))return null;if(!("value"in r)||!r.value||!r.operator)return null;const o=1===r.operator.nbInputs?[r.value]:r.value;return e>=o.length?null:o[e]});var n,r;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:m6(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(c=a(0))&&void 0!==c?c:m6(e,t),null!==(o=a(1))&&void 0!==o?o:m6(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:m6(e,t)]}}},b6=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,c)=>c===i?t:e)}}},y6=e=>!e&&0!==e,z6=Me` .rule-container{border: 1px solid #eee;margin-bottom: 5px;padding: 5px;display: grid;grid-template-columns: auto 1fr}.rule-container.error{border-color: red}.margin{margin-left: calc(var(--design-unit) * 1px);margin-right: calc(var(--design-unit) * 1px)}.rule-header{margin-bottom: 5px;display: flex;justify-content: flex-end}.rule-actions{display: inline-block}.rule-content{display: flex;flex-wrap: wrap;align-items: center}.rule-field-container, .rule-operator-container, .rule-value-container{display: inline-block;margin: 0 5px 0 0;vertical-align: middle}.rule-value-container{border-left: var(--rule-value-separator);padding-left: 5px}.rule-value-container label{margin-bottom: 0;font-weight: normal}.rule-value-container label.block{display: block}expression-rule-value{display: flex}`,C6=K` ${e=>{var t,i;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return K`<div class="rule-container ${e=>ti(["error",e.error])}"><div class="rule-content"><expression-rule-field class="margin" :fields=${e=>e.config.fields}:field=${e=>{var t;return null===(t=e.model)||void 0===t?void 0:t.field}}:config=${e=>e.config}:styles=${e=>e.styles}@field-selected=${(e,t)=>e.handleFieldSelected(t.event)}></expression-rule-field><expression-rule-operator class="margin" :operators=${e=>e.config.operators}:field=${e=>e.model.field}:operator=${e=>{var t;return null===(t=e.model)||void 0===t?void 0:t.operator}}:config=${e=>e.config}:styles=${e=>e.styles}@operator-selected=${(e,t)=>e.handleOperatorSelected(t.event)}></expression-rule-operator>${We(e=>e.operandIterator,K`<expression-rule-value class="margin" :config=${(e,t)=>t.parent.config}:styles=${(e,t)=>t.parent.styles}:field=${(e,t)=>t.parent.model.field}:operator=${(e,t)=>t.parent.model.operator}:value=${(e,t)=>t.parent.operandValue(t.index)}value-index=${(e,t)=>t.index}?variadic=${(e,t)=>{var i,c;return"many"===(null===(c=null===(i=t.parent.model)||void 0===i?void 0:i.operator)||void 0===c?void 0:c.nbInputs)}}@value-updated=${(e,t)=>t.parent.handleValueChanged(t.event)}@remove-variadic-operand=${(e,t)=>t.parent.handleRemoveVarArg(t.event)}></expression-rule-value>`,{positioning:!0,recycle:!1})} ${Ve(e=>{var t,i;return"many"===(null===(i=null===(t=e.model)||void 0===t?void 0:t.operator)||void 0===i?void 0:i.nbInputs)},K`<${c}type="button" class="btn btn-sm btn-accept" @click="${e=>e.dispatchAddVarArg()}">
105
105
  +
106
106
  </${c}>`)}</div><div class="rule-header"><div class="btn-group rule-actions"><${c}type="button" class="btn btn-sm btn-danger" data-delete="rule" @click="${(e,t)=>e.dispatchDeleteRule(t.event)}">
107
- Delete Rule </${c}></div></div></div>`}} `;let L6=class extends ze{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),q0(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==U0(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(y6)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,m6(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(G0.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,c=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,o={ruleId:this.model.ruleId,newData:{field:c,value:null,operator:null}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,c={ruleId:this.model.ruleId,newData:b6(this.model,t,i)};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:c,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const c=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!c)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:v6(c,this.model)},bubbles:!0,composed:!0}))}};Ou([b],L6.prototype,"config",void 0),Ou([b],L6.prototype,"styles",void 0),Ou([b],L6.prototype,"model",void 0),Ou([b],L6.prototype,"index",void 0),Ou([de({mode:"boolean"})],L6.prototype,"error",void 0),Ou([y],L6.prototype,"operandIterator",null),L6=Ou([Ce({name:"expression-rule",template:C6,styles:z6,shadowOptions:{delegatesFocus:!0}})],L6);let x6=class extends ze{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=H0(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=_0(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(G0.AddGroup,this.handleAddGroup),this.addEventListener(G0.DelGroup,this.handleDeleteGroup),this.addEventListener(G0.AddRule,this.handleAddRule),this.addEventListener(G0.DelRule,this.handleDeleteRule),this.addEventListener(G0.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(G0.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(G0.AddGroup,this.handleAddGroup),this.removeEventListener(G0.DelGroup,this.handleDeleteGroup),this.removeEventListener(G0.AddRule,this.handleAddRule),this.removeEventListener(G0.DelRule,this.handleDeleteRule),this.removeEventListener(G0.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(G0.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,c;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(c=e.fields)||void 0===c?void 0:c.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:F0,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,c={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=D0(this.model,t,c)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=D0(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,c;this.model=O0(i=this.model,R0(i,c=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==c))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,c;this.model=O0(i=this.model,I0(i,c=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==c))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===F0?Object.assign(Object.assign({},e),i):O0(e,R0(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return O0(e,I0(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};Ou([b],x6.prototype,"config",void 0),Ou([b],x6.prototype,"styles",void 0),Ou([b],x6.prototype,"model",void 0),x6=Ou([Ce({name:"expression-builder",template:J0,styles:W0})],x6);let M6=class extends x6{};M6=Ou([Ce({name:"foundation-expression-builder",styles:W0,template:J0})],M6);const w6=["int","short","long"],S6=["double","bigdecimal"],k6=[...w6,...S6],E6=["date","date-time"],$6=["string","enum"],N6=["boolean"],A6=e=>{var t,i,c;return null!==(c=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==c?c:e.field.type};function O6(e){switch(A6(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function T6(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function R6(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function I6(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function D6(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=A6(e);if($6.includes(i))return t;if(k6.includes(i))return t.toString();if(N6.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(E6.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function F6(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?F6(e,t):t(e)).filter(Boolean)}}function H6(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=A6(e);if($6.includes(i))return t;if(w6.includes(i))return parseInt(t);if(S6.includes(i))return parseFloat(t);if(N6.includes(i))return t;if(E6.includes(i)){const e=new Date(parseInt(t));return"date"===i?P0(e):V0(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const _6={template:J0,styles:W0};var P6;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(P6||(P6={}));const V6=[{type:P6.logicalOperations.AND,maxRules:"many"},{type:P6.logicalOperations.OR,maxRules:"many"}],B6={EQUALS:P6.operations.EQUALS,NOT_EQUALS:P6.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:P6.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:P6.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:P6.operations.LESS_THAN,LESS_THAN_OR_EQUAL:P6.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:P6.operations.IS_CURRENT,IS_PREVIOUS:P6.operations.IS_PREVIOUS},U6=e=>({type:"enum",input:"select",values:e}),j6=U6({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),q6=U6({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),G6=[{type:B6.EQUALS,label:"Equals",nbInputs:1,applyTo:[...$6,...N6,...k6,...E6],tooltip:"Check the equality of the field compared to a set value"},{type:B6.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...$6,...N6,...k6,...E6],tooltip:"Check that the field is different from a set value"},{type:B6.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...N6,...k6,...E6],tooltip:"Check if the field value is null"},{type:B6.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...N6,...k6,...E6],tooltip:"Check if the field value is not null"},{type:B6.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:B6.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:B6.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:B6.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:B6.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is greater than a specified number"},{type:B6.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:B6.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is less than a specified number"},{type:B6.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is less than or equal to a specified number"},{type:B6.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is before a specified date/time"},{type:B6.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is after a specified date/time"},{type:B6.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is on or before a specified date/time"},{type:B6.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is on or after a specified date/time"},{type:B6.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...E6],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:q6,optgroup:"Relative Period"},{type:B6.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...E6],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:j6,optgroup:"Relative Period"}];function W6(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const c=D6(e),o=O6(c),s=function(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}(c.operator.type);switch(s){case B6.EQUALS:case B6.NOT_EQUALS:case B6.GREATER_THAN:case B6.GREATER_THAN_OR_EQUAL:case B6.LESS_THAN:case B6.LESS_THAN_OR_EQUAL:return T6(c,s,o);case B6.IS_NULL:return R6(c,P6.operations.EQUALS,{TYPE:"NULL"});case B6.NOT_NULL:return R6(c,P6.operations.NOT_EQUALS,{TYPE:"NULL"});case B6.IS_NULL_OR_BLANK:case B6.NOT_NULL_OR_BLANK:case B6.CONTAINS:case B6.CONTAINS_WORDS_STARTING_WITH:case B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case B6.IS_CURRENT:case B6.IS_PREVIOUS:return function(e,t){switch(t){case B6.IS_NULL_OR_BLANK:return I6(e,P6.methodCall.IS_NULL_OR_BLANK,[]);case B6.NOT_NULL_OR_BLANK:return I6(e,P6.methodCall.NOT_NULL_OR_BLANK,[]);case B6.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return I6(e,P6.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case B6.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return I6(e,P6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return I6(e,P6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case B6.IS_CURRENT:case B6.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return I6(e,P6.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===B6.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}(c,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Y6(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return H6(function(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?B6[B6.IS_NULL]:B6[B6.NOT_NULL];return G6.find(t=>t.type===e)}const i=function(e,t){if("date"!==t.field.type&&"date-time"!==t.field.type)return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}(t.OPERATION,e);return G6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function K6(e,t){return{combinator:V6.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return K6(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Y6(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,c]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[B6[B6.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[B6[B6.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[B6[B6.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[B6[B6.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[B6[B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===P6.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[B6["CURRENT"===t.PARAMETERS[2].VALUE?B6.IS_CURRENT:B6.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:G6.find(e=>e.type===i),value:c}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Z6=class extends x6{ruleConfigChanged(e,t){this.config=Object.assign({combinators:V6,operators:G6,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:K6(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=F6(e,W6);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Ou([b],Z6.prototype,"ruleConfig",void 0),Z6=Ou([Ce({name:"foundation-rule-expression-builder",styles:W0,template:J0})],Z6);const Q6={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},X6=[{type:Q6.PLUS,label:"Add (+)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Q6.MINUS,label:"Subtract (-)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Q6.MULTIPLY,label:"Multiply (*)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Q6.DIVIDE,label:"Divide (/)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Q6.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Q6.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function J6(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const c=D6(e),o=O6(c),s=c.operator.type;switch(s){case Q6.TRIM:case Q6.CONVERT_TO_DATE:case Q6.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Q6.TRIM:return I6(e,P6.methodCall.TRIM,[]);case Q6.CONVERT_TO_DATE:return I6(e,P6.methodCall.LONG_TO_DATE,[]);case Q6.CONVERT_TO_DATE_TIME:return I6(e,P6.methodCall.LONG_TO_DATE_TIME,[])}}(c,s);case Q6.PLUS:case Q6.MINUS:case Q6.DIVIDE:case Q6.MULTIPLY:return T6(c,s,o);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function e8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return H6(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return X6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function t8(e,t){return{combinator:k0,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return t8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return e8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,c]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Q6[Q6.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Q6[Q6.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Q6[Q6.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:X6.find(e=>e.type===i),value:c}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let i8=class extends x6{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},c=t8(t.fields,i);this.config={combinators:[k0],operators:X6,fields:t.fields,model:c,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:J6(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Ou([b],i8.prototype,"valueConfig",void 0),i8=Ou([Ce({name:"foundation-value-expression-builder",styles:W0,template:J0})],i8);const c8=K`<template ${Fe("notificationListener")}><slot></slot></template>`;class o8 extends Wt{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(AL.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),NL(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>Ru(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return Ru(this,void 0,void 0,function*(){this.resourceName&&(yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return Ru(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Hz(e))}):xC.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:c}=e,o=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const n={title:t,body:i,createdAt:o,toast:{details:e,type:null==c?void 0:c.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};wL(n,this.tagName)}}Ou([b],o8.prototype,"notificationListener",void 0),Ou([mz],o8.prototype,"connect",void 0),Ou([de({attribute:"resource-name"})],o8.prototype,"resourceName",void 0),Ou([de({attribute:"close-timeout",converter:re})],o8.prototype,"closeTimeout",void 0),Ou([b],o8.prototype,"toastButtons",void 0),Ou([de({attribute:"toast-position"})],o8.prototype,"toastPosition",void 0),Ou([Kz],o8.prototype,"datasource",void 0),o8.compose({baseName:"notification-listener",template:c8,shadowOptions:{mode:"open",delegatesFocus:!0}});const s8=af("foundation-router"),a8="$router",n8=Object.freeze({getOrCreateFor:e=>{const t=e[a8];return void 0!==t?t:e[a8]=new r8(e)},find:e=>zy.find(e),from:e=>zy.from(e)});class r8 extends Cy{}const l8=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function d8(e){return l8.test(e)}function h8(e){return e.config instanceof By?e:n8.find(e)}const u8=Object.freeze({path:Object.freeze({get current(){return jb.path.current},generateRoute:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){let c=h8(e);for(;null!==c;){const e=yield c.config.generateRouteFromPath(t,i);if(null!==e)return e;c=c.parent}return null}),push:(e,t=!0)=>{e&&d8(e)?location.href=e:(history.pushState({},document.title,e),t&&u8.path.trigger(e))},replace:(e,t=!0)=>{e&&d8(e)?location.href=e:(history.replaceState({},document.title,e),t&&u8.path.trigger(e))},trigger:e=>{jb.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){let c=h8(e);for(;null!==c;){const e=yield c.config.generateRouteFromName(t,i);if(null!==e)return e;c=c.parent}return null}),push:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={},c=!0){const o=yield u8.name.generateRoute(e,t,i);null!==o&&u8.path.push(o,c)}),replace:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={},c=!0){const o=yield u8.name.generateRoute(e,t,i);null!==o&&u8.path.replace(o,c)}),trigger:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){const c=yield u8.name.generateRoute(e,t,i);null!==c&&u8.path.trigger(c)})})}),f8=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId;class p8 extends gy{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,c=t.basename;i&&(""!==c&&"/"!==c)&&(s8.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(c))return s8.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${c}${t}${e.path}`;return s8.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}Ou([b],p8.prototype,"definitions",void 0);class m8 extends By{constructor(){super(),this.logger=s8,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new p8(this),this.basename=_f,this.routes=new p8(this)}getNavItems(e=f8){return function(e,t=f8,i=10){const c=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,o)=>{e.navItems.filter(t).map((t,c)=>{var s,a,n,r;const l=null!==(s=t.placementIndex)&&void 0!==s?s:o*i+c;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:l,routePath:null!==(n=t.routePath)&&void 0!==n?n:e.path,routeName:null!==(r=t.routeName)&&void 0!==r?r:e.name})}).forEach(e=>c.push(e))}),c.sort((e,t)=>e.placementIndex-t.placementIndex)}(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>Ru(this,void 0,void 0,function*(){this.analytics.trackEvent(lf.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>Ru(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,c;if(this.user.isAuthenticated){const o=null!==(c=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==c?c:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${o}.`),u8.name.replace(e.router,o)}else this.user.trackPath(),u8.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),u8.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return Ru(this,void 0,void 0,function*(){const c=yield i.generateRouteFromName.call(this,e,t);return c?this.generateNavigationPath(c):null})}navigateTo(e){return Ru(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield u8.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&u8.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),c=Qb.build(t);let o=i&&!e.startsWith(i)?function(e,t="/",i=!1){const c=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&c.endsWith(t)?c.slice(0,-1):c}([i,e]):e;return o=c?`${o}?${c}`:o,o}getNavigationPathBasename(){var e,t;const i=this.parent,c=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return c?c.replace(`/*${uy}`,""):this.basename?this.basename:""}construct(e){return this.container.get(e)}}Ou([gt],m8.prototype,"container",void 0),Ou([hf],m8.prototype,"analytics",void 0),Ou([tb],m8.prototype,"user",void 0),Ou([xb],m8.prototype,"_session",void 0);const g8="navigate-to",v8="generate-navigation-path";let b8=class extends(n8.from(ze)){constructor(){super(...arguments),this.logger=s8,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:c}=e.detail;if(!c)return;c(this.config.generateNavigationPath(t,i))}}get router(){return this[a8]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),p.queueUpdate(()=>Ru(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(g8,this.onNavigateTo),this.addEventListener(v8,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(g8,this.onNavigateTo),this.removeEventListener(v8,this.onGenerateNavigationPath)}};b8=Ou([Ce({name:"foundation-router"})],b8);const y8=e=>K`<${e}-card class=${e=>ti("stepper-tab",["stepper-tab-hidden",e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>ti("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${Qe("tabs")}></slot></div>${Ve(e=>e.orientation===pa,K`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring><label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${Ve(e=>!e.indicatorOnly,K`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${Qe("tabpanels")}></slot></div>${Ve(e=>!e.hideAllButtons,K`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${Ve(e=>e.isLastStep&&!e.hideSubmitButton,K`<${e}-button @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
107
+ Delete Rule </${c}></div></div></div>`}} `;let L6=class extends ze{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),q0(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==U0(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(y6)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,m6(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(G0.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,c=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,o={ruleId:this.model.ruleId,newData:{field:c,value:null,operator:null}};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,c={ruleId:this.model.ruleId,newData:b6(this.model,t,i)};this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:c,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const c=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!c)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(G0.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:v6(c,this.model)},bubbles:!0,composed:!0}))}};Ou([b],L6.prototype,"config",void 0),Ou([b],L6.prototype,"styles",void 0),Ou([b],L6.prototype,"model",void 0),Ou([b],L6.prototype,"index",void 0),Ou([de({mode:"boolean"})],L6.prototype,"error",void 0),Ou([y],L6.prototype,"operandIterator",null),L6=Ou([Ce({name:"expression-rule",template:C6,styles:z6,shadowOptions:{delegatesFocus:!0}})],L6);let x6=class extends ze{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=H0(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=_0(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(G0.AddGroup,this.handleAddGroup),this.addEventListener(G0.DelGroup,this.handleDeleteGroup),this.addEventListener(G0.AddRule,this.handleAddRule),this.addEventListener(G0.DelRule,this.handleDeleteRule),this.addEventListener(G0.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(G0.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(G0.AddGroup,this.handleAddGroup),this.removeEventListener(G0.DelGroup,this.handleDeleteGroup),this.removeEventListener(G0.AddRule,this.handleAddRule),this.removeEventListener(G0.DelRule,this.handleDeleteRule),this.removeEventListener(G0.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(G0.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,c;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(c=e.fields)||void 0===c?void 0:c.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:F0,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,c={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=D0(this.model,t,c)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=D0(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,c;this.model=O0(i=this.model,R0(i,c=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==c))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,c;this.model=O0(i=this.model,I0(i,c=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==c))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===F0?Object.assign(Object.assign({},e),i):O0(e,R0(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return O0(e,I0(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};Ou([b],x6.prototype,"config",void 0),Ou([b],x6.prototype,"styles",void 0),Ou([b],x6.prototype,"model",void 0),x6=Ou([Ce({name:"expression-builder",template:J0,styles:W0})],x6);let M6=class extends x6{};M6=Ou([Ce({name:"foundation-expression-builder",styles:W0,template:J0})],M6);const w6=["int","short","long"],S6=["double","bigdecimal"],k6=[...w6,...S6],E6=["date","date-time"],$6=["string","enum"],N6=["boolean"],A6=e=>{var t,i,c;return null!==(c=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==c?c:e.field.type};function O6(e){switch(A6(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function T6(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function R6(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function I6(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function D6(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=A6(e);if($6.includes(i))return t;if(k6.includes(i))return t.toString();if(N6.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(E6.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function F6(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?F6(e,t):t(e)).filter(Boolean)}}function H6(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=A6(e);if($6.includes(i))return t;if(w6.includes(i))return parseInt(t);if(S6.includes(i))return parseFloat(t);if(N6.includes(i))return t;if(E6.includes(i)){const e=new Date(parseInt(t));return"date"===i?P0(e):V0(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const _6={template:J0,styles:W0};var P6;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(P6||(P6={}));const V6=[{type:P6.logicalOperations.AND,maxRules:"many"},{type:P6.logicalOperations.OR,maxRules:"many"}],B6={EQUALS:P6.operations.EQUALS,NOT_EQUALS:P6.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:P6.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:P6.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:P6.operations.LESS_THAN,LESS_THAN_OR_EQUAL:P6.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:P6.operations.IS_CURRENT,IS_PREVIOUS:P6.operations.IS_PREVIOUS},U6=e=>({type:"enum",input:"select",values:e}),j6=U6({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),q6=U6({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),G6=[{type:B6.EQUALS,label:"Equals",nbInputs:1,applyTo:[...$6,...N6,...k6,...E6],tooltip:"Check the equality of the field compared to a set value"},{type:B6.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...$6,...N6,...k6,...E6],tooltip:"Check that the field is different from a set value"},{type:B6.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...N6,...k6,...E6],tooltip:"Check if the field value is null"},{type:B6.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...N6,...k6,...E6],tooltip:"Check if the field value is not null"},{type:B6.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:B6.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:B6.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:B6.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:B6.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is greater than a specified number"},{type:B6.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:B6.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is less than a specified number"},{type:B6.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...k6],tooltip:"Check if the field value is less than or equal to a specified number"},{type:B6.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is before a specified date/time"},{type:B6.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is after a specified date/time"},{type:B6.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is on or before a specified date/time"},{type:B6.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...E6],tooltip:"Check if the field is on or after a specified date/time"},{type:B6.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...E6],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:q6,optgroup:"Relative Period"},{type:B6.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...E6],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:j6,optgroup:"Relative Period"}];function W6(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const c=D6(e),o=O6(c),s=function(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}(c.operator.type);switch(s){case B6.EQUALS:case B6.NOT_EQUALS:case B6.GREATER_THAN:case B6.GREATER_THAN_OR_EQUAL:case B6.LESS_THAN:case B6.LESS_THAN_OR_EQUAL:return T6(c,s,o);case B6.IS_NULL:return R6(c,P6.operations.EQUALS,{TYPE:"NULL"});case B6.NOT_NULL:return R6(c,P6.operations.NOT_EQUALS,{TYPE:"NULL"});case B6.IS_NULL_OR_BLANK:case B6.NOT_NULL_OR_BLANK:case B6.CONTAINS:case B6.CONTAINS_WORDS_STARTING_WITH:case B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case B6.IS_CURRENT:case B6.IS_PREVIOUS:return function(e,t){switch(t){case B6.IS_NULL_OR_BLANK:return I6(e,P6.methodCall.IS_NULL_OR_BLANK,[]);case B6.NOT_NULL_OR_BLANK:return I6(e,P6.methodCall.NOT_NULL_OR_BLANK,[]);case B6.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return I6(e,P6.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case B6.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return I6(e,P6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return I6(e,P6.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case B6.IS_CURRENT:case B6.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return I6(e,P6.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===B6.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}(c,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Y6(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return H6(function(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?B6[B6.IS_NULL]:B6[B6.NOT_NULL];return G6.find(t=>t.type===e)}const i=function(e,t){if("date"!==t.field.type&&"date-time"!==t.field.type)return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}(t.OPERATION,e);return G6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function K6(e,t){return{combinator:V6.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return K6(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Y6(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,c]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[B6[B6.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[B6[B6.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[B6[B6.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[B6[B6.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[B6[B6.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===P6.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[B6["CURRENT"===t.PARAMETERS[2].VALUE?B6.IS_CURRENT:B6.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:G6.find(e=>e.type===i),value:c}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Z6=class extends x6{ruleConfigChanged(e,t){this.config=Object.assign({combinators:V6,operators:G6,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:K6(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=F6(e,W6);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Ou([b],Z6.prototype,"ruleConfig",void 0),Z6=Ou([Ce({name:"foundation-rule-expression-builder",styles:W0,template:J0})],Z6);const Q6={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},X6=[{type:Q6.PLUS,label:"Add (+)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Q6.MINUS,label:"Subtract (-)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Q6.MULTIPLY,label:"Multiply (*)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Q6.DIVIDE,label:"Divide (/)",applyTo:[...k6],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Q6.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Q6.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function J6(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const c=D6(e),o=O6(c),s=c.operator.type;switch(s){case Q6.TRIM:case Q6.CONVERT_TO_DATE:case Q6.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Q6.TRIM:return I6(e,P6.methodCall.TRIM,[]);case Q6.CONVERT_TO_DATE:return I6(e,P6.methodCall.LONG_TO_DATE,[]);case Q6.CONVERT_TO_DATE_TIME:return I6(e,P6.methodCall.LONG_TO_DATE_TIME,[])}}(c,s);case Q6.PLUS:case Q6.MINUS:case Q6.DIVIDE:case Q6.MULTIPLY:return T6(c,s,o);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function e8(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return H6(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return X6.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function t8(e,t){return{combinator:k0,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return t8(e,t);if("BINARY_EXPRESSION"===t.TYPE)return e8(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,c]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Q6[Q6.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Q6[Q6.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Q6[Q6.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:X6.find(e=>e.type===i),value:c}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let i8=class extends x6{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},c=t8(t.fields,i);this.config={combinators:[k0],operators:X6,fields:t.fields,model:c,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:J6(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};Ou([b],i8.prototype,"valueConfig",void 0),i8=Ou([Ce({name:"foundation-value-expression-builder",styles:W0,template:J0})],i8);const c8=K`<template ${Fe("notificationListener")}><slot></slot></template>`;class o8 extends Wt{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(AL.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),NL(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>Ru(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return Ru(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return Ru(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Hz(e))}):xC.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:c}=e,o=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const n={title:t,body:i,createdAt:o,toast:{details:e,type:null==c?void 0:c.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};wL(n,this.tagName)}}Ou([b],o8.prototype,"notificationListener",void 0),Ou([mz],o8.prototype,"connect",void 0),Ou([de({attribute:"resource-name"})],o8.prototype,"resourceName",void 0),Ou([de({attribute:"close-timeout",converter:re})],o8.prototype,"closeTimeout",void 0),Ou([b],o8.prototype,"toastButtons",void 0),Ou([de({attribute:"toast-position"})],o8.prototype,"toastPosition",void 0),Ou([Kz],o8.prototype,"datasource",void 0),o8.compose({baseName:"notification-listener",template:c8,shadowOptions:{mode:"open",delegatesFocus:!0}});const s8=af("foundation-router"),a8="$router",n8=Object.freeze({getOrCreateFor:e=>{const t=e[a8];return void 0!==t?t:e[a8]=new r8(e)},find:e=>zy.find(e),from:e=>zy.from(e)});class r8 extends Cy{}const l8=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function d8(e){return l8.test(e)}function h8(e){return e.config instanceof By?e:n8.find(e)}const u8=Object.freeze({path:Object.freeze({get current(){return jb.path.current},generateRoute:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){let c=h8(e);for(;null!==c;){const e=yield c.config.generateRouteFromPath(t,i);if(null!==e)return e;c=c.parent}return null}),push:(e,t=!0)=>{e&&d8(e)?location.href=e:(history.pushState({},document.title,e),t&&u8.path.trigger(e))},replace:(e,t=!0)=>{e&&d8(e)?location.href=e:(history.replaceState({},document.title,e),t&&u8.path.trigger(e))},trigger:e=>{jb.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){let c=h8(e);for(;null!==c;){const e=yield c.config.generateRouteFromName(t,i);if(null!==e)return e;c=c.parent}return null}),push:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={},c=!0){const o=yield u8.name.generateRoute(e,t,i);null!==o&&u8.path.push(o,c)}),replace:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={},c=!0){const o=yield u8.name.generateRoute(e,t,i);null!==o&&u8.path.replace(o,c)}),trigger:(e,t,...i)=>Ru(void 0,[e,t,...i],void 0,function*(e,t,i={}){const c=yield u8.name.generateRoute(e,t,i);null!==c&&u8.path.trigger(c)})})}),f8=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId;class p8 extends gy{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,c=t.basename;i&&(""!==c&&"/"!==c)&&(s8.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(c))return s8.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${c}${t}${e.path}`;return s8.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}Ou([b],p8.prototype,"definitions",void 0);class m8 extends By{constructor(){super(),this.logger=s8,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new p8(this),this.basename=_f,this.routes=new p8(this)}getNavItems(e=f8){return function(e,t=f8,i=10){const c=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,o)=>{e.navItems.filter(t).map((t,c)=>{var s,a,n,r;const l=null!==(s=t.placementIndex)&&void 0!==s?s:o*i+c;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:l,routePath:null!==(n=t.routePath)&&void 0!==n?n:e.path,routeName:null!==(r=t.routeName)&&void 0!==r?r:e.name})}).forEach(e=>c.push(e))}),c.sort((e,t)=>e.placementIndex-t.placementIndex)}(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>Ru(this,void 0,void 0,function*(){this.analytics.trackEvent(lf.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>Ru(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,c;if(this.user.isAuthenticated){const o=null!==(c=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==c?c:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${o}.`),u8.name.replace(e.router,o)}else this.user.trackPath(),u8.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),u8.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return Ru(this,void 0,void 0,function*(){const c=yield i.generateRouteFromName.call(this,e,t);return c?this.generateNavigationPath(c):null})}navigateTo(e){return Ru(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield u8.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&u8.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),c=Qb.build(t);let o=i&&!e.startsWith(i)?function(e,t="/",i=!1){const c=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&c.endsWith(t)?c.slice(0,-1):c}([i,e]):e;return o=c?`${o}?${c}`:o,o}getNavigationPathBasename(){var e,t;const i=this.parent,c=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return c?c.replace(`/*${uy}`,""):this.basename?this.basename:""}construct(e){return this.container.get(e)}}Ou([gt],m8.prototype,"container",void 0),Ou([hf],m8.prototype,"analytics",void 0),Ou([tb],m8.prototype,"user",void 0),Ou([xb],m8.prototype,"_session",void 0);const g8="navigate-to",v8="generate-navigation-path";let b8=class extends(n8.from(ze)){constructor(){super(...arguments),this.logger=s8,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:c}=e.detail;if(!c)return;c(this.config.generateNavigationPath(t,i))}}get router(){return this[a8]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),p.queueUpdate(()=>Ru(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(g8,this.onNavigateTo),this.addEventListener(v8,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(g8,this.onNavigateTo),this.removeEventListener(v8,this.onGenerateNavigationPath)}};b8=Ou([Ce({name:"foundation-router"})],b8);const y8=e=>K`<${e}-card class=${e=>ti("stepper-tab",["stepper-tab-hidden",e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>ti("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${Qe("tabs")}></slot></div>${Ve(e=>e.orientation===pa,K`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring><label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${Ve(e=>!e.indicatorOnly,K`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${Qe("tabpanels")}></slot></div>${Ve(e=>!e.hideAllButtons,K`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${Ve(e=>e.isLastStep&&!e.hideSubmitButton,K`<${e}-button @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
108
108
  Submit </${e}-button>`)} ${Ve(e=>!e.isLastStep,K`<${e}-button @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,z8=K` ${e=>y8(kC(e))} `,C8=Me` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;class L8 extends Wt{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=pa,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,c=t+1===this.tabIds.length,o=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(c)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=o)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],c=this.tabpanelIds[t];e.setAttribute("id",c),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return xC.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(xC.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${Si()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${Si()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}Ou([de({attribute:"hide-submit-button",mode:"boolean"})],L8.prototype,"hideSubmitButton",void 0),Ou([de({attribute:"hide-step-number",mode:"boolean"})],L8.prototype,"hideStepNumber",void 0),Ou([de({attribute:"allow-backward-jumps",mode:"boolean"})],L8.prototype,"allowBackwardJumps",void 0),Ou([de({attribute:"allow-forward-jumps",mode:"boolean"})],L8.prototype,"allowForwardJumps",void 0),Ou([de({attribute:"hide-all-buttons",mode:"boolean"})],L8.prototype,"hideAllButtons",void 0),Ou([de({attribute:"hide-tabs",mode:"boolean"})],L8.prototype,"hideTabs",void 0),Ou([de({attribute:"indicator-only",mode:"boolean"})],L8.prototype,"indicatorOnly",void 0),Ou([de],L8.prototype,"orientation",void 0),Ou([de],L8.prototype,"activeid",void 0),Ou([b],L8.prototype,"tabs",void 0),Ou([b],L8.prototype,"tabpanels",void 0),Ou([b],L8.prototype,"validation",void 0),Ou([b],L8.prototype,"progressValue",void 0),Ou([b],L8.prototype,"activeTabIndex",void 0),Ou([y],L8.prototype,"disabledPreviousStep",null),Ou([y],L8.prototype,"isLastStep",null),Ou([y],L8.prototype,"islastStepValid",null);const x8=void 0,M8={};L8.compose(Object.assign({baseName:"stepper",template:z8,styles:C8,shadowOptions:x8},M8));(class extends Mu{}).compose(Object.assign({baseName:"accordion-item",template:(e,t)=>Lu(0,t),styles:(e,t)=>Me` ${xu()} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}svg:not(:root){height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:wu},Su));(class extends yu{}).compose(Object.assign({baseName:"accordion",template:(e,t)=>en(),styles:(e,t)=>Me` ${bu()} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:zu},Cu));(class extends UC{}).compose({baseName:"actions-menu",styles:(e,t)=>Me` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${ku()} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:BC});const w8=Me` ${ZC}`;(class extends TL{}).compose(Object.assign({baseName:"ai-criteria-search",template:(e,t)=>QC,styles:w8,shadowOptions:RL},IL));function S8(e,t){return new Za("appearance",e,t)}(class extends HL{}).compose({baseName:"ai-indicator",template:FL,styles:(e,t)=>Me` ${DL()} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});const k8=Me` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,E8=Me` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,$8=Me` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: 0;color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: var(--neutral-fill-hover)}:host([appearance='neutral']:active){background: var(--neutral-fill-active)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%}`,N8=Me` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,A8=Me` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,O8=Me` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,T8=Me` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,R8=Me` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,I8=Me` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,D8=Me` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,F8=Me` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,H8=(e,t)=>Me` ${yx()} ${Me` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`} `.withBehaviors(S8("primary",k8),S8("secondary",E8),S8("tertiary",T8),S8("neutral",$8),S8("danger",N8),S8("success",A8),S8("warning",O8),S8("primary-outline",R8),S8("secondary-outline",I8),S8("neutral-outline",D8),S8("link",F8));(class extends VL{}).compose(Object.assign({baseName:"anchor",template:(e,t)=>_L(0,t),styles:(e,t)=>Me` ${PL()} ${H8()} `.withBehaviors(...H8().behaviors),shadowOptions:BL},UL));(class extends GL{}).compose(Object.assign({baseName:"anchored-region",template:(e,t)=>jL(),styles:(e,t)=>Me` ${qL()}`,shadowOptions:WL},YL));(class extends XL{}).compose(Object.assign({baseName:"avatar",template:(e,t)=>KL(0,t),styles:(e,t)=>Me` ${QL(e)}`,shadowOptions:JL},ex));(class extends cx{}).compose(Object.assign({baseName:"badge",template:(e,t)=>tx(),styles:(e,t)=>Me` ${ix()} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${fr} * 1px) calc(${fr} * 2px);border: none}`,shadowOptions:ox},sx));const _8=Me` ${ax} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,P8=rx;(class extends lx{}).compose({baseName:"banner",shadowOptions:P8,styles:_8,template:nx});(class extends mx{}).compose(Object.assign({baseName:"breadcrumb-item",template:(e,t)=>fx(0,t),styles:(e,t)=>Me` ${px()} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:gx},vx));(class extends ux{}).compose(Object.assign({baseName:"breadcrumb",template:(e,t)=>dx(),styles:(e,t)=>Me` ${hx()}`,shadowOptions:void 0},{}));(class extends zx{}).compose(Object.assign({baseName:"button",template:(e,t)=>bx(0,t),styles:H8,shadowOptions:Cx},Lx));(class extends wx{}).compose(Object.assign({baseName:"calendar",template:(e,t)=>Mx(e,t),styles:()=>Me` ${xx()}`,shadowOptions:Sx},kx));(class extends Nx{}).compose(Object.assign({baseName:"card",template:(e,t)=>Ex(),styles:(e,t)=>Me` ${$x()} :host{background: var(--neutral-layer-card-container);color: ${kd};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:Ax},Ox));const V8=Me` ${Wx} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,B8=K` ${Yx("rapid")} `;const U8=Qx,j8=Zx;(class extends Xx{}).compose(Object.assign({baseName:"categorized-multiselect",template:B8,styles:V8,shadowOptions:j8},U8));(class extends tM{}).compose(Object.assign({baseName:"checkbox",template:(e,t)=>Jx(0,t),styles:(e,t)=>Me` ${eM()} :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:iM},cM));(class extends rM{}).compose(Object.assign({baseName:"combobox",template:(e,t)=>sM(0,t),styles:(e,t)=>Me` ${oM(e)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${fr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:lM},dM));(class extends fM{}).compose({baseName:"connection-indicator",template:uM,styles:(e,t)=>Me` ${hM()} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`});const q8=K` ${gM("rapid")} `;var G8;(class extends WM{}).compose(Object.assign({baseName:"date-picker",template:q8,styles:()=>Me` ${pM} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,shadowOptions:void 0},{})),function(e){e.primary="#11C9FC",e.neutral="#7C909B",e.error="#F9644D",e.success="#7ACC79",e.warning="#FFB660",e.tertiary="#7B2FBE",e.info="#11C9FC",e.buy="#7ACC79",e.sell="#F14376",e.chartPink="#fb8176",e.longGreen="#7acc79",e.shortPink="#f14376",e.warningYellow="#fcb35f",e.green="#44c14c",e.lightGreen="#69cd70",e.red="#ef4d28",e.lightRed="#ee6588",e.dodgerBlue="#33a9ff",e.lightDodgerBlue="#5cbaff",e.violet="#9b1e74",e.lightViolet="#b528af",e.white="#f9f9f9",e.silver="#c1c1c1",e.salomie="#ffdf94",e.lightSalomie="#ccb276",e.melon="#ffbbb2",e.lightMelon="#cc968e",e.portage="#8a99f5",e.lightPortage="#adb8f8",e.ice="#97f4eb",e.lightIce="#6befe2"}(G8||(G8={}));const{create:W8}=yo,Y8=_n(G8.error),K8=Un.create(Y8.r,Y8.g,Y8.b),Z8=W8("error-color").withDefault(K8),Q8=_n(G8.success),X8=Un.create(Q8.r,Q8.g,Q8.b),J8=W8("success-color").withDefault(X8),e5=_n(G8.warning),t5=Un.create(e5.r,e5.g,e5.b),i5=W8("warning-color").withDefault(t5),c5=_n(G8.buy),o5=Un.create(c5.r,c5.g,c5.b),s5=W8("buy-color").withDefault(o5),a5=_n(G8.sell),n5=Un.create(a5.r,a5.g,a5.b),r5=W8("sell-color").withDefault(n5),l5=_n(G8.info),d5=Un.create(l5.r,l5.g,l5.b),h5=W8("info-color").withDefault(d5),u5=_n(G8.error),f5=Un.create(u5.r,u5.g,u5.b),p5=W8("serious-notify-color").withDefault(f5),{create:m5}=yo,g5=e=>yo.create({name:e,cssCustomPropertyName:null}),v5=Un.create(1,1,1),b5=Un.create(0,0,0);function y5(e,t){const i=e,c=g5(`${i}-palette`).withDefault(e=>Kn.from(t.getValueFor(e))),o=g5(`${i}-fill-rest-delta`).withDefault(0),s=g5(`${i}-fill-hover-delta`).withDefault(4),a=g5(`${i}-fill-active-delta`).withDefault(-5),n=g5(`${i}-fill-focus-delta`).withDefault(0),r=g5(`${i}-foreground-rest-delta`).withDefault(0),l=g5(`${i}-foreground-hover-delta`).withDefault(6),d=g5(`${i}-foreground-active-delta`).withDefault(-4),h=g5(`${i}-foreground-focus-delta`).withDefault(0),u=g5(`${i}-fill-recipe`).withDefault({evaluate:(e,t)=>function(e,t,i,c,o,s,a,n,r){const l=e.source,d=t.closestIndexOf(i)>=Math.max(a,n,r)?-1:1,h=e.closestIndexOf(l),u=h+-1*d*c,f=u+d*o,p=u+d*s;return{rest:e.get(u),hover:e.get(h),active:e.get(f),focus:e.get(p)}}(c.getValueFor(e),fl.getValueFor(e),null!=t?t:El.getValueFor(e),s.getValueFor(e),a.getValueFor(e),n.getValueFor(e),jr.getValueFor(e),qr.getValueFor(e),Gr.getValueFor(e))}),f=m5(`${i}-fill-rest`).withDefault(e=>u.getValueFor(e).evaluate(e).rest),p=m5(`${i}-fill-hover`).withDefault(e=>u.getValueFor(e).evaluate(e).hover),m=m5(`${i}-fill-active`).withDefault(e=>u.getValueFor(e).evaluate(e).active),g=m5(`${i}-fill-focus`).withDefault(e=>u.getValueFor(e).evaluate(e).focus),v=e=>(t,i)=>function(e,t){return e.contrast(v5)>=t?v5:b5}(null!=i?i:f.getValueFor(t),e),b=g5(`foreground-on-${i}-recipe`).withDefault({evaluate:(e,t)=>v(4.5)(e,t)}),y=m5(`foreground-on-${i}-rest`).withDefault(e=>b.getValueFor(e).evaluate(e,f.getValueFor(e))),z=m5(`foreground-on-${i}-hover`).withDefault(e=>b.getValueFor(e).evaluate(e,p.getValueFor(e))),C=m5(`foreground-on-${i}-active`).withDefault(e=>b.getValueFor(e).evaluate(e,m.getValueFor(e))),L=m5(`foreground-on-${i}-focus`).withDefault(e=>b.getValueFor(e).evaluate(e,g.getValueFor(e))),x=g5(`foreground-on-${i}-large-recipe`).withDefault({evaluate:(e,t)=>v(7)(e,t)}),M=m5(`foreground-on-${i}-rest-large`).withDefault(e=>x.getValueFor(e).evaluate(e,f.getValueFor(e))),w=m5(`foreground-on-${i}-hover-large`).withDefault(e=>x.getValueFor(e).evaluate(e,p.getValueFor(e))),S=m5(`foreground-on-${i}-active-large`).withDefault(e=>x.getValueFor(e).evaluate(e,m.getValueFor(e))),k=m5(`foreground-on-${i}-focus-large`).withDefault(e=>x.getValueFor(e).evaluate(e,g.getValueFor(e))),E=g5(`${i}-foreground-recipe`).withDefault({evaluate:(e,t)=>function(e,t,i,c,o,s,a){const n=e.source,r=e.closestIndexOf(n),l=Wn(t)?-1:1,d=r+(1===l?Math.min(c,o):Math.max(l*c,l*o)),h=e.colorContrast(t,i,d,l),u=e.closestIndexOf(h),f=u+l*Math.abs(c-o),p=1===l?c<o:l*c>l*o,m=p?u:f,g=p?f:u;return{rest:e.get(m),hover:e.get(g),active:e.get(m+l*s),focus:e.get(m+l*a)}}(c.getValueFor(e),null!=t?t:El.getValueFor(e),4.5,r.getValueFor(e),l.getValueFor(e),d.getValueFor(e),h.getValueFor(e))}),$=m5(`${i}-foreground-rest`).withDefault(e=>E.getValueFor(e).evaluate(e).rest),N=m5(`${i}-foreground-hover`).withDefault(e=>E.getValueFor(e).evaluate(e).hover),A=m5(`${i}-foreground-active`).withDefault(e=>E.getValueFor(e).evaluate(e).active),O=m5(`${i}-foreground-focus`).withDefault(e=>E.getValueFor(e).evaluate(e).focus);return{palette:c,fillRestDelta:o,fillHoverDelta:s,fillActiveDelta:a,fillFocusDelta:n,foregroundRestDelta:r,foregroundHoverDelta:l,foregroundActiveDelta:d,foregroundFocusDelta:h,fillRecipe:u,fillRest:f,fillHover:p,fillActive:m,fillFocus:g,foregroundOnRecipe:b,foregroundOnRest:y,foregroundOnHover:z,foregroundOnActive:C,foregroundOnFocus:L,foregroundOnLargeRecipe:x,foregroundOnRestLarge:M,foregroundOnHoverLarge:w,foregroundOnActiveLarge:S,foregroundOnFocusLarge:k,foregroundRecipe:E,foregroundRest:$,foregroundHover:N,foregroundActive:A,foregroundFocus:O}}const z5=_n(G8.green),C5=Un.create(z5.r,z5.g,z5.b),L5=yo.create("secondary-color").withDefault(C5),{palette:x5,fillRestDelta:M5,fillHoverDelta:w5,fillActiveDelta:S5,fillFocusDelta:k5,foregroundRestDelta:E5,foregroundHoverDelta:$5,foregroundActiveDelta:N5,foregroundFocusDelta:A5,fillRecipe:O5,fillRest:T5,fillHover:R5,fillActive:I5,fillFocus:D5,foregroundOnRecipe:F5,foregroundOnRest:H5,foregroundOnHover:_5,foregroundOnActive:P5,foregroundOnFocus:V5,foregroundOnLargeRecipe:B5,foregroundOnRestLarge:U5,foregroundOnHoverLarge:j5,foregroundOnActiveLarge:q5,foregroundOnFocusLarge:G5,foregroundRecipe:W5,foregroundRest:Y5,foregroundHover:K5,foregroundActive:Z5,foregroundFocus:Q5}=y5("secondary",L5),X5=_n(G8.tertiary),J5=Un.create(X5.r,X5.g,X5.b),e7=yo.create("tertiary-color").withDefault(J5),{palette:t7,fillRestDelta:i7,fillHoverDelta:c7,fillActiveDelta:o7,fillFocusDelta:s7,foregroundRestDelta:a7,foregroundHoverDelta:n7,foregroundActiveDelta:r7,foregroundFocusDelta:l7,fillRecipe:d7,fillRest:h7,fillHover:u7,fillActive:f7,fillFocus:p7,foregroundOnRecipe:m7,foregroundOnRest:g7,foregroundOnHover:v7,foregroundOnActive:b7,foregroundOnFocus:y7,foregroundOnLargeRecipe:z7,foregroundOnRestLarge:C7,foregroundOnHoverLarge:L7,foregroundOnActiveLarge:x7,foregroundOnFocusLarge:M7,foregroundRecipe:w7,foregroundRest:S7,foregroundHover:k7,foregroundActive:E7,foregroundFocus:$7}=y5("tertiary",e7),{palette:N7,fillRestDelta:A7,fillHoverDelta:O7,fillActiveDelta:T7,fillFocusDelta:R7,foregroundRestDelta:I7,foregroundHoverDelta:D7,foregroundActiveDelta:F7,foregroundFocusDelta:H7,fillRecipe:_7,fillRest:P7,fillHover:V7,fillActive:B7,fillFocus:U7,foregroundOnRecipe:j7,foregroundOnRest:q7,foregroundOnHover:G7,foregroundOnActive:W7,foregroundOnFocus:Y7,foregroundOnLargeRecipe:K7,foregroundOnRestLarge:Z7,foregroundOnHoverLarge:Q7,foregroundOnActiveLarge:X7,foregroundOnFocusLarge:J7,foregroundRecipe:e9,foregroundRest:t9,foregroundHover:i9,foregroundActive:c9,foregroundFocus:o9}=y5("error",Z8),{palette:s9,fillRestDelta:a9,fillHoverDelta:n9,fillActiveDelta:r9,fillFocusDelta:l9,foregroundRestDelta:d9,foregroundHoverDelta:h9,foregroundActiveDelta:u9,foregroundFocusDelta:f9,fillRecipe:p9,fillRest:m9,fillHover:g9,fillActive:v9,fillFocus:b9,foregroundOnRecipe:y9,foregroundOnRest:z9,foregroundOnHover:C9,foregroundOnActive:L9,foregroundOnFocus:x9,foregroundOnLargeRecipe:M9,foregroundOnRestLarge:w9,foregroundOnHoverLarge:S9,foregroundOnActiveLarge:k9,foregroundOnFocusLarge:E9,foregroundRecipe:$9,foregroundRest:N9,foregroundHover:A9,foregroundActive:O9,foregroundFocus:T9}=y5("success",J8),{palette:R9,fillRestDelta:I9,fillHoverDelta:D9,fillActiveDelta:F9,fillFocusDelta:H9,foregroundRestDelta:_9,foregroundHoverDelta:P9,foregroundActiveDelta:V9,foregroundFocusDelta:B9,fillRecipe:U9,fillRest:j9,fillHover:q9,fillActive:G9,fillFocus:W9,foregroundOnRecipe:Y9,foregroundOnRest:K9,foregroundOnHover:Z9,foregroundOnActive:Q9,foregroundOnFocus:X9,foregroundOnLargeRecipe:J9,foregroundOnRestLarge:eee,foregroundOnHoverLarge:tee,foregroundOnActiveLarge:iee,foregroundOnFocusLarge:cee,foregroundRecipe:oee,foregroundRest:see,foregroundHover:aee,foregroundActive:nee,foregroundFocus:ree}=y5("warning",i5);var lee=Object.freeze({__proto__:null,accentFillActive:Tl,accentFillActiveDelta:Hr,accentFillFocus:Rl,accentFillFocusDelta:_r,accentFillHover:Ol,accentFillHoverDelta:Fr,accentFillRest:Al,accentFillRestDelta:Dr,accentForegroundActive:Zl,accentForegroundActiveDelta:Br,accentForegroundFocus:Ql,accentForegroundFocusDelta:Ur,accentForegroundHover:Kl,accentForegroundHoverDelta:Vr,accentForegroundRest:Yl,accentForegroundRestDelta:Pr,accentPalette:ml,baseHeightMultiplier:rr,baseLayerLuminance:dr,bodyFont:nr,controlCornerRadius:hr,density:ur,designUnit:fr,direction:pr,disabledOpacity:mr,fillColor:El,focusStrokeInner:xd,focusStrokeOuter:Cd,focusStrokeWidth:vr,foregroundOnAccentActive:_l,foregroundOnAccentActiveLarge:jl,foregroundOnAccentFocus:Pl,foregroundOnAccentFocusLarge:ql,foregroundOnAccentHover:Hl,foregroundOnAccentHoverLarge:Ul,foregroundOnAccentRest:Fl,foregroundOnAccentRestLarge:Bl,neutralFillActive:td,neutralFillActiveDelta:Gr,neutralFillFocus:id,neutralFillFocusDelta:Wr,neutralFillHover:ed,neutralFillHoverDelta:qr,neutralFillInputActive:ad,neutralFillInputActiveDelta:Zr,neutralFillInputFocus:nd,neutralFillInputFocusDelta:Qr,neutralFillInputHover:sd,neutralFillInputHoverDelta:Kr,neutralFillInputRest:od,neutralFillInputRestDelta:Yr,neutralFillLayerRest:yd,neutralFillLayerRestDelta:al,neutralFillRest:Jl,neutralFillRestDelta:jr,neutralFillStealthActive:hd,neutralFillStealthActiveDelta:el,neutralFillStealthFocus:ud,neutralFillStealthFocusDelta:tl,neutralFillStealthHover:dd,neutralFillStealthHoverDelta:Jr,neutralFillStealthRest:ld,neutralFillStealthRestDelta:Xr,neutralFillStrongActive:gd,neutralFillStrongActiveDelta:ol,neutralFillStrongFocus:vd,neutralFillStrongFocusDelta:sl,neutralFillStrongHover:md,neutralFillStrongHoverDelta:cl,neutralFillStrongRest:pd,neutralFillStrongRestDelta:il,neutralForegroundHint:wd,neutralForegroundRest:kd,neutralLayer1:Cl,neutralLayer2:xl,neutralLayer3:wl,neutralLayer4:kl,neutralLayerCardContainer:vl,neutralLayerFloating:yl,neutralPalette:fl,neutralStrokeActive:Ad,neutralStrokeActiveDelta:ll,neutralStrokeDividerRest:Rd,neutralStrokeDividerRestDelta:hl,neutralStrokeFocus:Od,neutralStrokeFocusDelta:dl,neutralStrokeHover:Nd,neutralStrokeHoverDelta:rl,neutralStrokeRest:$d,neutralStrokeRestDelta:nl,strokeWidth:gr,typeRampBaseFontSize:br,typeRampBaseLineHeight:yr,typeRampMinus1FontSize:zr,typeRampMinus1LineHeight:Cr,typeRampMinus2FontSize:Lr,typeRampMinus2LineHeight:xr,typeRampPlus1FontSize:Mr,typeRampPlus1LineHeight:wr,typeRampPlus2FontSize:Sr,typeRampPlus2LineHeight:kr,typeRampPlus3FontSize:Er,typeRampPlus3LineHeight:$r,typeRampPlus4FontSize:Nr,typeRampPlus4LineHeight:Ar,typeRampPlus5FontSize:Or,typeRampPlus5LineHeight:Tr,typeRampPlus6FontSize:Rr,typeRampPlus6LineHeight:Ir,defaultErrorColor:K8,errorColor:Z8,defaultSuccessColor:X8,successColor:J8,defaultWarningColor:t5,warningColor:i5,defaultBuyColor:o5,buyColor:s5,defaultSellColor:n5,sellColor:r5,defaultInfoColor:d5,infoColor:h5,defaultSeriousNotifyColor:f5,seriousNotifyColor:p5,defaultSecondaryColor:C5,secondaryColor:L5,secondaryPalette:x5,secondaryFillRestDelta:M5,secondaryFillHoverDelta:w5,secondaryFillActiveDelta:S5,secondaryFillFocusDelta:k5,secondaryForegroundRestDelta:E5,secondaryForegroundHoverDelta:$5,secondaryForegroundActiveDelta:N5,secondaryForegroundFocusDelta:A5,secondaryFillRecipe:O5,secondaryFillRest:T5,secondaryFillHover:R5,secondaryFillActive:I5,secondaryFillFocus:D5,foregroundOnSecondaryRecipe:F5,foregroundOnSecondaryRest:H5,foregroundOnSecondaryHover:_5,foregroundOnSecondaryActive:P5,foregroundOnSecondaryFocus:V5,foregroundOnSecondaryLargeRecipe:B5,foregroundOnSecondaryRestLarge:U5,foregroundOnSecondaryHoverLarge:j5,foregroundOnSecondaryActiveLarge:q5,foregroundOnSecondaryFocusLarge:G5,secondaryForegroundRecipe:W5,secondaryForegroundRest:Y5,secondaryForegroundHover:K5,secondaryForegroundActive:Z5,secondaryForegroundFocus:Q5,defaultTertiaryColor:J5,tertiaryColor:e7,tertiaryPalette:t7,tertiaryFillRestDelta:i7,tertiaryFillHoverDelta:c7,tertiaryFillActiveDelta:o7,tertiaryFillFocusDelta:s7,tertiaryForegroundRestDelta:a7,tertiaryForegroundHoverDelta:n7,tertiaryForegroundActiveDelta:r7,tertiaryForegroundFocusDelta:l7,tertiaryFillRecipe:d7,tertiaryFillRest:h7,tertiaryFillHover:u7,tertiaryFillActive:f7,tertiaryFillFocus:p7,foregroundOnTertiaryRecipe:m7,foregroundOnTertiaryRest:g7,foregroundOnTertiaryHover:v7,foregroundOnTertiaryActive:b7,foregroundOnTertiaryFocus:y7,foregroundOnTertiaryLargeRecipe:z7,foregroundOnTertiaryRestLarge:C7,foregroundOnTertiaryHoverLarge:L7,foregroundOnTertiaryActiveLarge:x7,foregroundOnTertiaryFocusLarge:M7,tertiaryForegroundRecipe:w7,tertiaryForegroundRest:S7,tertiaryForegroundHover:k7,tertiaryForegroundActive:E7,tertiaryForegroundFocus:$7,errorPalette:N7,errorFillRestDelta:A7,errorFillHoverDelta:O7,errorFillActiveDelta:T7,errorFillFocusDelta:R7,errorForegroundRestDelta:I7,errorForegroundHoverDelta:D7,errorForegroundActiveDelta:F7,errorForegroundFocusDelta:H7,errorFillRecipe:_7,errorFillRest:P7,errorFillHover:V7,errorFillActive:B7,errorFillFocus:U7,foregroundOnErrorRecipe:j7,foregroundOnErrorRest:q7,foregroundOnErrorHover:G7,foregroundOnErrorActive:W7,foregroundOnErrorFocus:Y7,foregroundOnErrorLargeRecipe:K7,foregroundOnErrorRestLarge:Z7,foregroundOnErrorHoverLarge:Q7,foregroundOnErrorActiveLarge:X7,foregroundOnErrorFocusLarge:J7,errorForegroundRecipe:e9,errorForegroundRest:t9,errorForegroundHover:i9,errorForegroundActive:c9,errorForegroundFocus:o9,successPalette:s9,successFillRestDelta:a9,successFillHoverDelta:n9,successFillActiveDelta:r9,successFillFocusDelta:l9,successForegroundRestDelta:d9,successForegroundHoverDelta:h9,successForegroundActiveDelta:u9,successForegroundFocusDelta:f9,successFillRecipe:p9,successFillRest:m9,successFillHover:g9,successFillActive:v9,successFillFocus:b9,foregroundOnSuccessRecipe:y9,foregroundOnSuccessRest:z9,foregroundOnSuccessHover:C9,foregroundOnSuccessActive:L9,foregroundOnSuccessFocus:x9,foregroundOnSuccessLargeRecipe:M9,foregroundOnSuccessRestLarge:w9,foregroundOnSuccessHoverLarge:S9,foregroundOnSuccessActiveLarge:k9,foregroundOnSuccessFocusLarge:E9,successForegroundRecipe:$9,successForegroundRest:N9,successForegroundHover:A9,successForegroundActive:O9,successForegroundFocus:T9,warningPalette:R9,warningFillRestDelta:I9,warningFillHoverDelta:D9,warningFillActiveDelta:F9,warningFillFocusDelta:H9,warningForegroundRestDelta:_9,warningForegroundHoverDelta:P9,warningForegroundActiveDelta:V9,warningForegroundFocusDelta:B9,warningFillRecipe:U9,warningFillRest:j9,warningFillHover:q9,warningFillActive:G9,warningFillFocus:W9,foregroundOnWarningRecipe:Y9,foregroundOnWarningRest:K9,foregroundOnWarningHover:Z9,foregroundOnWarningActive:Q9,foregroundOnWarningFocus:X9,foregroundOnWarningLargeRecipe:J9,foregroundOnWarningRestLarge:eee,foregroundOnWarningHoverLarge:tee,foregroundOnWarningActiveLarge:iee,foregroundOnWarningFocusLarge:cee,warningForegroundRecipe:oee,warningForegroundRest:see,warningForegroundHover:aee,warningForegroundActive:nee,warningForegroundFocus:ree});const dee=XM(G8.primary),hee=XM(G8.neutral),uee=XM(G8.green),fee=XM(G8.tertiary),pee=XM(G8.error),mee=XM(G8.success),gee=XM(G8.warning),vee=cr,bee=Li.ltr,yee='"Segoe UI", Arial, Helvetica, sans-serif',zee="14px",Cee="20px",Lee={design_tokens:{color:{accent:{$value:dee.source.toColorString(),$type:"color"},neutral:{$value:hee.source.toColorString(),$type:"color"},secondary:{$value:uee.source.toColorString(),$type:"color"},tertiary:{$value:fee.source.toColorString(),$type:"color"},error:{$value:pee.source.toColorString(),$type:"color"},success:{$value:mee.source.toColorString(),$type:"color"},warning:{$value:gee.source.toColorString(),$type:"color"}},fontFamily:{bodyFont:{$value:yee,$type:"fontFamily"}},typography:{baseFontSize:{$value:zee,$type:"dimension"},baseLineHeight:{$value:Cee,$type:"dimension"}},mode:{luminance:{$value:vee,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};var xee=Object.freeze({__proto__:null,accentPaletteValue:dee,neutralPaletteValue:hee,secondaryPaletteValue:uee,tertiaryPaletteValue:fee,errorPaletteValue:pee,successPaletteValue:mee,warningPaletteValue:gee,baseLayerLuminanceValue:vee,accentFillRestDeltaValue:0,accentFillHoverDeltaValue:4,accentFillActiveDeltaValue:-5,accentFillFocusDeltaValue:0,accentForegroundRestDeltaValue:0,accentForegroundHoverDeltaValue:6,accentForegroundActiveDeltaValue:-4,accentForegroundFocusDeltaValue:0,neutralFillRestDeltaValue:7,neutralFillHoverDeltaValue:10,neutralFillActiveDeltaValue:5,neutralFillFocusDeltaValue:0,neutralFillInputRestDeltaValue:0,neutralFillInputHoverDeltaValue:5,neutralFillInputActiveDeltaValue:0,neutralFillInputFocusDeltaValue:10,neutralFillStealthRestDeltaValue:0,neutralFillStealthHoverDeltaValue:5,neutralFillStealthActiveDeltaValue:3,neutralFillStealthFocusDeltaValue:0,neutralFillStrongRestDeltaValue:0,neutralFillStrongHoverDeltaValue:8,neutralFillStrongActiveDeltaValue:-5,neutralFillStrongFocusDeltaValue:0,neutralFillLayerRestDeltaValue:3,neutralStrokeRestDeltaValue:25,neutralStrokeHoverDeltaValue:40,neutralStrokeActiveDeltaValue:16,neutralStrokeFocusDeltaValue:25,neutralStrokeDividerRestDeltaValue:8,designTokens:Lee,prefix:"rapid",directionValue:bee,disabledOpacityValue:.3,strokeWidthValue:1,focusStrokeWidthValue:2,baseHeightMultiplierValue:10,controlCornerRadiusValue:4,densityValue:0,designUnitValue:4,bodyFontValue:yee,typeRampBaseFontSizeValue:zee,typeRampBaseLineHeightValue:Cee,typeRampMinus1FontSizeValue:"13px",typeRampMinus1LineHeightValue:"19px",typeRampMinus2FontSizeValue:"12px",typeRampMinus2LineHeightValue:"18px",typeRampPlus1FontSizeValue:"15px",typeRampPlus1LineHeightValue:"21px",typeRampPlus2FontSizeValue:"16px",typeRampPlus2LineHeightValue:"22px",typeRampPlus3FontSizeValue:"17px",typeRampPlus3LineHeightValue:"23px",typeRampPlus4FontSizeValue:"18px",typeRampPlus4LineHeightValue:"24px",typeRampPlus5FontSizeValue:"19px",typeRampPlus5LineHeightValue:"25px",typeRampPlus6FontSizeValue:"20px",typeRampPlus6LineHeightValue:"26px"});(class extends Ch{constructor(){super(),KM(lee,xee,this)}}).compose({baseName:"design-system-provider",template:K`<slot></slot>`});const Mee=Me` ${YK} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${kd}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,wee=mZ,See=ZK,kee=pZ;(class extends vZ{}).compose(Object.assign({baseName:"dialog",shadowOptions:kee,styles:Mee,template:See},wee));(class extends zZ{}).compose(Object.assign({baseName:"disclosure",template:(e,t)=>bZ(),styles:(e,t)=>Me` ${yZ()} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:pZ},CZ));(class extends MZ{}).compose(Object.assign({baseName:"divider",template:(e,t)=>LZ(),styles:(e,t)=>Me` ${xZ()}`,shadowOptions:wZ},SZ));(class extends NZ{}).compose({baseName:"dropdown-menu",styles:(e,t)=>Me` ${kZ("rapid")} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:$Z});const Eee=Me` ${AZ}`;function $ee(e,...t){let i="";return e.forEach((e,c)=>{i+=e,c<t.length&&(i+=t[c])}),i}(class extends PZ{}).compose({baseName:"environment-indicator",styles:Eee,template:OZ});const Nee={number:"rapid-number-field",text:"rapid-text-field",date:"rapid-text-field",datetimeLocal:"rapid-text-field",checkbox:"rapid-checkbox",button:"rapid-button",select:"rapid-select",option:"rapid-option",optgroup:"rapid-optgroup",radio:{input:"rapid-radio",group:"rapid-radio-group"}},Aee=$ee` rapid-select, rapid-text-field, rapid-number-field{min-width: 180px}rapid-button.btn{padding: 0}rapid-button.btn-success{background-color: var(--accent-fill-active);border-color: var(--accent-fill-active)}rapid-button.btn-danger{background-color: var(--error-color);border-color: var(--error-border-color)}rapid-select::part(listbox){max-height: 15vh}`,Oee=$ee` border: unset;border: 1px solid var(--focus-stroke-outer);padding: calc(var(--design-unit) * 2.5px);border-radius: 10px;margin: calc(var(--design-unit) * 1px);`,Tee={value:$ee` ${Aee} rapid-number-field, rapid-text-field{margin-bottom: 0}rapid-number-field::part(label){display: none}p.validation-msg{color: var(--neutral-foreground-rest)}`,rule:$ee` ${Aee} div.rule-container{${Oee}}div.rule-container.error{border-color: var(--error-border-color)}`,operator:$ee` ${Aee} rapid-select{min-width: 350px}`,field:$ee` ${Aee} rapid-select{min-width: 350px}`,group:$ee` ${Aee} div.rules-group-container{${Oee}}p.group-combinator-link{padding-left: calc(var(--design-unit) * 2.5px);color: var(--neutral-foreground-rest)}`};let Ree=class extends M6{constructor(){super(...arguments),this.styles={customElements:Nee,customStyles:Tee}}};Ou([b],Ree.prototype,"styles",void 0),Ree=Ou([Ce({name:"rapid-expression-builder",styles:_6.styles,template:_6.template})],Ree);let Iee=class extends Z6{constructor(){super(...arguments),this.styles={customElements:Nee,customStyles:Tee}}};Ou([b],Iee.prototype,"styles",void 0),Iee=Ou([Ce({name:"rapid-rule-expression-builder",styles:_6.styles,template:_6.template})],Iee);let Dee=class extends i8{constructor(){super(...arguments),this.styles={customElements:Nee,customStyles:Tee}}};Ou([b],Dee.prototype,"styles",void 0),Dee=Ou([Ce({name:"rapid-value-expression-builder",styles:_6.styles,template:_6.template})],Dee);const Fee=Me` ${lQ} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,Hee=K` ${dQ("rapid")} `,_ee=bQ,Pee=vQ;(class extends gQ{}).compose(Object.assign({baseName:"file-upload",shadowOptions:Pee,styles:Fee,template:Hee},_ee));const Vee=K` ${NQ("rapid")} `;(class extends OQ{}).compose({baseName:"filter-bar",template:Vee,styles:(e,t)=>Me` ${EQ()} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`});const Bee=K` ${MQ("rapid")} `;(class extends kQ{}).compose({baseName:"filter",template:Bee,styles:(e,t)=>Me` ${yQ} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`});(class extends _Q{}).compose(Object.assign({baseName:"flipper",template:(e,t)=>FQ(0,t),styles:(e,t)=>Me` ${HQ()} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:PQ},VQ));const Uee=Me` ${BQ} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,jee=K` ${UQ("rapid")} `,qee=WQ,Gee=GQ;(class extends qQ{}).compose(Object.assign({baseName:"flyout",shadowOptions:Gee,styles:Uee,template:jee},qee));const Wee={nextFlipper:K`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:K`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`};(class extends oX{}).compose(Object.assign({baseName:"horizontal-scroll",template:(e,t)=>iX(e,t),styles:(e,t)=>Me` ${cX()}`,shadowOptions:sX},Wee));const Yee=K` ${rX("rapid")} `;const Kee=hX,Zee=dX;(class extends fX{}).compose(Object.assign({baseName:"icon",template:Yee,styles:(e,t)=>Me` ${nX()}`,shadowOptions:Zee},Kee));(class extends CX{}).compose(Object.assign({baseName:"option",template:(e,t)=>yX(0,t),styles:(e,t)=>Me` ${zX()} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:LX},xX));(class extends gX{}).compose(Object.assign({baseName:"listbox",template:(e,t)=>pX(),styles:(e,t)=>Me` ${mX(e)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:vX},bX));const Qee=OX;(class extends AX{}).compose(Object.assign({baseName:"menu-item",template:(e,t)=>$X(e,t),styles:(e,t)=>Me` ${NX()} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${dd}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${dd}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${dd} color: ${kd} */`,shadowOptions:Qee},TX));(class extends SX{}).compose(Object.assign({baseName:"menu",template:(e,t)=>MX(),styles:(e,t)=>Me` ${wX()} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${dd}, transparent 15%);padding: 0}`,shadowOptions:kX},EX));const Xee=Me` ${Mee}`,Jee=FX,ete=IX,tte=DX;(class extends HX{}).compose(Object.assign({baseName:"modal",shadowOptions:tte,styles:Xee,template:ete},Jee));const ite=Me` ${Hx} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,cte=K` ${Bx("rapid")} `;const ote=qx,ste=jx;(class extends Gx{}).compose(Object.assign({baseName:"multiselect",template:cte,styles:ite,shadowOptions:ste},ote));(class extends o8{}).compose({baseName:"notification-listener",template:c8,shadowOptions:{mode:"open",delegatesFocus:!0}});const ate=cJ,nte=_X,rte=iJ;(class extends tJ{}).compose(Object.assign({baseName:"number-field",template:nte,styles:(e,t)=>Me` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${aQ}`,shadowOptions:rte},ate));(class extends aJ{}).compose({baseName:"optgroup",template:(e,t)=>sJ(),styles:(e,t)=>Me` ${oJ()}`});(class extends mJ{}).compose(Object.assign({baseName:"system-health-overlay",template:gJ,styles:vJ,shadowOptions:bJ},yJ));(class extends V1{}).compose(Object.assign({baseName:"progress-ring",template:(e,t)=>_1(0,t),styles:(e,t)=>Me` ${P1()}`,shadowOptions:B1},U1));(class extends lJ{}).compose(Object.assign({baseName:"progress",template:(e,t)=>nJ(0,t),styles:(e,t)=>Me` ${rJ()}`,shadowOptions:dJ},hJ));(class extends Q1{}).compose(Object.assign({baseName:"radio-group",template:(e,t)=>K1(),styles:(e,t)=>Me` ${Z1()}`,shadowOptions:X1},J1));(class extends G1{}).compose(Object.assign({baseName:"radio",template:(e,t)=>j1(0,t),styles:(e,t)=>Me` ${q1()} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:W1},Y1));let lte=class extends(zy.from(ze)){connectedCallback(){super.connectedCallback(),p.queueUpdate(()=>Ru(this,void 0,void 0,function*(){this.$router.config=this.config}))}};lte=Ou([Ce({name:"rapid-router"})],lte);const dte=Me` ${M2} :host{font-family: var(--body-font)}`,hte=K` ${j2("rapid")} `;(class extends G2{}).compose(Object.assign({baseName:"scheduler-cron-builder",template:hte,styles:dte,shadowOptions:W2},Y2));const ute=Me` ${K2} :host{font-family: var(--body-font)}`,fte=K` ${Z2("rapid")} `;(class extends X2{}).compose(Object.assign({baseName:"scheduler-timezone",template:fte,styles:ute,shadowOptions:J2},e3));const pte=Me` ${e2} :host{font-family: var(--body-font)}`,mte=K` ${t2("rapid")} `;(class extends c2{}).compose(Object.assign({baseName:"scheduler",template:mte,styles:pte,shadowOptions:o2},s2));(class extends d3{}).compose(Object.assign({baseName:"search-bar-combobox",template:(e,t)=>r3(0,t),styles:(e,t)=>Me` ${n3(e)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${fr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:h3},u3));const gte=Me` ${t3}`,vte=K` ${i3("rapid")} `;(class extends o3{}).compose(Object.assign({baseName:"search-bar",template:vte,styles:gte,shadowOptions:s3},a3));(class extends z3{}).compose(Object.assign({baseName:"section-navigator",template:p3,styles:(e,t)=>f3,shadowOptions:C3},L3));(class extends w3{}).compose(Object.assign({baseName:"segmented-control",template:(e,t)=>x3(),styles:(e,t)=>Me` ${M3()} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{}));(class extends G1{}).compose(Object.assign({baseName:"segmented-item",template:(e,t)=>S3(),styles:(e,t)=>Me` ${k3()} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{}));(class extends N3{}).compose(Object.assign({baseName:"select",template:(e,t)=>E3(0,t),styles:(e,t)=>Me` ${$3(e)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${fr} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:A3},O3));(class extends I3{}).compose(Object.assign({baseName:"skeleton",template:(e,t)=>T3(),styles:(e,t)=>Me` ${R3()} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:D3},F3));(class extends q3{}).compose(Object.assign({baseName:"slider-label",template:(e,t)=>U3(),styles:(e,t)=>Me` ${j3()} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:G3},W3));(class extends P3{}).compose(Object.assign({baseName:"slider",template:(e,t)=>H3(0,t),styles:(e,t)=>Me` ${_3()} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${Al}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Al}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Al}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:V3},B3));const bte=Me` ${Q3} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,yte=K` ${X3("rapid")} `,zte=e4;(class extends t4{}).compose({baseName:"snackbar",shadowOptions:zte,styles:bte,template:yte});(class extends o4{}).compose({baseName:"stacking-icons",template:c4,styles:(e,t)=>Me` ${i4()}`});(class extends n4{}).compose({baseName:"status-pill",template:a4,styles:s4});(class extends m4{}).compose(Object.assign({baseName:"stepper-tab-panel",template:(e,t)=>p4(),shadowOptions:g4},v4));const Cte=K` ${r4("rapid")} `;(class extends h4{}).compose(Object.assign({baseName:"stepper-tab",template:Cte,styles:(e,t)=>Me` ${d4()} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,shadowOptions:u4},f4));const Lte=Me` ${C8} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,xte=K` ${y8("rapid")} `;(class extends L8{}).compose(Object.assign({baseName:"stepper",template:xte,styles:Lte,shadowOptions:x8},M8));const Mte={switch:'<div class="checked-indicator" part="checked-indicator"></div>'};(class extends z4{}).compose(Object.assign({baseName:"switch",template:(e,t)=>b4(0,t),styles:(e,t)=>Me` ${y4()} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:C4},Mte));(class extends N4{}).compose(Object.assign({baseName:"tab-panel",template:(e,t)=>E4(),styles:(e,t)=>Me` ${$4()} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:A4},O4));(class extends w4{}).compose(Object.assign({baseName:"tab",template:(e,t)=>x4(),styles:(e,t)=>Me` ${M4()} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4)}`,shadowOptions:S4},k4));(class extends I4{}).compose(Object.assign({baseName:"tabs",template:(e,t)=>T4(0,t),styles:(e,t)=>Me` ${R4()} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:D4},F4));(class extends P4{}).compose(Object.assign({baseName:"text-area",template:(e,t)=>H4(),styles:(e,t)=>Me` ${_4()} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:V4},B4));(class extends q4{}).compose(Object.assign({baseName:"text-field",template:(e,t)=>U4(0,t),styles:(e,t)=>Me` ${j4()} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:G4},W4));const wte=Me` ${Y4} .toast{background-color: ${Cl};border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,Ste=X4,kte=Q4;(class extends J4{}).compose(Object.assign({baseName:"toast",shadowOptions:kte,styles:wte,template:Z4},Ste));(class extends i0{}).compose(Object.assign({baseName:"toolbar",template:(e,t)=>e0(0,t),styles:(e,t)=>Me` ${t0()} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:c0},o0));(class extends n0{}).compose(Object.assign({baseName:"tooltip",template:(e,t)=>s0(e),styles:(e,t)=>Me` ${a0(e)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:r0},l0));const Ete={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"/>\n </svg>'};(class extends u0{}).compose(Object.assign({baseName:"tree-item",template:(e,t)=>d0(0,t),styles:(e,t)=>Me` ${h0(e)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:f0},Ete));(class extends v0{}).compose(Object.assign({baseName:"tree-view",template:(e,t)=>m0(),styles:(e,t)=>Me` ${g0()}`,shadowOptions:b0},y0));const $te=K` ${C0("rapid")} `;function Nte(...e){return t=>{for(const i of e)"function"==typeof i?i(t):null!=i&&(i.current=t)}}(class extends w0{}).compose(Object.assign({baseName:"url-input",template:$te,styles:(e,t)=>Me` ${z0()} a{color: var(--accent-fill-rest);opacity: 65%}a:hover{opacity: 100%}.url-input-link{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);top: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) / 2 * 1px)}`,shadowOptions:x0},M0));const Ate=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-accordion",{...o,ref:t},c)}),Ote=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-accordion-item",{...o,ref:t},c)}),Tte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-actions-menu",{...o,ref:t},c)}),Rte=i.default.forwardRef(function(e,t){const{onCriteriaChanged:c,onValidationErrors:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("criteria-changed",t);const i=e=>l.current?.(e);return e.addEventListener("validation-errors",i),()=>{e.removeEventListener("criteria-changed",t),e.removeEventListener("validation-errors",i)}},[]),i.default.createElement("rapid-ai-criteria-search",{...a,ref:Nte(n,t)},s)}),Ite=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-ai-indicator",{...o,ref:t},c)}),Dte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-anchor",{...o,ref:t},c)}),Fte=i.default.forwardRef(function(e,t){const{onLoaded:c,onPositionchange:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("loaded",t);const i=e=>l.current?.(e);return e.addEventListener("positionchange",i),()=>{e.removeEventListener("loaded",t),e.removeEventListener("positionchange",i)}},[]),i.default.createElement("rapid-anchored-region",{...a,ref:Nte(n,t)},s)}),Hte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-avatar",{...o,ref:t},c)}),_te=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-badge",{...o,ref:t},c)}),Pte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-banner",{...o,ref:t},c)}),Vte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-breadcrumb",{...o,ref:t},c)}),Bte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-breadcrumb-item",{...o,ref:t},c)}),Ute=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-button",{...o,ref:t},c)}),jte=i.default.forwardRef(function(e,t){const{onDateselected:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("dateselected",t),()=>{e.removeEventListener("dateselected",t)}},[]),i.default.createElement("rapid-calendar",{...s,ref:Nte(a,t)},o)}),qte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-card",{...o,ref:t},c)}),Gte=i.default.forwardRef(function(e,t){const{onSelectionChange:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("selectionChange",t),()=>{e.removeEventListener("selectionChange",t)}},[]),i.default.createElement("rapid-categorized-multiselect",{...s,ref:Nte(a,t)},o)}),Wte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-checkbox",{...o,ref:t},c)}),Yte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-combobox",{...o,ref:t},c)}),Kte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-connection-indicator",{...o,ref:t},c)}),Zte=i.default.forwardRef(function(e,t){const{onValueChanged:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("value-changed",t),()=>{e.removeEventListener("value-changed",t)}},[]),i.default.createElement("rapid-date-picker",{...s,ref:Nte(a,t)},o)}),Qte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-design-system-provider",{...o,ref:t},c)}),Xte=i.default.forwardRef(function(e,t){const{onClose:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("close",t),()=>{e.removeEventListener("close",t)}},[]),i.default.createElement("rapid-dialog",{...s,ref:Nte(a,t)},o)}),Jte=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-disclosure",{...o,ref:t},c)}),eie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-divider",{...o,ref:t},c)}),tie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-dropdown-menu",{...o,ref:t},c)}),iie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-environment-indicator",{...o,ref:t},c)}),cie=i.default.forwardRef(function(e,t){const{onAddGroup:c,onDelGroup:o,onAddRule:s,onDelRule:a,onUpdateGroup:n,onUpdateRule:r,children:l,...d}=e,h=i.default.useRef(null),u=i.default.useRef(c);u.current=c;const f=i.default.useRef(o);f.current=o;const p=i.default.useRef(s);p.current=s;const m=i.default.useRef(a);m.current=a;const g=i.default.useRef(n);g.current=n;const v=i.default.useRef(r);return v.current=r,i.default.useLayoutEffect(()=>{const e=h.current;if(!e)return;const t=e=>u.current?.(e);e.addEventListener("add-group",t);const i=e=>f.current?.(e);e.addEventListener("del-group",i);const c=e=>p.current?.(e);e.addEventListener("add-rule",c);const o=e=>m.current?.(e);e.addEventListener("del-rule",o);const s=e=>g.current?.(e);e.addEventListener("update-group",s);const a=e=>v.current?.(e);return e.addEventListener("update-rule",a),()=>{e.removeEventListener("add-group",t),e.removeEventListener("del-group",i),e.removeEventListener("add-rule",c),e.removeEventListener("del-rule",o),e.removeEventListener("update-group",s),e.removeEventListener("update-rule",a)}},[]),i.default.createElement(customElements.getName(Ree)??"rapid-expression-builder",{...d,ref:Nte(h,t)},l)}),oie=i.default.forwardRef(function(e,t){const{onAddGroup:c,onDelGroup:o,onAddRule:s,onDelRule:a,onUpdateGroup:n,onUpdateRule:r,children:l,...d}=e,h=i.default.useRef(null),u=i.default.useRef(c);u.current=c;const f=i.default.useRef(o);f.current=o;const p=i.default.useRef(s);p.current=s;const m=i.default.useRef(a);m.current=a;const g=i.default.useRef(n);g.current=n;const v=i.default.useRef(r);return v.current=r,i.default.useLayoutEffect(()=>{const e=h.current;if(!e)return;const t=e=>u.current?.(e);e.addEventListener("add-group",t);const i=e=>f.current?.(e);e.addEventListener("del-group",i);const c=e=>p.current?.(e);e.addEventListener("add-rule",c);const o=e=>m.current?.(e);e.addEventListener("del-rule",o);const s=e=>g.current?.(e);e.addEventListener("update-group",s);const a=e=>v.current?.(e);return e.addEventListener("update-rule",a),()=>{e.removeEventListener("add-group",t),e.removeEventListener("del-group",i),e.removeEventListener("add-rule",c),e.removeEventListener("del-rule",o),e.removeEventListener("update-group",s),e.removeEventListener("update-rule",a)}},[]),i.default.createElement(customElements.getName(Iee)??"rapid-rule-expression-builder",{...d,ref:Nte(h,t)},l)}),sie=i.default.forwardRef(function(e,t){const{onAddGroup:c,onDelGroup:o,onAddRule:s,onDelRule:a,onUpdateGroup:n,onUpdateRule:r,children:l,...d}=e,h=i.default.useRef(null),u=i.default.useRef(c);u.current=c;const f=i.default.useRef(o);f.current=o;const p=i.default.useRef(s);p.current=s;const m=i.default.useRef(a);m.current=a;const g=i.default.useRef(n);g.current=n;const v=i.default.useRef(r);return v.current=r,i.default.useLayoutEffect(()=>{const e=h.current;if(!e)return;const t=e=>u.current?.(e);e.addEventListener("add-group",t);const i=e=>f.current?.(e);e.addEventListener("del-group",i);const c=e=>p.current?.(e);e.addEventListener("add-rule",c);const o=e=>m.current?.(e);e.addEventListener("del-rule",o);const s=e=>g.current?.(e);e.addEventListener("update-group",s);const a=e=>v.current?.(e);return e.addEventListener("update-rule",a),()=>{e.removeEventListener("add-group",t),e.removeEventListener("del-group",i),e.removeEventListener("add-rule",c),e.removeEventListener("del-rule",o),e.removeEventListener("update-group",s),e.removeEventListener("update-rule",a)}},[]),i.default.createElement(customElements.getName(Dee)??"rapid-value-expression-builder",{...d,ref:Nte(h,t)},l)}),aie=i.default.forwardRef(function(e,t){const{onFileSelected:c,onSuccess:o,onErrorOut:s,onClear:a,children:n,...r}=e,l=i.default.useRef(null),d=i.default.useRef(c);d.current=c;const h=i.default.useRef(o);h.current=o;const u=i.default.useRef(s);u.current=s;const f=i.default.useRef(a);return f.current=a,i.default.useLayoutEffect(()=>{const e=l.current;if(!e)return;const t=e=>d.current?.(e);e.addEventListener("file-selected",t);const i=e=>h.current?.(e);e.addEventListener("success",i);const c=e=>u.current?.(e);e.addEventListener("errorOut",c);const o=e=>f.current?.(e);return e.addEventListener("clear",o),()=>{e.removeEventListener("file-selected",t),e.removeEventListener("success",i),e.removeEventListener("errorOut",c),e.removeEventListener("clear",o)}},[]),i.default.createElement("rapid-file-upload",{...r,ref:Nte(l,t)},n)}),nie=i.default.forwardRef(function(e,t){const{onFilterChanged:c,onFilterCleared:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("filter-changed",t);const i=e=>l.current?.(e);return e.addEventListener("filter-cleared",i),()=>{e.removeEventListener("filter-changed",t),e.removeEventListener("filter-cleared",i)}},[]),i.default.createElement("rapid-filter",{...a,ref:Nte(n,t)},s)}),rie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-filter-bar",{...o,ref:t},c)}),lie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-flipper",{...o,ref:t},c)}),die=i.default.forwardRef(function(e,t){const{onClosed:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("closed",t),()=>{e.removeEventListener("closed",t)}},[]),i.default.createElement("rapid-flyout",{...s,ref:Nte(a,t)},o)}),hie=i.default.forwardRef(function(e,t){const{onScrollstart:c,onScrollend:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("scrollstart",t);const i=e=>l.current?.(e);return e.addEventListener("scrollend",i),()=>{e.removeEventListener("scrollstart",t),e.removeEventListener("scrollend",i)}},[]),i.default.createElement("rapid-horizontal-scroll",{...a,ref:Nte(n,t)},s)}),uie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-icon",{...o,ref:t},c)}),fie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-listbox",{...o,ref:t},c)}),pie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-option",{...o,ref:t},c)}),mie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-menu",{...o,ref:t},c)}),gie=i.default.forwardRef(function(e,t){const{onOnMenuClick:c,onExpandedChange:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("onMenuClick",t);const i=e=>l.current?.(e);return e.addEventListener("expanded-change",i),()=>{e.removeEventListener("onMenuClick",t),e.removeEventListener("expanded-change",i)}},[]),i.default.createElement("rapid-menu-item",{...a,ref:Nte(n,t)},s)}),vie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-modal",{...o,ref:t},c)}),bie=i.default.forwardRef(function(e,t){const{onSelectionChange:c,onClear:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("selectionChange",t);const i=e=>l.current?.(e);return e.addEventListener("clear",i),()=>{e.removeEventListener("selectionChange",t),e.removeEventListener("clear",i)}},[]),i.default.createElement("rapid-multiselect",{...a,ref:Nte(n,t)},s)}),yie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-notification-listener",{...o,ref:t},c)}),zie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-number-field",{...o,ref:t},c)}),Cie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-optgroup",{...o,ref:t},c)}),Lie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-progress",{...o,ref:t},c)}),xie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-progress-ring",{...o,ref:t},c)}),Mie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-radio",{...o,ref:t},c)}),wie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-radio-group",{...o,ref:t},c)}),Sie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement(customElements.getName(lte)??"rapid-router",{...o,ref:t},c)}),kie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-scheduler",{...o,ref:t},c)}),Eie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-scheduler-cron-builder",{...o,ref:t},c)}),$ie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-scheduler-timezone",{...o,ref:t},c)}),Nie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-search-bar-combobox",{...o,ref:t},c)}),Aie=i.default.forwardRef(function(e,t){const{onSelectionChange:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("selectionChange",t),()=>{e.removeEventListener("selectionChange",t)}},[]),i.default.createElement("rapid-search-bar",{...s,ref:Nte(a,t)},o)}),Oie=i.default.forwardRef(function(e,t){const{onSectionNavigatorSetState:c,onSectionNavigatorSetStates:o,onSectionNavigatorClearState:s,onSectionNavigatorClearAllStates:a,children:n,...r}=e,l=i.default.useRef(null),d=i.default.useRef(c);d.current=c;const h=i.default.useRef(o);h.current=o;const u=i.default.useRef(s);u.current=s;const f=i.default.useRef(a);return f.current=a,i.default.useLayoutEffect(()=>{const e=l.current;if(!e)return;const t=e=>d.current?.(e);e.addEventListener("section-navigator-set-state",t);const i=e=>h.current?.(e);e.addEventListener("section-navigator-set-states",i);const c=e=>u.current?.(e);e.addEventListener("section-navigator-clear-state",c);const o=e=>f.current?.(e);return e.addEventListener("section-navigator-clear-all-states",o),()=>{e.removeEventListener("section-navigator-set-state",t),e.removeEventListener("section-navigator-set-states",i),e.removeEventListener("section-navigator-clear-state",c),e.removeEventListener("section-navigator-clear-all-states",o)}},[]),i.default.createElement("rapid-section-navigator",{...r,ref:Nte(l,t)},n)}),Tie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-segmented-control",{...o,ref:t},c)}),Rie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-segmented-item",{...o,ref:t},c)}),Iie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-select",{...o,ref:t},c)}),Die=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-skeleton",{...o,ref:t},c)}),Fie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-slider",{...o,ref:t},c)}),Hie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-slider-label",{...o,ref:t},c)}),_ie=i.default.forwardRef(function(e,t){const{onAutoDismiss:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("autoDismiss",t),()=>{e.removeEventListener("autoDismiss",t)}},[]),i.default.createElement("rapid-snackbar",{...s,ref:Nte(a,t)},o)}),Pie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-stacking-icons",{...o,ref:t},c)}),Vie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-status-pill",{...o,ref:t},c)}),Bie=i.default.forwardRef(function(e,t){const{onStepClick:c,onValidationFailure:o,onNextStep:s,onValidationSuccess:a,children:n,...r}=e,l=i.default.useRef(null),d=i.default.useRef(c);d.current=c;const h=i.default.useRef(o);h.current=o;const u=i.default.useRef(s);u.current=s;const f=i.default.useRef(a);return f.current=a,i.default.useLayoutEffect(()=>{const e=l.current;if(!e)return;const t=e=>d.current?.(e);e.addEventListener("step-click",t);const i=e=>h.current?.(e);e.addEventListener("validation-failure",i);const c=e=>u.current?.(e);e.addEventListener("next-step",c);const o=e=>f.current?.(e);return e.addEventListener("validation-success",o),()=>{e.removeEventListener("step-click",t),e.removeEventListener("validation-failure",i),e.removeEventListener("next-step",c),e.removeEventListener("validation-success",o)}},[]),i.default.createElement("rapid-stepper",{...r,ref:Nte(l,t)},n)}),Uie=i.default.forwardRef(function(e,t){const{onTabClicked:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("tab-clicked",t),()=>{e.removeEventListener("tab-clicked",t)}},[]),i.default.createElement("rapid-stepper-tab",{...s,ref:Nte(a,t)},o)}),jie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-stepper-tab-panel",{...o,ref:t},c)}),qie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-switch",{...o,ref:t},c)}),Gie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-tab",{...o,ref:t},c)}),Wie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-tab-panel",{...o,ref:t},c)}),Yie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-tabs",{...o,ref:t},c)}),Kie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-text-area",{...o,ref:t},c)}),Zie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-text-field",{...o,ref:t},c)}),Qie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-toast",{...o,ref:t},c)}),Xie=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-toolbar",{...o,ref:t},c)}),Jie=i.default.forwardRef(function(e,t){const{onDismiss:c,children:o,...s}=e,a=i.default.useRef(null),n=i.default.useRef(c);return n.current=c,i.default.useLayoutEffect(()=>{const e=a.current;if(!e)return;const t=e=>n.current?.(e);return e.addEventListener("dismiss",t),()=>{e.removeEventListener("dismiss",t)}},[]),i.default.createElement("rapid-tooltip",{...s,ref:Nte(a,t)},o)}),ece=i.default.forwardRef(function(e,t){const{onExpandedChange:c,onSelectedChange:o,children:s,...a}=e,n=i.default.useRef(null),r=i.default.useRef(c);r.current=c;const l=i.default.useRef(o);return l.current=o,i.default.useLayoutEffect(()=>{const e=n.current;if(!e)return;const t=e=>r.current?.(e);e.addEventListener("expanded-change",t);const i=e=>l.current?.(e);return e.addEventListener("selected-change",i),()=>{e.removeEventListener("expanded-change",t),e.removeEventListener("selected-change",i)}},[]),i.default.createElement("rapid-tree-item",{...a,ref:Nte(n,t)},s)}),tce=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-tree-view",{...o,ref:t},c)}),ice=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-url-input",{...o,ref:t},c)}),cce=i.default.forwardRef(function(e,t){const{children:c,...o}=e;return i.default.createElement("rapid-system-health-overlay",{...o,ref:t},c)});var oce=Object.freeze({__proto__:null,Accordion:Ate,AccordionItem:Ote,ActionsMenu:Tte,AiCriteriaSearch:Rte,AiIndicator:Ite,Anchor:Dte,AnchoredRegion:Fte,Avatar:Hte,Badge:_te,Banner:Pte,Breadcrumb:Vte,BreadcrumbItem:Bte,Button:Ute,Calendar:jte,Card:qte,CategorizedMultiselect:Gte,Checkbox:Wte,Combobox:Yte,ConnectionIndicator:Kte,DatePicker:Zte,DesignSystemProvider:Qte,Dialog:Xte,Disclosure:Jte,Divider:eie,DropdownMenu:tie,EnvironmentIndicator:iie,RapidExpressionBuilder:cie,RapidRuleExpressionBuilder:oie,RapidValueExpressionBuilder:sie,FileUpload:aie,Filter:nie,FilterBar:rie,Flipper:lie,Flyout:die,HorizontalScroll:hie,Icon:uie,Listbox:fie,ListboxOption:pie,Menu:mie,MenuItem:gie,Modal:vie,Multiselect:bie,NotificationListener:yie,NumberField:zie,Optgroup:Cie,Progress:Lie,ProgressRing:xie,Radio:Mie,RadioGroup:wie,RapidRouter:Sie,Scheduler:kie,SchedulerCronBuilder:Eie,SchedulerTimezone:$ie,SearchBarCombobox:Nie,SearchBar:Aie,SectionNavigator:Oie,SegmentedControl:Tie,SegmentedItem:Rie,Select:Iie,Skeleton:Die,Slider:Fie,SliderLabel:Hie,Snackbar:_ie,StackingIcons:Pie,StatusPill:Vie,Stepper:Bie,StepperTab:Uie,StepperTabPanel:jie,Switch:qie,Tab:Gie,TabPanel:Wie,Tabs:Yie,TextArea:Kie,TextField:Zie,Toast:Qie,Toolbar:Xie,Tooltip:Jie,TreeItem:ece,TreeView:tce,UrlInput:ice,SystemHealthOverlay:cce});if("undefined"!=typeof window){const e=window;e.rapid||(e.rapid={}),e.rapid.react=oce}}(React);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-rapid-cdn",
3
3
  "description": "Side-effecting CDN bundle that auto-registers the Rapid Design System. Intended for AI/prototyping tools (e.g. Claude Artifacts), not for production apps.",
4
- "version": "14.484.0",
4
+ "version": "14.484.2-alpha-92fa356.0",
5
5
  "sideEffects": true,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "unpkg": "dist/foundation-rapid-cdn.iife.min.js",
@@ -27,11 +27,11 @@
27
27
  "test:browser:react": "npx -y http-server . -p 4322 -c-1 -o /test/react.html"
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/genx": "14.484.0",
31
- "@genesislcap/rollup-builder": "14.484.0"
30
+ "@genesislcap/genx": "14.484.2-alpha-92fa356.0",
31
+ "@genesislcap/rollup-builder": "14.484.2-alpha-92fa356.0"
32
32
  },
33
33
  "dependencies": {
34
- "@genesislcap/rapid-design-system": "14.484.0"
34
+ "@genesislcap/rapid-design-system": "14.484.2-alpha-92fa356.0"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
@@ -47,5 +47,5 @@
47
47
  "README.md",
48
48
  "components.md"
49
49
  ],
50
- "gitHead": "1ec7b2318e2447c2cd3ad877666b6fd1f3b87c05"
50
+ "gitHead": "efa674fc6417ae0f01c8c0b8a9d267525136c039"
51
51
  }