@riverty/web-components 5.5.0 → 5.7.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +3 -3
  3. package/custom-elements.json +19 -15
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/r-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/r-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/r-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/r-button.cjs.entry.js +1 -1
  9. package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
  10. package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
  11. package/dist/cjs/r-hint_3.cjs.entry.js +136 -38
  12. package/dist/cjs/r-icon-button.cjs.entry.js +3 -3
  13. package/dist/cjs/r-icon.cjs.entry.js +2 -2
  14. package/dist/cjs/r-input-code.cjs.entry.js +1 -1
  15. package/dist/cjs/r-input-date.cjs.entry.js +7 -7
  16. package/dist/cjs/r-input-password.cjs.entry.js +7 -4
  17. package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
  18. package/dist/cjs/r-input.cjs.entry.js +6 -4
  19. package/dist/cjs/r-radio-button.cjs.entry.js +1 -1
  20. package/dist/cjs/r-radio-group.cjs.entry.js +7 -7
  21. package/dist/cjs/r-select.cjs.entry.js +3 -3
  22. package/dist/cjs/r-textarea.cjs.entry.js +1 -1
  23. package/dist/cjs/r-toast.cjs.entry.js +9 -10
  24. package/dist/cjs/web-components.cjs.js +1 -1
  25. package/dist/collection/components/accordion/accordion.js +1 -2
  26. package/dist/collection/components/alert/alert.css +4 -4
  27. package/dist/collection/components/badge/badge.css +8 -8
  28. package/dist/collection/components/button/button.js +1 -2
  29. package/dist/collection/components/checkbox/checkbox.js +4 -5
  30. package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
  31. package/dist/collection/components/hint/hint.css +1 -1
  32. package/dist/collection/components/icon/bundled-icons/riverty-kit.json +1 -1
  33. package/dist/collection/components/icon/icon.js +2 -2
  34. package/dist/collection/components/icon/riverty-kit.js +1 -1
  35. package/dist/collection/components/icon-button/icon-button.js +3 -4
  36. package/dist/collection/components/input/input.css +1 -1
  37. package/dist/collection/components/input/input.js +24 -3
  38. package/dist/collection/components/input-code/input-code.css +1 -1
  39. package/dist/collection/components/input-date/input-date.css +1 -1
  40. package/dist/collection/components/input-date/input-date.js +7 -7
  41. package/dist/collection/components/input-password/input-password.js +8 -5
  42. package/dist/collection/components/input-phone-number/input-phone-number.js +5 -5
  43. package/dist/collection/components/label/label.js +4 -4
  44. package/dist/collection/components/radio-button/radio-button.css +1 -1
  45. package/dist/collection/components/radio-group/radio-group.css +2 -2
  46. package/dist/collection/components/radio-group/radio-group.js +7 -7
  47. package/dist/collection/components/select/select.css +2 -2
  48. package/dist/collection/components/select/select.js +3 -4
  49. package/dist/collection/components/textarea/textarea.css +1 -1
  50. package/dist/collection/components/textarea/textarea.js +1 -1
  51. package/dist/collection/components/toast/toast.css +7 -7
  52. package/dist/collection/components/toast/toast.js +10 -11
  53. package/dist/collection/components/tooltip/tooltip.css +6 -71
  54. package/dist/collection/components/tooltip/tooltip.js +135 -33
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/r-accordion.entry.js +1 -1
  57. package/dist/esm/r-alert.entry.js +1 -1
  58. package/dist/esm/r-badge.entry.js +1 -1
  59. package/dist/esm/r-button.entry.js +1 -1
  60. package/dist/esm/r-checkbox-group.entry.js +1 -1
  61. package/dist/esm/r-checkbox.entry.js +4 -4
  62. package/dist/esm/r-hint_3.entry.js +136 -38
  63. package/dist/esm/r-icon-button.entry.js +3 -3
  64. package/dist/esm/r-icon.entry.js +2 -2
  65. package/dist/esm/r-input-code.entry.js +1 -1
  66. package/dist/esm/r-input-date.entry.js +7 -7
  67. package/dist/esm/r-input-password.entry.js +7 -4
  68. package/dist/esm/r-input-phone-number.entry.js +4 -4
  69. package/dist/esm/r-input.entry.js +6 -4
  70. package/dist/esm/r-radio-button.entry.js +1 -1
  71. package/dist/esm/r-radio-group.entry.js +7 -7
  72. package/dist/esm/r-select.entry.js +3 -3
  73. package/dist/esm/r-textarea.entry.js +1 -1
  74. package/dist/esm/r-toast.entry.js +9 -10
  75. package/dist/esm/web-components.js +1 -1
  76. package/dist/types/components/accordion/accordion.d.ts +0 -1
  77. package/dist/types/components/button/button.d.ts +0 -1
  78. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  79. package/dist/types/components/icon/exports.d.ts +1 -0
  80. package/dist/types/components/icon/icon-data.d.ts +1 -0
  81. package/dist/types/components/icon/icon.d.ts +1 -1
  82. package/dist/types/components/icon/riverty-kit.d.ts +1 -0
  83. package/dist/types/components/icon-button/icon-button.d.ts +0 -1
  84. package/dist/types/components/input/input.d.ts +5 -0
  85. package/dist/types/components/input-date/input-date.d.ts +1 -1
  86. package/dist/types/components/input-password/input-password.d.ts +1 -1
  87. package/dist/types/components/input-phone-number/input-phone-number.d.ts +1 -1
  88. package/dist/types/components/label/label.d.ts +1 -1
  89. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  90. package/dist/types/components/select/select.d.ts +1 -2
  91. package/dist/types/components/textarea/textarea.d.ts +3 -3
  92. package/dist/types/components/toast/toast.d.ts +1 -3
  93. package/dist/types/components/tooltip/tooltip.d.ts +12 -4
  94. package/dist/types/components.d.ts +28 -40
  95. package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
  96. package/dist/web-components/p-289eb4b0.entry.js +1 -0
  97. package/dist/web-components/p-2b8e12ae.entry.js +1 -0
  98. package/dist/web-components/{p-89136369.entry.js → p-2e2c8a5b.entry.js} +1 -1
  99. package/dist/web-components/{p-ad4292d8.entry.js → p-3a39932b.entry.js} +1 -1
  100. package/dist/web-components/{p-43eff76a.entry.js → p-44be9992.entry.js} +1 -1
  101. package/dist/web-components/{p-230e44ae.entry.js → p-63474b32.entry.js} +1 -1
  102. package/dist/web-components/{p-0735fd75.entry.js → p-72c0c0d8.entry.js} +1 -1
  103. package/dist/web-components/{p-24bbf3b6.entry.js → p-74d2a563.entry.js} +1 -1
  104. package/dist/web-components/p-7ad8e78b.entry.js +1 -0
  105. package/dist/web-components/{p-28718c50.entry.js → p-8028c2a9.entry.js} +1 -1
  106. package/dist/web-components/{p-a683612d.entry.js → p-96ddeb7f.entry.js} +1 -1
  107. package/dist/web-components/{p-7fccc301.entry.js → p-9d898089.entry.js} +1 -1
  108. package/dist/web-components/{p-99ba15d9.entry.js → p-9e50120b.entry.js} +1 -1
  109. package/dist/web-components/{p-e49b1ec3.entry.js → p-b2f03016.entry.js} +1 -1
  110. package/dist/web-components/{p-8c577cda.entry.js → p-c300c22f.entry.js} +1 -1
  111. package/dist/web-components/{p-f1e22caa.entry.js → p-d1379ac6.entry.js} +1 -1
  112. package/dist/web-components/{p-c09a863b.entry.js → p-d93c240d.entry.js} +1 -1
  113. package/dist/web-components/p-f770e22b.entry.js +1 -0
  114. package/dist/web-components/{p-a58124c4.entry.js → p-f952161b.entry.js} +1 -1
  115. package/dist/web-components/web-components.esm.js +1 -1
  116. package/package.json +7 -6
  117. package/dist/web-components/p-00eb6986.entry.js +0 -1
  118. package/dist/web-components/p-0f4eea22.entry.js +0 -1
  119. package/dist/web-components/p-2265dae1.entry.js +0 -1
  120. package/dist/web-components/p-f22696e0.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as r,h as o,H as e,g as n}from"./p-Da7qOBFr.js";const a=class{constructor(o){t(this,o),this.rClick=r(this,"rClick"),this.type="button",this.size="large",this.variant="primary",this.iconPosition="start",this._activateTmpButton=t=>{if(!t)return;const{type:r}=this;switch(r){case"submit":case"reset":{const o=document.createElement("button");o.type=r,o.style.display="none",t.appendChild(o),o.click(),o.remove();break}}},this.handleClick=t=>{this.disabled||this.hasShadowDom&&(!this.isLink&&this.isResetOrSubmit&&(t.preventDefault(),this._activateTmpButton(this.formEl)),this.rClick.emit())},this.handleSlotChange=()=>{this.host.setAttribute("data-icon-only",`${this.isIconOnly}`)}}handleIconChange(){this.host.setAttribute("data-icon-only",`${this.isIconOnly}`)}async triggerClick(){var t;null===(t=this.nativeElement)||void 0===t||t.click()}async setFocus(){var t;null===(t=this.nativeElement)||void 0===t||t.focus()}async setBlur(){var t;null===(t=this.nativeElement)||void 0===t||t.blur()}get hasText(){return this.host.textContent.trim().length>0}get hasIcon(){const t=null!==this.host.querySelector("r-icon"),r=null!==this.host.shadowRoot.querySelector("r-icon");return t||r}get isIconOnly(){return this.hasIcon&&!this.hasText}get isLink(){return"string"==typeof this.href}get hasShadowDom(){const{host:t}=this;return!!t.shadowRoot&&!!t.attachShadow}get formEl(){const{form:t,host:r}=this;if("string"==typeof t){const r=document.getElementById(t);if(r instanceof HTMLFormElement)return r}if(void 0===t){const t=r.closest("form");if(t instanceof HTMLFormElement)return t}return null}get isResetOrSubmit(){return"submit"===this.type||"reset"===this.type}get hasIconSlot(){return!!this.host.querySelector('[slot="icon"]')}componentDidLoad(){this.host.dataset.iconOnly=`${this.isIconOnly}`}render(){const{type:t,disabled:r,form:n,href:a,target:i,isLink:s,icon:b,iconPosition:l,rAriaLabel:d}=this,u=Object.assign({},s?r?{"aria-disabled":"true",role:"link"}:{href:a,target:i}:{"aria-disabled":`${r||!1}`,disabled:r,type:t,form:n}),c={name:b,position:l};return o(e,{key:"fb420ad26b71bd10c4a7ad658209b7f626b41169"},o(s?"a":"button",Object.assign({key:"220f36bd8430a020cf4e7d8a891f52356e63e53d",class:"r-button"},u,{"aria-label":d||null,ref:t=>this.nativeElement=t,onClick:this.handleClick}),o("span",{key:"28f6850406d5dcb712c9258089078975081f58e4",class:"r-button--slot"},b&&o("r-icon",Object.assign({key:"22570d6f4a1caa37d55a39037d103c88af165db3",name:b},c,{size:"s"})),this.hasIconSlot&&o("slot",{key:"f256b87218d2aeb30e508803b43a5dac98c6d1e4",name:"icon"}),o("div",{key:"b470794d239582773d00927378199d9ffac4163f",style:{display:"contents"}},o("slot",{key:"de8cf3aa6ce8bc1ad46a9c6d0e381335ce6610e4",onSlotchange:this.handleSlotChange})))))}get host(){return n(this)}static get watchers(){return{icon:["handleIconChange"]}}};a.style=":host{display:inline-flex;vertical-align:top;opacity:1;outline:none}:host(:focus-within:not(:active)){--r-button--box-shadow:0 0 0 1px var(--r-border-focused-outlined, #fff),\n 0 0 0 3px var(--r-border-focused),\n 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-button--outline:2px solid var(--r-border-focused);--r-button--outline-offset:2px}:host(:hover:not(:active):not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--color:var(--r-text-regular, #282828);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([disabled]:not([disabled=false])){--r-button--opacity:0.4;--r-button--cursor:not-allowed;--r-button--box-shadow:none}:host([size=small]){--r-button--font-size:var(--r-font-size-300, 0.875rem);--r-button--padding:0.642em 0.857em;--r-button--height:2.75rem}:host([icon-position=end]){--r-button--slot--flex-direction:row-reverse}:host([data-icon-only=start]){--r-button--padding:0.875em}:host([variant=secondary]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-regular, #282828);--r-button--background-color:rgba(0,0,0,0)}:host([variant=secondary]:not([disabled]:not([disabled=false])):hover){--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=secondary] .r-button[aria-disabled=false]:active){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=text]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--slot--position:relative;--r-button--slot--text-decoration:underline}:host([variant=text]:hover:not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=text] .r-button[aria-disabled=false]:active){--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=text][text-position=left]){--r-button--padding:0.875em var(--spacing-175, 1.75rem) 0.875em 0}:host([variant=text][text-position=right]){--r-button--padding:0.875em 0 0.875em var(--spacing-175, 1.75rem)}:host([variant=text-inline]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:transparent;--r-button--background-color:transparent;--r-button--padding:0 0 0.5rem 0;--r-button--height:auto;--r-button--slot--text-decoration:underline}:host([variant=text-inline]:hover:not([disabled]:not([disabled=false]))){--r-button--slot--text-decoration:none;--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=text-inline]:active:not([disabled]:not([disabled=false]))){--r-button--color:var(--r-border-softer, #c9c9c9);--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=blank]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--border-width:0;--r-button--padding:0}:host([variant=blank]) .r-button:active{--r-button--border-width:0;--r-button--background-color:rgba(0,0,0,0)}:host([variant=blank]:hover:not([disabled]:not([disabled=false]))){--r-button--color:var(--r-text-regular, #282828)}:host([expanded]),:host([full-width]:not([full-width=false])){display:block;--r-button--display:flex;--r-button--width:100%}.r-button{display:var(--r-button--display, inline-flex);align-items:var(--r-button--align-items, center);justify-content:var(--r-button--justify-content, center);width:var(--r-button--width, auto);height:var(--r-button--height, 3rem);position:var(--r-button--position, static);top:var(--r-button--top, auto);left:var(--r-button--left, auto);box-sizing:var(--r-button--box-sizing, border-box);outline:var(--r-button--outline, none);outline-offset:var(--r-button--outline-offset, 0);cursor:var(--r-button--cursor, pointer);font-family:var(--r-button--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-button--font-weight, 400);text-align:var(--r-button--text-align, center);text-transform:var(--r-button--text-transform, uppercase);text-decoration:var(--r-button--text-decoration, none);background-color:var(--r-button--background-color, var(--r-background-interactive-regular, #282828));border-width:var(--r-button--border-width, 1px);border-style:var(--r-button--border-style, solid);border-color:var(--r-button--border-color, var(--r-border-strong, #000));color:var(--r-button--color, var(--r-text-inverse, #fff));font-size:var(--r-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-button--line-height, 1);letter-spacing:var(--r-button--letter-spacing, 0.04em);padding:var(--r-button--padding, 0.875em var(--r-spacing-175, 1.75rem));box-shadow:var(--r-button--box-shadow, none);pointer-events:var(--r-button--pointer-events, auto);z-index:var(--r-button--z-index, initial);vertical-align:var(--r-button--vertical-align, top);opacity:var(--r-button--opacity, 1)}.r-button[aria-disabled=false]:active{--r-button--color:var(--r-text-regular, #282828);--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-button--border-color:var(--r-border-soft, #686868)}.r-button--slot{position:var(--r-button--slot--position, relative);display:var(--r-button--slot--display, flex);flex:var(--r-button--slot--flex, 1);flex-direction:var(--r-button--slot--flex-direction, row);align-items:var(--r-button--slot--align-items, center);justify-content:var(--r-button--slot--justify-content, center);gap:var(--r-button--gap, 0.5em);font-weight:var(--r-button--slot--font-weight, var(--r-font-weight-regular, 400));text-decoration:var(--r-button--slot--text-decoration, none);text-decoration-color:var(--r-button--slot--text-decoration-color, var(--r-button-color, inherit));text-underline-offset:var(--r-button--slot--text-underline-offset, 0.5rem)}";export{a as r_button}
