@rebilly/instruments 3.46.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [4.0.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.47.0...instruments/core-v4.0.0) (2023-08-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### ⚠ BREAKING CHANGES
|
|
5
|
+
|
|
6
|
+
* **revel:** Migrate revel to typescript (#661)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **revel:** Migrate revel to typescript ([#661](https://github.com/Rebilly/rebilly/issues/661)) ([ef63cbc](https://github.com/Rebilly/rebilly/commit/ef63cbc6a16c9c37d5bc17b10e003eb26c1c4e50)), closes [#608](https://github.com/Rebilly/rebilly/issues/608) [#630](https://github.com/Rebilly/rebilly/issues/630) [#636](https://github.com/Rebilly/rebilly/issues/636) [#658](https://github.com/Rebilly/rebilly/issues/658) [#642](https://github.com/Rebilly/rebilly/issues/642)
|
|
11
|
+
|
|
12
|
+
## [3.47.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.46.0...instruments/core-v3.47.0) (2023-08-04)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **recomm:** Update API spec ([#833](https://github.com/Rebilly/rebilly/issues/833)) ([943ac69](https://github.com/Rebilly/rebilly/commit/943ac696eb5ef864c928e565b68dd1ce1cbc143a))
|
|
18
|
+
|
|
1
19
|
## [3.46.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.45.6...instruments/core-v3.46.0) (2023-08-03)
|
|
2
20
|
|
|
3
21
|
|
package/dist/index.js
CHANGED
|
@@ -65,4 +65,4 @@ function L(e){var t=_(e);return null===t?null:("hsl"===t.type&&(t.values=P(t.val
|
|
|
65
65
|
* @version v2.1.1
|
|
66
66
|
* @link http://noeldelgado.github.io/values.js/
|
|
67
67
|
* @license MIT
|
|
68
|
-
*/var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return C(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),Am=Pm;const Im=e=>new Am(e);function Cm(e,t=1){if(null===e)return e;const n=Im(e);return n.alpha=t,n.rgbString()}const jm=e=>Cm(e,.5),Lm=(e,t)=>{if(null===e)return e;return Im(e).shade(t).hexString()};function Tm(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nm{constructor(e){Tm(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const Om={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>jm(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Cm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Lm(e.buttonColorBackground,20):Lm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Nm(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Lm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Nm(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?jm(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Nm(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?jm(e.inputErrorColorText):jm(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Rm=new Proxy(Om,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Mm{constructor(e={}){this.overrides=e,this.theme=Rm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Mm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Mm,"nonCssProperties",["labels"]);function Fm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Hm=()=>{const{theme:e={},css:t}=Yr.options,n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Mm(e).build())}\n `;return t})(e||{});return Od({element:"style",attributes:{type:"text/css"},content:Fm(n),target:"head"}),t&&Od({element:"style",attributes:{type:"text/css"},content:Fm(t),target:"head"}),n};const Dm=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Bm,qm=()=>{var e;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(e=e.browserData)&&void 0!==e&&e.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Dm},Vm=function(e){if("Function"===x(e))return w(e)},zm=Object.keys||function(e){return $t(e,xt)},Wm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=C(t),a=zm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Um={f:Wm},Gm=M("document","documentElement"),Zm="prototype",Xm="script",Km=et("IE_PROTO"),Jm=function(){},Ym=function(e){return"<"+Xm+">"+e+"</"+Xm+">"},Qm=function(e){e.write(Ym("")),e.close();var t=e.parentWindow.Object;return e=null,t},ef=function(){try{Bm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ef="undefined"!=typeof document?document.domain&&Bm?Qm(Bm):(t=Ee("iframe"),n="java"+Xm+":",t.style.display="none",Gm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ym("document.F=Object")),e.close(),e.F):Qm(Bm);for(var r=xt.length;r--;)delete ef[Zm][xt[r]];return ef()};tt[Km]=!0;var tf,nf,rf,af=Object.create||function(e,t){var n;return null!==e?(Jm[Zm]=Le(e),n=new Jm,Jm[Zm]=null,n[Km]=e):n=ef(),void 0===t?n:Um.f(n,t)},of=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sf=et("IE_PROTO"),lf=Object,cf=lf.prototype,uf=of?lf.getPrototypeOf:function(e){var t=se(e);if(ce(t,sf))return t[sf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof lf?cf:null},df=ge("iterator"),pf=!1;[].keys&&("next"in(rf=[].keys())?(nf=uf(uf(rf)))!==Object.prototype&&(tf=nf):pf=!0);var mf=!R(tf)||s((function(){var e={};return tf[df].call(e)!==e}));mf&&(tf={}),N(tf[df])||ct(tf,df,(function(){return this}));var ff={IteratorPrototype:tf,BUGGY_SAFARI_ITERATORS:pf},hf=De.f,yf=ge("toStringTag"),gf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,yf)&&hf(e,yf,{configurable:!0,value:t})},vf=ff.IteratorPrototype,bf=function(e,t){return{value:e,done:t}},wf=ge("match"),kf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$f=RegExp.prototype,xf=function(e){var t=e.flags;return void 0!==t||"flags"in $f||ce(e,"flags")||!F($f,e)?t:d(kf,e)},Ef=function(){},Sf=[],_f=M("Reflect","construct"),Pf=/^\s*(?:class|function)\b/,Af=w(Pf.exec),If=!Pf.exec(Ef),Cf=function(e){if(!N(e))return!1;try{return _f(Ef,Sf,e),!0}catch(e){return!1}},jf=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return If||!!Af(Pf,Ke(e))}catch(e){return!0}};jf.sham=!0;var Lf,Tf,Nf=!_f||s((function(){var e;return Cf(Cf.call)||!Cf(Object)||!Cf((function(){e=!0}))||e}))?jf:Cf,Of=TypeError,Rf=ge("species"),Mf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Rf])?t:function(e){if(Nf(e))return e;throw Of(K(e)+" is not a constructor")}(n)},Ff=w("".charAt),Hf=w("".charCodeAt),Df=w("".slice),Bf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Hf(o,i))<55296||r>56319||i+1===s||(a=Hf(o,i+1))<56320||a>57343?e?Ff(o,i):r:e?Df(o,i,i+2):a-56320+(r-55296<<10)+65536}},qf={codeAt:Bf(!1),charAt:Bf(!0)}.charAt,Vf=i.RegExp,zf=s((function(){var e=Vf("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Wf=zf||s((function(){return!Vf("a","y").sticky})),Uf={BROKEN_CARET:zf||s((function(){var e=Vf("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Wf,UNSUPPORTED_Y:zf},Gf=i.RegExp,Zf=s((function(){var e=Gf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Xf=i.RegExp,Kf=s((function(){var e=Xf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Jf=st.get,Yf=oe("native-string-replace",String.prototype.replace),Qf=RegExp.prototype.exec,eh=Qf,th=w("".charAt),nh=w("".indexOf),rh=w("".replace),ah=w("".slice),oh=(Tf=/b*/g,d(Qf,Lf=/a/,"a"),d(Qf,Tf,"a"),0!==Lf.lastIndex||0!==Tf.lastIndex),ih=Uf.BROKEN_CARET,sh=void 0!==/()??/.exec("")[1];(oh||sh||ih||Zf||Kf)&&(eh=function(e){var t,n,r,a,o,i,s,l=this,c=Jf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(eh,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=ih&&l.sticky,h=d(kf,l),y=l.source,g=0,v=u;if(f&&(h=rh(h,"y",""),-1===nh(h,"g")&&(h+="g"),v=ah(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==th(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),sh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),oh&&(r=l.lastIndex),a=d(Qf,f?n:l,v),f?a?(a.input=ah(a.input,g),a[0]=ah(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:oh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),sh&&a&&a.length>1&&d(Yf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=af(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var lh=eh,ch=TypeError,uh=ge("matchAll"),dh="RegExp String",ph=dh+" Iterator",mh=st.set,fh=st.getterFor(ph),hh=RegExp.prototype,yh=TypeError,gh=Vm("".indexOf),vh=Vm("".matchAll),bh=!!vh&&!s((function(){vh("a",/./)})),wh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=af(vf,{next:y(+!r,n)}),gf(e,a,!1),e}((function(e,t,n,r){mh(this,{type:ph,regexp:e,string:t,global:n,unicode:r,done:!1})}),dh,(function(){var e=fh(this);if(e.done)return bf(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(lh,e,t);throw ch("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,bf(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?qf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),bf(r,!1)):(e.done=!0,bf(r,!1))})),kh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Mf(a,RegExp),s=Qt(xf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~gh(s,"g"),r=!!~gh(s,"u"),t.lastIndex=gt(a.lastIndex),new wh(t,o,n,r)};function $h(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:bh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(bh)return vh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[wf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(xf(e))),!~gh(t,"g")))throw yh("`.matchAll` does not allow non-global regexes");if(bh)return vh(a,e);if(r=Q(e,uh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[uh](n)}}),uh in hh||ct(hh,uh,kh);const xh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var Eh=()=>{var e;const t=$h(`\n ${Yr.mainStyleVars}\n ${(null===(e=Yr.options)||void 0===e?void 0:e.css)||""}\n `);return{base:{...xh(t,"input"),":hover":xh(t,"inputHover"),":focus":xh(t,"inputFocus"),"::placeholder":xh(t,"inputPlaceholder"),"::selection":xh(t,"inputSelection")},invalid:{...xh(t,"inputError"),":hover":xh(t,"inputErrorHover"),":focus":xh(t,"inputErrorFocus"),"::placeholder":xh(t,"inputErrorPlaceholder"),"::selection":xh(t,"inputErrorSelection")},buttons:{base:{...xh(t,"buttonSecondary"),":hover":xh(t,"buttonSecondaryHover"),":focus":xh(t,"buttonSecondaryActive")},active:{...xh(t,"button"),":hover":xh(t,"buttonHover"),":focus":xh(t,"buttonActive")}}}};function Sh({eventName:e,callback:t}){if(!Ci.includes(e))throw new Error(`${e} is not a supported event`);const n=go(e);Ii[n].addEventListener(t)}const _h=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function Ph({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,i;const s=null==n||null===(o=n.method)||void 0===o?void 0:o.method,l="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",_h(l,s));const c=document.querySelector(".rebilly-instruments-modal-overlay"),u=document.querySelector(".rebilly-instruments-modal-container"),d=document.querySelector(".rebilly-instruments-modal-close"),p=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:p}),Yr.loader.startLoading({section:"modal",id:e});const m={options:Yr.toModel().options,...n},f=await new Fi({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:Yr.loader}),l||d.addEventListener("click",h),null===(i=f.component)||void 0===i||i.call("route",{name:"approval-url"}),f}async function Ah({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return dc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Ih({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=gc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return dc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Ch({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await Ah({state:Yr,payload:e}):await Ih({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new bd({...e});const a="rebilly-instruments-approval-url";Ph({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Ii.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ii.purchaseCompleted.dispatch(r),r}catch(e){return Ni(e),e}}async function jh({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return dc((async()=>{var t;const{fields:n}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(n.token||Yr.options.jwt);const r={id:n.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(r.data={...r.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(t=t.transaction)&&void 0!==t&&t.redirectUrl&&(r.data.redirectUrl=`${r.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:a}=await Yr.storefront.paymentInstruments.setup(r);return{instrument:n,transaction:a}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new bd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;Ph({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ii.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ii.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ni(e),e}}async function Lh({componentName:e,payload:t}){switch(e){case"result":jd(),async function({payload:e}){var t,n;const r=Jr.form;r||await Nd();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":jd(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&$c({instrument:e});const o=Jr.form;o||await Nd();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("update",s),null==o||null===(n=o.component)||void 0===n||n.call("route",{name:"confirmation"}),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Ch({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{jh({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Th({state:e,payload:t}){Lh({componentName:"result",payload:t,state:e})}var Nh=({state:e={}})=>{e.options.features.autoConfirmation&&Sh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?jh({state:e,payload:t}):Ch({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Lh({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(Sh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}),Sh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}))};async function Oh({setupFramepay:e=_m,...t}={}){try{var n,r,a,o,i,s;Yr.data={},Yr.options={},Yr.options=Sm({options:t}),Yr.form=Rd({element:"form"}),Yr.summary=Rd({element:"summary"}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.storefront=Md(),Yr.mainStyleVars=Hm(),Yr.options.themeFramepay=Eh(),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[l]=await Promise.all([wd(),e()]);Yr.data=l,Ii.dataReady.dispatch(Yr.data),Yr.i18n=qm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Nd().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?_d():Ld()})),Yr.summary&&kc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0;((null===(o=Yr.options)||void 0===o?void 0:o.invoiceId)||(null===(i=Yr.data)||void 0===i||null===(i=i.transaction)||void 0===i?void 0:i.invoiceId))&&Yr.data.invoice.isPaid&&(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),document.querySelector('[data-rebilly-instruments="form"]').remove(),Ni(Yr.translate.getTranslation("form.error.invoiceIsPaid"),!1)),null!==(s=l.readyToPay)&&void 0!==s&&s.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ni(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ni(e),e}Nh({state:Yr})}async function Rh(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),Pi.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Jl.cancelAll(),Yr.loader.clearAll()}var Mh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await Oh(e)}async destroy(){await Rh()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Rh(),Oh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Ch({payload:e})}async setup(e){await jh({payload:e})}async show(e,t){await Lh({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.45.6"}on(e,t){Sh({eventName:e,callback:t})}};export{Mh as default};
|
|
68
|
+
*/var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return C(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),Am=Pm;const Im=e=>new Am(e);function Cm(e,t=1){if(null===e)return e;const n=Im(e);return n.alpha=t,n.rgbString()}const jm=e=>Cm(e,.5),Lm=(e,t)=>{if(null===e)return e;return Im(e).shade(t).hexString()};function Tm(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nm{constructor(e){Tm(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const Om={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>jm(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Cm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Lm(e.buttonColorBackground,20):Lm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Nm(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Lm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Nm(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?jm(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Nm(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?jm(e.inputErrorColorText):jm(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Rm=new Proxy(Om,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Mm{constructor(e={}){this.overrides=e,this.theme=Rm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Mm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Mm,"nonCssProperties",["labels"]);function Fm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Hm=()=>{const{theme:e={},css:t}=Yr.options,n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Mm(e).build())}\n `;return t})(e||{});return Od({element:"style",attributes:{type:"text/css"},content:Fm(n),target:"head"}),t&&Od({element:"style",attributes:{type:"text/css"},content:Fm(t),target:"head"}),n};const Dm=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Bm,qm=()=>{var e;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(e=e.browserData)&&void 0!==e&&e.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Dm},Vm=function(e){if("Function"===x(e))return w(e)},zm=Object.keys||function(e){return $t(e,xt)},Wm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=C(t),a=zm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Um={f:Wm},Gm=M("document","documentElement"),Zm="prototype",Xm="script",Km=et("IE_PROTO"),Jm=function(){},Ym=function(e){return"<"+Xm+">"+e+"</"+Xm+">"},Qm=function(e){e.write(Ym("")),e.close();var t=e.parentWindow.Object;return e=null,t},ef=function(){try{Bm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ef="undefined"!=typeof document?document.domain&&Bm?Qm(Bm):(t=Ee("iframe"),n="java"+Xm+":",t.style.display="none",Gm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ym("document.F=Object")),e.close(),e.F):Qm(Bm);for(var r=xt.length;r--;)delete ef[Zm][xt[r]];return ef()};tt[Km]=!0;var tf,nf,rf,af=Object.create||function(e,t){var n;return null!==e?(Jm[Zm]=Le(e),n=new Jm,Jm[Zm]=null,n[Km]=e):n=ef(),void 0===t?n:Um.f(n,t)},of=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sf=et("IE_PROTO"),lf=Object,cf=lf.prototype,uf=of?lf.getPrototypeOf:function(e){var t=se(e);if(ce(t,sf))return t[sf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof lf?cf:null},df=ge("iterator"),pf=!1;[].keys&&("next"in(rf=[].keys())?(nf=uf(uf(rf)))!==Object.prototype&&(tf=nf):pf=!0);var mf=!R(tf)||s((function(){var e={};return tf[df].call(e)!==e}));mf&&(tf={}),N(tf[df])||ct(tf,df,(function(){return this}));var ff={IteratorPrototype:tf,BUGGY_SAFARI_ITERATORS:pf},hf=De.f,yf=ge("toStringTag"),gf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,yf)&&hf(e,yf,{configurable:!0,value:t})},vf=ff.IteratorPrototype,bf=function(e,t){return{value:e,done:t}},wf=ge("match"),kf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$f=RegExp.prototype,xf=function(e){var t=e.flags;return void 0!==t||"flags"in $f||ce(e,"flags")||!F($f,e)?t:d(kf,e)},Ef=function(){},Sf=[],_f=M("Reflect","construct"),Pf=/^\s*(?:class|function)\b/,Af=w(Pf.exec),If=!Pf.exec(Ef),Cf=function(e){if(!N(e))return!1;try{return _f(Ef,Sf,e),!0}catch(e){return!1}},jf=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return If||!!Af(Pf,Ke(e))}catch(e){return!0}};jf.sham=!0;var Lf,Tf,Nf=!_f||s((function(){var e;return Cf(Cf.call)||!Cf(Object)||!Cf((function(){e=!0}))||e}))?jf:Cf,Of=TypeError,Rf=ge("species"),Mf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Rf])?t:function(e){if(Nf(e))return e;throw Of(K(e)+" is not a constructor")}(n)},Ff=w("".charAt),Hf=w("".charCodeAt),Df=w("".slice),Bf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Hf(o,i))<55296||r>56319||i+1===s||(a=Hf(o,i+1))<56320||a>57343?e?Ff(o,i):r:e?Df(o,i,i+2):a-56320+(r-55296<<10)+65536}},qf={codeAt:Bf(!1),charAt:Bf(!0)}.charAt,Vf=i.RegExp,zf=s((function(){var e=Vf("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Wf=zf||s((function(){return!Vf("a","y").sticky})),Uf={BROKEN_CARET:zf||s((function(){var e=Vf("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Wf,UNSUPPORTED_Y:zf},Gf=i.RegExp,Zf=s((function(){var e=Gf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Xf=i.RegExp,Kf=s((function(){var e=Xf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Jf=st.get,Yf=oe("native-string-replace",String.prototype.replace),Qf=RegExp.prototype.exec,eh=Qf,th=w("".charAt),nh=w("".indexOf),rh=w("".replace),ah=w("".slice),oh=(Tf=/b*/g,d(Qf,Lf=/a/,"a"),d(Qf,Tf,"a"),0!==Lf.lastIndex||0!==Tf.lastIndex),ih=Uf.BROKEN_CARET,sh=void 0!==/()??/.exec("")[1];(oh||sh||ih||Zf||Kf)&&(eh=function(e){var t,n,r,a,o,i,s,l=this,c=Jf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(eh,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=ih&&l.sticky,h=d(kf,l),y=l.source,g=0,v=u;if(f&&(h=rh(h,"y",""),-1===nh(h,"g")&&(h+="g"),v=ah(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==th(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),sh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),oh&&(r=l.lastIndex),a=d(Qf,f?n:l,v),f?a?(a.input=ah(a.input,g),a[0]=ah(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:oh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),sh&&a&&a.length>1&&d(Yf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=af(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var lh=eh,ch=TypeError,uh=ge("matchAll"),dh="RegExp String",ph=dh+" Iterator",mh=st.set,fh=st.getterFor(ph),hh=RegExp.prototype,yh=TypeError,gh=Vm("".indexOf),vh=Vm("".matchAll),bh=!!vh&&!s((function(){vh("a",/./)})),wh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=af(vf,{next:y(+!r,n)}),gf(e,a,!1),e}((function(e,t,n,r){mh(this,{type:ph,regexp:e,string:t,global:n,unicode:r,done:!1})}),dh,(function(){var e=fh(this);if(e.done)return bf(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(lh,e,t);throw ch("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,bf(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?qf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),bf(r,!1)):(e.done=!0,bf(r,!1))})),kh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Mf(a,RegExp),s=Qt(xf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~gh(s,"g"),r=!!~gh(s,"u"),t.lastIndex=gt(a.lastIndex),new wh(t,o,n,r)};function $h(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:bh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(bh)return vh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[wf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(xf(e))),!~gh(t,"g")))throw yh("`.matchAll` does not allow non-global regexes");if(bh)return vh(a,e);if(r=Q(e,uh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[uh](n)}}),uh in hh||ct(hh,uh,kh);const xh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var Eh=()=>{var e;const t=$h(`\n ${Yr.mainStyleVars}\n ${(null===(e=Yr.options)||void 0===e?void 0:e.css)||""}\n `);return{base:{...xh(t,"input"),":hover":xh(t,"inputHover"),":focus":xh(t,"inputFocus"),"::placeholder":xh(t,"inputPlaceholder"),"::selection":xh(t,"inputSelection")},invalid:{...xh(t,"inputError"),":hover":xh(t,"inputErrorHover"),":focus":xh(t,"inputErrorFocus"),"::placeholder":xh(t,"inputErrorPlaceholder"),"::selection":xh(t,"inputErrorSelection")},buttons:{base:{...xh(t,"buttonSecondary"),":hover":xh(t,"buttonSecondaryHover"),":focus":xh(t,"buttonSecondaryActive")},active:{...xh(t,"button"),":hover":xh(t,"buttonHover"),":focus":xh(t,"buttonActive")}}}};function Sh({eventName:e,callback:t}){if(!Ci.includes(e))throw new Error(`${e} is not a supported event`);const n=go(e);Ii[n].addEventListener(t)}const _h=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function Ph({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,i;const s=null==n||null===(o=n.method)||void 0===o?void 0:o.method,l="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",_h(l,s));const c=document.querySelector(".rebilly-instruments-modal-overlay"),u=document.querySelector(".rebilly-instruments-modal-container"),d=document.querySelector(".rebilly-instruments-modal-close"),p=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:p}),Yr.loader.startLoading({section:"modal",id:e});const m={options:Yr.toModel().options,...n},f=await new Fi({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:Yr.loader}),l||d.addEventListener("click",h),null===(i=f.component)||void 0===i||i.call("route",{name:"approval-url"}),f}async function Ah({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return dc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Ih({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=gc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return dc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Ch({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await Ah({state:Yr,payload:e}):await Ih({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new bd({...e});const a="rebilly-instruments-approval-url";Ph({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Ii.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ii.purchaseCompleted.dispatch(r),r}catch(e){return Ni(e),e}}async function jh({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return dc((async()=>{var t;const{fields:n}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(n.token||Yr.options.jwt);const r={id:n.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(r.data={...r.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(t=t.transaction)&&void 0!==t&&t.redirectUrl&&(r.data.redirectUrl=`${r.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:a}=await Yr.storefront.paymentInstruments.setup(r);return{instrument:n,transaction:a}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new bd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;Ph({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ii.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ii.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ni(e),e}}async function Lh({componentName:e,payload:t}){switch(e){case"result":jd(),async function({payload:e}){var t,n;const r=Jr.form;r||await Nd();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":jd(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&$c({instrument:e});const o=Jr.form;o||await Nd();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("update",s),null==o||null===(n=o.component)||void 0===n||n.call("route",{name:"confirmation"}),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Ch({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{jh({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Th({state:e,payload:t}){Lh({componentName:"result",payload:t,state:e})}var Nh=({state:e={}})=>{e.options.features.autoConfirmation&&Sh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?jh({state:e,payload:t}):Ch({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Lh({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(Sh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}),Sh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}))};async function Oh({setupFramepay:e=_m,...t}={}){try{var n,r,a,o,i,s;Yr.data={},Yr.options={},Yr.options=Sm({options:t}),Yr.form=Rd({element:"form"}),Yr.summary=Rd({element:"summary"}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.storefront=Md(),Yr.mainStyleVars=Hm(),Yr.options.themeFramepay=Eh(),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[l]=await Promise.all([wd(),e()]);Yr.data=l,Ii.dataReady.dispatch(Yr.data),Yr.i18n=qm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Nd().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?_d():Ld()})),Yr.summary&&kc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0;((null===(o=Yr.options)||void 0===o?void 0:o.invoiceId)||(null===(i=Yr.data)||void 0===i||null===(i=i.transaction)||void 0===i?void 0:i.invoiceId))&&Yr.data.invoice.isPaid&&(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),document.querySelector('[data-rebilly-instruments="form"]').remove(),Ni(Yr.translate.getTranslation("form.error.invoiceIsPaid"),!1)),null!==(s=l.readyToPay)&&void 0!==s&&s.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ni(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ni(e),e}Nh({state:Yr})}async function Rh(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),Pi.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Jl.cancelAll(),Yr.loader.clearAll()}var Mh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await Oh(e)}async destroy(){await Rh()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Rh(),Oh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Ch({payload:e})}async setup(e){await jh({payload:e})}async show(e,t){await Lh({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.47.0"}on(e,t){Sh({eventName:e,callback:t})}};export{Mh as default};
|
package/dist/index.min.js
CHANGED
|
@@ -65,4 +65,4 @@ function L(e){var t=_(e);return null===t?null:("hsl"===t.type&&(t.values=P(t.val
|
|
|
65
65
|
* @version v2.1.1
|
|
66
66
|
* @link http://noeldelgado.github.io/values.js/
|
|
67
67
|
* @license MIT
|
|
68
|
-
*/var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return C(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),Am=Pm;const Im=e=>new Am(e);function Cm(e,t=1){if(null===e)return e;const n=Im(e);return n.alpha=t,n.rgbString()}const jm=e=>Cm(e,.5),Lm=(e,t)=>{if(null===e)return e;return Im(e).shade(t).hexString()};function Tm(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nm{constructor(e){Tm(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const Om={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>jm(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Cm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Lm(e.buttonColorBackground,20):Lm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Nm(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Lm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Nm(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?jm(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Nm(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?jm(e.inputErrorColorText):jm(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Rm=new Proxy(Om,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Mm{constructor(e={}){this.overrides=e,this.theme=Rm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Mm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Mm,"nonCssProperties",["labels"]);function Fm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Hm=()=>{const{theme:e={},css:t}=Yr.options,n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Mm(e).build())}\n `;return t})(e||{});return Od({element:"style",attributes:{type:"text/css"},content:Fm(n),target:"head"}),t&&Od({element:"style",attributes:{type:"text/css"},content:Fm(t),target:"head"}),n};const Dm=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Bm,qm=()=>{var e;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(e=e.browserData)&&void 0!==e&&e.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Dm},Vm=function(e){if("Function"===x(e))return w(e)},zm=Object.keys||function(e){return $t(e,xt)},Wm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=C(t),a=zm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Um={f:Wm},Gm=M("document","documentElement"),Zm="prototype",Xm="script",Km=et("IE_PROTO"),Jm=function(){},Ym=function(e){return"<"+Xm+">"+e+"</"+Xm+">"},Qm=function(e){e.write(Ym("")),e.close();var t=e.parentWindow.Object;return e=null,t},ef=function(){try{Bm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ef="undefined"!=typeof document?document.domain&&Bm?Qm(Bm):(t=Ee("iframe"),n="java"+Xm+":",t.style.display="none",Gm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ym("document.F=Object")),e.close(),e.F):Qm(Bm);for(var r=xt.length;r--;)delete ef[Zm][xt[r]];return ef()};tt[Km]=!0;var tf,nf,rf,af=Object.create||function(e,t){var n;return null!==e?(Jm[Zm]=Le(e),n=new Jm,Jm[Zm]=null,n[Km]=e):n=ef(),void 0===t?n:Um.f(n,t)},of=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sf=et("IE_PROTO"),lf=Object,cf=lf.prototype,uf=of?lf.getPrototypeOf:function(e){var t=se(e);if(ce(t,sf))return t[sf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof lf?cf:null},df=ge("iterator"),pf=!1;[].keys&&("next"in(rf=[].keys())?(nf=uf(uf(rf)))!==Object.prototype&&(tf=nf):pf=!0);var mf=!R(tf)||s((function(){var e={};return tf[df].call(e)!==e}));mf&&(tf={}),N(tf[df])||ct(tf,df,(function(){return this}));var ff={IteratorPrototype:tf,BUGGY_SAFARI_ITERATORS:pf},hf=De.f,yf=ge("toStringTag"),gf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,yf)&&hf(e,yf,{configurable:!0,value:t})},vf=ff.IteratorPrototype,bf=function(e,t){return{value:e,done:t}},wf=ge("match"),kf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$f=RegExp.prototype,xf=function(e){var t=e.flags;return void 0!==t||"flags"in $f||ce(e,"flags")||!F($f,e)?t:d(kf,e)},Ef=function(){},Sf=[],_f=M("Reflect","construct"),Pf=/^\s*(?:class|function)\b/,Af=w(Pf.exec),If=!Pf.exec(Ef),Cf=function(e){if(!N(e))return!1;try{return _f(Ef,Sf,e),!0}catch(e){return!1}},jf=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return If||!!Af(Pf,Ke(e))}catch(e){return!0}};jf.sham=!0;var Lf,Tf,Nf=!_f||s((function(){var e;return Cf(Cf.call)||!Cf(Object)||!Cf((function(){e=!0}))||e}))?jf:Cf,Of=TypeError,Rf=ge("species"),Mf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Rf])?t:function(e){if(Nf(e))return e;throw Of(K(e)+" is not a constructor")}(n)},Ff=w("".charAt),Hf=w("".charCodeAt),Df=w("".slice),Bf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Hf(o,i))<55296||r>56319||i+1===s||(a=Hf(o,i+1))<56320||a>57343?e?Ff(o,i):r:e?Df(o,i,i+2):a-56320+(r-55296<<10)+65536}},qf={codeAt:Bf(!1),charAt:Bf(!0)}.charAt,Vf=i.RegExp,zf=s((function(){var e=Vf("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Wf=zf||s((function(){return!Vf("a","y").sticky})),Uf={BROKEN_CARET:zf||s((function(){var e=Vf("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Wf,UNSUPPORTED_Y:zf},Gf=i.RegExp,Zf=s((function(){var e=Gf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Xf=i.RegExp,Kf=s((function(){var e=Xf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Jf=st.get,Yf=oe("native-string-replace",String.prototype.replace),Qf=RegExp.prototype.exec,eh=Qf,th=w("".charAt),nh=w("".indexOf),rh=w("".replace),ah=w("".slice),oh=(Tf=/b*/g,d(Qf,Lf=/a/,"a"),d(Qf,Tf,"a"),0!==Lf.lastIndex||0!==Tf.lastIndex),ih=Uf.BROKEN_CARET,sh=void 0!==/()??/.exec("")[1];(oh||sh||ih||Zf||Kf)&&(eh=function(e){var t,n,r,a,o,i,s,l=this,c=Jf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(eh,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=ih&&l.sticky,h=d(kf,l),y=l.source,g=0,v=u;if(f&&(h=rh(h,"y",""),-1===nh(h,"g")&&(h+="g"),v=ah(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==th(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),sh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),oh&&(r=l.lastIndex),a=d(Qf,f?n:l,v),f?a?(a.input=ah(a.input,g),a[0]=ah(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:oh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),sh&&a&&a.length>1&&d(Yf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=af(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var lh=eh,ch=TypeError,uh=ge("matchAll"),dh="RegExp String",ph=dh+" Iterator",mh=st.set,fh=st.getterFor(ph),hh=RegExp.prototype,yh=TypeError,gh=Vm("".indexOf),vh=Vm("".matchAll),bh=!!vh&&!s((function(){vh("a",/./)})),wh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=af(vf,{next:y(+!r,n)}),gf(e,a,!1),e}((function(e,t,n,r){mh(this,{type:ph,regexp:e,string:t,global:n,unicode:r,done:!1})}),dh,(function(){var e=fh(this);if(e.done)return bf(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(lh,e,t);throw ch("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,bf(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?qf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),bf(r,!1)):(e.done=!0,bf(r,!1))})),kh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Mf(a,RegExp),s=Qt(xf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~gh(s,"g"),r=!!~gh(s,"u"),t.lastIndex=gt(a.lastIndex),new wh(t,o,n,r)};function $h(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:bh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(bh)return vh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[wf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(xf(e))),!~gh(t,"g")))throw yh("`.matchAll` does not allow non-global regexes");if(bh)return vh(a,e);if(r=Q(e,uh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[uh](n)}}),uh in hh||ct(hh,uh,kh);const xh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var Eh=()=>{var e;const t=$h(`\n ${Yr.mainStyleVars}\n ${(null===(e=Yr.options)||void 0===e?void 0:e.css)||""}\n `);return{base:{...xh(t,"input"),":hover":xh(t,"inputHover"),":focus":xh(t,"inputFocus"),"::placeholder":xh(t,"inputPlaceholder"),"::selection":xh(t,"inputSelection")},invalid:{...xh(t,"inputError"),":hover":xh(t,"inputErrorHover"),":focus":xh(t,"inputErrorFocus"),"::placeholder":xh(t,"inputErrorPlaceholder"),"::selection":xh(t,"inputErrorSelection")},buttons:{base:{...xh(t,"buttonSecondary"),":hover":xh(t,"buttonSecondaryHover"),":focus":xh(t,"buttonSecondaryActive")},active:{...xh(t,"button"),":hover":xh(t,"buttonHover"),":focus":xh(t,"buttonActive")}}}};function Sh({eventName:e,callback:t}){if(!Ci.includes(e))throw new Error(`${e} is not a supported event`);const n=go(e);Ii[n].addEventListener(t)}const _h=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function Ph({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,i;const s=null==n||null===(o=n.method)||void 0===o?void 0:o.method,l="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",_h(l,s));const c=document.querySelector(".rebilly-instruments-modal-overlay"),u=document.querySelector(".rebilly-instruments-modal-container"),d=document.querySelector(".rebilly-instruments-modal-close"),p=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:p}),Yr.loader.startLoading({section:"modal",id:e});const m={options:Yr.toModel().options,...n},f=await new Fi({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:Yr.loader}),l||d.addEventListener("click",h),null===(i=f.component)||void 0===i||i.call("route",{name:"approval-url"}),f}async function Ah({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return dc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Ih({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=gc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return dc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Ch({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await Ah({state:Yr,payload:e}):await Ih({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new bd({...e});const a="rebilly-instruments-approval-url";Ph({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Ii.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ii.purchaseCompleted.dispatch(r),r}catch(e){return Ni(e),e}}async function jh({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return dc((async()=>{var t;const{fields:n}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(n.token||Yr.options.jwt);const r={id:n.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(r.data={...r.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(t=t.transaction)&&void 0!==t&&t.redirectUrl&&(r.data.redirectUrl=`${r.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:a}=await Yr.storefront.paymentInstruments.setup(r);return{instrument:n,transaction:a}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new bd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;Ph({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ii.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ii.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ni(e),e}}async function Lh({componentName:e,payload:t}){switch(e){case"result":jd(),async function({payload:e}){var t,n;const r=Jr.form;r||await Nd();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":jd(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&$c({instrument:e});const o=Jr.form;o||await Nd();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("update",s),null==o||null===(n=o.component)||void 0===n||n.call("route",{name:"confirmation"}),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Ch({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{jh({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Th({state:e,payload:t}){Lh({componentName:"result",payload:t,state:e})}var Nh=({state:e={}})=>{e.options.features.autoConfirmation&&Sh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?jh({state:e,payload:t}):Ch({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Lh({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(Sh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}),Sh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}))};async function Oh({setupFramepay:e=_m,...t}={}){try{var n,r,a,o,i,s;Yr.data={},Yr.options={},Yr.options=Sm({options:t}),Yr.form=Rd({element:"form"}),Yr.summary=Rd({element:"summary"}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.storefront=Md(),Yr.mainStyleVars=Hm(),Yr.options.themeFramepay=Eh(),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[l]=await Promise.all([wd(),e()]);Yr.data=l,Ii.dataReady.dispatch(Yr.data),Yr.i18n=qm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Nd().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?_d():Ld()})),Yr.summary&&kc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0;((null===(o=Yr.options)||void 0===o?void 0:o.invoiceId)||(null===(i=Yr.data)||void 0===i||null===(i=i.transaction)||void 0===i?void 0:i.invoiceId))&&Yr.data.invoice.isPaid&&(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),document.querySelector('[data-rebilly-instruments="form"]').remove(),Ni(Yr.translate.getTranslation("form.error.invoiceIsPaid"),!1)),null!==(s=l.readyToPay)&&void 0!==s&&s.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ni(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ni(e),e}Nh({state:Yr})}async function Rh(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),Pi.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Jl.cancelAll(),Yr.loader.clearAll()}var Mh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await Oh(e)}async destroy(){await Rh()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Rh(),Oh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Ch({payload:e})}async setup(e){await jh({payload:e})}async show(e,t){await Lh({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.45.6"}on(e,t){Sh({eventName:e,callback:t})}};return Mh}();
|
|
68
|
+
*/var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return C(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),Am=Pm;const Im=e=>new Am(e);function Cm(e,t=1){if(null===e)return e;const n=Im(e);return n.alpha=t,n.rgbString()}const jm=e=>Cm(e,.5),Lm=(e,t)=>{if(null===e)return e;return Im(e).shade(t).hexString()};function Tm(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nm{constructor(e){Tm(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const Om={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>jm(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Cm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Lm(e.buttonColorBackground,20):Lm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Nm(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Lm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Nm(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?jm(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Nm(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?jm(e.inputErrorColorText):jm(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Rm=new Proxy(Om,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Mm{constructor(e={}){this.overrides=e,this.theme=Rm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Mm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Mm,"nonCssProperties",["labels"]);function Fm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Hm=()=>{const{theme:e={},css:t}=Yr.options,n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Mm(e).build())}\n `;return t})(e||{});return Od({element:"style",attributes:{type:"text/css"},content:Fm(n),target:"head"}),t&&Od({element:"style",attributes:{type:"text/css"},content:Fm(t),target:"head"}),n};const Dm=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Bm,qm=()=>{var e;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(e=e.browserData)&&void 0!==e&&e.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Dm},Vm=function(e){if("Function"===x(e))return w(e)},zm=Object.keys||function(e){return $t(e,xt)},Wm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=C(t),a=zm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Um={f:Wm},Gm=M("document","documentElement"),Zm="prototype",Xm="script",Km=et("IE_PROTO"),Jm=function(){},Ym=function(e){return"<"+Xm+">"+e+"</"+Xm+">"},Qm=function(e){e.write(Ym("")),e.close();var t=e.parentWindow.Object;return e=null,t},ef=function(){try{Bm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ef="undefined"!=typeof document?document.domain&&Bm?Qm(Bm):(t=Ee("iframe"),n="java"+Xm+":",t.style.display="none",Gm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ym("document.F=Object")),e.close(),e.F):Qm(Bm);for(var r=xt.length;r--;)delete ef[Zm][xt[r]];return ef()};tt[Km]=!0;var tf,nf,rf,af=Object.create||function(e,t){var n;return null!==e?(Jm[Zm]=Le(e),n=new Jm,Jm[Zm]=null,n[Km]=e):n=ef(),void 0===t?n:Um.f(n,t)},of=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sf=et("IE_PROTO"),lf=Object,cf=lf.prototype,uf=of?lf.getPrototypeOf:function(e){var t=se(e);if(ce(t,sf))return t[sf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof lf?cf:null},df=ge("iterator"),pf=!1;[].keys&&("next"in(rf=[].keys())?(nf=uf(uf(rf)))!==Object.prototype&&(tf=nf):pf=!0);var mf=!R(tf)||s((function(){var e={};return tf[df].call(e)!==e}));mf&&(tf={}),N(tf[df])||ct(tf,df,(function(){return this}));var ff={IteratorPrototype:tf,BUGGY_SAFARI_ITERATORS:pf},hf=De.f,yf=ge("toStringTag"),gf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,yf)&&hf(e,yf,{configurable:!0,value:t})},vf=ff.IteratorPrototype,bf=function(e,t){return{value:e,done:t}},wf=ge("match"),kf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$f=RegExp.prototype,xf=function(e){var t=e.flags;return void 0!==t||"flags"in $f||ce(e,"flags")||!F($f,e)?t:d(kf,e)},Ef=function(){},Sf=[],_f=M("Reflect","construct"),Pf=/^\s*(?:class|function)\b/,Af=w(Pf.exec),If=!Pf.exec(Ef),Cf=function(e){if(!N(e))return!1;try{return _f(Ef,Sf,e),!0}catch(e){return!1}},jf=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return If||!!Af(Pf,Ke(e))}catch(e){return!0}};jf.sham=!0;var Lf,Tf,Nf=!_f||s((function(){var e;return Cf(Cf.call)||!Cf(Object)||!Cf((function(){e=!0}))||e}))?jf:Cf,Of=TypeError,Rf=ge("species"),Mf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Rf])?t:function(e){if(Nf(e))return e;throw Of(K(e)+" is not a constructor")}(n)},Ff=w("".charAt),Hf=w("".charCodeAt),Df=w("".slice),Bf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Hf(o,i))<55296||r>56319||i+1===s||(a=Hf(o,i+1))<56320||a>57343?e?Ff(o,i):r:e?Df(o,i,i+2):a-56320+(r-55296<<10)+65536}},qf={codeAt:Bf(!1),charAt:Bf(!0)}.charAt,Vf=i.RegExp,zf=s((function(){var e=Vf("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Wf=zf||s((function(){return!Vf("a","y").sticky})),Uf={BROKEN_CARET:zf||s((function(){var e=Vf("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Wf,UNSUPPORTED_Y:zf},Gf=i.RegExp,Zf=s((function(){var e=Gf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Xf=i.RegExp,Kf=s((function(){var e=Xf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Jf=st.get,Yf=oe("native-string-replace",String.prototype.replace),Qf=RegExp.prototype.exec,eh=Qf,th=w("".charAt),nh=w("".indexOf),rh=w("".replace),ah=w("".slice),oh=(Tf=/b*/g,d(Qf,Lf=/a/,"a"),d(Qf,Tf,"a"),0!==Lf.lastIndex||0!==Tf.lastIndex),ih=Uf.BROKEN_CARET,sh=void 0!==/()??/.exec("")[1];(oh||sh||ih||Zf||Kf)&&(eh=function(e){var t,n,r,a,o,i,s,l=this,c=Jf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(eh,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=ih&&l.sticky,h=d(kf,l),y=l.source,g=0,v=u;if(f&&(h=rh(h,"y",""),-1===nh(h,"g")&&(h+="g"),v=ah(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==th(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),sh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),oh&&(r=l.lastIndex),a=d(Qf,f?n:l,v),f?a?(a.input=ah(a.input,g),a[0]=ah(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:oh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),sh&&a&&a.length>1&&d(Yf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=af(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var lh=eh,ch=TypeError,uh=ge("matchAll"),dh="RegExp String",ph=dh+" Iterator",mh=st.set,fh=st.getterFor(ph),hh=RegExp.prototype,yh=TypeError,gh=Vm("".indexOf),vh=Vm("".matchAll),bh=!!vh&&!s((function(){vh("a",/./)})),wh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=af(vf,{next:y(+!r,n)}),gf(e,a,!1),e}((function(e,t,n,r){mh(this,{type:ph,regexp:e,string:t,global:n,unicode:r,done:!1})}),dh,(function(){var e=fh(this);if(e.done)return bf(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(lh,e,t);throw ch("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,bf(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?qf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),bf(r,!1)):(e.done=!0,bf(r,!1))})),kh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Mf(a,RegExp),s=Qt(xf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~gh(s,"g"),r=!!~gh(s,"u"),t.lastIndex=gt(a.lastIndex),new wh(t,o,n,r)};function $h(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:bh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(bh)return vh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[wf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(xf(e))),!~gh(t,"g")))throw yh("`.matchAll` does not allow non-global regexes");if(bh)return vh(a,e);if(r=Q(e,uh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[uh](n)}}),uh in hh||ct(hh,uh,kh);const xh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var Eh=()=>{var e;const t=$h(`\n ${Yr.mainStyleVars}\n ${(null===(e=Yr.options)||void 0===e?void 0:e.css)||""}\n `);return{base:{...xh(t,"input"),":hover":xh(t,"inputHover"),":focus":xh(t,"inputFocus"),"::placeholder":xh(t,"inputPlaceholder"),"::selection":xh(t,"inputSelection")},invalid:{...xh(t,"inputError"),":hover":xh(t,"inputErrorHover"),":focus":xh(t,"inputErrorFocus"),"::placeholder":xh(t,"inputErrorPlaceholder"),"::selection":xh(t,"inputErrorSelection")},buttons:{base:{...xh(t,"buttonSecondary"),":hover":xh(t,"buttonSecondaryHover"),":focus":xh(t,"buttonSecondaryActive")},active:{...xh(t,"button"),":hover":xh(t,"buttonHover"),":focus":xh(t,"buttonActive")}}}};function Sh({eventName:e,callback:t}){if(!Ci.includes(e))throw new Error(`${e} is not a supported event`);const n=go(e);Ii[n].addEventListener(t)}const _h=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function Ph({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,i;const s=null==n||null===(o=n.method)||void 0===o?void 0:o.method,l="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",_h(l,s));const c=document.querySelector(".rebilly-instruments-modal-overlay"),u=document.querySelector(".rebilly-instruments-modal-container"),d=document.querySelector(".rebilly-instruments-modal-close"),p=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:p}),Yr.loader.startLoading({section:"modal",id:e});const m={options:Yr.toModel().options,...n},f=await new Fi({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:Yr.loader}),l||d.addEventListener("click",h),null===(i=f.component)||void 0===i||i.call("route",{name:"approval-url"}),f}async function Ah({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return dc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Ih({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=gc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return dc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Ch({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await Ah({state:Yr,payload:e}):await Ih({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new bd({...e});const a="rebilly-instruments-approval-url";Ph({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Ii.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ii.purchaseCompleted.dispatch(r),r}catch(e){return Ni(e),e}}async function jh({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return dc((async()=>{var t;const{fields:n}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(n.token||Yr.options.jwt);const r={id:n.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(r.data={...r.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(t=t.transaction)&&void 0!==t&&t.redirectUrl&&(r.data.redirectUrl=`${r.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:a}=await Yr.storefront.paymentInstruments.setup(r);return{instrument:n,transaction:a}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new bd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;Ph({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ii.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ii.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ni(e),e}}async function Lh({componentName:e,payload:t}){switch(e){case"result":jd(),async function({payload:e}){var t,n;const r=Jr.form;r||await Nd();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":jd(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&$c({instrument:e});const o=Jr.form;o||await Nd();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("update",s),null==o||null===(n=o.component)||void 0===n||n.call("route",{name:"confirmation"}),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Ch({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{jh({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Th({state:e,payload:t}){Lh({componentName:"result",payload:t,state:e})}var Nh=({state:e={}})=>{e.options.features.autoConfirmation&&Sh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?jh({state:e,payload:t}):Ch({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Lh({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(Sh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}),Sh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Th({state:e,payload:t})}}))};async function Oh({setupFramepay:e=_m,...t}={}){try{var n,r,a,o,i,s;Yr.data={},Yr.options={},Yr.options=Sm({options:t}),Yr.form=Rd({element:"form"}),Yr.summary=Rd({element:"summary"}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.storefront=Md(),Yr.mainStyleVars=Hm(),Yr.options.themeFramepay=Eh(),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[l]=await Promise.all([wd(),e()]);Yr.data=l,Ii.dataReady.dispatch(Yr.data),Yr.i18n=qm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Nd().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?_d():Ld()})),Yr.summary&&kc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0;((null===(o=Yr.options)||void 0===o?void 0:o.invoiceId)||(null===(i=Yr.data)||void 0===i||null===(i=i.transaction)||void 0===i?void 0:i.invoiceId))&&Yr.data.invoice.isPaid&&(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),document.querySelector('[data-rebilly-instruments="form"]').remove(),Ni(Yr.translate.getTranslation("form.error.invoiceIsPaid"),!1)),null!==(s=l.readyToPay)&&void 0!==s&&s.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ni(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ni(e),e}Nh({state:Yr})}async function Rh(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),Pi.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Jl.cancelAll(),Yr.loader.clearAll()}var Mh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await Oh(e)}async destroy(){await Rh()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Rh(),Oh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Ch({payload:e})}async setup(e){await jh({payload:e})}async show(e,t){await Lh({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.47.0"}on(e,t){Sh({eventName:e,callback:t})}};return Mh}();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilly/instruments",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"author": "Rebilly",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
38
38
|
"@rollup/plugin-replace": "^5.0.2",
|
|
39
39
|
"axios": "^0.27.2",
|
|
40
|
-
"babel-plugin-module-resolver": "^
|
|
40
|
+
"babel-plugin-module-resolver": "^5.0.0",
|
|
41
41
|
"component-emitter": "^1.3.0",
|
|
42
42
|
"core-js": "^3.23.3",
|
|
43
43
|
"jest": "^29.5.0",
|