@justifi/webcomponents 4.7.0 → 4.7.1-rc.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.
@@ -1494,7 +1494,7 @@ const MessageEventType = {
1494
1494
  };
1495
1495
 
1496
1496
  const name = "@justifi/webcomponents";
1497
- const version = "4.7.0";
1497
+ const version = "4.7.1-rc.0";
1498
1498
  const description = "JustiFi Web Components";
1499
1499
  const main = "dist/index.cjs.js";
1500
1500
  const module$1 = "dist/components/index.js";
@@ -52,14 +52,6 @@ export default {
52
52
  },
53
53
  },
54
54
  },
55
- decorators: [
56
- story => `
57
- <!-- Deprecated Notice -->
58
- <p style="color: red; font-family: 'Roboto Mono', monospace;">Note: The 'resize' method is deprecated and will be removed in future releases.</p>
59
- ${story()}
60
- <script>${addEvents()}</script>
61
- `,
62
- ],
63
55
  };
64
56
  const handleValidateClick = async (bankForm) => {
65
57
  const valid = await bankForm.validate();
@@ -1 +1 @@
1
- {"version":3,"file":"bank-account-form.stories.js","sourceRoot":"","sources":["../../../../src/components/bank-account-form/bank-account-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCf,CAAC;AAEF,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,2BAA2B;EACtC,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,OAAO;OACtB;KACF;IACD,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;OACpB;KACF;GACF;EACD,UAAU,EAAE;IACV,KAAK,CAAC,EAAE,CAAC;;;QAGL,KAAK,EAAE;gBACC,SAAS,EAAE;KACtB;GACF;CACF,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AS,uBAAT,SAAS,CAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;IACxC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;EAC9B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;EACrB,gBAAgB,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAS,EAAE,EAAE;EAC7B,OAAO;;;;UAIC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;;;;;2BAKV,IAAI,CAAC,iBAAiB,CAAC,IAAI,UAAU;yBACvC,MAAM,CAAC,YAAY;;;MAGtC,WAAW;GACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,eAAe,EAAE,OAAO;CACzB,CAAC","sourcesContent":["import { config } from '../../../config';\n\nconst CSSVars = `\n--jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900&family=Agdasima';\n--jfi-layout-font-family: Roboto Mono;\n--jfi-layout-padding: 4px;\n--jfi-layout-form-control-spacing-x: .5rem;\n--jfi-layout-form-control-spacing-y: 1rem;\n--jfi-form-label-font-weight: 700;\n--jfi-form-label-font-family: sans-serif;\n--jfi-form-label-margin: 0 0 .5rem 0;\n--jfi-form-control-background-color: #F4F4F6;\n--jfi-form-control-background-color-hover: #EEEEF5;\n--jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n--jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n--jfi-form-control-border-color-focus: #fccc32;\n--jfi-form-control-border-color-error: #C12727;\n--jfi-form-control-border-top-width: 0;\n--jfi-form-control-border-left-width: 0;\n--jfi-form-control-border-bottom-width: 1px;\n--jfi-form-control-border-right-width: 0;\n--jfi-form-control-border-radius: 4px 4px 0 0;\n--jfi-form-control-border-style: solid;\n--jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n--jfi-form-control-box-shadow-focus: none;\n--jfi-form-control-box-shadow-error-focus: none;\n--jfi-form-control-border-style: solid;\n--jfi-form-control-color: #212529;\n--jfi-form-control-font-size: 1rem;\n--jfi-form-control-font-weight: 400;\n--jfi-form-control-line-height: 2;\n--jfi-form-control-margin: 0;\n--jfi-form-control-padding: .5rem .875rem;\n--jfi-error-message-color: #C12727;\n--jfi-error-message-margin: .25rem 0 0 0;\n--jfi-error-message-font-size: .875rem;\n`;\n\nexport default {\n title: 'Components/BankAccountForm',\n component: 'justifi-bank-account-form',\n argTypes: {\n 'css-variables': {\n control: 'text',\n table: {\n category: 'props',\n defaultValue: CSSVars,\n },\n },\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n decorators: [\n story => `\n <!-- Deprecated Notice -->\n <p style=\"color: red; font-family: 'Roboto Mono', monospace;\">Note: The 'resize' method is deprecated and will be removed in future releases.</p>\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (bankForm: HTMLJustifiBankAccountFormElement) => {\n const valid = await bankForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (bankForm: HTMLJustifiBankAccountFormElement, paymentMethodData: any) => {\n const tokenizeResponse = await bankForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (bankForm: HTMLJustifiBankAccountFormElement) => {\n await bankForm.resize();\n};\nconst handleReady = () => {\n console.log('bank account form is ready');\n const bankForm = document.querySelector('justifi-bank-account-form') as HTMLJustifiBankAccountFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(bankForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(bankForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(bankForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('bankAccountFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>\n`;\n\nconst Template = (args: any) => {\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-bank-account-form\n data-testid=\"bank-account-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n />\n </div>\n ${FormButtons}\n `;\n};\n\nexport const Basic = Template.bind({});\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'css-variables': CSSVars,\n};\n"]}
1
+ {"version":3,"file":"bank-account-form.stories.js","sourceRoot":"","sources":["../../../../src/components/bank-account-form/bank-account-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCf,CAAC;AAEF,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,2BAA2B;EACtC,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,OAAO;OACtB;KACF;IACD,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QAC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ACpC,CAAC,CAAC,CAAC;EACH,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;IACxC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;EAC9B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;EACrB,gBAAgB,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAS,EAAE,EAAE;EAC7B,OAAO;;;;UAIC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;;;;;2BAKV,IAAI,CAAC,iBAAiB,CAAC,IAAI,UAAU;yBACvC,MAAM,CAAC,YAAY;;;MAGtC,WAAW;GACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,eAAe,EAAE,OAAO;CACzB,CAAC","sourcesContent":["import { config } from '../../../config';\n\nconst CSSVars = `\n--jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900&family=Agdasima';\n--jfi-layout-font-family: Roboto Mono;\n--jfi-layout-padding: 4px;\n--jfi-layout-form-control-spacing-x: .5rem;\n--jfi-layout-form-control-spacing-y: 1rem;\n--jfi-form-label-font-weight: 700;\n--jfi-form-label-font-family: sans-serif;\n--jfi-form-label-margin: 0 0 .5rem 0;\n--jfi-form-control-background-color: #F4F4F6;\n--jfi-form-control-background-color-hover: #EEEEF5;\n--jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n--jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n--jfi-form-control-border-color-focus: #fccc32;\n--jfi-form-control-border-color-error: #C12727;\n--jfi-form-control-border-top-width: 0;\n--jfi-form-control-border-left-width: 0;\n--jfi-form-control-border-bottom-width: 1px;\n--jfi-form-control-border-right-width: 0;\n--jfi-form-control-border-radius: 4px 4px 0 0;\n--jfi-form-control-border-style: solid;\n--jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n--jfi-form-control-box-shadow-focus: none;\n--jfi-form-control-box-shadow-error-focus: none;\n--jfi-form-control-border-style: solid;\n--jfi-form-control-color: #212529;\n--jfi-form-control-font-size: 1rem;\n--jfi-form-control-font-weight: 400;\n--jfi-form-control-line-height: 2;\n--jfi-form-control-margin: 0;\n--jfi-form-control-padding: .5rem .875rem;\n--jfi-error-message-color: #C12727;\n--jfi-error-message-margin: .25rem 0 0 0;\n--jfi-error-message-font-size: .875rem;\n`;\n\nexport default {\n title: 'Components/BankAccountForm',\n component: 'justifi-bank-account-form',\n argTypes: {\n 'css-variables': {\n control: 'text',\n table: {\n category: 'props',\n defaultValue: CSSVars,\n },\n },\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n};\n\nconst handleValidateClick = async (bankForm: HTMLJustifiBankAccountFormElement) => {\n const valid = await bankForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (bankForm: HTMLJustifiBankAccountFormElement, paymentMethodData: any) => {\n const tokenizeResponse = await bankForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (bankForm: HTMLJustifiBankAccountFormElement) => {\n await bankForm.resize();\n};\nconst handleReady = () => {\n console.log('bank account form is ready');\n const bankForm = document.querySelector('justifi-bank-account-form') as HTMLJustifiBankAccountFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(bankForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(bankForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(bankForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('bankAccountFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>\n`;\n\nconst Template = (args: any) => {\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-bank-account-form\n data-testid=\"bank-account-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n />\n </div>\n ${FormButtons}\n `;\n};\n\nexport const Basic = Template.bind({});\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'css-variables': CSSVars,\n};\n"]}
@@ -1,14 +1,14 @@
1
1
  import { config } from "../../../config";
2
2
  class BusinessFormSteppedStoryArgs {
3
3
  constructor(args) {
4
- this['auth-token'] = args['auth-token'] || '';
4
+ this['auth-token'] = args['auth-token'] || config.proxyAuthToken;
5
5
  this['business-id'] = args['business-id'] || '';
6
6
  this['account-id'] = args['account-id'] || config.exampleAccountId;
7
7
  this['css-variables'] = args['css-variables'] || '';
8
8
  }
9
9
  }
10
10
  export default {
11
- title: 'dev/Components/BusinessFormStepped',
11
+ title: 'Components/BusinessFormStepped',
12
12
  component: 'justifi-business-form',
13
13
  argTypes: {
14
14
  'auth-token': {
@@ -1 +1 @@
1
- {"version":3,"file":"business-form-stepped.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,4BAA4B;EAMhC,YAAY,IAAI;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CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,4BAA4B,CAAC;EAC7C,YAAY,EAAE,EAAE;EAChB,aAAa,EAAE,EAAE;EACjB,YAAY,EAAE,EAAE;EAChB,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEf;CACF,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nclass BusinessFormSteppedStoryArgs {\n 'auth-token': string;\n 'account-id': string;\n 'bussiness-id': string;\n 'css-variables': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['business-id'] = args['business-id'] || '';\n this['account-id'] = args['account-id'] || config.exampleAccountId;\n this['css-variables'] = args['css-variables'] || '';\n }\n}\n\nexport default {\n title: 'dev/Components/BusinessFormStepped',\n component: 'justifi-business-form',\n argTypes: {\n 'auth-token': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'account-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'business-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n }\n },\n};\n\nconst Template = (args: BusinessFormSteppedStoryArgs) => {\n const authToken = args['auth-token'];\n const businessId = args['business-id'];\n const accountId = args['account-id'] || config.exampleAccountId;\n // The <div> here should be replaced by a `display` property in the cardForm potentially\n return `\n <div>\n <justifi-business-form-stepped\n auth-token=\"${authToken}\"\n business-id=\"${businessId}\"\n account-id=\"${accountId}\"\n />\n </div>\n <style>\n :root {\n ${args['css-variables']}\n }\n </style>\n `;\n};\n\nexport const Basic = Template.bind({});\n\nBasic.args = new BusinessFormSteppedStoryArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessFormSteppedStoryArgs({\n 'auth-token': '',\n 'business-id': '',\n 'account-id': '',\n 'cssVariables': `\n --jfi-primary-color: #212529;\n --jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900';\n --jfi-layout-font-family: Roboto Mono, Calibri, sans-serif;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: Calibri, sans-serif;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n\n --jfi-submit-button-color: white;\n --jfi-submit-button-background-color: #3F3F47;\n --jfi-submit-button-border-color: var(--jfi-primary-color);\n --jfi-submit-button-padding: 0.375rem 0.75rem;\n --jfi-submit-button-font-size: 1rem;\n --jfi-submit-button-border-radius: 1px;\n --jfi-submit-button-color-hover: white;\n --jfi-submit-button-background-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-border-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-color-focus: white;\n --jfi-submit-button-background-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-border-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-color-active: white;\n --jfi-submit-button-background-color-active: var(--jfi-primary-color);\n --jfi-submit-button-border-color-active: var(--jfi-primary-color);\n --jfi-submit-button-width: 100%;\n --jfi-submit-button-box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;\n\n --jfi-radio-button-color: var(--jfi-primary-color);\n --jfi-radio-button-background-color: transparent;\n --jfi-radio-button-color-selected: white;\n --jfi-radio-button-background-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-border-color: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-padding: 0.375rem 0.75rem;\n --jfi-radio-button-font-size: 1rem;\n --jfi-radio-button-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-color-selected-hover: white;\n --jfi-radio-button-background-color-hover: transparent;\n --jfi-radio-button-background-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-group-width: 100%;\n `,\n});\n"]}
1
+ {"version":3,"file":"business-form-stepped.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,4BAA4B;EAMhC,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEf;CACF,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nclass BusinessFormSteppedStoryArgs {\n 'auth-token': string;\n 'account-id': string;\n 'bussiness-id': string;\n 'css-variables': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.proxyAuthToken;\n this['business-id'] = args['business-id'] || '';\n this['account-id'] = args['account-id'] || config.exampleAccountId;\n this['css-variables'] = args['css-variables'] || '';\n }\n}\n\nexport default {\n title: 'Components/BusinessFormStepped',\n component: 'justifi-business-form',\n argTypes: {\n 'auth-token': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'account-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'business-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n }\n },\n};\n\nconst Template = (args: BusinessFormSteppedStoryArgs) => {\n const authToken = args['auth-token'];\n const businessId = args['business-id'];\n const accountId = args['account-id'] || config.exampleAccountId;\n // The <div> here should be replaced by a `display` property in the cardForm potentially\n return `\n <div>\n <justifi-business-form-stepped\n auth-token=\"${authToken}\"\n business-id=\"${businessId}\"\n account-id=\"${accountId}\"\n />\n </div>\n <style>\n :root {\n ${args['css-variables']}\n }\n </style>\n `;\n};\n\nexport const Basic = Template.bind({});\n\nBasic.args = new BusinessFormSteppedStoryArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessFormSteppedStoryArgs({\n 'auth-token': '',\n 'business-id': '',\n 'account-id': '',\n 'cssVariables': `\n --jfi-primary-color: #212529;\n --jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900';\n --jfi-layout-font-family: Roboto Mono, Calibri, sans-serif;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: Calibri, sans-serif;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n\n --jfi-submit-button-color: white;\n --jfi-submit-button-background-color: #3F3F47;\n --jfi-submit-button-border-color: var(--jfi-primary-color);\n --jfi-submit-button-padding: 0.375rem 0.75rem;\n --jfi-submit-button-font-size: 1rem;\n --jfi-submit-button-border-radius: 1px;\n --jfi-submit-button-color-hover: white;\n --jfi-submit-button-background-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-border-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-color-focus: white;\n --jfi-submit-button-background-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-border-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-color-active: white;\n --jfi-submit-button-background-color-active: var(--jfi-primary-color);\n --jfi-submit-button-border-color-active: var(--jfi-primary-color);\n --jfi-submit-button-width: 100%;\n --jfi-submit-button-box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;\n\n --jfi-radio-button-color: var(--jfi-primary-color);\n --jfi-radio-button-background-color: transparent;\n --jfi-radio-button-color-selected: white;\n --jfi-radio-button-background-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-border-color: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-padding: 0.375rem 0.75rem;\n --jfi-radio-button-font-size: 1rem;\n --jfi-radio-button-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-color-selected-hover: white;\n --jfi-radio-button-background-color-hover: transparent;\n --jfi-radio-button-background-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-group-width: 100%;\n `,\n});\n"]}
@@ -10,14 +10,6 @@ export default {
10
10
  },
11
11
  },
12
12
  },
13
- decorators: [
14
- story => `
15
- <!-- Deprecated Notice -->
16
- <p style="color: red; font-family: 'Roboto Mono', monospace;">Note: The 'resize' method is deprecated and will be removed in future releases.</p>
17
- ${story()}
18
- <script>${addEvents()}</script>
19
- `,
20
- ],
21
13
  };
22
14
  const handleValidateClick = async (cardForm) => {
23
15
  const valid = await cardForm.validate();
@@ -1 +1 @@
1
- {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;OACpB;KACF;GACF;EACD,UAAU,EAAE;IACV,KAAK,CAAC,EAAE,CAAC;;;QA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ACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["import { config } from '../../../config';\n\ninterface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n decorators: [\n story => `\n <!-- Deprecated Notice -->\n <p style=\"color: red; font-family: 'Roboto Mono', monospace;\">Note: The 'resize' method is deprecated and will be removed in future releases.</p>\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
1
+ {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;OACpB;KACF;GACF;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACzE,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;EACxC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,iBAAiB,EAAE,EAAE;EAC5F,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;EACjF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAChC,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACvE,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC1B,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,GAAG,EAAE;EACvB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;EAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAA+B,CAAC;EAC3F,MAAM,WAAW,G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C,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,iBAAiB,EAAE,UAAU;EAC7B,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;EAChB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,KAAK;EACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["import { config } from '../../../config';\n\ninterface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
@@ -1490,7 +1490,7 @@ const MessageEventType = {
1490
1490
  };
1491
1491
 
1492
1492
  const name = "@justifi/webcomponents";
1493
- const version = "4.7.0";
1493
+ const version = "4.7.1-rc.0";
1494
1494
  const description = "JustiFi Web Components";
1495
1495
  const main = "dist/index.cjs.js";
1496
1496
  const module = "dist/components/index.js";
@@ -1490,7 +1490,7 @@ const MessageEventType = {
1490
1490
  };
1491
1491
 
1492
1492
  const name = "@justifi/webcomponents";
1493
- const version = "4.7.0";
1493
+ const version = "4.7.1-rc.0";
1494
1494
  const description = "JustiFi Web Components";
1495
1495
  const main = "dist/index.cjs.js";
1496
1496
  const module = "dist/components/index.js";
@@ -16,7 +16,6 @@ declare const _default: {
16
16
  };
17
17
  };
18
18
  };
19
- decorators: ((story: any) => string)[];
20
19
  };
21
20
  export default _default;
22
21
  export declare const Basic: any;
@@ -9,7 +9,6 @@ declare const _default: {
9
9
  };
10
10
  };
11
11
  };
12
- decorators: ((story: any) => string)[];
13
12
  };
14
13
  export default _default;
15
14
  export declare const Basic: any;