1
+ import{r as t,c as r,h as o,H as e,g as n}from"./p-Da7qOBFr.js";const a=class{constructor(o){t(this,o),this.rClick=r(this,"rClick"),this.type="button",this.size="large",this.variant="primary",this.iconPosition="start",this._activateTmpButton=t=>{if(!t)return;const{type:r}=this;switch(r){case"submit":case"reset":{const o=document.createElement("button");o.type=r,o.style.display="none",t.appendChild(o),o.click(),o.remove();break}}},this.handleClick=t=>{this.disabled||this.hasShadowDom&&(!this.isLink&&this.isResetOrSubmit&&(t.preventDefault(),this._activateTmpButton(this.formEl)),this.rClick.emit())},this.handleSlotChange=()=>{this.host.setAttribute("data-icon-only",`${this.isIconOnly}`)}}handleIconChange(){this.host.setAttribute("data-icon-only",`${this.isIconOnly}`)}async triggerClick(){var t;null===(t=this.nativeElement)||void 0===t||t.click()}async setFocus(){var t;null===(t=this.nativeElement)||void 0===t||t.focus()}async setBlur(){var t;null===(t=this.nativeElement)||void 0===t||t.blur()}get hasText(){return this.host.textContent.trim().length>0}get hasIcon(){const t=null!==this.host.querySelector("r-icon"),r=null!==this.host.shadowRoot.querySelector("r-icon");return t||r}get isIconOnly(){return this.hasIcon&&!this.hasText}get isLink(){return"string"==typeof this.href}get hasShadowDom(){const{host:t}=this;return!!t.shadowRoot&&!!t.attachShadow}get formEl(){const{form:t,host:r}=this;if("string"==typeof t){const r=document.getElementById(t);if(r instanceof HTMLFormElement)return r}if(void 0===t){const t=r.closest("form");if(t instanceof HTMLFormElement)return t}return null}get isResetOrSubmit(){return"submit"===this.type||"reset"===this.type}get hasIconSlot(){return!!this.host.querySelector('[slot="icon"]')}componentDidLoad(){this.host.dataset.iconOnly=`${this.isIconOnly}`}render(){const{type:t,disabled:r,form:n,href:a,target:i,isLink:s,icon:b,iconPosition:l,rAriaLabel:u}=this,d=Object.assign({},s?r?{"aria-disabled":"true",role:"link"}:{href:a,target:i}:{"aria-disabled":`${r||!1}`,disabled:r,type:t,form:n}),c={name:b,position:l};return o(e,{key:"0b48f424b11006ab76b94efcc9c2bf8f09b34102"},o(s?"a":"button",Object.assign({key:"3ce6a6d4a585fb785d44c9da2e41a6257ff83577",class:"r-button"},d,{"aria-label":u||null,ref:t=>this.nativeElement=t,onClick:this.handleClick}),o("span",{key:"1a554fd1567c800d7ba10d8862e9fd90ede883a4",class:"r-button--slot"},b&&o("r-icon",Object.assign({key:"3a05d454414ce42b0a1ead502d0a7df48c35a647",name:b},c,{size:"s"})),this.hasIconSlot&&o("slot",{key:"723ad285f16dea5a7e007a46a47e308942366b92",name:"icon"}),o("div",{key:"bf7829917767fa2d578508bbfa5c4456579f6766",style:{display:"contents"}},o("slot",{key:"59ecb9a9901fe5084af9d42ad408c7413e0c3d1f",onSlotchange:this.handleSlotChange})))))}get host(){return n(this)}static get watchers(){return{icon:["handleIconChange"]}}};a.style=":host{display:inline-flex;vertical-align:top;opacity:1;outline:none}:host(:focus-within:not(:active)){--r-button--box-shadow:0 0 0 1px var(--r-border-focused-outlined, #fff),\n 0 0 0 3px var(--r-border-focused),\n 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-button--outline:2px solid var(--r-border-focused);--r-button--outline-offset:2px}:host(:hover:not(:active):not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--color:var(--r-text-regular, #282828);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([disabled]:not([disabled=false])){--r-button--opacity:0.4;--r-button--cursor:not-allowed;--r-button--box-shadow:none}:host([size=small]){--r-button--font-size:var(--r-font-size-300, 0.875rem);--r-button--padding:0.642em 0.857em;--r-button--height:2.75rem}:host([icon-position=end]){--r-button--slot--flex-direction:row-reverse}:host([data-icon-only=start]){--r-button--padding:0.875em}:host([variant=secondary]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-regular, #282828);--r-button--background-color:rgba(0,0,0,0)}:host([variant=secondary]:not([disabled]:not([disabled=false])):hover){--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=secondary] .r-button[aria-disabled=false]:active){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=text]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--slot--position:relative;--r-button--slot--text-decoration:underline}:host([variant=text]:hover:not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=text] .r-button[aria-disabled=false]:active){--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=text][text-position=left]){--r-button--padding:0.875em var(--spacing-175, 1.75rem) 0.875em 0}:host([variant=text][text-position=right]){--r-button--padding:0.875em 0 0.875em var(--spacing-175, 1.75rem)}:host([variant=text-inline]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:transparent;--r-button--background-color:transparent;--r-button--padding:0 0 0.5rem 0;--r-button--height:auto;--r-button--slot--text-decoration:underline}:host([variant=text-inline]:hover:not([disabled]:not([disabled=false]))){--r-button--slot--text-decoration:none;--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=text-inline]:active:not([disabled]:not([disabled=false]))){--r-button--color:var(--r-border-softer, #c9c9c9);--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=blank]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--border-width:0;--r-button--padding:0}:host([variant=blank]) .r-button:active{--r-button--border-width:0;--r-button--background-color:rgba(0,0,0,0)}:host([variant=blank]:hover:not([disabled]:not([disabled=false]))){--r-button--color:var(--r-text-regular, #282828)}:host([expanded]),:host([full-width]:not([full-width=false])){display:block;--r-button--display:flex;--r-button--width:100%}.r-button{display:var(--r-button--display, inline-flex);align-items:var(--r-button--align-items, center);justify-content:var(--r-button--justify-content, center);width:var(--r-button--width, auto);height:var(--r-button--height, 3rem);position:var(--r-button--position, static);top:var(--r-button--top, auto);left:var(--r-button--left, auto);box-sizing:var(--r-button--box-sizing, border-box);outline:var(--r-button--outline, none);outline-offset:var(--r-button--outline-offset, 0);cursor:var(--r-button--cursor, pointer);font-family:var(--r-button--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-button--font-weight, 400);text-align:var(--r-button--text-align, center);text-transform:var(--r-button--text-transform, uppercase);text-decoration:var(--r-button--text-decoration, none);background-color:var(--r-button--background-color, var(--r-background-interactive-regular, #282828));border-width:var(--r-button--border-width, 1px);border-style:var(--r-button--border-style, solid);border-color:var(--r-button--border-color, var(--r-border-strong, #000));color:var(--r-button--color, var(--r-text-inverse, #fff));font-size:var(--r-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-button--line-height, 1);letter-spacing:var(--r-button--letter-spacing, 0.04em);padding:var(--r-button--padding, 0.875em var(--r-spacing-175, 1.75rem));box-shadow:var(--r-button--box-shadow, none);pointer-events:var(--r-button--pointer-events, auto);z-index:var(--r-button--z-index, initial);vertical-align:var(--r-button--vertical-align, top);opacity:var(--r-button--opacity, 1)}.r-button[aria-disabled=false]:active{--r-button--color:var(--r-text-regular, #282828);--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-button--border-color:var(--r-border-soft, #686868)}.r-button--slot{position:var(--r-button--slot--position, relative);display:var(--r-button--slot--display, flex);flex:var(--r-button--slot--flex, 1);flex-direction:var(--r-button--slot--flex-direction, row);align-items:var(--r-button--slot--align-items, center);justify-content:var(--r-button--slot--justify-content, center);gap:var(--r-button--gap, 0.5em);font-weight:var(--r-button--slot--font-weight, var(--r-font-weight-regular, 400));text-decoration:var(--r-button--slot--text-decoration, none);text-decoration-color:var(--r-button--slot--text-decoration-color, var(--r-button-color, inherit));text-underline-offset:var(--r-button--slot--text-underline-offset, 0.5rem)}";export{a as r_button}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,F as r,H as s,g as h}from"./p-Da7qOBFr.js";const l=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.value="",this.required=!1,this.showValid=!1,this.indeterminate=!1,this.allChecked=!1,this.noChecked=!1,this.validityState="",this.validityMessage="",this.uniqueId=`r-checkbox-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.initial={},this.renderMessage=()=>e("r-hint",{variant:this.valid?"success":"error",role:"alert","aria-live":"polite",id:`${this.uniqueId}-message`,class:this.message?null:"visually-hidden"},this.message),this.validateGroup=()=>{if(this.isNoValidate||!this.required)return;const t=this.checkboxes.some((t=>t.checked));this.required&&!t?(this.validityState="valueMissing",this.validityMessage=this.valueMissingMessage||"Please select at least one option.",this.invalid=!0,this.valid=!1,this.noChecked=!0):(this.validityState="valid",this.validityMessage=null,this.invalid=!1,this.valid=!0,this.noChecked=!1),this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateGroup(),this.invalid&&(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.resetValidity(),this.resetToInitial()}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}get checkboxes(){return Array.from(this.host.querySelectorAll("r-checkbox"))}get hasMessage(){return null!==this.message}async checkAll(){return this.checkboxes.forEach((t=>{t.check()})),this.allChecked=!0,this.noChecked=!1,this.indeterminate=!1,this}async uncheckAll(){return this.checkboxes.forEach((t=>{var i;null===(i=null==t?void 0:t.uncheck)||void 0===i||i.call(t)})),this.allChecked=!1,this.noChecked=!0,this.indeterminate=!1,this}handleCheckboxChange(t){if(t.target)return t.detail.element.id===`${this.uniqueId}-select-all`?(this.updateCheckAllState(t.detail.checked),void setTimeout(this.validateGroup,0)):(this.updateCheckboxesState(t),void(this.required&&this.validateGroup()))}updateCheckAllState(t){t?this.checkAll():this.uncheckAll()}updateCheckboxesState(t){const{checkboxes:i}=this,e=i.filter((t=>t.checked)),r="r-checkbox"===t.target.tagName.toLowerCase(),s=i.includes(t.target);r&&s&&(this.allChecked=e.length===i.length,this.indeterminate=e.length>0&&e.length<i.length,this.noChecked=0===e.length)}get message(){const{valid:t,validMessage:i,validityMessage:e,invalid:r,error:s,customErrorMessage:h}=this;let l=null;return t&&(l=i||null),r&&(l=s||h||e||null),l}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!1}resetToInitial(){this.invalid=this.initial.invalid,this.checked=this.initial.checked,this.indeterminate=this.initial.indeterminate,this.updateCheckAllState(this.initial.checked)}connectedCallback(){var t,i;this.initial.invalid=this.invalid,this.initial.checked=this.checked,this.initial.indeterminate=this.indeterminate,this.updateCheckAllState(this.initial.checked),null===(t=this.parentFormEl)||void 0===t||t.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm)}disconnectedCallback(){var t,i;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("submit",this.onSubmitForm),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm)}get groupDescribedby(){const{uniqueId:t,hint:i,hasMessage:e}=this;return e&&i?`${t}-message ${t}-hint`:e?`${t}-message`:i?`${t}-hint`:null}render(){const{label:t,fieldIndicator:i,help:h,helpIcon:l,helpIconColor:a,hint:o,uniqueId:c,form:n,name:d,value:u}=this,g=()=>t?e("r-label",Object.assign({id:`${c}-label`,class:"r-radio-group--label"},{fieldIndicator:i,help:h,helpIcon:l,helpIconColor:a}),t):null,b=()=>o?e("r-hint",{id:`${c}-hint`,class:"r-radio-group--hint",role:"note","aria-hidden":"true"},o):null,p={form:n,name:d,value:u};return e(s,null,e("div",{class:"r-checkbox-group",role:"group","aria-labelledby":`${c}-label`,"aria-invalid":`${this.invalid||!1}`,"aria-describedby":this.groupDescribedby},e("div",{class:"r-checkbox-group--label",id:`${c}-group-label`},this.showSelectAll?e("r-checkbox",Object.assign({id:`${c}-select-all`},p,{checked:this.allChecked,indeterminate:this.indeterminate}),g(),b()):e(r,null,e("r-checkbox",Object.assign({},p,{checked:this.allChecked,indeterminate:this.indeterminate,class:"visually-hidden"}),this.label),g(),b())),e("div",{class:"r-checkbox-group--content"},e("span",{style:{display:"contents"}},e("slot",null)),this.renderMessage())))}get host(){return h(this)}};l.style=":host([show-select-all]:not([show-select-all=false])){--r-checkbox-group--content--margin-left:calc(1.5rem + 1rem);--r-checkbox-group--content--padding-left:var(--r-spacing-100, 1rem);--r-checkbox-group--label--hint--margin-bottom:0}:host([invalid]:not([invalid=false])) ::slotted(r-checkbox){--r-checkbox--box--border-color:var(--r-status-error-regular, #da1e28);--r-checkbox--box--background-color:var(--r-status-error-soft, #fef6f6);--r-checkbox--marker--color:var(--r-status-error-regular, #da1e28)}.r-checkbox-group{display:var(--r-checkbox-group--display, flex);flex-direction:var(--r-checkbox-group--flex-direction, column);border:var(--r-checkbox-group--border, none);margin:var(--r-checkbox-group--margin, 0);padding:var(--r-checkbox-group--padding, 0);width:var(--r-checkbox-group--width, 100%)}.r-checkbox-group--label{padding:var(--r-checkbox-group--label--padding, 0);display:var(--r-checkbox-group--label--display, block);width:var(--r-checkbox-group--label--width, 100%);margin:var(--r-checkbox-group--label--margin, 0);padding:var(--r-checkbox-group--label--padding, 0)}.r-checkbox-group--label r-hint{--r-hint--margin-bottom:var(--r-checkbox-group--label--hint--margin-bottom, var(--r-spacing-100, 1rem))}.r-checkbox-group--content{margin-left:var(--r-checkbox-group--content--margin-left, 0);display:var(--r-checkbox-group--content--display, flex);flex-direction:var(--r-checkbox-group--content--flex-direction, column);gap:var(--r-checkbox-group--content--gap, var(--r-spacing-050, 0.5rem));padding-left:var(--r-checkbox-group--content--padding-left, 0)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{l as r_checkbox_group}
1
+ import{r as t,c as i,h as e,F as r,H as s,g as h}from"./p-Da7qOBFr.js";const l=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.value="",this.required=!1,this.showValid=!1,this.indeterminate=!1,this.allChecked=!1,this.noChecked=!1,this.validityState="",this.validityMessage="",this.uniqueId=`r-checkbox-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.initial={},this.renderMessage=()=>e("r-hint",{variant:this.valid?"success":"error",role:"alert","aria-live":"polite",id:`${this.uniqueId}-message`,class:this.message?null:"visually-hidden"},this.message),this.validateGroup=()=>{if(this.isNoValidate||!this.required)return;const t=this.checkboxes.some((t=>t.checked));this.required&&!t?(this.validityState="valueMissing",this.validityMessage=this.valueMissingMessage||"Please select at least one option.",this.invalid=!0,this.valid=!1,this.noChecked=!0):(this.validityState="valid",this.validityMessage=null,this.invalid=!1,this.valid=!0,this.noChecked=!1),this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateGroup(),this.invalid&&(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.resetValidity(),this.resetToInitial()}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}get checkboxes(){return Array.from(this.host.querySelectorAll("r-checkbox"))}get hasMessage(){return null!==this.message}async checkAll(){return this.checkboxes.forEach((t=>{t.check()})),this.allChecked=!0,this.noChecked=!1,this.indeterminate=!1,this}async uncheckAll(){return this.checkboxes.forEach((t=>{var i;null===(i=null==t?void 0:t.uncheck)||void 0===i||i.call(t)})),this.allChecked=!1,this.noChecked=!0,this.indeterminate=!1,this}handleCheckboxChange(t){if(t.target)return t.detail.element.id===`${this.uniqueId}-select-all`?(this.updateCheckAllState(t.detail.checked),void setTimeout(this.validateGroup,0)):(this.updateCheckboxesState(t),void(this.required&&this.validateGroup()))}updateCheckAllState(t){t?this.checkAll():this.uncheckAll()}updateCheckboxesState(t){const{checkboxes:i}=this,e=i.filter((t=>t.checked)),r="r-checkbox"===t.target.tagName.toLowerCase(),s=i.includes(t.target);r&&s&&(this.allChecked=e.length===i.length,this.indeterminate=e.length>0&&e.length<i.length,this.noChecked=0===e.length)}get message(){const{valid:t,validMessage:i,validityMessage:e,invalid:r,error:s,customErrorMessage:h}=this;let l=null;return t&&(l=i||null),r&&(l=s||h||e||null),l}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!1}resetToInitial(){this.invalid=this.initial.invalid,this.checked=this.initial.checked,this.indeterminate=this.initial.indeterminate,this.updateCheckAllState(this.initial.checked)}connectedCallback(){var t,i;this.initial.invalid=this.invalid,this.initial.checked=this.checked,this.initial.indeterminate=this.indeterminate,this.updateCheckAllState(this.initial.checked),null===(t=this.parentFormEl)||void 0===t||t.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm)}disconnectedCallback(){var t,i;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("submit",this.onSubmitForm),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm)}get groupDescribedby(){const{uniqueId:t,hint:i,hasMessage:e}=this;return e&&i?`${t}-message ${t}-hint`:e?`${t}-message`:i?`${t}-hint`:null}render(){const{label:t,fieldIndicator:i,help:h,helpIcon:l,helpIconColor:o,hint:a,uniqueId:c,form:n,name:d,value:u}=this,g=()=>t?e("r-label",Object.assign({id:`${c}-label`,class:"r-radio-group--label"},{fieldIndicator:i,help:h,helpIcon:l,helpIconColor:o}),t):null,b=()=>a?e("r-hint",{id:`${c}-hint`,class:"r-radio-group--hint",role:"note","aria-hidden":"true"},a):null,p={form:n,name:d,value:u};return e(s,null,e("div",{class:"r-checkbox-group",role:"group","aria-labelledby":`${c}-label`,"aria-invalid":`${this.invalid||!1}`,"aria-describedby":this.groupDescribedby},e("div",{class:"r-checkbox-group--label",id:`${c}-group-label`},this.showSelectAll?e("r-checkbox",Object.assign({id:`${c}-select-all`},p,{checked:this.allChecked,indeterminate:this.indeterminate}),g(),b()):e(r,null,e("r-checkbox",Object.assign({},p,{checked:this.allChecked,indeterminate:this.indeterminate,class:"visually-hidden"}),this.label),g(),b())),e("div",{class:"r-checkbox-group--content"},e("span",{style:{display:"contents"}},e("slot",null)),this.renderMessage())))}get host(){return h(this)}};l.style=":host([show-select-all]:not([show-select-all=false])){--r-checkbox-group--content--margin-left:calc(1.5rem + 1rem);--r-checkbox-group--content--padding-left:var(--r-spacing-100, 1rem);--r-checkbox-group--label--hint--margin-bottom:0}:host([invalid]:not([invalid=false])) ::slotted(r-checkbox){--r-checkbox--box--border-color:var(--r-status-error-regular, #b00c15);--r-checkbox--box--background-color:var(--r-status-error-soft, #fef6f6);--r-checkbox--marker--color:var(--r-status-error-regular, #b00c15)}.r-checkbox-group{display:var(--r-checkbox-group--display, flex);flex-direction:var(--r-checkbox-group--flex-direction, column);border:var(--r-checkbox-group--border, none);margin:var(--r-checkbox-group--margin, 0);padding:var(--r-checkbox-group--padding, 0);width:var(--r-checkbox-group--width, 100%)}.r-checkbox-group--label{padding:var(--r-checkbox-group--label--padding, 0);display:var(--r-checkbox-group--label--display, block);width:var(--r-checkbox-group--label--width, 100%);margin:var(--r-checkbox-group--label--margin, 0);padding:var(--r-checkbox-group--label--padding, 0)}.r-checkbox-group--label r-hint{--r-hint--margin-bottom:var(--r-checkbox-group--label--hint--margin-bottom, var(--r-spacing-100, 1rem))}.r-checkbox-group--content{margin-left:var(--r-checkbox-group--content--margin-left, 0);display:var(--r-checkbox-group--content--display, flex);flex-direction:var(--r-checkbox-group--content--flex-direction, column);gap:var(--r-checkbox-group--content--gap, var(--r-spacing-050, 0.5rem));padding-left:var(--r-checkbox-group--content--padding-left, 0)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{l as r_checkbox_group}
@@ -1 +1 @@
1
- import{r as e,c as n,h as a,H as o,g as t}from"./p-Da7qOBFr.js";import{a as h}from"./p-DvLT8-y3.js";var i,_={},l={};function r(){return i||(i=1,Object.defineProperty(l,"__esModule",{value:!0}),l.default=[{alpha2:"US",alpha3:"USA",country_code:"1",country_name:"United States",mobile_begin_with:["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","220","223","224","225","227","228","229","231","234","239","240","248","251","252","253","254","256","260","262","267","269","270","272","274","276","278","281","283","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","327","329","330","331","332","334","336","337","339","341","346","347","351","352","353","360","361","364","369","380","385","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","424","425","430","432","434","435","440","441","442","443","445","447","458","463","464","469","470","472","475","478","479","480","484","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","531","534","539","540","541","551","557","559","561","562","563","564","567","570","571","572","573","574","575","580","582","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","627","628","629","630","631","636","640","641","645","646","650","651","656","657","659","660","661","662","667","669","678","679","680","681","682","689","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","720","724","725","726","727","728","730","731","732","734","737","740","743","747","752","754","757","760","762","763","764","765","769","770","771","772","773","774","775","779","781","785","786","787","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","820","828","830","831","832","835","838","840","843","845","847","848","850","854","856","857","858","859","860","862","863","864","865","870","872","878","901","903","904","906","907","908","909","910","912","913","914","915","916","917","918","919","920","925","927","928","929","930","931","934","935","936","937","938","939","940","941","945","947","949","951","952","954","956","957","959","970","971","972","973","975","978","979","980","984","985","986","989","888","800","833","844","855","866","877","279","340","983","448","943","363","326","839","826","948","924"],phone_number_lengths:[10]},{alpha2:"AW",alpha3:"ABW",country_code:"297",country_name:"Aruba",mobile_begin_with:["56","59","64","73","74","99"],phone_number_lengths:[7]},{alpha2:"AF",alpha3:"AFG",country_code:"93",country_name:"Afghanistan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"AO",alpha3:"AGO",country_code:"244",country_name:"Angola",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"AI",alpha3:"AIA",country_code:"1",country_name:"Anguilla",mobile_begin_with:["2642","2644","2645","2647"],phone_number_lengths:[10]},{alpha2:"AX",alpha3:"ALA",country_code:"358",country_name:"Åland Islands",mobile_begin_with:["18"],phone_number_lengths:[6,7,8]},{alpha2:"AL",alpha3:"ALB",country_code:"355",country_name:"Albania",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"AD",alpha3:"AND",country_code:"376",country_name:"Andorra",mobile_begin_with:["3","4","6"],phone_number_lengths:[6]},{alpha2:"BQ",alpha3:"BES",country_code:"599",country_name:"Caribbean Netherlands",mobile_begin_with:["3","416","700","701","795"],phone_number_lengths:[7]},{alpha2:"AE",alpha3:"ARE",country_code:"971",country_name:"United Arab Emirates",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"AR",alpha3:"ARG",country_code:"54",country_name:"Argentina",mobile_begin_with:["1","2","3"],phone_number_lengths:[8,9,10,11,12]},{alpha2:"AM",alpha3:"ARM",country_code:"374",country_name:"Armenia",mobile_begin_with:["3","4","5","7","9"],phone_number_lengths:[8]},{alpha2:"AS",alpha3:"ASM",country_code:"1",country_name:"American Samoa",mobile_begin_with:["684733","684258"],phone_number_lengths:[10]},{alpha2:"AG",alpha3:"ATG",country_code:"1",country_name:"Antigua and Barbuda",mobile_begin_with:["2687"],phone_number_lengths:[10]},{alpha2:"AU",alpha3:"AUS",country_code:"61",country_name:"Australia",mobile_begin_with:["4"],phone_number_lengths:[9]},{alpha2:"AT",alpha3:"AUT",country_code:"43",country_name:"Austria",mobile_begin_with:["6"],phone_number_lengths:[10,11,12,13,14]},{alpha2:"AZ",alpha3:"AZE",country_code:"994",country_name:"Azerbaijan",mobile_begin_with:["10","50","51","55","60","70","77","99"],phone_number_lengths:[9]},{alpha2:"BI",alpha3:"BDI",country_code:"257",country_name:"Burundi",mobile_begin_with:["71","72","75","76","77","79","29","61","68","69"],phone_number_lengths:[8]},{alpha2:"BE",alpha3:"BEL",country_code:"32",country_name:"Belgium",mobile_begin_with:["4","3"],phone_number_lengths:[9,8]},{alpha2:"BJ",alpha3:"BEN",country_code:"229",country_name:"Benin",mobile_begin_with:["4","6","9"],phone_number_lengths:[8]},{alpha2:"BF",alpha3:"BFA",country_code:"226",country_name:"Burkina Faso",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BD",alpha3:"BGD",country_code:"880",country_name:"Bangladesh",mobile_begin_with:["1"],phone_number_lengths:[8,9,10]},{alpha2:"BG",alpha3:"BGR",country_code:"359",country_name:"Bulgaria",mobile_begin_with:["87","88","89","98","99","43"],phone_number_lengths:[8,9]},{alpha2:"BH",alpha3:"BHR",country_code:"973",country_name:"Bahrain",mobile_begin_with:["3"],phone_number_lengths:[8]},{alpha2:"BS",alpha3:"BHS",country_code:"1",country_name:"Bahamas",mobile_begin_with:["242"],phone_number_lengths:[10]},{alpha2:"BA",alpha3:"BIH",country_code:"387",country_name:"Bosnia and Herzegovina",mobile_begin_with:["6"],phone_number_lengths:[8,9]},{alpha2:"BY",alpha3:"BLR",country_code:"375",country_name:"Belarus",mobile_begin_with:["25","29","33","44"],phone_number_lengths:[9]},{alpha2:"BZ",alpha3:"BLZ",country_code:"501",country_name:"Belize",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"BM",alpha3:"BMU",country_code:"1",country_name:"Bermuda",mobile_begin_with:["4413","4415","4417"],phone_number_lengths:[10]},{alpha2:"BO",alpha3:"BOL",country_code:"591",country_name:"Bolivia",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BR",alpha3:"BRA",country_code:"55",country_name:"Brazil",mobile_begin_with:["119","129","139","149","159","169","179","189","199","219","229","249","279","289","319","329","339","349","359","379","389","419","429","439","449","459","469","479","489","499","519","539","549","559","619","629","639","649","659","669","679","689","699","719","739","749","759","779","799","819","829","839","849","859","869","879","889","899","919","929","939","949","959","969","979","989","999"],phone_number_lengths:[10,11]},{alpha2:"BB",alpha3:"BRB",country_code:"1",country_name:"Barbados",mobile_begin_with:["246"],phone_number_lengths:[10]},{alpha2:"BN",alpha3:"BRN",country_code:"673",country_name:"Brunei Darussalam",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"BT",alpha3:"BTN",country_code:"975",country_name:"Bhutan",mobile_begin_with:["17"],phone_number_lengths:[8]},{alpha2:"BW",alpha3:"BWA",country_code:"267",country_name:"Botswana",mobile_begin_with:["71","72","73","74","75","76","77","78","79"],phone_number_lengths:[8]},{alpha2:"CF",alpha3:"CAF",country_code:"236",country_name:"Central African Republic",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"CA",alpha3:"CAN",country_code:"1",country_name:"Canada",mobile_begin_with:["204","226","236","249","250","263","289","306","343","354","365","367","368","403","416","418","431","437","438","450","468","474","506","514","519","548","579","581","584","587","600","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","902","905","428","382","942"],phone_number_lengths:[10]},{alpha2:"CH",alpha3:"CHE",country_code:"41",country_name:"Switzerland",mobile_begin_with:["74","75","76","77","78","79"],phone_number_lengths:[9]},{alpha2:"CL",alpha3:"CHL",country_code:"56",country_name:"Chile",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"CN",alpha3:"CHN",country_code:"86",country_name:"China",mobile_begin_with:["13","14","15","17","18","19","16"],phone_number_lengths:[11]},{alpha2:"CI",alpha3:"CIV",country_code:"225",country_name:"Côte D'Ivoire",mobile_begin_with:["0","4","5","6","7","8"],phone_number_lengths:[10]},{alpha2:"CM",alpha3:"CMR",country_code:"237",country_name:"Cameroon",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"CD",alpha3:"COD",country_code:"243",country_name:"Congo, The Democratic Republic Of The",mobile_begin_with:["8","9"],phone_number_lengths:[9]},{alpha2:"CG",alpha3:"COG",country_code:"242",country_name:"Congo",mobile_begin_with:["0"],phone_number_lengths:[9]},{alpha2:"CK",alpha3:"COK",country_code:"682",country_name:"Cook Islands",mobile_begin_with:["5","7"],phone_number_lengths:[5]},{alpha2:"CO",alpha3:"COL",country_code:"57",country_name:"Colombia",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"CW",alpha3:"CUW",country_code:"599",country_name:"Curaçao",mobile_begin_with:["95","96"],phone_number_lengths:[8]},{alpha2:"KM",alpha3:"COM",country_code:"269",country_name:"Comoros",mobile_begin_with:["3","76"],phone_number_lengths:[7]},{alpha2:"CV",alpha3:"CPV",country_code:"238",country_name:"Cape Verde",mobile_begin_with:["5","9"],phone_number_lengths:[7]},{alpha2:"CR",alpha3:"CRI",country_code:"506",country_name:"Costa Rica",mobile_begin_with:["5","6","7","8"],phone_number_lengths:[8]},{alpha2:"CU",alpha3:"CUB",country_code:"53",country_name:"Cuba",mobile_begin_with:["5","6"],phone_number_lengths:[8]},{alpha2:"KY",alpha3:"CYM",country_code:"1",country_name:"Cayman Islands",mobile_begin_with:["345"],phone_number_lengths:[10]},{alpha2:"CY",alpha3:"CYP",country_code:"357",country_name:"Cyprus",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"CZ",alpha3:"CZE",country_code:"420",country_name:"Czech Republic",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"DE",alpha3:"DEU",country_code:"49",country_name:"Germany",mobile_begin_with:["15","16","17"],phone_number_lengths:[10,11]},{alpha2:"DJ",alpha3:"DJI",country_code:"253",country_name:"Djibouti",mobile_begin_with:["77"],phone_number_lengths:[8]},{alpha2:"DM",alpha3:"DMA",country_code:"1",country_name:"Dominica",mobile_begin_with:["767"],phone_number_lengths:[10]},{alpha2:"DK",alpha3:"DNK",country_code:"45",country_name:"Denmark",mobile_begin_with:["2","30","31","40","41","42","50","51","52","53","60","61","71","81","91","92","93","342","344","345","346","347","348","349","356","357","359","362","365","366","389","398","431","441","462","466","468","472","474","476","478","485","486","488","489","493","494","495","496","498","499","542","543","545","551","552","556","571","572","573","574","577","579","584","586","587","589","597","598","627","629","641","649","658","662","663","664","665","667","692","693","694","697","771","772","782","783","785","786","788","789","826","827","829"],phone_number_lengths:[8]},{alpha2:"DO",alpha3:"DOM",country_code:"1",country_name:"Dominican Republic",mobile_begin_with:["809","829","849"],phone_number_lengths:[10]},{alpha2:"DZ",alpha3:"DZA",country_code:"213",country_name:"Algeria",mobile_begin_with:["5","6","7"],phone_number_lengths:[9]},{alpha2:"EC",alpha3:"ECU",country_code:"593",country_name:"Ecuador",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"EG",alpha3:"EGY",country_code:"20",country_name:"Egypt",mobile_begin_with:["1"],phone_number_lengths:[10,8]},{alpha2:"ER",alpha3:"ERI",country_code:"291",country_name:"Eritrea",mobile_begin_with:["1","7","8"],phone_number_lengths:[7]},{alpha2:"ES",alpha3:"ESP",country_code:"34",country_name:"Spain",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"EE",alpha3:"EST",country_code:"372",country_name:"Estonia",mobile_begin_with:["5","81","82","83"],phone_number_lengths:[7,8]},{alpha2:"ET",alpha3:"ETH",country_code:"251",country_name:"Ethiopia",mobile_begin_with:["7","9"],phone_number_lengths:[9]},{alpha2:"FI",alpha3:"FIN",country_code:"358",country_name:"Finland",mobile_begin_with:["4","5"],phone_number_lengths:[6,7,9,10]},{alpha2:"FJ",alpha3:"FJI",country_code:"679",country_name:"Fiji",mobile_begin_with:["2","7","8","9"],phone_number_lengths:[7]},{alpha2:"FK",alpha3:"FLK",country_code:"500",country_name:"Falkland Islands (Malvinas)",mobile_begin_with:["5","6"],phone_number_lengths:[5]},{alpha2:"FR",alpha3:"FRA",country_code:"33",country_name:"France",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"FO",alpha3:"FRO",country_code:"298",country_name:"Faroe Islands",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"FM",alpha3:"FSM",country_code:"691",country_name:"Micronesia, Federated States Of",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"GA",alpha3:"GAB",country_code:"241",country_name:"Gabon",mobile_begin_with:["2","3","4","5","6","7"],phone_number_lengths:[7]},{alpha2:"GB",alpha3:"GBR",country_code:"44",country_name:"United Kingdom",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"GE",alpha3:"GEO",country_code:"995",country_name:"Georgia",mobile_begin_with:["5","7"],phone_number_lengths:[9]},{alpha2:"GH",alpha3:"GHA",country_code:"233",country_name:"Ghana",mobile_begin_with:["2","5"],phone_number_lengths:[9]},{alpha2:"GI",alpha3:"GIB",country_code:"350",country_name:"Gibraltar",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"GN",alpha3:"GIN",country_code:"224",country_name:"Guinea",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"GP",alpha3:"GLP",country_code:"590",country_name:"Guadeloupe",mobile_begin_with:["690","691"],phone_number_lengths:[9]},{alpha2:"GM",alpha3:"GMB",country_code:"220",country_name:"Gambia",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"GW",alpha3:"GNB",country_code:"245",country_name:"Guinea-Bissau",mobile_begin_with:["5","6","7"],phone_number_lengths:[7]},{alpha2:"GQ",alpha3:"GNQ",country_code:"240",country_name:"Equatorial Guinea",mobile_begin_with:["222","551"],phone_number_lengths:[9]},{alpha2:"GR",alpha3:"GRC",country_code:"30",country_name:"Greece",mobile_begin_with:["6"],phone_number_lengths:[10]},{alpha2:"GD",alpha3:"GRD",country_code:"1",country_name:"Grenada",mobile_begin_with:["473"],phone_number_lengths:[10]},{alpha2:"GL",alpha3:"GRL",country_code:"299",country_name:"Greenland",mobile_begin_with:["2","4","5"],phone_number_lengths:[6]},{alpha2:"GT",alpha3:"GTM",country_code:"502",country_name:"Guatemala",mobile_begin_with:["3","4","5"],phone_number_lengths:[8]},{alpha2:"GF",alpha3:"GUF",country_code:"594",country_name:"French Guiana",mobile_begin_with:["694"],phone_number_lengths:[9]},{alpha2:"GU",alpha3:"GUM",country_code:"1",country_name:"Guam",mobile_begin_with:["671"],phone_number_lengths:[10]},{alpha2:"GY",alpha3:"GUY",country_code:"592",country_name:"Guyana",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"HK",alpha3:"HKG",country_code:"852",country_name:"Hong Kong",mobile_begin_with:["4","5","6","70","71","72","73","81","82","83","84","85","86","87","88","89","9"],phone_number_lengths:[8]},{alpha2:"HN",alpha3:"HND",country_code:"504",country_name:"Honduras",mobile_begin_with:["3","7","8","9"],phone_number_lengths:[8]},{alpha2:"HR",alpha3:"HRV",country_code:"385",country_name:"Croatia",mobile_begin_with:["9"],phone_number_lengths:[8,9]},{alpha2:"HT",alpha3:"HTI",country_code:"509",country_name:"Haiti",mobile_begin_with:["3","4"],phone_number_lengths:[8]},{alpha2:"HU",alpha3:"HUN",country_code:"36",country_name:"Hungary",mobile_begin_with:["20","30","31","50","70"],phone_number_lengths:[9]},{alpha2:"ID",alpha3:"IDN",country_code:"62",country_name:"Indonesia",mobile_begin_with:["8"],phone_number_lengths:[9,10,11,12]},{alpha2:"IN",alpha3:"IND",country_code:"91",country_name:"India",mobile_begin_with:["6","7","8","9"],phone_number_lengths:[10]},{alpha2:"IE",alpha3:"IRL",country_code:"353",country_name:"Ireland",mobile_begin_with:["82","83","84","85","86","87","88","89"],phone_number_lengths:[9]},{alpha2:"IR",alpha3:"IRN",country_code:"98",country_name:"Iran, Islamic Republic Of",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"IQ",alpha3:"IRQ",country_code:"964",country_name:"Iraq",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"IS",alpha3:"ISL",country_code:"354",country_name:"Iceland",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"IL",alpha3:"ISR",country_code:"972",country_name:"Israel",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"IT",alpha3:"ITA",country_code:"39",country_name:"Italy",mobile_begin_with:["3"],phone_number_lengths:[9,10]},{alpha2:"JM",alpha3:"JAM",country_code:"1",country_name:"Jamaica",mobile_begin_with:["876"],phone_number_lengths:[10]},{alpha2:"JO",alpha3:"JOR",country_code:"962",country_name:"Jordan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"JP",alpha3:"JPN",country_code:"81",country_name:"Japan",mobile_begin_with:["70","80","90"],phone_number_lengths:[10]},{alpha2:"KZ",alpha3:"KAZ",country_code:"7",country_name:"Kazakhstan",mobile_begin_with:["70","74","77"],phone_number_lengths:[10]},{alpha2:"KE",alpha3:"KEN",country_code:"254",country_name:"Kenya",mobile_begin_with:["7","1"],phone_number_lengths:[9]},{alpha2:"KG",alpha3:"KGZ",country_code:"996",country_name:"Kyrgyzstan",mobile_begin_with:["20","22","31258","312973","5","600","7","88","912","99"],phone_number_lengths:[9]},{alpha2:"KH",alpha3:"KHM",country_code:"855",country_name:"Cambodia",mobile_begin_with:["1","6","7","8","9"],phone_number_lengths:[8,9]},{alpha2:"KI",alpha3:"KIR",country_code:"686",country_name:"Kiribati",mobile_begin_with:["9","30"],phone_number_lengths:[5]},{alpha2:"KN",alpha3:"KNA",country_code:"1",country_name:"Saint Kitts And Nevis",mobile_begin_with:["869"],phone_number_lengths:[10]},{alpha2:"KR",alpha3:"KOR",country_code:"82",country_name:"Korea, Republic of",mobile_begin_with:["1"],phone_number_lengths:[9,10]},{alpha2:"XK",alpha3:"XKX",country_code:"383",country_name:"Kosovo, Republic of",mobile_begin_with:["43","44","45","46","47","48","49"],phone_number_lengths:[8]},{alpha2:"KW",alpha3:"KWT",country_code:"965",country_name:"Kuwait",mobile_begin_with:["5","6","9"],phone_number_lengths:[8]},{alpha2:"LA",alpha3:"LAO",country_code:"856",country_name:"Lao People's Democratic Republic",mobile_begin_with:["20"],phone_number_lengths:[10]},{alpha2:"LB",alpha3:"LBN",country_code:"961",country_name:"Lebanon",mobile_begin_with:["3","7","8"],phone_number_lengths:[7,8]},{alpha2:"LR",alpha3:"LBR",country_code:"231",country_name:"Liberia",mobile_begin_with:["4","5","6","7"],phone_number_lengths:[7,8]},{alpha2:"LY",alpha3:"LBY",country_code:"218",country_name:"Libyan Arab Jamahiriya",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"LC",alpha3:"LCA",country_code:"1",country_name:"Saint Lucia",mobile_begin_with:["758"],phone_number_lengths:[10]},{alpha2:"LI",alpha3:"LIE",country_code:"423",country_name:"Liechtenstein",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"LK",alpha3:"LKA",country_code:"94",country_name:"Sri Lanka",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"LS",alpha3:"LSO",country_code:"266",country_name:"Lesotho",mobile_begin_with:["5","6"],phone_number_lengths:[8]},{alpha2:"LT",alpha3:"LTU",country_code:"370",country_name:"Lithuania",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"LU",alpha3:"LUX",country_code:"352",country_name:"Luxembourg",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"LV",alpha3:"LVA",country_code:"371",country_name:"Latvia",mobile_begin_with:["2"],phone_number_lengths:[8]},{alpha2:"MO",alpha3:"MAC",country_code:"853",country_name:"Macao",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MA",alpha3:"MAR",country_code:"212",country_name:"Morocco",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"MC",alpha3:"MCO",country_code:"377",country_name:"Monaco",mobile_begin_with:["4","6"],phone_number_lengths:[8,9]},{alpha2:"MD",alpha3:"MDA",country_code:"373",country_name:"Moldova, Republic of",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MG",alpha3:"MDG",country_code:"261",country_name:"Madagascar",mobile_begin_with:["3"],phone_number_lengths:[9]},{alpha2:"MV",alpha3:"MDV",country_code:"960",country_name:"Maldives",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"MX",alpha3:"MEX",country_code:"52",country_name:"Mexico",mobile_begin_with:[""],phone_number_lengths:[10,11]},{alpha2:"MH",alpha3:"MHL",country_code:"692",country_name:"Marshall Islands",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"MK",alpha3:"MKD",country_code:"389",country_name:"Macedonia, the Former Yugoslav Republic Of",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"ML",alpha3:"MLI",country_code:"223",country_name:"Mali",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MT",alpha3:"MLT",country_code:"356",country_name:"Malta",mobile_begin_with:["7","9"],phone_number_lengths:[8]},{alpha2:"MM",alpha3:"MMR",country_code:"95",country_name:"Myanmar",mobile_begin_with:["9"],phone_number_lengths:[8,9,10]},{alpha2:"ME",alpha3:"MNE",country_code:"382",country_name:"Montenegro",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MN",alpha3:"MNG",country_code:"976",country_name:"Mongolia",mobile_begin_with:["5","8","9"],phone_number_lengths:[8]},{alpha2:"MP",alpha3:"MNP",country_code:"1",country_name:"Northern Mariana Islands",mobile_begin_with:["670"],phone_number_lengths:[10]},{alpha2:"MZ",alpha3:"MOZ",country_code:"258",country_name:"Mozambique",mobile_begin_with:["8"],phone_number_lengths:[9]},{alpha2:"MR",alpha3:"MRT",country_code:"222",country_name:"Mauritania",mobile_begin_with:[],phone_number_lengths:[8]},{alpha2:"MS",alpha3:"MSR",country_code:"1",country_name:"Montserrat",mobile_begin_with:["664"],phone_number_lengths:[10]},{alpha2:"MQ",alpha3:"MTQ",country_code:"596",country_name:"Martinique",mobile_begin_with:["696","697"],phone_number_lengths:[9]},{alpha2:"MU",alpha3:"MUS",country_code:"230",country_name:"Mauritius",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"MW",alpha3:"MWI",country_code:"265",country_name:"Malawi",mobile_begin_with:["77","88","99"],phone_number_lengths:[9]},{alpha2:"MY",alpha3:"MYS",country_code:"60",country_name:"Malaysia",mobile_begin_with:["1","6"],phone_number_lengths:[9,10,8]},{alpha2:"YT",alpha3:"MYT",country_code:"262",country_name:"Mayotte",mobile_begin_with:["639"],phone_number_lengths:[9]},{alpha2:"NA",alpha3:"NAM",country_code:"264",country_name:"Namibia",mobile_begin_with:["60","81","82","85"],phone_number_lengths:[9]},{alpha2:"NC",alpha3:"NCL",country_code:"687",country_name:"New Caledonia",mobile_begin_with:["5","7","8","9"],phone_number_lengths:[6]},{alpha2:"NE",alpha3:"NER",country_code:"227",country_name:"Niger",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"NF",alpha3:"NFK",country_code:"672",country_name:"Norfolk Island",mobile_begin_with:["5","8"],phone_number_lengths:[5]},{alpha2:"NG",alpha3:"NGA",country_code:"234",country_name:"Nigeria",mobile_begin_with:["70","80","81","90","91"],phone_number_lengths:[10]},{alpha2:"NI",alpha3:"NIC",country_code:"505",country_name:"Nicaragua",mobile_begin_with:["7","8"],phone_number_lengths:[8]},{alpha2:"NU",alpha3:"NIU",country_code:"683",country_name:"Niue",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"NL",alpha3:"NLD",country_code:"31",country_name:"Netherlands",mobile_begin_with:["6","97"],phone_number_lengths:[9,11]},{alpha2:"NO",alpha3:"NOR",country_code:"47",country_name:"Norway",mobile_begin_with:["4","9"],phone_number_lengths:[8]},{alpha2:"NP",alpha3:"NPL",country_code:"977",country_name:"Nepal",mobile_begin_with:["97","98"],phone_number_lengths:[10]},{alpha2:"NR",alpha3:"NRU",country_code:"674",country_name:"Nauru",mobile_begin_with:["555"],phone_number_lengths:[7]},{alpha2:"NZ",alpha3:"NZL",country_code:"64",country_name:"New Zealand",mobile_begin_with:["2"],phone_number_lengths:[8,9,10]},{alpha2:"OM",alpha3:"OMN",country_code:"968",country_name:"Oman",mobile_begin_with:["7","9"],phone_number_lengths:[8]},{alpha2:"PK",alpha3:"PAK",country_code:"92",country_name:"Pakistan",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"PA",alpha3:"PAN",country_code:"507",country_name:"Panama",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"PE",alpha3:"PER",country_code:"51",country_name:"Peru",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PH",alpha3:"PHL",country_code:"63",country_name:"Philippines",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"PW",alpha3:"PLW",country_code:"680",country_name:"Palau",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"PG",alpha3:"PNG",country_code:"675",country_name:"Papua New Guinea",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"PL",alpha3:"POL",country_code:"48",country_name:"Poland",mobile_begin_with:["4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"PR",alpha3:"PRI",country_code:"1",country_name:"Puerto Rico",mobile_begin_with:["787","939"],phone_number_lengths:[10]},{alpha2:"PT",alpha3:"PRT",country_code:"351",country_name:"Portugal",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PY",alpha3:"PRY",country_code:"595",country_name:"Paraguay",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PS",alpha3:"PSE",country_code:"970",country_name:"Palestinian Territory, Occupied",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"PF",alpha3:"PYF",country_code:"689",country_name:"French Polynesia",mobile_begin_with:["8"],phone_number_lengths:[8]},{alpha2:"QA",alpha3:"QAT",country_code:"974",country_name:"Qatar",mobile_begin_with:["3","5","6","7"],phone_number_lengths:[8]},{alpha2:"RE",alpha3:"REU",country_code:"262",country_name:"Réunion",mobile_begin_with:["692","693"],phone_number_lengths:[9]},{alpha2:"RO",alpha3:"ROU",country_code:"40",country_name:"Romania",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"RU",alpha3:"RUS",country_code:"7",country_name:"Russian Federation",mobile_begin_with:["9","495","498","499","835"],phone_number_lengths:[10]},{alpha2:"RW",alpha3:"RWA",country_code:"250",country_name:"Rwanda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SA",alpha3:"SAU",country_code:"966",country_name:"Saudi Arabia",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"SD",alpha3:"SDN",country_code:"249",country_name:"Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SS",alpha3:"SSD",country_code:"211",country_name:"South Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SN",alpha3:"SEN",country_code:"221",country_name:"Senegal",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SG",alpha3:"SGP",country_code:"65",country_name:"Singapore",mobile_begin_with:["8","9"],phone_number_lengths:[8]},{alpha2:"SH",alpha3:"SHN",country_code:"290",country_name:"Saint Helena",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"SJ",alpha3:"SJM",country_code:"47",country_name:"Svalbard And Jan Mayen",mobile_begin_with:["79"],phone_number_lengths:[8]},{alpha2:"SB",alpha3:"SLB",country_code:"677",country_name:"Solomon Islands",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"SL",alpha3:"SLE",country_code:"232",country_name:"Sierra Leone",mobile_begin_with:["21","25","30","33","34","40","44","50","55","76","77","78","79","88"],phone_number_lengths:[8]},{alpha2:"SV",alpha3:"SLV",country_code:"503",country_name:"El Salvador",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"SM",alpha3:"SMR",country_code:"378",country_name:"San Marino",mobile_begin_with:["3","6"],phone_number_lengths:[10]},{alpha2:"SO",alpha3:"SOM",country_code:"252",country_name:"Somalia",mobile_begin_with:["61","62","63","65","66","68","69","71","90"],phone_number_lengths:[9]},{alpha2:"SX",alpha3:"SXM",country_code:"1",country_name:"Sint Maarten",mobile_begin_with:["721"],phone_number_lengths:[10]},{alpha2:"PM",alpha3:"SPM",country_code:"508",country_name:"Saint Pierre And Miquelon",mobile_begin_with:["55","41"],phone_number_lengths:[6]},{alpha2:"RS",alpha3:"SRB",country_code:"381",country_name:"Serbia",mobile_begin_with:["6"],phone_number_lengths:[8,9]},{alpha2:"ST",alpha3:"STP",country_code:"239",country_name:"Sao Tome and Principe",mobile_begin_with:["98","99"],phone_number_lengths:[7]},{alpha2:"SR",alpha3:"SUR",country_code:"597",country_name:"Suriname",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"SK",alpha3:"SVK",country_code:"421",country_name:"Slovakia",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SI",alpha3:"SVN",country_code:"386",country_name:"Slovenia",mobile_begin_with:["3","4","5","6","7"],phone_number_lengths:[8]},{alpha2:"SE",alpha3:"SWE",country_code:"46",country_name:"Sweden",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SZ",alpha3:"SWZ",country_code:"268",country_name:"Swaziland",mobile_begin_with:["76","77","78","79"],phone_number_lengths:[8]},{alpha2:"SC",alpha3:"SYC",country_code:"248",country_name:"Seychelles",mobile_begin_with:["2"],phone_number_lengths:[7]},{alpha2:"SY",alpha3:"SYR",country_code:"963",country_name:"Syrian Arab Republic",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TC",alpha3:"TCA",country_code:"1",country_name:"Turks and Caicos Islands",mobile_begin_with:["6492","6493","6494"],phone_number_lengths:[10]},{alpha2:"TD",alpha3:"TCD",country_code:"235",country_name:"Chad",mobile_begin_with:["6","7","9"],phone_number_lengths:[8]},{alpha2:"TG",alpha3:"TGO",country_code:"228",country_name:"Togo",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"TH",alpha3:"THA",country_code:"66",country_name:"Thailand",mobile_begin_with:["6","8","9"],phone_number_lengths:[9]},{alpha2:"TJ",alpha3:"TJK",country_code:"992",country_name:"Tajikistan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TK",alpha3:"TKL",country_code:"690",country_name:"Tokelau",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"TM",alpha3:"TKM",country_code:"993",country_name:"Turkmenistan",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"TL",alpha3:"TLS",country_code:"670",country_name:"Timor-Leste",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"TO",alpha3:"TON",country_code:"676",country_name:"Tonga",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TT",alpha3:"TTO",country_code:"1",country_name:"Trinidad and Tobago",mobile_begin_with:["868"],phone_number_lengths:[10]},{alpha2:"TN",alpha3:"TUN",country_code:"216",country_name:"Tunisia",mobile_begin_with:["2","4","5","9"],phone_number_lengths:[8]},{alpha2:"TR",alpha3:"TUR",country_code:"90",country_name:"Turkey",mobile_begin_with:["5"],phone_number_lengths:[10]},{alpha2:"TV",alpha3:"TUV",country_code:"688",country_name:"Tuvalu",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TW",alpha3:"TWN",country_code:"886",country_name:"Taiwan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TZ",alpha3:"TZA",country_code:"255",country_name:"Tanzania, United Republic of",mobile_begin_with:["7","6"],phone_number_lengths:[9]},{alpha2:"UG",alpha3:"UGA",country_code:"256",country_name:"Uganda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"UA",alpha3:"UKR",country_code:"380",country_name:"Ukraine",mobile_begin_with:["39","50","63","66","67","68","73","75","77","9"],phone_number_lengths:[9]},{alpha2:"UY",alpha3:"URY",country_code:"598",country_name:"Uruguay",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"UZ",alpha3:"UZB",country_code:"998",country_name:"Uzbekistan",mobile_begin_with:["9","88","33"],phone_number_lengths:[9]},{alpha2:"VC",alpha3:"VCT",country_code:"1",country_name:"Saint Vincent And The Grenedines",mobile_begin_with:["784"],phone_number_lengths:[10]},{alpha2:"VE",alpha3:"VEN",country_code:"58",country_name:"Venezuela, Bolivarian Republic of",mobile_begin_with:["4"],phone_number_lengths:[10]},{alpha2:"VG",alpha3:"VGB",country_code:"1",country_name:"Virgin Islands, British",mobile_begin_with:["284"],phone_number_lengths:[10]},{alpha2:"VI",alpha3:"VIR",country_code:"1",country_name:"Virgin Islands, U.S.",mobile_begin_with:["340"],phone_number_lengths:[10]},{alpha2:"VN",alpha3:"VNM",country_code:"84",country_name:"Viet Nam",mobile_begin_with:["8","9","3","7","5"],phone_number_lengths:[9]},{alpha2:"VU",alpha3:"VUT",country_code:"678",country_name:"Vanuatu",mobile_begin_with:["5","7"],phone_number_lengths:[7]},{alpha2:"WF",alpha3:"WLF",country_code:"681",country_name:"Wallis and Futuna",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"WS",alpha3:"WSM",country_code:"685",country_name:"Samoa",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"YE",alpha3:"YEM",country_code:"967",country_name:"Yemen",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"ZA",alpha3:"ZAF",country_code:"27",country_name:"South Africa",mobile_begin_with:["1","2","3","4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"ZM",alpha3:"ZMB",country_code:"260",country_name:"Zambia",mobile_begin_with:["9","7"],phone_number_lengths:[9]},{alpha2:"ZW",alpha3:"ZWE",country_code:"263",country_name:"Zimbabwe",mobile_begin_with:["71","73","77","78"],phone_number_lengths:[9]}]),l}var u,c,p={},b=function(){if(c)return _;c=1;var e=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.countryPhoneData=void 0,_.default=o,_.phone=o;const n=e(r());_.countryPhoneData=n.default;const a=function(){if(u)return p;u=1;var e=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0}),p.findCountryPhoneDataByCountry=function(e){return e?2===e.length?n.default.find((n=>e.toUpperCase()===n.alpha2))||null:3===e.length?n.default.find((n=>e.toUpperCase()===n.alpha3))||null:n.default.find((n=>e.toUpperCase()===n.country_name.toUpperCase()))||null:n.default.find((e=>"USA"===e.alpha3))||null},p.findExactCountryPhoneData=a,p.findPossibleCountryPhoneData=o,p.findCountryPhoneDataByPhoneNumber=function(e,t){let h,i;for(const _ of n.default)e.match(new RegExp("^"+_.country_code))&&(h||(h=a(e,t,_)),i||(i=o(e,t,_)));return{exactCountryPhoneData:h,possibleCountryPhoneData:i}},p.validatePhoneISO3166=function(e,n,a,o){if(!n.phone_number_lengths)return!1;const t=e.replace(new RegExp("^"+n.country_code),"");if(o&&n&&t.length===e.length)return!1;const h=n.mobile_begin_with,i=n.phone_number_lengths.some((e=>t.length===e)),_=!h.length||h.some((e=>t.match(new RegExp("^"+e))));return i&&(!a||_)};const n=e(r());function a(e,n,a){return a.phone_number_lengths.some((n=>a.country_code.length+n===e.length))?a.mobile_begin_with.length&&n?a.mobile_begin_with.some((n=>e.match(new RegExp("^"+a.country_code+n))))?a:null:a:null}function o(e,n,a){return a.phone_number_lengths.some((n=>a.country_code.length+n+1===e.length))?a.mobile_begin_with.length&&n?a.mobile_begin_with.some((n=>e.match(new RegExp("^"+a.country_code+"\\d?"+n))))?a:void 0:a:null}return p}();function o(e,{country:n="",validateMobilePrefix:o=!0,strictDetection:t=!1}={}){const h={isValid:!1,phoneNumber:null,countryIso2:null,countryIso3:null,countryCode:null};let i="string"!=typeof e?"":e.trim();const _="string"!=typeof n?"":n.trim(),l=Boolean(i.match(/^\+/));i=i.replace(/\D/g,"");let r=(0,a.findCountryPhoneDataByCountry)(_);if(!r)return h;let u=!1;if(_)["CIV","COG"].includes(r.alpha3)||(i=i.replace(/^0+/,"")),"RUS"===r.alpha3&&11===i.length&&null!==i.match(/^89/)&&(i=i.replace(/^8+/,"")),!l&&r.phone_number_lengths.includes(i.length)&&(i=`${r.country_code}${i}`);else if(l){const{exactCountryPhoneData:e,possibleCountryPhoneData:n}=(0,a.findCountryPhoneDataByPhoneNumber)(i,o);e?r=e:n&&!t?(r=n,i=r.country_code+i.replace(new RegExp(`^${r.country_code}\\d`),"")):r=null}else-1!==r.phone_number_lengths.indexOf(i.length)&&(i=`1${i}`,u=!0);if(!r)return h;let c=(0,a.validatePhoneISO3166)(i,r,o,l);return c||u&&(r=(0,a.findCountryPhoneDataByCountry)("CAN"),c=(0,a.validatePhoneISO3166)(i,r,o,l),c)?{isValid:!0,phoneNumber:`+${i}`,countryIso2:r.alpha2,countryIso3:r.alpha3,countryCode:`+${r.country_code}`}:h}return _}();const m=class{constructor(a){e(this,a),this.rInput=n(this,"rInput"),this.rChange=n(this,"rChange"),this.rValidate=n(this,"rValidate"),this.rReset=n(this,"rReset"),this.name="phone-number",this.inputLabel="Phone number without country code",this.countryCodeLabel="Country code",this.fullPhoneNumber="",this.phoneNumber="",this.validityState="",this.validityMessage="",this.uniqueId=`r-input-phone-number-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.initial={},this.handleOnInput=e=>{if(this.readonly)return;this.phoneNumber=e.target.value,this.fullPhoneNumber=this.phoneNumber?this.countryCode+this.phoneNumber:"";const{host:n,phoneNumber:a,countryCode:o,value:t}=this;this.rInput.emit({element:n,value:t,countryCode:o,phoneNumber:a}),this.validateFormElement(this.nativeElement)},this.handleInputOnChange=e=>{this.readonly||(this.phoneNumber=e.target.value,this.handleValueChange())},this.handleValueChange=()=>{if(this.readonly)return;this.fullPhoneNumber=this.phoneNumber?this.countryCode+this.phoneNumber:"";const{host:e,phoneNumber:n,countryCode:a,value:o}=this;this.rChange.emit({element:e,value:o,countryCode:a,phoneNumber:n}),this.validateFormElement(this.nativeElement)},this.validateFormElement=e=>{if(this.readonly)return;if(null===e)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData();const n="valid"===this.validityState;this.valid=n,this.invalid=!n,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.getValidityStateData=()=>{var e,n;if(this.required||(null===(e=this.phoneNumber)||void 0===e?void 0:e.length))return(null===(n=this.phoneNumber)||void 0===n?void 0:n.length)?this.countryCode&&this.getPhoneValidationResult(this.phoneNumber,this.countryCode).isValid?void(this.validityState="valid"):(this.validityState="invalid",void(this.validityMessage=this.customErrorMessage)):(this.validityState="valueMissing",void(this.validityMessage=this.valueMissingMessage));this.validityState="valid"},this.onSubmitForm=e=>{this.isNoValidate||(this.validateFormElement(this.nativeElement),this.invalid&&(e.preventDefault(),e.stopPropagation()))},this.contributeToFormData=e=>{h(this.nativeElement||this.host,e.formData)},this.onResetForm=()=>{var e;if(this.readonly)return;this.validityState=null,this.validityMessage=null,this.phoneNumber="",this.invalid=this.initial.invalid,this.valid=!this.invalid,null===(e=this.countryCodeElement)||void 0===e||e.reset(),this.updateValues(this.initial.value);const{host:n,value:a}=this;this.rReset.emit({element:n,value:a})}}async getValue(){return this.fullPhoneNumber}async setValue(e){this.updateValues(e)}async setCustomValidity(e){this.customErrorMessage=e,this.validateFormElement(this.nativeElement)}async reportValidity(){return this.validateFormElement(this.nativeElement),"valid"===this.validityState}async reset(){this.onResetForm()}watchValueChange(e){this.updateValues(e),this.validateFormElement(this.nativeElement)}handleDisabledChange(){this.setCountryCodeElementAttributes({disabled:`${!!this.disabled}`})}handleRequiredChange(){this.setCountryCodeElementAttributes({required:`${!!this.required}`})}handleReadonlyChange(){this.setCountryCodeElementAttributes({readonly:`${!!this.readonly}`})}handleLabelChange(){this.setCountryCodeElementAttributes({label:this.countryCodeLabel})}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get countryCodeElement(){return this.host.querySelector("r-select")}get countryCode(){return this.host.querySelector("r-select").value||""}get ariaDescribedBy(){const e=`${this.uniqueId}-message`;return this.hint?`${this.uniqueId}-hint ${e}`:e}get hasError(){var e;return this.invalid&&!!(null===(e=this.error)||void 0===e?void 0:e.length)}get hasValidationError(){var e;return"valid"!==this.validityState&&!!(null===(e=this.validityMessage)||void 0===e?void 0:e.length)}get hasMessage(){return this.hasError||this.hasValidationError}get errorMessage(){return this.hasError&&this.error||this.hasValidationError&&this.validityMessage}get isNoValidate(){var e;return(null===(e=this.parentFormEl)||void 0===e?void 0:e.hasAttribute("novalidate"))||this.novalidate||!1}updateValues(e){var n,a;if(this.fullPhoneNumber=e||"",!e)return null===(n=this.countryCodeElement)||void 0===n||n.reset(),void(this.phoneNumber="");if(!this.getPhoneValidationResult(e).isValid)return void console.error("Provided phone number is not valid");const o=this.getPhoneValidationResult(e).countryCode;this.phoneNumber=e.replace(o,""),null===(a=this.countryCodeElement)||void 0===a||a.setValue(o)}setCountryCodeElementAttributes(e){Object.entries(e||{}).forEach((([e,n])=>{var a,o;!1===n||null==n?null===(a=this.countryCodeElement)||void 0===a||a.removeAttribute(e):null===(o=this.countryCodeElement)||void 0===o||o.setAttribute(e,String(n))}))}getPhoneValidationResult(e,n=""){return b.phone(n+e,{validateMobilePrefix:!1})}connectEventListeners(){var e,n,a,o;null===(e=this.countryCodeElement)||void 0===e||e.addEventListener("rChange",this.handleValueChange),null===(n=this.parentFormEl)||void 0===n||n.addEventListener("formdata",this.contributeToFormData),null===(a=this.parentFormEl)||void 0===a||a.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(o=this.parentFormEl)||void 0===o||o.addEventListener("reset",this.onResetForm)}disconnectEventListeners(){var e,n,a,o;null===(e=this.countryCodeElement)||void 0===e||e.removeEventListener("rChange",this.handleValueChange),null===(n=this.parentFormEl)||void 0===n||n.removeEventListener("formdata",this.contributeToFormData),null===(a=this.parentFormEl)||void 0===a||a.removeEventListener("submit",this.onSubmitForm),null===(o=this.parentFormEl)||void 0===o||o.removeEventListener("reset",this.onResetForm)}componentWillLoad(){this.initial.value=this.value,this.initial.invalid=this.invalid,this.updateValues(this.value);const e={disabled:`${!!this.disabled}`,required:`${!!this.required}`,readonly:`${!!this.readonly}`,label:this.countryCodeLabel};this.setCountryCodeElementAttributes(Object.assign(Object.assign({},{"show-leading-icon":"true","leading-icon":"globe",placeholder:"+00",internal:"true"}),e))}componentDidLoad(){this.connectEventListeners()}disconnectedCallback(){this.disconnectEventListeners()}render(){const{label:e,fieldIndicator:n,hint:t,name:h,form:i,inputLabel:_,tooltip:l,tooltipIcon:r,tooltipIconColor:u,disabled:c,uniqueId:p,required:b,valid:m,invalid:s,novalidate:g,phoneNumber:y,fullPhoneNumber:d,fullWidth:w}=this,v=Object.assign({fieldIndicator:n},l?{tooltip:l,"tooltip-icon":r,"tooltip-icon-color":u}:{}),M={id:p,form:i,name:h,novalidate:g,required:b,disabled:c,"aria-describedby":this.ariaDescribedBy};return a(o,{key:"93e31af4d248db4fe90a84b897d96207dbf9b6e9"},a("div",{key:"fc909eb39efe18413838c9f051d7ad7d5aa461b3",class:"r-input-phone-number--label-container"},a("label",{key:"b849fc5188a03e52151006fd48338fe0a07dfd83",id:`${p}-label`},e&&a("r-label",Object.assign({key:"6bab502ebce17055ef3e2862f9063bfd2d0d1291"},v),e)),a("slot",{key:"014cbcd421f75299935cf430a8777ded1880134c",name:"popover"})),t&&a("r-hint",{key:"4f8e473e4c70ac62618f6d651dca1880aa755c3e",id:`${p}-hint`,role:"note"},t),a("div",{key:"7fa42ec6de7083cc8703f5bcbbfaabe283462d45",class:"r-input-phone-number",role:"group","aria-labelledby":`${p}-label`,"aria-describedby":this.ariaDescribedBy},a("slot",{key:"64b8a315acb0057e82d1c77dd3b35bc141378cc0"}),a("r-input",{key:"5fdaa9c0c5bb4913637b895f0979f377bac876bc",label:_,value:y,internal:!0,valid:m,invalid:s,required:b,readonly:this.readonly,novalidate:!0,fullWidth:w,type:"tel",error:this.errorMessage||"",onRInput:this.handleOnInput,onRChange:this.handleInputOnChange,disabled:c},m&&y&&a("r-icon",{key:"6c25f0a2e473315279679c3e607691f8a3eca396",slot:"trailing",name:"circled-check",size:"s",color:"var(--r-status-success-regular)"}))),a("input",Object.assign({key:"39cca18332d8e6473bef33db6e395a8aac36a954",type:"hidden"},M,{readonly:this.readonly,value:d,ref:e=>this.nativeElement=e})),a("r-hint",{key:"8feb70b56f27287b06a3ba894a554d736d9e9b4b","aria-live":"polite","aria-atomic":"true",id:`${p}-message`,class:!this.hasMessage&&"visually-hidden",variant:"error"},this.hasMessage?this.hasError?this.error:this.validityMessage:""))}get host(){return t(this)}static get watchers(){return{value:["watchValueChange"],disabled:["handleDisabledChange"],required:["handleRequiredChange"],readonly:["handleReadonlyChange"],label:["handleLabelChange"]}}};m.style=":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-input--container--margin-top:0;--r-input--container--margin-bottom:0}:host slot{display:contents}:host ::slotted(r-select){min-width:var(--r-input-phone-number--select--min-width, 7rem);width:var(--r-input-phone-number--select--width, fit-content)}:host r-input.focused{--r-input--container--border-style:solid}:host([full-width]:not([full-width=false])){width:100%}.r-input-phone-number{margin-top:var(--r-input-phone-number--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-phone-number--margin-bottom, var(--r-spacing-025, 0.25rem));width:var(--r-input-phone-number--width, 100%);display:var(--r-input-phone-number--display, inline-flex);justify-content:var(--r-input-phone-number--justify-content, center);align-items:var(--r-input-phone-number--align-items, center);gap:var(--r-input-phone-number--gap, 0)}.r-input-phone-number--label-container{display:var(--r-input-phone-number--label-container--display, flex);gap:var(--r-input-phone-number--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-phone-number--label-container--align-items, center);justify-content:var(--r-input-phone-number--label-container--align-items, space-between)}.r-input-phone-number--label-container ::slotted([slot=popover]){display:var(--r-input-phone-number--popover--display, inline-flex);height:var(--r-input-phone-number--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-phone-number--popover--align-items, center);justify-content:var(--r-input-phone-number--popover--justify-content, center);margin-right:var(--r-input-phone-number--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-phone-number--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-phone-number--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-phone-number r-input{margin-left:-1px;flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{m as r_input_phone_number}
1
+ import{r as e,c as n,h as a,H as o,g as t}from"./p-Da7qOBFr.js";import{a as h}from"./p-DvLT8-y3.js";var i,_={},l={};function r(){return i||(i=1,Object.defineProperty(l,"__esModule",{value:!0}),l.default=[{alpha2:"US",alpha3:"USA",country_code:"1",country_name:"United States",mobile_begin_with:["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","220","223","224","225","227","228","229","231","234","239","240","248","251","252","253","254","256","260","262","267","269","270","272","274","276","278","281","283","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","327","329","330","331","332","334","336","337","339","341","346","347","351","352","353","360","361","364","369","380","385","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","424","425","430","432","434","435","440","441","442","443","445","447","458","463","464","469","470","472","475","478","479","480","484","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","531","534","539","540","541","551","557","559","561","562","563","564","567","570","571","572","573","574","575","580","582","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","627","628","629","630","631","636","640","641","645","646","650","651","656","657","659","660","661","662","667","669","678","679","680","681","682","689","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","720","724","725","726","727","728","730","731","732","734","737","740","743","747","752","754","757","760","762","763","764","765","769","770","771","772","773","774","775","779","781","785","786","787","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","820","828","830","831","832","835","838","840","843","845","847","848","850","854","856","857","858","859","860","862","863","864","865","870","872","878","901","903","904","906","907","908","909","910","912","913","914","915","916","917","918","919","920","925","927","928","929","930","931","934","935","936","937","938","939","940","941","945","947","949","951","952","954","956","957","959","970","971","972","973","975","978","979","980","984","985","986","989","888","800","833","844","855","866","877","279","340","983","448","943","363","326","839","826","948","924"],phone_number_lengths:[10]},{alpha2:"AW",alpha3:"ABW",country_code:"297",country_name:"Aruba",mobile_begin_with:["56","59","64","73","74","99"],phone_number_lengths:[7]},{alpha2:"AF",alpha3:"AFG",country_code:"93",country_name:"Afghanistan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"AO",alpha3:"AGO",country_code:"244",country_name:"Angola",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"AI",alpha3:"AIA",country_code:"1",country_name:"Anguilla",mobile_begin_with:["2642","2644","2645","2647"],phone_number_lengths:[10]},{alpha2:"AX",alpha3:"ALA",country_code:"358",country_name:"Åland Islands",mobile_begin_with:["18"],phone_number_lengths:[6,7,8]},{alpha2:"AL",alpha3:"ALB",country_code:"355",country_name:"Albania",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"AD",alpha3:"AND",country_code:"376",country_name:"Andorra",mobile_begin_with:["3","4","6"],phone_number_lengths:[6]},{alpha2:"BQ",alpha3:"BES",country_code:"599",country_name:"Caribbean Netherlands",mobile_begin_with:["3","416","700","701","795"],phone_number_lengths:[7]},{alpha2:"AE",alpha3:"ARE",country_code:"971",country_name:"United Arab Emirates",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"AR",alpha3:"ARG",country_code:"54",country_name:"Argentina",mobile_begin_with:["1","2","3"],phone_number_lengths:[8,9,10,11,12]},{alpha2:"AM",alpha3:"ARM",country_code:"374",country_name:"Armenia",mobile_begin_with:["3","4","5","7","9"],phone_number_lengths:[8]},{alpha2:"AS",alpha3:"ASM",country_code:"1",country_name:"American Samoa",mobile_begin_with:["684733","684258"],phone_number_lengths:[10]},{alpha2:"AG",alpha3:"ATG",country_code:"1",country_name:"Antigua and Barbuda",mobile_begin_with:["2687"],phone_number_lengths:[10]},{alpha2:"AU",alpha3:"AUS",country_code:"61",country_name:"Australia",mobile_begin_with:["4"],phone_number_lengths:[9]},{alpha2:"AT",alpha3:"AUT",country_code:"43",country_name:"Austria",mobile_begin_with:["6"],phone_number_lengths:[10,11,12,13,14]},{alpha2:"AZ",alpha3:"AZE",country_code:"994",country_name:"Azerbaijan",mobile_begin_with:["10","50","51","55","60","70","77","99"],phone_number_lengths:[9]},{alpha2:"BI",alpha3:"BDI",country_code:"257",country_name:"Burundi",mobile_begin_with:["71","72","75","76","77","79","29","61","68","69"],phone_number_lengths:[8]},{alpha2:"BE",alpha3:"BEL",country_code:"32",country_name:"Belgium",mobile_begin_with:["4","3"],phone_number_lengths:[9,8]},{alpha2:"BJ",alpha3:"BEN",country_code:"229",country_name:"Benin",mobile_begin_with:["4","6","9"],phone_number_lengths:[8]},{alpha2:"BF",alpha3:"BFA",country_code:"226",country_name:"Burkina Faso",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BD",alpha3:"BGD",country_code:"880",country_name:"Bangladesh",mobile_begin_with:["1"],phone_number_lengths:[8,9,10]},{alpha2:"BG",alpha3:"BGR",country_code:"359",country_name:"Bulgaria",mobile_begin_with:["87","88","89","98","99","43"],phone_number_lengths:[8,9]},{alpha2:"BH",alpha3:"BHR",country_code:"973",country_name:"Bahrain",mobile_begin_with:["3"],phone_number_lengths:[8]},{alpha2:"BS",alpha3:"BHS",country_code:"1",country_name:"Bahamas",mobile_begin_with:["242"],phone_number_lengths:[10]},{alpha2:"BA",alpha3:"BIH",country_code:"387",country_name:"Bosnia and Herzegovina",mobile_begin_with:["6"],phone_number_lengths:[8,9]},{alpha2:"BY",alpha3:"BLR",country_code:"375",country_name:"Belarus",mobile_begin_with:["25","29","33","44"],phone_number_lengths:[9]},{alpha2:"BZ",alpha3:"BLZ",country_code:"501",country_name:"Belize",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"BM",alpha3:"BMU",country_code:"1",country_name:"Bermuda",mobile_begin_with:["4413","4415","4417"],phone_number_lengths:[10]},{alpha2:"BO",alpha3:"BOL",country_code:"591",country_name:"Bolivia",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BR",alpha3:"BRA",country_code:"55",country_name:"Brazil",mobile_begin_with:["119","129","139","149","159","169","179","189","199","219","229","249","279","289","319","329","339","349","359","379","389","419","429","439","449","459","469","479","489","499","519","539","549","559","619","629","639","649","659","669","679","689","699","719","739","749","759","779","799","819","829","839","849","859","869","879","889","899","919","929","939","949","959","969","979","989","999"],phone_number_lengths:[10,11]},{alpha2:"BB",alpha3:"BRB",country_code:"1",country_name:"Barbados",mobile_begin_with:["246"],phone_number_lengths:[10]},{alpha2:"BN",alpha3:"BRN",country_code:"673",country_name:"Brunei Darussalam",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"BT",alpha3:"BTN",country_code:"975",country_name:"Bhutan",mobile_begin_with:["17"],phone_number_lengths:[8]},{alpha2:"BW",alpha3:"BWA",country_code:"267",country_name:"Botswana",mobile_begin_with:["71","72","73","74","75","76","77","78","79"],phone_number_lengths:[8]},{alpha2:"CF",alpha3:"CAF",country_code:"236",country_name:"Central African Republic",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"CA",alpha3:"CAN",country_code:"1",country_name:"Canada",mobile_begin_with:["204","226","236","249","250","263","289","306","343","354","365","367","368","403","416","418","431","437","438","450","468","474","506","514","519","548","579","581","584","587","600","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","902","905","428","382","942"],phone_number_lengths:[10]},{alpha2:"CH",alpha3:"CHE",country_code:"41",country_name:"Switzerland",mobile_begin_with:["74","75","76","77","78","79"],phone_number_lengths:[9]},{alpha2:"CL",alpha3:"CHL",country_code:"56",country_name:"Chile",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"CN",alpha3:"CHN",country_code:"86",country_name:"China",mobile_begin_with:["13","14","15","17","18","19","16"],phone_number_lengths:[11]},{alpha2:"CI",alpha3:"CIV",country_code:"225",country_name:"Côte D'Ivoire",mobile_begin_with:["0","4","5","6","7","8"],phone_number_lengths:[10]},{alpha2:"CM",alpha3:"CMR",country_code:"237",country_name:"Cameroon",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"CD",alpha3:"COD",country_code:"243",country_name:"Congo, The Democratic Republic Of The",mobile_begin_with:["8","9"],phone_number_lengths:[9]},{alpha2:"CG",alpha3:"COG",country_code:"242",country_name:"Congo",mobile_begin_with:["0"],phone_number_lengths:[9]},{alpha2:"CK",alpha3:"COK",country_code:"682",country_name:"Cook Islands",mobile_begin_with:["5","7"],phone_number_lengths:[5]},{alpha2:"CO",alpha3:"COL",country_code:"57",country_name:"Colombia",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"CW",alpha3:"CUW",country_code:"599",country_name:"Curaçao",mobile_begin_with:["95","96"],phone_number_lengths:[8]},{alpha2:"KM",alpha3:"COM",country_code:"269",country_name:"Comoros",mobile_begin_with:["3","76"],phone_number_lengths:[7]},{alpha2:"CV",alpha3:"CPV",country_code:"238",country_name:"Cape Verde",mobile_begin_with:["5","9"],phone_number_lengths:[7]},{alpha2:"CR",alpha3:"CRI",country_code:"506",country_name:"Costa Rica",mobile_begin_with:["5","6","7","8"],phone_number_lengths:[8]},{alpha2:"CU",alpha3:"CUB",country_code:"53",country_name:"Cuba",mobile_begin_with:["5","6"],phone_number_lengths:[8]},{alpha2:"KY",alpha3:"CYM",country_code:"1",country_name:"Cayman Islands",mobile_begin_with:["345"],phone_number_lengths:[10]},{alpha2:"CY",alpha3:"CYP",country_code:"357",country_name:"Cyprus",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"CZ",alpha3:"CZE",country_code:"420",country_name:"Czech Republic",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"DE",alpha3:"DEU",country_code:"49",country_name:"Germany",mobile_begin_with:["15","16","17"],phone_number_lengths:[10,11]},{alpha2:"DJ",alpha3:"DJI",country_code:"253",country_name:"Djibouti",mobile_begin_with:["77"],phone_number_lengths:[8]},{alpha2:"DM",alpha3:"DMA",country_code:"1",country_name:"Dominica",mobile_begin_with:["767"],phone_number_lengths:[10]},{alpha2:"DK",alpha3:"DNK",country_code:"45",country_name:"Denmark",mobile_begin_with:["2","30","31","40","41","42","50","51","52","53","60","61","71","81","91","92","93","342","344","345","346","347","348","349","356","357","359","362","365","366","389","398","431","441","462","466","468","472","474","476","478","485","486","488","489","493","494","495","496","498","499","542","543","545","551","552","556","571","572","573","574","577","579","584","586","587","589","597","598","627","629","641","649","658","662","663","664","665","667","692","693","694","697","771","772","782","783","785","786","788","789","826","827","829"],phone_number_lengths:[8]},{alpha2:"DO",alpha3:"DOM",country_code:"1",country_name:"Dominican Republic",mobile_begin_with:["809","829","849"],phone_number_lengths:[10]},{alpha2:"DZ",alpha3:"DZA",country_code:"213",country_name:"Algeria",mobile_begin_with:["5","6","7"],phone_number_lengths:[9]},{alpha2:"EC",alpha3:"ECU",country_code:"593",country_name:"Ecuador",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"EG",alpha3:"EGY",country_code:"20",country_name:"Egypt",mobile_begin_with:["1"],phone_number_lengths:[10,8]},{alpha2:"ER",alpha3:"ERI",country_code:"291",country_name:"Eritrea",mobile_begin_with:["1","7","8"],phone_number_lengths:[7]},{alpha2:"ES",alpha3:"ESP",country_code:"34",country_name:"Spain",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"EE",alpha3:"EST",country_code:"372",country_name:"Estonia",mobile_begin_with:["5","81","82","83"],phone_number_lengths:[7,8]},{alpha2:"ET",alpha3:"ETH",country_code:"251",country_name:"Ethiopia",mobile_begin_with:["7","9"],phone_number_lengths:[9]},{alpha2:"FI",alpha3:"FIN",country_code:"358",country_name:"Finland",mobile_begin_with:["4","5"],phone_number_lengths:[6,7,9,10]},{alpha2:"FJ",alpha3:"FJI",country_code:"679",country_name:"Fiji",mobile_begin_with:["2","7","8","9"],phone_number_lengths:[7]},{alpha2:"FK",alpha3:"FLK",country_code:"500",country_name:"Falkland Islands (Malvinas)",mobile_begin_with:["5","6"],phone_number_lengths:[5]},{alpha2:"FR",alpha3:"FRA",country_code:"33",country_name:"France",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"FO",alpha3:"FRO",country_code:"298",country_name:"Faroe Islands",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"FM",alpha3:"FSM",country_code:"691",country_name:"Micronesia, Federated States Of",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"GA",alpha3:"GAB",country_code:"241",country_name:"Gabon",mobile_begin_with:["2","3","4","5","6","7"],phone_number_lengths:[7]},{alpha2:"GB",alpha3:"GBR",country_code:"44",country_name:"United Kingdom",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"GE",alpha3:"GEO",country_code:"995",country_name:"Georgia",mobile_begin_with:["5","7"],phone_number_lengths:[9]},{alpha2:"GH",alpha3:"GHA",country_code:"233",country_name:"Ghana",mobile_begin_with:["2","5"],phone_number_lengths:[9]},{alpha2:"GI",alpha3:"GIB",country_code:"350",country_name:"Gibraltar",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"GN",alpha3:"GIN",country_code:"224",country_name:"Guinea",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"GP",alpha3:"GLP",country_code:"590",country_name:"Guadeloupe",mobile_begin_with:["690","691"],phone_number_lengths:[9]},{alpha2:"GM",alpha3:"GMB",country_code:"220",country_name:"Gambia",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"GW",alpha3:"GNB",country_code:"245",country_name:"Guinea-Bissau",mobile_begin_with:["5","6","7"],phone_number_lengths:[7]},{alpha2:"GQ",alpha3:"GNQ",country_code:"240",country_name:"Equatorial Guinea",mobile_begin_with:["222","551"],phone_number_lengths:[9]},{alpha2:"GR",alpha3:"GRC",country_code:"30",country_name:"Greece",mobile_begin_with:["6"],phone_number_lengths:[10]},{alpha2:"GD",alpha3:"GRD",country_code:"1",country_name:"Grenada",mobile_begin_with:["473"],phone_number_lengths:[10]},{alpha2:"GL",alpha3:"GRL",country_code:"299",country_name:"Greenland",mobile_begin_with:["2","4","5"],phone_number_lengths:[6]},{alpha2:"GT",alpha3:"GTM",country_code:"502",country_name:"Guatemala",mobile_begin_with:["3","4","5"],phone_number_lengths:[8]},{alpha2:"GF",alpha3:"GUF",country_code:"594",country_name:"French Guiana",mobile_begin_with:["694"],phone_number_lengths:[9]},{alpha2:"GU",alpha3:"GUM",country_code:"1",country_name:"Guam",mobile_begin_with:["671"],phone_number_lengths:[10]},{alpha2:"GY",alpha3:"GUY",country_code:"592",country_name:"Guyana",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"HK",alpha3:"HKG",country_code:"852",country_name:"Hong Kong",mobile_begin_with:["4","5","6","70","71","72","73","81","82","83","84","85","86","87","88","89","9"],phone_number_lengths:[8]},{alpha2:"HN",alpha3:"HND",country_code:"504",country_name:"Honduras",mobile_begin_with:["3","7","8","9"],phone_number_lengths:[8]},{alpha2:"HR",alpha3:"HRV",country_code:"385",country_name:"Croatia",mobile_begin_with:["9"],phone_number_lengths:[8,9]},{alpha2:"HT",alpha3:"HTI",country_code:"509",country_name:"Haiti",mobile_begin_with:["3","4"],phone_number_lengths:[8]},{alpha2:"HU",alpha3:"HUN",country_code:"36",country_name:"Hungary",mobile_begin_with:["20","30","31","50","70"],phone_number_lengths:[9]},{alpha2:"ID",alpha3:"IDN",country_code:"62",country_name:"Indonesia",mobile_begin_with:["8"],phone_number_lengths:[9,10,11,12]},{alpha2:"IN",alpha3:"IND",country_code:"91",country_name:"India",mobile_begin_with:["6","7","8","9"],phone_number_lengths:[10]},{alpha2:"IE",alpha3:"IRL",country_code:"353",country_name:"Ireland",mobile_begin_with:["82","83","84","85","86","87","88","89"],phone_number_lengths:[9]},{alpha2:"IR",alpha3:"IRN",country_code:"98",country_name:"Iran, Islamic Republic Of",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"IQ",alpha3:"IRQ",country_code:"964",country_name:"Iraq",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"IS",alpha3:"ISL",country_code:"354",country_name:"Iceland",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"IL",alpha3:"ISR",country_code:"972",country_name:"Israel",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"IT",alpha3:"ITA",country_code:"39",country_name:"Italy",mobile_begin_with:["3"],phone_number_lengths:[9,10]},{alpha2:"JM",alpha3:"JAM",country_code:"1",country_name:"Jamaica",mobile_begin_with:["876"],phone_number_lengths:[10]},{alpha2:"JO",alpha3:"JOR",country_code:"962",country_name:"Jordan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"JP",alpha3:"JPN",country_code:"81",country_name:"Japan",mobile_begin_with:["70","80","90"],phone_number_lengths:[10]},{alpha2:"KZ",alpha3:"KAZ",country_code:"7",country_name:"Kazakhstan",mobile_begin_with:["70","74","77"],phone_number_lengths:[10]},{alpha2:"KE",alpha3:"KEN",country_code:"254",country_name:"Kenya",mobile_begin_with:["7","1"],phone_number_lengths:[9]},{alpha2:"KG",alpha3:"KGZ",country_code:"996",country_name:"Kyrgyzstan",mobile_begin_with:["20","22","31258","312973","5","600","7","88","912","99"],phone_number_lengths:[9]},{alpha2:"KH",alpha3:"KHM",country_code:"855",country_name:"Cambodia",mobile_begin_with:["1","6","7","8","9"],phone_number_lengths:[8,9]},{alpha2:"KI",alpha3:"KIR",country_code:"686",country_name:"Kiribati",mobile_begin_with:["9","30"],phone_number_lengths:[5]},{alpha2:"KN",alpha3:"KNA",country_code:"1",country_name:"Saint Kitts And Nevis",mobile_begin_with:["869"],phone_number_lengths:[10]},{alpha2:"KR",alpha3:"KOR",country_code:"82",country_name:"Korea, Republic of",mobile_begin_with:["1"],phone_number_lengths:[9,10]},{alpha2:"XK",alpha3:"XKX",country_code:"383",country_name:"Kosovo, Republic of",mobile_begin_with:["43","44","45","46","47","48","49"],phone_number_lengths:[8]},{alpha2:"KW",alpha3:"KWT",country_code:"965",country_name:"Kuwait",mobile_begin_with:["5","6","9"],phone_number_lengths:[8]},{alpha2:"LA",alpha3:"LAO",country_code:"856",country_name:"Lao People's Democratic Republic",mobile_begin_with:["20"],phone_number_lengths:[10]},{alpha2:"LB",alpha3:"LBN",country_code:"961",country_name:"Lebanon",mobile_begin_with:["3","7","8"],phone_number_lengths:[7,8]},{alpha2:"LR",alpha3:"LBR",country_code:"231",country_name:"Liberia",mobile_begin_with:["4","5","6","7"],phone_number_lengths:[7,8]},{alpha2:"LY",alpha3:"LBY",country_code:"218",country_name:"Libyan Arab Jamahiriya",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"LC",alpha3:"LCA",country_code:"1",country_name:"Saint Lucia",mobile_begin_with:["758"],phone_number_lengths:[10]},{alpha2:"LI",alpha3:"LIE",country_code:"423",country_name:"Liechtenstein",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"LK",alpha3:"LKA",country_code:"94",country_name:"Sri Lanka",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"LS",alpha3:"LSO",country_code:"266",country_name:"Lesotho",mobile_begin_with:["5","6"],phone_number_lengths:[8]},{alpha2:"LT",alpha3:"LTU",country_code:"370",country_name:"Lithuania",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"LU",alpha3:"LUX",country_code:"352",country_name:"Luxembourg",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"LV",alpha3:"LVA",country_code:"371",country_name:"Latvia",mobile_begin_with:["2"],phone_number_lengths:[8]},{alpha2:"MO",alpha3:"MAC",country_code:"853",country_name:"Macao",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MA",alpha3:"MAR",country_code:"212",country_name:"Morocco",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"MC",alpha3:"MCO",country_code:"377",country_name:"Monaco",mobile_begin_with:["4","6"],phone_number_lengths:[8,9]},{alpha2:"MD",alpha3:"MDA",country_code:"373",country_name:"Moldova, Republic of",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MG",alpha3:"MDG",country_code:"261",country_name:"Madagascar",mobile_begin_with:["3"],phone_number_lengths:[9]},{alpha2:"MV",alpha3:"MDV",country_code:"960",country_name:"Maldives",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"MX",alpha3:"MEX",country_code:"52",country_name:"Mexico",mobile_begin_with:[""],phone_number_lengths:[10,11]},{alpha2:"MH",alpha3:"MHL",country_code:"692",country_name:"Marshall Islands",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"MK",alpha3:"MKD",country_code:"389",country_name:"Macedonia, the Former Yugoslav Republic Of",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"ML",alpha3:"MLI",country_code:"223",country_name:"Mali",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MT",alpha3:"MLT",country_code:"356",country_name:"Malta",mobile_begin_with:["7","9"],phone_number_lengths:[8]},{alpha2:"MM",alpha3:"MMR",country_code:"95",country_name:"Myanmar",mobile_begin_with:["9"],phone_number_lengths:[8,9,10]},{alpha2:"ME",alpha3:"MNE",country_code:"382",country_name:"Montenegro",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MN",alpha3:"MNG",country_code:"976",country_name:"Mongolia",mobile_begin_with:["5","8","9"],phone_number_lengths:[8]},{alpha2:"MP",alpha3:"MNP",country_code:"1",country_name:"Northern Mariana Islands",mobile_begin_with:["670"],phone_number_lengths:[10]},{alpha2:"MZ",alpha3:"MOZ",country_code:"258",country_name:"Mozambique",mobile_begin_with:["8"],phone_number_lengths:[9]},{alpha2:"MR",alpha3:"MRT",country_code:"222",country_name:"Mauritania",mobile_begin_with:[],phone_number_lengths:[8]},{alpha2:"MS",alpha3:"MSR",country_code:"1",country_name:"Montserrat",mobile_begin_with:["664"],phone_number_lengths:[10]},{alpha2:"MQ",alpha3:"MTQ",country_code:"596",country_name:"Martinique",mobile_begin_with:["696","697"],phone_number_lengths:[9]},{alpha2:"MU",alpha3:"MUS",country_code:"230",country_name:"Mauritius",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"MW",alpha3:"MWI",country_code:"265",country_name:"Malawi",mobile_begin_with:["77","88","99"],phone_number_lengths:[9]},{alpha2:"MY",alpha3:"MYS",country_code:"60",country_name:"Malaysia",mobile_begin_with:["1","6"],phone_number_lengths:[9,10,8]},{alpha2:"YT",alpha3:"MYT",country_code:"262",country_name:"Mayotte",mobile_begin_with:["639"],phone_number_lengths:[9]},{alpha2:"NA",alpha3:"NAM",country_code:"264",country_name:"Namibia",mobile_begin_with:["60","81","82","85"],phone_number_lengths:[9]},{alpha2:"NC",alpha3:"NCL",country_code:"687",country_name:"New Caledonia",mobile_begin_with:["5","7","8","9"],phone_number_lengths:[6]},{alpha2:"NE",alpha3:"NER",country_code:"227",country_name:"Niger",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"NF",alpha3:"NFK",country_code:"672",country_name:"Norfolk Island",mobile_begin_with:["5","8"],phone_number_lengths:[5]},{alpha2:"NG",alpha3:"NGA",country_code:"234",country_name:"Nigeria",mobile_begin_with:["70","80","81","90","91"],phone_number_lengths:[10]},{alpha2:"NI",alpha3:"NIC",country_code:"505",country_name:"Nicaragua",mobile_begin_with:["7","8"],phone_number_lengths:[8]},{alpha2:"NU",alpha3:"NIU",country_code:"683",country_name:"Niue",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"NL",alpha3:"NLD",country_code:"31",country_name:"Netherlands",mobile_begin_with:["6","97"],phone_number_lengths:[9,11]},{alpha2:"NO",alpha3:"NOR",country_code:"47",country_name:"Norway",mobile_begin_with:["4","9"],phone_number_lengths:[8]},{alpha2:"NP",alpha3:"NPL",country_code:"977",country_name:"Nepal",mobile_begin_with:["97","98"],phone_number_lengths:[10]},{alpha2:"NR",alpha3:"NRU",country_code:"674",country_name:"Nauru",mobile_begin_with:["555"],phone_number_lengths:[7]},{alpha2:"NZ",alpha3:"NZL",country_code:"64",country_name:"New Zealand",mobile_begin_with:["2"],phone_number_lengths:[8,9,10]},{alpha2:"OM",alpha3:"OMN",country_code:"968",country_name:"Oman",mobile_begin_with:["7","9"],phone_number_lengths:[8]},{alpha2:"PK",alpha3:"PAK",country_code:"92",country_name:"Pakistan",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"PA",alpha3:"PAN",country_code:"507",country_name:"Panama",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"PE",alpha3:"PER",country_code:"51",country_name:"Peru",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PH",alpha3:"PHL",country_code:"63",country_name:"Philippines",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"PW",alpha3:"PLW",country_code:"680",country_name:"Palau",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"PG",alpha3:"PNG",country_code:"675",country_name:"Papua New Guinea",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"PL",alpha3:"POL",country_code:"48",country_name:"Poland",mobile_begin_with:["4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"PR",alpha3:"PRI",country_code:"1",country_name:"Puerto Rico",mobile_begin_with:["787","939"],phone_number_lengths:[10]},{alpha2:"PT",alpha3:"PRT",country_code:"351",country_name:"Portugal",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PY",alpha3:"PRY",country_code:"595",country_name:"Paraguay",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PS",alpha3:"PSE",country_code:"970",country_name:"Palestinian Territory, Occupied",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"PF",alpha3:"PYF",country_code:"689",country_name:"French Polynesia",mobile_begin_with:["8"],phone_number_lengths:[8]},{alpha2:"QA",alpha3:"QAT",country_code:"974",country_name:"Qatar",mobile_begin_with:["3","5","6","7"],phone_number_lengths:[8]},{alpha2:"RE",alpha3:"REU",country_code:"262",country_name:"Réunion",mobile_begin_with:["692","693"],phone_number_lengths:[9]},{alpha2:"RO",alpha3:"ROU",country_code:"40",country_name:"Romania",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"RU",alpha3:"RUS",country_code:"7",country_name:"Russian Federation",mobile_begin_with:["9","495","498","499","835"],phone_number_lengths:[10]},{alpha2:"RW",alpha3:"RWA",country_code:"250",country_name:"Rwanda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SA",alpha3:"SAU",country_code:"966",country_name:"Saudi Arabia",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"SD",alpha3:"SDN",country_code:"249",country_name:"Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SS",alpha3:"SSD",country_code:"211",country_name:"South Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SN",alpha3:"SEN",country_code:"221",country_name:"Senegal",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SG",alpha3:"SGP",country_code:"65",country_name:"Singapore",mobile_begin_with:["8","9"],phone_number_lengths:[8]},{alpha2:"SH",alpha3:"SHN",country_code:"290",country_name:"Saint Helena",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"SJ",alpha3:"SJM",country_code:"47",country_name:"Svalbard And Jan Mayen",mobile_begin_with:["79"],phone_number_lengths:[8]},{alpha2:"SB",alpha3:"SLB",country_code:"677",country_name:"Solomon Islands",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"SL",alpha3:"SLE",country_code:"232",country_name:"Sierra Leone",mobile_begin_with:["21","25","30","33","34","40","44","50","55","76","77","78","79","88"],phone_number_lengths:[8]},{alpha2:"SV",alpha3:"SLV",country_code:"503",country_name:"El Salvador",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"SM",alpha3:"SMR",country_code:"378",country_name:"San Marino",mobile_begin_with:["3","6"],phone_number_lengths:[10]},{alpha2:"SO",alpha3:"SOM",country_code:"252",country_name:"Somalia",mobile_begin_with:["61","62","63","65","66","68","69","71","90"],phone_number_lengths:[9]},{alpha2:"SX",alpha3:"SXM",country_code:"1",country_name:"Sint Maarten",mobile_begin_with:["721"],phone_number_lengths:[10]},{alpha2:"PM",alpha3:"SPM",country_code:"508",country_name:"Saint Pierre And Miquelon",mobile_begin_with:["55","41"],phone_number_lengths:[6]},{alpha2:"RS",alpha3:"SRB",country_code:"381",country_name:"Serbia",mobile_begin_with:["6"],phone_number_lengths:[8,9]},{alpha2:"ST",alpha3:"STP",country_code:"239",country_name:"Sao Tome and Principe",mobile_begin_with:["98","99"],phone_number_lengths:[7]},{alpha2:"SR",alpha3:"SUR",country_code:"597",country_name:"Suriname",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"SK",alpha3:"SVK",country_code:"421",country_name:"Slovakia",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SI",alpha3:"SVN",country_code:"386",country_name:"Slovenia",mobile_begin_with:["3","4","5","6","7"],phone_number_lengths:[8]},{alpha2:"SE",alpha3:"SWE",country_code:"46",country_name:"Sweden",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SZ",alpha3:"SWZ",country_code:"268",country_name:"Swaziland",mobile_begin_with:["76","77","78","79"],phone_number_lengths:[8]},{alpha2:"SC",alpha3:"SYC",country_code:"248",country_name:"Seychelles",mobile_begin_with:["2"],phone_number_lengths:[7]},{alpha2:"SY",alpha3:"SYR",country_code:"963",country_name:"Syrian Arab Republic",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TC",alpha3:"TCA",country_code:"1",country_name:"Turks and Caicos Islands",mobile_begin_with:["6492","6493","6494"],phone_number_lengths:[10]},{alpha2:"TD",alpha3:"TCD",country_code:"235",country_name:"Chad",mobile_begin_with:["6","7","9"],phone_number_lengths:[8]},{alpha2:"TG",alpha3:"TGO",country_code:"228",country_name:"Togo",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"TH",alpha3:"THA",country_code:"66",country_name:"Thailand",mobile_begin_with:["6","8","9"],phone_number_lengths:[9]},{alpha2:"TJ",alpha3:"TJK",country_code:"992",country_name:"Tajikistan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TK",alpha3:"TKL",country_code:"690",country_name:"Tokelau",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"TM",alpha3:"TKM",country_code:"993",country_name:"Turkmenistan",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"TL",alpha3:"TLS",country_code:"670",country_name:"Timor-Leste",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"TO",alpha3:"TON",country_code:"676",country_name:"Tonga",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TT",alpha3:"TTO",country_code:"1",country_name:"Trinidad and Tobago",mobile_begin_with:["868"],phone_number_lengths:[10]},{alpha2:"TN",alpha3:"TUN",country_code:"216",country_name:"Tunisia",mobile_begin_with:["2","4","5","9"],phone_number_lengths:[8]},{alpha2:"TR",alpha3:"TUR",country_code:"90",country_name:"Turkey",mobile_begin_with:["5"],phone_number_lengths:[10]},{alpha2:"TV",alpha3:"TUV",country_code:"688",country_name:"Tuvalu",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TW",alpha3:"TWN",country_code:"886",country_name:"Taiwan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TZ",alpha3:"TZA",country_code:"255",country_name:"Tanzania, United Republic of",mobile_begin_with:["7","6"],phone_number_lengths:[9]},{alpha2:"UG",alpha3:"UGA",country_code:"256",country_name:"Uganda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"UA",alpha3:"UKR",country_code:"380",country_name:"Ukraine",mobile_begin_with:["39","50","63","66","67","68","73","75","77","9"],phone_number_lengths:[9]},{alpha2:"UY",alpha3:"URY",country_code:"598",country_name:"Uruguay",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"UZ",alpha3:"UZB",country_code:"998",country_name:"Uzbekistan",mobile_begin_with:["9","88","33"],phone_number_lengths:[9]},{alpha2:"VC",alpha3:"VCT",country_code:"1",country_name:"Saint Vincent And The Grenedines",mobile_begin_with:["784"],phone_number_lengths:[10]},{alpha2:"VE",alpha3:"VEN",country_code:"58",country_name:"Venezuela, Bolivarian Republic of",mobile_begin_with:["4"],phone_number_lengths:[10]},{alpha2:"VG",alpha3:"VGB",country_code:"1",country_name:"Virgin Islands, British",mobile_begin_with:["284"],phone_number_lengths:[10]},{alpha2:"VI",alpha3:"VIR",country_code:"1",country_name:"Virgin Islands, U.S.",mobile_begin_with:["340"],phone_number_lengths:[10]},{alpha2:"VN",alpha3:"VNM",country_code:"84",country_name:"Viet Nam",mobile_begin_with:["8","9","3","7","5"],phone_number_lengths:[9]},{alpha2:"VU",alpha3:"VUT",country_code:"678",country_name:"Vanuatu",mobile_begin_with:["5","7"],phone_number_lengths:[7]},{alpha2:"WF",alpha3:"WLF",country_code:"681",country_name:"Wallis and Futuna",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"WS",alpha3:"WSM",country_code:"685",country_name:"Samoa",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"YE",alpha3:"YEM",country_code:"967",country_name:"Yemen",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"ZA",alpha3:"ZAF",country_code:"27",country_name:"South Africa",mobile_begin_with:["1","2","3","4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"ZM",alpha3:"ZMB",country_code:"260",country_name:"Zambia",mobile_begin_with:["9","7"],phone_number_lengths:[9]},{alpha2:"ZW",alpha3:"ZWE",country_code:"263",country_name:"Zimbabwe",mobile_begin_with:["71","73","77","78"],phone_number_lengths:[9]}]),l}var u,c,p={},b=function(){if(c)return _;c=1;var e=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.countryPhoneData=void 0,_.default=o,_.phone=o;const n=e(r());_.countryPhoneData=n.default;const a=function(){if(u)return p;u=1;var e=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0}),p.findCountryPhoneDataByCountry=function(e){return e?2===e.length?n.default.find((n=>e.toUpperCase()===n.alpha2))||null:3===e.length?n.default.find((n=>e.toUpperCase()===n.alpha3))||null:n.default.find((n=>e.toUpperCase()===n.country_name.toUpperCase()))||null:n.default.find((e=>"USA"===e.alpha3))||null},p.findExactCountryPhoneData=a,p.findPossibleCountryPhoneData=o,p.findCountryPhoneDataByPhoneNumber=function(e,t){let h,i;for(const _ of n.default)e.match(new RegExp("^"+_.country_code))&&(h||(h=a(e,t,_)),i||(i=o(e,t,_)));return{exactCountryPhoneData:h,possibleCountryPhoneData:i}},p.validatePhoneISO3166=function(e,n,a,o){if(!n.phone_number_lengths)return!1;const t=e.replace(new RegExp("^"+n.country_code),"");if(o&&n&&t.length===e.length)return!1;const h=n.mobile_begin_with,i=n.phone_number_lengths.some((e=>t.length===e)),_=!h.length||h.some((e=>t.match(new RegExp("^"+e))));return i&&(!a||_)};const n=e(r());function a(e,n,a){return a.phone_number_lengths.some((n=>a.country_code.length+n===e.length))?a.mobile_begin_with.length&&n?a.mobile_begin_with.some((n=>e.match(new RegExp("^"+a.country_code+n))))?a:null:a:null}function o(e,n,a){return a.phone_number_lengths.some((n=>a.country_code.length+n+1===e.length))?a.mobile_begin_with.length&&n?a.mobile_begin_with.some((n=>e.match(new RegExp("^"+a.country_code+"\\d?"+n))))?a:void 0:a:null}return p}();function o(e,{country:n="",validateMobilePrefix:o=!0,strictDetection:t=!1}={}){const h={isValid:!1,phoneNumber:null,countryIso2:null,countryIso3:null,countryCode:null};let i="string"!=typeof e?"":e.trim();const _="string"!=typeof n?"":n.trim(),l=Boolean(i.match(/^\+/));i=i.replace(/\D/g,"");let r=(0,a.findCountryPhoneDataByCountry)(_);if(!r)return h;let u=!1;if(_)["CIV","COG"].includes(r.alpha3)||(i=i.replace(/^0+/,"")),"RUS"===r.alpha3&&11===i.length&&null!==i.match(/^89/)&&(i=i.replace(/^8+/,"")),!l&&r.phone_number_lengths.includes(i.length)&&(i=`${r.country_code}${i}`);else if(l){const{exactCountryPhoneData:e,possibleCountryPhoneData:n}=(0,a.findCountryPhoneDataByPhoneNumber)(i,o);e?r=e:n&&!t?(r=n,i=r.country_code+i.replace(new RegExp(`^${r.country_code}\\d`),"")):r=null}else-1!==r.phone_number_lengths.indexOf(i.length)&&(i=`1${i}`,u=!0);if(!r)return h;let c=(0,a.validatePhoneISO3166)(i,r,o,l);return c||u&&(r=(0,a.findCountryPhoneDataByCountry)("CAN"),c=(0,a.validatePhoneISO3166)(i,r,o,l),c)?{isValid:!0,phoneNumber:`+${i}`,countryIso2:r.alpha2,countryIso3:r.alpha3,countryCode:`+${r.country_code}`}:h}return _}();const m=class{constructor(a){e(this,a),this.rInput=n(this,"rInput"),this.rChange=n(this,"rChange"),this.rValidate=n(this,"rValidate"),this.rReset=n(this,"rReset"),this.name="phone-number",this.inputLabel="Phone number without country code",this.countryCodeLabel="Country code",this.fullPhoneNumber="",this.phoneNumber="",this.validityState="",this.validityMessage="",this.uniqueId=`r-input-phone-number-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.initial={},this.handleOnInput=e=>{if(this.readonly)return;this.phoneNumber=e.target.value,this.fullPhoneNumber=this.phoneNumber?this.countryCode+this.phoneNumber:"";const{host:n,phoneNumber:a,countryCode:o,value:t}=this;this.rInput.emit({element:n,value:t,countryCode:o,phoneNumber:a}),this.validateFormElement(this.nativeElement)},this.handleInputOnChange=e=>{this.readonly||(this.phoneNumber=e.target.value,this.handleValueChange())},this.handleValueChange=()=>{if(this.readonly)return;this.fullPhoneNumber=this.phoneNumber?this.countryCode+this.phoneNumber:"";const{host:e,phoneNumber:n,countryCode:a,value:o}=this;this.rChange.emit({element:e,value:o,countryCode:a,phoneNumber:n}),this.validateFormElement(this.nativeElement)},this.validateFormElement=e=>{if(this.readonly)return;if(null===e)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData();const n="valid"===this.validityState;this.valid=n,this.invalid=!n,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.getValidityStateData=()=>{var e,n;if(this.required||(null===(e=this.phoneNumber)||void 0===e?void 0:e.length))return(null===(n=this.phoneNumber)||void 0===n?void 0:n.length)?this.countryCode&&this.getPhoneValidationResult(this.phoneNumber,this.countryCode).isValid?void(this.validityState="valid"):(this.validityState="invalid",void(this.validityMessage=this.customErrorMessage)):(this.validityState="valueMissing",void(this.validityMessage=this.valueMissingMessage));this.validityState="valid"},this.onSubmitForm=e=>{this.isNoValidate||(this.validateFormElement(this.nativeElement),this.invalid&&(e.preventDefault(),e.stopPropagation()))},this.contributeToFormData=e=>{h(this.nativeElement||this.host,e.formData)},this.onResetForm=()=>{var e;if(this.readonly)return;this.validityState=null,this.validityMessage=null,this.phoneNumber="",this.invalid=this.initial.invalid,this.valid=!this.invalid,null===(e=this.countryCodeElement)||void 0===e||e.reset(),this.updateValues(this.initial.value);const{host:n,value:a}=this;this.rReset.emit({element:n,value:a})}}async getValue(){return this.fullPhoneNumber}async setValue(e){this.updateValues(e)}async setCustomValidity(e){this.customErrorMessage=e,this.validateFormElement(this.nativeElement)}async reportValidity(){return this.validateFormElement(this.nativeElement),"valid"===this.validityState}async reset(){this.onResetForm()}watchValueChange(e){this.updateValues(e),this.validateFormElement(this.nativeElement)}handleDisabledChange(){this.setCountryCodeElementAttributes({disabled:`${!!this.disabled}`})}handleRequiredChange(){this.setCountryCodeElementAttributes({required:`${!!this.required}`})}handleReadonlyChange(){this.setCountryCodeElementAttributes({readonly:`${!!this.readonly}`})}handleLabelChange(){this.setCountryCodeElementAttributes({label:this.countryCodeLabel})}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get countryCodeElement(){return this.host.querySelector("r-select")}get countryCode(){return this.host.querySelector("r-select").value||""}get ariaDescribedBy(){const e=`${this.uniqueId}-message`;return this.hint?`${this.uniqueId}-hint ${e}`:e}get hasError(){var e;return this.invalid&&!!(null===(e=this.error)||void 0===e?void 0:e.length)}get hasValidationError(){var e;return"valid"!==this.validityState&&!!(null===(e=this.validityMessage)||void 0===e?void 0:e.length)}get hasMessage(){return this.hasError||this.hasValidationError}get errorMessage(){return this.hasError&&this.error||this.hasValidationError&&this.validityMessage}get isNoValidate(){var e;return(null===(e=this.parentFormEl)||void 0===e?void 0:e.hasAttribute("novalidate"))||this.novalidate||!1}updateValues(e){var n,a;if(this.fullPhoneNumber=e||"",!e)return null===(n=this.countryCodeElement)||void 0===n||n.reset(),void(this.phoneNumber="");if(!this.getPhoneValidationResult(e).isValid)return void console.error("Provided phone number is not valid");const o=this.getPhoneValidationResult(e).countryCode;this.phoneNumber=e.replace(o,""),null===(a=this.countryCodeElement)||void 0===a||a.setValue(o)}setCountryCodeElementAttributes(e){Object.entries(e||{}).forEach((([e,n])=>{var a,o;!1===n||null==n?null===(a=this.countryCodeElement)||void 0===a||a.removeAttribute(e):null===(o=this.countryCodeElement)||void 0===o||o.setAttribute(e,String(n))}))}getPhoneValidationResult(e,n=""){return b.phone(n+e,{validateMobilePrefix:!1})}connectEventListeners(){var e,n,a,o;null===(e=this.countryCodeElement)||void 0===e||e.addEventListener("rChange",this.handleValueChange),null===(n=this.parentFormEl)||void 0===n||n.addEventListener("formdata",this.contributeToFormData),null===(a=this.parentFormEl)||void 0===a||a.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(o=this.parentFormEl)||void 0===o||o.addEventListener("reset",this.onResetForm)}disconnectEventListeners(){var e,n,a,o;null===(e=this.countryCodeElement)||void 0===e||e.removeEventListener("rChange",this.handleValueChange),null===(n=this.parentFormEl)||void 0===n||n.removeEventListener("formdata",this.contributeToFormData),null===(a=this.parentFormEl)||void 0===a||a.removeEventListener("submit",this.onSubmitForm),null===(o=this.parentFormEl)||void 0===o||o.removeEventListener("reset",this.onResetForm)}componentWillLoad(){this.initial.value=this.value,this.initial.invalid=this.invalid,this.updateValues(this.value);const e={disabled:`${!!this.disabled}`,required:`${!!this.required}`,readonly:`${!!this.readonly}`,label:this.countryCodeLabel};this.setCountryCodeElementAttributes(Object.assign(Object.assign({},{"show-leading-icon":"true","leading-icon":"globe",placeholder:"+00",internal:"true"}),e))}componentDidLoad(){this.connectEventListeners()}disconnectedCallback(){this.disconnectEventListeners()}render(){const{label:e,fieldIndicator:n,hint:t,name:h,form:i,inputLabel:_,tooltip:l,tooltipIcon:r,tooltipIconColor:u,disabled:c,uniqueId:p,required:b,valid:m,invalid:s,novalidate:g,phoneNumber:y,fullPhoneNumber:d,fullWidth:w}=this,v=Object.assign({fieldIndicator:n},l?{tooltip:l,"tooltip-icon":r,"tooltip-icon-color":u}:{}),M={id:p,form:i,name:h,novalidate:g,required:b,disabled:c,"aria-describedby":this.ariaDescribedBy};return a(o,{key:"87f5720347e3627524f95f7110088b8eddef7f8f"},a("div",{key:"091e2048f011ff4167b35434567149de061954bd",class:"r-input-phone-number--label-container"},a("label",{key:"80994d1cfd1b6f2228fb231f64894e660bdb1a1c",id:`${p}-label`},e&&a("r-label",Object.assign({key:"36fa07371ee2c9d37645060a29f2d6f4ffe66342"},v),e)),a("slot",{key:"76034d24a4208a46ee92185221256b9b5e87f971",name:"popover"})),t&&a("r-hint",{key:"574a0ec6541310640594eed29e0c301f5f9a01f7",id:`${p}-hint`,role:"note"},t),a("div",{key:"63f37ce77a8e247091e0e6bf55632a834e19992d",class:"r-input-phone-number",role:"group","aria-labelledby":`${p}-label`,"aria-describedby":this.ariaDescribedBy},a("slot",{key:"36f3e834567d3ce77b6d89ae3e835eee630675b7"}),a("r-input",{key:"2f8dc7a95823b3107d8e24f90ae53791554c19af",label:_,value:y,internal:!0,valid:m,invalid:s,required:b,readonly:this.readonly,novalidate:!0,fullWidth:w,type:"tel",error:this.errorMessage||"",onRInput:this.handleOnInput,onRChange:this.handleInputOnChange,disabled:c},m&&y&&a("r-icon",{key:"4559b1d4c55e35b2ef9560554a62d4742bca875e",slot:"trailing",name:"circled-check",size:"s",color:"var(--r-status-success-regular)"}))),a("input",Object.assign({key:"c68a9255419c41e8b9fc02127d5f3b68cd14f40b",type:"hidden"},M,{readonly:this.readonly,value:d,ref:e=>this.nativeElement=e})),a("r-hint",{key:"43712e3a6b916945b1a00d3c6d8ace5f7bdcc1d7","aria-live":"polite","aria-atomic":"true",id:`${p}-message`,class:!this.hasMessage&&"visually-hidden",variant:"error"},this.hasMessage?this.hasError?this.error:this.validityMessage:""))}get host(){return t(this)}static get watchers(){return{value:["watchValueChange"],disabled:["handleDisabledChange"],required:["handleRequiredChange"],readonly:["handleReadonlyChange"],label:["handleLabelChange"]}}};m.style=":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-input--container--margin-top:0;--r-input--container--margin-bottom:0}:host slot{display:contents}:host ::slotted(r-select){min-width:var(--r-input-phone-number--select--min-width, 7rem);width:var(--r-input-phone-number--select--width, fit-content)}:host r-input.focused{--r-input--container--border-style:solid}:host([full-width]:not([full-width=false])){width:100%}.r-input-phone-number{margin-top:var(--r-input-phone-number--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-phone-number--margin-bottom, var(--r-spacing-025, 0.25rem));width:var(--r-input-phone-number--width, 100%);display:var(--r-input-phone-number--display, inline-flex);justify-content:var(--r-input-phone-number--justify-content, center);align-items:var(--r-input-phone-number--align-items, center);gap:var(--r-input-phone-number--gap, 0)}.r-input-phone-number--label-container{display:var(--r-input-phone-number--label-container--display, flex);gap:var(--r-input-phone-number--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-phone-number--label-container--align-items, center);justify-content:var(--r-input-phone-number--label-container--align-items, space-between)}.r-input-phone-number--label-container ::slotted([slot=popover]){display:var(--r-input-phone-number--popover--display, inline-flex);height:var(--r-input-phone-number--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-phone-number--popover--align-items, center);justify-content:var(--r-input-phone-number--popover--justify-content, center);margin-right:var(--r-input-phone-number--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-phone-number--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-phone-number--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-phone-number r-input{margin-left:-1px;flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{m as r_input_phone_number}
@@ -1 +1 @@
1
- import{r as t,c as i,h as r,H as e,g as o}from"./p-Da7qOBFr.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.rChange=i(this,"rChange"),this.rReset=i(this,"rReset"),this.showValid=!1,this.variant="standard",this.validityState="",this.validityMessage="",this.initial={},this.uniqueId=`r-radio-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{if(null!==t)for(const i in t.validity)if(t.validity[i]){if(this.validityState=i,this[i+"Message"])return void(this.validityMessage=this[i+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const i="valid"===this.validityState;this.valid=i,this.invalid=!i,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl),this.hasSelected&&!this.invalid||(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.reset()},this.onLabelClick=()=>{const t=this.radioButtonElements[0].shadowRoot.querySelector('[type="radio"]');null==t||t.focus()},this.contributeToFormData=t=>{s(this.host,t.formData)}}rChangeAction(t){this.resetValidity(),this.setValue(t.detail.value)}radioButtonClickAction(t){!t.target.disabled&&t.target.select()}get selectedIndex(){return Array.from(this.radioButtonElements).findIndex((t=>t.hasAttribute("checked")))}get prevIndex(){return 0===this.selectedIndex||-1===this.selectedIndex?this.radioButtonElements.length-1:this.selectedIndex-1}get focusedRadioButtonEl(){return this.host.querySelector("r-radio-button.focused")}get focusedRadioButtonElIndex(){return Array.from(this.radioButtonElements).indexOf(this.focusedRadioButtonEl)}get nextIndex(){return-1===this.selectedIndex?-1===this.focusedRadioButtonElIndex?0:this.focusedRadioButtonElIndex+1:this.selectedIndex===this.radioButtonElements.length-1?0:this.selectedIndex+1}radioButtonKeydownAction(t){var i;switch(t.detail.code){case"ArrowUp":case"ArrowLeft":this.radioButtonElements[this.prevIndex].select();break;case"ArrowDown":case"ArrowRight":this.radioButtonElements[this.nextIndex].select();break;case"Enter":{const t=this.host.querySelector('[type="submit"]')||(null===(i=this.parentFormEl)||void 0===i?void 0:i.querySelector('[type="submit"]'));t&&"triggerClick"in t?null==t||t.triggerClick():this.parentFormEl.requestSubmit();break}}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reset(){this.resetValidity(),this.initial.value?this.setValue(this.initial.value):this.clearValue()}async setValue(t){const i=Array.from(this.radioButtonElements).find((i=>i.value===t));void 0!==i?(this.value=t,null==i||i.select()):this.clearValue()}async getValue(){return this.value||null}async clearValue(){var t,i,r,e,o,s;(null===(t=this.nativeSelectedEl)||void 0===t?void 0:t.value)===(null===(i=this.nativeFirstEl)||void 0===i?void 0:i.value)||null===(r=this.nativeSelectedEl)||void 0===r||r.setAttribute("tabindex","-1"),null===(e=this.nativeSelectedEl)||void 0===e||e.setAttribute("tabindex","-1"),null===(o=this.nativeFirstEl)||void 0===o||o.setAttribute("tabindex","0"),null===(s=this.selectedRadioButtonElement)||void 0===s||s.removeAttribute("checked"),this.value=null}async checkValidity(){return this.getValidityStateData(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async reportValidity(){return this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async setCustomValidity(t){const i=this.nativeSelectedEl||this.nativeFirstEl||null;this.customErrorMessage=t,this.validateFormElement(i)}async setFocus(){const t=this.selectedRadioButtonElement||this.radioButtonElements[0]||null;null==t||t.setFocus()}async setBlur(){var t;null===(t=this.focusedRadioButtonEl)||void 0===t||t.setBlur()}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!this.required||!1}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get radioButtonElements(){return this.host.querySelectorAll('r-radio-button:not([disabled]:not([disabled="false"]))')}get selectedRadioButtonElement(){return Array.from(this.radioButtonElements).find((t=>t.hasAttribute("checked")))||null}get hasSelected(){return Array.from(this.radioButtonElements).some((t=>t.hasAttribute("checked")))}get nativeSelectedEl(){var t,i;return null===this.selectedRadioButtonElement?null:(null===(i=null===(t=this.selectedRadioButtonElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}get nativeFirstEl(){var t,i;return(null===(i=null===(t=this.radioButtonElements[0])||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}passPropsToGroupItems(t={}){Object.entries(t).forEach((([t,i])=>{this.radioButtonElements.forEach((r=>{"string"==typeof i&&r.setAttribute(t,i),"boolean"==typeof i&&i&&r.setAttribute(t,"")}))}))}selectGroupItemByValue(){this.hasSelected&&!this.value&&(this.value=this.selectedRadioButtonElement.value),this.setValue(this.value)}setTabindex(){const t=this.nativeSelectedEl||this.nativeFirstEl;null==t||t.setAttribute("tabindex","0")}connectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.addEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("submit",this.onSubmitForm,{capture:!0})}disconnectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("submit",this.onSubmitForm)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){const{required:t,name:i}=this;this.passPropsToGroupItems({required:t,name:i}),this.selectGroupItemByValue(),this.initial.value=this.value,this.initial.invalid=this.invalid}componentDidLoad(){const{name:t,required:i}=this;this.passPropsToGroupItems({name:t,required:i}),this.setTabindex()}render(){const{label:t,hint:i,fieldIndicator:o,tooltip:s,tooltipIcon:a,tooltipIconColor:n,error:l,uniqueId:d,invalid:h}=this;return r(e,{key:"899b3d8d509fa3d6f37a81279e6fc58b98e1314c"},r("div",{key:"dc1c47c966aac6ebaab2b8ec9061342b6c1e81e3",class:"r-radio-group",onClick:this.onLabelClick},t&&r("div",{key:"5b39dcc6952d971f8c03e2dab554b25bb1be3ccf",class:"r-radio-group--label-container"},r("r-label",Object.assign({key:"7f13b1571bccb986a0e36903399c8f15536de539",id:`${d}-label`,class:"r-radio-group--label","field-indicator":o},{tooltip:s,"tooltip-icon":a,"tooltip-icon-color":n}),t),r("slot",{key:"bfd151ce64e670722a6a1f3254763b6f514c99ab",name:"popover"})),i&&r("r-hint",{key:"edb8bbe44470579a5638e5dbee0b7b843cc998b4",id:`${d}-hint`,class:"r-radio-group--hint",role:"note"},i),r("div",{key:"1727429f1c36de0fd13567af448aed7c84f7c7b1",class:"r-radio-group--content"},r("slot",{key:"f7d712be6351c44e5f072f85a407b5e73837b48b"}))),h&&l&&r("r-hint",{key:"71feb492e87164e485bb10a0e856d86ef3c57a7d","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},l),"valid"!==this.validityState&&this.validityMessage&&r("r-hint",{key:"0ddc4636948329a97e8140c9efc267a4a054ff3b","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},this.customErrorMessage||this.validityMessage),this.valid&&this.validMessage&&this.showValid&&r("r-hint",{key:"e7cfa4eccf754e90ad30b22b24dd9f2ce1fcadc8",role:"alert",variant:"success"},this.validMessage))}get host(){return o(this)}};a.style=":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #da1e28);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #da1e28)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group+r-hint{margin-top:var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem))}";export{a as r_radio_group}
1
+ import{r as t,c as i,h as r,H as o,g as e}from"./p-Da7qOBFr.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.rChange=i(this,"rChange"),this.rReset=i(this,"rReset"),this.showValid=!1,this.variant="standard",this.validityState="",this.validityMessage="",this.initial={},this.uniqueId=`r-radio-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{if(null!==t)for(const i in t.validity)if(t.validity[i]){if(this.validityState=i,this[i+"Message"])return void(this.validityMessage=this[i+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const i="valid"===this.validityState;this.valid=i,this.invalid=!i,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl),this.hasSelected&&!this.invalid||(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.reset()},this.onLabelClick=()=>{const t=this.radioButtonElements[0].shadowRoot.querySelector('[type="radio"]');null==t||t.focus()},this.contributeToFormData=t=>{s(this.host,t.formData)}}rChangeAction(t){this.resetValidity(),this.setValue(t.detail.value)}radioButtonClickAction(t){!t.target.disabled&&t.target.select()}get selectedIndex(){return Array.from(this.radioButtonElements).findIndex((t=>t.hasAttribute("checked")))}get prevIndex(){return 0===this.selectedIndex||-1===this.selectedIndex?this.radioButtonElements.length-1:this.selectedIndex-1}get focusedRadioButtonEl(){return this.host.querySelector("r-radio-button.focused")}get focusedRadioButtonElIndex(){return Array.from(this.radioButtonElements).indexOf(this.focusedRadioButtonEl)}get nextIndex(){return-1===this.selectedIndex?-1===this.focusedRadioButtonElIndex?0:this.focusedRadioButtonElIndex+1:this.selectedIndex===this.radioButtonElements.length-1?0:this.selectedIndex+1}radioButtonKeydownAction(t){var i;switch(t.detail.code){case"ArrowUp":case"ArrowLeft":this.radioButtonElements[this.prevIndex].select();break;case"ArrowDown":case"ArrowRight":this.radioButtonElements[this.nextIndex].select();break;case"Enter":{const t=this.host.querySelector('[type="submit"]')||(null===(i=this.parentFormEl)||void 0===i?void 0:i.querySelector('[type="submit"]'));t&&"triggerClick"in t?null==t||t.triggerClick():this.parentFormEl.requestSubmit();break}}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reset(){this.resetValidity(),this.initial.value?this.setValue(this.initial.value):this.clearValue()}async setValue(t){const i=Array.from(this.radioButtonElements).find((i=>i.value===t));void 0!==i?(this.value=t,null==i||i.select()):this.clearValue()}async getValue(){return this.value||null}async clearValue(){var t,i,r,o,e,s;(null===(t=this.nativeSelectedEl)||void 0===t?void 0:t.value)===(null===(i=this.nativeFirstEl)||void 0===i?void 0:i.value)||null===(r=this.nativeSelectedEl)||void 0===r||r.setAttribute("tabindex","-1"),null===(o=this.nativeSelectedEl)||void 0===o||o.setAttribute("tabindex","-1"),null===(e=this.nativeFirstEl)||void 0===e||e.setAttribute("tabindex","0"),null===(s=this.selectedRadioButtonElement)||void 0===s||s.removeAttribute("checked"),this.value=null}async checkValidity(){return this.getValidityStateData(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async reportValidity(){return this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async setCustomValidity(t){const i=this.nativeSelectedEl||this.nativeFirstEl||null;this.customErrorMessage=t,this.validateFormElement(i)}async setFocus(){const t=this.selectedRadioButtonElement||this.radioButtonElements[0]||null;null==t||t.setFocus()}async setBlur(){var t;null===(t=this.focusedRadioButtonEl)||void 0===t||t.setBlur()}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!this.required||!1}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get radioButtonElements(){return this.host.querySelectorAll('r-radio-button:not([disabled]:not([disabled="false"]))')}get selectedRadioButtonElement(){return Array.from(this.radioButtonElements).find((t=>t.hasAttribute("checked")))||null}get hasSelected(){return Array.from(this.radioButtonElements).some((t=>t.hasAttribute("checked")))}get nativeSelectedEl(){var t,i;return null===this.selectedRadioButtonElement?null:(null===(i=null===(t=this.selectedRadioButtonElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}get nativeFirstEl(){var t,i;return(null===(i=null===(t=this.radioButtonElements[0])||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}passPropsToGroupItems(t={}){Object.entries(t).forEach((([t,i])=>{this.radioButtonElements.forEach((r=>{"string"==typeof i&&r.setAttribute(t,i),"boolean"==typeof i&&i&&r.setAttribute(t,"")}))}))}selectGroupItemByValue(){this.hasSelected&&!this.value&&(this.value=this.selectedRadioButtonElement.value),this.setValue(this.value)}setTabindex(){const t=this.nativeSelectedEl||this.nativeFirstEl;null==t||t.setAttribute("tabindex","0")}connectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.addEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("submit",this.onSubmitForm,{capture:!0})}disconnectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("submit",this.onSubmitForm)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){const{required:t,name:i}=this;this.passPropsToGroupItems({required:t,name:i}),this.selectGroupItemByValue(),this.initial.value=this.value,this.initial.invalid=this.invalid}componentDidLoad(){const{name:t,required:i}=this;this.passPropsToGroupItems({name:t,required:i}),this.setTabindex()}render(){const{label:t,hint:i,fieldIndicator:e,tooltip:s,tooltipIcon:a,tooltipIconColor:n,error:d,uniqueId:l,invalid:h}=this;return r(o,{key:"0a209644dc2a122c793a38e1f624eccf3ca0b884"},r("div",{key:"b4d8dbe5fb3d1e11d87a7902addcc801852e3554",class:"r-radio-group",onClick:this.onLabelClick},t&&r("div",{key:"c77bc88a07ddad6f45671c869b99b3fa5c4d0e2a",class:"r-radio-group--label-container"},r("r-label",Object.assign({key:"1dbfc739da13dbae04481912203a53837941b8e0",id:`${l}-label`,class:"r-radio-group--label","field-indicator":e},{tooltip:s,"tooltip-icon":a,"tooltip-icon-color":n}),t),r("slot",{key:"2f1b6a50b2f7d7b1becef2cc95a4d7f6a26d970d",name:"popover"})),i&&r("r-hint",{key:"c3c4310d3550d17d34ee26fa308cb3957a19dfd3",id:`${l}-hint`,class:"r-radio-group--hint",role:"note"},i),r("div",{key:"891beaea14680a2d629fa59f4597a968b8c2b695",class:"r-radio-group--content"},r("slot",{key:"1d107723f7c363564e488309fdcb586ff43046ff"}))),h&&d&&r("r-hint",{key:"de64c7c8a42136b7ac3ca93536a7654dc1d274fa","aria-live":"polite",id:`${l}-message`,role:"alert",variant:"error"},d),"valid"!==this.validityState&&this.validityMessage&&r("r-hint",{key:"c40eba0d5b6c47276ca91ca1631948d11f950c86","aria-live":"polite",id:`${l}-message`,role:"alert",variant:"error"},this.customErrorMessage||this.validityMessage),this.valid&&this.validMessage&&this.showValid&&r("r-hint",{key:"0b13cc722509fe66231f18bd2783b29b798882ef",role:"alert",variant:"success"},this.validMessage))}get host(){return e(this)}};a.style=":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #b00c15);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #b00c15)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group+r-hint{margin-top:var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem))}";export{a as r_radio_group}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as o,g as r,c as e}from"./p-Da7qOBFr.js";const n=class{constructor(i){t(this,i)}get iconName(){if(this.icon)return this.icon;const t={error:"circled-exclamation-mark",warning:"circled-cross",success:"circled-check"};return this.variant in t?t[this.variant]:null}get hasIconSlot(){return!!this.host.querySelector('[slot="icon"]')}get hasIcon(){return this.hasIconSlot||null!==this.iconName}render(){return i(o,{key:"77951c878faf0f74385c72dfdfa11adc9d38da73"},i("div",{key:"577c8674ce57e8ad8c784b926eff21b201af4bb2",class:"r-hint"},this.hasIcon&&i("div",{key:"7cba7116b04a7894aae4f2a3026324e15a95c9c5",class:"r-hint--icon"},i("slot",{key:"dba72b1442b9f0d27ca6d6387572b044468b54cb",name:"icon"},this.iconName&&i("r-icon",{key:"a7cdb025298dc8b6f4290efcd366a03dc8135bb0",name:this.iconName,size:"s"}))),i("div",{key:"bd96a4d4ec4a5c0f0e029b86e3a423b20e0a7341",class:"r-hint--text"},i("slot",{key:"e763e051b3d598fd78e777607f21a6358edc0dc2"}))))}get host(){return r(this)}};n.style=":host{--r-hint--text--flex:1}:host([variant=information]){--r-hint--color:var(--r-text-soft, #686868)}:host([variant=success]),:host([success]){--r-hint--color:var(--r-status-success-regular, #298535)}:host([variant=warning]),:host([warning]){--r-hint--color:var(--r-status-warning-strong, #89411a)}:host([variant=error]),:host([invalid]){--r-hint--color:var(--r-status-error-regular, #b00c15)}:host([icon-position=end]){--r-hint--flex-direction:row-reverse}:host{display:block}.r-hint{display:var(--r-hint--display, flex);flex-direction:var(--r-hint--flex-direction, row);gap:var(--r-hint--gap, var(--r-spacing-050, 0.5rem));font-family:var(--r-hint--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-hint--font-size, var(--r-font-size-300, 0.875rem));line-height:var(--r-hint--line-height, var(--r-line-height-m, 1.5));color:var(--r-hint--color, var(--r-text-soft, #686868));font-weight:var(--r-hint--font-weight, var(--r-font-weight-regular, 400));margin-top:var(--r-hint--margin-top, 0);margin-bottom:var(--r-hint--margin-bottom, 0)}.r-hint--icon{display:var(--r-hint--icon--display, flex);align-items:var(--r-hint--icon--align-items, start);min-width:var(--r-hint--icon--min-width, 1rem);margin-top:var(--r-hint--icon--margin-top, 0.15rem)}.r-hint--text{flex:var(--r-hint--text--flex, 1)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";const a=class{constructor(i){t(this,i),this.tooltipPosition="right",this.tooltipIcon="circled-question-mark"}render(){const{tooltip:t,tooltipPosition:r,tooltipIcon:e,tooltipIconColor:n,fieldIndicator:a}=this,l={text:t,position:r},s={name:e,size:"s",color:n};return i(o,{key:"2d7da94197a774e5b3399ff59dba01f946f0d8df"},i("div",{key:"56baaf39a736e1f504502c9f49b4cf5fbff2f911",class:"r-label"},i("span",{key:"5b0032c31e83b628d73a207eeaa915368edc7237",class:"r-label--slot"},i("slot",{key:"fbcd30c185b9eef55ea43c8ca8b082a0308953e2"}),a&&i("span",{key:"0d355d5857e515e735dc543d3416540e0a0ffdba",class:"r-label--marker"},a)),t&&i("span",{key:"b450b3e7ee2b33dbdc02d9fce04bd2ef6a97713d",class:"r-label--tooltip-icon"},i("r-tooltip",Object.assign({key:"a1b2a24a312b7eabd5acd43273658bce3199ef1b"},l),i("r-icon",Object.assign({key:"c22f6349b9c67a82b29f4a5758a77fb1b2910b75"},s))))))}};a.style='@charset "UTF-8";:host([field-indicator]){--r-label--marker--display:inline}.r-label{display:var(--r-label--display, flex);flex-direction:var(--r-label--flex-direction, row);gap:var(--r-label--gap, var(--r-spacing-100, 1rem));cursor:var(--r-label--cursor, default);color:var(--r-label--color, var(--r-text-regular, #282828));margin-bottom:var(--r-label--margin-bottom, 0)}.r-label--slot{flex:var(--r-label--slot--flex, 1);line-height:var(--r-label--line-height, var(--r-line-height-m, 1.5));font-family:var(--r-label--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-label--font-size, var(--r-font-size-regular, 1rem));font-weight:var(--r-label--font-weight, var(--r-font-weight-regular, 400))}.r-label--marker{display:var(--r-label--marker--display, none);color:var(--r-label--marker--color, var(--r-text-soft, #686868));font-size:var(--r-label--marker--font-size, var(--r-font-size-300, 0.875rem));font-style:var(--r-label--marker--font-style, normal);font-weight:var(--r-label--marker--font-weight, var(--r-font-weight-regular, 400));margin-left:var(--r-label--marker--margin-left, var(--r-spacing-075, 0.75rem))}.r-label--marker::before{content:var(--r-label--marker--before--content, "– ")}.r-label--tooltip-icon{color:var(--r-label--tooltip-icon--color, var(--r-text-regular, inherit));display:var(--r-label--tooltip-icon--display, inline-flex);line-height:var(--r-label--tooltip-icon--line-height, 1);align-items:var(--r-label--tooltip-icon--align-items, center);justify-content:var(--r-label--tooltip-icon--justify-content, center)}';const l=20,s=class{constructor(i){t(this,i),this.rTooltipFocus=e(this,"rTooltipFocus"),this.text="",this.position="top",this.arrowPositionState="left",this.isShown=!1,this.uniqueId=`r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getOffsetLeft=t=>{var i,o,r;const e=Math.abs((null===(i=this.element)||void 0===i?void 0:i.getBoundingClientRect().width)-(null===(r=null===(o=this.tooltip)||void 0===o?void 0:o.getBoundingClientRect())||void 0===r?void 0:r.width));switch(t){case"center":return e/2;case"right":return e;default:return 0}},this.alignTooltipPosition=()=>{var t,i,o,r,e,n,a;const l=Math.abs((null===(t=this.element)||void 0===t?void 0:t.getBoundingClientRect().height)-(null===(o=null===(i=this.tooltip)||void 0===i?void 0:i.getBoundingClientRect())||void 0===o?void 0:o.height))/2,s=this.getOffsetLeft(this.arrowPositionState),h=(null===(e=null===(r=this.element)||void 0===r?void 0:r.getBoundingClientRect())||void 0===e?void 0:e.height)+this.arrowHeight||0,c=(null===(a=null===(n=this.element)||void 0===n?void 0:n.getBoundingClientRect())||void 0===a?void 0:a.width)+this.arrowWidth||0;switch(this.positionState){case"top":this.alignPosition(this.tooltip,-s,-this.tooltipContainerHeight);break;case"bottom":this.alignPosition(this.tooltip,-s,h);break;case"left":this.alignPosition(this.tooltip,-this.tooltipContainerWidth,-l);break;case"right":this.alignPosition(this.tooltip,c,-l)}},this.alignArrowPosition=()=>{var t,i,o,r,e,n,a,l,s,h;const c=Math.abs((null===(t=this.element)||void 0===t?void 0:t.getBoundingClientRect().height)-(null===(o=null===(i=this.arrow)||void 0===i?void 0:i.getBoundingClientRect())||void 0===o?void 0:o.height))/2,d=Math.abs((null===(r=this.element)||void 0===r?void 0:r.getBoundingClientRect().width)-(null===(n=null===(e=this.arrow)||void 0===e?void 0:e.getBoundingClientRect())||void 0===n?void 0:n.width))/2,p=(null===(l=null===(a=this.element)||void 0===a?void 0:a.getBoundingClientRect())||void 0===l?void 0:l.height)||0,v=(null===(h=null===(s=this.element)||void 0===s?void 0:s.getBoundingClientRect())||void 0===h?void 0:h.width)||0;switch(this.positionState){case"top":this.alignPosition(this.arrow,d,-this.arrowHeight);break;case"bottom":this.alignPosition(this.arrow,d,p);break;case"left":this.alignPosition(this.arrow,-this.arrowWidth,c);break;case"right":this.alignPosition(this.arrow,v,c)}},this.alignPosition=(t,i,o)=>{var r;if(!t)return;let e=null===(r=this.element)||void 0===r?void 0:r.getBoundingClientRect(),n=e.left+i,a=e.top+o;t.style.left=`${n>0?n:0}px`,t.style.top=`${a}px`},this.handleHover=()=>{this.showTooltip(),this.setCorrectPosition()},this.handleFocus=()=>{this.showTooltip(),this.setCorrectPosition(),this.rTooltipFocus.emit({element:this.element})},this.showTooltip=()=>{this.isShown=!0,this.tooltip.classList.add("r-tooltip--content--visible")},this.removeTooltip=()=>{this.isShown=!1,this.tooltip.style.width="max-content",this.tooltip.classList.remove("r-tooltip--content--visible")},this.handleScroll=()=>{this.isShown&&(this.isOnScreen?this.setCorrectPosition():this.removeTooltip())}}handleVerticalPosition(){this.setCorrectPosition()}handleScrolling(){this.setCorrectPosition()}handleResizing(){this.setCorrectPosition()}handleKeydown(t){this.isShown&&"Escape"===t.key&&this.removeTooltip()}get overflowedParent(){return this.findOverflowParent(this.element.parentElement)}get arrowWidth(){var t;return(null===(t=this.arrow)||void 0===t?void 0:t.getBoundingClientRect().width)||0}get arrowHeight(){var t;return(null===(t=this.arrow)||void 0===t?void 0:t.getBoundingClientRect().height)||0}get tooltipContainerWidth(){var t,i;return(null===(i=null===(t=this.tooltip)||void 0===t?void 0:t.getBoundingClientRect())||void 0===i?void 0:i.width)+this.arrowWidth||0}get tooltipContainerHeight(){var t,i;return(null===(i=null===(t=this.tooltip)||void 0===t?void 0:t.getBoundingClientRect())||void 0===i?void 0:i.height)+this.arrowHeight||0}get top(){return this.element.getBoundingClientRect().top}get left(){return this.element.getBoundingClientRect().left}get isOnScreen(){const t=(this.overflowedParent||document.documentElement).getBoundingClientRect(),i=this.element.getBoundingClientRect();return i.top>=t.top&&i.bottom<=t.bottom&&i.left>=t.left&&i.right<=t.right}get bottom(){return t=this.element,window.innerHeight-t.getBoundingClientRect().top-t.getBoundingClientRect().height;var t}get right(){return t=this.element,window.innerWidth-t.getBoundingClientRect().left-t.getBoundingClientRect().width;var t}get horizontalPlacement(){return this.tooltipContainerWidth+l<this.left?"left":"right"}get verticalPlacement(){return this.tooltipContainerHeight+l<this.top?"top":"bottom"}get isEnoughSpaceVertically(){return this.tooltipContainerHeight+l<this.top||this.tooltipContainerHeight+l<this.bottom}get isEnoughSpaceHorizontally(){return this.tooltipContainerWidth+l<this.left||this.tooltipContainerWidth+l<this.right}get activeElement(){return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])')}componentWillLoad(){this.positionState=this.position}componentDidLoad(){var t,i,o;null===(t=this.activeElement)||void 0===t||t.addEventListener("focus",(()=>{this.handleFocus()})),null===(i=this.activeElement)||void 0===i||i.addEventListener("blur",(()=>{this.removeTooltip()})),null===(o=this.overflowedParent)||void 0===o||o.addEventListener("scroll",(()=>{this.handleScroll()}))}findOverflowParent(t){var i,o;return t?(null===(i=t.parentNode)||void 0===i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?this.findOverflowParent(null===(o=t.parentNode)||void 0===o?void 0:o.host):function(t){return"visible"!==getComputedStyle(t).overflow}(t)?t:t.parentElement?this.findOverflowParent(t.parentElement):null:null}getAlternativePosition(){switch(this.position){case"top":return this.isEnoughSpaceVertically?"bottom":this.horizontalPlacement;case"bottom":return this.isEnoughSpaceVertically?"top":this.horizontalPlacement;case"left":return this.isEnoughSpaceHorizontally?"right":this.verticalPlacement;case"right":return this.isEnoughSpaceHorizontally?"left":this.verticalPlacement}}setCorrectPosition(){if(this.tooltip&&this.isShown){switch(this.position){case"top":this.positionState=this.tooltipContainerHeight+l<this.top?this.position:this.getAlternativePosition();break;case"bottom":this.positionState=this.tooltipContainerHeight+l<this.bottom?this.position:this.getAlternativePosition();break;case"left":this.positionState=this.tooltipContainerWidth+l<this.left?this.position:this.getAlternativePosition();break;case"right":this.positionState=this.tooltipContainerWidth+l<this.right?this.position:this.getAlternativePosition()}this.adjustArrowPosition(),this.alignTooltipPosition(),this.alignArrowPosition(),"fit-content"!==this.tooltip.style.width&&(this.tooltip.style.width="fit-content",this.alignTooltipPosition())}}adjustArrowPosition(){const t=this.tooltipContainerWidth/2+l<this.left,i=this.tooltipContainerWidth/2+l<this.right;t&&i||!t&&!i||"left"===this.positionState||"right"===this.positionState?this.arrowPositionState="center":t?i||(this.arrowPositionState="right"):this.arrowPositionState="left"}render(){const{text:t,arrowPositionState:r,positionState:e,isShown:n,uniqueId:a}=this,l={tabindex:this.activeElement?null:0,role:this.activeElement?null:"button","aria-describedby":n&&a||null},s={id:a,role:"tooltip","aria-hidden":`${!n}`};return i(o,Object.assign({key:"f0b2e0117f0604d325becbcc05686433fbd3d506"},{"data-arrow-position":r,"data-position":e},{onMouseenter:this.handleHover,onMouseleave:this.removeTooltip}),i("div",{key:"2f5ff7638dedddd04dac78a2131438457211354b",class:"r-tooltip"},i("div",Object.assign({key:"cb562089f6e7ac27b99ba09953c2f28f29e3e649",class:"r-tooltip--trigger",onFocus:this.handleFocus,onBlur:this.removeTooltip},l),i("slot",{key:"2e09b16563b9aa325ff64f10af1ad5f4728a2417"})),i("div",Object.assign({key:"ffe53881e5ec5335073a7adf2ed5479f3a56f00f",class:"r-tooltip--content",ref:t=>this.tooltip=t},s),t),i("div",{key:"3f85fb76e934b18d5963d125699d00776c6abbac",ref:t=>this.arrow=t,class:"r-tooltip--arrow"})))}get element(){return r(this)}static get watchers(){return{position:["handleVerticalPosition"]}}};s.style=':host{display:inline-block;--r-tooltip--position:relative;--r-tooltip--content--position:fixed;--r-tooltip--content--display:none;--r-tooltip--content--color:var(--r-text-inverse);--r-tooltip--content--background-color:var(--r-background-inverse);--r-tooltip--content--font-family:var(--r-font-family-text);--r-tooltip--content--font-weight:var(--r-font-weight-regular);--r-tooltip--content--font-size:var(--r-font-size-200);--r-tooltip--content--line-height:var(--r-line-height-s);--r-tooltip--content--min-width:32px;--r-tooltip--content--max-width:300px;--r-tooltip--content--min-height:32px;--r-tooltip--content--padding:var(--r-spacing-050) var(--r-spacing-100);--r-tooltip--content--width:max-width;--r-tooltip--content--word-break:break-word;--r-tooltip--content--box-sizing:border-box;--r-tooltip--content--justify-content:center;--r-tooltip--content--align-items:center;--r-tooltip--content--z-index:0;--r-tooltip--arrow--display:none;--r-tooltip--arrow--position:fixed;--r-tooltip--arrow--width:12px;--r-tooltip--arrow--height:12px;--r-tooltip--arrow--transform:rotate(180deg);--r-tooltip--arrow--inner-content:"";--r-tooltip--arrow--inner--width:12px;--r-tooltip--arrow--inner--height:6px;--r-tooltip--arrow--inner--background-color:var(--r-tooltip--content--background-color);--r-tooltip--arrow--inner--clip-path:polygon(50% 0%, 0% 100%, 100% 100%);--r-tooltip--arrow--inner--border-radius:0;--r-tooltip--arrow--inner--align-self:flex-end}:host slot{display:contents}:host([data-position=bottom]){--r-tooltip--arrow--transform:rotate(0)}:host([data-position=right]){--r-tooltip--arrow--transform:rotate(270deg)}:host([data-position=left]){--r-tooltip--arrow--transform:rotate(90deg)}.r-tooltip{position:var(--r-tooltip--position)}.r-tooltip:has(.r-tooltip--content--visible){--r-tooltip--content--width:max-content;--r-tooltip--content--display:flex;--r-tooltip--content--z-index:1060;--r-tooltip--arrow--display:flex;--r-tooltip--arrow--inner--display:block}.r-tooltip--trigger{color:var(--r-tooltip--trigger--color, inherit);box-shadow:var(--r-tooltip--trigger--box-shadow, none);outline:var(--r-tooltip--trigger--outline, none);outline-offset:var(--r-tooltip--trigger--outline-offset, 0)}.r-tooltip--trigger:focus{--r-tooltip--trigger--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-tooltip--trigger--outline:2px solid var(--r-border-focused);--r-tooltip--trigger--outline-offset:2px}.r-tooltip--content{position:var(--r-tooltip--content--position);display:var(--r-tooltip--content--display);color:var(--r-tooltip--content--color);background-color:var(--r-tooltip--content--background-color);font-family:var(--r-tooltip--content--font-family);font-weight:var(--r-tooltip--content--font-weight);font-size:var(--r-tooltip--content--font-size);line-height:var(--r-tooltip--content--line-height);min-width:var(--r-tooltip--content--min-width);max-width:var(--r-tooltip--content--max-width);min-height:var(--r-tooltip--content--min-height);padding:var(--r-tooltip--content--padding);width:var(--r-tooltip--content--width);word-break:var(--r-tooltip--content--word-break);box-sizing:var(--r-tooltip--content--box-sizing);z-index:var(--r-tooltip--content--z-index)}.r-tooltip--arrow{display:var(--r-tooltip--arrow--display);position:var(--r-tooltip--arrow--position);width:var(--r-tooltip--arrow--width);height:var(--r-tooltip--arrow--height);transform:var(--r-tooltip--arrow--transform)}.r-tooltip--arrow:after{content:var(--r-tooltip--arrow--inner-content);display:var(--r-tooltip--arrow--inner--display);width:var(--r-tooltip--arrow--inner--width);height:var(--r-tooltip--arrow--inner--height);background-color:var(--r-tooltip--arrow--inner--background-color);clip-path:var(--r-tooltip--arrow--inner--clip-path);border-radius:var(--r-tooltip--arrow--inner--border-radius);align-self:var(--r-tooltip--arrow--inner--align-self)}';export{n as r_hint,a as r_label,s as r_tooltip}
@@ -1 +1 @@
1
- import{r as o,c as r,h as t,H as n,g as i}from"./p-Da7qOBFr.js";const e=class{constructor(t){o(this,t),this.rClick=r(this,"rClick"),this.size="m",this.tooltipPosition="top",this.variant="standard",this._handleClick=o=>{this.disabled?o.preventDefault():this.rClick.emit()},this.onFocus=()=>{this.setFocus()},this.onBlur=()=>{this.setBlur()}}async triggerClick(){var o;null===(o=this.nativeElement)||void 0===o||o.click()}async setFocus(){var o;null===(o=this.nativeElement)||void 0===o||o.focus()}async setBlur(){var o;null===(o=this.nativeElement)||void 0===o||o.blur()}render(){const{name:o,size:r,disabled:i,tooltipText:e,tooltipPosition:a}=this,c={disabled:i},s={name:o,size:r},b=()=>t("button",Object.assign({key:"9edaaa1a459ffc088ec0b5817a06636634a8a700",type:"button",class:"r-icon-button","aria-label":this.host.getAttribute("aria-label")||null},c,{onClick:this._handleClick,onFocus:this.onFocus,onBlur:this.onBlur,ref:o=>this.nativeElement=o}),o?t("r-icon",Object.assign({},s)):t("r-icon",{size:r,class:"r-icon-button--icon"},t("slot",null)),t("span",{key:"f1a386a189634b597a1744520aba2b862e206278",class:"r-icon-button--label visually-hidden"},this.label),t("span",{key:"c66d4aaabec9fc5ef871d520c7037b94bb1a6f2b",class:"r-icon-button--target-area"}));return t(n,{key:"8de48d1041bb285a3bff1b831eb24619f61e8d00"},!i&&e?t("r-tooltip",{text:e,position:a},b()):b())}get host(){return i(this)}};e.style=":host{display:inline-flex;vertical-align:top;--r-icon-button--color:inherit}:host(:hover:not([disabled]:not([disabled=false])):not(:active)){--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host(:active:not([disabled]:not([disabled=false]))){--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host(:focus-within:not(:active):not([disabled]:not([disabled=false]))){box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}:host([disabled]:not([disabled=false])){opacity:0.4;--r-icon-button--cursor:not-allowed;--r-icon-button--box-shadow:none;--r-icon-button--background-color:transparent;--r-icon-button--border-color:transparent}:host([variant=contained]){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--border-color:var(--r-border-transparent, transparent);--r-icon-button--box-shadow:none}:host([variant=contained]:hover:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host([variant=contained]:active:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host([variant=contained][disabled]:not([disabled=false])){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--border-color:transparent}:host([size=s]){--r-icon-button--height:1.5rem;--r-icon-button--width:1.5rem}:host([size=m]){--r-icon-button--height:2.25rem;--r-icon-button--width:2.25rem}:host([size=l]){--r-icon-button--height:2.75rem;--r-icon-button--width:2.75rem}.r-icon-button{display:var(--r-icon-button--display, inline-flex);align-items:var(--r-icon-button--align-items, center);justify-content:var(--r-icon-button--justify-content, center);outline:var(--r-icon-button--outline, none);cursor:var(--r-icon-button--cursor, pointer);pointer-events:var(--r-icon-button--pointer-events, initial);padding:var(--r-icon-button--padding, 0);border:var(--r-icon-button--border, none);color:var(--r-icon-button--color, inherit);background-color:var(--r-icon-button--background-color, transparent);box-sizing:var(--r-icon-button--box-sizing, border-box);border-width:var(--r-icon-button--border-width, 1px);border-style:var(--r-icon-button--border-style, solid);border-color:var(--r-icon-button--border-color, transparent);border-radius:var(--r-icon-button--border-radius, 50%);z-index:var(--r-icon-button--z-index, initial);width:var(--r-icon-button--width, 2.25rem);height:var(--r-icon-button--height, 2.25rem)}.r-icon-button--target-area{position:var(--r-icon-button--target-area--position, absolute);background:var(--r-icon-button--target-area--background, rgba(0, 0, 0, 0));width:var(--r-icon-button--target-area--width, 2.75rem);height:var(--r-icon-button--target-area--height, 2.75rem);z-index:var(--r-icon-button--target-area--z-index, 1)}.r-icon-button--icon{display:flex;align-items:center;justify-content:center}.visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";export{e as r_icon_button}
1
+ import{r as o,c as r,h as t,H as n,g as i}from"./p-Da7qOBFr.js";const e=class{constructor(t){o(this,t),this.rClick=r(this,"rClick"),this.size="m",this.tooltipPosition="top",this.variant="standard",this._handleClick=o=>{this.disabled?o.preventDefault():this.rClick.emit()},this.onFocus=()=>{this.setFocus()},this.onBlur=()=>{this.setBlur()}}async triggerClick(){var o;null===(o=this.nativeElement)||void 0===o||o.click()}async setFocus(){var o;null===(o=this.nativeElement)||void 0===o||o.focus()}async setBlur(){var o;null===(o=this.nativeElement)||void 0===o||o.blur()}render(){const{name:o,size:r,disabled:i,tooltipText:e,tooltipPosition:a}=this,c={disabled:i},s={name:o,size:r},b=()=>t("button",Object.assign({key:"ce7c3beb7c5fdbff3b47011289fe730dddf844f5",type:"button",class:"r-icon-button","aria-label":this.host.getAttribute("aria-label")||null},c,{onClick:this._handleClick,onFocus:this.onFocus,onBlur:this.onBlur,ref:o=>this.nativeElement=o}),o?t("r-icon",Object.assign({},s)):t("r-icon",{size:r,class:"r-icon-button--icon"},t("slot",null)),t("span",{key:"914c52bcfa15416981670f65cc4c009dd887003a",class:"r-icon-button--label visually-hidden"},this.label),t("span",{key:"e30a94256908de2c81f42d294e68a5e5524055c0",class:"r-icon-button--target-area"}));return t(n,{key:"b894237ccf791815719dc96ab85b7717141afdaf"},!i&&e?t("r-tooltip",{text:e,position:a},b()):b())}get host(){return i(this)}};e.style=":host{display:inline-flex;vertical-align:top;--r-icon-button--color:inherit}:host(:hover:not([disabled]:not([disabled=false])):not(:active)){--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host(:active:not([disabled]:not([disabled=false]))){--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host(:focus-within:not(:active):not([disabled]:not([disabled=false]))){box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}:host([disabled]:not([disabled=false])){opacity:0.4;--r-icon-button--cursor:not-allowed;--r-icon-button--box-shadow:none;--r-icon-button--background-color:transparent;--r-icon-button--border-color:transparent}:host([variant=contained]){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--border-color:var(--r-border-transparent, transparent);--r-icon-button--box-shadow:none}:host([variant=contained]:hover:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host([variant=contained]:active:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-icon-button--border-color:var(--r-border-soft, #686868)}:host([variant=contained][disabled]:not([disabled=false])){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--border-color:transparent}:host([size=s]){--r-icon-button--height:1.5rem;--r-icon-button--width:1.5rem}:host([size=m]){--r-icon-button--height:2.25rem;--r-icon-button--width:2.25rem}:host([size=l]){--r-icon-button--height:2.75rem;--r-icon-button--width:2.75rem}.r-icon-button{display:var(--r-icon-button--display, inline-flex);align-items:var(--r-icon-button--align-items, center);justify-content:var(--r-icon-button--justify-content, center);outline:var(--r-icon-button--outline, none);cursor:var(--r-icon-button--cursor, pointer);pointer-events:var(--r-icon-button--pointer-events, initial);padding:var(--r-icon-button--padding, 0);border:var(--r-icon-button--border, none);color:var(--r-icon-button--color, inherit);background-color:var(--r-icon-button--background-color, transparent);box-sizing:var(--r-icon-button--box-sizing, border-box);border-width:var(--r-icon-button--border-width, 1px);border-style:var(--r-icon-button--border-style, solid);border-color:var(--r-icon-button--border-color, transparent);border-radius:var(--r-icon-button--border-radius, 50%);z-index:var(--r-icon-button--z-index, initial);width:var(--r-icon-button--width, 2.25rem);height:var(--r-icon-button--height, 2.25rem)}.r-icon-button--target-area{position:var(--r-icon-button--target-area--position, absolute);background:var(--r-icon-button--target-area--background, rgba(0, 0, 0, 0));width:var(--r-icon-button--target-area--width, 2.75rem);height:var(--r-icon-button--target-area--height, 2.75rem);z-index:var(--r-icon-button--target-area--z-index, 1)}.r-icon-button--icon{display:flex;align-items:center;justify-content:center}.visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";export{e as r_icon_button}
@@ -1 +1 @@
1
- import{r as e,c as t,h as r,H as i,g as o}from"./p-Da7qOBFr.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){e(this,r),this.rChange=t(this,"rChange"),this.rReset=t(this,"rReset"),this.rValidate=t(this,"rValidate"),this.showValid=!1,this.validityState="",this.validityMessage="",this.initial={},this.getValidityStateData=e=>{for(const t in e.validity)if(e.validity[t]){if(this.validityState=t,this[t+"Message"])return void(this.validityMessage=this[t+"Message"]);this.validityMessage=e.validationMessage}},this.validateFormElement=(e=null)=>{if(null===e)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(e);const t="valid"===this.validityState;this.valid=t,this.invalid=!t,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.uniqueId=`r-checkbox-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.touched=!1,this.handleClick=e=>{this.disabled||"A"!==e.target.tagName&&(e.preventDefault(),this.toggleChecked())},this.onSubmitForm=e=>{this.isNoValidate||(this.validateFormElement(this.nativeElement),this.invalid&&(e.preventDefault(),e.stopPropagation()))},this.onResetForm=()=>{this.validityState=null,this.validityMessage=null,this.checked=this.initial.checked,this.invalid=this.initial.invalid,this.valid=!this.invalid;const{host:e,value:t,checked:r}=this;this.rReset.emit({element:e,value:t,checked:r})},this.contributeToFormData=e=>{s(this.nativeElement||this.host,e.formData)}}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var e;return(null===(e=this.parentFormEl)||void 0===e?void 0:e.hasAttribute("novalidate"))||this.novalidate||!1}async getValidityState(){return this.getValidityStateData(this.nativeElement),{state:this.validityState,message:this.validityMessage}}async handleCheckedChange(){if(!this.touched)return;if(this.disabled)return;const{host:e,value:t,checked:r}=this;this.rChange.emit({element:e,value:t,checked:r}),this.nativeElement&&(this.nativeElement.checked=r),this.required&&!this.isNoValidate&&this.validateFormElement(this.nativeElement)}connectFormEventListeners(){var e,t,r;null===(e=this.parentFormEl)||void 0===e||e.addEventListener("formdata",this.contributeToFormData),null===(t=this.parentFormEl)||void 0===t||t.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("reset",this.onResetForm)}disconnectFormEventListeners(){var e,t,r;null===(e=this.parentFormEl)||void 0===e||e.removeEventListener("formdata",this.contributeToFormData),null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("submit",this.onSubmitForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("reset",this.onResetForm)}componentWillLoad(){this.initial.checked=this.checked,this.initial.invalid=this.invalid}componentDidLoad(){this.nativeElement&&(this.nativeElement.indeterminate=this.indeterminate)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}async setFocus(){var e;null===(e=this.nativeElement)||void 0===e||e.focus()}async setBlur(){var e;null===(e=this.nativeElement)||void 0===e||e.blur()}async check(){this.checked=!0}async uncheck(){this.checked=!1}async toggleChecked(){this.touched=!0,this.checked=!this.checked}async setIndeterminate(){this.indeterminate=!0}async clearIndeterminate(){this.indeterminate=!1}get hasErrorMessage(){var e;return"string"==typeof this.error&&(null===(e=this.error)||void 0===e?void 0:e.length)>0}get hasCustomErrorMessage(){var e;return"string"==typeof this.customErrorMessage&&(null===(e=this.customErrorMessage)||void 0===e?void 0:e.length)>0}get hasValidationError(){var e;return"valid"!==this.validityState&&(null===(e=this.validityMessage)||void 0===e?void 0:e.length)>0}get hasInvalidMessage(){return!!this.invalid&&(this.hasErrorMessage||this.hasCustomErrorMessage||this.hasValidationError)}get hasValidMessage(){const{valid:e,validMessage:t}=this,r="string"==typeof t&&(null==t?void 0:t.trim().length)>0;return e&&r}get hasMessage(){return this.hasInvalidMessage||this.hasValidMessage}render(){const{error:e,name:t,value:o,disabled:s,required:a,uniqueId:c,checked:h,indeterminate:n}=this;return r(i,{key:"f7c0ad26bdf8c6c5a90cd528c17c4166c4f2157e",onClick:this.handleClick},r("div",{key:"daee7433141deb1b4518816419a9306c41e7acc9",class:"r-checkbox"},r("input",Object.assign({key:"0af70ca4dcd3173d08f3433f7acbf57f582dae91",class:"r-checkbox--input",type:"checkbox"},{name:t,value:o,disabled:s,required:a,checked:h,indeterminate:n},{id:`${c}-input`,ref:e=>this.nativeElement=e,"aria-describedby":this.hasMessage?`${c}-message`:null,"aria-required":`${this.required||!1}`,"aria-invalid":`${this.invalid||!1}`})),r("div",{key:"af464addb6bedf4f0f5d2840232dddd49cbd38bf",class:"r-checkbox--box","aria-hidden":"true"},this.checked?r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M8.80019 15.8988L4.6002 11.6988L3.2002 13.0988L8.80019 18.6988L20.8002 6.69883L19.4002 5.29883L8.80019 15.8988Z",fill:"currentColor"})):this.indeterminate?r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("rect",{x:"4",y:"11",width:"16",height:"2",fill:"currentColor"})):null),r("div",{key:"a3c22a2ceb267d1f49c67cbad26eca3fb51f750a",class:"r-checkbox--description"},r("label",{key:"1d1d951e3576d27234d2b2f3c8f1f7ace1bc3777",class:"r-checkbox--label",id:`${c}-label`,htmlFor:`${c}-input`},r("slot",{key:"64447a97e27412d656539942d54f5d9a5f943ab6"})),r("div",{key:"eb3e073090998465592de282541103d3ebc5202d",id:`${c}-message`,class:this.hasMessage?"r-checkbox--message":"visually-hidden","aria-live":"polite","aria-atomic":"true"},this.hasInvalidMessage&&r("r-hint",{key:"b40af54c79d3c694d1ea9138e53b508be6c81a76",variant:"error"},e||this.customErrorMessage||this.validityMessage),this.hasValidMessage&&r("r-hint",{key:"9b2dba99ca2d97f04bfd7efd2e69677c79b7ec77",variant:"success"},this.validMessage)))))}get host(){return o(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};a.style=":host{display:block;user-select:none;box-sizing:border-box;font-family:var(--r-font-family-text);font-size:var(--r-font-size-400);text-align:left;color:var(--r-text-regular);cursor:pointer}:host ::slotted(a),:host ::slotted(a:visited),:host ::slotted(a:hover),:host ::slotted(a:focus),:host ::slotted(a:active){color:var(--r-text-regular)}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-hovered)}:host(:focus-within:not(:active)){box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px;--r-checkbox--box--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-checkbox--box--outline:2px solid var(--r-border-focused, #0071e3);--r-checkbox--box--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-pressed)}:host([invalid]:not([invalid=false])){--r-checkbox--box--border-color:var(--r-status-error-regular);--r-checkbox--box--background-color:var(--r-status-error-soft);--r-checkbox--marker--color:var(--r-status-error-regular)}:host([disabled]:not([disabled=false])){--r-checkbox--box--opacity:0.4;--r-checkbox--cursor:not-allowed;--r-checkbox--label-container--cursor:not-allowed;--r-checkbox--label--cursor:not-allowed;cursor:not-allowed}.r-checkbox{position:var(--r-checkbox--position, relative);display:var(--r-checkbox--display, flex);gap:var(--r-checkbox--gap, var(--r-spacing-100, 1rem));cursor:var(--r-checkbox--cursor, pointer);padding:var(--r-checkbox--padding, var(--r-spacing-100, 1rem));min-height:var(--r-checkbox--min-height, var(--r-spacing-150, 1.5rem))}.r-checkbox--input{position:var(--r-checkbox--input--position, absolute);top:var(--r-checkbox--input--top, var(--r-checkbox--padding));left:var(--r-checkbox--input--left, var(--r-checkbox--padding));opacity:var(--r-checkbox--input--opacity, 0);width:var(--r-checkbox--input--width, 1.5rem);height:var(--r-checkbox--input--height, 1.5rem);box-sizing:var(--r-checkbox--input--box-sizing, border-box);padding:var(--r-checkbox--input--padding, 0);margin:var(--r-checkbox--input--margin, 0)}.r-checkbox--box{position:var(--r-checkbox--box--position, relative);display:var(--r-checkbox--box--display, flex);align-items:var(--r-checkbox--box--align-items, center);justify-content:var(--r-checkbox--box--justify-content, center);left:var(--r-checkbox--box--left, 0);top:var(--r-checkbox--box--top, 0);height:var(--r-checkbox--box--height, 1.5rem);width:var(--r-checkbox--box--width, 1.5rem);min-width:var(--r-checkbox--box--min-width, 1.5rem);background-color:var(--r-checkbox--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-checkbox--box--border-width, 0.0625rem);border-style:var(--r-checkbox--box--border-style, solid);border-color:var(--r-checkbox--box--border-color, var(--r-border-soft, #686868));outline:var(--r-checkbox--box--outline, none);outline-offset:var(--r-checkbox--box--outline-offset, 0);box-sizing:var(--r-checkbox--box--box-sizing, border-box);box-shadow:var(--r-checkbox--box--box-shadow, none);opacity:var(--r-checkbox--box--opacity, 1)}.r-checkbox--description{cursor:var(--r-checkbox--label-container--cursor, pointer);flex:var(--r-checkbox--label-container--flex, 1);line-height:var(--r-checkbox--label-container--line-height, 1.5);display:var(--r-checkbox--label-container--display, flex);flex-direction:var(--r-checkbox--label-container--flex-direction, column);gap:var(--r-checkbox--label-container--gap, var(--r-spacing-025, 0.25rem))}.r-checkbox--label{cursor:var(--r-checkbox--label--cursor, pointer)}.r-checkbox--message{margin-top:var(--r-checkbox--message--margin-top, var(--r-spacing-025, 0.25rem))}:host(.visually-hidden),.visually-hidden{position:absolute;width:0.0625rem;height:0.0625rem;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";export{a as r_checkbox}
1
+ import{r as e,c as t,h as r,H as i,g as o}from"./p-Da7qOBFr.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){e(this,r),this.rChange=t(this,"rChange"),this.rReset=t(this,"rReset"),this.rValidate=t(this,"rValidate"),this.showValid=!1,this.validityState="",this.validityMessage="",this.initial={},this.getValidityStateData=e=>{for(const t in e.validity)if(e.validity[t]){if(this.validityState=t,this[t+"Message"])return void(this.validityMessage=this[t+"Message"]);this.validityMessage=e.validationMessage}},this.validateFormElement=(e=null)=>{if(null===e)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(e);const t="valid"===this.validityState;this.valid=t,this.invalid=!t,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.uniqueId=`r-checkbox-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.touched=!1,this.handleClick=e=>{this.disabled||"A"!==e.target.tagName&&(e.preventDefault(),this.toggleChecked())},this.onSubmitForm=e=>{this.isNoValidate||(this.validateFormElement(this.nativeElement),this.invalid&&(e.preventDefault(),e.stopPropagation()))},this.onResetForm=()=>{this.validityState=null,this.validityMessage=null,this.checked=this.initial.checked,this.invalid=this.initial.invalid,this.valid=!this.invalid;const{host:e,value:t,checked:r}=this;this.rReset.emit({element:e,value:t,checked:r})},this.contributeToFormData=e=>{s(this.nativeElement||this.host,e.formData)}}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var e;return(null===(e=this.parentFormEl)||void 0===e?void 0:e.hasAttribute("novalidate"))||this.novalidate||!1}async getValidityState(){return this.getValidityStateData(this.nativeElement),{state:this.validityState,message:this.validityMessage}}async handleCheckedChange(){if(!this.touched)return;if(this.disabled)return;const{host:e,value:t,checked:r}=this;this.rChange.emit({element:e,value:t,checked:r}),this.nativeElement&&(this.nativeElement.checked=r),this.required&&!this.isNoValidate&&this.validateFormElement(this.nativeElement)}connectFormEventListeners(){var e,t,r;null===(e=this.parentFormEl)||void 0===e||e.addEventListener("formdata",this.contributeToFormData),null===(t=this.parentFormEl)||void 0===t||t.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("reset",this.onResetForm)}disconnectFormEventListeners(){var e,t,r;null===(e=this.parentFormEl)||void 0===e||e.removeEventListener("formdata",this.contributeToFormData),null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("submit",this.onSubmitForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("reset",this.onResetForm)}componentWillLoad(){this.initial.checked=this.checked,this.initial.invalid=this.invalid}componentDidLoad(){this.nativeElement&&(this.nativeElement.indeterminate=this.indeterminate)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}async setFocus(){var e;null===(e=this.nativeElement)||void 0===e||e.focus()}async setBlur(){var e;null===(e=this.nativeElement)||void 0===e||e.blur()}async check(){this.checked=!0}async uncheck(){this.checked=!1}async toggleChecked(){this.touched=!0,this.checked=!this.checked}async setIndeterminate(){this.indeterminate=!0}async clearIndeterminate(){this.indeterminate=!1}get hasErrorMessage(){var e;return"string"==typeof this.error&&(null===(e=this.error)||void 0===e?void 0:e.length)>0}get hasCustomErrorMessage(){var e;return"string"==typeof this.customErrorMessage&&(null===(e=this.customErrorMessage)||void 0===e?void 0:e.length)>0}get hasValidationError(){var e;return"valid"!==this.validityState&&(null===(e=this.validityMessage)||void 0===e?void 0:e.length)>0}get hasInvalidMessage(){return!!this.invalid&&(this.hasErrorMessage||this.hasCustomErrorMessage||this.hasValidationError)}get hasValidMessage(){const{valid:e,validMessage:t}=this,r="string"==typeof t&&(null==t?void 0:t.trim().length)>0;return e&&r}get hasMessage(){return this.hasInvalidMessage||this.hasValidMessage}render(){const{error:e,name:t,value:o,disabled:s,required:a,uniqueId:c,checked:h,indeterminate:n}=this;return r(i,{key:"79d7e8e080149a1ed8fee3d407f40da28d89e113",onClick:this.handleClick},r("div",{key:"4a55be6beed582b9fbcea98da4c3728f63d8bf2f",class:"r-checkbox"},r("input",Object.assign({key:"482806370c082d8928222922b2182ad212c9fd16",class:"r-checkbox--input",type:"checkbox"},{name:t,value:o,disabled:s,required:a,checked:h,indeterminate:n},{id:`${c}-input`,ref:e=>this.nativeElement=e,"aria-describedby":this.hasMessage?`${c}-message`:null,"aria-required":`${this.required||!1}`,"aria-invalid":`${this.invalid||!1}`})),r("div",{key:"f3650c5055c733f8f55e0d1e684df2ef18629271",class:"r-checkbox--box","aria-hidden":"true"},this.checked?r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M8.80019 15.8988L4.6002 11.6988L3.2002 13.0988L8.80019 18.6988L20.8002 6.69883L19.4002 5.29883L8.80019 15.8988Z",fill:"currentColor"})):this.indeterminate?r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("rect",{x:"4",y:"11",width:"16",height:"2",fill:"currentColor"})):null),r("div",{key:"debd71ef2e1fcf46414c0bd93e6ee3cb35d58649",class:"r-checkbox--description"},r("label",{key:"1698497afd3be427dd98b9c8292464ca8e805269",class:"r-checkbox--label",id:`${c}-label`,htmlFor:`${c}-input`},r("slot",{key:"a7d0646be5338917b042ce0cd49d32c920585153"})),r("div",{key:"8f6f206dcb74cff5acaac4b58dcc9792f4f3367c",id:`${c}-message`,class:this.hasMessage?"r-checkbox--message":"visually-hidden","aria-live":"polite","aria-atomic":"true"},this.hasInvalidMessage&&r("r-hint",{key:"5fdb37b61532b821c87966b6763a20d58e3929ab",variant:"error"},e||this.customErrorMessage||this.validityMessage),this.hasValidMessage&&r("r-hint",{key:"74ff89cd4066b93a3d0f28271ca3f9fcfcdbd976",variant:"success"},this.validMessage)))))}get host(){return o(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};a.style=":host{display:block;user-select:none;box-sizing:border-box;font-family:var(--r-font-family-text);font-size:var(--r-font-size-400);text-align:left;color:var(--r-text-regular);cursor:pointer}:host ::slotted(a),:host ::slotted(a:visited),:host ::slotted(a:hover),:host ::slotted(a:focus),:host ::slotted(a:active){color:var(--r-text-regular)}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-hovered)}:host(:focus-within:not(:active)){box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px;--r-checkbox--box--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-checkbox--box--outline:2px solid var(--r-border-focused, #0071e3);--r-checkbox--box--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-pressed)}:host([invalid]:not([invalid=false])){--r-checkbox--box--border-color:var(--r-status-error-regular);--r-checkbox--box--background-color:var(--r-status-error-soft);--r-checkbox--marker--color:var(--r-status-error-regular)}:host([disabled]:not([disabled=false])){--r-checkbox--box--opacity:0.4;--r-checkbox--cursor:not-allowed;--r-checkbox--label-container--cursor:not-allowed;--r-checkbox--label--cursor:not-allowed;cursor:not-allowed}.r-checkbox{position:var(--r-checkbox--position, relative);display:var(--r-checkbox--display, flex);gap:var(--r-checkbox--gap, var(--r-spacing-100, 1rem));cursor:var(--r-checkbox--cursor, pointer);padding:var(--r-checkbox--padding, var(--r-spacing-100, 1rem));min-height:var(--r-checkbox--min-height, var(--r-spacing-150, 1.5rem))}.r-checkbox--input{position:var(--r-checkbox--input--position, absolute);top:var(--r-checkbox--input--top, var(--r-checkbox--padding));left:var(--r-checkbox--input--left, var(--r-checkbox--padding));opacity:var(--r-checkbox--input--opacity, 0);width:var(--r-checkbox--input--width, 1.5rem);height:var(--r-checkbox--input--height, 1.5rem);box-sizing:var(--r-checkbox--input--box-sizing, border-box);padding:var(--r-checkbox--input--padding, 0);margin:var(--r-checkbox--input--margin, 0)}.r-checkbox--box{position:var(--r-checkbox--box--position, relative);display:var(--r-checkbox--box--display, flex);align-items:var(--r-checkbox--box--align-items, center);justify-content:var(--r-checkbox--box--justify-content, center);left:var(--r-checkbox--box--left, 0);top:var(--r-checkbox--box--top, 0);height:var(--r-checkbox--box--height, 1.5rem);width:var(--r-checkbox--box--width, 1.5rem);min-width:var(--r-checkbox--box--min-width, 1.5rem);background-color:var(--r-checkbox--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-checkbox--box--border-width, 0.0625rem);border-style:var(--r-checkbox--box--border-style, solid);border-color:var(--r-checkbox--box--border-color, var(--r-border-soft, #686868));outline:var(--r-checkbox--box--outline, none);outline-offset:var(--r-checkbox--box--outline-offset, 0);box-sizing:var(--r-checkbox--box--box-sizing, border-box);box-shadow:var(--r-checkbox--box--box-shadow, none);opacity:var(--r-checkbox--box--opacity, 1)}.r-checkbox--description{cursor:var(--r-checkbox--label-container--cursor, pointer);flex:var(--r-checkbox--label-container--flex, 1);line-height:var(--r-checkbox--label-container--line-height, 1.5);display:var(--r-checkbox--label-container--display, flex);flex-direction:var(--r-checkbox--label-container--flex-direction, column);gap:var(--r-checkbox--label-container--gap, var(--r-spacing-025, 0.25rem))}.r-checkbox--label{cursor:var(--r-checkbox--label--cursor, pointer)}.r-checkbox--message{margin-top:var(--r-checkbox--message--margin-top, var(--r-spacing-025, 0.25rem))}:host(.visually-hidden),.visually-hidden{position:absolute;width:0.0625rem;height:0.0625rem;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";export{a as r_checkbox}