-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-d9f65d84.entry.js
12 lines (12 loc) · 28.5 KB
/
p-d9f65d84.entry.js
1
2
3
4
5
6
7
8
9
10
11
12
/*!
* Built by BASIS
* Copyright BASIS International Ltd.
*/
import{r as t,c as i,h as e,H as r,g as s}from"./p-00e3df8e.js";import{c as o,a}from"./p-5119ef20.js";import{D as n}from"./p-d533ee6a.js";import{d as h}from"./p-a14ccc92.js";import{D as d}from"./p-5440a118.js";import{g as c,s as l}from"./p-d1476f28.js";import{h as p}from"./p-3e9fe89f.js";import{D as u,a as f,b}from"./p-b9ac3f72.js";import{S as w}from"./p-7ccdab1d.js";import{D as v}from"./p-bcdbf8e6.js";var g;"undefined"!=typeof self&&self,g=()=>(()=>{var t={"./src/NumberMask/NumberMask.js":
/*!**************************************!*\
!*** ./src/NumberMask/NumberMask.js ***!
\**************************************/(t,i,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,(void 0,o=function(t){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var e=i.call(t,"string");if("object"!==r(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(s.key),"symbol"===r(o)?o:String(o)),s)}var o}e.r(i),e.d(i,{default:()=>o});const o=function(){function t(){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t)}var i,e;return i=t,e=[{key:"mask",value:function(i,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:",",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=arguments.length>6&&void 0!==arguments[6]&&arguments[6],h=arguments.length>7&&void 0!==arguments[7]&&arguments[7],d=!(arguments.length>8&&void 0!==arguments[8])||arguments[8],c="__GROUPING__SEPARATOR__PLACEHOLDER__",l="__DECIMAL__SEPARATOR__PLACEHOLDER__",p=e.length;if(0===p){if(a)return str;throw{name:"MaskError",message:"MaskError: Mask is empty"}}for(var u=0,f=0,b=!1,w=0;w<p;++w){var v=e.charAt(w);"0"==v||"#"==v?b?++f:++u:"."==v&&(b=!0)}var g=t._round(i,f),m=t._toCharArray(g),x=m.length,y=0,k=0;b=!1;for(var M=0;M<x;++M)"."==m[M]?b=!0:b?++k:++y;if(y>u){if(a)return i.toString();throw{name:"MaskError",message:"MaskError: Number is too large for mask"}}if(k>f){g=t._round(g,f),x=(m=t._toCharArray(g)).length,y=0,k=0,b=!1;for(var C=0;C<x;++C)"."==m[C]?b=!0:b?++k:++y;if(y>u){if(a)return i.toString();throw{name:"MaskError",message:"MaskError: Number is too large for mask"}}}var j=" ",z=" ",S=0,R=0,$=0;"*"==e.charAt(0)&&!1===n&&(j="*");var E=j,D=t._getSign(g)<0,_=x>0||e.indexOf("0")>=0,N=!1,I=!1;b=!1;for(var P=new Array(p),q=0;q<p;++q){var F=e.charAt(q);switch(F){case"0":--u<y&&S<x?(P[R]=m[S],++S,I=!0):(P[R]="0",N=!0),++R;break;case"#":--u<y&&S<x?(P[R]=m[S],++S,I=!0):(P[R]=b&&o&&0!=t._getSign(g)?"0":j,b||($=q)),++R;break;case",":N||S>0?P[R]=c:(P[R]=j,b||($=q)),++R;break;case"-":!I&&" "==z&&d?(D&&(z="-"),P[R]=j,$=b?-1:q):P[R]=D?"-":j,++R;break;case"+":!I&&" "==z&&d?(z=D?"-":"+",P[R]=j,$=b?-1:q):P[R]=D?"-":"+",++R;break;case"$":!I&&" "==z&&d?(z="$",P[R]=j,$=b?-1:q):P[R]="$",++R;break;case"(":!I&&" "==z&&d?(D&&(z="("),P[R]=j,$=b?-1:q):P[R]=D?"(":b?" ":j,++R;break;case")":P[R]=D?")":b?" ":j,++R;break;case"C":q<p-1&&"R"==e.charAt(q+1)?(D?(P[R]="C",P[R+1]="R"):(P[R]=" ",P[R+1]=" "),R+=2,++q):(P[R]="C",++R);break;case"D":q<p-1&&"R"==e.charAt(q+1)?(D?(P[R]="C",P[R+1]="R"):(P[R]="D",P[R+1]="R"),R+=2,++q):(P[R]="D",++R);break;case"*":P[R]="*",++R;break;case".":P[R]=_?l:j,j=" ",b=!0,++S,++R;break;case"B":P[R]=" ",++R;break;default:P[R]=F,++R}}if(" "!=z){for($<0&&($=R);$>=p;)--$;P[$]==E&&(P[$]=z)}return P=P.join(""),h&&(P=P.replace(/\s/g,"")),(P=P.replaceAll(c,r)).replaceAll(l,s)}},{key:"_shift",value:function(t,i,e){e&&(i=-i);var r=(""+t).split("e");return+(r[0]+"e"+(r[1]?+r[1]+i:i))}},{key:"_round",value:function(i,e){return t._shift(Math.round(t._shift(i,e,!1)),e,!0)}},{key:"_toCharArray",value:function(i){var e=t._getSign(i),r=[];if(0!==e){var s=e<0?"".concat(-1*i.toString()):i.toString();s.length>1&&"0"==s.charAt(0)&&(s=s.substring(1)),r=s.split("")}return r}},{key:"_getSign",value:function(t){return(t>0)-(t<0)||+t}}],null&&s(i.prototype,null),e&&s(i,e),Object.defineProperty(i,"prototype",{writable:!1}),t}()}},i={};function e(r){var s=i[r];if(void 0!==s)return s.exports;var o=i[r]={exports:{}};return t[r](o,o.exports,e),o.exports}e.d=(t,i)=>{for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},e.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{
/*!*********************************!*\
!*** ./src/NumberMask/index.js ***!
\*********************************/
e.r(r),e.d(r,{default:()=>t});const t=e(/*! ./NumberMask */"./src/NumberMask/NumberMask.js").default})(),r})();const m=a({exports:{}}.exports=g());let x=0;const y=class{constructor(e){t(this,e),this.modifiedEvent=i(this,"dwc-modified",7),this.focusedEvent=i(this,"dwc-focused",7),this.blurredEvent=i(this,"dwc-blurred",7),this.spunUpEvent=i(this,"dwc-spun-up",7),this.spunDownEvent=i(this,"dwc-spun-down",7),this.validatedEvent=i(this,"dwc-validated",7),this.spinnerRequiredPropsChangedEvent=i(this,"dwc-spinner-required-props",7),this.inputId="inputn-"+ ++x,this.allowedPrecision=0,this.allowedNumbers=0,this.maskedInputCursorPos=0,this.isMouseInComponent=!1,this.validationExpressionEngine=new d("BBjInputN<dwc-numberfield> Validation",["x","value","text","component","control"]),this.builtinInvalidMessage="",this.autoValidate=!0,this.autoValidateOnLoad=!1,this.autoWasValidated=!1,this.autofocus=!1,this.comma=c("group"),this.dot=c("decimal"),this.disabled=!1,this.expanse="m",this.forceTrailingZeros=!0,this.hasFocus=!1,this.helperText=void 0,this.highlightBehaviors=[],this.invalid=!1,this.invalidMessage=void 0,this.insertMode=!1,this.label=void 0,this.name=void 0,this.mask="",this.maskRounding=!1,this.maskedValue=void 0,this.min=void 0,this.max=void 0,this.negateable=!0,this.placeholder=void 0,this.readonly=!1,this.restoreValue=void 0,this.required=!1,this.showSpinners=!1,this.spinnable=!1,this.tabTraversable=0,this.validator=void 0,this.validationIcon="dwc:info",this.validationPopoverDistance=6,this.validationPopoverSkidding=0,this.validationPopoverPlacement="bottom",this.validationStyle="popover",this.valid=!1,this.value=void 0}onCommaChanged(t,i){t!=i&&this.updateFromMaskedValue()}onDotChanged(t,i){t!=i&&this.updateFromMaskedValue()}onForceTrailingZerosChanged(t,i){t!=i&&this.updateFromMaskedValue()}onMaskChanged(t,i){t!=i&&this.value&&this.updateFromMaskedValue()}onMaskRoundingChanged(t,i){t!=i&&this.updateFromMaskedValue()}onMaskedValueChanged(t){this.updateFromUnmaskedValue(t)}onValueChanged(t,i){this.updateFromMaskedValue(t,i),this.autoValidate&&this.validate()}onSpinnerRequiredPropsChanged(){this.spinnerRequiredPropsChangedEvent.emit({disabled:this.disabled,readonly:this.readonly,min:this.min,max:this.max})}connectedCallback(){var t;this.handleMaskedInputFocus=this.handleMaskedInputFocus.bind(this),this.handleMaskedInputBlur=this.handleMaskedInputBlur.bind(this),this.handleMaskedInputDrop=this.handleMaskedInputDrop.bind(this),this.handleMaskedInputMouseEnter=this.handleMaskedInputMouseEnter.bind(this),this.handleMaskedInputMouseLeave=this.handleMaskedInputMouseLeave.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleInputFocus=this.handleInputFocus.bind(this),this.handleInputFilter=this.handleInputFilter.bind(this),this.handleInputInsertMode=this.handleInputInsertMode.bind(this),this.handleInputKeyup=this.handleInputKeyup.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleSpinUp=this.handleSpinUp.bind(this),this.handleSpinDown=this.handleSpinDown.bind(this),null===(t=this.slotsObserver)||void 0===t||t.connect()}disconnectedCallback(){var t;null===(t=this.slotsObserver)||void 0===t||t.disconnect()}componentWillLoad(){this.slotsObserver=new w(this.el,"helper-text"),this.updateFromUnmaskedValue(),this.updateFromMaskedValue()}componentDidLoad(){null!=window.applyFocusVisiblePolyfill&&window.applyFocusVisiblePolyfill(this.el.shadowRoot),l(this.$input,this.handleInputFilter),this.autoValidateOnLoad&&requestAnimationFrame((()=>this.validate()))}componentWillRender(){this.hasFocus&&this.$maskedInput&&(this.maskedInputCursorPos=this.$maskedInput.selectionStart)}componentDidRender(){this.hasFocus&&this.$input.focus&&this.$input.focus()}onWindowKeyup(t){if(9===(t.keyCode?t.keyCode:t.which)&&this.hasFocus){const t=this.highlightBehaviors;t&&t.indexOf(n.KEY)>-1&&this.selectAll()}}handleKeyUp(t){switch(t.key){case"ArrowUp":t.preventDefault(),this.spin(!0);break;case"ArrowDown":t.preventDefault(),this.spin(!1)}}handleWheel(t){if(!this.hasFocus)return;let i;if(t.preventDefault(),"touchmove"===t.type){const e=t.touches[0].clientY;i=e<this.lastTouchY?"up":"down",this.lastTouchY=e}else"wheel"!==t.type&&"mousewheel"!==t.type||(i=t.deltaY<0?"up":"down");this.spin("up"===i)}async spin(t){!this.spinnable||this.disabled||this.readonly||(t?this.spunUpEvent.emit():this.spunDownEvent.emit())}async setFocus(){if(this.el.shadowRoot.activeElement===this.$maskedInput)return;this.$maskedInput.disabled=this.disabled,this.$maskedInput.focus();const t=this.highlightBehaviors;t&&t.indexOf(n.REQUEST)>-1&&this.selectAll()}async removeFocus(){this.$input.blur()}async selectAll(){this.disabled||this.readonly?this.disabled||this.$maskedInput.setSelectionRange(0,this.$maskedInput.value.length):this.$input.setSelectionRange(0,this.$input.value.length)}async setSelectionRange(t,i){this.disabled||this.readonly?this.disabled||this.$maskedInput.setSelectionRange(t,i):this.$input.setSelectionRange(t,i)}async setCursorPos(t){this.disabled||this.readonly||this.$input.setSelectionRange(t,t+1)}async getCursorPos(){return this.disabled&&this.readonly||!this.hasFocus?0:this.$input.selectionStart}async restore(){this.doRestore()}async validate(){var t;let i=!0;if(this.validator){const t=Number(this.value),e=this.el;i=this.validationExpressionEngine.evaluate(this.validator,{x:t,value:t,text:String(t),component:e,control:e})}else{if(this.$input){this.$input.value=this.value;const t=Number(this.min),e=t&&this.value&&Number(this.value)<t,r=Number(this.max),s=r&&this.value&&Number(this.value)>r;(e||s)&&(i=!1,this.builtinInvalidMessage=e?`The value must be greater than or equal to ${t}`:`The value must be less than or equal to ${r}`)}try{i=i&&this.$input.checkValidity(),(null===(t=this.$input)||void 0===t?void 0:t.validationMessage.length)&&(this.builtinInvalidMessage=this.$input.validationMessage)}catch(t){}}return this.invalid=!i,this.validatedEvent.emit(i),this.invalid&&(this.valid=!1),!this.invalid&&this.autoWasValidated&&(this.valid=!0),i}async getPart(t){return new Promise((i=>{i(this.el.shadowRoot.querySelector(`[part~="${t}"]`))}))}doRestore(t=!1){if(this.restoreValue){let i=this.roundOrTruncateValue(this.restoreValue,this.allowedPrecision);return i=this.value=this.$input.value=this.localizeDecimal(i),t&&this.fireModifiedEvent(i),i}}updateFromMaskedValue(t=this.value,i=""){const e=this.mask;if(e){const t=e.split(".");t&&(2===t.length?(this.allowedPrecision=t[1].split("").filter((t=>"#"==t||"0"==t)).length,this.allowedNumbers=t[0].split("").filter((t=>"#"==t||"0"==t)).length):1===t.length?(this.allowedPrecision=0,this.allowedNumbers=t[0].split("").filter((t=>"#"==t||"0"==t)).length):(this.allowedPrecision=0,this.allowedNumbers=0))}else this.allowedPrecision=0,this.allowedNumbers=0;if(t&&!this.hasFocus&&(this.value=t=this.roundOrTruncateValue(t,this.allowedPrecision)),e.length){const i=String(this.applyMask(t));null!==i?this.maskedValue=i:(this.value="",this.maskedValue="")}else this.value=this.maskedValue=t;this.shouldFireChangedEvent&&(this.fireModifiedEvent(t),this.shouldFireChangedEvent=!1)}updateFromUnmaskedValue(t=this.maskedValue){if(!t||this.hasFocus)return;const i=this.applyUnmask(t);null!==i&&i!=this.value&&(this.value=i)}roundOrTruncateValue(t,i){let e=t;if(this.maskRounding)e=String(Number(e).toFixed(i));else{const t=new RegExp("^-?\\d+(?:.\\d{0,"+(i||-1)+"})?"),r=e.toString().match(t);(null==r?void 0:r.length)&&(e=r[0])}return e}applyMask(t){let i=null;try{i=m.mask(this.unlocalizeDecimal(t),this.mask,this.comma,this.dot,this.forceTrailingZeros,!1,!0,!0,!1)}catch(t){}return null!==i&&(i=i.trim(),i=i&&!i.includes("NaN")?i:""),i}applyUnmask(t){let i=null;if((null==t?void 0:t.length)&&this.mask&&this.mask.length){const e=t.includes("CR")||t.includes("(")||t.includes(")")||t.includes("-");i=t.replace(new RegExp(`\\${this.comma}`,"g"),""),i=i.replace(this.dot,"."),i=i.replace(/[^0-9.]+/g,""),i=`${e?"-":""}${i}`}return i}handleMaskedInputFocus(t){t.stopPropagation(),this.disabled||this.readonly||(this.hasFocus=!0,this.fireFocusedEvent())}handleMaskedInputBlur(t){t.stopPropagation()}handleMaskedInputMouseEnter(){this.isMouseInComponent=!0}handleMaskedInputMouseLeave(){this.isMouseInComponent=!1}handleMaskedInputDrop(t){t.preventDefault(),this.value=t.dataTransfer.getData("text"),this.hasFocus=!0}handleInputFocus(){var t;const i=this.$input.selectionStart,e=this.$input.selectionEnd,r=this.$input.value.substring(i,e);this.$input.value=this.localizeDecimal(this.$input.value);const s=this.highlightBehaviors;if(s&&s.indexOf(n.MOUSE)>-1&&!0===this.isMouseInComponent)this.selectAll();else if(r)this.$input.setSelectionRange(i,e);else{let i=this.maskedInputCursorPos;if(this.mask){const e=this.maskedValue.slice(0,this.maskedInputCursorPos),r=e.replace(new RegExp(`[^0-9\\${c("decimal")}]+`,"g"),"");i=this.maskedInputCursorPos-(e.length-1-(r.length-1)),(null===(t=null==this?void 0:this.value)||void 0===t?void 0:t.includes("-"))&&(i+=1)}this.$input.setSelectionRange(i,i)}this.hasFocus=!0}handleInputBlur(){this.hasFocus=!1,this.value=this.unlocalizeDecimal(this.$input.value),this.isMouseInComponent=!1,this.blurredEvent.emit()}handleInputFilter(t,i){const e=c("decimal"),r=this.allowedPrecision,s=this.allowedNumbers;let o;t=this.localizeDecimal(t),o=r>0?new RegExp(`^${this.negateable?"-?":""}(\\d{0,${s}}(\\${e}\\d{0,${r}})?|\\${e}\\d{0,${r}})$`):this.mask&&s?new RegExp(`^${this.negateable?"-?":""}(\\d{0,${s}})$`):new RegExp(`^${this.negateable?"-?":""}[0-9]*$`);let a=o.test(t),n="";return this.mask.length&&(n=String(this.applyMask(String(t))),a=a&&null!==n),["paste","input","drop"].indexOf(i)>-1&&(this.shouldFireChangedEvent=!0),a}handleInputKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation()}}handleInputKeyup(t){const i=0!==t.keyCode&&229!==t.keyCode?t.key:t.target.lastInput;let e=this.unlocalizeDecimal(this.$input.value);const r=c("decimal");switch(i){case"+":if(null==e?void 0:e.includes("-")){this.$input.lastInput="",e=Math.abs(Number(e));const t=this.$input.selectionStart-1;h(25).then((()=>{this.$input.setSelectionRange(t,t)}))}break;case"-":if(e&&!e.includes("-")&&this.negateable){this.$input.lastInput="",e=-Math.abs(Number(e));const t=this.$input.selectionStart+1;h(25).then((()=>{this.$input.setSelectionRange(t,t)}))}break;case r:if(e){this.$input.lastInput="";const t=this.localizeDecimal(e).indexOf(r);if(t>-1){const i=t+1;this.$input.setSelectionRange(i,i)}}break;case"Escape":this.restoreValue&&(e=this.doRestore(!0));break;case"Backspace":"-"===e&&(e="");break;case"Insert":this.insertMode=!this.insertMode}this.value=this.$input.value=this.localizeDecimal(e)}handleInputInsertMode(t){if(!(1===t.key.length&&t.key>="0"&&t.key<="9"))return;const i=this.$input,e=i.selectionStart,r=c("decimal");let s=!this.insertMode;const o=i.value.indexOf(r);e>-1&&e-1>0&&o>-1&&e-1>=o&&(s=!0),s&&(i.value=i.value.substr(0,e)+i.value.substr(e+1),this.$input.selectionEnd=e)}fireModifiedEvent(t){this.readonly||this.disabled||(t=Number(this.unlocalizeDecimal(t)),isNaN(t)||this.modifiedEvent.emit(t))}fireFocusedEvent(){this.focusedEvent.emit()}handleSpinUp(){this.spin(!0)}handleSpinDown(){this.spin(!1)}localizeDecimal(t){const i=c("decimal");return String(t).replace(".",i)}unlocalizeDecimal(t){const i=c("decimal");return String(t).replace(i,".")}render(){var t,i;const s=!this.validator,o=(null===(t=this.invalidMessage)||void 0===t?void 0:t.trim().length)>0,a=s?o?this.invalidMessage:this.builtinInvalidMessage:o?this.invalidMessage:"",n=this.invalid&&(null==a?void 0:a.trim().length)>0,h=(this.label||"").trim().length>0,d=(null===(i=this.helperText)||void 0===i?void 0:i.trim().length)>0||this.slotsObserver.hasContent("helper-text"),c=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?this.allowedPrecision>0?"text":"numeric":this.allowedPrecision>0?"decimal":"numeric";return e(r,{key:"c20b9e0f7b3d27941562c2b19a52c474148bcbf0","data-has-label":h,class:p({BBjControl:!0,BBjInputN:!0,"bbj-disabled":this.disabled,"bbj-focused":this.hasFocus,"bbj-readonly":this.readonly,"bbj-hasLabel":h,"bbj-valid":this.valid,"bbj-invalid":this.invalid,"bbj-required":this.required})},e("div",{key:"1b1407f80f19e67d698fc436ef70e0af7a03113d",part:"control"},h&&e("label",{key:"81315757765d4f8879e67a752325cd603b51e59f",id:`${this.inputId}-label`,part:"label",htmlFor:`${this.inputId}-${this.hasFocus?"unmasked":"masked"}`,innerHTML:this.label}),e("div",{key:"4230b1fd422cb2ef60209df67be7a09e4fe6d51d",part:"input-wrapper"},e("span",{key:"eec1e310716b2d2dbf478bf47f98cb22bcfffba1",part:"prefix"},e("slot",{key:"1ddd0dbabc1f831836937a0a06dbf24bb3230fc6",name:"prefix"})),e("input",{key:"056fe9ae5ff446ab971fdc99977f7eda6a1cf2d3",id:`${this.inputId}-masked`,ref:t=>this.$maskedInput=t,part:"input input-masked",type:"text",readOnly:!0,class:{hidden:this.hasFocus},name:this.name,value:this.maskedValue,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,tabIndex:this.disabled||this.hasFocus?-1:this.tabTraversable,"aria-labelledby":`${this.inputId}-label`,"aria-describedby":"helper-text",onBlur:this.handleMaskedInputBlur,onFocus:this.handleMaskedInputFocus,onDrop:this.handleMaskedInputDrop,onMouseEnter:this.handleMaskedInputMouseEnter,onMouseLeave:this.handleMaskedInputMouseLeave}),e("input",{key:"d59bf972f563bbf32f18f5a8d5fefa8f96dae9d3",id:`${this.inputId}-unmasked`,ref:t=>this.$input=t,part:"input input-unmasked",autocomplete:"off",autocapitalize:"off",autocorrect:"off",class:{hidden:!this.hasFocus},required:this.required,inputmode:c,name:this.name,value:this.value,disabled:this.disabled,autofocus:this.autofocus,"aria-labelledby":`${this.inputId}-label`,"aria-describedby":"helper-text",onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onKeyUp:this.handleInputKeyup,onKeyDown:this.handleInputKeyDown,onKeyPress:this.handleInputInsertMode,placeholder:this.placeholder}),e("span",{key:"6476e8820b1222f4aedc51700146befae579942e",part:"suffix"},e("slot",{key:"9420e30b15e811db227954aab10c85806179c7ed",name:"suffix"})),e(v,{key:"ed186efe8fedb38d4c3df35885aa5811c73a9f4b",visible:this.showSpinners,disabled:this.disabled||this.readonly,onSpinUp:this.handleSpinUp,onSpinDown:this.handleSpinDown})),"popover"===this.validationStyle&&n&&e(b,{key:"fe5aab05d12b9cb0fe08610913a30ec9469adb88",invalidMessage:a,icon:this.validationIcon,hasFocus:this.hasFocus,popoverDistance:this.validationPopoverDistance,popoverPlacement:this.validationPopoverPlacement,popoverSkidding:this.validationPopoverSkidding})),e(f,{key:"7ed2f8ca9fecf04b3124c10202beba6bef881d76",helperText:this.helperText,visible:d}),"inline"===this.validationStyle&&n&&e(u,{key:"174b8ffddc64cbbafdd9ff51510ec2164080108a",invalidMessage:a,icon:this.validationIcon}))}get el(){return s(this)}static get watchers(){return{comma:["onCommaChanged"],dot:["onDotChanged"],forceTrailingZeros:["onForceTrailingZerosChanged"],mask:["onMaskChanged"],maskRounding:["onMaskRoundingChanged"],maskedValue:["onMaskedValueChanged"],value:["onValueChanged"],disabled:["onSpinnerRequiredPropsChanged"],readonly:["onSpinnerRequiredPropsChanged"],min:["onSpinnerRequiredPropsChanged"],max:["onSpinnerRequiredPropsChanged"]}}};y.style='@charset "UTF-8";@media (prefers-reduced-motion: reduce){*,::before,::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;background-attachment:initial !important;scroll-behavior:auto !important;transition-delay:0s !important;transition-duration:0s !important}}:host{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;-webkit-tap-highlight-color:transparent;text-size-adjust:100%}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{--dwc-icon-size:1.3em;display:inline-block}:host(:focus),:host(:active){outline:none}:host([disabled]){cursor:var(--dwc-disabled-cursor);opacity:var(--dwc-disabled-opacity);user-select:none;pointer-events:none}:host([disabled]) *{cursor:var(--dwc-disabled-cursor);user-select:none;pointer-events:none}[part=control]{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;height:inherit;width:100%}[part=label]{align-items:center;color:var(--dwc-input-label-color, var(--dwc-color-body-text));cursor:var(--dwc-cursor-click);display:none;font-size:90%;font-weight:var(--dwc-input-label-font-weight, var(--dwc-font-weight-semibold));gap:0.3rem;height:auto;margin:0;margin-bottom:var(--dwc-space-s);text-align:left;transition:var(--dwc-transition) color}[part=label]::after{color:var(--dwc-input-required-field-indicator-color, var(--dwc-color-primary-text));opacity:0;padding:0 var(--dwc-space-xs);text-align:center;transition:opacity var(--dwc-transition);width:1em}:host([required]) [part=label]::after{content:var(--dwc-input-required-field-indicator, "•");opacity:1}:host([data-has-label]) [part=label]{display:flex}[part=input-wrapper]{align-items:center;background:var(--dwc-input-background, var(--dwc-color-default-light));border:var(--dwc-input-border-width, var(--dwc-border-width)) var(--dwc-input-border-style, var(--dwc-border-style)) var(--dwc-input-border-color, var(--dwc-color-default-dark));border-radius:var(--dwc-border-radius);display:inline-flex;flex:1 1 auto;font-weight:var(--dwc-input-font-weight, var(--dwc-font-weight-semibold));height:100%;justify-content:start;overflow:hidden;position:relative;transition:var(--dwc-transition) background-color, var(--dwc-transition) color, var(--dwc-transition) border-color, var(--dwc-transition) box-shadow;vertical-align:middle;width:100%}:host(:not([disabled]):not([readonly])) [part=input-wrapper]:hover,:host(:not([disabled]):not([readonly])) [part=input-wrapper]:focus,:host(:not([disabled])) [part=input-wrapper]:hover,:host(:not([disabled])) [part=input-wrapper]:focus{background-color:var(--dwc-input-hover-background, var(--dwc-color-default-light));border-color:var(--dwc-input-hover-border-color, var(--dwc-color-primary));color:var(--dwc-input-hover-color, var(--dwc-color-on-default-text-light))}:host([has-focus]:not([disabled])) [part=input-wrapper],:host(.focus-visible:not([disabled])) [part=input-wrapper]{background-color:var(--dwc-input-hover-background, var(--dwc-color-default-light));border-color:var(--dwc-input-hover-border-color, var(--dwc-color-primary));color:var(--dwc-input-hover-color, var(--dwc-color-on-default-text-light))}:host(.focus-visible:not([disabled])) [part=input-wrapper]{box-shadow:var(--dwc-input-focus-ring, var(--dwc-focus-ring-default))}[part~=input]{appearance:none;background:none;border:unset;box-shadow:none;color:var(--dwc-input-color, currentColor);cursor:var(--dwc-cursor-text);flex:1 1 auto;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;height:100%;line-height:inherit;margin:0;min-width:0;padding:var(--dwc-space);text-align:inherit}[part~=input]::placeholder{color:var(--dwc-input-placeholder-color, var(--dwc-color-gray-60));user-select:none}[part~=input]:focus{outline:none}[part~=input]:-webkit-autofill,[part~=input]:-webkit-autofill:hover,[part~=input]:-webkit-autofill:focus,[part~=input]:-webkit-autofill:active{box-shadow:0 0 0 30px transparent inset !important}[part~=input]::selection{background:var(--dwc-input-selection-background, var(--dwc-color-primary-light));color:var(--dwc-input-selection-color, var(--dwc-color-on-primary-text-light))}:host([has-focus]:not([disabled])) [part=label]{color:var(--dwc-input-label-hover-color, var(--dwc-color-primary-text-light))}[part=prefix],[part=suffix]{cursor:default;flex:0 0 auto;text-align:center;user-select:none}[part=prefix] ::slotted(dwc-icon),[part=prefix] ::slotted(dwc-icon-button),[part=suffix] ::slotted(dwc-icon),[part=suffix] ::slotted(dwc-icon-button){display:inline-flex}[part=prefix] ::slotted(dwc-icon),[part=prefix] ::slotted(dwc-icon-button),[part=prefix] ::slotted(img){padding-left:var(--dwc-space-xs)}[part=suffix] ::slotted(dwc-icon),[part=suffix] ::slotted(dwc-icon-button),[part=suffix] ::slotted(img){padding-right:var(--dwc-space-xs)}:host ::slotted(img[slot=prefix]),:host ::slotted(img[slot=suffix]){align-items:center;display:inline-flex;flex:0 0 auto;height:var(--dwc-icon-size);vertical-align:middle;width:var(--dwc-icon-size)}dwc-alert{--dwc-alert-padding:var(--dwc-space-s) 0;margin-left:calc(var(--dwc-border-radius) / 4 + var(--dwc-border-width) * 2);text-align:left}:host([valid]),:host([invalid]){--dwc-icon-button-color:var(--dwc-input-color);--dwc-icon-button-hover-color:var(--dwc-icon-button-color);--dwc-icon-button-active-color:var(--dwc-icon-button-color)}:host([valid]:not([valid=false])){--dwc-input-label-color:var(--dwc-color-success-text);--dwc-input-label-hover-color:var(--dwc-color-success-text-light);--dwc-input-border-color:var(--dwc-color-success);--dwc-input-hover-border-color:var(--dwc-input-border-color);--dwc-input-focus-ring:var(--dwc-focus-ring-success);--dwc-input-placeholder-color:var(--dwc-color-gray-30);--dwc-input-selection-background:var(--dwc-color-success-light);--dwc-input-selection-color:var(--dwc-color-on-success-text-light);--dwc-input-required-field-indicator-color:var(--dwc-input-label-color)}:host([invalid]:not([invalid=false])){--dwc-input-label-color:var(--dwc-color-danger-text);--dwc-input-label-hover-color:var(--dwc-color-danger-text-light);--dwc-input-border-color:var(--dwc-color-danger);--dwc-input-hover-border-color:var(--dwc-input-border-color);--dwc-input-focus-ring:var(--dwc-focus-ring-danger);--dwc-input-placeholder-color:var(--dwc-color-gray-30);--dwc-input-selection-background:var(--dwc-color-danger-light);--dwc-input-selection-color:var(--dwc-color-on-danger-text-light);--dwc-alert-color:var(--dwc-input-label-color);--dwc-alert-icon-color:var(--dwc-alert-color);--dwc-input-required-field-indicator-color:var(--dwc-input-label-color)}[part=helper-text-wrapper],[part=helper-text-wrapper] ::slotted([slot=helper-text]){color:var(--dwc-color-gray-text-light);cursor:var(--dwc-cursor-text);font-size:var(--dwc-font-size-s);font-weight:var(--dwc-font-weight-normal);line-height:var(--dwc-font-line-height-s);text-align:left;transition:color 0.2s}[part=helper-text-wrapper][data-visible]{margin-left:calc(var(--dwc-border-radius) / 4 + var(--dwc-border-width) * 2);padding-top:var(--dwc-space-s)}:host([readonly]:not([data-editable])){--dwc-input-background:transparent;--dwc-input-border-color:var(--dwc-color-default-30);--dwc-input-border-style:dashed;--dwc-input-hover-background:var(--dwc-input-background);--dwc-input-hover-color:var(--dwc-input-color);--dwc-input-hover-border-color:var(--dwc-input-border-color)}:host(.bbj-transparent) [part=input-wrapper]{background:transparent !important}:host(.bbj-noborder) [part=input-wrapper]{border-color:transparent !important}:host([data-align-left]){text-align:left}:host([data-align-right]){text-align:right}:host([data-align-center]){text-align:center}:host([data-align-right]) [part=label]{justify-content:flex-end}[hidden]{display:none !important}[part=spinners]{--dwc-icon-size:1em;align-items:stretch;box-sizing:border-box;display:flex;flex-direction:column;height:100%;justify-content:center}[part=spinners]:not([hidden]){margin:var(--dwc-space-xs)}[part=spinners] dwc-icon-button{align-items:center;background:transparent;border:unset;box-sizing:border-box;display:flex;height:50%;margin:0;outline:none;padding:0;width:100%}:host([expanse=xl]){font-size:var(--dwc-font-size-xl)}:host([expanse=xl]) [part=input-wrapper]{height:var(--dwc-size-xl)}:host([expanse=l]){font-size:var(--dwc-font-size-l)}:host([expanse=l]) [part=input-wrapper]{height:var(--dwc-size-l)}:host([expanse=m]){font-size:var(--dwc-font-size-m)}:host([expanse=m]) [part=input-wrapper]{height:var(--dwc-size-m)}:host([expanse=s]){font-size:var(--dwc-font-size-s)}:host([expanse=s]) [part=input-wrapper]{height:var(--dwc-size-s)}:host([expanse=xs]){font-size:var(--dwc-font-size-xs)}:host([expanse=xs]) [part=input-wrapper]{height:var(--dwc-size-xs)}:host{text-align:right}[part~=input].hidden{left:-99999px;position:absolute;top:-99999px}';export{y as dwc_numberfield}