@@ -1,2 +1,2 @@
1
- import{r as e,c as n,h as t,H as o}from"./p-cbb60191.js";import{c as i}from"./p-9b6dcac5.js";function r(e,n,t){return t={path:n,exports:{},require:function(e,n){return s()}},e(t,t.exports),t.exports}function s(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var a=r((function(e){(function(n){if(typeof window==="undefined")return;var t=0,o=false,i=false,r="message",s=r.length,a="[iFrameSizer]",c=a.length,f=null,u=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),l={},m=null,h=Object.freeze({autoResize:true,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:true,inPageLinks:false,enablePublicMethods:true,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:false,maxHeight:Infinity,maxWidth:Infinity,minHeight:0,minWidth:0,mouseEvents:true,resizeFrom:"parent",scrolling:false,sizeHeight:true,sizeWidth:false,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return true},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return true}});function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,false)}function g(e,n,t){e.removeEventListener(n,t,false)}function p(){var e=["moz","webkit","o","ms"];var n;for(n=0;n<e.length&&!u;n+=1){u=window[e[n]+"RequestAnimationFrame"]}if(u){u=u.bind(window)}else{k("setup","RequestAnimationFrame not supported")}}function y(e){var n="Host page: "+e;if(window.top!==window.self){n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e}return n}function v(e){return a+"["+y(e)+"]"}function j(e){return l[e]?l[e].log:o}function k(e,n){M("log",e,n,j(e))}function x(e,n){M("info",e,n,j(e))}function z(e,n){M("warn",e,n,true)}function M(e,n,t,o){if(true===o&&"object"===typeof window.console){console[e](v(n),t)}}function F(e){function n(){function e(){E(_);T(Q);V("onResized",_)}r("Height");r("Width");N(e,_,"init")}function t(){var e=G.slice(c).split(":");var n=e[1]?parseInt(e[1],10):0;var t=l[e[0]]&&l[e[0]].iframe;var r=getComputedStyle(t);return{iframe:t,id:e[0],height:n+o(r)+i(r),width:e[2],type:e[3]}}function o(e){if(e.boxSizing!=="border-box"){return 0}var n=e.paddingTop?parseInt(e.paddingTop,10):0;var t=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+t}function i(e){if(e.boxSizing!=="border-box"){return 0}var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0;var t=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+t}function r(e){var n=Number(l[Q]["max"+e]),t=Number(l[Q]["min"+e]),o=e.toLowerCase(),i=Number(_[o]);k(Q,"Checking "+o+" is in range "+t+"-"+n);if(i<t){i=t;k(Q,"Set "+o+" to min value")}if(i>n){i=n;k(Q,"Set "+o+" to max value")}_[o]=""+i}function u(){function n(){function e(){var e=0,n=false;k(Q,"Checking connection is from allowed list of origins: "+o);for(;e<o.length;e++){if(o[e]===t){n=true;break}}return n}function n(){var e=l[Q]&&l[Q].remoteHost;k(Q,"Checking connection is from: "+e);return t===e}return o.constructor===Array?e():n()}var t=e.origin,o=l[Q]&&l[Q].checkOrigin;if(o&&""+t!=="null"&&!n()){throw new Error("Unexpected message received from: "+t+" for "+_.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.")}return true}function d(){return a===(""+G).slice(0,c)&&G.slice(c).split(":")[0]in l}function m(){var e=_.type in{true:1,false:1,undefined:1};if(e){k(Q,"Ignoring init message from meta parent page")}return e}function h(e){return G.slice(G.indexOf(":")+s+e)}function b(e){k(Q,"onMessage passed: {iframe: "+_.iframe.id+", message: "+e+"}");V("onMessage",{iframe:_.iframe,message:JSON.parse(e)});k(Q,"--")}function p(){var e=document.body.getBoundingClientRect(),n=_.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function y(e,n){function t(){A("Send Page Info","pageInfo:"+p(),e,n)}D(t,32,n)}function v(){function e(e,t){function i(){if(l[o]){y(l[o].iframe,o)}else{n()}}["scroll","resize"].forEach((function(n){k(o,e+n+" listener for sendPageInfo");t(window,n,i)}))}function n(){e("Remove ",g)}function t(){e("Add ",w)}var o=Q;t();if(l[o]){l[o].stopPageInfo=n}}function j(){if(l[Q]&&l[Q].stopPageInfo){l[Q].stopPageInfo();delete l[Q].stopPageInfo}}function M(){var e=true;if(null===_.iframe){z(Q,"IFrame ("+_.id+") not found");e=false}return e}function F(e){var n=e.getBoundingClientRect();C(Q);return{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function S(e){function n(){f=r;L();k(Q,"--")}function t(){return{x:Number(_.width)+i.x,y:Number(_.height)+i.y}}function o(){if(window.parentIFrame){window.parentIFrame["scrollTo"+(e?"Offset":"")](r.x,r.y)}else{z(Q,"Unable to scroll to requested position, window.parentIFrame not found")}}var i=e?F(_.iframe):{x:0,y:0},r=t();k(Q,"Reposition requested from iFrame (offset x:"+i.x+" y:"+i.y+")");if(window.top===window.self){n()}else{o()}}function L(){if(false===V("onScroll",f)){W()}else{T(Q)}}function q(e){function n(){var e=F(r);k(Q,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y);f={x:e.x,y:e.y};L();k(Q,"--")}function t(){if(window.parentIFrame){window.parentIFrame.moveToAnchor(o)}else{k(Q,"In page link #"+o+" not found and window.parentIFrame not found")}}var o=e.split("#")[1]||"",i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];if(r){n()}else if(window.top===window.self){k(Q,"In page link #"+o+" not found")}else{t()}}function P(e){var n={};if(Number(_.width)===0&&Number(_.height)===0){var t=h(9).split(":");n={x:t[1],y:t[0]}}else{n={x:_.width,y:_.height}}V(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function V(e,n){return I(Q,e,n)}function $(){if(l[Q]&&l[Q].firstRun)B();switch(_.type){case"close":{O(_.iframe);break}case"message":{b(h(6));break}case"mouseenter":{P("onMouseEnter");break}case"mouseleave":{P("onMouseLeave");break}case"autoResize":{l[Q].autoResize=JSON.parse(h(9));break}case"scrollTo":{S(false);break}case"scrollToOffset":{S(true);break}case"pageInfo":{y(l[Q]&&l[Q].iframe,Q);v();break}case"pageInfoStop":{j();break}case"inPageLink":{q(h(9));break}case"reset":{R(_);break}case"init":{n();V("onInit",_.iframe);break}default:{if(Number(_.width)===0&&Number(_.height)===0){z("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later "+"version of iframe-resizer than the parent page")}else{n()}}}}function U(e){var n=true;if(!l[e]){n=false;z(_.type+" No settings for "+e+". Message was: "+G)}return n}function J(){for(var e in l){A("iFrame requested init",H(e),l[e].iframe,e)}}function B(){if(l[Q]){l[Q].firstRun=false}}var G=e.data,_={},Q=null;if("[iFrameResizerChild]Ready"===G){J()}else if(d()){_=t();Q=_.id;if(l[Q]){l[Q].loaded=true}if(!m()&&U(Q)){k(Q,"Received: "+G);if(M()&&u()){$()}}}else{x(Q,"Ignored: "+G)}}function I(e,n,t){var o=null,i=null;if(l[e]){o=l[e][n];if("function"===typeof o){i=o(t)}else{throw new TypeError(n+" on iFrame["+e+"] is not a function")}}return i}function S(e){var n=e.id;delete l[n]}function O(e){var n=e.id;if(I(n,"onClose",n)===false){k(n,"Close iframe cancelled by onClose event");return}k(n,"Removing iFrame: "+n);try{if(e.parentNode){e.parentNode.removeChild(e)}}catch(e){z(e)}I(n,"onClosed",n);k(n,"--");S(e)}function C(e){if(null===f){f={x:window.pageXOffset===n?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===n?document.documentElement.scrollTop:window.pageYOffset};k(e,"Get page position: "+f.x+","+f.y)}}function T(e){if(null!==f){window.scrollTo(f.x,f.y);k(e,"Set page position: "+f.x+","+f.y);W()}}function W(){f=null}function R(e){function n(){E(e);A("reset","reset",e.iframe,e.id)}k(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame"));C(e.id);N(n,e,"reset")}function E(e){function n(n){if(!e.id){k("undefined","messageData id not set");return}e.iframe.style[n]=e[n]+"px";k(e.id,"IFrame ("+r+") "+n+" set to "+e[n]+"px")}function t(n){if(!i&&"0"===e[n]){i=true;k(r,"Hidden iFrame detected, creating visibility listener");$()}}function o(e){n(e);t(e)}var r=e.iframe.id;if(l[r]){if(l[r].sizeHeight){o("height")}if(l[r].sizeWidth){o("width")}}}function N(e,n,t){if(t!==n.type&&u&&!window.jasmine){k(n.id,"Requesting animation frame");u(e)}else{e()}}function A(e,n,t,o,i){function r(){var i=l[o]&&l[o].targetOrigin;k(o,"["+e+"] Sending msg to iframe["+o+"] ("+n+") targetOrigin: "+i);t.contentWindow.postMessage(a+n,i)}function s(){z(o,"["+e+"] IFrame("+o+") not found")}function c(){if(t&&"contentWindow"in t&&null!==t.contentWindow){r()}else{s()}}function f(){function e(){if(l[o]&&!l[o].loaded&&!u){u=true;z(o,"IFrame has not responded within "+l[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.")}}if(!!i&&l[o]&&!!l[o].warningTimeout){l[o].msgTimeout=setTimeout(e,l[o].warningTimeout)}}var u=false;o=o||t.id;if(l[o]){c();f()}}function H(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function L(e){return typeof e==="number"}function q(e,i){function r(){function n(n){var t=l[F][n];if(Infinity!==t&&0!==t){e.style[n]=L(t)?t+"px":t;k(F,"Set "+n+" = "+e.style[n])}}function t(e){if(l[F]["min"+e]>l[F]["max"+e]){throw new Error("Value for min"+e+" can not be greater than max"+e)}}t("Height");t("Width");n("maxHeight");n("minHeight");n("maxWidth");n("minWidth")}function s(){var e=i&&i.id||h.id+t++;if(null!==document.getElementById(e)){e+=t++}return e}function a(n){if(typeof n!=="string"){throw new TypeError("Invaild id for iFrame. Expected String")}if(""===n){e.id=n=s();o=(i||{}).log;k(n,"Added missing iframe ID: "+n+" ("+e.src+")")}return n}function c(){k(F,"IFrame scrolling "+(l[F]&&l[F].scrolling?"enabled":"disabled")+" for "+F);e.style.overflow=false===(l[F]&&l[F].scrolling)?"hidden":"auto";switch(l[F]&&l[F].scrolling){case"omit":{break}case true:{e.scrolling="yes";break}case false:{e.scrolling="no";break}default:{e.scrolling=l[F]?l[F].scrolling:"no"}}}function f(){if("number"===typeof(l[F]&&l[F].bodyMargin)||"0"===(l[F]&&l[F].bodyMargin)){l[F].bodyMarginV1=l[F].bodyMargin;l[F].bodyMargin=""+l[F].bodyMargin+"px"}}function u(){var n=l[F]&&l[F].firstRun,t=l[F]&&l[F].heightCalculationMethod in d;if(!n&&t){R({iframe:e,height:0,width:0,type:"init"})}}function m(){if(l[F]){l[F].iframe.iFrameResizer={close:O.bind(null,l[F].iframe),removeListeners:S.bind(null,l[F].iframe),resize:A.bind(null,"Window resize","resize",l[F].iframe),moveToAnchor:function(e){A("Move to anchor","moveToAnchor:"+e,l[F].iframe,F)},sendMessage:function(e){e=JSON.stringify(e);A("Send Message","message:"+e,l[F].iframe,F)}}}}function g(t){function o(){A("iFrame.onload",t,e,n,true);u()}function i(n){if(!e.parentNode){return}var t=new n((function(n){n.forEach((function(n){var t=Array.prototype.slice.call(n.removedNodes);t.forEach((function(n){if(n===e){O(e)}}))}))}));t.observe(e.parentNode,{childList:true})}var r=b();if(r){i(r)}w(e,"load",o);A("init",t,e,n,true)}function p(e){if("object"!==typeof e){throw new TypeError("Options is not an object")}}function y(e){for(var n in h){if(Object.prototype.hasOwnProperty.call(h,n)){l[F][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:h[n]}}}function v(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}function j(e){var n=e.split("Callback");if(n.length===2){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e];delete this[e];z(F,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}function x(n){n=n||{};l[F]=Object.create(null);l[F].iframe=e;l[F].firstRun=true;l[F].remoteHost=e.src&&e.src.split("/").slice(0,3).join("/");p(n);Object.keys(n).forEach(j,n);y(n);if(l[F]){l[F].targetOrigin=true===l[F].checkOrigin?v(l[F].remoteHost):"*"}}function M(){return F in l&&"iFrameResizer"in e}var F=a(e.id);if(M()){z(F,"Ignored iFrame, already setup.")}else{x(i);c();r();f();g(H(F));m()}}function P(e,n){if(null===m){m=setTimeout((function(){m=null;e()}),n)}}var V={};function D(e,n,t){if(!V[t]){V[t]=setTimeout((function(){V[t]=null;e()}),n)}}function $(){function e(){function e(e){function n(n){return"0px"===(l[e]&&l[e].iframe.style[n])}function t(e){return null!==e.offsetParent}if(l[e]&&t(l[e].iframe)&&(n("height")||n("width"))){A("Visibility change","resize",l[e].iframe,e)}}Object.keys(l).forEach((function(n){e(n)}))}function n(n){k("window","Mutation observed: "+n[0].target+" "+n[0].type);P(e,16)}function t(){var e=document.querySelector("body"),t={attributes:true,attributeOldValue:false,characterData:true,characterDataOldValue:false,childList:true,subtree:true},i=new o(n);i.observe(e,t)}var o=b();if(o){t()}}function U(e){function n(){B("Window "+e,"resize")}k("window","Trigger event: "+e);P(n,16)}function J(){function e(){B("Tab Visible","resize")}if("hidden"!==document.visibilityState){k("document","Trigger event: Visibility change");P(e,16)}}function B(e,n){function t(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun}Object.keys(l).forEach((function(o){if(t(o)){A(e,n,l[o].iframe,o)}}))}function G(){w(window,"message",F);w(window,"resize",(function(){U("resize")}));w(document,"visibilitychange",J);w(document,"-webkit-visibilitychange",J)}function _(){function e(e,n){function t(){if(!n.tagName){throw new TypeError("Object is not a valid DOM element")}else if("IFRAME"!==n.tagName.toUpperCase()){throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}}if(n){t();q(n,e);o.push(n)}}function t(e){if(e&&e.enablePublicMethods){z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}}var o;p();G();return function i(r,s){o=[];t(r);switch(typeof s){case"undefined":case"string":{Array.prototype.forEach.call(document.querySelectorAll(s||"iframe"),e.bind(n,r));break}case"object":{e(r,s);break}default:{throw new TypeError("Unexpected data type ("+typeof s+")")}}return o}}function Q(e){if(!e.fn){x("","Unable to bind to jQuery, it is not fully loaded.")}else if(!e.fn.iFrameResize){e.fn.iFrameResize=function e(n){function t(e,t){q(t,n)}return this.filter("iframe").each(t).end()}}}if(window.jQuery!==n){Q(window.jQuery)}if(typeof n==="function"&&n.amd){n([],_)}else{e.exports=_()}window.iFrameResize=window.iFrameResize||_()})()}));const c={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};const f="@justifi/webcomponents";const u="4.7.0";const d="JustiFi Web Components";const l="dist/index.cjs.js";const m="dist/components/index.js";const h="dist/esm/index.mjs";const b="dist/esm/index.mjs";const w="dist/types/index.d.ts";const g="dist/collection/collection-manifest.json";const p={type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"};const y={registry:"https://registry.npmjs.org"};const v=["dist/","loader/"];const j={build:"stencil build --docs",start:'concurrently --restart-tries 3 -c "bgBlue.bold,bgMagenta.bold,bgGreen.bold" "npm run start-stencil" "npm run storybook"',"start-stencil":"stencil build --watch",test:"stencil test --spec","test:watch":"stencil test --spec --watchAll","test:e2e":"stencil test --e2e",generate:"stencil generate",storybook:"storybook dev -p 6006 --quiet","build-storybook":"storybook build -o ../docs"};const k={"@stencil/core":"^4.0.5",bootstrap:"^5.2.3","chart.js":"^4.4.1","date-fns":"^2.29.3","dinero.js":"^1.9.1","iframe-resizer":"^4.3.7",imask:"^7.1.3",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"};const x={"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@pxtrn/storybook-addon-docs-stencil":"^6.4.1","@stencil/angular-output-target":"^0.7.1","@stencil/react-output-target":"^0.5.3","@stencil/sass":"^3.0.1","@stencil/store":"^2.0.8","@stencil/vue-output-target":"^0.8.6","@storybook/addon-actions":"^7.0.4","@storybook/addon-essentials":"^7.0.4","@storybook/addon-interactions":"^7.0.4","@storybook/addon-links":"^7.0.4","@storybook/html":"^7.0.4","@storybook/html-webpack5":"^7.0.4","@storybook/jest":"^0.1.0","@storybook/testing-library":"^0.1.0","@types/jest":"27.0.3","@types/node":"^20.1.4","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",concurrently:"^7.6.0",dotenv:"^16.3.1",jest:"^27.4.5","jest-cli":"^27.4.5",puppeteer:"^10.0.0",react:"^18.2.0","react-dom":"^18.2.0","rollup-plugin-replace":"^2.2.0",storybook:"^7.0.4"};const z="MIT";const M="507bac1d941eae6e1f56e185ecd9bc9d22637783";const F={name:f,version:u,description:d,main:l,module:m,es2015:h,es2017:b,types:w,collection:g,"collection:main":"dist/collection/index.js",repository:p,publishConfig:y,files:v,scripts:j,dependencies:k,devDependencies:x,license:z,gitHead:M};const I=()=>{const e=getComputedStyle(document.body);const n={loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}};return n};const S=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";const O=class{constructor(t){e(this,t);this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7);this.paymentMethodFormTokenize=n(this,"paymentMethodFormTokenize",7);this.computedTheme=I();this.paymentMethodFormType=undefined;this.paymentMethodFormValidationMode=undefined;this.iframeOrigin=undefined;this.singleLine=undefined}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}sendStyleOverrides(){if(this.computedTheme){this.postMessage(c[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}}dispatchMessageEvent(e){const n=e.data;const t=n.eventType;const o=n.data;if(t===c[this.paymentMethodFormType].ready){this.paymentMethodFormReady.emit(o)}}postMessage(e,n){var t,o;(o=(t=this.iframeElement)===null||t===void 0?void 0:t.contentWindow)===null||o===void 0?void 0:o.postMessage(Object.assign({eventType:e},n),i.iframeOrigin)}async resize(){this.postMessage(c[this.paymentMethodFormType].resize)}async postMessageWithResponseListener(e,n){return new Promise((t=>{const o=n=>{if(n.data.eventType!==e)return;window.removeEventListener("message",o);t(n.data.data)};window.addEventListener("message",o);this.postMessage(e,n)}))}async tokenize(e,n,t){const o=c[this.paymentMethodFormType].tokenize;const i={clientId:e,componentVersion:F.version,paymentMethodMetadata:n,account:t};return this.postMessageWithResponseListener(o,i)}async validate(){return this.postMessageWithResponseListener(c[this.paymentMethodFormType].validate)}composeQueryParams(e){const n=e.map((n=>{if(n===e[0]){return n=`?${n}`}else{return n=`&${n}`}}));return n.join("")}getIframeSrc(){const e=i.iframeOrigin;let n=`${e}/${this.paymentMethodFormType}`;let t=[];if(this.paymentMethodFormValidationMode){t.push(`validationMode=${this.paymentMethodFormValidationMode}`)}if(this.singleLine){t.push(`singleLine=${this.singleLine}`)}return n.concat(this.composeQueryParams(t))}render(){return t(o,null,t("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e},onLoad:()=>{a(this.iframeElement);this.sendStyleOverrides()}}))}};O.style=S;export{O as justifi_payment_method_form};
2
- //# sourceMappingURL=p-c13186cf.entry.js.map
1
+ import{r as e,c as n,h as t,H as o}from"./p-cbb60191.js";import{c as i}from"./p-9b6dcac5.js";function r(e,n,t){return t={path:n,exports:{},require:function(e,n){return s()}},e(t,t.exports),t.exports}function s(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var a=r((function(e){(function(n){if(typeof window==="undefined")return;var t=0,o=false,i=false,r="message",s=r.length,a="[iFrameSizer]",c=a.length,f=null,u=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),l={},m=null,h=Object.freeze({autoResize:true,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:true,inPageLinks:false,enablePublicMethods:true,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:false,maxHeight:Infinity,maxWidth:Infinity,minHeight:0,minWidth:0,mouseEvents:true,resizeFrom:"parent",scrolling:false,sizeHeight:true,sizeWidth:false,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return true},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return true}});function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,false)}function g(e,n,t){e.removeEventListener(n,t,false)}function p(){var e=["moz","webkit","o","ms"];var n;for(n=0;n<e.length&&!u;n+=1){u=window[e[n]+"RequestAnimationFrame"]}if(u){u=u.bind(window)}else{k("setup","RequestAnimationFrame not supported")}}function y(e){var n="Host page: "+e;if(window.top!==window.self){n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e}return n}function v(e){return a+"["+y(e)+"]"}function j(e){return l[e]?l[e].log:o}function k(e,n){M("log",e,n,j(e))}function x(e,n){M("info",e,n,j(e))}function z(e,n){M("warn",e,n,true)}function M(e,n,t,o){if(true===o&&"object"===typeof window.console){console[e](v(n),t)}}function F(e){function n(){function e(){E(_);T(Q);V("onResized",_)}r("Height");r("Width");N(e,_,"init")}function t(){var e=G.slice(c).split(":");var n=e[1]?parseInt(e[1],10):0;var t=l[e[0]]&&l[e[0]].iframe;var r=getComputedStyle(t);return{iframe:t,id:e[0],height:n+o(r)+i(r),width:e[2],type:e[3]}}function o(e){if(e.boxSizing!=="border-box"){return 0}var n=e.paddingTop?parseInt(e.paddingTop,10):0;var t=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+t}function i(e){if(e.boxSizing!=="border-box"){return 0}var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0;var t=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+t}function r(e){var n=Number(l[Q]["max"+e]),t=Number(l[Q]["min"+e]),o=e.toLowerCase(),i=Number(_[o]);k(Q,"Checking "+o+" is in range "+t+"-"+n);if(i<t){i=t;k(Q,"Set "+o+" to min value")}if(i>n){i=n;k(Q,"Set "+o+" to max value")}_[o]=""+i}function u(){function n(){function e(){var e=0,n=false;k(Q,"Checking connection is from allowed list of origins: "+o);for(;e<o.length;e++){if(o[e]===t){n=true;break}}return n}function n(){var e=l[Q]&&l[Q].remoteHost;k(Q,"Checking connection is from: "+e);return t===e}return o.constructor===Array?e():n()}var t=e.origin,o=l[Q]&&l[Q].checkOrigin;if(o&&""+t!=="null"&&!n()){throw new Error("Unexpected message received from: "+t+" for "+_.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.")}return true}function d(){return a===(""+G).slice(0,c)&&G.slice(c).split(":")[0]in l}function m(){var e=_.type in{true:1,false:1,undefined:1};if(e){k(Q,"Ignoring init message from meta parent page")}return e}function h(e){return G.slice(G.indexOf(":")+s+e)}function b(e){k(Q,"onMessage passed: {iframe: "+_.iframe.id+", message: "+e+"}");V("onMessage",{iframe:_.iframe,message:JSON.parse(e)});k(Q,"--")}function p(){var e=document.body.getBoundingClientRect(),n=_.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function y(e,n){function t(){A("Send Page Info","pageInfo:"+p(),e,n)}D(t,32,n)}function v(){function e(e,t){function i(){if(l[o]){y(l[o].iframe,o)}else{n()}}["scroll","resize"].forEach((function(n){k(o,e+n+" listener for sendPageInfo");t(window,n,i)}))}function n(){e("Remove ",g)}function t(){e("Add ",w)}var o=Q;t();if(l[o]){l[o].stopPageInfo=n}}function j(){if(l[Q]&&l[Q].stopPageInfo){l[Q].stopPageInfo();delete l[Q].stopPageInfo}}function M(){var e=true;if(null===_.iframe){z(Q,"IFrame ("+_.id+") not found");e=false}return e}function F(e){var n=e.getBoundingClientRect();C(Q);return{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function S(e){function n(){f=r;L();k(Q,"--")}function t(){return{x:Number(_.width)+i.x,y:Number(_.height)+i.y}}function o(){if(window.parentIFrame){window.parentIFrame["scrollTo"+(e?"Offset":"")](r.x,r.y)}else{z(Q,"Unable to scroll to requested position, window.parentIFrame not found")}}var i=e?F(_.iframe):{x:0,y:0},r=t();k(Q,"Reposition requested from iFrame (offset x:"+i.x+" y:"+i.y+")");if(window.top===window.self){n()}else{o()}}function L(){if(false===V("onScroll",f)){W()}else{T(Q)}}function q(e){function n(){var e=F(r);k(Q,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y);f={x:e.x,y:e.y};L();k(Q,"--")}function t(){if(window.parentIFrame){window.parentIFrame.moveToAnchor(o)}else{k(Q,"In page link #"+o+" not found and window.parentIFrame not found")}}var o=e.split("#")[1]||"",i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];if(r){n()}else if(window.top===window.self){k(Q,"In page link #"+o+" not found")}else{t()}}function P(e){var n={};if(Number(_.width)===0&&Number(_.height)===0){var t=h(9).split(":");n={x:t[1],y:t[0]}}else{n={x:_.width,y:_.height}}V(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function V(e,n){return I(Q,e,n)}function $(){if(l[Q]&&l[Q].firstRun)B();switch(_.type){case"close":{O(_.iframe);break}case"message":{b(h(6));break}case"mouseenter":{P("onMouseEnter");break}case"mouseleave":{P("onMouseLeave");break}case"autoResize":{l[Q].autoResize=JSON.parse(h(9));break}case"scrollTo":{S(false);break}case"scrollToOffset":{S(true);break}case"pageInfo":{y(l[Q]&&l[Q].iframe,Q);v();break}case"pageInfoStop":{j();break}case"inPageLink":{q(h(9));break}case"reset":{R(_);break}case"init":{n();V("onInit",_.iframe);break}default:{if(Number(_.width)===0&&Number(_.height)===0){z("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later "+"version of iframe-resizer than the parent page")}else{n()}}}}function U(e){var n=true;if(!l[e]){n=false;z(_.type+" No settings for "+e+". Message was: "+G)}return n}function J(){for(var e in l){A("iFrame requested init",H(e),l[e].iframe,e)}}function B(){if(l[Q]){l[Q].firstRun=false}}var G=e.data,_={},Q=null;if("[iFrameResizerChild]Ready"===G){J()}else if(d()){_=t();Q=_.id;if(l[Q]){l[Q].loaded=true}if(!m()&&U(Q)){k(Q,"Received: "+G);if(M()&&u()){$()}}}else{x(Q,"Ignored: "+G)}}function I(e,n,t){var o=null,i=null;if(l[e]){o=l[e][n];if("function"===typeof o){i=o(t)}else{throw new TypeError(n+" on iFrame["+e+"] is not a function")}}return i}function S(e){var n=e.id;delete l[n]}function O(e){var n=e.id;if(I(n,"onClose",n)===false){k(n,"Close iframe cancelled by onClose event");return}k(n,"Removing iFrame: "+n);try{if(e.parentNode){e.parentNode.removeChild(e)}}catch(e){z(e)}I(n,"onClosed",n);k(n,"--");S(e)}function C(e){if(null===f){f={x:window.pageXOffset===n?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===n?document.documentElement.scrollTop:window.pageYOffset};k(e,"Get page position: "+f.x+","+f.y)}}function T(e){if(null!==f){window.scrollTo(f.x,f.y);k(e,"Set page position: "+f.x+","+f.y);W()}}function W(){f=null}function R(e){function n(){E(e);A("reset","reset",e.iframe,e.id)}k(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame"));C(e.id);N(n,e,"reset")}function E(e){function n(n){if(!e.id){k("undefined","messageData id not set");return}e.iframe.style[n]=e[n]+"px";k(e.id,"IFrame ("+r+") "+n+" set to "+e[n]+"px")}function t(n){if(!i&&"0"===e[n]){i=true;k(r,"Hidden iFrame detected, creating visibility listener");$()}}function o(e){n(e);t(e)}var r=e.iframe.id;if(l[r]){if(l[r].sizeHeight){o("height")}if(l[r].sizeWidth){o("width")}}}function N(e,n,t){if(t!==n.type&&u&&!window.jasmine){k(n.id,"Requesting animation frame");u(e)}else{e()}}function A(e,n,t,o,i){function r(){var i=l[o]&&l[o].targetOrigin;k(o,"["+e+"] Sending msg to iframe["+o+"] ("+n+") targetOrigin: "+i);t.contentWindow.postMessage(a+n,i)}function s(){z(o,"["+e+"] IFrame("+o+") not found")}function c(){if(t&&"contentWindow"in t&&null!==t.contentWindow){r()}else{s()}}function f(){function e(){if(l[o]&&!l[o].loaded&&!u){u=true;z(o,"IFrame has not responded within "+l[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.")}}if(!!i&&l[o]&&!!l[o].warningTimeout){l[o].msgTimeout=setTimeout(e,l[o].warningTimeout)}}var u=false;o=o||t.id;if(l[o]){c();f()}}function H(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function L(e){return typeof e==="number"}function q(e,i){function r(){function n(n){var t=l[F][n];if(Infinity!==t&&0!==t){e.style[n]=L(t)?t+"px":t;k(F,"Set "+n+" = "+e.style[n])}}function t(e){if(l[F]["min"+e]>l[F]["max"+e]){throw new Error("Value for min"+e+" can not be greater than max"+e)}}t("Height");t("Width");n("maxHeight");n("minHeight");n("maxWidth");n("minWidth")}function s(){var e=i&&i.id||h.id+t++;if(null!==document.getElementById(e)){e+=t++}return e}function a(n){if(typeof n!=="string"){throw new TypeError("Invaild id for iFrame. Expected String")}if(""===n){e.id=n=s();o=(i||{}).log;k(n,"Added missing iframe ID: "+n+" ("+e.src+")")}return n}function c(){k(F,"IFrame scrolling "+(l[F]&&l[F].scrolling?"enabled":"disabled")+" for "+F);e.style.overflow=false===(l[F]&&l[F].scrolling)?"hidden":"auto";switch(l[F]&&l[F].scrolling){case"omit":{break}case true:{e.scrolling="yes";break}case false:{e.scrolling="no";break}default:{e.scrolling=l[F]?l[F].scrolling:"no"}}}function f(){if("number"===typeof(l[F]&&l[F].bodyMargin)||"0"===(l[F]&&l[F].bodyMargin)){l[F].bodyMarginV1=l[F].bodyMargin;l[F].bodyMargin=""+l[F].bodyMargin+"px"}}function u(){var n=l[F]&&l[F].firstRun,t=l[F]&&l[F].heightCalculationMethod in d;if(!n&&t){R({iframe:e,height:0,width:0,type:"init"})}}function m(){if(l[F]){l[F].iframe.iFrameResizer={close:O.bind(null,l[F].iframe),removeListeners:S.bind(null,l[F].iframe),resize:A.bind(null,"Window resize","resize",l[F].iframe),moveToAnchor:function(e){A("Move to anchor","moveToAnchor:"+e,l[F].iframe,F)},sendMessage:function(e){e=JSON.stringify(e);A("Send Message","message:"+e,l[F].iframe,F)}}}}function g(t){function o(){A("iFrame.onload",t,e,n,true);u()}function i(n){if(!e.parentNode){return}var t=new n((function(n){n.forEach((function(n){var t=Array.prototype.slice.call(n.removedNodes);t.forEach((function(n){if(n===e){O(e)}}))}))}));t.observe(e.parentNode,{childList:true})}var r=b();if(r){i(r)}w(e,"load",o);A("init",t,e,n,true)}function p(e){if("object"!==typeof e){throw new TypeError("Options is not an object")}}function y(e){for(var n in h){if(Object.prototype.hasOwnProperty.call(h,n)){l[F][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:h[n]}}}function v(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}function j(e){var n=e.split("Callback");if(n.length===2){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e];delete this[e];z(F,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}function x(n){n=n||{};l[F]=Object.create(null);l[F].iframe=e;l[F].firstRun=true;l[F].remoteHost=e.src&&e.src.split("/").slice(0,3).join("/");p(n);Object.keys(n).forEach(j,n);y(n);if(l[F]){l[F].targetOrigin=true===l[F].checkOrigin?v(l[F].remoteHost):"*"}}function M(){return F in l&&"iFrameResizer"in e}var F=a(e.id);if(M()){z(F,"Ignored iFrame, already setup.")}else{x(i);c();r();f();g(H(F));m()}}function P(e,n){if(null===m){m=setTimeout((function(){m=null;e()}),n)}}var V={};function D(e,n,t){if(!V[t]){V[t]=setTimeout((function(){V[t]=null;e()}),n)}}function $(){function e(){function e(e){function n(n){return"0px"===(l[e]&&l[e].iframe.style[n])}function t(e){return null!==e.offsetParent}if(l[e]&&t(l[e].iframe)&&(n("height")||n("width"))){A("Visibility change","resize",l[e].iframe,e)}}Object.keys(l).forEach((function(n){e(n)}))}function n(n){k("window","Mutation observed: "+n[0].target+" "+n[0].type);P(e,16)}function t(){var e=document.querySelector("body"),t={attributes:true,attributeOldValue:false,characterData:true,characterDataOldValue:false,childList:true,subtree:true},i=new o(n);i.observe(e,t)}var o=b();if(o){t()}}function U(e){function n(){B("Window "+e,"resize")}k("window","Trigger event: "+e);P(n,16)}function J(){function e(){B("Tab Visible","resize")}if("hidden"!==document.visibilityState){k("document","Trigger event: Visibility change");P(e,16)}}function B(e,n){function t(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun}Object.keys(l).forEach((function(o){if(t(o)){A(e,n,l[o].iframe,o)}}))}function G(){w(window,"message",F);w(window,"resize",(function(){U("resize")}));w(document,"visibilitychange",J);w(document,"-webkit-visibilitychange",J)}function _(){function e(e,n){function t(){if(!n.tagName){throw new TypeError("Object is not a valid DOM element")}else if("IFRAME"!==n.tagName.toUpperCase()){throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}}if(n){t();q(n,e);o.push(n)}}function t(e){if(e&&e.enablePublicMethods){z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}}var o;p();G();return function i(r,s){o=[];t(r);switch(typeof s){case"undefined":case"string":{Array.prototype.forEach.call(document.querySelectorAll(s||"iframe"),e.bind(n,r));break}case"object":{e(r,s);break}default:{throw new TypeError("Unexpected data type ("+typeof s+")")}}return o}}function Q(e){if(!e.fn){x("","Unable to bind to jQuery, it is not fully loaded.")}else if(!e.fn.iFrameResize){e.fn.iFrameResize=function e(n){function t(e,t){q(t,n)}return this.filter("iframe").each(t).end()}}}if(window.jQuery!==n){Q(window.jQuery)}if(typeof n==="function"&&n.amd){n([],_)}else{e.exports=_()}window.iFrameResize=window.iFrameResize||_()})()}));const c={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};const f="@justifi/webcomponents";const u="4.7.1-rc.0";const d="JustiFi Web Components";const l="dist/index.cjs.js";const m="dist/components/index.js";const h="dist/esm/index.mjs";const b="dist/esm/index.mjs";const w="dist/types/index.d.ts";const g="dist/collection/collection-manifest.json";const p={type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"};const y={registry:"https://registry.npmjs.org"};const v=["dist/","loader/"];const j={build:"stencil build --docs",start:'concurrently --restart-tries 3 -c "bgBlue.bold,bgMagenta.bold,bgGreen.bold" "npm run start-stencil" "npm run storybook"',"start-stencil":"stencil build --watch",test:"stencil test --spec","test:watch":"stencil test --spec --watchAll","test:e2e":"stencil test --e2e",generate:"stencil generate",storybook:"storybook dev -p 6006 --quiet","build-storybook":"storybook build -o ../docs"};const k={"@stencil/core":"^4.0.5",bootstrap:"^5.2.3","chart.js":"^4.4.1","date-fns":"^2.29.3","dinero.js":"^1.9.1","iframe-resizer":"^4.3.7",imask:"^7.1.3",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"};const x={"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@pxtrn/storybook-addon-docs-stencil":"^6.4.1","@stencil/angular-output-target":"^0.7.1","@stencil/react-output-target":"^0.5.3","@stencil/sass":"^3.0.1","@stencil/store":"^2.0.8","@stencil/vue-output-target":"^0.8.6","@storybook/addon-actions":"^7.0.4","@storybook/addon-essentials":"^7.0.4","@storybook/addon-interactions":"^7.0.4","@storybook/addon-links":"^7.0.4","@storybook/html":"^7.0.4","@storybook/html-webpack5":"^7.0.4","@storybook/jest":"^0.1.0","@storybook/testing-library":"^0.1.0","@types/jest":"27.0.3","@types/node":"^20.1.4","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",concurrently:"^7.6.0",dotenv:"^16.3.1",jest:"^27.4.5","jest-cli":"^27.4.5",puppeteer:"^10.0.0",react:"^18.2.0","react-dom":"^18.2.0","rollup-plugin-replace":"^2.2.0",storybook:"^7.0.4"};const z="MIT";const M="507bac1d941eae6e1f56e185ecd9bc9d22637783";const F={name:f,version:u,description:d,main:l,module:m,es2015:h,es2017:b,types:w,collection:g,"collection:main":"dist/collection/index.js",repository:p,publishConfig:y,files:v,scripts:j,dependencies:k,devDependencies:x,license:z,gitHead:M};const I=()=>{const e=getComputedStyle(document.body);const n={loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}};return n};const S=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";const O=class{constructor(t){e(this,t);this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7);this.paymentMethodFormTokenize=n(this,"paymentMethodFormTokenize",7);this.computedTheme=I();this.paymentMethodFormType=undefined;this.paymentMethodFormValidationMode=undefined;this.iframeOrigin=undefined;this.singleLine=undefined}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}sendStyleOverrides(){if(this.computedTheme){this.postMessage(c[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}}dispatchMessageEvent(e){const n=e.data;const t=n.eventType;const o=n.data;if(t===c[this.paymentMethodFormType].ready){this.paymentMethodFormReady.emit(o)}}postMessage(e,n){var t,o;(o=(t=this.iframeElement)===null||t===void 0?void 0:t.contentWindow)===null||o===void 0?void 0:o.postMessage(Object.assign({eventType:e},n),i.iframeOrigin)}async resize(){this.postMessage(c[this.paymentMethodFormType].resize)}async postMessageWithResponseListener(e,n){return new Promise((t=>{const o=n=>{if(n.data.eventType!==e)return;window.removeEventListener("message",o);t(n.data.data)};window.addEventListener("message",o);this.postMessage(e,n)}))}async tokenize(e,n,t){const o=c[this.paymentMethodFormType].tokenize;const i={clientId:e,componentVersion:F.version,paymentMethodMetadata:n,account:t};return this.postMessageWithResponseListener(o,i)}async validate(){return this.postMessageWithResponseListener(c[this.paymentMethodFormType].validate)}composeQueryParams(e){const n=e.map((n=>{if(n===e[0]){return n=`?${n}`}else{return n=`&${n}`}}));return n.join("")}getIframeSrc(){const e=i.iframeOrigin;let n=`${e}/${this.paymentMethodFormType}`;let t=[];if(this.paymentMethodFormValidationMode){t.push(`validationMode=${this.paymentMethodFormValidationMode}`)}if(this.singleLine){t.push(`singleLine=${this.singleLine}`)}return n.concat(this.composeQueryParams(t))}render(){return t(o,null,t("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e},onLoad:()=>{a(this.iframeElement);this.sendStyleOverrides()}}))}};O.style=S;export{O as justifi_payment_method_form};
2
+ //# sourceMappingURL=p-9ce9561a.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["undefined","window","count","logEnabled","hiddenCheckEnabled","msgHeader","msgHeaderLen","length","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","Object","freeze","max","scroll","bodyScroll","documentElementScroll","settings","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","id","interval","log","maxHeight","Infinity","maxWidth","minHeight","minWidth","mouseEvents","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClose","onClosed","onInit","onMessage","warn","onMouseEnter","onMouseLeave","onResized","onScroll","getMutationObserver","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","setupRequestAnimationFrame","vendors","x","bind","getMyID","iframeId","retStr","top","self","parentIFrame","getId","formatLogHeader","isLogEnabled","msg","output","info","type","enabled","console","iFrameListener","event","resizeIFrame","resize","setSize","messageData","setPagePosition","on","ensureInRange","syncResize","processMsg","data","slice","split","height","parseInt","iframe","compStyle","getComputedStyle","getPaddingEnds","getBorderEnds","width","boxSizing","paddingTop","bot","paddingBottom","borderTopWidth","borderBottomWidth","Dimension","Number","min","dimension","toLowerCase","size","isMessageFromIFrame","checkAllowedOrigin","checkList","i","retCode","origin","checkSingle","remoteHost","constructor","Array","Error","isMessageForUs","isMessageFromMetaParent","true","false","getMsgBody","offset","indexOf","forwardMsgFromIFrame","msgBody","message","JSON","parse","getPageInfo","bodyPosition","document","body","getBoundingClientRect","iFramePosition","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","left","scrollTop","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowHeight","windowWidth","sendPageInfoToIframe","debouncedTrigger","trigger","debounceFrameEvents","startPageInfoMonitor","setListener","sendPageInfo","stop","forEach","start","stopPageInfo","stopPageInfoMonitor","checkIFrameExists","retBool","getElementPosition","target","getPagePosition","floor","y","scrollRequestFromChild","addOffset","reposition","newPosition","scrollTo","calcOffset","scrollParent","unsetPagePosition","findTarget","location","jumpToTarget","jumpPosition","hash","jumpToParent","moveToAnchor","hashData","decodeURIComponent","getElementById","getElementsByName","onMouse","mousePos","screenX","screenY","funcName","val","chkEvent","actionMsg","firstRun","closeIFrame","resetIFrame","hasSettings","iFrameReadyMsgReceived","createOutgoingMsg","loaded","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","reset","setDimension","style","chkZero","fixHiddenIFrames","processDimension","doNotSync","jasmine","calleeMsg","noResponseWarning","postMessageToIFrame","targetOrigin","contentWindow","postMessage","iFrameNotFound","chkAndSend","warnOnNoResponse","warning","errorShown","msgTimeout","setTimeout","isNumber","value","setupIFrame","options","setLimits","addStyle","styleValue","chkMinMax","newId","ensureHasId","src","setScrolling","overflow","setupBodyMarginValues","checkReset","resetRequertMethod","setupIFrameObject","iFrameResizer","close","removeListeners","anchor","sendMessage","init","iFrameLoaded","createDestroyObserver","destroyObserver","mutations","mutation","removedNodes","prototype","call","removedNode","observe","childList","checkOptions","copyOptions","option","hasOwnProperty","getTargetOrigin","match","depricate","key","splitName","name","charAt","toUpperCase","this","processOptions","create","join","keys","beenHere","debouce","fn","time","frameTimer","frameId","checkIFrames","checkIFrame","settingId","chkDimension","isVisible","offsetParent","mutationObserved","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","subtree","observer","resizeIFrames","sendTriggerMsg","tabVisible","visibilityState","eventName","isIFrameResizeEnabled","setupEventListeners","factory","element","chkType","tagName","iFrames","push","warnDeprecatedOptions","iFrameResizeF","querySelectorAll","createJQueryPublicMethod","$","iFrameResize","$iFrameResizeF","index","filter","each","end","jQuery","define","amd","module","exports","MessageEventType","card","ready","tokenize","validate","styleOverrides","bankAccount","getComputedTheme","computedStyles","computedTheme","loadGoogleFont","getPropertyValue","layout","fontFamily","padding","formControlSpacingHorizontal","formControlSpacingVertical","formControl","backgroundColor","borderColor","borderColorFocus","borderColorError","borderWidth","borderLeftWidth","borderRightWidth","borderRadius","borderStyle","boxShadow","boxShadowError","boxShadowErrorFocus","boxShadowFocus","color","colorFocus","fontSize","fontWeight","lineHeight","margin","formLabel","errorMessage","paymentMethodFormCss","PaymentMethodForm","connectedCallback","dispatchMessageEvent","disconnectedCallback","sendStyleOverrides","paymentMethodFormType","messageEvent","messagePayload","messageType","eventType","paymentMethodFormReady","emit","payload","_b","_a","iframeElement","assign","iframeOrigin","postMessageWithResponseListener","Promise","resolve","responseListener","clientId","paymentMethodMetadata","account","componentVersion","packageJson","version","composeQueryParams","values","queryParams","map","getIframeSrc","iframeSrc","paramsList","paymentMethodFormValidationMode","singleLine","concat","render","h","Host","ref","onLoad"],"sources":["../node_modules/iframe-resizer/js/iframeResizer.js","src/components/payment-method-form/message-event-types.ts","src/components/payment-method-form/get-computed-theme.ts","src/components/payment-method-form/payment-method-form.css?tag=justifi-payment-method-form","src/components/payment-method-form/payment-method-form.tsx"],"sourcesContent":["/*\n * File: iframeResizer.js\n * Desc: Force iframes to size to content.\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n * Contributor: Jure Mav - jure.mav@gmail.com\n * Contributor: Reed Dadoune - reed@dadoune.com\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var count = 0,\n logEnabled = false,\n hiddenCheckEnabled = false,\n msgHeader = 'message',\n msgHeaderLen = msgHeader.length,\n msgId = '[iFrameSizer]', // Must match iframe msg ID\n msgIdLen = msgId.length,\n pagePosition = null,\n requestAnimationFrame = window.requestAnimationFrame,\n resetRequiredMethods = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n }),\n settings = {},\n timer = null,\n defaults = Object.freeze({\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyMarginV1: 8,\n bodyPadding: null,\n checkOrigin: true,\n inPageLinks: false,\n enablePublicMethods: true,\n heightCalculationMethod: 'bodyOffset',\n id: 'iFrameResizer',\n interval: 32,\n log: false,\n maxHeight: Infinity,\n maxWidth: Infinity,\n minHeight: 0,\n minWidth: 0,\n mouseEvents: true,\n resizeFrom: 'parent',\n scrolling: false,\n sizeHeight: true,\n sizeWidth: false,\n warningTimeout: 5000,\n tolerance: 0,\n widthCalculationMethod: 'scroll',\n onClose: function () {\n return true\n },\n onClosed: function () {},\n onInit: function () {},\n onMessage: function () {\n warn('onMessage function not defined')\n },\n onMouseEnter: function () {},\n onMouseLeave: function () {},\n onResized: function () {},\n onScroll: function () {\n return true\n }\n })\n\n function getMutationObserver() {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n )\n }\n\n function addEventListener(el, evt, func) {\n el.addEventListener(evt, func, false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function setupRequestAnimationFrame() {\n var vendors = ['moz', 'webkit', 'o', 'ms']\n var x\n\n // Remove vendor prefixing if prefixed and break early if not\n for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\n requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\n }\n\n if (requestAnimationFrame) {\n // Firefox extension content-scripts have a globalThis object that is not the same as window.\n // Binding `requestAnimationFrame` to window allows the function to work and prevents errors\n // being thrown when run in that context, and should be a no-op in every other context.\n requestAnimationFrame = requestAnimationFrame.bind(window)\n } else {\n log('setup', 'RequestAnimationFrame not supported')\n }\n }\n\n function getMyID(iframeId) {\n var retStr = 'Host page: ' + iframeId\n\n if (window.top !== window.self) {\n retStr =\n window.parentIFrame && window.parentIFrame.getId\n ? window.parentIFrame.getId() + ': ' + iframeId\n : 'Nested host page: ' + iframeId\n }\n\n return retStr\n }\n\n function formatLogHeader(iframeId) {\n return msgId + '[' + getMyID(iframeId) + ']'\n }\n\n function isLogEnabled(iframeId) {\n return settings[iframeId] ? settings[iframeId].log : logEnabled\n }\n\n function log(iframeId, msg) {\n output('log', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function info(iframeId, msg) {\n output('info', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function warn(iframeId, msg) {\n output('warn', iframeId, msg, true)\n }\n\n function output(type, iframeId, msg, enabled) {\n if (true === enabled && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console[type](formatLogHeader(iframeId), msg)\n }\n }\n\n function iFrameListener(event) {\n function resizeIFrame() {\n function resize() {\n setSize(messageData)\n setPagePosition(iframeId)\n on('onResized', messageData)\n }\n\n ensureInRange('Height')\n ensureInRange('Width')\n\n syncResize(resize, messageData, 'init')\n }\n\n function processMsg() {\n var data = msg.slice(msgIdLen).split(':')\n var height = data[1] ? parseInt(data[1], 10) : 0\n var iframe = settings[data[0]] && settings[data[0]].iframe\n var compStyle = getComputedStyle(iframe)\n\n return {\n iframe: iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: data[2],\n type: data[3]\n }\n }\n\n function getPaddingEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n var bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n return top + bot\n }\n\n function getBorderEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n var bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n return top + bot\n }\n\n function ensureInRange(Dimension) {\n var max = Number(settings[iframeId]['max' + Dimension]),\n min = Number(settings[iframeId]['min' + Dimension]),\n dimension = Dimension.toLowerCase(),\n size = Number(messageData[dimension])\n\n log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\n\n if (size < min) {\n size = min\n log(iframeId, 'Set ' + dimension + ' to min value')\n }\n\n if (size > max) {\n size = max\n log(iframeId, 'Set ' + dimension + ' to max value')\n }\n\n messageData[dimension] = '' + size\n }\n\n function isMessageFromIFrame() {\n function checkAllowedOrigin() {\n function checkList() {\n var i = 0,\n retCode = false\n\n log(\n iframeId,\n 'Checking connection is from allowed list of origins: ' +\n checkOrigin\n )\n\n for (; i < checkOrigin.length; i++) {\n if (checkOrigin[i] === origin) {\n retCode = true\n break\n }\n }\n return retCode\n }\n\n function checkSingle() {\n var remoteHost = settings[iframeId] && settings[iframeId].remoteHost\n log(iframeId, 'Checking connection is from: ' + remoteHost)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n var origin = event.origin,\n checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin\n\n if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n 'Unexpected message received from: ' +\n origin +\n ' for ' +\n messageData.iframe.id +\n '. Message was: ' +\n event.data +\n '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\n )\n }\n\n return true\n }\n\n function isMessageForUs() {\n return (\n msgId === ('' + msg).slice(0, msgIdLen) &&\n msg.slice(msgIdLen).split(':')[0] in settings\n ) // ''+Protects against non-string msg\n }\n\n function isMessageFromMetaParent() {\n // Test if this message is from a parent above us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }\n\n if (retCode) {\n log(iframeId, 'Ignoring init message from meta parent page')\n }\n\n return retCode\n }\n\n function getMsgBody(offset) {\n return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)\n }\n\n function forwardMsgFromIFrame(msgBody) {\n log(\n iframeId,\n 'onMessage passed: {iframe: ' +\n messageData.iframe.id +\n ', message: ' +\n msgBody +\n '}'\n )\n\n on('onMessage', {\n iframe: messageData.iframe,\n message: JSON.parse(msgBody)\n })\n\n log(iframeId, '--')\n }\n\n function getPageInfo() {\n var bodyPosition = document.body.getBoundingClientRect(),\n iFramePosition = messageData.iframe.getBoundingClientRect()\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n ),\n clientWidth: Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n ),\n offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\n offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\n scrollTop: window.pageYOffset,\n scrollLeft: window.pageXOffset,\n documentHeight: document.documentElement.clientHeight,\n documentWidth: document.documentElement.clientWidth,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth\n })\n }\n\n function sendPageInfoToIframe(iframe, iframeId) {\n function debouncedTrigger() {\n trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\n }\n debounceFrameEvents(debouncedTrigger, 32, iframeId)\n }\n\n function startPageInfoMonitor() {\n function setListener(type, func) {\n function sendPageInfo() {\n if (settings[id]) {\n sendPageInfoToIframe(settings[id].iframe, id)\n } else {\n stop()\n }\n }\n\n ;['scroll', 'resize'].forEach(function (evt) {\n log(id, type + evt + ' listener for sendPageInfo')\n func(window, evt, sendPageInfo)\n })\n }\n\n function stop() {\n setListener('Remove ', removeEventListener)\n }\n\n function start() {\n setListener('Add ', addEventListener)\n }\n\n var id = iframeId // Create locally scoped copy of iFrame ID\n\n start()\n\n if (settings[id]) {\n settings[id].stopPageInfo = stop\n }\n }\n\n function stopPageInfoMonitor() {\n if (settings[iframeId] && settings[iframeId].stopPageInfo) {\n settings[iframeId].stopPageInfo()\n delete settings[iframeId].stopPageInfo\n }\n }\n\n function checkIFrameExists() {\n var retBool = true\n\n if (null === messageData.iframe) {\n warn(iframeId, 'IFrame (' + messageData.id + ') not found')\n retBool = false\n }\n return retBool\n }\n\n function getElementPosition(target) {\n var iFramePosition = target.getBoundingClientRect()\n\n getPagePosition(iframeId)\n\n return {\n x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\n y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\n }\n }\n\n function scrollRequestFromChild(addOffset) {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition() {\n pagePosition = newPosition\n scrollTo()\n log(iframeId, '--')\n }\n\n function calcOffset() {\n return {\n x: Number(messageData.width) + offset.x,\n y: Number(messageData.height) + offset.y\n }\n }\n\n function scrollParent() {\n if (window.parentIFrame) {\n window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\n newPosition.x,\n newPosition.y\n )\n } else {\n warn(\n iframeId,\n 'Unable to scroll to requested position, window.parentIFrame not found'\n )\n }\n }\n\n var offset = addOffset\n ? getElementPosition(messageData.iframe)\n : { x: 0, y: 0 },\n newPosition = calcOffset()\n\n log(\n iframeId,\n 'Reposition requested from iFrame (offset x:' +\n offset.x +\n ' y:' +\n offset.y +\n ')'\n )\n\n if (window.top === window.self) {\n reposition()\n } else {\n scrollParent()\n }\n }\n\n function scrollTo() {\n if (false === on('onScroll', pagePosition)) {\n unsetPagePosition()\n } else {\n setPagePosition(iframeId)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget() {\n var jumpPosition = getElementPosition(target)\n\n log(\n iframeId,\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n pagePosition = {\n x: jumpPosition.x,\n y: jumpPosition.y\n }\n\n scrollTo()\n log(iframeId, '--')\n }\n\n function jumpToParent() {\n if (window.parentIFrame) {\n window.parentIFrame.moveToAnchor(hash)\n } else {\n log(\n iframeId,\n 'In page link #' +\n hash +\n ' not found and window.parentIFrame not found'\n )\n }\n }\n\n var hash = location.split('#')[1] || '',\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget()\n } else if (window.top === window.self) {\n log(iframeId, 'In page link #' + hash + ' not found')\n } else {\n jumpToParent()\n }\n }\n\n function onMouse(event) {\n var mousePos = {}\n\n if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\n var data = getMsgBody(9).split(':')\n mousePos = {\n x: data[1],\n y: data[0]\n }\n } else {\n mousePos = {\n x: messageData.width,\n y: messageData.height\n }\n }\n\n on(event, {\n iframe: messageData.iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type: messageData.type\n })\n }\n\n function on(funcName, val) {\n return chkEvent(iframeId, funcName, val)\n }\n\n function actionMsg() {\n if (settings[iframeId] && settings[iframeId].firstRun) firstRun()\n\n switch (messageData.type) {\n case 'close': {\n closeIFrame(messageData.iframe)\n break\n }\n\n case 'message': {\n forwardMsgFromIFrame(getMsgBody(6))\n break\n }\n\n case 'mouseenter': {\n onMouse('onMouseEnter')\n break\n }\n\n case 'mouseleave': {\n onMouse('onMouseLeave')\n break\n }\n\n case 'autoResize': {\n settings[iframeId].autoResize = JSON.parse(getMsgBody(9))\n break\n }\n\n case 'scrollTo': {\n scrollRequestFromChild(false)\n break\n }\n\n case 'scrollToOffset': {\n scrollRequestFromChild(true)\n break\n }\n\n case 'pageInfo': {\n sendPageInfoToIframe(\n settings[iframeId] && settings[iframeId].iframe,\n iframeId\n )\n startPageInfoMonitor()\n break\n }\n\n case 'pageInfoStop': {\n stopPageInfoMonitor()\n break\n }\n\n case 'inPageLink': {\n findTarget(getMsgBody(9))\n break\n }\n\n case 'reset': {\n resetIFrame(messageData)\n break\n }\n\n case 'init': {\n resizeIFrame()\n on('onInit', messageData.iframe)\n break\n }\n\n default: {\n if (\n Number(messageData.width) === 0 &&\n Number(messageData.height) === 0\n ) {\n warn(\n 'Unsupported message received (' +\n messageData.type +\n '), this is likely due to the iframe containing a later ' +\n 'version of iframe-resizer than the parent page'\n )\n } else {\n resizeIFrame()\n }\n }\n }\n }\n\n function hasSettings(iframeId) {\n var retBool = true\n\n if (!settings[iframeId]) {\n retBool = false\n warn(\n messageData.type +\n ' No settings for ' +\n iframeId +\n '. Message was: ' +\n msg\n )\n }\n\n return retBool\n }\n\n function iFrameReadyMsgReceived() {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var iframeId in settings) {\n trigger(\n 'iFrame requested init',\n createOutgoingMsg(iframeId),\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n\n function firstRun() {\n if (settings[iframeId]) {\n settings[iframeId].firstRun = false\n }\n }\n\n var msg = event.data,\n messageData = {},\n iframeId = null\n\n if ('[iFrameResizerChild]Ready' === msg) {\n iFrameReadyMsgReceived()\n } else if (isMessageForUs()) {\n messageData = processMsg()\n iframeId = messageData.id\n if (settings[iframeId]) {\n settings[iframeId].loaded = true\n }\n\n if (!isMessageFromMetaParent() && hasSettings(iframeId)) {\n log(iframeId, 'Received: ' + msg)\n\n if (checkIFrameExists() && isMessageFromIFrame()) {\n actionMsg()\n }\n }\n } else {\n info(iframeId, 'Ignored: ' + msg)\n }\n }\n\n function chkEvent(iframeId, funcName, val) {\n var func = null,\n retVal = null\n\n if (settings[iframeId]) {\n func = settings[iframeId][funcName]\n\n if ('function' === typeof func) {\n retVal = func(val)\n } else {\n throw new TypeError(\n funcName + ' on iFrame[' + iframeId + '] is not a function'\n )\n }\n }\n\n return retVal\n }\n\n function removeIframeListeners(iframe) {\n var iframeId = iframe.id\n delete settings[iframeId]\n }\n\n function closeIFrame(iframe) {\n var iframeId = iframe.id\n if (chkEvent(iframeId, 'onClose', iframeId) === false) {\n log(iframeId, 'Close iframe cancelled by onClose event')\n return\n }\n log(iframeId, 'Removing iFrame: ' + iframeId)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe)\n }\n } catch (error) {\n warn(error)\n }\n\n chkEvent(iframeId, 'onClosed', iframeId)\n log(iframeId, '--')\n removeIframeListeners(iframe)\n }\n\n function getPagePosition(iframeId) {\n if (null === pagePosition) {\n pagePosition = {\n x:\n window.pageXOffset === undefined\n ? document.documentElement.scrollLeft\n : window.pageXOffset,\n y:\n window.pageYOffset === undefined\n ? document.documentElement.scrollTop\n : window.pageYOffset\n }\n log(\n iframeId,\n 'Get page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n }\n }\n\n function setPagePosition(iframeId) {\n if (null !== pagePosition) {\n window.scrollTo(pagePosition.x, pagePosition.y)\n log(\n iframeId,\n 'Set page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n unsetPagePosition()\n }\n }\n\n function unsetPagePosition() {\n pagePosition = null\n }\n\n function resetIFrame(messageData) {\n function reset() {\n setSize(messageData)\n trigger('reset', 'reset', messageData.iframe, messageData.id)\n }\n\n log(\n messageData.id,\n 'Size reset requested by ' +\n ('init' === messageData.type ? 'host page' : 'iFrame')\n )\n getPagePosition(messageData.id)\n syncResize(reset, messageData, 'reset')\n }\n\n function setSize(messageData) {\n function setDimension(dimension) {\n if (!messageData.id) {\n log('undefined', 'messageData id not set')\n return\n }\n messageData.iframe.style[dimension] = messageData[dimension] + 'px'\n log(\n messageData.id,\n 'IFrame (' +\n iframeId +\n ') ' +\n dimension +\n ' set to ' +\n messageData[dimension] +\n 'px'\n )\n }\n\n function chkZero(dimension) {\n // FireFox sets dimension of hidden iFrames to zero.\n // So if we detect that set up an event to check for\n // when iFrame becomes visible.\n\n /* istanbul ignore next */ // Not testable in PhantomJS\n if (!hiddenCheckEnabled && '0' === messageData[dimension]) {\n hiddenCheckEnabled = true\n log(iframeId, 'Hidden iFrame detected, creating visibility listener')\n fixHiddenIFrames()\n }\n }\n\n function processDimension(dimension) {\n setDimension(dimension)\n chkZero(dimension)\n }\n\n var iframeId = messageData.iframe.id\n\n if (settings[iframeId]) {\n if (settings[iframeId].sizeHeight) {\n processDimension('height')\n }\n if (settings[iframeId].sizeWidth) {\n processDimension('width')\n }\n }\n }\n\n function syncResize(func, messageData, doNotSync) {\n /* istanbul ignore if */ // Not testable in PhantomJS\n if (\n doNotSync !== messageData.type &&\n requestAnimationFrame &&\n // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\n !window.jasmine\n ) {\n log(messageData.id, 'Requesting animation frame')\n requestAnimationFrame(func)\n } else {\n func()\n }\n }\n\n function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\n function postMessageToIFrame() {\n var target = settings[id] && settings[id].targetOrigin\n log(\n id,\n '[' +\n calleeMsg +\n '] Sending msg to iframe[' +\n id +\n '] (' +\n msg +\n ') targetOrigin: ' +\n target\n )\n iframe.contentWindow.postMessage(msgId + msg, target)\n }\n\n function iFrameNotFound() {\n warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\n }\n\n function chkAndSend() {\n if (\n iframe &&\n 'contentWindow' in iframe &&\n null !== iframe.contentWindow\n ) {\n // Null test for PhantomJS\n postMessageToIFrame()\n } else {\n iFrameNotFound()\n }\n }\n\n function warnOnNoResponse() {\n function warning() {\n if (settings[id] && !settings[id].loaded && !errorShown) {\n errorShown = true\n warn(\n id,\n 'IFrame has not responded within ' +\n settings[id].warningTimeout / 1000 +\n ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'\n )\n }\n }\n\n if (\n !!noResponseWarning &&\n settings[id] &&\n !!settings[id].warningTimeout\n ) {\n settings[id].msgTimeout = setTimeout(\n warning,\n settings[id].warningTimeout\n )\n }\n }\n\n var errorShown = false\n\n id = id || iframe.id\n\n if (settings[id]) {\n chkAndSend()\n warnOnNoResponse()\n }\n }\n\n function createOutgoingMsg(iframeId) {\n return (\n iframeId +\n ':' +\n settings[iframeId].bodyMarginV1 +\n ':' +\n settings[iframeId].sizeWidth +\n ':' +\n settings[iframeId].log +\n ':' +\n settings[iframeId].interval +\n ':' +\n settings[iframeId].enablePublicMethods +\n ':' +\n settings[iframeId].autoResize +\n ':' +\n settings[iframeId].bodyMargin +\n ':' +\n settings[iframeId].heightCalculationMethod +\n ':' +\n settings[iframeId].bodyBackground +\n ':' +\n settings[iframeId].bodyPadding +\n ':' +\n settings[iframeId].tolerance +\n ':' +\n settings[iframeId].inPageLinks +\n ':' +\n settings[iframeId].resizeFrom +\n ':' +\n settings[iframeId].widthCalculationMethod +\n ':' +\n settings[iframeId].mouseEvents\n )\n }\n\n function isNumber(value) {\n return typeof value === 'number'\n }\n\n function setupIFrame(iframe, options) {\n function setLimits() {\n function addStyle(style) {\n var styleValue = settings[iframeId][style]\n if (Infinity !== styleValue && 0 !== styleValue) {\n iframe.style[style] = isNumber(styleValue)\n ? styleValue + 'px'\n : styleValue\n log(iframeId, 'Set ' + style + ' = ' + iframe.style[style])\n }\n }\n\n function chkMinMax(dimension) {\n if (\n settings[iframeId]['min' + dimension] >\n settings[iframeId]['max' + dimension]\n ) {\n throw new Error(\n 'Value for min' +\n dimension +\n ' can not be greater than max' +\n dimension\n )\n }\n }\n\n chkMinMax('Height')\n chkMinMax('Width')\n\n addStyle('maxHeight')\n addStyle('minHeight')\n addStyle('maxWidth')\n addStyle('minWidth')\n }\n\n function newId() {\n var id = (options && options.id) || defaults.id + count++\n if (null !== document.getElementById(id)) {\n id += count++\n }\n return id\n }\n\n function ensureHasId(iframeId) {\n if (typeof iframeId !== 'string') {\n throw new TypeError('Invaild id for iFrame. Expected String')\n }\n\n if ('' === iframeId) {\n // eslint-disable-next-line no-multi-assign\n iframe.id = iframeId = newId()\n logEnabled = (options || {}).log\n log(\n iframeId,\n 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\n )\n }\n\n return iframeId\n }\n\n function setScrolling() {\n log(\n iframeId,\n 'IFrame scrolling ' +\n (settings[iframeId] && settings[iframeId].scrolling\n ? 'enabled'\n : 'disabled') +\n ' for ' +\n iframeId\n )\n iframe.style.overflow =\n false === (settings[iframeId] && settings[iframeId].scrolling)\n ? 'hidden'\n : 'auto'\n switch (settings[iframeId] && settings[iframeId].scrolling) {\n case 'omit': {\n break\n }\n\n case true: {\n iframe.scrolling = 'yes'\n break\n }\n\n case false: {\n iframe.scrolling = 'no'\n break\n }\n\n default: {\n iframe.scrolling = settings[iframeId]\n ? settings[iframeId].scrolling\n : 'no'\n }\n }\n }\n\n // The V1 iFrame script expects an int, where as in V2 expects a CSS\n // string value such as '1px 3em', so if we have an int for V2, set V1=V2\n // and then convert V2 to a string PX value.\n function setupBodyMarginValues() {\n if (\n 'number' ===\n typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\n '0' === (settings[iframeId] && settings[iframeId].bodyMargin)\n ) {\n settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\n settings[iframeId].bodyMargin =\n '' + settings[iframeId].bodyMargin + 'px'\n }\n }\n\n function checkReset() {\n // Reduce scope of firstRun to function, because IE8's JS execution\n // context stack is borked and this value gets externally\n // changed midway through running this function!!!\n var firstRun = settings[iframeId] && settings[iframeId].firstRun,\n resetRequertMethod =\n settings[iframeId] &&\n settings[iframeId].heightCalculationMethod in resetRequiredMethods\n\n if (!firstRun && resetRequertMethod) {\n resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })\n }\n }\n\n function setupIFrameObject() {\n if (settings[iframeId]) {\n settings[iframeId].iframe.iFrameResizer = {\n close: closeIFrame.bind(null, settings[iframeId].iframe),\n\n removeListeners: removeIframeListeners.bind(\n null,\n settings[iframeId].iframe\n ),\n\n resize: trigger.bind(\n null,\n 'Window resize',\n 'resize',\n settings[iframeId].iframe\n ),\n\n moveToAnchor: function (anchor) {\n trigger(\n 'Move to anchor',\n 'moveToAnchor:' + anchor,\n settings[iframeId].iframe,\n iframeId\n )\n },\n\n sendMessage: function (message) {\n message = JSON.stringify(message)\n trigger(\n 'Send Message',\n 'message:' + message,\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n }\n }\n\n // We have to call trigger twice, as we can not be sure if all\n // iframes have completed loading when this code runs. The\n // event listener also catches the page changing in the iFrame.\n function init(msg) {\n function iFrameLoaded() {\n trigger('iFrame.onload', msg, iframe, undefined, true)\n checkReset()\n }\n\n function createDestroyObserver(MutationObserver) {\n if (!iframe.parentNode) {\n return\n }\n\n var destroyObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array\n removedNodes.forEach(function (removedNode) {\n if (removedNode === iframe) {\n closeIFrame(iframe)\n }\n })\n })\n })\n destroyObserver.observe(iframe.parentNode, {\n childList: true\n })\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createDestroyObserver(MutationObserver)\n }\n\n addEventListener(iframe, 'load', iFrameLoaded)\n trigger('init', msg, iframe, undefined, true)\n }\n\n function checkOptions(options) {\n if ('object' !== typeof options) {\n throw new TypeError('Options is not an object')\n }\n }\n\n function copyOptions(options) {\n // eslint-disable-next-line no-restricted-syntax\n for (var option in defaults) {\n if (Object.prototype.hasOwnProperty.call(defaults, option)) {\n settings[iframeId][option] = Object.prototype.hasOwnProperty.call(\n options,\n option\n )\n ? options[option]\n : defaults[option]\n }\n }\n }\n\n function getTargetOrigin(remoteHost) {\n return '' === remoteHost ||\n null !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/)\n ? '*'\n : remoteHost\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n iframeId,\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function processOptions(options) {\n options = options || {}\n\n settings[iframeId] = Object.create(null) // Protect against prototype attacks\n settings[iframeId].iframe = iframe\n settings[iframeId].firstRun = true\n settings[iframeId].remoteHost =\n iframe.src && iframe.src.split('/').slice(0, 3).join('/')\n\n checkOptions(options)\n Object.keys(options).forEach(depricate, options)\n copyOptions(options)\n\n if (settings[iframeId]) {\n settings[iframeId].targetOrigin =\n true === settings[iframeId].checkOrigin\n ? getTargetOrigin(settings[iframeId].remoteHost)\n : '*'\n }\n }\n\n function beenHere() {\n return iframeId in settings && 'iFrameResizer' in iframe\n }\n\n var iframeId = ensureHasId(iframe.id)\n\n if (beenHere()) {\n warn(iframeId, 'Ignored iFrame, already setup.')\n } else {\n processOptions(options)\n setScrolling()\n setLimits()\n setupBodyMarginValues()\n init(createOutgoingMsg(iframeId))\n setupIFrameObject()\n }\n }\n\n function debouce(fn, time) {\n if (null === timer) {\n timer = setTimeout(function () {\n timer = null\n fn()\n }, time)\n }\n }\n\n var frameTimer = {}\n function debounceFrameEvents(fn, time, frameId) {\n if (!frameTimer[frameId]) {\n frameTimer[frameId] = setTimeout(function () {\n frameTimer[frameId] = null\n fn()\n }, time)\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n\n function fixHiddenIFrames() {\n function checkIFrames() {\n function checkIFrame(settingId) {\n function chkDimension(dimension) {\n return (\n '0px' ===\n (settings[settingId] && settings[settingId].iframe.style[dimension])\n )\n }\n\n function isVisible(el) {\n return null !== el.offsetParent\n }\n\n if (\n settings[settingId] &&\n isVisible(settings[settingId].iframe) &&\n (chkDimension('height') || chkDimension('width'))\n ) {\n trigger(\n 'Visibility change',\n 'resize',\n settings[settingId].iframe,\n settingId\n )\n }\n }\n\n Object.keys(settings).forEach(function (key) {\n checkIFrame(key)\n })\n }\n\n function mutationObserved(mutations) {\n log(\n 'window',\n 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\n )\n debouce(checkIFrames, 16)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n },\n observer = new MutationObserver(mutationObserved)\n\n observer.observe(target, config)\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createMutationObserver()\n }\n }\n\n function resizeIFrames(event) {\n function resize() {\n sendTriggerMsg('Window ' + event, 'resize')\n }\n\n log('window', 'Trigger event: ' + event)\n debouce(resize, 16)\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function tabVisible() {\n function resize() {\n sendTriggerMsg('Tab Visible', 'resize')\n }\n\n if ('hidden' !== document.visibilityState) {\n log('document', 'Trigger event: Visibility change')\n debouce(resize, 16)\n }\n }\n\n function sendTriggerMsg(eventName, event) {\n function isIFrameResizeEnabled(iframeId) {\n return (\n settings[iframeId] &&\n 'parent' === settings[iframeId].resizeFrom &&\n settings[iframeId].autoResize &&\n !settings[iframeId].firstRun\n )\n }\n\n Object.keys(settings).forEach(function (iframeId) {\n if (isIFrameResizeEnabled(iframeId)) {\n trigger(eventName, event, settings[iframeId].iframe, iframeId)\n }\n })\n }\n\n function setupEventListeners() {\n addEventListener(window, 'message', iFrameListener)\n\n addEventListener(window, 'resize', function () {\n resizeIFrames('resize')\n })\n\n addEventListener(document, 'visibilitychange', tabVisible)\n\n addEventListener(document, '-webkit-visibilitychange', tabVisible)\n }\n\n function factory() {\n function init(options, element) {\n function chkType() {\n if (!element.tagName) {\n throw new TypeError('Object is not a valid DOM element')\n } else if ('IFRAME' !== element.tagName.toUpperCase()) {\n throw new TypeError(\n 'Expected <IFRAME> tag, found <' + element.tagName + '>'\n )\n }\n }\n\n if (element) {\n chkType()\n setupIFrame(element, options)\n iFrames.push(element)\n }\n }\n\n function warnDeprecatedOptions(options) {\n if (options && options.enablePublicMethods) {\n warn(\n 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'\n )\n }\n }\n\n var iFrames\n\n setupRequestAnimationFrame()\n setupEventListeners()\n\n return function iFrameResizeF(options, target) {\n iFrames = [] // Only return iFrames past in on this call\n\n warnDeprecatedOptions(options)\n\n switch (typeof target) {\n case 'undefined':\n case 'string': {\n Array.prototype.forEach.call(\n document.querySelectorAll(target || 'iframe'),\n init.bind(undefined, options)\n )\n break\n }\n\n case 'object': {\n init(options, target)\n break\n }\n\n default: {\n throw new TypeError('Unexpected data type (' + typeof target + ')')\n }\n }\n\n return iFrames\n }\n }\n\n function createJQueryPublicMethod($) {\n if (!$.fn) {\n info('', 'Unable to bind to jQuery, it is not fully loaded.')\n } else if (!$.fn.iFrameResize) {\n $.fn.iFrameResize = function $iFrameResizeF(options) {\n function init(index, element) {\n setupIFrame(element, options)\n }\n\n return this.filter('iframe').each(init).end()\n }\n }\n }\n\n if (window.jQuery !== undefined) {\n createJQueryPublicMethod(window.jQuery)\n }\n\n if (typeof define === 'function' && define.amd) {\n define([], factory)\n } else if (typeof module === 'object' && typeof module.exports === 'object') {\n // Node for browserfy\n module.exports = factory()\n }\n window.iFrameResize = window.iFrameResize || factory()\n})()\n","export const MessageEventType = {\n card: {\n ready: 'justifi.card.ready',\n tokenize: 'justifi.card.tokenize',\n validate: 'justifi.card.validate',\n resize: 'justifi.card.resize',\n styleOverrides: 'justifi.card.styleOverrides',\n },\n bankAccount: {\n ready: 'justifi.bankAccount.ready',\n tokenize: 'justifi.bankAccount.tokenize',\n validate: 'justifi.bankAccount.validate',\n resize: 'justifi.bankAccount.resize',\n styleOverrides: 'justifi.bankAccount.styleOverrides',\n },\n};\n","import { Theme } from './theme';\n\nconst getComputedTheme = () => {\n const computedStyles = getComputedStyle(document.body);\n\n const computedTheme: Theme = {\n loadGoogleFont: computedStyles.getPropertyValue('--jfi-load-google-font'),\n layout: {\n fontFamily: computedStyles.getPropertyValue('--jfi-layout-font-family'),\n padding: computedStyles.getPropertyValue('--jfi-layout-padding'),\n formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),\n formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),\n },\n formControl: {\n backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),\n borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),\n borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),\n borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),\n borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),\n borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),\n borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),\n borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),\n borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),\n borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),\n borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),\n boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),\n boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),\n boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),\n boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),\n color: computedStyles.getPropertyValue('--jfi-form-control-color'),\n colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),\n lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),\n margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),\n padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),\n },\n formLabel: {\n color: computedStyles.getPropertyValue('--jfi-form-label-color'),\n fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),\n margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),\n },\n errorMessage: {\n color: computedStyles.getPropertyValue('--jfi-error-message-color'),\n margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),\n fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),\n },\n };\n\n return computedTheme;\n};\n\nexport default getComputedTheme;\n",":host {\n display: block;\n}\n\njustifi-payment-method-form iframe {\n border: none;\n width: 100%;\n}\n\niframe {\n width: 1px;\n min-width: 100%;\n}\n","import {\n Component,\n Event,\n Host,\n Prop,\n h,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport iFrameResize from 'iframe-resizer/js/iframeResizer';\nimport { MessageEventType } from './message-event-types';\nimport { Theme } from './theme';\nimport packageJson from '../../../package.json';\nimport getComputedTheme from './get-computed-theme';\nimport { CreatePaymentMethodResponse } from './payment-method-responses';\nimport { config } from '../../../config';\n\n@Component({\n tag: 'justifi-payment-method-form',\n styleUrl: 'payment-method-form.css',\n shadow: false,\n})\nexport class PaymentMethodForm {\n @Prop() paymentMethodFormType: 'card' | 'bankAccount';\n @Prop({\n mutable: true,\n })\n paymentMethodFormValidationMode:\n | 'onChange'\n | 'onBlur'\n | 'onSubmit'\n | 'onTouched'\n | 'all';\n @Prop() iframeOrigin?: string;\n @Prop() singleLine: boolean;\n @Event({ bubbles: true }) paymentMethodFormReady: EventEmitter;\n @Event({ bubbles: true }) paymentMethodFormTokenize: EventEmitter<{\n data: any;\n }>;\n\n private computedTheme: Theme = getComputedTheme();\n\n iframeElement!: HTMLIFrameElement;\n\n connectedCallback() {\n window.addEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n sendStyleOverrides() {\n if (this.computedTheme) {\n this.postMessage(\n MessageEventType[this.paymentMethodFormType].styleOverrides,\n { styleOverrides: this.computedTheme },\n );\n }\n }\n\n private dispatchMessageEvent(messageEvent: MessageEvent) {\n const messagePayload = messageEvent.data;\n const messageType = messagePayload.eventType;\n const messageData = messagePayload.data;\n\n if (messageType === MessageEventType[this.paymentMethodFormType].ready) {\n this.paymentMethodFormReady.emit(messageData);\n }\n }\n\n private postMessage(eventType: string, payload?: any) {\n this.iframeElement?.contentWindow?.postMessage({ eventType: eventType, ...payload }, config.iframeOrigin || '*');\n }\n\n @Method()\n async resize(): Promise<any> {\n this.postMessage(MessageEventType[this.paymentMethodFormType].resize);\n }\n\n private async postMessageWithResponseListener(\n eventType: string,\n payload?: any,\n ): Promise<any> {\n return new Promise(resolve => {\n const responseListener = (event: MessageEvent) => {\n if (event.data.eventType !== eventType) return;\n window.removeEventListener('message', responseListener);\n resolve(event.data.data);\n };\n window.addEventListener('message', responseListener);\n this.postMessage(eventType, payload);\n });\n }\n\n @Method()\n async tokenize(\n clientId: string,\n paymentMethodMetadata: any,\n account?: string,\n ): Promise<CreatePaymentMethodResponse> {\n const eventType = MessageEventType[this.paymentMethodFormType].tokenize;\n const payload = {\n clientId: clientId,\n componentVersion: packageJson.version,\n paymentMethodMetadata: paymentMethodMetadata,\n account: account,\n };\n\n return this.postMessageWithResponseListener(eventType, payload);\n }\n\n @Method()\n async validate(): Promise<any> {\n return this.postMessageWithResponseListener(\n MessageEventType[this.paymentMethodFormType].validate,\n );\n }\n\n private composeQueryParams(values: string[]) {\n const queryParams = values.map(value => {\n if (value === values[0]) {\n return (value = `?${value}`);\n } else {\n return (value = `&${value}`);\n }\n });\n return queryParams.join('');\n }\n\n private getIframeSrc() {\n const iframeOrigin = config.iframeOrigin;\n\n let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;\n let paramsList = [];\n if (this.paymentMethodFormValidationMode) {\n paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);\n }\n if (this.singleLine) {\n paramsList.push(`singleLine=${this.singleLine}`);\n }\n\n return iframeSrc.concat(this.composeQueryParams(paramsList));\n }\n\n render() {\n return (\n <Host>\n <iframe\n id={`justifi-payment-method-form-${this.paymentMethodFormType}`}\n src={this.getIframeSrc()}\n ref={el => {\n this.iframeElement = el as HTMLIFrameElement;\n }}\n onLoad={() => {\n iFrameResize(this.iframeElement);\n this.sendStyleOverrides();\n }}\n ></iframe>\n </Host>\n );\n }\n}\n"],"mappings":"qUAWC,SAAWA,GACV,UAAWC,SAAW,YAAa,OAEnC,IAAIC,EAAQ,EACVC,EAAa,MACbC,EAAqB,MACrBC,EAAY,UACZC,EAAeD,EAAUE,OACzBC,EAAQ,gBACRC,EAAWD,EAAMD,OACjBG,EAAe,KACfC,EAAwBV,OAAOU,sBAC/BC,EAAuBC,OAAOC,OAAO,CACnCC,IAAK,EACLC,OAAQ,EACRC,WAAY,EACZC,sBAAuB,IAEzBC,EAAW,GACXC,EAAQ,KACRC,EAAWR,OAAOC,OAAO,CACvBQ,WAAY,KACZC,eAAgB,KAChBC,WAAY,KACZC,aAAc,EACdC,YAAa,KACbC,YAAa,KACbC,YAAa,MACbC,oBAAqB,KACrBC,wBAAyB,aACzBC,GAAI,gBACJC,SAAU,GACVC,IAAK,MACLC,UAAWC,SACXC,SAAUD,SACVE,UAAW,EACXC,SAAU,EACVC,YAAa,KACbC,WAAY,SACZC,UAAW,MACXC,WAAY,KACZC,UAAW,MACXC,eAAgB,IAChBC,UAAW,EACXC,uBAAwB,SACxBC,QAAS,WACP,OAAO,IACf,EACMC,SAAU,WAAY,EACtBC,OAAQ,WAAY,EACpBC,UAAW,W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Mf,EAAe7F,EAAO6F,aAE5B,IAAIgB,EAAY,GAAGhB,KAAgBjH,KAAKqG,wBACxC,IAAI6B,EAAa,GACjB,GAAIlI,KAAKmI,gCAAiC,CACxCD,EAAW3F,KAAK,kBAAkBvC,KAAKmI,kC,CAEzC,GAAInI,KAAKoI,WAAY,CACnBF,EAAW3F,KAAK,cAAcvC,KAAKoI,a,CAGrC,OAAOH,EAAUI,OAAOrI,KAAK4H,mBAAmBM,G,CAGlD,MAAAI,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,UACE7Y,GAAI,+BAA+BsQ,KAAKqG,wBACxCzI,IAAKoC,KAAKgI,eACVS,IAAKjX,IACHwO,KAAK+G,cAAgBvV,CAAuB,EAE9CkX,OAAQ,KACN7F,EAAa7C,KAAK+G,eAClB/G,KAAKoG,oBAAoB,I"}
1
+ {"version":3,"names":["undefined","window","count","logEnabled","hiddenCheckEnabled","msgHeader","msgHeaderLen","length","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","Object","freeze","max","scroll","bodyScroll","documentElementScroll","settings","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","id","interval","log","maxHeight","Infinity","maxWidth","minHeight","minWidth","mouseEvents","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClose","onClosed","onInit","onMessage","warn","onMouseEnter","onMouseLeave","onResized","onScroll","getMutationObserver","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","setupRequestAnimationFrame","vendors","x","bind","getMyID","iframeId","retStr","top","self","parentIFrame","getId","formatLogHeader","isLogEnabled","msg","output","info","type","enabled","console","iFrameListener","event","resizeIFrame","resize","setSize","messageData","setPagePosition","on","ensureInRange","syncResize","processMsg","data","slice","split","height","parseInt","iframe","compStyle","getComputedStyle","getPaddingEnds","getBorderEnds","width","boxSizing","paddingTop","bot","paddingBottom","borderTopWidth","borderBottomWidth","Dimension","Number","min","dimension","toLowerCase","size","isMessageFromIFrame","checkAllowedOrigin","checkList","i","retCode","origin","checkSingle","remoteHost","constructor","Array","Error","isMessageForUs","isMessageFromMetaParent","true","false","getMsgBody","offset","indexOf","forwardMsgFromIFrame","msgBody","message","JSON","parse","getPageInfo","bodyPosition","document","body","getBoundingClientRect","iFramePosition","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","left","scrollTop","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowHeight","windowWidth","sendPageInfoToIframe","debouncedTrigger","trigger","debounceFrameEvents","startPageInfoMonitor","setListener","sendPageInfo","stop","forEach","start","stopPageInfo","stopPageInfoMonitor","checkIFrameExists","retBool","getElementPosition","target","getPagePosition","floor","y","scrollRequestFromChild","addOffset","reposition","newPosition","scrollTo","calcOffset","scrollParent","unsetPagePosition","findTarget","location","jumpToTarget","jumpPosition","hash","jumpToParent","moveToAnchor","hashData","decodeURIComponent","getElementById","getElementsByName","onMouse","mousePos","screenX","screenY","funcName","val","chkEvent","actionMsg","firstRun","closeIFrame","resetIFrame","hasSettings","iFrameReadyMsgReceived","createOutgoingMsg","loaded","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","reset","setDimension","style","chkZero","fixHiddenIFrames","processDimension","doNotSync","jasmine","calleeMsg","noResponseWarning","postMessageToIFrame","targetOrigin","contentWindow","postMessage","iFrameNotFound","chkAndSend","warnOnNoResponse","warning","errorShown","msgTimeout","setTimeout","isNumber","value","setupIFrame","options","setLimits","addStyle","styleValue","chkMinMax","newId","ensureHasId","src","setScrolling","overflow","setupBodyMarginValues","checkReset","resetRequertMethod","setupIFrameObject","iFrameResizer","close","removeListeners","anchor","sendMessage","init","iFrameLoaded","createDestroyObserver","destroyObserver","mutations","mutation","removedNodes","prototype","call","removedNode","observe","childList","checkOptions","copyOptions","option","hasOwnProperty","getTargetOrigin","match","depricate","key","splitName","name","charAt","toUpperCase","this","processOptions","create","join","keys","beenHere","debouce","fn","time","frameTimer","frameId","checkIFrames","checkIFrame","settingId","chkDimension","isVisible","offsetParent","mutationObserved","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","subtree","observer","resizeIFrames","sendTriggerMsg","tabVisible","visibilityState","eventName","isIFrameResizeEnabled","setupEventListeners","factory","element","chkType","tagName","iFrames","push","warnDeprecatedOptions","iFrameResizeF","querySelectorAll","createJQueryPublicMethod","$","iFrameResize","$iFrameResizeF","index","filter","each","end","jQuery","define","amd","module","exports","MessageEventType","card","ready","tokenize","validate","styleOverrides","bankAccount","getComputedTheme","computedStyles","computedTheme","loadGoogleFont","getPropertyValue","layout","fontFamily","padding","formControlSpacingHorizontal","formControlSpacingVertical","formControl","backgroundColor","borderColor","borderColorFocus","borderColorError","borderWidth","borderLeftWidth","borderRightWidth","borderRadius","borderStyle","boxShadow","boxShadowError","boxShadowErrorFocus","boxShadowFocus","color","colorFocus","fontSize","fontWeight","lineHeight","margin","formLabel","errorMessage","paymentMethodFormCss","PaymentMethodForm","connectedCallback","dispatchMessageEvent","disconnectedCallback","sendStyleOverrides","paymentMethodFormType","messageEvent","messagePayload","messageType","eventType","paymentMethodFormReady","emit","payload","_b","_a","iframeElement","assign","iframeOrigin","postMessageWithResponseListener","Promise","resolve","responseListener","clientId","paymentMethodMetadata","account","componentVersion","packageJson","version","composeQueryParams","values","queryParams","map","getIframeSrc","iframeSrc","paramsList","paymentMethodFormValidationMode","singleLine","concat","render","h","Host","ref","onLoad"],"sources":["../node_modules/iframe-resizer/js/iframeResizer.js","src/components/payment-method-form/message-event-types.ts","src/components/payment-method-form/get-computed-theme.ts","src/components/payment-method-form/payment-method-form.css?tag=justifi-payment-method-form","src/components/payment-method-form/payment-method-form.tsx"],"sourcesContent":["/*\n * File: iframeResizer.js\n * Desc: Force iframes to size to content.\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n * Contributor: Jure Mav - jure.mav@gmail.com\n * Contributor: Reed Dadoune - reed@dadoune.com\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var count = 0,\n logEnabled = false,\n hiddenCheckEnabled = false,\n msgHeader = 'message',\n msgHeaderLen = msgHeader.length,\n msgId = '[iFrameSizer]', // Must match iframe msg ID\n msgIdLen = msgId.length,\n pagePosition = null,\n requestAnimationFrame = window.requestAnimationFrame,\n resetRequiredMethods = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n }),\n settings = {},\n timer = null,\n defaults = Object.freeze({\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyMarginV1: 8,\n bodyPadding: null,\n checkOrigin: true,\n inPageLinks: false,\n enablePublicMethods: true,\n heightCalculationMethod: 'bodyOffset',\n id: 'iFrameResizer',\n interval: 32,\n log: false,\n maxHeight: Infinity,\n maxWidth: Infinity,\n minHeight: 0,\n minWidth: 0,\n mouseEvents: true,\n resizeFrom: 'parent',\n scrolling: false,\n sizeHeight: true,\n sizeWidth: false,\n warningTimeout: 5000,\n tolerance: 0,\n widthCalculationMethod: 'scroll',\n onClose: function () {\n return true\n },\n onClosed: function () {},\n onInit: function () {},\n onMessage: function () {\n warn('onMessage function not defined')\n },\n onMouseEnter: function () {},\n onMouseLeave: function () {},\n onResized: function () {},\n onScroll: function () {\n return true\n }\n })\n\n function getMutationObserver() {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n )\n }\n\n function addEventListener(el, evt, func) {\n el.addEventListener(evt, func, false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function setupRequestAnimationFrame() {\n var vendors = ['moz', 'webkit', 'o', 'ms']\n var x\n\n // Remove vendor prefixing if prefixed and break early if not\n for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\n requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\n }\n\n if (requestAnimationFrame) {\n // Firefox extension content-scripts have a globalThis object that is not the same as window.\n // Binding `requestAnimationFrame` to window allows the function to work and prevents errors\n // being thrown when run in that context, and should be a no-op in every other context.\n requestAnimationFrame = requestAnimationFrame.bind(window)\n } else {\n log('setup', 'RequestAnimationFrame not supported')\n }\n }\n\n function getMyID(iframeId) {\n var retStr = 'Host page: ' + iframeId\n\n if (window.top !== window.self) {\n retStr =\n window.parentIFrame && window.parentIFrame.getId\n ? window.parentIFrame.getId() + ': ' + iframeId\n : 'Nested host page: ' + iframeId\n }\n\n return retStr\n }\n\n function formatLogHeader(iframeId) {\n return msgId + '[' + getMyID(iframeId) + ']'\n }\n\n function isLogEnabled(iframeId) {\n return settings[iframeId] ? settings[iframeId].log : logEnabled\n }\n\n function log(iframeId, msg) {\n output('log', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function info(iframeId, msg) {\n output('info', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function warn(iframeId, msg) {\n output('warn', iframeId, msg, true)\n }\n\n function output(type, iframeId, msg, enabled) {\n if (true === enabled && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console[type](formatLogHeader(iframeId), msg)\n }\n }\n\n function iFrameListener(event) {\n function resizeIFrame() {\n function resize() {\n setSize(messageData)\n setPagePosition(iframeId)\n on('onResized', messageData)\n }\n\n ensureInRange('Height')\n ensureInRange('Width')\n\n syncResize(resize, messageData, 'init')\n }\n\n function processMsg() {\n var data = msg.slice(msgIdLen).split(':')\n var height = data[1] ? parseInt(data[1], 10) : 0\n var iframe = settings[data[0]] && settings[data[0]].iframe\n var compStyle = getComputedStyle(iframe)\n\n return {\n iframe: iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: data[2],\n type: data[3]\n }\n }\n\n function getPaddingEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n var bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n return top + bot\n }\n\n function getBorderEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n var bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n return top + bot\n }\n\n function ensureInRange(Dimension) {\n var max = Number(settings[iframeId]['max' + Dimension]),\n min = Number(settings[iframeId]['min' + Dimension]),\n dimension = Dimension.toLowerCase(),\n size = Number(messageData[dimension])\n\n log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\n\n if (size < min) {\n size = min\n log(iframeId, 'Set ' + dimension + ' to min value')\n }\n\n if (size > max) {\n size = max\n log(iframeId, 'Set ' + dimension + ' to max value')\n }\n\n messageData[dimension] = '' + size\n }\n\n function isMessageFromIFrame() {\n function checkAllowedOrigin() {\n function checkList() {\n var i = 0,\n retCode = false\n\n log(\n iframeId,\n 'Checking connection is from allowed list of origins: ' +\n checkOrigin\n )\n\n for (; i < checkOrigin.length; i++) {\n if (checkOrigin[i] === origin) {\n retCode = true\n break\n }\n }\n return retCode\n }\n\n function checkSingle() {\n var remoteHost = settings[iframeId] && settings[iframeId].remoteHost\n log(iframeId, 'Checking connection is from: ' + remoteHost)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n var origin = event.origin,\n checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin\n\n if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n 'Unexpected message received from: ' +\n origin +\n ' for ' +\n messageData.iframe.id +\n '. Message was: ' +\n event.data +\n '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\n )\n }\n\n return true\n }\n\n function isMessageForUs() {\n return (\n msgId === ('' + msg).slice(0, msgIdLen) &&\n msg.slice(msgIdLen).split(':')[0] in settings\n ) // ''+Protects against non-string msg\n }\n\n function isMessageFromMetaParent() {\n // Test if this message is from a parent above us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }\n\n if (retCode) {\n log(iframeId, 'Ignoring init message from meta parent page')\n }\n\n return retCode\n }\n\n function getMsgBody(offset) {\n return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)\n }\n\n function forwardMsgFromIFrame(msgBody) {\n log(\n iframeId,\n 'onMessage passed: {iframe: ' +\n messageData.iframe.id +\n ', message: ' +\n msgBody +\n '}'\n )\n\n on('onMessage', {\n iframe: messageData.iframe,\n message: JSON.parse(msgBody)\n })\n\n log(iframeId, '--')\n }\n\n function getPageInfo() {\n var bodyPosition = document.body.getBoundingClientRect(),\n iFramePosition = messageData.iframe.getBoundingClientRect()\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n ),\n clientWidth: Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n ),\n offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\n offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\n scrollTop: window.pageYOffset,\n scrollLeft: window.pageXOffset,\n documentHeight: document.documentElement.clientHeight,\n documentWidth: document.documentElement.clientWidth,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth\n })\n }\n\n function sendPageInfoToIframe(iframe, iframeId) {\n function debouncedTrigger() {\n trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\n }\n debounceFrameEvents(debouncedTrigger, 32, iframeId)\n }\n\n function startPageInfoMonitor() {\n function setListener(type, func) {\n function sendPageInfo() {\n if (settings[id]) {\n sendPageInfoToIframe(settings[id].iframe, id)\n } else {\n stop()\n }\n }\n\n ;['scroll', 'resize'].forEach(function (evt) {\n log(id, type + evt + ' listener for sendPageInfo')\n func(window, evt, sendPageInfo)\n })\n }\n\n function stop() {\n setListener('Remove ', removeEventListener)\n }\n\n function start() {\n setListener('Add ', addEventListener)\n }\n\n var id = iframeId // Create locally scoped copy of iFrame ID\n\n start()\n\n if (settings[id]) {\n settings[id].stopPageInfo = stop\n }\n }\n\n function stopPageInfoMonitor() {\n if (settings[iframeId] && settings[iframeId].stopPageInfo) {\n settings[iframeId].stopPageInfo()\n delete settings[iframeId].stopPageInfo\n }\n }\n\n function checkIFrameExists() {\n var retBool = true\n\n if (null === messageData.iframe) {\n warn(iframeId, 'IFrame (' + messageData.id + ') not found')\n retBool = false\n }\n return retBool\n }\n\n function getElementPosition(target) {\n var iFramePosition = target.getBoundingClientRect()\n\n getPagePosition(iframeId)\n\n return {\n x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\n y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\n }\n }\n\n function scrollRequestFromChild(addOffset) {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition() {\n pagePosition = newPosition\n scrollTo()\n log(iframeId, '--')\n }\n\n function calcOffset() {\n return {\n x: Number(messageData.width) + offset.x,\n y: Number(messageData.height) + offset.y\n }\n }\n\n function scrollParent() {\n if (window.parentIFrame) {\n window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\n newPosition.x,\n newPosition.y\n )\n } else {\n warn(\n iframeId,\n 'Unable to scroll to requested position, window.parentIFrame not found'\n )\n }\n }\n\n var offset = addOffset\n ? getElementPosition(messageData.iframe)\n : { x: 0, y: 0 },\n newPosition = calcOffset()\n\n log(\n iframeId,\n 'Reposition requested from iFrame (offset x:' +\n offset.x +\n ' y:' +\n offset.y +\n ')'\n )\n\n if (window.top === window.self) {\n reposition()\n } else {\n scrollParent()\n }\n }\n\n function scrollTo() {\n if (false === on('onScroll', pagePosition)) {\n unsetPagePosition()\n } else {\n setPagePosition(iframeId)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget() {\n var jumpPosition = getElementPosition(target)\n\n log(\n iframeId,\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n pagePosition = {\n x: jumpPosition.x,\n y: jumpPosition.y\n }\n\n scrollTo()\n log(iframeId, '--')\n }\n\n function jumpToParent() {\n if (window.parentIFrame) {\n window.parentIFrame.moveToAnchor(hash)\n } else {\n log(\n iframeId,\n 'In page link #' +\n hash +\n ' not found and window.parentIFrame not found'\n )\n }\n }\n\n var hash = location.split('#')[1] || '',\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget()\n } else if (window.top === window.self) {\n log(iframeId, 'In page link #' + hash + ' not found')\n } else {\n jumpToParent()\n }\n }\n\n function onMouse(event) {\n var mousePos = {}\n\n if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\n var data = getMsgBody(9).split(':')\n mousePos = {\n x: data[1],\n y: data[0]\n }\n } else {\n mousePos = {\n x: messageData.width,\n y: messageData.height\n }\n }\n\n on(event, {\n iframe: messageData.iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type: messageData.type\n })\n }\n\n function on(funcName, val) {\n return chkEvent(iframeId, funcName, val)\n }\n\n function actionMsg() {\n if (settings[iframeId] && settings[iframeId].firstRun) firstRun()\n\n switch (messageData.type) {\n case 'close': {\n closeIFrame(messageData.iframe)\n break\n }\n\n case 'message': {\n forwardMsgFromIFrame(getMsgBody(6))\n break\n }\n\n case 'mouseenter': {\n onMouse('onMouseEnter')\n break\n }\n\n case 'mouseleave': {\n onMouse('onMouseLeave')\n break\n }\n\n case 'autoResize': {\n settings[iframeId].autoResize = JSON.parse(getMsgBody(9))\n break\n }\n\n case 'scrollTo': {\n scrollRequestFromChild(false)\n break\n }\n\n case 'scrollToOffset': {\n scrollRequestFromChild(true)\n break\n }\n\n case 'pageInfo': {\n sendPageInfoToIframe(\n settings[iframeId] && settings[iframeId].iframe,\n iframeId\n )\n startPageInfoMonitor()\n break\n }\n\n case 'pageInfoStop': {\n stopPageInfoMonitor()\n break\n }\n\n case 'inPageLink': {\n findTarget(getMsgBody(9))\n break\n }\n\n case 'reset': {\n resetIFrame(messageData)\n break\n }\n\n case 'init': {\n resizeIFrame()\n on('onInit', messageData.iframe)\n break\n }\n\n default: {\n if (\n Number(messageData.width) === 0 &&\n Number(messageData.height) === 0\n ) {\n warn(\n 'Unsupported message received (' +\n messageData.type +\n '), this is likely due to the iframe containing a later ' +\n 'version of iframe-resizer than the parent page'\n )\n } else {\n resizeIFrame()\n }\n }\n }\n }\n\n function hasSettings(iframeId) {\n var retBool = true\n\n if (!settings[iframeId]) {\n retBool = false\n warn(\n messageData.type +\n ' No settings for ' +\n iframeId +\n '. Message was: ' +\n msg\n )\n }\n\n return retBool\n }\n\n function iFrameReadyMsgReceived() {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var iframeId in settings) {\n trigger(\n 'iFrame requested init',\n createOutgoingMsg(iframeId),\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n\n function firstRun() {\n if (settings[iframeId]) {\n settings[iframeId].firstRun = false\n }\n }\n\n var msg = event.data,\n messageData = {},\n iframeId = null\n\n if ('[iFrameResizerChild]Ready' === msg) {\n iFrameReadyMsgReceived()\n } else if (isMessageForUs()) {\n messageData = processMsg()\n iframeId = messageData.id\n if (settings[iframeId]) {\n settings[iframeId].loaded = true\n }\n\n if (!isMessageFromMetaParent() && hasSettings(iframeId)) {\n log(iframeId, 'Received: ' + msg)\n\n if (checkIFrameExists() && isMessageFromIFrame()) {\n actionMsg()\n }\n }\n } else {\n info(iframeId, 'Ignored: ' + msg)\n }\n }\n\n function chkEvent(iframeId, funcName, val) {\n var func = null,\n retVal = null\n\n if (settings[iframeId]) {\n func = settings[iframeId][funcName]\n\n if ('function' === typeof func) {\n retVal = func(val)\n } else {\n throw new TypeError(\n funcName + ' on iFrame[' + iframeId + '] is not a function'\n )\n }\n }\n\n return retVal\n }\n\n function removeIframeListeners(iframe) {\n var iframeId = iframe.id\n delete settings[iframeId]\n }\n\n function closeIFrame(iframe) {\n var iframeId = iframe.id\n if (chkEvent(iframeId, 'onClose', iframeId) === false) {\n log(iframeId, 'Close iframe cancelled by onClose event')\n return\n }\n log(iframeId, 'Removing iFrame: ' + iframeId)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe)\n }\n } catch (error) {\n warn(error)\n }\n\n chkEvent(iframeId, 'onClosed', iframeId)\n log(iframeId, '--')\n removeIframeListeners(iframe)\n }\n\n function getPagePosition(iframeId) {\n if (null === pagePosition) {\n pagePosition = {\n x:\n window.pageXOffset === undefined\n ? document.documentElement.scrollLeft\n : window.pageXOffset,\n y:\n window.pageYOffset === undefined\n ? document.documentElement.scrollTop\n : window.pageYOffset\n }\n log(\n iframeId,\n 'Get page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n }\n }\n\n function setPagePosition(iframeId) {\n if (null !== pagePosition) {\n window.scrollTo(pagePosition.x, pagePosition.y)\n log(\n iframeId,\n 'Set page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n unsetPagePosition()\n }\n }\n\n function unsetPagePosition() {\n pagePosition = null\n }\n\n function resetIFrame(messageData) {\n function reset() {\n setSize(messageData)\n trigger('reset', 'reset', messageData.iframe, messageData.id)\n }\n\n log(\n messageData.id,\n 'Size reset requested by ' +\n ('init' === messageData.type ? 'host page' : 'iFrame')\n )\n getPagePosition(messageData.id)\n syncResize(reset, messageData, 'reset')\n }\n\n function setSize(messageData) {\n function setDimension(dimension) {\n if (!messageData.id) {\n log('undefined', 'messageData id not set')\n return\n }\n messageData.iframe.style[dimension] = messageData[dimension] + 'px'\n log(\n messageData.id,\n 'IFrame (' +\n iframeId +\n ') ' +\n dimension +\n ' set to ' +\n messageData[dimension] +\n 'px'\n )\n }\n\n function chkZero(dimension) {\n // FireFox sets dimension of hidden iFrames to zero.\n // So if we detect that set up an event to check for\n // when iFrame becomes visible.\n\n /* istanbul ignore next */ // Not testable in PhantomJS\n if (!hiddenCheckEnabled && '0' === messageData[dimension]) {\n hiddenCheckEnabled = true\n log(iframeId, 'Hidden iFrame detected, creating visibility listener')\n fixHiddenIFrames()\n }\n }\n\n function processDimension(dimension) {\n setDimension(dimension)\n chkZero(dimension)\n }\n\n var iframeId = messageData.iframe.id\n\n if (settings[iframeId]) {\n if (settings[iframeId].sizeHeight) {\n processDimension('height')\n }\n if (settings[iframeId].sizeWidth) {\n processDimension('width')\n }\n }\n }\n\n function syncResize(func, messageData, doNotSync) {\n /* istanbul ignore if */ // Not testable in PhantomJS\n if (\n doNotSync !== messageData.type &&\n requestAnimationFrame &&\n // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\n !window.jasmine\n ) {\n log(messageData.id, 'Requesting animation frame')\n requestAnimationFrame(func)\n } else {\n func()\n }\n }\n\n function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\n function postMessageToIFrame() {\n var target = settings[id] && settings[id].targetOrigin\n log(\n id,\n '[' +\n calleeMsg +\n '] Sending msg to iframe[' +\n id +\n '] (' +\n msg +\n ') targetOrigin: ' +\n target\n )\n iframe.contentWindow.postMessage(msgId + msg, target)\n }\n\n function iFrameNotFound() {\n warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\n }\n\n function chkAndSend() {\n if (\n iframe &&\n 'contentWindow' in iframe &&\n null !== iframe.contentWindow\n ) {\n // Null test for PhantomJS\n postMessageToIFrame()\n } else {\n iFrameNotFound()\n }\n }\n\n function warnOnNoResponse() {\n function warning() {\n if (settings[id] && !settings[id].loaded && !errorShown) {\n errorShown = true\n warn(\n id,\n 'IFrame has not responded within ' +\n settings[id].warningTimeout / 1000 +\n ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'\n )\n }\n }\n\n if (\n !!noResponseWarning &&\n settings[id] &&\n !!settings[id].warningTimeout\n ) {\n settings[id].msgTimeout = setTimeout(\n warning,\n settings[id].warningTimeout\n )\n }\n }\n\n var errorShown = false\n\n id = id || iframe.id\n\n if (settings[id]) {\n chkAndSend()\n warnOnNoResponse()\n }\n }\n\n function createOutgoingMsg(iframeId) {\n return (\n iframeId +\n ':' +\n settings[iframeId].bodyMarginV1 +\n ':' +\n settings[iframeId].sizeWidth +\n ':' +\n settings[iframeId].log +\n ':' +\n settings[iframeId].interval +\n ':' +\n settings[iframeId].enablePublicMethods +\n ':' +\n settings[iframeId].autoResize +\n ':' +\n settings[iframeId].bodyMargin +\n ':' +\n settings[iframeId].heightCalculationMethod +\n ':' +\n settings[iframeId].bodyBackground +\n ':' +\n settings[iframeId].bodyPadding +\n ':' +\n settings[iframeId].tolerance +\n ':' +\n settings[iframeId].inPageLinks +\n ':' +\n settings[iframeId].resizeFrom +\n ':' +\n settings[iframeId].widthCalculationMethod +\n ':' +\n settings[iframeId].mouseEvents\n )\n }\n\n function isNumber(value) {\n return typeof value === 'number'\n }\n\n function setupIFrame(iframe, options) {\n function setLimits() {\n function addStyle(style) {\n var styleValue = settings[iframeId][style]\n if (Infinity !== styleValue && 0 !== styleValue) {\n iframe.style[style] = isNumber(styleValue)\n ? styleValue + 'px'\n : styleValue\n log(iframeId, 'Set ' + style + ' = ' + iframe.style[style])\n }\n }\n\n function chkMinMax(dimension) {\n if (\n settings[iframeId]['min' + dimension] >\n settings[iframeId]['max' + dimension]\n ) {\n throw new Error(\n 'Value for min' +\n dimension +\n ' can not be greater than max' +\n dimension\n )\n }\n }\n\n chkMinMax('Height')\n chkMinMax('Width')\n\n addStyle('maxHeight')\n addStyle('minHeight')\n addStyle('maxWidth')\n addStyle('minWidth')\n }\n\n function newId() {\n var id = (options && options.id) || defaults.id + count++\n if (null !== document.getElementById(id)) {\n id += count++\n }\n return id\n }\n\n function ensureHasId(iframeId) {\n if (typeof iframeId !== 'string') {\n throw new TypeError('Invaild id for iFrame. Expected String')\n }\n\n if ('' === iframeId) {\n // eslint-disable-next-line no-multi-assign\n iframe.id = iframeId = newId()\n logEnabled = (options || {}).log\n log(\n iframeId,\n 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\n )\n }\n\n return iframeId\n }\n\n function setScrolling() {\n log(\n iframeId,\n 'IFrame scrolling ' +\n (settings[iframeId] && settings[iframeId].scrolling\n ? 'enabled'\n : 'disabled') +\n ' for ' +\n iframeId\n )\n iframe.style.overflow =\n false === (settings[iframeId] && settings[iframeId].scrolling)\n ? 'hidden'\n : 'auto'\n switch (settings[iframeId] && settings[iframeId].scrolling) {\n case 'omit': {\n break\n }\n\n case true: {\n iframe.scrolling = 'yes'\n break\n }\n\n case false: {\n iframe.scrolling = 'no'\n break\n }\n\n default: {\n iframe.scrolling = settings[iframeId]\n ? settings[iframeId].scrolling\n : 'no'\n }\n }\n }\n\n // The V1 iFrame script expects an int, where as in V2 expects a CSS\n // string value such as '1px 3em', so if we have an int for V2, set V1=V2\n // and then convert V2 to a string PX value.\n function setupBodyMarginValues() {\n if (\n 'number' ===\n typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\n '0' === (settings[iframeId] && settings[iframeId].bodyMargin)\n ) {\n settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\n settings[iframeId].bodyMargin =\n '' + settings[iframeId].bodyMargin + 'px'\n }\n }\n\n function checkReset() {\n // Reduce scope of firstRun to function, because IE8's JS execution\n // context stack is borked and this value gets externally\n // changed midway through running this function!!!\n var firstRun = settings[iframeId] && settings[iframeId].firstRun,\n resetRequertMethod =\n settings[iframeId] &&\n settings[iframeId].heightCalculationMethod in resetRequiredMethods\n\n if (!firstRun && resetRequertMethod) {\n resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })\n }\n }\n\n function setupIFrameObject() {\n if (settings[iframeId]) {\n settings[iframeId].iframe.iFrameResizer = {\n close: closeIFrame.bind(null, settings[iframeId].iframe),\n\n removeListeners: removeIframeListeners.bind(\n null,\n settings[iframeId].iframe\n ),\n\n resize: trigger.bind(\n null,\n 'Window resize',\n 'resize',\n settings[iframeId].iframe\n ),\n\n moveToAnchor: function (anchor) {\n trigger(\n 'Move to anchor',\n 'moveToAnchor:' + anchor,\n settings[iframeId].iframe,\n iframeId\n )\n },\n\n sendMessage: function (message) {\n message = JSON.stringify(message)\n trigger(\n 'Send Message',\n 'message:' + message,\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n }\n }\n\n // We have to call trigger twice, as we can not be sure if all\n // iframes have completed loading when this code runs. The\n // event listener also catches the page changing in the iFrame.\n function init(msg) {\n function iFrameLoaded() {\n trigger('iFrame.onload', msg, iframe, undefined, true)\n checkReset()\n }\n\n function createDestroyObserver(MutationObserver) {\n if (!iframe.parentNode) {\n return\n }\n\n var destroyObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array\n removedNodes.forEach(function (removedNode) {\n if (removedNode === iframe) {\n closeIFrame(iframe)\n }\n })\n })\n })\n destroyObserver.observe(iframe.parentNode, {\n childList: true\n })\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createDestroyObserver(MutationObserver)\n }\n\n addEventListener(iframe, 'load', iFrameLoaded)\n trigger('init', msg, iframe, undefined, true)\n }\n\n function checkOptions(options) {\n if ('object' !== typeof options) {\n throw new TypeError('Options is not an object')\n }\n }\n\n function copyOptions(options) {\n // eslint-disable-next-line no-restricted-syntax\n for (var option in defaults) {\n if (Object.prototype.hasOwnProperty.call(defaults, option)) {\n settings[iframeId][option] = Object.prototype.hasOwnProperty.call(\n options,\n option\n )\n ? options[option]\n : defaults[option]\n }\n }\n }\n\n function getTargetOrigin(remoteHost) {\n return '' === remoteHost ||\n null !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/)\n ? '*'\n : remoteHost\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n iframeId,\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function processOptions(options) {\n options = options || {}\n\n settings[iframeId] = Object.create(null) // Protect against prototype attacks\n settings[iframeId].iframe = iframe\n settings[iframeId].firstRun = true\n settings[iframeId].remoteHost =\n iframe.src && iframe.src.split('/').slice(0, 3).join('/')\n\n checkOptions(options)\n Object.keys(options).forEach(depricate, options)\n copyOptions(options)\n\n if (settings[iframeId]) {\n settings[iframeId].targetOrigin =\n true === settings[iframeId].checkOrigin\n ? getTargetOrigin(settings[iframeId].remoteHost)\n : '*'\n }\n }\n\n function beenHere() {\n return iframeId in settings && 'iFrameResizer' in iframe\n }\n\n var iframeId = ensureHasId(iframe.id)\n\n if (beenHere()) {\n warn(iframeId, 'Ignored iFrame, already setup.')\n } else {\n processOptions(options)\n setScrolling()\n setLimits()\n setupBodyMarginValues()\n init(createOutgoingMsg(iframeId))\n setupIFrameObject()\n }\n }\n\n function debouce(fn, time) {\n if (null === timer) {\n timer = setTimeout(function () {\n timer = null\n fn()\n }, time)\n }\n }\n\n var frameTimer = {}\n function debounceFrameEvents(fn, time, frameId) {\n if (!frameTimer[frameId]) {\n frameTimer[frameId] = setTimeout(function () {\n frameTimer[frameId] = null\n fn()\n }, time)\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n\n function fixHiddenIFrames() {\n function checkIFrames() {\n function checkIFrame(settingId) {\n function chkDimension(dimension) {\n return (\n '0px' ===\n (settings[settingId] && settings[settingId].iframe.style[dimension])\n )\n }\n\n function isVisible(el) {\n return null !== el.offsetParent\n }\n\n if (\n settings[settingId] &&\n isVisible(settings[settingId].iframe) &&\n (chkDimension('height') || chkDimension('width'))\n ) {\n trigger(\n 'Visibility change',\n 'resize',\n settings[settingId].iframe,\n settingId\n )\n }\n }\n\n Object.keys(settings).forEach(function (key) {\n checkIFrame(key)\n })\n }\n\n function mutationObserved(mutations) {\n log(\n 'window',\n 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\n )\n debouce(checkIFrames, 16)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n },\n observer = new MutationObserver(mutationObserved)\n\n observer.observe(target, config)\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createMutationObserver()\n }\n }\n\n function resizeIFrames(event) {\n function resize() {\n sendTriggerMsg('Window ' + event, 'resize')\n }\n\n log('window', 'Trigger event: ' + event)\n debouce(resize, 16)\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function tabVisible() {\n function resize() {\n sendTriggerMsg('Tab Visible', 'resize')\n }\n\n if ('hidden' !== document.visibilityState) {\n log('document', 'Trigger event: Visibility change')\n debouce(resize, 16)\n }\n }\n\n function sendTriggerMsg(eventName, event) {\n function isIFrameResizeEnabled(iframeId) {\n return (\n settings[iframeId] &&\n 'parent' === settings[iframeId].resizeFrom &&\n settings[iframeId].autoResize &&\n !settings[iframeId].firstRun\n )\n }\n\n Object.keys(settings).forEach(function (iframeId) {\n if (isIFrameResizeEnabled(iframeId)) {\n trigger(eventName, event, settings[iframeId].iframe, iframeId)\n }\n })\n }\n\n function setupEventListeners() {\n addEventListener(window, 'message', iFrameListener)\n\n addEventListener(window, 'resize', function () {\n resizeIFrames('resize')\n })\n\n addEventListener(document, 'visibilitychange', tabVisible)\n\n addEventListener(document, '-webkit-visibilitychange', tabVisible)\n }\n\n function factory() {\n function init(options, element) {\n function chkType() {\n if (!element.tagName) {\n throw new TypeError('Object is not a valid DOM element')\n } else if ('IFRAME' !== element.tagName.toUpperCase()) {\n throw new TypeError(\n 'Expected <IFRAME> tag, found <' + element.tagName + '>'\n )\n }\n }\n\n if (element) {\n chkType()\n setupIFrame(element, options)\n iFrames.push(element)\n }\n }\n\n function warnDeprecatedOptions(options) {\n if (options && options.enablePublicMethods) {\n warn(\n 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'\n )\n }\n }\n\n var iFrames\n\n setupRequestAnimationFrame()\n setupEventListeners()\n\n return function iFrameResizeF(options, target) {\n iFrames = [] // Only return iFrames past in on this call\n\n warnDeprecatedOptions(options)\n\n switch (typeof target) {\n case 'undefined':\n case 'string': {\n Array.prototype.forEach.call(\n document.querySelectorAll(target || 'iframe'),\n init.bind(undefined, options)\n )\n break\n }\n\n case 'object': {\n init(options, target)\n break\n }\n\n default: {\n throw new TypeError('Unexpected data type (' + typeof target + ')')\n }\n }\n\n return iFrames\n }\n }\n\n function createJQueryPublicMethod($) {\n if (!$.fn) {\n info('', 'Unable to bind to jQuery, it is not fully loaded.')\n } else if (!$.fn.iFrameResize) {\n $.fn.iFrameResize = function $iFrameResizeF(options) {\n function init(index, element) {\n setupIFrame(element, options)\n }\n\n return this.filter('iframe').each(init).end()\n }\n }\n }\n\n if (window.jQuery !== undefined) {\n createJQueryPublicMethod(window.jQuery)\n }\n\n if (typeof define === 'function' && define.amd) {\n define([], factory)\n } else if (typeof module === 'object' && typeof module.exports === 'object') {\n // Node for browserfy\n module.exports = factory()\n }\n window.iFrameResize = window.iFrameResize || factory()\n})()\n","export const MessageEventType = {\n card: {\n ready: 'justifi.card.ready',\n tokenize: 'justifi.card.tokenize',\n validate: 'justifi.card.validate',\n resize: 'justifi.card.resize',\n styleOverrides: 'justifi.card.styleOverrides',\n },\n bankAccount: {\n ready: 'justifi.bankAccount.ready',\n tokenize: 'justifi.bankAccount.tokenize',\n validate: 'justifi.bankAccount.validate',\n resize: 'justifi.bankAccount.resize',\n styleOverrides: 'justifi.bankAccount.styleOverrides',\n },\n};\n","import { Theme } from './theme';\n\nconst getComputedTheme = () => {\n const computedStyles = getComputedStyle(document.body);\n\n const computedTheme: Theme = {\n loadGoogleFont: computedStyles.getPropertyValue('--jfi-load-google-font'),\n layout: {\n fontFamily: computedStyles.getPropertyValue('--jfi-layout-font-family'),\n padding: computedStyles.getPropertyValue('--jfi-layout-padding'),\n formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),\n formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),\n },\n formControl: {\n backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),\n borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),\n borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),\n borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),\n borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),\n borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),\n borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),\n borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),\n borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),\n borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),\n borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),\n boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),\n boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),\n boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),\n boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),\n color: computedStyles.getPropertyValue('--jfi-form-control-color'),\n colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),\n lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),\n margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),\n padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),\n },\n formLabel: {\n color: computedStyles.getPropertyValue('--jfi-form-label-color'),\n fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),\n margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),\n },\n errorMessage: {\n color: computedStyles.getPropertyValue('--jfi-error-message-color'),\n margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),\n fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),\n },\n };\n\n return computedTheme;\n};\n\nexport default getComputedTheme;\n",":host {\n display: block;\n}\n\njustifi-payment-method-form iframe {\n border: none;\n width: 100%;\n}\n\niframe {\n width: 1px;\n min-width: 100%;\n}\n","import {\n Component,\n Event,\n Host,\n Prop,\n h,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport iFrameResize from 'iframe-resizer/js/iframeResizer';\nimport { MessageEventType } from './message-event-types';\nimport { Theme } from './theme';\nimport packageJson from '../../../package.json';\nimport getComputedTheme from './get-computed-theme';\nimport { CreatePaymentMethodResponse } from './payment-method-responses';\nimport { config } from '../../../config';\n\n@Component({\n tag: 'justifi-payment-method-form',\n styleUrl: 'payment-method-form.css',\n shadow: false,\n})\nexport class PaymentMethodForm {\n @Prop() paymentMethodFormType: 'card' | 'bankAccount';\n @Prop({\n mutable: true,\n })\n paymentMethodFormValidationMode:\n | 'onChange'\n | 'onBlur'\n | 'onSubmit'\n | 'onTouched'\n | 'all';\n @Prop() iframeOrigin?: string;\n @Prop() singleLine: boolean;\n @Event({ bubbles: true }) paymentMethodFormReady: EventEmitter;\n @Event({ bubbles: true }) paymentMethodFormTokenize: EventEmitter<{\n data: any;\n }>;\n\n private computedTheme: Theme = getComputedTheme();\n\n iframeElement!: HTMLIFrameElement;\n\n connectedCallback() {\n window.addEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n sendStyleOverrides() {\n if (this.computedTheme) {\n this.postMessage(\n MessageEventType[this.paymentMethodFormType].styleOverrides,\n { styleOverrides: this.computedTheme },\n );\n }\n }\n\n private dispatchMessageEvent(messageEvent: MessageEvent) {\n const messagePayload = messageEvent.data;\n const messageType = messagePayload.eventType;\n const messageData = messagePayload.data;\n\n if (messageType === MessageEventType[this.paymentMethodFormType].ready) {\n this.paymentMethodFormReady.emit(messageData);\n }\n }\n\n private postMessage(eventType: string, payload?: any) {\n this.iframeElement?.contentWindow?.postMessage({ eventType: eventType, ...payload }, config.iframeOrigin || '*');\n }\n\n @Method()\n async resize(): Promise<any> {\n this.postMessage(MessageEventType[this.paymentMethodFormType].resize);\n }\n\n private async postMessageWithResponseListener(\n eventType: string,\n payload?: any,\n ): Promise<any> {\n return new Promise(resolve => {\n const responseListener = (event: MessageEvent) => {\n if (event.data.eventType !== eventType) return;\n window.removeEventListener('message', responseListener);\n resolve(event.data.data);\n };\n window.addEventListener('message', responseListener);\n this.postMessage(eventType, payload);\n });\n }\n\n @Method()\n async tokenize(\n clientId: string,\n paymentMethodMetadata: any,\n account?: string,\n ): Promise<CreatePaymentMethodResponse> {\n const eventType = MessageEventType[this.paymentMethodFormType].tokenize;\n const payload = {\n clientId: clientId,\n componentVersion: packageJson.version,\n paymentMethodMetadata: paymentMethodMetadata,\n account: account,\n };\n\n return this.postMessageWithResponseListener(eventType, payload);\n }\n\n @Method()\n async validate(): Promise<any> {\n return this.postMessageWithResponseListener(\n MessageEventType[this.paymentMethodFormType].validate,\n );\n }\n\n private composeQueryParams(values: string[]) {\n const queryParams = values.map(value => {\n if (value === values[0]) {\n return (value = `?${value}`);\n } else {\n return (value = `&${value}`);\n }\n });\n return queryParams.join('');\n }\n\n private getIframeSrc() {\n const iframeOrigin = config.iframeOrigin;\n\n let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;\n let paramsList = [];\n if (this.paymentMethodFormValidationMode) {\n paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);\n }\n if (this.singleLine) {\n paramsList.push(`singleLine=${this.singleLine}`);\n }\n\n return iframeSrc.concat(this.composeQueryParams(paramsList));\n }\n\n render() {\n return (\n <Host>\n <iframe\n id={`justifi-payment-method-form-${this.paymentMethodFormType}`}\n src={this.getIframeSrc()}\n ref={el => {\n this.iframeElement = el as HTMLIFrameElement;\n }}\n onLoad={() => {\n iFrameResize(this.iframeElement);\n this.sendStyleOverrides();\n }}\n ></iframe>\n </Host>\n );\n }\n}\n"],"mappings":"qUAWC,SAAWA,GACV,UAAWC,SAAW,YAAa,OAEnC,IAAIC,EAAQ,EACVC,EAAa,MACbC,EAAqB,MACrBC,EAAY,UACZC,EAAeD,EAAUE,OACzBC,EAAQ,gBACRC,EAAWD,EAAMD,OACjBG,EAAe,KACfC,EAAwBV,OAAOU,sBAC/BC,EAAuBC,OAAOC,OAAO,CACnCC,IAAK,EACLC,OAAQ,EACRC,WAAY,EACZC,sBAAuB,IAEzBC,EAAW,GACXC,EAAQ,KACRC,EAAWR,OAAOC,OAAO,CACvBQ,WAAY,KACZC,eAAgB,KAChBC,WAAY,KACZC,aAAc,EACdC,YAAa,KACbC,YAAa,KACbC,YAAa,MACbC,oBAAqB,KACrBC,wBAAyB,aACzBC,GAAI,gBACJC,SAAU,GACVC,IAAK,MACLC,UAAWC,SACXC,SAAUD,SACVE,UAAW,EACXC,SAAU,EACVC,YAAa,KACbC,WAAY,SACZC,UAAW,MACXC,WAAY,KACZC,UAAW,MACXC,eAAgB,IAChBC,UAAW,EACXC,uBAAwB,SACxBC,QAAS,WACP,OAAO,IACf,EACMC,SAAU,WAAY,EACtBC,OAAQ,WAAY,EACpBC,UAAW,WACTC,EAAK,iCACb,EACMC,aAAc,WAAY,EAC1BC,aAAc,WAAY,EAC1BC,UAAW,WAAY,EACvBC,SAAU,WACR,OAAO,IACf,IAGE,SAASC,IACP,OACEvD,OAAOwD,kBACPxD,OAAOyD,wBACPzD,OAAO0D,mBAEb,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I,KAAKoI,WAAY,CACnBF,EAAW3F,KAAK,cAAcvC,KAAKoI,a,CAGrC,OAAOH,EAAUI,OAAOrI,KAAK4H,mBAAmBM,G,CAGlD,MAAAI,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,UACE7Y,GAAI,+BAA+BsQ,KAAKqG,wBACxCzI,IAAKoC,KAAKgI,eACVS,IAAKjX,IACHwO,KAAK+G,cAAgBvV,CAAuB,EAE9CkX,OAAQ,KACN7F,EAAa7C,KAAK+G,eAClB/G,KAAKoG,oBAAoB,I"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-cbb60191.js";export{s as setNonce}from"./p-cbb60191.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a([["p-64af0ae9",[[0,"justifi-business-form",{authToken:[1,"auth-token"],businessId:[1,"business-id"],isLoading:[32]}]]],["p-5b8f004d",[[0,"justifi-business-form-stepped",{authToken:[1,"auth-token"],accountId:[1,"account-id"],businessId:[1,"business-id"],isLoading:[32],currentStep:[32],totalSteps:[32],serverError:[32]}]]],["p-f0897468",[[1,"justifi-business-details",{businessId:[1,"business-id"],authToken:[1,"auth-token"],business:[32],renderState:[32],errorMessage:[32]}]]],["p-215b4c87",[[1,"justifi-payment-form",{bankAccount:[4,"bank-account"],card:[4],email:[1],iframeOrigin:[1,"iframe-origin"],clientId:[1,"client-id"],accountId:[1,"account-id"],submitButtonText:[1,"submit-button-text"],submitButtonEnabled:[32],hasLoadedFonts:[32],isLoading:[32],selectedPaymentMethodType:[32],allowedPaymentMethodTypes:[32],fillBillingForm:[64],enableSubmitButton:[64],loadFontsOnParent:[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["p-285a50a6",[[1,"justifi-subaccount-details",{accountId:[1,"account-id"],subaccountId:[1,"subaccount-id"],authToken:[1,"auth-token"],onboardingData:[32],subaccount:[32],loading:[32],errorMessage:[32]}]]],["p-378e163d",[[1,"justifi-business-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],businesses:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-26dfa274",[[1,"justifi-payment-balance-transactions",{accountId:[1,"account-id"],authToken:[1,"auth-token"],paymentId:[1,"payment-id"],balanceTransactions:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-c1ae571b",[[1,"justifi-payments-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],payments:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-b98a3f94",[[1,"justifi-payouts-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],payouts:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-dbbd2611",[[1,"justifi-proceeds-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],proceeds:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-c4c8fb44",[[1,"justifi-refund-form",{authToken:[1,"auth-token"],paymentId:[1,"payment-id"],amount:[2],submitButtonText:[1,"submit-button-text"],withButton:[4,"with-button"],refundInfoText:[1,"refund-info-text"],errors:[32],isSubmitting:[32]}]]],["p-abc05a34",[[1,"justifi-subaccounts-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],subaccounts:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-c13186cf",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationMode:[1025,"payment-method-form-validation-mode"],iframeOrigin:[1,"iframe-origin"],singleLine:[4,"single-line"],resize:[64],tokenize:[64],validate:[64]}]]],["p-2cd29187",[[0,"justifi-bank-account-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64],resize:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-96eecdff",[[0,"justifi-card-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],internalStyleOverrides:[32],tokenize:[64],validate:[64],resize:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-160c9fbb",[[1,"justifi-payment-details",{paymentId:[1,"payment-id"],authToken:[1,"auth-token"],payment:[32],loading:[32],errorMessage:[32]}]]],["p-b12691c3",[[1,"justifi-payout-details",{payoutId:[1,"payout-id"],authToken:[1,"auth-token"],payout:[32],loading:[32],errorMessage:[32]}]]],["p-26245f01",[[1,"justifi-gross-payment-chart",{accountId:[1,"account-id"],authToken:[1,"auth-token"],data:[32],total:[32],dates:[32],endDate:[32],loading:[32],errorMessage:[32]}]]],["p-931989e6",[[1,"subaccount-bank-details",{data:[16]}]]],["p-397e0d5a",[[1,"subaccount-terms-details",{data:[16]}]]],["p-88fa33c1",[[1,"justifi-billing-form",{legend:[1025],billingFields:[32],billingFieldsErrors:[32],fill:[64],validate:[64],getValues:[64]},[[0,"fieldReceivedInput","setFormValue"]]],[1,"justifi-payment-method-selector",{paymentMethodTypes:[16],selectedPaymentMethodType:[1,"selected-payment-method-type"]}]]],["p-77e732b2",[[1,"justifi-details",{errorMessage:[1,"error-message"]}]]],["p-62872b87",[[1,"subaccount-account-details",{subaccount:[16],onboardingData:[16]}],[1,"subaccount-merchant-details",{onboardingData:[8,"onboarding-data"]}],[1,"subaccount-owners-details",{data:[16]}],[1,"subaccount-representative-details",{data:[16]}]]],["p-ec1890fc",[[1,"select-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],options:[16],internalValue:[32]}],[1,"text-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],internalValue:[32]}]]],["p-356cf20d",[[1,"form-control-monetary",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16]}]]],["p-635a3b3e",[[1,"additional-questions-details",{business:[16]}],[1,"generic-info-details",{business:[16]}],[1,"legal-address-details",{legalAddress:[16]}],[1,"owner-details",{owners:[16]}],[1,"representative-details",{representative:[16]}]]],["p-355eabff",[[1,"form-control-datepart",{label:[1],name:[1],error:[1],defaultValue:[1,"default-value"],type:[1],inputHandler:[16],disabled:[4]}],[1,"form-control-number-masked",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],mask:[1],disabled:[4]}]]],["p-c43e9572",[[1,"form-control-select",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],options:[16],disabled:[4]}],[1,"form-control-number",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],disabled:[4],input:[32]}],[1,"form-control-text",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],disabled:[4],inputHandler:[16],input:[32]}]]],["p-c4289027",[[0,"justifi-business-representative",{formController:[16],errors:[32],representative:[32]}],[0,"justifi-business-generic-info",{formController:[16],errors:[32]}],[0,"justifi-business-owners",{formController:[16],isEditing:[4,"is-editing"],errors:[32],owners:[32]}],[0,"justifi-legal-address-form",{formController:[16],errors:[32],legal_address:[32]}],[0,"justifi-additional-questions",{formController:[16],errors:[32],additional_questions:[32]}],[1,"justifi-business-address-form",{onFormUpdate:[16],errors:[8],defaultValues:[8,"default-values"],address:[32]}]]],["p-3d82c8a3",[[1,"justifi-table",{loading:[4],errorMessage:[1,"error-message"],rowData:[16],columnData:[16],paging:[16],params:[8],entityId:[16],rowClickHandler:[16]}],[1,"pagination-menu",{paging:[16],params:[16]}]]]],e)));
1
+ import{p as e,b as a}from"./p-cbb60191.js";export{s as setNonce}from"./p-cbb60191.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a([["p-64af0ae9",[[0,"justifi-business-form",{authToken:[1,"auth-token"],businessId:[1,"business-id"],isLoading:[32]}]]],["p-5b8f004d",[[0,"justifi-business-form-stepped",{authToken:[1,"auth-token"],accountId:[1,"account-id"],businessId:[1,"business-id"],isLoading:[32],currentStep:[32],totalSteps:[32],serverError:[32]}]]],["p-f0897468",[[1,"justifi-business-details",{businessId:[1,"business-id"],authToken:[1,"auth-token"],business:[32],renderState:[32],errorMessage:[32]}]]],["p-215b4c87",[[1,"justifi-payment-form",{bankAccount:[4,"bank-account"],card:[4],email:[1],iframeOrigin:[1,"iframe-origin"],clientId:[1,"client-id"],accountId:[1,"account-id"],submitButtonText:[1,"submit-button-text"],submitButtonEnabled:[32],hasLoadedFonts:[32],isLoading:[32],selectedPaymentMethodType:[32],allowedPaymentMethodTypes:[32],fillBillingForm:[64],enableSubmitButton:[64],loadFontsOnParent:[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["p-285a50a6",[[1,"justifi-subaccount-details",{accountId:[1,"account-id"],subaccountId:[1,"subaccount-id"],authToken:[1,"auth-token"],onboardingData:[32],subaccount:[32],loading:[32],errorMessage:[32]}]]],["p-378e163d",[[1,"justifi-business-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],businesses:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-26dfa274",[[1,"justifi-payment-balance-transactions",{accountId:[1,"account-id"],authToken:[1,"auth-token"],paymentId:[1,"payment-id"],balanceTransactions:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-c1ae571b",[[1,"justifi-payments-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],payments:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-b98a3f94",[[1,"justifi-payouts-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],payouts:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-dbbd2611",[[1,"justifi-proceeds-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],proceeds:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-c4c8fb44",[[1,"justifi-refund-form",{authToken:[1,"auth-token"],paymentId:[1,"payment-id"],amount:[2],submitButtonText:[1,"submit-button-text"],withButton:[4,"with-button"],refundInfoText:[1,"refund-info-text"],errors:[32],isSubmitting:[32]}]]],["p-abc05a34",[[1,"justifi-subaccounts-list",{accountId:[1,"account-id"],authToken:[1,"auth-token"],subaccounts:[32],loading:[32],errorMessage:[32],paging:[32],params:[32]}]]],["p-9ce9561a",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationMode:[1025,"payment-method-form-validation-mode"],iframeOrigin:[1,"iframe-origin"],singleLine:[4,"single-line"],resize:[64],tokenize:[64],validate:[64]}]]],["p-2cd29187",[[0,"justifi-bank-account-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64],resize:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-96eecdff",[[0,"justifi-card-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],internalStyleOverrides:[32],tokenize:[64],validate:[64],resize:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-160c9fbb",[[1,"justifi-payment-details",{paymentId:[1,"payment-id"],authToken:[1,"auth-token"],payment:[32],loading:[32],errorMessage:[32]}]]],["p-b12691c3",[[1,"justifi-payout-details",{payoutId:[1,"payout-id"],authToken:[1,"auth-token"],payout:[32],loading:[32],errorMessage:[32]}]]],["p-26245f01",[[1,"justifi-gross-payment-chart",{accountId:[1,"account-id"],authToken:[1,"auth-token"],data:[32],total:[32],dates:[32],endDate:[32],loading:[32],errorMessage:[32]}]]],["p-931989e6",[[1,"subaccount-bank-details",{data:[16]}]]],["p-397e0d5a",[[1,"subaccount-terms-details",{data:[16]}]]],["p-88fa33c1",[[1,"justifi-billing-form",{legend:[1025],billingFields:[32],billingFieldsErrors:[32],fill:[64],validate:[64],getValues:[64]},[[0,"fieldReceivedInput","setFormValue"]]],[1,"justifi-payment-method-selector",{paymentMethodTypes:[16],selectedPaymentMethodType:[1,"selected-payment-method-type"]}]]],["p-77e732b2",[[1,"justifi-details",{errorMessage:[1,"error-message"]}]]],["p-62872b87",[[1,"subaccount-account-details",{subaccount:[16],onboardingData:[16]}],[1,"subaccount-merchant-details",{onboardingData:[8,"onboarding-data"]}],[1,"subaccount-owners-details",{data:[16]}],[1,"subaccount-representative-details",{data:[16]}]]],["p-ec1890fc",[[1,"select-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],options:[16],internalValue:[32]}],[1,"text-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],internalValue:[32]}]]],["p-356cf20d",[[1,"form-control-monetary",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16]}]]],["p-635a3b3e",[[1,"additional-questions-details",{business:[16]}],[1,"generic-info-details",{business:[16]}],[1,"legal-address-details",{legalAddress:[16]}],[1,"owner-details",{owners:[16]}],[1,"representative-details",{representative:[16]}]]],["p-355eabff",[[1,"form-control-datepart",{label:[1],name:[1],error:[1],defaultValue:[1,"default-value"],type:[1],inputHandler:[16],disabled:[4]}],[1,"form-control-number-masked",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],mask:[1],disabled:[4]}]]],["p-c43e9572",[[1,"form-control-select",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],options:[16],disabled:[4]}],[1,"form-control-number",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],inputHandler:[16],disabled:[4],input:[32]}],[1,"form-control-text",{label:[1],name:[8],error:[1],defaultValue:[1,"default-value"],disabled:[4],inputHandler:[16],input:[32]}]]],["p-c4289027",[[0,"justifi-business-representative",{formController:[16],errors:[32],representative:[32]}],[0,"justifi-business-generic-info",{formController:[16],errors:[32]}],[0,"justifi-business-owners",{formController:[16],isEditing:[4,"is-editing"],errors:[32],owners:[32]}],[0,"justifi-legal-address-form",{formController:[16],errors:[32],legal_address:[32]}],[0,"justifi-additional-questions",{formController:[16],errors:[32],additional_questions:[32]}],[1,"justifi-business-address-form",{onFormUpdate:[16],errors:[8],defaultValues:[8,"default-values"],address:[32]}]]],["p-3d82c8a3",[[1,"justifi-table",{loading:[4],errorMessage:[1,"error-message"],rowData:[16],columnData:[16],paging:[16],params:[8],entityId:[16],rowClickHandler:[16]}],[1,"pagination-menu",{paging:[16],params:[16]}]]]],e)));
2
2
  //# sourceMappingURL=webcomponents.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justifi/webcomponents",
3
- "version": "4.7.0",
3
+ "version": "4.7.1-rc.0",
4
4
  "description": "JustiFi Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/components/index.js",
@@ -77,5 +77,5 @@
77
77
  "storybook": "^7.0.4"
78
78
  },
79
79
  "license": "MIT",
80
- "gitHead": "c9e7f806d5bd16a0f96b64ae7253a0001ea7178d"
80
+ "gitHead": "66d8fd7230943f4c2fa63091495188eed75692f5"
81
81
  }
package/readme.md CHANGED
@@ -1,18 +1,13 @@
1
- # Usage
1
+ ## Usage
2
2
 
3
3
  There are two methods for including the JustiFi web components in your application:
4
4
 
5
- ## Installation via npm
5
+ ### Installation via npm
6
6
 
7
7
  `npm install @justifi/webcomponents`
8
8
 
9
9
  ### Include from CDN
10
10
 
11
11
  Add the script tag in the `head` of your `index.html`:
12
- `<script type='module' src='https://cdn.jsdelivr.net/npm/@justifi/webcomponents@4.6.2/dist/webcomponents/webcomponents.esm.js'></script>`
13
- Then you can use the element anywhere in your template, JSX, html etc
14
-
15
- ## Component documentation
16
-
17
- - [justifi-bank-account-form](https://github.com/justifi-tech/web-component-library/tree/main/stencil-library/src/components/bank-account-form#justifi-bank-account-form)
18
- - [justifi-card-form](https://github.com/justifi-tech/web-component-library/tree/main/stencil-library/src/components/card-form#justifi-card-form)
12
+ ```<script type='module' src='https://cdn.jsdelivr.net/npm/@justifi/webcomponents@4.7.1-rc.0/dist/webcomponents/webcomponents.esm.js'></script>```
13
+ Then you can use the element anywhere in your template, JSX, html etc.